/* Three editorial systems. Layout and interaction live in style.css/focus.css. */
html {
  --paper: #faf9f5;
  --ink: #141413;
  --muted: #68675f;
  --line: #d9d7cd;
  --panel: #f3f1e9;
  --surface: #fffefb;
  --accent: #b65136;
  --red: #ad4933;
  --blue: #336794;
  --green: #4b714c;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, Consolas, monospace;
  --heading: Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --axis: #959387;
  --grid: #e1dfd5;
  --chart-fill: #b6513612;
  --shadow: 0 24px 80px #26251a1c;
  --radius: 3px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --duration: 500ms;
  --selection: #e8bda4;
  --backdrop: #201e186b;
  --art-0: #ece8dc;
  --art-1: #e0e5da;
  --art-2: #edddce;
  --art-3: #30332b;
  --art-4: #dce1e5;
  --art-ink: #28281f;
  --art-inverse: #faf9f5;
  color-scheme: light;
}

html[data-mode="dark"] {
  --paper: #191a17;
  --ink: #eeeae2;
  --muted: #aaa99e;
  --line: #3b3e35;
  --panel: #20221d;
  --surface: #282a24;
  --accent: #e19b7e;
  --red: #e59b82;
  --blue: #91b9de;
  --green: #abc494;
  --axis: #929589;
  --grid: #363a30;
  --chart-fill: #e19b7e16;
  --shadow: 0 24px 80px #0007;
  --selection: #704c3c;
  --backdrop: #080a09b3;
  --art-0: #33352b;
  --art-1: #2e3a30;
  --art-2: #46362b;
  --art-3: #dedbd0;
  --art-4: #2f3940;
  --art-ink: #eeeae2;
  --art-inverse: #26291f;
  color-scheme: dark;
}

html[data-style="openai"] {
  --paper: #ffffff;
  --ink: #0d0d0d;
  --muted: #686868;
  --line: #dedede;
  --panel: #f7f7f7;
  --surface: #ffffff;
  --accent: #111111;
  --red: #a24444;
  --blue: #396ac5;
  --green: #257767;
  --heading: var(--sans);
  --axis: #939393;
  --grid: #e9e9e9;
  --chart-fill: #0d0d0d0b;
  --shadow: 0 24px 80px #00000014;
  --radius: 12px;
  --selection: #cdd9e7;
  --backdrop: #14141475;
  --art-0: #f1f1f1;
  --art-1: #e6e6e6;
  --art-2: #dedede;
  --art-3: #181818;
  --art-4: #f4f4f4;
  --art-ink: #171717;
  --art-inverse: #ffffff;
}

html[data-style="openai"][data-mode="dark"] {
  --paper: #131313;
  --ink: #f5f5f5;
  --muted: #ababab;
  --line: #373737;
  --panel: #1d1d1d;
  --surface: #252525;
  --accent: #f0f0f0;
  --red: #ebaaaa;
  --blue: #97baff;
  --green: #88cebb;
  --axis: #939393;
  --grid: #333333;
  --chart-fill: #ffffff12;
  --shadow: 0 24px 80px #0008;
  --selection: #3b4e62;
  --backdrop: #000000b3;
  --art-0: #2b2b2b;
  --art-1: #323232;
  --art-2: #222222;
  --art-3: #e5e5e5;
  --art-4: #3d3d3d;
  --art-ink: #f5f5f5;
  --art-inverse: #171717;
}

html[data-style="terminal"] {
  --paper: #edf0e7;
  --ink: #182d21;
  --muted: #52644e;
  --line: #b6c3ad;
  --panel: #e4eadb;
  --surface: #f4f6ed;
  --accent: #235b38;
  --red: #91531b;
  --blue: #2e6590;
  --green: #2b6b3f;
  --sans: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, Consolas, "PingFang SC", monospace;
  --heading: var(--sans);
  --axis: #71866b;
  --grid: #cbd4c3;
  --chart-fill: #235b3810;
  --shadow: 8px 8px 0 #233d241c;
  --radius: 0px;
  --selection: #b6c5a7;
  --backdrop: #0c1d0eb8;
  --art-0: #dce5d2;
  --art-1: #e5eadc;
  --art-2: #d5dfcb;
  --art-3: #1c3424;
  --art-4: #cbd9c2;
  --art-ink: #17391e;
  --art-inverse: #d1edbd;
}

