/* Country / state guide pages (generated by scripts/seo/build_place_pages.py) */
:root {
  --bg: #f6f1e8;
  --surface: #fffdf9;
  --ink: #1c2329;
  --muted: #5e6670;
  --line: #e6ddcf;
  --place: #b5523b;          /* per-place accent, overridden on <body> */
  --accent: #1f5f63;
  --brand-text: #1f5f63;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0ef;
  --good: #1f6b45;
  --warn: #9a4a12;
  --map-0: #e3f0ef;
  --map-1: #bfdcda;
  --map-2: #8cc0bd;
  --map-3: #5a9e9b;
  --map-4: #2f7774;
  --map-none: #ece9e3;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(23, 33, 43, 0.04), 0 8px 24px rgba(23, 33, 43, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416;
    --surface: #1b1f23;
    --ink: #eceff2;
    --muted: #a3acb6;
    --line: #2c3237;
    --accent: #6fb7b5;
    --brand-text: #6fb7b5;
    --accent-ink: #0d1a1b;
    --accent-soft: #1e3436;
    --good: #6fcf97;
    --warn: #f2a65a;
    --map-0: #1e3436;
    --map-1: #285456;
    --map-2: #3b7a78;
    --map-3: #57a19e;
    --map-4: #8fd0cc;
    --map-none: #343b42;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #121416; --surface: #1b1f23; --ink: #eceff2; --muted: #a3acb6; --line: #2c3237;
  --accent: #6fb7b5; --brand-text: #6fb7b5; --accent-ink: #0d1a1b; --accent-soft: #1e3436; --good: #6fcf97; --warn: #f2a65a;
  --map-0: #1e3436; --map-1: #285456; --map-2: #3b7a78; --map-3: #57a19e; --map-4: #8fd0cc; --map-none: #343b42;
  --shadow: none;
}

/* Colours derived from the per-place accent. Defined on <body> (where each page sets
   --place), not :root, so they use the page's accent rather than the default. */
body { --place-text: var(--place); --place-soft: color-mix(in srgb, var(--place) 14%, var(--surface)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { --place-text: color-mix(in srgb, var(--place) 55%, #ffffff); --place-soft: color-mix(in srgb, var(--place) 22%, var(--surface)); }
}
:root[data-theme="dark"] body { --place-text: color-mix(in srgb, var(--place) 55%, #ffffff); --place-soft: color-mix(in srgb, var(--place) 22%, var(--surface)); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand em, .foot-brand em { font-style: normal; color: var(--brand-text); }
.logo { width: 32px; height: 32px; flex: none; }
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; color: var(--muted); }
.foot-brand > a:first-child { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 17px; }
.foot-brand .logo { width: 24px; height: 24px; }
.top .btn-small { font-size: 15px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 22px 0 0; }
.crumbs a { color: var(--muted); }

/* Hero: photo band, then the number and map cards overlapping it */
.band { position: relative; min-height: 440px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--place); }
.band picture, .band img { position: absolute; inset: 0; width: 100%; height: 100%; }
.band img { object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--place) 82%, #000 18%) 0%, color-mix(in srgb, var(--place) 72%, #000 10%) 38%,
                color-mix(in srgb, var(--place) 30%, transparent) 62%, transparent 85%),
              linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, transparent 50%); }
