/* The pieces a list of events is made of, shared by the map (index.html) and the pages the build writes (pipeline/pages.mjs):
   the chips above it, the event card (event-card.js) with its tags, links and stamp, and the headings and notes between
   cards. Colors, radii, shadows and the font are the tokens in tokens.css (docs/design.md); nothing here names a color. */

/* A row of chips scrolls sideways on a narrow phone. Chips draw at 36px; ::before stretches the tap target to 44px. */
.row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 12px; }
.row::-webkit-scrollbar { display: none; }
.chip, .seg { flex: 0 0 auto; display: inline-flex; align-items: center; height: 36px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-float); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.chip { gap: 8px; padding: 0 14px; border: 0; cursor: pointer; }
.chip, .seg button { position: relative; isolation: isolate; }
.chip::before, .seg button::before { content: ""; position: absolute; inset: -4px 0; z-index: -1; }
.seg { gap: 2px; padding: 3px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--ink-2); cursor: pointer; }
.seg button::before { inset: -7px 0; }
.chip[aria-pressed="true"], .chip[aria-current], .seg [aria-pressed="true"] { background: var(--ink); color: var(--surface); } /* pressed, or the list page this is */

/* The event card. flow-root: the card holds its flyer's float. A card is laid out once scrolled near: a list of every date holds 700. */
.card { display: flow-root; padding: 14px 16px; border-bottom: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 160px; }
.card.sel { background: var(--accent-tint); }
.card .when { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.card .when span span { white-space: nowrap; } /* the type, the day and the time each stay whole; a break falls between them */
.card .mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-pill);
  background: var(--accent); } /* the pin, in small, with the event's icon; no ring, the icon carries it */
.card .mark svg { width: 13px; height: 13px; fill: var(--on-accent); }
.card .flyer { float: right; margin: 0 0 8px 12px; } /* a flyer's picture at the right edge, from the title down; the text keeps its width below it */
.card .flyer img { display: block; width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.card h1, .card h3 { margin: 2px 0 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.card h3 a { color: inherit; text-decoration: none; } /* on a list page the title opens the event's page */
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.card .where { margin-top: 2px; color: var(--ink-3); }
/* the organizer opens every event that names them (ticket 486): a quiet link in the line's own color */
.card .where .org { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.card .where .org:hover { color: var(--ink-2); text-decoration-color: currentColor; }
.card .sum { margin-top: 6px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags:empty { display: none; }
.tag { padding: 2px 9px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 500; line-height: 18px; }
.tag.free { background: var(--free-bg); color: var(--free-text); }
.tag.kids { background: var(--kids-bg); color: var(--kids-text); }
.tag.unknown { padding: 1px 8px; border: 1px dashed var(--line-strong); background: none; color: var(--ink-3); }
.links { display: flex; gap: 20px; margin-top: 10px; font-size: 13px; font-weight: 500; }
.links a { position: relative; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.links a::before { content: ""; position: absolute; inset: -12px -4px; }
.links a:hover { color: var(--ink); text-decoration-color: currentColor; }
.stamp { margin-top: 8px; color: var(--ink-3); font-size: 12px; } /* when the listing was last read from its source */
.stamp a { position: relative; color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; } /* as quiet as the date: found by those who look */
.stamp a::before { content: ""; position: absolute; inset: -14px -4px; }
.stamp a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Between cards: a section heading (Ongoing, Earlier today, a weekend's days), a note (what Free left out, a day that
   has passed) and the empty state. */
.section { margin: 0; padding: 16px 16px 8px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.note { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); font-size: 13px; }
.note a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.note a:hover { color: var(--ink); text-decoration-color: currentColor; }
.empty { padding: 32px 24px; color: var(--ink-3); text-align: center; }
.empty a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

/* Optional generated artwork, supplied explicitly by the poster studio; ordinary cards are unchanged. */
.event-art { display: block; margin-bottom: 18px; color: var(--ink-3); text-decoration: none; }
.event-art img { width: 100%; aspect-ratio: 3 / 2; display: block; object-fit: cover; border-radius: var(--radius-md); }
.event-art span { display: block; margin-top: 7px; font-size: 11px; }

/* Repeat dates share one card and one count. Native details keeps the full schedule a keyboard-accessible tap away. */
.program-dates { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.program-dates summary { min-height: 44px; align-content: center; cursor: pointer; font-weight: 500; }
.program-dates ul { margin: 0; padding: 0; list-style: none; }
.program-dates li { border-top: 1px solid var(--line); }
.program-dates a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px;
  min-height: 44px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.program-dates a span { white-space: nowrap; }
