/* Force on Force replay. Plain CSS, no build step. */
:root {
  color-scheme: light;
  --bg: #f3f6f7;          /* snow */
  --sheet: #ffffff;
  --ink: #13222b;
  --ink-2: #44545e;
  --ink-3: #74838d;
  --rule: #d3dce1;
  --rule-soft: #e4eaed;
  --us: #1f5fa8;
  --ca: #c8322b;
  --al: #0f9e8c;
  --land: #dbe3e7;
  --land-edge: #ffffff;
  --going: #b4c0c7;
  --band: rgba(19, 34, 43, 0.09);
  --focus: #13222b;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0f171c; --sheet: #141d23; --ink: #e6edf1; --ink-2: #aab9c3; --ink-3: #7d8d98;
    --rule: #2b3842; --rule-soft: #1f2a32; --us: #4f93dd; --ca: #e2574f; --al: #19a38a;
    --land: #26333c; --land-edge: #141d23; --going: #4a5a65; --band: rgba(230, 237, 241, 0.1); --focus: #e6edf1;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f171c; --sheet: #141d23; --ink: #e6edf1; --ink-2: #aab9c3; --ink-3: #7d8d98;
  --rule: #2b3842; --rule-soft: #1f2a32; --us: #4f93dd; --ca: #e2574f; --al: #19a38a;
  --land: #26333c; --land-edge: #141d23; --going: #4a5a65; --band: rgba(230, 237, 241, 0.1); --focus: #e6edf1;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.45 var(--text); font-stretch: 100%;
  font-variant-numeric: tabular-nums;
}
h1, h2, p, figure, ul { margin: 0; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.top, main, footer { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

/* ---- header ---------------------------------------------------------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 14px; flex-wrap: wrap; }
.brand h1 { font: 800 22px/1 var(--display); font-stretch: 125%; letter-spacing: -0.01em; }
.brand p { color: var(--ink-2); font-size: 13px; margin-top: 5px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs button {
  appearance: none; border: 0; background: none; cursor: pointer; text-align: left;
  padding: 8px 16px 9px; border-bottom: 3px solid var(--rule); min-width: 190px;
}
.tabs button strong { display: block; font-weight: 650; font-size: 15px; }
.tabs button span { display: block; color: var(--ink-3); font-size: 12.5px; font-stretch: 88%; }
.tabs button:hover { border-bottom-color: var(--ink-3); }
.tabs button[aria-selected="true"] { border-bottom-color: var(--ink); }
.tabs button[aria-selected="true"] span { color: var(--ink-2); }

/* ---- run picker ------------------------------------------------------ */
.runbar { display: flex; align-items: center; gap: 8px; padding: 10px 0 14px; flex-wrap: wrap; }
.runbar label { font-weight: 650; margin-right: 4px; }
.runbar select, .speed select {
  appearance: none; background: var(--sheet); border: 1px solid var(--rule); border-radius: 5px;
  padding: 6px 30px 6px 10px; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.step { appearance: none; border: 1px solid var(--rule); background: var(--sheet); border-radius: 5px; width: 32px; height: 33px; cursor: pointer; font-size: 18px; line-height: 1; }
.step:hover { border-color: var(--ink-3); }
#run-why { color: var(--ink-2); font-size: 13.5px; margin-left: 8px; }

/* ---- stage: map + panel --------------------------------------------- */
.stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); background: var(--sheet); border-radius: 8px; overflow: hidden; }
.map { padding: 14px 8px 12px 14px; min-width: 0; }
.map svg { display: block; width: 100%; height: auto; }
.shade-toggle { display: flex; align-items: center; gap: 6px; padding: 2px 8px 6px; font-size: 13px; color: var(--ink-2); }
.shade-toggle[hidden] { display: none; }
.shade-toggle button { appearance: none; border: 1px solid var(--rule); background: none; border-radius: 5px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.shade-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.map figcaption { color: var(--ink-3); font-size: 12.5px; padding: 6px 8px 0; max-width: 62ch; }
.prov { fill: var(--land); stroke: var(--land-edge); stroke-width: 1.4; stroke-linejoin: round; }
.prov-ctl { fill: var(--us); stroke: var(--land-edge); stroke-width: 1.4; stroke-linejoin: round; transition: fill-opacity .25s linear; }
.map text { font-family: var(--text); fill: var(--ink-2); }
.map .wx-name { font-size: 15px; font-stretch: 85%; fill: var(--ink-2); }
.map .wx-temp { font-size: 21px; font-weight: 700; fill: var(--ink); }
.map .wx-tag { font-size: 14px; font-stretch: 85%; fill: var(--ink); }
.map .halo { stroke: var(--sheet); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.map .halo-land { stroke: var(--land); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.map .note { font-size: 16px; font-weight: 650; }
.map .note.al { fill: var(--al); }
.map .note.ink { fill: var(--ink); }
.map .ctl-label { font-size: 17px; font-weight: 700; fill: var(--us); }
.map .flow { stroke: var(--al); fill: none; stroke-linecap: round; }
.map .arc { stroke: var(--al); fill: none; stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
.map .neighbour { font-size: 16px; fill: var(--ink-3); font-stretch: 110%; letter-spacing: .04em; }

.panel { padding: 26px 30px 24px 22px; border-left: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.clock-month { font: 800 60px/0.95 var(--display); font-stretch: 118%; letter-spacing: -0.025em; }
.clock-cal { color: var(--ink-2); font-size: 16px; margin-top: 6px; }
.status { font: 400 18px/1.4 var(--serif); max-width: 46ch; min-height: 3.6em; }
.status.final { font-weight: 650; }
.panel h2, .lower h2 { font: 700 14px/1.2 var(--text); font-stretch: 112%; margin-bottom: 10px; }

.break-row { display: grid; grid-template-columns: 112px 1fr 58px; column-gap: 12px; align-items: center; margin-bottom: 12px; }
.break-row .who { font-weight: 600; white-space: nowrap; }
.break-row .bar { height: 14px; background: var(--rule-soft); border-radius: 0 4px 4px 0; position: relative; overflow: hidden; }
.break-row .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 0 4px 4px 0; transition: width .25s linear; }
.fill.us, .key.us { background: var(--us); }
.fill.ca, .key.ca { background: var(--ca); }
.key.al { background: var(--al); }
.key.going { background: var(--going); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; }
.break-row .val { font-weight: 700; text-align: right; }
.break-row .sub { grid-column: 2 / 4; color: var(--ink-2); font-size: 13px; margin-top: 3px; }

.stack { display: flex; gap: 2px; height: 22px; }
.stack span { display: block; min-width: 0; transition: flex-basis .25s linear; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.stack-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.stack-legend b { color: var(--ink); font-weight: 700; }
.allies-line { color: var(--ink-2); font-size: 13.5px; max-width: 54ch; }
.allies-line b { color: var(--ink); font-weight: 650; }

/* ---- transport ------------------------------------------------------- */
.transport { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 0 14px; background: linear-gradient(to bottom, transparent, var(--bg) 22%); margin-top: 6px; }
.play { appearance: none; border: 0; background: var(--ink); color: var(--bg); font-weight: 700; padding: 9px 0; width: 88px; border-radius: 5px; cursor: pointer; }
.play:hover { opacity: .88; }
.speed { color: var(--ink-2); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.scrub { flex: 1; position: relative; padding-top: 12px; min-width: 120px; }
.ticks { position: absolute; left: 9px; right: 9px; top: 0; height: 10px; }
.ticks i { position: absolute; bottom: 0; width: 3px; margin-left: -1.5px; height: 9px; border-radius: 1px; background: var(--ink-3); }
.ticks i.us { background: var(--us); } .ticks i.al { background: var(--al); } .ticks i.ink { background: var(--ink); }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; display: block; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--rule); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 4px; background: var(--rule); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--bg); margin-top: -7px; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 3px solid var(--bg); }
.scrub-label { color: var(--ink-2); font-size: 13.5px; min-width: 150px; text-align: right; }

/* ---- charts ---------------------------------------------------------- */
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 34px; padding: 18px 0 8px; }
.chart h3 { font: 650 14px/1.25 var(--text); margin: 0 0 4px; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--ink-2); min-height: 20px; margin-bottom: 4px; }
.chart .legend b { color: var(--ink); font-weight: 700; margin-left: 4px; }
.chart .legend svg { vertical-align: -1px; margin-right: 5px; }
.chart svg.plot { display: block; width: 100%; overflow: visible; cursor: crosshair; }
.plot text { font-family: var(--text); font-size: 11.5px; font-stretch: 88%; fill: var(--ink-3); }
.plot .grid { stroke: var(--rule-soft); stroke-width: 1; }
.plot .axis { stroke: var(--rule); stroke-width: 1; }
.plot .band { fill: var(--band); }
.plot .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .ghost { fill: none; stroke-width: 1.25; stroke-opacity: .28; stroke-linejoin: round; }
.plot .us { stroke: var(--us); } .plot .ca { stroke: var(--ca); } .plot .al { stroke: var(--al); } .plot .ink { stroke: var(--ink-2); }
.plot .dot.us { fill: var(--us); } .plot .dot.ca { fill: var(--ca); } .plot .dot.al { fill: var(--al); }
.plot .dot { stroke: var(--bg); stroke-width: 2; }
.plot .head { stroke: var(--ink); stroke-width: 1; stroke-opacity: .55; }
.plot .cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.plot .ref { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 5 4; }
.plot .ref-label { fill: var(--ink-2); }
.plot .area-us { fill: var(--us); } .plot .area-ca { fill: var(--ca); } .plot .area-going { fill: var(--going); fill-opacity: .35; }
.plot .area-label { font-size: 13px; font-weight: 650; fill: #fff; font-stretch: 100%; }
.plot .area-label.dark { fill: var(--ink); }
.plot .pt { fill-opacity: .55; }
.plot .pt.us { fill: var(--us); } .plot .pt.ca { fill: var(--ca); } .plot .pt.going { fill: var(--ink-3); }
.plot .this { fill: none; stroke: var(--ink); stroke-width: 2; }
.plot .this-label { font-size: 12.5px; font-weight: 700; fill: var(--ink); font-stretch: 100%; }

/* ---- diary + ensemble ------------------------------------------------ */
.lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 30px 0 10px; align-items: start; }
.diary table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.diary th { text-align: left; font: 600 12.5px/1.2 var(--text); font-stretch: 88%; color: var(--ink-2); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--ink); }
.diary th:first-child { width: 118px; }
.diary td { vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); }
.diary td.when { color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.diary td.what { font: 400 16px/1.4 var(--serif); }
.diary td.what span { display: block; padding-left: 10px; border-left: 3px solid var(--rule); }
.diary td.what span + span { margin-top: 5px; }
.diary td.what span.us { border-left-color: var(--us); } .diary td.what span.al { border-left-color: var(--al); }
.diary td.what span.ca { border-left-color: var(--ca); } .diary td.what span.ink { border-left-color: var(--ink); }
.diary tr.now td.what { font-weight: 600; }
.diary tr.end td.what { font-weight: 700; }
.diary .empty td { color: var(--ink-3); font-family: var(--text); font-size: 14px; }
.ensemble .lede { color: var(--ink-2); font-size: 14px; max-width: 60ch; margin-bottom: 14px; }
.ensemble .chart + .chart { margin-top: 26px; }

.tableview { padding: 18px 0 6px; }
.tableview summary { cursor: pointer; font-weight: 650; }
.tablewrap { overflow-x: auto; margin-top: 10px; }
#figures { border-collapse: collapse; font-size: 13px; white-space: nowrap; }
#figures th, #figures td { padding: 4px 12px 4px 0; text-align: right; border-bottom: 1px solid var(--rule-soft); }
#figures th { font-weight: 600; color: var(--ink-2); font-stretch: 88%; position: sticky; top: 0; }
#figures tr.now td { font-weight: 700; }

footer { padding-top: 26px; padding-bottom: 90px; color: var(--ink-2); font-size: 13px; }
footer p { max-width: 86ch; margin-bottom: 8px; }

.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 5px; padding: 8px 10px; font-size: 13px; line-height: 1.35; max-width: 280px; }
.tip .t-head { font-weight: 700; margin-bottom: 3px; }
.tip .t-row { display: flex; justify-content: space-between; gap: 14px; }
.tip .t-row b { font-weight: 700; }
.tip .t-row i { display: inline-block; width: 12px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }

/* ---- small screens --------------------------------------------------- */
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; }
  .panel { border-left: 0; border-top: 1px solid var(--rule-soft); padding: 20px 18px; }
  .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lower { grid-template-columns: 1fr; }
  .clock-month { font-size: 46px; }
}
@media (max-width: 620px) {
  .top, main, footer { padding-left: 14px; padding-right: 14px; }
  .charts { grid-template-columns: 1fr; }
  .tabs button { min-width: 0; flex: 1 1 150px; padding-left: 8px; padding-right: 8px; }
  .transport { flex-wrap: wrap; gap: 10px; }
  .scrub { flex-basis: 100%; order: 3; }
  .scrub-label { min-width: 0; flex: 1; }
  .break-row { grid-template-columns: 100px 1fr 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .prov-ctl, .break-row .fill, .stack span { transition: none; }
}
