/*
 * Train Alerts visual system
 * Editorial warmth + departure-board precision, built without external assets.
 */

:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --surface-alt: #e8eeeb;
  --surface-strong: #dce7e5;
  --ink: #102936;
  --muted: #5b6b70;
  --line: #c8d2cf;
  --line-strong: #7b8e8e;
  --navy: #0b2838;
  --navy-soft: #183f50;
  --navy-ink: #f9f6ed;
  --orange: #ff6b35;
  --orange-text: #bb3d12;
  --orange-soft: #ffe2d4;
  --orange-ink: #142d38;
  --sky: #a8e5ee;
  --sky-soft: #def4f5;
  --good: #087a55;
  --good-soft: #d9f2e7;
  --bad: #ae2f25;
  --bad-soft: #fbe4df;
  --focus: #08768d;
  --shadow-ink: rgba(11, 40, 56, .13);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --page: 1200px;
  --display: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #071a21;
    --surface: #0d252d;
    --surface-alt: #132f37;
    --surface-strong: #193a43;
    --ink: #f7f3e8;
    --muted: #a5b6b8;
    --line: #2a464d;
    --line-strong: #557178;
    --navy: #06171d;
    --navy-soft: #133743;
    --navy-ink: #fbf8ef;
    --orange-soft: #4a2a20;
    --orange-text: #ff7a4a;
    --orange-ink: #0b2029;
    --sky: #a8e5ee;
    --sky-soft: #153943;
    --good: #55d2a1;
    --good-soft: #123b31;
    --bad: #ff9285;
    --bad-soft: #49251f;
    --focus: #a8e5ee;
    --shadow-ink: rgba(0, 0, 0, .34);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 300px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
summary {
  font: inherit;
}

button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: .18em;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(var(--page), calc(100% - 40px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 11px 15px;
  transform: translateY(-180%);
  border-radius: 8px;
  background: var(--orange);
  color: var(--orange-ink);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* Header ---------------------------------------------------------------- */

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  overflow: visible;
  fill: var(--orange);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.brand-mark circle {
  stroke: var(--paper);
  stroke-width: 2;
}

.nav-links,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.site-footer nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 750;
  text-decoration: none;
}

.nav-links a:hover,
.site-footer nav a:hover {
  color: var(--ink);
}

.nav-links .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: var(--navy-ink);
}

.nav-cta span {
  transition: transform .18s ease;
}

.nav-cta:hover span {
  transform: translateX(3px);
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(520px, 1.14fr);
  gap: clamp(42px, 6vw, 92px);
  align-items: start;
  padding-block: clamp(56px, 8vw, 112px) 92px;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 36px;
  left: -10vw;
  width: min(52vw, 720px);
  height: 590px;
  opacity: .42;
  background:
    radial-gradient(circle at 12% 20%, var(--orange) 0 5px, transparent 6px),
    radial-gradient(circle at 82% 20%, var(--orange) 0 5px, transparent 6px),
    radial-gradient(circle at 82% 76%, var(--orange) 0 5px, transparent 6px),
    linear-gradient(90deg, transparent 11%, var(--line) 11% 11.35%, transparent 11.35% 81.8%, var(--line) 81.8% 82.15%, transparent 82.15%),
    linear-gradient(transparent 19.5%, var(--line) 19.5% 19.9%, transparent 19.9% 75.5%, var(--line) 75.5% 75.9%, transparent 75.9%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.hero-copy {
  position: sticky;
  top: 30px;
}

.eyebrow,
.section-kicker,
.state-eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--good-soft);
}

.hero h1 {
  max-width: 9.7ch;
  margin: 0;
  font-size: clamp(3.35rem, 6.4vw, 6.6rem);
  font-weight: 850;
  letter-spacing: -.075em;
  line-height: .9;
}

.hero h1 span {
  color: var(--orange-text);
}

.hero-lede {
  max-width: 42ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.trust-list svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--good);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* Example alert card ---------------------------------------------------- */

