/* One palette for the complete case; screenshot pixels remain original evidence. */
.talent-case {
  --palette-blue:#5d7fe5;
  --palette-lavender:#9899ee;
  --palette-periwinkle:#b7c2ed;
  --palette-blush:#fbe8fd;
  --palette-pink:#fdbbdb;
  --case-background:#0b0b0f;
  --case-surface:#17171c;
  --case-highlight:color-mix(in srgb,var(--palette-blue) 10%,var(--case-background));
  --case-ink:#f5f5f7;
  --case-copy:#d1d1d6;
  --case-muted:#adaeb8;
  --case-rule:#34353d;
  --case-action:color-mix(in srgb,var(--palette-blue) 80%,white);
  --case-agent:var(--palette-lavender);
  --case-issue:var(--palette-pink);
  --case-result:var(--palette-periwinkle);
  --case-accent-rule:color-mix(in srgb,var(--palette-blue) 45%,var(--case-background));
}
/* Continue the case background through the surrounding space and navigation. */
@media screen {
  .talent-case { background:var(--case-background); color-scheme:dark; }
  .talent-case .story-header {
    --ink:var(--case-ink); --secondary:var(--case-muted);
    --line:var(--case-rule); --blue:var(--case-action);
    background:var(--case-background); color:var(--case-ink);
    border-bottom-color:var(--case-rule);
  }
  .talent-case .story-header :is(.home-link,.deck-controls button) {
    background:transparent; color:var(--case-ink); border-color:var(--case-rule);
  }
  .talent-case .story-header .home-link:hover,
  .talent-case .story-header .deck-controls button:hover:not(:disabled) {
    background:var(--case-surface); color:var(--case-ink); border-color:var(--case-muted);
  }
  .talent-case .story-header .home-link:active,
  .talent-case .story-header .deck-controls button:active:not(:disabled) {
    background:var(--case-highlight); border-color:var(--case-action);
  }
  .talent-case .story-header .deck-chapters a:hover { color:var(--case-action); }
  .talent-case .story-header :is(a,button,select):focus-visible {
    outline:2px solid var(--case-result); outline-offset:3px;
  }
}
#main .story-page {
  --ink:var(--case-ink); --secondary:var(--case-muted);
  --line:var(--case-rule); --accent:var(--case-action);
  --n-surface:var(--case-surface); --n-copy:var(--case-copy); --n-soft:var(--case-muted);
  background:var(--case-background); color:var(--case-ink);
}
#main :is(#project,#agent) { --accent:var(--case-agent); }
#main #research { --accent:var(--case-issue); }
#main #evidence { --accent:var(--case-result); }
#main .page-masthead,#main .page-masthead b,#main .page-footer i { color:var(--case-muted); }
#problem .page-masthead>span:first-child,#redesign .page-masthead>span:first-child { color:var(--accent); }
#main .page-masthead::after { background:var(--case-rule); }
#problem .page-masthead,#redesign .page-masthead { border-color:var(--case-rule); }
#problem .context-page-number,#redesign .redesign-masthead-meta { color:var(--case-muted); }
#project .cover-description,#redesign .redesign-heading p { color:var(--case-copy); }
#project .cover-tags li:not(:first-child) { border-color:var(--case-rule); }
#project .cover-tags li:nth-child(3) { color:var(--case-action); border-color:var(--case-accent-rule); }
#redesign .redesign-tabs>button { color:var(--case-copy); border-color:#626789; }
#redesign .redesign-tabs>button[aria-selected="true"] { color:#191a32; }
#redesign .redesign-tabs>button:hover:not([aria-selected="true"]) { background:var(--case-highlight); border-color:var(--accent); }
#redesign .redesign-image { background:var(--case-surface); border-color:var(--case-rule); }
#redesign .redesign-enlarge,#redesign .redesign-view figcaption { color:var(--case-muted); }
#redesign .redesign-takeaway { color:var(--case-copy); }
#problem .context-panel { background:var(--case-surface); border-color:var(--case-rule); }
#problem .context-before { --secondary:var(--case-muted); }
#problem .context-after { background:var(--case-highlight); border-color:var(--case-accent-rule); }
#problem .context-heading h2 { color:var(--case-ink); white-space:normal; }
#problem .context-panel-heading h3 { font-size:clamp(17px,1.75cqw,20px); }
#problem .context-steps h4 { font-size:16px; }
#problem .context-steps p,#problem .context-panel-heading p,
#problem .context-panel-note,#problem .context-outcome p { font-size:13px; line-height:1.75; white-space:normal; }
#problem .context-friction { font-size:12px; border-color:#896279; background:#302332; }
#problem .context-panel-heading>span { font-size:11px; }
#problem .context-steps>li+li,#problem .context-panel-note,#problem .context-outcome { border-color:var(--case-rule); }
#problem .context-after .context-steps svg { color:var(--palette-periwinkle); }
#problem .context-transition>svg { background:var(--case-surface); border-color:var(--case-accent-rule); }
#structure .structure-reasoning p,#structure .structure-next { color:var(--case-copy); }
#structure .structure-problem .structure-label { color:var(--palette-pink); }
#structure .structure-evidence { background:var(--case-surface); border-color:var(--case-rule); }
#structure .structure-version h3 { color:var(--palette-periwinkle); }
#structure .structure-revised h3 { color:var(--accent); }
#structure .structure-version figcaption { font-size:13px; }
#main .n-play { color:#191a32; }
#main .n-play:hover { background:var(--palette-periwinkle); border-color:var(--palette-periwinkle); }
#main .n-status-comparison .candidate-example.after,
#main .n-followups .reason-example,#main .n-code-records article {
  background:var(--case-highlight); border-color:var(--case-accent-rule);
}
#main .n-bridge-emphasis { border-color:var(--case-accent-rule); }
#main .match-tag { color:var(--palette-periwinkle); background:#26304c; border-color:#6875a7; }
#main .match-tag.pending { color:var(--palette-pink); background:#352437; border-color:#896279; }
#main .n-followups .summary-counts span:nth-child(2) { color:var(--palette-periwinkle); }
#main .n-followups .summary-counts span:last-child { color:var(--palette-pink); }
#main .n-followups .reason-popover { background:#24283b; border-color:#7f8ec2; }
#main .candidate-head,#main .candidate-row,#main .summary-row { border-color:var(--case-rule); }
#main .n-source,#main .n-figure figcaption,#main .n-code-records small,
#main .n-contribution-ledger small,#main .n-learning .n-learning-boundary { font-size:13px; }
#main .n-metric-note strong span { color:var(--palette-pink); }
#main .n-findings article:nth-child(2) .n-eyebrow { color:var(--palette-pink); }
#main .story-page :is(button,a,summary,input):focus-visible { outline-color:var(--palette-periwinkle); }
.talent-case .video-dialog { background:var(--case-background); color:var(--case-ink); border-color:var(--case-rule); }
.talent-case .video-dialog-head button { background:var(--case-surface); color:var(--case-ink); border-color:var(--case-rule); }
@media(max-width:620px) {
  #problem .context-steps p,#problem .context-outcome p { font-size:13px; }
}
#problem .context-after .context-steps svg { color:var(--accent); }
#redesign .redesign-tabs>button[aria-selected="true"] .redesign-tab-action { color:inherit; }

