:root {
  color-scheme: light;
  --navy: #202040;
  --navy-deep: #181831;
  --lavender: #d9d4ff;
  --ink: #24243b;
  --muted: #52546b;
  --accent: #534397;
  --paper: #f7f7fa;
  --white: #fff;
  --rule: #dcdce7;
  --tint: #eeebfa;
  --sans: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.8 var(--sans); }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid #7f63dc; outline-offset: 4px; border-radius: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.shell { width: min(100% - 72px, 1184px); margin-inline: auto; }
.skip { position: fixed; z-index: 3; inset: 8px auto auto 8px; transform: translateY(-150%); padding: 8px 16px; background: var(--white); }
.skip:focus { transform: none; }
.cover { color: var(--white); background: var(--navy); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; border-bottom: 1px solid #454565; }
.topbar a { color: #f1effc; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 24px; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 650; white-space: nowrap; }
.brand-mark { width: 24px; height: 24px; display: grid; place-content: center; gap: 3px; transform: rotate(-12deg); }
.brand-mark i { width: 17px; height: 3px; background: var(--lavender); display: block; }
.brand-mark i:nth-child(2) { width: 12px; }
.brand-mark i:last-child { width: 7px; }
.hero { min-height: 490px; padding: 78px 0 84px; display: grid; grid-template-columns: 1.13fr .87fr; gap: clamp(36px, 8vw, 112px); align-items: center; }
.edition { color: #d1cdeb; font-size: .88rem; font-variant-numeric: tabular-nums; }
.hero h1 { margin-top: 16px; font-weight: 700; font-size: clamp(2.8rem, 6.1vw, 5.5rem); letter-spacing: -.062em; line-height: 1.12; }
.hero h1 span { white-space: nowrap; }
.intro-text { margin-top: 23px; color: #dedaf6; font-size: clamp(1rem, 1.4vw, 1.2rem); }
.primary { display: inline-flex; min-height: 48px; align-items: center; margin-top: 26px; padding: 8px 18px; border-radius: 5px; background: var(--lavender); color: var(--navy-deep); font-weight: 670; text-decoration: none; }
.primary:hover { background: #ece9ff; }
.signals { background: var(--navy-deep); border: 1px solid #4b4a6a; border-radius: 10px; overflow: clip; }
.signals a { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 17px; padding: 20px 24px; text-decoration: none; color: var(--white); }
.signals a + a { border-top: 1px solid #454565; }
.signals a:hover, .signals a:focus-visible { background: #30304e; }
.signals a:focus-visible { outline-offset: -4px; }
.signals strong, .signals small { display: block; }
.signals strong { font-size: 1.16rem; }
.signals small { font-size: .875rem; color: #cbc8e3; }
.signal-icon { position: relative; display: grid; align-content: center; justify-items: center; gap: 4px; height: 48px; border: 1px solid #575578; border-radius: 8px; color: var(--lavender); }
.signal-icon i { display: block; }
.context-icon i { width: 20px; height: 4px; border: 1px solid currentColor; }
.context-icon i:nth-child(2) { width: 15px; }
.context-icon i:nth-child(3) { width: 10px; }
.skill-icon { grid-template-columns: repeat(2, 7px); justify-content: center; align-content: center; }
.skill-icon i { width: 7px; height: 7px; border: 1px solid currentColor; }
.skill-icon i:first-child { background: currentColor; }
.program-icon { grid-template-columns: repeat(3, 4px); justify-content: center; }
.program-icon i { width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.program-icon i:nth-child(2) { transform: translateY(-5px); }
.evolution { padding: 56px 0; }
.section-lead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; }
.section-lead h2, .chapter h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 720; line-height: 1.3; letter-spacing: -.035em; }
.section-lead p { color: var(--muted); }
.timeline-list { margin: 25px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: .9fr 1.05fr 1.05fr; }
.timeline-list li { position: relative; border-top: 2px solid #b1a7d8; padding: 22px 24px 4px 0; color: var(--muted); line-height: 1.7; }
.timeline-list li::before { content: ""; position: absolute; top: -5px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline-list strong { color: var(--accent); }
.timeline-list a, article p a { font-size: .9em; }
.reader { display: grid; grid-template-columns: 181px minmax(0, 1fr); align-items: start; gap: clamp(24px, 5vw, 72px); padding: 54px 0 72px; border-top: 1px solid var(--rule); }
.reader aside { position: sticky; top: 24px; }
.contents { display: grid; border-left: 1px solid var(--rule); }
.contents > span { color: var(--muted); font-size: .88rem; padding: 0 0 10px 13px; }
.contents a { padding: 8px 10px 8px 13px; min-height: 44px; display: flex; align-items: center; text-decoration: none; color: var(--muted); font-size: .94rem; border-left: 2px solid transparent; margin-left: -1px; }
.contents a:hover, .contents a[aria-current] { color: var(--accent); border-color: var(--accent); background: var(--tint); }
.chapter { scroll-margin-top: 24px; padding-bottom: 46px; }
.chapter + .chapter { border-top: 1px solid var(--rule); padding-top: 42px; }
.chapter-heading { margin: 0 0 18px; }
.chapter-heading p { margin-bottom: 6px; color: var(--accent); font-size: .9rem; font-weight: 680; }
.chapter > p { max-width: 75ch; color: var(--ink); }
.chapter > p + p { margin-top: 16px; }
.table-scroll { overflow: auto; margin: 24px 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--white); }
table { border-collapse: collapse; width: 100%; min-width: 570px; }
#ecosystem table { min-width: 810px; }
th, td { text-align: left; vertical-align: top; padding: 13px 15px; line-height: 1.65; }
th { background: var(--tint); color: #393267; font-size: .91rem; }
td { border-top: 1px solid var(--rule); }
td:first-child { min-width: 124px; font-weight: 640; }
td a { font-size: .86rem; font-weight: 500; }
tr:nth-child(even) td { background: #fafafe; }
code { color: #47397d; background: var(--tint); padding: .12em .3em; border-radius: 3px; font-size: .92em; }
.figure { margin: 24px 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--white); overflow: clip; }
.diagram-scroll { overflow: auto; padding: 16px; }
.diagram-scroll img { width: 100%; min-width: 640px; height: auto; }
figcaption { padding: 10px 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }
.demo { margin: 24px 0; padding: 20px; border: 1px solid #c2b8e4; border-radius: 8px; background: var(--tint); }
.demo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; justify-content: space-between; }
.demo-head h3 { font-size: 1.14rem; }
.demo-switch { display: inline-flex; gap: 3px; border: 1px solid #c2b8e4; border-radius: 6px; padding: 3px; margin: 0; }
.demo-switch label { position: relative; cursor: pointer; border-radius: 4px; display: flex; align-items: center; min-height: 44px; padding: 4px 12px; color: #483a7e; font-size: .9rem; }
.demo-switch label:has(:checked) { background: #4e4087; color: white; }
.demo-switch label:has(:focus-visible) { outline: 3px solid #7f63dc; outline-offset: 2px; }
.visually-hidden, .demo-switch input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo-path ol { margin: 15px 0 10px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: steps; }
.demo-path li { counter-increment: steps; display: flex; align-items: center; gap: 8px; border-top: 1px solid #a99dce; padding: 7px 3px; line-height: 1.45; }
.demo-path li::before { content: counter(steps); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.demo-path p { color: var(--muted); }
footer { background: var(--navy); color: #f0eff9; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; }
.footer a { color: var(--lavender); display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 800px) {
  .shell { width: calc(100% - 40px); }
  .hero { gap: 30px; min-height: 0; padding: 44px 0 52px; }
  .signals a { grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; }
  .signal-icon { height: 40px; }
  .reader { grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 32px); }
  .topbar { min-height: 58px; flex-wrap: wrap; gap: 0 12px; padding: 6px 0; }
  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: .82rem; }
  .hero { grid-template-columns: 1fr; gap: 26px; padding: 32px 0 36px; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .intro-text { margin-top: 16px; }
  .primary { margin-top: 16px; }
  .evolution { padding: 32px 0; }
  .timeline-list { grid-template-columns: 1fr; margin-left: 4px; }
  .timeline-list li { border-top: 0; border-left: 2px solid #b1a7d8; padding: 0 0 15px 14px; }
  .timeline-list li::before { top: 9px; left: -5px; }
  .reader { display: block; padding: 25px 0 32px; }
  .reader aside { position: static; margin-bottom: 27px; }
  .contents { display: flex; flex-wrap: wrap; border-left: 0; border-bottom: 1px solid var(--rule); gap: 0 8px; }
  .contents > span { width: 100%; padding: 0; }
  .contents a { padding: 6px; border-left: 0; border-bottom: 2px solid transparent; }
  .demo-path ol { grid-template-columns: 1fr; gap: 0; }
  .demo-path li { min-height: 37px; }
  .chapter { padding-bottom: 32px; }
  .chapter + .chapter { padding-top: 29px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: white; }
  .topbar, .signals, .primary, .reader aside, footer, .demo-switch { display: none; }
  .hero, .reader { display: block; padding: 12px 0; min-height: 0; }
  .cover { background: white; color: var(--ink); }
  .edition, .intro-text { color: var(--muted); }
  .hero h1 { font-size: 2.75rem; }
  .table-scroll, .diagram-scroll { overflow: visible; }
  table, #ecosystem table, .diagram-scroll img { min-width: 0; }
}

.timeline-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline-list li { overflow-wrap: anywhere; }
.stage-num { display: inline-block; margin-right: .65em; color: var(--accent); font-size: .68em; font-variant-numeric: tabular-nums; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.action-grid li { display: flex; flex-direction: column; justify-content: space-between; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); }
.stage-link { display: flex; gap: 8px; min-height: 44px; align-items: center; color: var(--ink); text-decoration: none; line-height: 1.35; }
.stage-link:hover { text-decoration: underline; }
.stage-link span { color: var(--accent); font-size: .9rem; font-variant-numeric: tabular-nums; }
.stage-source { display: flex; min-height: 44px; align-items: center; font-size: .87rem; line-height: 1.45; }
@media (max-width: 940px) {
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 13px; }
}
@media (max-width: 620px) { .timeline-list { grid-template-columns: 1fr; } }
