/* Relocation Scorecard. Mobile-first. Clean white and cream, terracotta, pastel teal and sky blue. */
:root {
  --white: #ffffff;
  --cream: #fdfbf7;
  --sand: #f6efe4;
  --ink: #203432;
  --ink-deep: #1d4f4a;
  --primary: #bd4f28;
  --primary-hover: #9f3f1d;
  --muted: #56646b;
  --line: #ebe4d8;
  --line-strong: #d9d0c1;
  --teal: #0f7d71;
  --teal-hover: #0b665c;
  --teal-soft: #e3f3f0;
  --teal-pastel: #bfe6df;
  --terra: #bd4f28;
  --terra-bright: #e07a4f;
  --peach: #fde9dc;
  --sky: #d6ebf8;
  --sky-soft: #eef7fc;
  --lilac: #1d4f4a;
  --lilac-soft: #efebfa;
  --sun: #f6c453;
  --ok: #1d6f39;
  --ok-bg: #e5f4e9;
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --warn-ink: #6e4200;
  --warn-bg: #fff2dc;
  --focus: #1d4f4a;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(29, 43, 48, .05);
  --font-head: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 17px/1.65 var(--font-body);
  overflow-wrap: break-word;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink-deep); font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 760px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink-deep); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--terra); margin-bottom: .6em; }
.eyebrow.teal { color: var(--teal); }
.eyebrow.lilac { color: var(--lilac); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede, .lede.center { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.home .site-header { position: absolute; top: 0; left: 0; right: 0; background: transparent; border-bottom: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-deep); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; min-height: 44px; }
.logo:hover { color: var(--ink); }
.logo-mark { flex: none; width: 40px; height: 40px; }
.footer-brand .logo-mark { width: 34px; height: 34px; }
.logo-accent { color: var(--primary); }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% - 4px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(29, 43, 48, .12); padding: 8px; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav ul a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; color: var(--ink); text-decoration: none; border-radius: 12px; font-weight: 600; }
.site-nav ul a:hover { background: var(--cream); }
.site-nav a[aria-current="page"] { color: var(--primary); }
.nav-cta { width: 100%; margin-top: 8px; }
@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 20px; position: static; background: none; border: 0; box-shadow: none; padding: 0; }
  .site-nav ul { display: flex; gap: 4px; }
  .site-nav ul a { min-height: 44px; padding: 0 12px; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
  .site-nav ul a:hover { background: rgba(255, 255, 255, .6); }
  .nav-cta { width: auto; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--white); color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2;
}
.btn:hover { background: var(--cream); color: var(--ink); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-large { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn-small { padding: 0 14px; font-size: .9rem; }
.btn-icon { min-width: 44px; padding: 0; }
.btn-danger { color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label, .label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.hint { font-size: .86rem; color: var(--muted); margin: 4px 0 0; }
input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--white); border: 1px solid var(--line-strong); border-radius: 12px;
}
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.field-error { color: var(--bad); font-size: .86rem; font-weight: 600; margin: 4px 0 0; }
.field-error:empty { display: none; }
.form-success { color: var(--ok); font-weight: 600; margin: 8px 0 0; }
.form-success:empty { display: none; }

/* ---------- Home: hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, #c6e3f6 0%, var(--sky) 40%, #f3f5f0 78%, #fdeee2 100%); padding: 112px 0 0; overflow: hidden; text-align: center; }
.hero-clouds { position: absolute; inset: 40px 0 auto; width: 100%; height: 260px; object-fit: cover; opacity: .95; pointer-events: none; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 14ch; margin-left: auto; margin-right: auto; }
.hero .lede { color: #3f5058; margin-bottom: 28px; }
.hero-skyline { position: relative; z-index: 1; display: block; width: 100%; height: auto; min-height: 200px; object-fit: cover; object-position: 58% bottom; margin-top: -48px; }
@media (min-width: 768px) { .hero { padding-top: 140px; } .hero-skyline { margin-top: -90px; } }

.start-card {
  position: relative; z-index: 3; max-width: 620px; margin: 0 auto; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: 0 10px 30px rgba(29, 43, 48, .06);
}
.start-card label { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.start-card input[type="text"] { border: 0; background: var(--cream); min-height: 56px; font-size: 17px; border-radius: 14px; padding: 0 16px; }
.start-card input[type="text"]:focus-visible { outline-offset: 0; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.chip { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--peach); border-color: #f3c3a8; }
.start-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 12px; }
.start-foot .hint { margin: 0; flex: 1 1 220px; }
.start-foot .btn-primary { flex: 1 0 100%; }
@media (min-width: 560px) { .start-foot .btn-primary { flex: 0 0 auto; } }

/* ---------- Sections ---------- */
.band { padding: 64px 0; }
.band-cream { background: var(--cream); }
@media (min-width: 900px) { .band { padding: 96px 0; } }
.intro-row { display: grid; gap: 12px 48px; align-items: end; }
.intro-row h2 { margin: 0; max-width: 14ch; }
.intro-row p { margin: 0; color: var(--muted); max-width: 48ch; }
@media (min-width: 900px) { .intro-row { grid-template-columns: 1fr 1fr; } .intro-row p { justify-self: end; } }

.feature { display: grid; gap: 28px; align-items: center; margin-top: 56px; }
.feature-copy { max-width: 46ch; }
.feature-copy h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: .4em; }
.feature-copy p { color: var(--muted); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 88px; }
  .feature.flip .feature-copy { order: 2; }
}

