@charset "UTF-8";

:root {
  --ink: #192d38;
  --paper: #f8f5ed;
  --accent: #813846;
  --accent-dark: #642a36;
  --navy: #172f3d;
  --navy-deep: #102633;
  --text: #28343a;
  --muted: #737773;
  --line: #d8d7cb;
  --sage: #607567;
  --canvas: #ecece5;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #c69241; outline-offset: 4px; }
::selection { background: #ded4bf; color: var(--ink); }
img, svg, canvas, video { max-width: 100%; }
img, video { height: auto; }
audio { width: 100%; min-height: 48px; margin: 12px 0; accent-color: var(--accent); }
svg { vertical-align: middle; }
canvas { display: block; height: auto; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); }
h2, h3 { line-height: 1.2; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: .45em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; background: var(--paper); color: var(--ink); padding: 12px 20px; }
.skip-link:focus { top: 10px; }
.topbar { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 34px; border-bottom: 1px solid #d5d7d0; background: var(--paper); position: relative; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 32px; height: 37px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 1.4; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 13px; font-weight: 650; letter-spacing: .16em; line-height: 1.4; }
.brand-copy > span { font-size: 11px; color: var(--muted); letter-spacing: .045em; }
.topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar-actions .button { min-height: 44px; font-size: 12px; padding: 8px 17px; }
.host-button > span { margin-left: 13px; }
.app-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: calc(100dvh - 90px); align-items: stretch; }

.sidebar { background: var(--navy); color: #f3f1e6; padding: 40px 25px 28px; display: flex; flex-direction: column; gap: 28px; min-width: 0; position: relative; }
.sidebar::before { content: ""; position: absolute; right: 0; top: 0; width: 4px; height: 82px; background: var(--accent); }
.sidebar .eyebrow { color: #b8c0bd; font-size: 9px; letter-spacing: .2em; margin-bottom: 15px; }
.sidebar-title { font-family: var(--serif); font-size: 32px; line-height: 1.12; letter-spacing: -.02em; margin-bottom: 16px; }
.sidebar-description { font-size: 12px; line-height: 1.8; color: #aebdbf; margin-bottom: 0; }
.progress-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: 10px; letter-spacing: .05em; color: #c1cccb; margin-bottom: 10px; }
#progressText { font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-track { height: 3px; overflow: hidden; background: #405560; }
#progressBar { background: #d2bd91; height: 100%; width: 0; transition: width .35s ease; }
.stage-nav { display: grid; gap: 5px; }
.stage-nav ul, .stage-nav ol { padding: 0; margin: 0; list-style: none; display: grid; gap: 5px; }
.stage-nav li { margin: 0; min-width: 0; }
.stage-link { color: #b4c1c3; border: 1px solid transparent; border-radius: 3px; background: transparent; width: 100%; min-height: 48px; padding: 11px 12px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; font-size: 12px; line-height: 1.4; text-decoration: none; text-align: left; transition: background .15s, color .15s, border-color .15s; }
.stage-link:hover { background: #243e4b; color: #fffaf0; text-decoration: none; }
.stage-link.active, .stage-link[aria-current="step"], .stage-link[aria-current="page"] { background: #f1eee3; color: var(--ink); border-color: #f1eee3; box-shadow: inset 3px 0 var(--accent); }
.stage-link.complete { color: #d7e1d7; }
.stage-link.active.complete { color: var(--ink); }
.stage-link .stage-number, .stage-link .nav-number, .stage-link .num { flex: 0 0 24px; font-family: var(--serif); opacity: .65; font-variant-numeric: tabular-nums; }
.stage-link .stage-name, .stage-link .nav-title { flex: 1; }
.stage-link .stage-check, .stage-link .nav-status { margin-left: auto; color: #a9bca9; }
.stage-link > span:nth-child(2) { flex: 1; min-width: 0; }
.stage-link small { display: block; font-size: 9px; font-weight: 400; opacity: .6; margin-top: 3px; letter-spacing: .02em; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.journal-button { width: 100%; justify-content: space-between; border-color: #50636b !important; background: transparent; color: #f4f2e9; font-size: 12px; padding: 11px 12px; }
.journal-button:hover { background: #243e4b; border-color: #9dacae !important; }
.journal-button > span:first-child { font-size: 21px; font-weight: 300; }
.sidebar-note { font-size: 10px; line-height: 1.9; color: #9badb0; margin: 19px 0 0; }
.suspect-card:has(.person-photo) { grid-template-columns:72px minmax(0,1fr); }
.person-photo { display:block; width:72px; height:98px; background-repeat:no-repeat; background-size:941.76px 384.96px; border-radius:2px; }

.main-content { padding: 45px clamp(25px, 4.5vw, 76px) 64px; width: 100%; min-width: 0; max-width: 1640px; outline: none; }
.paper { background: var(--paper); border: 1px solid #d9d9cd; box-shadow: 0 3px 0 #dedfd5, 0 12px 32px #263a4206; padding: clamp(26px, 4vw, 58px); position: relative; min-width: 0; }
.paper::before { content: ""; display: block; position: absolute; width: 26px; height: 3px; top: -1px; left: 38px; background: var(--accent); }
.eyebrow { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .17em; color: var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: 9px; line-height: 1.6; margin-bottom: 22px; }
.accent-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.stage-title { font-family: var(--serif); font-size: clamp(36px, 4.3vw, 66px); font-weight: 400; line-height: 1.08; letter-spacing: -.045em; max-width: 900px; margin-bottom: 23px; text-wrap: balance; overflow-wrap: anywhere; }
.stage-title em { color: var(--accent); font-weight: 400; }
.stage-intro { color: #586168; font-size: 16px; line-height: 1.85; max-width: 730px; margin-bottom: 30px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(25px, 4vw, 65px); padding-top: 57px; padding-bottom: 53px; min-height: 545px; align-items: center; }
.hero-copy { min-width: 0; }
.hero .stage-title, .hero h1 { font-family: var(--serif); font-size: clamp(44px, 4.8vw, 80px); font-weight: 400; letter-spacing: -.055em; line-height: .99; margin-bottom: 28px; }
.hero .stage-intro { font-size: 15px; line-height: 1.9; max-width: 390px; }
.hero-lead { font-family: var(--serif); font-size: 23px; line-height: 1.5; color: #566267; margin: 0 0 21px; }
.hero-copy > p:not([class]), .hero > div:first-child > p:not([class]) { font-size: 13px; line-height: 1.85; }
.hero .controls { margin-top: 27px; }
.hero-graphic { position: relative; width: 100%; min-width: 0; align-self: center; color: #5e7176; background: #efefe5; border: 1px solid #d5d9cc; padding: 18px; transform: rotate(-1.3deg); box-shadow: 8px 10px 0 #deded15c; }
.hero-graphic::after { content: ""; position: absolute; top: -10px; right: 27px; width: 45px; height: 18px; background: #e0d4b488; transform: rotate(6deg); }
.hero-graphic svg { width: 100%; height: auto; display: block; }
.hero-graphic svg[viewBox="0 0 360 440"] { max-height: 360px; }
.graphic-caption { display: flex; justify-content: space-between; gap: 14px; font-size: 8px; letter-spacing: .12em; border-bottom: 1px solid #cbd0c4; padding-bottom: 10px; }
.archive-stamp { position: absolute; right: 15px; bottom: 20px; color: var(--accent); border: 1px solid currentColor; padding: 6px 12px; text-align: center; font-size: 17px; line-height: 1.15; letter-spacing: .15em; transform: rotate(-12deg); background: #f2f0e6c7; }
.archive-stamp small { font-size: 7px; letter-spacing: .05em; }

.evidence { border: 1px solid var(--line); background: #f0f0e7; padding: 25px 28px; margin: 25px 0; min-width: 0; position: relative; overflow-wrap: anywhere; }
.evidence-label { color: #7b7e71; font-size: 9px; letter-spacing: .15em; font-weight: 650; text-transform: uppercase; margin: 0 0 18px; display: block; }
.evidence > :last-child { margin-bottom: 0; }
.evidence img { width: 100%; display: block; }
.evidence pre, pre.evidence { white-space: pre-wrap; font-family: var(--serif); font-size: 18px; line-height: 1.9; overflow-x: auto; }
.quote, blockquote { font-family: var(--serif); font-size: clamp(20px, 2.3vw, 29px); line-height: 1.65; color: var(--ink); margin: 0; font-style: normal; }
blockquote { padding-left: 23px; border-left: 2px solid #b7bba9; margin: 25px 0; }
.quote p:last-child, blockquote p:last-child { margin-bottom: 0; }
.numbers { font-family: var(--serif); font-size: clamp(26px, 3.5vw, 47px); letter-spacing: .08em; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.8; }
.status { font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--sage); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 10px; background: #e7eadd; border: 1px solid #d5dacb; border-radius: 2px; color: #566253; font-size: 10px; line-height: 1.4; letter-spacing: .035em; vertical-align: middle; }

.answer-form { margin: 32px 0 0; padding-top: 26px; border-top: 1px solid var(--line); display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.answer-form label { display: block; color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .015em; margin-bottom: 8px; }
.answer-form > label, .answer-form .form-field, .answer-form .field-wrap { flex: 1 1 260px; }
.answer-form > label { margin-bottom: 0; }
.field, input[type="text"], input[type="number"], input[type="search"], textarea, select { color: var(--ink); background: #fcfaf4; border: 1px solid #bfc4b8; border-radius: 2px; padding: 12px 15px; min-height: 48px; width: 100%; line-height: 1.4; transition: border-color .15s, background .15s; }
.field:hover, input:hover, textarea:hover, select:hover { border-color: #929e92; }
.field:focus, input:focus, textarea:focus, select:focus { border-color: var(--ink); background: #fffdf8; }
input::placeholder, textarea::placeholder { color: #96988d; }
.answer-form > input, .answer-form > .field { flex: 1 1 260px; width: auto; }
.answer-form label.field { border: 0; border-radius: 0; padding: 0; background: none; display: flex; flex-direction: column; gap: 9px; }
.answer-form label.field > span { font-size: 12px; font-weight: 550; }
.number-inputs { flex: 1 1 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.number-inputs label.field > span { font-size: 10px; font-weight: 400; color: var(--muted); }
.number-inputs input { font-size: 26px; font-family: var(--serif); font-variant-numeric: tabular-nums; text-align: center; min-width: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 2px; background: #e7e8de; color: var(--ink); font-size: 12px; font-weight: 550; line-height: 1.5; text-decoration: none; text-align: center; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.button:hover { background: #dcded1; text-decoration: none; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-primary { background: var(--accent); border-color: var(--accent); color: #fffaf2; }
.button-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button-ghost { background: transparent; border-color: #c7cabc; color: var(--ink); }
.button-ghost:hover { background: #e9e9dd; border-color: #a4aea1; }
.controls, .hint-controls, .stage-bottom, .stage-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.controls { margin-top: 20px; }
.stage-bottom, .stage-footer { justify-content: space-between; padding-top: 26px; margin-top: 34px; border-top: 1px solid var(--line); }
.stage-footer > .muted { margin: 0; }
.hint-controls { gap: 8px; }
.hint-controls .button { font-size: 11px; padding: 9px 14px; min-height: 44px; }
.alert, .hint-panel, .success { padding: 18px 21px; border: 1px solid #d9ccaf; background: #f2ead7; color: #655335; margin: 22px 0; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.hint-panel { border-color: #cdd3c2; background: #ecefe3; color: #4c5c4c; border-left: 3px solid #98a78c; }
.success { border-color: #c4d0bf; border-left: 3px solid #71876a; background: #e9eee2; color: #3d563e; }
.success strong, .alert strong, .hint-panel strong { color: inherit; }
.success > :last-child, .alert > :last-child, .hint-panel > :last-child { margin-bottom: 0; }
.success .button { margin-top: 13px; }

.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.temp-tile { min-height: 102px; padding: 17px 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; background: #f8f6ed; border: 1px solid #c9cebf; border-bottom: 3px solid #c9cebf; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s, transform .15s; }
.temp-tile:hover { border-color: #8d9e8a; background: #efefe3; transform: translateY(-2px); }
.temp-tile.selected, .temp-tile[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.temp-tile strong, .temp-tile .letter { font-family: var(--serif); font-size: 30px; font-weight: 400; }
.temp-tile .temperature { color: var(--muted); font-size: 11px; }
.temp-tile.selected .temperature { color: #c2cec9; }
.suspect-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 25px 0; }
.suspect-card { border: 1px solid #cfd2c4; padding: 23px; background: #f1f0e7; min-width: 0; position: relative; }
.suspect-card h3 { font-family: var(--serif); font-size: 25px; font-weight: 400; margin: 8px 0 14px; }
.suspect-card p { font-size: 12px; line-height: 1.85; }
.suspect-card .button { width: 100%; }
.case-people { margin-top: 42px; }
.case-people .suspect-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-people .suspect-card { display: block; padding: 22px 18px; }
.person-initial { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 18px; border: 1px solid #b9c2b5; border-radius: 50%; color: var(--sage); font-family: var(--serif); font-size: 21px; }
.person-role { display: block; font-size: 10px; margin: 3px 0 14px; }
.case-people .suspect-card strong { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.case-people .suspect-card p { margin: 0; color: #626d69; font-size: 11px; }
.keeper-card { text-align: left; color: var(--ink); }
.keeper-card:hover { border-color: var(--accent); background: #f2ebe0; }
.keeper-card p { font-family: var(--serif); font-size: 20px; line-height: 1.6; }
.suspect-card.selected, .suspect-card[aria-pressed="true"] { border: 2px solid var(--accent); padding: 22px; background: #f6eee5; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.comparison > * { min-width: 0; }
.comparison .evidence { margin: 0; }
.transcript-line { font-size: 15px; line-height: 2.1; margin: 0 0 15px; padding-bottom: 15px; border-bottom: 1px solid #d9dacf; }
.transcript-line:last-child { padding-bottom: 0; border: 0; margin-bottom: 0; }
.word-choice { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 2px; padding: 4px 9px; border: 1px dashed #b4bba8; background: #faf8ef; color: var(--ink); border-radius: 2px; line-height: 1.5; }
.word-choice:hover { background: #e6e8da; border-color: var(--ink); }
.word-choice.selected, .word-choice[aria-pressed="true"] { background: var(--accent); color: #fffaf0; border: 1px solid var(--accent); }
.atlas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 25px 0; }
.atlas-card { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 17px; border: 1px solid #c5ccbf; background: #f0f1e7; color: var(--ink); min-width: 0; text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.atlas-card:hover { border-color: #8b9c8c; background: #e7ecdf; transform: translateY(-2px); }
.atlas-card.selected, .atlas-card[aria-pressed="true"] { border: 2px solid var(--accent); padding: 19px 16px; background: #f3e8df; }
.atlas-card svg { display: block; width: 100%; min-height: 120px; max-height: 190px; }
.atlas-card h3 { font-family: var(--serif); font-size: 19px; font-weight: 400; margin: 0; }
.atlas-card small, .atlas-card .eyebrow { font-size: 9px; color: var(--muted); margin: 0; justify-content: center; }
.atlas-card .button { margin-top: auto; }
.atlas-card img { width: 100%; height: 200px; object-fit: contain; mix-blend-mode: multiply; }
.atlas-card > span { font-family: var(--serif); font-size: 19px; }
.poem { font-family: var(--serif); font-size: 22px; line-height: 1.85; color: var(--ink); }
.handwritten { font-family: var(--serif); font-size: 18px; font-style: italic; color: var(--accent); margin-top: 20px; }
.metro-symbol { display: flex; width: 45px; height: 45px; border-radius: 50%; align-items: center; justify-content: center; background: #cf7738; color: #fff9e9; font-size: 26px; line-height: 1; font-weight: 650; margin-bottom: 20px; }
.operation-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.operation-strip span { min-width: 85px; padding: 13px 17px; text-align: center; border: 1px solid #cbd0c1; background: #f8f6ec; color: var(--ink); font-family: var(--serif); font-size: 27px; }
.stage-footer #hintBody { flex-basis: 100%; }
.stage-footer #hintBody:empty, #answerFeedback:empty, #stageResult:empty { display: none; }
.success h2 { font-family: var(--serif); font-size: 32px; font-weight: 400; color: inherit; margin: 0 0 15px; }
.success .quote { font-size: 22px; color: inherit; margin: 24px 0; }
.twist { padding-top: 15px; border-top: 1px solid #ccd5c3; }
details { margin: 12px 0; border-top: 1px solid var(--line); padding-top: 4px; }
summary { min-height: 44px; padding: 10px 0; font-size: 12px; color: var(--accent); cursor: pointer; }
details > p { font-size: 13px; line-height: 1.8; }

.overlay { color: var(--text); background: var(--paper); border: 1px solid #b7bdae; width: min(880px, calc(100vw - 40px)); max-width: none; max-height: min(88dvh, 980px); padding: 0; border-radius: 3px; box-shadow: 0 30px 100px #09192355; overflow: auto; }
.overlay::backdrop { background: #102734b8; backdrop-filter: blur(4px); }
.modal-topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 28px; background: var(--paper); border-bottom: 1px solid var(--line); }
.modal-topbar .eyebrow { font-size: 9px; margin: 0; }
.modal-topbar .button { min-height: 44px; padding: 8px 14px; font-size: 11px; }
.modal-content { padding: 32px clamp(22px, 4vw, 45px) 40px; }
.modal-content h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); font-weight: 400; letter-spacing: -.035em; margin: 0 0 24px; }
.modal-content h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin-top: 30px; }
.modal-content .evidence { padding: 20px; }
.modal-content .paper { padding: 25px; margin-bottom: 20px; }
.modal-content table { width: 100%; border-collapse: collapse; font-size: 12px; }
.modal-content th, .modal-content td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.modal-content th { color: var(--ink); font-weight: 600; }
.plan-list { margin: 26px 0; }
.plan-list > div { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.plan-list > div > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.plan-list small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.journal-entry { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.journal-entry > .pill { align-self: start; }
.journal-entry strong { font-size: 13px; }
.journal-entry p { margin: 6px 0 0; font-family: var(--serif); font-size: 20px; }
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 100; max-width: min(430px, calc(100vw - 40px)); background: var(--ink); color: var(--paper); border-left: 4px solid #d3bf94; padding: 17px 22px; box-shadow: 0 8px 35px #10273429; font-size: 13px; line-height: 1.7; pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.toast.visible { opacity: 1; visibility: visible; transform: none; }
.toast:empty { display: none; }

@media (min-width: 1500px) {
  .app-shell { grid-template-columns: 295px minmax(0, 1fr); }
  .sidebar { padding: 46px 32px 30px; }
  .main-content { padding-top: 57px; }
  .hero { min-height: 630px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { padding: 30px 18px 24px; gap: 23px; }
  .sidebar-title { font-size: 29px; }
  .main-content { padding: 32px 27px 45px; }
  .paper { padding: 31px; }
  .hero { gap: 25px; padding-top: 43px; padding-bottom: 43px; min-height: 490px; }
  .hero .stage-title, .hero h1 { font-size: 52px; }
  .hero-graphic { padding: 12px; }
  .archive-stamp { font-size: 13px; right: 10px; bottom: 12px; padding: 5px 8px; }
  .suspect-grid { grid-template-columns: 1fr; }
  .suspect-card { display: grid; grid-template-columns: 1fr auto; gap: 0 20px; align-items: center; }
  .suspect-card .button { grid-column: 2; grid-row: 1 / 5; width: auto; }
  .atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-people .suspect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keeper-card { display: block; }
}
@media (max-width: 780px) {
  .topbar { min-height: 79px; padding: 15px 20px; gap: 15px; }
  .brand { gap: 10px; }
  .brand-copy strong { font-size: 10px; letter-spacing: .12em; }
  .brand-copy > span { font-size: 9px; }
  .brand-mark { width: 25px; height: 31px; }
  .topbar-actions { gap: 7px; }
  .topbar-actions .button { padding: 8px 12px; min-height: 44px; font-size: 10px; }
  .host-button > span { margin-left: 3px; }
  .app-shell { display: block; min-height: calc(100dvh - 79px); }
  .sidebar { padding: 16px 20px; gap: 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .sidebar::before, .sidebar-intro, .sidebar-note { display: none; }
  .progress { grid-column: 1; min-width: 0; }
  .progress-heading { margin-bottom: 7px; font-size: 10px; flex-wrap: wrap; gap: 3px 7px; }
  #progressText { white-space: normal; font-size: 9px; }
  .sidebar-bottom { margin: 0; padding: 0; grid-column: 2; grid-row: 1; }
  .journal-button { min-height: 44px; width: auto; font-size: 10px; gap: 9px; padding: 8px 12px; }
  .stage-nav { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(145px, 1fr); gap: 6px; overflow-x: auto; padding: 2px 0 8px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #647781 transparent; }
  .stage-nav ul, .stage-nav ol { display: contents; }
  .stage-link { scroll-snap-align: start; min-height: 44px; font-size: 10px; padding: 9px 11px; border-color: #39515e; }
  .stage-link .stage-number, .stage-link .nav-number, .stage-link .num { flex-basis: 17px; }
  .main-content { padding: 26px 20px 40px; }
  .paper { padding: 29px; }
  .hero { min-height: 0; padding-top: 39px; padding-bottom: 39px; grid-template-columns: 1fr 1fr; gap: 25px; }
  .hero .stage-title, .hero h1 { font-size: 49px; }
  .hero .stage-intro { font-size: 13px; }
  .stage-title { font-size: 42px; }
  .stage-intro { font-size: 14px; margin-bottom: 24px; }
  .eyebrow { font-size: 9px; margin-bottom: 18px; }
  .comparison { gap: 15px; }
  .evidence { padding: 22px; }
}
@media (max-width: 540px) {
  .topbar { padding: 13px 16px; flex-wrap: wrap; gap: 12px; }
  .brand { flex: 1 1 240px; }
  .brand-copy strong { font-size: 11px; }
  .brand-copy > span { font-size: 9px; }
  .topbar-actions { width: 100%; justify-content: flex-end; border-top: 1px solid #ddded4; padding-top: 11px; }
  .topbar-actions .button { min-height: 44px; padding: 8px 15px; }
  .sidebar { padding: 15px 16px 12px; }
  .journal-button { padding: 8px 10px; }
  .journal-button > span:first-child { display: none; }
  .main-content { padding: 20px 13px 35px; }
  .paper { padding: 25px 21px; }
  .paper::before { left: 22px; }
  .stage-title { font-size: 37px; margin-bottom: 20px; }
  .hero { display: flex; flex-direction: column; gap: 30px; align-items: stretch; padding-top: 32px; padding-bottom: 31px; }
  .hero .stage-title, .hero h1 { font-size: clamp(48px, 12vw, 66px); }
  .hero .stage-intro { max-width: none; font-size: 14px; }
  .hero-lead { font-size: 22px; }
  .hero-graphic { max-width: 360px; width: calc(100% - 10px); align-self: center; margin-top: 2px; }
  .graphic-caption { font-size: 7px; }
  .archive-stamp { font-size: 17px; right: 15px; bottom: 22px; }
  .evidence { padding: 20px 17px; margin: 22px 0; }
  .evidence-label { font-size: 8px; margin-bottom: 15px; }
  .quote, blockquote { font-size: 21px; line-height: 1.65; }
  blockquote { padding-left: 16px; }
  .evidence pre, pre.evidence { font-size: 16px; }
  .answer-form { margin-top: 25px; padding-top: 23px; gap: 11px; }
  .answer-form > .button { width: 100%; }
  .field, input[type="text"], input[type="number"], input[type="search"], textarea, select { font-size: 16px; }
  .number-inputs { gap: 7px; }
  .number-inputs input { padding: 10px 3px; font-size: 23px; }
  .number-inputs label.field > span { font-size: 8px; text-align: center; }
  .button { min-height: 48px; }
  .controls { align-items: stretch; }
  .controls > .button { flex: 1 1 145px; }
  .stage-bottom, .stage-footer { gap: 16px; padding-top: 23px; margin-top: 28px; }
  .stage-bottom > .button, .stage-footer > .button { width: 100%; }
  .hint-controls { width: 100%; }
  .hint-controls .button { flex: 1 1 120px; }
  .tile-grid { gap: 8px; }
  .temp-tile { min-height: 88px; padding: 12px 6px; font-size: 12px; }
  .temp-tile strong, .temp-tile .letter { font-size: 26px; }
  .suspect-card, .suspect-card.selected { display: block; padding: 20px; }
  .suspect-card .button { width: 100%; margin-top: 10px; }
  .comparison { grid-template-columns: 1fr; gap: 13px; }
  .transcript-line { font-size: 14px; }
  .atlas-grid { gap: 9px; }
  .atlas-card { padding: 14px 9px; gap: 10px; }
  .atlas-card.selected { padding: 13px 8px; }
  .atlas-card svg { min-height: 100px; max-height: 140px; }
  .atlas-card h3 { font-size: 17px; }
  .atlas-card .button { width: 100%; padding: 8px; font-size: 10px; }
  .atlas-card img { height: 140px; }
  .atlas-card > span { font-size: 17px; }
  .poem { font-size: 18px; line-height: 1.95; }
  .case-people { margin-top: 30px; }
  .case-people .suspect-grid { gap: 10px; }
  .case-people .suspect-card { padding: 17px 14px; }
  .case-people .suspect-card strong { font-size: 22px; }
  .person-initial { margin-bottom: 13px; }
  .operation-strip { gap: 7px; }
  .operation-strip span { min-width: 0; flex: 1 1 40px; font-size: 20px; padding: 11px 7px; }
  .overlay { width: calc(100vw - 20px); max-height: 93dvh; }
  .modal-topbar { padding: 12px 17px; gap: 10px; }
  .modal-topbar .eyebrow { font-size: 8px; }
  .modal-content { padding: 25px 20px 30px; }
  .modal-content h2 { font-size: 32px; }
  .modal-content th, .modal-content td { padding: 10px 7px; }
  .plan-list > div { gap: 10px; grid-template-columns: 28px minmax(0, 1fr) auto; font-size: 11px; }
  .plan-list .button { padding: 8px 10px; font-size: 10px; }
  .toast { bottom: 13px; right: 13px; max-width: calc(100vw - 26px); padding: 15px 18px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .topbar, .sidebar, .controls, .hint-controls, .answer-form, .toast { display: none !important; }
  .app-shell { display: block; }
  .main-content { max-width: none; padding: 0; }
  .paper { border: 0; box-shadow: none; padding: 20px; }
  body { background: #fff; }
}