.alert-demo {
  position: relative;
  margin-top: 42px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--navy);
  border-radius: 24px;
  background: var(--navy);
  color: var(--navy-ink);
  box-shadow: 8px 8px 0 var(--orange);
  transform: rotate(-1.2deg);
  animation: demo-arrive .65s cubic-bezier(.22, 1, .36, 1) both;
}

.demo-rail {
  position: absolute;
  top: 0;
  right: 25px;
  bottom: 0;
  width: 16px;
  opacity: .35;
}

.demo-rail::before,
.demo-rail::after {
  content: "";
  position: absolute;
  top: -15px;
  bottom: -15px;
  width: 1px;
  background: var(--sky);
}

.demo-rail::after {
  right: 0;
}

.demo-rail span {
  position: absolute;
  z-index: 1;
  left: -4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--orange);
}

.demo-rail span:nth-child(1) { top: 18%; }
.demo-rail span:nth-child(2) { top: 49%; right: -4px; left: auto; }
.demo-rail span:nth-child(3) { top: 78%; }

.demo-topline,
.demo-route,
.demo-message {
  position: relative;
  z-index: 2;
}

.demo-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 29px;
}

.demo-label,
.live-badge,
.demo-kicker,
.demo-message > div > span,
.demo-note {
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.demo-label {
  color: var(--sky);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65e5ad;
}

.demo-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: end;
  margin: 27px 42px 22px 0;
}

.demo-route > div:last-child {
  text-align: right;
}

.demo-kicker {
  display: block;
  margin-bottom: 5px;
  color: #a8bbc3;
}

.demo-route strong {
  display: block;
  overflow: hidden;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrow {
  padding-bottom: 2px;
  color: var(--orange);
  font-size: 1.4rem;
}

.demo-message {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: center;
  margin-right: 38px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 15px;
  background: rgba(255, 255, 255, .08);
}

.notification-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--orange);
  color: var(--orange-ink);
}

.notification-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.demo-message > div > span {
  display: block;
  margin-bottom: 3px;
  color: #a8bbc3;
  letter-spacing: .03em;
  text-transform: none;
}

.demo-message strong {
  display: block;
  font-size: .93rem;
}

.demo-message strong b {
  color: var(--orange);
}

.demo-message small {
  display: block;
  margin-top: 2px;
  color: #bfd0d6;
  font-size: .76rem;
}

.demo-note {
  position: relative;
  z-index: 2;
  margin: 17px 38px 0 0;
  color: #90a8b1;
  font-size: .57rem;
  letter-spacing: .04em;
  text-transform: none;
}

/* Builder --------------------------------------------------------------- */

.builder-card {
  position: relative;
  overflow: visible;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 10px 10px 0 var(--shadow-ink);
}

.builder-heading {
  padding: clamp(28px, 4vw, 42px) clamp(24px, 4vw, 42px) 30px;
  border-bottom: 1px solid var(--line);
}

.builder-heading .section-kicker {
  margin-bottom: 10px;
  color: var(--orange-text);
}

.builder-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 830;
  letter-spacing: -.055em;
  line-height: 1;
}

.builder-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
}

.form-content {
  padding: 0 clamp(24px, 4vw, 42px) clamp(28px, 4vw, 42px);
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 34px 0 36px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 820;
  letter-spacing: -.02em;
}

.section-number {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .02em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-top: 18px;
}

.field:first-child,
.form-section-title + .field {
  margin-top: 0;
}

.field > label,
.field > .label,
.time-grid label {
  color: var(--ink);
  font-size: .88rem;
  font-weight: 760;
}

.optional {
  margin-left: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .61rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="time"],
input[type="date"] {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

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

input:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent);
}

input[aria-invalid="true"] {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 16%, transparent);
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Route fields + autocomplete ------------------------------------------ */

.route-fields {
  position: relative;
}

.route-fields::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 32px;
  bottom: 51px;
  left: 6px;
  width: 2px;
  background: var(--line-strong);
}

.route-field {
  position: relative;
  z-index: 2;
  padding-left: 27px;
}

.route-field + .route-field {
  margin-top: 25px;
}

/* Each route-field is its own stacking context (z-index: 2), so the options
   list's z-index only counts inside it — a tall open dropdown would paint
   beneath the sibling field that follows. Lift the combo while it's in use
   (the list only stays open while its input keeps focus). */
