:root{
  --bg:#08181b; --bg-1:#0a1f24; --bg-2:#0d262c;
  --surface:#0e272d; --surface-2:#103239;
  --ink:#f2e9d8; --ink-soft:#d8e0db; --muted:#9db2ae; --dim:#6f8a86;
  --amber:#efb066; --amber-deep:#c9893f; --amber-soft:#f7e9c6;
  --mint:#7fd4c8; --green:#9ed9b6; --coral:#ef8a70;
  --line:rgba(242,233,216,.14); --line-2:rgba(242,233,216,.08);
  --shadow:0 18px 48px -22px rgba(0,0,0,.7);
  --r:18px; --r-sm:12px; --r-lg:26px;
}
*,*::before,*::after{box-sizing:border-box}
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--bg); color:var(--ink-soft);
  font:400 17px/1.65 "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.wrap{ width:min(100% - 40px,1240px); margin-inline:auto; }
a{ color:inherit; }
h1,h2,h3{ margin:0; font-weight:700; letter-spacing:-.02em; color:var(--ink); }
p{ margin:0; }
img,svg{ display:block; max-width:100%; }
.site-head{ display:flex; justify-content:space-between; align-items:center; gap:18px; padding:22px 0 18px; }
.brand{ display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink); }
.brand-mark{ flex:none; }
.brand-text{ font:800 1.12rem/1 system-ui,sans-serif; letter-spacing:.04em; color:var(--ink); display:flex; align-items:baseline; gap:8px; }
.brand-text span{ font:600 .8rem/1 system-ui,sans-serif; letter-spacing:.06em; color:var(--muted); }
.site-nav{ display:flex; gap:4px; }
.site-nav a{ text-decoration:none; color:var(--muted); font-size:.95rem; padding:9px 13px; border-radius:9px; transition:color .18s,background .18s; }
.site-nav a:hover{ color:var(--ink); background:rgba(242,233,216,.06); }
/* HERO */
.hero{ position:relative; background:var(--bg); overflow:hidden; }
.hero::before{
  content:''; position:absolute; inset:0;
  background:radial-gradient(ellipse 80% 60% at 50% 30%,rgba(239,176,102,.07) 0%,transparent 70%);
  pointer-events:none;
}
.hero .wrap{ position:relative; padding-bottom:32px; }
.hero-copy{ max-width:680px; padding:40px 0 32px; }
.eyebrow{ display:flex; align-items:center; gap:10px; font-size:.78rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--amber); margin-bottom:14px; }
.eyebrow span{ display:block; width:24px; height:1.5px; background:var(--amber); border-radius:2px; }
.hero-copy h1{
  font-size:clamp(2.2rem,5.5vw,4.6rem); line-height:1.08; letter-spacing:-.045em;
  color:var(--ink); font-weight:800; margin-bottom:22px;
}
.hero-copy h1 em{ color:var(--amber); font-style:normal; }
.lead{ font-size:clamp(1.02rem,1.9vw,1.18rem); line-height:1.75; color:var(--ink-soft); max-width:52em; }
.hero-meta{ font-size:.83rem; color:var(--muted); margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }

/* STAGE PANEL */
.stage-panel{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; margin-top:10px; }
.stage-top{ display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 22px; border-bottom:1px solid var(--line); }
.stage-label{ font-size:.83rem; font-weight:600; color:var(--muted); display:flex; align-items:center; gap:8px; }
.pulse{
  display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--green); flex:none;
  animation:pulseRing 2.2s ease-in-out infinite;
}
@keyframes pulseRing{
  0%,100%{ box-shadow:0 0 0 0 rgba(158,217,182,.6); }
  60%{ box-shadow:0 0 0 7px rgba(158,217,182,0); }
}
.stage-phase{ font-size:.9rem; font-weight:700; color:var(--amber); letter-spacing:.04em; }

