@font-face { font-family: 'Inter Tight'; font-weight: 400; font-display: swap; src: url('/fonts/InterTight-400.ttf') format('truetype'); }
@font-face { font-family: 'Inter Tight'; font-weight: 500; font-display: swap; src: url('/fonts/InterTight-500.ttf') format('truetype'); }
@font-face { font-family: 'Inter Tight'; font-weight: 600; font-display: swap; src: url('/fonts/InterTight-600.ttf') format('truetype'); }
@font-face { font-family: 'Inter Tight'; font-weight: 700; font-display: swap; src: url('/fonts/InterTight-700.ttf') format('truetype'); }
@font-face { font-family: 'Inter Tight'; font-weight: 800; font-display: swap; src: url('/fonts/InterTight-800.ttf') format('truetype'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url('/fonts/Sora-700.ttf') format('truetype'); }

:root {
  --bg: #FFFFFF;
  --ink: #15141A;
  --muted: #6B6878;
  --rule: #E4E2E9;
  --soft: #F5F4F7;
  --track: #ECEBF0;
  --ideal: #F8D5B5;
  --bar-bg: rgba(255, 255, 255, .94);
  --btn-bg: #15141A;
  --btn-fg: #FFFFFF;
  --accent: #EE7024;
  --ui: 'Inter Tight', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E0D13;
  --ink: #F2F0F5;
  --muted: #9A96A8;
  --rule: #2A2834;
  --soft: #17161E;
  --track: #2A2834;
  --ideal: #6B4630;
  --bar-bg: rgba(14, 13, 19, .94);
  --btn-bg: #F2F0F5;
  --btn-fg: #0E0D13;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { margin: 0; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 24px; }

/* bar */
.bar { position: sticky; top: 0; z-index: 5; background: var(--bar-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.bar-in { display: flex; align-items: center; gap: 28px; max-width: 1360px; height: 60px; margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand span { font: 700 21px/1 'Sora', var(--ui); letter-spacing: -.04em; }
.tabs { display: flex; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 100%; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 14.5px var(--ui); white-space: nowrap; cursor: pointer; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.links { display: flex; gap: 18px; margin-left: auto; font-size: 14px; font-weight: 600; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--ink); }
.theme { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--rule); background: none; color: var(--ink); cursor: pointer; }
.theme:hover { border-color: var(--ink); }
.theme .i-sun, [data-theme="dark"] .theme .i-moon { display: none; }
[data-theme="dark"] .theme .i-sun { display: block; }

/* title */
.title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 28px 0 18px; border-bottom: 2px solid var(--ink); }
h1 { font: 800 clamp(30px, 4vw, 44px)/1.05 var(--ui); letter-spacing: -.03em; }
#subtitle { margin: 6px 0 0; color: var(--muted); font-size: 16px; font-weight: 500; }
.meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font: 600 13.5px var(--ui); }

/* controls */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 0 0; }
.pick { display: flex; align-items: center; height: 40px; border: 1px solid var(--rule); background: var(--soft); }
.pick span { padding: 0 12px; color: var(--muted); font-size: 13px; font-weight: 600; border-right: 1px solid var(--rule); height: 100%; display: flex; align-items: center; }
.pick select { height: 100%; min-width: 220px; padding: 0 34px 0 12px; border: 0; background: transparent; color: var(--ink); font: 600 14.5px var(--ui); cursor: pointer; }
.seg { height: 40px; padding: 0 14px; border: 1px solid var(--rule); background: none; color: var(--ink); font: 600 14px var(--ui); cursor: pointer; }
.seg[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }

/* grid */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 32px; padding: 22px 0 8px; }
.map { position: relative; margin: 0; }
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; display: flex; align-items: center; transform: translate(-11px, -50%); pointer-events: auto; cursor: pointer; padding: 0; border: 0; background: none; font: inherit; }
.pin b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; font: 800 11.5px var(--ui); }
.pin span { display: none; height: 22px; padding: 0 7px; align-items: center; background: var(--bg); color: var(--ink); font: 700 12px var(--ui); white-space: nowrap; }
.pins.named .pin span { display: flex; }
.pins:not(.named) .pin { transform: translate(-50%, -50%); padding: 6px; }
.pins:not(.named) .pin b { min-width: 0; width: 9px; height: 9px; padding: 0; font-size: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--bg); }
.pop { position: absolute; z-index: 3; width: 250px; padding: 14px 14px 12px; background: var(--bg); border: 1px solid var(--ink); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.pop h3 { margin: 0; font: 800 17px var(--ui); }
.pop .ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pop .ph .chip { width: 44px; height: 34px; }
.pop p { margin: 2px 0 6px; color: var(--muted); font-size: 12.5px; }
.pop .x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); font: 600 18px var(--ui); cursor: pointer; }
.map img { width: 100%; height: auto; background: var(--soft); }
.key { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; margin-top: 16px; }
.key div { padding: 7px 0 0; height: 32px; text-align: center; font: 800 13px var(--ui); }
.key small { display: block; margin-top: 10px; font: 500 11px var(--ui); color: var(--muted); }
.keynote { margin: 26px 0 0; color: var(--muted); font-size: 13px; }