.route-field:focus-within {
  z-index: 5;
}

.station-node {
  position: absolute;
  top: 29px;
  left: 0;
  z-index: 3;
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 1.5px var(--navy);
}

.station-node-dest {
  background: var(--sky);
}

.combo .options {
  position: absolute;
  z-index: 30;
  top: 81px;
  right: 0;
  left: 27px;
  max-height: min(280px, 42vh);
  margin: 5px 0 0;
  padding: 6px;
  overflow-y: auto;
  border: 1.5px solid var(--navy);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow-ink);
  list-style: none;
}

.combo-message {
  position: absolute;
  z-index: 30;
  top: 81px;
  right: 0;
  left: 27px;
  margin: 5px 0 0;
  padding: 14px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow-ink);
  color: var(--muted);
  font-size: .82rem;
}

.options li {
  padding: 12px 13px;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: .9rem;
}

.options li[aria-selected="true"],
.options li:hover {
  background: var(--sky-soft);
}

.options li[aria-selected="true"] {
  box-shadow: inset 3px 0 0 var(--focus);
}

.options li.empty {
  color: var(--muted);
  cursor: default;
}

.options li.empty:hover {
  background: transparent;
}

.text-button {
  align-self: flex-start;
  min-height: 32px;
  margin-top: -1px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--focus);
  font-size: .76rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Lead time ------------------------------------------------------------- */

.lead-control {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lead-presets {
  display: flex;
  flex: 1 1 320px;
  gap: 7px;
}

.lead-preset {
  flex: 1;
  min-width: 62px;
  min-height: 46px;
  padding: 0 11px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 780;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.lead-preset:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.lead-preset.is-active {
  border-color: var(--navy);
  background: var(--orange);
  color: var(--orange-ink);
  box-shadow: inset 0 0 0 1px var(--navy);
}

.lead-custom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-custom input {
  width: 74px;
  min-height: 46px;
  padding-inline: 8px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.lead-custom span {
  color: var(--muted);
  font-size: .76rem;
}

/* Days + time ----------------------------------------------------------- */

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

.day {
  position: relative;
  min-width: 0;
  min-height: 46px;
  padding: 0 4px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 760;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.day:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.day:disabled,
.day:disabled:hover {
  cursor: not-allowed;
  opacity: .36;
  transform: none;
  border-style: dashed;
  border-color: var(--line-strong);
}

.day[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--navy-ink);
}

.day[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.days-secondary .day[aria-pressed="true"] {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--orange-ink);
}

.days-secondary .day[aria-pressed="true"]::after {
  background: var(--navy);
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 11px;
  align-items: end;
  margin-top: 22px;
}

.time-grid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.time-grid input {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.time-connector {
  display: grid;
  width: 32px;
  height: 52px;
  place-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
}

.fortnight {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-alt);
}

.fortnight summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 760;
  list-style: none;
}

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

.summary-icon,
.faq-list summary span {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.summary-icon::before,
.summary-icon::after,
.faq-list summary span::before,
.faq-list summary span::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 2px;
  left: 2px;
  height: 2px;
  background: currentColor;
  transition: transform .2s ease;
}

.summary-icon::after,
.faq-list summary span::after {
  transform: rotate(90deg);
}

.fortnight[open] .summary-icon::after,
.faq-list details[open] summary span::after {
  transform: rotate(0deg);
}

.fortnight-content {
  padding: 15px 16px 18px;
  border-top: 1px solid var(--line);
}

.fortnight-content > .hint {
  margin-bottom: 14px;
}

/* Delivery -------------------------------------------------------------- */

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.channel-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 16px;
  gap: 11px;
  align-items: center;
  min-height: 78px;
  padding: 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.channel-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.channel-card:has(input:checked) {
  border-color: var(--navy);
  background: var(--sky-soft);
  box-shadow: inset 0 0 0 1px var(--navy);
}

.channel-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.channel-card:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.channel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-alt);
}

.channel-card:has(input:checked) .channel-icon {
  background: var(--orange);
  color: var(--orange-ink);
}

