@font-face { font-family: "Barlow"; src: url(/fonts/barlow-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlowcond-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlowcond-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F3F1EA;
  --card: #FBFAF6;
  --ink: #16181C;
  --muted: #66655F;
  --line: #DCD8CD;
  --accent: #0057FD;
  --frame: #131418;
  --plate-ink: #1A2A5A;
  --yes: #2E8B4A;
  --no: #C8433A;
  --sea: #E7E4DA;
  --land: #D3CEC1;
  --land-yes: #B9DAAE;
  --land-no: #E9C3BA;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111214;
    --card: #18191C;
    --ink: #ECEAE3;
    --muted: #9C9A92;
    --line: #2B2D32;
    --frame: #050506;
    --yes: #3FA35C;
    --no: #D4574C;
    --sea: #1A1C20;
    --land: #34373D;
    --land-yes: #2C5134;
    --land-no: #5A332F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 "Barlow", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px 56px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 8px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { display: block; height: auto; }
.logo-mark { width: 73px; }
.logo-word { width: 150px; margin-top: 6px; }
.toplinks { display: flex; gap: 20px; }
.toplink { font-size: 15px; color: var(--muted); text-decoration: none; }
.toplink:hover { color: var(--ink); }

h1 {
  font: 600 clamp(34px, 5.2vw, 56px)/1.02 "Barlow Condensed", sans-serif;
  letter-spacing: -.005em;
  margin: 18px 0 12px;
  text-wrap: balance;
}
h2 { font: 600 26px/1.1 "Barlow Condensed", sans-serif; margin: 0 0 14px; letter-spacing: .01em; }
.lede { color: var(--muted); max-width: 58ch; margin: 0 0 28px; font-size: 18px; }

/* hero stage */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr); gap: 28px; align-items: stretch; }
figure { margin: 0; }
.stage figure { display: flex; flex-direction: column; }
#heroPlate { flex: 1; display: flex; align-items: center; }
figcaption { font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.arrow { font-size: 30px; color: var(--muted); align-self: center; padding-top: 24px; }
#heroPlate { max-width: 420px; }
.reads { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); }
.reads b { color: var(--ink); font-weight: 600; letter-spacing: .04em; }

/* license plate */
.plate {
  position: relative;
  width: 100%;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF, #ECEEF0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 12px 24px -14px rgba(0, 0, 0, .45);
}
.plate .txt { font-family: "Barlow Condensed", sans-serif; line-height: 1; white-space: pre; position: relative; }

.plate.us { aspect-ratio: 2 / 1; border-radius: 5% / 10%; }
.plate.us::before {
  content: "";
  position: absolute;
  inset: 5% 2.6%;
  border: max(1px, 1.1cqh) solid var(--plate-ink);
  border-radius: 3.6% / 8%;
}
.plate.us .bolt {
  position: absolute;
  top: 11%;
  width: 4.5cqh;
  height: 4.5cqh;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF, #A3A8AD 60%, #6B7076);
}
.plate.us .bolt.l { left: 20%; }
.plate.us .bolt.r { right: 20%; }
.plate.us .txt {
  color: var(--plate-ink);
  font-weight: 600;
  font-size: min(58cqh, calc(168cqw / var(--n)));
  letter-spacing: .03em;
  top: 7%;
}

