@font-face {
  font-family: Archivo;
  src: url('/assets/home/archivo-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/home/jetbrains-mono-variable.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Shared tokens: change the design here before adding component overrides. */
:root {
  color-scheme: light dark;
  --paper: #f2f0e9;
  --paper-warm: #ebe7dc;
  --paper-bright: #faf8f3;
  --ink: #151513;
  --accent: #ed4317;
  --accent-ink: #b92d08;
  --cta-bg: #b92d08;
  --cta-bg-hover: #942205;
  --cta-ink: #ffffff;
  --accent-on-active: #ff764e;
  --muted: #55534c;
  --line: #15151333;
  --hover: #e9e6dc;
  --shadow-menu: #15151324;
  --backdrop: #1515138c;
  --promo-bg: #151513;
  --promo-ink: #f2f0e9;
  --promo-border: #f2f0e955;
  --promo-hover: #f2f0e918;
  --selection-bg: #b92d08;
  --selection-ink: #ffffff;
  --gutter: clamp(16px, 4vw, 48px);
  --mono: 'JetBrains Mono', monospace;
  font-family: Archivo, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513;
    --paper-warm: #1f1d1a;
    --paper-bright: #22201d;
    --ink: #f2f0e9;
    --accent: #ff6b42;
    --accent-ink: #ff8562;
    --cta-bg: #ff6b42;
    --cta-bg-hover: #ff8562;
    --cta-ink: #161513;
    --accent-on-active: #b92d08;
    --muted: #b5b1a6;
    --line: #f2f0e938;
    --hover: #2b2925;
    --shadow-menu: #00000073;
    --backdrop: #000000a6;
    --promo-bg: #0e0d0c;
    --promo-ink: #f2f0e9;
    --promo-border: #f2f0e94d;
    --promo-hover: #f2f0e91a;
    --selection-bg: #ff8562;
    --selection-ink: #161513;
  }
}

* { box-sizing: border-box; }
::selection { background: var(--selection-bg); color: var(--selection-ink); }
input, textarea { caret-color: var(--accent-ink); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button:hover, a:hover { text-decoration-thickness: 2px; }
svg { width: 24px; height: 24px; flex-shrink: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 20; padding: 12px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 10px; }

/* Header and editorial opening. */
.site-header { padding: 14px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; border-bottom: 1px solid var(--ink); }
.wordmark { font-weight: 800; font-size: 24px; letter-spacing: -.03em; font-stretch: 90%; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.town-label { display: flex; align-items: center; gap: 6px; min-height: 36px; border: 1px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.town-switcher { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.town-link { display: flex; align-items: center; min-height: 36px; border: 1px solid transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.town-link:hover, .town-link:focus-visible { border-color: var(--ink); color: var(--ink); }
.town-label > span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero { padding: clamp(24px, 3vw, 36px) var(--gutter) clamp(24px, 3vw, 36px); }
.hero h1 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(56px, 11vw, 168px); line-height: .84; letter-spacing: -.02em; }
.hero h1 span { color: var(--accent); }
.town-hero { padding: clamp(14px, 1.8vw, 22px) var(--gutter) clamp(10px, 1.2vw, 14px); }
.town-hero h1 { font-size: clamp(32px, 4.4vw, 58px); line-height: .94; }

/* Categories wrap into rows. home.js hides every row after the first until "See more" is pressed. */
.category-panel { padding: 2px var(--gutter) 0; margin-bottom: 16px; }
.category-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(100px, 12vw, 150px), 1fr)); gap: 10px; }
.category-more { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 6px; padding: 6px 2px; border: 0; background: none; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.category-more::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 2px; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.category-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.category-tile { min-width: 0; height: clamp(56px, 5vw, 62px); border: 1px solid var(--ink); border-radius: 14px; padding: 7px 11px; display: flex; flex-direction: column; justify-content: space-between; gap: 3px; transition: background .15s; }
.category-tile:hover { background: var(--hover); }
.category-tile.active { background: var(--ink); color: var(--paper); }
.category-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.category-top svg { width: 20px; height: 20px; }
.category-tile.active svg { color: var(--accent-on-active); }
.category-count { font: 12px var(--mono); opacity: .8; }
.category-label { font-size: 13px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Native links and forms are the source of truth for filters and pagination. */
.listings { padding: 0 var(--gutter) 72px; scroll-margin-top: 12px; }
.filter-bar { position: sticky; top: 0; z-index: 2; background: var(--paper); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.date-selector { position: relative; min-width: 0; }
.date-selector-button { display: flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; background: var(--ink); color: var(--paper); list-style: none; }
.date-selector-button > span:first-of-type { overflow-wrap: anywhere; }
.date-selector-button svg { width: 20px; height: 20px; }
.date-selector summary::-webkit-details-marker { display: none; }
.date-menu { position: absolute; top: calc(100% + 8px); left: 0; width: min(360px, calc(100vw - 32px)); max-height: 65vh; overflow: auto; z-index: 5; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); padding: 8px; box-shadow: 0 12px 40px var(--shadow-menu); }
.date-options { display: grid; }
.date-options a, .date-picker > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 12px 16px; border-radius: 12px; font-size: 15px; cursor: pointer; }
.date-options a[aria-current] { color: var(--accent-ink); font-weight: 700; }
.date-options a:hover, .date-picker > summary:hover { background: var(--hover); }
.home-search { display: flex; margin-left: auto; max-width: 260px; min-width: 150px; flex: 1; border: 1px solid var(--ink); border-radius: 999px; }
.home-search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 10px 4px 10px 14px; border-radius: inherit; font-size: 14px; }
.search-button { display: grid; place-items: center; border: 0; background: transparent; width: 44px; min-height: 44px; flex-shrink: 0; border-radius: 50%; }
.search-button svg { width: 18px; height: 18px; }
.date-picker > summary { list-style: none; }
.date-range { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px 8px; }
.date-range label { display: grid; gap: 6px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.date-range input { font: 600 15px Archivo, sans-serif; background: transparent; border: 1px solid var(--ink); border-radius: 12px; padding: 10px 12px; min-height: 44px; min-width: 150px; }
.date-help { flex-basis: 100%; font-size: 12px; color: var(--muted); line-height: 1.5; }
.pill-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); border-radius: 999px; padding: 12px 18px; min-height: 44px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; text-align: center; }
.pill-button:hover { text-decoration: underline; }
.pill-button.secondary { background: transparent; color: var(--ink); }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; padding-top: 12px; color: var(--muted); }

