/* Self-hosted fonts (SIL Open Font License; license texts in /fonts/). Latin subset only;
   characters outside it (e.g. the arrows) fall back to the system font, as they did before. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/fraunces-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/fraunces-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark; /* native controls (date picker, scrollbars) render dark to match the dark-only site */
  --bg: #121212;
  --surface: #1E1E1E;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text-primary: #E5E5E5;
  --text-title: #A8AEB8;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --blue: #0092CE;
  --blue-light: #4DB8E8;
  --blue-hover: #007FB3;
  /* Weather line-icon tints; text stays gray */
  --tint-none: #E2574C;
  --tint-sun: #F3D04D;
  --tint-weather: #8FA3B8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

a { color: var(--blue-light); }

/* Header / nav */
header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 20px;
}
.site-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-logo { width: 28px; height: 28px; flex-shrink: 0; }
nav.site-nav { display: flex; gap: 20px; font-size: 13px; }
nav.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}
nav.site-nav a.active { color: var(--blue-light); font-weight: 600; }

/* Footer */
footer.site-footer {
  margin-top: 32px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
footer.site-footer a { color: var(--text-primary); text-decoration: none; }
footer.site-footer a.active { color: var(--blue-light); font-weight: 600; }
footer.site-footer a:hover { text-decoration: underline; }

/* Page title row + Upcoming/Past toggle */
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.page-title { font-size: 16px; font-weight: 600; color: var(--text-title); margin: 0; }

.title-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.segmented button {
  padding: 6px 14px; font-size: 12px; cursor: pointer; background: transparent;
  color: var(--text-secondary); border: none; font-family: 'Inter', sans-serif;
}
.segmented button.active { background: var(--blue); color: #fff; }
.segmented button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--blue-light);
}
.segmented[hidden] { display: none; }
/* The two toggle pills wrap to a new line together, never one by one */
.pill-group { display: flex; gap: 8px; flex-wrap: nowrap; }

/* Filters */
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 120px; display: flex; }
.search-wrap input[type="text"] {
  width: 100%; box-sizing: border-box; padding-right: 30px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding-top: 7px; padding-bottom: 7px; padding-left: 10px;
  font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text-primary);
}
.clear-search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--text-muted); font-size: 18px; line-height: 1;
  user-select: none;
}
.clear-search-btn:hover { color: var(--text-primary); }
.filters input[type="date"] {
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 7px 10px; font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text-primary);
}
.filters input:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue-light); outline-offset: 2px;
}

/* Owner-only ?check banner (see js/site.js) */
.check-banner {
  margin: 0 0 12px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 6px;
  background: var(--surface); font-size: 12px; line-height: 1.5; color: var(--text-secondary);
}
.check-banner p { margin: 0; }
.check-banner p + p { margin-top: 2px; }
.check-banner .check-head { color: var(--text-primary); }

.chip-row { margin-bottom: 16px; }
.chip {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px;
  cursor: pointer; border: 1px solid var(--border-strong); color: #D1D5DB;
  background: transparent; margin: 0 6px 6px 0; user-select: none;
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.freshness-tag {
  font-family: 'SF Mono', monospace; font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,0.05); padding: 3px 8px; border-radius: 4px;
}