.plate.eu { aspect-ratio: 520 / 110; border-radius: 3.5% / 16%; background: #FBFBF8; justify-content: flex-start; }
.plate.eu::before {
  content: "";
  position: absolute;
  inset: 3.5% .8%;
  border: max(1px, 1.6cqh) solid #111;
  border-radius: 2.6% / 13%;
}
.plate.eu .band {
  position: absolute;
  left: .8%;
  top: 3.5%;
  bottom: 3.5%;
  width: 8.4%;
  background: #1D3E9F;
  border-radius: 25% 0 0 25% / 13% 0 0 13%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10%;
}
.plate.eu .band svg { width: 72%; fill: #FFCC00; }
.plate.eu .txt {
  flex: 1;
  text-align: center;
  padding-left: 9%;
  color: #111;
  font-weight: 500;
  font-size: min(70cqh, calc(140cqw / var(--n)));
  letter-spacing: .06em;
  top: 2%;
}

/* rearview mirror */
.mirror {
  position: relative;
  width: 100%;
  aspect-ratio: 2.7 / 1;
  background: var(--frame);
  border-radius: 15% / 40%;
  padding: 2.2%;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .55);
}
.mirror::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10%;
  width: 6%;
  height: 12%;
  translate: -50% 0;
  background: var(--frame);
  border-radius: 3px 3px 0 0;
}
.glass {
  position: relative;
  height: 100%;
  border-radius: 14% / 38%;
  overflow: hidden;
  container-type: size;
  background: linear-gradient(180deg, #A6B8C6 0%, #D6DEE3 36%, #A4AAAE 37%, #7C8287 62%, #5B6065 100%);
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(104deg, transparent 22%, rgba(255, 255, 255, .22) 30%, transparent 40%, transparent 62%, rgba(255, 255, 255, .1) 68%, transparent 74%);
  pointer-events: none;
}
.car {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 82%;
  height: 100%;
  translate: -50% 0;
  background: linear-gradient(180deg, #43484E 0%, #2A2E33 45%, #1C1F22 100%);
  border-radius: 24% 24% 9% 9% / 30% 30% 10% 10%;
}
.car::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 6%;
  height: 26%;
  background: linear-gradient(180deg, #6F7B85, #313840);
  border-radius: 30% 30% 6% 6% / 60% 60% 12% 12%;
}
.car .hl {
  position: absolute;
  top: 32%;
  width: 17%;
  height: 11%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #FFFDF2 0%, #F4E9BC 45%, rgba(244, 233, 188, 0) 72%);
}
.car .hl.l { left: 6%; }
.car .hl.r { right: 6%; }
.glass .flip { position: absolute; left: 50%; bottom: 7%; translate: -50% 0; transform: scaleX(-1); }
.mirror.us .flip { width: 38%; }
.mirror.eu .flip { width: 56%; bottom: 14%; }

/* the ask */
.ask { margin-top: 36px; max-width: 640px; }
.ask label { display: block; font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field { display: flex; gap: 12px; }
#word {
  flex: 1;
  min-width: 0;
  font: 600 34px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 12px 16px;
}
#word:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r); padding: 4px; background: var(--card); }
.seg button {
  font: 600 16px/1 "Barlow", sans-serif;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  border-radius: calc(var(--r) - 4px);
  cursor: pointer;
  min-height: 44px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hint { min-height: 1.5em; margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.hint .warn::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

/* options */
.options { margin-top: 64px; }
.cols, .list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.3fr) 220px; gap: 24px; align-items: center; }
.cols { font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 20px 0; border-top: 1px solid var(--line); }
.list .rank { font: 600 18px/1 "Barlow Condensed", sans-serif; color: var(--muted); }
.list .plate.us { max-width: 260px; }
.list .mirror { max-width: 360px; }
.meta { display: grid; gap: 8px; justify-items: start; }
.code { font: 600 24px/1 "Barlow Condensed", sans-serif; letter-spacing: .1em; white-space: pre; }
.read { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.meter { width: 64px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.btn {
  font: 500 15px/1 "Barlow", sans-serif;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 16px;
  cursor: pointer;
}
.btn:hover { background: var(--card); border-color: var(--muted); }
.btn:disabled { cursor: progress; opacity: .7; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* examples */
.examples { margin-top: 64px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ex {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: end;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
}
.ex:hover { border-color: var(--muted); }
.ex .word { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.ex .word b { font: 600 18px/1 "Barlow Condensed", sans-serif; letter-spacing: .08em; color: var(--ink); }

/* where it works */
.where { margin-top: 64px; }
.where .sub { color: var(--muted); max-width: 64ch; margin: 0 0 24px; }
.where-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.globe-wrap { position: sticky; top: 16px; }
#globe { display: block; width: 100%; max-width: 480px; aspect-ratio: 1; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
#globe:active { cursor: grabbing; }
.g-sea { fill: var(--sea); stroke: var(--line); }
.g-grat { fill: none; stroke: var(--line); stroke-width: .5; opacity: .7; }
.g-land { fill: var(--land); stroke: var(--paper); stroke-width: .5; }
.g-land.yes { fill: var(--land-yes); }
.g-land.no { fill: var(--land-no); }
.g-mk { cursor: pointer; }
.g-mk circle { stroke: var(--paper); stroke-width: 1.5; }
.g-mk.yes circle { fill: var(--yes); }
.g-mk.no circle { fill: var(--no); }
.g-mk path { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mk { width: 18px; height: 18px; flex: none; }
.mk circle { stroke: none; }
.mk.yes circle { fill: var(--yes); }
.mk.no circle { fill: var(--no); }
.mk path { fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.globe-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 480px; margin-top: 8px; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.legend .mk { width: 16px; height: 16px; }
.legend .mk.no { margin-left: 10px; }
.zoom { display: flex; gap: 6px; }
.zoom .btn { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.globe-hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.finder label { display: block; font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
#place {
  width: 100%;
  font: 500 20px/1.2 "Barlow", sans-serif;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 12px 14px;
}
#place:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.count { font-size: 14px; color: var(--muted); margin: 10px 0 6px; min-height: 1.5em; }
.places { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.place { display: flex; gap: 12px; align-items: flex-start; padding: 14px 4px 14px 0; border-bottom: 1px solid var(--line); }
.place .mk { margin-top: 3px; }
.pl-main { min-width: 0; flex: 1; }
.pl-name b { font-weight: 600; }
.pl-name span { color: var(--muted); font-size: 15px; }
.pl-name .sr, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pl-note { margin: 2px 0 6px; font-size: 15px; color: var(--muted); }
.pl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 15px; }
.pl-link { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.pl-link:hover { text-decoration-thickness: 2px; }
.pl-inst { color: var(--muted); }
.tag { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); white-space: nowrap; }
.place.no .pl-name b { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); margin: 18px 0 0; }

/* how */
.how { margin-top: 64px; max-width: 680px; }
.how p { margin: 0 0 12px; }
.twins { list-style: none; padding: 0; margin: 16px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.twins li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; background: var(--card); font: 600 22px/1 "Barlow Condensed", sans-serif; }
.twins .f { display: inline-block; transform: scaleX(-1); color: var(--muted); }
.twins .to { font: 400 14px/1 "Barlow", sans-serif; color: var(--muted); }

.foot { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot img { display: block; width: 200px; height: auto; }
.foot p { margin: 0; }

@media (max-width: 860px) {
  .cols { display: none; }
  .list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px 16px; }
  .list .rank { display: none; }
  .meta { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; justify-items: start; gap: 14px; }
  .meta .btns { justify-self: end; }
  .where-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .globe-wrap { position: static; max-width: 440px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px 48px; }
  .hero { display: flex; flex-direction: column; }
  .lede { margin-bottom: 20px; }
  .ask { order: 3; margin: 0 0 28px; }
  .stage { order: 4; grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .meter { width: 36px; }
  .code { font-size: 20px; }
  .meta { gap: 10px; grid-template-columns: auto 1fr; }
  .meta .btns { grid-column: 1 / -1; justify-self: start; }
  .arrow { transform: rotate(90deg); justify-self: center; padding-top: 0; font-size: 24px; line-height: 1; }
  #heroPlate { max-width: 300px; }
  .field { flex-direction: column; }
  .seg { align-self: flex-start; }
  #word { font-size: 30px; }
  .options, .examples, .how { margin-top: 48px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 640px) {
  .toplinks a[href="#how"] { display: none; }
  .logo { gap: 8px; }
  .logo-mark { width: 58px; }
  .logo-word { width: 120px; margin-top: 4px; }
}
