/* Delay Pay. Departures board meets boarding pass. */

:root {
  --paper: #f3f0e6;
  --paper-2: #e8e3d4;
  --card: #fffdf6;
  --ink: #121212;
  --ink-2: #33302b;
  --muted: #58534a;
  --line: rgba(18, 18, 18, 0.16);
  --line-strong: rgba(18, 18, 18, 0.55);
  --signal: #ffcc00;
  --signal-ink: #121212;
  --red: #b8241a;
  --green: #0a6e38;
  --amber-text: #7a5200;
  --focus: #0b4dff;
  --board: #111213;
  --board-2: #1a1b1d;
  --flap: #232427;
  --flap-edge: #0b0b0c;
  --flap-ink: #ffd23a;
  --board-text: #ecE9e1;
  --board-muted: #a9a59c;
  --board-red: #ff6a5c;
  --board-green: #5fdc93;
  --board-edge: #000;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 18px 40px -24px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --font-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e0f10;
    --paper-2: #17181a;
    --card: #17181b;
    --ink: #f2efe6;
    --ink-2: #dcd8cd;
    --muted: #aaa69b;
    --line: rgba(242, 239, 230, 0.14);
    --line-strong: rgba(242, 239, 230, 0.5);
    --red: #ff7b6e;
    --green: #5fdc93;
    --amber-text: #ffd23a;
    --focus: #8fb4ff;
    --board: #070809;
    --board-2: #121315;
    --flap: #1c1d20;
    --board-edge: rgba(255, 255, 255, 0.12);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper: #0e0f10;
  --paper-2: #17181a;
  --card: #17181b;
  --ink: #f2efe6;
  --ink-2: #dcd8cd;
  --muted: #aaa69b;
  --line: rgba(242, 239, 230, 0.14);
  --line-strong: rgba(242, 239, 230, 0.5);
  --red: #ff7b6e;
  --green: #5fdc93;
  --amber-text: #ffd23a;
  --focus: #8fb4ff;
  --board: #070809;
  --board-2: #121315;
  --flap: #1c1d20;
  --board-edge: rgba(255, 255, 255, 0.12);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
  overflow-x: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 3px;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--signal);
  color: var(--signal-ink);
  padding: 10px 14px;
  font-weight: 700;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

h1,
h2,
h3 {
  font-family: var(--font-sans);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 850;
  font-variation-settings: 'wdth' 78;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 22px;
  font-weight: 800;
}

p {
  margin: 0 0 1em;
}

/* ---------- Signage bar ---------- */

.signbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--signal);
  color: var(--signal-ink);
  border-bottom: 2px solid #121212;
}

.signbar .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-variation-settings: 'wdth' 75;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #121212;
  min-height: 44px;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.signnav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.signnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: #121212;
  border-radius: 8px;
}

.signnav a:hover {
  background: rgba(0, 0, 0, 0.08);
}

.signnav a svg {
  width: 16px;
  height: 16px;
}

.theme-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #121212;
  border-radius: 10px;
  background: transparent;
  color: #121212;
  cursor: pointer;
  margin-left: 6px;
}

.theme-btn:hover {
  background: #121212;
  color: var(--signal);
}

.theme-btn svg {
  width: 20px;
  height: 20px;
}

.signbar :focus-visible {
  outline-color: #121212;
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(46px, 7.4vw, 96px);
  font-weight: 900;
  font-variation-settings: 'wdth' 72;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.012em;
}

.hero h1 .hl {
  display: inline-block;
  background: var(--signal);
  color: var(--signal-ink);
  padding: 0 0.12em;
  margin-top: 0.06em;
  box-shadow: 0.06em 0.06em 0 var(--ink);
}

.hero .lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
  margin: 24px 0 28px;
}

.hero .lede strong {
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.btn {
  --b-bg: var(--ink);
  --b-fg: var(--paper);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--b-bg);
  color: var(--b-fg);
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 4px 4px 0 var(--ink);
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-signal {
  --b-bg: var(--signal);
  --b-fg: var(--signal-ink);
}

.btn-ghost {
  --b-bg: transparent;
  --b-fg: var(--ink);
  box-shadow: none;
}

.btn-ghost:hover {
  box-shadow: none;
  background: var(--paper-2);
}

.btn-small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-small.btn-ghost {
  box-shadow: none;
}

.note-inline {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Departures board ---------- */

.board {
  background: var(--board);
  color: var(--board-text);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--board-edge);
  font-family: var(--font-mono);
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.board-title {
  font-family: var(--font-sans);
  font-weight: 850;
  font-variation-settings: 'wdth' 75;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flap-ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-title svg {
  width: 22px;
  height: 22px;
}

.board-clock {
  font-size: 14px;
  color: var(--board-muted);
  font-variant-numeric: tabular-nums;
}

.board table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 14px;
}

.board th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--board-muted);
  text-transform: uppercase;
  padding: 0 6px;
}