/* Cover: retain the approved typography and pills; only adjust spacing. */
#project .page-body { grid-template-columns:minmax(0,1fr); grid-template-rows:auto; gap:0; }
#project .cover-intro { max-width:720px; }
#project .cover-heading .cover-subtitle { margin-top:6px; }
#project .cover-description { width:100%; max-width:438px; margin-top:32px; }
#project .cover-tags { margin-top:32px; }
@media screen and (min-width:901px) {
  #project.cover { min-height:clamp(560px,calc(100svh - 240px),640px); padding:56px 56px 24px; grid-template-rows:minmax(0,1fr) 18px; gap:28px; }
  #project .page-content { padding-top:0; }
  #project .case-tag { margin-bottom:28px; }
  #project .cover-heading .cover-project { margin-bottom:12px; }
}
@media(max-width:900px) {
  #project.cover { padding:40px 28px 20px; }
}
@media(max-width:620px) {
  #project.cover { padding:32px 22px 20px; }
}

/* Shared left/right guides follow the cover at every viewport width. */
#main.story-pages { --case-gutter:56px; }
#main>.story-page { padding-inline:var(--case-gutter); }
@media(max-width:900px) { #main.story-pages { --case-gutter:28px; } }
@media(max-width:620px) { #main.story-pages { --case-gutter:22px; } }

/* Cover page number follows the context-page masthead position. */
#project.cover { position:relative; }
#project .page-footer {
  position:absolute; top:28px; right:var(--case-gutter);
  height:21px; margin:0; gap:0;
  font:400 12px/1.65 var(--body); color:var(--case-muted);
  font-variant-numeric:tabular-nums;
}
#project .page-footer>span { font:inherit; color:inherit; }
#project .page-footer i { margin-left:0; color:inherit; }
@media(max-width:620px) { #project .page-footer { top:24px; } }

/* A balanced opening spread, with half-sized separators. */
@media screen {
  #main.story-pages { gap:14px; }
  #project.cover { min-height:clamp(560px,calc(100svh - 160px),740px); }
}
@media screen and (max-width:900px) {
  #project.cover { min-height:calc(100svh - 130px); }
}
@media screen and (max-width:560px) {
  #main.story-pages { gap:10px; }
}

/* Page 02: equal opening canvases, balanced columns, protected bottom inset. */
.talent-case { --opening-height:clamp(560px,calc(100svh - 160px),740px); }
#problem .context-heading h2 { font-size:clamp(22px,2.15cqw,28px); line-height:1.45; }
@media screen and (min-width:901px) {
  #project.cover { min-height:var(--opening-height); }
  #problem.journey {
    height:var(--opening-height); min-height:var(--opening-height);
    padding-bottom:36px; grid-template-rows:auto minmax(0,1fr); gap:24px;
  }
  #problem .page-content { grid-template-rows:auto minmax(0,1fr); gap:24px; }
  #problem .context-comparison { grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr); min-height:0; }
  #problem .context-panel { padding:24px; grid-template-rows:auto minmax(0,1fr) auto; min-height:0; }
  #problem .context-panel-heading h3 { font-size:18px; }
  #problem .context-steps { grid-template-rows:repeat(3,minmax(0,1fr)); margin:12px 0 0; min-height:0; }
  #problem .context-steps>li {
    grid-template-columns:28px minmax(0,1fr) auto;
    grid-template-rows:auto auto; column-gap:12px; row-gap:4px;
    padding:4px 0; align-content:center; align-items:center; min-height:0;
  }
  #problem .context-steps>li>div { display:contents; }
  #problem .context-steps svg { grid-column:1; grid-row:1 / 3; align-self:start; width:28px; height:28px; }
  #problem .context-steps h4 { grid-column:2; grid-row:1; }
  #problem .context-steps p { grid-column:2 / -1; grid-row:2; margin:0; }
  #problem .context-friction { grid-column:3; grid-row:1; min-width:0; padding:3px 10px; font-size:11px; justify-self:end; }
  #problem .context-after .context-steps h4 { grid-column:2 / -1; }
  #problem .context-panel-note,#problem .context-outcome { min-height:60px; padding-top:14px; }
  #problem .context-transition>svg { width:36px; height:36px; padding:8px; }
  #problem .context-outcome { grid-template-columns:112px minmax(0,1fr); gap:12px; }
  #problem .context-outcome strong { font-size:34px; }
}
@media screen and (min-width:901px) and (max-height:700px) {
  #problem.journey { gap:18px; }
  #problem .page-content { gap:24px; }
  #problem .context-panel { padding:20px; }
  #problem .context-steps { margin:8px 0 0; }
}
@media(max-width:900px) {
  #problem.journey { padding-bottom:32px; }
  #problem .context-heading h2 { font-size:24px; }
}