/* side */
.side { display: flex; flex-direction: column; gap: 26px; }
#q { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--rule); background: var(--soft); color: var(--ink); font: 500 15px var(--ui); outline: none; }
#q:focus { border-color: var(--ink); background: var(--bg); }
.bh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.bh h2 { font: 800 13px var(--ui); letter-spacing: .05em; text-transform: uppercase; }
.bh span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 9px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chip { display: grid; place-items: center; width: 44px; height: 36px; font: 800 16px var(--ui); }
.city b { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.city span { color: var(--muted); font-size: 12.5px; }
.score { font: 800 22px var(--ui); font-variant-numeric: tabular-nums; }
.detail { display: none; padding: 0 0 12px 56px; }
li.open .detail { display: block; }
.empty { padding: 14px 0; color: var(--muted); }

.f { display: grid; grid-template-columns: 82px 1fr 30px; align-items: center; gap: 10px; margin-top: 7px; font-size: 13px; font-weight: 600; }
.f i { position: relative; display: block; height: 9px; background: var(--track); }
.f i b { position: absolute; top: 0; bottom: 0; background: var(--ideal); }
.f i s { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.f em { font-style: normal; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
#why .f { grid-template-columns: 170px 1fr 34px; margin-top: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 30px; }
#why .f span small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }

.share { display: flex; height: 30px; margin-top: 14px; gap: 2px; }
.share div { height: 100%; }
.share-key { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; }
.share-key span { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.share-key i { width: 11px; height: 11px; }
.share-key em { font-style: normal; font-weight: 500; color: var(--muted); }

/* reference */
.ref { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; padding-top: 28px; border-top: 2px solid var(--ink); }
.ref h2 { font: 800 13px var(--ui); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
dt { display: flex; align-items: center; gap: 9px; font-weight: 800; }
dt i { width: 14px; height: 14px; }
dd { margin: 0; color: var(--muted); }
.sched { margin: 16px 0 0; font-size: 13.5px; font-weight: 600; }

footer a { color: inherit; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 56px; padding-top: 18px; padding-bottom: 32px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12.5px; }

@media (max-width: 1040px) {
  .grid { grid-template-columns: 1fr; }
  .ref { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 600px) {
  .wrap, .bar-in { padding-left: 16px; padding-right: 16px; }
  .bar-in { gap: 12px; }
  .brand span { display: none; }
  .links { display: none; }
  .pick { flex: 1 1 100%; }
  .pick select { min-width: 0; width: 100%; }
  .pin b { min-width: 18px; height: 18px; font-size: 10px; }
  .tabs button { padding: 0 10px; font-size: 13.5px; }
  .title { flex-direction: column; align-items: flex-start; }
  .meta { width: 100%; justify-content: space-between; }
  .map { margin: 0 -16px; }
  .key div { font-size: 10.5px; }
  .key small { font-size: 9.5px; }
  dl div { grid-template-columns: 70px 1fr; }
}
.zoom { margin-top: 10px; height: 32px; padding: 0 12px; border: 1px solid var(--rule); background: none; color: var(--ink); font: 600 13px var(--ui); cursor: pointer; }
.zoom:hover { border-color: var(--ink); }
