/* Readable investigation flow. All state is rendered by app.js. */
.workspace { min-width: 0; padding: 26px clamp(20px, 2.5vw, 40px) 70px; }
.workspace-tabs { position: relative; top: auto; margin: 0 0 18px; box-shadow: none; }
.workspace-tabs-scroll { width: 100%; }
.workspace-tab-open strong { font-size: .75rem; }
.workspace-tab-close { width: 34px; color: #a7aa9a; }
.view { animation: none; }
.view-overview { min-height: 0; }
.nav-item.is-next:not(.is-active) { color: #d6c4a0; }
.nav-item.is-next:not(.is-active) .nav-code { color: #d0a66c; }
.journey-guide { max-width: 1160px; margin: 0 auto 30px; padding: 20px 22px; border: 1px solid #70603f; background: linear-gradient(120deg,#302b1e,#1b2018); }
.case-step-guide { max-width: 1160px; margin: 0 auto 22px; border: 1px solid #70603f; border-left: 4px solid #d2a465; border-radius: 8px; background: linear-gradient(120deg,#24271f,#171b18); color: #eee9dc; }
.case-step-guide-main { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 17px 19px; }
.case-step-phase { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: 270px; padding: 7px 11px; border: 1px solid #70603f; border-radius: 20px; background: #b589441c; font-size: .72rem; }
.case-step-phase strong { color: #ebbc78; font-family: var(--mono); white-space: nowrap; }
.case-step-phase span { color: #d7d3c5; }
.case-step-current { flex: 1 1 280px; min-width: 0; }
.case-step-current small { color: #e0b66d; font: 700 .65rem var(--mono); letter-spacing: .06em; }
.case-step-current h2 { margin: 5px 0 0; color: #f0ebdf; font-size: 1rem; line-height: 1.4; }
.case-step-current p { margin: 5px 0 0; color: #bfc4b8; font-size: .74rem; line-height: 1.5; }
.case-step-action { min-height: 44px; }
.case-step-list { border-top: 1px solid #70603f66; }
.case-step-list summary { cursor: pointer; padding: 11px 19px; color: #d9c9a7; font-size: .75rem; }
.case-step-list summary span { color: #afb5a7; margin-left: 8px; }
.case-step-list ol { margin: 0; padding: 0 12px 14px; list-style: none; display: grid; gap: 3px; }
.case-step-list li button { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-left: 2px solid transparent; background: #10150f99; color: #d5d8ca; text-align: left; cursor: pointer; }
.case-step-list li.is-current button { border-left-color: #e2b36f; background: #a2793d29; }
.case-step-list li.is-done button { color: #a7c5a6; }
.case-step-list li button:hover { background: #a2793d35; }
.case-step-list li button:focus-visible, .case-step-list summary:focus-visible { outline: 2px solid #79c0ff; outline-offset: 2px; }
.case-step-list li button > span:first-child, .case-step-list li button b { font: .65rem var(--mono); }
@media (max-width: 680px) { .case-step-guide-main { align-items: stretch; } .case-step-action { width: 100%; } }
.journey-top { display: flex; justify-content: space-between; gap: 12px; color: #d3b987; font: .64rem var(--mono); letter-spacing: .05em; }
.journey-phase { color: #f0c481; font-weight: 700; }
.journey-main { display: flex; gap: 24px; justify-content: space-between; align-items: center; margin-top: 12px; }
.journey-main h2 { margin: 0 0 8px; font: 500 1.22rem var(--sans); color: #ece9dd; }
.journey-main p { margin: 0; max-width: 660px; font-size: .86rem; color: #c0c3b1; line-height: 1.7; }
.journey-main > button { flex-shrink: 0; min-height: 44px; }
.journey-tools { display: flex; justify-content: space-between; gap: 20px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #6a664230; align-items: start; }
.journey-tools details { flex: 1; }
.journey-tools summary { cursor: pointer; min-height: 35px; padding: 7px 0; font-size: .78rem; color: #d1c6af; }
.journey-tools summary span { color: #a9ae98; font: .65rem var(--mono); margin-left: 8px; }
.hint-button { flex-shrink: 0; min-height: 35px; padding: 6px 10px; border: 1px solid #696e51; background: transparent; color: #d3d6bd; font-size: .75rem; }
.hint-button:disabled { opacity: .45; }
.case-reset-button { flex-shrink: 0; min-height: 35px; padding: 6px 10px; border: 1px solid #88624b; background: transparent; color: #dfb69b; font-size: .75rem; }
.case-reset-button:hover { background: #73463340; border-color: #c4906c; color: #f4dac0; }
.landing-copy > .case-reset-button { display: block; margin-top: 18px; background: #161812a8; }
.journey-tools { flex-wrap: wrap; }
.journey-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.journey-list button { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; width: 100%; min-height: 39px; text-align: left; padding: 8px; background: #12170e65; color: #c6cbb8; font-size: .75rem; }
.journey-list button > span, .journey-list button > b { font: .6rem var(--mono); color: #a8ae96; }
.journey-list .done button { color: #8dac8b; }
.journey-list .current button { border-left: 2px solid #d3a970; background: #9c74412b; color: #eee0c7; }
.journey-hint { border-left: 2px solid #b58f58; margin: 16px 0 0; padding: 10px 14px; background: #11170d70; }
.journey-hint strong { font: .58rem var(--mono); color: #dab478; }
.journey-hint p { margin: 8px 0 0; color: #d3d4c4; font-size: .85rem; line-height: 1.7; }
.action-feedback { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(72px, env(safe-area-inset-bottom)); z-index: 3000; width: min(420px, calc(100vw - 36px)); max-height: min(45vh, 300px); overflow: auto; display: flex; justify-content: space-between; gap: 18px; margin: 0; padding: 14px 17px; border: 1px solid #65835b; border-radius: 10px; background: #283522; box-shadow: 0 16px 48px #0009; animation: feedback-enter .2s ease-out; }
@keyframes feedback-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.action-feedback p { margin: 0; font-size: .85rem; line-height: 1.7; color: #e0e6d4; }
.action-feedback.is-error { border-color: #b66a52; background: #39261f; }
.action-feedback button { align-self: start; min-width: 30px; min-height: 30px; background: transparent; color: #e0ddcc; font-size: 1.2rem; cursor: pointer; border: none; }
@media (max-width: 720px) { .action-feedback { left: 16px; right: 16px; bottom: max(72px, env(safe-area-inset-bottom)); width: auto; } }
@media (prefers-reduced-motion: reduce) { .action-feedback { animation: none; } }
.save-warning { padding: 15px; background: #533b26; color: #ffe7c6; font-size: .82rem; }
.helper-copy, .migration-note { display: block; color: #aeb5a0; font-size: .78rem; line-height: 1.7; }
.migration-note { border-top: 1px solid #4c573e; padding-top: 15px; }
.completion-note { color: #bdcf9e !important; line-height: 1.75; font-size: .85rem; }
.btn { font-family: var(--sans); font-size: .78rem; letter-spacing: 0; min-height: 42px; text-transform: none; line-height: 1.5; }
.btn-quiet { color: #c8cdb9; border-color: #515940; }
.case-hero h1 { font-size: clamp(4rem,6.5vw,6.5rem); }
.brief-panel { padding: 28px; }
.brief-panel h2 { color: #e3e4d4; font: 1.5rem var(--editorial); }
.brief-panel > p, .brief-questions { font-size: .91rem; line-height: 1.85; }
.brief-questions { padding-left: 20px; color: #d4d7c3; }
.brief-questions li { padding-bottom: 4px; }
.case-metadata { margin-bottom: 0; }
.page-head { min-height: 0; margin-bottom: 24px; }
.scene-context { padding: 17px 20px; background: #20261b; border: 1px solid #414c34; margin-bottom: 20px; }
.scene-context > span, .evidence-document > span, .record-detail > span { font: .62rem var(--mono); letter-spacing: .06em; color: #c2a16d; }
.scene-context p { color: #c1c9b1; font-size: .83rem; line-height: 1.7; margin: 9px 0 0; }
.scene-layout { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
.inspection-card.is-selected { border-color: #b99761; }
.detail-drawer { position: static; min-width: 0; min-height: 0; scroll-margin-top: calc(var(--topbar) + 15px); }
.drawer-meta { margin-bottom: 25px; }
.evidence-document { background: #d6ceba; color: #292e24; padding: 19px; margin: 22px 0; }
.evidence-document > span { color: #746044; }
.evidence-document p { margin: 10px 0 0; font-size: .88rem; line-height: 1.9; }
.drawer-actions + .helper-copy { margin-top: 16px; }
.evidence-workbench { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
.evidence-grid { grid-template-columns: 1fr; }
.evidence-card { min-height: 175px; }
.evidence-card > p { margin-top: 15px; }
.record-detail { margin-top: 18px; padding: 22px; border-left: 2px solid #bd9f67; background: #20271a; scroll-margin-top: calc(var(--topbar) + 15px); }
.record-detail h2 { margin: 10px 0; font-size: 1rem; }
.record-detail p { color: #c9cfb8; font-size: .88rem; line-height: 1.8; }
.record-row[aria-pressed="true"] { background: #2c3523; box-shadow: inset 3px 0 #c1a572; }
.case-exercise { padding: 24px; margin-top: 22px; background: #1d2418; border: 1px solid #4b583b; scroll-margin-top: calc(var(--topbar) + 15px); }
.case-exercise h2 { margin: 10px 0 18px; font: 1.3rem/1.4 var(--editorial); color: #e7e5d4; }
.case-exercise > p { color: #bdc6ad; font-size: .86rem; line-height: 1.75; }
.case-exercise form { display: grid; gap: 17px; }
.case-exercise form > button { justify-self: start; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.case-exercise label { display: grid; gap: 10px; color: #d1d7c1; font-size: .82rem; min-width: 0; }
select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; background: #10180c; color: #e3e6d4; border: 1px solid #697452; border-radius: 0; font-size: .82rem; }
select:focus-visible, summary:focus-visible { outline: 2px solid #e6b370; outline-offset: 3px; }
.interview-person-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 22px; }
.interview-person-tabs button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 15px 12px; background: #192014; border: 1px solid #4a5637; color: #c2cbb1; }
.interview-person-tabs button > span { font: .7rem var(--mono); border: 1px solid #5d684b; padding: 8px; }
.interview-person-tabs button div { display: grid; gap: 5px; }
.interview-person-tabs strong { font-size: .82rem; font-weight: 500; }
.interview-person-tabs small { font-size: .65rem; color: #a9b295; }
.interview-person-tabs .is-active { border-color: #bf9a61; background: #373623; color: #eee4c9; }
.interview-room { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
.question-stack .case-exercise { margin-top: 0; padding: 20px; }
.speech { grid-template-columns: 48px minmax(0,1fr); gap: 12px; }
.speech.subject { padding-left: 12px; }
.speech small { display: block; margin-bottom: 7px; font: .56rem var(--mono); color: #9eab8e; }
.speech time { color: #a4b091; font-size: .62rem; }
.speech p { font-size: .88rem; line-height: 1.85; }
.game-followup { margin-top: 20px; padding-top: 20px; border-top: 1px solid #62684b; scroll-margin-top: calc(var(--topbar) + 15px); }
.question-prerequisite { border-left: 2px solid #8e8258; padding-left: 14px; }
.question-prerequisite p, .prerequisite-list { color: #b9c1a8; font-size: .83rem; line-height: 1.8; }
.prerequisite-list { list-style: none; padding: 0; }
.prerequisite-list li { margin: 10px 0; }
.prerequisite-list button { display: block; margin-top: 7px; }
.request-flow-head { display: flex; gap: 20px; justify-content: space-between; }
.request-flow-head .status-chip { white-space: nowrap; }
.request-result { padding: 24px; border: 1px solid #72865c; background: #26351c; margin-top: 20px; scroll-margin-top: calc(var(--topbar) + 15px); }
.request-result p { font-size: .9rem; line-height: 1.8; color: #d5dfc6; }
.request-history { margin-top: 22px; padding: 20px; border: 1px solid #465036; }
.request-history > span { font: .62rem var(--mono); color: #b3bf9e; }
.request-history p { font-size: .85rem; color: #c7cfb8; }
.completion-banner { display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-top: 24px; padding: 20px; border: 1px solid #90a06c; background: #2a381f; }
.completion-banner p { margin-bottom: 0; font-size: .85rem; color: #cbd9b7; }
.report-checklist button { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; text-align: left; min-height: 48px; padding: 12px; background: #242c1c; color: #d1dac0; font-size: .84rem; }
.report-checklist button b { font-size: .7rem; color: #c5aa70; }
.final-report-sheet { margin-top: 0; color-scheme: light; }
.final-report-sheet label { font-size: .9rem; line-height: 1.7; padding: 7px 0; cursor: pointer; }
.final-report-sheet input { flex-shrink: 0; width: 17px; height: 17px; margin-top: 4px; }
.final-report-sheet legend { font-size: .75rem; line-height: 1.7; }
.final-report-sheet fieldset { min-width: 0; }
.final-report-sheet .has-error { border-color: #a34d34; }
.final-report-sheet .has-error legend { color: #883b26; }
.final-report-sheet .btn-primary { background: #344127; color: #f1efd9; }
.report-errors { padding: 20px; margin-top: 22px; background: #ebd4bc; border: 1px solid #ac6546; color: #593724; scroll-margin-top: calc(var(--topbar) + 15px); }
.report-errors h2 { font-size: 1.15rem; }
.report-errors ul { margin: 0; padding-left: 20px; }
.report-errors p { font-size: .88rem; line-height: 1.7; }
.report-errors .btn-quiet { color: #4d4529; border-color: #97835e; }
.report-complete-card { margin-top: 0; background: #1b2316; border-color: #819063; }
.report-complete-card h2 { margin-top: 30px; font: 1.5rem var(--editorial); color: #e3e7cf; }
.report-complete-card p { color: #c5d0b4; font-size: .92rem; }
.report-complete-grid { grid-template-columns: 1fr 1fr; }
.ending-timeline { list-style: none; padding: 0; }
.ending-timeline li { display: grid; grid-template-columns: 58px 1fr; gap: 15px; padding: 16px 0; border-bottom: 1px solid #4b5839; color: #c7d1b8; font-size: .86rem; line-height: 1.8; }
.ending-timeline time { font: .74rem var(--mono); color: #c5b080; padding-top: 4px; }
.case-journal p { padding-left: 12px; border-left: 2px solid #778858; color: #b7c4a4; font-size: .76rem; line-height: 1.8; margin: 0 0 20px; }
.restart-dialog { max-width: min(540px,calc(100vw - 32px)); padding: 30px; background: #202819; color: #e4e8d4; border: 1px solid #a1a979; }
.restart-dialog::backdrop { background: #080d06c9; backdrop-filter: blur(5px); }
.restart-dialog h2 { font: 1.7rem var(--editorial); }
.restart-dialog > p { font-size: .9rem; line-height: 1.8; color: #c6d1b4; }
.helper-copy, .journey-main p, .action-feedback p, .case-journal p { overflow-wrap: anywhere; }
@media (max-width: 1350px) {
  .scene-layout, .evidence-workbench, .interview-room { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .journey-main { align-items: start; flex-direction: column; gap: 15px; }
  .interview-person-tabs { grid-template-columns: 1fr; }
  .interview-person-tabs button { min-height: 62px; }
}
@media (max-width: 720px) {
  .workspace { padding: 22px 16px 40px; }
  .journey-guide { padding: 17px; margin-bottom: 24px; }
  .journey-top { font-size: .53rem; letter-spacing: 0; }
  .journey-main h2 { font-size: 1.08rem; line-height: 1.5; }
  .journey-main p { font-size: .8rem; }
  .journey-tools { gap: 10px; flex-wrap: wrap; }
  .journey-tools details[open] { flex-basis: 100%; }
  .journey-list button { font-size: .72rem; }
  .form-pair, .evidence-check-grid { grid-template-columns: 1fr; }
  .brief-panel, .case-exercise { padding: 19px; }
  .request-flow-head, .completion-banner { flex-direction: column; align-items: start; }
  .evidence-grid { grid-template-columns: 1fr; }
  .request-result { padding: 17px; }
  .transcript { padding: 17px; }
  .speech { grid-template-columns: 42px minmax(0,1fr); gap: 8px; }
  .speech.subject { padding-left: 0; }
  .scene-layout { gap: 20px; }
  .report-checklist button { grid-template-columns: 16px 1fr; }
  .report-checklist button b { grid-column: 2; }
  .workspace-tab-close { min-width: 40px; }
  .helper-copy, .case-exercise p { font-size: .82rem; }
}
