/* Lower Queen Anne Events — overcast-sky palette, marquee display type. */

:root {
  --sky: #edf1f4;        /* overcast paper */
  --mist: #ffffff;       /* card surface */
  --ink: #1b2733;        /* Puget ink */
  --ink-soft: #55636f;
  --line: #c9d2da;
  --gold: #e8791d;       /* Space Needle "Galaxy Gold" */
  --gold-soft: #fbe9d8;
  /* venue hues (chips, grid ticks, agenda tags) */
  --v-aotw: #0f7c7c;
  --v-funko: #3f7d3a;
  --v-apex: #b3382e;
  --v-port: #2b5fa3;
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #141a20; --mist: #1d252e; --ink: #e8edf1; --ink-soft: #9aa7b2;
    --line: #333f4a; --gold: #f08a33; --gold-soft: #3a2a1a;
    --v-aotw: #35b5b5; --v-funko: #6fbf68;
    --v-apex: #e8756b; --v-port: #6f9be0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0 auto; padding: 0 1.25rem 3rem; max-width: 62rem;
  background: var(--sky); color: var(--ink);
  font: 16px/1.55 var(--body);
}
a { color: inherit; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- masthead ---- */
.masthead {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end;
  justify-content: space-between; padding: 2.5rem 0 1.5rem;
}
.eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 .3rem;
}
h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: .92; text-transform: uppercase; letter-spacing: .01em; margin: 0;
}
.sub { color: var(--ink-soft); max-width: 34rem; margin: .8rem 0 0; }

.masthead-actions {
  position: relative; text-align: right; align-self: stretch;
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-end;
}
.updated {
  font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink);
  margin: 0 0 .5rem; min-height: 1em;
}
.btn-gold {
  font: 600 1rem/1 var(--body); color: #fff; background: var(--gold);
  border: 0; border-radius: 6px; padding: .8em 1.2em; cursor: pointer;
}
.btn-gold:hover { filter: brightness(1.07); }
.pop {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 10;
  width: min(24rem, 88vw); background: var(--mist); border: 1px solid var(--line);
  border-radius: 8px; padding: 1rem 1.1rem; box-shadow: 0 8px 28px rgba(15, 25, 35, .18);
  font-size: .92rem;
}
.pop p { margin: 0 0 .6rem; }
.pop-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .6rem; }
.qr-panel { text-align: center; margin-bottom: .6rem; }
#qrImg {
  display: inline-block; width: 170px; height: 170px;
  background: #fff; padding: 6px; border-radius: 8px;
}
#qrImg svg { display: block; width: 100%; height: 100%; }
.qr-panel .pop-note { text-align: center; }
.tile {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .75rem .3rem .6rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--sky); text-decoration: none;
}
.tile svg { width: 26px; height: 26px; color: var(--gold); }
.tile span {
  font-family: var(--mono); font-size: .62rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); white-space: nowrap;
}
.tile:hover { border-color: var(--gold); }
.tile:hover span { color: var(--ink); }
/* ---- filter bar: icon + marquee presets, full panel below ---- */
.filterbar { display: flex; flex-wrap: nowrap; gap: .5rem; align-items: center; margin: .5rem 0 .9rem; }
.filterbar > * { flex-shrink: 0; }
.filter-icon {
  width: 2.6rem; height: 2.05rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--mist); color: var(--ink);
  display: grid; place-items: center;
}
.filter-icon svg { width: 1.1rem; height: 1.1rem; }
.filter-icon:hover { border-color: var(--ink-soft); }
.filter-icon.is-on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
/* one line only: pills that don't fit are hidden by app.js, never wrapped */
.presets { display: flex; flex-wrap: nowrap; gap: .5rem; overflow: hidden; flex: 0 1 auto; min-width: 0; }
.presets .chip { flex-shrink: 0; white-space: nowrap; }
.filter-panel {
  background: var(--mist); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; margin-bottom: 1.25rem;
}
.fp-group + .fp-group { margin-top: 1rem; }
.fp-group h3 {
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-soft); margin: 0 0 .55rem; font-weight: 500;
}
.fp-hint {
  text-transform: none; letter-spacing: 0; font-weight: 400;
  opacity: .7; margin-left: .5em;
}
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-panel .chip { background: var(--sky); }
.chip-row .badge { cursor: pointer; background: none; padding: .4em .8em; font-size: .68rem; }
.chip-row .b-sold { background: var(--ink); }
.badge.is-on { box-shadow: 0 0 0 2px var(--gold); }
.chip {
  font: 500 .85rem/1 var(--body); cursor: pointer; border-radius: 999px;
  padding: .5em .95em; background: var(--mist); color: var(--ink);
  border: 1px solid var(--line);
}
.chip::before {
  content: ""; display: inline-block; width: .55em; height: .55em;
  border-radius: 50%; margin-right: .45em; background: var(--dot, var(--ink-soft));
}
.chip[data-venue=""]::before, #clearFilters::before { display: none; }
.clear-icon { width: 2.2rem; color: var(--ink-soft); }
.clear-icon svg { width: .95rem; height: .95rem; }
.clear-icon:disabled { opacity: .35; cursor: default; }
.clear-icon:not(:disabled):hover { color: var(--ink); border-color: var(--ink-soft); }
.chip.is-on { border-color: var(--dot, var(--ink)); box-shadow: inset 0 0 0 1px var(--dot, var(--ink)); }