/* Compact chronological event lists. */
.day-group { margin-top: 22px; }
.day-group:first-of-type { margin-top: 16px; }
.day-group h3 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(26px, 3vw, 36px); line-height: 1; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.event-list { list-style: none; padding: 0; margin: 0; }
.event-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.event-row:hover { background: var(--hover); }
.event-open { display: grid; grid-template-columns: clamp(52px, 6vw, 76px) minmax(0, 1fr) 24px; align-items: center; gap: clamp(12px, 2vw, 28px); padding: 13px 0; min-width: 0; flex: 1; }
.event-time { font: 500 14px/1.5 var(--mono); }
.event-time abbr { font-size: 12px; text-decoration: none; }
.event-copy { display: grid; gap: 4px; min-width: 0; }
.event-title { font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; text-wrap: pretty; }
.event-meta { font-size: 14px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.event-series { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.event-arrow { display: flex; opacity: 0; }
.event-open:hover .event-arrow, .event-open:focus-visible .event-arrow { opacity: 1; }
.empty-state { padding: 48px 0; display: grid; justify-items: start; gap: 16px; }
.empty-state h2 { font-size: 24px; }
.empty-state p { color: var(--muted); line-height: 1.6; }
.error-state { padding: 72px var(--gutter); }
.home-pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 36px; flex-wrap: wrap; font: 12px var(--mono); }
.site-footer { background: var(--promo-bg); color: var(--promo-ink); border-top: 1px solid var(--line); padding: 22px var(--gutter); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.site-footer .wordmark { font-size: 18px; }

/* Native dialog supplies focus trapping, Escape and focus restoration. */
html:has(dialog[open]) { overflow: hidden; }
.home-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--ink); border-radius: 20px; background: var(--paper); color: var(--ink); }
.home-dialog::backdrop { background: var(--backdrop); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid var(--ink); }
.dialog-header h2 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(36px, 6vw, 48px); line-height: .95; overflow-wrap: anywhere; }
.dialog-close { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; font-size: 28px; line-height: 1; }
.dialog-content { padding: 20px 24px 24px; display: grid; gap: 18px; }
.dialog-content p { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.dialog-content .detail-category { font: 12px var(--mono); text-transform: uppercase; color: var(--muted); }
.dialog-content .detail-when, .dialog-content .detail-venue { font-size: 15px; font-weight: 600; }
.home-description { white-space: pre-wrap; }
.detail-page-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.detail-page-links a { display: flex; align-items: center; justify-content: center; text-align: center; background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 12px 8px; min-height: 48px; font-size: 16px; font-weight: 700; }
.detail-page-links a:hover { text-decoration: underline; }
.dialog-content .detail-note { font-size: 12px; color: var(--muted); }
.dialog-content .detail-heading { font: 12px var(--mono); text-transform: uppercase; color: var(--muted); margin-bottom: -8px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 0; padding: 0; list-style: none; }
.detail-tags a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.detail-tags a:hover, .detail-tags a:focus-visible { background: var(--ink); color: var(--paper); }
.search-tags strong, .results-heading strong { font-weight: 700; }
.results-heading .clear-tag { margin-left: 6px; font-size: 13px; text-decoration: underline; }
.detail-facts { display: grid; margin: 0; border-top: 1px solid var(--line); }
.detail-facts > div { display: grid; grid-template-columns: minmax(96px, 32%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-facts dt { font: 12px/1.6 var(--mono); text-transform: uppercase; color: var(--muted); }
.detail-facts dd { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-facts a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.detail-facts code { font: 12px var(--mono); }
@media (max-width: 420px) { .detail-facts > div { grid-template-columns: 1fr; gap: 2px; } }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); width: max-content; }
#toast:not(:empty) { background: var(--ink); color: var(--paper); padding: 14px 20px; border-radius: 12px; font-size: 13px; line-height: 1.5; }

@media (max-width: 700px) {
  .site-header { gap: 12px; }
  .wordmark { font-size: 22px; }
  .town-label, .town-link { font-size: 12px; padding: 6px 10px; min-height: 36px; }
  .hero h1 { font-size: clamp(48px, 11vw, 77px); }
  .town-hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .filter-bar { position: relative; top: auto; gap: 12px; }
  .home-search { max-width: none; flex-basis: 100%; }
  .date-selector { max-width: 100%; }
  .date-menu { left: 0; }
  .date-range input { width: 100%; min-width: 0; }
  .date-range label { flex: 1 1 140px; }
  .listings { padding-bottom: 48px; }
  .event-open { grid-template-columns: 52px minmax(0, 1fr); }
  .event-arrow { display: none; }
  .event-time { font-size: 12px; }
  .event-meta { font-size: 12px; }
  .event-series { font-size: 12px; }
  .event-row { gap: 6px; }
  .dialog-header, .dialog-content { padding: 20px; }
}


/* Filtering updates the existing document; the previous results remain visible while loading. */
main[aria-busy="true"] .filter-bar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  opacity: .7;
}
#event-results:focus { outline: none; }

.home-search:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.home-search input:focus-visible { outline: none; }
.home-search button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -3px; background: var(--hover); }

