/* Konzerterei.
   ============
   The list is the product; anything that competes with it is noise.

   Every value here comes from `tokens.css`. If something needs a size, a colour
   or a space this file cannot name, the token is missing — add it there rather
   than a number here.

   Mobile first, and not as a slogan: every rule is written for a phone held in
   one hand, and the wider layouts are the exceptions at the end. Someone
   deciding where to go tonight is standing up, outdoors, on one bar of signal.
   That is the case to get right, not the desk. */

* { box-sizing: border-box; }

/* `hidden` must actually hide.
   ============================
   The attribute is honoured by a rule in the *user agent* stylesheet, and any
   author rule that sets `display` beats it -- so `.event { display: flex }` made
   `hidden` a no-op on exactly the elements the filter uses it on. The filter set
   the attribute on every non-matching row and every row stayed on screen; only
   the day headings disappeared, because `.day` happens to set no `display`.

   `!important` is right here and nowhere else: this is a UA behaviour being
   restored, not a specificity fight being won. Every rule below may set `display`
   freely, which is the point. */
[hidden] { display: none !important; }

/* Where a scroll that brings something into view leaves it: below the sticky app bar. The
   skip link scrolled its target to the top of the window, so `.back` on a page that lands
   on `<main>` started half under the bar, and the list's first title under the bar *and*
   the sticky day heading stuck beneath it, so the next Tab focused a covered title
   (T-214, WCAG 2.2 SC 2.4.11). The bar is the same for every scroll, hence padding on the
   page; the day heading is only the skip target's to clear, hence a margin on `#list`
   below -- a padding that included it also moved the page when the search box, which sits
   between the two, took focus. */
html { scroll-padding-top: var(--app-bar-height); }

#list { scroll-margin-top: var(--day-heading-height); }

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font: var(--weight-regular) var(--text-body) / var(--leading-normal) var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

main { padding-block: var(--space-6) var(--space-12); }

/* The concert and venue pages open with the detail bar, whose 44px target holds about
   11px of empty box above its icon; the page's usual padding above it left the icons
   about 35px under the app bar and 20px above the title they belong to (T-228). Less
   padding puts about 20px on both sides of the bar. A class rather than a negative
   margin on the bar, which would pull it out of the box that places it. */
main.main-detail { padding-block-start: var(--space-2); }

/* Every page's own name, at one size ------------------------------------------
   There used to be five rules setting a page heading and they had drifted: four
   said `--text-headline` in four different margin boxes, and the dashboard said
   a raw `1.5rem`, which is the sort of value tokens.css exists to make
   impossible. A page's name is a page's name; the container it sits in decides
   the space around it, not its size. */
h1 {
  margin: 0 0 var(--space-5);
  font-size: var(--text-headline);
  line-height: var(--leading-tight);
}

/* The name, and one line saying what the page holds.

   The pair is a group, and the space below belongs to the group rather than to
   whichever of the two happens to be last -- so a page that has no subtitle
   still sits the same distance from what follows. The subtitle copy is the
   `tagline` each page has carried in the locale files all along: it was written
   for a slot in the old site header, and rendered nowhere at all from the app
   bar redesign until now. */
.page-heading { margin: 0 0 var(--space-5); }
.page-heading h1 { margin: 0 0 var(--space-1); }

/* A heading with the one action that is about the whole page.

   The dashboard's run-everything button, and the shape a second one would take.
   It belongs against the title because that is its scale: the page is named
   "Quellen" and the button runs all of them, where every other button here means
   one source. Down among the counts it read as one more thing measured.

   `flex-end` rather than `center`: the title block is two lines and the button is
   one, and centring it against them put a 44px pill halfway up a heading. Sharing
   the baseline is not available either -- the pill's bottom edge would sit below
   the subtitle's descenders. It sits on the subtitle's line instead.

   It wraps, and the button keeps its width when it does: at 360px the title and a
   two-word button do not share a line, and a button squeezed to a third of itself
   is worse than one on its own row. */
.page-heading-with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
}
.page-heading-with-action > :first-child { min-width: 0; }
.page-heading-with-action .run-all { flex: 0 0 auto; }

/* The front page's title with the way to the other city (T-212).

   The title wraps, the link does not: the link stays beside the title at every width
   a phone has, and it is the title that gives way. At 360px the <h1> breaks after
   "in" and the city's name stands on its first line; below that the title is two
   lines and the link is still on the first. A link that wrapped below the title, as
   `.run-all` does, cost a 44px row of its own at 360px -- and the reader of that
   first screen is the one this link is for -- so the line is `nowrap` and the title is
   the item that shrinks (`min-width: 0`, so it may go below its longest word's width
   rather than push the page sideways).

   The title's own margin moved out to the line: its `margin-bottom` sat inside a flex
   item, where `center` would have aligned the link to the margin box rather than to the
   words. The line takes it instead, so the first row stands where it stood before the
   link was there. The link aligns to the first line (`flex-start`), so a two-line title
   does not stretch or centre it between the lines.

   The link is a full touch target and the line is not made taller by it: its box is
   `--touch-target` high, and a negative block margin leaves its margin box exactly
   the title's own line (font size times leading), so a link that shares the line adds
   no height. Its width is made up to a touch target by a pseudo-element rather than by
   padding, so the name stays where the title ends and the width a phone has left is
   not spent on empty box. Name only, no landmark: with the glyph it measured 50px in
   German and did not fit beside the English title.

   From `64rem` the app bar holds the region switch (see `.bar-switches`), so the link
   is gone: `display: none` leaves the line holding the title alone, with no gap or
   height of its own. */
.heading-with-region {
  flex-wrap: nowrap;
  align-items: flex-start;
  /* A narrower column gap than the dashboard's: the title gives way, the link is a
     city's name and wants only a breath beside it. */
  gap: var(--space-3) var(--space-2);
  margin: 0 0 var(--space-5);
}
.heading-with-region h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.other-region {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--touch-target);
  margin-block: calc((var(--text-headline) * var(--leading-tight) - var(--touch-target)) / 2);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  /* The link's own box is a name wide, and a name is narrower than a thumb. */
  position: relative;
}
.other-region::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: min(0px, calc((100% - var(--touch-target)) / 2));
}
/* Named rather than `.page-heading p`, which the prose pages' own paragraph rule
   would out-specify on the one page that has both. */
.page-heading .page-subtitle {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}

/* The 404's own heading -- public, not the dashboard's. It lived in the
   sign-in section, which it never belonged to; moved up here next to the
   other page-heading rules. `.not-found h1`'s specificity beats the bare
   `h1` rules above at any position, so the move is cascade-safe. */
.not-found h1 { margin: var(--space-2) 0 var(--space-1); }

a { color: var(--primary); }
a:hover { text-decoration: none; }

:focus-visible {
  outline: var(--focus-ring-width) solid var(--primary);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--shape-xs);
}

.muted { color: var(--on-surface-variant); }

/* The skip link (T-214, C11): the first Tab stop of every page, held off the top
   edge until it has focus and then the only thing in the corner. Above the bar
   (`z-index: 10`). Its targets -- `<main>` and the list under the filter --
   are focused by the jump and carry no ring of their own: the whole region is not
   what the reader is pointing at. */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-4);
  border-radius: var(--shape-sm);
  background: var(--primary);
  color: var(--on-primary);
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }
main:focus,
#list:focus { outline: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Icons --------------------------------------------------------------------
   One sprite in the page, referenced by `<use>`. Inline rather than fetched:
   the list has hundreds of rows, and an icon that costs a request is an icon
   that arrives after the reader has already scrolled past it.

   `currentColor` throughout, so an icon is coloured by whatever contains it and
   never needs a variant per context. */

/* The sprite itself is never seen: it holds the definitions the rest of the page
   points at. Hidden in CSS rather than with a `style` attribute, because the
   Content-Security-Policy has no `unsafe-inline` and an inline style would be
   silently dropped -- taking the layout with it. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Top app bar --------------------------------------------------------------
   Sticky, because the list is long and the way back should not be a scroll
   away. It sits on a container surface rather than under a border: that is how
   the M3 ladder separates layers, and it survives the dark theme without a
   second rule. */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-container);
  /* A shadow rather than a border, and the difference is layout rather than
     looks: a border adds its pixel to the bar's height, so the sticky day
     heading underneath would need `--app-bar-height` plus a correction term
     that nothing would keep in step. A 1px shadow draws the same line and takes
     no space, so the bar is exactly `--app-bar-height` tall (T-062). */
  box-shadow: 0 1px 0 var(--outline-variant);
}

.top-bar-inner {
  max-width: var(--measure);
  margin-inline: auto;
  /* The height is the token's, not whatever the tallest control happens to be:
     `.day-heading` sticks to the same number and the two may not drift. */
  min-height: var(--app-bar-height);
  box-sizing: border-box;
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* The wordmark, with a mark that is the site's own: three stacked strokes,
   which is what a listing *is* — one line per night. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  /* It is the way back to the concert list, and on a phone it is the only one --
     so it is a thumb-sized target like every nav item beside it, rather than
     whatever height a wordmark happens to be. */
  min-height: var(--touch-target);
  margin-right: var(--space-2);
  color: var(--on-surface);
  font-size: var(--text-title-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { color: var(--primary); width: 1.4em; height: 1.4em; stroke-width: 2; }

.top-nav { display: flex; align-items: center; gap: var(--space-1); }

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  /* Square and thumb-sized while it is the icon alone; the label pushes it wider
     when there is room for one. */
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  padding: var(--space-2);
  border-radius: var(--shape-full);
  color: var(--on-surface-variant);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--motion-short) var(--motion-easing);
}

/* On a phone the word is hidden and the icon carries the control: the nav and the
   reader's own actions do not fit beside nine letters plus two more words.

   The word stays in the markup and is hidden *here*, so a screen reader reads it
   at every width -- `visually-hidden` rather than `display: none`, which takes it
   out of the accessibility tree as well. The wordmark used `display: none` and
   its mark is `aria-hidden`, so on a phone the link to the concert list had no
   accessible name at all: a bare picture, and now the only way there. */
/* The three labels a phone has no room for, hidden the same way and for the same
   reason: `visually-hidden` rather than `display: none`, so a screen reader reads
   the word at every width.
 *
 * `.back-label` joined them because it is the one whose width is not ours to
 * predict -- `back.js` writes in where the reader actually came from, and the
 * longest of those is "Zurück zu den gemerkten Konzerten" at 270px. Beside the
 * event page's four action buttons that overflowed the header on **every** phone:
 * 40px short at 390, 70 at 360, 110 at 320. As an icon it is 44px and the line
 * has 116px to spare at 320, whatever the label says.
 *
 * A chevron alone at the top left is also what a phone reader already knows from
 * iOS and Android, where the label is optional and the glyph is not. */
.nav-label,
.brand-word,
.back-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* The archive is in the menu below `48rem` and here from there up (T-170): one
   markup, two layouts, decided in CSS. The shown half is at the end of the file,
   in the media query that also takes `.overflow-narrow` out of the menu. */
.top-nav .nav-wide { display: none; }

.top-nav a:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--on-surface);
}

/* The page you are on, named rather than merely coloured: `aria-current` is the
   fact, and the style follows it, so the two cannot drift apart. */
.top-nav a[aria-current="page"] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

/* Icon buttons -------------------------------------------------------------
   An action with a picture and no words. Every one carries an `aria-label` and
   a `title`: an icon nobody can name is a control nobody can use, and the
   tooltip is what makes it learnable rather than a guess. */

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  padding: var(--space-2);
  border: 0;
  border-radius: var(--shape-full);
  background: none;
  color: var(--on-surface-variant);
  font: inherit;
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--motion-short) var(--motion-easing),
    color var(--motion-short) var(--motion-easing);
}

.icon-button:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--on-surface);
}

.icon-button[aria-current="page"] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.icon-button:active {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-pressed) * 100%), transparent);
}

/* What this reader kept, said twice on one control -------------------------
   The heart in the bar was the same outline whether nothing was saved or eleven
   things were -- the one control on this site whose whole purpose is a set that
   the reader built, drawn as if the set were always empty.

   **Filled first, counted second.** The fill is the state every row's heart
   already uses, so it is recognised rather than learned, and it is what carries
   at a glance down a sticky bar. The pip is the number, and a 17px disc is read
   on purpose. Neither is in the accessibility tree: the count goes into the
   link's own name, in `shortlist.js`.

   Both are written by the script, because the number lives in one browser and
   this page is held in the process for everybody (ADR-034). */
#shortlist-link { position: relative; }
#shortlist-link.is-kept { color: var(--primary); }
#shortlist-link.is-kept .icon { fill: currentColor; }

.pip {
  position: absolute;
  /* Against the icon rather than the 44px target: the target is mostly padding,
     and a badge pinned to its corner floats in white space a centimetre from the
     shape it is counting. */
  top: calc(50% - var(--pip) - var(--space-1));
  inset-inline-end: calc(50% - var(--pip));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: var(--pip);
  height: var(--pip);
  padding-inline: var(--space-1);
  border-radius: var(--shape-full);
  /* A ring in the bar's own colour, so the disc reads as sitting on top of the
     heart rather than as part of it wherever the two overlap. */
  border: 2px solid var(--surface-container);
  background: var(--primary);
  color: var(--on-primary);
  font-size: var(--text-pip);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  pointer-events: none;
}

/* On `/saved` the link is the page you are on, so the ring has to be drawn on the
   colour that is actually behind it. The ring's job is to separate the disc from
   the heart under it, and a ring in the bar's ground on a filled pill separates it
   from nothing. */
#shortlist-link[aria-current="page"] .pip { border-color: var(--primary-container); }

/* The switches, out in the bar where there is room for them ------------------
   The region, the settings and the language. They are in the overflow menu on a
   phone and out here from `64rem` up (T-081) -- **one markup, two layouts,
   decided here**, which is what keeps ADR-034 honest: the bytes a reader gets do
   not depend on how wide their window is, so a viewport is still not a fourth
   thing that varies a held page.

   `display: none` and not `visibility`, because a control that is in the
   accessibility tree twice is a tab stop twice and a screen reader's menu twice.
   Whichever layout the window is not wide enough for is gone, not hidden. */
.bar-switches { display: none; }

/* Which city, as its own small group. A ruled box around two links: they are one
   question with two answers, which is the same shape `.overflow-label` gives them
   in the menu -- there a word says it, here the border does, because a word above
   a control is a line of the bar's height this bar does not have. */
.region-switch {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  border-radius: var(--shape-full);
  background: var(--surface-container-low);
}

.region-switch a {
  display: inline-flex;
  align-items: center;
  /* Shorter than a 44px target, and deliberately: at this width there is a mouse
     on the other end. The pair still measures 44px tall inside the bar's own
     padding, which is what a thumb would find if one ever arrived here. */
  min-height: calc(var(--touch-target) - var(--space-4));
  /* The city's landmark before its name. */
  gap: var(--space-1);
  padding-inline: var(--space-3);
  border-radius: var(--shape-full);
  color: var(--on-surface-variant);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--motion-short) var(--motion-easing);
}

/* Larger than a line's icon: a landmark drawn in a 1.25em box is a smudge beside a
   word, and this is the one icon here that is a picture rather than a sign. */
.region-switch .icon {
  width: 1.6em;
  height: 1.6em;
  stroke-width: 1.5;
}

.region-switch a:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--on-surface);
}

.region-switch a[aria-current] {
  background: var(--surface);
  color: var(--on-surface);
  box-shadow: var(--elevation-1);
}

/* The language's own code beside its globe. Not translated and not translatable:
   it is the *name of a language*, and it has to say the same thing on both pages
   for the reader who cannot read one of them. */
.switch-code {
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
}

/* Everything in the bar that is not a destination ---------------------------
   One disclosure holding the region, the settings, the language and -- for an
   operator -- the dashboard and sign-out. The bar wanted 395 to 546px with all
   of those loose in it and a phone is 320 to 430, so the page scrolled sideways
   (T-062); with them in here the bar is 274px in every state.

   A `<details>`, like the region switch it replaces: it works before JavaScript
   arrives and without it. It is a disclosure at every width, not one that
   appears below a breakpoint -- see the template for why that matters to
   ADR-034.

   The panel is taken out of flow, so opening it does not push the bar down onto
   the page underneath. */
.overflow-menu { position: relative; }

.overflow-menu > summary { list-style: none; }
.overflow-menu > summary::-webkit-details-marker { display: none; }

.overflow-panel {
  position: absolute;
  inset-inline-end: 0;
  z-index: 2;
  min-width: 12rem;
  margin-block-start: var(--space-1);
  padding: var(--space-2);
  border-radius: var(--shape-sm);
  background: var(--surface-container-high);
  box-shadow: var(--elevation-2);
}

/* What the group under it is, where a group needs saying. Only the regions do:
   "Wien" and "Graz" are two answers to one question, and the items below are
   each their own. */
