/* The vault, on the site's modernist system: paper, ink, rules, one neutral grotesk, and
   the data-viz rules — one hero figure, status colours only with an icon and a label, a
   line at 2px in a de-emphasis grey with the current point in the accent, tabular figures
   only in columns, a table view for the chart. Light only, painted explicitly. */
@font-face { font-family: 'Inter'; src: url(../assets/fonts/Inter-normal-400-700.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f3f2ec;
  --paper-2: #e9e8e0;
  --ink: #0e0e0c;
  --ink-2: #4f4f4a;
  --muted: #8a8a82;
  --rule: #0e0e0c;
  --rule-2: rgba(14, 14, 12, 0.16);
  --lime: #d4ff63;
  --green: #1d6b3a;
  --de-emphasis: #9a9a92;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --wash-critical: rgba(208, 59, 59, 0.10);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1280px;
  --pad: clamp(18px, 3.4vw, 40px);
  --gap: clamp(16px, 2vw, 28px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
a:hover { border-color: var(--ink); }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.tt { text-transform: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sep { color: var(--muted); margin: 0 10px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 48px; }
[hidden] { display: none !important; }

/* masthead */
.top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.top__brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; border: 0; }
.top__brand img { width: 44px; height: 44px; }
.top__crumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.top__meta { margin-left: auto; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--ink); background: var(--lime); }
.btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font: 500 15px/1 var(--sans); transition: background 0.2s, color 0.2s; }
.btn:hover { background: var(--lime); color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }

/* banners */
.error { margin-top: 14px; padding: 12px 14px; background: var(--wash-critical); border: 1px solid var(--critical); display: flex; gap: 10px; align-items: flex-start; }
.error svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--critical); }

/* hero */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--rule); }
.hero__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.hero__figure { font-size: clamp(44px, 12.5vw, 168px); font-weight: 600; line-height: 0.95; letter-spacing: -0.05em; margin: 10px 0 14px; white-space: nowrap; }
.hero__unit { font-size: 0.28em; font-weight: 500; letter-spacing: -0.01em; margin-left: 0.25em; vertical-align: 0.12em; color: var(--ink-2); }
.hero__row { font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -0.02em; }
.hero__usd { font-weight: 600; }
.status-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.status svg { width: 16px; height: 16px; flex: none; }
.status--good svg { color: var(--good); }
.status--warning svg { color: var(--warning); }
.status--serious svg { color: var(--serious); }
.status--critical svg { color: var(--critical); }

/* instruments: three columns separated by rules, no cards */
.instruments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.inst { padding: 18px var(--gap) 18px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inst + .inst { border-left: 1px solid var(--rule-2); padding-left: var(--gap); }
.inst__k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.inst__v { font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; margin-top: 4px; }
.inst__s { color: var(--muted); font-size: 12.5px; }
.inst__next { color: var(--ink); margin-top: auto; padding-top: 10px; }
.spark { margin: 12px 0 2px; height: 64px; }
.spark svg { width: 100%; height: 64px; display: block; overflow: visible; }
.spark__base { stroke: var(--rule-2); stroke-width: 1; }
.spark__line { fill: none; stroke: var(--de-emphasis); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark__ring { fill: var(--paper); }
.spark__dot { fill: var(--green); }
.tv { margin-top: 8px; font-size: 12.5px; }
.tv summary { cursor: pointer; color: var(--muted); }

/* calendar rail */
.cal { padding: 24px 0 0; }
.cal__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.rail { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: relative; }
.rail::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--rule); }
.rail li { position: relative; padding: 22px 12px 0 0; min-width: 0; }
.rail li::before { content: ''; position: absolute; left: 0; top: 0; width: 13px; height: 13px; background: var(--paper); border: 1px solid var(--ink); }
.rail li.is-past::before { background: var(--ink); }
.rail li.is-now::before { background: var(--lime); }
.rail li.is-future::before { border-style: dashed; }
.rail__when { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.rail__what { color: var(--ink-2); font-size: 13px; }
.rail__sub { color: var(--muted); font-size: 12px; }
.rail__sub a { border-bottom-color: var(--rule-2); }
.cal__note { margin-top: 18px; color: var(--muted); font-size: 12px; }

/* collect */
.collect { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); }
.collect__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.collect__text { color: var(--ink-2); font-size: 14px; }
.collect__status { margin: 10px 0 0; color: var(--ink-2); font-size: 13px; min-height: 1em; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.table td.num { white-space: nowrap; }
.code { background: var(--paper-2); border: 1px solid var(--rule-2); padding: 10px 12px; font-size: 12px; overflow-x: auto; white-space: pre; margin: 8px 0 0; }

/* details */
.details { margin-top: 30px; border-top: 1px solid var(--rule); padding-top: 14px; }
.details summary { cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.details td:first-child { color: var(--ink-2); white-space: nowrap; }
.links { margin-top: 12px; font-size: 13px; }
.links a { margin-right: 14px; }

.foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
main.is-loading .live { opacity: 0.6; transition: opacity 0.2s; }

@media (max-width: 760px) {
  .instruments { grid-template-columns: 1fr; }
  .inst { padding-right: 0; }
  .inst + .inst { border-left: 0; border-top: 1px solid var(--rule-2); padding-left: 0; }
  .rail { grid-auto-flow: row; grid-auto-columns: auto; }
  .rail::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .rail li { padding: 0 0 18px 26px; }
  .rail li:last-child { padding-bottom: 0; }
  .top__meta { margin-left: 0; flex: 1 1 auto; }
  .top .btn { margin-left: auto; }
  #collects th:nth-child(3), #collects td:nth-child(3) { display: none; }
  .table td { padding-right: 8px; }
}