.board td {
  padding: 0 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.board td.owed,
.board th.owed {
  text-align: right;
}

.flaps {
  display: inline-flex;
  gap: 2px;
}

.flap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.05em;
  height: 1.55em;
  background: var(--flap);
  border-radius: 3px;
  color: var(--board-text);
  font-family: var(--font-sans);
  font-weight: 700;
  font-variation-settings: 'wdth' 80;
  font-size: 15px;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 var(--flap-edge);
  overflow: hidden;
}

.flap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.65);
}

.flap.sp {
  color: transparent;
}

.flaps.amber .flap {
  color: var(--flap-ink);
}

.flaps.red .flap {
  color: var(--board-red);
}

.flaps.green .flap {
  color: var(--board-green);
}

.flap.tick {
  animation: flip 0.08s ease-in;
}

@keyframes flip {
  0% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.82);
  }
  100% {
    transform: scaleY(1);
  }
}

.board-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--board-muted);
  padding: 8px 4px 0;
}

/* ---------- Sections ---------- */

section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-head p {
  max-width: 34em;
  margin: 12px 0 0;
  color: var(--ink-2);
}

/* ---------- Boarding pass form ---------- */

.pass {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink);
}

.pass-main {
  padding: 28px 32px 32px;
  min-width: 0;
}

.pass-stub {
  position: relative;
  border-left: 2px dashed var(--line-strong);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--paper-2);
  border-radius: 0 16px 16px 0;
}

.pass-stub::before,
.pass-stub::after {
  content: '';
  position: absolute;
  left: -15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.pass-stub::before {
  top: -16px;
  clip-path: inset(50% 0 0 0);
}

.pass-stub::after {
  bottom: -16px;
  clip-path: inset(0 0 50% 0);
}

.pass-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.pass-strip strong {
  color: var(--ink);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
  min-width: 0;
}

legend,
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  padding: 0;
}

.q {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 10px;
}

.row {
  display: grid;
  gap: 18px 22px;
}

.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.hint {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.45;
}

.picked {
  font-size: 14px;
  color: var(--ink-2);
  margin: 6px 0 0;
  min-height: 1.45em;
  line-height: 1.45;
}

input[type='text'],
input[type='email'],
input[type='number'],
input[type='date'],
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-weight: 500;
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--ink);
  border-radius: 10px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23777' stroke-width='2.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

input[type='number'] {
  font-variant-numeric: tabular-nums;
}

input[aria-invalid='true'] {
  border-color: var(--red);
}

.err {
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  margin: 6px 0 0;
}

.err:empty {
  display: none;
}

/* Combobox */

.combo {
  position: relative;
}

.combo input {
  font-size: 20px;
  font-weight: 700;
  padding-right: 44px;
}

.combo-clear {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}

.combo-clear:hover {
  color: var(--ink);
}

.combo-clear svg {
  width: 16px;
  height: 16px;
}

.combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  max-height: 340px;
  overflow-y: auto;
}

.combo-list[hidden] {
  display: none;
}

.combo-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  padding: 8px 10px;
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
}

.combo-list li[aria-selected='true'] {
  background: var(--signal);
  color: var(--signal-ink);
}

.combo-list li[aria-selected='true'] .opt-sub {
  color: #3a3527;
}