.overflow-label {
  margin: var(--space-1) var(--space-3) var(--space-2);
  color: var(--on-surface-variant);
  font-size: var(--text-label-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.overflow-list { margin: 0; padding: 0; list-style: none; }
.overflow-list + .overflow-list { margin-block-start: var(--space-2); padding-block-start: var(--space-2); border-block-start: 1px solid var(--outline-variant); }

/* Every row is a thumb-sized target and every row says a word. The sign-out is a
   `<button>` inside a form and the rest are links; they are one shape here
   because they are one list to a reader. */
.overflow-list a,
.overflow-list button {
  display: flex;
  align-items: center;
  /* The picture, then the word (T-081). A menu row is a whole line with nothing
     in its first third, and an icon there is what makes the row findable without
     reading it -- the same argument the app bar makes one level up. A prefix and
     never a replacement: the word is still the label. */
  gap: var(--space-3);
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--shape-xs);
  background: none;
  color: var(--on-surface);
  font: inherit;
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-align: start;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.overflow-list a:hover,
.overflow-list button:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
}

/* Where the reader already is. Marked rather than removed: a list that hides the
   current entry changes length when you open it somewhere else, and the reader
   loses the one row that tells them where they are. */
.overflow-list a[aria-current] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.overflow-list form { margin: 0; }

/* Filters ------------------------------------------------------------------
   One line, then everything else on request. The search box and the date chips
   answer almost every question a visitor arrives with; venue, genre and an
   exact range answer the rest, and they were taking a third of the screen to
   sit there unread.

   A `<details>` rather than a script: it works before JavaScript arrives, it
   works without it, and the browser already knows how to do it. */

.filters {
  /* A column with one gap, rather than margins on each child. Every group
     inside -- the search line, the chips, the disclosure -- is then spaced by
     the same token, and a new one added later is spaced correctly by existing.
     Losing this gap is how the search box came to sit flush against the chips. */
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  border-radius: var(--shape-md);
  background: var(--surface-container-low);
}

/* The filter bar, collapsed -------------------------------------------------
   One line where there used to be a 210px block, a 54px count row and -- for a
   reader with saved settings -- a 107px note. The first concert on a 390x844
   phone began at y=519 of the 740px a browser leaves, with one row fully
   visible on a list of 1,650 (T-062).

   **Five pages wear it now** (T-075): the concert list, `/venues`, `/archive`
   and the two kinds of narrowed page. It was one page's modifier and three other
   forms that had the class and not the mechanism -- `/venues` kept its search two
   taps inside the panel, `/archive` had none at all, and both were sized by their
   own summary rather than by the column. The dashboard keeps its own open filter,
   which is a tool for one operator rather than a page a reader arrives at.

   The surface is the whole bar's, closed and open: one card holding the search,
   the funnel and everything the funnel opens. */
/* Search beside the filter, on one line (T-072). The form is the flex row now:
   the box a reader can arrive knowing they want, and the funnel that opens the
   rest of it.

   `wrap`, because `.filter-body` takes the whole row below -- so an open
   filter puts the search box on the line above the summary rather than beside
   it, which is the price of not narrowing the body to half a phone. */
.filters-collapsed {
  flex-direction: row;
  flex-wrap: wrap;
  /* `stretch`, so the search box and the funnel are the same height whatever
     either one's content does -- they are one statement about the list below and
     read as one object (T-073). */
  align-items: stretch;
}

/* Both are 44px, both are pills, and they sit a step apart rather than touching. */
.filters-collapsed > .search-field,
.filters-collapsed > .filter-actions > .filter-summary { min-height: var(--touch-target); }

/* A basis rather than a floor: 12rem is the width below which the row is better
   off broken (the count and the funnel want ~115px of the 358 a 390px phone has,
   and the placeholder has to survive what is left). At 320 it wraps, measured
   and accepted. */
.filters-collapsed > .search-field { flex: 1 1 12rem; }

/* The button keeps its place on the line and the body takes the next one, which
   is why they are two elements rather than a `<details>` (T-073): the toggle used
   to drop below the search box the moment it was opened, because one box cannot
   be both half a line and a whole one. */
.filters-collapsed > .filter-actions { flex: 0 1 auto; }
/* **The body is the column, in every state, on every page** (T-075).
   `/venues` was 214px closed and 358 open and `/archive` was 280 of a 358 column
   -- the box a reader had just pressed changing width under the press, which is
   *a page that is being acted on must not rearrange itself* on the one control
   that is always acted on. Both were `<details>`, whose summary and body are one
   flex item and so cannot be half a line and a whole one at once; a button and a
   body are two, and this is the line that makes the second one the row. */
.filters-collapsed > .filter-body { flex-basis: 100%; }

.filters-collapsed {
  /* A **zero** basis, not `auto`, and the difference is the whole of why the
     view switch used to drop to a line of its own at 320px.

     Flexbox breaks a line *before* it shrinks anything -- the same fact
     `.filter-line` is written around. With `flex-basis: auto` this form's
     hypothetical size is its content, so at 320 the pair wanted 384px of a 288px
     row and the switch wrapped, taking the bar from 44px to 96px. From zero they
     always share the line and this one grows into whatever the switch leaves. */
  flex: 1 1 0;
  min-width: 0;
  /* A step between the search box and the funnel, rather than the column gap this
     used to zero out: they are two controls on one line and touching read as one
     smeared control (T-073). */
  gap: var(--space-3);
  margin: 0;
  /* **The whole bar is one card**, closed or open: the search, the funnel, the groups in
     the row and everything the funnel opens sit on one surface, and what is stacked
     below the row is told apart by a rule rather than by a second card. It wears the
     concert cards' own `--surface-card`: `.filters`' lower surface was 1.05:1 against
     the dark page and the card all but vanished there. A tighter edge than `.filters`:
     the closed bar is what stands between the heading and the first concert, and every
     pixel of it is the list's. */
  padding: var(--space-2);
  background: var(--surface-card);
}

/* The bar's own width decides what sits in its first row, not the viewport's: the
   column is capped at 88rem, so from 1,440px up every screen is the same bar, and
   a container query says that directly (T-265, ADR-137). Only a bar that has promoted
   groups is a container -- the macro is shared, and containment is not free on a bar
   with nothing to place. */
.filters-collapsed:has(> .filter-promoted) {
  container-type: inline-size;
}

/* A wide bar carries the time and the type in its first row (T-265, ADR-137).
 *
 * `programme_filter` renders the *when* group and the *category* group as children
 * of the form, ahead of the funnel, and the month grid after it -- the panel's own
 * groups, moved and never copied. What follows decides where they are shown.
 *
 * **A narrow bar (below 52rem) is the bar it always was.** The promoted groups and the
 * month grid are not displayed while the panel is shut, and when it is open they come
 * below the row, full width each, in the panel's own order (time, month, type, then the
 * body). A panel that opens reads time, type, genre on a phone, which is accepted.
 *
 * **No `order` anywhere: the document is in the order the screen shows.** `panel.js`
 * moves each promoted group ahead of the funnel while it is in the row and after it
 * while it is not, so the focus order is the reading order at every width. Without a
 * script the groups are not displayed at all, so the markup's own order never shows. */

/* What is shown, and where: *hidden* stays hidden. The month grid ships with the
 * `hidden` attribute and the date chip toggles it, so every rule that displays the slot
 * says `:not([hidden])` -- a `display` here would otherwise beat the user agent's own
 * `[hidden]` and show an empty surface under a shut calendar. */
.filters-collapsed > .filter-group.filter-promoted,
.filters-collapsed > .date-picker { display: none; }

/* Open: the groups take the panel's place. Keyed on the body rather than the funnel:
 * the funnel also reads open while only the month grid is (a wide bar's door opens it
 * with the body shut), and that is not the panel opening. */
.filters-collapsed:has(> .filter-body:not([hidden])) > .filter-group.filter-promoted,
.filters-collapsed:has(> .filter-actions > .filter-summary[aria-expanded="true"]) > .date-picker:not([hidden]) {
  display: block;
}

/* **Below the row, everything is a section of the one card** -- a promoted group shown in
 * the panel's place, the month grid, the panel's body -- each opened by the rule T-070
 * drew between stacked groups and spaced by the form's own `gap` above it. No surface,
 * corner or side padding of their own: the card has them. That is one rule for every
 * width and every state, where there used to be a corner and a margin per position.
 *
 * The month grid continues the time group when it stands right under it (a narrow bar,
 * open): no rule, and no step on top of the gap. */
.filters-collapsed > .filter-group.filter-promoted,
.filters-collapsed > .date-picker,
.filters-collapsed > .filter-body {
  flex: 1 1 100%;
  margin: 0;
  padding: var(--space-3) 0 0;
  border: 0;
  border-top: 1px solid var(--outline-variant);
  border-radius: 0;
  background: none;
}

.filters-collapsed > .filter-when + .date-picker {
  padding-top: 0;
  border-top: 0;
}

/* **From 52rem, the time sits in the first row** and the search stops taking whatever
 * the row has left: a search here is almost always one word, and 1,257px of a
 * 1,376px bar was the whole row for it. The funnel goes to the row's end, and the
 * month grid opens below the row with the panel shut.
 *
 * `--filter-promoted: 1` is the fact `filter.js` reads back (getComputedStyle) to know
 * which groups are in view, because the funnel's badge counts only what is not.
 * It is set here, on the group, so the stylesheet is the only place that knows a
 * width; and only once the script has revealed the funnel, because a chip with no
 * script behind it is a dead control (the same reason the funnel ships `hidden`).
 *
 * One more `.filter-group` in each selector than the open rule above needs: the two
 * would otherwise be equal in specificity and this would win by source order only. */
@container (min-width: 52rem) {
  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .filter-group.filter-when.filter-promoted {
    --filter-promoted: 1;
    display: block;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
  }

  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .date-picker:not([hidden]) { display: block; }

  .filters-collapsed:has(> .filter-promoted) > .filter-actions {
    margin-inline-start: auto;
  }

  /* **The search fills first**, to its cap, and the groups share only what is left: a
     grow of 1 beside groups growing by their chip count took the field to 228-253px
     between 1,100 and 1,280, under the 190px its placeholder needs once its icon and
     padding are paid (T-265). Past the cap the remainder goes back to the groups. */
  .filters-collapsed:has(> .filter-when.filter-promoted) > .search-field {
    flex-grow: 1000;
    max-width: var(--filter-search-max);
  }

  .filters-collapsed > .filter-group.filter-when.filter-promoted .chips { flex-wrap: nowrap; }

  /* **The groups fill the row, their chips stay together** (T-265): each group in the
     row grows into the room between the search and the funnel, so the row ends at the
     funnel, and its chips sit **centred in it at the chips' own gap** -- the room is
     left and right of the group, between it and its neighbours, and never between two
     answers to one question. `space-around` spread them across the group instead, and
     four dates 60px apart read as four questions rather than one. **Every group grows
     by the same share**, so each cluster has the same room on both sides and the rule
     between them stands midway: grown by their chip count, the four dates had 96px of air
     before the rule and the two types 55px after it, at 1,280. And a chip in the row is the row's height:
     the search field and the funnel are `--touch-target` on every pointer, so the 36px a
     fine pointer gives a chip elsewhere (ADR-137) would stand 8px short of both on the
     one line they share. The row is 44px either way, so this costs no height. */
  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .filter-group.filter-when.filter-promoted .chips {
    justify-content: center;
  }

  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .filter-group.filter-when.filter-promoted .chips .chip {
    min-height: var(--touch-target);
    padding-block: var(--space-2);
  }
}


/* **From 64rem the type sits in the row too.** The stack under it is the month grid,
 * when it is shown, and the body; between 52rem and 64rem the type is a section below
 * the row like any other, which needs no rule of its own. */
@container (min-width: 64rem) {
  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .filter-group.filter-category.filter-promoted {
    --filter-promoted: 1;
    display: block;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
  }

  /* **A rule between the time and the type**, the one T-070 drew between stacked groups
   * turned the way the groups now lie: groups are told apart by a rule and not by their
   * names, and in a row the rule is vertical. Only where there is a time group beside
   * it -- the date pages carry the type alone, and a rule after the search would divide
   * a field from a group, which is not a boundary between two groups. */
  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])):has(> .filter-when) > .filter-group.filter-category.filter-promoted {
    padding-inline-start: var(--space-3);
    border-inline-start: 1px solid var(--outline-variant);
  }

  .filters-collapsed:has(> .filter-promoted) > .search-field { flex-grow: 1000; max-width: var(--filter-search-max); }

  .filters-collapsed > .filter-group.filter-category.filter-promoted .chips { flex-wrap: nowrap; }

  /* The type in the row, as the time above: together, centred in its share, the row's
     height. */
  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .filter-group.filter-category.filter-promoted .chips {
    justify-content: center;
  }

  /* Alone in the row (a date page has no time group), two chips spread across the whole
     row were 311px apart at 1,280: together, beside the funnel, they read as one group. */
  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])):not(:has(> .filter-when)) > .filter-group.filter-category.filter-promoted .chips {
    justify-content: flex-end;
  }

  .filters-collapsed:has(> .filter-actions > .filter-summary:not([hidden])) > .filter-group.filter-category.filter-promoted .chips .chip {
    min-height: var(--touch-target);
    padding-block: var(--space-2);
  }
}

/* The filter, the count and the view switch on one line. They belong together
   because they are the same statement about what is below: what it has been
   narrowed to, how much of it there is, and how it is drawn. */
.list-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

/* The always-visible line. The count of *filters* sits with the word, where it
   qualifies it; the count of *concerts* is pushed to the end, where an eye
   arriving at the list finds it.

   `--touch-target` and not less: this is the one control standing in for the
   whole filter, and on a phone it is a thumb that presses it. */
.filter-summary {
  /* Written for a `<summary>` and now also worn by a `<button>` (T-073), which
     brings a border, a font and a text alignment of its own -- and, being a flex
     item beside a 44px search field, has to be exactly as tall as it looks. */
  box-sizing: border-box;
  /* A control on the bar's card, dressed as the chips beside it are: the page's own
     surface and an outline, a pill. It wore the card's surface when the bar had none,
     which on the card is no edge at all. */
  border: 1px solid var(--outline-variant);
  font: inherit;
  text-align: start;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  /* Without this the flex item is floored at its own content and the switch is
     the thing that has to move. */
  min-width: 0;
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--shape-full);
  background: var(--surface);
  color: var(--on-surface);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  cursor: pointer;
  list-style: none;
  transition: border-color var(--motion-short) var(--motion-easing);
}
.filter-summary::-webkit-details-marker { display: none; }
.filter-summary:hover { border-color: var(--primary); }
.filter-summary[aria-expanded="true"] { border-color: var(--primary); }

/* The search box on the card is a pill like every other control on it: a square-cornered
   field beside a row of pills read as a different kind of thing. Only the bar's box --
   `.preferences` and the month grid keep the field shape of a form. */
.filters-collapsed > .search-field > input[type="search"] { border-radius: var(--shape-full); }

/* Pushed to the end of the line, and stripped of the margin the standalone
   count carries: here it is a word on a line rather than a paragraph above a
   list. */
/* Pushed to the end of the line, and the one thing on it that gives.
 *
 * At 320px the summary's content and the view switch want 394px of a 288px row,
 * so the switch dropped to a second line and the bar went from 54px to 106px --
 * on the page whose whole argument is vertical space. The count truncates
 * instead, and it truncates from the right, so the number a reader is actually
 * reading survives it. Everything else on the line is a control. */
.filter-summary .count {
  margin: 0 0 0 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: var(--weight-regular);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* **A count that is still a floor says so under the number and keeps its width** (T-288). While
 * the rest of the programme is on its way the number is only what the nights present hold. It
 * used to say so in words ("mind. 119"), 42px wider than "376": at 390px that pushed the pill and
 * the reset to a second row, and when the rest arrived they went back up and the whole list
 * moved 56px (a layout shift of 0.14 to 0.18). The words now ride on a visually hidden prefix for
 * a screen reader, and a sighted reader sees the same number, dotted under: still while it is
 * only a floor that will not change (a fetch that failed), breathing while the rest is on its
 * way. **The digits are never dimmed** -- text is held to 4.5:1 -- only the mark under them
 * moves, so reduced motion (every animation ends at once, `animation-iteration-count: 1` below)
 * leaves exactly the still mark. */
.filter-summary .count[data-partial] {
  text-decoration: underline dotted;
  text-underline-offset: var(--underline-offset);
}
.filter-summary .count[data-partial="loading"] {
  animation: count-partial var(--motion-pulse) var(--motion-easing) infinite alternate;
}
@keyframes count-partial {
  to { text-decoration-color: transparent; }
}

.filter-summary[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); }
.filter-chevron { transition: transform var(--motion-short) var(--motion-easing); }

/* How many filters are on, of all of them -- not, as before, of the ones behind
   a second disclosure. It is the whole justification for the collapse: a page
   that hides rows for a reason it does not show looks broken, and with the
   controls behind a summary this number is the reason. `filter.js` fills it. */
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding-inline: var(--space-1);
  border-radius: var(--shape-full);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: var(--text-label-sm);
  font-variant-numeric: tabular-nums;
}

/* What the summary opens onto: a column of questions. Its surface is the bar's card,
   and where it stands in it is `.filters-collapsed > .filter-body`, above. */
.filter-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* The date picker: the month grid, under the icon that opens it (T-066, T-073).
 *
 * It has been in three places in three days -- inside the filter, above the list,
 * and back inside the filter under its own chip -- and the last is where a reader
 * looks for what they just pressed. It carries no date fields any more: the grid
 * writes the same `from`/`to` and draws the span across itself, so a labelled pair
 * of boxes repeating it was a second reading of one state.
 *
 * It takes the whole width of the row it opens under, and drops the card it wears
 * elsewhere: the panel is already a surface, and a card inside a card reads as the
 * panel having grown a second one. */
.date-picker {
  flex: 1 1 100%;
  margin-top: var(--space-3);
}

/* **Any grid inside a filter panel drops the card it wears elsewhere.** The panel
   is already a surface, so a bordered box inside it reads as the panel having
   grown a second one -- which is what `/archive` looked like the moment its grid
   stopped hanging from a chip and sat directly in the body (T-075). Scoped to the
   body rather than to the picker, because that is the condition: being inside a
   surface, not being behind a particular control. */
.filter-body .calendar,
.filters-collapsed > .date-picker .calendar {
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
}

/* The fourth chip in the row is a disclosure, so it follows `aria-expanded`
   rather than `aria-pressed`. Same shape, because it is the fourth answer to the
   same question; the icon is what says it opens onto something. */
/* The month grid's door: an icon, and the only chip in the row that is not a word
   (T-072). It carries less side padding than a chip with a label does, because a
   glyph needs less room around it than a word and this row may not wrap. */
.chip-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

.chip-picker .icon { width: 1.15em; height: 1.15em; }
/* The night or the span the grid picked, beside the icon, so it is on screen with the
   grid shut. The door then stands for a filter that is on, so it wears the open state
   whichever way the grid is: the shortcut beside it does the same when it is pressed. */
.chip-picker-label { white-space: nowrap; }
.chip-picker[aria-expanded="true"],
.chip-picker:has(> .chip-picker-label:not([hidden])) {
  border-color: transparent;
  background: var(--primary-container);
  color: var(--on-primary-container);
}


/* The ends of a chosen span, drawn stronger than the nights between them. A range
   with no visible ends is a smear that says how many nights but not which. */
/* Several questions on one horizontal line -- the dashboard's shape (T-075).

   The public filters ask theirs in a column, one `.filter-group` per row with a
   horizontal rule between; `/admin` puts a search box and one `<select>` on one
   line, because it is a tool for one operator with two questions rather than a
   page a reader arrives at.

   It wraps group by group rather than squeezing. Flexbox breaks a line *before*
   it shrinks anything, so each group is placed whole or moved to the next line,
   and the search field's `flex-basis` is the width below which it goes to a line
   of its own. A search box narrowed to nothing to keep a row together is the row
   winning an argument it should lose. */
.filter-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.filter-line .chips { flex: 0 1 auto; }
.filter-line .search-field { flex: 1 1 14rem; }

/* The dashboard's copy of the same line: search, one facet, and the way back to
   all of them. Its facet is a `<select>` under a visible label rather than a row
   of badges, and a label is a line of text above the control -- so this variant
   aligns on the controls' bottom edges. Centred, the labelled select sits half a
   line high and the search box and the reset hang below it.

   A class rather than `:has(> .field)`, which would say the same thing while
   making the rule fire on a container's contents from three rules away. */
.filter-line-labelled { align-items: end; }
/* Direct children only. `flex-basis` means height in a column (see the rule of
   that name in design.md), and a `.field-row` *is* a column on a phone -- so a
   descendant selector here gave each of its fields a 12rem floor of empty space
   under a 44px control. */
.filter-line > .field { flex: 0 1 12rem; }
.filter-line .field-reset { flex: none; margin: 0; }

/* Search, with the magnifier inside the field rather than beside it. */
.search-field {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-field .icon {
  position: absolute;
  left: var(--space-3);
  color: var(--on-surface-variant);
  pointer-events: none;
}

.filters input[type="search"],
.preferences input[type="search"] {
  width: 100%;
  padding-left: calc(var(--space-3) * 2 + 1.25em);
}

/* The picker is named as well as the form, from the day the date fields were
   briefly outside it (T-068): a `.filters`-scoped selector left them as the
   browser draws a date input, which
   on this page means a white box on a dark surface. */
.filters input,
.preferences input,
.filters select,
.date-picker input {
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--outline-variant);
  border-radius: var(--shape-sm);
  background: var(--surface);
  color: var(--on-surface);
  font: inherit;
}

.filters input:focus,
.preferences input:focus,
.filters select:focus,
.date-picker input:focus { border-color: var(--primary); }

/* A label sits directly above its control. The gap is two pixels rather than a
   step, and the label's own line-height is tightened: at the body's 1.55 a
   four-field disclosure spent more than a phone screen's worth of height on
   nothing but the space around words. */
.field { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }

/* `.field-label` is the same thing over a group of controls rather than one:
   a row of badges has no single element to point a `<label>` at, so the genre
   row names itself with a `<span>` and an `aria-labelledby`. */
.field label,
.field-label {
  font-size: var(--text-label);
  line-height: 1.2;
  color: var(--on-surface-variant);
}

/* Stacked on a phone, side by side when there is room.
   **No `flex-basis` while it is a column.** `flex: 1 1 8rem` reads as "at least
   8rem wide" in a row and "at least 8rem *tall*" in a column, which gave every
   field a 128px floor on a phone -- a label, a 44px control, and sixty-odd pixels
   of nothing under it. The basis belongs in the media query, with the direction
   that makes it mean width. */
