/* Editorial and airy: serif headlines, big light numerals, hairlines, one mint accent.
   System fonts only (fast, and no third-party font requests). */
:root {
  --paper: #f6f8f5;
  --card: #fff;
  --ink: #12211d;
  --muted: #55655f;
  --line: #d5ddd6;
  --mint: #c8f0dc;
  --mint-soft: #e6f7ee;
  --mint-deep: #9fdcc0;
  --accent: #0a6b4b;
  --sun: #fbeab5;
  --sun-ink: #5c3b00;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.65 var(--sans); }
.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); line-height: 1.08; margin: 0 0 1rem; }
h2 { font-size: 1.7rem; line-height: 1.2; margin: 3.2rem 0 1rem; }
h3 { font-size: 1.4rem; line-height: 1.25; margin: 0 0 .2rem; }
p { margin: 0 0 .9rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
small, .muted { color: var(--muted); }
small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 999px; z-index: 10; }
.skip:focus { top: .5rem; color: #fff; }
.eyebrow, .dim label, .facts dt, thead th {
  font: 600 .75rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
h2.eyebrow { margin: 4rem 0 1.2rem; }

/* header / footer */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: .5rem; font: 400 1.45rem/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo svg { color: var(--accent); }
.top nav { display: flex; gap: .2rem; }
.top nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem; border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--ink); }
.top nav a:hover { background: var(--mint-soft); }
.top nav a[aria-current] { background: var(--ink); color: #fff; }
.demo { margin: 0; padding: .45rem 1rem; text-align: center; background: var(--sun); color: var(--sun-ink); font-size: .875rem; }
main { padding-block: 1rem 5rem; min-height: 60vh; }
main > h1:first-child { margin-top: clamp(1.5rem, 4vw, 3rem); }
footer .wrap { border-top: 1px solid var(--line); padding-block: 2rem 2.5rem; font-size: .875rem; color: var(--muted); }
footer p { max-width: 46rem; }
footer ul { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; }
footer a { display: inline-block; padding: .3rem 0; color: var(--ink); }

/* hero: centred headline, one big photo, and the form (or country cards) resting on its lower edge */
.hero { padding-top: clamp(2rem, 6vw, 4.5rem); text-align: center; }
.hero h1 { font-size: clamp(2.7rem, 8.4vw, 5.4rem); line-height: .98; letter-spacing: -0.03em; margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; background: linear-gradient(transparent 58%, var(--mint) 58% 92%, transparent 92%); padding: 0 .08em; }
.hero .sub { font-size: 1.15rem; max-width: 34rem; margin: 0 auto; color: var(--muted); }
.stage { margin-top: clamp(1.8rem, 4vw, 3rem); }
.stage img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; border-radius: 28px; }
@media (min-width: 40rem) { .stage img { aspect-ratio: 2 / 1; } }
.stage > .fit-form, .stage > .countries { position: relative; width: min(100% - 1.5rem, 56rem); margin: clamp(-6rem, -9vw, -3rem) auto 0; text-align: left; }
.stage > .fit-form, .stage .countries a { border-color: transparent; box-shadow: 0 18px 50px rgb(18 33 29 / .16); }
/* Wide screens: the photo fills the whole hero; headline sits on a soft white fade at the top, the form at the bottom —
   so headline, photo and form are all on the first screen. */