.date-option-meta { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.date-option-count { min-width: 3ch; text-align: right; font: 12px var(--mono); font-variant-numeric: tabular-nums; }

/* A single, predictable clear affordance; the native clear remains for no-JS browsing. */
.home-search[data-enhanced] input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-clear { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; border-radius: 50%; color: var(--muted); }
.search-clear svg { width: 18px; height: 18px; }
.search-clear::after { content: ''; position: absolute; right: 0; top: 11px; bottom: 11px; width: 1px; background: var(--line); }
.search-clear:hover { color: var(--ink); }

/* Place counts ignore the current place selection; the checkbox list scrolls independently. */
.place-selector { position: relative; min-width: 0; max-width: 260px; }
.place-selector-button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.place-selector-button > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-selector-button svg { width: 20px; height: 20px; }
.place-selector summary::-webkit-details-marker { display: none; }
.beta-badge { padding: 1px 6px; border: 1px solid currentColor; border-radius: 999px; font: 600 10px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.venue-selector { position: relative; min-width: 0; max-width: 260px; }
.venue-selector summary::-webkit-details-marker { display: none; }
.venue-selector:has([aria-current][data-venue]:not([data-venue=""])) > summary { background: var(--ink); color: var(--paper); }
.venue-menu .place-help { padding: 8px 16px 4px; }
.place-menu { position: absolute; left: 0; right: auto; top: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); max-height: min(420px, 70dvh); z-index: 5; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 40px var(--shadow-menu); padding: 8px; }
.place-search { display: flex; align-items: center; gap: 8px; margin: 4px 4px 6px; padding: 0 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.place-search[hidden], .place-option[hidden], .place-help[hidden] { display: none; }
.place-search:focus-within { border-color: var(--ink); }
.place-search svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.place-search input { flex: 1; min-width: 0; min-height: 42px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.place-help { padding: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.place-options { min-width: 0; scrollbar-width: thin; border: 0; padding: 0 4px; margin: 0; min-height: 0; max-height: min(240px, 40dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.place-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 8px; cursor: pointer; border-radius: 10px; }
.place-option:hover { background: var(--hover); }
.place-option input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ink); margin: 0; }
.place-option > span:first-of-type { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.place-count { margin-left: auto; padding-left: 8px; font: 12px var(--mono); font-variant-numeric: tabular-nums; }
.place-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px 2px; border-top: 1px solid var(--line); }
.place-actions a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 4px; font-size: 13px; text-decoration: underline; }
@media (max-width: 700px) {
  .place-selector { position: static; max-width: 100%; }
  .venue-selector { position: static; max-width: 100%; }
  .venue-menu { left: var(--gutter); }
  .place-menu { left: var(--gutter); right: auto; width: min(360px, calc(100vw - 2 * var(--gutter))); }
}

/* Spanning seasonal menus and advance booking windows stay separate from daily agendas. */
.period-section { margin-top: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-warm); }
.period-section[open] { padding: 14px 16px 16px; border-color: var(--ink); }
.period-section-header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 28px; cursor: pointer; list-style: none; }
.period-section-header::-webkit-details-marker { display: none; }
.period-section-header:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 8px; }
.period-section-toggle { display: inline-block; margin-left: auto; font-size: 18px; line-height: 1; transition: transform .15s; }
.period-section[open] .period-section-toggle { transform: rotate(180deg); }
.period-section-title { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.period-section-heading { font-weight: 900; font-stretch: 72%; text-transform: uppercase; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.1; letter-spacing: .01em; }
.period-section-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 1px 7px; border: 1px solid var(--ink); border-radius: 999px; font: 600 11px/1.3 var(--mono); background: var(--paper); }
.period-section-note { font-size: 13px; color: var(--muted); line-height: 1.35; flex: 1 1 220px; }
.period-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 12px; }
.period-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; transition: background .15s, border-color .15s; min-width: 0; }
.period-card:hover { background: var(--hover); border-color: var(--ink); }
.period-open { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; height: 100%; min-width: 0; }
.period-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.period-badge { font: 700 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); }
.period-dates { font: 600 12px/1.3 var(--mono); color: var(--ink); white-space: nowrap; }
.period-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; text-wrap: pretty; }
.period-meta { margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }

