/* ============================================================
   WEEKEND TRANSIT AUTHORITY
   A metro system for your weekend: days are lines, events are
   stops, saving a plan is punching a ticket.
   ============================================================ */

@font-face {
  font-family: "Work Sans";
  src: url("/artifacts/weekend-discovery--v1--s4-whacky--glm-5.3--ui-ux-pro-max--2026-09-19T02-32-26-706Z/assets/work-sans.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/artifacts/weekend-discovery--v1--s4-whacky--glm-5.3--ui-ux-pro-max--2026-09-19T02-32-26-706Z/assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff7ed;
  --ink: #14142b;
  --ink-soft: #4b4b63;
  --card: #ffffff;
  --line-sat: #ea580c;   /* Saturday line */
  --line-sun: #1d4ed8;   /* Sunday line */
  --primary: #ea580c;
  --primary-ink: #ffffff;
  --hairline: #14142b;
  --cat-art: #a21caf;
  --cat-film: #1d4ed8;
  --cat-food: #b45309;
  --cat-literature: #6d28d9;
  --cat-music: #be123c;
  --cat-outdoors: #15803d;
  --cat-walks: #0f766e;
  --radius: 14px;
  --focus: 3px;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(rgba(20, 20, 43, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 43, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ---------- focus & skip link ---------- */

:focus-visible {
  outline: var(--focus) solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}
.masthead :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top 160ms ease;
}
.skip-link:focus { top: 0; }

/* ---------- masthead (station sign) ---------- */

.masthead {
  background: var(--ink);
  color: #fff;
  border-bottom: 6px solid var(--primary);
}
.masthead-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.roundel { width: 52px; height: 52px; flex: none; color: #fff; }
.brand-words h1 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}
.brand-sub {
  margin: 2px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd9bd;
}
.wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.wallet strong { color: #ffb987; }

/* ---------- planner panel (ticket machine) ---------- */

.planner {
  max-width: 1120px;
  margin: 22px auto 0;
  padding: 0 20px;
}
.planner-inner {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(20, 20, 43, 0.9);
  display: grid;
  grid-template-columns: 1.6fr 1.2fr auto;
  gap: 18px 22px;
  padding: 18px 20px;
}
.control { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.control-label { font-size: 0; }
#saved-filter { align-self: end; }

button { cursor: pointer; }

label, .control-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

input[type="search"], select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
}
input[type="search"]::placeholder { color: var(--ink-soft); }

.toggle {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.toggle::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  flex: none;
}
.toggle[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.toggle[aria-pressed="true"]::before {
  background: var(--primary);
  border-color: #fff;
}
.toggle:hover { transform: translateY(-1px); }

.board {
  margin: 10px 2px 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- timetable (the route) ---------- */

.timetable {
  max-width: 1120px;
  margin: 26px auto 40px;
  padding: 0 20px;
}

.line-section { margin-bottom: 44px; }

.line-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 3px solid var(--ink);
  border-left: 14px solid var(--line-color, var(--line-sat));
  border-radius: 12px;
  background: var(--card);
  padding: 16px 18px;
  box-shadow: 6px 6px 0 rgba(20, 20, 43, 0.9);
}
.line-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.line-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line-color, var(--line-sat));
}
.line-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.line-blurb {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* mini route map */
.mini-map {
  list-style: none;
  margin: 6px 0 0;
  padding: 10px 4px 2px;
  position: relative;
  display: flex;
  min-height: 40px;
}
.mini-map::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 5px;
  transform: translateY(-50%);
  background: var(--line-color, var(--line-sat));
  border-radius: 3px;
}
.mini-map li { position: absolute; top: 0; height: 100%; }
.mini-stop {
  position: relative;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--cat-color, var(--ink));
  cursor: pointer;
  padding: 0;
  transition: transform 140ms ease;
}
/* expand the touch target to 44px without changing the visual dot */
.mini-stop::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
}
.mini-stop:hover { transform: translateX(-50%) scale(1.18); }
.mini-stop.punched {
  background:
    radial-gradient(circle at center, var(--bg) 0 3px, transparent 3px),
    var(--cat-color, var(--ink));
}

/* stops list */
.stops {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  position: relative;
}
.stop {
  display: grid;
  grid-template-columns: 92px 44px minmax(0, 1fr);
  gap: 0 4px;
}
.stop-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
  padding: 20px 10px 0 0;
  white-space: nowrap;
}
.stop-time .day-flag {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--line-color, var(--ink));
}
.stop-spine { position: relative; }
.stop-spine::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 5px;
  transform: translateX(-50%);
  background: var(--line-color, var(--line-sat));
}
/* disc center sits 34px from the top of each stop; trim the spine there */
.stop:first-child .stop-spine::before { top: 34px; border-radius: 3px 3px 0 0; }
.stop:only-child .stop-spine::before { top: 34px; bottom: calc(100% - 34px); border-radius: 3px; }
.stop:last-child .stop-spine::before { bottom: calc(100% - 34px); border-radius: 0 0 3px 3px; }
.stop-disc {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--cat-color, var(--ink));
  z-index: 1;
}
.stop.punched .stop-disc {
  background:
    radial-gradient(circle at center, var(--bg) 0 3px, transparent 3px),
    var(--cat-color, var(--ink));
}

