/* Parts shared by every lens: cards, badges, rows, tables, controls, the proof
   note, numbers and small charts, the states of a view, and "Ask". */

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card__body { padding: 18px 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.card__foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); }
.card__body > h2, .card__head > h2 { font-size: var(--fs); letter-spacing: -.01em; }
/* A head with the card's name, one line on what it shows, and a way to everything behind it. */
.card__head h2 { display: flex; align-items: center; gap: 8px; font-size: var(--fs); letter-spacing: -.01em; }
.card__head p { margin: 2px 0 0; }
/* The name and its line take the room; the link or the mark beside them stays on the first line. */
.card__head:has(> div) { flex-wrap: nowrap; align-items: flex-start; }
.card__head > div { flex: 1; min-width: 0; }
.card__head > .link-more, .card__head > .delta-chip { margin-top: 1px; }
.card__foot--note { gap: 8px; padding: 10px 16px; background: var(--surface-2); color: var(--ink-3); font-size: var(--fs-xs); }
.card__foot--note svg { flex: none; width: 14px; height: 14px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; white-space: nowrap; }
.link-more:hover { color: var(--accent); }
.link-more svg { width: 14px; height: 14px; transition: transform var(--t-2) var(--ease); }
.link-more:hover svg { transform: translateX(2px); }
.card__body > h2 + p, .card__body > h3 + p { margin-top: 6px; margin-bottom: 0; }
.card__body > h2 + .facts, .card__body > h3 + .facts { margin-top: 8px; }
.card__body > p:last-child { margin-bottom: 0; }

/* A name and its value on one line. */
.facts { margin: 0; }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { flex: none; max-width: 52%; color: var(--ink-3); }
.facts dd { min-width: 0; margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 500; font-variant-numeric: tabular-nums; }
/* In a wide column the values start at one line down the card instead of at its far edge. */
.facts--wide > div { justify-content: flex-start; }
.facts--wide dt { flex: 0 0 min(44%, 300px); max-width: none; }
.facts--wide dd { text-align: left; }