/* Establishment types and seasonal badges in listings and the event details dialog. */
.venue-type-pill { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; font: 600 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .03em; color: var(--ink); vertical-align: 1px; margin-left: 4px; }
.venue-type-badge { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--ink); border-radius: 999px; font: 600 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); vertical-align: middle; margin-left: 4px; }
.dialog-content .detail-kind { display: inline-flex; align-items: center; width: fit-content; padding: 3px 10px; border: 1px solid var(--accent-ink); border-radius: 999px; font: 700 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); margin-bottom: -8px; }

@media (max-width: 700px) {
  .period-section { padding: 10px 14px; }
  .period-section-note { flex-basis: 100%; order: 3; }
  .period-section-toggle { align-self: flex-start; }
  .period-card-top { flex-wrap: wrap; }
}

/* National landing page & footer links */
.landing-lede { margin: 16px 0 0; max-width: 44ch; font-size: 1.05rem; color: var(--muted); }
.town-directory { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; padding: 0 var(--gutter) 48px; }
.town-card { background: var(--paper-bright); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.town-card h2 { margin: 0; font-size: 1.4rem; }
.town-card h2 a { color: inherit; text-decoration: none; }
.town-card h2 a:hover { color: var(--accent); }
.town-card-count { margin: 0; color: var(--muted); font-size: 0.95rem; }
.town-card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 18px; font-size: 0.9rem; }
.footer-links a { color: var(--promo-ink); opacity: .82; text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { opacity: 1; text-decoration: underline; }

/* Static text pages (e.g. /privacy) */
.event-detail-page { max-width: 780px; margin: 0 auto; padding: 24px var(--gutter) 48px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 500 13px/1.4 var(--mono); color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 2px; color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.event-detail-card { background: var(--paper-bright); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 4vw, 32px); display: flex; flex-direction: column; gap: 14px; }
.event-detail-card h1 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.15; overflow-wrap: anywhere; }
.event-detail-card p { line-height: 1.6; }

