/* Matchboxd pages as a departure board (docs/decisions/board.md): ink on the
   page, heavy rules that open a section, hairlines between rows, square
   controls with a firm edge, the condensed type and times in the mono. */
.app {
  max-inline-size: 46rem;
  margin-inline: auto;
  padding: var(--gutter);

  /* The wrapper carries the page gutter and width so the header and footer
     stay landmarks outside main. */
  main {
    max-inline-size: none;
    padding: 0;
  }

  h1 {
    font-size: var(--step-3);
    font-weight: 700;
    margin-block: 0 var(--space-2);
  }
}

/* Besides headings and buttons (base.css), the way around the site and the
   filters' names are set narrow: titles and controls, not reading text. */
.home-link,
.site-nav a,
.site-name,
.tabs a,
.back,
.place-picker > summary,
.filter-label,
.agenda-title,
.badge {
  font-stretch: var(--stretch-display);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  margin-block-end: var(--space-6);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-5);
}

/* The links follow the way home in ink, a step smaller on a line box that
   keeps a 24px target, underlined only under the pointer. */
.site-nav a:not(.home-link) {
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.75;
  color: var(--text);
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

/* The way home: whose collection this is, in plain bold type. No wordmark. */
.home-link {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.lead,
.summary {
  font-size: var(--step-1);
  margin-block: var(--space-2) var(--space-4);
}

/* Reading text keeps a comfortable measure, whatever the column's width. */
.lead,
.description,
.film-description {
  max-inline-size: var(--measure);
}

.description {
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* A collection's description: its first paragraph, with "More" showing the
   whole text in its place; the control then reads "Less". */
.collection-description {
  /* The lead is one paragraph by construction; only the whole text keeps its line breaks. */
  > .description {
    margin-block-end: 0;
    white-space: normal;
  }

  &:has(.description-more[open]) > .description {
    display: none;
  }
}

.description-more {
  > summary {
    display: inline-block;
    margin-block: var(--space-1) 0;
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    cursor: pointer;
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }
  }

  .less {
    display: none;
  }

  &[open] {
    .more {
      display: none;
    }

    .less {
      display: inline;
    }
  }

  > .description {
    margin-block: var(--space-2) 0;
  }
}

/* A member's lists as an index: each row a title with its count at the end
   of the line, tabular like a departure board, and the start of its notes
   beneath, on rules rather than cards since there are no posters to anchor. */
.list-index {
  list-style: none;
  padding: 0;
  margin-block: var(--space-4);
  border-block-start: var(--rule-heavy) solid var(--text);

  > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: var(--space-1) var(--space-4);
    padding-block: var(--space-4);
  }

  > li + li {
    border-block-start: 1px solid var(--rule);
  }

  h2 {
    margin: 0;
    font-size: var(--step-1);
    overflow-wrap: anywhere;

    a {
      color: inherit;
    }
  }

  .list-count {
    display: grid;
    justify-items: end;
    margin: 0;
    font-size: var(--step--1);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .description {
    grid-column: 1 / -1;
    margin: 0;
    font-size: var(--step--1);
  }
}

.search {
  margin-block: var(--space-6);
}

.search .row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}

.search input {
  flex: 1 1 14rem;
}

.hint,
.ticket-note,
.site-footer,
.notice {
  font-size: var(--step--1);
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  margin-block: var(--space-4) var(--space-5);
  border-block-end: 1px solid var(--rule);

  a {
    padding-block: var(--space-2);
    margin-block-end: -1px;
    border-block-end: 3px solid transparent;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
  }

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

  a[aria-current],
  a[data-loading] {
    border-color: var(--accent);
    color: var(--text);
  }

  &:has([data-loading]) a[aria-current]:not([data-loading]) {
    border-color: transparent;
    color: var(--muted);
  }
}

/* The switch between a collection's two views, the agenda and the films: two
   halves of one box, the one on screen inverted. A half shows its change at
   once while the results follow, like a pill. */
.view-switch {
  display: inline-grid;
  grid-auto-columns: minmax(6rem, 1fr);
  grid-auto-flow: column;
  margin-block: var(--space-2) var(--space-3);
  border: var(--edge) solid var(--border);
}

.segment {
  min-block-size: var(--control-size);
  border: 0;
  background: transparent;
  color: var(--text);
  transition:
    background-color 0.12s,
    color 0.12s;

  &[aria-pressed="true"] {
    background: var(--accent);
    color: var(--on-accent);
  }
}

.view-switch:has(.pill-form[data-pending]) .segment {
  background: transparent;
  color: var(--text);
}

.view-switch .pill-form[data-pending] .segment {
  background: var(--accent);
  color: var(--on-accent);
}

/* The filters (docs/decisions/board.md): on a phone the views' switch and one
   button named after what is chosen, opening every filter in one panel under
   it, each row named above its pills; from 64rem a toolbar over the results
   (below). Each city, cinema, day and version is a toggle button drawn as a
   pill. */
.filters {
  margin-block: var(--space-4) var(--space-5);
}

/* The phone's filter button: what is chosen, as a line of underlined text
   whose arrow turns while the panel is open. */
.filter-summary {
  justify-content: flex-start;
  gap: var(--space-2);
  max-inline-size: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-align: start;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* A fold's button: its arrow turns while its panel is open. */
.fold-button {
  gap: var(--space-1);

  &::after {
    display: inline-block;
    content: "▾";
    content: "▾" / "";
  }

  &[aria-expanded="true"]::after {
    content: "▴";
    content: "▴" / "";
  }
}

/* The picker's button, drawn as a pill. */
.place-picker > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-block-size: var(--pill-size);
  padding: var(--space-1) var(--space-3);
  border: var(--edge) solid var(--border);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;

  &::-webkit-details-marker {
    display: none;
  }

  &::after {
    content: "▾";
    content: "▾" / "";
  }

  &:hover {
    background: var(--surface-raised);
  }
}

.place-picker[open] > summary::after {
  content: "▴";
  content: "▴" / "";
}

/* The phone's panel: one row of pills after another, each named above them
   and parted by a hairline. The chosen cities' cinemas stand in it open. */
.filter-panel {
  margin-block-start: var(--space-3);
  border-block-end: 1px solid var(--rule);
}

.filter-row,
.cinema-row {
  padding-block: var(--space-3) var(--space-4);
  border-block-start: 1px solid var(--rule);
}

.filter-cinemas {
  padding-block: 0;
  border: 0;
}

.filter-cinemas > .fold-button {
  display: none;
}

@media (width < 64rem) {
  .filter-panel:not([data-open]) {
    display: none;
  }

  .filter-more {
    display: contents;
  }
}

.filter-label {
  margin: 0 0 var(--space-2);
  font-size: var(--step--1);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* A weekday's abbreviation, for narrow screens. */
.day-abbr {
  display: none;
}

.place-panel {
  display: grid;
  gap: var(--space-3);
  margin-block-start: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-3);
}

.country-places > summary {
  padding-block: var(--space-1);
  font-weight: 600;
  cursor: pointer;

  .count {
    margin-inline-start: 0.375rem;
    font-weight: 400;
  }
}

.country-places[open] > summary {
  margin-block-end: var(--space-2);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* Each pill is a one-button form; the forms stay out of the layout. */
.pill-form,
.inline-form {
  display: contents;
}

.pill {
  gap: 0.375rem;
  min-block-size: var(--pill-size);
  padding: var(--space-1) var(--space-3);
  border: var(--edge) solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  white-space: nowrap;
  transition:
    background-color 0.12s,
    border-color 0.12s,
    color 0.12s;

  &:hover {
    background: var(--surface-raised);
  }

  &[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
  }

  /* A city narrowed to some of its cinemas: half inverted, by a stripe. */
  &[aria-pressed="mixed"] {
    background: linear-gradient(to right, var(--accent) 0 0.375rem, transparent 0.375rem);
    padding-inline-start: calc(var(--space-3) + 0.375rem);
  }
}

/* A pill's form is pending from the click until the results redraw
   (application.js): the pill shows its new state at once. A city narrowed to
   some cinemas turns off whole. */
.pill-form[data-pending] {
  .pill[aria-pressed="false"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);

    .count {
      color: inherit;
    }
  }

  .pill:is([aria-pressed="true"], [aria-pressed="mixed"]) {
    background: transparent;
    border-color: var(--border);
    color: var(--text);

    .count {
      color: var(--muted);
    }
  }
}

.count {
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  color: var(--muted);

  .pill[aria-pressed="true"] & {
    color: inherit;
  }
}

.summary,
.empty {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-3);

  p {
    margin: 0;
  }
}

