:root {
  color-scheme: dark;
  --page: #0b0c0e;
  --surface: #16171a;
  --surface-2: #1d1f23;
  --border: rgba(255, 255, 255, 0.09);
  --text: #ffffff;
  --text-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;

  --s1: #3987e5; /* blue   */
  --s2: #d95926; /* orange */
  --s3: #199e70; /* aqua   */
  --s4: #c98500; /* yellow */
  --s5: #d55181; /* magenta */
  --s6: #008300; /* green  */

  --good: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  --aurora: #3ee08f;
  --radius: 14px;
  --gutter: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
a { color: var(--s1); }
button { font: inherit; }

.aurora-glow {
  position: fixed; inset: 0 0 auto 0; height: 340px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 80% at 20% 0%, rgba(62, 224, 143, 0.13), transparent 70%),
    radial-gradient(50% 70% at 85% 0%, rgba(144, 133, 233, 0.12), transparent 70%);
}

/* ---------- top bar + nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 12, 14, 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 10px var(--gutter) 0; }
.brand { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.brand .home { color: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.brand h1 { font-size: 15px; letter-spacing: 0.16em; margin: 0; font-weight: 700; }
.brand h1 span { color: var(--aurora); }
.brand .sub { color: var(--muted); font-size: 12px; }
.brand-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mode { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mode button { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 12px; padding: 3px 11px; cursor: pointer; }
.mode button.on { background: var(--aurora); color: #0b0c0e; font-weight: 700; }
/* Basic view: one screen, the rest of the page hidden */
#basic { display: none; max-width: 760px; margin: 0 auto; }
body.basic-mode #basic { display: block; }
body.basic-mode main > section:not(#basic), body.basic-mode nav.tabs { display: none; }
.b-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-top: 12px; min-width: 0; }
.b-k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.bplace { font-size: 20px; font-weight: 800; margin-top: 6px; }
.bplace-s { font-size: 13px; color: #dfe7f2; margin-bottom: 2px; }
.b-big { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.b-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.b-dot.g { background: #1faa59; box-shadow: 0 0 18px #1faa59; } .b-dot.y { background: #f2c230; box-shadow: 0 0 18px #f2c230; } .b-dot.n { background: #555a63; }
.b-verdict { font-size: 30px; font-weight: 800; }
.b-verdict small { font-size: 20px; font-weight: 700; color: var(--text-2); margin-left: 6px; }
.b-sub { font-size: 14px; color: var(--text-2); }
.bfx { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 6px; }
.bf { border-radius: 12px; padding: 10px 12px; border: 1px solid; min-width: 0; }
.bf .h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.bf .w { font-size: 19px; font-weight: 800; margin: 3px 0 2px; }
.bf .s { font-size: 12px; opacity: .9; }
.bf.ok { background: rgba(31,170,89,.12); border-color: rgba(31,170,89,.5); color: #8fe3b3; }
.bf.mid { background: rgba(242,194,48,.12); border-color: rgba(242,194,48,.5); color: #f5d77a; }
.bf.bad { background: rgba(208,59,59,.12); border-color: rgba(208,59,59,.5); color: #f0a3a3; }
.bline { font-size: 14px; color: var(--text); margin: 0 0 6px; }
.bstorm { font-size: 13px; line-height: 1.45; color: #f5d36b; background: rgba(242,194,48,.08); border: 1px solid rgba(242,194,48,.45);
  border-radius: 10px; padding: 7px 10px; margin: 8px 0 4px; cursor: pointer; }
.bstorm b { color: #f2c230; }
.blive { font-size: 13px; line-height: 1.45; color: #ffb4a8; background: rgba(226,75,74,.10); border: 1px solid rgba(226,75,74,.55); border-radius: 10px; padding: 7px 10px; margin: 8px 0 4px; cursor: pointer; }
.blive b { color: #ff7b6e; }
.bstrong { font-size: 13px; line-height: 1.45; color: #8fe3b3; background: rgba(31,170,89,.10); border: 1px solid rgba(31,170,89,.45); border-radius: 10px; padding: 7px 10px; margin: 2px 0 8px; }
#storm { margin-bottom: 14px; border-color: rgba(242,194,48,.45); }
#storm h3 { margin-top: 0; color: #f2c230; }
#storm p { font-size: 14px; }
#storm .shock { color: #f5d36b; }
#storm .why { color: var(--muted); font-size: 12px; }
#storm .ok { color: #5fd35f; }
table.storm td, table.storm th { text-align: left; white-space: normal; }
.tapgo { cursor: pointer; }
.nt.tapgo > .b-k::after, .bf.tapgo > .h::after, .b-card.tapgo > .b-k::after { content: ' ›'; color: var(--aurora); font-weight: 700; }
.bgo { color: var(--aurora); font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.binland { margin: 2px 0 8px; font-size: 13px; }
/* things you tap or drag a finger across: no text selection and no long-press menu (as on the charts) */
.hpc, .magspark, .bstrip, .pstrip, .vstrip, .vaxis, .tapgo, .bnc, .night, .bf, .nt, tr.pick, .daytabs, #mode, .bstorm, .binland > summary {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.binland summary { cursor: pointer; color: var(--text-2); }
.binland .ok, .inl .ok, table.itab .ok { color: #5fd35f; }
.binland .b-sub { margin-top: 4px; }
.inl { margin: 14px 0 6px; }
.inl h4 { margin: 0 0 4px; font-size: 14px; }
.inl p { margin: 4px 0; font-size: 13px; }
table.itab td, table.itab th { padding: 3px 2px; text-align: center; font-size: 11px; }
table.itab th:first-child { padding-right: 6px; }
table.itab th:first-child { text-align: left; white-space: nowrap; }
table.itab th small { display: block; font-weight: 400; color: var(--muted); }
table.itab .bico { display: block; width: 14px; height: 14px; margin: 0 auto 1px; }
table.itab td.past { opacity: .4; }
.bchange { font-size: 12px; color: #f2c230; margin: 0 0 6px; }
.bstrip { display: grid; gap: 4px; margin-top: 14px; }
.bstrip div { text-align: center; font-size: 11px; color: var(--muted); }
.bstrip div.past { opacity: .35; }
.bstrip > div { cursor: pointer; border-radius: 7px; padding: 2px 0; }
.bstrip > div.sel { outline: 2px solid var(--aurora); }
.bwhy { font-size: 12px; color: var(--text-2); margin-top: 8px; min-height: 18px; line-height: 1.5; }
.bwhy .k, .bhow .k { display: inline-block; padding: 0 6px; border-radius: 4px; color: #0b0c0e; font-weight: 700; font-size: 11px; }
.bwhy .vs { color: var(--text); } .bwhy .vs.ok { color: #5fd35f; }
.bwhy .kp { display: inline-block; padding: 0 6px; border-radius: 4px; font-weight: 700; font-size: 11px; background: #8b5cf6; color: #fff; }
.b-sym { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #0b0c0e; }
.b-sym.g { background: #1faa59; box-shadow: 0 0 18px #1faa59; } .b-sym.y { background: #f2c230; } .b-sym.n { background: #e5484d; color: #fff; } .b-sym.u { background: #555a63; color: #fff; }
.bwhy .k.g { background: #1faa59; } .bwhy .k.y { background: #f2c230; } .bwhy .k.n { background: #3a3d44; color: var(--text); } .bwhy .k.t { background: #3a4a86; color: var(--text); }
.bstrip i { display: block; height: 30px; border-radius: 6px; margin-bottom: 4px; }
.bstrip .bico { display: block; width: 16px; height: 16px; margin: 0 auto 3px; }
.bstrip .g, .blegend .g, .bnc .bar.g { background: #1faa59; }
.bstrip .y, .blegend .y, .bnc .bar.y { background: #f2c230; }
.bstrip .n, .blegend .n, .bnc .bar.n { background: #3a3d44; }
.bstrip .t, .blegend .t, .bhow .k.t { background: #3a4a86; }
.bstrip .x { background: #2a2c31; }
.bstrip .u, .blegend .u { background: repeating-linear-gradient(45deg, #23252b 0 4px, #2f3239 4px 8px); }
.blegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.bcurve { display: grid; gap: 4px; align-items: end; height: 32px; margin-top: 2px; }
.bcurve b { display: block; background: rgba(62,224,143,.45); border-radius: 3px 3px 0 0; }
.blegend .cv { background: rgba(62,224,143,.45); }
.blegend.bsky { margin-top: 4px; }
.blegend.bsky svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.blegend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.now3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
@media (max-width: 560px) { .now3 { grid-template-columns: 1fr; } .b-verdict { font-size: 26px; } }
.nt { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; }
.nt .v { font-size: 20px; font-weight: 800; margin: 4px 0 2px; }
.nt .s { font-size: 12px; color: var(--text-2); }
.nt .a-charging { color: #f2c230; } .nt .a-possible { color: #9fd13b; } .nt .a-low { color: var(--text-2); } .nt .a-active, .nt .a-strong, .nt .ok2, .blast .ok2 { color: #5fd35f; } .nt .a-strong { text-shadow: 0 0 12px #1faa59; }
.bnights { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.bnc { flex: none; width: 96px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.bnc .d { font-size: 11px; color: var(--text-2); font-weight: 600; }
.bnc .p { font-size: 11px; color: var(--muted); min-height: 28px; line-height: 1.2; }
.bnc .v { font-size: 20px; font-weight: 800; }
.bnc .bar { height: 5px; border-radius: 3px; margin-top: 4px; }
.bnc { position: relative; }
.bnc::after { content: '›'; position: absolute; top: 4px; right: 8px; font-size: 18px; color: var(--aurora); }
.btap { color: var(--aurora); font-weight: 600; text-transform: none; letter-spacing: 0; }
.bupd { margin-left: 6px; padding: 1px 9px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--aurora);
  font: inherit; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; }
.bupd:disabled { color: var(--muted); cursor: default; }
.bnc .r { font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.blast { font-size: 14px; margin-top: 4px; }
.btag { font-size: 10px; color: #0b0c0e; background: #f2c230; border-radius: 4px; padding: 1px 6px; font-weight: 700; letter-spacing: .06em; margin-left: 6px; }
.rowlab { font-size: 11px; color: var(--muted); margin: 10px 0 3px; }
.pstrip { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.pstrip div { text-align: center; font-size: 11px; color: var(--muted); }
.pstrip i { display: block; height: 22px; border-radius: 5px; margin-bottom: 3px; }
.pstrip > div { cursor: pointer; border-radius: 6px; padding: 2px 0; }
.pstrip > div.sel { outline: 2px solid var(--aurora); }
.pstrip .bico { display: block; width: 14px; height: 14px; margin: 0 auto 2px; }
.pstrip .a, .blegend .a { background: #1faa59; } .pstrip .cl, .blegend .cl { background: #6d8bbd; }
.pstrip .c, .blegend .c { background: #3a3d44; } .pstrip .m, .blegend .m { background: #3a4a86; }
.pstrip .na { background: #1c1d21; border: 1px dashed #3a3d44; }
.bhow { margin: 14px 0 4px; font-size: 12px; color: var(--text-2); }
.bhourly > summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--text); padding: 2px 0; }
.bcams-t { font-size: 15px; font-weight: 700; color: var(--text); }
.b-card.tapgo > .bcams-t::after { content: ' ›'; color: var(--aurora); font-weight: 700; }
.bhourly > summary::after { font-size: 12px; padding: 3px 10px; }
.bhourly[open] > summary { margin-bottom: 10px; }
.bhow summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.bhow p { margin: 8px 0; line-height: 1.5; }
.bhow .k { display: inline-block; padding: 0 6px; border-radius: 4px; color: #0b0c0e; font-weight: 700; font-size: 11px; }
.bhow .k.g { background: #1faa59; } .bhow .k.y { background: #f2c230; } .bhow .k.n { background: #3a3d44; color: var(--text); } .bhow .k.t { color: var(--text); }
.balerts { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }
.badv { display: block; text-align: center; margin: 10px 0 6px; color: var(--aurora); font-size: 13px; }
.fresh { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); flex: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.bad { background: var(--critical); box-shadow: 0 0 8px var(--critical); }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0 8px; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a {
  flex: none; text-decoration: none; color: var(--text-2); font-size: 13px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
}
nav.tabs a:hover, nav.tabs a.active { color: var(--text); border-color: rgba(255,255,255,.28); background: var(--surface-2); }

main { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 14px var(--gutter) 60px; }
section { margin-top: 26px; }
h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 16px; margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 13px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* ---------- phase stepper ---------- */
.phase { display: grid; gap: 12px; }
.phase-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.countdown { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.step { padding: 8px 6px 0; border-top: 3px solid var(--axis); font-size: 11px; color: var(--muted); }
.step b { display: block; color: var(--text-2); font-size: 12px; font-weight: 600; }
.step.done { border-top-color: #4b6a55; }
.step.now { border-top-color: var(--aurora); color: var(--text-2); }
.step.now b { color: var(--aurora); }
@media (max-width: 560px) { .step span { display: none; } }

/* ---------- hero ---------- */
.hero { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .hero { grid-template-columns: 300px 1fr; align-items: center; } }
.gauge-wrap { display: grid; justify-items: center; gap: 4px; text-align: center; }
.gauge-wrap .kicker { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.gauge-wrap .place { font-size: 18px; font-weight: 650; }
.gauge-wrap .when { color: var(--text-2); font-size: 13px; }
.factors { display: grid; gap: 12px; }
.factor { display: grid; grid-template-columns: 112px 1fr 44px; gap: 4px 10px; align-items: center; }
.factor .name { font-size: 13px; color: var(--text-2); }
.factor .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.factor .why { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -2px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
.notes { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.notes li { font-size: 13px; color: var(--text-2); padding-left: 16px; position: relative; }
.notes li::before { content: "›"; position: absolute; left: 2px; color: var(--aurora); }
.formula { font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; }

/* ---------- rating chip ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .06em; border: 1px solid; }
.chip.good { color: var(--good); border-color: var(--good); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chip.serious { color: var(--serious); border-color: var(--serious); }
.chip.critical { color: var(--critical); border-color: var(--critical); }
.conf { font-size: 11px; color: var(--muted); border: 1px dashed var(--axis); border-radius: 999px; padding: 1px 8px; }

/* ---------- nights ---------- */
.nights { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .nights { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1020px) { .nights { grid-template-columns: repeat(7, 1fr); } }
.night {
  text-align: left; cursor: pointer; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 11px; display: grid; gap: 5px; position: relative; min-height: 132px;
}
.night:hover { border-color: rgba(255,255,255,.25); }
.night.sel { border-color: var(--aurora); box-shadow: 0 0 0 1px var(--aurora) inset; }
.night.past { background: transparent; border-style: dashed; align-content: start; }
.night.past .p { min-height: 0; }
.tag-past { font-size: 9px; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-weight: 600; vertical-align: middle; }
.pastres { font-size: 15px; font-weight: 700; margin: 8px 0 4px; }
#last-night > summary { cursor: pointer; color: var(--text-2); }
#last-night[open] > summary { margin-bottom: 6px; }
.ln-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--border); }
.ln-row .k { color: var(--muted); font-size: 12px; }
@media (max-width: 520px) { .ln-row { grid-template-columns: 1fr; gap: 0; } }
.pastres.ok { color: var(--aurora); }
.pastres.why { color: var(--text-2); }
.pastres.y { color: #f2c230; } .pastres.n { color: #e5484d; }
.night.tonight::after { content: "TONIGHT"; position: absolute; top: 9px; right: 9px; font-size: 9px; letter-spacing: .1em; color: var(--aurora); }
.night .d { font-size: 12px; color: var(--text-2); font-weight: 600; }
.night .p { font-size: 12px; color: var(--muted); line-height: 1.25; min-height: 30px; }
.night .pct { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.night .mini { font-size: 11px; color: var(--text-2); line-height: 1.35; }
.tag-arctic { font-size: 9px; letter-spacing: .1em; color: #9085e9; border: 1px solid #4a3f96; border-radius: 4px; padding: 0 4px; width: max-content; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.chart svg, .bstrip, .pstrip, .hpc { touch-action: pan-y; }
.st { display: inline-block; min-width: 40px; text-align: center; font-weight: 700; font-size: 11px; letter-spacing: .06em; border-radius: 6px; padding: 1px 6px; border: 1px solid; }
.st.go { color: var(--good); border-color: var(--good); background: rgba(12, 163, 12, 0.14); }
.st.try { color: var(--warn); border-color: var(--warn); }
.st.no { color: var(--muted); border-color: var(--axis); }
.st.unk { color: var(--text-2); border-color: var(--axis); border-style: dashed; }
/* confidence signal bars */
.sig { display: inline-flex; align-items: flex-end; gap: 6px; font-size: 11px; color: var(--text-2); width: max-content; }
.sig .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.sig .bars i { width: 3px; border-radius: 1px; background: var(--axis); }
.sig .bars i.on { background: var(--aurora); }

/* hour-by-hour timeline */
.sunstrip { display: flex; gap: 4px; margin: 8px 0 10px; }
.sunstrip > div { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10px; line-height: 1.2; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 2px; }
.sunstrip b { display: block; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; margin-bottom: 1px; }
@media (min-width: 560px) { .sunstrip { gap: 6px; } .sunstrip > div { font-size: 11px; } .sunstrip b { font-size: 16px; } }
.evi { color: var(--warn); margin-right: 5px; font-size: 12px; }
.evi.dark_start, .evi.dark_end { color: #9085e9; }
.evi.depart, .evi.arrive { color: var(--s1); }
.sunstrip .evi { display: block; margin: 0 0 2px; }
.win { border-radius: 10px; padding: 7px 11px; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.win.go { background: rgba(12, 163, 12, 0.16); color: #5fd35f; }
.win.try { background: rgba(250, 178, 25, 0.14); color: var(--warn); }
.win.none { background: var(--surface-2); color: var(--muted); font-weight: 400; }
.hours2 { display: grid; gap: 2px; }
.hr { display: grid; grid-template-columns: 44px 50px minmax(0, 1fr) 92px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; font-size: 13px; }
.hr.go { background: rgba(12, 163, 12, 0.13); }
.hr.try { background: rgba(250, 178, 25, 0.10); }
.hr.day .tm, .hr.day .cv, .hr.day .kp { color: var(--muted); }
.hr .kp { text-align: right; font-size: 12px; color: var(--text-2); }
.hr .ok { color: #5fd35f; }
.hr .why { color: var(--muted); font-size: 11px; }
.cb { display: flex; align-items: center; gap: 6px; }
.bar2 { position: relative; flex: 1; height: 8px; background: #25272c; border-radius: 4px; }
.bar2 i { position: absolute; left: 0; top: 0; bottom: 0; background: #3987e5; border-radius: 4px; }
.bar2 s { position: absolute; top: -3px; width: 3px; height: 14px; background: #fff; border-radius: 2px; }
.cv { width: 34px; text-align: right; font-size: 12px; color: var(--text-2); }
.st.day { color: var(--muted); border-color: transparent; font-weight: 500; font-size: 10px; letter-spacing: 0; min-width: 0; padding: 1px 0; }
.st.far { color: var(--muted); border-color: var(--axis); border-style: dashed; }
.hr.head, .hr.head .kp { font-size: 10px; color: var(--muted); padding-top: 0; padding-bottom: 2px; text-transform: uppercase; letter-spacing: .05em; }
.bar2 i { background: #199e70 !important; }
.met { font-size: 10px; color: var(--text-2); border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.cb .met { flex: none; width: 60px; text-align: center; }
.sky { display: flex; flex-direction: column; gap: 3px; font-size: 13px; min-width: 0; }
.sky .l1 { display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sky .l2 { display: flex; align-items: center; gap: 6px; font-size: 10px; white-space: nowrap; }
.sky .rng { font-size: 10px; color: var(--muted); }
.sky.clear .l1 { color: var(--text); font-weight: 600; }
.sky.broken .l1 { color: var(--text-2); }
.sky.overcast .l1, .sky.none { color: var(--muted); }
.cbar { position: relative; flex: 1; min-width: 40px; max-width: 160px; height: 6px; background: #25272c; border-radius: 3px; }
.cbar i { position: absolute; left: 0; top: 0; bottom: 0; background: #6b7280; border-radius: 3px; }
.cbar i.ok { background: #199e70; }
.cbar em { position: absolute; left: 40%; top: -3px; width: 2px; height: 12px; background: #fff; border-radius: 1px; }
.sky .under { color: #5fd35f; }
.sky .over { color: var(--muted); }
.hr.lowskill .tm, .hr.lowskill .sky, .hr.lowskill .kp { opacity: 0.7; }
.hr { grid-template-columns: 42px 50px minmax(0, 1fr) 80px !important; }
.srcline { font-size: 12px; color: var(--text-2); margin: 8px 0 4px; }
.farbox { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.fb .k { font-size: 11px; color: var(--muted); }
.fb .v { font-size: 20px; font-weight: 700; margin: 2px 0; }
.fb .s { font-size: 11px; color: var(--text-2); }
.mettag { font-size: 9px; letter-spacing: .08em; color: #9ec5f4; border: 1px solid #3987e5; border-radius: 4px; padding: 0 4px; }
.hr .cb { min-width: 0; }
/* itinerary status + weather */
.itin-now { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; flex-wrap: wrap; }
.itin-now b { color: var(--text); }
.wxi { width: 26px; height: 26px; vertical-align: middle; }
table.wx td, table.wx th { padding: 4px 3px; }
table.wx tr.wxday td { padding: 9px 3px 3px; font-size: 12px; font-weight: 700; color: var(--aurora); text-align: left; }
table.wx th small { font-weight: 400; color: var(--muted); }
table.wx .wxi { width: 24px; height: 24px; }
table.wx td:nth-child(2) { text-align: left; }
.warr { display: inline-block; margin-right: 4px; color: var(--text-2); }
.wx-cold { color: #86b6ef; font-weight: 600; }
.wx-orange { color: var(--serious); font-weight: 600; }
.wx-red { color: var(--critical); font-weight: 700; }
.wx-wet { color: #9ec5f4; }
.wx-uv { color: var(--warn); font-weight: 600; }
div.why { color: var(--muted); font-size: 11px; line-height: 1.4; }
.cmf { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 7px; border: 1px solid; white-space: nowrap; }
.cmf-calm { color: #5fd35f; border-color: rgba(12, 163, 12, 0.6); }
.cmf-gentle { color: var(--text-2); border-color: var(--axis); }
.cmf-rough { color: var(--warn); border-color: var(--warn); }
.cmf-vrough { color: var(--critical); border-color: var(--critical); }
.wx-snow { font-size: 10px; color: #dfe6ff; border: 1px solid #5a6b8a; border-radius: 4px; padding: 0 3px; }
.wx-sum { font-size: 13px; color: var(--text-2); margin: 6px 0; }
.wx-sea { font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 10px 0; }
.wx-now, .spot { border-top: 1px solid var(--border); padding: 8px 0; }
.wx-now { border: 1px solid rgba(62, 224, 143, 0.35); background: rgba(62, 224, 143, 0.06); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.wx-now > summary { font-size: 14px; color: var(--text); }
/* Every dropdown: no browser triangle, a clear pill on the right that says what a tap does */
/* the Show/Hide button floats right inside its summary: the summary must contain it, or a scrolling table below
   (a new block formatting context) shrinks beside it and gets a needless sideways scroll */
details > summary { list-style: none; display: flow-root; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: 'Show ▾'; float: right; margin-left: 10px; font-size: 11px; font-weight: 600; color: var(--aurora);
  border: 1px solid rgba(62, 224, 143, 0.45); border-radius: 999px; padding: 1px 9px; line-height: 1.6; white-space: nowrap; }
details[open] > summary::after { content: 'Hide ▴'; color: var(--text-2); border-color: var(--border); }
details > summary:hover::after { background: rgba(62, 224, 143, 0.12); }
.wx-now summary, .spot summary { cursor: pointer; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.achip { font-size: 12px; color: var(--text); background: rgba(57, 135, 229, 0.14); border: 1px solid rgba(57, 135, 229, 0.4); border-radius: 999px; padding: 2px 9px; }
.wx-alerts { margin-bottom: 12px; }
.wx-alerts summary { cursor: pointer; color: var(--text-2); }
.walert { border-left: 3px solid var(--warn); padding: 4px 10px; margin: 8px 0; font-size: 13px; border-radius: 0; }
.walert.serious { border-left-color: var(--serious); }
.walert.critical { border-left-color: var(--critical); }
.daytabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.daytabs .btn { padding: 5px 10px; font-size: 13px; }
.daytabs .btn.on { border-color: var(--aurora); background: rgba(62, 224, 143, 0.10); }
.versum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.versum > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.versum b { display: block; font-size: 20px; }
.versum span { font-size: 11px; color: var(--text-2); }
tr.pick { cursor: pointer; }
table.itin td, table.itin th { white-space: normal; }
table.itin td:nth-child(2), table.itin th:nth-child(2) { text-align: left; }
table.itin tr.sea td { color: var(--muted); }
table.itin tr.past td { opacity: 0.55; }
table.itin tr.today td { background: rgba(62, 224, 143, 0.10); color: var(--text); }
table.itin tr.today td:first-child::after { content: " · today"; color: var(--aurora); font-size: 11px; }
tr.pick.sel td { background: rgba(62, 224, 143, 0.08); }
.ev { display: flex; align-items: center; font-size: 12px; color: var(--text-2); padding: 4px 8px; border-top: 1px dashed var(--axis); margin: 2px 0; }
table.hours td:nth-child(2), table.hours th:nth-child(2) { text-align: left; }
table.hours th, table.hours td { padding: 6px 6px; vertical-align: top; }
table.hours .why { color: var(--muted); font-size: 11px; font-weight: 400; }
table.hours .why.block { display: block; line-height: 1.2; margin-top: 2px; }
table.hours tr.dim .why.block { margin-top: 0; }
table.hours tr.dim td { color: var(--muted); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .lbl { fill: var(--text-2); }
.chart text.ref { fill: var(--text-2); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin: 4px 0 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.legend i.line { height: 3px; border-radius: 2px; vertical-align: 3px; }
.legend i.dotm { border-radius: 50%; width: 9px; height: 9px; vertical-align: 0; }
.legend i.band { background: #25272c; border: 1px solid var(--axis); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 150px; max-width: 250px;
  background: #0f1012; border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
  padding: 8px 10px; font-size: 12px; color: var(--text-2); box-shadow: 0 8px 24px rgba(0,0,0,.5);
  display: none;
}
.tip b { color: var(--text); }
.tip .row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 13px; }
details.table { margin-top: 10px; }
details.table summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
th, td { padding: 5px 8px; border-bottom: 1px solid var(--grid); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; }

/* ---------- live ---------- */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.tile .k { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.tile .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .s { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.tile.wide { grid-column: span 2; }
.hpc { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 96px; align-items: end; margin: 10px 0 2px; }
.hpc > div[data-t] { height: 100%; display: flex; align-items: flex-end; cursor: pointer; border-radius: 3px; }
.hpc > div[data-t] i { display: block; width: 100%; background: #555a63; border-radius: 2px 2px 0 0; }
.hpc > div[data-t] i.ok { background: #1faa59; }
.hpc > div[data-t].sel { outline: 2px solid var(--aurora); outline-offset: 1px; }
.hpc .need { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed #e8743b; pointer-events: none; }
.hpc .need span { position: absolute; left: 0; bottom: 2px; font-size: 10px; color: #e8743b; background: var(--surface); padding: 0 3px; }
.hpax { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.hpax span { white-space: nowrap; overflow: visible; }
#lt-hp .bwhy { margin-top: 2px; }
.magspark { display: block; width: 100%; height: 34px; margin: 4px 0 2px; }
.magarrow { font-size: 20px; color: #9fd3ff; }
.magword { font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #2a2d33; color: var(--text-2); vertical-align: middle; }
.magword.rising { background: rgba(242,194,48,.18); color: #f2c230; } .magword.substorm { background: rgba(31,170,89,.22); color: #5fd35f; }
.magword.moving { background: rgba(31,170,89,.12); color: #8fe3b3; }
.tile.ship { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px; }
.tile.ship .v { font-size: 17px; margin-top: 0; }
.btn { background: var(--surface-2); color: var(--text); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.btn:hover { border-color: var(--aurora); }
#ovmap { min-height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: #0e1116; }
#ovmap.ovmap { display: block; height: 380px; }
@media (max-width: 560px) { #ovmap.ovmap { height: 340px; } }

/* ---------- map ---------- */
#map { height: 420px; border-radius: var(--radius); border: 1px solid var(--border); background: #111; }
@media (max-width: 560px) { #map { height: 360px; } }
.leaflet-container { font: inherit; background: #0e1116; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.35); }
.leaflet-control-attribution { background: rgba(22, 23, 26, 0.8) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--text-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #16171a; color: var(--text); }

/* ---------- guide ---------- */
.guide { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .guide { grid-template-columns: 1fr 1fr; } }
.guide p, .guide li { color: var(--text-2); font-size: 14px; }
.guide ul, .guide ol { padding-left: 20px; margin: 6px 0; }
.guide code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.text-block { font-size: 13px; color: var(--text-2); }
.text-block b { color: var(--text); }
footer { color: var(--muted); font-size: 12px; margin-top: 40px; border-top: 1px solid var(--border); padding-top: 14px; }
.sky svg { flex: none; }
table.itin td.d { white-space: nowrap; }
table.itin .why { font-size: 11px; }
#ovmap .leaflet-control-attribution { font-size: 9px; line-height: 1.3; }
/* all-sky cameras */
.satbox { position: relative; overflow: hidden; border-radius: 10px; background: #0b1a33; }
.satbox img { position: absolute; display: block; max-width: none; }
.satwind-now { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.satwind-now .v { font-size: 15px; font-weight: 700; }
.satwind-now .s { font-size: 12px; color: var(--text-2); }
.satwind-later { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.satwind-later svg { vertical-align: middle; }
.aichips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.aichip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.aichip .k { font-size: 11px; color: var(--muted); }
.aichip .v { font-size: 15px; font-weight: 700; margin: 2px 0; }
.aichip .s { font-size: 11px; color: var(--text-2); }
.aichip.good { border-color: var(--good); } .aichip.good .v { color: #5fd35f; }
.aichip.cloud .v, .aichip.day .v { color: var(--muted); }
.aichip.moon { border-color: #6d74a8; } .aichip.moon .v { color: #b8bfff; }
.aitbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.aitbl th, .aitbl td { padding: 3px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.aitbl th { font-size: 11px; color: var(--muted); font-weight: 600; }
.aitbl td.num, .aitbl th + th { text-align: right; }
.aitbl tr.aur td:first-child { color: #8fe3b3; }
.aitbl td.top { color: #5fd35f; font-weight: 700; }
.aitbl tr.when td { font-size: 11px; color: var(--muted); }
.cam { margin: 0; } .cam img { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: contain; background: #000; border-radius: 12px; display: block; margin: 0 auto; }
.cam figcaption { font-size: 12px; color: var(--text-2); text-align: center; margin-top: 4px; }
.magimg { width: 100%; max-width: 830px; aspect-ratio: 830 / 600; background: #fff; border-radius: 10px; display: block; margin: 0 auto; }
.ailabel { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }

.step small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* model check: how did it go (forecast vs what happened, per night) */
.vwrap { margin-top: 18px; }
.vwrap > summary { cursor: pointer; font-size: 15px; color: var(--text); }
.vwrap[open] > summary { margin-bottom: 8px; }
.vsum { font-size: 14px; margin: 6px 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 8px; }
.vcard { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.vhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.vres { font-size: 12px; font-weight: 700; } .vres.ok { color: #5fd35f; } .vres.n { color: #e8743b; } .vres.u { color: var(--muted); font-weight: 400; }
.vlab { font-size: 11px; color: var(--muted); margin: 6px 0 2px; }
.vstrip, .vaxis { display: grid; gap: 3px; }
.vstrip i, .vlegend b { display: block; height: 16px; border-radius: 4px; position: relative; }
.vstrip i.g, .vlegend b.g { background: #1faa59; } .vstrip i.y, .vlegend b.y { background: #f2c230; }
.vstrip i.n, .vlegend b.n { background: #3a3d44; } .vstrip i.t, .vlegend b.t { background: #3a4a86; }
.vstrip i.u { background: repeating-linear-gradient(45deg, #23252b 0 4px, #2f3239 4px 8px); }
.vstrip i.tw { opacity: .45; }
.vstrip i.aur::after, .vlegend b.aur::after { content: '✦'; position: absolute; inset: 0; text-align: center; line-height: 16px; font-size: 12px; color: #fff; }
.vstrip i.aur.maybe::after { content: '?'; }
.vaxis span { font-size: 10px; color: var(--muted); text-align: center; }
.vtext { font-size: 12px; margin-top: 6px; line-height: 1.45; }
.vlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--text-2); margin: 6px 0; }
.vlegend span { display: inline-flex; align-items: center; gap: 5px; } .vlegend b { width: 16px; display: inline-block; }