/* SVG STAGE */
.stage-art{ position:relative; line-height:0; }
.stage-art svg{ width:100%; height:auto; display:block; }
/* STAGE BOTTOM CONTROLS */
.stage-bottom{ padding:16px 22px 18px; display:flex; flex-direction:column; gap:10px; }
.scrub{ position:relative; padding:4px 0 0; }
.track{
  position:absolute; top:12px; left:0; right:0; height:4px;
  background:rgba(242,233,216,.1); border-radius:2px; pointer-events:none;
}
#trackFill{
  display:block; height:100%; border-radius:2px;
  background:linear-gradient(90deg, rgba(239,176,102,.2) 0%, var(--amber) 100%);
  width:0; transition:width .06s linear;
}
.ticks{ position:absolute; top:20px; left:0; right:0; height:12px; pointer-events:none; }
.ticks span{ position:absolute; top:0; width:2px; height:7px; background:rgba(242,233,216,.22); transform:translateX(-50%); border-radius:1px; }
#scrub{
  -webkit-appearance:none; appearance:none;
  position:relative; display:block; width:100%; height:20px;
  background:transparent; cursor:pointer; z-index:2; margin:0;
}
#scrub::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:18px; height:18px; border-radius:50%;
  background:var(--amber); border:2.5px solid var(--bg);
  box-shadow:0 0 0 3px rgba(239,176,102,.3);
  margin-top:-7px; cursor:pointer; transition:transform .15s;
}
#scrub:hover::-webkit-slider-thumb{ transform:scale(1.18); }
#scrub::-moz-range-thumb{
  width:18px; height:18px; border-radius:50%;
  background:var(--amber); border:2.5px solid var(--bg);
  box-shadow:0 0 0 3px rgba(239,176,102,.3); cursor:pointer;
}
#scrub::-webkit-slider-runnable-track{ height:4px; background:rgba(242,233,216,.1); border-radius:2px; }
#scrub::-moz-range-track{ height:4px; background:rgba(242,233,216,.1); border-radius:2px; }
#scrub:focus-visible::-webkit-slider-thumb{ box-shadow:0 0 0 4px rgba(127,212,200,.5); }
.controls{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.ctrl-main{ display:flex; gap:8px; }
.btn{
  font:inherit; font-size:.9rem; font-weight:650;
  padding:9px 20px; border-radius:10px; cursor:pointer;
  border:1.5px solid rgba(242,233,216,.18); background:transparent;
  color:var(--muted); transition:background .18s,color .18s,border-color .18s;
  min-height:40px;
}
.btn:hover{ color:var(--ink); border-color:rgba(242,233,216,.32); background:rgba(242,233,216,.06); }
.btn-solid{
  background:var(--amber); color:#18100a; border-color:var(--amber);
}
.btn-solid:hover{ background:#f2b96e; border-color:#f2b96e; color:#18100a; }
.phases{ display:flex; gap:6px; flex-wrap:wrap; }
.phase-btn{
  font:inherit; font-size:.8rem; font-weight:650;
  padding:7px 14px; border-radius:8px; cursor:pointer;
  border:1.5px solid rgba(242,233,216,.14); background:rgba(242,233,216,.04);
  color:var(--muted); transition:background .18s,color .18s,border-color .18s;
  display:flex; align-items:center; gap:5px; min-height:36px;
}
.phase-btn b{ font-size:.72rem; color:var(--amber); font-weight:700; }
.phase-btn:hover{ color:var(--ink); background:rgba(239,176,102,.1); border-color:rgba(239,176,102,.35); }
.phase-btn[aria-current="true"],.phase-btn.is-active{
  color:var(--amber); background:rgba(239,176,102,.12); border-color:rgba(239,176,102,.4);
}
.live{ font-size:.82rem; color:var(--muted); min-height:1.4em; letter-spacing:.01em; }
.stage-note{ font-size:.8rem; color:var(--dim); padding:12px 0 20px; text-align:center; }
/* SECTIONS */
.section{ padding:64px 0; }
.section + .section{ border-top:1px solid var(--line-2); }
.section-head{ display:grid; grid-template-columns:minmax(0,1fr); gap:18px; margin-bottom:34px; }
@media(min-width:760px){ .section-head{ grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); align-items:end; gap:32px; } }
.section-head .eyebrow{ margin-bottom:8px; }
.section-title{ font-size:clamp(1.7rem,3.6vw,2.7rem); line-height:1.16; }
.section-intro{ color:var(--muted); font-size:1.02rem; line-height:1.75; max-width:44em; }

/* STAGE LIST — five process rows */
.stage-list{ display:grid; gap:14px; }
.stage-row{
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:20px;
  padding:22px 24px; border:1px solid var(--line); border-radius:var(--r);
  background:var(--surface); text-decoration:none; color:inherit;
  transition:transform .2s ease,border-color .2s,background .2s,box-shadow .2s;
}
.stage-row:hover{
  transform:translateY(-2px); border-color:rgba(239,176,102,.38);
  background:var(--surface-2); box-shadow:var(--shadow);
}
.stage-num{
  font:700 1.5rem/1 ui-monospace,"SF Mono",monospace; color:var(--amber);
  letter-spacing:.02em; min-width:42px;
}
.stage-body{ min-width:0; }
.stage-body h3{ font-size:1.18rem; margin-bottom:5px; color:var(--ink); }
.stage-body p{ color:var(--muted); font-size:.96rem; line-height:1.65; }
.stage-seen{ font-size:.83rem; color:var(--dim); margin-top:6px; padding-top:6px; border-top:1px dashed var(--line-2); }
.stage-link{ font-size:.88rem; font-weight:650; color:var(--amber); white-space:nowrap; }
.stage-row:hover .stage-link{ color:#f2b96e; }
@media(max-width:680px){
  .stage-row{ grid-template-columns:auto 1fr; padding:18px 16px; gap:14px; }
  .stage-link{ grid-column:1/-1; padding-top:6px; }
}

/* CASE GRID — three case cards */
.case-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }
.case-card{
  display:flex; flex-direction:column; gap:8px; padding:24px 22px 20px;
  border:1px solid var(--line); border-radius:var(--r); background:var(--surface);
  text-decoration:none; color:inherit;
  transition:transform .2s,border-color .2s,background .2s,box-shadow .2s;
}
.case-card:hover{ transform:translateY(-3px); border-color:rgba(239,176,102,.38); background:var(--surface-2); box-shadow:var(--shadow); }
.case-glyph{ height:40px; width:auto; color:var(--muted); margin-bottom:6px; }
.case-kicker{ font-size:.72rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--amber); }
.case-card h3{ font-size:1.12rem; line-height:1.35; color:var(--ink); }
.case-card p{ color:var(--muted); font-size:.92rem; line-height:1.6; flex:1; }
.case-more{ font-size:.85rem; font-weight:650; color:var(--amber); margin-top:6px; }
.case-card:hover .case-more{ color:#f2b96e; }

/* TOPIC GRID — six topic links */
.topic-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.topic{
  display:flex; flex-direction:column; gap:10px; padding:24px 22px;
  border:1px solid var(--line); border-radius:var(--r); background:var(--surface);
  text-decoration:none; color:inherit;
  transition:transform .2s,border-color .2s,background .2s,box-shadow .2s;
}
.topic:hover{ transform:translateY(-3px); border-color:rgba(239,176,102,.38); background:var(--surface-2); box-shadow:var(--shadow); }
.topic-top{ display:flex; justify-content:space-between; align-items:center; font:700 1.1rem/1 ui-monospace,"SF Mono",monospace; color:var(--amber); }
.topic-top span:last-child{ font-size:1.3rem; color:var(--muted); transition:transform .2s,color .2s; }
.topic:hover .topic-top span:last-child{ transform:translateX(4px); color:var(--amber); }
.topic h3{ font-size:1.12rem; line-height:1.35; color:var(--ink); }
.topic p{ color:var(--muted); font-size:.92rem; line-height:1.6; }

/* MORE SECTION — lab/search/reference + aside */
.more-grid{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,.9fr); gap:20px; align-items:start; }
@media(max-width:820px){ .more-grid{ grid-template-columns:1fr; } }
.more-main{ display:flex; flex-direction:column; gap:12px; }
.big-link{
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding:22px 24px; border:1px solid var(--line); border-radius:var(--r);
  background:var(--surface); text-decoration:none; color:inherit;
  transition:transform .2s,border-color .2s,background .2s,box-shadow .2s;
}
.big-link:hover{ transform:translateY(-2px); border-color:rgba(239,176,102,.38); background:var(--surface-2); box-shadow:var(--shadow); }
.big-link span:first-child{ display:flex; flex-direction:column; gap:4px; }
.big-link h3{ font-size:1.12rem; line-height:1.35; color:var(--ink); }
.big-link p{ color:var(--muted); font-size:.9rem; line-height:1.55; }
.big-link .arrow{ font-size:1.5rem; color:var(--amber); flex:none; transition:transform .2s; }
.big-link:hover .arrow{ transform:translateX(5px); }
.aside-note{ font-size:.82rem; color:var(--dim); line-height:1.6; padding:14px 18px; border-top:1px dashed var(--line-2); }
.more-aside{
  padding:26px 24px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface);
}
.more-aside h3{ font-size:1.1rem; margin-bottom:12px; color:var(--ink); }
.more-aside p{ color:var(--muted); font-size:.94rem; line-height:1.7; margin-bottom:14px; }
.aside-foot{ font-size:.8rem; color:var(--dim); padding-top:14px; border-top:1px dashed var(--line-2); margin-bottom:0; }

