/* Styles of the UI, after the "HPO Concert Information – Redesign" canvas.
   1rem = 10px (html font-size 62.5% of the browser default 16px).
   The fonts are served from static/fonts (see vendor/VERSIONS.md); a browser downloads a
   face only when a page uses it. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/cedb374b05a3/fonts/roboto-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/1404ca348bd7/fonts/roboto-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/static/d10ccbbd0dc4/fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/static/382475f38242/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("/static/cd5bf126b2c8/fonts/cormorant-garamond-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("/static/6f2f5c3b1abc/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/static/cfa9a397d86f/fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/static/d80df8ff5aec/fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* While Cormorant Garamond loads, Times New Roman (or Liberation Serif, with the same
   metrics) sized to take the same space, so the programme card doesn't jump when the
   font arrives. Measured in Chromium: Cormorant is 97 % of Times's width upright and 88 %
   in italics; its ascent and descent are 92 % and 29 % of the size. */
@font-face {
  font-family: "Cormorant Garamond Fallback";
  font-style: normal;
  src: local("Times New Roman"), local("Liberation Serif");
  size-adjust: 97%;
  ascent-override: 95%;
  descent-override: 30%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Cormorant Garamond Fallback";
  font-style: italic;
  src: local("Times New Roman Italic"), local("Liberation Serif Italic");
  size-adjust: 88%;
  ascent-override: 105%;
  descent-override: 33%;
  line-gap-override: 0%;
}

:root {
  --color-teal: #005b5b;
  --color-teal-dark: #003f3f;
  --color-teal-darker: #00403f;
  --color-teal-tint: #e6f0f0;
  --color-nav-text: #d6ecec;
  --color-footer-text: #e6f2f2;
  --color-page: #f6f4ee;
  --color-card: #ffffff;
  --color-ink: #1b2a2a;
  --color-text-strong: #2b3b3b;
  --color-text-secondary: #4a5b5b;
  --color-text-label: #3c4f4f;
  --color-placeholder: #5c6b6b;
  --color-ring: #dad6cb;
  --color-line: #ece8de;
  --color-border: #6f8080;
  --color-gold: #c9a15a;
  --color-gold-dark: #8a5f12;
  /* Gold text on the teal header (contrast 5:1) */
  --color-gold-light: #e8c987;
  --color-chip: #f3ead6;
  --color-chip-text: #6b4a0e;
  --color-disabled-bg: #f0eee8;
  --color-disabled-border: #c9cfcf;
  --color-disabled-text: #6b7878;
  --color-error: #8c1d18;
  --color-error-bg: #fbeaea;
  --color-error-border: #e2b9b6;
  --color-success: #1e5631;
  --color-success-bg: #e8f3ec;
  --color-backdrop: rgba(10, 30, 30, 0.55);
  --shadow-ring: 0 0 0 1px var(--color-ring);
  --shadow-menu: 0 8px 24px rgba(27, 42, 42, 0.18), 0 0 0 1px var(--color-ring);

  --font-body: "Roboto", system-ui, sans-serif;
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-card: "Cormorant Garamond", "Cormorant Garamond Fallback", serif;

  /* Font sizes, only for font-size */
  --font-size-xs: 1.2rem;
  --font-size-sm: 1.4rem;
  --font-size-md: 1.6rem;
  --font-size-lg: 1.8rem;
  --font-size-xl: 2.4rem;
  --font-size-xxl: 3.6rem;
  /* Every page's title on a phone */
  --font-size-h1-phone: 2.8rem;

  /* Spacing, for paddings and gaps */
  --space-xs: 0.4rem;
  --space-sm: 0.8rem;
  --space-md: 1.2rem;
  --space-lg: 1.6rem;
  --space-xl: 2.4rem;
  --space-xxl: 3.2rem;

  --radius: 0.6rem;
  --radius-card: 0.8rem;
  /* Fully rounded ends */
  --radius-pill: 99.9rem;
  --icon-size: 2.4rem;
  --touch-target: 4.4rem;
  --field-height: 4.8rem;
  --page-max-width: 136rem;
  --header-height: 6.4rem;
  --header-height-mobile: 5.6rem;
  --letter-spacing-caps: 0.06em;
  /* A request's loader shows only after this long, then fades in */
  --loader-delay: 1s;
  --loader-fade: 0.2s;
  --loader-size: 4rem;
  /* An entity's icon before a page heading */
  --heading-icon-size: 3.6rem;
  /* A names view table scrolls inside its card beyond this */
  --names-table-max-height: 64rem;
  /* An admin card's long list scrolls inside it beyond this on wide screens */
  --admin-card-list-max-height: 60rem;
  /* An open upload error or conflict list scrolls inside itself beyond this */
  --upload-list-max-height: 40rem;
  --color-veil: rgba(255, 255, 255, 0.7);
  /* Menus and filter panels that slide in */
  --drawer-duration: 0.25s;
  --drawer-easing: cubic-bezier(0.2, 0, 0, 1);
  /* The year picker: the flyout's width, its tiles' height (taller in the sheet), and the
     tiles' border */
  --year-picker-width: 36rem;
  --year-tile-height: 4rem;
  --year-tile-height-sheet: 4.8rem;
  --color-tile-border: #9db0b0;
  /* The page buttons: pressed, and the text of one that can't be used */
  --color-teal-pressed: #cfe2e2;
  --color-pager-disabled: #8a9696;
  /* A press's ripple: a small circle around the pointer of this radius, how long it spreads
     and fades, and how strong it starts */
  --ripple-radius: 1.5cm;
  --ripple-duration: 0.5s;
  --ripple-opacity: 0.24;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  /* No browser tap flash on touch screens: presses have their own feedback (the ripple) */
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-ink);
  background-color: var(--color-page);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  font: inherit;
}

/* The hidden attribute wins over a component's display */
[hidden] {
  display: none !important;
}

/* Alpine hides these until it has started */
[x-cloak] {
  display: none !important;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: var(--font-size-xxl);
}

h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

strong,
.bold {
  font-weight: 700;
}

a {
  color: var(--color-teal);
}

a:hover {
  color: var(--color-teal-dark);
}

.link {
  color: var(--color-teal);
  overflow-wrap: anywhere;
}

/* Clear keyboard focus indicator (WCAG 2.4.7): a dark outline with a gold ring */
:focus-visible {
  outline: 0.2rem solid var(--color-ink);
  outline-offset: 0.2rem;
  box-shadow: 0 0 0 0.5rem var(--color-gold);
}

/* After a click or tap (app.js) no ring: e.g. on the menu button the script focuses when the
   menu closes. It comes back with the first key press; text fields keep their teal border */
html[data-input="pointer"] :focus-visible {
  outline: none;
  box-shadow: none;
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
}

/* Hidden visually, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Visible only when focused with the keyboard */
.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 2000;
  padding: var(--space-sm) var(--space-lg);
  color: #fff;
  background-color: var(--color-teal-dark);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Layout */
.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper {
  flex: 1 0 auto;
  width: 100%;
}

main:focus {
  outline: none;
  box-shadow: none;
}

.page {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-xxl);
}

/* Pages not redesigned yet keep a narrow column */
.page--narrow {
  max-width: 72rem;
}

/* Header: logo and site name, the main navigation, the language menu */
.header {
  color: #fff;
  background-color: var(--color-teal);
}

.header__inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  min-height: var(--header-height-mobile);
  padding: 0 var(--space-xs) 0 var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm) 4rem;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-right: auto;
  min-height: var(--touch-target);
  color: #fff;
  text-decoration: none;
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.header__brand:hover {
  color: #fff;
}

.header__logo {
  width: 3.2rem;
  height: 3.2rem;
  flex-shrink: 0;
}

.header__nav {
  display: none;
  align-self: stretch;
}

.header__nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.header__nav-link {
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 var(--space-lg);
  color: var(--color-nav-text);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
}

.header__nav-link:hover,
.header__nav-link[aria-current="page"] {
  color: #fff;
}

.header__nav-link[aria-current="page"] {
  box-shadow: inset 0 -0.3rem 0 var(--color-gold);
}

/* The admin link, only after an admin login: apart from the public pages behind a divider,
   in light gold with a shield */
.header__nav-admin {
  display: flex;
  align-items: center;
  margin-left: var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.header__nav-link--admin {
  gap: var(--space-sm);
  align-self: stretch;
  color: var(--color-gold-light);
}

.header__nav-link--admin .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.header__nav-link--admin:hover,
.header__nav-link--admin[aria-current="page"] {
  color: var(--color-gold-light);
  text-decoration: underline;
  text-underline-offset: 0.4rem;
}

.header__nav-link--admin[aria-current="page"] {
  text-decoration: none;
}

/* Buttons on the teal header: the language menu (outlined) and the menu (icon) */
.header__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  padding: 0 var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  background: none;
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
}

.header__button:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.header__button .icon {
  width: 2rem;
  height: 2rem;
}

.header__menu-button {
  border: none;
}

.header__menu-button .icon {
  width: var(--icon-size);
  height: var(--icon-size);
}