html[data-style="terminal"][data-mode="dark"] {
  --paper: #0c120e;
  --ink: #d1e4c4;
  --muted: #95aa8a;
  --line: #344b34;
  --panel: #101a13;
  --surface: #162319;
  --accent: #b4ed84;
  --red: #edbd79;
  --blue: #86c9e7;
  --green: #a5dc8a;
  --axis: #7b9973;
  --grid: #263d29;
  --chart-fill: #a5dc8a10;
  --shadow: 8px 8px 0 #0008;
  --selection: #3b5634;
  --backdrop: #020803d9;
  --art-0: #192c1e;
  --art-1: #1b3022;
  --art-2: #253621;
  --art-3: #b7d29e;
  --art-4: #1c362b;
  --art-ink: #d1e4c4;
  --art-inverse: #102112;
}

/* Shared component colors remove the old palette's hard-coded light surfaces. */
html body, html dialog { background: var(--paper); color: var(--ink); }
html ::selection { background: var(--selection); color: var(--ink); }
html button:focus-visible, html a:focus-visible, html select:focus-visible,
html input:focus-visible, html [tabindex]:focus-visible { outline-color: var(--accent); }
html .brand svg, html .current-time #month, html .year-dot { color: var(--accent); }
html .lane-labels { background: var(--paper); }
html .mast-copy p, html .lane-label p, html .lane-count, html .event-meta,
html .header-actions kbd, html .edition>span, html .year-rule span,
html .year-nav button, html .hint, html .hint>span, html .overview-wrap>span,
html footer, html footer button b, html .eyebrow, html .detail-credit,
html .detail-body p, html .date-basis, html #search form, html .result span,
html .empty, html #about>p:not(.eyebrow) { color: var(--muted); }
html .year-rule { border-color: var(--line); }
html .year-rule:after { border-color: var(--grid); }
html .event-media { border-color: var(--line); background: var(--panel); }
html .event-media img { filter: none; }
html .event:hover .event-media { box-shadow: var(--shadow); }
html .event-note { background: var(--paper); color: var(--color); }
html .type-art { background: var(--art-0); color: var(--art-ink); }
html .type-art.style-1 { background: var(--art-1); color: var(--art-ink); }
html .type-art.style-2 { background: var(--art-2); color: var(--art-ink); }
html .type-art.style-3 { background: var(--art-3); color: var(--art-inverse); }
html .type-art.style-4 { background: var(--art-4); color: var(--art-ink); }
html .media-fallback { background: var(--panel); color: var(--color); }
html .time-needle { background: color-mix(in srgb, var(--accent) 18%, transparent); }
html .time-needle:before { background: var(--accent); }
html .time-needle span, html .play-group #play[aria-pressed="true"] { color: var(--accent); }
html .year-nav button[aria-current="true"] { color: var(--ink); background: var(--panel); }
html #window-mark { border-color: var(--axis); background: color-mix(in srgb, var(--ink) 5%, transparent); }
html .live-dot { background: var(--green); }
html .view-controls #overview { border-color: var(--line); border-radius: var(--radius); }
html .view-controls #overview[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
html dialog { border-color: var(--line); box-shadow: var(--shadow); }
html dialog::backdrop { background: var(--backdrop); }
html .close { border-color: var(--line); background: var(--paper); }
html .detail-cover { background: var(--panel); }
html .detail-cover img, html .detail-cover video { background: var(--panel); }
html .detail-nav { background: var(--paper); border-color: var(--line); }
html .result:hover, html .result:focus { background: var(--panel); }
html .compact .lane { background: none; }
html .compact .event:hover:after { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ink) 8%, transparent); }
html .current-time .year-dot { position: static; order: 1; margin-left: 2px; font-size: 36px; }
html .current-time #month { order: 2; margin-left: 6px; }

