/* Content pages (guides, city pages, methodology, legal). Same tokens as index.html. */
:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #131315;
  --surface-2: #19191c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .22);
  --ink: #f2f1ee;
  --ink-2: #bdbcb6;
  --muted: #8a8984;
  --focus: #8fb8f0;
  --a: #3987e5;
  --b: #d95926;
  --bad-ink: #f3b49a;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: top .15s;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px 64px; }
@media (min-width: 640px) { .wrap { padding: 0 28px 72px; } }

/* Top bar (matches the calculator) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.top-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; font-size: 13.5px; }
.top-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.top-links a:hover, .top-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 420px) { .top-links { gap: 6px 14px; font-size: 13px; } }

/* Article */
.page { max-width: 720px; margin: 36px auto 0; }
@media (min-width: 640px) { .page { margin-top: 56px; } }
.kicker { font-size: 13.5px; font-weight: 550; color: var(--muted); }
.page h1 {
  margin-top: 12px; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.08;
  letter-spacing: -.035em; font-weight: 680; text-wrap: balance;
}
.lead { margin-top: 18px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--ink-2); }
.lead strong { color: var(--ink); }
.page h2 { margin-top: 48px; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; font-weight: 650; }
.page h3 { margin-top: 28px; font-size: 18px; line-height: 1.35; font-weight: 650; }
.page p, .page ul, .page ol { margin-top: 14px; color: var(--ink-2); }
.page ul, .page ol { padding-left: 22px; }
.page li + li { margin-top: 6px; }
.page strong { color: var(--ink); font-weight: 650; }
.page em { color: var(--ink); }
.page a:not(.btn) { color: var(--focus); text-decoration: none; border-bottom: 1px solid rgba(143, 184, 240, .35); }
.page a:not(.btn):hover { border-bottom-color: var(--focus); }

.formula {
  margin-top: 18px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.formula b { color: var(--ink); }
.callout {
  margin-top: 22px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-2);
}
.callout p:first-child { margin-top: 0; }
.note { font-size: 14px; color: var(--muted) !important; }

.table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
tbody th { font-weight: 550; color: var(--ink); }
td { color: var(--ink-2); }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.best td, tr.best th { background: rgba(255, 255, 255, .025); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 18px;
  border-radius: 11px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .15s;
}
.btn-solid { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn-solid:hover { background: #fff; }
.cta { margin-top: 24px !important; }

/* Lists of guides and cities */
.cards { list-style: none; display: grid; gap: 12px; margin-top: 18px !important; padding: 0 !important; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cards li { margin: 0 !important; }
.cards a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2) !important;
  border-bottom: 1px solid var(--line) !important; transition: border-color .15s;
}
.cards a:hover { border-color: var(--line-3) !important; }
.cards b { color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.35; }
.cards span { font-size: 14px; line-height: 1.5; }

.sources li { font-size: 14.5px; }
.sources b { color: var(--ink); font-weight: 600; }

/* Ad slots ({{ad}} in tools/build-pages.mjs): fixed sizes, so nothing moves when an ad arrives.
   AdSense then locks the <ins> at its size, so after a rotation the box grows to fit instead of
   letting the ad overlap the text. 728px only from 1024px, which no phone reaches in landscape. */
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 48px; }
.ad-label { font-size: 11px; font-weight: 550; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; color: var(--muted); }
.ad-box { display: flex; justify-content: center; width: 300px; max-width: 100%; min-height: 250px; background: rgba(255, 255, 255, .02); }
.ad-box ins { display: block; flex: none; width: 100%; height: 250px; }
@media (min-width: 1024px) { /* a little wider than the text column */
  .ad-box { width: 728px; max-width: none; min-height: 90px; }
  .ad-box ins { height: 90px; }
}
.ad-box ins[data-ad-status="unfilled"] { display: none !important; } /* AdSense's advice; otherwise a white box */

/* Settings the site owner still has to fill in (see tools/build-pages.mjs) */
.todo { padding: 0 5px; border-radius: 5px; background: rgba(236, 131, 90, .16); color: var(--bad-ink); font-weight: 600; }

/* Footer (matches the calculator) */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 72px; padding: 22px 0 8px;
  border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: var(--muted);
}
.foot p { max-width: 72ch; margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; width: 100%; }
.foot-links a, .foot-links button { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-3); }
.foot-links button { padding: 0; border-width: 0 0 1px; background: none; font: inherit; cursor: pointer; } /* Privacy and cookie settings */
.foot-links a:hover, .foot-links button:hover { color: var(--ink); border-bottom-color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