.combo-list .opt-code {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.combo-list .opt-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-list .opt-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-list .opt-empty {
  display: block;
  cursor: default;
  color: var(--muted);
  font-size: 15px;
}

/* Choice chips (radio groups) */

.choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choices.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choices.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choices.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  height: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 750;
  font-size: 16px;
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.choice label small {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
}

.choice label svg {
  width: 28px;
  height: 28px;
}

.choice label:hover {
  border-color: var(--ink);
}

.choice input:checked + label {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.choice input:checked + label small {
  color: var(--paper-2);
}

.choice input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.duration {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.duration .unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.duration input {
  width: 96px;
  text-align: center;
}

.duration .unit span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick button {
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.quick button:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}

.sub {
  border-left: 3px solid var(--signal);
  padding: 4px 0 4px 18px;
  margin: 18px 0 0;
  display: grid;
  gap: 20px;
}

.sub[hidden] {
  display: none;
}

.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.linkish svg {
  width: 16px;
  height: 16px;
}

.via-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.via-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: start;
}

.icon-btn {
  width: 44px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}

.check input {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
  flex: none;
}

.submit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 8px;
}

.submit-row .btn {
  min-height: 60px;
  font-size: 19px;
  padding: 0 30px;
}

/* Stub */

.stub-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.stub-code {
  font-family: var(--font-sans);
  font-weight: 900;
  font-variation-settings: 'wdth' 80;
  font-size: 46px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.stub-code.empty {
  color: var(--line-strong);
}

.stub-city {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stub-route svg {
  width: 28px;
  height: 28px;
}

.stub-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  margin: 0;
}

.stub-facts div {
  min-width: 0;
}

.stub-facts dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.stub-facts dd {
  margin: 2px 0 0;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.barcode {
  margin-top: auto;
  height: 54px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 8px,
    var(--ink) 8px 11px,
    transparent 11px 12px,
    var(--ink) 12px 13px,
    transparent 13px 16px
  );
  opacity: 0.85;
  border-radius: 2px;
}

.stub-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Verdict ---------- */

.verdict {
  margin-top: 40px;
  scroll-margin-top: 80px;
}

.verdict[hidden] {
  display: none;
}

.vboard {
  background: var(--board);
  color: var(--board-text);
  border-radius: 18px;
  padding: 26px 28px 24px;
  border: 1px solid var(--board-edge);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
}

.vboard-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--board-muted);
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vboard-top strong {
  color: var(--board-text);
  font-weight: 600;
}

.vstatus {
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--board-muted);
}

.vamount {
  margin: 10px 0 6px;
}

.vamount .flaps {
  gap: 5px;
}

.vamount .flap {
  font-size: var(--flap-size, clamp(56px, 11vw, 132px));
  width: 0.78em;
  height: 1.12em;
  border-radius: 8px;
  font-weight: 800;
  font-variation-settings: 'wdth' 72;
  color: var(--flap-ink);
}

.vamount .flap::after {
  height: 2px;
}

.vamount .flaps.muted .flap {
  color: var(--board-muted);
}

.vline {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--board-text);
  margin: 10px 0 0;
  max-width: 30em;
}

.vrule {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--board-text);
}

.tag.plain {
  text-transform: none;
  letter-spacing: 0.02em;
}

.tag.strong {
  background: var(--board-green);
  color: #06140c;
  border-color: transparent;
}

.tag.likely {
  background: var(--flap-ink);
  color: #1d1600;
  border-color: transparent;
}

.tag.weak {
  background: var(--board-red);
  color: #1d0603;
  border-color: transparent;
}

.vgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.panel h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.panel-kicker {
  margin-bottom: 6px;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.notes li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  line-height: 1.5;
}

.notes li svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.notes li.good svg {
  color: var(--green);
}

.notes li.warn svg {
  color: var(--red);
}

.notes li.info svg {
  color: var(--muted);
}

.notes a {
  font-weight: 600;
}

.also {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: 15px;
  color: var(--ink-2);
}

.also:empty {
  display: none;
}

.vactions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cites {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

.cites a {
  color: var(--muted);
}

/* ---------- Letter ---------- */

.letter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.letter-form {
  display: grid;
  gap: 16px;
}

.letter-form .row-2 {
  gap: 16px;
}

.letter-form label.label {
  margin-bottom: 6px;
}

.letter-form input,
.letter-form select {
  font-size: 17px;
  font-weight: 600;
  min-height: 48px;
}

.paper {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}

.paper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-2);
}

.paper-bar .label {
  margin: 0;
}

.paper-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.letter-text {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  border-radius: 0;
  background: var(--card);
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
  resize: vertical;
  white-space: pre-wrap;
}

.letter-text:focus-visible {
  outline-offset: -4px;
  border-radius: 0;
}

.escalate {
  margin-top: 28px;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps li {
  counter-increment: step;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  background: var(--signal);
  color: var(--signal-ink);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.steps h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.steps p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 8px;
}

.steps a {
  font-weight: 700;
}

/* ---------- Share ---------- */

.share {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: center;
  margin-top: 28px;
}

.share canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--board);
}

.share-text {
  font-size: 17px;
  font-weight: 600;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 14px;
  border: 1.5px dashed var(--line-strong);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toast {
  visibility: hidden;
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 140%);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  z-index: 80;
  transition: transform 0.2s ease;
  max-width: calc(100vw - 32px);
}

