/* Ask the Archive: the question tabs, the fixed stage (conversation and canvas), each
   demo's canvas, and the home page's preview. Built on site.css's tokens (faymaps look).
   The stage never changes size while a demo plays: steps are laid out in boxes of fixed
   height that scroll inside themselves. Without scripts (scripting: none) everything is
   shown at its natural height instead. No inline styles. */

/* ——— Bar above the tabs ——— */
.ask-app { padding-bottom: var(--space-6); }
.ask-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; min-height: 36px; }
.ask-bar .kicker { margin-right: auto; }
.ask-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-btns .btn { min-height: 32px; }
.ask-btns [hidden] { display: none; }
.ask-btns [data-tour] { min-width: 8.2rem; }
.ask-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ——— Question tabs ——— */
.qs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-control) var(--radius-control) 0 0; background: var(--cream); overflow: hidden; }
.q-tab { position: relative; display: grid; align-content: start; gap: 2px; padding: 10px 12px 14px; text-decoration: none; color: var(--muted); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; transition: background-color var(--motion) var(--ease); }
.q-tab:first-child { border-left: 0; }
.q-tab .n { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }
.q-tab b { font-size: .86rem; line-height: 1.25; color: var(--ink-2); font-weight: 600; }
.q-tab .t { font-family: var(--font-mono); font-size: .68rem; color: var(--orange-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.q-tab:hover { background: var(--paper); color: var(--ink); }
.q-tab.on { background: var(--panel); border-bottom-color: transparent; }
.q-tab.on b { color: var(--ink); }
.q-tab.on .n, .q-tab.on .t { color: var(--orange-text); opacity: 1; }
.q-tab .bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); }
.q-tab.on .bar { transform: scaleX(1); }
.q-tab .bar.count { opacity: .6; }

/* ——— The stage: one demo at a time, at a fixed height ——— */
.stage { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-panel) var(--radius-panel); background: var(--panel); box-shadow: var(--elevation-2); overflow: hidden; height: 650px; }
.demo { display: grid; grid-template-columns: minmax(0, 410px) minmax(0, 1fr); height: 100%; }
.demo:not(.on) { display: none; }
.demo:focus { outline: none; }
/* Nothing in the demos may be a scroll anchor: when the window's anchor is chosen inside
   the stage, Chrome moves the page to follow it as the log and canvas scroll and change. */
.ask-app, .ask-app * { overflow-anchor: none; }
.demo { scroll-margin-top: 230px; }