.channel-icon svg,
.secondary-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.channel-copy strong,
.channel-copy small {
  display: block;
}

.channel-copy strong {
  font-size: .9rem;
}

.channel-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .68rem;
}

.choice-dot {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.channel-card:has(input:checked) .choice-dot {
  border: 4px solid var(--navy);
}

.delivery-pane {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-alt);
}

.delivery-pane .field {
  margin: 0;
}

.secondary-button,
.button-secondary,
.button-primary,
.primary-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}

.secondary-button,
.button-secondary {
  border: 1.5px solid var(--navy);
  background: var(--surface);
  color: var(--ink);
  font-size: .82rem;
}

.secondary-button:hover,
.button-secondary:hover {
  transform: translateY(-2px);
  background: var(--sky-soft);
}

.secondary-button.done {
  border-color: var(--good);
  color: var(--good);
}

.secondary-button:disabled,
.secondary-button[aria-disabled="true"],
.primary-button:disabled {
  cursor: progress;
  opacity: .6;
}

.delivery-pane .hint {
  margin-top: 10px;
}

/* iOS pre-step: shown in place of the enable button until the site is
   installed to the Home Screen (Apple's requirement for web push). */
.push-install > p:first-child {
  margin: 0;
  font-size: .92rem;
}

.push-install ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 24px;
  font-size: .9rem;
}

.push-install li::marker {
  font-weight: 800;
  color: var(--orange-text);
}

/* Summary + submit ------------------------------------------------------ */

.journey-summary {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 13px;
  margin: 27px 0 0;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background: var(--surface-alt);
}

.summary-mark {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 3px solid var(--surface-alt);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 1px var(--navy);
}

.journey-summary span:not(.summary-mark) {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.journey-summary p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
}

.submit-zone {
  margin-top: 18px;
}

.primary-button,
.button-primary {
  width: 100%;
  min-height: 58px;
  border: 1.5px solid var(--navy);
  background: var(--navy);
  box-shadow: 4px 4px 0 var(--orange);
  color: var(--navy-ink);
  font-size: .94rem;
}

.primary-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform .16s ease;
}

.primary-button:hover,
.button-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--orange);
}

.primary-button:hover svg {
  transform: translateX(3px);
}

.submit-zone > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  text-align: center;
}

/* Errors + receipt ------------------------------------------------------ */

.error-summary {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  margin: 22px 28px 0;
  padding: 15px;
  border: 1.5px solid var(--bad);
  border-radius: 12px;
  background: var(--bad-soft);
  color: var(--bad);
}

.error-summary svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.error-summary strong,
.error-summary p {
  margin: 0;
}

.field-error {
  margin: 4px 0 0;
  color: var(--bad);
  font-size: .76rem;
  font-weight: 750;
}

.time-grid > .field-error {
  grid-column: 1 / -1;
}

.error-summary strong {
  font-size: .82rem;
}

.error-summary p {
  margin-top: 2px;
  font-size: .76rem;
}

.status {
  padding: clamp(26px, 5vw, 46px);
}

.status.err {
  margin: 28px;
  border: 1px solid var(--bad);
  border-radius: 13px;
  background: var(--bad-soft);
  color: var(--bad);
}

.receipt {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.receipt::before,
.receipt::after {
  content: "";
  position: absolute;
  top: 53%;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  background: var(--paper);
}

.receipt::before { left: -14px; }
.receipt::after { right: -14px; }

.receipt-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 19px;
  place-items: center;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  background: var(--good-soft);
  color: var(--good);
  font-size: 1.7rem;
}

.receipt-eyebrow {
  margin: 0 0 9px;
  color: var(--good);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.receipt h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  letter-spacing: -.055em;
  line-height: 1;
}

.receipt > p {
  max-width: 42ch;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: .9rem;
}

.receipt-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 29px 0 0;
  padding: 20px;
  border-block: 1px dashed var(--line-strong);
}

.receipt-route div:last-child {
  text-align: right;
}

.receipt-route span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .59rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.receipt-route strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: .95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-route > span {
  color: var(--orange-text);
  font-size: 1.2rem;
}

