/* End Family Boredom: "Wasatch trailhead board" (design v2, Oct 27, 2026). See TECH_DESIGN.md. */
@font-face { font-family: "Zilla Slab"; src: url("/fonts/zilla-slab-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("/fonts/zilla-slab-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-variable.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --lake: #1E4F6B; --lake-deep: #143A4F; --maple: #E3A03A; --sage: #4C7746;
  --paper: #FAFBF9; --ink: #22303A; --stone: #66727C; --rule: #E2E6E8; --white: #FFFFFF;
  --slab: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --sans: "Figtree", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --wrap: 720px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); }
button, input { font: inherit; color: inherit; }
a { color: var(--lake); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--maple); outline-offset: 2px; border-radius: 4px; }

/* ---------- the one bold element: lake band, day strip, ridgeline ---------- */
.band { background: var(--lake); color: var(--white); position: relative; padding-top: env(safe-area-inset-top); }
.band-inner { max-width: var(--wrap); margin: 0 auto; padding: 18px 18px 6px; }
.wordmark { font: 700 26px/1.1 var(--slab); color: var(--white); text-decoration: none; letter-spacing: -0.2px; }
.lede { margin: 4px 0 0; color: #CFE0E8; font-size: 14.5px; max-width: 34em; }

.strip { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: stretch; gap: 6px; padding: 12px 0 18px 18px; }
.strip-scroll { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-right: 6px; }
.strip-scroll::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; scroll-snap-align: start; min-width: 58px; padding: 7px 8px 6px; border: 0; border-radius: 10px;
  background: transparent; color: #D9E7EE; cursor: pointer; text-align: center; line-height: 1.1;
}
.day .dow { display: block; font-size: 12.5px; }
.day .num { display: block; font: 700 24px/1.1 var(--slab); color: var(--white); }
.day.weekend-day .dow { color: #F2D29B; }
.day.wknd { min-width: 84px; }
.day.wknd .num { font-size: 17px; padding-top: 5px; }
.day[aria-pressed="true"] { background: var(--white); color: var(--stone); box-shadow: inset 0 -4px 0 var(--maple); }
.day[aria-pressed="true"] .num { color: var(--lake); }
.strip-more { position: relative; flex: 0 0 auto; align-self: center; margin-right: 18px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.strip-more input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ridge { display: block; width: 100%; height: 34px; margin-bottom: -1px; }
.ridge path { fill: var(--paper); }

/* ---------- quiet controls ---------- */
.controls { max-width: var(--wrap); margin: 0 auto; padding: 4px 18px 0; }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.zip input { width: 7.2em; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--white); min-height: 42px; }
.zip input::placeholder { color: #8A949C; }
.seg { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 8px; background: var(--white); overflow: hidden; }
.seg button { border: 0; background: none; padding: 9px 12px; min-height: 40px; cursor: pointer; font-variant-numeric: tabular-nums; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--lake); color: var(--white); }
.seg-unit { padding: 0 10px; color: var(--stone); font-size: 14px; border-left: 1px solid var(--rule); align-self: stretch; display: flex; align-items: center; }
.text-btn { border: 0; background: none; color: var(--lake); padding: 6px 2px; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.where-msg { margin: 8px 0 0; color: var(--stone); font-size: 14px; min-height: 1.5em; }

.viewbar { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--rule); margin-top: 10px; }
.tabs { display: flex; gap: 22px; }
.tabs button { border: 0; background: none; padding: 10px 0; font-weight: 600; color: var(--stone); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--lake); }
.filters-btn { margin-bottom: 6px; }
#filterCount:not(:empty)::before { content: " ("; } #filterCount:not(:empty)::after { content: ")"; }

