/* numpl8s.com
 * ---------------------------------------------------------------------------
 * Tarmac hero, concrete page, and the plates as the only loud thing.
 *
 * Plate font: the legal UK face is Charles Wright 2001, which is licensed and
 * not on Google Fonts. If you buy a webfont licence, add an @font-face named
 * "Charles Wright" here and every plate picks it up. Until then plates fall
 * back to Barlow Condensed, the closest free match.
 */

/* 1. Tokens --------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Fixed brand colours */
  --tarmac: #16181c;
  --tarmac-raised: #20242a;
  --tarmac-line: #30353d;
  --tarmac-text: #eef0f2;
  --tarmac-muted: #a9b0ba;
  --plate-yellow: #fbd000;
  --plate-white: #ffffff;
  --plate-ink: #000000;
  --band-blue: #0b3d91;
  --paint-yellow: #e4b812;

  /* Type */
  --font-ui: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-plate: 'Charles Wright', 'UKNumberPlate', 'Barlow Condensed', 'Arial Narrow', sans-serif;

  /* Light theme surfaces (concrete) */
  --bg: #e7e9ec;
  --surface: #ffffff;
  --surface-sunk: #f2f3f5;
  --text: #15181c;
  --muted: #59606a;
  --border: #d3d7dc;
  --chip: #dfe2e6;
  --strong-bg: #16181c;
  --strong-text: #ffffff;
  --focus: #0b3d91;
  --score-bg: #fbe98c;
  --go-bg: #d8f1e1;
  --go-text: #11663a;
  --stop-bg: #fbe0dd;
  --stop-text: #a8231a;
  --heart: #d7263d;
  --shadow-sheet: 0 -12px 40px rgba(10, 12, 16, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114;
    --surface: #181b20;
    --surface-sunk: #13161a;
    --text: #eceef1;
    --muted: #9aa2ad;
    --border: #2a2f36;
    --chip: #22262d;
    --strong-bg: #eceef1;
    --strong-text: #121418;
    --focus: #fbd000;
    --score-bg: #3a3212;
    --go-bg: #12301f;
    --go-text: #6fdc9b;
    --stop-bg: #3a1714;
    --stop-text: #ff8f84;
    --heart: #ff5a6e;
    --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1114;
  --surface: #181b20;
  --surface-sunk: #13161a;
  --text: #eceef1;
  --muted: #9aa2ad;
  --border: #2a2f36;
  --chip: #22262d;
  --strong-bg: #eceef1;
  --strong-text: #121418;
  --focus: #fbd000;
  --score-bg: #3a3212;
  --go-bg: #12301f;
  --go-text: #6fdc9b;
  --stop-bg: #3a1714;
  --stop-text: #ff8f84;
  --heart: #ff5a6e;
  --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.5);
}

/* 2. Base ----------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Keep content clear of the notch and home indicator */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--tarmac);
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

main {
  flex: 1;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button,
a,
input,
textarea {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

/* 3. UK number plates ---------------------------------------------------- */
/* .plate is the size container; everything inside scales in cqi, so one
   component works as a 600px hero plate and a 130px thumbnail. */

.plate {
  container-type: inline-size;
  width: 100%;
}

.plate__face {
  --plate-bg: var(--plate-yellow);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  aspect-ratio: 520 / 111;
  border-radius: 1.9cqi;
  overflow: hidden;
  background-color: var(--plate-bg);
  background-image: linear-gradient(172deg,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 255, 255, 0) 40%,
      rgba(0, 0, 0, 0) 72%,
      rgba(0, 0, 0, 0.06) 100%);
  color: var(--plate-ink);
  box-shadow:
    inset 0 0 0 0.75cqi var(--plate-bg),
    inset 0 0 0 1.1cqi var(--plate-ink),
    0 0.35cqi 0 rgba(0, 0, 0, 0.28),
    0 1.8cqi 3.2cqi -1cqi rgba(0, 0, 0, 0.45);
}

.plate--front .plate__face {
  --plate-bg: var(--plate-white);
}

.plate__band {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2cqi;
  width: 8.6cqi;
  margin: 1.7cqi 0 1.7cqi 1.7cqi;
  padding-bottom: 1.5cqi;
  border-radius: 0.9cqi;
  background: var(--band-blue);
  color: #fff;
  font-family: var(--font-plate);
  font-weight: 700;
  font-size: 4.6cqi;
  line-height: 1;
  letter-spacing: 0.02em;
}

.plate__flag {
  width: 6.2cqi;
  height: 3.1cqi;
  margin-top: 1.4cqi;
  margin-bottom: auto;
}

.plate__text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6.4cqi;
  padding-right: 1.7cqi;
  font-family: var(--font-plate);
  font-weight: 700;
  font-size: 20cqi;
  line-height: 1;
  white-space: nowrap;
}

.plate__group {
  display: flex;
  gap: 2.1cqi;
}

/* Real plates use fixed character cells, so proportional fallbacks still line up */
.plate__char {
  display: inline-grid;
  place-items: center;
  width: 9.6cqi;
}

