:root {
  --paper: #f7f5ef;
  --paper2: #fffefb;
  --ink: #15202e;
  --ink-soft: #47566c;
  --line: #e2ddd0;
  --line-soft: #eee9dd;
  --blue: #0a337a;
  --blue-deep: #0a2740;
  --blue-soft: #3d5f9e;
  --red: #c8102e;
  --gold: #a9823f;
  --shadow: 0 24px 60px -34px rgba(15, 28, 48, 0.5);
  --shadow-sm: 0 6px 20px -12px rgba(15, 28, 48, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Public Sans", system-ui, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--blue); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
h2.sec { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: clamp(2rem, 4.6vw, 2.9rem); line-height: 1.02; letter-spacing: -0.01em; margin: 0 0 6px; }
.sec-kicker { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--blue-soft); margin: 0 0 10px; }
.sec-lede { font-family: "Spectral", serif; font-size: 1.16rem; color: var(--ink-soft); max-width: 62ch; margin: 0 0 8px; }
section { padding: 74px 0; }
/* ---------- TOP NAV + PAGE HERO (shared chrome; was injected by core.js, moved here so pages without core.js are styled too) ---------- */
.topnav { position: sticky; top: 0; z-index: 55; display: flex; align-items: center; flex-wrap: wrap; gap: 22px; padding: 11px 20px; background: var(--paper2); border-bottom: 1px solid var(--line); }
.topnav .brand { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.25rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.topnav .navlinks { display: flex; gap: 4px; margin-left: auto; margin-right: 116px; }
.topnav .navlinks a { font-family: "Public Sans", sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.topnav .navlinks a:hover { color: var(--blue); }
.topnav .navlinks a.active { color: var(--blue); background: rgba(10,51,122,0.08); }
/* keyboard focus visibility (a11y) */
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; border-radius: 6px; }
.langfab button:focus-visible, .themefab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.skiplink { position: fixed; top: -80px; left: 12px; z-index: 200; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; font-family: "Public Sans", sans-serif; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: top 0.15s ease; }
.skiplink:focus { top: 12px; }
.pagehero { position: relative; color: #fff; padding: 66px 20px 40px; background-size: cover; background-position: center 55%; }
.pagehero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,22,40,0.55), rgba(8,22,40,0.7)); }
.pagehero .wrap { position: relative; z-index: 2; }
.pagehero h1 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: clamp(2.4rem, 6vw, 3.8rem); margin: 6px 0 8px; line-height: 1; }
.pagehero p { font-family: "Spectral", serif; font-size: 1.15rem; max-width: 52ch; margin: 0; }
@media (max-width: 560px) { .topnav { gap: 16px 12px; padding: 9px 14px; } .topnav .brand { font-size: 1.05rem; } .topnav .navlinks { flex-basis: 100%; margin-left: 0; margin-right: 0; justify-content: flex-start; } .topnav .navlinks a { padding: 6px 9px; font-size: 0.85rem; } }
/* ---------- HERO ---------- */
.hero { position: relative; min-height: 96vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; background: #0a2740 url("assets/photos/hero.jpg") center 40% / cover no-repeat; transform: scale(1.03); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,22,40,0.5) 0%, rgba(8,22,40,0.12) 30%, rgba(8,22,40,0.5) 74%, rgba(8,22,40,0.9) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: 58px; }
.hero .flagchip { display: inline-flex; align-items: center; gap: 9px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); padding: 7px 13px; border-radius: 999px; backdrop-filter: blur(4px); }
.hero .flagchip .fl { width: 22px; height: 14px; border-radius: 2px; background: linear-gradient(180deg,#0a337a 0 50%,#c8102e 50% 100%); display: inline-block; }
.hero h1 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: clamp(3.4rem, 12vw, 8rem); line-height: 0.92; letter-spacing: -0.015em; margin: 18px 0 12px; text-shadow: 0 2px 30px rgba(0,0,0,0.35); }
.hero .tag { font-family: "Spectral", serif; font-style: italic; font-size: clamp(1.2rem, 3vw, 1.7rem); max-width: 26ch; margin: 0 0 26px; text-shadow: 0 1px 14px rgba(0,0,0,0.4); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.24); }
.hero-stats div { min-width: 88px; }
.hero-stats b { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.9rem; font-weight: 600; line-height: 1; }
.hero-stats span { font-size: 0.82rem; opacity: 0.86; letter-spacing: 0.02em; }
.scrollcue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; color: #fff; opacity: 0.7; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.2em; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,6px); } }
/* ---------- OVERVIEW ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; }
.split img { border-radius: 14px; box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; max-height: 460px; }
.factgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.fact { background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.fact .n { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; font-weight: 600; color: var(--blue); line-height: 1.05; margin-bottom: 4px; }
.fact p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
/* ---------- HOOKS ---------- */
.hooks { background: var(--blue-deep); color: #eef2f7; }
.hooks h2.sec { color: #fff; }
.hooks .sec-kicker { color: #8fb0dd; }
.hooklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-top: 34px; border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; overflow: hidden; }
.hook { padding: 24px 26px; background: rgba(255,255,255,0.03); }
.hook h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 6px; color: #fff; }
.hook p { margin: 0; font-size: 0.96rem; color: #c7d2e0; }
/* ---------- THINGS TO DO ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.todo { background: var(--paper2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.16s ease, box-shadow 0.16s ease; }
.todo:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.todo .ph { height: 168px; background-size: cover; background-position: center; }
.todo .bd { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.todo h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.45rem; margin: 0 0 6px; line-height: 1.05; }
.todo p { margin: 0 0 10px; font-size: 0.95rem; color: var(--ink-soft); }
.todo .note { margin-top: auto; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.03em; color: var(--blue-soft); }
.todo.text .bd { padding-top: 22px; }
/* ---------- BANDS / STEPS ---------- */
.band { position: relative; color: #fff; padding: 96px 0; background-size: cover; background-position: center; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,22,40,0.82) 0%, rgba(8,22,40,0.5) 60%, rgba(8,22,40,0.3) 100%); }
.band .wrap { position: relative; z-index: 2; }
.band h2.sec { color: #fff; }
.band .sec-kicker { color: #9bbbe6; }
.steps { counter-reset: s; margin-top: 30px; max-width: 640px; }
.step { counter-increment: s; position: relative; padding: 14px 0 14px 52px; border-top: 1px solid rgba(255,255,255,0.16); }
.step::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.4); border-radius: 50%; display: grid; place-items: center; font-family: "Cormorant Garamond", serif; font-size: 1.15rem; }
.step b { display: block; font-size: 1.02rem; }
.step span { color: #c7d2e0; font-size: 0.94rem; }
/* ---------- ITINERARY ---------- */
.itins { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 36px; }
.itin { background: var(--paper2); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.itin h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.7rem; margin: 0 0 4px; }
.itin .sub { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-soft); margin-bottom: 14px; }
.itin ul { margin: 0; padding: 0; list-style: none; }
.itin li { padding: 8px 0 8px 20px; position: relative; font-size: 0.97rem; color: var(--ink); border-top: 1px solid var(--line-soft); }
.itin li:first-child { border-top: none; }
.itin li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
/* ---------- WATCH / READ ---------- */
.watchgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 34px; }
.watch { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.1s; }
.watch:hover { border-color: var(--blue-soft); transform: translateX(2px); }
.watch .pl { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--red); display: grid; place-items: center; color: #fff; font-size: 15px; }
.watch b { font-size: 0.98rem; display: block; line-height: 1.2; }
.watch span { font-size: 0.82rem; color: var(--ink-soft); font-family: "IBM Plex Mono", monospace; }
.readrow { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.readrow a { font-size: 0.86rem; text-decoration: none; color: var(--blue); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; background: var(--paper2); }
.readrow a:hover { border-color: var(--blue-soft); }
/* ---------- PRACTICAL ---------- */
.practical { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 34px; margin-top: 34px; }
.pr { border-top: 2px solid var(--line); padding-top: 14px; }
.pr h4 { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-soft); margin: 0 0 6px; }
.pr p { margin: 0; font-size: 0.96rem; color: var(--ink); }
/* ---------- CONSTITUTION FEATURE ---------- */
.consti { background: var(--paper2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* municipality identity card */
.muni-id { background: linear-gradient(180deg,#eef3fb,#fff); border: 1px solid var(--blue-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.muni-id .mi-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.muni-id h4 { margin: 0; font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; }
.muni-id .mi-top span { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--blue-soft); white-space: nowrap; }
.muni-id .mi-known { margin: 4px 0 6px; font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.muni-id .mi-blurb { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.muni-id .mi-stats { display: flex; gap: 18px; margin: 6px 0 6px; font-size: 0.82rem; color: var(--ink-soft); }
.muni-id .mi-stats b { color: var(--blue); font-family: "Cormorant Garamond", serif; font-size: 1.15rem; margin-right: 3px; }
.muni-id .mi-parcels { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--blue-soft); font-size: 0.82rem; color: var(--ink-soft); }
/* residents / civics guide */
.residents { background: var(--paper2); border-top: 1px solid var(--line); }
.civ-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; margin-top: 6px; }
.civ-toggle button { font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 7px 16px; border: none; background: transparent; color: var(--ink-soft); cursor: pointer; }
.civ-toggle button.active { background: var(--blue); color: #fff; }
.civ-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 26px; }
.civ-block h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.7rem; margin: 0 0 14px; }
.civ-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.civ-card .cite { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--blue-soft); letter-spacing: 0.06em; }
.civ-card h4 { margin: 3px 0 6px; font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.25rem; }
.civ-card p { margin: 0; font-size: 0.96rem; color: var(--ink-soft); }
.civ-card details { margin-top: 8px; }
.civ-card summary { cursor: pointer; font-size: 0.8rem; color: var(--blue-soft); font-family: "IBM Plex Mono", monospace; }
.civ-card .verbatim { margin-top: 8px; font-family: "Spectral", serif; font-size: 0.95rem; white-space: pre-line; color: var(--ink); }
.dd-card .thr { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.dd-card .thr span { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; background: rgba(10,51,122,0.08); color: var(--blue); border-radius: 6px; padding: 4px 9px; }
.dd-card ol { margin: 6px 0 0; padding-left: 18px; }
.dd-card li { font-size: 0.93rem; color: var(--ink-soft); margin-bottom: 3px; }
.dd-card a.src { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--mist); }
.civ-note { margin-top: 22px; font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }
/* contribute modal */
.contribute-link { background: none; border: none; color: #9bbbe6; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.modal-back { position: fixed; inset: 0; background: rgba(12,24,42,0.6); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-back.open { display: flex; }
.modal { background: var(--paper2); border-radius: 16px; max-width: 460px; width: 100%; padding: 26px; box-shadow: var(--shadow); }
.modal h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.7rem; margin: 0 0 6px; }
.modal p.sub { margin: 0 0 8px; font-size: 0.9rem; color: var(--ink-soft); }
.modal label { display: block; font-size: 0.8rem; font-weight: 600; margin: 12px 0 4px; color: var(--ink); }
.modal input, .modal select, .modal textarea { width: 100%; font-family: "Public Sans", sans-serif; font-size: 0.95rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.modal textarea { min-height: 88px; resize: vertical; }
.modal .mrow { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; }
.modal .mrow button { font-family: "Public Sans"; font-weight: 600; font-size: 0.92rem; padding: 10px 18px; border-radius: 9px; cursor: pointer; }
.modal .mrow .cancel { background: none; border: 1px solid var(--line); color: var(--ink-soft); }
.modal .mrow .send { background: var(--blue); border: none; color: #fff; }
.civ-nat { margin-top: 30px; }
.nat-intro { font-family: "Spectral", serif; font-size: 1.05rem; color: var(--ink-soft); max-width: 72ch; }
.nat-routes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.nat-card ul { margin: 6px 0 0; padding-left: 18px; }
.nat-card li { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 2px; }
.nat-card .nat-note { margin-top: 8px; font-size: 0.85rem; font-style: italic; color: var(--ink-soft); }
.nat-card .src { display: inline-block; margin-top: 8px; font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--mist); }
.nat-common { margin-top: 16px; font-size: 0.92rem; color: var(--ink-soft); }
.nat-common ul { margin: 6px 0 0; padding-left: 18px; }
.nat-auth { margin-top: 12px; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-soft); }
@media (max-width: 720px) { .civ-cols { grid-template-columns: 1fr; } .nat-routes { grid-template-columns: 1fr; } }
.searchcard { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 18px; margin-top: 26px; }
.searchrow { display: flex; gap: 10px; }
.searchrow input { flex: 1; font-family: "Spectral", serif; font-size: 1.05rem; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: none; }
.searchrow input:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 3px rgba(61,95,158,0.14); }
.searchrow button.go { font-weight: 600; padding: 0 22px; border: none; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; }
.searchrow button.go:hover { background: #0c3f96; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.langtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.langtoggle button { font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 7px 15px; border: none; background: transparent; color: var(--ink-soft); cursor: pointer; }
.langtoggle button.active { background: var(--blue); color: #fff; }
.status { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-soft); }
.personas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-size: 0.88rem; font-weight: 500; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--blue-soft); }
.chip.active { border-color: var(--blue); background: var(--blue); color: #fff; }
#results { margin-top: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 12px 0; animation: rise 0.45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card .meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.cite { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; color: var(--blue); line-height: 1; }
.chaptag { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); text-align: right; }
.arttext { font-family: "Spectral", serif; font-size: 1.04rem; white-space: pre-line; }
.plain { margin-top: 12px; padding: 11px 13px; border-left: 3px solid var(--gold); background: rgba(169,130,63,0.07); border-radius: 0 8px 8px 0; }
.plain .lbl { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 3px; }
.plain p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.answer { border-color: var(--blue-soft); background: #fff; }
.answer .qa-q { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.3rem; color: var(--ink-soft); margin: 0 0 6px; }
.answer .qa-a { font-family: "Spectral", serif; font-size: 1.08rem; margin: 0; }
.answer .refs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.answer .refs a { font-family: "IBM Plex Mono", monospace; font-size: 11px; text-decoration: none; color: var(--blue); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; }
.sectlabel { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue-soft); margin: 22px 0 8px; }
.hint { color: var(--ink-soft); font-family: "Spectral", serif; font-style: italic; }
/* ---------- FOOTER ---------- */
footer { background: var(--blue-deep); color: #c7d2e0; padding: 56px 0 40px; font-size: 0.86rem; }
footer h4 { font-family: "Cormorant Garamond", serif; color: #fff; font-size: 1.3rem; margin: 0 0 8px; font-weight: 600; }
footer a { color: #9bbbe6; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
footer .fine { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.78rem; color: #8ea2ba; }
.flagline { height: 4px; width: 70px; border-radius: 4px; background: linear-gradient(180deg,#3d5f9e 0 50%,#c8102e 50% 100%); margin-bottom: 18px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 26px; }
  .factgrid, .cards { grid-template-columns: repeat(2, 1fr); }
  .hooklist, .itins, .watchgrid, .practical, footer .cols { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .factgrid, .cards { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
}
/* ---------- INTERACTIVE MAP / PLANNER ---------- */
.planner { background: linear-gradient(180deg, #eef2f7 0%, var(--paper) 100%); }
/* map-as-hero overrides */
.maphero { min-height: auto; display: block; align-items: stretch; overflow: visible; color: #fff; padding-bottom: 34px; }
.maphero .wrap { position: relative; z-index: 2; padding-top: 42px; }
.maphero-head { max-width: 940px; }
.maphero h1 { font-size: clamp(2.9rem, 8vw, 5.4rem); margin: 12px 0 8px; }
.maphero .tag { margin-bottom: 18px; max-width: 40ch; }
.maphero .hero-stats { margin-bottom: 6px; border-top-color: rgba(255,255,255,0.28); }
.maphero .panel { background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.maphero .mapwrap { background: rgba(255, 255, 255, 0.97); }
.plan-grid { display: grid; grid-template-columns: minmax(420px, 520px) 1fr; gap: 34px; margin-top: 24px; align-items: start; }
.mapwrap { position: sticky; top: 20px; background: var(--paper2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); }
#limap { width: 100%; height: auto; max-height: 88vh; display: block; }
#limap .poi { r: 8; }
#limap .muni { fill: #dfe7f1; stroke: #fff; stroke-width: 1.5; cursor: pointer; transition: fill 0.15s; }
#limap .muni:hover { fill: #c4d3e8; }
#limap .muni.sel { fill: #b9ccec; stroke: var(--blue); stroke-width: 2; }
#limap .muni.hist { fill: var(--gold); }
#limap .munilabel { font-family: "Public Sans", sans-serif; font-weight: 600; font-size: 30px; fill: #26374f; text-anchor: middle; pointer-events: none; letter-spacing: 0.01em; paint-order: stroke; stroke: #ffffff; stroke-width: 7px; stroke-linejoin: round; }
#limap .poi { stroke: #fff; stroke-width: 2; cursor: pointer; transition: r 0.12s; }
#limap .poi:hover { r: 11; }
#limap .poi.inday { stroke: var(--gold); stroke-width: 4; }
#limap .poi.dim { opacity: 0.18; }
.maplegend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 11px; color: var(--ink-soft); }
.maplegend span { display: inline-flex; align-items: center; gap: 5px; }
.maplegend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { font-family: "Public Sans", sans-serif; font-size: 0.92rem; font-weight: 600; padding: 10px 15px; border: none; background: none; color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabpane { display: none; }
.tabpane.active { display: block; animation: rise 0.3s ease both; }
.poi-list { display: grid; gap: 10px; }
.poi-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; }
.poi-item .cat { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.poi-item .bd { flex: 1; }
.poi-item h4 { margin: 0 0 3px; font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.2rem; }
.poi-item p { margin: 0 0 6px; font-size: 0.92rem; color: var(--ink-soft); }
.poi-item .m { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--blue-soft); letter-spacing: 0.03em; }
.poi-item button.add { font-family: "Public Sans"; font-size: 0.82rem; font-weight: 600; border: 1px solid var(--blue); background: none; color: var(--blue); border-radius: 8px; padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.poi-item button.add.on { background: var(--blue); color: #fff; }
.askrow { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.askrow input { flex: 1; min-width: 200px; font-family: "Spectral", serif; font-size: 1.02rem; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.askrow input:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 3px rgba(61,95,158,0.14); }
.askrow select, .askrow button { font-family: "Public Sans"; font-size: 0.95rem; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.askrow button.plan { background: var(--blue); color: #fff; border: none; font-weight: 600; padding: 12px 20px; }
.chips-sm { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips-sm button { font-size: 0.8rem; border: 1px solid var(--line); background: var(--paper2); color: var(--ink-soft); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.chips-sm button:hover { border-color: var(--blue-soft); color: var(--blue); }
.showall { width: 100%; margin-top: 8px; padding: 11px; font-family: "Public Sans", sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--blue); background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; cursor: pointer; }
.showall:hover { border-color: var(--blue-soft); background: #fff; }
.daytotal { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-soft); margin: 10px 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.daytotal .actions button { font-size: 0.8rem; border: 1px solid var(--line); background: var(--paper2); border-radius: 8px; padding: 6px 11px; cursor: pointer; color: var(--blue); margin-left: 6px; }
.day-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.day-item .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-family: "Cormorant Garamond", serif; font-size: 1rem; }
.day-item .bd { flex: 1; }
.day-item h4 { margin: 0; font-size: 1.02rem; font-family: "Cormorant Garamond", serif; font-weight: 600; }
.day-item .m { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--blue-soft); }
.day-item button.rm { border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 18px; }
.empty { color: var(--ink-soft); font-family: "Spectral", serif; font-style: italic; padding: 10px 0; }
.histbox { text-align: center; }
.histyear { font-family: "Cormorant Garamond", serif; font-size: 3.4rem; font-weight: 600; color: var(--blue); line-height: 1; }
.histbox h4 { font-family: "Cormorant Garamond", serif; font-size: 1.6rem; margin: 4px 0 6px; }
.histbox p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto; }
input[type=range].hist { width: 100%; margin: 22px 0 6px; accent-color: var(--blue); }
.histticks { display: flex; justify-content: space-between; font-family: "IBM Plex Mono", monospace; font-size: 10px; color: var(--ink-soft); }
@media (max-width: 820px) {
  .plan-grid { grid-template-columns: 1fr; }
  .mapwrap { position: relative; top: 0; max-width: 360px; margin: 0 auto; }
  #limap { max-height: 60vh; }
}
/* ---------- DARK MODE ---------- */
html[data-theme="dark"] {
  --paper: #10151d; --paper2: #18212e; --ink: #e9eef5; --ink-soft: #9fb0c6;
  --line: #2b3849; --line-soft: #222f3e; --blue: #5b90e6; --blue-soft: #83acf0;
  --red: #e0637a; --gold: #cba861;
  --shadow: 0 24px 60px -34px rgba(0,0,0,0.75); --shadow-sm: 0 6px 20px -12px rgba(0,0,0,0.6);
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] .searchrow input,
html[data-theme="dark"] .askrow input, html[data-theme="dark"] .askrow select,
html[data-theme="dark"] .modal input, html[data-theme="dark"] .modal select, html[data-theme="dark"] .modal textarea { background: #0b111a; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .langtoggle, html[data-theme="dark"] .civ-toggle { background: #0b111a; }
html[data-theme="dark"] .chip { background: var(--paper2); color: var(--ink); }
html[data-theme="dark"] .answer, html[data-theme="dark"] .card, html[data-theme="dark"] .fact,
html[data-theme="dark"] .todo, html[data-theme="dark"] .itin, html[data-theme="dark"] .watch,
html[data-theme="dark"] .civ-card, html[data-theme="dark"] .searchcard, html[data-theme="dark"] .modal { background: var(--paper2); }
html[data-theme="dark"] .maphero .panel, html[data-theme="dark"] .maphero .mapwrap { background: rgba(20,28,40,0.94); }
html[data-theme="dark"] .mapwrap { background: var(--paper2); }
html[data-theme="dark"] .muni-id { background: linear-gradient(180deg,#182636,#141c28); }
html[data-theme="dark"] .planner { background: linear-gradient(180deg,#141c28 0%, var(--paper) 100%); }
html[data-theme="dark"] .consti, html[data-theme="dark"] .residents { background: var(--paper2); }
html[data-theme="dark"] .plain { background: rgba(203,168,97,0.10); }
html[data-theme="dark"] #limap .muni { fill: #24313f; stroke: #10151d; }
html[data-theme="dark"] #limap .muni:hover { fill: #33455a; }
html[data-theme="dark"] #limap .muni.sel { fill: #3a5680; stroke: var(--blue); }
html[data-theme="dark"] #limap .munilabel { fill: #cdd8e6; stroke: #10151d; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto; } .hero-img { transform: none; } }
