/* Hallmark · genre: modern-minimal · macrostructure: Narrative Workflow · theme: project tokens
 * enrichment: Tier-B hand-built SVG · nav: site chrome (unchanged) · footer: site chrome (unchanged)
 * tone: technical, declarative · anchor hue: indigo 265
 * pre-emit critique: P5 H5 E4 S5 R4 V5
 *
 * Scope: the six system-design interview landings only. Every rule is nested
 * under .iv, because landing-interview.css is loaded by ~130 pages of this site
 * and a redesign of one page must not repaint the rest of it.
 *
 * Tokens: the brand ones (--accent, --ink, --bg …) come from landing-interview.css,
 * which loads first. Only what this page adds is declared here.
 */
:root {
  --iv-space-2xs: 0.25rem;
  --iv-space-xs: 0.5rem;
  --iv-space-sm: 0.75rem;
  --iv-space-md: 1rem;
  --iv-space-lg: 1.5rem;
  --iv-space-xl: 2.5rem;
  --iv-space-2xl: 4rem;
  --iv-space-3xl: 6rem;
  --iv-space-4xl: 9rem;

  --iv-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --iv-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --iv-dur-micro: 120ms;
  --iv-dur-short: 220ms;
  --iv-dur-long: 420ms;

  --iv-measure: 62ch;
  --iv-rail: 1px;
  --iv-radius: 14px;
  --iv-radius-sm: 9px;

  /* The two sides of the room, used by the role diptych and by every figure
     that has to say "this belongs to the interviewer" or "to the candidate". */
  --iv-host: var(--accent);
  --iv-host-soft: var(--accent-soft);
  --iv-cand: #2f9e6e;
  --iv-cand-soft: #e8f6ef;
  --iv-warn: #c2410c;
  --iv-warn-soft: #fdf0e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --iv-cand: #57c99a;
    --iv-cand-soft: rgba(87, 201, 154, 0.14);
    --iv-warn: #f0a273;
    --iv-warn-soft: rgba(240, 162, 115, 0.14);
  }
}

/* Deliberate overflow lives in the stage rail and the wide figures; clip rather
   than hidden so any sticky descendant keeps working. */
html,
body {
  overflow-x: clip;
}

.iv {
  --iv-gutter: clamp(1rem, 4vw, 3rem);
  font-family: var(--font-body);
  color: var(--body);
}

.iv h1,
.iv h2,
.iv h3,
.iv h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-style: normal;
  letter-spacing: -0.022em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

.iv p {
  max-width: var(--iv-measure);
}

.iv__wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: var(--iv-gutter);
}

/* ── Hero ─────────────────────────────────────────────────────────────────
   Not a full-viewport centred statement. The workflow starts here: the claim,
   the two actions, and the rail that the rest of the page walks down. */
.iv__hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 6vw, 4rem);
}

.iv__hero-grid {
  display: grid;
  gap: var(--iv-space-xl);
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.iv__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--iv-space-xs);
  margin: 0 0 var(--iv-space-md);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.iv__kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.iv__title {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw + 0.4rem, 3.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.iv__lede {
  margin: var(--iv-space-lg) 0 0;
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.18rem);
  line-height: 1.62;
  color: var(--body);
}

.iv__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--iv-space-sm);
  margin-top: var(--iv-space-xl);
}

.iv__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--iv-space-xs);
  min-height: 46px;
  padding-inline: var(--iv-space-lg);
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--iv-dur-micro) var(--iv-ease-out),
    background-color var(--iv-dur-short) var(--iv-ease-out),
    border-color var(--iv-dur-short) var(--iv-ease-out);
}

.iv__btn--primary {
  background: var(--ink);
  color: var(--bg);
}

.iv__btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .iv__btn:hover {
    transform: translateY(-1px);
  }
  .iv__btn--ghost:hover {
    border-color: var(--ink);
  }
}

.iv__btn:active {
  transform: translateY(0);
}

.iv__btn:focus-visible,
.iv summary:focus-visible,
.iv a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.iv__note {
  margin: var(--iv-space-md) 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Stages ───────────────────────────────────────────────────────────────
   A timeline spine, not a label column. The stage number sits stacked above
   its own heading in the same column; the rule to the left is a rule. */
.iv__stages {
  padding-block: var(--iv-space-2xl) var(--iv-space-3xl);
}

.iv__stage {
  position: relative;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  padding-inline-start: 0;
  border-top: var(--iv-rail) solid var(--line);
}

.iv__stage:first-of-type {
  border-top: 0;
}

.iv__num {
  display: block;
  margin: 0 0 var(--iv-space-sm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.iv__stage h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw + 0.85rem, 2.15rem);
  font-weight: 700;
  line-height: 1.14;
}

.iv__stage > p {
  margin: var(--iv-space-md) 0 0;
  font-size: 1.02rem;
  line-height: 1.68;
}

.iv__stage-body {
  display: grid;
  gap: var(--iv-space-xl);
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--iv-space-xl);
  align-items: start;
}