/* The search box is a white front plate */
.plate__input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 2.4cqi 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--plate-ink);
  caret-color: var(--plate-ink);
  font-family: var(--font-plate);
  font-weight: 700;
  font-size: calc(19cqi * 7 / max(7, var(--chars, 7)));
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.plate__input::placeholder {
  color: #b7bbc2;
  opacity: 1;
}

.plate--input .plate__face {
  transition: box-shadow 0.2s ease;
}

.plate--input:focus-within .plate__face {
  box-shadow:
    inset 0 0 0 0.75cqi var(--plate-bg),
    inset 0 0 0 1.1cqi var(--plate-ink),
    0 0 0 3px rgba(251, 208, 0, 0.7),
    0 0 36px 4px rgba(251, 208, 0, 0.28),
    0 1.8cqi 3.2cqi -1cqi rgba(0, 0, 0, 0.45);
}

.plate--input.is-empty-error .plate__face {
  animation: nudge 0.32s ease;
}

@keyframes nudge {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* 4. Top bar -------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--tarmac);
  border-bottom: 1px solid var(--tarmac-line);
  color: var(--tarmac-text);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.wordmark__plate {
  width: 28px;
  height: 12px;
  border-radius: 2px;
  background: var(--plate-yellow);
  box-shadow: inset 0 0 0 1.5px var(--plate-yellow), inset 0 0 0 2.5px #000;
}

.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--tarmac-line);
  border-radius: 999px;
  background: var(--tarmac-raised);
  color: var(--tarmac-text);
  font-weight: 600;
  font-size: 0.9375rem;
}

.saved-toggle .icon--heart {
  fill: var(--heart);
  stroke: none;
}

.saved-toggle__count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--plate-yellow);
  color: #000;
  font-size: 0.8125rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.saved-toggle:active {
  transform: scale(0.97);
}

/* 5. Hero ----------------------------------------------------------------- */

.hero {
  --focus: #fbd000;
  position: relative;
  background-color: var(--tarmac);
  /* fine aggregate speckle, like road surface */
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.045) 0.6px, transparent 0.8px),
    radial-gradient(rgba(0, 0, 0, 0.35) 0.6px, transparent 0.8px);
  background-size: 5px 5px, 7px 7px;
  background-position: 0 0, 2px 3px;
  color: var(--tarmac-text);
}

.hero__inner {
  max-width: 660px;
  margin: 0 auto;
  padding: 36px max(20px, env(safe-area-inset-right, 0px)) 34px max(20px, env(safe-area-inset-left, 0px));
}

.hero__title {
  margin: 0 0 12px;
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: clamp(2.75rem, 12.5vw, 4.75rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 36ch;
  margin: 0 0 28px;
  color: var(--tarmac-muted);
  font-size: 1.0625rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.search {
  display: grid;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.08s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--generate {
  min-height: 56px;
  background: var(--plate-yellow);
  color: #000;
  font-size: 1.0625rem;
}

.btn--generate:hover {
  background: #ffdb2e;
}

.btn--generate[aria-busy="true"] {
  opacity: 0.8;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--tarmac-muted);
  font-size: 0.9375rem;
}

.example {
  min-height: 36px;
  padding: 4px 11px;
  border: 1px solid var(--tarmac-line);
  border-radius: 8px;
  background: var(--tarmac-raised);
  color: var(--tarmac-text);
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.example:active {
  background: var(--tarmac-line);
}

/* double yellow lines along the kerb */
.hero__kerb {
  height: 20px;
  background:
    linear-gradient(var(--paint-yellow), var(--paint-yellow)) 0 5px / 100% 3px no-repeat,
    linear-gradient(var(--paint-yellow), var(--paint-yellow)) 0 12px / 100% 3px no-repeat;
  opacity: 0.85;
}

/* 6. Results -------------------------------------------------------------- */

.results-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
}

.results-head {
  margin-bottom: 16px;
}

.results-head__title {
  margin: 0;
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.1;
}

.results-head__title:focus {
  outline: none;
}

.results-head__note,
.results-head__mock {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 16px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0;
  padding: 2px max(16px, env(safe-area-inset-left, 0px));
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
}

.filter__count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.filter[aria-pressed="true"] {
  border-color: var(--strong-bg);
  background: var(--strong-bg);
  color: var(--strong-text);
}

.filter[aria-pressed="true"] .filter__count {
  color: inherit;
  opacity: 0.7;
}

.results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 1000px) {
  .results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.result__plate {
  padding: 4px 2px 6px;
}

.result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge--score {
  background: var(--score-bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.badge--style {
  border: 1px solid var(--border);
  color: var(--muted);
}

.result__details {
  display: grid;
  gap: 2px;
  font-size: 0.9375rem;
}

.result__reads {
  margin: 0;
}

.result__reads strong {
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
}

.result__swaps {
  color: var(--muted);
}

.result__age {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* MOT pill */
.mot {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-height: 30px;
  padding: 4px 12px 4px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: left;
  cursor: default;
}

.mot__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.mot[data-state="checking"] .mot__dot {
  animation: pulse 1s ease-in-out infinite;
}

.mot[data-state="none"] {
  background: var(--go-bg);
  color: var(--go-text);
}

.mot[data-state="record"] {
  background: var(--stop-bg);
  color: var(--stop-text);
}

.mot[data-state="error"] {
  cursor: pointer;
}

@keyframes pulse {
  50% { opacity: 0.25; }
}

.result__actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.btn--save {
  min-height: 44px;
  padding: 0 14px;
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.btn--save .icon {
  stroke: currentColor;
}

.btn--save[aria-pressed="true"] .icon {
  fill: var(--heart);
  stroke: var(--heart);
}

.btn--save[aria-pressed="true"] .icon--heart {
  animation: pop 0.25s ease;
}

@keyframes pop {
  50% { transform: scale(1.3); }
}

.btn--strong {
  min-height: 44px;
  background: var(--strong-bg);
  color: var(--strong-text);
}

.btn--quiet {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.results-more {
  display: flex;
  justify-content: center;
  padding: 20px 0 8px;
}

.results-empty {
  max-width: 52ch;
  padding: 8px 0 24px;
}

.results-empty__title {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 1.0625rem;
}

.results-empty__body {
  margin: 0;
  color: var(--muted);
}

/* 7. Substitution key ----------------------------------------------------- */

.key {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunk);
}

.key__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px));
}

.key__title {
  margin: 0;
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.15;
}

.key__lede {
  max-width: 60ch;
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.key__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.key__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.key__digit {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 38px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--plate-yellow);
  color: #000;
  font-family: var(--font-plate);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--plate-yellow), inset 0 0 0 3px #000;
}

.key__letters {
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
}

/* 8. Footer --------------------------------------------------------------- */

.footer {
  background: var(--tarmac);
  color: var(--tarmac-muted);
  font-size: 0.875rem;
}

.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px));
}