/* The language menu is in the header on wide screens, in the menu on narrow ones */
.language {
  position: relative;
  display: none;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-xs));
  z-index: 1300;
  min-width: 16rem;
  padding: var(--space-xs) 0;
  list-style: none;
  border-radius: var(--radius);
  background-color: var(--color-card);
  box-shadow: var(--shadow-menu);
}

.menu [role="menuitem"] {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-lg);
  color: var(--color-ink);
  text-decoration: none;
}

.menu [role="menuitem"]:hover,
.menu [role="menuitem"]:focus-visible {
  background-color: var(--color-teal-tint);
}

.menu [aria-current="true"] {
  font-weight: 700;
}

/* Menu for narrow screens: a modal dialog from the right; the browser keeps focus inside
   it and closes it with Escape */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(88%, 34.8rem);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: none;
  background-color: var(--color-card);
  color: var(--color-ink);
  box-shadow: -0.8rem 0 2.4rem rgba(0, 0, 0, 0.25);
}

/* The drawers take focus themselves when opened (app.js): no outline on the dialog */
.drawer:focus,
.filter-panel:focus {
  outline: none;
  box-shadow: none;
}

.drawer[open] {
  display: flex;
  flex-direction: column;
}

.drawer::backdrop {
  background-color: var(--color-backdrop);
}

/* The menu and a modal filter panel slide in from their side and out again, the year
   picker's sheet up from the bottom and down again; the backdrop fades. overlay and display
   keep a closing dialog shown until it has slid out (browsers without these just show and
   hide it) */
.drawer,
.filter-panel--modal,
.year-picker__panel--sheet {
  transition:
    transform var(--drawer-duration) var(--drawer-easing),
    overlay var(--drawer-duration) allow-discrete,
    display var(--drawer-duration) allow-discrete;
}

.drawer::backdrop,
.filter-panel--modal::backdrop,
.year-picker__panel--sheet::backdrop {
  transition:
    opacity var(--drawer-duration) var(--drawer-easing),
    overlay var(--drawer-duration) allow-discrete,
    display var(--drawer-duration) allow-discrete;
}

.drawer:not([open]) {
  transform: translateX(100%);
}

.filter-panel--modal:not([open]) {
  transform: translateX(-100%);
}

.year-picker__panel--sheet:not([open]) {
  transform: translateY(100%);
}

.drawer:not([open])::backdrop,
.filter-panel--modal:not([open])::backdrop,
.year-picker__panel--sheet:not([open])::backdrop {
  opacity: 0;
}

@starting-style {
  .drawer[open] {
    transform: translateX(100%);
  }

  .filter-panel--modal[open] {
    transform: translateX(-100%);
  }

  .year-picker__panel--sheet[open] {
    transform: translateY(100%);
  }

  .drawer[open]::backdrop,
  .filter-panel--modal[open]::backdrop,
  .year-picker__panel--sheet[open]::backdrop {
    opacity: 0;
  }
}

/* While the page is left (app.js) what closes doesn't slide: a page kept for Back would
   otherwise come back mid-slide */
html[data-leaving] *,
html[data-leaving] *::backdrop {
  transition: none !important;
}

/* The drawers and the sheet slide only on narrow screens. When the screen widens with one open,
   app.js closes it after the desktop layout applies: without a slide it leaves the top layer
   at once (a slide would keep it there, the filter card spread across the window meanwhile) */
@media (min-width: 1024px) {
  .drawer,
  .filter-panel--modal,
  .year-picker__panel--sheet,
  .drawer::backdrop,
  .filter-panel--modal::backdrop,
  .year-picker__panel--sheet::backdrop {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .filter-panel--modal,
  .year-picker__panel--sheet,
  .drawer::backdrop,
  .filter-panel--modal::backdrop,
  .year-picker__panel--sheet::backdrop {
    transition: none;
  }
}

.drawer__top {
  flex: none;
  min-height: var(--header-height-mobile);
  padding: 0 var(--space-xs) 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-ring);
}

.drawer__top h2 {
  font-size: 2.2rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--color-ink);
  cursor: pointer;
}

.icon-button:hover {
  background-color: var(--color-line);
}

.drawer__nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-md);
}

.drawer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.drawer__list a {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 5.6rem;
  padding: 0 var(--space-md);
  border-radius: var(--radius-card);
  color: var(--color-ink);
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: 500;
}

/* The admin link in its own group below the public pages */
.drawer__admin {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-ring);
}

.drawer__admin .icon {
  color: var(--color-chip-text);
}

.drawer__admin .chip {
  margin-left: auto;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
}

.drawer__list a:hover {
  background-color: var(--color-page);
}

.drawer__list a[aria-current="page"] {
  background-color: var(--color-teal-tint);
  color: var(--color-teal-dark);
  font-weight: 700;
}

.drawer__list .icon {
  color: var(--color-teal);
}

.drawer__language {
  flex: none;
  padding: var(--space-lg) 2rem var(--space-xl);
  border-top: 1px solid var(--color-ring);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.drawer__language-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.drawer__language-label .icon {
  color: var(--color-teal);
}

.drawer__languages {
  list-style: none;
  display: flex;
  gap: var(--space-sm);
}

.drawer__languages a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--field-height);
  padding: 0 var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-ink);
  text-decoration: none;
}

.drawer__languages a[aria-current="true"] {
  border-color: var(--color-teal);
  background-color: var(--color-teal-tint);
  font-weight: 700;
}

/* Footer */
.footer {
  color: var(--color-footer-text);
  background-color: var(--color-teal-darker);
}

.footer__inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 2rem var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xxl);
  font-size: var(--font-size-sm);
}

.footer a {
  color: #fff;
  overflow-wrap: anywhere;
}

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

.footer :focus-visible {
  outline-color: #fff;
}

/* Cards: white on the cream page, with a thin ring */
.card {
  background-color: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-ring);
}

/* Buttons, and links that look like buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--touch-target);
  padding: 0 var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

/* A button's text, trimmed to the capitals' height where the browser can, so the flex
   centring puts the capitals level with the icon */
.button__text {
  text-box: trim-both cap alphabetic;
}

.button .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.button--outlined {
  border-color: var(--color-teal);
  color: var(--color-teal);
  background-color: var(--color-card);
}

.button--outlined:hover {
  color: var(--color-teal-dark);
  background-color: var(--color-teal-tint);
}

.button--contained {
  min-height: var(--field-height);
  color: #fff;
  background-color: var(--color-teal);
}

.button--contained:hover {
  color: #fff;
  background-color: var(--color-teal-dark);
}

.button--text {
  color: var(--color-teal);
  background: none;
}

.button--text:hover {
  background-color: var(--color-teal-tint);
}

/* A button that can't be used: no border, a grey fill, grey text */
.button:disabled,
.button[aria-disabled="true"],
.button--contained:disabled {
  border-color: transparent;
  color: var(--color-disabled-text);
  background-color: var(--color-line);
  box-shadow: none;
  cursor: not-allowed;
}

/* A press's ripple (app.js): a small circle in the text's colour spreads around the pointer
   and fades, clipped to the element's rounded box. The element gets ripple-host only when it
   has no position of its own */
.ripple-host {
  position: relative;
}

.ripple {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.ripple__wave {
  position: absolute;
  width: calc(2 * var(--ripple-radius));
  height: calc(2 * var(--ripple-radius));
  margin: calc(-1 * var(--ripple-radius)) 0 0 calc(-1 * var(--ripple-radius));
  border-radius: 50%;
  background-color: currentColor;
  opacity: var(--ripple-opacity);
  transform: scale(0);
  animation: ripple var(--ripple-duration) var(--drawer-easing) forwards;
}

@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripple {
    display: none;
  }
}

/* The page buttons: borderless, teal text, as wide as the label. Hover (where there is one)
   tints them, a press (a tap on a phone) shows a darker tint; the arrows stay still */
.button--pager {
  padding: 0 var(--space-md);
  color: var(--color-teal);
  background: none;
}

@media (hover: hover) {
  .button--pager:hover {
    color: var(--color-teal-dark);
    background-color: var(--color-teal-tint);
  }
}

.button--pager:active {
  color: var(--color-teal-dark);
  background-color: var(--color-teal-pressed);
}

/* One that can't be used: grey text, no fill, no hover or press */
.button--pager[aria-disabled="true"],
.button--pager[aria-disabled="true"]:hover,
.button--pager[aria-disabled="true"]:active {
  color: var(--color-pager-disabled);
  background: none;
  cursor: default;
}

.back {
  padding-bottom: var(--space-xl);
}

/* Text fields: label above a boxed field */
.field__label {
  display: block;
  padding-bottom: 0.6rem;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-text-label);
  /* A label isn't clickable in the filters (app.js) */
  cursor: default;
}

.field__input,
.field__select {
  display: block;
  width: 100%;
  height: var(--field-height);
  padding: 0 1.4rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-card);
  color: var(--color-ink);
  font-size: var(--font-size-md);
}

.field__input::placeholder {
  color: var(--color-placeholder);
}

