/* AI Encyclopedia visual system v1.0.0 — mobile-first, WCAG-oriented */
:root {
  color-scheme: light;
  --bg: #f7f5ef; --surface: #ffffff; --surface-2: #ebe8df;
  --text: #17202a; --muted: #505a64; --border: #6c7680;
  --accent: #075fa6; --accent-ink: #ffffff; --accent-soft: #d9edff;
  --positive: #08765b; --negative: #a33a14; --focus: #b24d00;
  --shadow: 0 .25rem 1.25rem rgb(23 32 42 / .12);
  --radius: .7rem; --content: 76rem; --measure: 46rem;
  --step--1: clamp(.875rem,.84rem + .16vw,.95rem);
  --step-0: clamp(1rem,.95rem + .25vw,1.125rem);
  --step-1: clamp(1.25rem,1.12rem + .62vw,1.6rem);
  --step-2: clamp(1.65rem,1.4rem + 1.2vw,2.35rem);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#111820; --surface:#1b2530; --surface-2:#263442;
  --text:#f4f6f8; --muted:#c6ced6; --border:#9da9b5;
  --accent:#69b9ff; --accent-ink:#08131d; --accent-soft:#173f61;
  --positive:#61d8b1; --negative:#ff9b76; --focus:#ffb45c;
  --shadow:0 .25rem 1.25rem rgb(0 0 0 / .36);
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]):not([data-theme="dark"]){
  color-scheme:dark;--bg:#111820;--surface:#1b2530;--surface-2:#263442;--text:#f4f6f8;--muted:#c6ced6;--border:#9da9b5;--accent:#69b9ff;--accent-ink:#08131d;--accent-soft:#173f61;--positive:#61d8b1;--negative:#ff9b76;--focus:#ffb45c;--shadow:0 .25rem 1.25rem rgb(0 0 0/.36)
}}
*,*::before,*::after{box-sizing:border-box}html{scroll-padding-top:5rem}body{margin:0;background:var(--bg);color:var(--text);font:var(--step-0)/1.72 system-ui,-apple-system,"Segoe UI","Noto Sans SC",sans-serif;text-rendering:optimizeLegibility}a{color:var(--accent);text-underline-offset:.18em;text-decoration-thickness:.08em}a:hover{text-decoration-thickness:.14em}button,input,select{font:inherit;color:inherit}button,select,input[type="search"]{min-block-size:2.75rem;border:1px solid var(--border);border-radius:.45rem;background:var(--surface);padding:.45rem .72rem}button{cursor:pointer}button:hover{background:var(--accent-soft)}:focus-visible{outline:.2rem solid var(--focus);outline-offset:.18rem}h1,h2,h3{line-height:1.25;text-wrap:balance;scroll-margin-top:5rem}h1{font-size:var(--step-2)}h2{font-size:var(--step-1);margin-block-start:2.5rem}.shell{width:min(calc(100% - 2rem),var(--content));margin-inline:auto}.measure{max-width:var(--measure)}.skip-link{position:fixed;z-index:100;inset:.5rem auto auto .5rem;transform:translateY(-160%);background:var(--accent);color:var(--accent-ink);padding:.65rem 1rem;border-radius:.4rem}.skip-link:focus{transform:none}.site-header{position:sticky;z-index:20;top:0;background:color-mix(in srgb,var(--bg) 92%,transparent);border-bottom:1px solid var(--border);backdrop-filter:blur(.7rem)}.header-row{display:flex;gap:.75rem;align-items:center;min-height:4rem;flex-wrap:wrap}.brand{font-weight:750;color:var(--text);text-decoration:none}.primary-nav{display:flex;gap:.8rem;align-items:center;margin-inline:auto}.primary-nav a[aria-current="page"]{font-weight:700;text-decoration-thickness:.18em}.theme-field{display:flex;gap:.45rem;align-items:center}.theme-field label{font-size:var(--step--1)}.hero{padding-block:clamp(2rem,7vw,5rem);border-bottom:1px solid var(--border)}.eyebrow{color:var(--accent);font-weight:700;letter-spacing:.04em}.lede{font-size:var(--step-1);max-width:42rem}.meta,.fine-print{font-size:var(--step--1);color:var(--muted)}.grid{display:grid;gap:1rem}.card,.visual{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:clamp(1rem,3vw,1.5rem)}.visual{margin-block:1.5rem}.visual-head{display:flex;gap:1rem;justify-content:space-between;align-items:start;flex-wrap:wrap}.controls{display:flex;gap:.65rem;align-items:end;flex-wrap:wrap;margin-block:1rem}.control{display:grid;gap:.25rem}.control label{font-size:var(--step--1);font-weight:650}.status{padding:.4rem .7rem;background:var(--accent-soft);border-inline-start:.25rem solid var(--accent)}.timeline-list{position:relative;display:grid;gap:1rem;padding:0;list-style:none}.timeline-list::before{content:"";position:absolute;left:.68rem;top:.5rem;bottom:.5rem;border-left:.18rem solid var(--accent)}.timeline-event{position:relative;margin-left:2rem;padding:1rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}.timeline-event::before{content:"";position:absolute;left:-1.8rem;top:1.35rem;width:.85rem;height:.85rem;border:.18rem solid var(--accent);background:var(--bg);border-radius:50%}.timeline-event h3{margin:.15rem 0}.timeline-event[hidden]{display:none}.tag{display:inline-block;padding:.08rem .45rem;margin:.12rem;border:1px solid currentColor;border-radius:999px;font-size:.78rem}.chart-shell{overflow-x:auto;overscroll-behavior-inline:contain;padding:.25rem;border:1px solid var(--border);border-radius:.45rem}.chart-shell:focus-visible{outline:.2rem solid var(--focus)}.chart-svg{display:block;min-width:38rem;width:100%;height:auto;background:var(--surface)}.chart-svg .axis{stroke:var(--border);stroke-width:1}.chart-svg .gridline{stroke:var(--border);stroke-width:.6;stroke-dasharray:3 5;opacity:.65}.chart-svg text{fill:var(--text);font:13px system-ui,sans-serif}.chart-svg .train-line{fill:none;stroke:var(--accent);stroke-width:3}.chart-svg .validation-line{fill:none;stroke:var(--negative);stroke-width:3;stroke-dasharray:8 5}.chart-svg .point{stroke:var(--surface);stroke-width:2}.chart-svg .point.train{fill:var(--accent)}.chart-svg .point.validation{fill:var(--negative)}.chart-legend{display:flex;gap:1rem;flex-wrap:wrap}.legend-key::before{content:"";display:inline-block;width:1.8rem;margin-right:.35rem;border-top:.2rem solid var(--accent);vertical-align:middle}.legend-key.validation::before{border-color:var(--negative);border-top-style:dashed}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:.45rem}.table-wrap:focus-visible{outline:.2rem solid var(--focus)}table{width:100%;border-collapse:collapse;min-width:34rem}th,td{padding:.55rem .7rem;border-bottom:1px solid var(--border);text-align:left}th{background:var(--surface-2)}details{margin-block:1rem}summary{cursor:pointer;font-weight:700}.rights{border-inline-start:.3rem solid var(--positive);padding:.8rem;background:var(--surface-2)}footer{margin-block-start:4rem;padding-block:2rem;border-top:1px solid var(--border)}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(min-width:48rem){.cards{grid-template-columns:repeat(3,1fr)}.timeline-list{grid-template-columns:repeat(2,minmax(0,1fr))}.timeline-list::before{display:none}.timeline-event{margin-left:0}.timeline-event::before{display:none}}
@media(max-width:47.99rem){.primary-nav{order:3;width:100%;overflow-x:auto;margin:0;padding-bottom:.5rem}.primary-nav a{white-space:nowrap}.theme-field{margin-left:auto}.shell{width:min(calc(100% - 1.2rem),var(--content))}.visual{padding:.85rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@media(forced-colors:active){*{box-shadow:none}.timeline-event::before{forced-color-adjust:auto}.tag{border:1px solid ButtonText}}
@media print{:root,:root[data-theme]{color-scheme:light;--bg:#fff;--surface:#fff;--text:#000;--muted:#222;--border:#555;--accent:#000}.site-header,.controls,.skip-link{display:none!important}a[href]::after{content:" (" attr(href) ")";font-size:.8em}.card,.visual{box-shadow:none;break-inside:avoid}}
