/* Public pages + owner console. One visual system: parking-lot asphalt,
   marking-paint yellow, road-sign (DIN) display type. System fonts only. */

:root {
  color-scheme: light dark;
  --bg: #edefea;
  --surface: #f8f9f5;
  --ink: #1b242b;
  --ink-2: #47535b;
  --line: #c6ccc3;
  --field-line: #6a767d;
  --paint: #f4c430;
  --paint-hover: #e3b21c;
  --paint-ink: #1b242b;
  --link: #0b5566;
  --asphalt: #222b32;
  --asphalt-line: rgba(248, 249, 245, 0.5);
  --asphalt-ink: #f1f3ee;
  --car-1: #3d4952;
  --car-2: #55626b;
  --car-3: #323c44;
  --danger: #a3261b;
  --ok: #1c6541;
  --font-display: "DIN Condensed", "Bahnschrift", "Roboto Condensed", "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 70rem;
  --gutter: 1.25rem;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151c21;
    --surface: #1e272e;
    --ink: #e9ece6;
    --ink-2: #a9b4b9;
    --line: #36424a;
    --field-line: #7d8a91;
    --link: #8fd0dc;
    --asphalt: #232d35;
    --danger: #ff9c8f;
    --ok: #7fd3a4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--paint);
  color: var(--paint-ink);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  min-height: 44px;
}
.brand img { width: 30px; height: 30px; display: block; }
/* DIN Condensed sits high in its box; nudge the wordmark onto the mark's centre. */
.brand span { padding-top: 0.22em; }

.masthead-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ---------- buttons & fields ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.25rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--paint);
  color: var(--paint-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--paint-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-quiet {
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--field-line);
  font-weight: 600;
  font-size: 0.9375rem;
}
.btn-quiet:hover { background: var(--surface); border-color: var(--ink); }
.btn-danger { color: var(--danger); }