/* ---------- Badges: always an icon or a word, never colour alone ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px; font-size: var(--fs-xs); font-weight: 550; line-height: 1; white-space: nowrap; }
.badge svg { flex: none; width: 13px; height: 13px; }
.badge--error { background: var(--err-soft); border-color: var(--err-line); color: var(--err); }
.badge--warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.badge--info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.badge--ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.badge--new { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.badge--plain { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); font-weight: 500; }
/* The same meaning as a small square, where a row of words would be too loud. */
.sev { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid transparent; }
.sev svg { width: 15px; height: 15px; }
.sev--error { background: var(--err-soft); border-color: var(--err-line); color: var(--err); }
.sev--warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.sev--info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot--error { background: var(--err-mark); }
.dot--warning { background: var(--warn-mark); }
.dot--info { background: var(--info-mark); }
.dot--ok { background: var(--ok-mark); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok-mark) 22%, transparent); }
/* A state said in a word, with its icon: "Nothing found", "could not run". */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.status svg { flex: none; width: 14px; height: 14px; }
.status--ok { color: var(--ok); }
.status--err { color: var(--err); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: light-dark(rgb(16 16 32 / .07), rgb(255 255 255 / .1)); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Lists of things to open ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows.card { overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 12px 16px; color: inherit; text-decoration: none; transition: background-color var(--t-1) var(--ease); }
a.row:hover { background: var(--surface-2); }
a.row:focus-visible { outline-offset: -2px; border-radius: var(--r-sm); }
.row__title { font-weight: 550; overflow-wrap: anywhere; }
.row__meta { color: var(--ink-3); font-size: var(--fs-sm); }
.row__side { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.row__go { display: grid; color: var(--ink-3); opacity: 0; transform: translateX(-4px); transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease), color var(--t-2) var(--ease); }
.row__go svg { width: 16px; height: 16px; }
a.row:hover .row__go, a.row:focus-visible .row__go { opacity: 1; transform: none; color: var(--accent); }
@media (hover: none) { .row__go { opacity: .7; transform: none; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: inherit; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data th { padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); font-size: var(--fs-xs); font-weight: 550; text-align: left; white-space: nowrap; }
table.data td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr { transition: background-color var(--t-1) var(--ease); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data a { color: var(--ink); font-weight: 500; text-decoration: none; }
table.data a:hover { color: var(--accent); }

/* ---------- Controls ---------- */
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.input, .select { height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); font-size: var(--fs-sm); transition: border-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease); }
.input { flex: 1 1 260px; min-width: 0; }
.input::placeholder { color: var(--ink-3); }
.input:hover, .select:hover { border-color: light-dark(rgb(16 16 32 / .28), rgb(255 255 255 / .24)); }
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--accent-solid); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-solid) 24%, transparent); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
/* A search box: its icon, and the key that puts the caret in it. */
.field { position: relative; display: flex; flex: 1 1 280px; min-width: 0; }
.field > svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.field > .input { flex: 1; width: 100%; padding-left: 34px; padding-right: 36px; }
.field > kbd { position: absolute; right: 8px; top: 50%; translate: 0 -50%; pointer-events: none; transition: opacity var(--t-1) var(--ease); }
.field:focus-within > kbd { opacity: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r); background: var(--accent-solid); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 550; text-decoration: none; white-space: nowrap; box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 1px 2px rgb(40 40 120 / .28); transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease); }
.btn:hover { background: var(--accent-solid-hover); }
.btn:active { transform: scale(.97); }
.btn svg { flex: none; width: 15px; height: 15px; }
.btn--quiet { background: var(--surface); border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-1); }
.btn--quiet:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), color var(--t-1) var(--ease), transform var(--t-1) var(--ease); }
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip svg { width: 13px; height: 13px; }
/* The larger row of choices that filters a list. */
.seg--lg { padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.seg--lg button { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 7px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.seg--lg button[aria-pressed="true"] { font-weight: 600; }
.seg--lg .count { background: none; padding: 0; min-width: 0; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
.more { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Proof: the quiet reassurance, details on demand ---------- */
.proof { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1px solid var(--ok-line); border-radius: var(--r-lg); background: var(--ok-soft); font-size: var(--fs-sm); }
.proof > svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.proof > div { min-width: 0; flex: 1; }
.proof--plain { padding: 0; border: 0; background: none; }
.proof--warn { border-color: var(--warn-line); background: var(--warn-soft); }
.proof--warn > svg { color: var(--warn); }
.proof details { margin-top: 4px; }
.proof details > div { margin-top: 8px; }
.proof .facts { margin-top: 6px; }
details > summary { display: inline-flex; align-items: center; gap: 4px; width: fit-content; list-style: none; cursor: pointer; border-radius: var(--r-xs); color: var(--accent); font-weight: 500; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: rotate var(--t-2) var(--ease); }
details[open] > summary::before { rotate: 90deg; }
/* Where the browser can, what a disclosure holds slides open instead of appearing. */
@supports (interpolate-size: allow-keywords) {
  details { interpolate-size: allow-keywords; }
  details::details-content { block-size: 0; overflow-y: clip; opacity: 0; transition: block-size var(--t-3) var(--ease), opacity var(--t-3) var(--ease), content-visibility var(--t-3) allow-discrete; }
  details[open]::details-content { block-size: auto; opacity: 1; }
}
.hash { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0; overflow-wrap: anywhere; }

/* ---------- Numbers ---------- */
.stat { font-size: 2.75rem; font-weight: 600; line-height: 1.05; letter-spacing: -.045em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { min-width: 0; padding: 14px 20px 16px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi__label { display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 500; }
.kpi__value { margin-top: 2px; font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.kpi__note { color: var(--ink-3); font-size: var(--fs-xs); }
a.kpi { color: inherit; text-decoration: none; transition: background-color var(--t-1) var(--ease); }
/* Numbers as separate cards: each with its icon, its value (and of how many), and what it does not say. */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 16px; }
.tile { min-width: 0; padding: 16px 18px; }
.tile .kpi__label { padding-right: 26px; font-size: var(--fs-sm); }
.tile__icon { position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; color: var(--ink-3); }
.tile .kpi__value { margin-top: 8px; font-size: 1.75rem; }
.kpi__value small { color: var(--ink-3); font-size: .55em; font-weight: 500; letter-spacing: 0; }
.tile .kpi__note { margin-top: 4px; line-height: 1.45; }
a.kpi:hover { background: var(--surface-2); }
.delta-chip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta-chip svg { width: 12px; height: 12px; stroke-width: 2.6; }
.delta-chip--bad { background: var(--err-soft); color: var(--err); }
.delta-chip--good { background: var(--ok-soft); color: var(--ok); }

/* ---------- States of a view ---------- */
.state { display: grid; justify-items: center; gap: 4px; padding: 56px 20px; text-align: center; color: var(--ink-2); }
.state h2 { font-size: var(--fs-md); }
.state p { max-width: 48ch; margin: 0; color: var(--ink-3); font-size: var(--fs-sm); }
.state > svg { box-sizing: content-box; width: 20px; height: 20px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-3); box-shadow: var(--shadow-1); }
.state > .btn { margin-top: 12px; }
.state--loading { grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; padding: 28px 20px; }
.state--loading h2 { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent-solid); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* The shape of a page while it is fetched: grey blocks where its parts will be. */
.skel { display: grid; gap: 14px; padding-top: 14px; }
.skel__bar, .skel__block { border-radius: var(--r); background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 45%, var(--surface-2) 60%) 0 0 / 300% 100%; animation: shimmer 1.5s linear infinite; }
.skel__bar { height: 14px; }
.skel__bar:nth-child(1) { width: 34%; height: 26px; }
.skel__bar:nth-child(2) { width: 62%; }
.skel__bar:nth-child(3) { width: 48%; margin-bottom: 10px; }
.skel__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 352px); gap: 24px 28px; }
.skel__block { height: 280px; border-radius: var(--r-lg); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (max-width: 900px) { .skel__cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Charts (inline SVG) ---------- */
.chart-box { position: relative; min-height: var(--chart-h, 172px); }
.chart { display: block; overflow: visible; }
.chart:focus-visible { outline-offset: 4px; border-radius: var(--r); }
.chart text { font: 500 10.5px var(--sans); letter-spacing: 0; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area-top { stop-color: var(--series); stop-opacity: .2; }
.chart .area-end { stop-color: var(--series); stop-opacity: 0; }
.chart .dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--line-2); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart-tip { position: absolute; z-index: 5; padding: 6px 9px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-pop); font-size: var(--fs-xs); white-space: nowrap; pointer-events: none; translate: -50% calc(-100% - 12px); transition: left var(--t-1) var(--ease), top var(--t-1) var(--ease), opacity var(--t-1) var(--ease); }
.chart-tip strong { display: block; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--ink-3); }
.chart-tip[hidden] { display: block !important; opacity: 0; }
.chart-table { margin: 8px 0 0; font-size: var(--fs-sm); }
.chart-table table { margin-top: 8px; }
/* A share of the largest value as a thin bar; its number is printed beside it. */
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--series-track); overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--share, 0) * 100%); border-radius: 3px; background: var(--series); transition: width .6s var(--ease); }
@starting-style { .bar > span { width: 0; } }
/* One whole split into its parts. The legend under it carries the names and the numbers. */
.split { display: flex; gap: 2px; height: 8px; }
.split > span { flex: var(--part, 1) 1 0; min-width: 3px; background: var(--ink-3); transition: flex-grow .6s var(--ease); }
.split > span:first-child { border-radius: 4px 0 0 4px; }
.split > span:last-child { border-radius: 0 4px 4px 0; }
.split > span:only-child { border-radius: 4px; }
.split > .split--error { background: var(--err-mark); }
.split > .split--warning { background: var(--warn-mark); }
.split > .split--info { background: var(--info-mark); }
@starting-style { .split > span { flex-grow: 1; } }
.legend { list-style: none; margin: 12px 0 0; padding: 0; }
.legend li + li { border-top: 1px solid var(--line); }
.legend a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; margin: 0 -6px; border-radius: var(--r-sm); color: inherit; font-size: var(--fs-sm); text-decoration: none; transition: background-color var(--t-1) var(--ease); }
.legend a:hover { background: var(--surface-2); }
.legend strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend .muted { min-width: 4ch; text-align: right; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

/* ---------- Ask ---------- */
.ask { max-width: 820px; }
.ask .page-head { margin-top: 28px; text-align: center; }
.ask .page-head .lede { margin-inline: auto; }
.ask__mark { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px; background: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 6px 18px -6px rgb(91 91 214 / .7); }
.ask__mark svg { width: 20px; height: 20px; }
/* The box glows in the brand's colours; the glow turns while an answer is on its way. */
.ask__box { position: relative; isolation: isolate; border-radius: 16px; }
.ask__box::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: 17px; background: conic-gradient(from var(--turn, 140deg), #8b6cf6, #38a8f0, #5b5bd6, #c06cf6, #8b6cf6); opacity: 0; transition: opacity var(--t-3) var(--ease); }
.ask__box::after { content: ""; position: absolute; inset: 8px; z-index: -2; border-radius: 20px; background: conic-gradient(from var(--turn, 140deg), #8b6cf6, #38a8f0, #5b5bd6, #c06cf6, #8b6cf6); opacity: 0; filter: blur(24px); transition: opacity var(--t-3) var(--ease); }
.ask__form { position: relative; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-2); transition: box-shadow var(--t-2) var(--ease); }
.ask__box:focus-within .ask__form { box-shadow: 0 0 0 1px transparent, var(--shadow-2); }
.ask__box:focus-within::before { opacity: 1; }
.ask__box:focus-within::after { opacity: .28; }
.ask__box[data-busy]::before { opacity: 1; animation: turn 2.4s linear infinite; }
.ask__box[data-busy]::after { opacity: .4; animation: turn 2.4s linear infinite; }
@property --turn { syntax: "<angle>"; inherits: false; initial-value: 140deg; }
@keyframes turn { to { --turn: 500deg; } }
.ask__input { display: block; width: 100%; min-height: 76px; max-height: 240px; padding: 16px 18px 4px; border: 0; border-radius: 16px 16px 0 0; background: transparent; resize: none; field-sizing: content; font-size: var(--fs-md); line-height: 1.55; outline: none; }
.ask__input::placeholder { color: var(--ink-3); }
.ask__actions { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px 18px; }
.ask__actions .muted { flex: 1; min-width: 0; font-size: var(--fs-xs); }
.ask__send { width: 34px; padding: 0; border-radius: 10px; }
.ask__send svg { width: 16px; height: 16px; stroke-width: 2.4; }
.ask__hint { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }
.ask__examples { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.ask__examples .chip { text-align: left; }
.ask__result { margin-top: 28px; }
.ask__wait { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.ask__wait .muted { margin-left: auto; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
/* Words that light up from left to right while the model works. */
.shine { background: linear-gradient(100deg, var(--ink-3) 35%, var(--ink) 50%, var(--ink-3) 65%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; animation: shimmer 1.8s linear infinite; }
.ask__answer > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 550; letter-spacing: 0; }
.ask__answer > h2 svg { width: 15px; height: 15px; color: var(--accent); }
.ask__answer p, .ask__answer li { max-width: 70ch; font-size: var(--fs-md); line-height: 1.65; }
.ask__answer ul { margin: 0 0 12px; padding-left: 20px; }
.ask__answer li + li { margin-top: 4px; }
.ask__answer li::marker { color: var(--ink-3); }
.ask__answer .small { font-size: var(--fs-xs); }
.ask__unanswered { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border: 1px solid var(--warn-line); border-radius: var(--r); background: var(--warn-soft); }
.ask__unanswered svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--warn); }
.ask__cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: var(--fs-2xs); font-weight: 650; font-variant-numeric: tabular-nums; }
.ask__sources .row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; padding: 10px 14px; }
.ask__sources .row__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ask__sources .row__go { align-self: center; }
.ask__sent > p { margin-top: 10px; }
.ask__sent ul { margin: 12px 0 0; padding-left: 20px; }
.ask__sent li + li { margin-top: 10px; }
.ask__sent li > div { overflow-wrap: anywhere; }
.ask__overview { max-height: 260px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); white-space: pre-wrap; font-size: 12px; }
.ask__off { max-width: 560px; margin: 0 auto; text-align: center; }

/* ---------- A stored item, as it is ---------- */
pre.raw { max-height: 70vh; margin: 0; padding: 16px 18px; overflow: auto; font: 12.5px/1.6 var(--mono); letter-spacing: 0; white-space: pre; tab-size: 2; }

/* ---------- Light that follows the pointer over a card ---------- */
.spot { isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: -1px; z-index: 1; padding: 1px; border-radius: inherit; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--accent-solid) 75%, transparent), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity var(--t-3) var(--ease); pointer-events: none; }
.spot::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--accent-solid) 9%, transparent), transparent 70%); opacity: 0; transition: opacity var(--t-3) var(--ease); pointer-events: none; }
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- Arriving ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
main[data-enter] > * { animation: rise .36s var(--ease) backwards; }
main[data-enter] .rows > li:nth-child(-n+6) { animation: rise .32s var(--ease) backwards; }
main[data-enter] .rows > li:nth-child(2) { animation-delay: 30ms; }
main[data-enter] .rows > li:nth-child(3) { animation-delay: 60ms; }
main[data-enter] .rows > li:nth-child(4) { animation-delay: 90ms; }
main[data-enter] .rows > li:nth-child(5) { animation-delay: 120ms; }
main[data-enter] .rows > li:nth-child(6) { animation-delay: 150ms; }
/* A chart draws its line once, the first time it is shown. */
.chart .line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.chart--draw .line { animation: draw .9s var(--ease) backwards; }
.chart--draw .area, .chart--draw .dot--end { animation: fade .5s .45s var(--ease) backwards; }
@keyframes draw { from { stroke-dashoffset: 1; } }

@media (max-width: 900px) {
  .card__body { padding: 16px; }
  .card__head, .row { padding-left: 16px; padding-right: 16px; }
  .stat { font-size: 2.25rem; }
  .kpi { padding: 12px 16px 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile .kpi__value { font-size: 1.4rem; }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ask .page-head { margin-top: 12px; }
  .ask__hint { display: none; }
}
@media (max-width: 560px) {
  /* Four choices do not fit in one row on a phone: two rows of two. */
  .seg--lg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .seg--lg button { justify-content: center; }
}

/* For a reader who asked for less motion: nothing moves, things simply change. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .spot::before, .spot::after { display: none; }
  main[data-enter] > *, main[data-enter] .rows > li { animation: none; }
}
