/* Axon Hub — continuous tracking (contract v1 §7): the tracked call's page (`th-`, views/thesis.js), the "Tracking now"
   board on Track (`tk-now`, `tk-th`, views/track.js), the "Track this" card on an assessment (`th-ctl`) and the line on
   a story that moved a tracked call (`n-tracked`, views/article.js). Tokens from base.css; loaded after research.css.
   The engine is the accent line, the market the ink line, the rolling start a dashed grey line; up is blue and down
   orange, always with an arrow or a sign. */

/* ------------------------------------------------------------------ the page */
.th-page { max-width: 1080px; }
.th-head { padding: 4px 0 18px; }
.th-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.th-head-top .n-back { margin: 0 0 0 -4px; }
.th-head-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.th-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--fs-small); color: var(--ink-3); margin-bottom: 10px; }
.th-due { display: inline-flex; align-items: center; gap: 6px; }
.th-due svg { width: 13px; height: 13px; }
.th-q-link { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-small); }
.th-q-link svg { width: 13px; height: 13px; }
.th-title { font-size: var(--fs-title); letter-spacing: -0.025em; line-height: 1.2; max-width: 30ch; overflow-wrap: anywhere; }
:lang(zh) .th-title, .th-title:lang(zh) { letter-spacing: 0; }
.th-status { height: 22px; }
.th-page > * + * { margin-top: 16px; }
.th-page .card { padding: 22px 24px; }
.th-advice { margin-top: 16px; }
.th-since { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 16px; background: var(--accent-wash); color: var(--ink); font-size: var(--fs-small); line-height: 1.5; }
.th-since svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent-ink); }
.th-starting p { display: flex; align-items: center; gap: 8px; color: var(--ink-2); margin-bottom: 8px; }