.field-row { display: flex; flex-direction: column; gap: var(--space-3); }

/* Clearing one field ---------------------------------------------------------
   An X inside the control, rather than beside it, so it reads as part of the
   field and costs no width of its own.

   The buttons ship `hidden` and `filter.js` reveals them: a control that does
   nothing without JavaScript is worse than no control, and each one appears only
   while its field has something to clear -- an X beside an empty box invites a
   press that changes nothing. */

/* Room for the button, so a long value never runs underneath it. */
.search-field > input[type="search"] { padding-right: calc(var(--space-2) + 1.75rem); }

/* The clear button's room only once there is something to clear: it ships `hidden` and
   appears with the first character, which is when the placeholder goes. Empty, the room is
   the placeholder's -- the filter bar's card took 16px of a phone's field, and that cut
   *Titel, Genre, Spielstät* back to *Spiels* (2026-11-07). */
.search-field > input[type="search"]:placeholder-shown { padding-right: var(--space-3); }

.field-clear {
  position: absolute;
  right: var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--shape-full);
  background: none;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: background-color var(--motion-short) var(--motion-easing);
}

.field-clear:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--on-surface);
}

.field-clear .icon { width: 1rem; height: 1rem; }

/* WebKit draws its own X in a search field; two of them is one too many. */
.filters input[type="search"]::-webkit-search-cancel-button,
.preferences input[type="search"]::-webkit-search-cancel-button { display: none; }

/* A `<summary>` is a shape a thumb presses, so it is sized like one. It was 38px
   against the 44px design.md states -- the same miss `.chip` made, found by
   auditing every route rather than the one page being worked on (T-062).

   One of these left with "Mehr Filter": `.filter-more` was a fold inside a fold
   once the whole filter went behind a summary, and its rules outlived the markup
   by three tickets. The venue page's past is the last `<details>` on the site. */
.venue-past > summary,
.lineup-more > summary {
  min-height: var(--touch-target);
}

/* A rule between the questions, where each one used to carry its name (T-072).
   It is the only boundary these groups have ever needed on a phone, and since
   T-075 it is the only one they have at any width: the panel is a column, so a
   horizontal rule is what a boundary is -- at every width, for 16px less per
   group than a label. The names are still on the rows themselves,
   for anything not looking at the screen.

   **On the group rather than on three class names** (T-075). It was written out
   once per question the concert list happened to ask, so `/venues`' three
   questions ran together with nothing between them and a fourth question on a
   fifth page would have been the fourth place to forget it. `+` rather than
   `:not(:first-child)`: what earns a rule is *having something above it*, and the
   first group in a panel has the summary. */
.filter-group + .filter-group {
  padding-top: var(--space-3);
  border-top: 1px solid var(--outline-variant);
}

/* The way back from the answers is **the funnel's other half**: one pill, split by a
   rule -- what the filter holds on the left, the way out of it on the right -- in the
   first row rather than on a line of its own at the foot of the panel, which was a whole
   row of the card for one 44px icon. The funnel is where the filters it clears are
   counted, so that is where it stands. An icon on all five pages (T-075).

   It shows only while there is something to reset (T-067), so a bar with no filter on is
   exactly the bar it was. **One unit**: both halves are inside `.filter-actions`, so the
   pill wraps whole -- as two flex items the reset wrapped alone, half a pill outside the
   card, between ~333 and 384px. Joined, the pair gives back the gap, and the search lets
   its basis go while the reset shows. The wrapper may shrink and the funnel's count is
   what truncates; the reset never does. */
.filter-actions {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.filter-actions > .filter-summary { flex: 0 1 auto; }

/* Nothing in it to show (a funnel still waiting for its script, no reset): not even the
   form's gap for it. */
.filter-actions:not(:has(> :not([hidden]))) { display: none; }

.field-reset { margin: 0; }

.filter-actions > .field-reset {
  display: flex;
  flex: none;
}

.filter-actions > .field-reset[hidden] { display: none; }

.filter-actions:has(> .field-reset:not([hidden])) > .filter-summary {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

/* `.filters.filters-collapsed`, to beat the pill padding `.filters button[type="reset"]`
   gives a text reset: this one is a square target, 44px and no wider. */
.filters.filters-collapsed > .filter-actions > .field-reset > .icon-button {
  box-sizing: border-box;
  min-width: var(--touch-target);
  padding: var(--space-2);
  border: 1px solid var(--outline-variant);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  background: var(--surface);
  color: var(--on-surface);
  transition: border-color var(--motion-short) var(--motion-easing);
}

.filters.filters-collapsed > .filter-actions > .field-reset > .icon-button:hover { border-color: var(--primary); }

/* While the reset shows, the search is what gives: its 12rem basis is what broke the row. */
.filters-collapsed:has(> .filter-actions > .field-reset:not([hidden])) > .search-field { flex-basis: 9rem; }

/* The pill-shaped buttons a filter form can carry. **Not the front page's
   reset**, which is a word on its own line rather than a 44px
   target of its own (T-070): a text control is sized by its text, and this rule
   would give it a border, a fill and 56px of a phone. */
.filters button[type="reset"]:not(.link-button),
.filters button[type="submit"] {
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--outline-variant);
  border-radius: var(--shape-full);
  background: var(--surface);
  color: var(--on-surface);
  font: inherit;
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.filters button[type="submit"] {
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}

.filters button:not(.link-button):hover { border-color: var(--primary); }

/* Chips ---------------------------------------------------------------------- */

/* They wrap. They used to scroll sideways with the scrollbar hidden, on the
   argument that a fixed height keeps the filter from pushing the list off the
   screen -- but a row of seven genres on a phone then ended at the edge of the
   box with nothing saying there was more, which does not read as "scroll me", it
   reads as "these are the genres". A filter that shows a reader four of seven
   options is worse than a filter one line taller.

   The height argument is answered instead by what is on the page: two rows out
   here rather than three, and the seven genres behind "Mehr Filter", where a
   reader has asked for them and the height is theirs to spend. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chips .chip {
  flex: 0 0 auto;
  /* The site's own stated minimum, and a token where a raw `2.25rem` was: every
     chip measured 39px against the 44px design.md requires and `--touch-target`
     already names (T-062). It costs the filter panel height, which the panel can
     afford now that it is closed by default. */
  min-height: var(--touch-target);
  /* `--space-3` rather than `--space-4` on the sides (T-072): the four answers to
     *when* wanted 349px of a 334px row at 16px a side and fit at 12. Measured on
     the tightest row and applied to every badge on the site, because a chip is one
     shape -- the genre and venue rows simply get narrower with it. */
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--outline-variant);
  border-radius: var(--shape-full);
  background: var(--surface);
  color: var(--on-surface);
  font: inherit;
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--motion-short) var(--motion-easing),
    border-color var(--motion-short) var(--motion-easing);
}

/* A chip is smaller where nothing touches it (ADR-137, T-265). `any-pointer`, not
   `pointer`: `pointer` names only the primary device, so a laptop with a
   touchscreen reports `fine` and would get a chip a finger then has to hit. "No
   coarse pointer at all" is the one condition that is right for both; everything
   else -- a phone, a tablet, a touch laptop, a browser that reports nothing --
   keeps the 44px above. Only the chip: the funnel, the search field and the
   buttons stay `--touch-target`, and a chip is still never under WCAG 2.5.8's 24px.

   The block padding goes too: a label line and `--space-2` a side is 39px by
   itself, so the minimum alone would shrink nothing. At `--space-1` the minimum is
   what sizes the chip, and a button centres its label inside it. */
@media (any-pointer: fine) and (not (any-pointer: coarse)) {
  .chips .chip {
    min-height: var(--chip-target-fine);
    padding-block: var(--space-1);
  }
}

.chips .chip:hover { border-color: var(--primary); }

.chips .chip.is-on {
  border-color: transparent;
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* The genre row is a quieter kind of question than the date and the category:
   those two narrow to what a reader is doing on a given night, this one is a
   preference. A lighter face rather than a different shape -- one control that
   looks like two is how a row of badges stops reading as one row. */
.chips-genre .chip { font-weight: var(--weight-regular); }

/* The level under the bucket, revealed one bucket at a time (T-096, T-102).
 *
 * A reader who has pressed *Elektronisch* is offered Techno, Rave, House, Drum &
 * Bass. It is a second row rather than more chips in the first, because the two
 * ask different questions -- *what kind of music* and then *which kind exactly* --
 * and a single row of all eighty-four is the vocabulary printed sideways.
 *
 * Indented and smaller, so the row reads as being **under** the one above rather
 * than beside it: the same margin the panel's own groups use, and `--text-small`
 * against the buckets' `--text-label`. Nothing here writes a raw value.
 *
 * **On the front page there may be several at once** (T-102), one per pressed
 * bucket, so each block has to say which chip it belongs to on its own -- a
 * caption, a rule down its leading edge and a ground a step off the panel's. The
 * ground is what the indent alone could not do: two blocks stacked under a row of
 * seven chips read as one long second row without it. */
.chips-subgenre {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--shape-sm) var(--shape-sm) 0;
  /* One step *up* the container ladder rather than down: the panel itself is
     `--surface-container-low`, so a block painted the same colour is a block with
     no ground at all -- which is what the first version shipped, and the left rule
     was doing the whole job alone. */
  background: var(--surface-container);
  align-items: center;
}

/* Which bucket this block is under, as a word rather than a control.
 *
 * It is the bucket's own name, repeated from the chip that opened it -- and that
 * repetition is the point: with two blocks open, nothing else says which is
 * which. T-096 had to drop the bucket's name from the *chips* in here, because
 * `Elektronisch` as a chip beside `Elektronisch` as a bucket is a distinction no
 * reader should have to infer. As a caption it is not a control, so the
 * ambiguity does not arise -- it labels the block instead of competing with it. */
.subgenre-caption {
  flex: 0 0 auto;
  color: var(--on-surface-variant);
  font-size: var(--text-label-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* That a bucket has a level under it, said on the chip before it is pressed.
 *
 * Small, muted, and it turns to face down when the block is open -- the same
 * glyph the filter's own summary uses for the same fact, which is what makes it
 * readable without a legend. A reader who never presses *Elektronisch* would
 * otherwise never find out that Techno can be asked for at all. */
.chip-more {
  width: 0.9em;
  height: 0.9em;
  margin-left: var(--space-1);
  vertical-align: -0.1em;
  opacity: 0.6;
  transition: transform var(--motion-short) var(--motion-easing);
}
.chip[aria-pressed="true"] .chip-more { transform: rotate(180deg); opacity: 1; }

.chips-subgenre .chip {
  /* Smaller type, full-size target. `--touch-target` is the site's own stated
     minimum and T-062 was spent getting every chip up to it, so this row does not
     get to opt out -- a genre is pressed with the same thumb as a bucket. What it
     may have is a quieter voice, which is what says it is the second question
     rather than a second set of first ones. */
  font-size: var(--text-label-sm);
  font-weight: var(--weight-regular);
}

/* What a genre chip is not showing, under the chips it is about (T-102).
 *
 * It was a `.callout` below the whole panel -- `border-left: 3px solid var(--warn)`
 * on `var(--warn-soft)`, which is what a switched-off source and a failed run wear
 * on the dashboard. Nothing is wrong here: it is an offer to see more, and it is
 * now in the page's ordinary quiet register, the same size and colour as every
 * other thing in this panel that is not a control.
 *
 * `--space-2` of top margin rather than the group's own rhythm: it belongs to the
 * chips above it, and a gap the size of the one between the groups would read as a
 * fourth question. */
.widening-note {
  margin: var(--space-2) 0 0;
  color: var(--on-surface-variant);
  font-size: var(--text-label);
  line-height: var(--leading-normal);
}
/* The offer itself, which is the only thing in the sentence a reader can press. */
.widening-note .link-button { color: var(--primary); }

/* The four answers to *when*, on one line (T-072).
 *
 * `Heute · Morgen · Wochenende` behind a calendar glyph is 317px of the 334 a
 * 390px phone leaves, and of the 304 a 360px one does. Two steps buy the
 * difference: the row is spaced a step tighter than a badge row that may wrap,
 * and the icon chip carries less side padding than a chip with a word in it --
 * a glyph needs less room around it than a word, and this is the one row that
 * may not break. At 320px it still wraps, which is measured and accepted.
 *
 * Written here rather than beside `.chip-picker`, because `.chips .chip` and
 * `.chips` are what these have to beat and the cascade reads in order. */
.chips-date { gap: var(--space-1); }
.chips .chip-picker {
  padding-inline: var(--space-2);
  position: relative;
}

/* With a date beside the glyph it is a chip with a word in it, and takes a word's
   trailing padding. */
.chips .chip-picker:has(> .chip-picker-label:not([hidden])) { padding-inline-end: var(--space-3); }

/* The door is 33.6px wide painted and 44px wide to a thumb (T-080).
 *
 * Two of this site's own rules met here: 44px is the minimum for a shape, and
 * this row may not wrap. The row wants 296.5px at every width and a 360px phone
 * gives it 304 -- so widening the chip to 44 is 2.9px more than the row has, and
 * wraps it on the commonest phone size there is.
 *
 * What resolves it is the distinction the rule was always about and this site had
 * never written down: **a control's painted size and its target are two
 * measurements**. WCAG defines a target as the region that accepts a pointer
 * action rather than the box that is drawn, Material puts a 24dp icon inside a
 * 48dp target, and Apple says the same at 44. So the glyph keeps its width and
 * the tap does not.
 *
 * It takes the 44 from the **leading** side only, where the filter panel's own
 * padding leaves 12px that nothing else claims -- `elementFromPoint` returns
 * `filter-panel-body` across all of it, at 320, 360 and 390. The trailing edge is
 * untouched, because 4px of gap is all that stands between this chip and *Heute*
 * and two overlapping targets are worse than one small one.
 *
 * A square of exactly `--touch-target`, anchored to the padding box's trailing
 * edge and centred on the block axis, rather than a pair of negative insets: the
 * number in the rule is then the number being promised, and it does not have to
 * be re-derived from the chip's border width. `inset-block: 0` was the first
 * version and is wrong by two pixels -- an absolute inset resolves against the
 * *padding* box, so the strip beside the chip came out 42 tall while the chip
 * itself was 44. */
.chips .chip-picker::before {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 50%;
  width: var(--touch-target);
  height: var(--touch-target);
  transform: translateY(-50%);
}

/* The chips on a narrowed page (`/genres/jazz`, `/when/weekend`) are links.
 *
 * On the front page a badge row is a *question asked of rows that are all
 * present*, and pressing one hides the rest. Here the other genres' rows are not
 * on the page at all -- it holds only its own concerts -- so the only honest
 * thing a chip can do is go somewhere. Same shape, same weight, same pressed
 * state for the one you are on; a different element, because it does a different
 * thing. It also means the page needs no script whatsoever.
 *
 * `inline-flex` rather than the button's own layout: `min-height` does nothing to
 * an inline element, so an `<a>` styled as a chip is half the height of one
 * without it. */
.chips a.chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* The trail above a genre page's heading (T-114). One line of label-sized text:
   measured at 390px it costs 23px, which the heading's restating lead paid for.
   The separator is drawn, not written, so a screen reader hears three links and
   not two chevrons. `min-height` is WCAG 2.2's 24px for a target in a row. */
.crumbs { margin: 0 0 var(--space-1); }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-label);
  color: var(--on-surface-variant);
}
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before {
  content: "";
  width: 0.4em;
  height: 0.4em;
  margin-inline: var(--space-2);
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  color: var(--on-surface-variant);
}
.crumbs a:hover { color: var(--primary); }

/* The genre index (T-114) ---------------------------------------------------
   One group per bucket, and the dates before them. A group is its heading and its
   chips; the space between groups is the container's, not each child's
   (design.md, *Space between groups is the container's job*). */
.genre-index {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.genre-index-heading {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  font-size: var(--text-title-lg);
}
/* The bucket's name is a link to its page and reads as a name, the way a venue
   card's does: underlined and red, seven of them turned the index into a column of
   warnings between the chips. */
.genre-index-heading a { color: var(--on-surface); text-decoration: none; }
.genre-index-heading a:hover { color: var(--primary); text-decoration: underline; }
/* How many concerts are behind a link. Quieter than the word, because the word is
   what a reader is scanning for and the number is what they check once found. */
.chip-count {
  color: var(--on-surface-variant);
  font-size: var(--text-label-sm);
  font-weight: var(--weight-regular);
}
.chips a.chip .chip-count { margin-inline-start: var(--space-2); }

.count {
  margin: 0 0 var(--space-5);
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}
.no-results { padding: var(--space-8); text-align: center; color: var(--on-surface-variant); }

/* How much, and how shown ---------------------------------------------------
   The count and the view switch on one line. They are the same kind of
   statement about what follows -- how much there is, and in which of the two
   renderings -- and neither is worth a row of a phone screen alone. The count
   takes the space (`margin-right: auto`) so the controls sit at the end of the
   line, where something that changes the whole page below it belongs. */

.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
}

.list-head .count { margin: 0 auto 0 0; }

/* The one control that opens the month grid on `/saved`, where there is no date
   row to put it in (T-068).

   It was two buttons in a pill -- *Liste* and *Kalender*, `aria-pressed` on
   whichever was on -- and it never switched a view: the list stayed exactly where
   it was and the grid appeared above it. One button and `aria-expanded` says what
   it always did. The pill went with the second button; what is left is a round
   icon control the size of every other one on that line.

   The concert list has no copy of this. There the grid is opened by the *Datum*
   chip in the row that already asks *when*, because one page may not ask one
   question through two controls. */
.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  padding: 0;
  border: 0;
  border-radius: var(--shape-full);
  background: none;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition:
    background-color var(--motion-short) var(--motion-easing),
    color var(--motion-short) var(--motion-easing);
}

.view-button:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--on-surface);
}

.view-button[aria-expanded="true"] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* The month grid -----------------------------------------------------------
   A map of the month rather than a second list of it. Vienna runs three to
   fifteen concerts a night and a phone gives a cell about fifty pixels, so a
   cell holds a date and a count and never a title -- two names out of fifteen
   behind a "+13" is a worse list than the list. Tapping a night narrows the
   list underneath; the grid navigates and the rows still hold the concerts.

   Mobile first, and here that is the whole design: seven equal columns always
   fit, every cell is a full touch target, and nothing scrolls sideways. The
   wider layout at the end only makes the cells taller. */

.calendar {
  margin: 0 0 var(--space-6);
  padding: var(--space-3);
  border: 1px solid var(--outline-variant);
  border-radius: var(--shape-lg);
  background: var(--surface-container-low);
}

.calendar-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.calendar-month {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--text-title-lg);
  font-weight: var(--weight-medium);
  text-align: center;
}

/* One chevron in the sprite, turned. A left and a right symbol would be two more
   paths to keep in step with a shape that is already drawn once. */
.calendar-page-previous .icon { transform: rotate(90deg); }
.calendar-page-next .icon { transform: rotate(-90deg); }

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-1);
}

/* Seven touch targets across a phone is a geometry problem before it is a design
   one: 7 x 44px is 308px of grid, and a 360px phone has 328px left after the
   page's own margins. So on a phone the grid gives up its gap and the card gives
   up most of its padding, which buys 45px cells at 360 and 390 where there were
   40 and 44 (T-062). The cells are separated by the surface behind them rather
   than by a gap; nothing else about the grid changes. */
@media (max-width: 30rem) {
  .calendar { padding: var(--space-1); }
  .calendar-grid { gap: 0; }
}