.filters { padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
.filters fieldset { border: 0; padding: 0; margin: 12px 0 0; }
.filters legend { font: 600 17px/1.3 var(--slab); padding: 0; margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; }
.check input { width: 18px; height: 18px; accent-color: var(--lake); }

/* ---------- results: a timetable, not a card grid ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 4px 18px 28px; }
.count { color: var(--stone); font-size: 14px; margin: 14px 0 0; }
.day-head { font: 700 21px/1.25 var(--slab); margin: 22px 0 2px; }
.part-head { font: 600 17px/1.3 var(--slab); color: var(--lake); margin: 18px 0 0; }
.part-head small { font: 400 13.5px var(--sans); color: var(--stone); margin-left: 6px; }

.item {
  display: grid; grid-template-columns: 5.6em 1fr; gap: 0 14px; width: 100%; text-align: left;
  padding: 13px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; cursor: pointer;
}
.item:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.when { font: 700 17px/1.2 var(--slab); color: var(--lake); font-variant-numeric: tabular-nums; }
.when small { display: block; font: 400 13px/1.35 var(--sans); color: var(--stone); margin-top: 2px; }
.t { font-weight: 650; font-size: 16.5px; line-height: 1.3; margin: 0; }
.sub { margin: 3px 0 0; color: var(--stone); font-size: 14.5px; }
.free { color: var(--sage); font-weight: 650; }

.empty { padding: 34px 0; }
.empty p { margin: 0 0 12px; font-size: 17px; }
.map-note { padding: 28px 0; color: var(--stone); }
.map-box { height: 62vh; min-height: 360px; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin-top: 12px; }
.here-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--lake); border: 3px solid var(--white); box-shadow: 0 0 0 2px rgba(30, 79, 107, .35); }

/* ---------- signup ---------- */
.signup { max-width: var(--wrap); margin: 6px auto 0; padding: 18px; border-top: 4px solid var(--maple); background: var(--white); }
.signup p { margin: 0; }
.signup-actions { margin-top: 12px !important; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--lake); color: var(--white); text-decoration: none; padding: 11px 16px; border-radius: 8px; font-weight: 650; }