.receipt-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 21px;
  padding: 0;
  list-style: none;
}

.receipt-details li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}

.receipt-actions,
.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.receipt-actions > *,
.state-actions > * {
  flex: 1 1 180px;
}

.receipt-actions .primary-button {
  width: auto;
}

.receipt-manage-note {
  margin-top: 16px !important;
  font-family: var(--mono);
  font-size: .64rem !important;
}

.builder-card.is-complete .builder-heading,
.builder-card.is-complete .form-content,
.builder-card.is-complete .error-summary,
.builder-card.is-complete .device-alerts {
  display: none;
}

/* Alerts remembered on this device -------------------------------------- */

.device-alerts {
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.device-alerts-title {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .61rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.device-alerts ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0 0 7px;
  padding: 0;
  list-style: none;
}

.device-alerts a {
  color: var(--ink);
  font-size: .85rem;
  font-weight: 650;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.device-alerts a:hover {
  text-decoration-color: var(--ink);
}

/* Value strip ----------------------------------------------------------- */

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 122px;
  overflow: hidden;
  border: 1.5px solid var(--navy);
  border-radius: 17px;
  background: var(--navy);
  color: var(--navy-ink);
}

.signal-strip p {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 17px 22px;
  border-right: 1px solid rgba(255, 255, 255, .16);
  font-size: .79rem;
  font-weight: 720;
}

.signal-strip p:last-child {
  border-right: 0;
}

.signal-strip span {
  flex: 0 0 auto;
  color: var(--orange);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* How it works ---------------------------------------------------------- */

.how-section {
  padding-bottom: 122px;
}

.section-intro {
  display: grid;
  grid-template-columns: .62fr 1.38fr;
  gap: 40px;
  align-items: start;
}

.section-intro .section-kicker {
  margin-top: 8px;
}

.section-intro h2,
.faq-heading h2 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  font-weight: 840;
  letter-spacing: -.065em;
  line-height: .95;
}

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

.steps-grid li {
  position: relative;
  min-height: 390px;
  padding: 24px;
  overflow: hidden;
  border: 1.5px solid var(--navy);
  border-radius: 21px;
  background: var(--surface);
}

.steps-grid li:nth-child(2) {
  background: var(--sky-soft);
}

.steps-grid li:nth-child(3) {
  background: var(--orange-soft);
}

.step-number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 750;
}

.step-graphic {
  position: relative;
  height: 170px;
  margin: 20px -24px 25px;
}

.pick-graphic::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 50%;
  width: 3px;
  background: var(--navy);
}

.pick-graphic span {
  position: absolute;
  left: calc(50% - 10px);
  width: 22px;
  height: 22px;
  border: 5px solid var(--surface);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--navy);
}

.pick-graphic span:first-child { top: 18px; }
.pick-graphic span:last-child { bottom: 18px; background: var(--sky); }

.follow-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.follow-graphic::before {
  content: "";
  position: absolute;
  right: 18%;
  left: 18%;
  height: 2px;
  background: var(--navy);
}

.follow-graphic span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--surface);
}

.follow-graphic span::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--orange);
}

.follow-graphic span:nth-child(2) {
  width: 70px;
  height: 70px;
  background: var(--navy);
}

.follow-graphic span:nth-child(2)::after {
  background: var(--sky);
}

.leave-graphic {
  display: grid;
  place-items: center;
}

.leave-graphic svg {
  width: 128px;
  height: 128px;
  fill: none;
  stroke: var(--navy);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.steps-grid h3 {
  margin: 0;
  font-size: 1.23rem;
  letter-spacing: -.035em;
}

.steps-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.65;
}

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

.faq-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(45px, 8vw, 110px);
  padding-block: 104px 126px;
  border-top: 1px solid var(--line);
}

.faq-heading h2 {
  font-size: clamp(2.5rem, 4.8vw, 4.4rem);
}

.faq-heading > p:last-child {
  max-width: 40ch;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
}

.faq-list {
  border-top: 1.5px solid var(--navy);
}

.faq-list details {
  border-bottom: 1px solid var(--line-strong);
}