.calendar-weekdays {
  margin-bottom: var(--space-1);
  color: var(--on-surface-variant);
  font-size: var(--text-label-sm);
  text-align: center;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  /* Or one long month name in a cell takes the whole grid off the screen --
     the rule a card in a grid learned the hard way. */
  min-width: 0;
  min-height: var(--calendar-cell);
  padding: var(--space-1) 0;
  border: 0;
  border-radius: var(--shape-sm);
  background: none;
  color: var(--on-surface-variant);
  font: inherit;
  cursor: pointer;
  transition: background-color var(--motion-short) var(--motion-easing);
}

.calendar-day:hover:not([disabled]) {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
}

/* A night with nothing on is the shape of the month, not a control. */
.calendar-day[disabled] {
  color: var(--outline);
  cursor: default;
}

/* A night past the window, before the rest has come in: still a control, drawn as not yet known
   and not as the disabled shape of a quiet month (ADR-146). */
.calendar-day.is-pending {
  color: var(--on-surface-variant);
}

/* Its count slot holds an outlined bubble the size of a real count, so a night to be loaded reads
   differently from a quiet one, which has none and is disabled. Dashed, drawn as an outline so it
   adds nothing to the pill's size. */
.calendar-count.is-pending {
  background: none;
  color: var(--on-surface-variant);
  outline: 1px dashed var(--outline);
  outline-offset: -1px;
}

.calendar-number {
  font-size: var(--text-label-sm);
  font-variant-numeric: tabular-nums;
  line-height: var(--leading-tight);
}

/* Today, and the night the reader picked. Two different statements: one is where
   the calendar is, the other is what the list below is showing, so only the
   second gets a ring. */
.calendar-day.is-today .calendar-number {
  color: var(--primary);
  font-weight: var(--weight-bold);
}

/* A chosen span, drawn as one thing rather than as several chosen nights.
 *
 * Every night in the span carries `aria-pressed`, and when that alone drew the
 * ring, four consecutive nights read as four separate picks. The nights between
 * take the container tint and the two ends take the ring, so the shape says where
 * it starts and stops -- which is the whole of what a range has to say and a
 * single day does not. */
.calendar-day[aria-pressed="true"] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.calendar-day.is-edge {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.calendar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--calendar-pill);
  padding: 0 var(--space-1);
  border-radius: var(--shape-full);
  color: var(--on-surface);
  font-size: var(--text-label-sm);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}

.calendar-count.is-level-1 {
  background: color-mix(in srgb, var(--primary) var(--density-1), var(--surface-container));
}
.calendar-count.is-level-2 {
  background: color-mix(in srgb, var(--primary) var(--density-2), var(--surface-container));
}
.calendar-count.is-level-3 {
  background: color-mix(in srgb, var(--primary) var(--density-3), var(--surface-container));
}
/* The two loudest steps are dark enough that the surface's own text colour stops
   reading on them, so they take the accent's. */
.calendar-count.is-level-4 {
  background: color-mix(in srgb, var(--primary) var(--density-4), var(--surface-container));
  color: var(--on-primary);
}
.calendar-count.is-level-5 {
  background: color-mix(in srgb, var(--primary) var(--density-5), var(--surface-container));
  color: var(--on-primary);
}

.calendar-footer {
  margin: var(--space-3) 0 0;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
  text-align: center;
}

/* The list -----------------------------------------------------------------
   A concert is a card at every width (ADR-105): a filled surface with the time in its
   header and the heart in its corner, then the title, the tags and, on the card's bottom
   edge, the venue with the organiser and the kind of night at its end. A day's cards run in one, two or three
   columns (the media queries with the other wide-screen rules, further down). Everything
   else on the card is quieter than the title. */

/* A night below the fold is not styled, laid out or painted until the reader scrolls near it
   (T-278): the front page is ~46,000 elements and its first paint waited for all of them.
   The rows stay in the DOM, so the filter, the calendar and find-in-page still reach them;
   `auto` in the intrinsic size remembers a night's measured height once it has been seen.

   Until then a night is as tall as its rows say (`data-rows`, times a card and its gap, in the
   rows the columns the width gives it make): one height for every night put the phone's scrollbar at a
   quarter of its length, because a few nights hold a hundred cards. Where `attr()` cannot
   read a number `--day-estimate` stays, and so it does on `/saved` and `/archive`: they carry
   no `data-rows` on purpose, since their scripts decide which served rows show and the
   server's count would be wrong there. `filter.js` keeps `data-rows` to what it shows; a
   night already drawn keeps its remembered height until it is drawn again, so after a filter
   only the nights never seen are re-estimated -- accepted, scroll anchoring holds still what
   the reader sees.

   The padding is the focus ring's room -- 2px of outline and 2px of offset, which the paint
   containment would otherwise cut flat at the night's box on the sides and underneath --
   and the negative margin and the shorter bottom margin give it back. */
.day {
  --day-columns: 1;
  margin: 0 calc(-1 * var(--focus-ring-reach)) calc(var(--space-8) - var(--focus-ring-reach));
  padding: 0 var(--focus-ring-reach) var(--focus-ring-reach);
  content-visibility: auto;
  contain-intrinsic-block-size: auto var(--day-estimate);
}
@supports (width: attr(data-rows type(<number>), 1)) {
  .day[data-rows] {
    contain-intrinsic-block-size:
      auto calc(
        var(--day-heading-height) + var(--space-2)
        + round(up, attr(data-rows type(<number>), 2) / var(--day-columns), 1) * var(--card-estimate)
      );
  }
}

.day-heading {
  position: sticky;
  top: var(--app-bar-height);  /* the bar's own height, so it actually clears it */
  z-index: 5;
  margin: 0 0 var(--space-2);
  padding: var(--space-2) 0;
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* A grid of one column, with the space between cards as its `gap`: one gap, paid once
   between two cards and never at an end. The columns are a day's, and the three lists of
   what a reader kept (`/saved`, `/archive`): the media queries further down. A venue's own
   page lists `.events-single` and its folded past, which stay one column of full-width
   cards (54 of its 69 days hold one concert). The heading is outside the list and stays
   full width and sticky. A card the filter hides is `display: none` (the `[hidden]` rule
   above wins over `.event`'s grid), so it leaves no hole. */
.events {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* One concert: a card, and a grid of its own -- seven columns and four rows, in the order
   a reader asks: the header (the status, the time, the series mark, a free column, the
   calendar file, the source link and the heart in the corner), the title, the genres, the
   venue with the organiser and the kind of night at its end (ADR-077, ADR-105, ADR-107).

   **Each card is its own grid and its lines are not aligned with its neighbours'.** A
   card in a grid row is as tall as the tallest (the default `stretch`), and the spare
   height belongs to the last row (`1fr`), where the venue sits on the card's bottom edge.
   A row with nothing in it is an `auto` track with no item and takes no height -- 20% of
   cards have no tags, and a venue's page has no
   venue -- which is why the card has no `row-gap`: the space above a line is a margin on
   the line, paid only where the line is.

   **The whole card is the title's link** (`a.event-title::after`, below), so the card is
   the containing block of that pseudo-element. */
.event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, max-content) auto auto minmax(0, 1fr) auto auto auto;
  grid-template-rows: auto auto auto 1fr;
  align-items: start;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--shape-md);
  /* The card's fill, a variable because a status tints it (`.event-alarm`,
     `.event-caution`, below) and the state layers are mixed over whatever it is. */
  --card-fill: var(--surface-card);
  background: var(--card-fill);
  transition: background-color var(--motion-short) var(--motion-easing);
}
/* A status that departs from "it is on, here, at this time" (ADR-106). The grey
   text steps darker on the tint in the light scheme, where the plain card's grey misses
   4.5:1; the variable is inherited, so the venue, the genres, the category badge and the
   struck title all follow, and `--on-card-variant` is the plain grey again in the dark. */
.event-alarm,
.event-caution { --on-surface-variant: var(--on-card-variant); }
.event-alarm { --card-fill: var(--card-alarm); --flag-tone: var(--on-card-alarm); }
.event-caution { --card-fill: var(--card-caution); --flag-tone: var(--on-card-caution); }

/* The hover state layer: the same `--state-hover` opacity of the text colour every control
   mixes, here over the card's own fill. Keyed on the title's link because it covers the
   card (below): a pointer over the heart, the venue or the tags is over a control of its
   own, which has its layer, and the card is not what a press there opens. */
.event:has(a.event-title:hover) {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), var(--card-fill));
}
/* Pressed, the same way: `--state-pressed` over the card's fill while the title's link --
   the card -- is held. */
.event:has(a.event-title:active) {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-pressed) * 100%), var(--card-fill));
}

/* The card is the focus indication (ADR-105): the site's focus ring, drawn round the card
   and not round the title's words, which are one line of a card that opens whole. The
   title link's own ring is off in that case, so there are not two. The title's unfold
   while it has focus (`.event-title-run:has(...)`, below) is unchanged. */
.event:has(a.event-title:focus-visible) {
  outline: var(--focus-ring-width) solid var(--primary);
  outline-offset: var(--focus-ring-offset);
}
.event a.event-title:focus-visible { outline: none; }

/* The card's header. The time and the series mark share its line, level, and the heart
   (below) is in its corner. */
.event-time {
  grid-area: 1 / 2;
  align-self: start;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
}

/* The status, first in the header, before the time and the series mark (ADR-106,
   ADR-110): the left of the header reads as one phrase -- *Ausverkauft 20:00 ↻* -- and the
   controls hold the right, so the header has two groups on two edges and nothing floating
   between them. The word is the signal and the tone helps it: a pill of the tint's tone over
   the card's fill, ringed in the tone. A pill of one line, so the header stays as tall as the
   time; it is under the card's link like the time, so a press on it opens the concert. Two
   classes, to beat `.badge` and `.badge-cancelled` further down.

   Its column is `minmax(0, max-content)`: as wide as the word where there is room, and the
   one track in the header that gives way where there is not, so a word too long for the
   floor takes an ellipsis rather than pushing the controls off the card. */
.event > .event-flag {
  grid-area: 1 / 1;
  justify-self: start;
  /* Centred on the time's line, not on its baseline or its top: the pill (12px at 1.5, 18px)
     is shorter than the time's line (14.4px at the body's leading, 22.3px), so it sits half
     the difference down, and a line drawn through the time's middle runs through the pill's. */
  align-self: start;
  --flag-leading: 1.5;
  margin: calc((var(--text-body-sm) * var(--leading-normal) - var(--text-label-sm) * var(--flag-leading)) / 2) 0 0;
  /* 6px to the time, a step and a half: 8px left 131px at 320px in CI's font against the 132
     *Nachholtermin* needs; 6 leaves 133 -- under 1%, the named exception to the 5% a step
     keeps for a font (design.md, ADR-110). The width is the cell less the gap, or the pill
     would run into the time's cell when it gives way. */
  margin-inline-end: calc(var(--space-1) * 1.5);
  max-width: calc(100% - var(--space-1) * 1.5);
  /* Half the badge's usual inline padding: *Nachholtermin* needs 140 with the usual 8px a
     side and 132 at 4px. The ring and the fill still hold the word. */
  padding-inline: var(--space-1);
  line-height: var(--flag-leading);
  vertical-align: baseline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: color-mix(in srgb, var(--flag-tone) calc(var(--card-flag-tone) * 100%), var(--card-fill));
  color: var(--flag-tone);
  box-shadow: inset 0 0 0 1px var(--flag-tone);
}

/* The calendar file, the source link and the heart in the header's corner (ADR-107). The
   header is a row of its own, as tall as the controls in it: each is a whole 44px target
   that reaches up into the card's top padding (`-space-3`) and no further down than the
   row's bottom edge, so the row is `--touch-target` less that padding and no control hangs
   into the title's line below. The heart is pulled out sideways by the card's padding as
   well (12px of the 16px), so its icon sits where a corner's would. The time, the series
   mark and the status sit at the row's top, not its centre: a 44px target pulled up by
   12px has its middle 10px into the row, which is the middle of a 20px text line at the
   row's top -- so the icons and the time are level, and the 12px under the time is the
   same space as the padding above it. */
.event > .heart,
.event > .event-source,
.event > .event-calendar {
  align-self: start;
  margin-top: calc(var(--space-3) * -1);
}
.event > .heart {
  grid-area: 1 / 7;
  margin-inline-end: calc(var(--space-3) * -1);
  margin-inline-start: 0;
}
.event > .event-source { grid-area: 1 / 6; }
.event > .event-calendar { grid-area: 1 / 5; }

/* The whole card is the link (ADR-105). The title's link is not positioned and neither is
   its scroller, so the card is the containing block and `inset: 0` is the card. What a
   press must not open is raised above it -- the heart, the calendar file, the venue's
   link, the source link and the tags, which are scrollers and take a swipe.
   The title's own run is a scroller too, but it cannot be raised (it is the cover's parent),
   so the cover goes *under* it instead: `z-index: -1` puts it below the run's text -- the
   run is a stacking context through its mask -- and above the card's blank area. The run is
   then the hit target over the title, which is what a wheel or a swipe needs: Firefox walks
   the frame parent chain, and an absolutely positioned cover's parent is the card, which
   skipped the run and never scrolled it (2026-10-18, design.md). A tap on the title's text
   still navigates, because the link is the run's content. The title link's focus ring is
   the card's focus indication; a second would be two. */
.event a.event-title::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--shape-md);
}
.event .heart,
.event .event-calendar,
.event .event-source,
.event a.event-venue,
.event .event-genres {
  position: relative;
  z-index: 1;
}
/* The marks that carry a `title` tooltip (ADR-099's estimate, a door, a series) are raised
   the same way, or the card's link would take the pointer and the tooltip would never show.
   Only these marks, not `.event-time`: an exact time is part of the card's target. */
.event .event-series,
.event-time .time-doors,
.event-time .time-estimated {
  position: relative;
  z-index: 1;
}

/* An event whose time nobody published. A dash keeps the spine straight; the
   words are still there for anyone listening. */
.time-unknown { color: var(--on-surface-variant); }

/* A door time standing in for a start the venue never published. It has to read
   as *a* time and not as *the* time, so it takes the muted colour rather than a
   badge or a prefix -- the column is a spine to run an eye down, and a word in it
   stops the eye at the row with the least to say. The title attribute and the
   visually-hidden label carry the distinction for anyone who needs it. */
.time-doors { color: var(--on-surface-variant); }

/* A start nobody published, estimated from what this house usually does on this
   kind of night (ADR-099). Muted like a door, and italic where a door is upright:
   the door is the venue's word and this is ours. The asterisk and the title say
   so in words; the italic is only the part that can be seen at a glance. */
.time-estimated { color: var(--on-surface-variant); font-style: italic; }

/* On the concert's own page the estimate is a link to its footnote (ADR-115):
   "ca. 19:00*", which is words in a line and so not the 44px rule's business
   (design.md, *An icon control is a target; a text link is sized by its text*) --
   but it is what a thumb must hit to reach the sentence, so it takes the line's own
   height as its target, 24.8px at the body size, WCAG 2.2 SC 2.5.8 (ux.md C24). An
   inline box is only as tall as its glyphs, an inline-block as tall as its line. */
.facts a.time-estimated { display: inline-block; }

/* The title and everything that qualifies it, on one line.

   The badges used to be flex items of `.event-body`, which is a column -- so a
   sold-out marker or a cadence took a whole row of the card to say one word, on
   a page whose job is letting an eye run down a few hundred rows. They wrap when
   a long title leaves them nowhere, which is the only time they cost a line.

   `baseline` rather than `center`: the badge is set two steps smaller than the
   title, and centring it hangs it visibly above the words it sits between. */
.event-line {
  grid-area: 2 / 1 / 3 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}
/* A status on a line of its own above the title. No longer the list card's (its status
   is the header badge, ADR-106); it is the `/discover` card's, which builds the
   element in `discover.js`. `flex-basis: 100%` is what makes it a line and not a
   neighbour; the badge inside stays its own width. */
.event-status {
  flex: 0 0 100%;
  /* A flex container so the badge is a box of its own height and not an inline
     one in a line box the row's text size sets: measured, that line was 25px for a
     20.6px badge, and the row grew 33px where 28.6 was all the badge needed. */
  display: flex;
}

/* The margin is for a badge sitting in running text. In this row the gap does
   that job, and both together read as a stray space. In the genre run the pills
   are spaced by the whitespace between them, and sit on the run's baseline at the
   pills' own line height so that a badge among them does not grow the line.
   A Discover card's run of tags opens with its kind of night, and the margin
   there indented the whole first row past the second (T-258). */
.event-genres .badge,
.event-where .badge,
.deck-tags .badge {
  margin-left: 0;
}
.event-genres .badge,
.event-where .badge {
  line-height: 1.5;
  vertical-align: baseline;
}

/* The title is one line that scrolls (ADR-076), in a wrapper that is the scroller
   (`.event-title-run`, below, which shares the genre run's fade). The link is not the
   scroller: a swipe along the name is a pan, a tap on it is the row's way in.

   `break-word` is for the one state where the title wraps again -- focused from the
   keyboard, when it is shown whole. `Hautzinger/Loibner/Rosmanith` is 43 characters
   to a line breaker and at 320px it once took the page sideways with it (T-062). */
.event-title {
  color: var(--on-surface);
  font-weight: var(--weight-medium);
  text-decoration: none;
  overflow-wrap: break-word;
}
.event-title:hover { color: var(--primary); }
/* *Abgesagt* and *Verschoben* (ADR-075, reversed in part for *Verschoben* by the
   owner): quieted and struck, so the row stops reading as a night to go to on this
   date. A cancellation is off; a postponement is not on the date it is listed under.
   A *Nachholtermin* is not struck, because its date is the replacement -- that is why
   the two are separate statuses now. The colour is the variant text colour and no
   further -- a lighter colour and a line are two signals, and a third would be an
   illegible one. The line is not spoken; the badge in the card's header, read before
   the title (ADR-106), is what a reader is told. */
.event-title-cancelled,
.event-title-postponed {
  color: var(--on-surface-variant);
  text-decoration: line-through;
}
/* The clock of a postponed row, struck with its title: a real time, a door, or an
   estimated start (a `span`, not a `time`, because it is not a start). The dash of a
   row with no time is neither, and there is nothing in it to supersede. */
.event-time-postponed time,
.event-time-postponed .time-estimated { text-decoration: line-through; }
/* The date of a postponed concert on its own page: the same quiet strike, on the
   fact and not the heading (the concert is on, later). */
.fact-superseded {
  color: var(--on-surface-variant);
  text-decoration: line-through;
}
/* The card's last line: where it is (ADR-077), and at its end who presents it and what kind
   of night it is (ADR-107, amended). The venue's name -- or on a venue's own page the room,
   or nothing -- and, right-aligned, the presenter's pill where a registered one presents the
   night, then the kind badge. It is the card's last row, which takes the
   spare height (`.event`), and it sits on the card's bottom edge, so cards of a grid row
   stretched to the tallest keep their venue on their own bottom edge. A flex line: the
   venue's name is cut with an ellipsis where they do not all fit (285 of 1,720 cards at 320px, measured before a presenter's pill shared the line;
   none from 390px) and the pill and the kind keep their width (the pill is capped). Nothing it does can move the genres,
   which are above it.

   The space above it is a margin and not a gap: a card with nothing on a line must not
   pay for it, and the container is not rendered then. */
