/* HowMuchToLive · design system
   Ink + highlighter. Yellow always marks something you can change or something you added. */

@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-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: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-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: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --canvas: #ffffff;
  --mist: #f1f3f6;
  --mist-2: #e6eaf0;
  --ink: #13213c;
  --ink-2: #4a5670;
  --ink-3: #737e94;
  --hair: #dce1ea;
  --hl: #ffe04b;
  --hl-soft: #fff4c2;
  --cheap: #0a7d68;
  --pricey: #c43a5e;
  --land: #d3d9e3;
  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 40px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; font-variant-numeric: tabular-nums; }
a { color: inherit; text-underline-offset: 3px; }
button, select, input, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.nw { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- nav ---------- */
.nav { border-bottom: 1px solid var(--hair); background: var(--canvas); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-stretch: 118%; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { flex: none; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.nav ul a { text-decoration: none; color: var(--ink-2); }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--ink); }
.nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--hl); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn { display: inline-block; text-align: center; white-space: nowrap; border-radius: 8px; padding: 9px 16px; font-weight: 600; font-size: 15px; line-height: 1.4; text-decoration: none; border: 1.5px solid var(--ink); background: var(--canvas); cursor: pointer; }
.btn.solid { background: var(--ink); color: #fff; }
.btn.hl { background: var(--hl); border-color: var(--hl); color: var(--ink); }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.done { background: var(--cheap); border-color: var(--cheap); color: #fff; opacity: 1; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: inherit; }

.sel { appearance: none; border: 1px solid var(--hair); background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2313213c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center; border-radius: 8px; padding: 8px 30px 8px 12px; font-size: 15px; max-width: 100%; cursor: pointer; }
.input { border: 1px solid #c9d0dc; border-radius: 8px; padding: 9px 12px; font-size: 16px; background: var(--canvas); width: 100%; }
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19,33,60,.12); }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--hair); border-radius: 10px; padding: 3px; background: var(--canvas); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 14px; font-weight: 550; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- type ---------- */
h1, h2, h3 { text-wrap: balance; }
.title { font-stretch: 112%; font-weight: 650; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 10px; }
.lede { margin: 0; color: var(--ink-2); max-width: 42em; }
.delta.down { color: var(--cheap); }
.delta.up { color: var(--pricey); }
.n { color: var(--ink-3); }
.m { display: none; }
.est { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; color: #7a5b00; background: var(--hl-soft); border-radius: 99px; padding: 1px 8px; vertical-align: 1px; white-space: nowrap; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; box-shadow: inset 0 0 0 1px rgba(19,33,60,.12); }

/* ---------- home: compare two cities ---------- */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(44px, 6vw, 72px); }
.hero h1 { margin: 0 0 10px; font-stretch: 112%; font-weight: 650; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.02em; }
.hero .lede { font-size: clamp(16px, 1.5vw, 19px); }
.picker { margin-top: 28px; border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(16px, 2.4vw, 24px); display: grid; gap: 20px; background: var(--canvas); }
.cities { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.fld { display: grid; gap: 7px; min-width: 0; }
.fld > span { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.citysel { appearance: none; width: 100%; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.3; padding: 12px 42px 12px 14px; border: 1.5px solid #c3cad7; border-radius: 10px; cursor: pointer; text-overflow: ellipsis;
  background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2313213c' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 15px center; }
.citysel:hover { border-color: var(--ink); }
.citysel:focus-visible { outline: 3px solid var(--hl); outline-offset: 1px; border-color: var(--ink); }
.swap { width: 48px; height: 50px; border-radius: 10px; border: 1.5px solid #c3cad7; background: var(--canvas); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.swap:hover { border-color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt > span { font-size: 14px; font-weight: 650; color: var(--ink-2); }

.result { margin-top: clamp(32px, 4.5vw, 48px); }
.headline { margin: 0; font-stretch: 112%; font-weight: 650; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.015em; }
.headline .down { color: var(--cheap); }
.headline .up { color: var(--pricey); }
.result .note { margin: 8px 0 0; color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.costcard { container-type: inline-size; min-width: 0; background: var(--mist); border-radius: 16px; padding: clamp(18px, 2.4vw, 26px); }
.costcard .role { margin: 0; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.costcard h3 { margin: 4px 0 0; font-size: 22px; font-stretch: 112%; font-weight: 650; overflow-wrap: anywhere; }
.costcard h3 small { font-size: 15px; font-weight: 400; color: var(--ink-3); margin-left: 6px; font-stretch: 100%; }
.costcard .total { margin: 16px 0 0; font-weight: 800; font-stretch: 75%; font-size: clamp(26px, 12cqi, 56px); line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.costcard .per { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.costcard .per b { color: var(--ink); font-weight: 650; }

.bdhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 36px; }
.bdhead h2 { margin: 0; font-size: 18px; font-stretch: 112%; font-weight: 650; }
.breakdown { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.breakdown th { text-align: right; font-weight: 500; color: var(--ink-3); padding: 0 0 8px 10px; font-size: 13px; }
.breakdown th:first-child, .breakdown td:first-child { text-align: left; padding-left: 0; }
.breakdown td { padding: 10px 0 10px 10px; border-top: 1px solid var(--hair); text-align: right; white-space: nowrap; }
.breakdown .total td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.breakdown td:first-child { white-space: normal; }
.tablescroll { overflow-x: auto; }
@media (max-width: 400px) { .breakdown { font-size: 13px; } .breakdown td, .breakdown th { padding-left: 6px; } }
.breakdown th span { display: block; overflow: hidden; text-overflow: ellipsis; max-width: 12ch; margin-left: auto; }
.provenance { margin-top: 28px; font-size: 14.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.provenance strong { color: var(--ink); font-weight: 600; }

/* city page: monthly cost by category */
.catbars { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 4px; }
.catbars li { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(9em, auto); gap: 4px 20px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hair); }
.catbars li:first-child { border-top: 0; }
.catbars .cn { font-weight: 650; }
.catbars .cn small { display: block; font-weight: 400; font-size: 13.5px; color: var(--ink-3); }
.catbars .bar { height: 12px; background: var(--mist-2); border-radius: 6px; overflow: hidden; }
.catbars .bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; }
.catbars .amt { font-weight: 700; text-align: right; white-space: nowrap; }
.catbars .total { border-top: 1.5px solid var(--ink); }
.catbars .total .amt { font-size: 18px; }

/* ---------- price tables ---------- */
.band { background: var(--mist); padding: clamp(48px, 7vw, 88px) 0; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 28px; }
.ptable { width: 100%; border-collapse: collapse; background: var(--canvas); border-radius: 14px; overflow: hidden; font-size: 15px; }
.ptable th { text-align: left; font-weight: 500; font-size: 13px; color: var(--ink-3); padding: 14px 20px; border-bottom: 1px solid var(--hair); }
.ptable td { padding: 13px 20px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .r { text-align: right; }
.ptable .typ { font-weight: 650; white-space: nowrap; }
.ptable .item { width: 38%; }
.ptable .spread { width: 30%; }
.strip { position: relative; height: 22px; min-width: 150px; }
.strip .ax { position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--hair); }
.strip .p90 { position: absolute; top: 7px; height: 8px; background: #c7d0e0; border-radius: 4px; }
.strip .p75 { position: absolute; top: 5px; height: 12px; background: var(--ink); opacity: .82; border-radius: 3px; }
.strip .med { position: absolute; top: 1px; width: 3px; height: 20px; background: var(--ink); margin-left: -1px; border-radius: 2px; }
.strip .home { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border: 2.5px solid var(--ink-2); border-radius: 50%; background: #fff; }
.keyline { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.keyline span { display: inline-flex; align-items: center; gap: 8px; }
.k1 { width: 22px; height: 8px; background: #c7d0e0; border-radius: 4px; display: inline-block; }
.k2 { width: 14px; height: 12px; background: var(--ink); opacity: .82; border-radius: 3px; display: inline-block; }
.k3 { width: 12px; height: 12px; border: 2.5px solid var(--ink-2); border-radius: 50%; display: inline-block; }
.more-link { display: inline-block; margin-top: 18px; font-weight: 600; }
.pgroup { margin-top: 32px; }
.pgroup h3 { font-size: 18px; font-stretch: 112%; font-weight: 650; margin: 0 0 10px; }

/* ---------- method ---------- */
.method { padding: clamp(56px, 8vw, 104px) 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 36px; counter-reset: s; list-style: none; padding: 0; }
.steps li { border-top: 2px solid var(--ink); padding-top: 18px; }
.steps h3 { margin: 0 0 8px; font-size: 20px; font-stretch: 112%; font-weight: 650; letter-spacing: -0.01em; display: flex; gap: 12px; align-items: baseline; }
.steps h3::before { counter-increment: s; content: counter(s); font-stretch: 66%; font-weight: 800; font-size: 34px; line-height: 1; }
.steps p { margin: 0; color: var(--ink-2); }
.flow { margin-top: 40px; background: var(--mist); border-radius: 14px; padding: 22px 24px; }
.flow p { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.flowbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--mist-2); }
.flowbar i { display: block; height: 100%; }
.flowkey { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14px; }
.flowkey span { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- rankings ---------- */
.rank { padding: 0 0 clamp(56px, 8vw, 104px); }
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 28px; }
.rgrid h3 { font-size: 17px; margin: 0 0 8px; font-weight: 650; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist li { border-top: 1px solid var(--hair); }
.rlist a { display: grid; grid-template-columns: 30px minmax(0, 1fr) 100px 120px; gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; font-size: 15px; }
.rlist a:hover .cname { text-decoration: underline; }
.rlist .i { color: var(--ink-3); font-size: 14px; }
.rlist .cname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rlist .cname small { font-weight: 400; color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.rlist .rb { height: 6px; background: var(--mist); border-radius: 3px; overflow: hidden; }
.rlist .rb i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.rlist .v { text-align: right; font-weight: 600; }

/* ---------- contribute band ---------- */
.give { background: var(--ink); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.give .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.give h2 { font-stretch: 112%; font-weight: 650; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; }
.give p { margin: 0; color: #c6cddb; max-width: 34em; }
.give ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; color: #dfe4ee; }
.give li { display: flex; gap: 12px; }
.give li svg { flex: none; margin-top: 4px; }

/* ---------- city page ---------- */
.chead { padding: clamp(36px, 6vw, 72px) 0 24px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin: 0 0 14px; }
.crumbs a { color: var(--ink-2); }
.chead h1 { margin: 0; font-stretch: 66%; font-weight: 800; font-size: clamp(56px, 10vw, 128px); line-height: .9; letter-spacing: -0.03em; }
.chead .country { font-stretch: 112%; font-size: clamp(18px, 2vw, 24px); color: var(--ink-2); margin: 8px 0 0; }
.csum { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; margin-top: 32px; align-items: start; }
.csum .lead { font-size: clamp(20px, 2.2vw, 28px); font-stretch: 112%; line-height: 1.3; letter-spacing: -0.01em; margin: 0; }
.csum .lead strong { font-weight: 700; background: linear-gradient(transparent 60%, var(--hl-soft) 60%); }
.quality { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); margin-top: 16px; flex-wrap: wrap; }
.meter { display: inline-flex; gap: 3px; }
.meter b { width: 6px; height: 14px; border-radius: 2px; background: var(--hair); }
.meter b.on { background: var(--ink); }
.cur-pick { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }

.checker { background: var(--canvas); border: 1.5px solid var(--ink); border-radius: 18px; padding: clamp(18px, 2.4vw, 26px); }
.checker h2 { margin: 0 0 4px; font-size: 20px; font-stretch: 112%; font-weight: 650; letter-spacing: -0.01em; }
.checker > p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 18px; font-weight: 550; }
.field { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; border-bottom: 3px solid var(--hl); background: var(--hl-soft); border-radius: 6px 6px 2px 2px; }
.field:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.field select { appearance: none; min-width: 0; text-overflow: ellipsis; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2313213c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; padding: 6px 30px 6px 10px; font-weight: 650; cursor: pointer; outline: 0; max-width: 100%; }
.field.money { padding-left: 10px; }
.field.money span { color: var(--ink-2); }
.field.money input { border: 0; outline: 0; width: 5.5em; padding: 6px 10px 6px 4px; font-weight: 700; background: transparent; }
.dots { width: 100%; height: 112px; display: block; margin-top: 16px; overflow: visible; }
.dots .d { fill: #c7d0e0; }
.dots .d.lo { fill: #8d9bb8; }
.dots .you { stroke: var(--ink); stroke-width: 2.5; }
.dots .youlab { fill: var(--ink); font-size: 12px; font-weight: 700; }
.dots .youbg { fill: var(--hl); }
.dots .ax { fill: var(--ink-3); font-size: 12px; }
.dots .base { stroke: var(--hair); stroke-width: 1.5; }
.dots .band { fill: var(--mist-2); }
.verdict { font-size: clamp(20px, 2.2vw, 26px); font-stretch: 100%; font-weight: 750; letter-spacing: -0.015em; line-height: 1.15; margin: 10px 0 4px; }
.verdict.good { color: var(--cheap); }
.verdict.high { color: var(--pricey); }
.verdict.odd { color: #8a6100; }
.detail { margin: 0; color: var(--ink-2); font-size: 15px; }
.detail b { color: var(--ink); }
.actions { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-top: 16px; }
.actions small { color: var(--ink-3); font-size: 13px; max-width: 24em; }
.ts { min-height: 0; }

.tagsec { padding: clamp(40px, 6vw, 72px) 0; }
.tagsec .head { margin-bottom: 0; }
.pairs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pairs a { border: 1.5px solid var(--hair); border-radius: 99px; padding: 7px 14px; text-decoration: none; font-weight: 550; font-size: 15px; }
.pairs a:hover { border-color: var(--ink); }
.pairs small { font-weight: 600; margin-left: 6px; }

/* ---------- map page ---------- */
.atlas { background: var(--mist); padding: clamp(28px, 4vw, 48px) 0 28px; }
.atlas .intro { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: end; }
.atlas h1 { margin: 0; font-stretch: 112%; font-weight: 650; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.05; letter-spacing: -0.025em; max-width: 15em; }
.search { position: relative; }
.search label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.search input { width: 100%; border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 16px 12px 44px; font-size: 16px; background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='7.5' cy='7.5' r='5.5' fill='none' stroke='%2313213c' stroke-width='1.8'/%3E%3Cpath d='M12 12l4.5 4.5' stroke='%2313213c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 15px center; }
.sugg { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: var(--canvas); border-radius: 12px; box-shadow: 0 12px 40px rgba(19,33,60,.16); list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow: auto; }
.sugg li { padding: 9px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.sugg li[aria-selected="true"], .sugg li:hover { background: var(--mist); }
.sugg small { color: var(--ink-3); }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 22px; }
.mapcol { position: relative; min-width: 0; }
.map { width: 100%; height: auto; display: block; overflow: visible; }
.map .land { stroke: var(--land); stroke-width: 1.15; stroke-linecap: round; fill: none; }
.map circle.city { stroke: var(--mist); stroke-width: .5; cursor: pointer; transition: fill .4s ease; }
.map circle.city:focus { outline: none; stroke: var(--ink); stroke-width: 1; }
.map circle.base { stroke: var(--hl); stroke-width: 1; }
.map .ring { fill: none; stroke: var(--ink); stroke-width: .6; }
.map .lbl { font-size: 3.6px; font-weight: 650; fill: var(--ink); paint-order: stroke; stroke: var(--mist); stroke-width: 1.2px; pointer-events: none; }
.tip { position: absolute; z-index: 15; pointer-events: none; background: var(--ink); color: #fff; border-radius: 10px; padding: 9px 13px; font-size: 14px; line-height: 1.4; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }
.tip span { color: #b8c3d6; }
.maplegend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 14px; font-size: 14px; }
.maplegend p { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.maplegend .sc { flex: 1; min-width: 240px; max-width: 420px; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.scale i { height: 10px; border-radius: 3px; }
.scale-l { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 12px; margin-top: 6px; }
.panel { background: var(--canvas); border-radius: 16px; padding: 20px 22px; }
.panel h2 { margin: 0; font-stretch: 100%; font-weight: 700; font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; }
.panel .where { color: var(--ink-3); font-size: 14px; margin: 2px 0 12px; }
.panel .sum { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.panel .sum b { color: var(--ink); font-size: 26px; font-weight: 800; font-stretch: 80%; letter-spacing: -0.02em; display: block; line-height: 1.15; }
.panel dl { margin: 0; display: grid; grid-template-columns: 1fr auto; font-size: 14px; }
.panel dt, .panel dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--hair); }
.panel dd { text-align: right; font-weight: 600; padding-left: 10px; }
.panel .quality { margin: 12px 0 14px; }
.panel .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.panel .btn { padding: 7px 13px; font-size: 14px; }
section.block { padding: clamp(48px, 7vw, 88px) 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0 18px; }
.tabs button { border: 0; background: var(--mist); border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 550; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tools { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list th { text-align: left; font-weight: 500; font-size: 13px; color: var(--ink-3); padding: 0 12px 10px; border-bottom: 1.5px solid var(--ink); }
.list td { padding: 11px 12px; border-bottom: 1px solid var(--hair); }
.list .r { text-align: right; }
.list .city a { font-weight: 650; text-decoration: none; }
.list .city a:hover { text-decoration: underline; }
.list .city small { font-size: 13px; color: var(--ink-3); margin-left: 8px; }
.div { position: relative; height: 16px; min-width: 150px; flex: 1; }
.div::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--ink-3); }
.div i { position: absolute; top: 3px; height: 10px; border-radius: 3px; }
.div-l { font-size: 13px; color: var(--ink-2); margin-left: 10px; min-width: 48px; display: inline-block; text-align: right; }
.vs { display: flex; align-items: center; }

/* ---------- add prices ---------- */
.addpage { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 100px); }
.addpage h1 { font-stretch: 112%; font-weight: 650; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 12px; max-width: 16em; }
.addgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; margin-top: 32px; align-items: start; }
.where-box { background: var(--mist); border-radius: 14px; padding: 18px 20px; display: grid; gap: 12px; }
.where-box .row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.where-box label { font-weight: 600; }
.group { margin-top: 28px; }
.group h2 { font-size: 18px; font-stretch: 112%; font-weight: 650; margin: 0 0 6px; }
.irow { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 6px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hair); }
.irow label { font-size: 15px; }
.irow .money { display: flex; align-items: center; border: 1px solid #c9d0dc; border-radius: 8px; background: var(--canvas); }
.irow .money:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19,33,60,.12); }
.irow .money span { padding-left: 10px; color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.irow .money input { border: 0; outline: 0; width: 100%; padding: 9px 10px 9px 6px; text-align: right; background: transparent; font-size: 16px; min-width: 0; }
.irow .hint { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-3); margin: 0; }
.irow .hint.warn { color: #7a5600; background: var(--hl-soft); border-radius: 8px; padding: 8px 10px; }
.irow .hint.bad { color: var(--pricey); }
.irow .hint button { margin-left: 6px; }
.irow.filled .money { border-color: var(--ink); }
.toggle-more { margin-top: 18px; }
.aside { position: sticky; top: 18px; display: grid; gap: 16px; }
.aside .card { border: 1.5px solid var(--ink); border-radius: 14px; padding: 18px; }
.aside .card h2 { font-size: 17px; margin: 0 0 8px; }
.aside .card p { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-2); }
.aside .card .count { color: var(--ink); font-stretch: 66%; font-weight: 800; font-size: 44px; line-height: 1; margin: 0 0 6px; }
.notice { border-radius: 12px; padding: 14px 16px; font-size: 15px; margin-top: 16px; }
.notice.ok { background: #e3f3ee; color: #0a5a4b; }
.notice.err { background: #fbe7ec; color: #8a1d3b; }
.notice.info { background: var(--mist); color: var(--ink-2); }
.results { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 14.5px; }
.results li { display: flex; gap: 10px; align-items: baseline; }
.badge { font-size: 12px; font-weight: 650; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.b-ok { background: #d8efe8; color: #0a5a4b; }
.b-hold { background: var(--hl-soft); color: #7a5600; }
.b-no { background: #eceff3; color: var(--ink-2); }
.suggest { margin-top: 40px; border-top: 1px solid var(--hair); padding-top: 28px; }
.suggest form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 640px; margin-top: 14px; }
.suggest form .full { grid-column: 1 / -1; }
.suggest label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- prose pages ---------- */
.prose { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 100px); }
.prose .wrap { max-width: 820px; }
.prose h1 { font-stretch: 112%; font-weight: 650; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 16px; }
.prose h2 { font-stretch: 112%; font-weight: 650; font-size: 24px; letter-spacing: -0.01em; margin: 44px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; line-height: 1.65; max-width: 40em; }
.prose strong { color: var(--ink); }
.tablewrap { overflow-x: auto; margin: 14px 0; }
.tablewrap table { min-width: 560px; margin: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 14px 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink-3); font-size: 13px; }
.prose code { background: var(--mist); border-radius: 4px; padding: 1px 5px; font-size: .92em; }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.statgrid div { background: var(--mist); border-radius: 12px; padding: 14px 16px; }
.statgrid b { display: block; font-stretch: 70%; font-weight: 800; font-size: 34px; line-height: 1.05; }
.statgrid span { font-size: 14px; color: var(--ink-2); }

/* ---------- admin ---------- */
.admin { padding: 32px 0 80px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.admin th, .admin td { text-align: left; padding: 8px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.admin th { font-weight: 600; color: var(--ink-3); font-size: 12.5px; }
.admin .btn { padding: 4px 10px; font-size: 13px; }
.admin form.cityform { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.admin form.cityform label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }

/* ---------- footer ---------- */
footer.site { padding: 40px 0 56px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--hair); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 28px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer.site a { text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .fine { color: var(--ink-3); }
.give + footer.site { border-top: 0; }

/* ---------- 404 ---------- */
.lost { padding: clamp(64px, 12vw, 160px) 0; }
.lost h1 { font-stretch: 66%; font-weight: 800; font-size: clamp(64px, 12vw, 150px); line-height: .9; margin: 0 0 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .csum { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .nav ul { display: none; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .rgrid { grid-template-columns: 1fr; gap: 36px; }
  .give .wrap { grid-template-columns: 1fr; }
  .atlas .intro { grid-template-columns: 1fr; gap: 20px; }
  .stage { grid-template-columns: 1fr; gap: 20px; }
  .addgrid { grid-template-columns: 1fr; }
  .aside { position: static; }
  .admin form.cityform { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .m { display: inline; }
  .ptable thead { display: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable td { display: block; width: 100%; }
  .ptable tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 16px; border-bottom: 1px solid var(--hair); gap: 4px 12px; }
  .ptable tr:last-child { border-bottom: 0; }
  .ptable td, .ptable td.item, .ptable td.spread { padding: 0; border: 0; width: auto; }
  .ptable td.item { grid-column: 1; }
  .ptable td.typ { grid-column: 2; grid-row: 1; text-align: right; }
  .ptable td.spread { grid-column: 1 / -1; padding-top: 6px; }
  .ptable td.vs { grid-column: 1; text-align: left; font-size: 14px; }
  .ptable td.reports { grid-column: 2; font-size: 14px; }
  .ptable td.reports:nth-child(4) { grid-column: 1 / -1; text-align: left; }
  .strip { min-width: 0; }
  .rlist a { grid-template-columns: 26px minmax(0, 1fr) 100px; }
  .rlist .rb { display: none; }
  .cities { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .swap { justify-self: center; width: 44px; height: 40px; transform: rotate(90deg); }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .opts { gap: 14px; }
  .opt { width: 100%; display: grid; gap: 8px; justify-items: start; }
  .catbars li { grid-template-columns: minmax(0, 1fr) auto; }
  .catbars .bar { grid-column: 1 / -1; grid-row: 2; }
  .catbars li > span:empty { display: none; }
  .breakdown { font-size: 14px; }
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; }
  .list tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--hair); gap: 2px 12px; }
  .list td { border: 0; padding: 0; }
  .list td.c-fam, .list td.c-n { display: none; }
  .list td.c-vs { grid-column: 1 / -1; padding-top: 6px; }
  .div { min-width: 0; }
  .map .lbl { display: none; }
  .irow { grid-template-columns: minmax(0, 1fr) 140px; }
  .suggest form { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: 1fr; }
  .nav .btn.solid { padding: 8px 12px; }
}
@media (max-width: 420px) {
  .brand span { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .map circle.city { transition: none; }
}

/* add page on phones: keep the submit bar in reach */
@media (max-width: 1020px) {
  .aside { position: sticky; bottom: 0; z-index: 10; gap: 0; margin: 0 calc(-1 * var(--gut)); }
  .aside .card + .card { display: none; }
  .aside .card:first-child { background: var(--canvas); border-radius: 14px 14px 0 0; border-width: 1.5px 0 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 12px var(--gut); box-shadow: 0 -10px 28px rgba(19,33,60,.10); }
  .aside .card:first-child > p:not(.count) { display: none; }
  .aside .card .count { font-size: 32px; margin: 0; }
  .aside .card h2 { margin: 0; font-size: 15px; }
  .aside .card .btn.big { padding: 10px 16px; font-size: 15px; }
  .aside #ts, .aside #result { grid-column: 1 / -1; }
  .aside #result .notice { margin-top: 6px; max-height: 40vh; overflow: auto; }
}
@media (max-width: 1020px) {
  .aside .card:first-child > .btn { grid-column: 3; grid-row: 1; }
  .aside .card:first-child > .count { grid-column: 1; grid-row: 1; }
  .aside .card:first-child > h2 { grid-column: 2; grid-row: 1; }
}
