/* Calm, Mercury-like: off-white page, lots of space, soft rounded tiles with one visual, bold title and a short gray line. */
:root {
  --bg: #f7f7f5; --card: #ffffff; --soft: #ebe9e3; --ink: #1d1d1b; --muted: #6b6a65; --line: #e4e2dc;
  --accent: #1b3a5c; --accent-ink: #ffffff; --link: #1b3a5c;
  --t1: #c0392b; --t2: #d9622b; --t3: #c99a1e; --t4: #6f9a3a; --t5: #7a8088;
  --official: #0f6b5c; --general: #4a5a86; --precaution: #9a6a00;
  --tile: #ecebe7;
  --lift: 0 1px 2px rgba(30,30,25,.08);
  --r: 8px;
  color-scheme: light;
  --font: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--t2); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 720px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .9rem; margin: 4px 0 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.005em; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 0; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0; }

.nav-in { padding-block: 22px; }
.mark { font-weight: 700; letter-spacing: 0; display: inline-flex; align-items: center; gap: 10px; }
.mark .dot { display: none; }
.nav { background: #fff; border-bottom: 1px solid var(--line); }
.nav-in { padding-block: 16px; }

/* Top: status, purpose, search */
.top { padding-block: 24px 64px; }
.top .narrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
.status-box { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--t1); border-radius: 4px; padding: 20px 24px; }
.status-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.status-top .pulse { display: none; }
.status-time { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--t1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--t1) 50%, transparent);  flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.status-h { font-size: clamp(1.15rem, 3.4vw, 1.35rem); font-weight: 600; line-height: 1.35; margin: 0 0 8px; }
.status-body { margin: 0 0 12px; color: #3f3f3c; }
.status-links { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; font-weight: 600; }
.purpose h1 { font-size: clamp(1.75rem, 5vw, 2.4rem); line-height: 1.2; font-weight: 600; margin: 0 0 14px; }
.sub { font-size: 1.05rem; color: var(--muted); margin: 0; max-width: 34em; }
.find { margin-top: -16px; }
.search { display: flex; align-items: center; background: var(--card); border: 1px solid #b9b8b2; border-radius: 6px; padding: 5px 5px 5px 16px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 1.05rem var(--font); padding: 12px 4px; }
.search input::placeholder { color: var(--muted); }
.go { border: 0; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 12px 20px; white-space: nowrap; }

.find-foot { margin: 12px 0 0 2px; font-size: .92rem; }
.textbtn { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.status { margin: 8px 0 0 2px; color: var(--muted); font-size: .92rem; min-height: 0; }
.status:empty { display: none; }
.matches { margin-top: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; max-height: 320px; overflow-y: auto; }
.matches button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 12px 16px; }
.matches button + button { border-top: 1px solid var(--line); }
.matches button:hover, .matches button[aria-selected=true] { background: var(--soft); }
.matches strong { font-weight: 700; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; align-items: start; margin-bottom: 88px; }
.tile.wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.tile h3 { margin: 18px 0 4px; font-size: 1.1rem; }
.tile > p { margin: 0; color: var(--muted); font-size: 1rem; max-width: 40em; }
.tile > p strong { color: var(--ink); }
.tile > p.warn { color: var(--t1); }
.visual { background: var(--tile); border-radius: var(--r); aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 28px; overflow: hidden; }
.tile.wide .visual { aspect-ratio: auto; }
.map-visual { padding: 0; }
#map { width: 100%; height: 480px; background: var(--soft); border-radius: var(--r); }
@media (max-width: 720px) { #map { height: 360px; } .visual { padding: 20px; } }
.tile.wide .visual:not(.map-visual) { padding: 40px 28px; }

/* Visual vignettes: muted product-style fragments */
.ui { background: var(--card); border-radius: 6px; border: 1px solid var(--line); padding: 18px 22px; color: var(--ink); max-width: 100%; }
.ui-label { color: var(--muted); font-size: .9rem; }
.ui-bubble { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.15rem; }
.ui-bubble strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-pill { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; font-weight: 600; font-size: 1rem; }
.ui-call { display: grid; gap: 2px; text-align: center; }
.ui-call strong { font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ui-list { display: grid; gap: 0; min-width: min(280px, 100%); padding: 8px 22px; }
.ui-list span { padding: 10px 0 10px 30px; position: relative; font-size: .98rem; }
.ui-list span + span { border-top: 1px solid var(--line); }
.ui-list span::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--soft); }
.ui-list .ok::before { background: color-mix(in srgb, var(--t4) 22%, var(--card)); }
.ui-list .ok::after { content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 9px; margin-top: -6px; border: solid var(--t4); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ui-list .no { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--t1) 60%, transparent); }
.ui-list .no::before { background: color-mix(in srgb, var(--t1) 16%, var(--card)); }
.ui-supplies { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; width: min(620px, 100%); }
.ui-supplies span + span { border-top: 0; }
.ui-supplies span::before { width: 8px; height: 8px; margin-top: -4px; left: 8px; background: var(--muted); opacity: .45; }
@media (max-width: 520px) { .ui-supplies { grid-template-columns: minmax(0, 1fr); } }

/* Expanders */
.more { margin-top: 14px; color: var(--muted); font-size: .95rem; }
.more summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; font-weight: 500; font-size: 1.2rem; line-height: 1; color: var(--muted); }
.more[open] summary::after { content: "–"; }
.more > p { max-width: 46em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.sw.t1 { background: var(--t1); } .sw.t2 { background: var(--t2); }
.sw.dash { border: 2px dashed var(--t2); } .sw.ring { border: 2px solid var(--t3); }
.supplies { display: grid; margin-top: 10px; max-width: 720px; }
.supply { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.supply + .supply { border-top: 1px solid var(--line); }
.supply strong { display: block; color: var(--ink); }
.supply span { font-size: .92rem; }
.shop { flex: none; text-decoration: none; font-weight: 600; font-size: .88rem; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; color: var(--ink); }

/* Contacts and footer */
.contacts-wrap { margin-bottom: 64px; }
.contacts-wrap h2 { margin-bottom: 20px; }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 40px; margin: 0; }
.contacts dt { font-size: .88rem; color: var(--muted); }
.contacts dd { margin: 2px 0 0; font-weight: 600; }
.foot { padding-block: 28px 64px; font-size: .85rem; color: var(--muted); max-width: 720px; }
.foot p { margin: 0 0 10px; }
.leaflet-container { font: inherit; }
.leaflet-container a { color: #0f6b5c; }

/* Result */
.result { margin: -24px 0 80px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); overflow: hidden;  }
@keyframes rise-x { from { transform: translateY(10px); opacity: .4; } to { transform: none; opacity: 1; } }
.r-head { padding: 26px 24px 22px; background: color-mix(in srgb, var(--tier) 8%, var(--card)); }
.r-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.level { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tier); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 16px; height: 5px; border-radius: 1px; background: color-mix(in srgb, var(--tier) 22%, transparent); }
.meter i.on { background: var(--tier); }
.change { border: 0; background: none; font-size: .88rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: var(--muted); padding: 0; }
.r-head h2 { font-size: clamp(1.35rem, 4vw, 1.7rem); font-weight: 600; margin: 10px 0 6px; line-height: 1.15; }
.r-where { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }
.r-sum { margin: 0; }
.r-body { padding: 8px 24px 24px; }
.topics { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.topics p { margin: 0 0 10px; font-weight: 700; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chips button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.phase { padding-top: 22px; }
.phase h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; }
.step + .step { border-top: 1px solid var(--line); }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); padding: 0; display: grid; place-items: center; margin-top: 1px; transition: background .15s, border-color .15s; }
.tick svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; opacity: 0; }
.step.done .tick { background: var(--official); border-color: var(--official); }
.step.done .tick svg { opacity: 1; }
.step.done .txt { color: var(--muted); }
.txt { min-width: 0; }
.txt p { margin: 0; }
.step.topic .txt p::before { content: attr(data-topic); display: block; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.src { font-size: .82rem; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kind { font-weight: 700; }
.kind.official { color: var(--official); }
.kind.general { color: var(--general); }
.kind.precaution { color: var(--precaution); }
.note { font-size: .88rem; color: var(--muted); background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; }

.chip { border: 1px solid var(--line); background: var(--card); border-radius: 4px; padding: 8px 14px; font-size: .9rem; font-weight: 600; }
.result { max-width: 760px; margin-left: auto; margin-right: auto; }
.winds { margin-top: 14px; overflow-x: auto; }
.winds table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.winds th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.winds td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.winds td:first-child { white-space: normal; min-width: 140px; }
.sub-t { display: block; font-size: .78rem; color: var(--muted); }
.arrow { display: inline-block; margin-right: 6px; font-weight: 700; color: var(--t2); }
.src-m { display: none; }
@media (max-width: 600px) { .winds th:nth-child(4), .winds td:nth-child(4) { display: none; } .src-m { display: block; } }

@media (max-width: 420px) { .ui-bubble { font-size: 1rem; padding: 14px 16px; } }

/* Simple system-style alert */
.alert { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; background: #fff8e1; border: 1px solid #e8d38a; border-radius: 4px; padding: 14px 16px; font-size: .95rem; line-height: 1.5; }
.alert-ic { width: 20px; height: 20px; fill: #8a6100; margin-top: 2px; }
.alert p { margin: 0; }
.alert-h strong { font-weight: 600; }
.alert-body { color: #3f3f3c; margin-top: 2px !important; }
.alert-time { color: var(--muted); font-size: .82rem; margin-top: 4px !important; }
.top { padding-block: 24px 40px; }
.top .narrow { gap: 32px; }
.find { margin-top: -8px; }
.find-foot { color: var(--muted); }

/* Map and result */
.map-sec { margin-bottom: 28px; }
#map { width: 100%; height: 440px; border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 720px) { #map { height: 360px; } }
.map-sec .legend { margin: 10px 0 0; color: var(--muted); }
.map-meta { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.map-meta.warn { color: var(--t1); }
.result { margin: 0 0 56px !important; max-width: none; }
.supply-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .95rem; }
.supply-list strong { font-weight: 600; }

/* Plain resource links */
.resources { border-top: 1px solid var(--line); padding-top: 32px; margin-bottom: 48px; }
.resources h2 { margin-bottom: 8px; }
.res-cols { display: grid; gap: 4px 40px; }
.resources h3 { font-size: 1rem; margin: 20px 0 6px; }
.resources ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .95rem; }
.foot { border-top: 1px solid var(--line); }

/* Before / During / After headings: clear section bars */
.phase { padding-top: 28px; }
.phase h3 { font-size: 1.2rem; font-weight: 700; color: #fff; background: var(--accent); text-transform: none; letter-spacing: 0; padding: 10px 14px; border-radius: 4px; margin: 0 0 12px; }

.caution { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px; padding: 14px 16px; font-size: .95rem; line-height: 1.55; margin-top: -16px; }
.caution p { margin: 0; }
.caution p + p { margin-top: 8px; color: #3f3f3c; }

/* First-visit disclaimer */
.ack { position: fixed; inset: 0; z-index: 3000; background: rgba(20, 20, 18, .55); display: grid; place-items: center; padding: 16px; }
.ack[hidden] { display: none; }
.ack-box { background: #fff; border-radius: 8px; max-width: 460px; width: 100%; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.ack-box h2 { font-size: 1.25rem; margin: 0 0 12px; }
.ack-box p { margin: 0 0 12px; font-size: .98rem; color: #3f3f3c; }
.ack-box .go { width: 100%; margin-top: 8px; padding: 14px; font-size: 1rem; }

.sw.army-w { background: #3f5fd0; border-radius: 2px; } .sw.army-f { background: #3cb44b; border-radius: 2px; }
.army-fig { margin: 16px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.army-fig img { width: 100%; height: auto; display: block; border-radius: 4px; }
.army-fig figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.r-army { margin: 12px 0 0; padding: 10px 12px; background: #eef1fb; border-left: 4px solid #3f5fd0; border-radius: 4px; font-size: .95rem; }

.sw.army-a { background: #5fe0ee; border-radius: 50%; }
.air-lbl { width: 0 !important; height: 0 !important; background: none; border: 0; }
.air-lbl span { position: absolute; transform: translate(calc(-100% - 14px), -50%); font: 600 11px/1.15 'Public Sans', system-ui, sans-serif; color: #0d5f6b; background: rgba(255,255,255,.92); padding: 2px 6px; border-radius: 3px; white-space: nowrap; text-align: center; box-shadow: 0 0 0 1px rgba(13,95,107,.18); pointer-events: none; }
.air-lbl b { display: block; font-weight: 700; }
.air-lbl small { display: block; font-size: 9.5px; font-weight: 500; color: #4d7f87; }
.r-air { background: #e9f9fb; border-left-color: #1aa3b8; }