.toast.show {
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- Cheat sheet ---------- */

.cheat {
  background: var(--board);
  color: var(--board-text);
  border-radius: 20px;
  padding: 30px 32px 26px;
  border: 1px solid var(--board-edge);
  box-shadow: var(--shadow);
}

.cheat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.cheat-head h3 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  font-variation-settings: 'wdth' 75;
  text-transform: uppercase;
  color: var(--flap-ink);
  letter-spacing: 0.02em;
}

.cheat-head span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--board-muted);
}

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cheat-col {
  background: var(--board-2);
  border-radius: 12px;
  padding: 16px 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cheat-col h4 {
  margin: 0 0 2px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 850;
  font-variation-settings: 'wdth' 80;
  letter-spacing: 0.02em;
}

.cheat-col .where {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--board-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.cheat-col dl {
  margin: 0;
  display: grid;
  gap: 0;
}

.cheat-col dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.cheat-col dt {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--board-text);
  line-height: 1.35;
}

.cheat-col dd {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
  font-variation-settings: 'wdth' 80;
  font-size: 22px;
  color: var(--flap-ink);
  white-space: nowrap;
}

.cheat-col dd.zero {
  color: var(--board-red);
}

.cheat-col .fine {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--board-muted);
  margin: 10px 0 0;
  line-height: 1.45;
}

.cheat-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--board-muted);
  margin-top: 18px;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}

.faq details {
  border-top: 2px solid var(--ink);
  padding: 4px 0;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.3;
  padding: 10px 0;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.15s ease;
}

.faq details[open] summary svg {
  transform: rotate(45deg);
}

.faq details p {
  color: var(--ink-2);
  margin: 0 0 16px;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 2px solid var(--ink);
  padding: 36px 0 48px;
  margin-top: 24px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

.foot p {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 40em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  justify-content: flex-end;
  align-content: start;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .pass {
    grid-template-columns: minmax(0, 1fr);
  }
  .pass-stub {
    border-left: 0;
    border-top: 2px dashed var(--line-strong);
    border-radius: 0 0 16px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .pass-stub::before,
  .pass-stub::after {
    top: -15px;
    bottom: auto;
    clip-path: inset(50% 0 0 0);
  }
  .pass-stub::before {
    left: -16px;
    clip-path: inset(0 0 0 50%);
  }
  .pass-stub::after {
    left: auto;
    right: -16px;
    clip-path: inset(0 50% 0 0);
  }
  .barcode,
  .stub-note {
    display: none;
  }
  .vgrid,
  .letter-grid,
  .share {
    grid-template-columns: minmax(0, 1fr);
  }
  .cheat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .wrap {
    padding: 0 16px;
  }
  .signnav a.hide-sm {
    display: none;
  }
  .brand {
    font-size: 21px;
  }
  .hero {
    padding: 36px 0 24px;
  }
  section {
    padding: 40px 0;
  }
  .pass {
    box-shadow: 5px 5px 0 var(--ink);
  }
  .pass-main {
    padding: 20px 16px 22px;
  }
  .pass-stub {
    padding: 20px 16px;
    grid-template-columns: minmax(0, 1fr);
  }
  .stub-code {
    font-size: 38px;
  }
  .row-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .choices,
  .choices.three,
  .choices.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .choices.two {
    grid-template-columns: minmax(0, 1fr);
  }
  input[type='text'],
  input[type='email'],
  input[type='number'],
  input[type='date'],
  select,
  textarea,
  .letter-form input,
  .letter-form select {
    font-size: 16px;
  }
  .combo input {
    font-size: 18px;
  }
  .vboard {
    padding: 20px 16px 18px;
  }
  .vamount .flaps {
    gap: 3px;
  }
  .vamount .flap {
    border-radius: 5px;
  }
  .panel {
    padding: 18px 16px;
  }
  .cheat {
    padding: 22px 16px 18px;
  }
  .cheat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-links {
    justify-content: flex-start;
  }
  .board {
    padding: 14px 10px 10px;
  }
  .board .col-flight {
    display: none;
  }
  .board .flap {
    font-size: 13px;
  }
  .letter-text {
    min-height: 420px;
    font-size: 16px;
    line-height: 1.6;
    padding: 18px 16px;
  }
  .btn {
    min-height: 50px;
  }
}

@media (max-width: 400px) {
  .board td,
  .board th {
    padding: 0 3px;
  }
  .board .flap {
    font-size: 12px;
    width: 0.98em;
  }
}