.field__input:hover,
.field__select:hover {
  border-color: var(--color-ink);
}

.field__input:focus,
.field__select:focus {
  border-color: var(--color-teal);
}

.field__input:disabled,
.field__input[aria-disabled="true"] {
  border-color: var(--color-disabled-border);
  background-color: var(--color-disabled-bg);
  color: var(--color-disabled-text);
  cursor: not-allowed;
}

/* Tooltips: why something can't be used, shown on hover and keyboard focus of the element
   that has aria-disabled; Escape hides it (app.js) */
.has-tooltip {
  position: relative;
}

.tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  z-index: 1400;
  width: max-content;
  max-width: min(28rem, 80vw);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background-color: var(--color-ink);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: var(--shadow-menu);
}

/* Below the element (its label stays visible), with a small arrow up to it */
.tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 1.6rem;
  border: 0.6rem solid transparent;
  border-bottom-color: var(--color-ink);
}

.has-tooltip:has([aria-disabled="true"]):hover > .tooltip,
.has-tooltip:has([aria-disabled="true"]:focus) > .tooltip {
  display: block;
}

/* Wins over the :has() rule above, which counts its arguments too */
.has-tooltip.tooltip-dismissed > .tooltip {
  display: none !important;
}

/* Search field with suggestions */
.combobox {
  position: relative;
  text-align: left;
}

.combobox__field {
  position: relative;
}

.combobox__input {
  padding-right: var(--touch-target);
}

.combobox:has(.combobox__input[aria-disabled="true"]) .field__label {
  color: var(--color-disabled-text);
}

.combobox__clear {
  position: absolute;
  top: 50%;
  right: 0.2rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--color-text-label);
  cursor: pointer;
}

.combobox__clear:hover {
  background-color: var(--color-line);
}

.combobox__clear .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.combobox__listbox {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1300;
  max-height: 40vh;
  margin-top: var(--space-xs);
  overflow-y: auto;
  padding: var(--space-xs) 0;
  list-style: none;
  border-radius: var(--radius);
  background-color: var(--color-card);
  box-shadow: var(--shadow-menu);
}

/* Opens above its field when there is more room there (app.js sets the offset) */
.combobox__listbox--above {
  margin-top: 0;
}

.combobox__option {
  padding: var(--space-sm) var(--space-lg);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.combobox__option:hover {
  background-color: var(--color-page);
}

.combobox__option[aria-selected="true"] {
  background-color: var(--color-teal-tint);
  box-shadow: inset 0.3rem 0 0 var(--color-teal);
}

.combobox__option--chosen {
  font-weight: 700;
}

.combobox__option--empty {
  color: var(--color-text-secondary);
  cursor: default;
}

/* The select made by app.js: the value and an arrow, the list below. The native select
   it replaces stays in the form, hidden */
.field__select[hidden] {
  display: none;
}

.list-select {
  position: relative;
}

.list-select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: var(--space-md);
  cursor: pointer;
  user-select: none;
}

.list-select__button .icon {
  width: 1.8rem;
  height: 1.8rem;
  color: var(--color-text-label);
}

/* The year field made by app.js ("yearPicker"): the year and a calendar, the picker of the
   decades and years above it (a flyout) or, on narrow screens, as a sheet at the bottom */
.year-picker {
  position: relative;
}

.year-picker__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  text-align: left;
  cursor: pointer;
}

.year-picker__button[aria-expanded="true"] {
  border-color: var(--color-teal);
  box-shadow: inset 0 0 0 1px var(--color-teal);
}

.year-picker__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.year-picker__button .icon {
  flex: none;
  width: 2rem;
  height: 2rem;
  color: var(--color-teal);
}

.year-picker__panel {
  position: absolute;
  inset: auto auto calc(100% + 1rem) 0;
  z-index: 1300;
  width: var(--year-picker-width);
  max-width: calc(100vw - 2 * var(--space-lg));
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-card);
  background-color: var(--color-card);
  color: var(--color-ink);
  box-shadow: var(--shadow-menu);
}

.year-picker__panel:focus {
  outline: none;
}

/* The flyout's arrow down to its field (up when it opens below) */
.year-picker__panel::after {
  content: "";
  position: absolute;
  left: 2.2rem;
  bottom: -0.6rem;
  width: 1.2rem;
  height: 1.2rem;
  background-color: var(--color-card);
  box-shadow: 1px 1px 0 var(--color-ring);
  transform: rotate(45deg);
}

.year-picker__panel--below {
  inset: calc(100% + 1rem) auto auto 0;
}

.year-picker__panel--below::after {
  top: -0.6rem;
  bottom: auto;
  box-shadow: -1px -1px 0 var(--color-ring);
}

.year-picker__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
}

.year-picker__handle {
  display: none;
}

.year-picker__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.year-picker__title {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
}

.year-picker__close {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
}

.year-picker__close .icon {
  width: 1.6rem;
  height: 1.6rem;
}

.year-picker__group-label {
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.year-picker__group-label[hidden],
.year-picker__grid[hidden] {
  display: none;
}

.year-picker__grid {
  display: grid;
  gap: 0.6rem;
}

.year-picker__grid--decades {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.year-picker__grid--years {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.year-picker__tile {
  min-height: var(--year-tile-height);
  padding: 0 var(--space-xs);
  border: 1px solid var(--color-tile-border);
  border-radius: var(--radius);
  background-color: var(--color-card);
  color: var(--color-teal);
  font-size: var(--font-size-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}

.year-picker__tile:hover {
  background-color: var(--color-teal-tint);
}

.year-picker__tile[aria-pressed="true"] {
  border-color: var(--color-teal);
  background-color: var(--color-teal);
  color: #fff;
}

.year-picker__tile:disabled {
  border-color: var(--color-disabled-border);
  background-color: var(--color-disabled-bg);
  color: var(--color-disabled-text);
  cursor: not-allowed;
}

.year-picker__hint {
  font-size: var(--font-size-sm);
  line-height: 1.45;
  color: var(--color-text-secondary);
}

/* Narrow screens: a sheet at the bottom of the screen, above a dimmed page */
.year-picker__panel--sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 1.6rem 1.6rem 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}

.year-picker__panel--sheet::backdrop {
  background-color: var(--color-backdrop);
}

.year-picker__panel--sheet::after {
  display: none;
}

.year-picker__panel--sheet .year-picker__content {
  padding: 1rem var(--space-lg) max(2.2rem, env(safe-area-inset-bottom));
}

.year-picker__panel--sheet .year-picker__handle {
  display: block;
  align-self: center;
  width: 4rem;
  height: 0.4rem;
  border-radius: 0.2rem;
  background-color: var(--color-disabled-border);
}

.year-picker__panel--sheet .year-picker__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
}

.year-picker__panel--sheet .year-picker__close {
  width: var(--touch-target);
  height: var(--touch-target);
}

.year-picker__panel--sheet .year-picker__close .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.year-picker__panel--sheet .year-picker__tile {
  min-height: var(--year-tile-height-sheet);
  font-size: 1.5rem;
}

.name-filter {
  max-width: 36rem;
  display: flex;
  flex-direction: column;
}

/* The search icon inside the name filter's field, on its right */
.name-filter__field {
  position: relative;
  display: block;
}

.name-filter__field .field__input {
  width: 100%;
  padding-right: 4.4rem;
}

.name-filter__field .icon {
  position: absolute;
  top: 50%;
  right: 1.4rem;
  transform: translateY(-50%);
  color: var(--color-text-strong);
  pointer-events: none;
}

/* Tabs: the selected one is underlined */

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-ring);
}

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--field-height);
  padding: 0 var(--space-lg);
  border-bottom: 0.3rem solid transparent;
  margin-bottom: -1px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-secondary);
}

.tabs__tab[href]:hover {
  color: var(--color-teal);
}

.tabs__tab[aria-selected="true"] {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
}

.tabs__tab[aria-disabled="true"] {
  color: var(--color-disabled-text);
}

/* Search pages: the year fields side by side, the results and the page buttons */

.search-form__years {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* The summary and page buttons again below a long list */
.search-results__below {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.search-results:focus {
  outline: none;
  box-shadow: none;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
}

.pager > .has-tooltip:last-child .tooltip {
  left: auto;
  right: 0;
}

.pager > .has-tooltip:last-child .tooltip::after {
  left: auto;
  right: 1.6rem;
}

.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.alert--error {
  color: var(--color-error);
  border-color: var(--color-error-border);
  background-color: var(--color-error-bg);
}

/* Admin page */
.page--admin {
  max-width: 96rem;
}

.admin {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
}

.admin__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.admin__role-note {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-card);
  background-color: var(--color-teal-tint);
  color: var(--color-teal-dark);
}

.admin__top h1 {
  font-size: 3.2rem;
  line-height: 1.1;
}

.admin-login {
  max-width: 40rem;
  margin: var(--space-xl) auto 0;
  padding: var(--space-xxl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.admin-login h1 {
  font-size: 2.8rem;
}

.admin-card {
  position: relative;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-card p {
  line-height: 1.5;
  color: var(--color-text-strong);
}

.admin-card h2 {
  font-size: 2.8rem;
}

.admin-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) 2rem;
}

.admin-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
}

.admin-card__provider {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
}

.admin-card__heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-card__info {
  border-radius: 50%;
  color: var(--color-teal);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1.2rem;
  border-radius: 99.9rem;
  background-color: var(--color-teal-tint);
  color: var(--color-teal-dark);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.status-chip__dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--color-teal);
}