/* FOOTER */
.site-foot{ border-top:1px solid var(--line-2); margin-top:64px; }
.foot-inner{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:18px; padding:30px 0 36px; }
.site-foot p{ font-size:.84rem; color:var(--muted); letter-spacing:.04em; }
.site-foot nav{ display:flex; flex-wrap:wrap; gap:4px 14px; }
.site-foot nav a{ font-size:.83rem; color:var(--dim); text-decoration:none; transition:color .18s; }
.site-foot nav a:hover{ color:var(--amber); }

/* NOSCRIPT — useful initial no-JS view */
noscript .stage-note{ display:block; }

/* REDUCED MOTION */
@media(prefers-reduced-motion:reduce){
  .pulse{ animation:none; }
  .stage-row,.case-card,.topic,.big-link{ transition:none; }
}
/* RESPONSIVE */
@media(max-width:780px){
  .wrap{ width:calc(100% - 28px); }
  .hero-copy{ padding:28px 0 22px; }
  .hero-copy h1{ font-size:clamp(1.9rem,7vw,2.6rem); }
  .site-head{ padding:16px 0 14px; flex-wrap:wrap; }
  .site-nav{ order:3; width:100%; justify-content:flex-start; flex-wrap:wrap; }
  .site-nav a{ padding:7px 10px; font-size:.88rem; }
  .stage-top{ padding:12px 16px; flex-wrap:wrap; gap:8px; }
  .stage-label{ font-size:.78rem; }
  .stage-bottom{ padding:14px 16px 16px; }
  .controls{ gap:8px; }
  .phases{ order:3; width:100%; justify-content:flex-start; }
  .phase-btn{ padding:6px 10px; font-size:.76rem; }
  .section{ padding:44px 0; }
  .section-head{ margin-bottom:24px; }
}
@media(max-width:480px){
  .stage-row{ grid-template-columns:1fr; gap:10px; padding:16px; }
  .stage-num{ font-size:1.2rem; }
  .stage-body h3{ font-size:1.05rem; }
  .big-link{ padding:18px 18px; }
  .big-link .arrow{ font-size:1.3rem; }
  .more-aside{ padding:20px 18px; }
  .foot-inner{ flex-direction:column; align-items:flex-start; padding:24px 0 28px; }
}