/* The selected technology is an editorial spread, not a second homepage. */
html .focus-panel, html .story-panel { color: var(--ink); }
html .focus-panel { background: var(--panel); border-color: var(--line); }
html .story-panel { background: var(--paper); }
html .focus-title, html .knowledge-section>h2,
html .reading-title { font-family: var(--heading); font-weight: 400; letter-spacing: -.035em; }
html .trend-panel, html .relations-panel, html .knowledge-section { border-color: var(--line); }
html .trend-chart { color: var(--accent); }
html .trend-chart svg text { fill: var(--muted); stroke: none; font-family: var(--mono); }
html .trend-chart .axis, html .trend-chart .axis-line { stroke: var(--axis); }
html .trend-chart .grid, html .trend-chart .grid-line { stroke: var(--grid); }
html .trend-chart .trend-line { stroke: var(--accent); }
html .trend-chart .trend-area { fill: var(--chart-fill); }
html svg [stroke="#b24932"] { stroke: var(--red); }
html svg [stroke="#3665a4"] { stroke: var(--blue); }
html svg [stroke="#60794b"] { stroke: var(--green); }
html .relation-card, html .reading-item { background: var(--surface); border-color: var(--line); border-radius: var(--radius); }
html .relation-card p, html .reading-item p { color: var(--muted); }
html .relation-card:hover, html .reading-item:hover { border-color: var(--axis); }
html #connections text { fill: var(--muted); stroke: none; font-family: var(--mono); }
html #connections .relationship-label { fill: var(--paper); stroke: none; }

/* Appearance controls remain compact but have an actual pointer target. */
html .style-switch { display: inline-flex; align-items: center; color: var(--ink); }
html .style-switch select, html select.style-switch {
  max-width: 130px;
  min-height: 32px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
}
html .header-actions>.theme-toggle, html .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  width: auto;
  height: 32px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}
html #lineage-toggle, html #reading-open { color: var(--ink); }
html #lineage-toggle[aria-pressed="true"] { color: var(--accent); }

/* Anthropic: an intentionally typeset research journal. */
html[data-style="anthropic"] .mast-copy h1,
html[data-style="anthropic"] .lane-label h2,
html[data-style="anthropic"] .detail-copy h2,
html[data-style="anthropic"] #about h2 { font-family: var(--heading); }
html[data-style="anthropic"] .brand b { font-family: var(--heading); font-weight: 500; letter-spacing: .03em; }
html[data-style="anthropic"] .current-time,
html[data-style="anthropic"] .type-art .type-name { font-family: var(--heading); }
html[data-style="anthropic"] .current-time #year { letter-spacing: -.065em; }
html[data-style="anthropic"] .focus-title { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; }
html[data-style="anthropic"] .type-art:after { border-radius: 0; transform: rotate(25deg); width: 150px; height: 240px; right: -50px; opacity: .08; }
html[data-style="anthropic"] .relation-card,
html[data-style="anthropic"] .reading-item { box-shadow: none; }
html[data-style="anthropic"] .reading-item h3 { font-family: var(--heading); font-weight: 500; }
html[data-style="anthropic"] .detail-summary { font-family: var(--heading); font-size: 18px; line-height: 1.7; }
html[data-style="anthropic"] .knowledge-section>h2 { font-size: 30px; line-height: 1.2; }

