:root {
  --bg: #06131e;
  --bg-deep: #030a11;
  --card: #0b1c2a;
  --card-2: #0e2434;
  --line: rgba(219, 228, 231, .15);
  --text: #f2eee5;
  --muted: #aab8bd;
  --gold: #d7b46a;
  --cyan: #71c4d3;
  --green: #22c995;
  --amber: #f5a623;
  --red: #f35b63;
  --signal: var(--amber);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 75% -10%, rgba(113,196,211,.12), transparent 32rem), linear-gradient(160deg, var(--bg-deep), var(--bg) 42%, #0a2130); font: 15px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 1000; padding: .75rem 1rem; background: var(--gold); color: #071019; }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 70px; padding: .7rem clamp(1rem,4vw,3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: rgba(3,10,17,.94); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; min-width: 0; }
.mct-mark { width: 39px; height: 39px; object-fit: contain; }
.brand-rule { width: 1px; height: 35px; margin: 0 .8rem; background: var(--line); }
.product-logo { width: clamp(170px,21vw,260px); height: 43px; object-fit: contain; object-position: left center; }
.live-meta { display: flex; align-items: center; gap: 1.25rem; color: var(--muted); font: 11px var(--mono); }
.live-pill { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); }
.live-pill i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(34,201,149,.1); }

.site-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: .25rem; overflow-x: auto; padding: 0 clamp(1rem,4vw,3rem); background: rgba(6,19,30,.96); border-bottom: 1px solid var(--line); }
.site-nav { scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: 0 0 auto; padding: .85rem 1rem; color: var(--muted); font-size: 12px; border-bottom: 2px solid transparent; }
.site-nav a.active, .site-nav a:hover { color: var(--text); border-bottom-color: var(--gold); }

main { width: min(1460px, calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 3rem; }
.status-strip { margin-bottom: 1rem; padding: .7rem 1rem; color: #c8e5e9; background: rgba(113,196,211,.08); border: 1px solid rgba(113,196,211,.2); border-left: 3px solid var(--cyan); font-size: 12px; }

.warning-panel { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: clamp(1.5rem,4vw,4rem); min-height: 300px; padding: clamp(1.5rem,4vw,3rem); background: linear-gradient(120deg, rgba(14,36,52,.96), rgba(8,24,36,.9)); border: 1px solid var(--line); box-shadow: 0 2rem 6rem rgba(0,0,0,.25); }
.warning-copy { min-width: 0; }
.score-block { text-align: center; }
.score-ring { --score: 0deg; width: 180px; height: 180px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--signal) var(--score), rgba(255,255,255,.08) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #0b1c2a; border: 1px solid var(--line); }
.score-ring div { position: relative; display: flex; align-items: baseline; }
.score-ring strong { font: 700 48px/1 var(--mono); }
.score-ring span { color: var(--muted); font: 12px var(--mono); }
.score-caption { margin-top: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font: 10px var(--mono); }
.eyebrow { margin: 0 0 .45rem; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font: 10px var(--mono); }
.warning-heading { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(2rem,5vw,4rem); line-height: 1.05; }
h2 { font-size: 1.15rem; }
.state-badge { padding: .35rem .7rem; color: var(--signal); background: color-mix(in srgb, var(--signal) 12%, transparent); border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent); font: 700 11px var(--mono); letter-spacing: .08em; }
.headline { margin: 1.25rem 0 .4rem; font-size: clamp(1.05rem,2vw,1.35rem); }
.interpretation { max-width: 900px; margin: 0; color: var(--muted); }
.warning-meta { display: flex; flex-wrap: wrap; gap: .65rem 1.75rem; margin-top: 1.5rem; color: var(--muted); font: 11px var(--mono); }
.warning-meta b { color: var(--text); }

body[data-status="baseline"] { --signal: var(--green); }
body[data-status="watch"] { --signal: var(--amber); }
body[data-status="elevated"] { --signal: #ff8a3d; }
body[data-status="high"], body[data-status="severe"] { --signal: var(--red); }

.component-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin: 1rem 0; }
.component-card { min-width: 0; padding: 1.15rem; background: rgba(11,28,42,.88); border: 1px solid var(--line); }
.component-top { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.component-top b { color: var(--gold); font-family: var(--mono); }
.component-card > strong { display: block; margin: .65rem 0; font: 700 29px var(--mono); }
.component-card small { color: var(--muted); font-size: 10px; }
.meter { height: 5px; margin-bottom: .55rem; overflow: hidden; background: var(--bg-deep); }
.meter i { display: block; height: 100%; background: linear-gradient(90deg,var(--cyan),var(--signal)); }

.content-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,.8fr); gap: 1rem; margin-top: 1rem; }
.panel { min-width: 0; padding: 1.35rem; background: rgba(11,28,42,.88); border: 1px solid var(--line); overflow: hidden; }
.section-panel { margin-top: 1rem; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-note { color: var(--muted); white-space: nowrap; font: 10px var(--mono); }
.text-link { color: var(--gold); font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; }
th { padding: .65rem .7rem; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .08em; font: 9px var(--mono); border-bottom: 1px solid var(--line); }
td { padding: .75rem .7rem; font: 11px var(--mono); border-bottom: 1px solid rgba(219,228,231,.08); }
td:first-child { font-family: var(--sans); }
td b, td small { display: block; }
td small { margin-top: .1rem; color: var(--muted); font-size: 10px; }
.positive { color: var(--amber); }
.negative { color: var(--cyan); }
.direction { display: inline-block; padding: .2rem .45rem; text-transform: uppercase; letter-spacing: .05em; font-size: 9px; border: 1px solid var(--line); }
.direction.surge { color: var(--amber); }
.direction.shortfall { color: var(--cyan); }
.inline-score { display: grid; grid-template-columns: 40px minmax(80px,1fr); align-items: center; gap: .5rem; }
.inline-score i { height: 5px; overflow: hidden; background: var(--bg-deep); }
.inline-score em { display: block; height: 100%; background: linear-gradient(90deg,var(--cyan),var(--amber)); }

.marker-list, .hazard-list { display: grid; gap: .55rem; }
.marker { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid rgba(219,228,231,.08); }
.marker > i { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.marker div { min-width: 0; }
.marker b, .marker span { display: block; }
.marker b { font-size: 12px; }
.marker span { color: var(--muted); font: 9px var(--mono); }
.marker strong { color: var(--muted); font: 9px var(--mono); }

.weather-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }
.weather-card { padding: 1rem; background: rgba(3,10,17,.35); border: 1px solid rgba(219,228,231,.1); }
.weather-card > div:first-child { display: flex; justify-content: space-between; gap: .5rem; }
.weather-card b, .weather-card small { display: block; }
.weather-card > div small { color: var(--muted); font-size: 10px; }
.weather-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; }
.weather-metrics span { color: var(--muted); font: 10px var(--mono); }
.weather-metrics b { color: var(--text); font-size: 18px; }
.weather-metrics small { margin-top: .15rem; }
.weather-card em { color: var(--gold); font: normal 10px var(--mono); }