.footer p {
  max-width: 70ch;
  margin: 0 0 8px;
}

/* 9. Sheets (saved drawer + inquiry modal) -------------------------------- */

dialog.sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
}

dialog.sheet::backdrop {
  background: rgba(8, 9, 11, 0.62);
}

.sheet__panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px);
  padding: 6px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-sheet);
  animation: sheet-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
}

.sheet__grip {
  width: 40px;
  height: 5px;
  margin: 4px auto 6px;
  border-radius: 999px;
  background: var(--border);
  flex: none;
}

.sheet__head {
  position: sticky;
  top: -6px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -4px 12px;
  padding: 6px 4px;
  background: var(--surface);
}

.sheet__title {
  margin: 0;
  font-family: var(--font-plate);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  color: var(--text);
}

@media (min-width: 720px) {
  .sheet--center .sheet__panel {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: min(560px, calc(100vw - 48px));
    max-height: calc(100dvh - 64px);
    translate: -50% -50%;
    padding: 12px 24px 24px;
    border-radius: 20px;
    animation: sheet-in 0.2s ease-out;
  }

  .sheet--side .sheet__panel {
    top: 0;
    left: auto;
    right: 0;
    bottom: 0;
    width: 420px;
    max-height: none;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 0 0 20px;
    animation: slide-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .sheet__grip {
    display: none;
  }
}

@keyframes sheet-in {
  from { opacity: 0; transform: scale(0.97); }
}

@keyframes slide-in {
  from { transform: translateX(100%); }
}

/* Saved list */
.saved-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.saved-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 8px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.saved-item__info {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 0;
}

.saved-item__actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.saved-item .mot {
  font-size: 0.6875rem;
}

.saved-empty {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Inquiry */
.inquiry__plate {
  width: min(100%, 360px);
  margin: 2px auto 18px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field__label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-sunk);
  color: var(--text);
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  line-height: 1.45;
}

.field__input--message {
  resize: vertical;
  font-size: 0.9375rem;
}

@media (max-width: 719px) {
  .field__input--message { font-size: 1rem; }
}

.field__input:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent);
}

.field__hint {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.inquiry__actions {
  display: grid;
  gap: 10px;
}

@media (min-width: 480px) {
  .inquiry__actions { grid-template-columns: 1fr 1fr; }
}

.btn--primary {
  background: var(--plate-yellow);
  color: #000;
}

.btn--secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

/* 10. Toasts --------------------------------------------------------------- */

.toast-region {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.sheet .toast-region {
  top: 0;
  bottom: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 0;
}

.toast {
  max-width: 100%;
  padding: 11px 18px;
  border: 1px solid var(--tarmac-line);
  border-radius: 12px;
  background: var(--tarmac);
  color: var(--tarmac-text);
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.2s ease-out;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

/* 11. Motion preferences --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (hover: hover) {
  .btn--save:hover,
  .btn--quiet:hover,
  .btn--secondary:hover,
  .filter:hover {
    background: var(--surface-sunk);
  }

  .filter[aria-pressed="true"]:hover {
    background: var(--strong-bg);
  }
}
