/* Forecast El Niño — the Forecast Network theme on Interstate 10.
 *
 * Same bones as the rest of the network (Forecast Season, Forecast Gas, Forecast Waves): warm
 * paper, Overpass (the open cut of Highway Gothic), the utility strip, the green guide-sign
 * masthead, numbered routes. The Interstate roles are fixed across the network (green guide /
 * blue services / brown culture / red shields); only the paper and the accent are ours.
 *
 * Paper: a desert sand, for the I-10 corridor from Santa Monica to Jacksonville.
 * Accent: INCIDENT MAGENTA. The MUTCD reserves fluorescent pink for incident management:
 * temporary signs for an event on the road. An El Niño is exactly that on the climate
 * network, and magenta is the one hue that cannot be mistaken for either pole of the
 * warm/cool data scales. The accent is identity and UI only; it never encodes data.
 *
 * Light only, by standing preference: light basemaps and light charts, no dark mode.
 */
:root {
  color-scheme: light;
  --paper: #ece6da;
  --paper2: #f5f1e8;
  --card: #ffffff;
  --ink: #17161a;
  --ink2: #48454f;
  --mut: #5f5a52;          /* 6.6:1 on card, 5.4:1 on paper */
  --line: #d3ccbe;
  --line2: #e8e3d8;
  --sign: #04663d;         /* guide green */
  --sign-dk: #013d26;
  --sign-sub: #bdebcf;
  --blue: #0a5ca8;         /* services blue: links */
  --red: #b0242e;          /* shield red */
  --shield-blue: #1f3f8f;
  --accent: #a3166f;       /* incident magenta: 6.1:1 on card */
  --accent-dk: #7b0f53;
  --accent-sub: #f6dcea;
  --edge: 163, 22, 111;
  --hero-backdrop: radial-gradient(120% 100% at 50% 10%, #f8f4ec 0%, #ebe4d6 55%, #ddd3c0 100%);

  /* data: never the identity colour */
  --warm-4: #8f1d1a; --warm-3: #c0311f; --warm-2: #e0603a; --warm-1: #f4a582;
  --cool-4: #0d366b; --cool-3: #1c5cab; --cool-2: #3987e5; --cool-1: #86b6ef;
  --wet-4: #0b5f58;  --wet-3: #17877c;  --wet-2: #4db3a6;  --wet-1: #a9ddd4;
  --dry-4: #6e4510;  --dry-3: #9c6522;  --dry-2: #c99a55;  --dry-1: #ead2a8;
  --neutral: #ebe9e4;
  --h1997: #eb6834; --h1982: #4a3aa7; --h2015: #1baf7a; --hctx: #aaa59b;
  --grid: #ece8e0; --axis: #cfc8ba;

  --font: 'Overpass', Helvetica, Arial, sans-serif;
  --mono: 'Overpass Mono', ui-monospace, monospace;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--paper); }