/* A button that reads as a link, for "Show all cinemas". */
.link-button {
  display: inline;
  min-block-size: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.badge {
  display: inline-block;
  padding: 0 0.375rem;
  border-radius: var(--radius-1);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.more {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
  margin-block: var(--space-6);

  p {
    margin: 0;
  }
}

.notice {
  padding-inline-start: var(--space-3);
  border-inline-start: 3px solid var(--border);
}

.empty {
  margin-block: var(--space-6);
}

/* The films view: a wall of posters, two abreast on a phone and as many as
   fit on a wide screen, each with its title and its next screenings as
   departure lines under it (docs/decisions/board.md). */
.films {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8) var(--space-4);
  margin-block: var(--space-4);

  @media (width >= 40rem) {
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: var(--space-10) var(--space-5);
  }
}

.film-card {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.film-poster-link {
  display: block;
}

.film-poster {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--surface-raised);
}

/* Its screening rows reflow by the card's width (below). */
.film-details {
  container: film-details / inline-size;
  min-inline-size: 0;
}

/* The title and its year on one line: the heading is the title alone. */
.film-title {
  margin: var(--space-3) 0 var(--space-1);
  line-height: 1.2;
}

.film-card h2 {
  display: inline;
  margin: 0;
  font-size: var(--step-0);
  font-weight: 600;

  a {
    color: inherit;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

.year {
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--muted);
}

/* A departure line: the day muted and the time in the mono, then the cinema,
   which leads to its tickets, then what Cineville says of the screening. In a
   card the cinema takes the line under the time. */
.screening-list {
  list-style: none;
  padding: 0;
  margin: 0;

  /* Direct rows only: the tags under a row are list items too. */
  > li {
    padding-block: var(--space-1);
    font-size: var(--step--1);
    line-height: 1.35;
  }

  .when {
    display: block;
    font-variant-numeric: tabular-nums;
  }
}

/* A time is the day, muted, and the clock in the mono. */
.when .day-label {
  margin-inline-end: 0.375em;
  color: var(--muted);
}

.clock {
  font-family: var(--font-time);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* The signal: the soonest screening's clock on the one yellow, with how soon
   it is under it. */
.next .clock {
  padding-inline: 0.2em;
  background: var(--signal);
  color: var(--on-signal);
}

.soon {
  display: block;
  font-size: var(--step--2);
  font-weight: 600;
}

/* The end of a screening, when Cineville gives one. */
.ends {
  color: var(--muted);
  font-family: var(--font-time);
  font-size: 0.9em;
}

.venue {
  overflow-wrap: anywhere;
}

/* The city after a cinema, quieter: on a member's own city it repeats. */
.city {
  color: var(--muted);
}

/* The cinema is the way to its tickets: underlined lightly, with an arrow. */
.ticket-link {
  color: var(--text);
  text-decoration-color: color-mix(in srgb, currentcolor 35%, transparent);
  text-underline-offset: 0.2em;

  &:hover {
    text-decoration-color: currentcolor;
  }
}

.ticket-note {
  display: block;
}

/* What Cineville says of a screening, as short words under its cinema: its
   version, subtitles, Cineville's tags, festivals and the cinema's notes,
   muted and parted by a dot. */
.screening-tags {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  color: var(--muted);

  li {
    display: inline;
    overflow-wrap: anywhere;
  }

  li:not(:last-child)::after {
    content: " · ";
    content: " · " / "";
  }
}

.more-screenings summary {
  padding-block: var(--space-1);
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  list-style: none;

  &::-webkit-details-marker {
    display: none;
  }
}

/* The agenda: every screening by day, time first. A day opens under a heavy
   rule with its name in capitals; its rows part on hairlines. */
.agenda-day {
  margin-block: var(--space-6) 0;

  h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 var(--space-4);
    margin: 0;
    padding-block: var(--space-2);
    border-block-start: var(--rule-heavy) solid var(--text);
    font-size: var(--step-3);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
  }
}

.agenda-day-date {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

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

/* A row: the time, a small poster, the film with where it plays and what
   Cineville says of it, and the tickets. */
.agenda-row {
  display: grid;
  grid-template-columns: 4.5rem 2.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-block-start: 1px solid var(--rule);

  .when {
    display: block;
    font-size: var(--step-2);
  }

  .ends {
    display: block;
    font-size: var(--step--2);
  }
}

.agenda-poster {
  display: block;
  inline-size: 2.5rem;
  block-size: 3.75rem;
  object-fit: cover;
  background: var(--surface-raised);
}

.agenda-film {
  display: grid;
  gap: 0.125rem;
  min-inline-size: 0;
}

.agenda-title {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;

  a {
    color: inherit;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

.agenda-film .venue,
.agenda-tags {
  font-size: var(--step--1);
  color: var(--muted);
}

.agenda-film .venue {
  color: var(--text);
}

.agenda-row .ticket-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
  min-block-size: var(--control-size);
  min-inline-size: var(--control-size);
  font-weight: 600;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.agenda-row .ticket-note {
  font-size: var(--step--2);
  color: var(--muted);
  text-align: end;
}

/* A phone's row has no room for the word: the arrow is the way to tickets,
   and its label says so. */
@media (width < 40rem) {
  .ticket-word {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .agenda-row .ticket-note {
    grid-column: 3 / -1;
    max-inline-size: none;
    text-align: start;
  }
}

/* A wide screen gives where it plays and what Cineville says of it columns of
   their own, as on a board. */
@media (width >= 48rem) {
  .agenda-day h2 {
    justify-content: flex-start;
  }

  .agenda-row {
    grid-template-columns: 5.5rem 2.5rem minmax(0, 1fr) 7rem;
    gap: var(--space-5);

    .when {
      font-size: var(--step-3);
    }
  }

  .agenda-film {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: baseline;
    gap: var(--space-5);
  }

  .agenda-film .venue {
    font-size: var(--step-0);
  }
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  margin-block: var(--space-4);
}

/* When the results were read from Letterboxd, with a way to read them again. */
.freshness {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-3);
  font-size: var(--step--1);
  color: var(--muted);

  p {
    margin: 0;
  }
}

/* One film: under a heavy rule its title and facts beside the poster, then
   its screenings as one timetable, a day to a row (docs/decisions/board.md). */
.back {
  display: inline-block;
  margin-block-end: var(--space-3);
  font-weight: 600;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.film-hero {
  display: flex;
  gap: var(--space-6);
  margin-block-end: var(--space-8);
  padding-block-start: var(--space-4);
  border-block-start: var(--rule-heavy) solid var(--text);

  .film-poster {
    flex-shrink: 0;
    inline-size: 10rem;
    block-size: 15rem;
  }

  p {
    margin-block: var(--space-1) var(--space-3);
  }
}

.film-facts {
  color: var(--muted);
}

/* The titles a film also goes by, right under its own: one step below the
   heading's weight, so the eye takes the main title first. */
.other-titles {
  font-size: var(--step-1);
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* The tagline in the text's semibold: the site ships no italic, and a
   browser's slanted roman is not one. */
.tagline {
  font-weight: 600;
}

.section-title {
  font-size: var(--step-2);
  margin-block: 0;
}

/* The timetable: each day a row under a hairline, its name in the first
   column and its screenings beside it; the whole opens under a heavy rule. */
.timetable {
  margin-block: var(--space-4);
  border-block: var(--rule-heavy) solid var(--text);
  border-block-end: 1px solid var(--rule);
}

.timetable .day {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-3);

  & + & {
    border-block-start: 1px solid var(--rule);
  }

  h3 {
    display: grid;
    align-content: start;
    margin: 0;
    font-size: var(--step--1);
    line-height: 1.3;
  }

  .day-relative {
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .day-date {
    font-weight: 400;
    color: var(--muted);
  }

  .day-date:only-child {
    font-weight: 700;
    color: var(--text);
  }

  /* A screening: the time, then the cinema, which leads to its tickets, and
     what Cineville says of it. */
  .screening-list > li {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    grid-auto-flow: dense;
    align-items: baseline;
    gap: 0 var(--space-3);
    padding-block: 0 var(--space-2);
    font-size: var(--step-0);

    > :not(.when, .soon) {
      grid-column: 2;
    }
  }

  .when {
    grid-column: 1;
    font-size: var(--step-1);
  }

  .ends {
    display: block;
    font-size: var(--step--2);
  }

  .soon {
    grid-column: 1;
  }

  .screening-tags {
    font-size: var(--step--1);
  }
}

/* Results stay in place while the next ones load: a short wait shows nothing,
   a longer one dims them under a progress bar, and a long one explains itself. */
turbo-frame {
  display: block;
}

.results > * {
  transition: opacity 0.15s;
}

/* The tabs stay sharp: they show where the reader is going. */
turbo-frame[busy] .results > :not(.tabs) {
  opacity: 0.5;
  transition: opacity 0.2s 0.25s;
}

/* A place pill shows its own change, so the results dim and the bar runs only
   when that change is slow to arrive. A bar already running for a background
   fetch keeps going. */
turbo-frame[busy]:has(.pill-form[data-pending]) {
  .results > :not(.tabs) {
    transition-delay: 1s;
  }

  &:not(:has(turbo-cable-stream-source))::before {
    animation-delay: 1s;
  }
}

/* A frame waiting for a background fetch (LetterboxdPageChannel) is still loading. */
turbo-frame:is([busy], :has(turbo-cable-stream-source))::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 1;
  block-size: 3px;
  background: var(--accent);
  transform-origin: left;
  animation: loading 20s cubic-bezier(0.1, 0.8, 0.2, 1) 0.15s both;
}

.busy-note {
  display: none;
}

turbo-frame[busy] .busy-note {
  display: block;
  position: fixed;
  inset-block-end: var(--space-4);
  inset-inline: var(--space-4);
  z-index: 1;
  inline-size: fit-content;
  max-inline-size: calc(100% - 2rem);
  margin: 0 auto;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--surface);
  font-size: var(--step--1);
  animation: reveal 0s 1.5s both;
}

@keyframes loading {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(0.95);
  }
}

@keyframes reveal {
  from {
    visibility: hidden;
  }
}

/* A first fetch's steps (letterboxd/_progress): done, current, still to come. */
.fetch-progress .steps {
  display: grid;
  gap: var(--space-2);
  margin-block: var(--space-6);
  padding: 0;
  list-style: none;

  li {
    display: grid;
    grid-template-columns: 1.25rem 1fr;
    column-gap: var(--space-2);
    align-items: baseline;
    color: var(--muted);

    &::before {
      content: "○" / "";
    }
  }

  .done {
    color: var(--text);

    &::before {
      content: "✓" / "";
      color: var(--accent);
    }
  }

  [aria-current] {
    color: var(--text);
    font-weight: 600;

    &::before {
      content: "●" / "";
      color: var(--accent);
      animation: pulse 1.2s ease-in-out infinite alternate;
    }
  }

  progress {
    grid-column: 2;
    inline-size: 100%;
    max-inline-size: 20rem;
    accent-color: var(--accent);
  }
}

@keyframes pulse {
  to {
    opacity: 0.25;
  }
}

.site-footer {
  margin-block-start: var(--space-12);
  padding-block-start: var(--space-4);
  border-block-start: var(--rule-heavy) solid var(--text);

  a {
    color: inherit;
  }

  img {
    inline-size: 4rem;
    block-size: auto;
    vertical-align: middle;
  }

  /* The site's one mention of its name, plain and bold. */
  .site-name {
    font-weight: 700;
    color: var(--text);
  }

  p {
    margin-block: var(--space-1);
  }
}

@media (width <= 600px) {
  /* The coming week fits two lines: weekdays show their abbreviation, and
     their name stays for screen readers. */
  .day-name {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .day-abbr {
    display: inline;
  }

  .place-panel {
    padding: var(--space-3);
  }
}

@media (width <= 480px) {
  .film-hero {
    gap: var(--space-4);

    .film-poster {
      inline-size: 6rem;
      block-size: 9rem;
    }
  }

  .timetable .day {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: var(--space-3);
  }
}

/* The account page: one section per subject. */
.settings {
  margin-block-start: var(--space-6);

  section + section {
    margin-block-start: var(--space-10);
    padding-block-start: var(--space-4);
    border-block-start: var(--rule-heavy) solid var(--text);
  }

  h2 {
    font-size: var(--step-2);
    margin-block: 0;
  }

  .hint {
    margin-block: var(--space-1);
  }
}

/* The browsers a member signed in with, each with its sign-out button. */
.sessions {
  list-style: none;
  padding: 0;
  margin: 0;

  li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2) var(--space-4);
    padding-block: var(--space-3);
    border-block-end: 1px solid var(--rule);
  }

  p {
    margin: 0;
  }
}

/* A question asked once more before something that cannot be undone. */
.confirm {
  inline-size: min(28rem, 100% - 2rem);
  padding: var(--space-6);
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
  background: var(--surface);
  color: var(--text);

  &::backdrop {
    background: rgb(0 0 0 / 50%);
  }

  p {
    margin: 0;
  }
}

/* A command to copy, such as an API request. */
.example {
  overflow-x: auto;
  padding: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
  font-size: var(--step--1);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Admin: the member list and a member's facts. A table wider than its region
   scrolls sideways, and a shadow at an edge says there is more that way: the
   covers scroll with the table and hide the shadow once its end is in view;
   the shadows stay put. */
.table-scroll {
  overflow-x: auto;
  background:
    linear-gradient(to right, var(--surface) 40%, transparent) left / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--surface) 40%, transparent) right / 2.5rem 100% no-repeat local,
    linear-gradient(to right, var(--edge-shadow), transparent) left / 1rem 100% no-repeat scroll,
    linear-gradient(to left, var(--edge-shadow), transparent) right / 1rem 100% no-repeat scroll;
}

.members {
  inline-size: 100%;
  min-inline-size: max-content;
  border-collapse: collapse;
  font-size: var(--step--1);

  th,
  td {
    padding: var(--space-2) var(--space-3) var(--space-2) 0;
    border-block-end: 1px solid var(--rule);
    text-align: start;
    vertical-align: top;
  }
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-4);

  dt {
    font-weight: 600;
  }

  dd {
    margin: 0;
    overflow-wrap: anywhere;
  }
}

/* A page's main button with a link beside it. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
}

/* The members someone invited, one address per line, in the facts' column. */
.invitees {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Wide screens: the page widens for six posters abreast, and the filters are
   a toolbar over the results: the views' switch and the days on its first
   line, then the places picker, the cinemas' button and the versions; an open
   picker or cinema panel takes a line of its own. Rows are named for screen
   readers only; the pills say what they are. */
@media (width >= 64rem) {
  .app {
    max-inline-size: 76rem;
  }

  .filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
    padding-block-end: var(--space-4);

    .view-switch {
      margin: 0;
    }
  }

  .filter-summary {
    display: none;
  }

  .filter-panel {
    display: contents;
  }

  .filter-row,
  .filter-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
    padding: 0;
    border: 0;
  }

  .filter-more {
    flex-basis: 100%;
  }

  .filter-row > .filter-label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .filter-cinemas {
    display: contents;

    > .fold-button {
      display: inline-flex;
    }
  }

  .cinema-panel {
    flex-basis: 100%;
    order: 1;

    &:not([data-open]) {
      display: none;
    }
  }

  /* An open picker takes a line of its own, its panel under its button. */
  .filter-places:has(.place-picker[open]) {
    flex-basis: 100%;
  }

  .place-panel {
    max-inline-size: 48rem;
  }

  .filtered-results > :first-child {
    margin-block-start: 0;
  }
}
