/* Two Spherical Cows — visual identity shared with the forecast videos, so a
   clip and the site it links to read as one thing.
   Mobile-first: most traffic arrives from a phone, via social. */

:root {
  --bg:      #0b0f17;
  --panel:   #10151f;
  --panel-2: #161d2b;
  --line:    #243047;
  --ink:     #f2f5fa;
  --ink-dim: #9aa7bd;
  --accent:  #ffd166;
  --good:    #5fd3a6;
  --bad:     #ff6b6b;
  --radius: 14px;
  --maxw: 1080px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.6;
  font-size: 17px; letter-spacing: -0.003em;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); z-index: 20;
}
header.site .wrap {
  display: flex; align-items: baseline; gap: 20px;
  padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.02em; }
.brand span { color: var(--ink-dim); font-weight: 500; }
nav.site { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
nav.site a { color: var(--ink-dim); font-size: 15px; font-weight: 500; }
nav.site a[aria-current="page"] { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 8px; }
.eyebrow {
  color: var(--accent); font-weight: 700; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 10px;
}
h1 { font-size: clamp(30px, 6.2vw, 50px); line-height: 1.1; margin: 0 0 14px;
     font-weight: 800; letter-spacing: -0.025em; }
.lede { color: var(--ink-dim); font-size: clamp(16px, 2.4vw, 19px); margin: 0 0 22px; max-width: 62ch; }

/* ---------- forecast card ---------- */
.forecast { display: grid; gap: 26px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 820px) { .forecast { grid-template-columns: minmax(0,340px) 1fr; } }
.video-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; line-height: 0;
}
.video-card video, .video-card img { width: 100%; height: auto; display: block; }

.facts { display: grid; gap: 12px; }
.fact {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 16px;
}
.fact .k { color: var(--ink-dim); font-size: 13px; text-transform: uppercase;
           letter-spacing: 0.07em; font-weight: 700; }
.fact .v { font-size: 19px; font-weight: 600; margin-top: 2px; }
.fact .m { color: var(--ink-dim); font-size: 14px; }

/* ---------- stat tiles ---------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 22px 0; }
.stat { background: var(--panel); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 18px; }
.stat .n { font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: -0.02em;
           font-variant-numeric: tabular-nums; }
.stat .n.good { color: var(--good); }
.stat .l { color: var(--ink-dim); font-size: 13px; margin-top: 4px;
           text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.stat .s { color: var(--ink-dim); font-size: 13px; margin-top: 6px; }

/* ---------- sections / prose ---------- */
section { padding: 34px 0; border-top: 1px solid var(--line); margin-top: 34px; }
section:first-of-type { border-top: 0; }
h2 { font-size: clamp(22px, 3.6vw, 28px); margin: 0 0 6px; font-weight: 750; letter-spacing: -0.02em; }
h3 { font-size: 18px; margin: 26px 0 6px; font-weight: 700; }
.sub { color: var(--ink-dim); margin: 0 0 20px; max-width: 65ch; }
p { max-width: 68ch; }

/* ---------- table ---------- */
/* A wide table scrolls inside its own box. Without this it widens the whole
   document on a phone, and every other element gets clipped with it. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch;
                margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td, th { white-space: nowrap; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-dim); font-size: 12px; text-transform: uppercase;
     letter-spacing: 0.07em; font-weight: 700; }
th.num { text-align: right; }
td.num { font-variant-numeric: tabular-nums; text-align: right; font-family: var(--mono); }
.good { color: var(--good); } .bad { color: var(--bad); }

/* ---------- archive ---------- */
.runs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.run { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
       overflow: hidden; }
.run img { width: 100%; display: block; aspect-ratio: 9/16; object-fit: cover; }
.run .meta { padding: 12px 14px; }
.run .meta .d { font-weight: 700; font-size: 15px; }
.run .meta .c { color: var(--ink-dim); font-size: 13px; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px;
         border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase; }
.badge.extreme { background: #ff6b6b22; color: var(--bad); border: 1px solid #ff6b6b55; }
.badge.strong  { background: #ffd16622; color: var(--accent); border: 1px solid #ffd16655; }
.badge.moderate{ background: #9aa7bd22; color: var(--ink-dim); border: 1px solid #9aa7bd55; }
/* Forecast status — a separate palette from the IVT category badges above,
   each one carrying its own words so the state never rests on colour. */
.badge.live    { background: #5fd3a622; color: var(--good);    border: 1px solid #5fd3a655; }
.badge.revised { background: #ffd16622; color: var(--accent);  border: 1px solid #ffd16655; }
.badge.past    { background: #9aa7bd18; color: var(--ink-dim); border: 1px solid var(--line); }

/* ---------- run-to-run sparkline ---------- */
.spark { display: block; width: 100%; height: auto; margin: 4px 0 2px;
         background: var(--panel); border: 1px solid var(--line);
         border-radius: var(--radius); }
.spark-tick { fill: var(--ink-dim); font-family: var(--mono); font-size: 15px; }

footer.site { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0 54px;
              color: var(--ink-dim); font-size: 14px; }
.note { color: var(--ink-dim); font-size: 14px; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--panel-2);
       padding: 1px 6px; border-radius: 5px; }