@media (min-width: 52rem) {
  .hero { position: relative; overflow: hidden; display: flex; flex-direction: column; margin-top: 1.5rem;
    min-height: clamp(34rem, 74vh, 44rem); padding: 3.2rem 2rem 2rem; border-radius: 32px; }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgb(246 248 245 / .96), rgb(246 248 245 / .9) 36%, rgb(246 248 245 / 0) 66%); }
  .hero h1, .hero .sub { position: relative; z-index: 2; }
  .hero .sub { color: var(--ink); }
  .stage { display: contents; }
  .stage img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .stage > .fit-form, .stage > .countries { z-index: 2; width: min(100%, 54rem); margin: auto auto 0; padding-top: 0; }
  .stage > .fit-form { padding-top: 1.5rem; }
}
/* measuring drawing beside the steps */
.how { display: grid; gap: 2rem 4rem; align-items: center; }
.art { display: block; width: 100%; max-width: 24rem; margin-inline: auto; }
@media (min-width: 52rem) { .how { grid-template-columns: 1fr 1.2fr; } .how ol { grid-template-columns: 1fr; } }
.art * { vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.art .wire { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 5; }
.art .b-front { fill: var(--mint); stroke: var(--ink); stroke-width: 1.4; }
.art .b-top { fill: var(--mint-soft); stroke: var(--ink); stroke-width: 1.4; }
.art .b-side { fill: var(--mint-deep); stroke: var(--ink); stroke-width: 1.4; }
.art .rule { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.art text { font: 600 10px var(--sans); letter-spacing: .14em; text-transform: uppercase; fill: var(--accent); }

/* the measure bar */
.fit-form { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: clamp(1.1rem, 3vw, 1.8rem); margin: 2rem 0 1rem; }
.dims { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: clamp(.4rem, 2vw, 1.4rem); }
.dim { display: flex; flex-direction: column; min-width: 0; }
.dim input {
  font: 300 clamp(1.9rem, 7vw, 3.2rem)/1.15 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
  color: var(--ink); width: 100%; padding: .1rem 0 .15rem; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
  background: none; appearance: textfield; -moz-appearance: textfield;
}
.dim input::-webkit-inner-spin-button, .dim input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dim input:focus-visible { outline: 0; border-bottom: 4px solid var(--accent); padding-bottom: calc(.15rem - 2px); }
.dim input[aria-invalid=true] { border-bottom: 4px double var(--sun-ink); }
.dim small { margin-top: .35rem; font-size: .8rem; }
.dims .x { align-self: center; font: 300 clamp(1.3rem, 4vw, 2rem) var(--sans); color: var(--muted); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.4rem; }
.units { border: 0; padding: 4px; margin: 0; display: inline-flex; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.units label { display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 1.1rem; border-radius: 999px; font-size: .95rem; cursor: pointer; }
.units input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.units label:has(:checked) { background: var(--ink); color: #fff; font-weight: 600; }
.units label:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick { flex: 1 1 12rem; }
select, .field input {
  font: inherit; color: inherit; width: 100%; min-height: 3.1rem; padding: .5rem 1.1rem;
  border: 1px solid #76867f; border-radius: 999px; background-color: #fff;
}
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1.2 var(--sans); min-height: 3.1rem; padding: .6rem 1.6rem; cursor: pointer;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none;
}
button:hover, .btn:hover { background: var(--accent); color: #fff; }
.bar button { flex: 1 1 auto; }
@media (min-width: 40rem) { .bar button { flex: 0 0 auto; } }
.errors { background: var(--sun); color: var(--sun-ink); border-radius: 18px; padding: 1rem 1.3rem; margin: 1.2rem 0; }
.errors h2 { margin: 0 0 .3rem; font: 600 1.05rem var(--sans); letter-spacing: 0; }
.errors ul { margin: 0; padding-left: 1.2rem; }
.errors a { color: inherit; }

/* admin forms keep ordinary labelled fields */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .9rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.row input[type=checkbox] { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); margin: 0 .4rem 0 0; vertical-align: -3px; }

/* home */
.countries, .cats, .results, .offers, .steps ol { list-style: none; padding: 0; margin: 0; }
.countries, .cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .8rem; }
.countries a, .cats a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 1rem; height: 100%;
  padding: 1.1rem 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  color: var(--ink); text-decoration: none;
}
.countries a:hover, .cats a:hover { border-color: var(--ink); background: var(--mint-soft); }
.countries strong { font: 400 1.7rem/1.2 var(--serif); }
.countries a { grid-template-columns: auto 1fr auto; column-gap: 1.1rem; }
.countries .flag { grid-row: 1 / 3; width: 3.4rem; }
.countries strong, .countries small { grid-column: 2; }
.countries small { grid-row: 2; }
.countries span { grid-row: 1 / 3; grid-column: 3; font-size: 1.4rem; }
.flag { display: block; flex: none; width: 1.4rem; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgb(18 33 29 / .2); }
.cats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); gap: 1rem; }
.cats a { display: block; padding: 0; overflow: hidden; font-family: var(--serif); font-size: 1.2rem; }
.cats img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.cats a > span { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1.2rem 1rem; }
.cat-head { display: grid; gap: 1.5rem 3rem; align-items: center; margin-top: clamp(1.5rem, 4vw, 3rem); }
.cat-head img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; }
@media (min-width: 52rem) { .cat-head { grid-template-columns: 1.2fr 1fr; } .cat-head img { aspect-ratio: 3 / 2; } }
.steps ol { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.5rem 2.5rem; }
.steps li { counter-increment: s; border-top: 1px solid var(--ink); padding-top: 1rem; color: var(--muted); }
.steps li::before { content: "0" counter(s); display: block; font: italic 400 1.1rem var(--serif); color: var(--accent); margin-bottom: .6rem; }
.steps strong { display: block; font: 400 1.5rem/1.2 var(--serif); color: var(--ink); margin-bottom: .4rem; }
.lead { max-width: 44rem; font-size: 1.1rem; color: var(--muted); }

