/* Technical-editorial shell. Do not override phone UI tokens or screen contents. */
:root {
  --shell-paper: #e8e5dc;
  --shell-surface: #f4f4f0;
  --shell-ink: #111315;
  --shell-muted: #5c605d;
  --shell-line: #c5c5bd;
  --shell-red: #a63b36;
  --shell-type: "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  --shell-mono: Consolas, "SFMono-Regular", monospace;
}
.masthead { min-height: 86px; height: auto; gap: 24px; padding: 18px max(32px, calc((100vw - 1372px) / 2)); background: var(--shell-surface); color: var(--shell-ink); border-bottom: 1px solid var(--shell-line); }
.masthead .brand { color: var(--shell-ink); font: 800 23px/1.1 var(--shell-type); letter-spacing: -.7px; }
.masthead .brand-icon { background: var(--shell-red); color: #fff; border: 0; width: 40px; height: 40px; font-size: 28px; }
.masthead .brand small { color: var(--shell-muted); font: 11px/1.5 var(--shell-mono); letter-spacing: 1.2px; margin-top: 6px; }
.header-right { gap: 24px; flex-wrap: wrap; }
.archive-return, .masthead .text-button { padding: 8px 0; color: var(--shell-ink); font: 500 14px/1.5 var(--shell-type); text-decoration: none; }
.archive-return:hover, .masthead .text-button:hover { color: var(--shell-red); text-decoration: underline; text-underline-offset: 5px; }
.masthead .prototype { padding: 6px 10px; background: none; color: var(--shell-muted); border: 1px solid var(--shell-line); font: 12px/1.5 var(--shell-mono); }
main { max-width: 1440px; padding: 34px 34px 0; grid-template-columns: 244px minmax(0,1fr); column-gap: 32px; }
.intro { align-items: flex-end; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid #81857f; }
.intro > div:first-child { min-width: 0; }
.intro .eyebrow, .demo-title .eyebrow { color: var(--shell-muted); font: 600 11px/1.5 var(--shell-mono); letter-spacing: 1.5px; }
.intro .eyebrow { border-left: 28px solid var(--shell-red); padding-left: 12px; margin-bottom: 14px; }
.intro h1 { color: var(--shell-ink); font: 850 clamp(32px, 3vw, 46px)/1.08 var(--shell-type); letter-spacing: -1.8px; }
.intro h1 br { display: block; }
.intro h1 span { color: var(--shell-ink); font-weight: 600; }
.mode-badge { flex-shrink: 0; display: block; padding-left: 20px; border-left: 1px solid var(--shell-line); width: 245px; max-width: 260px; color: var(--shell-ink); }
.mode-badge .edition-number { display: block; margin-bottom: 10px; color: var(--shell-red); font: 600 12px/1.4 var(--shell-mono); letter-spacing: 1px; }
.mode-badge strong { font: 600 14px/1.5 var(--shell-type); }
.mode-badge small { display: block; color: var(--shell-muted); font: 12px/1.6 var(--shell-type); margin-top: 8px; }
.demo-panel { margin-top: 24px; padding-right: 22px; border: 0; border-right: 1px solid var(--shell-line); }
.demo-title { padding-top: 0; }
.demo-title h2 { color: var(--shell-ink); font: 750 23px/1.2 var(--shell-type); letter-spacing: -.6px; margin: 7px 0 14px; }
.demo-title > span { min-height: 64px; margin: 0 0 14px; color: var(--shell-muted); font: 14px/1.55 var(--shell-type); }
.scenario-grid { gap: 0; }
.scenario-grid button { min-height: 108px; padding: 18px 10px; border-top: 1px solid var(--shell-line); color: var(--shell-ink); transition: background 160ms; }
.scenario-grid button::before, .scenario-grid button:nth-child(2)::before, .scenario-grid button:nth-child(3)::before { color: #727671; font: 500 28px/1.1 var(--shell-mono); min-width: 34px; letter-spacing: -1.5px; }
.scenario-grid strong { font: 700 16px/1.4 var(--shell-type); }
.scenario-grid small { margin-top: 4px; color: var(--shell-muted); font: 12px/1.6 var(--shell-type); }
.scenario-grid button b { color: #727671; font-size: 18px; }
.scenario-grid button:hover { background: #deded5; border-color: var(--shell-line); }
.scenario-grid button[aria-pressed="true"] { background: #f4f1e9; box-shadow: inset 3px 0 var(--shell-red); }
.scenario-grid button[aria-pressed="true"]::before, .scenario-grid button[aria-pressed="true"] b { color: var(--shell-red); }
.demo-footer { margin-top: 0; padding-top: 20px; border-top: 1px solid var(--shell-line); color: var(--shell-muted); }
.demo-footer > span { font: 12px/1.6 var(--shell-type); }
.demo-footer strong { color: var(--shell-ink); font: 600 26px/1.3 var(--shell-mono); }
.demo-footer small { font: 12px/1.6 var(--shell-type); }
.demo-footer > div { gap: 8px; }
.demo-footer button { min-height: 38px; font: 12px/1.4 var(--shell-type); color: var(--shell-ink); border-color: #aaafa7; padding: 8px 10px; }
.demo-footer button.reset { width: 100%; margin-top: 3px; color: var(--shell-ink); border-color: #888e87; background: transparent; }
.demo-footer button:hover { background: #dadbd3; }
.view-tabs { margin: 24px 0 16px; border-bottom: 1px solid var(--shell-line); }
.view-tabs button { min-height: 44px; padding: 10px 20px; color: var(--shell-muted); font: 500 14px/1.5 var(--shell-type); }
.view-tabs button.active { background: var(--shell-ink); color: var(--shell-surface); box-shadow: inset 0 -3px var(--shell-red); }
.view-tabs button:last-child { margin-left: auto; }
.director { margin-bottom: 20px; background: var(--shell-surface); border: 1px solid var(--shell-line); border-left: 3px solid var(--shell-red); padding: 16px 18px; }
.director-caption { gap: 12px; }
.director-caption > div { min-width: 0; }
.director-caption strong { color: var(--shell-ink); font: 700 16px/1.5 var(--shell-type); }
.director-caption p { color: var(--shell-muted); font: 14px/1.6 var(--shell-type); }
#step-number { background: var(--shell-ink); color: #fff; font: 500 12px/1.5 var(--shell-mono); padding: 7px 9px; }
#step-actor { color: var(--shell-muted); background: none; border: 0; padding: 3px 0 3px 12px; border-left: 1px solid var(--shell-line); font: 12px/1.5 var(--shell-type); max-width: 150px; }
.director-bottom { gap: 14px; margin-top: 14px; padding-top: 12px; border-color: var(--shell-line); }
#step-track { gap: 8px 12px; }
#step-track li { color: var(--shell-muted); font: 12px/1.5 var(--shell-type); }
#step-track .current { color: var(--shell-ink); }
#step-track .current span { color: #fff; background: var(--shell-red); border-color: var(--shell-red); }
#step-track .done span { color: #fff; background: #555f57; border-color: #555f57; }
.playback { gap: 6px; margin-left: auto; font: 12px/1.5 var(--shell-type); }
.playback button, .playback select { min-height: 36px; border: 1px solid #b7bab2; background: transparent; color: var(--shell-ink); padding: 7px 10px; }
.playback button:not(:disabled):hover { background: #e2e3db; }
.playback button:disabled { opacity: 1; color: #777c76; background: #e9eae3; border-color: #d1d3cb; }
.workspace { background: #eeece4; border: 1px solid #d7d7ce; border-radius: 3px; padding: 24px 12px 28px; }
.workspace .role-heading { border-bottom-color: var(--shell-line); }
.workspace .role-heading .role-number { font: 500 28px/1.2 var(--shell-mono); color: #5c605d; letter-spacing: -1px; }
.workspace .role-heading h2 { font: 700 17px/1.4 var(--shell-type); color: var(--shell-ink); }
.workspace .role-heading p { font: 12px/1.5 var(--shell-type); color: var(--shell-muted); }
.workspace .role-heading .role-chip { display: none; }
main > footer { margin-top: 24px; padding: 18px 0 24px; border-top: 1px solid #81857f; gap: 24px; color: var(--shell-muted); font: 12px/1.7 var(--shell-type); align-items: flex-start; }
main > footer > span:last-child { max-width: 660px; text-align: right; }
.masthead :focus-visible, .demo-panel button:focus-visible, .view-tabs button:focus-visible, .playback :focus-visible { outline: 2px solid var(--shell-red); outline-offset: 4px; }
@media (min-width:1001px) and (max-width:1199px) {
  main { grid-template-columns: 210px minmax(0,1fr); gap: 0 18px; padding: 28px 24px 0; }
  .demo-panel { padding-right: 14px; }
  .workspace { gap: 8px; padding: 20px 8px; }
  .intro h1 { font-size: 36px; }
  .director-caption { flex-wrap: wrap; }
  #step-actor { max-width: none; }
}
@media (max-width:1000px) {
  .masthead { padding: 18px 24px; }
  .header-right { gap: 16px; }
  .masthead .prototype { display: none; }
  main { grid-template-columns: minmax(0,1fr); padding: 26px 24px 0; }
  .intro { gap: 20px; }
  .intro h1 { font-size: 36px; }
  .demo-panel { border: 0; margin: 4px 0 18px; padding: 0; }
  .demo-title { display: block; }
  .demo-title h2 { font-size: 20px; }
  .demo-title > span { min-height: 0; margin-bottom: 14px; }
  .scenario-grid { gap: 10px; }
  .scenario-grid button { border: 1px solid var(--shell-line); padding: 14px 10px; }
  .demo-footer { display: flex; flex-wrap: wrap; gap: 12px; border: 0; padding-top: 14px; }
  .demo-footer > div { display: flex; flex-wrap: wrap; }
  .demo-footer button.reset { width: auto; margin: 0; }
  .workspace { gap: 14px; padding: 24px 10px; }
}
@media (max-width:780px) {
  .masthead { padding: 16px 18px; flex-wrap: wrap; gap: 14px; }
  .masthead .brand { font-size: 21px; }
  .header-right { width: 100%; justify-content: space-between; gap: 12px; }
  main { padding: 24px 16px 0; }
  .intro { display: block; padding-bottom: 22px; }
  .intro h1 { font-size: clamp(30px,7.6vw,42px); letter-spacing: -1.2px; }
  .mode-badge { width: auto; max-width: none; margin-top: 20px; padding-left: 12px; }
  .mode-badge .edition-number { margin-bottom: 4px; }
  .mode-badge small { margin-top: 4px; }
  .view-tabs { margin-top: 20px; flex-wrap: wrap; }
  .view-tabs button { padding: 9px 8px; font-size: 13px; flex: 1 1 auto; }
  .view-tabs button:last-child { margin-left: 0; }
  .scenario-grid { grid-template-columns: 1fr; gap: 8px; }
  .scenario-grid button { display: flex; min-height: 78px; padding: 14px; text-align: left; }
  .scenario-grid button::before { font-size: 26px; }
  .scenario-grid button small { display: block; }
  .scenario-grid button strong { margin: 0; }
  .scenario-grid button b { display: block; margin-left: auto; }
  .director { padding: 14px 12px; }
  .director-caption { flex-wrap: wrap; }
  .director-caption > div { flex-basis: calc(100% - 70px); min-width: 0; }
  #step-actor { margin: 0; max-width: none; border-left: 0; padding: 0; }
  .director-bottom { align-items: flex-start; }
  .playback { margin-left: 0; flex-wrap: wrap; }
  .workspace { padding: 22px 8px; gap: 20px; }
  main > footer { flex-direction: column; gap: 12px; }
  main > footer > span:last-child { text-align: left; }
}
@media (prefers-reduced-motion:reduce) {
  .scenario-grid button, .view-tabs button, .playback button { transition: none; }
}

/* Shared archive identity stays at the page edges, separate from demo status colors. */
.masthead .archive-return {
  display: grid; gap: 5px; padding: 3px 20px 3px 0;
  border-right: 1px solid var(--shell-line); text-decoration: none;
}
.archive-return__name {
  color: var(--shell-ink);
  font: 900 14px/1.2 "Archivo", "Arial Black", var(--shell-type);
  letter-spacing: -.3px;
}
.archive-return__path {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font: 11px/1.6 "JetBrains Mono", var(--shell-mono);
  color: var(--shell-muted);
}
.archive-return__path [lang] { font-family: "Noto Sans SC", var(--shell-type); }
.masthead .archive-return:hover .archive-return__name {
  text-decoration: underline; text-decoration-color: #e8ff00;
  text-decoration-thickness: 3px; text-underline-offset: 4px;
}
.masthead .archive-return:focus-visible { outline-color: var(--shell-ink); }
.intro .archive-project {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  border-left: 0; padding-left: 0; margin-bottom: 14px; letter-spacing: 0;
}
.archive-project__title {
  display: inline-block; padding: 0 4px 2px;
  color: #111315; background: linear-gradient(transparent 52%, #e8ff00 52%);
  font: 900 16px/1.15 "Archivo", "Arial Black", var(--shell-type);
  letter-spacing: -.5px;
}
.archive-project__meta {
  border-left: 1px solid #b6b8b1; padding-left: 16px; color: var(--shell-muted);
  font: 11px/1.5 "JetBrains Mono", var(--shell-mono); letter-spacing: .6px;
}
.archive-signature { display: grid; gap: 5px; }
.archive-signature__heading { display: flex; align-items: center; gap: 10px; }
.archive-signature__heading > span:last-child {
  font: 800 12px/1.5 "Archivo", var(--shell-type); color: var(--shell-ink);
}
.archive-signature__record { font: 11px/1.6 "JetBrains Mono", var(--shell-mono); letter-spacing: .5px; }
.archive-swatch { display: inline-flex; flex-shrink: 0; gap: 2px; }
.archive-swatch i { display: block; width: 7px; height: 7px; background: #c8c8c8; }
.archive-swatch i:nth-child(1) { background: #e6007a; }
.archive-swatch i:nth-child(2) { background: #5fe3a1; }
.archive-swatch i:nth-child(3) { background: #e8ff00; }
@media (max-width:780px) {
  .masthead .archive-return { padding-right: 16px; }
  .archive-return__name { font-size: 13px; }
  .archive-return__path { gap: 12px; }
  .intro .archive-project { gap: 10px 12px; }
  .archive-project__meta { padding-left: 12px; font-size: 10px; }
}
@media (max-width:420px) {
  .archive-project__meta { flex-basis: 100%; border-left: 0; padding-left: 4px; }
  .masthead .archive-return { border-right: 0; padding-right: 0; }
}
