:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --muted: #3a3a3a;
  --bg: #f4f6f8;
  --card: #fff;
  --line: #c5ced8;
  --blue: #0a75c7;
  --blue-dark: #075496;
  --sign-green: #66ff66;
  --sign-ink: #000;
  --plate: #ffd500;
  --green: #0c5c2e;
  --red: #8e1b1b;
  --focus: #111;
  --error: #6d1212;
  --error-bg: #f8e8e8;
  --notice-bg: #e7f0fa;
  --notice-ink: #0b1f33;
}

@font-face {
  font-family: "Charles Wright";
  src: url("/assets/fonts/CharlesWright-Bold.woff2") format("woff2"),
       url("/assets/fonts/CharlesWright-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: #111;
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 5;
}
.skip:focus { top: 0.5rem; }
:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.site-header { background: transparent; color: inherit; }
.wrap { width: min(100% - 1.5rem, 40rem); margin: 0 auto; }
.wrap.wide { width: min(100% - 2rem, 72rem); }
.header-inner { width: 100%; margin: 0 auto; padding: 0.65rem 0 0.15rem; text-align: center; }
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(78%, 360px);
  min-height: 44px;
  min-width: 44px;
  padding: 0.15rem 0 0.45rem;
  text-decoration: none;
}
.brand picture { display: block; width: 100%; }
.brand img { display: block; width: 100%; height: auto; }
.site-header.with-nav { background: var(--blue); color: #fff; }
.site-header.with-nav .header-inner { width: min(100% - 2rem, 72rem); padding: 0; text-align: left; }
.site-header.with-nav .brand { width: auto; max-width: none; justify-content: flex-start; padding: 0.5rem 0; }
.site-header.with-nav .brand picture { width: auto; }
.site-header.with-nav .brand img { width: auto; height: 52px; }
.receipt-logo { display: block; width: min(100%, 28rem); height: auto; margin: 0 0 1rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; padding: 0 0 0.75rem; }
.admin-nav a, .admin-nav button.linkish {
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  min-height: 44px;
  padding: 0.4rem 0.15rem;
  cursor: pointer;
}
.admin-nav a[aria-current="page"] { text-decoration-thickness: 3px; }

main { padding: 1.25rem 0 2.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 1rem; padding: 0.75rem 1rem 0.25rem; }
legend { font-weight: 800; padding: 0 0.25rem; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 1.25rem 0 0.5rem; }
p { margin: 0.5rem 0; }
.lede { font-size: 1.2rem; }

a { color: #075496; }
label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.hint { color: var(--muted); margin: 0 0 0.35rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="time"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 48px;
  font: inherit;
  font-size: 1.125rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 8rem; }
::placeholder { color: #3a3a3a; opacity: 1; }
.vrm input, input.plate { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.field { margin: 0 0 1rem; }
.check { display: flex; align-items: flex-start; gap: 0.75rem; font-weight: 700; }
.check input { width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; accent-color: var(--blue); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 800;
  font-size: 1.125rem;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-pay { background: var(--green); color: #fff; }
.btn-pay:hover { background: #094824; }
.btn-cancel { background: var(--red); color: #fff; }
.btn-cancel:hover { background: #731616; }
.btn-secondary { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-inline { width: auto; min-height: 44px; }

.actions { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.total { font-size: 1.6rem; margin: 1rem 0; }
.summary { margin: 0; }
.summary > div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.2rem 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.summary dt { font-weight: 700; margin: 0; }
.summary dd { margin: 0; }
@media (max-width: 36rem) {
  .summary > div { grid-template-columns: 1fr; }
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.35rem; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 800; }
caption { text-align: left; font-weight: 800; margin-bottom: 0.35rem; }
.money, .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }

.panel { border: 2px solid var(--ink); border-radius: 8px; padding: 0.9rem 1rem; margin: 1rem 0; background: #fff; }
.panel h2 { margin-top: 0; }
.terms { white-space: pre-wrap; }
.pre { white-space: pre-line; }
.note { background: var(--notice-bg); color: var(--notice-ink); border-radius: 8px; padding: 0.75rem 0.9rem; }
.test-banner { background: #fff4d6; color: #1a1a1a; border: 2px solid #1a1a1a; border-radius: 8px; padding: 0.75rem 0.9rem; font-weight: 700; }
.error-summary { background: var(--error-bg); border-left: 6px solid var(--error); padding: 0.8rem 1rem; margin-bottom: 1rem; }
.error-summary h2 { margin: 0 0 0.35rem; color: var(--error); font-size: 1.2rem; }
.field-error { color: var(--error); font-weight: 700; margin: 0.35rem 0 0; }
.notice { background: var(--notice-bg); color: var(--notice-ink); border-radius: 8px; padding: 0.75rem 0.9rem; margin-bottom: 1rem; }

.site-footer { padding: 0 0 2rem; color: var(--muted); }
.site-footer a { color: #075496; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.75rem 0.4rem 0; }
.member-slot:empty { display: none; }
.member-slot img { display: block; height: 48px; width: auto; margin-top: 0.5rem; }
.grid-2 { display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.days { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.days label { font-weight: 600; display: flex; gap: 0.4rem; align-items: center; min-height: 44px; }
.days input { width: 1.25rem; height: 1.25rem; }

@media (max-width: 52rem) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: block; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 0.75rem; padding: 0.35rem 0.6rem; }
  table.stack th[scope="row"], table.stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0; text-align: right; }
  table.stack th[scope="row"]::before, table.stack td::before { content: attr(data-label); font-weight: 800; text-align: left; }
}

input.site-code-input {
  background: var(--sign-green);
  color: var(--sign-ink);
  border: 3px solid var(--sign-ink);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}
.site-code-chip {
  display: inline-block;
  background: var(--sign-green);
  color: var(--sign-ink);
  border: 2px solid var(--sign-ink);
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  line-height: 1.4;
}
.change-site { white-space: normal; }
.change-site .keep { white-space: nowrap; }

.number-plate {
  display: flex;
  align-items: stretch;
  background: var(--plate);
  color: #111;
  border: 3px solid #111;
  border-radius: 10px;
  overflow: hidden;
  max-width: 100%;
}
.number-plate:focus-within { outline: 3px solid #111; outline-offset: 3px; }
.plate-badge {
  flex: 0 0 2.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #003399;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0 0 0.35rem;
}
.plate-reg, .number-plate input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: var(--plate);
  color: #111;
  border: 0;
  border-radius: 0;
  font-family: "Charles Wright", "Arial Black", "Arial Bold", "Segoe UI", sans-serif;
  font-weight: 700;
  font-synthesis: none;
  font-size: 2.25rem;
  line-height: 0.8;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  /* Cap height is 0.79em. Padding makes that about 60% of the yellow area. */
  padding: 0.26em 0.32em;
}
.plate-reg { display: flex; align-items: center; }
.number-plate input:focus, .number-plate input:focus-visible { outline: none; }
.plate-inline { display: inline-flex; vertical-align: middle; }

details.fold { margin: 0.75rem 0; border-top: 1px solid var(--line); }
details.fold summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 800;
  cursor: pointer;
}
.pay-row { display: grid; gap: 0.75rem; margin-top: 0.5rem; }

@media (min-width: 64rem) {
  .wrap { width: min(100% - 3rem, 56rem); }
  main { padding-top: 0.5rem; }
  .card { padding: 1rem 1.25rem 0.85rem; }
  .card h1 { margin-bottom: 0.35rem; }
  .card h2 { margin: 0.35rem 0 0.25rem; }
  .card p { margin: 0.05rem 0; }
  .field { margin-bottom: 0.55rem; }
  .header-inner { padding-top: 0.4rem; }
  .brand { padding-bottom: 0.2rem; }
  .park-layout { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; align-items: start; }
  .park-layout .span, .park-layout .continue { grid-column: 1 / -1; }
  .sign-copy p { margin: 0.1rem 0; line-height: 1.35; }
}

@media (forced-colors: active) {
  .btn, .card, .panel, .error-summary { border: 2px solid ButtonText; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .noprint, .btn { display: none !important; }
  body, .card { background: #fff; }
  .wrap { width: auto; }
}