.event-where {
  grid-area: 4 / 1 / 5 / -1;
  align-self: end;
  margin-top: var(--space-1);
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}
.event-where {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.event-where > .event-venue {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-where > .badge-category {
  flex: none;
  margin-inline-start: auto;
}
/* The pill gives way first (ADR-134): it shrinks, down to `--presenter-min-width`, before the
   venue's name is cut. A flex item shrinks in proportion to its `flex-shrink` times its base
   size, so a shrink factor of 1000 against the venue's 1 puts all but a thousandth of any
   overflow on the pill (100 left the house 1px short at 390px), and the venue starts to give
   way only once the pill is at its floor. */
.event-where > .event-presenter {
  flex: 0 1000 auto;
  min-width: var(--presenter-min-width);
  margin-inline-start: auto;
}
/* The right-aligned group starts at whichever of the two comes first: the pill when there
   is one, otherwise the badge. The badge after a pill does not push itself. */
.event-where > .event-presenter + .badge-category { margin-inline-start: 0; }
/* A house with a room is one link of two spans: the house's name gives way, with the ellipsis,
   and ` · Halle D` does not -- at 320px "Wiener Stadthalle · Hall…" would make Halle D and
   Halle F the same text on 75 cards. The link is a flex box that can shrink
   (`min-width: 0`, above) so the house span can; `pre` keeps the space the separator opens
   with, which a flex item would otherwise collapse. */
.event-where > .event-venue-roomed {
  display: flex;
  align-items: baseline;
}
.event-venue-house {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-venue-room {
  flex: none;
  white-space: pre;
}

/* The venue is a link and reads as the quiet line it always was: plain until the
   pointer is on it, like the title above it. A list where two things per row are
   underlined in the accent colour is a list of links rather than a list of
   concerts. */
.event-venue { color: inherit; }
a.event-venue { text-decoration: none; }
a.event-venue:hover { color: var(--primary); }

/* What kind of night, on the line under the title (T-097, T-103, ADR-077).
 *
 * **Outlined pills, all of them, in one run that scrolls** (ADR-074). T-097 put these on the row as plain text and
 * the argument was sound for what it was answering: "a pill is a claim with a box
 * around it, and 1,571 rows of boxes is a second list running down the page beside
 * the concerts". What it could not do is separate the two facts on the line -- the
 * room and the music were one run of words divided by one mark, and only the first
 * of them was a link. The box is what ends the venue's name without a reader
 * having to read it.
 *
 * It is the outline the event page gives a genre (`.genre`), one step smaller and
 * in the variant colour: the same fact, quieter, because here it is beside a
 * hundred others. Never the filled `.badge` of a status or a category on the line
 * above -- those two are one per row and this is any number.
 *
 * **One line that scrolls sideways, and no scrollbar.** It is a grid item of the
 * card, so `min-width: 0` (below) is what lets it be narrower than its own
 * content, which is the whole of scrolling. It cannot take the page sideways,
 * whatever a genre is called. It has the card's third row, under the title, and the
 * venue's line after it; a card with no tags has no such element at all.
 *
 * **The fade is the affordance, and only where there is something to fade.** A
 * hidden scrollbar says nothing (the chips above tried it and were reverted), so
 * the run's end is masked out over `--space-6`. A fade that is always there dims
 * the last pill of a run that fits (measured: about 9% of the rows at 390px), which
 * reads as a pill cut off with nothing behind it. So where the browser has
 * scroll-driven animation the two fades are driven by the run's own scroll
 * position: an element that does not scroll has no scroll timeline, its animations
 * do not run, and both fades stay at their resting width of nothing. The end fade
 * is full at the start and gone at the end, so the last pill is read clear; the
 * start fade comes in over the first `--space-6` scrolled, so a pill scrolled half
 * out at the left does not look cut by accident. Elsewhere the end fade is
 * permanent and a spacer after the last pill lets it be scrolled clear of it.
 *
 * The mask is `currentcolor`, not a colour of its own -- only the alpha is read --
 * so it holds on any surface, which a background-coloured overlay would not. The
 * two widths are registered lengths (`@property`) because a gradient stop cannot be
 * animated through a variable that has no type.
 *
 * `tabindex="-1"` is in the markup (see `_event_item`): Chrome would otherwise make
 * every run a tab stop.
 *
 * **The title's wrapper (`.event-title-run`) is the same scroller** (ADR-076), so it
 * shares this block: one fade, one set of tokens. **So is the concert page's genre run**
 * (`.genre-run`, T-228): its genres are links and no `tabindex`; since ADR-140 it leads with
 * the status, the series mark and the kind of night. */
@property --genre-fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --genre-fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
.event-genres,
.genre-run,
.event-title-run,
.venue-kind,
.venue-genres,
.card-event-run {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  --genre-fade-end: var(--space-6);
  mask-image: linear-gradient(
    to right,
    transparent 0,
    currentcolor var(--genre-fade-start),
    currentcolor calc(100% - var(--genre-fade-end)),
    transparent 100%
  );
}
.event-genres {
  margin-top: var(--space-1);
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}
/* The tags in their slot (ADR-105). They sit above the title's link, which covers the
   card: a swipe along them scrolls it, and a press on them does not open the concert. */
.event-genres { grid-area: 3 / 1 / 4 / -1; }
/* As wide as its content and no wider than the card: the space after the last chip is not
   a scroller, so it is the card's target and opens the concert. Past the card's width
   `max-width` stops it and it scrolls behind its fade as before. */
.event-genres {
  justify-self: start;
  max-width: 100%;
}
/* The title's line holds the title alone: it is as wide as the name and no wider (it
   shrink-wraps like the tags, so the space after a short title is the card's, not a
   scroller's), and `min-width: 0` lets it be narrower than the name.

   `mask-clip: no-clip`: Chromium clips the hit-testing of a masked element's
   descendants to the mask's box, so the title's `::after` (the card's whole-card link,
   `.event a.event-title::after`) would only be live over the title itself. */
.event-title-run {
  flex: 0 1 auto;
  mask-clip: no-clip;
}
.event-genres::-webkit-scrollbar,
.genre-run::-webkit-scrollbar,
.event-title-run::-webkit-scrollbar,
.venue-kind::-webkit-scrollbar,
.venue-genres::-webkit-scrollbar,
.card-event-run::-webkit-scrollbar { display: none; }
/* A reader on the keyboard cannot swipe, and a title is the identity of the row rather
   than a pill: focused with a keyboard, it is shown whole -- wrapped, unfaded, and with
   room for its focus ring, which `overflow` would clip. The row grows for as long as
   the link has focus and no longer; `:focus-visible` is what keeps a tap, which
   navigates at once, from re-flowing the list on the way. */
.event-title-run:has(> .event-title:focus-visible) {
  overflow: visible;
  white-space: normal;
  mask-image: none;
}
/* The same for a card's programme title: shown whole, wrapped and unfaded when a keyboard
   focuses it, with room for its focus ring (ADR-076). */
.card-event-run:has(> .card-event-title:focus-visible) {
  overflow: visible;
  mask-image: none;
}
.card-event-run:has(> .card-event-title:focus-visible) > .card-event-title { white-space: normal; }
@keyframes genre-fade-start { to { --genre-fade-start: var(--space-6); } }
@keyframes genre-fade-end {
  from { --genre-fade-end: var(--space-6); }
  to { --genre-fade-end: 0px; }
}
@supports (animation-timeline: scroll()) {
  .event-genres,
  .genre-run,
  .event-title-run,
  .venue-kind,
  .venue-genres,
  .card-event-run {
    --genre-fade-end: 0px;
    animation: genre-fade-start linear both, genre-fade-end linear both;
    animation-timeline: scroll(x self), scroll(x self);
    animation-range: 0% var(--space-6), calc(100% - var(--space-6)) 100%;
  }
}
@supports not (animation-timeline: scroll()) {
  .event-genres::after,
  .genre-run::after,
  .card-event-run::after {
    content: "";
    display: inline-block;
    width: var(--space-6);
  }
  /* The venue card's two runs take neither the spacer nor the fade at their end: they follow
     one another with the badges' own spacing, and a spacer after each is an empty 24px between
     the kind and the divider and after the genres, which also made the genres 24px wider than
     their content and so wrapped them sooner. A run too long for the card still scrolls. */
  .venue-kind,
  .venue-genres { --genre-fade-end: 0px; }
  /* The title's end-gap is padding on the link, not a spacer after the run's content: the
     run now shrink-wraps its link, and a spacer would be a box the link does not cover.
     A keyboard unfold wraps the title, so it takes no gap there or it would gain a line. */
  .event-title { padding-inline-end: var(--space-6); }
  .event-title-run:has(> .event-title:focus-visible) > .event-title { padding-inline-end: 0; }
}

.event-genre,
.event-presenter {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--outline-variant);
  border-radius: var(--shape-full);
  font-size: var(--text-label-sm);
  /* The pills sit on the venue's baseline rather than growing the line: the row's
     second line is `--text-body-sm` and this is two steps under it, so the pill's
     own box fits inside the line box the venue already asked for. */
  line-height: 1.5;
  white-space: nowrap;
}

/* The organiser a title names (T-181): the same pill as a genre, in the row's own text
   colour and a step heavier, so it reads as a name rather than a kind of music. */
.event-presenter {
  color: var(--on-surface);
  font-weight: var(--weight-medium);
}

/* On a row the pill is capped, so a long name (`IMPERICON FESTIVAL`, 138px) cannot take the
   room the venue's name needs: the whole name is its `title` and the event page's
   *Organiser* line. `clip` rather than `hidden`: `hidden` makes the pill a scroll container
   and moves an inline-block's baseline to its bottom edge, which rode it 2px above the
   venue beside it. */
.event-where > .event-presenter {
  max-width: var(--presenter-max-width);
  overflow: clip;
  text-overflow: ellipsis;
}

/* The way out to this concert as a file, on the rows of `/saved` (ADR-036), and the way
   out to the page we read it from, on every card (`.event-source`, ADR-107: T-062 had
   taken that link off the row and left the rule until T-130, and ADR-107 brought it back).
   The same shape: a 44px target round an icon. */
.event-calendar,
.event-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: center;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  border-radius: var(--shape-full);
  color: var(--on-surface-variant);
  transition: background-color var(--motion-short) var(--motion-easing);
}
.event-calendar:hover,
.event-source:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--primary);
}

/* Kept for later ------------------------------------------------------------
   The heart is one symbol, not two: pressed, the same outline fills. That is
   what `fill: currentColor` on a stroked icon does, and on a page repeating the
   control on every row the second symbol would be paid for on all of them.

   The style follows `aria-pressed` rather than a class, so the state a screen
   reader is told and the state a reader can see are the same fact. */
.heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: center;
  /* The control brings its own room: 44px of target around a 19px icon is 12px of
     padding on each side, so a neighbour's gap on top of it is 24px of white space.
     Pulling the gap back gives it to the neighbour and takes nothing off the target,
     which is still the full 44px. (On a card the margin is the card's own,
     `.event > .heart`.) */
  margin-inline-start: calc(var(--space-3) * -1);
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  padding: 0;
  border: 0;
  border-radius: var(--shape-full);
  background: none;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition:
    background-color var(--motion-short) var(--motion-easing),
    color var(--motion-short) var(--motion-easing);
}

.heart:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--primary);
}

.heart[aria-pressed="true"] { color: var(--primary); }
.heart[aria-pressed="true"] .icon { fill: currentColor; }

/* Larger than the site's other icons, and the first reason is optical rather
   than emphatic. A heart is open at both top corners and tapers to a point at
   the bottom, so at the same nominal size as the arrow-out-of-a-box next to it
   on every row it carries visibly less ink and reads as the smaller of the two.
   It is drawn at 1.45em to sit at the same weight, not to shout over it.

   That it also helps is the second reason: the heart is the one control here a
   reader has to *find* rather than recognise -- the same shape on fourteen
   hundred rows, of which the interesting ones are the handful that are filled.

   Written before `.heart-large` below, which is the same specificity and wins on
   the event's own page, where all three controls take the title's scale. */
.heart .icon { width: 1.45em; height: 1.45em; }

/* On the event's own page they sit beside the title, so they take the title's
   scale rather than a row's. One rule for all three: keep, buy, leave are one
   group, and a heart drawn larger than the ticket beside it would read as two. */
.heart-large .icon,
.event-actions .icon-button .icon { width: 1.6em; height: 1.6em; }

/* Kept together and off the title, and never wrapped between themselves: three
   controls on one line is the shape, and one of them dropping to a line of its
   own reads as an afterthought rather than as the third of three. */
.event-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--space-1);
}


.shortlist-note {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--outline-variant);
  font-size: var(--text-label);
  max-width: var(--measure-prose);
}

/* Kommende / Vergangene -------------------------------------------------
   One heading in the same family `.day-heading` is, and clearly a step above
   it: a day heading is small, sticky and repeats down the whole list, while
   this names a section a reader only meets once per visit (T-132). */
.section-heading {
  margin: var(--space-8) 0 var(--space-4);
  font-size: var(--text-title-lg);
  font-weight: var(--weight-bold);
}
/* On a phone it is one step down, below the page's `<h1>` it would outrank (T-246). */
@media (max-width: 30rem) {
  .section-heading { font-size: var(--text-title); }
}

#shortlist-past-all {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--text-label);
}

/* Remembered for later -------------------------------------------------
   A row this browser wrote down, not one the site is serving right now
   (ADR-062) -- muted against a served `.event`, and the same card: its date in the
   header where a served card has a clock, the title and the venue in their slots.
   It has no wrapper round the title and the venue, so they are placed here. */
.event-remembered-date {
  grid-area: 1 / 2;
  align-self: start;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
  font-variant-numeric: tabular-nums;
}

.event-remembered > .event-title-run { grid-area: 2 / 1 / 3 / -1; }
.event-remembered .event-title { color: var(--on-surface-variant); }

.event-remembered > .event-venue {
  grid-area: 4 / 1 / 5 / -1;
  align-self: end;
  margin-top: var(--space-1);
  font-size: var(--text-body-sm);
}

/* Standing preferences ------------------------------------------------------
   A note above the list whenever a preference is narrowing it. Not decoration:
   a page that hides rows for a reason it does not show is a page that looks
   broken, and this is the reason shown. It takes the container colour rather
   than a warning colour -- nothing is wrong, something is simply on. */
/* Why this list is short, in one line.
 *
 * It was a three-line block at `--text-body-sm` in a padded container: 107px,
 * shown exactly when the reader had saved settings, which put the first concert
 * at y=642 of 740 usable -- the reader who had told the site what they like saw
 * none of it (T-062). The *state* is now the count on the filter line above;
 * what is left here is the sentence naming the reason and the way out of it, at
 * label size on one line, wrapping only where a narrow phone leaves it nowhere. */
.preferences-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--shape-full);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: var(--text-label);
}
.preferences-note a { color: inherit; }

/* A button that reads as a link, because what it does is what a link does here:
   change what this page shows. A `<button>` rather than an `<a>` because it goes
   nowhere -- an anchor with no destination is a lie to anything not looking at
   the screen. */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.preferences-group { margin: var(--space-8) 0; }
.preferences-group .search-field { margin-bottom: var(--space-3); }
.preferences-group h2 { margin: 0 0 var(--space-3); font-size: var(--text-title); }

/* The same badges as the list's filter, and the same rule for reading them --
   that is the point of the page. Nothing to cap here: the row is what the
   section is for, and there is no list underneath it waiting to be pushed down. */


/* Pills ----------------------------------------------------------------------
   A static label beside something, not a control -- which is why `.chip` is
   not among them even though it looks like one: it is pressable and it
   carries the touch-target minimum (T-062), a real difference rather than an
   oversight.

   `.badge`, `.status` and `.genre` share the shape -- the full radius and one
   padding, `.badge`'s `0 var(--space-2)`. `.status`'s own `2px` was a raw
   value the tokens never sanctioned, and folding it into this halves it; the
   two pills land on the same height once line-height alone decides it, which
   changes the dashboard's run rows -- a deliberate visual change (T-128).

   `.badge` and `.status` also share the loud all-caps label -- size, weight,
   transform, tracking -- that `.genre` has never worn: a genre is a plain
   word in a border, read at the body's own weight, so its own size stays
   with it rather than joining a group it does not belong to. */
.badge,
.status,
.genre {
  display: inline-block;
  padding: 0 var(--space-2);
  border-radius: var(--shape-full);
}

.badge,
.status {
  font-size: var(--text-label-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.badge {
  margin-left: var(--space-2);
  background: var(--primary-container);
  color: var(--on-primary-container);
  vertical-align: 0.1em;
}

/* Event page ---------------------------------------------------------------- */

/* **The article takes the page's frame** (ADR-139, which reverses ADR-118's narrower one): it is
   as wide as the list's column at every width, so going from the list to a concert and back
   moves no edge. What reads as running text -- the description and its link inside their card,
   the provenance and the notes on the page -- is held to the prose's measure; the head (the title
   with its subtitle, and the run, ADR-140) and the cards take the column. The facts, the lineup,
   the description and the other dates are cards at every width (ADR-140 and its amendment); from
   `64rem` the grid puts the facts and the other dates beside the rest. */
.event-detail > :is(.provenance, .footnotes),
.about > :is(.description, .read-more) {
  max-width: var(--measure-prose);
}

.event-detail h1,
.venue-detail h1 { margin: var(--space-2) 0 var(--space-1); }

.subtitle { margin: 0 0 var(--space-4); color: var(--on-surface-variant); }

/* The venue's own line breaks, kept.

   `pre-line` rather than `pre`: newlines survive, and everything else wraps
   normally, which is what a description needs -- `pre` would push a long
   paragraph sideways off a phone.

   This matters more than it looks. A venue's line breaks are frequently the only
   structure its text has: Escape publishes a stage schedule as one act per line
   and a festival bill as one band per line, and flattened they read as
   "19:45-20:20 Subcutaneous Exsanguination 20:45-21:30 Molested Divinity".

   `anywhere` because a venue writes its own links into its own text and nothing
   normalises them out: Arena's page for Imperial Triumphant carries the band's
   Instagram address as a line of prose, 369px of unbreakable token on a 320px
   phone, and five concert pages scrolled sideways on it (T-129). A wrapped URL
   is ugly; a page that scrolls sideways is broken. (The address itself is not
   written here: no stylesheet in this directory may name another host, and
   `test_site_pages.py` reads the comments too.) */
.description { white-space: pre-line; overflow-wrap: anywhere; }

/* Where our text stops and the venue's continues.

   The link is the second half of the excerpt policy (LEGAL §4): the cut is
   deliberate, so it has to look deliberate. An ellipsis on its own reads as a
   defect -- that is what the 2026-08 ingestion-side cut got wrong -- while an
   ellipsis followed by a line naming the venue reads as an index entry pointing
   somewhere. Tight under the text it belongs to, and set apart from the block
   below it. */
.read-more { margin: var(--space-3) 0 var(--space-4); font-size: var(--text-body-sm); }

/* The other dates of a concert's acts (T-237): a heading, then per act its name and a short
   list of dates, the list the same bare list the rest of the site uses (`.plain`). */
.act-dates { margin-bottom: var(--space-4); }
/* The section is rendered twice and shown once (see the template): after the description below
   `64rem`, as a card under the facts from it. */
.act-dates-aside { display: none; }
.act-dates .section-heading { margin-top: var(--space-6); }
.act-dates-name { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-title); font-weight: var(--weight-medium); }
.act-dates li { padding: var(--space-1) 0; font-size: var(--text-body-sm); overflow-wrap: anywhere; }
/* A member of the act above with a date elsewhere (T-245): a small muted lead-in, then the
   member's name before its one date. */
.act-dates-members-label { margin: var(--space-2) 0 var(--space-1); font-size: var(--text-body-sm); }
.act-dates-member { font-weight: var(--weight-medium); }
/* A wrapped line (320px, a long house) hangs, so the name column stays names (ux-audit, T-245). */
.act-dates-members li { padding-left: var(--space-3); text-indent: calc(-1 * var(--space-3)); }


/* Who plays (T-246, ADR-126): a heading and one act per line, the kind a small outlined badge
   after the name (`badge-genre`, the facts' own shape). The same shape as the other dates above
   (`.act-dates`), the list the bare `.plain` one. The name and the badge are two elements, so a
   long name wraps on its own and the badge never reads as part of it. */
.lineup li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-1) 0;
}
.lineup-name { overflow-wrap: anywhere; }
/* What a player does on stage (T-271), the quieter voice after the name. A band's members sit on
   a line of their own beneath it, as wide as the row so they never run on from the genres. */