/* ---- agenda layout: list + docked mini calendar ---- */
.agenda-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 0 2.5rem; align-items: start;
}
.cal-side { position: sticky; top: 1rem; }
@media (max-width: 760px) {
  .agenda-layout { display: flex; flex-direction: column; }
  .cal-side { order: -1; position: static; width: 100%; max-width: 24rem; margin: 0 auto 1.5rem; }
}

/* ---- mini month calendar ---- */
.cal { background: var(--mist); border: 2px solid var(--ink-soft); border-radius: 10px; overflow: hidden; }
/* the lines bracketing the weekday labels match the frame, warmed with a
   hint of gold */
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .6rem;
  border-bottom: 2px solid color-mix(in srgb, var(--ink-soft) 78%, var(--gold));
}
.cal-head h2 {
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .04em; margin: 0;
}
.cal-head button {
  font: 700 1rem/1 var(--body); width: 1.7rem; height: 1.7rem; cursor: pointer;
  background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
}
.cal-head button:disabled { opacity: .3; cursor: default; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { border-bottom: 2px solid color-mix(in srgb, var(--ink-soft) 78%, var(--gold)); }
.cal-grid > :nth-child(-n+7) { border-top: 0; } /* no hairline doubling the dow line */
.cal-dow span {
  font-family: var(--mono); font-size: .6rem; text-transform: uppercase;
  color: var(--ink-soft); text-align: center; padding: .35rem 0;
}
.cal-grid > * {
  min-height: 2.1rem; border-top: 1px solid var(--line); padding: .2rem .25rem;
  font-family: var(--mono); font-size: .68rem; text-align: left; vertical-align: top;
}
.cal-grid > :nth-child(7n+2), .cal-grid > :nth-child(7n+3), .cal-grid > :nth-child(7n+4),
.cal-grid > :nth-child(7n+5), .cal-grid > :nth-child(7n+6), .cal-grid > :nth-child(7n+7) {
  border-left: 1px solid var(--line);
}
.cal-day { background: none; border-right: 0; border-bottom: 0; color: var(--ink); display: block; width: 100%; }
button.cal-day { cursor: pointer; }
button.cal-day:hover { background: var(--gold-soft); }
.cal-day .num { display: block; }
.cal-day.is-today .num {
  display: inline-block; background: var(--gold); color: #fff;
  border-radius: 3px; padding: 0 .3em; font-weight: 500;
}
.cal-day.is-out { color: var(--line); }
.cal-day .num-mo { font-size: .82em; letter-spacing: .03em; }
/* month differentiation: interior boundary segments; the card border
   closes each month's frame at the calendar edge */
.cal-day.mo-t { border-top: 2px solid var(--ink-soft); }
.cal-day.mo-l { border-left: 2px solid var(--ink-soft); }
.cal-day.mo-fade { color: var(--ink-soft); }
.ticks { display: flex; flex-wrap: wrap; gap: 2px; margin-top: .2rem; }
.ticks i { width: .28rem; height: .28rem; border-radius: 1px; background: var(--dot, var(--ink-soft)); }

/* ---- agenda ---- */
.section-title {
  font-family: var(--display); font-weight: 700; font-size: 2rem;
  text-transform: uppercase; letter-spacing: .03em; margin: 2.5rem 0 1rem;
}
.agenda ol { list-style: none; margin: 0; padding: 0; }
.agenda .empty { color: var(--ink-soft); }
.day-row {
  display: grid; grid-template-columns: 5.2rem 1fr; gap: 1rem;
  border-top: 1px solid var(--line); padding: 1rem 0;
}
.day-row.is-today .date-rail .dnum { color: var(--gold); }
.day-row.is-past { opacity: .5; }
.past-toggle { padding: .6rem 0 1rem; }
.past-toggle button {
  font: 500 .85rem/1 var(--body); cursor: pointer; border-radius: 999px;
  padding: .5em .95em; background: var(--mist); color: var(--ink-soft);
  border: 1px dashed var(--line);
}
.past-toggle button:hover { color: var(--ink); border-color: var(--ink-soft); }
.date-rail { text-align: center; }
.date-rail .dnum {
  font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; display: block;
}
.date-rail .dmeta {
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-soft);
}
.day-events { display: grid; gap: .6rem; align-content: start; }
/* each row carries a whisper of its venue's color (set inline by app.js) */
.ev { display: flex; gap: .8rem; align-items: flex-start; padding: .45em .55em; border-radius: 6px; }
.ev-body { display: flex; flex-direction: column; align-items: flex-start; gap: .18rem; min-width: 0; }
.ev-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.ev a { font-weight: 600; text-decoration-color: var(--line); }
.ev a:hover { text-decoration-color: var(--gold); }
.ev .time { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); min-width: 5.5rem; padding-top: .15em; }
.ev .venue {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--dot, var(--ink-soft));
}