/* SVG text stays legible — ensure no dark text on dark SVG bg by inheritance */
.t-serif{ font-family:"Songti SC","Noto Serif SC","Source Han Serif SC",Georgia,serif; }

/* When JS disabled, keep a useful static scene: phase 1 already visible in markup */
noscript{ display:block; }





/* Keep the working scene prominent above the learning sections. */
.hero-copy { margin-top: 28px; }
.hero h1 { font-size: clamp(32px, 4vw, 46px); margin-top: 14px; }
.lead { margin-top: 18px; line-height: 1.85; }
.hero-meta { margin-top: 12px; }
.stage-panel { margin-top: 26px; }
@media (min-width: 900px) {
  .hero-copy {
    max-width: none;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 12px 50px;
    text-align: left;
    align-items: center;
  }
  .hero-copy .eyebrow { grid-column: 1 / -1; justify-content: flex-start; }
  .hero h1 { grid-column: 1; grid-row: 2 / 4; margin: 0; }
  .lead { grid-column: 2; margin: 0; font-size: 16px; }
  .hero-meta { grid-column: 2; margin: 0; }
}
@media (max-width: 760px) {
  .hero-copy { margin-top: 24px; }
  .hero h1 { font-size: 31px; }
  .lead { margin-top: 16px; font-size: 14px; line-height: 1.8; }
  .stage-panel { margin-top: 22px; }
}