/* Page 02: quiet editorial comparison, with paired reading baselines. */
#problem {
  --context-rule:var(--case-rule);
}
#problem .page-masthead { border-color:var(--context-rule); }
#problem .context-panel {
  border-radius:8px;
  border-color:var(--context-rule);
  background:var(--case-surface);
}
#problem .context-after {
  border-color:color-mix(in srgb,var(--accent) 27%,var(--case-background));
  background:color-mix(in srgb,var(--palette-blue) 10%,var(--case-background));
}
#problem .context-panel-heading>span { letter-spacing:.16em; margin-bottom:10px; }
#problem .context-panel-heading h3 { font-weight:600; color:var(--case-ink); }
#problem .context-panel-heading p { margin:6px 0 0; }
#problem .context-title-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; }
#problem .context-title-row h3 { margin:0; line-height:28px; }
#problem .context-heading-tag {
  display:inline-flex; align-items:center; flex-shrink:0;
  height:24px; padding:0 8px; border-radius:4px; transform:translateY(-1px);
  font:400 11px/18px var(--body); letter-spacing:.02em;
  color:var(--palette-pink);
  background:color-mix(in srgb,var(--palette-pink) 9%,var(--case-background));
}
#problem .context-after .context-heading-tag {
  color:var(--palette-periwinkle);
  background:color-mix(in srgb,var(--accent) 13%,var(--case-background));
}
#problem .context-step-index {
  grid-column:1; grid-row:1 / 3; align-self:start;
  font:400 12px/24px "SFMono-Regular",Menlo,Consolas,monospace;
  color:var(--palette-periwinkle); font-variant-numeric:tabular-nums;
}
#problem .context-after .context-step-index { color:var(--accent); }
#problem .context-steps h4 { font-weight:500; line-height:24px; }
#problem .context-steps>li:first-child { border-top:1px solid transparent; }
#problem .context-steps>li+li,
#problem .context-panel-note,
#problem .context-outcome { border-color:var(--context-rule); }
#problem .context-friction {
  border:0; border-radius:0; background:none;
  padding:0; min-width:0; line-height:24px; font-weight:400;
  color:color-mix(in srgb,var(--palette-pink) 72%,var(--case-muted));
}
#problem .context-transition>svg {
  border:0; border-radius:0; background:none;
  color:var(--palette-periwinkle); opacity:.65;
}
#problem .context-outcome strong { font-weight:500; letter-spacing:-.04em; }
#problem .context-panel-note { display:flex; align-items:center; }
#problem .context-outcome p { margin:0; }
@media screen and (min-width:901px) {
  #problem .context-comparison { height:100%; max-height:460px; align-self:start; }
  #problem .context-panel { padding:24px 28px; }
  #problem .context-panel-note,#problem .context-outcome { height:54px; min-height:54px; }
  #problem .context-steps>li { grid-template-columns:22px minmax(0,1fr) auto; column-gap:10px; row-gap:5px; }
  #problem .context-friction { padding:0; }
  #problem .context-outcome { grid-template-columns:92px minmax(0,1fr); gap:12px; }
}
@media screen and (min-width:901px) and (max-height:700px) {
  #problem .context-panel { padding:20px 24px; }
}
@media(max-width:900px) {
  #problem .page-content { gap:24px; }
  #problem .context-steps>li { grid-template-columns:22px minmax(0,1fr); }
  #problem .context-friction { justify-self:start; }
  #problem .context-steps { grid-template-rows:repeat(3,minmax(84px,min-content)); margin:12px 0 0; }
  #problem .context-steps>li { padding:12px 0; }
  #problem .context-panel-note,#problem .context-outcome { min-height:48px; }
}