body { color: var(--ink); font-family: var(--font); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); }
.tab { font-variant-numeric: tabular-nums; }
.muted { color: var(--mut); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 8px; background: var(--card); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── utility strip ─────────────────────────────────────────────────────── */
.util { background: var(--ink); color: #d6d2c9; border-bottom: 3px solid var(--sign);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.util .wrap { display: flex; align-items: center; gap: 16px; min-height: 36px; flex-wrap: wrap; }
.util a { color: #d6d2c9; }
.util a:hover { color: var(--sign-sub); text-decoration: none; }
.util .sp { flex: 1; }
.util .live { display: inline-flex; align-items: center; gap: 8px; color: #f1eee7; white-space: nowrap; }
.util .dot { width: 8px; height: 8px; border-radius: 50%; background: #e0489f;
  box-shadow: 0 0 0 0 rgba(var(--edge), .6); animation: pulse 2.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 72, 159, .6); }
  70% { box-shadow: 0 0 0 8px rgba(224, 72, 159, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 72, 159, 0); } }
@media (prefers-reduced-motion: reduce) { .util .dot { animation: none; } }
@media (max-width: 760px) { .util .hidesm { display: none; } }

/* ── masthead: the green guide sign ────────────────────────────────────── */
.mast { background: var(--sign); border-radius: 12px; color: #fff; margin: 16px 0 8px;
  padding: 14px 20px; display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap;
  justify-content: space-between;
  box-shadow: inset 0 0 0 4px var(--sign), inset 0 0 0 6px rgba(255,255,255,.92), 0 12px 30px rgba(0,0,0,.14); }
.mast .brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: #fff; }
.mast .brand:hover { text-decoration: none; }
.mast .shield { width: 46px; height: 50px; flex: none; }
.mast .word { font-weight: 900; font-size: clamp(21px, 3.4vw, 28px); line-height: 1; display: block; letter-spacing: -.01em; }
.mast .word b { color: var(--sign-sub); font-weight: 900; }
.mast .tag { font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .09em;
  color: var(--sign-sub); text-transform: uppercase; margin-top: 5px; display: block; }
.mast nav { display: flex; gap: 6px; flex-wrap: wrap; }
.mast nav a { font-weight: 800; font-size: 13.5px; color: #fff; padding: 6px 11px; border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,.35); white-space: nowrap; }
.mast nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.mast nav a.on { background: #fff; color: var(--sign); border-color: #fff; }
/* grouped menus: a <details> per group, the list drops below as a white guide-sign panel */
.mast { position: relative; }
.mast nav { align-items: center; }
.mast .ng { position: relative; }
.mast .ng > summary { list-style: none; cursor: pointer; font-weight: 800; font-size: 13.5px; color: #fff;
  padding: 6px 11px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.35); white-space: nowrap; user-select: none; }
.mast .ng > summary::-webkit-details-marker { display: none; }
.mast .ng > summary::after { content: ""; display: inline-block; margin-left: 7px; vertical-align: 2px;
  border: 4.5px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.mast .ng > summary:hover { background: rgba(255,255,255,.12); }
.mast .ng > summary:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.mast .ng.on > summary { background: #fff; color: var(--sign); border-color: #fff; }
.mast .ng[open] > summary { background: var(--sign-dk); border-color: #fff; color: #fff; }
.mast .nd { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; min-width: 236px; background: var(--card);
  border-radius: 10px; padding: 6px; box-shadow: 0 0 0 1px var(--line), 0 16px 34px rgba(0,0,0,.2); display: grid; gap: 1px; }
.mast .nd a { color: var(--ink); border: 0; font-weight: 700; font-size: 14px; padding: 8px 11px; border-radius: 6px; white-space: nowrap; }
.mast .nd a:hover { background: var(--paper2); color: var(--sign); }
.mast .nd a.on { background: var(--sign); color: #fff; }
@media (max-width: 760px) {
  .mast .ng { position: static; }
  .mast .nd { left: 10px; right: 10px; top: auto; margin-top: 8px; min-width: 0; grid-template-columns: 1fr 1fr; }
  .mast .nd a { white-space: normal; }
}

/* ── type ──────────────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1 { font-weight: 900; font-size: clamp(30px, 5vw, 50px); letter-spacing: -.02em; }
h2 { font-weight: 900; font-size: clamp(21px, 2.6vw, 27px); letter-spacing: -.01em; }
h3 { font-weight: 800; font-size: 17px; }
.eyebrow { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.lede { font-size: 17.5px; color: var(--ink2); max-width: 70ch; margin: 12px 0 0; }
.lede b { color: var(--ink); }
p { margin: 10px 0 0; }
.small { font-size: 13px; }

/* ── sections and the dashed rule ──────────────────────────────────────── */
.sec { margin: 34px 0; }
.rule { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.rule .ln { flex: 1; min-width: 40px; border-top: 3px dashed var(--line); transform: translateY(-5px); }
.rule .sub { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--mut); text-transform: uppercase; }
.rule.accent h2 { color: var(--accent-dk); }

/* ── cards and panels ──────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 22px rgba(40, 30, 10, .07); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 14px;
  box-shadow: 0 6px 22px rgba(40, 30, 10, .07); }
.panel .ph { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.panel .ph p { margin: 4px 0 0; color: var(--ink2); font-size: 14px; max-width: 72ch; }
.src { font-size: 13px; color: var(--mut); margin-top: 10px; border-top: 1px solid var(--line2); padding-top: 8px; }
.src b { color: var(--ink2); font-weight: 700; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid2 > *, .sec > .panel { min-width: 0; }   /* a wide chart or table scrolls inside its box, never widens the page */
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero { background: var(--hero-backdrop); border-bottom: 1px solid var(--line); }
.hero .in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 26px 0 30px; align-items: start; }
@media (max-width: 900px) { .hero .in { grid-template-columns: 1fr; } }
.status { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--accent);
  border-radius: 999px; padding: 5px 14px 5px 6px; font-weight: 800; font-size: 14px; margin-bottom: 14px; }
.status .pill { background: var(--accent); color: #fff; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  padding: 3px 9px; border-radius: 999px; }

/* hero figure: one per view */
.fig { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(40, 30, 10, .1); }
.fig .hd { background: var(--ink); color: #e9e6df; font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; padding: 8px 14px; display: flex; gap: 10px; text-transform: uppercase; }
.fig .hd .sp { flex: 1; }
.fig .bd { padding: 16px 18px 12px; }
.fig .big { font-weight: 800; font-size: clamp(56px, 9vw, 84px); line-height: .95; letter-spacing: -.03em; }
.fig .big small { font-size: .38em; font-weight: 800; color: var(--ink2); margin-left: 4px; letter-spacing: 0; }
.fig .what { font-weight: 800; font-size: 18px; margin-top: 8px; }
.fig .why { font-size: 14px; color: var(--ink2); margin-top: 6px; }
.fig .ft { border-top: 1px solid var(--line2); padding: 10px 18px; font-size: 13px; color: var(--mut); }

/* index strip: stat tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 208px), 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; }
.tile .l { font-size: 13px; font-weight: 800; color: var(--ink2); }
.tile .v { font-weight: 700; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.tile .v small { font-size: 14px; color: var(--mut); font-weight: 700; margin-left: 2px; }
.tile .s { font-size: 13px; color: var(--mut); margin-top: 2px; }
.tile svg.spark { width: 100%; height: 34px; display: block; margin-top: 6px; }

/* record watch */
table.rw { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rw th { text-align: left; font-size: 12px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--mut); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.rw td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.rw td.n { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
table.rw th.n { text-align: right; }
table.rw .when { display: block; font-size: 12.5px; color: var(--mut); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink2); background: var(--paper2); }
.badge.rec { border-color: var(--accent); color: var(--accent-dk); background: var(--accent-sub); }
.badge.tie { border-color: var(--accent); color: var(--accent-dk); background: #fff; }
.badge.fc { border-style: dashed; border-color: var(--accent); color: var(--accent-dk); background: #fff; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── the route board ───────────────────────────────────────────────────── */
.routes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 262px), 1fr)); }
.route { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); overflow: hidden; }
a.route:hover { text-decoration: none; border-color: var(--sign); box-shadow: 0 8px 22px rgba(4, 102, 61, .12); }
.route .edge { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sign); }
.route.paving .edge { background: repeating-linear-gradient(135deg, #f08a24 0 7px, #fff 7px 12px); }
.route .hd { display: flex; align-items: center; gap: 8px; }
.route .no { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: #fff;
  background: var(--sign); border-radius: 4px; padding: 2px 7px; }
.route.paving .no { background: #6f6a62; }
.route .st { margin-left: auto; font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--sign); }
.route.paving .st { color: #9a4f00; }
.route .t { font-weight: 900; font-size: 18px; line-height: 1.2; }
.route .d { font-size: 14px; color: var(--ink2); flex: 1; }
.route .f { font-size: 12.5px; color: var(--mut); font-family: var(--mono); }

/* ── controls ──────────────────────────────────────────────────────────── */
.ctl { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 12px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.seg button { font: 700 13.5px var(--font); border: 0; background: transparent; color: var(--ink2);
  padding: 7px 12px; cursor: pointer; border-left: 1px solid var(--line2); min-height: 36px; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button:hover:not([aria-pressed="true"]) { background: var(--paper2); }
.ctl label.lbl { font-size: 12.5px; font-weight: 800; color: var(--mut); font-family: var(--mono);
  letter-spacing: .06em; text-transform: uppercase; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink2); cursor: pointer; }

/* ── charts ────────────────────────────────────────────────────────────── */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 13px; }
.chart text:not([fill]) { fill: var(--ink2); }
.chart .ax text { fill: var(--mut); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart .ax line, .chart .ax path { stroke: var(--axis); stroke-width: 1; }
.chart .gr line { stroke: var(--grid); stroke-width: 1; }
.chart .zero { stroke: #a39c8e; stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #f3f1ec; font-size: 13px; line-height: 1.4;
  padding: 8px 10px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.2); max-width: 280px; z-index: 5;
  opacity: 0; transition: opacity .08s; }
.tip b { color: #fff; }
.tip .k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink2); margin: 8px 0 0; align-items: center; }
.legend .k { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: 4px; margin-right: 6px; }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.legend button { font: inherit; background: none; border: 0; padding: 2px 0; cursor: pointer; color: inherit; }
.legend button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.scale { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); flex-wrap: wrap; }
.scale .bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; min-width: 220px; flex: 0 1 360px; }
.scale .bar i { flex: 1; }

details.table { margin-top: 10px; }
details.table summary { cursor: pointer; font-weight: 800; font-size: 13.5px; color: var(--blue); }
details.table table { border-collapse: collapse; font-size: 13px; margin-top: 8px; width: 100%; }
details.table th, details.table td { padding: 4px 8px; border-bottom: 1px solid var(--line2); text-align: right; font-variant-numeric: tabular-nums; }
details.table th:first-child, details.table td:first-child { text-align: left; }

/* callouts */
.note { background: var(--paper2); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0;
  font-size: 14.5px; color: var(--ink2); margin: 12px 0; }
.note b { color: var(--ink); }
.plain { font-size: 15.5px; color: var(--ink2); max-width: 74ch; }
.plain h3 { margin: 22px 0 4px; color: var(--ink); }
.plain li { margin: 5px 0; }
code, .code { font-family: var(--mono); font-size: 13px; background: var(--paper2); border: 1px solid var(--line2);
  border-radius: 4px; padding: 1px 5px; }
pre.code { padding: 12px 14px; overflow-x: auto; line-height: 1.5; white-space: pre; }

/* ── footer ────────────────────────────────────────────────────────────── */
footer { margin-top: 48px; background: var(--ink); color: #cfcac0; font-size: 13.5px; padding: 26px 0 34px; }
footer a { color: #e9e5dc; }
footer .cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
footer h4 { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: 4px 0; }
footer .fine { margin-top: 20px; border-top: 1px solid #36343a; padding-top: 12px; color: #aaa59b; }

/* ── phones ────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 10px 10px 8px; }
  .tile .v { font-size: 25px; }
  .tile .s { font-size: 12.5px; }
  table.rw { font-size: 13.5px; }
  table.rw td, table.rw th { padding: 8px 6px; }
  table.rw td:first-child { min-width: 132px; }
  .mast { padding: 12px 14px; }
  .mast nav a { font-size: 13px; padding: 5px 9px; }
  .panel { padding: 14px 12px 12px; }
  .hero .in { padding: 18px 0 22px; }
}
/* pages that set their own two-column split still stack on narrow screens */
@media (max-width: 900px) { .grid2[style*="grid-template-columns"] { grid-template-columns: 1fr !important; } }

/* segmented controls with long labels wrap into a two-column grid on phones instead of tall stacks */
@media (max-width: 560px) {
  .seg { display: flex; flex-wrap: wrap; }
  .seg button { flex: 1 1 45%; border-left: 0; border-top: 1px solid var(--line2); }
}

/* rendered reports (backtest, reviews) */
.doc { max-width: none; }
.doc h1 { font-size: 26px; margin: 4px 0 10px; }
.doc h2 { font-size: 21px; margin: 26px 0 8px; }
.doc h3 { font-size: 17px; margin: 18px 0 6px; }
.doc table { border-collapse: collapse; font-size: 13.5px; margin: 10px 0; display: block; overflow-x: auto; }
.doc th, .doc td { border-bottom: 1px solid var(--line2); padding: 6px 9px; text-align: left; vertical-align: top; }
.doc th { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--mut); border-bottom: 2px solid var(--line); }
.doc code { font-size: 12.5px; }
.doc blockquote { margin: 12px 0; padding: 8px 14px; border-left: 4px solid var(--accent); background: var(--paper2); border-radius: 0 8px 8px 0; }
.doc blockquote p { margin: 0; }