.lineup-role { color: var(--on-surface-variant); }
.lineup-players { flex: 0 0 100%; color: var(--on-surface-variant); overflow-wrap: anywhere; }
.lineup .badge { margin-left: 0; }
/* Past six acts the rest sit behind a disclosure, `.lineup-more`, worn like the venue page's
   past: its summary shares the `.venue-past > summary` rules below. */

/* **The concert's head** (ADR-140): the name with its subtitle on one line, then one run of what
   the night is. The name and the subtitle are inline, so a short title's line is not left empty
   and a long one wraps with the subtitle after it; the subtitle is the quieter, smaller voice,
   so the two read as a name and its addition and not as one long title. The head's bottom
   margin is the step to the facts' card. */
.event-head { margin-bottom: var(--space-4); }
.event-title-line { margin: var(--space-2) 0 var(--space-2); }
/* The gap between them is the title's right margin, not the subtitle's left one: an inline
   box's start margin lands wherever the box begins, so a subtitle that wraps to a new line
   stood 8px in from the title (ux review F1). At a line's end the margin is invisible. */
.event-title-line h1 { display: inline; margin: 0 var(--space-2) 0 0; }
.event-title-line .subtitle {
  display: inline;
  margin: 0;
  font-size: var(--text-body);
}
/* What this night is, as one run (ADR-140): a status, the series mark, the kind of night -- the
   outlined `.badge-category` -- a lone act's kind, and the genres. The badges' own margin is for
   one that follows a title; here the run's spaces are the gap. */
.genre-run .badge { margin-left: 0; }
.genre-run .series-mark { display: inline-flex; vertical-align: -0.1em; }

/* The genres on the concert page, one line that scrolls sideways like a card's
   (`.event-genres`, with which it shares the scroller, the fade and the rest of that
   block, ADR-107 / T-166). They are links here, and a link's focus ring is outside its
   box, which `overflow` would clip: the run's padding is the room for it, and the
   negative margin gives the room back, so the pills sit where the badges' edge is. */
.genre-run {
  margin: calc(var(--space-1) * -1);
  padding: var(--space-1);
}

/* Only ever seen inside `/admin` (ADR-026): an event its source has stopped
   listing is not on the site at all. The warning colours rather than the primary
   container, because on that page it is the one thing in a list of ordinary
   upcoming events that is not ordinary -- and the thing an operator is scanning
   the list for is a concert that should not be wearing it. */
.badge-withdrawn { background: var(--warn-soft); color: var(--warn); }

/* **On a list card the status wears its card's tone** (`.event > .event-flag`, above):
   alarm for cancelled and postponed, caution for sold out, rescheduled and moved. The
   rules below are the concert page's and the detail views', which keep these colours.

   The reasoning that follows is older than that and says why the concert page is as it
   is. Two of the four statuses are warnings, and the other two are not.

   The line is whether acting on the page at face value wastes the reader's
   evening. *Abgesagt* and *Verlegt* both fail that test -- one means there is no
   concert, the other means there is one and not in this building, which
   GLOSSARY.md calls the worst failure this project can produce (T-131). They wear
   the same warning colours `.badge-withdrawn` does, for the same reason: in a list
   of ordinary upcoming concerts they are the thing somebody is scanning for.

   *Ausverkauft* stays the primary container, and that is not an oversight. It is
   news about the ticket rather than about the night: the concert happens, at this
   venue, at this time, and a reader who turns up with a ticket is fine. Colouring
   it as a warning would spend the alarm on the commonest of the four and leave
   nothing louder for the two that are.

   *Verschoben* and *Nachholtermin* keep the primary container, though the split
   this comment once called pending is done: `POSTPONED` (the listed date is stale)
   and `RESCHEDULED` (the listed date is the replacement) are separate statuses. What
   the split changed is the strike (a postponed title and date are struck, a
   rescheduled one is not), not the colour. The concert happens either way, so
   neither is a warning in the sense above -- acting on the page at face value
   wastes nobody's evening once the strike is read -- and the alarm colours stay
   for the two that mean there is no concert, or not here. */
/* **Reversed 2026-10-19 for the venue card and the concert page**: a status wears the tone the
   list card gives it (ADR-106) -- alarm for cancelled and postponed, caution for the rest --
   because the room's kind is the same tinted pill and *Ausverkauft* beside *Konzerthalle* was
   one colour for two meanings (ux review, F2). The list card's own flag, two classes, still
   beats these. */
.badge-cancelled,
.badge-postponed { background: var(--card-alarm); color: var(--on-card-alarm); }
.badge-sold_out,
.badge-rescheduled,
.badge-moved { background: var(--card-caution); color: var(--on-card-caution); }

/* A label in an outline, declared once for the two pills that wear it:
   `.badge-category` here and `.genre` below (`.genre-inferred` dashes the
   same edge as its own variant, next to `.genre`). What stays different is
   the label, not the border -- a category is a badge, so it keeps the loud
   all-caps `.badge`/`.status` share; a genre is a name, so it stays the
   plain lower-case word `.genre` has always been. */
.badge-category,
.genre {
  border: 1px solid var(--outline-variant);
}

/* The category is a statement about the event; a status is a warning about it.
   Both are badges, so the quieter one has to look quieter or the shape stops
   meaning anything. */
.badge-category {
  background: none;
  color: var(--on-surface-variant);
}

/* An icon button in a facts row sits where that row's text would have started;
   its own padding would otherwise indent it past every value above it. */
.facts dd > .icon-button { margin-left: calc(var(--space-2) * -1); }

/* The way back, as a control (T-062).
 *
 * It was a bare text link in a `<p>`: 22px tall with 16px of margin above and
 * below, so it spent 57px of a phone screen being a tap target smaller than a
 * thumb. Now it is thumb-sized, carries the chevron that says which way it goes,
 * and shares its line with whatever else the page puts up there.
 *
 * The negative inline margin is so the *text* lines up with the page's left edge
 * rather than the control's padding doing. The chevron points down in the sprite
 * -- one symbol, turned -- because a second path for the same shape at another
 * angle is a second thing to keep in step. */
.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  /* Square while it is the glyph alone, so it is a thumb's target in both
     directions rather than 20px of chevron in a 44px-tall box. The label makes it
     wider from 34rem, the same way a nav item does. */
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  margin-inline-start: calc(var(--space-2) * -1);
  padding-inline: var(--space-2);
  border-radius: var(--shape-full);
  color: var(--on-surface-variant);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-decoration: none;
}
.back:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--on-surface);
}
.back .icon { transform: rotate(90deg); }

/* The line above a detail page's title: the way back, and whatever that page
   lets a reader do with the thing it is about. The same shape as the list's
   `.list-bar` -- controls on one line, the thing you came for underneath. */
.detail-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* A label and its value, side by side, at every width.
 *
 * It stacked on a phone -- two lines a fact -- and the venue page is seven of
 * them, so 429px of a 390x844 screen went on a table of metadata and the
 * programme the page exists for began at y=781. Side by side it is 272px and the
 * first concert is at 624 (T-062).
 *
 * 7rem rather than the 9rem it takes above the breakpoint, because the value is
 * what a reader came for and 358px of page does not have both. "Programm
 * eingelesen" wraps to two lines in it and that is the right thing to spend them
 * on: a label is quiet by design, and an address that wraps is not.
 *
 * `minmax(0, 1fr)` rather than `1fr`, which is `minmax(auto, 1fr)` and so floors
 * the value track at its own longest word. On `/impressum` that word is
 * `Programminformationen` at 189px against the 160px the 320px phone has left
 * after the label and the gap, and the track took the 29px difference out of the
 * document: 333px wide in a 320px window (T-129). The floor removed, the word
 * has to be allowed to break instead, or it overflows its cell and pushes the
 * same page the same way. */
.facts {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  margin: var(--space-6) 0;
}
.facts dt { color: var(--on-surface-variant); font-size: var(--text-body-sm); }
.facts dd { margin: 0; overflow-wrap: break-word; }

/* A concert's facts are the owner's layout (ADR-118, 2026-10-18), top to bottom: a head line --
   the date written out (the kind of night beside it moved to the concert's head, ADR-140) -- then the times and the
   price as "Label: value" lines, a gap, the venue (its name, its address, its kind, size and
   genres as the badges the venues page wears), and the few facts that remain. The label is small
   and muted, the value is the line's own size; the colon is the label's, here and not in the
   copy, so both locales have it.

   The label and the first word of its value have no space between them in the markup, so a
   line breaks inside a value and never between a label and its value; the gap after the colon
   is the label's margin. `Herkunft (Headliner)` is one word to a line. `/impressum`, `/info`
   and the venue page keep the grid above. */
.event-aside > .facts { display: block; }
.facts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}
/* A date is one unit to a phone. */
.facts-date { font-weight: var(--weight-medium); white-space: nowrap; }
.facts-times,
.facts-more { margin: var(--space-2) 0 0; }
.facts-times dt,
.facts-more dt {
  display: inline;
  margin-inline-end: var(--space-1);
  white-space: nowrap;
}
.facts-times dt::after,
.facts-more dt::after { content: ":"; }
.facts-times dd,
.facts-more dd { display: inline; }
/* The link's ring is 2px outside its box; the label's gap before it is 4px. */
.facts-times a,
.facts-more a { outline-offset: 0; }
/* The venue is set off from the times by a step of space, and is a few lines of its own. */
.facts-venue,
.facts-more { margin-top: var(--space-4); }
.facts-venue p { margin: 0; }
.facts-venue .venue-address { margin-top: var(--space-1); }
/* The badges stand off the address: `.facts-venue p` above would otherwise zero their margin. */
.facts-venue .venue-character { margin-top: var(--space-2); }

/* What we know *about* a value, under the value.

   The detail-pages row is two facts: which fields a page adds, and how much that
   finding moves plus when it was last checked. Run together they read as one
   clause and the join is where it breaks -- `description, doors, price ändert
   sich kaum` puts a verb against a field name. A change of face from monospace
   to prose is not a punctuation mark, so the line break does the separating. */
.detail-note {
  display: block;
  font-size: var(--text-body-sm);
}

.links {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin: var(--space-6) 0;
}

/* **It has to work on a `<button>` as well as on an `<a>`.** Three pages put it
   on one: the settings page's clear, the export upload, the sign-in. A `<button>`
   inherits neither the page's face nor its own lack of a border, so a shape
   written only for links renders as a system button wearing the site's colours
   half a screen from a link that got it right. Declared here, once. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-5);
  border: 0;
  border-radius: var(--shape-full);
  background: var(--primary);
  color: var(--on-primary);
  font-family: inherit;
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--ref-primary-30); }

/* The one destructive control on a page, so it does not look like the primary
   action -- it is the thing somebody presses last and rarely.

   **After `.button`, and that is the whole of it.** Same specificity, so the one
   written last wins: from here it was two hundred lines above `.button` and
   "Alle Einstellungen löschen" rendered as the loudest thing on the settings
   page, which is the opposite of what it says here. */
.button-quiet {
  background: none;
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
}
.button-quiet:hover { background: var(--surface-container); border-color: var(--primary); }

/* A link that leaves the site. Named by what it does rather than where it goes,
   and always carrying the icon, so "this opens somewhere else" is one shape a
   reader learns once. */
.external {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* The border is declared once, with `.badge-category` above; this keeps only
   what is `.genre`'s own -- the label's size, since a genre is a plain word
   rather than the loud all-caps `.badge`/`.status` share. */
.genre {
  font-size: var(--text-label);
}

/* A link to the genre's page (T-114), and it still reads as the pill it was: the
   words are the fact, the page behind them is the offer. The border is what answers
   the pointer, the way a chip's does. */
a.genre { color: var(--on-surface); text-decoration: none; }
a.genre:hover { border-color: var(--primary); }

/* A genre we read out of the venue's prose rather than one the venue stated, or
   one a night carries only because a registered brand behind it is known for it
   (ADR-055) -- the same quiet marking either way, because both say "this is not
   the night's own claim" and a reader filtering by it deserves to know which
   they are getting. Dashed for the same reason `.venue-card-quiet`'s border is:
   this is not the whole, stated thing -- there, a venue with no programme here;
   here, a genre nobody published outright. */
.genre-inferred,
a.genre.genre-inferred,
.genre-organiser,
a.genre.genre-organiser,
a.genre.genre-suggested,
.lineup .genre.genre-suggested { border-style: dashed; color: var(--on-surface-variant); }

.provenance {
  padding-top: var(--space-4);
  border-top: 1px solid var(--outline-variant);
  font-size: var(--text-label);
  line-height: var(--leading-normal);
}

/* What the page says about itself in a sentence (ADR-115): a note to the facts above,
   after the provenance, set in the provenance's own size, colour and measure, and
   as quiet. A tooltip says the same thing to a mouse and nothing to a thumb. The asterisked
   one is where the Beginn fact's link lands, so it clears the sticky app bar. */
.footnotes { margin-top: var(--space-2); }
.footnote {
  margin: 0 0 var(--space-1);
  font-size: var(--text-label);
  line-height: var(--leading-normal);
  color: var(--on-surface-variant);
  scroll-margin-top: calc(var(--app-bar-height) + var(--space-4));
}
/* The mark is a link, and a link that only scrolls says nothing when the note is already in
   view; the note it lands on is lit for as long as the address names it (ADR-115). */
.footnote:target {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-focus) * 100%), transparent);
}

/* Venues -------------------------------------------------------------------- */

.venues {
  list-style: none;
  margin: 0 0 var(--space-8);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

/* Cards ------------------------------------------------------------------
   Filled when it is a thing to read in a list -- a venue's own card --
   outlined when it is a tool that tiles a page, fifty at a time, on the
   dashboard: `.venue-card` and `.source` are one card object with that one
   real variant, same padding and radius declared once. `.source`'s own
   shape moves from `--shape-sm` to `--shape-md` to join it -- a deliberate
   visual change (T-128).

   `.filters` is a card too, and on purpose not this object: `tests/render_budgets.py`
   measures where the list begins under it, so it keeps its own (tighter) padding
   rather than joining this one -- changing it would move a measured thing for no
   gain. */
.venue-card,
.source {
  padding: var(--space-4);
  border-radius: var(--shape-md);
}

.venue-card {
  /* A grid item's automatic minimum size is its min-content width, so one long
     unbreakable thing inside a card -- a programme title with `nowrap`, a badge
     row -- widens the whole column past the screen and every card is then cut
     off at the same edge. `min-width: 0` is what lets the track win, and it is
     what makes the title's ellipsis appear at all. */
  min-width: 0;
  background: var(--surface-container-low);
}

.venue-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-title-lg);
}
.venue-name a { color: var(--on-surface); text-decoration: none; }
.venue-name a:hover { color: var(--primary); }

/* The venue's own website, on the card. A reader who wants the room's own word
   should not have to open our page about it first. */
/* An icon control is a target; a text link is sized by its text. That is the
   line this site draws, and this was on the wrong side of it -- 23x32 for the
   one control on a card that leaves the site (T-062). `.card-more` next to it
   stays as it is: it is words, and words are hit by their own area. */
.venue-site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  margin-left: auto;
  margin-right: calc(var(--space-2) * -1);
  border-radius: var(--shape-full);
  color: var(--on-surface-variant);
}
.venue-site:hover {
  background: color-mix(in srgb, var(--on-surface) calc(var(--state-hover) * 100%), transparent);
  color: var(--primary);
}

/* How current a venue's programme is (T-018) -- the public half of what the
   dashboard says, in one dot.

   Three states and no fourth: read lately, not read lately, never read. Why a
   read did not work is a maintainer's question and stays behind the login
   (ADR-014), so the vocabulary here is only what a reader can act on.

   **Colour is not the whole of it.** The dot carries the entire sentence as its
   accessible name, the venue's own page prints that sentence as a labelled row,
   and the card prints the exceptional states in words underneath -- because a
   hover title is no use on a phone, which is where this site is read. The dot is
   the thing that makes an amber one findable in a column of thirty-four; it is
   not the thing that says what it means.

   `flex: none`, because a flex item shrinks to nothing before its siblings wrap
   and a dot that has become an ellipse is a rendering bug reading as a state. */
.reading {
  flex: none;
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--shape-full);
  background: var(--ok);
}

/* **Compounded with `.reading`, and that is not tidiness.** The state class is
   on two different things: the dot, and the `<dd>` on the venue's own page that
   says the same state in words. Written bare, `.reading-behind` painted the
   sentence amber *behind* the amber text it also colours -- a block of warning
   with an unreadable line in it, on the one row of the page that is about
   trusting the list. A dot's colour is a dot's, so it is scoped to the dot. */
.reading.reading-behind { background: var(--warn); }

/* Never read is not a failure -- it is what a newly added source looks like for
   a day. Outlined rather than filled, in the neutral, so it reads as "nothing to
   report yet" beside two dots that do report something. */
.reading.reading-never { background: none; border: 1px solid var(--off); }

/* The same fact in words. On the card it appears only where the dot is not
   green; on the venue's own page it is the body of a labelled row, and there it
   always says something -- so the state is carried by the words' own colour and
   by nothing else. Never read is neither good nor bad news and takes the muted
   ink the rest of the page gives a fact that is simply not in yet. */
.venue-reading { margin: var(--space-1) 0 0; font-size: var(--text-label); }
.facts .venue-reading { margin: 0; font-size: inherit; }
.facts .reading-behind { color: var(--warn); }
.facts .reading-never { color: var(--on-surface-variant); }

/* A night that comes round. Quiet, and outlined rather than filled: it is a
   thing we counted rather than a thing the venue said, and it sits on rows that
   already carry a title, a venue and sometimes a status. An outline says "also
   true" where a fill would say "look here". */
/* A night that comes round, as a picture rather than a word.
 *
 * It was a badge reading *monatlich* -- about 70px on the title's own line, on a
 * row where the title has 245px of 358. The icon is 16px and says the thing an
 * eye scanning a column wants from it: not a one-off. Which cadence it is, and
 * that we counted it rather than the venue announcing it, are in the `title` and
 * in a `visually-hidden` word beside it.
 *
 * No dashed border any more. That marked it as ours, the way an inferred genre is
 * marked -- but a dashed ring around a 16px glyph is a smudge, and the sentence
 * the tooltip carries says whose count it is in words. */
.series-mark {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: var(--on-surface-variant);
}
.series-mark .icon { width: 1em; height: 1em; }

/* The same mark on a card, where it has a cell of its own: in the header, after the time
   (ADR-105), level with it, at the time's size.

   It is the event page that keeps the mark inline, among the tags beside the
   heading. There it is in running text and this cell does not exist. */
.event-series {
  grid-area: 1 / 3;
  align-self: start;
  /* As tall as the time's line, the icon centred in it: the header's text sits at the
     row's top (ADR-107), so the mark is levelled on the line rather than on the row. */
  display: inline-flex;
  align-items: center;
  min-height: calc(var(--text-body-sm) * var(--leading-normal));
  margin-left: var(--space-2);
  font-size: var(--text-body-sm);
}

.badge-size,
.badge-genre {
  background: none;
  border: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
}
/* A size badge can name rooms ("Kleine Halle ~240 · Große Halle ~935", T-233): sentence case,
   like the genres', not the kind's capitals. */
.badge-genre,
.badge-size { text-transform: none; letter-spacing: 0; }
/* Each room and its figure in that badge is one piece ("Große Halle ~935"): the line breaks
   at the " · " between the pieces and never inside one, as an address breaks only between its
   `.addr-part`s (ADR-118). */