/* Page 03: original screenshots share one canvas; only the reveal mask moves. */
#redesign {
  --comparison-rule:color-mix(in srgb,var(--palette-periwinkle) 16%,var(--case-background));
  padding-top:28px; padding-bottom:36px;
  min-height:var(--opening-height); gap:24px;
  grid-template-rows:auto minmax(0,1fr); align-content:start;
}
#redesign .page-masthead { padding-bottom:14px; border-color:var(--comparison-rule); font-size:13px; line-height:1.65; }
#redesign .page-masthead>span:first-child { font-weight:500; }
#redesign .redesign-masthead-meta { font-size:12px; letter-spacing:0; }
#redesign .redesign-masthead-meta i { color:#84808e; font-variant-numeric:tabular-nums; }
#redesign .page-content { grid-template-rows:auto auto auto auto; align-content:start; gap:16px; }
#redesign .redesign-heading h2 { font-size:clamp(22px,2.15cqw,28px); line-height:1.45; letter-spacing:0; font-weight:600; }
#redesign .redesign-navigation { display:block; margin:0; }
#redesign .redesign-switch-hint { display:flex; justify-content:space-between; color:var(--case-copy); font-size:12px; margin:0 0 12px; }
#redesign .redesign-switch-hint span { color:var(--case-muted); }
#redesign .redesign-tabs { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
#redesign .redesign-tabs>button { width:100%; min-width:0; height:48px; padding:10px 16px; border-radius:8px; justify-content:space-between; font-size:13px; background:var(--case-background); color:var(--case-copy); border-color:var(--comparison-rule); }
#redesign .redesign-tabs>button[aria-selected="true"] { background:var(--case-surface); color:var(--case-ink); border-color:var(--accent); }
#redesign .redesign-tab-action { display:inline-flex; color:var(--case-muted); font-size:11px; }
#redesign .redesign-tab-action>span { display:inline; }
#redesign .redesign-tabs>button[aria-selected="true"] .redesign-tab-action { color:var(--accent); }
#redesign .redesign-tabs>button:hover:not([aria-selected="true"]) { background:var(--case-surface); border-color:var(--palette-periwinkle); }
#redesign .redesign-comparison { min-width:0; margin:0; }
#redesign .redesign-drag-hint { color:var(--case-muted); font-size:12px; line-height:20px; margin:0; }
#redesign .redesign-reveal { position:relative; isolation:isolate; width:100%; aspect-ratio:1.6; border:1px solid var(--comparison-rule); border-radius:8px; overflow:hidden; background:#f7f8fb; cursor:ew-resize; touch-action:pan-y; user-select:none; -webkit-user-select:none; }
#redesign .reveal-layer { position:absolute; inset:0; background:#f7f8fb; pointer-events:none; }
#redesign .reveal-layer img { display:block; width:100%; height:100%; object-fit:contain; }
#redesign .reveal-before { clip-path:inset(0 calc(100% - var(--reveal)) 0 0); }
#redesign .reveal-divider { position:absolute; top:0; bottom:0; left:var(--reveal); width:2px; transform:translateX(-1px); background:var(--accent); pointer-events:none; }
#redesign .reveal-handle { position:absolute; top:50%; left:clamp(23px,var(--reveal),calc(100% - 23px)); transform:translate(-50%,-50%); width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--accent); border-radius:50%; background:var(--case-surface); color:var(--palette-blush); pointer-events:none; box-shadow:0 2px 10px #0003; }
#redesign .reveal-handle svg { width:22px; height:22px; }
#redesign .redesign-reveal:hover .reveal-handle,#redesign .is-dragging .reveal-handle { background:var(--case-highlight); }
#redesign .redesign-reveal:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#redesign .reveal-loading { position:absolute; inset:0; z-index:3; display:grid; place-items:center; padding:24px; background:var(--case-surface); color:var(--case-copy); font-size:13px; pointer-events:none; }
#redesign .reveal-loading[hidden] { display:none; }
#redesign .redesign-comparison-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-top:12px; color:var(--case-muted); font-size:12px; line-height:1.75; }
#redesign .redesign-comparison-footer>div { display:flex; gap:20px; flex-shrink:0; margin-left:auto; }
#redesign .redesign-enlarge { opacity:1; min-height:32px; font-size:12px; }
#redesign .redesign-takeaway { display:grid; grid-template-columns:70px minmax(0,1fr); gap:12px; margin:0; padding:16px 0 0; border-top:0; font-size:13px; line-height:1.75; }
#redesign .redesign-takeaway::before { display:none; }
#redesign .redesign-takeaway strong { color:var(--accent); font-weight:500; margin:0; transform:translateX(8px); }
/* Match the opening spreads; the preview takes the remaining space. */
@media screen and (min-width:901px) {
  #redesign { height:var(--opening-height); min-height:var(--opening-height); }
  #redesign .page-content { min-height:0; grid-template-rows:auto minmax(0,1fr) auto; gap:0; padding-bottom:12px; }
  #redesign .redesign-heading { margin-bottom:20px; }
  #redesign .redesign-workbench { position:relative; min-height:0; display:grid; grid-template-columns:200px minmax(0,1fr); gap:20px; padding:16px; border:1px solid var(--comparison-rule); border-radius:8px; }
  #redesign .redesign-navigation { display:flex; flex-direction:column; align-items:stretch; gap:16px; min-height:0; padding-right:16px; border-right:1px solid var(--comparison-rule); }
  #redesign .redesign-tabs { grid-template-columns:1fr; gap:8px; }
  #redesign .redesign-tabs>button { position:relative; height:76px; padding:12px 20px; flex-direction:column; align-items:flex-start; justify-content:center; gap:8px; border-radius:10px; }
  #redesign .redesign-tabs>button[aria-selected="true"]::before { content:""; position:absolute; left:0; top:16px; bottom:16px; width:3px; border-radius:2px; background:var(--accent); }
  #redesign .redesign-tab-label { display:flex; flex-direction:column; gap:8px; font-size:16px; font-weight:500; line-height:22px; }
  #redesign .redesign-tab-action { display:none; }
  #redesign .redesign-tab-number { display:block; font:400 11px/14px "SFMono-Regular",Menlo,monospace; letter-spacing:.12em; color:#85828f; }
  #redesign .redesign-reveal { border-color:transparent; border-radius:4px; }
  #redesign .redesign-switch-hint { display:none; }
  #redesign .redesign-comparison { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); }
  #redesign .redesign-reveal { min-height:0; height:100%; aspect-ratio:auto; }
  #redesign .redesign-reveal,#redesign .reveal-layer { background:var(--case-background); }
  #redesign .redesign-comparison-footer { padding-top:8px; }
  #redesign .redesign-takeaway { margin-top:8px; padding-top:0; }
}
@media screen and (min-width:901px) and (max-height:700px) {
  #redesign .redesign-tabs>button { height:56px; padding-block:6px; }
  #redesign .redesign-tab-label { gap:4px; }
}
@media(max-width:900px) {
  #redesign { min-height:0; }
  #redesign .redesign-heading h2 { font-size:24px; }
  #redesign .redesign-navigation { margin-bottom:24px; }
  #redesign .redesign-tabs>button { padding:10px 12px; }
  #redesign .redesign-tab-action>span { display:none; }
}
@media(max-width:620px) {
  #redesign { padding-top:24px; padding-bottom:32px; }
  #redesign .redesign-tabs>button { flex-direction:column; gap:4px; height:auto; min-height:66px; padding:8px 4px; font-size:12px; }
  #redesign .redesign-tab-action>span { display:inline; }
  #redesign .redesign-comparison-footer { align-items:center; flex-wrap:wrap; gap:4px 12px; padding-top:0; }
  #redesign .redesign-enlarge { min-height:44px; }
  #redesign .redesign-takeaway { grid-template-columns:1fr; gap:6px; }
}

