/* TickerInside.
   A publication that happens to be made of data. The reference is a financial
   paper's table pages, not a dashboard: white ground, hairline rules, one
   accent, and nothing boxed unless the box carries meaning. No card borders,
   no coloured side bars, no filled black controls. */

:root {
  --bg: #ffffff;
  --ink: #16181d;
  --ink-2: #545c6b;
  --ink-3: #838b99;
  --rule: #e6e8ec;
  --rule-strong: #c9ced7;
  --tint: #f7f8fa;
  --accent: #1c4fd8;
  --accent-ink: #143aa3;
  --pos: #12704a;
  --neg: #a3342a;
  --measure: 66ch;
  --maxw: 940px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16.5px/1.65 "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 {
  font-family: Archivo, -apple-system, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(30px, 4.2vw, 42px); font-weight: 700; }
h2 { font-size: 21px; font-weight: 650; margin: 52px 0 14px; }
h3 { font-size: 16.5px; font-weight: 650; margin: 34px 0 10px; color: var(--ink-2); }
p { margin: 0 0 15px; max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: Archivo, sans-serif; font-size: 11.5px; font-weight: 650;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 10px;
}
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: 13.5px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* Frame */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; height: 62px;
}
.brand {
  font-family: Archivo, sans-serif; font-weight: 700; font-size: 18px;
  color: var(--ink); letter-spacing: -0.025em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
nav.main { display: flex; gap: 20px; flex-wrap: wrap; }
nav.main a { color: var(--ink-2); font-size: 15px; }
nav.main a:hover { color: var(--ink); text-decoration: none; }
main { padding: 40px 0 64px; }
footer.site { border-top: 1px solid var(--rule); padding: 26px 0 40px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--ink-2); }

/* The verdict. Typographic, not a callout box: a hairline above, a small
   label, and the sentence set large. Nothing coloured, nothing bordered. */
.verdict { margin: 30px 0 34px; padding-top: 18px; border-top: 2px solid var(--ink); }
.verdict p:not(.eyebrow) {
  font-size: 21px; line-height: 1.5; margin: 0; max-width: 58ch;
  font-family: Archivo, sans-serif; font-weight: 500; letter-spacing: -0.011em;
}

/* Figures. A rule-separated row, no cards. */
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0; margin: 30px 0; border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat { padding: 16px 20px 16px 0; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat .l {
  font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650;
}
.stat .v {
  font-family: Archivo, sans-serif; font-size: 25px; font-weight: 650;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin: 3px 0 1px;
}
.stat .s { font-size: 13px; color: var(--ink-2); line-height: 1.4; }

/* Tables. Hairline rules only, no frame, no radius, no zebra. */
.tbl { overflow-x: auto; margin: 16px 0 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th {
  text-align: left; font-family: Archivo, sans-serif; font-size: 11.5px;
  font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 14px 9px 0; border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}
td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
th:last-child, td:last-child { padding-right: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }

.bar {
  position: relative; height: 5px; background: var(--rule); border-radius: 3px;
  min-width: 60px; display: inline-block; vertical-align: middle;
}
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ink-3); }

.source { font-size: 13.5px; color: var(--ink-3); margin: 10px 0 0; max-width: var(--measure); }
.source b { color: var(--ink-2); font-weight: 600; }

/* Questions */
details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; color: var(--ink-3); font-weight: 400; }
details[open] summary::before { content: "\2212 "; }
details p { margin: 10px 0 0; color: var(--ink-2); }

/* Controls. Accent-filled primary, hairline secondary. Never black. */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 7px;
  font: 600 15px Archivo, sans-serif; cursor: pointer; padding: 10px 18px;
  border: 1px solid transparent; transition: background-color .12s, border-color .12s;
}
.btn { background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-ink); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink-3); text-decoration: none; }

textarea, input[type="text"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--rule-strong);
  border-radius: 7px; background: var(--bg); color: var(--ink);
  font: 15px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical;
}
textarea:focus, input:focus { border-color: var(--accent); outline: none; }

pre {
  background: var(--tint); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 7px; padding: 14px 16px; overflow-x: auto;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  max-width: var(--measure);
}
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--tint); padding: 1px 5px; border-radius: 4px; }
pre code { background: none; padding: 0; }

ul { padding-left: 18px; max-width: var(--measure); }
li { margin: 5px 0; }

@media (max-width: 700px) {
  header.site .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: flex-start; gap: 10px; }
  nav.main { gap: 14px; }
  h2 { margin-top: 40px; }
  .grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 0; }
  .stat:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
