/* Marine Wind Verification. Same dark ops-console look as the wind page and the site's
   /ndfd/ globe (ndfd/css/oceanic.css): glass cards, sky-blue accent. Dark only. */

:root {
  --bg: #070d19;
  --surface: rgba(12, 20, 35, 0.86);
  --surface-solid: #0f1829;
  --surface-raised: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(148, 170, 200, 0.16);
  --border-strong: rgba(148, 170, 200, 0.3);
  --text: #e7eef8;
  --text-2: #a3b3c9;
  --text-3: #6f819a;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --warn: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* one fixed colour per method (dataviz reference palette, dark steps); ensemble means
     take their parent model's colour, dashed */
  --m-windcore: #3987e5;
  --m-best: #7a1f2b;
  --m-nomem: #d95926;
  --m-blend: #199e70;
  --m-gfs: #c98500;
  --m-ecmwf: #d55181;
  --m-aifs: #008300;
  --m-mean3: #9085e9;
  --m-ndfd: #d0d0d0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 13px/1.45 var(--font);
  background: radial-gradient(ellipse at 50% -10%, #14284a 0%, #0a1528 40%, var(--bg) 75%) fixed, var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--text-3); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 20px; min-height: 60px;
  background: rgba(7, 13, 25, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-text h1 { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-text p { font-size: 11px; color: var(--text-3); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.updated { color: var(--text-3); font-size: 11px; margin-right: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-raised); color: var(--text);
  font-weight: 600; font-size: 12px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--surface-hover); }
.btn-ghost { background: transparent; }
.btn[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); border-color: rgba(56, 189, 248, .45); }

.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.03);
}
.segmented button {
  height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-2); font-weight: 600; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.segmented button small { font-weight: 500; color: var(--text-3); margin-left: 3px; }
.segmented button:hover { color: var(--text); background: var(--surface-hover); }
.segmented button[aria-checked="true"] { color: #04121f; background: var(--accent); }
.segmented button[aria-checked="true"] small { color: #0b3a55; }
.segmented button:disabled { opacity: .35; cursor: default; }

select, input[type="date"] {
  height: 32px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-solid); color: var(--text); font-size: 12px;
}
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }

/* ---------- Layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 16px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { font-size: 14px; font-weight: 700; }
.sub { color: var(--text-2); font-size: 12px; }
.card > .sub { margin-bottom: 10px; }
.foot { color: var(--text-3); font-size: 11px; margin-top: 8px; }
.inline { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; margin-left: auto; min-width: 0; max-width: 100%; }
.inline select { min-width: 0; max-width: 100%; }

.controls { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.ctl { display: grid; gap: 5px; min-width: 0; max-width: 100%; }
.ctl-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.note {
  border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); color: #f5dfa0;
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap.narrow { min-width: 0; }
table.score { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.score th, table.score td { padding: 6px 9px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.score th:first-child, table.score td:first-child { text-align: left; }
table.score thead th { color: var(--text-2); font-weight: 600; font-size: 11px; vertical-align: bottom; }
table.score thead tr.group th { color: var(--text); font-size: 12px; text-align: center; border-bottom: 1px solid var(--border-strong); }
table.score thead th small { display: block; color: var(--text-3); font-weight: 500; font-size: 10px; }
table.score th.sep, table.score td.sep { border-left: 1px solid var(--border); }
table.score tbody tr:hover td { background: var(--surface-raised); }
table.score td.best { color: var(--text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
table.score td.na { color: var(--text-3); }
table.score tr.ours td:first-child { font-weight: 700; }
.mname { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.swatch.dash { background-image: linear-gradient(90deg, currentColor 60%, transparent 60%) !important; background-size: 5px 3px !important; }

/* ---------- Charts ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--text-3); font-size: 12px; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--border-strong); background: var(--surface-raised); }
.chip[aria-pressed="false"] .swatch { opacity: .3; }
.charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.charts.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.chart figcaption { font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.plot { position: relative; }
.plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot .grid line { stroke: rgba(148, 170, 200, .12); }
.plot .axis text, .plot text.lbl { fill: var(--text-3); font-size: 10px; }
.plot .zero { stroke: rgba(148, 170, 200, .35); }
.plot path.series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .hover-line { stroke: rgba(231, 238, 248, .35); }
.plot .empty { fill: var(--text-3); font-size: 12px; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 150px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 7px 9px; font-size: 11px; box-shadow: var(--shadow);
}
.tip b { display: block; margin-bottom: 3px; }
.tip .row { display: flex; align-items: center; gap: 6px; }
.tip .row span:last-child { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; color: var(--text); }
.tip .row span:nth-child(2) { color: var(--text-2); }

/* ---------- About sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 30; }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 31; overflow-y: auto;
  background: var(--surface-solid); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--surface-solid); border-bottom: 1px solid var(--border); }
.sheet-head h2 { font-size: 15px; }
.sheet-body { padding: 14px 18px 30px; color: var(--text-2); font-size: 13px; }
.sheet-body h3 { color: var(--text); font-size: 13px; margin: 16px 0 6px; }
.sheet-body ul { padding-left: 18px; margin: 0; }
.sheet-body li { margin-bottom: 6px; }
.sheet-body b { color: var(--text); }

@media (max-width: 900px) {
  .charts, .charts.even { grid-template-columns: minmax(0, 1fr); }
  table.score th:first-child, table.score td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface-solid); }
  main { padding: 12px 16px 30px; }
  .topbar { padding: 10px 16px; }
}