/* Page 04: one grid for reasoning, comparison headings, screens and captions. */
#structure {
  --structure-rule:var(--case-rule);
  --structure-screen-height:clamp(280px,29cqw,360px);
  height:auto; min-height:var(--opening-height); padding-block:28px 32px;
  grid-template-rows:auto 1fr; gap:24px;
}
#structure .page-masthead { padding-bottom:16px; border-bottom:1px solid var(--structure-rule); font-size:13px; line-height:20px; }
#structure .page-masthead::after { display:none; }
#structure .page-masthead>span:first-child { color:var(--accent); font-weight:500; letter-spacing:.14em; }
#structure .structure-page-number { color:#84808e; font-size:12px; font-variant-numeric:tabular-nums; }
#structure .page-content { grid-template-rows:auto 1fr auto; gap:24px; }
#structure .structure-heading h2 { font:600 clamp(22px,2.15cqw,28px)/1.45 var(--body); letter-spacing:0; }
#structure .structure-heading>p { margin-top:8px; font-size:13px; line-height:1.8; color:var(--case-muted); }
#structure .structure-comparison { grid-template-columns:minmax(0,.85fr) minmax(0,1.45fr); gap:24px; align-items:stretch; }
#structure .structure-reasoning { display:grid; grid-template-columns:1fr; grid-template-rows:auto 1fr; padding:0; gap:16px; min-height:0; }
#structure .structure-problem,#structure .structure-change { padding:20px; border:1px solid var(--structure-rule); border-radius:8px; background:var(--case-surface); }
#structure .structure-label { display:block; margin-bottom:8px; color:var(--accent); font-size:10px; line-height:16px; }
#structure .structure-problem .structure-label { color:var(--palette-pink); }
#structure .structure-problem h3 { font-size:16px; line-height:1.6; font-weight:600; text-wrap:pretty; }
#structure .structure-reasoning p { margin-top:8px; font-size:13px; line-height:1.8; color:var(--case-muted); }
#structure .structure-change ol { gap:20px; }
#structure .structure-change li { padding-left:28px; }
#structure .structure-change li::before { top:0; font-size:12px; line-height:24px; }
#structure .structure-change h4 { font-size:14px; line-height:24px; font-weight:500; }
#structure .structure-change li p { margin-top:4px; }
#structure .structure-evidence { padding:20px; grid-template-columns:calc(var(--structure-screen-height) * 904 / 1142) 24px calc(var(--structure-screen-height) * 398 / 927); gap:24px; align-content:center; justify-content:center; border:1px solid var(--structure-rule); border-radius:8px; background:var(--case-surface); }
#structure .structure-version { min-width:0; grid-template-rows:48px auto; gap:16px; }
#structure .structure-version h3 { display:flex; flex-direction:column; gap:4px; margin:0; font-size:11px; line-height:18px; font-weight:400; text-align:left; color:var(--case-muted); }
#structure .structure-version h3>span { color:var(--case-ink); font-size:13px; line-height:20px; font-weight:500; }
#structure .structure-revised h3>span { color:var(--accent); }
#structure .structure-version .evidence-image { height:auto; min-height:0; grid-template-rows:var(--structure-screen-height) 20px; gap:12px; }
#structure .structure-version .image-area>button { justify-content:flex-start; }
#structure .structure-version .image-area img { display:block; width:auto; height:100%; max-width:100%; object-fit:contain; object-position:top left; }
#structure .structure-version figcaption { margin:0; font-size:11px; line-height:20px; text-align:left; color:var(--case-muted); white-space:nowrap; }
#structure .structure-transition { align-self:stretch; padding-top:32px; }
#structure .structure-transition svg { width:24px; height:24px; }
#structure .page-takeaway { padding-top:16px; border-color:var(--structure-rule); font-size:12px; line-height:1.8; color:var(--case-muted); }
@media(min-width:901px) and (max-width:1100px) {
  #structure { --structure-screen-height:300px; }
  #structure .structure-comparison { grid-template-columns:minmax(0,.8fr) minmax(0,1.5fr); }
  #structure .structure-problem,#structure .structure-change { padding:16px; }
  #structure .structure-evidence { padding:16px; gap:16px; grid-template-columns:calc(var(--structure-screen-height) * 904 / 1142) 20px calc(var(--structure-screen-height) * 398 / 927); }
  #structure .structure-change ol { gap:16px; }
  #structure .structure-version h3 { font-size:10px; }
  #structure .structure-version h3>span { font-size:12px; }
}
@media(max-width:900px) {
  #structure { --structure-screen-height:300px; min-height:0; }
  #structure .structure-heading h2 { font-size:24px; }
  #structure .structure-comparison { grid-template-columns:1fr; }
  #structure .structure-reasoning { grid-template-columns:1fr 1fr; grid-template-rows:auto; }
  #structure .structure-evidence { padding:24px; gap:24px; }
}
@media(max-width:620px) {
  #structure { --structure-screen-height:clamp(220px,70vw,280px); padding-block:24px; }
  #structure .structure-heading h2 { font-size:22px; }
  #structure .structure-reasoning { grid-template-columns:1fr; gap:16px; }
  #structure .structure-problem,#structure .structure-change { padding:16px; }
  #structure .structure-evidence { grid-template-columns:1fr; justify-items:center; padding:20px; gap:20px; }
  #structure .structure-version { width:100%; max-width:222px; grid-template-rows:auto auto; gap:16px; }
  #structure .structure-version h3 { min-height:0; }
  #structure .structure-transition { height:24px; padding:0; }
  #structure .structure-transition svg { transform:rotate(90deg); }
  #structure .structure-version figcaption { white-space:normal; }
}

/* Original condition/result screens retain their scale and scroll within the spread. */
#redesign .reveal-scroll { position:absolute; inset:0; overflow:hidden; }
#redesign .reveal-canvas { position:relative; height:100%; min-height:100%; }
#redesign .is-scrollable .reveal-scroll { overflow-y:auto; overscroll-behavior-y:contain; scrollbar-width:thin; scrollbar-color:var(--accent) #17171d; }
#redesign .is-scrollable .reveal-layer { background:#f5f5fa; }
#redesign .is-scrollable .reveal-layer img { height:auto; object-fit:initial; }
#redesign .reveal-divider { left:var(--reveal-offset,var(--reveal)); }
#redesign .reveal-handle { left:clamp(23px,var(--reveal-offset,var(--reveal)),calc(100% - 23px)); }