/* Table (desktop) */
table.events-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
table.events-table th {
  text-align: left; padding: 8px 6px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; user-select: none; border-bottom: 2px solid var(--blue);
}
table.events-table th.active-sort { color: var(--blue-light); }
table.events-table th .arrow { display: inline-block; font-size: 10px; opacity: 0.35; transition: transform 150ms ease, opacity 150ms ease; }
table.events-table th.active-sort .arrow { opacity: 1; }
table.events-table td { padding: 11px 6px 12px; border-bottom: 0.5px solid var(--border); vertical-align: top; }
table.events-table tr.event-row { transition: background 120ms ease; }
table.events-table tr.event-row:hover { background: rgba(255,255,255,0.05); }
table.events-table .date-note { display: block; }
.time-line { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.various-times { font-size: 11px; color: var(--text-muted); margin-top: 1px; cursor: pointer; display: flex; width: fit-content; align-items: center; gap: 3px; transition: color 100ms ease; }
.various-times:hover { color: var(--text-secondary); }
.various-times .chevron { display: inline-block; font-size: 9px; transition: transform 150ms ease; }
.daily-schedule { font-size: 12px; color: #C4C9D1; line-height: 1.7; padding-top: 6px; }

.weather-line { display: flex; align-items: flex-start; gap: 6px; }
.traffic-detail { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.line-body { min-width: 0; }
.line-icon { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 3px; }
.icon-wx-none { color: var(--tint-none); }
.icon-wx { color: var(--tint-weather); }
.icon-wx-sun, .icon-wx-partly .wx-sun { color: var(--tint-sun); }

/* Weather lines: hidden until the Weather pill is on */
.weather-detail { display: none; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
body.weather-on .weather-detail { display: block; }
.weather-line + .weather-line { margin-top: 1px; }
.weather-credit { margin: 14px 0 0; font-size: 12px; color: var(--text-muted); }
.weather-credit[hidden] { display: none; }
.weather-credit a { color: var(--text-secondary); }
.traffic-detail a { white-space: nowrap; text-decoration: none; }
.traffic-detail a:hover { text-decoration: underline; }
body.traffic-off .traffic-detail { display: none; }

.info-link { color: var(--blue-light); }

/* Inline SVG icons: external-link and check are from Tabler Icons (MIT, https://tabler.io/icons) */
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.1em; }
.icon-after { margin-left: 0.28em; }

/* Mobile cards (replace table under 640px) */
.event-cards { display: none; }
.event-card { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.event-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.event-card .card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.event-card .card-date { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.event-card .card-location { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.event-card .traffic-detail { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.event-card .weather-detail { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.event-card .traffic-detail + .weather-detail { margin-top: 6px; padding-top: 0; border-top: none; }
body.traffic-off .event-card .traffic-detail + .weather-detail { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.freeze-out { width: 100%; margin-top: 8px; padding: 8px; font-family: 'SF Mono', monospace; font-size: 11px; line-height: 1.5; color: var(--text-primary); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 6px; resize: vertical; }
.sort-row { display: none; align-items: center; gap: 8px; margin-bottom: 10px; }
.sort-row select { border: 1px solid var(--border-strong); border-radius: 6px; padding: 5px 8px; font-family: inherit; font-size: 12px; background: var(--surface); color: var(--text-primary); }
.sort-row .sort-dir { cursor: pointer; color: var(--blue-light); font-size: 18px; display: inline-block; transition: transform 150ms ease; }
.sort-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

/* Narrow desktop: use the same stacked title row as mobile (title on top; Traffic/Weather left, Upcoming/Past right).
   Set above the width where the one-line version would wrap, so there's no in-between state even with a wider font. */
@media (max-width: 820px) {
  .page-title-row { flex-direction: column; align-items: flex-start; }
  .title-controls { width: 100%; justify-content: space-between; }
}

@media (max-width: 640px) {
  header.site-header .site-name { font-size: 15px; }
  header.site-header .site-logo { width: 23px; height: 23px; }
  table.events-table { display: none; }
  .sort-row { display: flex; }
  .event-cards { display: block; }
  .filters #from-date, .filters #to-date { min-width: 0; }
}

/* Forms (Contact page) */
.field-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.field-label .hint { color: var(--text-muted); }
.form-input {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 8px 10px; font-family: 'Inter', sans-serif; font-size: 13px;
  background: var(--surface); color: var(--text-primary); box-sizing: border-box;
}
.form-input::placeholder { color: var(--text-muted); }
.submit-btn {
  width: 100%; border: none; border-radius: 6px; padding: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  background: var(--blue); color: #fff; cursor: pointer; transition: background 120ms ease;
}
.submit-btn:hover { background: var(--blue-hover); }

/* FAQ sections */
.faq-section { margin-bottom: 26px; }
.faq-heading { font-size: 15px; font-weight: 600; margin: 0 0 10px; color: var(--text-primary); }
.faq-body { font-size: 14px; line-height: 1.6; color: #D1D5DB; margin: 0; }

/* Honeypot field - hidden from real users, visible to bots that fill every field */
.hp-field { position: absolute; left: -9999px; top: -9999px; }