.faq-list summary {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 2px;
  font-size: 1rem;
  font-weight: 780;
  list-style: none;
}

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

.faq-list details p {
  max-width: 60ch;
  margin: -4px 36px 25px 2px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.7;
}

.faq-list details p a {
  color: var(--focus);
  font-weight: 720;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 35px;
  align-items: center;
  min-height: 120px;
}

.footer-inner > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .61rem;
  text-align: center;
  text-transform: uppercase;
}

.footer-copyright {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  grid-column: 1 / -1;
  margin-top: -14px;
  padding-bottom: 16px;
}

/* Buy Me a Coffee — inline branded button, no third-party widget script. */
.bmc-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1.5px solid #0d0c22;
  border-radius: 999px;
  background: #ffdd00;
  color: #0d0c22;
  font-size: .74rem;
  font-weight: 760;
  text-decoration: none;
  text-transform: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.bmc-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bmc-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(13, 12, 34, .35);
  color: #0d0c22;
}

.receipt-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.footer-copyright a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer-copyright a:hover {
  color: var(--ink);
}

/* Server-rendered states ------------------------------------------------ */

.state-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 22%, color-mix(in srgb, var(--orange) 20%, transparent) 0 6px, transparent 7px),
    linear-gradient(115deg, transparent 0 56%, color-mix(in srgb, var(--line) 60%, transparent) 56% 56.2%, transparent 56.2%),
    var(--paper);
}

.state-page .site-footer {
  width: 100%;
  margin-top: auto;
}

.state-page .site-header {
  width: min(var(--page), calc(100% - 40px));
  margin-inline: auto;
}

.state-shell {
  width: min(680px, calc(100% - 40px));
  margin: clamp(42px, 8vw, 100px) auto 80px;
}

.state-card {
  position: relative;
  padding: clamp(30px, 7vw, 58px);
  overflow: hidden;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 9px 9px 0 var(--orange);
}

.state-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--navy) 0 42px, var(--orange) 42px 52px);
}

.state-eyebrow {
  color: var(--orange-text);
}

.state-title {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 4.2rem);
  font-weight: 840;
  letter-spacing: -.065em;
  line-height: .94;
}

.state-card-manage .state-title > span:not(.sr-only) {
  color: var(--orange-text);
}

.state-copy {
  max-width: 50ch;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.state-details {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  border-block: 1px solid var(--line);
}

.state-details > div,
.state-details li {
  display: grid;
  grid-template-columns: minmax(105px, .5fr) 1.5fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  list-style: none;
}

.state-details > div:last-child,
.state-details li:last-child {
  border-bottom: 0;
}

.state-details dt,
.state-details .detail-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.state-details dd,
.state-details .detail-value {
  margin: 0;
  font-size: .88rem;
  font-weight: 730;
}

.state-details dd small {
  display: block;
  margin-top: 5px;
}

.state-actions form {
  display: flex;
  flex: 1 1 180px;
  margin: 0;
}

.state-actions form > button {
  width: 100%;
}

.state-actions .button-primary {
  width: auto;
}

.state-actions .button-danger {
  display: inline-flex;
  min-height: 50px;
  flex: 1 1 180px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1.5px solid var(--bad);
  border-radius: 10px;
  background: var(--bad-soft);
  color: var(--bad);
  font-weight: 800;
}

.state-actions .button-danger:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--bad-soft) 76%, var(--surface));
}

.state-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: .75rem;
}

.privacy-section {
  margin-top: 30px;
}

.privacy-section + .privacy-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.privacy-section h2 {
  margin: 0;
  font-size: 1.25rem;
}

.privacy-section p,
.privacy-section li {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.7;
}