.stop-card {
  position: relative;
  margin: 14px 0 18px;
  padding: 16px 18px 16px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(20, 20, 43, 0.85);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.stop-card:hover { transform: translate(-1px, -2px); box-shadow: 7px 7px 0 rgba(20, 20, 43, 0.85); }
.stop-card.punched { border-style: dashed; }

.stop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.cat-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--cat-color, var(--ink));
  flex: none;
}
.stop-card h3 { margin: 0 0 4px; font-size: 1.18rem; font-weight: 700; line-height: 1.25; }
.stop-venue { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.stop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
}
.chip {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--bg);
}
.chip.chip-free { background: var(--ink); color: #fff; }
.stop-actions { margin: 14px 0 0; }

.btn-open {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--cat-color, var(--ink));
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-open:hover { transform: translate(-1px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn-open:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

.punched-tag {
  position: absolute;
  top: -12px;
  right: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  transform: rotate(3deg);
}

/* ---------- empty state ---------- */

.empty {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  padding: 34px 26px;
}
.empty-code {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  margin: 0 0 10px;
  color: #c2410c;
}
.empty h2 { margin: 0 0 6px; font-size: 1.4rem; }
.empty p { margin: 0 0 18px; color: var(--ink-soft); }
.btn-primary {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 11px 18px;
  min-height: 44px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--primary);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.btn-primary:hover { transform: translate(-1px, -2px); box-shadow: 6px 6px 0 var(--primary); }

/* ---------- ticket dialog ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 43, 0.62);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 5vh 16px 5vh;
}
.ticket {
  width: min(680px, 100%);
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 10px 10px 0 rgba(20, 20, 43, 0.95);
  position: relative;
  margin: 20px 0;
  animation: ticket-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes ticket-in {
  from { opacity: 0; transform: translateY(26px) rotate(-1.2deg) scale(0.96); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
.ticket-band {
  background: var(--cat-color, var(--ink));
  color: #fff;
  border-radius: 14px 14px 0 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 3px solid var(--ink);
}
.ticket-band-route {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ticket-close {
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  transition: transform 140ms ease;
}
.ticket-close:hover { transform: translateY(-1px); }

.ticket-body { padding: 22px 24px 6px; position: relative; }
.ticket-eyebrow {
  margin: 0 0 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cat-color, var(--ink));
}
.ticket-title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.ticket-copy p { margin: 0 0 12px; line-height: 1.6; }

.ticket-grid {
  margin: 18px 0 0;
  padding: 16px 0 4px;
  border-top: 3px dashed var(--ink);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
}
.ticket-grid dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 2px;
}
.ticket-grid dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.ticket-access {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 0.9rem;
}
.ticket-access strong {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ticket-actions { margin: 20px 0 18px; }
.btn-punch {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 13px 22px 13px 16px;
  min-height: 52px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 4px 4px 0 var(--cat-color, var(--primary));
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.btn-punch:hover { transform: translate(-1px, -2px); box-shadow: 6px 6px 0 var(--cat-color, var(--primary)); }
.btn-punch[aria-pressed="true"] { background: var(--cat-color, var(--ink)); }
.punch-hole {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: transparent;
  flex: none;
}
.btn-punch[aria-pressed="true"] .punch-hole { background: var(--bg); border-style: dashed; }

.ticket-stamp {
  position: absolute;
  top: 14px;
  right: 22px;
  transform: rotate(8deg);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cat-color, var(--ink));
  border: 3px solid currentColor;
  border-radius: 8px;
  padding: 5px 10px;
  animation: stamp-in 200ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(8deg) scale(1.6); }
  to { opacity: 1; transform: rotate(8deg) scale(1); }
}

.ticket-tear {
  border-top: 3px dashed var(--ink);
  margin: 8px 0 0;
  position: relative;
}
.ticket-tear::before,
.ticket-tear::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--ink);
}
.ticket-tear::before { left: -15px; }
.ticket-tear::after { right: -15px; }

.ticket-stub {
  padding: 14px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 0 0 15px 15px;
}
.barcode {
  height: 44px;
  flex: 1;
  max-width: 320px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 9px, transparent 9px 12px, var(--ink) 12px 13px, transparent 13px 18px, var(--ink) 18px 22px, transparent 22px 24px);
}
.ticket-id {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

/* ---------- colophon ---------- */

.colophon {
  border-top: 3px solid var(--ink);
  background: var(--card);
}
.colophon p {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 20px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .planner-inner { grid-template-columns: 1fr 1fr; }
  .control:last-child { grid-column: 1 / -1; }
  .toggle { justify-content: center; }
}

@media (max-width: 620px) {
  .masthead-inner { padding: 14px 16px 12px; }
  .brand-words h1 { font-size: 1.02rem; }
  .brand-sub { font-size: 0.62rem; }
  .roundel { width: 42px; height: 42px; }
  .wallet { width: 100%; justify-content: center; }
  .planner { margin-top: 14px; padding: 0 14px; }
  .planner-inner { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  #saved-filter { justify-content: center; }
  .timetable { padding: 0 14px; }
  .stop { grid-template-columns: 40px minmax(0, 1fr); }
  .stop-time {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding: 2px 0 0 8px;
    display: flex;
    gap: 10px;
    align-items: baseline;
  }
  .stop-time .day-flag { display: inline; }
  .stop-spine { grid-column: 1; grid-row: 1 / span 2; }
  .stop-card { grid-column: 2; margin-top: 8px; }
  .stop-disc { top: 12px; width: 20px; height: 20px; }
  .stop:first-child .stop-spine::before { top: 22px; }
  .stop:only-child .stop-spine::before { top: 22px; bottom: calc(100% - 22px); }
  .stop:last-child .stop-spine::before { bottom: calc(100% - 22px); }
  .ticket-grid { grid-template-columns: 1fr 1fr; }
  .ticket-stub { flex-direction: column; align-items: flex-start; gap: 8px; }
  .barcode { max-width: 100%; width: 100%; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .skip-link { transition: none; }
}