/* ── Figures ──────────────────────────────────────────────────────────── */
.iv__fig {
  margin: 0;
  min-width: 0;
}

.iv__fig svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--iv-radius);
  background: var(--canvas-bg);
  border: 1px solid var(--line);
}

.iv__fig figcaption {
  margin-top: var(--iv-space-sm);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Point list ───────────────────────────────────────────────────────────
   Not an icon-tile grid. A definition list: the claim in ink, the qualifier
   underneath in body. */
.iv__points {
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--iv-space-lg);
}

.iv__points > div {
  padding-inline-start: var(--iv-space-md);
  border-inline-start: 2px solid var(--line-2);
}

.iv__points dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.35;
}

.iv__points dd {
  margin: var(--iv-space-2xs) 0 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--body);
}

/* ── Role diptych ─────────────────────────────────────────────────────────
   The one section that splits the screen, because the split IS the claim. */
.iv__split {
  display: grid;
  gap: var(--iv-space-lg);
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--iv-space-xl);
}

.iv__lane {
  padding: var(--iv-space-lg);
  border-radius: var(--iv-radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.iv__lane--host {
  border-top: 3px solid var(--iv-host);
}

.iv__lane--cand {
  border-top: 3px solid var(--iv-cand);
}

.iv__lane h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.iv__lane > p {
  margin: var(--iv-space-2xs) 0 var(--iv-space-md);
  font-size: 0.9rem;
  color: var(--muted);
}

.iv__lane ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--iv-space-sm);
}

.iv__lane li {
  position: relative;
  padding-inline-start: var(--iv-space-lg);
  font-size: 0.93rem;
  line-height: 1.58;
}

.iv__lane li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 8px;
  height: 2px;
  background: var(--iv-host);
}

.iv__lane--cand li::before {
  background: var(--iv-cand);
}

/* ── Callout ──────────────────────────────────────────────────────────────
   Used where the page has to say something plainly rather than sell it. */
.iv__callout {
  margin-top: var(--iv-space-xl);
  padding: var(--iv-space-lg);
  border-radius: var(--iv-radius);
  background: var(--band);
  border-inline-start: 3px solid var(--accent);
}

.iv__callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.iv__callout p + p {
  margin-top: var(--iv-space-sm);
}

.iv__callout strong {
  color: var(--ink);
}

/* ── Band: classes, practice, teams ───────────────────────────────────── */
.iv__band {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--band);
  border-block: 1px solid var(--line);
}

.iv__band h2 {
  margin: 0 0 var(--iv-space-md);
  font-size: clamp(1.4rem, 2vw + 0.8rem, 1.95rem);
  font-weight: 700;
}

.iv__trio {
  display: grid;
  gap: var(--iv-space-lg);
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--iv-space-xl);
}

.iv__trio article {
  padding-block: var(--iv-space-md);
  border-top: 2px solid var(--ink);
}

.iv__trio h3 {
  margin: 0 0 var(--iv-space-xs);
  font-size: 1.02rem;
  font-weight: 700;
}

.iv__trio p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
}

/* ── Plans ────────────────────────────────────────────────────────────── */
.iv__plans {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.iv__plan-grid {
  display: grid;
  gap: var(--iv-space-lg);
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--iv-space-xl);
}

.iv__plan {
  padding: var(--iv-space-lg);
  border-radius: var(--iv-radius);
  border: 1px solid var(--line);
}

.iv__plan--pro {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.iv__plan h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.iv__price {
  display: block;
  margin: var(--iv-space-xs) 0 var(--iv-space-md);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.iv__price span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.iv__plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--iv-space-xs);
}

.iv__plan li {
  font-size: 0.9rem;
  line-height: 1.55;
  padding-inline-start: var(--iv-space-md);
  position: relative;
}

.iv__plan li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
}

.iv__plan--pro li::before {
  background: var(--accent);
}

/* ── FAQ ──────────────────────────────────────────────────────────────────
   Markup shape is fixed by scripts/seo-schema.mjs, which reads
   section.faq > details > summary + p to build the FAQPage JSON-LD. */
.iv .faq {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.iv .faq h2 {
  margin: 0 0 var(--iv-space-lg);
  font-size: clamp(1.4rem, 2vw + 0.8rem, 1.95rem);
  font-weight: 700;
}

.iv .faq details {
  border-bottom: 1px solid var(--line);
}

.iv .faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--iv-space-md);
  padding-block: var(--iv-space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.99rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.iv .faq summary::-webkit-details-marker {
  display: none;
}

.iv .faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-weight: 600;
  color: var(--muted);
  transition: transform var(--iv-dur-short) var(--iv-ease-in-out);
}

.iv .faq details[open] summary::after {
  transform: rotate(45deg);
}