/* Standalone event detail page (editorial poster layout) */
.event-page { width: 100%; max-width: 1120px; margin: 0 auto; padding: clamp(16px, 3vw, 28px) var(--gutter) clamp(48px, 6vw, 72px); }
.event-layout { display: grid; gap: 20px; align-items: start; }
.event-main-content { display: grid; gap: 24px; min-width: 0; }

.event-hero { background: var(--paper-bright); border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 2.5vw, 24px); align-items: start; min-width: 0; }
.event-date-stamp { border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--paper); text-align: center; min-width: 96px; flex-shrink: 0; }
.stamp-date { padding: 10px 12px 8px; display: grid; gap: 2px; }
.stamp-weekday { font: 700 11px/1.2 var(--mono); letter-spacing: .08em; color: var(--muted); }
.stamp-day { font-weight: 900; font-stretch: 72%; font-size: 40px; line-height: .9; letter-spacing: -.02em; color: var(--ink); }
.stamp-month { font: 600 11px/1.2 var(--mono); letter-spacing: .05em; color: var(--ink); }
.stamp-time { background: var(--ink); color: var(--paper); padding: 6px 10px; font: 700 12px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; }

.event-hero-body { display: grid; gap: 10px; min-width: 0; }
.event-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.event-category-link { font: 700 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.event-category-link:hover { text-decoration: underline; }
.event-kind-badge { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px solid var(--accent-ink); border-radius: 999px; font: 700 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); }
.event-past-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.event-hero h1 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(32px, 5vw, 54px); line-height: .92; letter-spacing: -.015em; overflow-wrap: anywhere; text-wrap: balance; }
.event-hero-venue { font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.event-hero-address { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.event-hero .detail-tags { margin-top: 4px; }

.event-action-card { background: var(--paper-bright); border: 1.5px solid var(--ink); border-radius: 16px; padding: 20px; display: grid; gap: 16px; min-width: 0; }
.section-kicker { font: 700 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.action-glance { display: grid; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.glance-row { display: grid; gap: 2px; }
.glance-label { font: 600 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.glance-value { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.glance-sub { font-size: 13px; color: var(--muted); }

.event-primary-cta { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-ink); font-size: 16px; font-weight: 700; text-align: center; transition: background .15s; }
.event-primary-cta:hover, .event-primary-cta:focus-visible { background: var(--cta-bg-hover); text-decoration: none; }
.event-utility-actions { display: grid; gap: 8px; }
.event-utility-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; text-align: center; transition: background .15s; }
.event-utility-btn:hover, .event-utility-btn:focus-visible { background: var(--hover); text-decoration: none; }
.action-note { font-size: 12px; line-height: 1.45; color: var(--muted); }

.event-past-notice { background: var(--paper-warm); border: 1px solid var(--ink); border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 1.45; }
.event-body { display: grid; gap: 12px; }
.event-body .home-description { font-size: 16px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.event-sparse-notice { background: var(--paper-warm); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; }
.sparse-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.sparse-copy { font-size: 14px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.sparse-copy a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.event-series-list { display: grid; gap: 10px; }
.event-series-list ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.event-series-list a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper-bright); color: var(--ink); font: 600 13px/1.3 var(--mono); text-decoration: none; transition: background .15s, color .15s; }
.event-series-list a:hover, .event-series-list a:focus-visible { background: var(--ink); color: var(--paper); }

.event-venue-details { display: grid; gap: 10px; }
.inline-maps-link { display: inline-block; margin-left: 6px; font-weight: 600; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.event-discovery { margin-top: clamp(36px, 5vw, 56px); padding-top: clamp(28px, 4vw, 40px); border-top: 2px solid var(--ink); display: grid; gap: clamp(28px, 4vw, 40px); }
.discovery-section { display: grid; gap: 14px; min-width: 0; }
.discovery-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.discovery-header h2 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(24px, 3.2vw, 34px); line-height: 1; overflow-wrap: anywhere; }
.discovery-more { font: 600 13px/1.3 var(--mono); color: var(--accent-ink); white-space: nowrap; }
.discovery-more:hover { text-decoration: underline; }
.discovery-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.discovery-card { background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; min-width: 0; transition: border-color .15s, background .15s; }
.discovery-card:hover { border-color: var(--ink); background: var(--hover); }
.discovery-card a { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; height: 100%; min-width: 0; }
.discovery-when { font: 600 12px/1.3 var(--mono); color: var(--accent-ink); }
.discovery-title { font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: pretty; }
.discovery-meta { margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }

.town-promo-banner { background: var(--promo-bg); color: var(--promo-ink); border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px, 4vw, 36px); display: grid; gap: 20px; }
.promo-copy { display: grid; gap: 8px; }
.town-promo-banner h2 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(28px, 4.5vw, 44px); line-height: .94; letter-spacing: -.015em; }
.town-promo-banner p { font-size: 15px; line-height: 1.5; color: var(--promo-ink); opacity: .85; max-width: 56ch; }
.promo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.promo-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-ink); font-size: 14px; font-weight: 700; transition: background .15s; }
.promo-cta:hover, .promo-cta:focus-visible { background: var(--cta-bg-hover); }
.promo-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--promo-border); border-radius: 999px; color: var(--promo-ink); font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s; }
.promo-link:hover, .promo-link:focus-visible { border-color: var(--promo-ink); background: var(--promo-hover); }