/* Labels remain outside the image; the divider stays inside the image viewport. */
#redesign .redesign-comparison-labels { position:relative; display:flex; justify-content:space-between; align-items:flex-start; gap:16px; min-height:34px; margin:0; padding:0 0 4px; border-bottom:0; font:600 12px/20px var(--body); letter-spacing:.05em; }
#redesign .redesign-comparison-labels>span { position:relative; z-index:1; padding:4px 10px; border-radius:3px; }
:is(#redesign,#search-feedback) .reveal-badge-after { color:#d2b5ff; background:#241b38; box-shadow:inset 0 0 0 1px #705595; }
:is(#redesign,#search-feedback) .reveal-badge-before { color:#f2c56e; background:#302313; box-shadow:inset 0 0 0 1px #806038; }
@media(max-width:620px) {
  #redesign .redesign-comparison-labels { font-size:11px; }
  #redesign .redesign-comparison-labels>span { padding-inline:8px; }
}

/* Keep comparison controls inside the frame and give the preview the reclaimed row. */
#redesign .redesign-comparison-actions { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:16px; margin:0 0 6px; }
#redesign .redesign-comparison-actions .redesign-enlarge { min-height:24px; font-size:12px; }
#redesign .redesign-navigation .redesign-drag-hint { display:block; margin-top:16px; text-align:center; text-wrap:balance; }
@media(min-width:901px) {
  #redesign .redesign-navigation .redesign-drag-hint { margin-top:auto; padding-top:12px; }
}
@media(max-width:620px) {
  #redesign .redesign-comparison-actions .redesign-enlarge { min-height:44px; }
}

/* Enlargement links sit above the frame, on the heading's right edge. */
#redesign .redesign-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:16px 24px; }
#redesign .redesign-heading h2 { min-width:0; }
#redesign .redesign-heading .redesign-comparison-actions { flex-shrink:0; margin:0; }
@media(max-width:620px) {
  #redesign .redesign-heading { flex-wrap:wrap; gap:4px; }
  #redesign .redesign-heading .redesign-comparison-actions { width:100%; }
}

/* Account for transparent padding around the supplied chat modal in the preview. */
#redesign .redesign-reveal[data-screen="chat"] img[data-version="after"] { transform:translateY(2.08%) scale(1.2495); }

#redesign #redesign-takeaway { transform:translateX(-8px); }

#redesign .redesign-takeaway { transform:translateY(4px); }

/* The fourth tab presents the later Agent prototype as a click-to-play demo. */
#redesign [hidden] { display:none !important; }
#redesign .redesign-agent-label { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; min-height:34px; padding-bottom:4px; font:600 12px/20px var(--body); letter-spacing:.05em; }
#redesign .redesign-agent-label>span { padding:4px 10px; border-radius:3px; color:#d2b5ff; background:#241b38; box-shadow:inset 0 0 0 1px #705595; }
#redesign .redesign-video-status { color:var(--case-muted); font:400 12px/20px var(--body); letter-spacing:0; }
#redesign .redesign-agent-preview { position:relative; min-width:0; width:100%; aspect-ratio:1.6; overflow:hidden; border-radius:4px; background:var(--case-background); }
#redesign .redesign-agent-preview video { display:block; width:100%; height:100%; object-fit:contain; }
#redesign .redesign-agent-preview video:fullscreen { width:100%; height:100%; aspect-ratio:auto; object-fit:contain; }
#redesign .redesign-video-play { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); display:flex; align-items:center; justify-content:center; gap:12px; min-height:52px; max-width:calc(100% - 32px); padding:14px 20px; border:1px solid #5e5e6a; border-radius:8px; background:#17171cf2; color:var(--case-ink); font:500 14px/22px var(--body); cursor:pointer; }
#redesign .redesign-video-play:hover { background:#30303a; }
#redesign :is(.redesign-video-play, .redesign-agent-preview, .redesign-agent-preview video):focus-visible { outline:2px solid var(--accent); outline-offset:-4px; }
@media(min-width:901px) {
  #redesign .redesign-agent-preview { min-height:0; height:100%; aspect-ratio:auto; }
}

/* Pages 05–06 continue page 04's finding → decision → evidence hierarchy. */
#main .design-story {
  height:auto; min-height:var(--opening-height); grid-template-rows:auto 1fr;
  padding-top:28px; padding-bottom:36px; gap:24px;
}
#main .design-story .page-masthead {
  padding-bottom:14px; border-bottom:1px solid color-mix(in srgb,var(--palette-periwinkle) 16%,var(--case-background));
  font-size:13px; line-height:1.65;
}
#main .design-story .page-masthead::after { display:none; }
#main .design-story .page-masthead>span:first-child { color:var(--case-muted); font-weight:500; letter-spacing:.14em; }
#main .design-story .page-masthead>span:last-child { font-size:12px; font-variant-numeric:tabular-nums; }
.design-story .n-content { grid-template-rows:auto 1fr auto; gap:24px; }
.design-story .n-heading { grid-template-columns:1fr; gap:8px; }
.design-story .n-heading h2 { font:600 clamp(22px,2.15cqw,28px)/1.45 var(--body); letter-spacing:0; text-wrap:pretty; }
.design-story .n-heading>p { margin:0; font-size:13px; line-height:1.8; color:var(--case-muted); }
.design-story .n-eyebrow { font-size:11px; line-height:1.7; margin-bottom:8px; }
.design-story .n-figure figcaption { font-size:12px; }
.design-story .n-research-layout { grid-template-columns:minmax(0,1fr) minmax(0,1.12fr); gap:28px; }
.design-story .n-research-evidence {
  grid-template-columns:minmax(0,1fr) minmax(110px,.8fr); align-items:center;
  padding:20px; gap:24px; border:1px solid var(--case-rule); border-radius:10px;
}
.design-story .n-tall img { max-height:360px; }
.design-story .n-field-notes { gap:24px; }
.design-story .n-field-notes>div { padding-top:12px; }
.design-story .n-field-notes h3 { font-size:15px; margin-top:6px; }
.design-story .n-field-notes p { font-size:12px; line-height:1.8; margin-top:4px; }
.design-story .n-field-notes .research-question { color:var(--palette-pink); font-size:14px; margin:0; }
.design-story .n-research-reasoning { gap:16px; justify-content:space-between; }
.design-story .research-record { padding:16px; gap:8px; border:1px solid color-mix(in srgb,var(--palette-pink) 25%,var(--case-background)); border-radius:8px; background:color-mix(in srgb,var(--palette-blush) 3%,var(--case-background)); }
.design-story .research-record .n-eyebrow { color:var(--palette-pink); margin:0; }
.design-story .research-record img { max-width:378px; max-height:none; }
.design-story .research-interpretation h3 { font-size:16px; line-height:1.6; margin:0 0 6px; }
.design-story .research-interpretation p { font-size:13px; line-height:1.8; color:var(--case-copy); margin:0; }
.design-story .research-placeholder {
  margin:0; padding:14px 16px; border:1px dashed var(--case-accent-rule); border-radius:8px;
  background:color-mix(in srgb,var(--accent) 3%,var(--case-background));
}
.design-story .placeholder-tag { font-size:11px; color:var(--palette-periwinkle); }
.design-story .research-placeholder p { margin:6px 0 4px; color:var(--case-copy); font-size:13px; line-height:1.7; }
.design-story .research-placeholder figcaption { font-size:11px; line-height:1.7; color:var(--case-muted); }
.design-story .n-evidence-links { align-items:center; justify-content:space-between; gap:4px 12px; }
.design-story .n-evidence-links>span { font-size:11px; color:var(--case-muted); }
.design-story .n-link { font-size:12px; min-height:32px; }
.design-story .n-condition-layout { grid-template-columns:minmax(0,1.12fr) minmax(0,1fr); gap:36px; align-items:start; }
.design-story .n-condition-shots { border:1px solid var(--case-rule); border-radius:10px; padding:20px; gap:24px; }
.design-story .n-annotated { grid-template-columns:48px minmax(0,1fr); gap:12px; }
.design-story .n-annotated .n-index { font-size:11px; }
.design-story .n-condition-top img { max-height:85px; }
.design-story .n-condition-body img { max-height:245px; }
.design-story .n-decisions { gap:22px; }
.design-story .n-decisions li { grid-template-columns:24px minmax(0,1fr); gap:12px; }
.design-story .n-decisions h3 { font-size:16px; margin-bottom:6px; }
.design-story .n-decisions p { font-size:13px; line-height:1.8; }
.design-story .n-judgment { padding-top:18px; margin-top:22px; }
.design-story .n-judgment p { margin:0; font-size:14px; line-height:1.8; color:var(--case-copy); }
.design-story .design-takeaway { display:flex; flex-wrap:wrap; gap:4px 12px; margin:0; padding-top:16px; border-top:1px solid var(--case-rule); color:var(--case-muted); font-size:12px; line-height:1.8; }
.design-story .design-takeaway strong { font-weight:500; color:var(--accent); }
@media(min-width:901px) and (max-height:840px), (min-width:901px) and (max-width:1000px) {
  #main .design-story { gap:16px; padding-bottom:28px; }
  .design-story .n-content { gap:16px; }
  .design-story .n-tall img { max-height:325px; }
  .design-story .n-research-reasoning { gap:12px; }
  .design-story .n-condition-shots { gap:16px; padding:16px; }
  .design-story .n-condition-body img { max-height:220px; }
  .design-story .n-decisions { gap:16px; }
}
@media(max-width:900px) {
  #main .design-story { min-height:0; }
  .design-story .n-heading h2 { font-size:24px; }
  .design-story .n-research-layout,.design-story .n-condition-layout { grid-template-columns:1fr; gap:24px; }
  .design-story .n-research-evidence,.design-story .n-condition-shots { width:100%; max-width:600px; justify-self:center; }
  .design-story .n-research-reasoning { gap:24px; }
  .design-story .n-condition-body img { max-height:300px; }
}
@media(max-width:620px) {
  #main .design-story { padding-top:24px; padding-bottom:32px; }
  .design-story .n-heading>p { font-size:13px; }
  .design-story .n-research-evidence { grid-template-columns:minmax(0,1fr) minmax(94px,.65fr); gap:16px; padding:16px; }
  .design-story .n-tall img { max-height:320px; }
  .design-story .n-field-notes { gap:18px; }
  .design-story .n-field-notes .research-question { font-size:13px; }
  .design-story .research-record { padding:12px; }
  .design-story .research-record figcaption { flex-wrap:wrap; gap:2px; }
  .design-story .n-link { min-height:44px; }
  .design-story .n-condition-shots { padding:16px; }
  .design-story .n-annotated { grid-template-columns:1fr; gap:8px; }
  .design-story .n-condition-top img { max-height:none; }
  .design-story .n-condition-body img { max-height:340px; }
  .design-story .n-decisions p,.design-story .research-interpretation p { font-size:14px; }
}