/* OpenAI: geometric typesetting, neutral planes, rounded controls. */
html[data-style="openai"] .brand b { font-family: var(--sans); font-weight: 600; letter-spacing: -.06em; }
html[data-style="openai"] .brand svg { color: var(--ink); }
html[data-style="openai"] header { border-bottom-color: var(--line); }
html[data-style="openai"] .current-time { font-family: var(--sans); }
html[data-style="openai"] .current-time #year { font-size: clamp(80px, 7.4vw, 112px); font-weight: 500; letter-spacing: -.075em; }
html[data-style="openai"] .current-time.is-overview #year { font-size: 48px; }
html[data-style="openai"] .year-dot { color: var(--ink); }
html[data-style="openai"] .mast-copy { border-left: 0; padding-left: 0; }
html[data-style="openai"] .mast-copy h1 { font-family: var(--sans); font-weight: 500; letter-spacing: -.055em; }
html[data-style="openai"] .lane-label h2 { font-family: var(--sans); font-weight: 500; letter-spacing: -.045em; }
html[data-style="openai"] .event-media { border: 0; border-radius: 8px; }
html[data-style="openai"] .event[aria-current="true"] .event-media { outline-width: 2px; outline-offset: 3px; }
html[data-style="openai"] .event h3 { font-weight: 500; letter-spacing: -.025em; }
html[data-style="openai"] .event:after { border-radius: 50%; transform: none; }
html[data-style="openai"] .type-art { padding: 12px 14px; }
html[data-style="openai"] .type-art .type-name { font-family: var(--sans); font-size: 40px; font-weight: 500; line-height: .98; letter-spacing: -.065em; }
html[data-style="openai"] .type-art:after { width: 120px; height: 120px; border-radius: 50%; top: -38px; right: -44px; transform: none; opacity: .07; }
html[data-style="openai"] .type-art .micro { letter-spacing: .025em; }
html[data-style="openai"] .year-nav button[aria-current="true"] { border-radius: 999px; }
html[data-style="openai"] .view-controls #overview,
html[data-style="openai"] .style-switch select,
html[data-style="openai"] .theme-toggle { border-radius: 999px; }
html[data-style="openai"] .view-controls #overview { padding-inline: 16px; }
html[data-style="openai"] dialog { border-radius: 16px; }
html[data-style="openai"] .detail-copy h2,
html[data-style="openai"] .focus-title,
html[data-style="openai"] .knowledge-section>h2,
html[data-style="openai"] .reading-title { font-weight: 500; letter-spacing: -.05em; }
html[data-style="openai"] .focus-panel { background: var(--panel); }
html[data-style="openai"] .relation-card,
html[data-style="openai"] .reading-item { border: 1px solid var(--line); }
html[data-style="openai"] .reading-item h3 { font-weight: 500; letter-spacing: -.025em; }
html[data-style="openai"] .trend-chart .trend-line { stroke-width: 2; }
html[data-style="openai"] .trend-chart .grid,
html[data-style="openai"] .trend-chart .grid-line { stroke-dasharray: none; }
html[data-style="openai"] .close { border-radius: 50%; }

