:root {
  --bg: #0b3a54;
  --card: #ffffff;
  --ink: #12313f;
  --muted: #5c7382;
  --sea: #1c6e8c;
  --sea-deep: #0f4a63;
  --accent: #e08a1e;
  --accent-warm: #f4b64a;
  --line: #dce6ec;
  --ok: #1c7c54;
  --shadow: 0 8px 24px rgba(11, 58, 84, 0.10);
  --shadow-sm: 0 2px 8px rgba(11, 58, 84, 0.07);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 400px at 50% -120px, #dfeef4, #eef5f8 60%, #f6f9fb);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.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;
}

/* Hero header with inline archipelago illustration. min-height keeps the
   header near the SVG's authored 3.1:1 ratio so the slice crop stays small. */
header {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  min-height: 200px; display: flex; align-items: flex-end;
}
.hero-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -1;
}
.hero-text {
  width: 100%; max-width: 620px; margin: 0 auto;
  padding: 26px 16px 30px;
}
header h1 {
  margin: 0; font-size: 1.7rem; font-weight: 700; letter-spacing: .2px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}
.tagline {
  margin: 2px 0 0; font-size: .95rem; font-weight: 500; opacity: .92;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}
.status { margin: 8px 0 0; font-size: .8rem; opacity: .9; }
.status.err { color: #ffd9a8; }

main { max-width: 620px; margin: 0 auto; padding: 0 16px 44px; }

/* Pill tabs floating over the hero seam */
.tabs {
  display: flex; gap: 6px; max-width: min(588px, 100% - 32px);
  margin: -22px auto 0; padding: 6px;
  position: relative; z-index: 1;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
}
.tab {
  flex: 1; padding: 11px 6px; border: 0; border-radius: 9px; background: transparent;
  color: var(--sea); font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { background: #eef5f8; }
.tab.active {
  background: linear-gradient(135deg, var(--sea), var(--sea-deep));
  color: #fff; box-shadow: var(--shadow-sm);
}

form {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-top: 16px; box-shadow: var(--shadow-sm);
}
label { display: block; font-weight: 600; margin-bottom: 6px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1; }
input[type=date], input[type=time], input[type=number] {
  padding: 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 1rem;
  width: 100%; background: #fbfdfe; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: none; border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(28, 110, 140, .16);
}
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0 0; padding: 8px 0; }
.check input { width: auto; }
button#go {
  margin-top: 16px; width: 100%; padding: 13px; border: 0; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent));
  color: #3a2503; font-size: 1.02rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 138, 30, .32); transition: transform .1s, box-shadow .15s;
}
button#go:hover { box-shadow: 0 6px 18px rgba(224, 138, 30, .42); }
button#go:active { transform: translateY(1px); }

.panel, details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-top: 16px; box-shadow: var(--shadow-sm);
}
.panel h2, details summary { font-size: 1.02rem; margin: 0 0 8px; }
.panel h2 {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
details summary { font-weight: 600; cursor: pointer; }
.hint { color: var(--muted); font-size: .82rem; margin: 4px 0 10px; }
.link { background: none; border: 0; color: var(--sea); cursor: pointer; padding: 0; text-decoration: underline; font: inherit; }

.itin {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0;
  background: #fbfdfe;
}
.itin.best {
  border-color: var(--sea); background: #fff;
  box-shadow: 0 0 0 2px rgba(28, 110, 140, .14), var(--shadow-sm);
}
.itin.warn { border-color: #e0a11e; border-left-width: 4px; background: #fffaf1; }
.tight {
  display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; background: #fbe0cf; color: #9a3d12;
  white-space: nowrap;
}
.itin h3 { margin: 0 0 8px; font-size: .95rem; }
.step { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 4px 0; font-size: .9rem; }
.step .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.step.ferry .t { color: var(--sea); font-weight: 700; }
.step.clickable { cursor: pointer; border-radius: 8px; min-height: 44px; align-items: center; }
.step.clickable:hover { background: #eef5f8; }
.step .more { color: var(--muted); font-size: .8rem; }
.step[aria-expanded="true"] .more { transform: rotate(180deg); display: inline-block; }
.neighbors { font-size: .82rem; color: var(--muted); padding: 2px 0 6px 104px; }
.neighbors .sub { color: var(--muted); }
.arrive { font-weight: 700; margin-top: 8px; color: var(--sea-deep); }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px;
  border-radius: 999px; margin-left: 6px; background: #fbe6c8; color: #92590d;
}
.nextday { color: var(--accent); font-weight: 700; }
.settings-grid { display: grid; grid-template-columns: 1fr 84px; gap: 8px 10px; align-items: center; }
.settings-grid label { font-weight: 400; margin: 0; font-size: .9rem; }
.settings-grid .sub { color: var(--muted); font-size: .74rem; }
table.sched { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.sched td { padding: 6px 0; border-bottom: 1px solid var(--line); }
table.sched tr:last-child td { border-bottom: 0; }
table.sched td.time { color: var(--sea); font-weight: 700; font-variant-numeric: tabular-nums; }
.msg { color: var(--muted); }
.msg.err { color: #a3401a; font-weight: 600; }
a { color: var(--sea); }
a:hover { color: var(--sea-deep); }