@media (min-width: 860px) {
  .event-layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr; column-gap: 28px; row-gap: 24px; }
  .event-hero { grid-column: 1; grid-row: 1; }
  .event-main-content { grid-column: 1; grid-row: 2; }
  .event-action-card { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 20px; }
}

@media (max-width: 520px) {
  .event-hero { grid-template-columns: 1fr; gap: 14px; }
  .event-date-stamp { display: flex; align-items: stretch; justify-content: space-between; text-align: left; min-width: 0; }
  .stamp-date { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; }
  .stamp-day { font-size: 26px; }
  .stamp-time { display: flex; align-items: center; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .category-tile, .category-more::after, .period-section-toggle, .period-card, .event-primary-cta, .event-utility-btn, .event-series-list a, .discovery-card, .promo-cta, .promo-link { transition: none; }
}

/* Event preferences (love / less / hide), stored in an anonymous cookie. */
.results-heading { flex-wrap: wrap; }
.preference-note { margin: 0; font-size: 13px; color: var(--muted); }
.preference-note a { text-decoration: underline; }
.for-you { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: 999px; background: var(--accent-ink); color: var(--cta-ink); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.event-copy .for-you { align-self: flex-start; justify-self: start; width: fit-content; }
.event-row.preference-less .event-copy { opacity: .62; }
.event-row.preference-less:hover .event-copy, .event-row.preference-less:focus-within .event-copy { opacity: 1; }
.preferences-page { max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.preferences-page h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin: 8px 0 12px; }
.preferences-page h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 32px 0 8px; }
.preferences-back a, .preferences-privacy a { text-decoration: underline; }
.preferences-lede { font-size: 17px; line-height: 1.5; margin: 0 0 16px; }
.preferences-saved { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-bright); }
.preference-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); }
.preference-row legend { float: left; padding: 0; font-weight: 600; font-size: 16px; }
.preference-options { display: flex; flex-wrap: wrap; gap: 6px; }
.preference-option { position: relative; }
.preference-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.preference-option span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; }
.preference-option input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.preference-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.preferences-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.preferences-actions button { cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.preferences-privacy { margin-top: 28px; font-size: 14px; color: var(--muted); }
.preferences-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.preferences-link svg { width: 20px; height: 20px; }
.preferences-link:hover { background: var(--hover); }
.preferences-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.preferences-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }
@media (max-width: 700px) { .preferences-link { margin-left: auto; } }

