/* The Intelligence station (templates/intelligence/). Colours are the site's
   tokens. Boards keep their boxes when their figures change (CLS 0): fixed
   heights, figures in tabular numerals with room for their longest form. In
   play mode (after a press only) the stage shows one slide at a time, in a
   box of its own size, so nothing below it moves. */
.intel { padding: 0 var(--gutter) 2rem; max-width: 90rem; }
.intel-head { padding: clamp(1.5rem, 4vw, 3rem) 0 0.5rem; }
.intel-lead, .intel-desc { max-width: 68ch; color: var(--text-muted); margin: 0.25rem 0 0.75rem; }
.intel a:not(.intel-board):not(.intel-card):not(.btn) { color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.15em; }
.intel-kicker { margin: 0 0 0.25rem; font-size: var(--step--1); }
.intel-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0; }
.intel-note, .intel-meta, .intel-credit { color: var(--text-muted); font-size: var(--step--1); max-width: 75ch; }
/* Room for one line, written only after a press (CLS 0). */
.intel-status { min-height: 1.5em; margin: 0.25rem 0; font-size: var(--step--1); color: var(--text-muted); }
.intel-warning { padding: 0.6rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--danger); color: var(--text); max-width: 75ch; }
.intel-slide { padding: 1rem 0 1.25rem; }
.intel-subhead { margin: 1.25rem 0 0.5rem; font-size: var(--step-1); }

/* Positioned, so that what is positioned inside a board (its words for
   screen readers) is clipped by the rail with it, and does not widen the
   page at a phone's width (measured: 1,607px at 360px without). */
