@font-face{font-family:'Fraunces';font-style:normal;font-weight:300 900;font-display:swap;src:url(fonts/fraunces-normal-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Fraunces';font-style:normal;font-weight:300 900;font-display:swap;src:url(fonts/fraunces-normal-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:300 700;font-display:swap;src:url(fonts/source-serif-4-normal-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:300 700;font-display:swap;src:url(fonts/source-serif-4-normal-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:300 700;font-display:swap;src:url(fonts/source-serif-4-italic-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:300 700;font-display:swap;src:url(fonts/source-serif-4-italic-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:100 700;font-display:swap;src:url(fonts/IBMPlexSans-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:100 700;font-display:swap;src:url(fonts/IBMPlexSans-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  --bg: #f4f7fb; --surface: #ffffff; --surface-2: #e9f0f8; --ink: #0f1b2b; --muted: #33445a; --line: #b9c8da; --line-soft: #d9e3ee;
  --accent: #174f8f; --accent-ink: #ffffff; --water: #1d5fa8;
  --sea: #dfe9f4; --land: #f8fafc; --land-edge: #b7c6d8; --map-dot-edge: #ffffff;
  --lvl-high: #9fc0e6; --lvl-mid: #6f9fd6; --lvl-low: #3f74b8;
  --hero-a: #3f72b6; --hero-b: #9cc0e6;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif; --display: 'Fraunces', Georgia, serif; --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bar-h: 44px; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #08101f; --surface: #0e1a2e; --surface-2: #142238; --ink: #edf2f9; --muted: #b9c6d8; --line: #2c3d57; --line-soft: #1b2a41;
  --accent: #9cc6f5; --accent-ink: #08101f; --water: #8bbcf2;
  --sea: #0b1628; --land: #1a2a42; --land-edge: #34496a; --map-dot-edge: #08101f;
  --lvl-high: #5a7fb0; --lvl-mid: #3f6aa3; --lvl-low: #2b528c;
  --hero-a: #050b1d; --hero-b: #4a3140; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08101f; --surface: #0e1a2e; --surface-2: #142238; --ink: #edf2f9; --muted: #b9c6d8; --line: #2c3d57; --line-soft: #1b2a41;
    --accent: #9cc6f5; --accent-ink: #08101f; --water: #8bbcf2;
    --sea: #0b1628; --land: #1a2a42; --land-edge: #34496a; --map-dot-edge: #08101f;
    --lvl-high: #5a7fb0; --lvl-mid: #3f6aa3; --lvl-low: #2b528c;
    --hero-a: #050b1d; --hero-b: #4a3140; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
svg[hidden] { display: none; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.125rem/1.62 var(--serif); overflow-wrap: break-word; }
section, footer { scroll-margin-top: calc(var(--bar-h) + 14px); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: 8px 12px; border: 1px solid var(--line); z-index: 60; border-radius: 6px; font-family: var(--sans); }
.skip:focus { top: 8px; }

/* topbar: slim, takes the sky's colour over the opening, page colour after */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--bar-h); display: flex; align-items: center; gap: 14px; padding: 0 16px; font: 500 .875rem/1 var(--sans); color: #fff; transition: background .3s, color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.past-hero .topbar { background: var(--bg); color: var(--ink); border-bottom-color: var(--line-soft); }
.topbar .home { font-weight: 600; color: inherit; text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; min-width: 0; opacity: 0; transition: opacity .3s; }
.past-hero .topnav { opacity: 1; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.spacer { flex: 1 0 0; }
.chip-lang { color: inherit; text-decoration: none; font-weight: 600; letter-spacing: .06em; border: 1px solid currentColor; border-radius: 999px; padding: 6px 10px; opacity: .9; }
.chip-lang:hover { opacity: 1; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; flex: none; opacity: .9; }
.icon-btn:hover { opacity: 1; }
@media (max-width: 720px) { .topnav { display: none; } }

/* the opening sky */
.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: flex-end; overflow: hidden; color: #fff; background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,16,40,.38) 0%, rgba(4,16,40,.12) 50%, rgba(4,16,40,0) 70%), linear-gradient(180deg, rgba(4,16,40,.25) 0%, rgba(4,16,40,0) 20%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 120px 20px clamp(48px, 9vh, 96px); }
.eyebrow { font: 600 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 16px; opacity: .92; }
h1 { font: 560 clamp(2.3rem, 5.6vw, 4.6rem)/1.04 var(--display); letter-spacing: -.015em; margin: 0; max-width: 17ch; text-shadow: 0 2px 24px rgba(0,10,30,.35); }
.deck { font: 400 clamp(1.1rem, 1.8vw, 1.35rem)/1.5 var(--serif); max-width: 46ch; margin: 22px 0 28px; text-shadow: 0 1px 14px rgba(0,10,30,.5); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; font: 600 1rem/1 var(--sans); }
.cta { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #0f2a4f; padding: 13px 18px; border-radius: 999px; text-decoration: none; }
.cta:hover { background: #eaf2fc; }
.cta-2 { color: #fff; text-underline-offset: 4px; }
.hero-note { position: absolute; right: 16px; bottom: 10px; z-index: 1; font: 400 .75rem/1.3 var(--sans); opacity: .82; max-width: 40ch; text-align: right; }
@media (max-width: 640px) { .hero-note { display: none; } }

/* reading layout */
main { display: block; }
.block { max-width: 1120px; margin: 0 auto; padding: clamp(56px, 9vw, 104px) 20px 0; }
h2 { font: 560 clamp(1.7rem, 3.4vw, 2.5rem)/1.12 var(--display); letter-spacing: -.01em; margin: 0 0 22px; max-width: 26ch; }
h2 a.anchor { color: inherit; text-decoration: none; }
h2 a.anchor:hover { text-decoration: underline; text-decoration-thickness: 1px; }
h3 { font: 560 1.3rem/1.2 var(--display); margin: 0 0 10px; }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.05em; }
.note { font: 400 .92rem/1.5 var(--sans); color: var(--muted); max-width: 70ch; }
.small { font-size: .9rem; }
strong { font-weight: 650; }

/* the weigher */
.weigher { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.stage { border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); }
#cloud { display: block; width: 100%; height: clamp(260px, 38vw, 420px); }
.controls { font-family: var(--sans); display: grid; gap: 12px; max-width: 760px; }
.controls label { font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
output { font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 .9rem/1 var(--sans); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 9px 13px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.readout > div { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.readout dt { font: 600 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.readout dd { margin: 0; font: 600 clamp(1.25rem, 2.6vw, 1.75rem)/1.1 var(--display); font-variant-numeric: tabular-nums; }
.readout small { display: block; font: 400 .82rem/1.35 var(--sans); color: var(--muted); margin-top: 6px; }
.herd-wrap { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px; }
#herd { display: block; max-width: 100%; }
@media (max-width: 560px) { .readout { grid-template-columns: 1fr; } }

/* the measured strip */
.strip { margin: 26px 0 10px; }
.strip svg { width: 100%; height: auto; display: block; overflow: visible; }
.strip text { fill: var(--ink); font-family: var(--sans); }
.strip .muted { fill: var(--muted); }
.strip .axis { stroke: var(--line); }
.strip .band { fill: var(--water); opacity: .14; }
.strip .mark { stroke: var(--ink); }
.strip .dot { fill: var(--water); stroke: var(--surface); stroke-width: 2; }
.strip .dot.lemone { fill: var(--accent); }

/* the town */
.town { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; margin-top: 26px; align-items: start; }
@media (max-width: 900px) { .town { grid-template-columns: 1fr; } }
.mapbox { position: relative; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: var(--sea); }
#map { display: block; width: 100%; aspect-ratio: 16 / 10; cursor: crosshair; touch-action: manipulation; }
.map-tools { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-tools button, .reset { font: 600 .85rem/1 var(--sans); min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0 10px; }
.legend { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font: 400 .82rem/1.3 var(--sans); color: var(--muted); border-top: 1px solid var(--line-soft); background: var(--surface); flex-wrap: wrap; }
.legend .ramp { height: 10px; width: 150px; border-radius: 5px; background: linear-gradient(90deg,rgb(214,230,245) 0%,rgb(140,186,228) 25%,rgb(66,136,205) 50%,rgb(24,84,160) 75%,rgb(10,42,100) 100%); }
.search { position: relative; font-family: var(--sans); margin-bottom: 12px; }
.search label { display: block; font-weight: 600; margin-bottom: 6px; }
.search-row { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; font: 400 1rem/1 var(--sans); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 44px; }
#q-list { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
#q-list li { padding: 9px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
#q-list li small { color: var(--muted); }
#q-list li[aria-selected="true"], #q-list li:hover { background: var(--surface-2); }
.hint { font: 400 .88rem/1.4 var(--sans); color: var(--muted); margin: 0 0 10px; }
.result { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
#town-pic { display: block; width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); }
.result-text { padding: 16px 18px 6px; }
#t-lead { font: 400 1.08rem/1.55 var(--serif); margin: 0 0 10px; min-height: 3em; }
#t-months, #t-now { font: 400 .9rem/1.45 var(--sans); color: var(--muted); margin: 0 0 8px; }
.result .share, .share-wrap { padding: 4px 18px 16px; }
.finding { margin-top: 22px; }
details.alltable { margin-top: 18px; font-family: var(--sans); }
details.alltable summary { cursor: pointer; font-weight: 600; }

/* share row: compact round icons */
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--sans); }
.share .lab { font: 500 .85rem/1 var(--sans); color: var(--muted); margin-right: 4px; }
.share a, .share button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-soft); background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.share a:hover, .share button:hover, .share a:focus-visible, .share button:focus-visible { color: var(--accent); border-color: var(--accent); }
@media (pointer: coarse) { .share a, .share button { width: 44px; height: 44px; } }
[role="status"] { font: 400 .85rem/1.3 var(--sans); color: var(--muted); min-height: 1.3em; margin: 6px 0 0; }

/* tables */
.table-wrap { overflow-x: auto; margin: 18px 0; }
table { border-collapse: collapse; width: 100%; font: 400 .95rem/1.35 var(--sans); font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 600; padding: 0 0 10px; color: var(--ink); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
thead th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; }
td.on { font-weight: 700; }
.more { margin-top: 10px; font: 600 .9rem/1 var(--sans); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

/* floats, levels */
.compare { display: grid; gap: 14px; max-width: 760px; margin: 22px 0 8px; font-family: var(--sans); }
.compare .bar { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; margin-top: 6px; }
.compare .bar i { display: block; height: 100%; background: var(--water); min-width: 2px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 .78rem/1.3 var(--sans); }
.pill.high { background: var(--lvl-high); color: #0b1a2e; } .pill.mid { background: var(--lvl-mid); color: #08121f; } .pill.low { background: var(--lvl-low); color: #ffffff; }
:root[data-theme="dark"] .pill.high, :root[data-theme="dark"] .pill.mid { color: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.high, :root:not([data-theme="light"]) .pill.mid { color: #ffffff; } }
.floors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 28px; align-items: start; margin-top: 24px; }
@media (max-width: 820px) { .floors { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-family: var(--sans); margin-bottom: 8px; }
.seg button { border: 0; background: transparent; color: var(--ink); font: 500 .9rem/1 var(--sans); padding: 10px 14px; cursor: pointer; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
#levels-svg { width: 100%; max-width: 360px; height: auto; }
#levels-svg .tick { stroke: var(--line-soft); }
#levels-svg .muted { fill: var(--muted); }
#levels-svg .ink, #levels-svg text { fill: var(--ink); font-family: var(--sans); }
#levels-svg text.muted { fill: var(--muted); }
ol.sources { font: 400 .95rem/1.5 var(--sans); padding-left: 1.3em; max-width: 80ch; }
ol.sources li { margin-bottom: 8px; }
footer { max-width: 1120px; margin: 72px auto 0; padding: 24px 20px 64px; border-top: 1px solid var(--line-soft); font: 400 .9rem/1.5 var(--sans); color: var(--muted); }

/* reading rail: hairline dots in the right gutter, after the opening */
.rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .3s; }
.past-hero .rail { opacity: 1; pointer-events: auto; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rail a { position: relative; display: block; width: 14px; height: 14px; }
.rail .dot { position: absolute; inset: 4px; border-radius: 50%; background: var(--line); }
.rail a[aria-current="true"] .dot { background: var(--accent); inset: 2px; }
.rail .lab { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 500 .8rem/1 var(--sans); background: var(--surface); color: var(--ink); border: 1px solid var(--line-soft); padding: 5px 8px; border-radius: 6px; opacity: 0; pointer-events: none; }
.rail a:hover .lab, .rail a:focus-visible .lab { opacity: 1; }
@media (max-width: 1240px) { .rail { display: none; } }
@media print { .rail, .topbar, .share { display: none; } }
/* FM-1018 rail clearance (2 Nov 2026) */
@media (min-width:1191px){.rail{display:none!important}}