/* the headline: the engine (big) beside the market (a reference) */
.th-figs { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px 32px; align-items: start; }
.th-fig { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.th-fig-l { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.th-fig-engine .th-fig-l { color: var(--accent-ink); }
.th-ref { font-weight: 500; color: var(--ink-4); }
.th-big { font-size: var(--fs-hero); font-weight: 650; letter-spacing: -0.035em; line-height: 0.95; color: var(--ink); }
.th-big small, .th-mid small { font-size: 0.42em; font-weight: 600; color: var(--ink-3); margin-left: 2px; letter-spacing: 0; }
.th-mid { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--ink-2); }
.th-start-l { font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.th-d24 { display: inline-flex; align-items: center; gap: 6px; }
.th-pp { height: 22px; padding: 0 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.th-pp svg { width: 11px; height: 11px; stroke-width: 2; }
.th-venue { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: var(--fs-small); color: var(--ink-2); max-width: 100%; }
.th-venue:hover { color: var(--ink); }
.th-venue-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.th-venue svg { width: 13px; height: 13px; flex: none; color: var(--ink-3); }
.th-inv { display: inline-flex; gap: 6px; align-items: flex-start; }
.th-inv svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.th-gap-row { margin-top: 4px; }
.th-resolved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.th-result { color: var(--ink); font-weight: 650; }
.th-gap { height: 26px; padding: 0 11px; font-size: 13px; background: var(--wash-2); color: var(--ink-2); }
.th-gap b { font-weight: 700; color: var(--ink); margin: 0 1px; }
.th-gap.is-up b { color: var(--yes-ink); }
.th-gap.is-down b { color: var(--no-ink); }
.th-fig-market.is-none { justify-content: center; min-height: 100%; }
.th-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.th-flags .pill { height: auto; min-height: 22px; padding: 3px 9px; white-space: normal; line-height: 1.35; }
.th-reask { margin-top: 14px; align-items: center; flex-wrap: wrap; }

/* the chart: lines in SVG (stretched, strokes kept), stories and jumps as buttons laid over it */
.th-chart-card .card-head { margin-bottom: 10px; }
.th-chart { position: relative; height: 260px; }
.th-plot { position: absolute; left: 0; right: 52px; top: 10px; bottom: 26px; }
.th-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.th-grid { stroke: var(--hair-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.th-l-engine, .th-l-market, .th-l-start { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.th-l-engine { stroke: var(--accent); stroke-width: 2.4; }
.th-l-market { stroke: var(--ink-2); stroke-width: 1.5; }
.th-l-start { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 4 4; }
.th-bands, .th-dots { position: absolute; inset: 0; pointer-events: none; }
.th-band {
  position: absolute; top: 0; bottom: 0; min-width: 6px; padding: 0; border: 0; border-radius: 6px; pointer-events: auto;
  background: color-mix(in srgb, var(--ink-3) 16%, transparent); transition: background var(--t-1) var(--ease);
}
.th-band::after { content: ""; position: absolute; top: 0; bottom: 0; left: -10px; right: -10px; }
.th-band.is-attributed { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.th-band.is-partially_attributed { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.th-band.is-unattributed { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink-3) 22%, transparent) 0 3px, transparent 3px 7px); }
.th-band.is-noise { background: color-mix(in srgb, var(--ink-4) 10%, transparent); }
.th-band.is-not_read { background: color-mix(in srgb, var(--ink-3) 14%, transparent); }
.th-band.is-pending { background: color-mix(in srgb, var(--ink-3) 14%, transparent); }
.th-band:hover { background-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.th-dot {
  position: absolute; transform: translate(-50%, -50%); padding: 0; border-radius: 50%; pointer-events: auto; cursor: pointer;
  border: 2px solid var(--s1); background: var(--ink-3); box-shadow: 0 0 0 1px var(--hair-2);
  transition: transform var(--t-1) var(--ease);
}
.th-dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.th-dot.is-up { background: var(--yes); }
.th-dot.is-down { background: var(--no); }
.th-dot:hover { transform: translate(-50%, -50%) scale(1.15); }
.th-yax { position: absolute; right: 0; top: 10px; bottom: 26px; width: 48px; }
.th-yax > span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.th-yax .th-end { right: -2px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; z-index: 1; }
.th-end-e { background: var(--accent); color: var(--on-accent); }
.th-end-m { background: var(--s3); color: var(--ink); }
.th-end-m.is-above { transform: translateY(-115%); }
.th-end-m.is-below { transform: translateY(15%); }
.th-xax { position: absolute; left: 0; right: 52px; bottom: 0; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-4); }
.th-chart-wait { padding: 30px 0 12px; }
.th-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: var(--fs-cap); color: var(--ink-3); }
.th-legend li { display: inline-flex; align-items: center; gap: 7px; }
.th-legend i { display: inline-block; flex: none; }
.lg-engine { width: 16px; height: 2.5px; border-radius: 2px; background: var(--accent); }
.lg-market { width: 16px; height: 1.5px; border-radius: 2px; background: var(--ink-2); }
.lg-start { width: 16px; height: 0; border-top: 1.5px dashed var(--ink-3); }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(90deg, var(--yes) 50%, var(--no) 50%); }
.lg-band { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* why Axon differs: a waterfall on a shared, zoomed 0–100 scale */
.th-why-head { flex-direction: column; align-items: flex-start; gap: 4px; }
.th-wf { display: flex; flex-direction: column; }
.th-wf-market { margin-top: 10px; padding-top: 10px; box-shadow: inset 0 0.5px 0 var(--hair-2); }
.th-wf-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 128px; gap: 6px 16px; align-items: center; padding: 7px 0; }
.th-wf-label { min-width: 0; font-size: var(--fs-small); color: var(--ink-2); line-height: 1.4; }
.th-wf-name { display: flex; flex-direction: column; min-width: 0; }
.th-wf-link { color: var(--ink); font-weight: 550; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
a.th-wf-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.th-ext { width: 11px; height: 11px; margin-left: 4px; vertical-align: -1px; color: var(--ink-3); }
.th-wf-more { font-size: var(--fs-cap); color: var(--ink-3); }
.th-wf-strong { font-weight: 650; color: var(--ink); }
.th-wf-track { position: relative; height: 20px; }
.th-wf-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--hair-2); }
.th-wf-bar { position: absolute; top: 5px; height: 10px; min-width: 2px; border-radius: 3px; background: var(--ink-4); }
.th-wf-bar.is-up { background: var(--yes); }
.th-wf-bar.is-down { background: var(--no); }
.th-wf-mark { position: absolute; top: 1px; width: 3px; height: 18px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-3); }
.th-wf-mark.is-engine { background: var(--accent); }
.th-wf-mark.is-market { background: var(--ink); }
.th-wf-num { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; font-size: var(--fs-small); white-space: nowrap; }
.th-wf-d { font-weight: 650; }
.th-wf-d.is-up { color: var(--yes-ink); }
.th-wf-d.is-down { color: var(--no-ink); }
.th-wf-d.is-flat { color: var(--ink-3); }
.th-wf-v { color: var(--ink-2); min-width: 46px; text-align: right; }
.th-wf-row.is-ends .th-wf-v { color: var(--ink); font-weight: 650; }
.th-wf-row.is-engine .th-wf-v { color: var(--accent-ink); }
.th-wf-sum { margin-top: 14px; font-size: var(--fs-body); font-weight: 550; line-height: 1.55; }

/* evidence, field data, jumps */
/* the page in reading order: one column on phones and tablets; the wide layout is at the end of this file */
.th-grid, .th-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.th-ev-list > li + li { box-shadow: inset 0 0.5px 0 var(--hair-2); }
.th-ev { padding: 14px 8px; margin: 0 -8px; border-radius: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.th-ev.is-flash { animation: n-flash 1.6s var(--ease); }
.th-ev.is-uncounted .th-ev-title { color: var(--ink-2); }
.th-ev-top { display: flex; align-items: center; gap: 8px; font-size: var(--fs-cap); color: var(--ink-3); min-width: 0; }
.th-ev-pub { font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.th-tier { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 10.5px; font-weight: 750; background: var(--s3); color: var(--ink-2); flex: none; }
.th-tier.tier-a { background: var(--accent-wash); color: var(--accent-ink); }
.th-ev-title { font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; color: var(--ink); }
a.th-ev-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.th-ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--fs-small); }
.th-ev-meta .pill { height: 22px; }
.th-ev-n { font-weight: 600; }
.th-ev-why { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.55; }
.th-ev-n.is-up { color: var(--yes-ink); }
.th-ev-n.is-down { color: var(--no-ink); }
.th-ev.is-older { opacity: 0.78; }
/* an item's reason, folded under its meta line */
.th-ev-more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-cap); font-weight: 600; color: var(--ink-3); padding: 2px 4px 2px 0; }
.th-ev-more > summary::-webkit-details-marker { display: none; }
.th-ev-more > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--t-1) var(--ease); }
.th-ev-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.th-ev-more > summary:hover { color: var(--ink); }
.th-ev-more > p { margin-top: 6px; }
.th-jump-list > li + li { box-shadow: inset 0 0.5px 0 var(--hair-2); }
.th-jump { padding: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.th-jump-sheet { padding-top: 0; }
.th-jump-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.th-jump-move { font-weight: 650; }
.th-verdict { height: 22px; }
.th-verdict.is-attributed { background: var(--accent-wash); color: var(--accent-ink); }
.th-verdict.is-partially_attributed { background: var(--accent-wash); color: var(--accent-ink); opacity: 0.85; }
.th-verdict.is-unattributed, .th-verdict.is-not_read, .th-verdict.is-noise, .th-verdict.is-pending { background: var(--wash-2); color: var(--ink-2); }
.th-jump-text { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.55; }
.th-jump-cites ul { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; font-size: var(--fs-small); }

/* notifications and the author's lines */
.th-toggles { display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-small); }
.th-rules { margin-top: 18px; padding-top: 16px; box-shadow: inset 0 0.5px 0 var(--hair-2); }
.th-rules-h { font-size: var(--fs-small); font-weight: 600; margin-bottom: 8px; }
.th-rule-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.th-rule { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); padding: 2px 0 2px 2px; }
.th-rule > svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.th-rule .icon-btn { width: 32px; height: 32px; }
.th-rule-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.th-rule-dir { flex: 1 1 140px; min-width: 0; height: 36px; }
.th-rule-pwrap { display: inline-flex; align-items: center; gap: 6px; }
.th-rule-p { width: 76px; height: 36px; }
.th-rule-err:empty { display: none; }
.th-rule-err { margin-top: 8px; font-size: var(--fs-small); color: var(--crit); }
.th-recent { margin-top: 18px; padding-top: 14px; box-shadow: inset 0 0.5px 0 var(--hair-2); }
.th-recent-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; font-size: var(--fs-small); color: var(--ink-2); }