.intel-rail { position: relative; display: flex; gap: 0.9rem; overflow-x: auto; padding: 0.25rem 0.1rem 0.75rem; scroll-snap-type: x proximity; }
.intel-board, .intel-card { position: relative; flex: 0 0 auto; scroll-snap-align: start; display: grid; align-content: start; gap: 0.2rem; padding: 0.8rem 0.9rem; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--hairline); color: var(--text); text-decoration: none; }
.intel-board { width: 15.5rem; height: 17rem; overflow: hidden; }
.intel-card { width: 22rem; min-height: 12rem; }
.intel-board:focus-visible, .intel-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.intel-board:hover, .intel-card:hover { background: var(--bg-hover); }
.intel-board-name, .intel-card-title { font-weight: 700; font-size: var(--step--1); line-height: 1.3; min-height: 2.6em; }
.intel-board-value { font-size: var(--step-2); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 9ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intel-board-when, .intel-board-change, .intel-board-range, .intel-board-credit { font-size: var(--step--2); color: var(--text-muted); line-height: 1.35; }
.intel-board-change { min-height: 2.7em; }
.intel-board-range { min-height: 2.7em; }
.intel-spark { width: 100%; height: 36px; display: block; }
.intel-spark polyline { fill: none; stroke: var(--accent-text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.intel-card-statement { line-height: 1.45; }

.intel-panel { margin: 1rem 0; padding: 0.9rem 1rem; border-radius: var(--radius-lg); border: 1px solid var(--hairline); background: var(--bg-raised); max-width: 80rem; min-width: 0; overflow-wrap: anywhere; }
.intel-panel h2, .intel-panel h3 { margin: 0 0 0.5rem; font-size: var(--step-1); }
.intel-figures { font-variant-numeric: tabular-nums; }
.intel-figure-value { font-weight: 800; font-size: var(--step-1); }
.intel-kinds { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding: 0; margin: 0.25rem 0 0.5rem; list-style: none; font-size: var(--step--1); }
.intel-alerts { padding-left: 1.2rem; line-height: 1.5; max-width: 80ch; }
.intel-table { border-collapse: collapse; margin: 0.5rem 0; font-variant-numeric: tabular-nums; font-size: var(--step--1); max-width: 100%; }
@media (max-width: 30rem) { .intel-table th, .intel-table td { padding-right: 0.45rem; } }
.intel-table caption { text-align: left; color: var(--text-muted); padding-bottom: 0.25rem; }
.intel-table th, .intel-table td { text-align: left; padding: 0.3rem 0.8rem 0.3rem 0; border-bottom: 1px solid var(--hairline); }
.intel-table td { font-variant-numeric: tabular-nums; }
.intel-pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin: 0.75rem 0; }
.intel-picture { margin: 0; }
.intel-picture-frame { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--media-bg); }
.intel-picture-frame img { display: block; width: 100%; height: auto; }
.intel-dots { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Fire, in red on the picture in both themes (a dark-surface element). */
.intel-dots circle { fill: oklch(0.65 0.24 30 / 0.85); stroke: oklch(1 0 0 / 0.7); stroke-width: 0.15; }
.intel-picture figcaption { font-size: var(--step--2); color: var(--text-muted); margin-top: 0.35rem; }

.intel-questions { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; max-width: 80ch; }
.intel-question { padding: 0.6rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--bg-raised); }
.intel-question h3, .intel-question h4 { margin: 0 0 0.3rem; font-size: var(--step-0); }
.intel-question p { margin: 0.25rem 0; }
.intel-hash { font-size: var(--step--2); overflow-wrap: anywhere; word-break: break-all; }
.intel-url { overflow-wrap: anywhere; }
.intel-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0.5rem 1rem; margin: 0.5rem 0 1rem; }
.intel-stats div { padding: 0.5rem 0.7rem; border-radius: var(--radius); background: var(--tint); min-width: 0; overflow-wrap: anywhere; }
.intel-stats dt { font-size: var(--step--2); color: var(--text-muted); }
.intel-stats dd { margin: 0.15rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.intel-charts { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.intel-chart-fig { margin: 0; max-width: 22rem; min-width: 0; flex: 1 1 16rem; }
.intel-chart-fig figcaption { font-size: var(--step--1); color: var(--text-muted); max-width: 22rem; }
.intel-chart { width: 100%; max-width: 320px; height: auto; background: var(--bg-card); border-radius: var(--radius); }
.intel-axis { stroke: var(--border-strong); stroke-width: 1; }
.intel-diagonal { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 4 4; }
.intel-tick, .intel-axis-name { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.intel-dot { fill: var(--accent); fill-opacity: 0.75; stroke: var(--accent-text); }
.intel-line { fill: none; stroke: var(--accent-text); stroke-width: 1.5; }
.intel-briefing { max-width: 72ch; line-height: 1.6; }
.intel-briefing h3 { font-size: var(--step-0); margin: 1rem 0 0.25rem; }
.intel-about { padding: 1rem 0; }
.intel-sources { padding-left: 1.2rem; max-width: 85ch; line-height: 1.55; font-size: var(--step--1); }
.intel-disclosure { max-width: 75ch; color: var(--text-muted); font-size: var(--step--1); }

.intel-interpretation { border-color: var(--accent); }
.intel-label { display: inline-block; margin-left: 0.4rem; padding: 0 0.45rem; border-radius: 0.35rem; background: var(--tint-strong); color: var(--text); font-size: var(--step--2); font-weight: 600; vertical-align: 0.2em; }
.intel-statement { font-size: var(--step-1); line-height: 1.45; max-width: 70ch; }
.intel-defs { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: 0.4rem 1rem; max-width: 85ch; }
.intel-defs dt { font-weight: 600; }
.intel-defs dd { margin: 0; }
@media (max-width: 34rem) { .intel-defs { grid-template-columns: 1fr; } .intel-defs dd { margin-bottom: 0.4rem; } }
.intel-earlier { padding-left: 1.2rem; line-height: 1.5; max-width: 85ch; }
.intel-rule-list { max-width: 75ch; line-height: 1.6; padding-left: 1.4rem; }

/* Play mode: one slide at a time in a stage of the viewport's height, the
   rest of the page where it was. Only a press puts the page in it. */
.intel-stage.is-playing { height: min(80vh, 60rem); overflow: hidden; position: relative; border-radius: var(--radius-lg); background: var(--bg-raised); padding: 0 1rem; }
.intel-stage.is-playing > .intel-slide { display: none; height: 100%; overflow: hidden; }
.intel-stage.is-playing > .intel-slide.is-on { display: block; }
html[data-tv] .intel-board { width: 19rem; height: 19rem; }
html[data-tv] .intel-stage.is-playing { font-size: 1.15em; }
@media (prefers-reduced-motion: no-preference) {
  .intel-stage.is-playing > .intel-slide.is-on { animation: intel-in 400ms ease-out; }
}
@keyframes intel-in { from { opacity: 0; } to { opacity: 1; } }