.hazard { display: block; padding: .75rem; background: rgba(3,10,17,.35); border: 1px solid rgba(219,228,231,.1); }
.hazard > div { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.hazard span, .hazard strong { color: var(--signal); font: 9px var(--mono); }
.hazard b, .hazard small { display: block; }
.hazard b { font-size: 12px; }
.hazard small { margin-top: .15rem; color: var(--muted); font: 9px var(--mono); }

.chart { min-height: 220px; background: rgba(3,10,17,.25); }
.chart svg { display: block; width: 100%; height: 250px; }
.gridline { stroke: rgba(219,228,231,.1); stroke-dasharray: 4 6; }
.history-line { fill: none; stroke: var(--gold); stroke-width: 2; }
.history-point { fill: var(--signal); stroke: #07131d; stroke-width: 2; }

.source-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; }
.source-grid a { min-height: 100px; padding: 1rem; background: rgba(3,10,17,.35); border: 1px solid rgba(219,228,231,.1); }
.source-grid b, .source-grid span { display: block; }
.source-grid b { font-size: 12px; }
.source-grid span { margin-top: .45rem; color: var(--muted); font-size: 10px; }
.empty { color: var(--muted); text-align: center; padding: 2rem; font: 11px var(--mono); }

footer { width: min(1460px,calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 2.5rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
footer a { color: var(--gold); }

@media (max-width: 980px) {
  .component-grid { grid-template-columns: repeat(2,1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .weather-grid, .source-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 660px) {
  .site-header { align-items: flex-start; }
  .brand-rule { margin: 0 .45rem; }
  .mct-mark { width: 33px; height: 33px; }
  .product-logo { width: min(49vw,190px); height: 37px; }
  .live-meta { flex: 0 0 auto; display: block; text-align: right; }
  .live-meta > span:last-child { display: none; }
  main { width: min(100% - 1rem,1460px); }
  .warning-panel { grid-template-columns: 1fr; text-align: center; }
  .warning-heading { justify-content: center; }
  .warning-heading h1 { max-width: 100%; font-size: clamp(1.8rem,9vw,2.35rem); overflow-wrap: anywhere; }
  .warning-meta { justify-content: center; }
  .score-ring { width: 150px; height: 150px; }
  .score-ring strong { font-size: 41px; }
  .component-grid, .weather-grid, .source-grid { grid-template-columns: 1fr; }
  .panel { padding: 1rem; }
  footer { width: calc(100% - 1rem); flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