/* the result, the seal */
.th-settled-h { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lead); margin-bottom: 8px; }
.th-settled-h svg { width: 18px; height: 18px; color: var(--accent-ink); }
.th-brier { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 8px 0 0; }
.th-brier dt { font-size: var(--fs-cap); color: var(--ink-3); }
.th-brier dd { margin: 2px 0 0; font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.th-integrity { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 4px 0; box-shadow: inset 0 0.5px 0 var(--hair-2); }
.th-integrity .cap { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.th-integrity .cap svg { width: 13px; height: 13px; flex: none; }
.th-integrity-act { display: flex; flex-wrap: wrap; gap: 8px; }
.th-verify-out { width: 100%; font-size: var(--fs-small); color: var(--ink-2); }
.th-verify-out:empty { display: none; }
.th-verify-out.is-ok { color: var(--ok); }
.th-verify-out.is-bad { color: var(--crit); }

/* ------------------------------------------------------------------ "Track this" on an assessment, the limit sheet */
.th-ctl { margin-top: 16px; }
.th-ctl-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.th-ctl-row > .grow { flex: 1 1 220px; }
.th-ctl-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); flex: none; }
.th-ctl-icon svg { width: 20px; height: 20px; }
.th-ctl-title { font-size: var(--fs-body); font-weight: 650; }
.th-ctl-lede { font-size: var(--fs-small); color: var(--ink-3); margin-top: 2px; }
.th-ctl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.th-ctl-past { max-width: 32ch; }
.th-ctl .th-advice { margin-top: 14px; }
.th-limit-list { margin: 12px 0 4px; }
.th-limit-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.th-limit-row.is-stopped { opacity: 0.6; }
.th-limit-q { font-weight: 600; font-size: var(--fs-small); line-height: 1.45; overflow-wrap: anywhere; }
.th-limit-act { flex: none; }