/* the conversation */
.convo { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; padding: 14px 14px 8px 16px; border-right: 1px solid var(--line); min-width: 0; min-height: 0; }
.demo-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.demo-head h2 { font-size: 1.15rem; line-height: 1.2; }
.demo-kind { font-size: .74rem; color: var(--muted); }
.ask-q { display: grid; gap: 3px; background: var(--navy); color: #fff; border-radius: 4px 16px 16px 16px; padding: 9px 14px 11px; }
.ask-q .who { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-navy-muted); }
.ask-q .q { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.32; }
.ask-q .ghost { visibility: hidden; }
.ask-q .q.typing .typed::after { content: ""; display: inline-block; width: .42ch; height: 1em; margin-right: -.42ch; background: var(--orange); vertical-align: -.12em; animation: caret 1s steps(1) infinite; }
.log { list-style: none; margin: 0; padding: 12px 6px 6px 0; border-top: 1px solid var(--line); position: relative; overflow-y: auto; display: grid; align-content: start; gap: 6px; scrollbar-width: thin; min-height: 0; mask-image: linear-gradient(to bottom, #000 0, #000 1px, transparent 2px, #000 24px); }
.demo-foot { font-size: .68rem; line-height: 1.35; color: var(--muted); }

/* steps */
.st { min-width: 0; }
.st.pend { display: none; }
.st.enter { animation: aa-in .4s var(--ease); }
@keyframes aa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.st.say p { font-size: .86rem; line-height: 1.45; color: var(--ink-2); background: var(--cream); border: 1px solid var(--soft); border-radius: 4px 14px 14px 14px; padding: 6px 11px; }
.st.call { border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 8px; background: #fff; }
.st.call.open { box-shadow: 0 0 0 3px var(--orange-light); }
.row { display: flex; align-items: baseline; gap: 7px; padding: 5px 10px; font-size: .8rem; min-width: 0; border-radius: 6px; }
.js .row { cursor: pointer; }
.js .row:hover .fn { text-decoration: underline; }
.row .ico { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--orange); transform: translateY(-1px) rotate(45deg); }
.row .fn { flex: none; font-family: var(--font-mono); font-size: .74rem; color: var(--orange-text); }
.row .many { flex: none; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }
.row .sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.row .sum::before { content: "→ "; color: var(--orange-text); }
.st.call.open .row { flex-wrap: wrap; row-gap: 2px; }
.st.call.open .row .sum { white-space: normal; flex-basis: 100%; padding-left: 14px; }
.st.call.running .row .sum { display: none; }
.st.call.running .ico { width: 9px; height: 9px; background: none; border: 2px solid var(--orange); border-right-color: transparent; border-radius: 50%; transform: none; animation: spin .8s linear infinite; }
.full { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.full > .inner { overflow: hidden; min-height: 0; }
.st.call.open .full { grid-template-rows: 1fr; }
.args { margin: 0 10px 7px; font: .7rem/1.5 var(--font-mono); background: var(--cream); border: 1px solid var(--soft); border-radius: 6px; padding: 5px 9px; max-height: 92px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.j-k { color: var(--navy); } .j-s { color: #2f5d40; } .j-n { color: var(--orange-text); } .j-b { color: var(--focus); }
.res { margin: 0 10px 9px; max-height: 168px; overflow: auto; border-top: 1px dashed var(--line); padding-top: 6px; scrollbar-width: thin; }
.res .rv { opacity: 0; }
.res > * { transition: opacity .25s; }
.st.ans { border-left: 3px solid var(--orange); padding: 2px 0 2px 11px; }
.st.ans .who { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-text); }
.st.ans p { font-family: var(--font-display); font-size: 1.02rem; line-height: 1.4; color: var(--ink); }

/* result bodies */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 12px; margin: 0 0 5px; font-size: .78rem; }
.kv div { display: grid; min-width: 0; transition: opacity .25s; }
.kv dt { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.rows { margin: 3px 0 5px; padding-left: 1.2em; font-size: .76rem; color: var(--ink-2); display: grid; gap: 2px; }
.rows li { overflow-wrap: anywhere; transition: opacity .25s; }
.rows .more { list-style: none; margin-left: -1.2em; color: var(--muted); }
.snip { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); background: var(--cream); border-radius: 6px; padding: 5px 9px; margin: 3px 0 5px; overflow-wrap: anywhere; transition: opacity .25s; }
.snip.alert { color: #b0261b; font-weight: 600; }
a.tc-img { display: inline-block; margin: 2px 0 6px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: opacity .25s; }
a.tc-img img { height: 84px; width: auto; }
.mini-diff { font-family: var(--font-mono); font-size: .72rem; border: 1px solid var(--soft); border-radius: 6px; overflow: hidden; margin-bottom: 5px; }
.mini-diff div { padding: 3px 9px; transition: opacity .25s; }
.mini-diff .del { color: var(--muted); text-decoration: line-through; }
.mini-diff .del::before { content: "− "; }
.mini-diff .add { background: var(--orange-light); }
.mini-diff .add::before { content: "+ "; color: var(--orange-text); }

/* the canvas */
.canvas { position: relative; min-width: 0; min-height: 0; background-color: var(--cream); background-image: radial-gradient(rgba(13,34,64,.07) 1px, transparent 1.2px); background-size: 16px 16px; }
.hud { position: absolute; left: 14px; top: 12px; right: 290px; z-index: 2; display: flex; gap: 8px; align-items: center; min-width: 0; pointer-events: none; }
.chip-tool { flex: none; font-family: var(--font-mono); font-size: .72rem; color: #fff; background: var(--navy); padding: 3px 10px; border-radius: var(--radius-pill); }
.chip-tool::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 1px; background: var(--orange); transform: rotate(45deg); vertical-align: 1px; }
.readout { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); background: rgba(255,253,248,.94); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 10px; }
.cv-tools { position: absolute; right: 14px; top: 11px; z-index: 4; display: flex; gap: 6px; align-items: center; max-width: 280px; }
.cv-tools .open, .cv-tools .data-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: .76rem; font-weight: 600; color: var(--navy); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 11px; text-decoration: none; cursor: pointer; }
.cv-tools .data-btn { flex: none; }
.cv-tools .open:hover, .cv-tools .data-btn:hover, .cv-tools .data-btn[aria-expanded="true"] { border-color: var(--navy); }
.cv-tools .data-btn[aria-expanded="true"] { background: var(--navy); color: #fff; }
.cv-body { position: absolute; inset: 46px 0 0 0; overflow: auto; padding: 4px 16px 14px; scrollbar-width: thin; }
.cv-data { display: none; position: absolute; inset: 46px 0 0 0; z-index: 3; background: var(--panel); overflow: auto; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.cv-data.open { display: grid; gap: 12px; align-content: start; }
.cv-data h4 { font-size: .82rem; margin: 0; }
.cv-data table { font-size: .8rem; font-variant-numeric: tabular-nums; }
.cv-data td, .cv-data th { padding: 3px 14px 3px 0; }

/* parts of a canvas, and how they arrive */
.cv { display: grid; gap: 12px; }
.cv-grid { display: grid; gap: 12px; align-items: start; min-width: 0; }
.cv-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.cv .off { opacity: 0; transform: translateY(8px); pointer-events: none; }
.cv svg .off, .cv svg.off { transform: none; }
/* Blocks still to come keep their place as empty slots, so the answer reads as one
   composition from the start and fills in, like a map drawing in. */
.cv :is(.cv-fig, .cv-chart, .cv-card, .paper, .cv-plate:not(.disc), .browser, .avail, .screen, .side, .cv-quote, .cv-hocr, .chain li).off { opacity: 1; transform: none; background: rgba(255,253,248,.4); border-style: dashed; border-color: var(--grey-bar); box-shadow: none; }
.cv :is(.cv-fig, .cv-chart, .cv-card, .paper, .cv-plate:not(.disc), .browser, .avail, .screen, .side, .cv-quote, .cv-hocr, .chain li).off > * { opacity: 0; visibility: hidden; }
.cv :is(.cv-fig, .cv-chart, .cv-card, .paper, .cv-plate, .browser, .avail, .screen, .side, .cv-quote, .cv-hocr, .chain li) > * { transition: opacity .5s var(--ease) .1s, visibility 0s; }
.cv :is(.cv-fig, .cv-chart, .cv-card, .paper, .cv-plate, .browser, .avail, .screen, .side, .cv-quote, .cv-hocr, .chain li) { transition: opacity .55s var(--ease), transform .55s var(--ease), background-color .4s, border-color .4s, box-shadow .4s; }
.cv .screen.off { border-width: 1px; }
.cv .chain li.off::before { opacity: 0; }
.cv [data-at] { transition: opacity .55s var(--ease), transform .55s var(--ease); }
.cv .still, .cv.still *, .canvas.still * { transition: none !important; animation: none !important; }
.cv svg .col rect:not(.hit), .cv svg .col circle { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .6s var(--ease), fill .45s var(--ease); transition-delay: inherit; }
.cv svg.hbars .col rect:not(.hit) { transform-origin: 0 50%; }
.cv svg .col circle { transform-origin: 50% 50%; }
.cv svg .col text { transition: opacity .4s; transition-delay: inherit; }
.cv .g0 svg.bars .col rect:not(.hit) { transform: scaleY(0); }
.cv .g0 svg.hbars .col rect:not(.hit) { transform: scaleX(0); }
.cv .g0 svg .col circle { transform: scale(0); }
.cv .g0 svg.hbars .col text.hi, .cv .g0 svg.bars > text.hi, .cv .g0 svg .mark, .cv .g0 svg .area, .cv .g0 svg.lines > text.hi { opacity: 0; }
.cv svg .area, .cv svg .mark, .cv svg > text.hi { transition: opacity .6s .9s; }
.cv .g0 .w { opacity: 0; }
.cv svg .w { transition: opacity .3s; }
.cv .sx { transition: opacity .4s var(--ease), transform .4s var(--ease); }
.cv .g0 .sx { opacity: 0; transform: translateY(4px); }
.cv .off2 .s-accent { fill: var(--grey-bar); }
.cv .off2 svg > text.hi { opacity: 0; }
.cv .chart-wrap svg { min-width: 0 !important; }

/* shared canvas blocks */
.cv-fig { padding: 8px 12px; border-radius: var(--radius-row); box-shadow: var(--elevation-1); }
.cv-fig .v { font-size: 1.45rem; }
.cv-fig .l { font-size: .7rem; margin-top: 5px; line-height: 1.3; }
.cv-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cv-figs.four { grid-template-columns: 1.1fr 1fr 1fr .9fr; }
.cv-fig.mode .pill { font-size: .8rem; }
.cv-chart { padding: 8px 12px; gap: 4px; border-radius: var(--radius-row); box-shadow: var(--elevation-1); }
.cv-chart h3 { font-size: .82rem; line-height: 1.3; }
.cv-chart .sub { font-size: .72rem; }
.cv-chart .key { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.cv-chart .key .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 3px 0 6px; vertical-align: -1px; }
.cv-chart .key .sw:first-child { margin-left: 0; }
.sw.s-accent { background: var(--orange); } .sw.s-muted { background: var(--grey-bar); } .sw.s-third { background: var(--sage); }
.cv-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 10px 12px; box-shadow: var(--elevation-1); display: grid; gap: 6px; min-width: 0; }
.cv-h { font-family: var(--font-body); font-size: .82rem; font-weight: 700; line-height: 1.3; }
.cv-plate { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 8px; box-shadow: var(--elevation-1); position: relative; min-width: 0; }
.cv-plate img { width: 100%; height: auto; border-radius: 4px; display: block; }
.cv-plate figcaption { font-size: .72rem; line-height: 1.4; margin-top: 6px; color: var(--ink-2); }
.cv-plate figcaption:empty { display: none; }
blockquote.pd { margin: 0; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--sage); border-radius: var(--radius-row); padding: 12px 16px; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.5; color: var(--ink); }
blockquote.pd footer { font-family: var(--font-body); font-size: .76rem; color: var(--muted); margin-top: 6px; }
blockquote.pd mark { background: var(--orange-light); color: var(--orange-text); padding: 0 2px; border-radius: 2px; }
.cv-quote { font-size: .9rem; line-height: 1.45; padding: 8px 12px; box-shadow: var(--elevation-1); }
.cv-quote footer { font-size: .68rem; }
.cv .note, .cv .meta { font-size: .72rem; color: var(--muted); }
.cv .reading { font-size: .8rem; padding: 8px 12px; }
.cv-link { font-size: .78rem; }

/* 1 · the flu: tiles, the weekly chart, and the newspaper that zooms to its column */
.cv-grid.g-flu { grid-template-columns: minmax(0, 1fr) 226px; }
.paper { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 8px; box-shadow: var(--elevation-2); display: grid; gap: 8px; min-width: 0; }
.paper-view { position: relative; aspect-ratio: 614 / 901; overflow: hidden; border-radius: 4px; background: #ece4d4; }
.paper-view > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.paper .sheet, .cv-hocr .sheet { fill: #ece4d4; }
.paper .spot { fill: none; stroke: var(--orange); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.paper .locator { position: absolute; right: 6px; bottom: 6px; width: 46px; height: auto; aspect-ratio: 614 / 901; background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--elevation-1); }
.fly-btn { position: absolute; left: 6px; bottom: 6px; font: inherit; font-size: .68rem; font-weight: 600; color: var(--navy); background: rgba(255,253,248,.95); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 9px; cursor: pointer; }
.fly-btn:hover { border-color: var(--navy); }
.pages { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; font-size: .68rem; color: var(--muted); }
.pages .lbl { width: 100%; }
.pages .pg { width: 17px; height: 21px; border: 1px solid var(--line); border-radius: 2px; font-family: var(--font-mono); font-size: .6rem; display: grid; place-items: center; background: #fff; }
.pages .pg.yes { background: var(--orange); color: #fff; border-color: var(--orange); }
.pages b { margin-left: 4px; color: var(--orange-text); font-weight: 600; }
.paper figcaption { font-size: .72rem; line-height: 1.4; color: var(--ink-2); }
.cv-sub { display: block; margin-top: 4px; color: var(--ink); }
.cv-sub a.zoom { display: inline; }
.cv-sub a.zoom::after { content: none; }

/* 2 · book pages: the frontispiece, the manifest to scale, the words of a page */
.cv-grid.g-pages { grid-template-columns: 230px minmax(0, 1fr); }
.cv-plate .iiif { position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: .66rem; background: rgba(255,253,248,.95); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 1px 8px; }
.scanlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; font-size: .72rem; }
.scanlist li { display: grid; grid-template-columns: 2.6rem 3.6rem minmax(0, 1fr); gap: 6px; color: var(--ink-2); }
.scanlist code { font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scanlist li.hi { color: var(--orange-text); font-weight: 600; }
.cv-strip svg { max-height: 60px; }
.cv-strip .pgr { fill: #fff; stroke: var(--grey-bar); stroke-width: 1; }
.cv-strip .pick { fill: var(--orange); fill-opacity: .8; }
.cv-strip .pick.off { opacity: 0; }
.hocr { margin: 0; }
.hocr svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.hocr .w { fill: rgba(211,115,74,.10); stroke: rgba(211,115,74,.8); stroke-width: 1; cursor: help; }
.hocr .w:hover { fill: rgba(211,115,74,.35); stroke: var(--orange-text); stroke-width: 2; }
.cv-hocr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 8px; box-shadow: var(--elevation-1); }
.cv-hocr figcaption { font-size: .72rem; color: var(--ink-2); margin-top: 6px; }
.cv-grid.g-pages .cv-quote { font-size: .78rem; line-height: 1.4; }

/* 3 · borrow: the chain from ISBN to a scan, the two answers stamped, the early printings */
.cv-grid.g-borrow { grid-template-columns: minmax(0, 1fr) 200px; }
.chain { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chain li { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 7px 10px 7px 16px; display: grid; gap: 1px; min-width: 0; }
.chain li:first-child { border-radius: var(--radius-row) 0 0 var(--radius-row); }
.chain li:last-child { border-radius: 0 var(--radius-row) var(--radius-row) 0; background: #eef5ef; border-color: #9cc2a6; }
.chain li + li { border-left: 0; }
.chain li + li::before { content: "→"; position: absolute; left: -9px; top: 50%; transform: translateY(-50%); background: var(--paper); color: var(--orange-text); font-weight: 700; font-size: .9rem; line-height: 1; padding: 2px; border-radius: 50%; }
.chain span { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.chain b { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; overflow-wrap: anywhere; }
.chain i { font-style: normal; font-size: .72rem; color: var(--ink-2); }
.avail { display: grid; grid-template-columns: 1fr; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 10px 12px; box-shadow: var(--elevation-1); }
.avail.read { border-color: #9cc2a6; }
.avail h4 { font-size: .86rem; color: var(--navy); margin: 0 0 2px; }
.avail p { font-size: .78rem; color: var(--ink-2); }
.avail .stamp { justify-self: start; font-size: .82rem; padding: 3px 12px; font-weight: 600; white-space: normal; }
.avail:not(.off) .stamp { animation: stamp .5s var(--ease) both; }
.still .avail .stamp, .avail.off .stamp { animation: none; }
@keyframes stamp { from { transform: scale(1.7) rotate(-6deg); opacity: 0; } 60% { transform: scale(.95) rotate(-2deg); opacity: 1; } to { transform: none; } }
.early { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .74rem; }
.early li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 70px 4.8rem; gap: 8px; align-items: center; color: var(--ink-2); }
.early li.hi { color: var(--orange-text); font-weight: 600; }
.early .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.early svg { width: 70px; height: 8px; display: block; }
.early .num { text-align: right; font-variant-numeric: tabular-nums; }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .72rem; }
.blist li { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) 4.2rem; gap: 6px; align-items: center; color: var(--ink-2); }
.blist li.hi { color: var(--orange-text); font-weight: 600; }
.blist svg { width: 100%; height: 8px; display: block; }
.blist .num { text-align: right; font-variant-numeric: tabular-nums; }
.cv-plate.tall img { max-height: 420px; object-fit: contain; }

/* 4 · a website's history: the years, 2009 day by day, and four captures */
.cv-cdx .flag line { stroke: var(--navy); stroke-width: 1; stroke-dasharray: 2 2; }
.cv-cdx svg text.hi { font-size: 10px; }
.browsers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.browser { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; box-shadow: var(--elevation-1); min-width: 0; }
.browser .bar { display: flex; gap: 5px; align-items: center; padding: 4px 8px; background: var(--cream); border-bottom: 1px solid var(--soft); font-family: var(--font-mono); font-size: .64rem; color: var(--muted); }
.browser .bar i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--grey-bar); }
.browser .bar span { margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser .page { padding: 8px 12px; font-size: .84rem; min-height: 58px; display: grid; gap: 3px; align-content: start; }
.browser .gone { text-decoration: line-through; text-decoration-color: var(--orange); color: var(--muted); font-family: var(--font-display); font-size: 1.1rem; }
.browser .cap { font-size: .7rem; color: var(--muted); }
.browser.after .page { background: var(--orange-light); }
.browser .alert { color: #b0261b; font-weight: 700; font-family: var(--font-mono); font-size: .84rem; }
.browser.last { border-color: #e0a59e; }
.browser .nf { font-family: var(--font-display); font-size: 1rem; }
.browser.gone-page .page { background: var(--cream); }

/* 5 · TV news: the counts, the week line, the channels, and the launch on screen */
.cv-grid.g-tv { grid-template-columns: minmax(0, 1fr) 236px; }
.screen { background: #10151f; color: #f3efe6; border-radius: var(--radius-row); padding: 12px 14px; display: grid; gap: 7px; font-family: var(--font-mono); font-size: .74rem; line-height: 1.35; box-shadow: var(--elevation-2); border: 5px solid #262d3a; }
.screen .tag { justify-self: start; background: rgba(255,255,255,.12); color: #f3efe6; font-size: .64rem; }
.screen time { color: #f0b48f; margin-right: 6px; }
.screen .meta { font-family: var(--font-body); color: #c9cdd3; font-size: .72rem; }
.screen a { color: #fff; }
.screen .sx:nth-of-type(1) { transition-delay: .2s; } .screen .sx:nth-of-type(2) { transition-delay: .9s; } .screen .sx:nth-of-type(3) { transition-delay: 1.6s; }
.screen.off .sx { opacity: 0; transform: translateY(4px); transition-delay: 0s; }
.cv-events .timeline { padding-left: 16px; gap: 4px; }
.cv-events .timeline p { font-size: .72rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-events .timeline time { font-size: .64rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.timeline li { position: relative; display: grid; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--panel); border: 2px solid var(--grey-bar); }
.timeline li.hi::before { background: var(--orange); border-color: var(--orange); }
.timeline time { font-family: var(--font-mono); font-size: .68rem; color: var(--orange-text); }
.timeline p { font-size: .76rem; color: var(--ink); line-height: 1.35; }

/* 7 · a film's words: the film, its subtitle track, and a minute of it */
.film-head { display: grid; grid-template-columns: 160px minmax(0, 1fr) 230px; grid-template-areas: "still meta files" "still read read"; gap: 10px 12px; align-items: start; }
.film-head .still { grid-area: still; } .film-head .film-meta { grid-area: meta; } .film-head .files { grid-area: files; } .film-head .cv-read { grid-area: read; }
.film-head .reading { max-width: none; }
.cv-plate.still img { image-rendering: auto; }
.film-meta { display: grid; gap: 6px; }
.film-meta h3 { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.05; }
.film-meta h3 small { font-size: .55em; color: var(--muted); font-weight: 500; }
.film-meta p { font-size: .8rem; color: var(--ink-2); }
.film-meta .subs .pill { margin-left: 4px; }
.film-meta .stars { color: var(--orange-text); font-weight: 600; }
.cv-track svg .reel { fill: #fff; stroke: var(--line); }
.cv-srt { gap: 6px; padding-left: 14px; }
.cv-srt .cue { grid-template-columns: 4.4rem minmax(0, 1fr); gap: 10px; }
.cv-srt .cue p { font-size: .78rem; line-height: 1.38; }
.cv-read { display: grid; gap: 6px; }

/* 8 · two sources: what the machine heard beside what was printed */
.cv-grid.g-cmp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 9px 12px; display: grid; gap: 6px; align-content: start; box-shadow: var(--elevation-1); min-width: 0; }
.side h4 { font-family: var(--font-body); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sage-text); margin: 0; }
.who-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: center; font-size: .76rem; color: var(--ink-2); }
.cv-plate.disc { padding: 0; border: 0; background: none; box-shadow: none; }
.cv-plate.disc img { border-radius: 50%; box-shadow: var(--elevation-2); }
.playing .cv-plate.disc img { animation: spin 7s linear infinite; }
.cv-plate.pg { padding: 3px; max-width: 58px; }
.g-cmp .srt { gap: 5px; padding-left: 12px; }
.g-cmp .cue { grid-template-columns: 4.2rem minmax(0, 1fr); gap: 8px; }
.g-cmp .cue p { font-size: .76rem; line-height: 1.38; }
.g-cmp .printed { font-size: .8rem; line-height: 1.38; }
.cmp-foot { display: grid; gap: 7px; }
.meter { display: grid; gap: 4px; }
.meter p { font-size: .8rem; color: var(--ink-2); }
.meter b.num { font-family: var(--font-display); font-size: 1.35rem; color: var(--orange-text); margin-right: 4px; }
.meter svg { width: 100%; height: 12px; display: block; }
.meter .track-bg { fill: var(--soft); }
.cmp-foot audio { width: 100%; max-width: none; height: 36px; }
.cmp-foot .reading { font-size: .76rem; }

/* ——— Without scripts: every demo, whole, one under the other ——— */
@media (scripting: none) {
  .stage { height: auto; overflow: visible; border: 0; box-shadow: none; background: none; }
  .qs { border-bottom: 1px solid var(--line); border-radius: var(--radius-control); margin-bottom: var(--space-4); }
  .demo, .demo:not(.on) { display: grid; height: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--elevation-2); overflow: hidden; align-items: start; }
  .demo + .demo { margin-top: var(--space-5); }
  .log { overflow: visible; }
  .full { grid-template-rows: 1fr; }
  .args, .res { max-height: none; }
  .canvas { padding-top: 46px; }
  .cv-body { position: static; overflow: visible; }
  .cv-data { display: grid; gap: 10px; position: static; margin: 0 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-row); }
  .paper .locator, .q-tab .bar { display: none; }
}

/* ——— Phones and narrow windows: the canvas on top, the conversation under it ——— */
@media (max-width: 960px) {
  .qs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .q-tab { flex: 0 0 168px; scroll-snap-align: start; }
  .stage { height: auto; }
  .demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: 440px 500px; height: auto; }
  .canvas { order: -1; border-bottom: 1px solid var(--line); }
  .convo { border-right: 0; }
  .hud { right: 14px; }
  .cv-tools { top: auto; bottom: 8px; left: 10px; right: auto; max-width: calc(100% - 20px); padding: 4px; border-radius: var(--radius-pill); background: rgba(244,239,230,.92); box-shadow: var(--elevation-1); }
  .cv-body { padding-bottom: 48px; }
  .cv-grid.g-flu, .cv-grid.g-pages, .cv-grid.g-borrow, .cv-grid.g-tv, .cv-grid.g-cmp { grid-template-columns: minmax(0, 1fr); }
  .film-head { grid-template-columns: 140px minmax(0, 1fr); grid-template-areas: "still meta" "files files" "read read"; }
  .paper, .cv-plate.tall { max-width: 300px; }
  .cv-figs.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @media (scripting: none) {
    .demo { grid-template-rows: auto; }
    .canvas { position: relative; top: 0; }
  }
}
@media (max-width: 560px) {
  .cv-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-figs .cv-fig:first-child { grid-column: 1 / -1; }
  .cv-figs.four .cv-fig:first-child { grid-column: auto; }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain li, .chain li:first-child, .chain li:last-child { border-radius: 0; border-left: 1px solid var(--line); }
  .chain li + li::before { display: none; }
  .browsers { grid-template-columns: minmax(0, 1fr); }
  .film-head { grid-template-columns: 120px minmax(0, 1fr); }
  .film-meta h3 { font-size: 1.3rem; }
  .convo { padding: 12px 12px 8px; }
}

/* ——— Home page preview: a small stage, fixed in size ——— */
.teaser-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); height: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--elevation-2); overflow: hidden; }
.teaser-convo { display: grid; align-content: start; justify-items: start; gap: 10px; padding: 18px 18px 16px 20px; min-width: 0; border-right: 1px solid var(--line); }
.teaser-convo .ask-q { justify-self: stretch; }
.teaser-convo .log { overflow: visible; width: 100%; padding: 0; mask-image: none; }
.teaser-convo .btn { margin-top: 6px; }
.teaser-canvas { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; align-items: center; padding: 50px 18px 18px; background-color: var(--cream); background-image: radial-gradient(rgba(13,34,64,.07) 1px, transparent 1.2px); background-size: 16px 16px; min-width: 0; }
.teaser-canvas .hud { right: 14px; }
.teaser-canvas img { width: 130px; height: auto; border-radius: 6px; border: 1px solid var(--line); box-shadow: var(--elevation-1); }
.teaser-ans { display: grid; gap: 6px; justify-items: start; }
.teaser-ans p { font-size: .86rem; color: var(--ink-2); }
.teaser-ans .pill { white-space: normal; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .ask-teaser .log > li, .ask-teaser .teaser-canvas img, .ask-teaser .teaser-ans > * { opacity: 0; }
  .ask-teaser.go .log > li, .ask-teaser.go .teaser-canvas img, .ask-teaser.go .teaser-ans > * { animation: aa-in .5s var(--ease) forwards; }
  .ask-teaser.go .log > li:nth-child(1) { animation-delay: .5s; }
  .ask-teaser.go .log > li:nth-child(2) { animation-delay: 1.1s; }
  .ask-teaser.go .log > li:nth-child(3) { animation-delay: 1.7s; }
  .ask-teaser.go .teaser-canvas img { animation-delay: 2.2s; }
  .ask-teaser.go .teaser-ans > :nth-child(1), .ask-teaser.go .teaser-ans > :nth-child(2) { animation-delay: 1.3s; }
  .ask-teaser.go .teaser-ans > :nth-child(3), .ask-teaser.go .teaser-ans > :nth-child(4) { animation-delay: 2.4s; }
}
@media (max-width: 860px) {
  .teaser-stage { grid-template-columns: minmax(0, 1fr); height: auto; }
  .teaser-convo { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .teaser-canvas { grid-template-columns: 96px minmax(0, 1fr); }
  .teaser-canvas img { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .full, .res > *, .cv [data-at], .cv .sx, .cv svg .col rect, .cv svg .col circle { transition: none; }
  .st.enter, .avail .stamp, .playing .cv-plate.disc img { animation: none; }
}