.iv .faq details p {
  margin: 0 0 var(--iv-space-lg);
  font-size: 0.95rem;
  line-height: 1.68;
}

/* ── Final ────────────────────────────────────────────────────────────── */
.iv__final {
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  text-align: start;
}

.iv__final h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw + 0.8rem, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.iv__final p {
  margin: var(--iv-space-md) 0 var(--iv-space-xl);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ── Reveal ───────────────────────────────────────────────────────────────
   One orchestrated load, staggered by DOM index, capped under half a second. */
.iv__reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: iv-reveal var(--iv-dur-long) var(--iv-ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes iv-reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iv *,
  .iv *::before,
  .iv *::after {
    animation-duration: 150ms !important;
    transition-duration: 150ms !important;
  }
  .iv__reveal {
    animation-delay: 0ms;
    transform: none;
  }
  .iv__btn:hover,
  .iv__btn:active {
    transform: none;
  }
}

@media (pointer: coarse) {
  .iv__btn {
    min-height: 48px;
  }
  .iv .faq summary {
    min-height: 48px;
    align-items: center;
  }
}

/* ── Breakpoints ──────────────────────────────────────────────────────── */
@media (min-width: 46rem) {
  .iv__split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .iv__trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .iv__plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .iv__points {
    gap: var(--iv-space-xl);
  }
}

@media (min-width: 62rem) {
  .iv__hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--iv-space-2xl);
  }

  /* The spine. A rule, not a label column — the stage number stays stacked
     above its own heading, which is what keeps this out of the banned
     eyebrow-left / heading-right pattern. */
  .iv__stage {
    padding-inline-start: var(--iv-space-2xl);
  }
  .iv__stage::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 2px;
    background: var(--line);
  }
  .iv__stage::after {
    content: "";
    position: absolute;
    inset-inline-start: -4px;
    top: clamp(2rem, 5vw, 3.5rem);
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--accent);
  }
  .iv__stage:last-of-type::before {
    inset-block-end: auto;
    height: clamp(2rem, 5vw, 3.5rem);
  }

  /* Deliberately uneven: the odd stages lead with the words, the even ones
     with the figure, so the rhythm does not settle into a template. */
  .iv__stage-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--iv-space-2xl);
  }
  .iv__stage:nth-of-type(even) .iv__stage-body > .iv__fig {
    order: -1;
  }
  .iv__stage:nth-of-type(even) .iv__stage-body {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .iv__final {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--iv-space-2xl);
    align-items: end;
  }
  .iv__final p {
    margin-bottom: 0;
  }
}

/* ── Conversational FAQ ───────────────────────────────────────────────────
   The second interview landing (/interview-whiteboard/ and its locales).
   Same system — tokens, type, CTA voice, figures — different page shape:
   there the page walks a timeline, here every section head is a question.
   Multi-page discipline: the design system is shared, the macrostructure is
   what varies.

   The questions are headings, not accordions. Collapsed answers would be the
   wrong call on a page whose body IS the answers, and the JSON-LD comes from
   the short operational block further down, which keeps the <details> shape
   scripts/seo-schema.mjs reads. */
.iv__qa {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem);
}

.iv__q {
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
}

.iv__q:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.iv__q h2 {
  margin: 0 0 var(--iv-space-md);
  max-width: 34ch;
  font-size: clamp(1.35rem, 2vw + 0.8rem, 1.85rem);
  font-weight: 700;
  line-height: 1.18;
}

.iv__q p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.68;
}

.iv__q p + p {
  margin-top: var(--iv-space-md);
}

.iv__q a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .iv__q a:hover {
    text-decoration-thickness: 2px;
  }
}

/* One answer carries a figure, because "who can see what" is the question
   this page's readers actually arrive with. The rest is text, per the shape. */
.iv__q-fig {
  margin: var(--iv-space-lg) 0 0;
  max-width: 34rem;
}

/* The handoff. This page answers "can I use it on Thursday"; the other one
   explains the round. A rule and a line, not a second hero. */
.iv__handoff {
  padding-block: clamp(2rem, 5vw, 3rem);
  border-block: 1px solid var(--line);
  background: var(--band);
}

.iv__handoff h2 {
  margin: 0 0 var(--iv-space-sm);
  font-size: clamp(1.25rem, 1.8vw + 0.8rem, 1.6rem);
  font-weight: 700;
}

.iv__handoff p {
  margin: 0 0 var(--iv-space-lg);
  font-size: 1rem;
  line-height: 1.65;
}

@media (min-width: 62rem) {
  .iv__q {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: var(--iv-space-2xl);
    align-items: start;
  }
  .iv__q h2 {
    margin-bottom: 0;
  }
  /* The heading is a question and the answer is its answer, so they sit as a
     pair rather than stacked. This is not the banned eyebrow-left pattern:
     there is no tag, and the left column holds the whole heading. */
  .iv__q-body {
    min-width: 0;
  }
}