/* Pages 07–08: finish the recruiting task, then separate feedback from follow-up. */
#search-feedback .task-stages { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
#search-feedback .task-stage { min-width:0; display:grid; grid-template-rows:auto auto 1fr auto; align-content:start; gap:16px; }
#search-feedback .task-stage+article { border-left:1px solid var(--case-rule); padding-left:28px; }
#search-feedback .task-stage>header { padding-bottom:12px; border-bottom:1px solid var(--case-rule); }
#search-feedback .task-stage .n-eyebrow { margin-bottom:6px; }
#search-feedback .task-stage h3 { font-size:17px; line-height:1.6; }
#search-feedback .task-shot { gap:10px; }
#search-feedback .task-shot>button { height:235px; padding:14px; border:1px solid var(--case-rule); border-radius:8px; background:var(--case-surface); }
#search-feedback .task-shot img { width:100%; height:100%; max-height:none; object-fit:contain; }
#search-feedback .task-decisions { display:grid; align-content:start; gap:12px; margin:0; }
#search-feedback .task-decisions>div { display:grid; grid-template-columns:92px minmax(0,1fr); gap:12px; }
#search-feedback .task-decisions dt { color:var(--palette-periwinkle); font-size:12px; line-height:1.8; }
#search-feedback .task-decisions dd { margin:0; color:var(--case-copy); font-size:13px; line-height:1.8; }
#search-feedback .n-evidence-links { justify-content:flex-start; gap:4px 20px; }
#evidence .n-content { grid-template-rows:repeat(5,auto); align-content:start; gap:22px; }
#evidence .validation-source { gap:10px; }
#evidence .validation-source img { width:100%; height:auto; max-height:none; }
#evidence .validation-findings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
#evidence .validation-findings>article { padding:16px 18px; border:1px solid var(--case-accent-rule); border-radius:8px; background:color-mix(in srgb,var(--accent) 5%,var(--case-background)); }
#evidence .validation-findings>article+article { border-color:color-mix(in srgb,var(--palette-pink) 25%,var(--case-background)); background:color-mix(in srgb,var(--palette-blush) 3%,var(--case-background)); }
#evidence .validation-findings>article+article .n-eyebrow { color:var(--palette-pink); }
#evidence .validation-findings h3 { font-size:16px; line-height:1.6; margin:0 0 8px; }
#evidence .validation-findings p { color:var(--case-copy); font-size:13px; line-height:1.8; margin:0; }
#evidence .validation-next { display:grid; grid-template-columns:164px minmax(0,1fr); gap:16px; align-items:start; }
#evidence .validation-next .n-eyebrow { margin:0; padding-top:2px; }
#evidence .validation-next p { margin:0; color:var(--case-copy); font-size:13px; line-height:1.8; }
#evidence .validation-support { display:grid; grid-template-columns:180px minmax(0,1fr) auto; gap:28px; align-items:center; padding-top:18px; border-top:1px solid var(--case-rule); }
#evidence .validation-score>span { display:block; color:var(--case-muted); font-size:11px; line-height:1.8; }
#evidence .validation-score strong { display:block; color:var(--palette-periwinkle); font:500 24px/1.6 var(--display); white-space:nowrap; }
#evidence .validation-score i { color:var(--case-muted); font-size:16px; font-style:normal; margin:0 6px; }
#evidence .validation-support>p { margin:0; color:var(--case-muted); font-size:12px; line-height:1.8; }
@media(min-width:901px) and (max-width:1100px) {
  #search-feedback .task-stages { gap:24px; }
  #search-feedback .task-stage+article { padding-left:24px; }
  #search-feedback .task-decisions>div { grid-template-columns:1fr; gap:4px; }
  #search-feedback .task-shot>button { height:220px; }
  #evidence .validation-support { grid-template-columns:160px minmax(0,1fr) auto; gap:20px; }
}
@media(max-width:900px) {
  #search-feedback .task-stages { grid-template-columns:1fr; gap:28px; }
  #search-feedback .task-stage+article { padding-left:0; border-left:0; }
  #search-feedback .task-shot>button { height:280px; }
  #evidence .validation-findings { gap:18px; }
  #evidence .validation-next { grid-template-columns:1fr; gap:6px; }
  #evidence .validation-support { grid-template-columns:160px minmax(0,1fr); gap:12px 20px; }
  #evidence .validation-support .n-link { grid-column:2; }
}
@media(max-width:620px) {
  #search-feedback .task-shot>button { height:auto; padding:12px; }
  #search-feedback .task-shot img { height:auto; }
  #search-feedback .task-decisions>div { grid-template-columns:1fr; gap:4px; }
  #search-feedback .task-decisions dd { font-size:14px; }
  #search-feedback .task-stages { gap:32px; }
  #evidence .validation-findings { grid-template-columns:1fr; }
  #evidence .validation-findings>article { padding:16px; }
  #evidence .validation-findings p,#evidence .validation-next p { font-size:14px; }
  #evidence .validation-support { grid-template-columns:1fr; gap:10px; }
  #evidence .validation-support .n-link { grid-column:auto; }
}