/* Venue pages (/:town/venues/:slug-:id): header with draw stars and Mapbox map. */
.venue-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.venue-hero { background: var(--paper-bright); border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(18px, 3vw, 28px); margin-bottom: clamp(24px, 4vw, 40px); display: grid; gap: clamp(18px, 3vw, 32px); align-items: start; }
.venue-hero.has-map { grid-template-columns: minmax(0, 1fr) minmax(260px, 44%); }
.venue-hero-details { min-width: 0; }
.venue-map { margin: 0; border: 1px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--paper-warm); aspect-ratio: 3 / 2; }
.venue-map a, .venue-map picture { display: block; height: 100%; }
.venue-map img { display: block; width: 100%; height: 100%; object-fit: cover; }
.venue-map a:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.venue-draw { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 17px; }
.draw-stars { display: inline-flex; gap: 1px; font-size: 20px; line-height: 1; letter-spacing: 0; }
.draw-stars .on { color: var(--accent); }
.draw-stars .off { color: var(--ink); opacity: .18; }
@media (max-width: 700px) { .venue-hero.has-map { grid-template-columns: minmax(0, 1fr); } }
.venue-hero h1 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: clamp(36px, 6vw, 64px); line-height: .95; margin: 8px 0 12px; overflow-wrap: anywhere; }
.venue-hero .venue-type-badge { margin-left: 0; }
.venue-address { margin: 0 0 12px; font-size: 16px; }
.venue-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-weight: 600; font-size: 14px; }
.venue-links a { color: var(--accent-ink); }
.venue-hours { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.venue-count { margin: 8px 0 16px; font-size: 14px; color: var(--muted); }
.venue-event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.venue-event a { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.venue-event a:hover .venue-event-title { text-decoration: underline; }
.venue-event-when { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.venue-event-title { font-weight: 700; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.venue-event-meta { font-size: 13px; color: var(--muted); text-align: right; }
.venue-event-more { display: block; font-weight: 600; }
@media (max-width: 700px) {
  .venue-event a { grid-template-columns: minmax(0, 1fr); }
  .venue-event-meta { text-align: left; }
}
.detail-venue-link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