/* results */
.summary { font: 400 1.35rem/1.35 var(--serif); margin: 2.2rem 0 .5rem; }
.sortline { margin: 0 0 .6rem; }
.note { font-size: .875rem; color: var(--muted); max-width: 50rem; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.4rem; height: 100%; }
.card h3 a { color: var(--ink); text-decoration-color: var(--line); }
.card h3 a:hover { text-decoration-color: var(--ink); }
section.card { height: auto; margin: 1.5rem 0; max-width: 40rem; }
section.card h2 { margin-top: 0; }
.chip { align-self: flex-start; display: inline-flex; gap: .4rem; align-items: center; margin: 0 0 .9rem; padding: .2rem .8rem; border-radius: 999px; font: 600 .82rem/1.6 var(--sans); letter-spacing: .04em; }
.chip-fits { background: var(--mint); }
.chip-near { background: var(--sun); color: var(--sun-ink); }
.chip-no { box-shadow: inset 0 0 0 1px var(--ink); }
.diagram { display: block; max-width: 100%; height: auto; }
.diagram * { vector-effect: non-scaling-stroke; }
.diagram .space { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 5; }
.diagram .item { fill: var(--mint); stroke: var(--ink); stroke-width: 1.3; }
.fig { margin: 1rem 0; }
.plan { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: .35rem .5rem; padding: .9rem; background: var(--paper); border-radius: 14px; }
.ax-w, .ax-d { font: 600 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-align: center; white-space: nowrap; }
.ax-w { grid-column: 2; }
.ax-d { grid-row: 2; writing-mode: vertical-rl; transform: rotate(180deg); }
.plan .diagram { grid-column: 2; grid-row: 2; justify-self: center; }
.fig figcaption { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.cmp { max-width: none; margin: .2rem 0 1rem; font-size: .93rem; }
.cmp th, .cmp td { padding: .45rem .6rem .45rem 0; }
.cmp tbody th { font-weight: 400; color: var(--muted); white-space: nowrap; }
.cmp tbody tr:nth-child(2) td { font-weight: 650; }
.cmp caption { caption-side: bottom; text-align: left; font-size: .8rem; color: var(--muted); padding-top: .5rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.1rem; margin: .4rem 0 .8rem; font-size: .95rem; }
.facts dt { padding-top: .25rem; }
.facts dd { margin: 0; }
.offers { margin-top: auto; }
.offers li { display: grid; gap: .1rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.offers .btn { margin-top: .7rem; }
.price strong { font: 300 1.9rem/1.2 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-right: .3rem; }
.sponsored { font-weight: 700; }
.trust { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }
.warn { background: var(--sun); color: var(--sun-ink); border-radius: 12px; padding: .55rem .85rem; font-size: .9rem; margin: .8rem 0 0; }
.crumb { margin: 1.5rem 0 .6rem; font-size: .9rem; }

/* tables + long text */
table { border-collapse: collapse; width: 100%; max-width: 40rem; margin: .5rem 0 1rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem .8rem .7rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
thead th { border-bottom-color: var(--ink); }
tbody th { font-weight: 600; }
.prose { max-width: 42rem; padding-top: 2rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.prose li { margin-bottom: .5rem; }

@media (prefers-reduced-motion: no-preference) { .cats img { transition: transform .4s; } .cats a:hover img { transform: scale(1.04); } button, .btn, a, .dim input { transition: background-color .15s, color .15s, border-color .15s; } }