.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field .hint { font-weight: 400; color: var(--ink-2); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.input::placeholder { color: var(--ink-2); opacity: 1; }
.input:focus-visible { outline-offset: 0; border-color: var(--link); }

.form-error {
  padding: 0.7rem 0.9rem;
  border-left: 4px solid var(--danger);
  background: var(--surface);
  color: var(--danger);
  font-weight: 600;
}
.form-error:empty { display: none; }

.fineprint { font-size: 0.875rem; color: var(--ink-2); }

/* ---------- home: hero ---------- */

.hero {
  display: grid;
  gap: 2rem;
  padding-block: 1.5rem 3.5rem;
}

.hero h1 {
  font-size: clamp(3.1rem, 13.5vw, 6.25rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  padding-top: 0.12em;
}

.lede {
  margin-top: 1.1rem;
  max-width: 34rem;
  font-size: 1.1875rem;
  line-height: 1.5;
}

.waitlist {
  margin-top: 1.75rem;
  max-width: 30rem;
  display: grid;
  gap: 0.9rem;
}
.waitlist .btn { width: 100%; }

.waitlist-done {
  margin-top: 1.75rem;
  max-width: 30rem;
  padding: 1rem 1.1rem;
  border-left: 6px solid var(--paint);
  background: var(--surface);
  font-size: 1.1875rem;
  font-weight: 600;
}

.signin-line { margin-top: 1.1rem; color: var(--ink-2); }
.signin-line a { font-weight: 600; }

/* The lot: asphalt in both colour schemes. Decorative only. */
.lot {
  border-radius: 10px;
  background: var(--asphalt);
  overflow: hidden;
  display: grid;
  grid-template-rows: 13rem auto;
}
.lot svg { display: block; width: 100%; height: 100%; min-height: 0; }
.lot .stripe { stroke: var(--asphalt-line); stroke-width: 3; stroke-linecap: round; fill: none; }
.lot .c1 { color: var(--car-1); }
.lot .c2 { color: var(--car-2); }
.lot .c3 { color: var(--car-3); }
.lot .hot { color: var(--paint); }
.lot .glass { fill: rgba(10, 15, 19, 0.38); }
.lot .ring {
  fill: none;
  stroke: var(--paint);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
}
.lot-caption {
  padding: 1rem 1.1rem 1.1rem;
  border-top: 3px solid var(--asphalt-line);
  color: var(--asphalt-ink);
  font-size: 1rem;
  line-height: 1.45;
}
.lot-caption strong { color: var(--paint); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .lot .hot { animation: lot-find 0.5s ease-out both; }
  .lot .ring { animation: lot-ring 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .lot .d1 { animation-delay: 0.5s; }
  .lot .d2 { animation-delay: 1s; }
  .lot .d3 { animation-delay: 1.5s; }
  @keyframes lot-find {
    from { color: var(--car-2); }
    to { color: var(--paint); }
  }
  @keyframes lot-ring {
    from { opacity: 0; transform: scale(2.2); }
    to { opacity: 1; transform: scale(1); }
  }
}

/* ---------- home: sections ---------- */

.band { padding-block: 3rem; border-top: 1px solid var(--line); }

/* Three outcomes laid out as stalls: a painted line to the left of each. */
.stalls {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}
.stalls li { padding-left: 1.1rem; border-left: 5px solid var(--paint); }
.stalls h2 { font-size: 2rem; padding-top: 0.15em; }
.stalls p { margin-top: 0.4rem; max-width: 26rem; }

.split { display: grid; gap: 1.25rem; }
.split > h2 { font-size: clamp(2.25rem, 8vw, 3rem); padding-top: 0.12em; }

.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; max-width: 38rem; }
.plain-list li { padding-left: 1.6rem; position: relative; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.5rem;
  height: 0.95rem;
  border-radius: 2px;
  background: var(--paint);
}
.aside-note { margin-top: 1.4rem; max-width: 38rem; color: var(--ink-2); }

.faq { max-width: 38rem; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding-block: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
}
.faq details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat;
}
.faq details p { padding-bottom: 1.1rem; }

.closing { display: grid; gap: 1.1rem; justify-items: start; }
.closing h2 { font-size: clamp(2.25rem, 8vw, 3rem); padding-top: 0.12em; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
.footer p { display: flex; align-items: center; min-height: 44px; }

/* ---------- quiet pages: login, invite, message ---------- */

.quiet {
  max-width: 27rem;
  margin-inline: auto;
  padding: 1.5rem var(--gutter) 4rem;
}
.quiet h1 {
  font-size: clamp(2.5rem, 10vw, 3.25rem);
  padding-top: 0.6em;
  padding-left: 1rem;
  margin-left: calc(-1rem - 5px);
  border-left: 5px solid var(--paint);
}
.quiet .intro { margin-top: 0.75rem; color: var(--ink-2); }
.quiet form { margin-top: 1.5rem; display: grid; gap: 1rem; }
.quiet .after { margin-top: 1.5rem; color: var(--ink-2); }
.quiet .message { margin-top: 1rem; font-size: 1.1875rem; }
.quiet .actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
@media (max-width: 30rem) {
  .quiet h1 { margin-left: 0; }
}

/* ---------- prose: privacy, terms ---------- */

.prose { max-width: 41rem; padding-block: 1.5rem 4rem; }
.prose h1 { font-size: clamp(2.75rem, 11vw, 4rem); padding-top: 0.12em; }
.prose .updated { margin-top: 0.5rem; color: var(--ink-2); }
.prose h2 { font-size: 1.75rem; margin-top: 2.25rem; padding-top: 0.15em; }
.prose p, .prose ul { margin-top: 0.75rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }

/* ---------- owner console ---------- */

.console { padding-block: 0.5rem 4rem; }
.console h1 { font-size: 2.75rem; padding-top: 0.15em; }
.console h2 { font-size: 1.75rem; padding-top: 0.15em; }
.console section { margin-top: 2.75rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.section-head p { color: var(--ink-2); font-size: 0.9375rem; }

.masthead-actions { display: flex; align-items: center; gap: 0.75rem; }
.masthead-actions form { margin: 0; }
.whoami { color: var(--ink-2); font-size: 0.9375rem; display: none; }

.tiles {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.tiles li { padding: 0.9rem 0.75rem 0.9rem 0.9rem; border-bottom: 1px solid var(--line); border-left: 5px solid var(--line); }
.tiles li.wide { grid-column: 1 / -1; }
.tiles .label { font-size: 0.875rem; color: var(--ink-2); }
.tiles .value {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  padding-top: 0.2em;
  font-variant-numeric: tabular-nums;
}
.tiles .value.text { font-family: var(--font-body); font-stretch: normal; font-size: 1.0625rem; line-height: 1.4; font-weight: 600; padding-top: 0.25rem; }
.tiles .sub { font-size: 0.875rem; color: var(--ink-2); }
.tiles li.attn { border-left-color: var(--paint); }
.tiles li.bad { border-left-color: var(--danger); }

.table-scroll { margin-top: 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 0.65rem 0.8rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
td.num, td.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.note { min-width: 12rem; max-width: 24rem; color: var(--ink-2); }
td.act { text-align: right; white-space: nowrap; }
td.empty { padding: 1.5rem 0.9rem; color: var(--ink-2); }

.status { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-2); }
.status.pending::before { background: var(--paint); box-shadow: 0 0 0 1px var(--field-line); }
.status.active::before, .status.accepted::before { background: var(--ok); }
.status.revoked::before, .status.disabled::before { background: var(--danger); }
.status.expired::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }

.notice {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 6px solid var(--paint);
  background: var(--surface);
}
.notice.error { border-left-color: var(--danger); }
.notice h2, .notice h3 { font-family: var(--font-body); font-stretch: normal; font-size: 1.0625rem; line-height: 1.4; padding: 0; }
.notice p { margin-top: 0.25rem; }
.copy-row { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.copy-row .input { flex: 1 1 16rem; min-width: 0; font-size: 0.9375rem; }
.copy-row .btn { min-height: 48px; }

.invite-form { margin-top: 1rem; display: grid; gap: 0.75rem; align-items: end; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Narrow screens: each table row becomes a labelled block so actions stay in view. */
@media (max-width: 39.99rem) {
  .table-scroll table, .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-scroll tr { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
  .table-scroll tr:last-child { border-bottom: 0; }
  .table-scroll td { padding: 0.15rem 0; border: 0; white-space: normal; max-width: none; min-width: 0; text-align: left; }
  .table-scroll td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); }
  .table-scroll td:first-child { font-weight: 600; }
  .table-scroll td:empty { display: none; }
  .table-scroll td.act { padding-top: 0.5rem; }
  .table-scroll td.empty { padding: 0.5rem 0; font-weight: 400; }
}

/* ---------- wider screens ---------- */

@media (min-width: 40rem) {
  :root { --gutter: 2rem; }
  .stalls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles li.wide { grid-column: auto; }
  .whoami { display: inline; }
  .invite-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .lot { grid-template-rows: 18rem auto; }
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 3.5rem;
    align-items: stretch;
    padding-block: 2.5rem 5rem;
  }
  .hero h1 { font-size: clamp(4.5rem, 7.6vw, 6.75rem); }
  .lot { grid-template-rows: minmax(0, 1fr) auto; min-height: 34rem; }
  .lot-caption { padding: 1.2rem 1.5rem 1.3rem; font-size: 1.0625rem; }
  .band { padding-block: 4.5rem; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3.5rem; }
  .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .lot, .waitlist, .masthead-link { display: none; }
}