.privacy-section ul {
  padding-left: 20px;
}

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

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, .8fr) minmax(480px, 1.2fr);
    gap: 38px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 6.8vw, 5.4rem);
  }

  .trust-list {
    display: grid;
    grid-template-columns: max-content max-content;
  }

  .trust-list li:last-child {
    grid-column: 1 / -1;
    width: max-content;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(680px, calc(100% - 32px));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-top: 54px;
  }

  .hero::before {
    width: 95vw;
  }

  .hero-copy {
    position: relative;
    top: auto;
  }

  .hero h1 {
    max-width: 10.5ch;
    font-size: clamp(3.8rem, 12vw, 6.5rem);
  }

  .hero-lede {
    max-width: 52ch;
  }

  .alert-demo {
    max-width: 520px;
  }

  .signal-strip,
  .section-intro,
  .faq-section {
    grid-template-columns: 1fr;
  }

  .signal-strip p {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }

  .signal-strip p:last-child {
    border-bottom: 0;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid li {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    column-gap: 28px;
    min-height: 250px;
  }

  .steps-grid .step-number {
    grid-column: 1 / -1;
  }

  .step-graphic {
    grid-row: 2 / span 2;
    height: 180px;
    margin: 5px 0 0;
  }

  .steps-grid h3 {
    align-self: end;
  }

  .steps-grid p {
    align-self: start;
  }

  .faq-section {
    gap: 52px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: center;
    padding-block: 32px;
  }
}

@media (max-width: 620px) {
  .page-shell,
  .state-page .site-header,
  .state-shell {
    width: min(100% - 24px, 560px);
  }

  .site-header {
    min-height: 72px;
  }

  .nav-links > a:not(.nav-cta) {
    display: none;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links .nav-cta {
    min-height: 40px;
    padding: 0 13px;
    font-size: .76rem;
  }

  .hero {
    padding-block: 42px 74px;
  }

  .hero h1 {
    font-size: clamp(3.35rem, 16.5vw, 5.3rem);
  }

  .hero-lede {
    margin-top: 23px;
  }

  .trust-list {
    grid-template-columns: 1fr 1fr;
  }

  .trust-list li {
    justify-content: center;
    padding-inline: 9px;
    font-size: .7rem;
  }

  .trust-list li:last-child {
    grid-column: auto;
    width: auto;
  }

  .alert-demo {
    padding: 21px;
    transform: none;
    box-shadow: 6px 6px 0 var(--orange);
  }

  .demo-route {
    margin-right: 31px;
  }

  .demo-message {
    margin-right: 29px;
  }

  .demo-note {
    margin-right: 29px;
  }

  .builder-card {
    border-radius: 21px;
    box-shadow: 5px 5px 0 var(--shadow-ink);
  }

  .builder-heading {
    padding: 27px 20px 24px;
  }

  .form-content {
    padding: 0 20px 26px;
  }

  .form-section {
    padding-block: 28px;
  }

  .lead-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-basis: 100%;
  }

  .lead-custom {
    width: 100%;
  }

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

  .time-grid {
    grid-template-columns: 1fr;
  }

  .time-connector {
    display: none;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .error-summary {
    margin: 18px 20px 0;
  }

  .status {
    padding: 28px 20px;
  }

  .receipt-route {
    padding-inline: 0;
  }

  .signal-strip {
    margin-bottom: 86px;
  }

  .how-section {
    padding-bottom: 88px;
  }

  .section-intro {
    gap: 13px;
  }

  .steps-grid {
    margin-top: 38px;
  }

  .steps-grid li {
    display: block;
    min-height: 390px;
  }

  .step-graphic {
    height: 170px;
    margin: 20px -24px 25px;
  }

  .faq-section {
    padding-block: 78px 86px;
  }

  .site-footer nav {
    gap: 18px;
  }

  .state-card {
    padding: 32px 22px;
    border-radius: 21px;
    box-shadow: 5px 5px 0 var(--orange);
  }

  .state-details > div,
  .state-details li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 380px) {
  .brand span {
    font-size: .9rem;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .nav-links .nav-cta {
    padding-inline: 11px;
  }

  .nav-cta span {
    display: none;
  }

  .hero h1 {
    font-size: 3.15rem;
  }

  .trust-list {
    grid-template-columns: 1fr;
  }

  .demo-route {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .demo-route > div:last-child {
    text-align: left;
  }

  .route-arrow {
    display: none;
  }

  .demo-message {
    grid-template-columns: 1fr;
  }

  .notification-mark {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@keyframes demo-arrive {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(-1.2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-1.2deg);
  }
}
