/* ============================================================================
   LAB WORK INDEX — /labwork/
   ----------------------------------------------------------------------------
   Loaded after /styles.css, which supplies the tokens, both font stacks,
   .container, .site-header, .site-footer, .callout-bubbles, .watermark and
   the stage meter. Nothing here redefines a site value.

   This is the index, not a notebook: a notebook page has its own
   notebook.css. The prioritization prototype and its stylesheet are in
   archive/labwork-prioritization-v5/, out of the build until a finished
   tool ships.

   Plex Mono appears only in this file, on the small labels the design sets
   in it — STAGE, SORT, the per-stage counts and UPDATED.
============================================================================ */

:root { --font-mono: "IBM Plex Mono", ui-monospace, monospace; }

/* --------------------------------------------------------------- Intro */

.lab-intro { border-bottom: 1px solid var(--hairline); }
.lab-intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 40px clamp(32px, 5vw, 64px);
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.lab-intro-copy { flex: 1 1 520px; min-width: 0; }
.lab-h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--pine);
  max-width: 14ch;
  margin-bottom: 24px;
}
.lab-rule { width: 72px; height: 4px; background: var(--pine); margin-bottom: 24px; }
.lab-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--charcoal);
  max-width: 60ch;
}

/* The callout: bubbles beside the copy, on Pine. No blue on a dark ground,
   so its button is Amber. */
.lab-callout {
  position: relative;
  overflow: hidden;
  flex: 0 1 380px;
  min-width: 0;
  background: var(--pine);
  padding: 28px 28px 30px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0 18px;
}
.lab-callout-mark { width: 140px; right: -28px; top: -18px; opacity: 0.08; }
.lab-callout > .callout-bubbles { position: relative; margin-top: 2px; }
.lab-callout-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.lab-callout-title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--linen);
}
.lab-callout-body { font-size: 16px; line-height: 1.6; color: var(--mint); max-width: 56ch; }
.lab-callout-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 22px;
  background: var(--amber);
  color: var(--pine);
  font-weight: 600;
  font-size: 15px;
}
.lab-callout-btn:hover { background: var(--linen); color: var(--pine); text-decoration: none; }
.lab-callout a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ------------------------------------------------------------ Controls */
/* The script unhides these. Without it every stage is already shown, so a
   filter would be a control that does nothing. */

.lab-controls-row { padding-top: 28px; }
.lab-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--pine);
}
.lab-controls[hidden] { display: none; }
/* With no script the rule under the controls would vanish with them, so the
   first stage section carries it instead. */
.lab-controls[hidden] + .lab-stages .lab-stage:first-child { border-top: 1.5px solid var(--pine); }

.lab-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-controls-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--moss);
  margin-right: 6px;
}
.lab-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(14, 61, 50, 0.35);
  border-radius: 0;
  background: var(--white);
  color: var(--pine);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}
.lab-chip[aria-pressed="true"] { background: var(--pine); color: var(--linen); border-color: var(--pine); }
.lab-chip:focus-visible, .lab-sort select:focus-visible { outline: 2px solid var(--lake); outline-offset: 2px; }

.lab-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--moss);
}
.lab-sort select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(14, 61, 50, 0.35);
  border-radius: 0;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--pine);
}

/* -------------------------------------------------------- The sections */

.lab-stages { padding-bottom: clamp(64px, 7vw, 104px); }
.lab-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
}
.lab-stage[hidden] { display: none; }
.lab-stage-head { flex: 0 0 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.lab-stage-name {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--pine);
}
.lab-stage-count { font-family: var(--font-mono); font-weight: 400; font-size: 13px; color: var(--moss); }
.lab-stage-def { font-size: 14.5px; line-height: 1.5; color: var(--moss); }

.lab-stage-list { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.lab-empty { padding-top: 4px; font-size: 15px; color: var(--moss); }

.lab-entry { display: flex; flex-direction: column; gap: 10px; }
.lab-entry[hidden] { display: none; }
.lab-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}
.lab-entry-title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--pine);
}
.lab-entry-updated { font-family: var(--font-mono); font-size: 12.5px; color: var(--moss); }
.lab-entry-desc { font-size: 16px; line-height: 1.6; color: var(--charcoal); max-width: 62ch; }

/* Stopped is a fact about the work, not a failure: it stays in its stage. */
.lab-stopped { display: flex; align-items: baseline; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--moss); }
.lab-stopped-dot {
  display: block;
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateY(-1px);
}
.lab-stopped strong { font-weight: 600; color: var(--pine); }

/* Arrows are allowed here. The no-arrow rule is the home page's. */
.lab-entry-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 2px; }
.lab-entry-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-weight: 600;
  font-size: 15px;
}

.lab-more {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--lake);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.lab-more[hidden] { display: none; }
.lab-more:hover { color: var(--pine); }
.lab-more:focus-visible { outline: 2px solid var(--lake); outline-offset: 3px; }