.status-chip--error {
  background-color: var(--color-error-bg);
  color: var(--color-error);
}

.status-chip--error .status-chip__dot {
  background-color: var(--color-error);
}

.table-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.table-group h3 {
  font-size: var(--font-size-lg);
}

.table-counts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: var(--space-lg);
}

.table-count {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--space-lg) 1.8rem;
  border-radius: var(--radius-card);
  background-color: var(--color-page);
  box-shadow: var(--shadow-ring);
}

.table-count__label {
  overflow-wrap: break-word;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.table-count__value {
  font-family: var(--font-heading);
  font-size: var(--font-size-xxl);
  line-height: 1.05;
  font-weight: 700;
  color: var(--color-teal);
  font-variant-numeric: tabular-nums;
}

.table-count__rows {
  font-size: 1.3rem;
  color: var(--color-text-secondary);
}

/* The cards above the uploads, reloaded together */
.admin-overview {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
}

.system-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: var(--space-lg);
}

.system-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--space-lg) 1.8rem;
  border-radius: var(--radius-card);
  background-color: var(--color-page);
  box-shadow: var(--shadow-ring);
}

.system-item dt {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.system-item dd {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-strong);
  font-variant-numeric: tabular-nums;
}

.system-item--warning {
  box-shadow: inset 0.4rem 0 0 var(--color-gold-dark), var(--shadow-ring);
}

.system-item--warning dd {
  color: var(--color-gold-dark);
}

.data-checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-ring);
  background-color: var(--color-page);
}

.data-check + .data-check {
  border-top: 1px solid var(--color-border);
}

.data-check__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 1.8rem;
}

/* A flex summary loses the browser's marker: a triangle instead, turned when open */
summary.data-check__summary {
  cursor: pointer;
  list-style: none;
}

summary.data-check__summary::-webkit-details-marker {
  display: none;
}

summary.data-check__summary .data-check__label::before {
  content: "\25B8";
  display: inline-block;
  width: 1.6rem;
  color: var(--color-teal-dark);
}

details[open] > summary.data-check__summary .data-check__label::before {
  content: "\25BE";
}

.data-check__count {
  font-weight: 700;
  color: var(--color-gold-dark);
  font-variant-numeric: tabular-nums;
}

.data-check--zero .data-check__count {
  color: var(--color-teal-dark);
}

.data-check__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: 0 1.8rem var(--space-md) 3.6rem;
}

.data-check__items a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
}

.data-check__more,
.data-checks__range {
  color: var(--color-text-secondary);
}

.data-check__more {
  padding: 0 1.8rem var(--space-md) 3.6rem;
}

.last-uploads {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  gap: var(--space-lg);
}

.last-upload {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg) 1.8rem;
  border-radius: var(--radius-card);
  background-color: var(--color-page);
  box-shadow: var(--shadow-ring);
}

.last-upload__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
}

.last-upload h3 {
  font-size: var(--font-size-lg);
}

.last-upload__details {
  font-variant-numeric: tabular-nums;
}

.last-upload__message {
  overflow-wrap: anywhere;
  color: var(--color-error);
}

.status-chip--warning {
  background-color: #fbf3dd;
  color: var(--color-gold-dark);
}

.status-chip--warning .status-chip__dot {
  background-color: var(--color-gold-dark);
}

/* The overview's names missing a language, by status */
.name-status-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.name-status {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.name-status h3 {
  font-size: var(--font-size-lg);
}

.name-status__table {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.name-status h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* The names view: the status filter and the tables */
.name-filters ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.status-filter {
  min-height: 2.4rem;
  text-decoration: none;
}

.status-filter.status-filter--current {
  background-color: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: #fff;
}

/* The keyword field, and what its search found (empty without a keyword) */
.names-search__result:empty {
  display: none;
}

/* A premiere tag's code under its CSV marking */
.names-table__code {
  display: block;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--color-text-label);
}

/* A long table's rows on this page, and its page links below it */
.names-card__range {
  margin-block: var(--space-sm);
  color: var(--color-text-label);
}

.names-pager {
  margin-top: var(--space-sm);
}

/* A table opens and closes from its title, with the data checks' triangle */
.names-card__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  list-style: none;
}

.names-card__title::-webkit-details-marker {
  display: none;
}

.names-card__title::before {
  content: "\25B8";
  color: var(--color-teal-dark);
  font-size: var(--font-size-lg);
}

.names-card[open] > .names-card__title::before {
  content: "\25BE";
}

/* The admin's dashboard (admin_dashboard.go): the recent logins on its card, the log
   pages' search and table, and the visits chart */
.recent-logins {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.recent-logins li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
}

.recent-logins__detail {
  color: var(--color-text-secondary);
}

.admin-log__search {
  display: flex;
  flex-direction: column;
  max-width: 56rem;
}

.admin-log__field {
  display: flex;
  gap: var(--space-sm);
}

.admin-log__field .field__input {
  flex: 1;
  min-width: 0;
}

.admin-log__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-md);
}

.admin-log__time {
  white-space: nowrap;
}

.admin-log__details {
  overflow-wrap: anywhere;
  color: var(--color-text-secondary);
}

.admin-log__details pre {
  max-height: 32rem;
  overflow: auto;
  font-size: 1.2rem;
  white-space: pre;
}

/* A bar per day, oldest left; the numbers are in the table under it */
.visit-chart {
  display: block;
  width: 100%;
  height: 16rem;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  fill: var(--color-teal);
}

.visit-chart rect:hover {
  fill: var(--color-teal-dark);
}

/* A long table scrolls inside its card, its column headings staying on top */
.names-table {
  max-height: var(--names-table-max-height);
  overflow: auto;
}

.names-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--color-card);
}

.names-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
}

.names-table th,
.names-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.names-table thead th {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.names-table tbody th {
  font-weight: 600;
}

.names-table__uses {
  font-variant-numeric: tabular-nums;
}

.names-table .status-chip {
  white-space: nowrap;
}

.names-table__none {
  color: var(--color-text-secondary);
}

.name-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* The required columns: a popover under the section heading */
.popover {
  position: absolute;
  z-index: 5;
  top: 5.4rem;
  left: 0;
  width: min(56rem, 100%);
  padding: 2rem 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  border-radius: var(--radius-card);
  background-color: var(--color-card);
  box-shadow: 0 0 0 1px #c5cace, 0 1.2rem 3.2rem rgba(27, 42, 42, 0.22);
}

.popover__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.popover__title {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.column-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.column-chips li {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background-color: var(--color-page);
  box-shadow: var(--shadow-ring);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--font-size-sm);
}

.admin-upload {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* The drop zone; its file field is hidden visually, its label is the button */
.drop-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg) 2rem;
  padding: var(--space-xl);
  border: 2px dashed #9db0b0;
  border-radius: var(--radius-card);
  background-color: #faf9f5;
  text-align: center;
  color: var(--color-text-strong);
}

.drop-zone--over {
  border-color: var(--color-teal);
  background-color: var(--color-teal-tint);
}

.drop-zone__icon {
  width: 3.2rem;
  height: 3.2rem;
  color: var(--color-teal);
}

.drop-zone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone__input:focus-visible + .drop-zone__button {
  outline: 0.2rem solid var(--color-ink);
  outline-offset: 0.2rem;
  box-shadow: 0 0 0 0.5rem var(--color-gold);
}

.drop-zone__input:disabled + .drop-zone__button {
  opacity: 0.5;
}

.file-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 6rem;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg);
  border-radius: var(--radius-card);
  background-color: var(--color-page);
  box-shadow: var(--shadow-ring);
  color: var(--color-teal);
}

.file-row__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--color-ink);
}

.file-row__size {
  font-weight: 400;
  color: var(--color-text-secondary);
}

/* The browser's check of a chosen file: ready to validate, or why not */
.file-status {
  font-size: var(--font-size-sm);
}

.file-status--ok {
  color: var(--color-teal-dark);
}

.file-status--error {
  color: var(--color-error);
  font-weight: 500;
}

.upload-result .icon {
  width: 2.2rem;
  height: 2.2rem;
  flex-shrink: 0;
}

.upload-result--started {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 1.4rem var(--space-lg);
  border-radius: var(--radius-card);
  background-color: var(--color-teal-tint);
  color: var(--color-teal-dark);
  font-weight: 500;
}

/* A valid file: the result, and the work name conflicts the seed will report */
.upload-result--ready {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 1.4rem var(--space-lg);
  border-radius: var(--radius-card);
  background-color: var(--color-teal-tint);
  color: var(--color-teal-dark);
  font-weight: 500;
}

