@font-face {
  font-family: Manrope;
  src: url('/assets/manrope.woff2') format('woff2');
  font-display: swap;
  font-weight: 200 800;
}

:root {
  color-scheme: light;
  --paper: #edf6f4;
  --ink: #142e2d;
  --muted: #45625e;
  --accent: #0c655a;
  --edge: #9eb5b0;
  --control-edge: #6f8580;
  --panel: #123d39;
  --panel-text: #f3fcf8;
  --panel-muted: #d1e7df;
  --signal: #e1f791;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--accent);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: var(--signal); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); text-underline-offset: .2em; }
p { line-height: 1.65; }
h1, h2, h3, p { margin: 0; }
h2, h3 { line-height: 1.3; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.17rem; }

.wrap { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.header { display: flex; justify-content: space-between; align-items: center; min-height: 78px; gap: 12px; border-bottom: 1px solid #c5d9d4; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 800; text-decoration: none; }
.brand img { display: block; flex: none; }
.sharing { position: relative; }
.share-panel { position: absolute; z-index: 1; top: calc(100% + 8px); right: 0; width: min(300px, calc(100vw - 40px)); padding: 14px; border: 1px solid var(--edge); border-radius: 12px; background: white; }
.share-panel input { margin-top: 6px; }

.button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--control-edge);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .16s ease;
}
.button:hover { background: #e5f3f0; }
.button:disabled { cursor: default; opacity: .6; }

.intro { padding-block: clamp(30px, 6vw, 64px) clamp(24px, 4vw, 38px); }
.intro h1 { font-size: clamp(2.35rem, 5.6vw, 4.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; text-wrap: balance; }
.intro h1 span { white-space: nowrap; }
.intro p { margin-top: 15px; max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }

.workspace { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 16px; }
.form,
.timeline { min-width: 0; padding: clamp(18px, 3vw, 30px); border-radius: 16px; }
.form { border: 1px solid #b9cec8; background: white; }
.form-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: block; min-width: 0; font-size: .9rem; font-weight: 800; }
.optional { color: var(--muted); font-size: .78rem; font-weight: 600; }
input, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--control-edge);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fcfb;
  font: inherit;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
input[aria-invalid='true'] { border-color: #ab4a34; }
.fields label > input, .duration { margin-top: 7px; }
.duration { position: relative; display: block; }
.duration input { padding-right: 50px; appearance: textfield; }
.duration input::-webkit-inner-spin-button, .duration input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.duration span { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: .75rem; }
.field-note { max-width: 43ch; margin-top: 15px; color: var(--muted); font-size: .85rem; }

.timeline { color: var(--panel-text); background: var(--panel); }
.timeline h2 { margin-bottom: 17px; }
.timeline :focus-visible { outline-color: var(--signal); }
.stops { position: relative; list-style: none; margin: 0; padding: 0 0 0 24px; }
.stops::before { content: ''; position: absolute; left: 5px; top: 23px; bottom: 24px; width: 2px; background: #82ada0; }
.stop { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 53px; padding: 10px 12px; gap: 10px; color: var(--panel-muted); font-size: .94rem; font-weight: 700; }
.stop::before { content: ''; position: absolute; left: -24px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border: 2px solid #b8d8cc; border-radius: 50%; background: var(--panel); }
.stop + .stop { margin-top: 4px; }
.departure { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid #60877b; border-radius: 9px; background: #1f514a; color: var(--panel-text); }
.departure::before { left: -25px; border-color: var(--signal); background: var(--signal); }
.stop-time { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
time { color: var(--panel-text); font-size: clamp(1.18rem, 2.5vw, 1.55rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.departure time { color: var(--signal); }
.day { color: var(--panel-muted); font-size: .75rem; }
.plan-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #62867e; color: var(--panel-muted); font-size: .85rem; }
.timeline .button { flex: none; color: var(--panel-text); background: transparent; border-color: #97bdb1; }
.timeline .button:hover { background: #2a5a51; }
.timeline .start-countdown { grid-column: 1 / -1; justify-self: start; border-color: var(--signal); color: #18372e; background: var(--signal); }
.timeline .start-countdown:hover { border-color: #f3ffc4; background: #f3ffc4; }
.live-departure { margin-top: 15px; padding-top: 14px; border-top: 1px solid #62867e; }
.live-cue { color: var(--signal); font-size: 1.18rem; font-weight: 800; line-height: 1.35; }
.live-time { color: var(--panel-text); font-size: clamp(1.4rem, 4vw, 2rem); font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1.25; }
.live-detail { margin-top: 5px; color: var(--panel-muted); font-size: .85rem; }
.live-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-block: 14px 9px; }
.live-actions label { flex: 1 1 130px; max-width: 205px; }
.live-actions input { margin-top: 5px; }
.live-actions .button { min-height: 46px; }
.error { padding: 12px; border: 1px solid #ba9284; border-radius: 9px; background: #553d37; color: #fff3ec; }
.manual-copy { margin-top: 14px; }
.manual-copy textarea { margin-top: 6px; }

.guide { max-width: 72ch; padding-block: clamp(32px, 6vw, 66px) 35px; }
.guide p { margin-top: 9px; color: var(--muted); }
.guide strong { color: var(--ink); }
.guide h3 { margin-top: 24px; }
.guide .privacy { margin-top: 24px; font-size: .875rem; }
.footer { padding-block: 20px 34px; border-top: 1px solid #c5d9d4; font-size: .92rem; font-weight: 800; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 10px 14px; background: white; transform: translateY(-140%); }
.skip-link:focus { transform: translateY(0); }

@media (max-width: 750px) {
  .workspace { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 36px); }
}

@media (max-width: 350px) {
  .wrap { width: calc(100% - 24px); }
  .header { min-height: 62px; }
  .intro { padding-block: 20px 17px; }
  .intro p { margin-top: 8px; }
  .workspace { gap: 12px; }
  .form-header { margin-bottom: 11px; }
  .form, .timeline { padding: 14px; }
  .fields { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 10px 12px; }
  .fields label > input, .duration { margin-top: 6px; }
  .duration input { padding-right: 36px; }
  .duration span { inset-inline-end: 8px; }
  .field-note { margin-top: 9px; }
  .timeline h2 { margin-bottom: 11px; }
  .stop { min-height: 48px; padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