/* One desktop spread height through the complete recruiting-design chapter.
   Keep headings and takeaways visible; overflow belongs to the evidence area. */
#evidence .validation-body { display:grid; gap:22px; align-content:start; min-width:0; }
#evidence .n-content { grid-template-rows:auto 1fr auto; }
@media(min-width:901px) {
  #main .design-story { height:var(--opening-height); min-height:var(--opening-height); grid-template-rows:auto minmax(0,1fr); }
  .design-story .n-content { min-height:0; grid-template-rows:auto minmax(0,1fr) auto; }
  .design-story :is(.n-research-layout,.n-condition-layout,.task-stages,.validation-body) {
    min-height:0; overflow-y:auto; overscroll-behavior-y:contain;
    scrollbar-width:thin; scrollbar-color:var(--case-accent-rule) var(--case-background);
  }
  .design-story :is(.n-research-layout,.n-condition-layout,.task-stages) { align-content:start; }
  #research .n-content,#decisions .n-content,#search-feedback .n-content { gap:18px; }
  #research .n-tall img { max-height:300px; }
  #research .n-research-reasoning { gap:12px; }
  #research .research-record { padding:12px; }
  #research .research-placeholder { padding:12px 16px; }
  #decisions .n-condition-body img { max-height:clamp(190px,calc(var(--opening-height) - 480px),245px); }
  #search-feedback .task-stage { gap:12px; }
  #search-feedback .task-shot>button { height:clamp(175px,calc(var(--opening-height) - 490px),235px); }
  #search-feedback .task-stage>header { padding-bottom:8px; }
  #search-feedback .task-decisions { gap:8px; }
  #evidence .n-content { gap:18px; }
  #evidence .validation-body { gap:18px; }
}

@media(min-width:901px) {
  .design-story :is(.n-research-layout,.n-condition-layout,.task-stages,.validation-body)::-webkit-scrollbar { width:6px; }
  .design-story :is(.n-research-layout,.n-condition-layout,.task-stages,.validation-body)::-webkit-scrollbar-thumb { background:var(--case-accent-rule); border-radius:4px; }
  .design-story :is(.n-research-layout,.n-condition-layout,.task-stages,.validation-body):focus-visible { outline:2px solid var(--palette-periwinkle); outline-offset:4px; }
}

/* Opening copy connects the product goal, the designer's remit and the iteration. */
#problem .context-design-focus { display:flex; flex-wrap:wrap; gap:4px 12px; margin:0; padding-top:12px; border-top:1px solid var(--context-rule); font-size:12px; line-height:1.8; color:var(--case-copy); }
#problem .context-design-focus strong { color:var(--accent); font-weight:500; }
#redesign .redesign-heading { align-items:flex-start; }
#redesign .redesign-heading-copy { min-width:0; }
#redesign .redesign-overview-note { margin:8px 0 0; color:var(--case-muted); font-size:12px; line-height:1.7; }
#redesign .redesign-tab-phase { margin-left:6px; color:var(--palette-periwinkle); font:400 10px/14px var(--body); letter-spacing:0; }
@media(min-width:901px) {
  #problem .page-content { grid-template-rows:auto minmax(0,1fr) auto; gap:18px; }
}
@media(min-width:901px) and (max-height:700px) {
  #problem .context-design-focus { padding-top:8px; }
  #problem .page-content { gap:12px; }
  #redesign .redesign-navigation { gap:8px; }
  #redesign .redesign-navigation .redesign-drag-hint { padding-top:8px; }
}
@media(max-width:900px) {
  #redesign .redesign-tabs>button { height:auto; min-height:66px; }
  #redesign .redesign-tab-label { display:flex; flex-direction:column; gap:2px; }
  #redesign :is(#redesign-agent,#redesign-delivery) .redesign-tab-number { display:block; font-size:10px; line-height:14px; }
  #redesign .redesign-tab-phase { margin-left:4px; }
}
@media(max-width:620px) {
  #problem .context-design-focus { font-size:13px; }
}