/* Terminal: a readable research console, with no artificial scanline overlay. */
html[data-style="terminal"] body { font-family: var(--mono); }
html[data-style="terminal"] header { border-bottom-style: dashed; }
html[data-style="terminal"] .brand { gap: 8px; }
html[data-style="terminal"] .brand svg { display: none; }
html[data-style="terminal"] .brand:before { content: ">_"; font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--accent); }
html[data-style="terminal"] .brand b { font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: -.06em; }
html[data-style="terminal"] .brand>span { letter-spacing: 0; }
html[data-style="terminal"] .edition { font-family: var(--mono); font-size: 10px; letter-spacing: 0; }
html[data-style="terminal"] .edition>span { letter-spacing: .035em; }
html[data-style="terminal"] .current-time { font-family: var(--mono); letter-spacing: -.08em; }
html[data-style="terminal"] .current-time #year { font-size: clamp(70px, 6.6vw, 96px); font-weight: 400; letter-spacing: -.08em; }
html[data-style="terminal"] .current-time.is-overview #year { font-size: 44px; }
html[data-style="terminal"] .current-time #month { font-size: 15px; }
html[data-style="terminal"] .mast-copy { border-left-style: dashed; }
html[data-style="terminal"] .mast-copy h1 { font-family: var(--mono); font-weight: 400; font-size: 21px; letter-spacing: -.045em; }
html[data-style="terminal"] .mast-copy p { font-size: 10px; }
html[data-style="terminal"] .atlas { border: 1px solid var(--line); }
html[data-style="terminal"] .lane-labels { padding-left: 12px; border-color: var(--line); }
html[data-style="terminal"] .lane-label h2 { font-family: var(--mono); font-size: 24px; font-weight: 400; letter-spacing: -.04em; }
html[data-style="terminal"] .lane-label h2 span { letter-spacing: 0; }
html[data-style="terminal"] .lane-no:before { content: "["; }
html[data-style="terminal"] .lane-no:after { content: "]"; }
html[data-style="terminal"] .lane-count { color: var(--muted); }
html[data-style="terminal"] .lane:before { border-bottom-style: dashed; opacity: .7; }
html[data-style="terminal"] .lane-label:after,
html[data-style="terminal"] .event:after,
html[data-style="terminal"] .result i { transform: none; border-radius: 0; }
html[data-style="terminal"] .event-media { border: 1px solid var(--line); border-radius: 0; }
html[data-style="terminal"] .event:hover .event-media { transform: translateY(-3px); box-shadow: 4px 4px 0 color-mix(in srgb, var(--accent) 16%, transparent); }
html[data-style="terminal"] .event h3 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: -.04em; }
html[data-style="terminal"] .event-meta { font-size: 8px; letter-spacing: -.03em; }
html[data-style="terminal"] .event-note { padding: 4px 6px; font-size: 7px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html[data-style="terminal"] .type-art { padding: 12px; }
html[data-style="terminal"] .type-art .type-name { font-family: var(--mono); font-size: 30px; line-height: 1; font-weight: 400; letter-spacing: -.08em; }
html[data-style="terminal"] .type-art .micro { letter-spacing: 0; }
html[data-style="terminal"] .type-art:after { content: "_"; width: auto; height: auto; top: auto; right: 12px; bottom: 16px; border: 0; border-radius: 0; transform: none; opacity: .35; font: 30px/1 var(--mono); }
html[data-style="terminal"] .transport { border-bottom: 1px dashed var(--line); }
html[data-style="terminal"] .year-nav button[aria-current="true"] { color: var(--paper); background: var(--accent); }
html[data-style="terminal"] .year-nav button { font-size: 9px; }
html[data-style="terminal"] .view-controls #overview[aria-pressed="true"] { background: var(--accent); color: var(--paper); }
html[data-style="terminal"] .time-needle:before { transform: none; }
html[data-style="terminal"] #window-mark { border-style: dashed; }
html[data-style="terminal"] .live-dot { border-radius: 0; }
html[data-style="terminal"] .focus-title { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.1; letter-spacing: -.06em; }
html[data-style="terminal"] .focus-panel { border-right-style: dashed; }
html[data-style="terminal"] .detail-copy h2 { font-family: var(--mono); font-size: 30px; letter-spacing: -.06em; }
html[data-style="terminal"] .detail-summary { font-family: var(--mono); font-size: 13px; line-height: 1.8; }
html[data-style="terminal"] .detail-body p { font-size: 11px; line-height: 1.9; }
html[data-style="terminal"] .knowledge-section>h2 { font-family: var(--mono); font-size: 22px; }
html[data-style="terminal"] .relation-card,
html[data-style="terminal"] .reading-item { border: 1px solid var(--line); box-shadow: none; }
html[data-style="terminal"] .relation-card:hover,
html[data-style="terminal"] .reading-item:hover { border-color: var(--accent); }
html[data-style="terminal"] .reading-item h3 { font-family: var(--mono); font-weight: 400; letter-spacing: -.04em; }
html[data-style="terminal"] .trend-chart .grid,
html[data-style="terminal"] .trend-chart .grid-line { stroke-dasharray: 2 5; }
html[data-style="terminal"] .trend-chart .trend-line { stroke-width: 1.5; stroke-linejoin: miter; stroke-linecap: square; }
html[data-style="terminal"] #connections path { stroke-dasharray: 5 3; }
html[data-style="terminal"] dialog,
html[data-style="terminal"] .close { border-radius: 0; border-color: var(--line); }
html[data-style="terminal"] .close { font-family: var(--mono); font-size: 20px; }
html[data-style="terminal"] .detail-nav { border-top-style: dashed; }
html[data-style="terminal"] #query { font-family: var(--mono); font-size: 18px; }

/* Match title size to the available film frame; microcopy must never collide. */
html .event .type-art { container-type: size; }
html .event .type-art .type-name { font-size: clamp(16px, min(33cqh, 24cqi), 44px); }
html[data-style="terminal"] .event .type-art .type-name { font-size: clamp(16px, min(30cqh, 20cqi), 32px); }
@container (max-height: 80px) {
  .event .type-art .micro, .event .type-art .type-bottom { display: none; }
  .event .type-art .type-name { margin-block: auto; }
}

@media (min-width: 701px) {
  html[data-style="anthropic"] .mast-copy h1 { font-size: 28px; line-height: 1.2; }
  html[data-style="anthropic"] .lane-label h2 { font-size: 32px; }
  html[data-style="openai"] .lane-label h2 { font-size: 27px; }
}
@media (max-width: 1050px) {
  html[data-style="openai"] .current-time #year { font-size: 88px; }
  html[data-style="terminal"] .current-time #year { font-size: 78px; }
  html[data-style="terminal"] .mast-copy h1 { font-size: 18px; }
}
@media (max-width: 700px) {
  html .current-time .year-dot { font-size: 25px; margin-left: 0; }
  html .current-time #month { margin-left: 4px; }
  html .style-switch select, html select.style-switch { max-width: 100px; min-height: 30px; font-size: 10px; padding: 5px 22px 5px 8px; }
  html .header-actions>.theme-toggle, html .theme-toggle { min-width: 30px; min-height: 30px; height: 30px; }
  html[data-style="anthropic"] .mast-copy h1 { font-size: 13px; }
  html[data-style="anthropic"] .detail-summary { font-size: 16px; }
  html[data-style="anthropic"] .focus-title { font-size: 32px; }
  html[data-style="openai"] .current-time #year { font-size: 68px; }
  html[data-style="openai"] .current-time.is-overview #year { font-size: 32px; }
  html[data-style="openai"] .type-art .type-name { font-size: 31px; }
  html[data-style="openai"] .event-media { border-radius: 5px; }
  html[data-style="openai"] .view-controls #overview { padding-inline: 4px; }
  html[data-style="openai"] .lane-label h2 { font-size: 20px; }
  html[data-style="terminal"] .brand:before { font-size: 19px; }
  html[data-style="terminal"] .brand b { font-size: 18px; }
  html[data-style="terminal"] .current-time #year { font-size: 64px; }
  html[data-style="terminal"] .current-time.is-overview #year { font-size: 31px; }
  html[data-style="terminal"] .current-time #month { font-size: 11px; }
  html[data-style="terminal"] .mast-copy h1 { font-size: 11px; }
  html[data-style="terminal"] .mast-copy p { font-size: 7px; }
  html[data-style="terminal"] .lane-labels { padding-left: 7px; }
  html[data-style="terminal"] .lane-label h2 { font-size: 18px; }
  html[data-style="terminal"] .lane-label h2 span { font-size: 5px; }
  html[data-style="terminal"] .type-art .type-name { font-size: 25px; }
  html[data-style="terminal"] .event h3 { font-size: 11px; }
  html[data-style="terminal"] .year-nav button { font-size: 8px; }
  html[data-style="terminal"] .detail-copy h2 { font-size: 25px; }
  html[data-style="terminal"] .focus-title { font-size: 28px; }
}
@media (max-height: 740px) and (min-width: 701px) {
  html[data-style="openai"] .current-time #year { font-size: 80px; }
  html[data-style="terminal"] .current-time #year { font-size: 72px; }
  html[data-style="openai"] .type-art .type-name { font-size: 31px; }
  html[data-style="terminal"] .type-art .type-name { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) { --duration: 0ms; }
}