/* ---------- event sheet (motion only answers the tap) ---------- */
.sheet { position: fixed; inset: 0; background: rgba(20, 58, 79, .42); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet[hidden] { display: none; }
.sheet-card { background: var(--white); width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 22px 20px calc(26px + env(safe-area-inset-bottom)); animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-card h2 { font: 700 24px/1.2 var(--slab); margin: 0 34px 14px 0; }
.facts { display: grid; grid-template-columns: 5.2em 1fr; gap: 6px 12px; margin: 0 0 14px; }
.facts dt { color: var(--stone); font-size: 14px; padding-top: 1px; }
.facts dd { margin: 0; }
.blurb { margin: 0 0 6px; }
.does { color: var(--stone); font-size: 14.5px; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.actions a, .actions button { border: 1px solid var(--rule); background: var(--white); border-radius: 8px; padding: 10px 14px; font-weight: 650; color: var(--ink); text-decoration: none; cursor: pointer; }
.actions .primary { background: var(--lake); border-color: var(--lake); color: var(--white); }
.fine { font-size: 14px; color: var(--stone); margin: 6px 0 0; }
.fine a { color: var(--stone); }
.close { position: absolute; right: 14px; top: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--stone); padding: 4px 8px; }
.sheet-card { position: relative; }

footer { max-width: var(--wrap); margin: 0 auto; padding: 20px 18px 34px; color: var(--stone); font-size: 13.5px; }
footer a { color: var(--stone); }

@media (min-width: 760px) {
  .sheet { align-items: center; }
  .sheet-card { border-radius: 16px; }
  .strip { padding-left: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- v2 additions: who's coming, quick toggles, status, saved ---------- */
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.who-label { font: 600 17px/1.3 var(--slab); }
.toggles { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.toggle { border: 1px solid var(--rule); background: var(--white); border-radius: 8px; padding: 8px 12px; min-height: 40px; cursor: pointer; }
.toggle[aria-pressed="true"] { border-color: var(--lake); background: #E8F0F4; color: var(--lake); font-weight: 650; }
.toggle[aria-pressed="true"]::before { content: "✓ "; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 2px; }
.quick .text-btn { margin-left: auto; }
.what { display: block; }
.status { display: block; font-size: 13.5px; font-weight: 650; color: var(--sage); margin: 0 0 2px; }
.t, .sub { display: block; }
.tags { white-space: nowrap; }
.tags > span + span { margin-left: 8px; }
.tix { color: var(--ink); }
.saved-tag { color: var(--lake); font-weight: 650; }
.tips { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--stone); }
.plan-actions { margin: 20px 0 0; }
.plan-actions .btn { border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.sheet-card .status { margin-bottom: 4px; }
#saveBtn[aria-pressed="true"] { border-color: var(--lake); color: var(--lake); }

/* ---------- This weekend: side by side when there's room, stacked otherwise ---------- */
.days { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
@media (min-width: 700px) {
  .days.two { grid-template-columns: 1fr 1fr; }
  /* Schedule: heading, drop-in row and time grid share rows, so the hours line up across days */
  .days.two.sched { grid-template-rows: auto auto auto; }
  .days.two.sched > .day-col { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
}
.days .day-col { min-width: 0; }
.none { color: var(--stone); margin: 10px 0 0; }

/* ---------- Schedule: calendar Day view. Block height = how long it runs. ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--stone); font-size: 13px; margin: 8px 0 0; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .key { width: 12px; height: 12px; border-radius: 3px; background: #E2ECF1; border-left: 3px solid var(--lake); }
.legend .key.is-free { background: #E5EEE2; border-left-color: var(--sage); }
.legend .key.no-end { background: linear-gradient(#E2ECF1 40%, transparent); }

.banners { margin: 12px 0 4px; }
.banners-head { font: 600 15px/1.3 var(--slab); color: var(--lake); margin: 0 0 6px; }
.banner {
  display: block; width: 100%; text-align: left; margin: 0 0 4px; padding: 6px 10px; cursor: pointer;
  background: #E2ECF1; border: 0; border-left: 3px solid var(--lake); border-radius: 6px; color: var(--ink); font: inherit;
}
.banner.is-free { background: #E5EEE2; border-left-color: var(--sage); }
.banner .bn { font-weight: 650; font-size: 14.5px; }
.banner .bt { font-size: 13px; color: var(--stone); }
.banner:hover .bn, .blk:hover .bn { text-decoration: underline; text-underline-offset: 2px; }

.grid { --hour: 52px; --axis: 50px; position: relative; height: calc(var(--hours) * var(--hour)); margin: 16px 0 8px; }
.hr { position: absolute; left: var(--axis); right: 0; top: calc(var(--s) * var(--hour)); border-top: 1px solid var(--rule); }
.hr span { position: absolute; right: calc(100% + 8px); top: -.68em; white-space: nowrap; font-size: 12px; color: var(--stone); font-variant-numeric: tabular-nums; }
.lane { position: absolute; left: var(--axis); right: 0; top: 0; bottom: 0; }
.blk {
  position: absolute; box-sizing: border-box; overflow: hidden; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
  top: calc(var(--s) * var(--hour) + 1px); height: calc(var(--d) * var(--hour) - 2px);
  left: calc(var(--c) * 100% / var(--n)); width: calc(100% / var(--n) - 3px);
  padding: 3px 7px; border: 0; border-left: 3px solid var(--lake); border-radius: 6px; background: #E2ECF1;
  display: flex; flex-direction: column; gap: 1px; line-height: 1.25;
}
.blk.is-free { background: #E5EEE2; border-left-color: var(--sage); }
.blk.no-end { background: linear-gradient(#E2ECF1 55%, rgba(226, 236, 241, 0)); }
.blk.is-free.no-end { background: linear-gradient(#E5EEE2 55%, rgba(229, 238, 226, 0)); }
.blk.is-saved { box-shadow: inset 0 0 0 1.5px var(--lake); }
.blk .bt { font-size: 12px; color: var(--stone); font-variant-numeric: tabular-nums; }
.blk .bn { font-weight: 650; font-size: 14px; }
.blk .bc { font-size: 12.5px; color: var(--stone); }
.blk.short { flex-direction: row; align-items: baseline; gap: 6px; white-space: nowrap; padding-top: 2px; }
.blk.short .bc { display: none; }
.blk:focus-visible, .banner:focus-visible { outline: 2px solid var(--maple); outline-offset: 1px; z-index: 2; }

.now { position: absolute; left: 0; right: 0; top: calc(var(--s) * var(--hour)); height: 0; pointer-events: none; z-index: 3; }
.now::after { content: ""; position: absolute; left: var(--axis); right: 0; top: -1px; border-top: 2px solid #C8402E; }
.now::before { content: ""; position: absolute; left: calc(var(--axis) - 5px); top: -5px; width: 10px; height: 10px; border-radius: 50%; background: #C8402E; }
.now span { position: absolute; left: 0; width: calc(var(--axis) - 8px); top: -.7em; text-align: right; font-size: 11.5px; font-weight: 700; color: #C8402E; background: var(--paper); font-variant-numeric: tabular-nums; }
@media (min-width: 700px) { .grid { --hour: 56px; } }