/* ---- event badges + legend ---- */
.badge {
  font-family: var(--mono); font-size: .62rem; text-transform: uppercase;
  letter-spacing: .08em; border-radius: 3px; padding: .18em .5em;
  border: 1px solid currentColor; align-self: center; white-space: nowrap;
}
.b-21 { color: var(--v-apex); }
.b-day { color: var(--gold); }
.b-sold { color: var(--mist); background: var(--ink); border-color: var(--ink); }
.b-free { color: var(--v-funko); }
@media (prefers-color-scheme: dark) {
  .b-sold { color: var(--sky); background: var(--ink); border-color: var(--ink); }
}
.pop-note { color: var(--ink-soft); font-size: .85em; text-align: justify; }
.pop-filter { display: flex; gap: .5em; align-items: center; cursor: pointer; font-weight: 600; }
.pop-filter input { accent-color: var(--gold); }

/* ---- share / embed ---- */
.share { margin-top: 3rem; }
.share-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; }
.share h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.share p { color: var(--ink-soft); margin: 0 0 .7rem; }
.share pre {
  background: var(--ink); color: var(--sky); border-radius: 8px;
  padding: .9rem 1rem; overflow-x: auto; font-family: var(--mono); font-size: .78rem;
}
@media (prefers-color-scheme: dark) { .share pre { background: var(--mist); color: var(--ink); border: 1px solid var(--line); } }
.share code { font-family: var(--mono); }
.feed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.feed-list code { background: var(--mist); border: 1px solid var(--line); border-radius: 4px; padding: .15em .45em; font-size: .82rem; }

footer { margin-top: 3.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
footer p { color: var(--ink-soft); font-size: .85rem; }

/* ---- small screens: tighter header, horizontal date headers, stacked rows ---- */
@media (max-width: 640px) {
  body { padding: 0 1rem 2.5rem; }
  .masthead { padding: 1.6rem 0 .8rem; gap: 1.1rem; }
  h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .masthead-actions {
    align-self: auto; width: 100%; text-align: left;
    flex-direction: column; align-items: stretch; gap: .2rem;
  }
  .updated { font-size: 1.05rem; margin: 0 0 .4rem; }
  .btn-gold { width: 100%; }
  .pop { left: 0; right: 0; width: auto; }
  .section-title { font-size: 1.6rem; margin-top: 1.8rem; }

  /* day groups: date reads across the top instead of down a rail */
  .day-row { display: block; padding: .85rem 0; }
  .date-rail {
    display: flex; align-items: baseline; gap: .55rem;
    text-align: left; margin-bottom: .5rem;
  }
  .date-rail .dnum { display: inline; font-size: 1.7rem; }
  .date-rail .dmeta { white-space: nowrap; }

  /* event rows keep the same time-column + stacked-body layout,
     just with a narrower time column */
  .ev { padding: .5em .6em; }
  .ev .time { min-width: 4.4rem; }
  .day-events { gap: .5rem; }
}