/* Fit the story and its playback controls into the opening view. */
@media (min-width: 900px) {
  .hero-copy { padding: 12px 0 8px; margin-top: 8px; gap: 8px 50px; }
  .hero-copy .eyebrow { margin-bottom: 8px; }
  .hero h1 { font-size: clamp(32px, 3.3vw, 42px); }
  .stage-panel { margin-top: 16px; }
  .stage-art svg { width: 100%; height: clamp(350px, 52vh, 500px); }
}
@media (max-width: 899px) {
  .hero-copy { padding: 14px 0 4px; margin-top: 8px; }
  .stage-panel { margin-top: 16px; }
}
@media (max-width: 760px) {
  .stage-art svg { position: static; width: 100%; height: auto; transform: none; }
  .stage-top { flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
  .stage-label { font-size: 12px; }
  .stage-phase { font-size: 12px; }
  .stage-bottom { padding: 12px 14px; }
  .phases { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .phase-btn { justify-content: center; min-height: 42px; padding-inline: 6px; }
}
html:not(.is-ready) .stage-bottom { display: none; }
html:not(.is-ready) #note, html:not(.is-ready) #noteCaption { opacity: 0; }
html:not(.is-ready) #ticket, html:not(.is-ready) #stamp { opacity: 1; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Wide screens pair a short introduction with the complete animated stage. */
@media (min-width: 1100px) {
  .hero .wrap { display: grid; grid-template-columns: minmax(260px,.65fr) minmax(0,1.5fr); column-gap: 38px; }
  .site-head { grid-column: 1 / -1; margin-bottom: 20px; }
  .hero-copy { display: block; grid-column: 1; grid-row: 2; align-self: center; margin: 0; padding: 0 0 30px; }
  .hero h1 { font-size: clamp(32px,3vw,42px); line-height: 1.3; margin: 18px 0 24px; }
  .lead { font-size: 15px; line-height: 1.9; }
  .hero-meta { margin-top: 24px; font-size: 12px; line-height: 1.9; }
  .stage-panel { grid-column: 2; grid-row: 2; margin: 0; }
  .stage-art svg { width: 100%; height: auto; }
  .stage-note { grid-column: 2; font-size: 11px; }
  .controls { gap: 10px; }
  .phases { gap: 4px; }
  .phase-btn { font-size: 11px; padding: 7px 8px; }
  .stage-bottom { padding: 12px 18px; gap: 8px; }
  .btn { padding: 8px 14px; }
}
@media (min-width: 761px) and (max-width: 1099px) {
  .stage-art svg { height: auto; }
}

.live { font-size: 13px; line-height: 1.8; min-height: 2em; }