.upload-result--ready .conflicts {
  font-weight: 400;
}

.upload-result--error {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg) 1.8rem;
  border-radius: var(--radius-card);
  background-color: var(--color-error-bg);
  box-shadow: 0 0 0 1px #e8b4ae;
  color: var(--color-error);
}

.upload-result__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
}

.admin-card .upload-result--error p {
  color: var(--color-error);
}

.upload-errors {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.upload-errors__list {
  list-style: none;
  overflow-wrap: anywhere;
}

.upload-errors__list li {
  padding: var(--space-sm) 0;
  border-top: 1px solid #f1cfcb;
  font-size: 1.5rem;
}

.upload-result__more {
  font-size: var(--font-size-sm);
}

.seed-progress {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.8rem 2rem;
  border-radius: var(--radius-card);
  background-color: var(--color-page);
  box-shadow: var(--shadow-ring);
}

.seed-progress__top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 1.7rem;
  font-weight: 700;
}

.seed-progress__icon {
  display: flex;
  color: var(--color-teal);
}

.seed-progress__title {
  flex: 1;
}

.seed-progress__percent {
  color: var(--color-teal);
  font-variant-numeric: tabular-nums;
}

.seed-progress__messages {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

.progress {
  height: 1.2rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background-color: #d9e6e6;
}

.progress__bar {
  height: 100%;
  width: 0;
  border-radius: 0.6rem;
  background-color: var(--color-teal);
  transition: width 0.2s linear;
}

@media (prefers-reduced-motion: reduce) {
  .progress__bar {
    transition: none;
  }
}

.conflicts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--space-lg) 1.8rem;
  border-radius: var(--radius-card);
  background-color: #fbf3dd;
  box-shadow: 0 0 0 1px #e2c98a;
  color: #3f2e08;
}

.conflicts__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
}

.admin-card .conflicts__title {
  color: #5a4108;
}

.conflicts__title .icon {
  color: var(--color-gold-dark);
}

.conflicts__count {
  padding: 0.1rem 0.9rem;
  border-radius: 99.9rem;
  background-color: #efddae;
  font-size: 1.3rem;
}

.conflicts__list {
  list-style: none;
}

/* The error and conflict lists open and close: a triangle before the title, and a long
   open list scrolls inside itself */
.upload-errors__title,
summary.conflicts__title {
  cursor: pointer;
  list-style: none;
}

.upload-errors__title::-webkit-details-marker,
summary.conflicts__title::-webkit-details-marker {
  display: none;
}

.upload-errors__title::before,
summary.conflicts__title::before {
  content: "\25B8";
  display: inline-block;
  width: 1.6rem;
}

details[open] > .upload-errors__title::before,
details[open] > summary.conflicts__title::before {
  content: "\25BE";
}

.upload-errors__title {
  font-weight: 500;
}

.upload-errors__list,
.conflicts__list {
  max-height: var(--upload-list-max-height);
  overflow-y: auto;
}

.conflicts__list li {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 1rem 0;
  border-top: 1px solid #ebdbae;
  font-size: 1.5rem;
  overflow-wrap: anywhere;
}

.conflicts__id {
  flex: none;
  padding: 0.2rem 0.8rem;
  border-radius: 0.5rem;
  background-color: #f4e8c2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.3rem;
}

.conflicts__names {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #6b4f10;
}

.conflicts__name {
  font-weight: 500;
  color: #3f2e08;
}

.admin-upload__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

/* Upload's confirmation: a small modal dialog */
.confirm-dialog {
  /* Centred in the window, the reset takes the browser's margins away */
  margin: auto;
  width: min(calc(100% - 2 * var(--space-lg)), 48rem);
  padding: var(--space-xl);
  border: none;
  border-radius: var(--radius-card);
  background-color: var(--color-card);
  color: var(--color-ink);
  box-shadow: var(--shadow-menu);
}

.confirm-dialog::backdrop {
  background-color: var(--color-backdrop);
}

.confirm-dialog h3 {
  margin-bottom: var(--space-md);
  font-size: var(--font-size-xl);
}

.confirm-dialog__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* Search pages: a card of search fields on the left, the results on the right (one
   column on narrow screens) */
.search-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

.search-panel {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
}

.search-panel__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.search-main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* A request's loader: a veil with a spinner over its card or results, shown only when the
   request takes longer than --loader-delay (htmx-request is on the hx-indicator element) */
.loader-host {
  position: relative;
}

.loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card);
  background-color: var(--color-veil);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--loader-fade) ease,
    visibility 0s linear var(--loader-fade);
}

.loader .spinner {
  width: var(--loader-size);
  height: var(--loader-size);
}

.htmx-request .loader,
.htmx-request.loader-host > .loader {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--loader-fade) ease var(--loader-delay),
    visibility 0s linear var(--loader-delay);
}

/* A loader that comes with the new content (htmx swaps it in before the request ends, as on
   the composer search) starts hidden too, so it also waits for the delay instead of
   flashing over the results */
@starting-style {
  .htmx-request .loader,
  .htmx-request.loader-host > .loader {
    opacity: 0;
    visibility: hidden;
  }
}

/* While a search runs its buttons take no clicks (hx-sync drops repeats anyway); after the
   loader's delay they look busy too, so fast searches don't flicker */
.search-layout.htmx-request .pager__button,
.search-layout.htmx-request .filter-panel__actions .button {
  pointer-events: none;
}

.search-layout.htmx-request .pager__button,
.search-layout.htmx-request .filter-panel__actions .button--contained {
  transition: opacity 0s linear var(--loader-delay);
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .loader,
  .htmx-request .loader,
  .htmx-request.loader-host > .loader {
    transition-property: visibility;
  }
}

.search-main:focus {
  outline: none;
  box-shadow: none;
}

.search-main__heading h2 {
  font-size: 2.8rem;
  font-weight: 700;
}

/* A page heading with its entity's icon before it (the search pages) */
.heading-with-icon {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.heading-icon {
  flex: none;
  display: flex;
  color: var(--color-teal);
}

.heading-icon .icon {
  width: var(--heading-icon-size);
  height: var(--heading-icon-size);
}

.page-title-narrow {
  padding-bottom: 2rem;
  font-size: 2.8rem;
}

/* Always one line high, so the page doesn't move when the count replaces the intro */
.search-main__summary {
  min-height: 1lh;
  margin-top: var(--space-sm);
  font-size: 1.5rem;
  color: var(--color-text-secondary);
}

/* Before a search the composer search's heading repeats the page title: only where the
   title is hidden (wide screens) */
.search-main__heading--initial {
  display: none;
}

/* Narrow screens: a button at the top of the window back to the results' start */
.back-to-top {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  z-index: 1100;
  transform: translateX(-50%);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-menu);
}

@media (min-width: 1024px), print {
  .back-to-top {
    display: none;
  }
}

/* A search page without results: before a search, or when it found nothing */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: 4rem var(--space-xl);
  text-align: center;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.6rem;
  height: 5.6rem;
  margin-bottom: var(--space-xs);
  border-radius: 50%;
  background-color: var(--color-teal-tint);
  color: var(--color-teal);
}

.empty-state__icon .icon {
  width: 2.8rem;
  height: 2.8rem;
}

.empty-state__title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-ink);
}

.empty-state__text {
  max-width: 48rem;
}

.empty-state[hidden] {
  display: none;
}

/* The filter card of a search page. A <dialog>: in the page on wide screens (and without
   JavaScript), a modal from the left on narrow ones */
.search-filters {
  min-width: 0;
}

.filter-panel {
  position: static;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--space-xl);
  border: none;
  color: var(--color-ink);
}

.filter-panel[open] {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.filter-panel--modal {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(88%, 34.8rem);
  height: 100%;
  max-height: 100%;
  padding: 0;
  border-radius: 0;
  box-shadow: 0.8rem 0 2.4rem rgba(0, 0, 0, 0.25);
  gap: 0;
}

.filter-panel::backdrop {
  background-color: var(--color-backdrop);
}

.filter-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.filter-panel--modal .filter-panel__top {
  flex: none;
  min-height: var(--header-height-mobile);
  padding: 0 var(--space-xs) 0 2rem;
  border-bottom: 1px solid var(--color-ring);
}

.filter-panel__close {
  display: none;
}

.filter-panel--modal .filter-panel__close {
  display: inline-flex;
}

/* On narrow screens the card is only shown as the modal dialog; hidden by CSS so it doesn't
   flash in the page before app.js starts (no-script.css shows it without JavaScript) */
@media screen and (max-width: 1023.98px) {
  .search-filters .filter-panel:not(.filter-panel--modal) {
    display: none;
  }
}

.filter-panel__form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.filter-panel--modal .filter-panel__form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2rem 2rem 0;
}

/* Clear all beside Search */
.filter-panel__actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xs);
}

.filter-panel--modal .filter-panel__actions {
  position: sticky;
  bottom: 0;
  margin: auto -2rem 0;
  padding: var(--space-lg) 2rem;
  border-top: 1px solid var(--color-ring);
  background-color: var(--color-card);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-xs);
  color: var(--color-teal);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

