/* Patch Forecast. A synoptic-chart palette: cool chart paper, navy ink,
   isobar blue, and the three weather-warning colours that carry meaning. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("/static/fonts/archivo-var.woff2") format("woff2-variations"), url("/static/fonts/archivo-var.woff2") format("woff2");
}
:root {
  --paper: #EDF1F4;
  --sheet: #F7F9FA;
  --ink: #0F2233;
  --ink-2: #485B6C;
  --ink-3: #7A8B99;
  --rule: #CBD5DD;
  --isobar: #2F5D8A;
  --red: #C8312B;
  --amber: #E07F00;
  --yellow: #F0C419;
  --clear: #3E8E7E;
  --red-wash: #F7DEDC;
  --amber-wash: #FBE9D1;
  --yellow-wash: #FBF2CC;
  --clear-wash: #DCEDE9;
  --on-yellow: #2B2300;
  --focus: #1D6FD1;
  --radius-s: 3px;
  --radius-l: 10px;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C1823; --sheet: #12212E; --ink: #E5EDF2; --ink-2: #A9B9C6; --ink-3: #7D90A0;
    --rule: #263A4B; --isobar: #86B6E6; --red: #F0605A; --amber: #F59E2E; --yellow: #F2CD3A;
    --clear: #5DB7A5; --red-wash: #3A1A1C; --amber-wash: #3A2810; --yellow-wash: #362F0E; --clear-wash: #12302B;
    --focus: #7FB6FF; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0C1823; --sheet: #12212E; --ink: #E5EDF2; --ink-2: #A9B9C6; --ink-3: #7D90A0;
  --rule: #263A4B; --isobar: #86B6E6; --red: #F0605A; --amber: #F59E2E; --yellow: #F2CD3A;
  --clear: #5DB7A5; --red-wash: #3A1A1C; --amber-wash: #3A2810; --yellow-wash: #362F0E; --clear-wash: #12302B;
  --focus: #7FB6FF; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55; font-variation-settings: "wdth" 100;
  font-feature-settings: "tnum" 1;
}
a { color: var(--isobar); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: 1.45rem; font-weight: 700; font-variation-settings: "wdth" 88; letter-spacing: -.005em; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 .8em; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- masthead */
.masthead { background: var(--ink); color: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .masthead { background: #06111A; color: var(--ink); } }
.masthead-in { display: flex; align-items: center; gap: 28px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800;
  font-size: 1.2rem; font-variation-settings: "wdth" 80; letter-spacing: .01em; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: inherit; opacity: .78; text-decoration: none; padding: 8px 10px; border-radius: var(--radius-s); font-size: .95rem; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 currentColor; border-radius: 0; }
.clock { margin: 0; font-size: .85rem; opacity: .75; }
@media (max-width: 760px) {
  .masthead-in { gap: 6px 16px; padding-top: 10px; padding-bottom: 6px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; margin: 0 -8px; }
  .nav a { white-space: nowrap; }
  .clock { margin-left: auto; }
}

/* ---------------------------------------------------------------- hero / conditions */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.isobars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--isobar); opacity: .13; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 26px; }
.issued { color: var(--ink-2); font-size: .95rem; margin-bottom: 14px; }
.condition { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.condition-word { font-size: clamp(3.1rem, 9vw, 6.6rem); font-weight: 900; font-variation-settings: "wdth" 62;
  line-height: .86; letter-spacing: -.01em; text-wrap: balance; }
.lvl-red .condition-word { color: var(--red); }
.lvl-amber .condition-word { color: var(--amber); }
.lvl-yellow .condition-word { color: var(--ink); }
.lvl-clear .condition-word { color: var(--clear); }
.warn-icon { flex: none; width: clamp(54px, 8vw, 88px); height: auto; }
.due-line { font-size: 1.25rem; font-weight: 650; margin-bottom: 10px; }
.headline { font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.35; font-weight: 500; max-width: 38ch; margin-bottom: 10px; text-wrap: pretty; }
.summary { color: var(--ink-2); max-width: 62ch; }
.byline { font-size: .82rem; color: var(--ink-3); margin-top: 10px; }

.tallies { align-self: end; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.tally { display: grid; grid-template-columns: 14px 1fr auto; align-items: baseline; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.tally:hover .tally-label { text-decoration: underline; }
.tally-swatch { width: 14px; height: 14px; border-radius: 2px; align-self: center; }
.tally-label { font-weight: 600; }
.tally-label small { display: block; font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.tally-n { font-size: 2.3rem; font-weight: 800; font-variation-settings: "wdth" 70; line-height: 1; }
.sw-red { background: var(--red); } .sw-amber { background: var(--amber); }
.sw-yellow { background: var(--yellow); } .sw-clear { background: var(--clear); }
.sw-kev { background: transparent; border: 2px solid var(--ink); transform: rotate(45deg) scale(.8); }

/* pressure strip: the one bold graphic */
.strip-wrap { position: relative; padding-bottom: 28px; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.strip-head h2 { font-size: 1.05rem; font-variation-settings: "wdth" 100; font-weight: 650; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.strip { width: 100%; height: 150px; display: block; }
.strip text { fill: var(--ink-2); font-size: 11px; font-family: inherit; }
.strip .gridline { stroke: var(--rule); stroke-width: 1; }
.strip .now { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.strip .kev { fill: var(--ink); }
.strip rect.bar:hover { opacity: .75; }
.strip-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: .8rem;
  padding: 6px 9px; border-radius: var(--radius-s); white-space: nowrap; transform: translate(-50%, -100%); z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .strip rect.bar { transform-origin: bottom; transform-box: fill-box; animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 9ms); }
  @keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
}

/* ---------------------------------------------------------------- sections */
.section { padding: 40px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head p { margin: 0; color: var(--ink-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; gap: 24px; } }

/* actions: priority order, so numbered */
.actions { list-style: none; margin: 0; padding: 0; counter-reset: act; }
.actions li { counter-increment: act; display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; padding: 16px 0; border-top: 1px solid var(--rule); }
.actions li::before { content: counter(act); grid-row: span 3; font-size: 2rem; font-weight: 800; font-variation-settings: "wdth" 62; line-height: 1; color: var(--ink-3); }
.actions h3 { font-size: 1.08rem; }
.actions p { margin: 0; color: var(--ink-2); }
.act-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; border: 1px solid var(--rule); color: var(--ink); background: transparent; white-space: nowrap; line-height: 1.5; text-decoration: none; }
a.chip:hover { border-color: var(--isobar); }
.chip.red { background: var(--red); border-color: var(--red); color: #fff; }
.chip.amber { background: var(--amber); border-color: var(--amber); color: #1B1200; }
.chip.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }
.chip.clear { background: var(--clear-wash); border-color: var(--clear); }
.chip.kev { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.watch { border-color: var(--isobar); color: var(--isobar); }

/* warnings list */
.warnings { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.warning { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 0 16px; border-bottom: 1px solid var(--rule); }
.warning > .bar { border-radius: 0; }
.warning.red > .bar { background: var(--red); } .warning.amber > .bar { background: var(--amber); }
.warning.yellow > .bar { background: var(--yellow); } .warning.clear > .bar { background: var(--clear); }
.warning button { all: unset; cursor: pointer; display: contents; }
.w-main { padding: 14px 0; min-width: 0; }
.w-id { font-weight: 700; font-size: .9rem; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.w-title { font-weight: 600; font-size: 1.04rem; margin: 2px 0 4px; overflow-wrap: anywhere; }
.w-fix { font-size: .9rem; color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.w-score { padding: 14px 4px 14px 0; text-align: right; }
.w-score b { display: block; font-size: 1.9rem; font-weight: 800; font-variation-settings: "wdth" 66; line-height: 1; }
.w-score span { font-size: .75rem; color: var(--ink-3); }
.warning:hover .w-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.warning:focus-within { outline: 3px solid var(--focus); outline-offset: -3px; }

/* outlook grid: small multiples */
.outlook { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); column-gap: 28px; border-top: 2px solid var(--ink); }
.ol { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: inherit; text-decoration: none; }
.ol:hover .ol-area { text-decoration: underline; }
.ol-area { font-weight: 650; }
.ol-n { font-size: 1.5rem; font-weight: 800; font-variation-settings: "wdth" 66; line-height: 1; grid-row: span 2; align-self: center; }
.ol-meta { font-size: .82rem; color: var(--ink-2); }
.ol-meta i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; background: var(--sheet); }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.langs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.langs a { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.langs a:hover .lang-name { text-decoration: underline; }
.lang-name { font-weight: 650; }
.lang-n { font-size: 1.5rem; font-weight: 800; font-variation-settings: "wdth" 66; line-height: 1; grid-row: span 3; align-self: center; }
.lang-bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; background: var(--rule); }
.lang-bar span { display: block; height: 100%; }
.lang-meta { font-size: .82rem; color: var(--ink-2); }
.outlook-notes { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.outlook-notes li { padding-left: 14px; border-left: 3px solid var(--isobar); }
.outlook-notes b { display: block; }

.bulletins { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.bulletins li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.bulletins a { font-weight: 600; color: var(--ink); text-decoration: none; }
.bulletins a:hover { color: var(--isobar); text-decoration: underline; }
.b-meta { font-size: .82rem; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.b-meta .src { font-weight: 600; }

/* filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; padding: 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-l); }
.field { display: grid; gap: 4px; font-size: .82rem; color: var(--ink-2); }
.field input, .field select, .field textarea { font-size: .95rem; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); min-height: 40px; }
.field input[type="search"] { min-width: 240px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; min-height: 40px; }
.check input { width: 18px; height: 18px; accent-color: var(--isobar); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-s);
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--isobar); border-color: var(--isobar); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--sheet); }
.btn[disabled] { opacity: .5; cursor: wait; }
.pager { display: flex; gap: 10px; align-items: center; margin: 18px 0 40px; }
.empty { padding: 28px 0; color: var(--ink-2); }
.notice { padding: 12px 14px; border-left: 4px solid var(--isobar); background: var(--sheet); margin: 0 0 16px; }

/* ---------------------------------------------------------------- drawer */
.drawer { position: fixed; inset: 0; z-index: 40; visibility: hidden; }
.drawer[aria-hidden="false"] { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(6, 17, 26, .45); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--paper); overflow-y: auto;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.7,.2,1); box-shadow: -12px 0 40px rgba(6,17,26,.25); }
.drawer[aria-hidden="false"] .drawer-scrim { opacity: 1; }
.drawer[aria-hidden="false"] .drawer-panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer-panel, .drawer-scrim { transition: none; } }
.drawer-close { position: sticky; top: 12px; float: right; margin: 12px 16px 0 0; z-index: 2; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: var(--radius-s); padding: 6px 12px; cursor: pointer; font-weight: 600; }
.d-banner { padding: 26px 28px 20px; color: #fff; }
.d-banner.red { background: var(--red); } .d-banner.amber { background: var(--amber); color: #1B1200; }
.d-banner.yellow { background: var(--yellow); color: var(--on-yellow); } .d-banner.clear { background: var(--clear); }
.d-banner .d-level { font-size: 2.2rem; font-weight: 900; font-variation-settings: "wdth" 62; line-height: 1; }
.d-banner .d-due { font-weight: 600; margin-top: 4px; }
.d-body { padding: 22px 28px 60px; }
.d-id { font-weight: 700; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.d-title { font-size: 1.5rem; font-weight: 700; margin: 6px 0 14px; overflow-wrap: anywhere; font-variation-settings: "wdth" 90; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-top: 2px solid var(--ink); margin: 0 0 22px; }
.facts div { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: .78rem; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; font-size: 1.15rem; }
.d-sec { margin: 26px 0 0; }
.d-sec h3 { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.reasons { margin: 0; padding-left: 20px; }
.reasons li { margin: 2px 0; }
.triage dl { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; }
.triage dt { color: var(--ink-2); font-size: .9rem; }
.triage dd { margin: 0; }
.attribution { font-size: .8rem; color: var(--ink-3); margin-top: 8px; }
.steps { margin: 0; padding-left: 20px; }
.pk { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pk th, .pk td { text-align: left; padding: 7px 8px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.pk th { font-weight: 600; color: var(--ink-2); font-size: .8rem; }
.refs { margin: 0; padding-left: 18px; font-size: .9rem; overflow-wrap: anywhere; }
.desc { white-space: pre-line; color: var(--ink-2); max-height: 18em; overflow: auto; }
.team-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.team-form .wide { grid-column: 1 / -1; }
.answer { white-space: pre-line; background: var(--sheet); border-left: 3px solid var(--isobar); padding: 12px 14px; margin-top: 10px; }
@media (max-width: 560px) { .triage dl, .team-form { grid-template-columns: 1fr; } .d-banner, .d-body { padding-left: 18px; padding-right: 18px; } }

/* ---------------------------------------------------------------- how it works */
.prose { max-width: 70ch; }
.prose h2 { margin: 32px 0 10px; }
.prose ul { padding-left: 20px; }
.method { width: 100%; border-collapse: collapse; margin: 10px 0 18px; }
.method th, .method td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.method th { font-size: .82rem; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid var(--ink); }
.src-table td:first-child { font-weight: 600; }
.ok { color: var(--clear); font-weight: 600; } .bad { color: var(--red); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.footer { margin-top: 56px; border-top: 1px solid var(--rule); background: var(--sheet); }
.footer-in { padding-top: 22px; padding-bottom: 28px; font-size: .88rem; color: var(--ink-2); max-width: var(--wrap); }
.footer-in p { max-width: 90ch; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-s); z-index: 60; font-weight: 600; }
.skeleton { color: var(--ink-3); padding: 60px 0; }

code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86em; background: var(--sheet);
  border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 1px 5px; overflow-wrap: anywhere; }