.band .wrap { position: relative; z-index: 1; width: 100%; padding-top: 44px; padding-bottom: 136px; }
.band .crumbs, .band .crumbs a { color: rgba(255, 255, 255, 0.85); }
.band .credit { position: absolute; z-index: 1; right: 12px; top: 8px; font-size: 11px; color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.band .credit:hover { text-decoration: underline; }
.hero { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: stretch; margin: -96px 0 8px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.06; letter-spacing: -0.025em; margin: 0 0 12px; font-weight: 700;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); max-width: 13em; }
.lead { font-size: 20px; color: rgba(255, 255, 255, 0.92); margin: 0; max-width: 32em; }
.place-mark { display: inline-block; width: 44px; height: 4px; border-radius: 2px; background: var(--place); margin-bottom: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.figure { padding: 26px 28px; }
.figure .big { font-size: clamp(52px, 8vw, 76px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.figure .big small { font-size: 0.32em; font-weight: 600; letter-spacing: 0; color: var(--place-text); margin-left: 6px; }
.figure .what { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.figure .year { margin: 16px 0 0; font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.fact { padding: 14px 16px; }
.fact .v { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--place-text); }
.fact .k { font-size: 13px; color: var(--muted); }
.included { margin-top: 10px; padding: 16px 18px; font-size: 15px; }
.included p { margin: 0; }
.included p + p { margin-top: 6px; color: var(--muted); }
.included strong { color: var(--ink); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .fact { padding: 10px 12px; } .fact .v { font-size: 18px; } }
.note { font-size: 14px; color: var(--muted); }
.flag-limited { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }

.mapcard { padding: 18px; display: flex; flex-direction: column; }
.mapcard svg { width: 100%; height: auto; max-height: 400px; display: block; }
.mapcard .legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0 14px; }
.mapcard .ramp { display: flex; flex: 1; max-width: 200px; height: 10px; border-radius: 5px; overflow: hidden; }
.mapcard .ramp i { flex: 1; }
.mapcard .actions { margin-top: auto; }
svg .r { stroke: var(--surface); stroke-width: 0.8; }
svg .r.c0 { fill: var(--map-0); } svg .r.c1 { fill: var(--map-1); } svg .r.c2 { fill: var(--map-2); }
svg .r.c3 { fill: var(--map-3); } svg .r.c4 { fill: var(--map-4); } svg .r.cn { fill: var(--map-none); }
svg .city { stroke: var(--ink); stroke-width: 1.2; fill: var(--ink); }
svg .city.c0 { fill: var(--map-0); } svg .city.c1 { fill: var(--map-1); } svg .city.c2 { fill: var(--map-2); }
svg .city.c3 { fill: var(--map-3); } svg .city.c4 { fill: var(--map-4); }
svg .citylabel { font: 600 12px "Inter", system-ui, sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border: 0; font-size: 16px; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn-small { padding: 8px 14px; font-size: 15px; }

/* Live map: the static SVG shows first; the live map fades in over it */
.mapstage { position: relative; }
.mapstage #live-map { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease; border-radius: 12px; overflow: hidden; }
.is-live .mapstage #live-map { opacity: 1; }
.is-live .mapstage svg { visibility: hidden; }
.legend-row .aff { display: none; }
.is-live .legend-row .legend:not(.aff) { display: none; }
.is-live .legend-row .aff { display: flex; }
.legend.aff { flex-wrap: wrap; gap: 6px; }
.legend.aff .sw { width: 16px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.maplibregl-popup-content { border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }

/* Phone: the map card becomes a big "Explore" section; savings move above the breakdown */
.phone-only { display: none; }
@media (max-width: 860px) {
  .mapcard .phone-only { display: block; }
  .mapcard h2.phone-only { margin-top: 4px; }
  .mapcard .mapstage { height: 440px; display: flex; align-items: center; justify-content: center; }
  .mapcard .mapstage svg { height: 100%; max-height: 420px; }
  .grid2 > .savings-col { order: -1; }
}

/* Controls */
.controls { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); padding: 14px 0; margin: 18px 0 6px; border-bottom: 1px solid var(--line); }
.controls .wrap { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 7px 12px; border-radius: 9px; font-size: 15px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg input:checked + label { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.ctl-name { font-size: 13px; color: var(--muted); margin-right: 4px; }

/* Sections */
section { margin: 40px 0; }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 8px; }
h2::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--place); margin-bottom: 12px; }
.ccy select { font: inherit; font-size: 15px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.sub { color: var(--muted); margin: 0 0 18px; }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }

/* Breakdown */
.breakdown { padding: 8px 24px; }
.brow { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.brow:last-child { border-bottom: 0; }
.brow .label { font-weight: 600; }
.brow .label .note { display: block; font-weight: 400; }
.bar { height: 10px; background: var(--accent-soft); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width 0.25s ease; }
.brow .amt { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 90px; }
.brow.total { border-top: 2px solid var(--ink); border-bottom: 0; }
.brow.total .amt { font-size: 22px; }

/* Savings */
.savings { padding: 22px 24px; }
.savings label { display: block; font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.savings input { width: 100%; padding: 12px 14px; font: inherit; font-size: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
.savings .field { margin-bottom: 14px; }
.savings .result { margin-top: 6px; padding: 16px; border-radius: 14px; background: var(--accent-soft); }
.savings .result strong { font-size: 22px; display: block; }
.ok { color: var(--good); } .short { color: var(--warn); }

/* Tables */
.tablecard { padding: 6px 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 12px 20px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.tabs button { font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.cheaper { color: var(--good); } .pricier { color: var(--warn); }

/* FAQ + footer */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { font-weight: 600; cursor: pointer; font-size: 19px; }
details p { margin: 10px 0 0; color: var(--muted); }
footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 40px; color: var(--muted); font-size: 15px; }

@media (max-width: 860px) {
  .hero, .grid2 { grid-template-columns: 1fr; }
  .band { min-height: 340px; }
  .controls { position: static; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .brow { grid-template-columns: 1fr auto; }
  .brow .bar { grid-column: 1 / -1; grid-row: 2; }
  th, td { padding: 10px 14px; }
  .figure { padding: 22px; }
}
