:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #6f706c;
  --line: #d8d7d1;
  --paper: #f5f4f0;
  --surface: #fbfaf7;
  --accent: #d9ff57;
  --danger: #a32c2c;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.shell { width: min(100%, 720px); margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 18px max(30px, env(safe-area-inset-bottom)); }
.masthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.wordmark { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 800; letter-spacing: -.04em; }
.wordmark span { font-weight: 400; }
.eyebrow, .step, .panel-kicker, footer, .field > span:first-child, .choice-group legend { margin: 0; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 10px; letter-spacing: .08em; }
.eyebrow { max-width: 140px; text-align: right; color: var(--muted); }

.intro { padding: 42px 0 26px; }
.step { margin-bottom: 12px; color: var(--muted); }
.intro h1 { margin: 0; max-width: 620px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(37px, 9.5vw, 64px); font-weight: 400; line-height: .96; letter-spacing: -.045em; }
.intro > p:last-child { max-width: 520px; margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.status { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 11px 13px; border: 1px solid var(--line); background: rgba(255,255,255,.36); color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a0a09b; box-shadow: 0 0 0 4px rgba(160,160,155,.13); }
.status.ready .status-dot { background: #238243; box-shadow: 0 0 0 4px rgba(35,130,67,.13); }
.status.error .status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(163,44,44,.13); }

.panel { margin-top: 18px; padding: 24px; border: 1px solid var(--ink); background: var(--surface); }
.panel-kicker { color: var(--muted); }
.panel h2 { margin: 12px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 400; line-height: 1.05; }
.panel p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.ride-form { margin-top: 18px; }
.form-section { margin-bottom: 12px; padding: 22px 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.section-heading > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--ink); border-radius: 50%; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.section-heading h2 { margin: 0 0 4px; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }

.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field > span:first-child, .choice-group legend { color: var(--muted); }
input, select, textarea { width: 100%; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; outline: 0; background: transparent; color: var(--ink); padding: 11px 0; }
input:focus, select:focus, textarea:focus { border-bottom-width: 2px; padding-bottom: 10px; }
textarea { resize: vertical; line-height: 1.45; }
::placeholder { color: #aaa9a4; }
.route-grid { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: end; gap: 8px; }
.route-arrow { padding-bottom: 25px; text-align: center; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.toggle-row, .confirm-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; }
.toggle-row strong { display: block; font-size: 14px; }
.toggle-row small { display: block; margin-top: 3px; color: var(--muted); }
input[role="switch"] { position: relative; width: 44px; height: 24px; flex: 0 0 44px; appearance: none; border: 1px solid var(--ink); border-radius: 20px; padding: 0; }
input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform .18s ease; }
input[role="switch"]:checked { background: var(--accent); }
input[role="switch"]:checked::after { transform: translateX(20px); }

.check-grid { display: grid; gap: 8px; }
.check-card { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 12px; border: 1px solid var(--line); cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--ink); background: #f1f7da; }
.check-card input, .confirm-row input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--ink); }
.check-card strong, .check-card small { display: block; }
.check-card strong { font-size: 14px; }
.check-card small { margin-top: 3px; color: var(--muted); }

.choice-group { margin: 20px 0 0; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 8px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.segmented.two { grid-template-columns: 1fr 1fr; }
.segmented label { position: relative; min-width: 0; }
.segmented label + label { border-left: 1px solid var(--ink); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 12px 8px; text-align: center; font-size: 13px; cursor: pointer; }
.segmented input:checked + span { background: var(--ink); color: white; }

.price-field { margin-top: 20px; }
.money-input { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--ink); }
.money-input b { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; font-weight: 500; }
.money-input input { border: 0; }
.money-input:focus-within { border-bottom-width: 2px; }
.price-field[hidden] { display: none; }

.confirm-row { justify-content: flex-start; margin: 16px 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.submit-button, .secondary-button { width: 100%; border: 1px solid var(--ink); cursor: pointer; }
.submit-button { display: flex; justify-content: space-between; align-items: center; padding: 17px 18px; background: var(--ink); color: white; font-weight: 700; letter-spacing: .03em; }
.submit-button:hover { background: #292929; }
.submit-button:disabled { cursor: wait; opacity: .55; }
.secondary-button { margin-top: 14px; padding: 13px; background: transparent; }
.fine-print { margin: 10px 4px 30px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.success-panel { border-color: #3c6512; background: #f1f7da; }

footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
[hidden] { display: none !important; }

@media (max-width: 480px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .two-columns { grid-template-columns: 1fr; gap: 0; }
  .route-grid { grid-template-columns: 1fr 18px 1fr; }
  .form-section { padding-left: 15px; padding-right: 15px; }
}

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