/* Narrow screens: the Filters button with the number of filters in use, and the pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: var(--space-lg);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.6rem;
  border-radius: 1.1rem;
  background-color: var(--color-line);
  color: var(--color-text-label);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0;
}

.badge--on {
  background-color: var(--color-teal);
  color: #fff;
}

.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  min-height: 3.6rem;
  padding-left: var(--space-md);
  border: 1px solid var(--color-teal);
  border-radius: var(--radius-pill);
  background-color: var(--color-teal-tint);
  color: var(--color-teal-dark);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.pill > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pill__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  color: var(--color-teal-dark);
}

.pill__remove .icon {
  width: 1.6rem;
  height: 1.6rem;
}

/* Letter tiles of the composer search */
.letter-tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
  gap: var(--space-sm);
}

.letter-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-card);
  color: var(--color-teal);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
}

.letter-tile:hover {
  border-color: var(--color-teal);
  background-color: var(--color-teal-tint);
}

.letter-tile[aria-current="true"] {
  border-color: var(--color-teal);
  background-color: var(--color-teal);
  color: #fff;
}

/* Link lists: a card of rows, each row one link */
/* Positioned, so its visually hidden texts stay inside it when it scrolls */
.link-list {
  position: relative;
  list-style: none;
  border-radius: var(--radius-card);
  background-color: var(--color-card);
  box-shadow: var(--shadow-ring);
  overflow: hidden;
}

.link-list:empty {
  display: none;
}

.link-list li {
  border-bottom: 1px solid var(--color-line);
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list li[hidden] {
  display: none;
}

.link-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) 2rem;
  color: var(--color-ink);
  text-decoration: none;
}

.link-row:hover {
  color: var(--color-ink);
  background-color: var(--color-page);
}

.link-row:focus-visible {
  outline-offset: -0.4rem;
  box-shadow: inset 0 0 0 0.5rem var(--color-gold);
}

/* Rows with a date (concerts): the date above the title on phones, a column of its own on
   wider screens */
.link-row:has(.link-row__when) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "when icon" "body icon";
  row-gap: 0.2rem;
}

.link-row:has(.link-row__when) /* A row that isn't a link: no hover */
.link-row--static:hover {
  background: none;
}

.link-row__note {
  font-weight: 400;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.link-row__index {
  display: none;
}

.link-row:has(.link-row__when) .link-row__body {
  grid-area: body;
}

.link-row:has(.link-row__when) > svg {
  grid-area: icon;
}

.link-row__when {
  grid-area: when;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-teal);
  font-variant-numeric: tabular-nums;
}

.link-row__index {
  flex-shrink: 0;
  min-width: 4rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.link-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-wrap: anywhere;
}

.link-row__text {
  font-size: var(--font-size-lg);
  font-weight: 500;
}

.link-row__date {
  color: var(--color-teal);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.link-row__details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

mark {
  border-radius: 0.3rem;
  background-color: var(--color-chip);
  color: inherit;
  font-weight: 700;
}

/* Chips: a premieres count (gold, with a star) and premiere tags (outlined) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.3rem 1.2rem;
  border: 1px solid #9db0b0;
  border-radius: 99.9rem;
  background-color: var(--color-page);
  color: var(--color-text-strong);
  font-size: 1.3rem;
  font-weight: 500;
}

.chip--gold {
  padding: 0.2rem 1rem;
  border-color: transparent;
  background-color: var(--color-chip);
  color: var(--color-chip-text);
}

.chip__icon {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--color-gold-dark);
}

/* A page's title with a small label above it, e.g. "Composer" */
.title-block {
  padding-bottom: var(--space-xl);
}

.eyebrow {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.title-block h1 {
  margin-top: var(--space-xs);
  font-size: 3.2rem;
  line-height: 1.1;
}

/* The composer page: the composer, the tabs and the name filter, then the open tab's list
   (on wide screens a card on the left, see below) */
.composer-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.composer-panel .back {
  margin: 0;
}

.composer-panel__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.composer-panel__eyebrow .icon {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--color-teal);
}

.composer-panel__show {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tabs__tab .icon {
  width: 2rem;
  height: 2rem;
}

/* Narrow screens: the composer page's two tabs share the row (the redesign's mobile board),
   each on one line and as wide as its content; on a screen too narrow for both the second
   one goes below */
.composer-layout .tabs__list {
  display: flex;
  flex-wrap: wrap;
}

.composer-layout .tabs__tab {
  flex: 1 1 auto;
  justify-content: center;
  padding: var(--space-xs);
  white-space: nowrap;
  text-align: center;
}

.composer-tab {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tabs__count {
  padding: 0.1rem 0.9rem;
  border-radius: 99.9rem;
  background-color: var(--color-line);
  font-size: var(--font-size-xs);
  letter-spacing: 0;
}

.tabs__tab[aria-selected="true"] .tabs__count {
  background-color: var(--color-teal-tint);
}

.tabs__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* The concert page: the programme card or the plain text, and the switch between them */
.page--concert {
  max-width: 108rem;
}

.concert-page__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: 2.8rem;
}

.concert-page__top .back {
  padding: 0;
}

.style-switch {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.style-switch__label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-label);
}

.style-switch__button {
  position: relative;
  width: 6.4rem;
  height: var(--touch-target);
  border: none;
  background: none;
  cursor: pointer;
}

.style-switch__button::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 0.4rem;
  width: 5.6rem;
  height: 3.2rem;
  border-radius: 1.6rem;
  background-color: var(--color-border);
}

.style-switch__thumb {
  position: absolute;
  top: 1rem;
  left: 0.8rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: left 0.15s ease;
}

.style-switch__button[aria-checked="true"]::before {
  background-color: var(--color-teal);
}

.style-switch__button[aria-checked="true"] .style-switch__thumb {
  left: 3.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .style-switch__thumb {
    transition: none;
  }
}

.programme-card {
  padding: 1.2rem;
  background-color: #fbf7ec;
  box-shadow: 0 1px 2px rgba(27, 42, 42, 0.14), 0 1.4rem 3.6rem rgba(27, 42, 42, 0.14);
}

.programme-card__frame {
  padding: 0.6rem;
  border: 2px solid var(--color-teal);
}

.programme-card__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5.6rem 2rem 4.8rem;
  border: 1px solid var(--color-gold);
  text-align: center;
  font-family: var(--font-card);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

.programme-card__corner {
  position: absolute;
  width: 3.2rem;
  height: 3.2rem;
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 1.5;
}

.programme-card__corner circle {
  fill: var(--color-gold);
  stroke: none;
}

.programme-card__corner--top-left {
  top: 1rem;
  left: 1rem;
}

.programme-card__corner--top-right {
  top: 1rem;
  right: 1rem;
  transform: scaleX(-1);
}

.programme-card__corner--bottom-left {
  bottom: 1rem;
  left: 1rem;
  transform: scaleY(-1);
}

.programme-card__corner--bottom-right {
  bottom: 1rem;
  right: 1rem;
  transform: scale(-1, -1);
}

.programme-card__caps {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.programme-card__divider {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
  max-width: 32rem;
  margin: 1.8rem 0 2.2rem;
}

.programme-card__divider span {
  flex: 1;
  height: 1px;
  background-color: var(--color-gold);
}

.programme-card__divider svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: var(--color-gold-dark);
}

.programme-card__date {
  font-size: 5.6rem;
  line-height: 1;
  font-weight: 600;
  font-style: italic;
  color: var(--color-teal-dark);
}

.programme-card__time,
.programme-card__venue,
.programme-card__label {
  color: var(--color-text-secondary);
}

.programme-card__time {
  margin-top: 1rem;
  font-variant-numeric: lining-nums;
}

.programme-card__title {
  margin-top: 3.2rem;
  font-family: var(--font-card);
  font-size: 3.4rem;
  line-height: 1.1;
  font-weight: 700;
}

.programme-card__subtitle {
  margin-top: 1rem;
  font-size: 2.2rem;
  line-height: 1.25;
  font-style: italic;
  font-weight: 500;
  color: var(--color-text-strong);
}

.programme-card__venue {
  margin-top: 1.8rem;
}

.programme-card__label {
  letter-spacing: 0.22em;
}

.programme-card__conductor {
  margin-top: 0.4rem;
  font-size: 2.8rem;
  line-height: 1.15;
  font-weight: 700;
}

.programme-card__heading {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  width: 100%;
  margin: 4rem 0 2.8rem;
  font-family: var(--font-card);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.programme-card__heading::before,
.programme-card__heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--color-gold);
}

.programme-card__program {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.programme-card__program li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* A small gold diamond between the works */
.programme-card__program li + li::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  margin: 2rem 0 2.2rem;
  background-color: var(--color-gold);
  transform: rotate(45deg);
}