/* ------------------------------------------------------------------ Track: "Tracking now (n/5)" */
.tk-now { margin-bottom: 26px; }
.tk-now-h { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lead); letter-spacing: -0.015em; margin-bottom: 12px; }
.tk-now-h svg { width: 18px; height: 18px; color: var(--accent-ink); }
.tk-now .th-advice { margin-top: 10px; }
.tk-th-list > li + li > .tk-th { box-shadow: 0 -0.5px 0 var(--hair-2); }
.tk-th {
  display: grid; grid-template-columns: minmax(0, 1fr) 130px 170px; gap: 20px; align-items: center;
  padding: 16px 12px; margin: 0 -12px; border-radius: 16px; color: var(--ink); min-width: 0; transition: background var(--t-1) var(--ease);
}
.tk-th:hover { background: var(--s2); }
.tk-th-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tk-th-title { display: flex; align-items: baseline; gap: 10px; font-size: 15.5px; font-weight: 600; line-height: 1.4; min-width: 0; }
.tk-th-q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.tk-th-new { flex: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.tk-th-track { padding-left: 0; }
.tk-th-start { white-space: normal; }
.tk-th-last { font-size: var(--fs-small); color: var(--ink-2); display: flex; gap: 2px; min-width: 0; }
.tk-th-last-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tk-th-last-pp { flex: none; font-weight: 650; }
.tk-th-spark { min-width: 0; }
.th-spark { display: block; width: 100%; height: 36px; overflow: visible; }
.th-spark-e { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.th-spark-m { fill: none; stroke: var(--ink-3); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.th-spark-d { fill: var(--accent); }
.tk-th-figs { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; min-width: 0; }
.tk-th-l { font-size: 11px; font-weight: 650; color: var(--accent-ink); }
/* a price from an earlier day carries its date: the label wraps inside its column, never over the sparkline */
.tk-th-mkt { font-size: var(--fs-cap); color: var(--ink-3); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; column-gap: 4px; max-width: 100%; }
.tk-th-mkt b { color: var(--ink); font-weight: 650; white-space: nowrap; }
.tk-th-figs .th-gap { height: 22px; padding: 0 8px; font-size: 12px; }
.tk-th-result { white-space: normal; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tk-th-brier { font-size: 11px; color: var(--ink-3); }
.tk-past-h { font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); margin: 14px 0 4px; padding-top: 12px; box-shadow: inset 0 0.5px 0 var(--hair-2); }
.tk-th-list:first-child + .tk-past-h, .tk-now-board > .tk-past-h:first-child { box-shadow: none; padding-top: 0; margin-top: 4px; }
.tk-past .tk-th { opacity: 0.78; }
.tk-past .tk-th:hover { opacity: 1; }
.tk-past .rs-p { font-size: 22px; }
.tk-tracking svg { width: 11px; height: 11px; }
/* a frozen track's source line may carry an "original in …" note: it wraps under the label on a phone, never past it */
.tk-ex-row .tk-live { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
.tk-ex-orig { flex: none; align-self: center; font-size: 11px; font-weight: 500; color: var(--ink-4); padding: 1px 6px; border-radius: 999px; background: var(--wash); white-space: nowrap; }

/* ------------------------------------------------------------------ a story that moved a tracked call */
.n-tracked { margin: 12px 0 4px; }
.n-tracked ul { display: flex; flex-direction: column; gap: 6px; }
.n-tracked-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--accent-wash); color: var(--ink); font-size: var(--fs-small); }
.n-tracked-row:hover { filter: brightness(1.08); }
.n-tracked-row > svg { width: 16px; height: 16px; flex: none; color: var(--accent-ink); }
.n-tracked-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.n-tracked-t b { font-weight: 700; }
.n-tracked-q { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-tracked .th-advice { margin-top: 8px; padding: 8px 12px; font-size: var(--fs-cap); }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 760px) {
  .th-page .card { padding: 18px 16px; }
  .th-title { font-size: 24px; }
  .th-figs { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .th-big { font-size: 52px; }
  .th-mid { font-size: 32px; }
  .th-chart { height: 210px; }
  .th-wf-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label num" "track track"; gap: 4px 12px; padding: 8px 0; }
  .th-wf-label { grid-area: label; }
  .th-wf-num { grid-area: num; }
  .th-wf-track { grid-area: track; height: 14px; }
  .th-wf-bar { top: 3px; height: 8px; }
  .th-wf-mark { top: 0; height: 14px; }
  .tk-th { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "spark figs"; gap: 12px 16px; padding: 14px 10px; margin: 0 -10px; }
  .tk-th-main { grid-area: main; }
  .tk-th-figs { grid-area: figs; align-self: end; }
  .tk-th-spark { grid-area: spark; align-self: end; }
  .th-spark { height: 28px; }
  .th-head-top { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .th-head-act .btn { padding: 0 10px; }
  .th-rule-dir { flex-basis: 100%; }
  .th-integrity-act { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .th-ev.is-flash { animation: none; background: var(--accent-wash); }
  .th-dot, .th-band, .th-ev-more > summary::after, .evg-sum::before { transition: none; }
  .th-dot:hover { transform: translate(-50%, -50%); }
}
@media (forced-colors: active) {
  .th-l-engine { stroke: Highlight; }
  .th-l-market, .th-l-start { stroke: CanvasText; }
  .th-dot, .th-band { forced-color-adjust: none; border: 1px solid CanvasText; }
  .th-wf-bar, .th-wf-mark { forced-color-adjust: none; background: CanvasText; }
}

/* ---------------------------------------------------------------- the crosshair (views/trackkit.js) */
/* a pointer, a dragged finger or the arrow keys stop at one moment and read every line there */
.ck-plot { touch-action: pan-y; cursor: crosshair; outline: none; border-radius: 6px; }
.ck-plot:focus-visible { box-shadow: 0 0 0 2px var(--accent-wash), 0 0 0 1px var(--accent); }
.ck { position: absolute; inset: 0; pointer-events: none; }
.ck-x { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1px dashed var(--ink-3); }
.ck-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ink-2); box-shadow: 0 0 0 2px var(--s1); }
.ck-dot.is-engine, .ck-dot.is-reading { background: var(--accent); }
.ck-dot.is-market { background: var(--ink-2); }
.ck-dot.is-start { background: var(--s1); box-shadow: 0 0 0 1.5px var(--ink-3); }
.ck-tip {
  position: absolute; top: 2px; z-index: 3; pointer-events: none; min-width: 168px; max-width: min(280px, 80vw);
  padding: 9px 11px; border-radius: 12px; background: var(--s1); box-shadow: var(--shadow-float), inset 0 0 0 0.5px var(--hair-2);
  font-size: 12.5px; line-height: 1.45; display: flex; flex-direction: column; gap: 3px;
}
.ck[hidden], .ck-tip[hidden], .ck-dot[hidden] { display: none; }
.ck-time { font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.ck-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.ck-row b { font-weight: 700; min-width: 46px; color: var(--ink); }
.ck-row span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.ck-sw { flex: none; width: 12px; height: 3px; border-radius: 2px; background: transparent; }
.ck-sw.is-engine, .ck-sw.is-reading { background: var(--accent); }
.ck-sw.is-market { background: var(--ink-2); height: 2px; }
.ck-sw.is-start { height: 0; border-top: 1.5px dashed var(--ink-3); }
.ck-gap b.is-up { color: var(--yes-ink); }
.ck-gap b.is-down { color: var(--no-ink); }
.ck-near-h { margin-top: 5px; padding-top: 6px; box-shadow: inset 0 0.5px 0 var(--hair-2); font-size: 11px; font-weight: 600; color: var(--ink-3); }
.ck-ev { display: flex; gap: 7px; color: var(--ink-2); white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ck-evd { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; margin: 0 6px 1px 0; background: var(--ink-3); }
.ck-evd.is-up { background: var(--yes); }
.ck-evd.is-down { background: var(--no); }

/* ---------------------------------------------------------------- evidence in folded groups */
.evg-wrap { display: flex; flex-direction: column; gap: 8px; }
.evg { border-radius: 14px; background: var(--wash); }
.evg-sum { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 14px; min-width: 0; }
.evg-sum::-webkit-details-marker { display: none; }
.evg-sum::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(-45deg); transition: transform var(--t-1) var(--ease); margin-right: 2px; }
.evg[open] > .evg-sum::before { transform: rotate(45deg); }
.evg-sum:hover { background: var(--wash); }
.evg-sum:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-wash); }
.evg-mark { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.evg-mark.is-up { background: var(--yes); }
.evg-mark.is-down { background: var(--no); }
.evg-mark.is-neutral { background: var(--ink-3); }
.evg-name { font-size: var(--fs-small); font-weight: 650; color: var(--ink); }
.evg-total { margin-left: auto; font-size: var(--fs-small); font-weight: 700; }
.evg-total.is-up { color: var(--yes-ink); }
.evg-total.is-down { color: var(--no-ink); }
.evg-list { padding: 0 14px; }
.evg .th-ev { margin: 0 -6px; padding: 12px 6px; }
.evg .th-ev-list > li + li { box-shadow: none; border-top: 0.5px solid var(--hair-2); border-radius: 0; }
.evg-more { margin: 0 8px 8px; }
.evg-more[hidden] { display: none; }
.hi-line { flex: none; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--wash-2); color: var(--ink-2); }
.hi-line.is-observation { background: var(--accent-wash); color: var(--accent-ink); }
.hi-line.is-social { background: var(--biz-wash); color: var(--biz); }
.hi-chart-box { margin-top: 6px; }
.hi-moves:focus { outline: none; }

/* ---------------------------------------------------------------- field observations (views/fieldobs.js) */
.fo-section { display: flex; flex-direction: column; gap: 12px; }
.fo-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.fo-rule > summary { cursor: pointer; font-size: var(--fs-cap); font-weight: 600; color: var(--ink-3); width: fit-content; }
.fo-rule > p { margin-top: 6px; max-width: 72ch; }
.fo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.fo-card { background: var(--s2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fo-card.is-on.is-yes { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--yes) 55%, transparent); }
.fo-card.is-on.is-no { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--no) 55%, transparent); }
.fo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.fo-title { font-size: 15px; font-weight: 650; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.fo-role { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--wash-2); color: var(--ink-2); white-space: nowrap; }
.fo-role.is-direct { background: var(--accent-wash); color: var(--accent-ink); }
/* the satellite scene: imagery stays dark in either theme, so what sits on it uses fixed light-on-dark colours */
.fo-scene { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: var(--s3); }
.fo-layer { position: absolute; inset: 0; }
.fo-layer[hidden] { display: none; }
.fo-img { width: 100%; height: 100%; display: block; object-fit: fill; user-select: none; }
.fo-fail { display: none; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); background: var(--s3); }
.fo-layer[data-state="fail"] .fo-fail { display: flex; }
.fo-layer[data-state="fail"] .fo-img { visibility: hidden; }
.fo-pts { position: absolute; inset: 0; pointer-events: none; }
.fo-pt { position: absolute; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%); background: #ffd60a; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.55); }
.fo-pt.is-flag { width: 10px; height: 10px; background: #ff453a; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.fo-scene-hit { position: absolute; inset: 0; border: 0; background: transparent; cursor: zoom-in; border-radius: 12px; }
.fo-scene-hit:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.fo-scene-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.fo-chips { display: flex; gap: 4px; pointer-events: auto; }
.fo-chip { border: 0; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-variant-numeric: tabular-nums; }
button.fo-chip { cursor: pointer; }
.fo-chip[aria-pressed="true"] { background: #fff; color: #111; }
.fo-chip:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.fo-scene-bot { position: absolute; left: 8px; right: 8px; bottom: 6px; display: flex; justify-content: flex-end; pointer-events: none; }
.fo-scene .fo-credit { font-size: 10px; color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-align: right; }
.fo-scene.is-big { border-radius: 14px; }
.fo-cmp-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); pointer-events: none; }
.fo-cmp-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; border-radius: 50%; transform: translate(-50%, -50%); background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.fo-cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.is-cmp:focus-within .fo-cmp-handle::after { box-shadow: 0 0 0 3px var(--accent), 0 1px 6px rgba(0, 0, 0, 0.5); }
.fo-sheet { display: flex; flex-direction: column; gap: 12px; }
.fo-sheet-img { width: 100%; }
.fo-sheet .fo-credit, .fo-legend { margin: 0; }
/* a sensor's readings */
.fo-chart { position: relative; height: 150px; }
.fo-chart.is-empty { height: auto; padding: 28px 0; text-align: center; }
.fo-plot { position: absolute; left: 0; right: 0; top: 16px; bottom: 20px; }
.fo-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.fo-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.fo-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.fo-med { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.fo-marks { position: absolute; inset: 0; pointer-events: none; }
.fo-an, .fo-last { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.fo-an { width: 8px; height: 8px; background: var(--no); box-shadow: 0 0 0 1.5px var(--s2); }
.fo-last { width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.fo-ax { position: absolute; left: 0; font-size: 10.5px; color: var(--ink-4); }
.fo-ax.is-top { top: 0; }
.fo-ax.is-bot { bottom: 20px; transform: translateY(100%); }
.fo-medlab { position: absolute; right: 0; transform: translateY(-130%); font-size: 10.5px; color: var(--ink-3); }
.fo-xax { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-4); }
.fo-read { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.fo-val { font-size: 22px; font-weight: 680; letter-spacing: -0.01em; }
.fo-unit { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.fo-z { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--wash-2); color: var(--ink-2); }
.fo-z.is-hot { background: var(--warn-wash); color: var(--warn-ink); }
.fo-int { border-radius: 12px; padding: 10px 12px; background: var(--s1); display: flex; flex-direction: column; gap: 6px; }
.fo-int.is-quiet { background: transparent; padding: 0; }
.fo-int.is-on.is-yes { background: var(--yes-wash); }
.fo-int.is-on.is-no { background: var(--no-wash); }
.fo-int-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fo-int-h .pill { height: 22px; }
.fo-count { font-size: 12.5px; font-weight: 650; }
.fo-count.is-muted { color: var(--ink-3); font-weight: 500; }
.fo-one { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.fo-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 12.5px; margin-top: auto; }
.fo-src { overflow-wrap: anywhere; }
.fo-mech { min-width: 0; flex-basis: 100%; } /* its own row under the source: opened, its text never sits in a column */
.fo-mech > summary { cursor: pointer; color: var(--ink-3); font-weight: 600; }
.fo-mech > p { margin-top: 6px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.fo-list { display: flex; flex-direction: column; }
.fo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px auto auto; gap: 12px; align-items: center; padding: 10px 0; box-shadow: inset 0 0.5px 0 var(--hair-2); }
.fo-row .fo-title { font-size: 14px; }
.fo-row.is-off { opacity: 0.72; }
.fo-row-v { font-weight: 650; }
.fo-row-err { overflow-wrap: anywhere; }
.fo-spark { width: 120px; height: 30px; }
.fo-spark path { fill: none; stroke: var(--ink-3); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@media (max-width: 640px) {
  .fo-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fo-row .fo-spark, .fo-row .fo-role { display: none; }
  .ck-tip { min-width: 140px; }
}

/* ---------------------------------------------------------------- an earlier track (#/history/:id) */
.hi-grid, .hi-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hi-note { margin-top: 6px; }
.hi-kpis { display: none; }
.hi-kpi { background: var(--s1); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hi-kpi-l { font-size: var(--fs-cap); font-weight: 600; color: var(--ink-3); }
.hi-kpi-v { font-size: 24px; font-weight: 680; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-kpi-s { font-size: 12px; color: var(--ink-3); line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.hi-kpi.is-evidence .hi-kpi-v { color: var(--accent-ink); }
.hi-kpi.is-up .hi-kpi-v { color: var(--yes-ink); }
.hi-kpi.is-down .hi-kpi-v { color: var(--no-ink); }
.hi-bal-row { align-items: center; gap: 12px; }
.hi-bal-track { flex: none; width: 64px; height: 6px; border-radius: 3px; background: var(--wash-2); overflow: hidden; display: flex; }
.hi-bal-bar { display: block; height: 100%; border-radius: 3px; background: var(--ink-3); }
.hi-bal-bar.is-up { background: var(--yes); }
.hi-bal-bar.is-down { background: var(--no); }
.hi-bal-v { min-width: 62px; text-align: right; }

/* ---------------------------------------------------------------- the wide layout (both tracking pages) */
/* Read left to right: the key figures across the top; the chart with what explains its number beside it; the
   evidence with its context beside it. A block with nothing beside it spans the page. */
@media (min-width: 1100px) {
  .th-page, .hi-page { max-width: var(--page); }
  .th-title { max-width: 46ch; }
  .hi-page .page-head h1 { max-width: 46ch; }
  .th-grid, .hi-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .th-grid > *, .hi-grid > * { grid-column: 1 / -1; }
  .th-grid > .th-a-main:not(.is-wide), .hi-grid > .hi-a-chart:not(.is-wide), .hi-grid > .hi-a-ev { grid-column: 1; }
  .th-grid > .th-a-side, .hi-grid > .hi-a-bal, .hi-grid > .hi-a-side { grid-column: 2; }
  /* the chart and its explanation end level */
  .th-grid > .th-chart-card, .th-grid > .th-why, .hi-grid > .hi-a-chart, .hi-grid > .hi-a-bal { align-self: stretch; }
  /* a stretched chart card gives its height to the plot, so no gap is left under the chart */
  .th-grid > .th-chart-card, .hi-grid > .hi-a-chart { display: flex; flex-direction: column; }
  .th-grid > .th-chart-card > .th-chart, .hi-a-chart .hi-chart-box, .hi-a-chart .hi-chart-box > .th-chart { flex: 1 1 auto; }
  .hi-a-chart .hi-chart-box { display: flex; flex-direction: column; }
  .th-chart { height: auto; min-height: 300px; }
  .hi-chart.th-chart { height: auto; min-height: 320px; }
  /* the explanation in its narrower column: each step's name and number above its bar */
  .th-grid .th-why .th-wf-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label num" "track track"; gap: 4px 12px; padding: 7px 0; }
  .th-grid .th-why .th-wf-label { grid-area: label; }
  .th-grid .th-why .th-wf-num { grid-area: num; }
  .th-grid .th-why .th-wf-track { grid-area: track; height: 14px; }
  .th-grid .th-why .th-wf-bar { top: 3px; height: 8px; }
  .th-grid .th-why .th-wf-mark { top: 0; height: 14px; }
  /* the headline: the two numbers side by side on the left, its flags and the not-advice line on the right */
  .th-grid > .th-head-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .th-head-card > .th-figs { grid-column: 1; grid-row: 1 / span 4; }
  .th-head-card > :not(.th-figs) { grid-column: 2; }
  .th-head-card > .th-flags { margin-top: 0; }
  .th-head-card > .th-advice, .th-head-card > .th-reask { margin-top: 12px; }
  .hi-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .hi-page .hi-hl-figs { display: none; }
  /* as many columns as fill whole rows: 2, 3 or 4 (set by views/fieldobs.js from the number of cards) */
  .hi-a-field .fo-grid { grid-template-columns: repeat(var(--fo-cols, 3), minmax(0, 1fr)); }
}
@media (min-width: 1100px) and (max-width: 1239px) {
  .hi-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hi-a-field .fo-grid { grid-template-columns: repeat(min(var(--fo-cols, 3), 3), minmax(0, 1fr)); }
}