/* A screenshot of the real scorecard in a soft, rounded scene */
.mock { position: relative; border-radius: 28px; padding: 28px 22px 0; }
.mock-sky { background: linear-gradient(170deg, #cfe7f6, #eef7fc 70%); }
.mock-teal { background: linear-gradient(170deg, #cdeee8, #f1faf8 70%); }
.mock-peach { background: linear-gradient(170deg, #fde0cf, #fff6f0 70%); }
.mock-inner { overflow: hidden; border-radius: 0 0 28px 28px; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.mock-shot { position: relative; z-index: 1; display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: 18px 18px 0 0; border: 1px solid var(--line); border-bottom: 0; background: var(--white); }
.sticker { position: absolute; z-index: 2; height: auto; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(29, 43, 48, .08)); }
.mock .sticker-a { width: 110px; right: -8px; top: -34px; transform: rotate(8deg); }
.mock .sticker-b { width: 64px; left: -8px; bottom: 30px; transform: rotate(-6deg); }
.mock .sticker-c { width: 56px; left: -6px; top: -104px; transform: rotate(-8deg); }
.mock .sticker-d { width: 120px; right: -8px; bottom: 24px; transform: rotate(4deg); }
@media (min-width: 900px) {
  .mock .sticker-a { width: 140px; right: -12px; top: -50px; }
  .mock .sticker-b { width: 88px; left: -12px; }
  .mock .sticker-c { width: 72px; left: -12px; top: -140px; }
  .mock .sticker-d { width: 160px; right: -12px; }
}
@media (min-width: 1240px) {
  .mock .sticker-a { right: -40px; }
  .mock .sticker-b { left: -36px; }
  .mock .sticker-c { left: -30px; }
  .mock .sticker-d { right: -48px; }
}

/* Floral frame around the desktop preview */
.frame-wrap { position: relative; max-width: 980px; margin: 40px auto 0; aspect-ratio: 1200 / 780; }
.frame-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.frame-cta { margin-top: 28px; }
.guide-nudge { margin-top: 24px; }
.frame-shot { position: absolute; left: 9%; top: 11.5%; z-index: 1; width: 82%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--white); -webkit-mask-image: linear-gradient(#000 82%, transparent 99%); mask-image: linear-gradient(#000 82%, transparent 99%); }

/* Wreath around the worked-example card */
.wreath { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin: 32px auto 0; display: grid; place-items: center; }
.wreath::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: var(--cream); }
.wreath-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wreath-card { position: relative; z-index: 1; width: 66%; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 18px 16px; }
.chapters { list-style: none; margin: 0 0 12px; padding: 0; text-align: left; display: grid; gap: 10px; }
.chapters li { margin: 0; display: grid; align-content: start; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--cream); }
.chapters li.next { background: var(--white); border: 1.5px dashed var(--terra-bright); }
.chapter-year { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.chapters li.next .chapter-year { color: var(--terra); }
.chapters strong { font-family: var(--font-head); font-size: clamp(1rem, .85rem + .6vw, 1.2rem); }
.chapter-score { font-size: .82rem; color: var(--muted); }
.wreath .sticker { width: 72px; }
.wreath .sticker-left { left: 2%; bottom: 8%; transform: rotate(-8deg); }
.wreath .sticker-right { right: 2%; top: 6%; transform: rotate(7deg); width: 52px; }
@media (min-width: 700px) { .wreath .sticker { width: 110px; } .wreath .sticker-left { left: -8%; } .wreath .sticker-right { right: -4%; width: 72px; } }
.wreath-card .btn { min-height: 44px; }
@media (max-width: 480px) { .wreath { width: calc(100% + 24px); margin-left: -12px; } .wreath-card { width: 74%; padding: 10px; } .chapters li { padding: 8px 10px; } }

.cta-final { text-align: center; }
.cta-final .sticker { position: static; display: block; width: 120px; margin: 0 auto 12px; }
.cta-final h2 { max-width: 12ch; margin-left: auto; margin-right: auto; }
.cta-final .start-card { margin-top: 24px; }

/* ---------- Inner pages ---------- */
.page-hero { position: relative; background: linear-gradient(180deg, var(--sky-soft), var(--white)); padding: 40px 0 24px; overflow: hidden; }
.page-hero .sticker { display: none; }
@media (min-width: 768px) {
  .page-hero { padding: 64px 0 32px; }
  .page-hero .sticker { display: block; right: 5%; bottom: 8px; width: 120px; transform: rotate(6deg); }
}
.page-hero .lede { max-width: 56ch; }
@media (min-width: 768px) { .page-hero .sticker-tall { width: 60px; bottom: -40px; } .page-hero .sticker-slim { width: 84px; } .page-hero .sticker-wide { width: 170px; } }
.prose + .table-wrap, .table-wrap + .prose { margin-top: 16px; }
.table-wrap + .prose { margin-top: 20px; }
td.why-col, th.why-col { white-space: normal; text-align: left; min-width: 16em; }
.prose { max-width: 68ch; }
.story, .story-wide { max-width: 760px; }
.story-wide { margin: 16px 0 24px; }
.story h2 { margin-top: 1.8em; font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem); }
.story h3 { margin-top: 1.5em; }
.chapter-tag { display: block; width: fit-content; margin-bottom: 8px; padding: 3px 12px; border-radius: 999px; background: var(--peach); color: #9a3d1b; font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.timeline { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; gap: 12px; }
@media (min-width: 600px) { .timeline { grid-template-columns: 1fr 1fr; } }
.timeline li { margin: 0; display: grid; align-content: start; gap: 2px; padding: 16px 18px; border-radius: var(--radius); background: var(--cream); border: 1px solid var(--line); }
.timeline li:last-child { background: var(--white); border: 1.5px dashed var(--terra-bright); }
.timeline-year { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.timeline li:last-child .timeline-year { color: var(--terra); }
.timeline strong { font-family: var(--font-head); font-size: 1.2rem; }
.timeline li > span:last-child { color: var(--muted); font-size: .94rem; }
.steps { list-style: none; padding: 0; margin: 12px 0 16px; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; margin: 0; min-height: 36px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700; display: grid; place-items: center; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
.prose h3 { margin-top: 1.4em; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .card { padding: 24px; } }
.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-sm); padding: 14px 18px; font-size: .95rem; margin: 16px 0; }
.notice p:last-child { margin: 0; }
.callout { background: var(--teal-soft); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; }
.callout p:last-child { margin: 0; }
.fact-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 20px 0; }
.fact { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.fact strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }
.fact span { font-size: .9rem; color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.tag-real { background: var(--ok-bg); color: var(--ok); }
.tag-guess { background: var(--warn-bg); color: var(--warn-ink); }
.signup { margin-top: 16px; text-align: left; }
.signup-home { max-width: 620px; margin: 28px auto 0; }
.card-title { margin-top: 0 !important; }
.guide-price { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; margin: 0 0 8px; }
.row-center { justify-content: center; }
.signup-row { display: grid; gap: 10px; }
@media (min-width: 560px) { .signup-row { grid-template-columns: 1fr auto; align-items: start; } }
.not-found { text-align: center; padding: 56px 0 16px; }
.not-found .sticker { position: static; display: block; width: 190px; margin: 0 auto 16px; transform: rotate(-4deg); }

/* ---------- Scorecard ---------- */
.section { margin: 28px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
.toolbar { display: grid; gap: 12px; margin: 16px 0; padding: 14px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
.toolbar-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-group .label { margin: 0 4px 0 0; width: 100%; }
@media (min-width: 768px) {
  .toolbar { grid-template-columns: auto 1fr; align-items: center; }
  .toolbar-group .label { width: auto; }
  .toolbar-actions { justify-content: flex-end; }
}
.dirty { font-size: .85rem; color: var(--muted); }

.tabs { display: flex; gap: 6px; padding: 6px; margin-top: 8px; background: var(--sand); border-radius: 16px; }
.tab { flex: 1 1 0; min-height: 48px; padding: 0 12px; background: none; border: 0; border-radius: 12px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--white); color: var(--ink-deep); box-shadow: var(--shadow); }
@media (min-width: 600px) { .tabs { display: inline-flex; } .tab { flex: 0 0 auto; padding: 0 24px; } }
.tab-panel { padding-top: 8px; }
.tab-panel[hidden] { display: none; }

.city-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .city-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .city-list { grid-template-columns: repeat(4, 1fr); } }
.city-item { display: flex; gap: 8px; align-items: flex-end; }
.city-item > div { flex: 1; min-width: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.weight-total { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.weight-total.off { background: var(--warn-bg); color: var(--warn-ink); }
.weight-warn { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: var(--warn-bg); color: var(--warn-ink); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.weight-warn[hidden] { display: none; }
.weight-warn p { margin: 0; flex: 1 1 220px; }

.criteria { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.criteria > li { margin: 0; }
.criterion { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.criterion-top { display: grid; grid-template-columns: 1fr 76px 44px; gap: 8px; align-items: end; }
.criterion-top .weight-field input { text-align: right; }
.scores { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.scores.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 600px) { .scores.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .criterion { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 0 16px; align-items: start; }
  .criterion .scores { margin-top: 0; }
  .criterion .field-error { grid-column: 1; grid-row: 2; }
}
.scores label { font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.results { display: grid; gap: 16px; }
@media (min-width: 900px) { .results { grid-template-columns: 1fr 1fr; } }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ranking > li { margin: 0; }
.rank-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 10px; align-items: center; }
.rank-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sand); font-weight: 700; }
.rank-item.first .rank-num { background: var(--teal); color: #fff; }
.rank-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-bar { grid-column: 2 / 4; height: 8px; background: var(--sand); border-radius: 4px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.winner-line { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; }
.why-list { margin: 0; padding-left: 1.2em; }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; min-width: 8em; }
thead th { background: var(--cream); font-weight: 700; }
tfoot td, tfoot th { font-weight: 700; }
tfoot tr:last-child td, tfoot tr:last-child th { border-bottom: 0; }
td.best { color: var(--teal); font-weight: 700; }

.budget-inputs { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .budget-inputs { grid-template-columns: 140px 1fr 1fr; } }
.budget-cities { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .budget-cities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .budget-cities.n4 { grid-template-columns: repeat(4, 1fr); } .budget-cities.n3 { grid-template-columns: repeat(3, 1fr); } }
.cost-lines { display: grid; gap: 10px; }
.cost-line { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; }
.cost-line label { margin: 0; font-weight: 500; }
.cost-line input { text-align: right; }
.budget-sum { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 4px; }
.budget-sum div { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.neg { color: var(--bad); }

.toast-region { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 540px; width: 100%; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); font-size: .95rem; background: var(--ink); color: #fff; }
.toast.error { background: var(--bad); }
.toast button { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 10px; min-height: 44px; padding: 0 12px; font: inherit; font-weight: 700; cursor: pointer; }
.copy-fallback { margin-top: 12px; }
.copy-fallback[hidden] { display: none; }
.copy-fallback textarea { min-height: 180px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cta-band { background: var(--teal-soft); border-radius: var(--radius); padding: 24px; margin: 40px 0; }
.cta-band p { max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; background: var(--white); border-top: 1px solid var(--line); padding: 40px 0 0; font-size: .95rem; }
.home .site-footer { margin-top: 0; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); } .footer-brand { grid-column: auto; } }
.footer-tagline { color: var(--muted); margin: 4px 0 0; max-width: 32ch; }
.footer-h { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 4px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer-legal p { margin: 0 0 6px; }
.footer-skyline { display: block; width: 100%; height: auto; min-height: 110px; object-fit: cover; object-position: center bottom; margin-top: 24px; }

.print-only { display: none; }
@media print {
  body { font-size: 11pt; background: #fff; }
  .site-header, .site-footer .footer-grid, .footer-skyline, .toolbar, .tabs, .no-print, .toast-region, .skip, .cta-band, .copy-fallback, .page-hero .sticker { display: none !important; }
  .print-only { display: block; }
  .tab-panel[hidden] { display: block !important; }
  .page-hero { background: none; padding: 0; }
  .card, .criterion, .table-wrap { box-shadow: none; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  a { color: #000; }
  .site-footer { margin: 0; border: 0; padding: 0; }
}