.programme-card__composer {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.programme-card__work {
  font-size: 2.2rem;
  line-height: 1.25;
  font-style: italic;
  font-weight: 500;
}

.programme-card__notes {
  font-size: 1.7rem;
  font-style: italic;
  color: var(--color-text-secondary);
}

.programme-card__soloists {
  margin-top: 0.4rem;
  font-size: 1.9rem;
  color: var(--color-text-strong);
}

.programme-card__soloist-label {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.programme-card__source {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  margin-top: 4.8rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--color-gold);
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 500;
  color: var(--color-text-strong);
}

.programme-card__source-label {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.concert-plain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding: 4rem 2rem 4.8rem;
  text-align: center;
  font-size: 1.7rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.concert-plain__when {
  margin-bottom: 0.6rem;
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.concert-plain__title {
  font-family: var(--font-body);
  font-size: 1.7rem;
  line-height: 1.55;
  font-weight: 400;
}

.concert-plain__program {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.concert-plain__premiere {
  font-size: var(--font-size-sm);
}

.concert-plain__source {
  width: 100%;
  max-width: 56rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--color-line);
  font-style: italic;
}

/* Composer page: a narrower column */
.page--composer {
  max-width: 104rem;
}

/* Home page */
.home {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.home__intro {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl) 4.8rem;
  align-items: flex-start;
}

.home__text {
  flex: 1.4 1 52rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.home__text h1 {
  font-size: 3.2rem;
  line-height: 1.14;
}

.home__text p {
  max-width: 68rem;
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--color-text-strong);
}

.start-searching {
  flex: 1 1 38rem;
  max-width: 48rem;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.start-searching h2 {
  font-size: 2.6rem;
}

.start-searching__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.start-searching__link {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: 7.2rem;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-card);
  background-color: var(--color-page);
  color: var(--color-ink);
  text-decoration: none;
}

.start-searching__link:hover {
  color: var(--color-ink);
  background-color: var(--color-teal-tint);
}

.start-searching__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: 50%;
  background-color: var(--color-teal-tint);
  color: var(--color-teal);
}

.start-searching__icon .icon {
  width: 2.2rem;
  height: 2.2rem;
}

.start-searching__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.start-searching__title {
  font-size: var(--font-size-lg);
  font-weight: 500;
}

.start-searching__hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.chevron {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  color: var(--color-teal);
}

.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.fact {
  flex: 1 1 28rem;
  padding: var(--space-xl) 2.8rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* The fact's entity in a tinted circle, like the start cards' icons */
.fact__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 50%;
  background-color: var(--color-teal-tint);
  color: var(--color-teal);
}

.fact__icon .icon {
  width: 2.8rem;
  height: 2.8rem;
}

.fact__text {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
}

.fact__value {
  font-family: var(--font-heading);
  font-size: 4.4rem;
  line-height: 1;
  font-weight: 700;
  color: var(--color-teal);
  font-variant-numeric: tabular-nums;
}

.fact__label {
  line-height: 1.4;
  color: var(--color-text-strong);
}

.home__lists {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  align-items: flex-start;
}

.home__column {
  flex: 1 1 36rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.home__column--wide {
  flex: 1.5 1 56rem;
}

.year-list {
  padding: 2.8rem var(--space-xxl) 2rem;
}

.year-list h2 {
  padding-bottom: var(--space-sm);
  font-size: 2.8rem;
}

.year-list ul {
  list-style: none;
}

.year-list--columns ul {
  columns: 2 26rem;
  column-gap: 4.8rem;
}

.year-list li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-line);
}

.year-list__years {
  flex: none;
  max-width: 56%;
  text-align: right;
  color: var(--color-teal);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.home-info {
  padding: 2.8rem var(--space-xxl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl) 5.6rem;
}

.home-info__part {
  flex: 1 1 42rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.home-info__part--end {
  justify-content: flex-end;
}

.home-info h2 {
  font-size: 2.8rem;
}

.home-info p {
  line-height: 1.6;
  color: var(--color-text-strong);
}

.home-info a {
  overflow-wrap: anywhere;
}

/* A link to another site, opened in a new tab: the icon after the text, at its size */
.external-link .icon {
  width: 1.6rem;
  height: 1.6rem;
  margin-left: 0.4rem;
  vertical-align: -0.2rem;
}

/* Error pages: 404 and the error page */
.error-page {
  min-height: 60vh;
  padding: 4.8rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page__face {
  width: 24rem;
  max-width: 100%;
  height: auto;
  margin-bottom: var(--space-xxl);
}

.error-page__code {
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.error-page h1 {
  margin-top: var(--space-sm);
  font-size: 3.6rem;
}

.error-page p {
  max-width: 52rem;
  margin-top: var(--space-lg);
  font-size: var(--font-size-lg);
  line-height: 1.55;
  color: var(--color-text-strong);
}

.error-page__home {
  margin-top: 3.6rem;
  min-height: 5.2rem;
  padding: 0 2.8rem;
  font-size: 1.5rem;
}

.error-page__home .icon {
  width: 2rem;
  height: 2rem;
}

/* Accessibility statement: a card of text */
.accessibility-statement {
  max-width: 88rem;
  margin: 0 auto;
  padding: var(--space-xxl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.accessibility-statement h2 {
  padding-top: var(--space-lg);
  font-size: var(--font-size-xl);
}

.accessibility-statement p,
.accessibility-statement__list {
  line-height: 1.6;
  color: var(--color-text-strong);
}

.accessibility-statement__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-left: 2.4rem;
}

/* Phones: the design's 20px card padding */
@media screen and (max-width: 599px) {
  :root {
    --heading-icon-size: 2.8rem;
  }

  /* The pages' titles are one size (the programme card's title has its own) */
  h1,
  .page-title-narrow,
  .title-block h1,
  .home__text h1,
  .error-page h1 {
    font-size: var(--font-size-h1-phone);
  }

  .start-searching,
  .year-list,
  .home-info,
  .accessibility-statement {
    padding: 2rem;
  }

  .fact {
    padding: 2rem;
  }
}

/* Tablet and up */
@media (min-width: 600px), print {
  .link-row:has(.link-row__when) {
    grid-template-columns: 4rem 11.6rem minmax(0, 1fr) auto;
    grid-template-areas: "index when body icon";
    column-gap: var(--space-md);
  }

  .link-row:has(.link-row__when) .link-row__index {
    display: block;
    grid-area: index;
  }

  .link-row:has(.link-row__when):not(:has(.link-row__index)) {
    grid-template-columns: 11.6rem minmax(0, 1fr) auto;
    grid-template-areas: "when body icon";
  }

  .link-row__when {
    font-size: 1.5rem;
  }

  .page {
    padding: var(--space-xxl);
  }

  .header__inner,
  .footer__inner {
    padding-left: var(--space-xxl);
    padding-right: var(--space-xxl);
  }

  .home__text h1 {
    font-size: 4.4rem;
  }

  .home__text p {
    font-size: 1.9rem;
  }
}

/* Desktop: the navigation and the language menu in the header */
@media (min-width: 1024px), print {
  .header__inner {
    min-height: var(--header-height);
  }

  .header__brand {
    font-size: 2rem;
    margin-right: 0;
  }

  .header__logo {
    width: 3.6rem;
    height: 3.6rem;
  }

  /* The links stay on one row; when they don't fit, the row scrolls sideways. The links
     are as tall as the space above a scrollbar, so the current page's underline shows */
  .header__brand,
  .language {
    flex-shrink: 0;
  }

  .header__nav {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
  }

  .header__nav ul {
    flex-wrap: nowrap;
    height: 100%;
  }

  .header__nav-link {
    flex-shrink: 0;
    height: 100%;
    min-height: 0;
    white-space: nowrap;
  }

  .header__nav-admin {
    flex-shrink: 0;
  }

  .language {
    display: block;
  }

  .header__menu-button {
    display: none;
  }

  .filter-bar {
    display: none;
  }

  .page--home {
    padding-top: 5.6rem;
    padding-bottom: 7.2rem;
  }

  .home {
    gap: 4.8rem;
  }

  .home__text h1 {
    font-size: 5.4rem;
    line-height: 1.1;
  }

  .error-page h1 {
    font-size: 5.2rem;
  }

  /* The filter card beside the heading and the results, its top level with the title's */
  .search-layout {
    grid-template-columns: minmax(32rem, 40rem) minmax(0, 1fr);
    grid-template-areas:
      "filters heading"
      "filters results";
    gap: var(--space-xl) var(--space-xxl);
  }

  .search-layout > .search-main__heading {
    grid-area: heading;
  }

  .search-filters,
  .search-panel {
    grid-area: filters;
    align-self: start;
  }

  .search-main {
    grid-area: results;
  }

  /* The composer search's h2 looks like the other search pages' h1 */
  .search-main__heading h2 {
    font-size: var(--font-size-xxl);
    font-weight: 700;
  }

  .search-main__heading--initial {
    display: block;
  }

  /* The results heading takes the title's place */
  .page-title-narrow {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .letter-tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .title-block h1 {
    font-size: 4.4rem;
  }
}

/* Search pages on a wide and tall enough screen fill the window: the header at the top, the
   footer at the bottom, and between them only the results list scrolls, in its card. The
   filter card is always whole: when it is taller than the window, the page grows and
   scrolls, and the results column (contain: size, so it never adds height) is as tall as
   the card. The page buttons are above the list only. (Media queries can't use variables:
   1024px is wideScreen in app.js, below 600px the page scrolls as on narrow screens.) */
@media screen and (min-width: 1024px) and (min-height: 600px) {
  .app-main:has(.search-layout) .page-wrapper {
    display: flex;
  }

  .app-main:has(.search-layout) .page {
    display: flex;
    flex-direction: column;
  }

  .search-layout {
    flex: 1;
    grid-template-rows: auto 1fr;
  }

  /* A compact card, so the concert filters fit a laptop's window: fields of the touch
     target's height, tighter spacing */
  .filter-panel {
    --field-height: var(--touch-target);
    padding: 2rem;
    gap: var(--space-lg);
  }

  .filter-panel .field__label {
    padding-bottom: var(--space-xs);
  }

  .filter-panel__form {
    gap: var(--space-md);
  }

  .search-main {
    contain: size;
    align-self: stretch;
    min-height: 0;
  }

  .search-main .search-results {
    flex: 1;
    min-height: 0;
  }

  .search-main .link-list {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .search-main .search-results__below {
    display: none;
  }
}

.concert-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-xl);
}

/* Phones: the print button beside the back link, the style switch below them on the right */
@media screen and (max-width: 599px) {
  .concert-page__actions {
    display: contents;
  }

  .concert-page__top .style-switch {
    margin-left: auto;
  }
}

/* The programme card and the plain text in full size when they have the room: on a wide
   screen, in print, and while app.js measures them for print at the printed page's width
   (186 mm, about 703 px; on a phone too). A container query, not a media query, so the
   measuring sees the same sizes as the print. 64rem is below that width and below the
   card's width on a wide screen. */
.concert-page,
.print-sheet {
  container: concert / inline-size;
}

@container concert (min-width: 64rem) {
  .programme-card {
    padding: 1.8rem;
  }

  .programme-card__inner {
    padding: 7.6rem 6rem 6.4rem;
  }

  .programme-card__corner {
    width: 4rem;
    height: 4rem;
  }

  .programme-card__caps {
    font-size: 1.9rem;
  }

  .programme-card__date {
    font-size: 10rem;
  }

  .programme-card__time {
    font-size: 2rem;
  }

  .programme-card__title {
    margin-top: 3.6rem;
    font-size: 5.8rem;
  }

  .programme-card__subtitle {
    font-size: 2.9rem;
  }

  .programme-card__conductor {
    font-size: 3.6rem;
  }

  .programme-card__heading {
    margin: 4.4rem 0 3rem;
    font-size: 2.2rem;
  }

  .programme-card__composer {
    font-size: 1.9rem;
  }

  .programme-card__work {
    font-size: 2.6rem;
  }

  .concert-plain {
    padding: 4.8rem 5.6rem 5.6rem;
  }
}

/* While printing (app.js sets data-printing before it measures the concert) the card is
   more compact, so more of a programme fits one page */
html[data-printing] .programme-card__inner {
  padding: 3.2rem 2rem 2.8rem;
}

html[data-printing] .programme-card__heading {
  margin: 2.4rem 0 1.6rem;
}

html[data-printing] .programme-card__program li + li::before {
  margin: 0.8rem 0 1rem;
}

html[data-printing] .programme-card__source {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
}

/* Admin pages on wide screens (the admin works on a desktop): the header's width, and the
   cards in a 12-column grid in their reading order. #admin-overview, the wrapper htmx
   reloads, lets its cards into the grid. Narrower screens keep one column. */
@media screen and (min-width: 1200px) {
  .page--admin {
    max-width: var(--page-max-width);
  }

  .admin {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }

  .admin > *,
  .admin-overview > * {
    grid-column: 1 / -1;
  }

  .admin-overview {
    display: contents;
  }

  .admin .admin-card--database {
    grid-column: span 8;
    grid-row: span 2;
    align-self: stretch;
  }

  /* Stretched, so the right column ends with the database card */
  .admin .admin-card--system,
  .admin .admin-card--uploads {
    grid-column: span 4;
    align-self: stretch;
  }

  .admin .admin-card--checks,
  .admin .admin-card--names,
  .admin .admin-card--upload {
    grid-column: span 6;
    align-self: stretch;
  }

  /* The admin's activity, logs and visits cards, three in a row */
  .admin .admin-card--dashboard {
    grid-column: span 4;
    align-self: stretch;
  }

  /* Long lists scroll inside their card rather than stretch the row */
  .admin-card--checks .data-checks,
  .admin-card--names .name-status-list {
    max-height: var(--admin-card-list-max-height);
    overflow-y: auto;
  }

  /* The names view's tables have six columns: each takes the page's width */
}

/* The composer page on wide screens (the redesign's desktop board): the composer, the tabs
   as option cards and the name filter in a card on the left, the list on the right like
   the search pages' results (#composer-tab lets its heading and list into the grid) */
@media screen and (min-width: 1024px) {
  .composer-panel {
    grid-area: filters;
    padding: var(--space-xl);
    border-radius: var(--radius-card);
    background-color: var(--color-card);
    box-shadow: var(--shadow-ring);
  }

  .composer-panel .title-block h1 {
    font-size: 3.4rem;
  }

  .composer-tab {
    display: contents;
  }

  .composer-tab > .search-main__heading {
    grid-area: heading;
  }

  .composer-panel .name-filter {
    max-width: none;
  }

  .composer-layout .tabs__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    border-bottom: 0;
  }

  .composer-layout .tabs__tab {
    flex: none;
    justify-content: flex-start;
    white-space: normal;
    text-align: left;
    gap: var(--space-md);
    min-height: 5.6rem;
    margin: 0;
    padding: 0 var(--space-lg);
    border: 1px solid var(--color-disabled-border);
    border-radius: var(--radius-card);
    font-size: 1.6rem;
    color: var(--color-ink);
  }

  .composer-layout .tabs__tab .icon {
    width: 2.6rem;
    height: 2.6rem;
    color: var(--color-teal);
  }

  .composer-layout .tabs__text {
    flex: 1;
  }

  .composer-layout .tabs__tab[aria-selected="true"] {
    border-color: var(--color-teal);
    background-color: var(--color-teal-tint);
    box-shadow: inset 0 0 0 1px var(--color-teal);
    color: var(--color-ink);
  }

  .composer-layout .tabs__tab[aria-selected="true"] .tabs__count {
    background-color: var(--color-card);
  }

  .composer-layout .tabs__tab[aria-disabled="true"] {
    color: var(--color-disabled-text);
  }

  .composer-layout .tabs__tab[aria-disabled="true"] .icon {
    color: var(--color-disabled-text);
  }
}

/* Printing (and "Save as PDF"): only the page's content, in the wide layout (the width
   queries include print). A concert is scaled to one page by app.js (--print-scale), or a
   long programme card printed as pages (.print-pages); the margin is printMarginMm there */
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  .skip-link,
  .header,
  .footer,
  .concert-page__top,
  .back-to-top,
  .loader {
    display: none !important;
  }

  html,
  body,
  .app-main {
    min-height: 0;
    background-color: #fff;
  }

  .page,
  .page--concert {
    max-width: none;
    padding: 0;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .programme-card:not(.print-page),
  .concert-plain {
    zoom: var(--print-scale, 1);
    box-shadow: none;
  }

  .programme-card__program li,
  .concert-plain__program li {
    break-inside: avoid;
  }

  /* The source stays with the last work when the browser breaks a card into pages */
  .programme-card__source,
  .concert-plain__source {
    break-before: avoid;
  }

  /* A programme card as pages (app.js): the card itself is left out, each page is a copy of
     its frame one printable page tall, the page number (of several) at its foot */
  html[data-print-pages] .programme-card:not(.print-page) {
    display: none;
  }

  .print-sheet {
    overflow: hidden;
    break-after: page;
  }

  .print-sheet:last-child {
    break-after: auto;
  }


}

/* The pages are only for printing; app.js lays them out out of sight to measure them, so
   their layout is the same on screen and in print */
@media screen {
  .print-pages {
    display: none;
  }
}

.print-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: none;
}

.print-page .programme-card__frame,
.print-page .programme-card__inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* The content from the top of a page, its number at the foot */
.print-page__number {
  margin-top: auto;
  padding-top: 1.6rem;
  font-size: 1.5rem;
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* The admin names view's edit link, and a row while its names are edited */
.names-table__edit {
  white-space: nowrap;
}

.names-table__editing td,
.names-table__editing th {
  background-color: var(--color-teal-tint);
}

.names-edit__input {
  width: 100%;
  min-width: 14rem;
}

.names-edit__input--long {
  min-height: 6rem;
  resize: vertical;
}

.names-edit__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.names-edit__error {
  flex-basis: 100%;
  color: var(--color-error);
}

.names-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 60rem;
}

.names-edit .field__input {
  width: 100%;
}

.names-edit__note {
  color: var(--color-text-label);
}

.names-edit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