.badge-size .room-figure { white-space: nowrap; }
a.badge-genre { text-decoration: none; }
a.badge-genre:hover { border-color: var(--primary); color: var(--on-surface); }

.venue-character { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-2) 0 0; }
.venue-character .badge { margin-left: 0; }

/* On the venues page the badges are two runs -- the kind and the size of the room, then
   the genres it books -- and each is one line that scrolls sideways rather than wrapping
   (the scroller, the fade and the hidden scrollbar are `.event-genres`', declared with it).
   The badges do not shrink to fit: a pill cut to "Beis" is worse than one scrolled to. The
   kind is the tinted `.badge` the status and the category wear, not a fill of its own.

   **The two share a line where both fit, a divider between them.** `.venue-tags` wraps its
   runs, so the genres drop to a line of their own when the pair is wider than the card, and
   a run wider than the card on its own shrinks into its scroll as before. The divider is the
   genres' left border pulled back over its own gap by `margin-left`, so it is drawn when the
   genres follow the kind and, when they wrap, starts left of the box and is clipped by
   `overflow: hidden` -- one rule, no script measuring which case it is. The padding is what
   the margin takes back, so a wrapped run starts flush with the kind above it. */
.venue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) calc(var(--space-2) + 1px);
  margin-top: var(--space-2);
  overflow: hidden;
}
.venue-tags .venue-character { margin-top: 0; }
.venue-kind,
.venue-genres { flex-wrap: nowrap; }
.venue-kind .badge,
.venue-genres .badge { flex: none; }
/* The line sits as far from each run as the badges sit from each other (`--space-1`), so the
   genres read as the next badges on the line and not as a second block: the column gap is
   the padding plus the border plus that same distance. */
.venue-kind + .venue-genres {
  padding-left: var(--space-1);
  border-left: 1px solid var(--outline-variant);
  margin-left: calc(-1 * (var(--space-1) + 1px));
}

.venue-address {
  margin: var(--space-1) 0 0;
  font-size: var(--text-label);
  color: var(--on-surface-variant);
}
/* The address as the way to the map: it reads as the quiet line it was until it is
   pointed at. */
.venue-address-link {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: var(--underline-offset);
}
.venue-address-link:hover { color: var(--primary); text-decoration-style: solid; }
.venue-count { margin: var(--space-2) 0 0; font-size: var(--text-body-sm); }

/* "Als Nächstes" and the way past it, on one line: the heading left, the whole
   programme right. `baseline` rather than `center`, so the two words sit on the
   same line of type despite their different sizes. */
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-1);
}

.card-heading {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: var(--text-label-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.card-events { list-style: none; margin: 0; padding: 0; font-size: var(--text-body-sm); }
/* Two cells, a date and the rest, so the second starts in the same place on every row
   whatever the second holds. The date's cell is a track and not a floor: "Do, 22. Okt."
   and "Fr, 23. Okt." are different widths of text in the same width of column. */
.card-events li {
  display: grid;
  grid-template-columns: var(--date-column) minmax(0, 1fr);
  gap: var(--space-2);
  padding: 2px 0;
}
.card-events time {
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
  /* "Sa, 12. Sep." is three words and the column is narrow enough to break it
     across two lines, which puts a date above its own title. */
  white-space: nowrap;
}
.card-events a { color: var(--on-surface); text-decoration: none; }
.card-events a:hover { color: var(--primary); }

/* A night that is not on at this house on this date: the date and the title struck, in the
   variant colour and no further (the concert list's strike, `.event-title-cancelled`). It
   carries no badge -- the line is the sentence, and the word is spoken and in its tooltip. */
.card-event-off time,
.card-event-off .card-event-title {
  color: var(--on-surface-variant);
  text-decoration: line-through;
}

/* The badge a night keeps (*Ausverkauft*, *Nachholtermin*) and the title, in the second
   cell. The badge does not shrink: the scroll is the title's, and a warning cut to "Ausv"
   is worse than none. */
.card-event-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
  min-width: 0;
}
.card-events .badge { flex: none; margin-left: 0; }

/* One title, one line, scrolled sideways where it does not fit -- the title run of the
   concert list (ADR-076), whose scroller, fade and hidden scrollbar this shares. Five rows
   an eye runs down is the whole point of the block, and an ellipsis threw the rest of the
   name away. The wrapper scrolls and the link inside stays a tab stop. */
/* The title is as wide as its name and no wider than the cell. A badge sits beside it when the
   whole name fits with the badge; otherwise (a long name, or a narrow cell: the title had 36px
   beside the badge at 320px and 71px at 1024px) the badge drops to a line of its own under
   the title, which then scrolls within the cell. */
.card-event-run { flex: 0 1 auto; max-width: 100%; }
.card-event-title { white-space: nowrap; }

.card-more { margin: 0; font-size: var(--text-label); white-space: nowrap; }

/* A venue we do not read yet is listed, but never as an equal: it has no
   programme here, and a card that looks the same would imply it has none. */
.venues-uncovered { padding-top: var(--space-6); border-top: 1px solid var(--outline-variant); }
.venues-uncovered h2 { margin: 0 0 var(--space-1); font-size: var(--text-title); }
.venues-uncovered > .muted { margin: 0 0 var(--space-4); max-width: var(--measure-prose); font-size: var(--text-body-sm); }
/* And a venue we do not list is a third thing again (T-020): not a backlog but a
   decision, usually the house's own. It gets the same quiet card as an unread one
   -- both have no programme here -- under its own heading, which is where the two
   are told apart. */
.venues-withheld { padding-top: var(--space-6); border-top: 1px solid var(--outline-variant); }
.venues-withheld h2 { margin: 0 0 var(--space-1); font-size: var(--text-title); }
.venues-withheld > .muted { margin: 0 0 var(--space-4); max-width: var(--measure-prose); font-size: var(--text-body-sm); }
.venue-card-quiet { background: none; border: 1px dashed var(--outline-variant); }
.venue-card-quiet .venue-name { font-size: var(--text-title); }

.venue-events-heading { margin: var(--space-8) 0 var(--space-4); font-size: var(--text-title-lg); }
.rooms { list-style: none; margin: 0; padding: 0; }

/* Named apart from the dashboard's `.notice` below. Two rules for one class name
   is how a page starts looking accidental -- which is easier to see now that
   both live in this file, and was the point of merging them. */
.venue-note {
  max-width: var(--measure-prose);
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}

/* Archive ------------------------------------------------------------------
   The past: a different question from "what is on", and therefore a different
   page. A quieter version of the list rather than a second design. */

.archive-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-5) 0;
  font-size: var(--text-body-sm);
}

.field-submit { align-self: end; }

.pages {
  display: flex;
  gap: var(--space-4);
  justify-content: space-between;
  margin: var(--space-8) 0 var(--space-4);
  font-size: var(--text-body-sm);
}
/* When only one direction is offered it should not drift to the left. */
.pages .page-older:only-child { margin-left: auto; }
/* A link of its own height, not of its line's: 24px at the least, and a target to press. */
.page-older {
  display: inline-block;
  padding: var(--space-2) 0;
}

/* The line that says the rest is on its way, after the rows where it will land (ADR-146). Empty
   until the script writes it, and then it takes no room at all: no padding to jump in. */
.rest-status {
  margin: 0;
  padding: var(--space-3) 0;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
  text-align: center;
}
.rest-status:empty,
.rest-status.visually-hidden {
  padding: 0;
}

/* `/later`: the way back to tonight, above its own heading. */
.later-back {
  margin: 0;
  font-size: var(--text-body-sm);
}
.later-back a {
  display: inline-block;
  padding: var(--space-2) 0;
}

.archive-back { margin-top: var(--space-8); font-size: var(--text-body-sm); }

/* A venue's own recent past, folded away. Rendered into the page, so the closed
   state is what nearly every visitor sees and it should cost nothing to read. */
.venue-past {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--outline-variant);
}

.venue-past > summary,
.lineup-more > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  list-style: none;
}
.venue-past > summary::-webkit-details-marker,
.lineup-more > summary::-webkit-details-marker { display: none; }
.venue-past > summary:hover,
.lineup-more > summary:hover { color: var(--on-surface); }
.venue-past > summary .icon { transition: transform var(--motion-short) var(--motion-easing); }
.venue-past[open] > summary .icon { transform: rotate(180deg); }
.venue-past .events { margin-top: var(--space-3); }
.venue-past .archive-link { margin-bottom: 0; }

/* Running prose --------------------------------------------------------------
   The info page, and the only place on this site with paragraphs to read rather
   than rows to scan -- so it gets a narrower measure than the list, which wants
   the width for its columns. */

/* The legal footer: three links, and the styling says so. Muted and small, set
   off by a rule rather than a filled band -- it has to be findable from every page
   (MedienG, ECG), which is a different requirement from being noticed on any of
   them. `margin-top: auto` is deliberately absent: the pages are long and a footer
   pinned to a short viewport's bottom is a footer competing with the content. */
.site-footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--space-6) var(--space-4) var(--space-8);
  border-top: 1px solid var(--outline-variant);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  /* Centred on every page (ADR-118): the links were at the left of a frame 88rem wide, which
     on a laptop is the left of the window and on a concert's centred card was nowhere. */
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-label);
}

.site-footer a { color: var(--on-surface-variant); }
.site-footer a:hover { color: var(--primary); }

.prose { max-width: var(--measure-prose); }
.prose h1 { margin: var(--space-2) 0 var(--space-4); }
/* The legal pages are the first prose with sections in it. More space above than
   below, so a heading belongs to what follows it rather than floating between. */
.prose h2 { margin: var(--space-8) 0 var(--space-3); font-size: var(--text-title-lg); }
.prose p { margin: 0 0 var(--space-4); }
/* The honest summary at the top of the privacy page, before the obligations. */
.prose .lead { font-size: var(--text-body); color: var(--on-surface); }

/* Wider screens ------------------------------------------------------------- */

@media (min-width: 34rem) {
  /* Room for the word: the icon keeps its place and the label joins it. */
  .brand-word,
  .back-label {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }
  .filter-line { gap: var(--space-3); }
  .field-row { flex-direction: row; }
  .field-row .field { flex: 1 1 8rem; }
  /* One step wider between the two icons once there is room. The direction and
     the alignment are the same at every width (T-075): it is two 44px targets on
     one line, which is not something a breakpoint has an opinion about. */
  .facts { grid-template-columns: 9rem minmax(0, 1fr); }
  /* As many 18rem columns as fit, and never more than three: on a wide window a fourth
     column made each card too narrow to hold a title and a status, and the cards read
     better as a few wide ones. The floor is the larger of 18rem and a third of the row
     less its two gaps, so a fourth column would have to be narrower than a third. */
  .venues {
    grid-template-columns: repeat(auto-fill, minmax(max(18rem, calc((100% - 2 * var(--space-3)) / 3)), 1fr));
  }

  /* Taller cells once there is room. At 44px the date and the count are as tight
     as they can be read; nothing else about the grid changes, because seven
     equal columns is already the right shape at every width -- it is a week, and
     a week does not get more days on a laptop. */
  .calendar-day { min-height: var(--calendar-cell-wide); }
  .calendar-number { font-size: var(--text-body-sm); }
}

/* The destinations' words join their icons a step later than the wordmark's, since
   there are three of them (T-114). Measured at `max-content` with the heart shown:
   **504px with two labelled destinations and 602px with *Genres* as a third**.
   With *Discover* first and the archive in the menu (T-170) it is **630px**
   ("Entdecken" is wider than "Archiv"), which would scroll a 608px window sideways
   by 22px. 40rem (640px) held it with 10px to spare, 1.6%, and a runner whose system
   font is 3.6% wider wanted 641 and scrolled; **42rem (672px) holds it with 6.7%**, so
   a font up to 5% wider still fits. */
@media (min-width: 42rem) {
  .nav-label {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }
  .top-nav a { padding-inline: var(--space-3); }
}

@media (min-width: 48rem) {
  main { padding-block: var(--space-8) var(--space-12); }
  main.main-detail { padding-block-start: var(--space-4); }
  /* Below the bar as much as above it (T-228): in a block the bar's margin and the title's
     collapse into the larger, so 8px under 16px of padding; the concert's grid from `64rem`
     does not collapse them and sets its own, below. */
  .detail-bar { margin-bottom: var(--space-4); }

  /* The archive changes places (T-170). Four labelled destinations want 722px and
     three want 630, so this is the first step, above the labels' `42rem`, where
     the fourth is in the bar; below it the same link is the menu's
     first row. Exactly one of the two is ever shown. */
  .top-nav .nav-wide { display: inline-flex; }
  .overflow-narrow { display: none; }
}

/* A current page behind a closed menu would vanish from the bar, so the control that
   opens the menu wears it -- the same fill `.icon-button[aria-current]` gives a
   destination that is out in the bar. Only while the page is in the menu at all. */
@media not (min-width: 48rem) {
  .overflow-menu:has(.overflow-narrow a[aria-current]) > summary {
    background: var(--primary-container);
    color: var(--on-primary-container);
  }
}

/* The switches come out of the menu ------------------------------------------
   T-062's measurement is about a phone and it was answering for a desktop too.
   Measured at `max-content` on 2026-09-09, signed out, two regions: **266px on a
   phone with them behind the menu, 694px at 1,280 with them loose** -- against a
   content column of 56rem (896px) less the bar's own 32px of padding (then; the
   column is `--measure`, 88rem since ADR-103). So there is
   room from well below this breakpoint; 64rem is chosen for the reader rather
   than the geometry, because it is where a window is a desktop rather than a
   tablet held sideways, and moving a control at the narrowest width that would
   technically fit is how a bar comes to reflow while somebody is reading it.

   **What moves and what does not.** The visitor's three come out; the operator's
   two stay in the menu at every width, because they are not a visitor's controls
   and a dashboard link loose in an app bar reads as part of the site. With
   nothing left in it for a visitor, the menu goes -- there is no control here
   whose only job is to open an empty panel. */
@media (min-width: 64rem) {
  .bar-switches {
    display: flex;
    align-items: center;
    gap: var(--space-1);
  }

  /* The other layout of the same three controls. Gone rather than hidden: see
     `.bar-switches` for why one of the two must leave the accessibility tree. */
  .overflow-label,
  .overflow-visitor { display: none; }

  /* And the front page's link to the other city (T-212), which only stood in for the
     region switch while the bar had none to show. */
  .other-region { display: none; }

  /* A menu holding only the visitor's switches now holds nothing. The attribute
     is the template's answer to "is there an operator's section", so this rule
     cannot disagree with what is in the panel. */
  .overflow-menu:not([data-operator]) { display: none; }

  /* And the rule above the operator's list divided it from the two lists that
     have just gone. It is the first thing in the panel now.

     Named with both classes because `.overflow-list + .overflow-list` is what it
     is undoing, and a media query buys no specificity -- a single class would
     lose to the sibling selector at every width. */
  .overflow-list + .overflow-list.overflow-operator {
    margin-block-start: 0;
    padding-block-start: 0;
    border-block-start: 0;
  }
}

/* A day's cards in columns (ADR-105): two from `48rem`, three from `80rem`, on every list of
   programme rows -- a day's, and the three below it that draw what a reader kept (`/saved`,
   `/archive`), so a card is never two widths. Each step keeps a card as wide as the phone's
   (358px: 362px at 768, 408px at 1,280). The grid fills across and then down, so the markup
   order is the reading order. A venue's own programme (`.events-single`) stays one column
   of full-width cards: 54 of its 69 days hold one concert, so a second column would be
   empty. */
@media (min-width: 48rem) {
  .day:not(:has(> .events-single)) { --day-columns: 2; }
  .day > .events:not(.events-single),
  #shortlist-past-rows,
  #shortlist-remembered,
  #archive-kept {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 80rem) {
  .day:not(:has(> .events-single)) { --day-columns: 3; }
  .day > .events:not(.events-single),
  #shortlist-past-rows,
  #shortlist-remembered,
  #archive-kept {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* A venue's facts beside its programme, from `64rem` (ADR-104, T-215) -----------
   The page's three parts stay in the order the markup gives them -- programme, facts, the
   folded past -- and a grid puts the facts in a column of `--aside-width` to the right of
   the first two. The column is only there for a venue that has facts (`.venue-body-aside`,
   the template's own answer): one with no website, no reading and no rooms is the
   programme at the whole width, with no empty column.

   The facts span both rows, so the column is as long as the page and its stickiness has
   room to rest in; it sits under the app bar, in the column beside `.day-heading` (which
   sticks in the programme's column only), so the two stickies share no pixel. A label
   stacks over its value in 20rem, where 7rem of label would leave the value a third of
   the width -- design.md's *A fact and its value sit side by side* is for a full line. */
@media (min-width: 64rem) {
  .venue-body-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--aside-width);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "programme facts"
      "past facts";
    column-gap: var(--space-6);
    /* The heading's own space above it, taken by the grid, so the facts begin level with
       the heading and the heading is where it was. */
    margin-top: var(--space-8);
  }
  .venue-body-aside .venue-events-heading { margin-top: 0; }
  .venue-body-aside > .venue-programme { grid-area: programme; }
  .venue-body-aside > .venue-past { grid-area: past; align-self: start; }

  .venue-facts {
    grid-area: facts;
    align-self: start;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    position: sticky;
    top: calc(var(--app-bar-height) + var(--space-4));
    max-height: calc(100vh - var(--app-bar-height) - var(--space-4) * 2);
    max-height: calc(100dvh - var(--app-bar-height) - var(--space-4) * 2);
    overflow-y: auto;
  }
  .venue-facts dd + dt { margin-top: var(--space-3); }
  /* The column scrolls, so it clips at its own edge and the link at its left edge had no
     room for a ring outside it: inward, by the ring's own width (WCAG 2.4.7). */
  .venue-facts :focus-visible { outline-offset: calc(var(--focus-ring-width) * -1); }
}

/* A concert is cards on the page (ADR-140, amended by the owner 2026-11-08) ------------------
   The facts, the lineup, the description and the other dates are each a card -- the container
   fill the list's cards wear (`--surface-card`), a radius and room inside -- at every width, so a
   reader tells *what, when, where*, *who plays* and *what the venue says* apart by their boxes and
   not by a heading's margin alone. The head, the provenance and the notes stand on the page: no
   card around the whole article at any width (it was one from `48rem`, with the facts an inset
   panel in it, ADR-118, and the text's column was one card from `64rem` until the amendment), so a
   tablet and a desktop are a phone's page with more room. From `64rem` the facts and the other
   dates stand in a column beside the rest (below). */
.event-aside > .facts,
.lineup,
.about,
.act-dates-flow {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--surface-card);
  border-radius: var(--shape-lg);
}
.lineup .section-heading,
.about .section-heading,
.act-dates-flow .section-heading { margin-top: 0; }
.act-dates-flow .act-dates-name:first-of-type { margin-top: var(--space-2); }
/* The card's padding is the room under its last line: the link's own gap is for the page. */
.about > :last-child { margin-bottom: 0; }
@media (min-width: 48rem) {
  /* The facts' two values that must not be broken inside (ADR-118): a clock, with the day
     where the end falls on another ("So, 25. Okt. 2026, 02:00"), and an address part
     ("1090 Wien", "Stadtbahnbögen 331/333,").
     From here up the value has 288px or more; on a phone's 160px it breaks as it did, because
     a line that cannot break is a page that scrolls sideways at 320. */
  .facts .fact-when { white-space: nowrap; }
  .facts .addr-part { white-space: nowrap; }
}

/* The last part of an address, a postcode and its city ("1080 Wien"), does not break at any
   width (ADR-118, ux review F2): the widest, "2331 Vösendorf", fits a phone's 160px, and it
   broke "1080 / Wien" for 13 of 54 addresses at 390px. The parts before it can be longer than
   the column and keep breaking below `48rem`. */
.facts .addr-part:last-child { white-space: nowrap; }

/* A concert's facts beside its programme, from `64rem` (ADR-117, ADR-118; ADR-104's pattern) --
   The frame is the grid: the text's column, which grows with the window (ADR-139), a gutter,
   and the facts' column (`--facts-width`). The markup is one order for a phone, a
   keyboard and a screen reader -- the bar, the head (the title with its subtitle, then the
   run of badges and genres, ADR-140), the facts, the lineup, the description, the provenance, the notes -- with one
   exception: *Weitere Termine* is written twice and shown once, under the facts from here and
   after the description below it, so its place in the reading order differs by width
   (ADR-138). The placement is this
   block's: the bar spans both columns, so its actions end on the facts' right edge; everything
   else is the first column; the aside -- the facts, and under them the other dates' second
   copy -- is the second, from the title down to the end.

   The rows are more than the things a page can carry in the first column under the bar (six
   since ADR-140; the ten rows are headroom), then a
   flexible one that the facts also span. A page that has fewer leaves its rows empty, which
   take no height (no row gap: the margins are the rhythm), and the facts' own height is taken
   by the flexible row alone, so a page with no description is not stretched to fill its
   neighbour -- the facts are sticky and the column is not the aside's to lengthen. A tenth
   thing in the first column would fall below the aside's rows: `test_site_event.py` counts them.

   The facts are a head line, "Label: value" lines and the venue (see `.facts-head`), so the
   aside's 320px holds each on a line of its own and the block is a few lines tall.

   **The frame is every page's** (ADR-139): the article fills `main`, so the brand, the text
   card's left edge and the list's left edge are one line, and the facts' right edge is the
   app bar's. The text's column is what grows with the window; the facts' stays
   `--facts-width`. */
@media (min-width: 64rem) {
  /* **The phone's cards, in two columns** (owner, 2026-11-08, ADR-138, ADR-140's amendment): the
     head, the lineup's card, the description's card, the provenance and the notes on the left,
     and in the right-hand column the facts' card with the other dates' card under it. The bar
     stands above them on the page, so its actions still end on the facts' right edge and its
     back link starts on the brand's line. The article is the frame and draws nothing (the text's
     column was one card, the article's `::before`, until the amendment). The second column is
     the gap between the columns, the third the aside's. */
  .event-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--space-8) var(--facts-width);
    grid-template-rows: repeat(10, auto) minmax(0, 1fr);
  }
  .event-detail > * { grid-column: 1; }
  .event-detail > .detail-bar { grid-column: 1 / -1; margin-bottom: var(--space-2); }
  /* A grid item's margins do not collapse: the cards keep only their bottom margin, so they
     stand the head's margin under it and as far apart as the aside's cards. */
  .event-detail > :is(.lineup, .about) { margin: 0 0 var(--space-4); }
  .event-detail > .act-dates-flow { display: none; }
  .event-detail > .event-aside {
    grid-column: 3;
    grid-row: 2 / -1;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    position: sticky;
    top: calc(var(--app-bar-height) + var(--space-4));
    max-height: calc(100vh - var(--app-bar-height) - var(--space-4) * 2);
    max-height: calc(100dvh - var(--app-bar-height) - var(--space-4) * 2);
    overflow-y: auto;
  }
  .event-aside > .facts,
  .event-aside > .act-dates-aside {
    margin: 0;
    padding: var(--space-4);
    background: var(--surface-card);
    border-radius: var(--shape-lg);
  }
  .event-aside > .act-dates-aside { display: block; }
  .act-dates-aside .section-heading { margin-top: 0; }
  .act-dates-aside .act-dates-name:first-of-type { margin-top: var(--space-2); }
  /* The column scrolls, so it clips at its own edge: a ring goes inward (WCAG 2.4.7). */
  .event-detail > .event-aside :focus-visible { outline-offset: calc(var(--focus-ring-width) * -1); }
  /* The genres wrap here instead of scrolling (T-228, ux review F4): *Beginn* is in the aside,
     so a second line costs the facts no height and all of them show beside the sticky column.
     The scroller's mask, animation, fade spacer and the padding that made room for a ring
     inside `overflow` go with it: nothing clips a ring now, so the run sits on the text's left
     edge. `.event-genres`, the cards' run, is not this selector and is never touched. */
  .genre-run {
    overflow: visible;
    white-space: normal;
    mask-image: none;
    animation: none;
    margin: 0;
    padding: 0;
  }
  .genre-run::after { display: none; }
}

/* The rules between the questions on a filter *line* --------------------------
   Two questions sharing one horizontal line need something between them saying
   so, and a gap alone does not: at 12px the chips read as one long row.

   **This is the dashboard's line now, and only its** (T-075). The public pages
   ask their questions in a column, one `.filter-group` per row, and what
   separates those is a horizontal rule at every width -- which is what the
   groups' own rule draws, and is why these vertical ones stopped applying to
   them. `/admin` still puts a search box and one `<select>` on one line, because
   it is a tool for one operator with two questions rather than a page a reader
   arrives at.

   Drawn only from the width where such a line genuinely fits on one -- measured
   at the 56rem content column, the controls, the rules and a usable search field
   come to about 46rem, so 52rem is the first width with room to spare. Below it
   the groups have wrapped and a mark would sit at the start of a line, dividing
   nothing from nothing. */
@media (min-width: 52rem) {
  .filter-line > .chips-date,
  .filter-line > .search-field,
  .filter-line > .field {
    padding-inline-start: var(--space-3);
    border-inline-start: 1px solid var(--outline-variant);
  }

  /* Whatever comes first has the container's own edge already, and the reset is
     not a question -- it is the way back from the answers. Written as the
     exceptions rather than by listing the three that do get a rule per page,
     which is how the dashboard's line came to be missing two of them. */
  .filter-line > :first-child,
  .filter-line > .field-reset {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  /* The magnifier is positioned from the field's padding edge, which the rule
     above moves inward by a step -- so without this it stays against the new
     rule while the text it belongs to shifts away from it. */
  .filter-line > .search-field:not(:first-child) .icon { left: calc(var(--space-3) * 2); }
}

.mono {
  font-family: var(--mono);
  font-size: var(--text-label);
  font-variant-numeric: tabular-nums;
}

.plain { list-style: none; margin: 0; padding: 0; }

/* Status ------------------------------------------------------------------ */

.status {
  background: var(--off-soft);
  color: var(--off);
  white-space: nowrap;
}

.status-healthy,
.status-succeeded { background: var(--ok-soft);  color: var(--ok); }
.status-degraded,
.status-stale    { background: var(--warn-soft); color: var(--warn); }
.status-empty,
.status-failed   { background: var(--bad-soft);  color: var(--bad); }

/* A run that is still going borrows the warn tone rather than spending a colour
   on itself: it is not an outcome, and the dashboard says "in flight" by moving
   the run strip's block instead (dashboard.css, *A run that is still going*). It
   lives here with the other six because a tone family split across two files is
   six definitions in one place and one in another. */
.status-running { background: var(--warn-soft); color: var(--warn); }

.status-explained { margin: var(--space-1) 0 var(--space-6); color: var(--on-surface-variant); }

/* Anything too wide for the page scrolls itself rather than the page (T-129).
   Only the runs table wears it today; it is named after the shape and not after
   that table, so the next wide thing reaches for this instead of writing it
   again -- which is why it is here and not in a page's own file. */
.table-scroll { overflow-x: auto; }

/* A message strip, one object with three appearances: `.callout` (a fact
   about the page, stated in the page), `.toast` (news that just happened,
   floating over the page) and `.signal` (the same fact inside a list). Named
   apart from a *notice*, which is what `?notice=` carries and what a toast
   raises: those are messages about something that just happened, they belong
   out of the flow and they go away. A callout or a signal is the opposite --
   a source that is switched off, an installation with no password
   configured, the error a run recorded. It is as true in a week as it is
   now, it is what the page is about, and it has to still be there when the
   reader looks up.

   All three cut the same 3px tone-coloured edge on the left with the same
   asymmetric radius, declared once here; each keeps below only what is
   genuinely its own, and the warn/bad tone itself is written once per tone,
   after `.toast` (`.toast`'s own border interacts with the tone, so its
   modifiers live there). */
.callout,
.toast,
.signal {
  border-left-width: 3px;
  border-left-style: solid;
  border-radius: 0 var(--shape-sm) var(--shape-sm) 0;
}

.callout {
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-6);
}

/* What is wrong with what you typed, under the box you typed it in ----------
   The third place a message can go, and the one that does not move: an error
   about a field is not news about the world, and a toast that floated away in
   eight seconds would leave a box marked wrong with nothing saying why. The
   `aria-describedby` and `aria-invalid` are in the template; this is what a
   sighted reader gets from the same fact. */
.field-error {
  flex-basis: 100%;
  margin: 0;
  color: var(--bad);
  font-size: var(--text-label);
}

/* Toasts --------------------------------------------------------------------
   A run announces itself where it happens rather than by reloading the page
   under the operator.

   **Bottom, not top.** A banner at the top of this page pushed forty cards down
   by its own height, which is the same displacement the reload was being fixed
   for. Down here it covers the disclaimer and nothing that is read.

   Fixed, and `inset-inline` rather than a width: on a phone a toast is the
   column, on a laptop it is as wide as its sentence and no wider. `pointer-
   events` is off on the stack and back on for each toast, so the empty space
   between one toast and the page underneath is not a lid over the cards.

   `role="status"` and `aria-live="polite"` are on the container in the template:
   a run starting is worth saying and never worth interrupting a sentence for. */
.toasts {
  position: fixed;
  inset-inline: var(--space-4);
  bottom: var(--space-4);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}

/* **A callout that floats and leaves**, and that is deliberate down to the
   colours: same leading rule, same soft ground, same radius -- so *this is a
   message* is one shape a reader learns once, whether it is standing in the page
   or sitting over it.

   It was a dark inverse pill for a day, which is Material's snackbar and is what
   this site cannot use: the moment a message has a *tone*, it needs `--warn` and
   `--bad`, and those two are tuned against the page's own surface. On an
   inverted ground the light theme's `#8a5a00` is mud and the dark theme's is a
   different colour entirely. Hue that only works on one background is hue this
   palette does not have. So `--inverse-surface` went with it -- a token nothing
   reads is a token that is wrong on the day somebody reads it. */
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border: 1px solid var(--outline-variant);
  border-left: 3px solid var(--outline);
  background: var(--surface-container-high);
  color: var(--on-surface);
  box-shadow: var(--elevation-2);
  font-size: var(--text-label);
  pointer-events: auto;
  animation: toast-in var(--motion-medium) var(--motion-easing);
}

/* The tone itself, written once per tone -- `.tone-warn` and `.tone-bad`,
   naming the tone rather than the object that wears it, so a callout, a
   toast and a signal read the same modifier instead of three vocabularies
   (`.callout-error`, `.signal-error`, `.toast-warn`, `.toast-bad`) for the
   same two tokens. `.callout` and `.signal` carry the warn tone by default
   -- there is no neutral callout or signal -- while `.toast` starts neutral
   (above) and takes a tone class as a modifier, because a toast can also
   just confirm. `.toast`'s own `border-left` restates the width and style
   that `border: 1px solid …` just set on every side; the tone rules below
   share `.toast`'s specificity and come after it in the source, so they
   still win, and only need to set the colour. */
.callout,
.signal,
.tone-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.tone-bad {
  border-left-color: var(--bad);
  background: var(--bad-soft);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(var(--space-3));
  }
}

/* Dismissable, because eight seconds is a guess and a stack of them over the
   cards is the one place this page hides its own content. */
.toast-dismiss {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--shape-full);
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1;
  opacity: 0.7;
  cursor: pointer;
}

.toast-dismiss:hover { opacity: 1; }

/* Signals ------------------------------------------------------------------ */

.signals { list-style: none; margin: 0 0 var(--space-4); padding: 0; }

.signal {
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
  font-size: var(--text-body-sm);
}

/* An error is something wrong now; a warning is something that changed. Both
   are worth showing, and telling them apart is most of what triage is -- the
   colours themselves are with the other two appearances of this shape, next
   to `.toast` above. */

.signal strong { margin-right: var(--space-1); }
.baseline { font-size: var(--text-label); margin: 0 0 var(--space-6); }

/* Somebody who has asked for less movement gets none of it: every transition
   here is an affordance rather than information, so there is nothing to lose. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    /* Without this an `infinite` animation under 0.01ms is a flicker, not a stop. */
    animation-iteration-count: 1 !important;
  }
}

/* The deck (T-170) -----------------------------------------------------------
   Discover: one concert at a time, in a track that scrolls sideways and snaps one
   card to its width. A touch swipe is the browser's own and costs no gesture code;
   `discover.js` adds the buttons, the arrow keys and the next window of cards.

   **A card is as tall as what it says, in a track of one steady height.** The card is
   type and facts with no picture, so a card stretched to the screen was a few lines at
   the top and a blank sheet under them. The track keeps one height whatever the card
   in it holds (so *previous* and *next* stay where a thumb left them), a card takes
   the height of its content and sits at the top of it, and the heart and the link
   follow the last fact instead of being pinned to a foot 500px away. The deck is the
   viewport less the bar and the page's padding, between `--deck-min-height` and
   `--deck-max-height`: a phone shows the card and its controls without the page
   scrolling, and a card that holds more than the track gives way in whole lines --
   `.deck-more` first, then the tags past two rows -- never by scrolling inside. `dvh`
   where it exists, since a phone's address bar comes and goes; `vh` for the browser
   that has not heard of it. */
.deck {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: var(--measure-prose);
  margin-inline: auto;
  height: calc(100vh - var(--app-bar-height) - var(--space-6) - var(--space-4));
  height: calc(100dvh - var(--app-bar-height) - var(--space-6) - var(--space-4));
  min-height: var(--deck-min-height);
  max-height: var(--deck-max-height);
}

/* The scroller, and the only thing on the page that scrolls sideways. `x mandatory`
   is what makes a card the unit; `overscroll-behavior-x: contain` keeps a swipe past
   the last card from becoming the browser's own "back". */
.deck-track {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  align-items: flex-start;
  border-radius: var(--shape-lg);
}
.deck-track::-webkit-scrollbar { display: none; }
/* While a mouse drags it (`discover.js`): a mandatory snap would pull the card back at
   every step of the drag, so it is let go until the button is released. */
.deck-track.is-dragging { scroll-snap-type: none; }
.deck-track.is-dragging,
.deck-track.is-dragging * {
  cursor: grabbing;
  user-select: none;
}

/* A card is the track's width, margins included, so `n` cards are exactly `n` track
   widths along and a button can scroll there by arithmetic. `scroll-snap-stop: always`
   is what stops a fling from skipping a card it should have shown. */
.deck-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 0 0 calc(100% - var(--space-2) * 2);
  box-sizing: border-box;
  min-width: 0;
  margin-inline: var(--space-2);
  max-height: 100%;
  padding: var(--space-5);
  overflow: hidden;
  /* The containing block of the room's badges' spoken names (`.visually-hidden`, T-211):
     absolute, they would otherwise sit at their static position in a track of cards and
     widen the page by the cards beside it. */
  position: relative;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border: 1px solid var(--outline-variant);
  border-radius: var(--shape-lg);
  background: var(--surface-container-low);
}
.deck-card > *,
.deck-main > *,
.deck-more > * { margin: 0; }

/* The answer to "what is it, and where": the name, what kind of night, the room. Never
   moved by what follows, and cut only where the tags run past two rows (below). */
.deck-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: none;
}
/* What else is known, **as far as there is room**: it is the part of the card that
   gives way when a card is taller than its track, so the foot is never pushed out. It
   gives way in **whole lines**: a column that wraps, so the line that does not fit starts
   a second column, one card-width off to the side where `overflow` clips it away, rather
   than showing half its glyphs (T-211: a room line put the price at 15 of 25px). */
.deck-more {
  display: flex;
  flex-flow: column wrap;
  gap: var(--space-3);
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}
.deck-more > * { flex: none; width: 100%; }
/* A column always takes its first item, even one taller than the column, and that is where
   a clamped subtitle would still be cut. An empty first item, drawn back over the gap it
   adds, is the one that is allowed to overflow: every real line is a later item, so
   it either fits whole or starts the clipped column. */
.deck-more::before {
  content: "";
  flex: none;
  width: 100%;
  height: 0;
  margin-bottom: calc(var(--space-3) * -1);
}

/* The card's header: when, in the list's own quiet voice -- the day heading's small
   bold capitals and the row's time -- and set off from the answer under it by the
   hairline the list draws between its rows. The name is the loudest thing on the card. */
.deck-when {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.deck-time {
  font-size: var(--text-body-sm);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  text-transform: none;
  letter-spacing: normal;
}

/* The name is one line, like the row's (ADR-076): a long one scrolls along it in the
   row's own scroller and fade (`.event-title-run`), and is whole on the concert's page.
   A touch that starts on the name pans the name; one that starts anywhere else on the
   card swipes the deck, and one that starts on a name already at its end chains to it.
   An end card's heading has no run and wraps. */
.deck-title {
  font-size: var(--text-deck-title);
  line-height: var(--leading-tight);
  overflow-wrap: anywhere;
}
.deck-title > .event-title-run { display: block; }
.deck-title .event-title { font-weight: var(--weight-bold); }
.deck-subtitle,
.deck-headliner {
  color: var(--on-surface-variant);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.deck-where { overflow-wrap: anywhere; }
.deck-where,
.deck-tags,
.deck-price { font-size: var(--text-body); }
.deck-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* The one part of the answer that can grow without bound -- eight genres wrap to four rows
   at 320px -- so it is the one part of `.deck-main` that gives way, in whole rows of pills:
   two are kept, and the concert's page has every genre (T-256). Without it the status line
   and eight genres pushed the heart out of the card on a small phone. */
.deck-main > .deck-tags {
  max-height: var(--deck-tags-max-height);
  overflow: hidden;
}
/* How many of them the clip hides, where it hides two or more (T-257, `discover.js`): the
   pill's size and line, so it closes the row at the pills' height, but no outline and the
   quieter colour -- it is a count, not a genre and not a control. */
.deck-tags-more {
  padding: 0 var(--space-1);
  border: 1px solid transparent;
  color: var(--on-surface-variant);
  font-size: var(--text-label-sm);
  line-height: 1.5;
  white-space: nowrap;
}
.deck-price { color: var(--on-surface-variant); }
.deck-end-body { color: var(--on-surface-variant); }

/* The card's foot, set off by the same hairline as the header: what a reader does with
   the card. It follows the last fact rather than being pinned to a bottom the card does
   not have, and nothing above it can push it out (`.deck-more` gives way first). */
.deck-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--outline-variant);
}
/* The way in on the left and the heart on the right, the card's two ends. */
.deck-actions > .heart { margin-inline-start: auto; }

.deck-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.deck-status {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}
/* Said once above the track when the reader's settings narrowed the deck (ADR-078). */
.deck-note {
  margin: 0;
  text-align: center;
  color: var(--on-surface-variant);
  font-size: var(--text-body-sm);
}
/* The status line (`.event-status`), which only this card still has, is a full-width flex basis; in a card, which is
   a column, that basis would be the card's height. */
.deck-main > .event-status { flex: none; }
/* The same chevron as the disclosures', turned to point along the track. */
.deck-previous .icon { transform: rotate(90deg); }
.deck-next .icon { transform: rotate(-90deg); }
/* At either end, and not `disabled`: a keyboard reader's focus stays where it is. */
.deck-controls .icon-button[aria-disabled="true"] { opacity: 0.4; cursor: default; }
