/* =====================================================================
   NDACS design system
   One stylesheet, no framework, no CDN. Custom properties drive both
   colour schemes; every component below is used by at least one screen.
   ===================================================================== */

/* --- Tokens --------------------------------------------------------- */
:root {
  /* Follows the operating system until somebody picks a side. */
  color-scheme: light dark;

  /* Aura is the system's design language — see AURA_DESIGN_LANGUAGE.md. These
     are its tokens, and they govern the whole application: back office, kiosk,
     door screens and attendee pages alike. An attendee page can opt into the
     Marquee skin instead, which restates every value it changes further down;
     nothing else in the product overrides these. */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Aura names four semantic families and no saturated primary, because the app
     it came from had no primary button. This one does. The accent is taken from
     the lavender family — the periwinkle of §2.3's tinted controls — rather than
     invented, so the button belongs to the palette instead of sitting on top
     of it. White on it measures 7.60:1. */
  --brand: #5a4b82;
  --brand-strong: #4a3d6e;
  --brand-soft: #e4dcf4;
  --brand-contrast: #ffffff;

  --bg: #f4f5f7;
  --bg-elevated: #ffffff;
  --bg-sunken: #f8f9fa;
  --surface-line: #edeff1;

  --text: #15161a;
  /* Aura recommends #6e747c here. That clears 4.5:1 on a card but only 4.32:1
     on the page background, and this app puts secondary text on both. Three
     steps darker at the same hue and saturation clears 4.5:1 on card,
     background and field alike. */
  --text-muted: #6b7179;
  --text-subtle: #6b7179;
  --text-inverse: #ffffff;

  /* Every tinted surface has a matching ink, and the two are never mixed
     across families. */
  --ok: #5b6b3d;      --ok-soft: #dde8cd;
  --warn: #6b5a2f;    --warn-soft: #f6ecd8;
  --danger: #c0392b;  --danger-soft: #fbeaea;
  --info: #3f5b6b;    --info-soft: #d4e5ed;

  --radius-sm: 8px;    /* pill, chip */
  --radius: 13px;      /* field, small card */
  --radius-lg: 20px;   /* card */
  --radius-xl: 20px;   /* sheet — Aura tops out at 20, so xl is not larger */

  /* Three levels only. Depth comes from radius and tint more than from shadow. */
  --shadow-xs: 0 1px 6px rgb(0 0 0 / .05);
  --shadow-sm: 0 1px 6px rgb(0 0 0 / .05);
  --shadow: 0 4px 16px rgb(20 22 26 / .14), inset 0 1px 0 rgb(255 255 255 / .9);
  --shadow-lg: 0 10px 34px rgb(0 0 0 / .15);

  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);

  --sidebar-w: 250px;
  --header-h: 62px;
  /* Aura's house curve: fast out, gentle settle. */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8098ff;
    --brand-strong: #9aacff;
    --brand-soft: #403873;
    --brand-contrast: #0f1113;

    --bg: #0f1113;
    --bg-elevated: #191c21;
    --bg-sunken: #23272d;
    --surface-line: #2b3037;

    --text: #e9ebee;
    --text-muted: #a3aab2;
    --text-subtle: #a3aab2;

    --ok: #c3e691;      --ok-soft: #2c4a1e;
    --warn: #e6d091;    --warn-soft: #4a3a1e;
    --danger: #ef6f63;  --danger-soft: #3a201e;
    --info: #a6d8ee;    --info-soft: #173d54;

    /* Deepen rather than lighten. */
    --shadow-xs: 0 1px 6px rgb(0 0 0 / .5);
    --shadow-sm: 0 1px 6px rgb(0 0 0 / .5);
    --shadow: 0 8px 28px -6px rgb(0 0 0 / .75);
    --shadow-lg: 0 12px 40px -6px rgb(0 0 0 / .8);
  }
}

/*
 * The theme toggle sets data-theme on <html>, and color-scheme has to follow
 * it. Left as "light dark", a page forced to light on a machine whose system
 * theme is dark still gets dark radio buttons, checkboxes, scrollbars and date
 * pickers — which is how an unselected radio came to look more filled-in than
 * the selected one.
 */
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }

[data-theme="dark"] {
  --brand: #8098ff; --brand-strong: #9aacff; --brand-soft: #403873; --brand-contrast: #0f1113;
  --bg: #0f1113; --bg-elevated: #191c21; --bg-sunken: #23272d; --surface-line: #2b3037;
  --text: #e9ebee; --text-muted: #a3aab2; --text-subtle: #a3aab2;
  --ok: #c3e691; --ok-soft: #2c4a1e; --warn: #e6d091; --warn-soft: #4a3a1e;
  --danger: #ef6f63; --danger-soft: #3a201e; --info: #a6d8ee; --info-soft: #173d54;
  --shadow-xs: 0 1px 6px rgb(0 0 0 / .5);
  --shadow-sm: 0 1px 6px rgb(0 0 0 / .5);
  --shadow: 0 8px 28px -6px rgb(0 0 0 / .75);
  --shadow-lg: 0 12px 40px -6px rgb(0 0 0 / .8);
}

/* --- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }
small { font-size: 0.82em; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-line); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

/* --- Inline icons ---------------------------------------------------- */
/* Icons carry no intrinsic size, so give every one a sane default and let
   components override it (`.btn svg`, `.nav-item svg`, …). */
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* --- Layout --------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
/* A reserved place: where to send the money, on the page and in the email.
   Deliberately calm rather than celebratory — nothing has been paid yet. */
.reserve { display: flex; flex-direction: column; gap: 14px; }
.reserve__icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok-soft); color: var(--ok);
}
.reserve__label {
  display: block; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.reserve__amount, .reserve__ref {
  padding: 16px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-sunken);
}
.reserve__total { display: block; font-size: 28px; line-height: 1.2; margin: 2px 0; }
.reserve__code { display: block; font-size: 22px; letter-spacing: .08em; margin: 4px 0 6px; }
.reserve__bank { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.reserve__bank dt { color: var(--text-muted); }
.reserve__bank dd { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .reserve__bank { grid-template-columns: 1fr; gap: 2px 0; } }

/* The registration booth: the same console with no sidebar, because its one
   screen is already open and there is nowhere else it may go. */
.shell--bare { grid-template-columns: 1fr; }

.sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--surface-line);
  display: flex;
  flex-direction: column;
  /* The rows carry their own breathing room now — see .nav-item. */
  gap: 1px;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: var(--brand-contrast);
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  box-shadow: var(--shadow-xs);
}
.brand__name { font-weight: 650; letter-spacing: -0.02em; }
.brand__sub { font-size: 11px; color: var(--text-subtle); letter-spacing: .06em; text-transform: uppercase; }

.nav-label {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-subtle); padding: 14px 10px 6px; font-weight: 600;
}
/* Inside the block below, where the block itself carries the padding. */
.nav-label--flush { display: block; padding: 0 0 3px; }

/* Which event you are in, in the one part of the screen that never scrolls.
   A link rather than a caption, because having read it the next thing
   somebody wants is the event's own page. */
.nav-event {
  display: block; margin: 12px 0 2px; padding: 9px 10px 10px;
  border-radius: var(--radius); text-decoration: none;
  background: var(--bg-sunken); border: 1px solid var(--surface-line);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.nav-event:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--surface-line)); }
.nav-event__name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px; font-weight: 650; line-height: 1.35; color: var(--text);
  /* A congress name runs to eleven words. Two lines, then an ellipsis, with
     the whole of it in the title attribute. */
  overflow-wrap: anywhere;
}
/* One person, several clients. Sits above the current event, because it
   is the wider question: which client's work am I looking at. */
.nav-switch { margin: 12px 0 2px; padding: 9px 10px; border-radius: var(--radius);
  background: var(--bg-sunken); border: 1px solid var(--surface-line); }
.nav-switch .select { width: 100%; margin-top: 4px; }
.select--sm { min-height: 34px; padding: 5px 28px 5px 9px; font-size: 13px; }

.nav-event__when {
  display: block; margin-top: 3px;
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* Draft, archived — anything but the state somebody assumes they are in. */
.nav-event__state {
  display: inline-block; margin-top: 5px; padding: 1px 7px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--warn-soft); color: var(--warn);
}

/* Tighter than the 44px touch target, because this is a mouse pointer on a
   long list: twenty-three entries at 44px plus the gaps between them runs
   past the bottom of a laptop screen, and a menu you have to scroll is a
   menu where half the event is out of sight. The coarse-pointer rule below
   puts the full target back for anybody using a finger. */
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 36px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 14px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
@media (pointer: coarse) {
  .nav-item { min-height: 44px; padding: 9px 12px; }
}
.nav-item:hover { background: var(--bg-sunken); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.nav-item .icon { width: 17px; height: 17px; opacity: .85; }
.nav-item .count { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text-subtle); }

/* A heading inside a menu that already has one. Quieter than "WORKSPACE"
   and "CURRENT EVENT" above it, and tighter to the items it introduces:
   it is grouping a list, not starting a new one, and two headings shouting
   equally loudly would read as two menus. */
.nav-label--sub {
  padding: 13px 10px 4px;
  color: var(--text-subtle);
  letter-spacing: .07em;
  font-size: 10px;
  opacity: .85;
}
/* The first heading follows the menu's own label, so it needs no gap of
   its own above it. */
.nav-label + .nav-label--sub { padding-top: 2px; }

/* Leaves this window. Pushed to the end of the row and faint, because it
   is a footnote to the label rather than part of it. */
.nav-item__away { margin-left: auto; display: inline-flex; opacity: .5; }
.nav-item__away .icon { width: 13px; height: 13px; }

/* A folding section of the menu. */
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group > summary {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; list-style: none;
  border-radius: var(--radius-sm);
  transition: color .16s var(--ease), background .16s var(--ease);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--text-muted); background: var(--bg-sunken); }
.nav-group > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* The arrow turns down when the section is open, which is the only thing
   on the row that says whether there is more underneath. */
.nav-group > summary .icon {
  width: 13px; height: 13px; opacity: .6;
  transform: rotate(0deg);
  transition: transform .16s var(--ease);
}
.nav-group[open] > summary .icon { transform: rotate(90deg); }
/* Folded, a section still has to say when the page you are on is inside
   it — otherwise closing one loses your place. */
.nav-group:not([open]) > summary:has(~ .nav-item[aria-current="page"]) {
  color: var(--brand-strong);
}

.sidebar__footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--surface-line); }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  border-bottom: 1px solid var(--surface-line);
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-weight: 620; letter-spacing: -0.015em; font-size: 15px; }
.topbar__spacer { margin-left: auto; }

.content { padding: 26px; display: flex; flex-direction: column; gap: 20px; max-width: 1400px; width: 100%; }
/* A page that shows a live preview of a full-width site has no business being
   held to a reading width — the cap only buys empty screen on the right. */
.content--wide { max-width: none; }

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head__text { min-width: 0; flex: 1 1 320px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head p { color: var(--text-muted); margin-top: 4px; }

.menu-toggle { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 82vw; max-width: 300px; z-index: 60;
    transform: translateX(-102%); transition: transform .28s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 50;
    background: rgb(15 23 42 / .45); backdrop-filter: blur(2px);
  }
  .menu-toggle { display: inline-flex; }
  .content { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
}

/* --- Cards & surfaces ----------------------------------------------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-bottom: 1px solid var(--surface-line);
}
.card__head h2, .card__head h3 { margin-right: auto; }
.card__body { padding: 18px; }
.card__body--tight { padding: 12px 18px; }
.card__foot {
  padding: 13px 18px; border-top: 1px solid var(--surface-line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-sunken); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.grid { display: grid; gap: 16px; }
/* A fixed column count, not auto-fit. auto-fit gives you however many cards
   happen to fit, which on a wide screen was six across and then two marooned
   on a second row beside four empty columns. Four reads as two tidy rows of
   four, and a partial last row still lines up with the one above it. */
.grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1240px) { .grid--stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 430px)  { .grid--stats { grid-template-columns: minmax(0, 1fr); } }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; }
/* Builder on the left, live preview on the right — the preview gets the larger
   share, because it is a real page and needs a realistic width to be worth
   looking at. */
.grid--builder { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); align-items: start; }
@media (max-width: 1080px) { .grid--builder { grid-template-columns: 1fr; } }
/* The same shape, for a panel whose left side is a settings form rather
   than a list of question rows. A form needs more of the width than a list
   does, and its own inner split collapses: two columns inside one column of
   a two-column page is four columns, and nothing survives that. */
.grid--settings { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.grid--settings .grid--split { grid-template-columns: 1fr; }
/* Stacked earlier than the question builder, at 1280 rather than 1080: this
   pane holds a whole registration page, and below about 450px of pane the
   page inside it switches to its phone layout — so a narrow laptop would be
   previewing a shape most of its visitors will never see. Stacked, the pane
   is the full width of the screen and shows the real thing. */
@media (max-width: 1280px) {
  .grid--settings { grid-template-columns: 1fr; }
  .grid--settings .grid--split { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .grid--settings .grid--split { grid-template-columns: 1fr; }
}
/* Twelve columns so a card can say how much room it needs. Equal columns put
   a card with three lines in it beside a card with twenty, and left a column
   of dead space the height of the taller one. */
/* Stretch, not start. These three hold a chart, a link and a short list, and
   they will never be the same height on their own — left to size themselves
   the row became a staircase with a hole under the short ones. Equal boxes
   with space inside them reads as a row; unequal boxes read as a mistake. */
.grid--insights { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
.grid--insights > .card { display: flex; flex-direction: column; }
.grid--insights > .card > .card__body { flex: 1; }
.grid--insights > * { grid-column: span 4; }
/* The one that is a list rather than a figure. Across the full width its rows
   sit in columns instead of one long stack, so it stops being three times the
   height of everything beside it. */
.grid--insights > .is-wide { grid-column: span 12; }
/* On a card this wide the heading's auto margin and the action's `push` make
   two gaps, which leaves whatever sits between them adrift in open space.
   One gap: title and badge together on the left, action on the right. */
.grid--insights > .is-wide > .card__head h2 { margin-right: 0; }
/* Three across, then one per row. Two across would leave the third card
   alone beside a hole, which is the thing this row was changed to stop. */
@media (max-width: 1100px) { .grid--insights > * { grid-column: span 12; } }
@media (max-width: 1080px) { .grid--split { grid-template-columns: 1fr; } }
/* Pick on the left, work on the right. The list only has to be wide enough for
   a name and a count, so the panel gets the room. */
.grid--picker { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 1080px) { .grid--picker { grid-template-columns: 1fr; } }

.stat {
  background: var(--bg-elevated); border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 4px;
}
.stat__label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-subtle); }
.stat__value { font-size: 1.85rem; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat__meta { font-size: 12.5px; color: var(--text-muted); }
.stat--accent { background: linear-gradient(150deg, var(--brand-soft), var(--bg-elevated) 70%); }

/* The heading over a band of numbers. Deliberately small: the numbers are
   what the page is for, and a heading that competes with them makes the
   page about its own furniture. */
.stat-band__label {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-subtle); margin: 22px 0 10px;
}
.stat-band__label:first-of-type { margin-top: 0; }

/* Separates an action that cannot be undone from the routine ones beside
   it. A rule costs nothing and stops a row of buttons reading as a row of
   equals. */
.page-head__divider {
  width: 1px; align-self: stretch; margin: 2px 4px;
  background: var(--surface-line);
}
/* Not red until you are on it: a destructive button that shouts from across
   the room gets ignored, and one that says nothing gets pressed. */
.btn--quiet-danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

/* One row of the attendee link page. The headings above the rows only line
   up with them while both share the same flex shape. */
.link-row > .input { min-width: 0; }
.link-row--head { padding: 0 2px 2px; }
.link-row--head .field__label { margin: 0; }

/* --- The itinerary ---------------------------------------------------- */
/* A session shut is its time and its name. The time first and in a column
   of its own, because an agenda is read down the clock. */
.session-row__when {
  flex: 0 0 104px;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  color: var(--text-muted);
}
.session-row__body .field__hint { font-size: 11.5px; }
/* The three that need more than one column's worth. */
.session-row__title, .session-row__people { grid-column: span 2; }

/* --- Automatic emails -------------------------------------------------- */
/* The rule as a sentence, beside its name: "3 days before the event
   starts". It is what makes a list of these readable at all. */
.rule-row__when {
  font-size: 12.5px; color: var(--text-muted); white-space: nowrap;
  padding-left: 10px; margin-left: 10px;
  border-left: 1px solid var(--surface-line);
}
.rule-row__trigger { grid-column: span 2; }
/* Permission gets two columns as well, because the questions it lists are
   whole sentences ("I am happy to receive updates about future events") and
   in one column the control shows about four words of them. */
.rule-row__consent { grid-column: span 2; }
.rule-row__consent .field__hint { max-width: 46ch; }
.rule-row__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rule-row__foot .push { margin-left: auto; }
@media (max-width: 760px) {
  .rule-row__trigger, .rule-row__consent { grid-column: auto; }
  .rule-row__when { display: none; }
}
@media (max-width: 760px) {
  .session-row__title, .session-row__people { grid-column: auto; }
  .session-row__when { flex-basis: 78px; }
}

/* --- The preview pane ---------------------------------------------- */
/* The frame is the only honest part of this screen: it holds a page the
   browser rendered on its own, out of this stylesheet's reach. Everything
   here styles the furniture around it and nothing inside it. */
.preview__tools { display: flex; align-items: center; gap: 8px; }
.preview__body { padding: 0; background: var(--bg-sunken); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.preview__frame {
  display: block; width: 100%; height: 620px; border: 0;
  background: #eef1f6; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  /* A frame that resizes as you switch widths, rather than jumping. */
  transition: max-width .18s ease;
  max-width: 100%; margin: 0 auto;
}
/* 400px is a phone with its chrome taken off — the width most of this mail
   is actually read at, and the width a long subject line first breaks. */
.preview__body.is-phone .preview__frame { max-width: 400px; box-shadow: 0 0 0 1px var(--surface-line); }
.hidden-form { display: none; }
@media (max-width: 760px) {
  .preview__frame { height: 460px; }
}

/* A small two-or-three-way switch, for a choice that changes how something
   is shown rather than what it is. */
.seg {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--bg-sunken); border: 1px solid var(--surface-line); border-radius: 999px;
}
.seg__btn {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 12.5px;
  padding: 4px 12px; border-radius: 999px; color: var(--text-muted);
}
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* --- Buttons -------------------------------------------------------- */
.btn {
  --btn-bg: var(--bg-elevated);
  --btn-fg: var(--text);
  --btn-border: var(--surface-line);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg);
  font-size: 14px; font-weight: 560; line-height: 1.2; cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
  box-shadow: var(--shadow-xs); text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn .icon { width: 16px; height: 16px; }

.btn--primary { --btn-bg: var(--brand); --btn-fg: var(--brand-contrast); --btn-border: transparent; }
.btn--primary:hover { --btn-bg: var(--brand-strong); }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: transparent; }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; box-shadow: none; color: var(--text-muted); }
.btn--ghost:hover { --btn-bg: var(--bg-sunken); color: var(--text); }
.btn--subtle { --btn-bg: var(--bg-sunken); --btn-border: transparent; }
.btn--sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
/* PayPal's own colours, so the button is recognised before it is read. */
.btn--paypal {
  background: #ffc439; color: #003087; border: 1px solid #e5ae2f;
  font-weight: 700; min-height: 46px; margin-top: 8px;
}
.btn--paypal:hover:not(:disabled) { background: #f2b733; }
.btn--paypal:disabled { opacity: .5; }
.btn--lg { padding: 12px 22px; font-size: 15.5px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { padding: 7px; }

.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --- Forms ---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Every display rule in this stylesheet beats the browser's own [hidden]
   rule, so anything a script hides by setting .hidden = true would stay on
   screen: it cost us "If yes, which church?" being asked of people who had
   said no, and the Reserve button being offered to everybody rather than to
   the organisations invited to pay by transfer. One rule, applied to
   everything, rather than a new one each time a component is bitten. */
[hidden] { display: none !important; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; gap: 6px; align-items: center; }
.field__hint { font-size: 12.5px; color: var(--text-subtle); }
.field__error { font-size: 12.5px; color: var(--danger); font-weight: 550; }

.input, .select, .textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--surface-line); border-radius: 10px;
  background: var(--bg-elevated); color: var(--text);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  font-size: 14.5px;
}
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--surface-line)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 18px;
  padding-right: 32px;
}
.input--color { padding: 4px; height: 40px; cursor: pointer; }

/* Password reveal ------------------------------------------------------
   A generated booth password is eight characters of noise typed on a
   borrowed tablet in a noisy hall. Dots guarantee a typo nobody can see,
   so every password field gets an eye to check what was actually typed.
   Built by app.js, so a field added to any form picks this up for free. */
.reveal { position: relative; display: block; min-width: 0; }
.reveal > .input { padding-right: 44px; }
.reveal__toggle {
  position: absolute; inset-block: 0; right: 1px;
  display: flex; align-items: center; justify-content: center;
  width: 42px; padding: 0; border: 0; background: none;
  color: var(--text-subtle); cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color .16s var(--ease);
}
.reveal__toggle:hover { color: var(--text); }
.reveal__toggle[aria-pressed="true"] { color: var(--brand); }
.reveal__toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.reveal__toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Caps Lock is the other half of the same problem: it only shows while the
   key is actually down and the field is actually focused. */
.reveal__caps {
  display: none; align-items: center; gap: 5px;
  margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--warn);
}
.reveal__caps[data-on] { display: flex; }
.reveal__caps svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid--wide { grid-template-columns: 1fr; }

/* The statement a visitor makes by pressing Submit — a PDPA notice, a refund
   rule. Quiet, because it is not asking anything, but not hidden: it sits
   directly above the button it describes. */
.form-notice {
  margin: 4px 0 14px; font-size: 12.5px; line-height: 1.6;
  color: var(--text-muted); text-wrap: pretty;
}
.col-span-2 { grid-column: span 2; }
/* The whole row, however many columns the grid worked out for itself.
   .form-grid is auto-fit, so it is three columns on a wide card and two on
   a narrow one — and "span 2" on a three-column grid is a field that stops
   two thirds of the way across with a hole beside it. Long-form fields say
   what they actually want instead. */
.col-span-full { grid-column: 1 / -1; }

/* A few fields that belong to one another, under a label of their own.
   Without it a setting and its small print sit level with the setting
   above and read as three equal choices. Indented rather than boxed: a
   box inside a card is one border too many. */
.field__group {
  display: flex; flex-direction: column; gap: 8px;
  padding-left: 14px;
  border-left: 2px solid var(--surface-line);
}
.field__group > .field__label { color: var(--text-muted); }
@media (max-width: 640px) { .col-span-2 { grid-column: auto; } }

.checkbox, .radio {
  display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px;
  border: 1px solid var(--surface-line); border-radius: 10px; cursor: pointer;
  background: var(--bg-elevated); transition: border-color .16s var(--ease), background .16s var(--ease);
}
/* Hover only moves the border. It used to tint the background as well, which
   made a merely hovered option look exactly like the chosen one. */
.checkbox:hover, .radio:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--surface-line)); }
/* A radio is a question — "which of these?" — and the answer has to be
   readable at a glance, so the border, the surface and the label weight all
   say which one it is. `:has` outranks the plain `.radio` rules a skin
   restates further down. */
.radio:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.radio:has(input:checked) .checkbox__text { font-weight: 550; }

/* A checkbox is only on or off, and its tick already says so. Five ticked
   boxes in a column tinted like five chosen radios is a wall of colour that
   draws the eye to nothing, so this stops at the border. */
.checkbox:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 55%, var(--surface-line)); }

.checkbox:has(input:focus-visible), .radio:has(input:focus-visible) { box-shadow: var(--ring); }
.checkbox--inline:has(input:checked) { background: none; box-shadow: none; border: 0; }
.checkbox input, .radio input { margin-top: 2px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.checkbox__text { font-size: 14px; }
.checkbox__text small { display: block; color: var(--text-subtle); }
.checkbox--inline { border: 0; padding: 0; background: none; }
.checkbox--inline:hover { background: none; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  width: 38px; height: 22px; border-radius: 99px; background: var(--surface-line);
  position: relative; transition: background .2s var(--ease); flex: none;
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease);
}
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
}
.toolbar .field { flex: 1 1 170px; }
.toolbar .field--grow { flex: 3 1 260px; }

/* --- Tables --------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-subtle); font-weight: 650; padding: 10px 14px;
  background: var(--bg-sunken); border-bottom: 1px solid var(--surface-line);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--surface-line); vertical-align: middle; }
.table tbody tr { transition: background .12s var(--ease); }
.table tbody tr:hover { background: var(--bg-sunken); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
/* A table read as a summary rather than a list: shorter rows, and a total
   line that reads as a total rather than as one more row. */
.table--tight td, .table--tight th { padding: 8px 12px; }
/* One day's takings as a share of the best day. A bar, not a chart: thirty
   rectangles are not worth a library to keep up to date. */
.spark {
  display: block; height: 10px; min-width: 2px; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-soft));
}
.table tfoot th {
  border-top: 2px solid var(--surface-line); border-bottom: 0;
  background: var(--bg-sunken); font-weight: 650; text-transform: none;
  letter-spacing: 0; font-size: 14px; color: var(--text);
}
.table a.row-link { color: inherit; font-weight: 570; }
.table a.row-link:hover { color: var(--brand); }

/* The buttons at the end of a row.
   They used to be one `nowrap` line, which was fine at three and broken at
   six: `.table-wrap` scrolls sideways, so the last button was simply cut off
   by the edge of the card and had to be scrolled to. Wrapping keeps every
   action on screen, and capping the width stops a long set stealing the
   space the row's actual content needs. */
/* The cell itself stays a table cell.
   `display: flex` here takes it out of the table layout altogether: the box
   stops being a row cell, so it sizes to its own content instead of to the
   row, and every row with a tall left-hand column grows a dark band down
   the right where the cell no longer reaches. The flex container goes
   inside, where it cannot affect the row.

   `min-width` rather than only `max-width`: with an auto table layout the
   content columns take what they want first, so without a floor reserved
   here the buttons are squeezed onto a second line while a truncated email
   address keeps the space. The floor fits the three on one line; below it,
   wrapping is the fallback rather than the normal state. */
.table td.row-actions, .table th.row-actions {
  /* The gutter on the left is doing nothing: the buttons are pushed right,
     and the gap to the column before is already whatever did not fill it. */
  padding-left: 8px;
  min-width: 246px;
  text-align: right;
}
.row-actions__set {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: flex-end; align-items: center;
  max-width: 290px; margin-left: auto;
}
/* Tighter than a standalone small button. Three of these have to sit on one
   line beside five columns of content, and the ordinary pill padding puts
   the third one onto a second row, which makes every paid row twice the
   height of its neighbours for no gain. */
.row-actions__set .btn--sm { padding: 6px 9px; }
.row-actions__set .btn { white-space: nowrap; }
/* A form holding one button is a wrapper, not a layout box. */
.row-actions__set form { display: contents; }

/* Pinning this column to the right edge was the other way to do it, and it
   is worse here: a sticky cell needs a background of its own, which in dark
   mode reads as a panel floating over the rows and cuts every row's bottom
   rule short. The shortfall was 27px. A column that does not ask for 27px
   it does not need is a better answer than a column that covers the one
   underneath it. */

.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 640;
  background: var(--brand-soft); color: var(--brand-strong);
}
.person__meta { min-width: 0; }
.person__name { font-weight: 570; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__sub { font-size: 12.5px; color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Badges, pills, chips ------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; line-height: 1.7;
  background: var(--bg-sunken); color: var(--text-muted); white-space: nowrap;
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 550;
  border: 1px solid var(--surface-line); background: var(--bg-elevated); color: var(--text-muted);
  cursor: pointer; transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip[aria-pressed="true"], .chip--active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: -0.01em; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.tabular { font-variant-numeric: tabular-nums; }

/* --- Alerts --------------------------------------------------------- */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 15px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: 14px;
}
.alert .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert--success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.alert--error   { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert--warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.alert--info    { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert strong { font-weight: 650; }

/* A list folded into an alert. Used where one sentence applies to several
   things — the alternative was that sentence repeated once per thing, which
   pushed the whole dashboard below the fold. Colour is inherited from the
   alert, so it reads correctly in both themes and at every level. */
.alert__list { margin-top: 7px; font-size: 13px; }
.alert__list > summary {
  display: inline-flex; align-items: center; gap: 6px;
  width: fit-content; padding: 1px 0; cursor: pointer;
  font-weight: 600; list-style: none;
}
.alert__list > summary::-webkit-details-marker { display: none; }
.alert__list > summary::before {
  content: ''; flex: none;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .18s var(--ease);
}
.alert__list[open] > summary::before { transform: rotate(90deg); }
.alert__list ul { margin: 7px 0 0; padding: 0 0 0 11px; list-style: none; display: grid; gap: 3px; }
.alert__list li { line-height: 1.5; }
.alert__list a {
  color: inherit; opacity: .88;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.alert__list a:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .alert__list > summary::before { transition: none; }
}

.flash-stack { position: fixed; top: 14px; right: 14px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, 92vw); }
.flash-stack .alert { box-shadow: var(--shadow); background-color: var(--bg-elevated); animation: slide-in .32s var(--ease); }
@keyframes slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* --- Licence codes --------------------------------------------------- */
/* The thing that was paid for, so it is the biggest thing on the page and it
   is selectable: somebody will double-click it rather than find the button. */
.licence-codes { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.licence-code {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--bg-sunken); border: 1px solid var(--border);
}
.licence-code__label {
  flex: 1 1 100%; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-subtle);
}
.licence-code__value {
  flex: 1 1 auto; font-size: 19px; font-weight: 700; letter-spacing: .02em;
  user-select: all; word-break: break-all;
}

/* --- Empty state ---------------------------------------------------- */
.empty { text-align: center; padding: 46px 20px; color: var(--text-muted); }
.empty__icon {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px;
  display: grid; place-items: center; background: var(--bg-sunken); color: var(--text-subtle);
}
.empty__icon .icon { width: 22px; height: 22px; }
.empty h3 { color: var(--text); margin-bottom: 5px; }

/* --- Tabs ----------------------------------------------------------- */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--surface-line); overflow-x: auto; }
.tab {
  padding: 9px 14px; font-size: 14px; font-weight: 560; color: var(--text-muted);
  border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0;
  white-space: nowrap; transition: color .15s var(--ease), border-color .15s var(--ease);
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }
.tab-panel[hidden] { display: none; }

/* --- Pagination ----------------------------------------------------- */
.pagination { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 550; color: var(--text-muted);
  border: 1px solid var(--surface-line); background: var(--bg-elevated);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.pagination .gap { border: 0; background: none; }

/* --- Progress / meters ---------------------------------------------- */
.meter { height: 7px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 99px; background: var(--brand); transition: width .5s var(--ease); }
.meter__fill--ok { background: var(--ok); }
.meter__fill--warn { background: var(--warn); }

.sparkline { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.sparkline__bar { max-width: 42px; }
.sparkline__bar { flex: 1; min-width: 3px; border-radius: 3px 3px 0 0; background: var(--brand); opacity: .82; }
.sparkline__bar:hover { opacity: 1; }

/* --- Modal / drawer -------------------------------------------------- */
dialog {
  border: 0; padding: 0; border-radius: var(--radius-xl);
  background: var(--bg-elevated); color: var(--text);
  box-shadow: var(--shadow-lg); width: min(620px, 94vw); max-height: 90vh;
}
dialog::backdrop { background: rgb(15 23 42 / .5); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .24s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.dialog__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--surface-line); }
.dialog__head h2 { margin-right: auto; }
.dialog__body { padding: 18px 20px; overflow-y: auto; max-height: 62vh; display: flex; flex-direction: column; gap: 14px; }
.dialog__foot { padding: 14px 20px; border-top: 1px solid var(--surface-line); display: flex; gap: 9px; justify-content: flex-end; background: var(--bg-sunken); }
dialog.dialog--wide { width: min(900px, 96vw); }

/* --- Form builder ---------------------------------------------------- */
.builder-list { display: flex; flex-direction: column; gap: 9px; }
.builder-item {
  border: 1px solid var(--surface-line); border-radius: var(--radius);
  background: var(--bg-elevated); transition: box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.builder-item:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--surface-line)); }
.builder-item.is-dragging { opacity: .45; }
.builder-item.is-over { border-color: var(--brand); box-shadow: var(--ring); }
.builder-item__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.builder-item__handle { cursor: grab; color: var(--text-subtle); padding: 3px; touch-action: none; display: inline-flex; }
.builder-item__handle .icon { width: 18px; height: 18px; }
.builder-item__handle:active { cursor: grabbing; }
/* The badges on the right are short and the question's name is not, so the
   name gets the leftover space and a floor under it — three badges on one
   row had squeezed "Email address" down to "Ema…". */
.builder-item__title { font-weight: 570; margin-right: auto; flex: 1 1 auto; min-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-item__body { padding: 0 12px 12px; display: none; }
.builder-item[data-open="1"] .builder-item__body { display: block; }
.builder-item--disabled .builder-item__title { color: var(--text-subtle); text-decoration: line-through; }

/* --- Public registration -------------------------------------------- */
/* The background is on the page itself, so it runs the full height instead of
   stopping in a line partway down. */
.public-shell {
  min-height: 100vh; display: flex; flex-direction: column;
  background-color: #0f172a;
}
/* A photograph stays put while the page scrolls, which reads as a backdrop
   rather than a banner sliding away. Touch browsers handle fixed attachment
   badly, so they scroll it normally. */
.public-shell--image { background-attachment: fixed; }
@media (hover: none) {
  .public-shell--image { background-attachment: scroll; }
}
/* No decorative overlay of its own: anything painted here is clipped at the
   header's bottom edge and shows up as a line across the page. The soft light
   at the top comes from the shell, which spans the whole document. */
.public-hero {
  position: relative; padding: 54px 20px 92px;
  /* Chosen against the backdrop the organiser picked, not assumed to be white. */
  color: var(--on-backdrop, #fff);
}
.public-shell::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 90% 55% at 18% -10%, rgb(255 255 255 / .12), transparent 60%),
              radial-gradient(ellipse 70% 45% at 92% -14%, rgb(255 255 255 / .08), transparent 60%);
}
.public-hero__inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
/* Capped in both directions: a wide banner-shaped logo used to stretch the
   full width of the header and read as a slab rather than a mark. */
.public-hero__logo {
  max-height: 64px; max-width: min(100%, 420px); width: auto; height: auto;
  object-fit: contain; object-position: left center;
  align-self: flex-start; margin-bottom: 6px; border-radius: 8px;
}
.public-hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); letter-spacing: -0.03em; }
.public-hero__meta { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 14.5px; opacity: .92; }
.public-hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.public-hero__meta .icon { width: 17px; height: 17px; opacity: .85; }
/* A run of days, one per line. The icon stays on the first line and the dates
   stack beside it rather than wrapping underneath it. */
.public-hero__dates { align-items: flex-start !important; }
.public-hero__days { display: flex; flex-direction: column; gap: 2px; }
.public-hero__days span { display: block; }

.public-body { position: relative; z-index: 2; flex: 1; padding: 0 16px 56px; margin-top: -58px; }

/* The details beside the form.
   Below 1080px this wrapper does nothing: the page stacks exactly as it did
   before, hero then card, which is the only shape that works on a phone. On a
   wide screen the hero becomes a column that stays put while the form
   scrolls, so what the event is stays on screen while somebody fills it in —
   and the form stops being an 820px card marooned in the middle of a 1600px
   window. */
.public-frame { display: contents; }
@media (min-width: 1080px) {
  .public-frame--aside {
    display: grid; align-items: start;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px;
    position: relative; z-index: 2; flex: 1;
  }
  .public-frame--aside .public-hero {
    padding: 64px 0 40px;
    /* Sticky inside its own grid area, which is as tall as the row — so it
       follows the form down and stops when the form ends. */
    position: sticky; top: 28px;
  }
  .public-frame--aside .public-hero__inner { max-width: none; }
  .public-frame--aside .public-body { margin-top: 64px; padding: 0 0 56px; }
  .public-frame--aside .public-card { max-width: none; }
  /* The draft notice belongs over the form, not over the details. */
  .public-frame--aside > .public-body:first-of-type { grid-column: 2; }
}
/* The pitch, in the column. Capped short of the column's own width because a
   measure much past this stops being readable, whatever the column does. */
.public-hero__blurb {
  margin: 10px 0 0; font-size: 14.5px; line-height: 1.65;
  opacity: .88; max-width: 42ch;
}

/* A long form read as steps rather than as one unbroken sheet.
   The number is the point: "2 of 3" is the only thing that tells somebody
   halfway down how much of this is left. */
.form-step { display: flex; flex-direction: column; gap: 14px; }
.form-step + .form-step { margin-top: 6px; padding-top: 22px; border-top: 1px solid var(--surface-line); }
.form-step__head { display: flex; align-items: center; gap: 11px; }
.form-step__n {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-contrast, #fff);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.form-step__title { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.form-step__note { font-size: 13px; color: var(--text-muted); margin: -4px 0 0 37px; }
.public-card {
  max-width: 820px; margin: 0 auto; background: var(--form-bg, var(--bg-elevated));
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  border: 1px solid var(--surface-line); overflow: hidden;
}
.public-card__body { padding: clamp(20px, 4vw, 34px); display: flex; flex-direction: column; gap: 18px; }
/* Sits over the backdrop now, so it takes its colour from that rather than
   from the page theme. */
.public-foot {
  position: relative; z-index: 2; text-align: center; padding: 24px 20px 28px;
  color: var(--on-backdrop, #fff); opacity: .62; font-size: 13px;
}

/* ======================================================================
   The attendee app.

   Its own world, scoped to .app-shell so none of it can leak into the
   console or the registration page: near-black, one accent, Anton over
   Inter, and a bar across the bottom that every screen shares.

   Dark is fixed here rather than chosen. An app held up at a check-in desk
   is held up in a dim hall, and the one surface that must stay white — the
   QR code's own card — is white precisely because a scanner needs it to be.
   ====================================================================== */
.app-shell {
  --app-bg: #0a0c11;
  --app-card: #161a22;
  --app-line: #3a4152;
  --app-ink: #f4f6fb;
  --app-dim: #a3abbd;
  --app-ok: #7ee2a8;

  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;

  /* The shell is exactly one screen tall and never scrolls. The screen
     inside it does.

     This is the whole fix for a bar that would not sit still. A fixed bar
     is placed against the *visual* viewport, and on a phone that viewport
     changes height constantly — the browser's own toolbar slides away as
     you scroll and back as you stop, the system navigation bar comes and
     goes, the keyboard opens. Every one of those moved the bar, which is
     why it appeared to drift up and down between screens.

     With the document itself unable to scroll there is nothing to make a
     browser toolbar hide in the first place, and the bar is an ordinary
     item at the end of a column: it is where the screen ends, whatever
     the screen is doing. */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Anton for the display line, and the system's own condensed face where it
   is not installed. Nothing is fetched: the font policy here is self-hosted
   or system, never a CDN. */
.app-shell .app-title,
.app-shell .app-poster__title,
.app-shell .app-tile__figure,
.app-shell .app-ring__figure span {
  font-family: "Anton", "Haettenschweiler", "Arial Narrow Bold", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

/* The only thing that scrolls. `min-height: 0` is not optional: a flex
   item defaults to min-height:auto, which refuses to shrink below its
   content and would push the bar off the bottom of the screen on a long
   agenda. */
.app-screen {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  width: 100%; max-width: 480px; margin: 0 auto;
  /* Additive rather than max(): a phone that reports no inset still needs
     room above the first line, and one that reports a notch needs room
     under it as well as the notch itself. */
  padding: calc(env(safe-area-inset-top) + 14px) 20px 16px;
  display: flex; flex-direction: column; gap: 14px;
}

/* --- the bar ----------------------------------------------------------- */
.app-nav {
  /* In flow at the end of the shell, not fixed over it. See .app-shell. */
  position: relative; z-index: 20; flex: none;
  width: calc(100% - 24px); max-width: 456px;
  margin: 0 auto calc(14px + env(safe-area-inset-bottom));
  height: 68px; border-radius: 24px;
  background: color-mix(in srgb, var(--app-card) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / .8);
}
.app-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 56px; min-height: 48px; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--app-dim); text-decoration: none;
}
.app-nav__item svg { width: 22px; height: 22px; }
.app-nav__item.is-here { color: #fff; font-weight: 700; }
/* The QR, raised out of the bar. It is the one thing somebody needs in a
   hurry, so it is the one thing that never needs looking for. */
.app-nav__item--centre {
  width: 56px; min-width: 56px; height: 56px; border-radius: 50%;
  background: var(--app-accent); margin-top: -26px;
  border: 5px solid var(--app-bg); color: #fff;
}
.app-nav__item--centre svg { width: 24px; height: 24px; }
.app-nav__item--centre.is-here { background: #fff; color: var(--app-bg); }

/* --- heads -------------------------------------------------------------- */
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.app-head--title { display: block; }
.app-head--bar .app-head__heading { font-size: 16px; font-weight: 800; }
.app-head__who { display: flex; flex-direction: column; min-width: 0; }
.app-head__hello { font-size: 12px; color: var(--app-dim); font-weight: 600; }
.app-head__name { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.app-head__tools { display: flex; gap: 10px; flex: none; }
/* A screen name in the app's own display face, not a poster headline.
   At 44px one word ate a tenth of the screen and said nothing the bar at
   the bottom had not already said; this keeps the voice and gives the
   space back to the thing the screen is actually for. */
.app-title { margin: 0; font-size: clamp(21px, 6vw, 25px); line-height: 1.1; }

.app-round {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--app-card); display: grid; place-items: center;
  color: var(--app-ink); text-decoration: none;
}
.app-round svg { width: 20px; height: 20px; }
.app-round--me { background: #c9d6ff; color: #0a0c11; font-weight: 800; font-size: 15px; }
.app-round--ghost { background: none; }

.app-lede { margin: -4px 0 0; font-size: 13px; color: var(--app-dim); line-height: 1.5; }

/* --- the poster --------------------------------------------------------- */
.app-poster {
  border-radius: 28px; background: var(--app-accent); color: #fff;
  padding: 20px; min-height: 184px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  position: relative; overflow: hidden;
}
.app-poster__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.app-poster__title { margin: 0; font-size: clamp(32px, 10vw, 44px); line-height: .95; }
.app-poster__logo { max-width: 62%; max-height: 92px; object-fit: contain; object-position: left top; }
.app-poster__when { text-align: right; font-weight: 800; font-size: 13px; line-height: 1.3; flex: none; }
.app-poster__chip {
  align-self: flex-start; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 6px 12px;
  background: var(--app-bg); color: #fff;
}
.app-poster__chip--light { background: #fff; color: #0a0c11; }

/* --- cards -------------------------------------------------------------- */
.app-card {
  background: var(--app-card); border-radius: 22px; padding: 16px;
  display: flex; flex-direction: column; gap: 9px;
}
.app-card--in { background: #12301f; }
.app-card__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.app-card__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #8fa8ff; }
.app-card__eyebrow--ok { color: var(--app-ok); }
.app-card__when { font-size: 12px; color: var(--app-dim); }
.app-card__title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.app-card__note { font-size: 13px; color: var(--app-dim); line-height: 1.45; }
.app-card--in .app-card__note { color: #c9f3dc; }

.app-days { display: flex; flex-direction: column; gap: 6px; }
.app-days__line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--app-dim); }
.app-days__line svg { width: 16px; height: 16px; flex: none; }

/* --- buttons ------------------------------------------------------------ */
.app-btn {
  align-self: flex-start; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 18px; border: none;
  font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.app-btn svg { width: 18px; height: 18px; }
.app-btn--light { background: #fff; color: #0a0c11; }
.app-btn--ghost { background: var(--app-card); color: var(--app-ink); border: 1px solid var(--app-line); }
.app-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-actions .app-btn { flex: 1 1 150px; }
.app-actions--tight { margin-top: 2px; }

/* --- tiles -------------------------------------------------------------- */
.app-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app-tile {
  background: var(--app-card); border-radius: 22px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; color: var(--app-ink); text-decoration: none;
}
.app-tile__figure { font-size: 30px; line-height: 1.1; }
.app-tile__figure span { color: var(--app-dim); }
.app-tile__note { font-size: 12px; color: var(--app-dim); }

/* --- the stub ----------------------------------------------------------- */
.app-stub { border-radius: 28px; overflow: hidden; }
.app-stub__head { background: var(--app-accent); color: #fff; padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.app-stub.is-in .app-stub__head { background: #15803d; }
.app-stub__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.app-stub__kind {
  font-family: "Anton", "Arial Narrow Bold", Impact, sans-serif; font-weight: 400;
  font-size: 30px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere;
}
.app-stub__tag { background: var(--app-bg); color: #fff; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; flex: none; }
.app-stub__meta { display: flex; justify-content: space-between; gap: 12px; }
.app-stub__meta-right { text-align: right; }
.app-stub__label { font-size: 11px; font-weight: 700; letter-spacing: .1em; opacity: .85; }
.app-stub__value { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
/* The tear: two bites out of the sides and a dashed rule between them. */
.app-stub__notch { height: 22px; background: #fff; position: relative; }
.app-stub__notch span {
  position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--app-bg);
}
.app-stub__notch span:first-child { left: -11px; }
.app-stub__notch span:nth-child(2) { right: -11px; }
.app-stub__notch i { position: absolute; left: 20px; right: 20px; top: 10px; border-top: 2px dashed #cfd4de; }
/* White, and not negotiable: a scanner reads a dark code on a light ground. */
.app-stub__code { background: #fff; padding: 10px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.app-stub__code svg { width: min(230px, 62vw); height: auto; }
.app-stub__hint { margin: 0; font-size: 12px; color: #4a5060; font-weight: 600; text-align: center; line-height: 1.5; }
.app-stub__hint b { color: #0a0c11; }

.app-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-fact { background: var(--app-card); border-radius: 16px; padding: 10px 14px; min-width: 0; }
.app-fact--wide { grid-column: 1 / -1; }
.app-fact span { display: block; font-size: 11px; color: var(--app-dim); font-weight: 700; }
.app-fact b { font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.app-fact b.is-ok { color: var(--app-ok); }
.app-fact b.is-warn { color: #fbbf24; }
/* A number somebody reads out down a phone. Monospace so a 0 is not an O,
   and selectable so it can be copied into an email instead. */
.app-fact__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em; -webkit-user-select: all; user-select: all;
}

/* --- The scanner ------------------------------------------------------ */
.app-scan { display: flex; flex-direction: column; gap: 12px; }
.app-scan__stage {
  position: relative; border-radius: 22px; overflow: hidden;
  background: #05070c; aspect-ratio: 3 / 4;
}
.app-scan__video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Four corners, not a box: a full border reads as a frame around the
   picture, where corners read as a target to put something inside. */
.app-scan__frame { position: absolute; inset: 14%; pointer-events: none; }
.app-scan__frame i {
  position: absolute; width: 30px; height: 30px;
  border: 3px solid rgba(255, 255, 255, .92); border-radius: 6px;
}
.app-scan__frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.app-scan__frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.app-scan__frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.app-scan__frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.app-scan__say { font-size: 13px; color: var(--app-dim); text-align: center; margin: 0; line-height: 1.5; }
.app-scan__say.is-bad { color: #fbbf24; }
.app-scan__found { background: var(--app-card); border-radius: 18px; padding: 14px 16px; }
.app-scan__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #8fa8ff; }
.app-scan__text {
  margin-top: 6px; font-size: 14px; font-weight: 700; overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.app-scan__host { margin-top: 8px; font-size: 12px; color: #fbbf24; line-height: 1.45; }
.app-scan__help { font-size: 12px; color: var(--app-dim); text-align: center; line-height: 1.5; }
.app-scan__help a { color: var(--app-accent); }

/* --- alerts ------------------------------------------------------------- */
.app-alert { display: flex; gap: 12px; border-radius: 18px; padding: 14px 16px; font-size: 14px; }
.app-alert svg { width: 22px; height: 22px; flex: none; }
.app-alert--ok { background: #12301f; color: #c9f3dc; }
.app-alert--warn { background: #2e2311; color: #f6deb0; }
.app-alert__note { font-size: 13px; opacity: .9; margin-top: 3px; }

/* --- tabs and lists ----------------------------------------------------- */
.app-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; background: var(--app-card); border-radius: 999px; padding: 5px; }
.app-tab {
  min-height: 40px; display: grid; place-items: center; border-radius: 999px;
  font-size: 13px; font-weight: 800; color: var(--app-dim); text-decoration: none; text-align: center;
  padding: 0 8px;
}
.app-tab.is-on { background: #fff; color: #0a0c11; }

.app-slots { display: flex; flex-direction: column; gap: 8px; }
.app-slot { display: flex; gap: 10px; align-items: stretch; }
.app-slot__time { width: 58px; flex: none; padding-top: 12px; font-size: 13px; font-weight: 800; color: var(--app-dim); }
.app-slot__body { flex: 1; min-width: 0; background: var(--app-card); border-radius: 18px; padding: 11px 14px; }
.app-slot__title { font-size: 14px; font-weight: 800; line-height: 1.35; }
.app-slot__meta { font-size: 12px; color: var(--app-dim); margin-top: 3px; line-height: 1.4; }
.app-slot.is-now .app-slot__body { background: var(--app-accent); }
.app-slot.is-now .app-slot__time { color: #fff; }
.app-slot.is-now .app-slot__meta { color: #e6ecff; }
.app-slot__now { margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; }

.app-group__head { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #8fa8ff; margin-bottom: 8px; }
.app-group__note { font-size: 12px; color: var(--app-dim); margin: 8px 2px 0; line-height: 1.45; }
.app-list { display: flex; flex-direction: column; gap: 6px; }
.app-row {
  display: flex; align-items: center; gap: 12px; min-height: 52px;
  background: var(--app-card); border-radius: 16px; padding: 10px 14px;
  color: var(--app-ink); text-decoration: none;
}
.app-row svg { width: 18px; height: 18px; flex: none; color: var(--app-dim); }
.app-row__text { flex: 1; min-width: 0; }
.app-row__name { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.app-row__sub { font-size: 12px; color: var(--app-dim); margin-top: 1px; }
.app-row.is-done .app-row__sub { color: var(--app-ok); }
.app-row__dot {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; border: 2px solid var(--app-line); box-sizing: border-box;
}
.app-row.is-done .app-row__dot { background: var(--app-accent); border-color: transparent; color: #fff; }
.app-row__dot svg { width: 14px; height: 14px; color: #fff; }

/* --- the ring ----------------------------------------------------------- */
.app-ring-card { display: flex; gap: 14px; align-items: center; background: var(--app-card); border-radius: 24px; padding: 14px; }
.app-ring { position: relative; width: 120px; height: 120px; flex: none; }
.app-ring__figure { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.app-ring__figure span { font-size: 34px; line-height: 1; }
.app-ring__figure i { color: var(--app-dim); font-size: 22px; font-style: normal; }
.app-ring__figure small { font-size: 11px; color: var(--app-dim); font-weight: 600; }
.app-ring__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* The desks, and which are taking scans. */
.app-desk__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--app-dim); opacity: .45; }
.app-desk__state { font-size: 12px; font-weight: 650; color: var(--app-dim); flex: none; }
.app-desk.is-open { border: 1px solid color-mix(in srgb, var(--app-ok) 45%, var(--app-line)); }
.app-desk.is-open .app-desk__dot { background: var(--app-ok); opacity: 1; }
.app-desk.is-open .app-desk__state { color: var(--app-ok); }

/* What an offline copy says about itself, rather than looking live. */
.app-stale { font-size: 12px; text-align: center; color: #fbbf24; padding: 2px 8px; }

/* Through the door: the stub's head turns, and the home card appears. The
   script sets one class on the body and everything here follows. */
.app-shell.is-in .app-stub__head { background: #15803d; }

/* `margin-block: auto` centres an empty state in whatever room is left,
   and does nothing at all on a screen that has content — auto margins only
   take up space that is going spare. An empty agenda used to sit against
   the title with the rest of the screen black beneath it. */
.app-empty { text-align: center; color: var(--app-dim); padding: 36px 16px; margin-block: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.app-empty svg { width: 28px; height: 28px; opacity: .6; }
.app-empty p { margin: 0; font-size: 14px; line-height: 1.5; max-width: 30ch; }

@media (max-width: 360px) {
  .app-tiles, .app-facts { grid-template-columns: 1fr; }
  .app-slot__time { width: 48px; }
}

/* --- The ticket, as an app -------------------------------------------- */
/*
 * One state, carried on the card: `is-in` means they are through the door,
 * and everything that changes hangs off it. The script sets that one class
 * and fills two bits of text; it never reaches for a colour.
 */
.ticket-app__mark {
  position: relative; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--bg-sunken); border: 2px solid var(--surface-line);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease), background .4s var(--ease);
}
.ticket-app__mark img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ticket-app__initials { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--text-muted); }
/* Lit. A ring and a glow rather than a colour swap, because the mark in the
   middle is the organiser's own logo and recolouring somebody's logo is not
   ours to do. */
.ticket-app.is-in .ticket-app__mark {
  border-color: var(--ok);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 18%, transparent),
              0 0 36px -6px color-mix(in srgb, var(--ok) 70%, transparent);
}
.ticket-app__tick {
  position: absolute; right: -2px; bottom: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok); color: #fff;
  border: 2px solid var(--form-bg, var(--bg-elevated));
  transform: scale(0); opacity: 0;
  transition: transform .34s cubic-bezier(.2, 1.5, .4, 1), opacity .2s var(--ease);
}
.ticket-app__tick svg { width: 16px; height: 16px; }
.ticket-app.is-in .ticket-app__tick { transform: scale(1); opacity: 1; }

/* The desks, and which are taking scans. */
.ticket-app__desks { width: 100%; text-align: left; display: grid; gap: 6px; }
.ticket-app__desks-head {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-subtle); margin-bottom: 2px;
}
.ticket-app__desk {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg-sunken); border: 1px solid var(--surface-line);
  font-size: 14px;
}
.ticket-app__desk-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ticket-app__desk-state { font-size: 12px; font-weight: 650; color: var(--text-subtle); }
.ticket-app__dot {
  flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-subtle); opacity: .45;
}
.ticket-app__desk.is-open { border-color: color-mix(in srgb, var(--ok) 45%, var(--surface-line)); }
.ticket-app__desk.is-open .ticket-app__dot { background: var(--ok); opacity: 1; }
.ticket-app__desk.is-open .ticket-app__desk-state { color: var(--ok); }

/* What an offline copy says about itself, rather than quietly pretending to
   be live. */
.ticket-app__stale {
  width: 100%; font-size: 12px; text-align: center; color: var(--warn);
}

@media (prefers-reduced-motion: reduce) {
  .ticket-app__mark, .ticket-app__tick { transition: none; }
}

/* --- The agenda, on the attendee page --------------------------------- */
/*
 * Read down the clock: the time in a narrow rail on the left, what is
 * happening beside it. Two sessions at the same time sit next to each
 * other, which is what makes a choice look like a choice.
 *
 * Every day is in the markup whether or not it is on screen, so the page
 * prints whole and switching day costs nothing on a conference wifi.
 */
.agenda__head { font-size: 1rem; margin: 0; }
.agenda__date { margin: 0; font-size: 13px; color: var(--text-muted); }

.agenda__days { display: flex; flex-wrap: wrap; gap: 6px; }
.agenda__day {
  border: 1px solid var(--surface-line); background: transparent;
  color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.agenda__day:hover { color: var(--text); }
.agenda__day.is-on {
  background: var(--brand-soft, #eee); color: var(--brand-strong, #222);
  border-color: transparent;
}

.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.agenda__slot {
  /* Wide enough for a range — "08:30 – 09:15" is 13 characters, and at
     68px it ran under the title beside it. */
  display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--surface-line);
}
.agenda__slot:first-child { border-top: 0; padding-top: 4px; }
.agenda__when {
  font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600;
  color: var(--text-muted); padding-top: 2px; white-space: nowrap;
}

.agenda__at { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* A choice: side by side, each in a box of its own, so it is obvious they
   are alternatives rather than one thing after another. */
.agenda__at--parallel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px;
}
.agenda__at--parallel .agenda__item {
  border: 1px solid var(--surface-line); border-radius: var(--radius);
  padding: 12px 14px;
}

.agenda__item { min-width: 0; }
.agenda__track {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: 4px;
}
.agenda__title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.35; }
.agenda__who { margin: 3px 0 0; font-size: 13.5px; color: var(--text-muted); }
.agenda__about { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.agenda__meta {
  margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12.5px; color: var(--text-subtle);
}
.agenda__where { display: inline-flex; align-items: center; gap: 5px; }
.agenda__where .icon { width: 14px; height: 14px; }

@media (max-width: 520px) {
  /* The rail becomes a heading: 68px of clock beside a 200px column is a
     title broken over four lines. */
  .agenda__slot { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .agenda__slot:first-child { padding-top: 10px; }
}

@media print {
  /* All of it, every day, no buttons. */
  .agenda__days { display: none; }
  .agenda__panel[hidden] { display: block !important; }
}

.fieldset { border: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fieldset > legend { font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--text-subtle); padding: 0 0 4px; }
.choice-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.req { color: var(--danger); font-weight: 700; }

.ticket-preview {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
  padding: 20px; border-radius: var(--radius-lg); background: var(--bg-sunken); border: 1px solid var(--surface-line);
}
.ticket-preview svg, .ticket-preview img { width: 156px; height: 156px; border-radius: 10px; background: #fff; padding: 6px; }
@media (max-width: 560px) { .ticket-preview { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* --- Kiosk ----------------------------------------------------------- */
.kiosk {
  min-height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #0b1120, #111f38 55%, #0b1120);
  color: #e8edf7; padding: 24px; gap: 20px;
}
.kiosk__top { display: flex; align-items: center; gap: 14px; }
.kiosk__logo { max-height: 46px; max-width: 200px; object-fit: contain; }
/* On the welcome screen the logo is the point, not a footnote. */
.kiosk-card__logo {
  max-height: 96px; max-width: min(320px, 70%); object-fit: contain;
  margin: 0 auto 18px; display: block;
}
.kiosk__event { font-weight: 650; letter-spacing: -0.02em; }
.kiosk__station { margin-left: auto; font-size: 13px; opacity: .72; }
.kiosk__main { flex: 1; display: grid; place-items: center; }
.kiosk__panel {
  width: min(640px, 100%); background: rgb(255 255 255 / .06);
  border: 1px solid rgb(255 255 255 / .12); border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 44px); backdrop-filter: blur(14px);
  display: flex; flex-direction: column; gap: 18px; text-align: center;
}
.kiosk__panel h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.kiosk__panel p { opacity: .8; }

/* No panel at all. The card, its blur, its border and its fill all go, and
   the content sits straight on the background — which is what "turn the
   translucent panel off" means to everyone except a stylesheet. The buttons
   keep a fill of their own, because they are the only thing on the screen
   that still has to look pressable. */
.kiosk--flat .kiosk__panel {
  backdrop-filter: none;
  background: none;
  border: 0;
  padding: clamp(16px, 4vw, 32px) 0;
}
.kiosk--flat .kiosk-btn { background: rgb(255 255 255 / .10); border-color: rgb(255 255 255 / .18); }
.kiosk--flat .kiosk-btn:hover { background: rgb(255 255 255 / .18); }

/* A camera with no viewfinder. Two pixels at the corner, effectively
   invisible, but still laid out and still playing: a video that is
   display:none or off-screen is one a browser may stop decoding frames for,
   and a decoder that has stopped is a door that quietly checks nobody in.
   The decoder reads the stream's own size, not this box, so two pixels costs
   it nothing.

   Written against the id, not beside it. `#kiosk-video` below sets the
   viewfinder's width and shape, and an id beats a class — a rule that only
   matched the class lost half of itself and showed the camera. */
#kiosk-video[data-quiet] {
  position: fixed; bottom: 0; left: 0; z-index: -1;
  width: 2px; height: 2px; min-width: 0; max-width: none;
  aspect-ratio: auto; object-fit: fill;
  margin: 0; border-radius: 0; background: transparent;
  opacity: .01; pointer-events: none;
}

/* "Welcome to" on its own line, the name under it. The greeting is the small
   half — nobody walks up to read it — so the name carries the weight. */
.kiosk-welcome { display: grid; gap: 2px; line-height: 1.18; }
.kiosk-welcome__lead { font-size: .58em; font-weight: 400; opacity: .82; letter-spacing: 0; }
.kiosk-welcome__name { font-weight: 700; letter-spacing: -0.02em; }
/* One line, always: the fitter shrinks it, this stops the leftovers wrapping
   while it works and if the script never runs. */
.kiosk-welcome__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kiosk-prompt { font-size: clamp(1rem, 2.4vw, 1.25rem); opacity: .9 !important; margin: 0; }

/* --- The door's scan animation --------------------------------------- */
.kiosk-scan { display: grid; place-items: center; }
.kiosk-scan svg { width: 100%; max-width: 420px; height: auto; display: block; }
.kiosk-scan__s,
.kiosk-scan__eye { fill: none; stroke: #e9edf4; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.kiosk-scan__eye { stroke-width: 2; }
.kiosk-scan__dots { fill: #e9edf4; }
.kiosk-scan__desk { stroke: rgb(255 255 255 / .22); stroke-width: 2; stroke-linecap: round; }
.kiosk-scan__beam path { stroke: #ff4747; stroke-width: 1.5; stroke-linecap: round; fill: none; opacity: .5; }
.kiosk-scan__line { stroke: #ff4747; stroke-width: 2.5; stroke-linecap: round; }
.kiosk-scan__tick { fill: none; stroke: #19b36b; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* One four-second loop: the phone arrives, the beam reads it, a tick lands,
   the phone leaves. Someone arriving mid-cycle sees the whole thing before
   they have finished putting their bag down. */
.kiosk-scan__phone,
.kiosk-scan__beam,
.kiosk-scan__line,
.kiosk-scan__lens,
.kiosk-scan__qr,
.kiosk-scan__tick { animation-duration: 4s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }

.kiosk-scan__phone { animation-name: kiosk-scan-phone; }
@keyframes kiosk-scan-phone {
  0%   { transform: translateX(120px); opacity: 0; }
  20%  { transform: translateX(0); opacity: 1; }
  84%  { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120px); opacity: 0; }
}
.kiosk-scan__beam { opacity: 0; animation-name: kiosk-scan-beam; }
@keyframes kiosk-scan-beam { 0%, 22% { opacity: 0; } 27%, 55% { opacity: 1; } 58%, 100% { opacity: 0; } }

.kiosk-scan__line { animation-name: kiosk-scan-sweep; }
@keyframes kiosk-scan-sweep {
  0%, 23%   { transform: translateY(0); opacity: 0; }
  25%       { opacity: 1; }
  40%       { transform: translateY(44px); }
  55%       { transform: translateY(0); opacity: 1; }
  57%, 100% { transform: translateY(0); opacity: 0; }
}
.kiosk-scan__lens { stroke-width: 4; animation-name: kiosk-scan-lens; }
@keyframes kiosk-scan-lens {
  0%, 22%   { stroke: #e9edf4; }
  27%, 55%  { stroke: #ff4747; }
  58%, 82%  { stroke: #19b36b; }
  90%, 100% { stroke: #e9edf4; }
}
.kiosk-scan__qr { animation-name: kiosk-scan-qr; }
@keyframes kiosk-scan-qr { 0%, 56% { opacity: 1; } 60%, 92% { opacity: 0; } 100% { opacity: 1; } }

.kiosk-scan__tick { stroke-dasharray: 50; animation-name: kiosk-scan-tick; }
@keyframes kiosk-scan-tick {
  0%, 58%   { stroke-dashoffset: 50; opacity: 1; }
  68%, 84%  { stroke-dashoffset: 0; opacity: 1; }
  90%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .kiosk-scan__phone, .kiosk-scan__beam, .kiosk-scan__line,
  .kiosk-scan__lens, .kiosk-scan__qr, .kiosk-scan__tick { animation: none !important; }
  .kiosk-scan__tick { opacity: 0; }
  .kiosk-scan__line { transform: translateY(22px); }
}

.kiosk-actions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* One under another, centred, where the buttons are a short list rather than
   the main choice on the screen. */
.kiosk-actions--stack { grid-template-columns: 1fr; justify-items: center; }
.kiosk-actions--stack .kiosk-btn { width: min(320px, 100%); padding: 18px; }
.kiosk-btn {
  padding: 22px 18px; border-radius: var(--radius-lg); border: 1px solid rgb(255 255 255 / .16);
  background: rgb(255 255 255 / .08); color: #fff; font-size: 17px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer;
  transition: transform .16s var(--ease), background .16s var(--ease);
}
.kiosk-btn:hover { background: rgb(255 255 255 / .16); transform: translateY(-2px); text-decoration: none; }
.kiosk-btn .icon { width: 32px; height: 32px; }
/* The second line of a two-line button. Inline, it ran straight on from the
   first — "Not registered?Add them and print a badge now". */
.kiosk-btn small { display: block; margin-top: 4px; font-weight: 500; font-size: 14px; opacity: .75; }
.kiosk-btn--quiet { background: rgb(255 255 255 / .04); border-style: dashed; }
.kiosk__input {
  font-size: 20px; padding: 16px 18px; text-align: center; border-radius: 14px;
  background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .2); color: #fff; width: 100%;
}
.kiosk__input::placeholder { color: rgb(255 255 255 / .45); }
.kiosk__timer { text-align: center; font-size: 13px; opacity: .55; }
/* The counter's way to hand the machine back. Small and out of the way: it
   is used twice a day, not twice a minute. */
/* The walk-in form borrows the back office's form components, which are
   drawn for a white page. On the kiosk's dark panel their labels came out
   almost black on almost black — unreadable on the one screen somebody is
   filling in while a queue watches. */
.kiosk .field__label { color: #e8edf7; }
.kiosk .field__hint,
.kiosk .field__error { color: rgb(232 237 247 / .72); }
.kiosk .checkbox__text { color: #e8edf7; }
.kiosk .checkbox__text small { color: rgb(232 237 247 / .7); }

.kiosk__leave { text-align: center; }
.kiosk__leave button {
  background: none; border: 0; cursor: pointer;
  color: rgb(255 255 255 / .55); font-size: 12.5px; padding: 6px 10px;
  font-family: inherit;
}
.kiosk__leave button:hover { color: rgb(255 255 255 / .85); text-decoration: underline; }
.kiosk__result { border-radius: var(--radius-lg); padding: 20px; font-size: 18px; }
.kiosk__result--ok { background: rgb(16 185 129 / .18); border: 1px solid rgb(16 185 129 / .4); }
.kiosk__result--repeat { background: rgb(251 191 36 / .16); border: 1px solid rgb(251 191 36 / .4); }
.kiosk__result--error { background: rgb(244 63 94 / .16); border: 1px solid rgb(244 63 94 / .4); }
#kiosk-video { width: 100%; max-width: 460px; border-radius: var(--radius-lg); background: #000; aspect-ratio: 4/3; object-fit: cover; margin: 0 auto; }
.scan-frame { position: relative; }
.scan-frame::after {
  content: ""; position: absolute; inset: 12%; border-radius: 18px;
  border: 3px solid rgb(255 255 255 / .55); box-shadow: 0 0 0 9999px rgb(0 0 0 / .18);
  pointer-events: none;
}
.suggest-list { display: flex; flex-direction: column; gap: 8px; text-align: left; max-height: 46vh; overflow-y: auto; }
.suggest-item {
  padding: 13px 15px; border-radius: 12px; background: rgb(255 255 255 / .07);
  border: 1px solid rgb(255 255 255 / .12); cursor: pointer; display: flex; gap: 12px; align-items: center;
}
.suggest-item:hover { background: rgb(255 255 255 / .15); }
.suggest-item__name { font-weight: 600; }
.suggest-item__meta { font-size: 13px; opacity: .7; }

/* --- Badge print ----------------------------------------------------- */
.badge-sheet {
  position: relative; overflow: hidden;
  width: var(--badge-w, 70mm); height: var(--badge-h, 60mm);
  /* Literal, not tokens: this is ink on card stock. A badge printed from a
     phone in dark mode must not come out white on black. */
  background: #fff; color: #0f172a; margin: 0 auto;
  box-shadow: var(--shadow); border-radius: 4px;
}
/* Every element is placed by the layout, so the stylesheet only says how each
   one behaves inside the box it was given. */
.badge-el {
  position: absolute; display: flex; align-items: center;
  overflow: hidden; line-height: 1.12;
}
.badge-el > span { display: block; max-width: 100%; overflow-wrap: anywhere; }
/* display:flex above would otherwise beat the browser's own [hidden] rule. */
.badge-el[hidden] { display: none !important; }
.badge-el--name { font-weight: 700; }
.badge-el--role { color: #334155; }
.badge-el--org  { color: #475569; }
.badge-el--ref  { color: #64748b; letter-spacing: .04em; }
.badge-el--strip {
  justify-content: center; color: #fff; font-weight: 700; letter-spacing: .08em;
  font-size: calc(var(--badge-h, 60mm) * .048);
}
.badge-el--qr { justify-content: center; }
.badge-el--qr svg { width: 100%; height: 100%; object-fit: contain; display: block; }

.badge-stage { position: relative; display: grid; place-items: center; padding: 30px 0; }

/* --- Badge settings + layout editor ---------------------------------- */
.badge-settings {
  display: grid; gap: 26px;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 420px);
  align-items: start;
}
/* minmax(0, 1fr), not 1fr: a bare 1fr floors the track at its content's
   min-content width, and the long labels in here pushed it past a phone
   screen, giving the whole page a sideways scrollbar. */
@media (max-width: 900px) { .badge-settings { grid-template-columns: minmax(0, 1fr); } }

.badge-editor { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; }
.badge-editor__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge-editor__presets { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.badge-editor__stage {
  display: grid; place-items: center; padding: 18px;
  background: var(--bg-sunken); border: 1px dashed var(--surface-line);
  border-radius: var(--radius); overflow: auto;
}
/* Shown larger than life so elements are comfortable to grab. Zoom scales the
   used box as well as the paint, so the editor's fraction maths still works
   from getBoundingClientRect.

   1.6 is the most it is ever shown at, not the amount: badge-editor.js
   measures the stage and writes --badge-zoom, because a 100mm label at a
   fixed 1.6 is 605px inside a 280px column. Centred, that overflowed on
   both sides at once — so the left edge was cut off and no amount of
   scrolling could reach it, which is what made a change of label size look
   like a bug in the editor. */
.badge-editor__stage .badge-sheet { zoom: var(--badge-zoom, 1.6); }
/* Dotted outlines only while arranging — the badge itself stays clean. */
.badge-el--draggable { cursor: grab; outline: 1px dashed rgb(37 99 235 / .35); outline-offset: 1px; }
/* Elements painted later sit on top, so without this you cannot grab whatever
   is underneath an overlap — which is exactly when you need to. */
.badge-el--draggable:hover, .badge-el--draggable:focus-within { z-index: 5; }
.badge-el--draggable:hover { outline-color: var(--brand); background: rgb(37 99 235 / .06); }
.badge-el--draggable:focus-visible { outline: 2px solid var(--brand); }
.badge-sheet--editing .badge-el--draggable { cursor: grabbing; }
.badge-el__handle {
  /* Inside the box, because .badge-el clips its overflow — a handle hanging
     off the corner is half invisible and half unclickable. */
  position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px;
  border-radius: 3px; background: var(--brand); border: 2px solid #fff;
  cursor: nwse-resize; opacity: .45; transition: opacity .12s var(--ease);
  z-index: 20;   /* always grabbable, even under another element */
}
/* Always visible, just faint — a handle you have to discover by hovering is a
   handle most people never find. */
.badge-el--draggable:hover .badge-el__handle,
.badge-el--draggable:focus-within .badge-el__handle { opacity: 1; }
@media (max-width: 900px) { .badge-editor { position: static; } }



@page { size: var(--badge-w, 70mm) var(--badge-h, 60mm); margin: 0; }

/* --- Rooms and zone access ------------------------------------------- */
.room {
  border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-elevated); overflow: hidden;
}
.room[open] { border-color: color-mix(in srgb, var(--room, var(--brand)) 45%, var(--surface-line)); }
.room__summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; list-style: none; user-select: none;
}
.room__summary::-webkit-details-marker { display: none; }
.room__summary:hover { background: var(--bg-sunken); }
.room__swatch {
  width: 10px; height: 34px; border-radius: 999px; flex: none;
  background: var(--room, var(--brand));
}
.room__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.room__title small { font-size: 11px; letter-spacing: .04em; }
.room__facts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.room__chevron { flex: none; transition: transform .16s var(--ease); opacity: .5; }
.room[open] .room__chevron { transform: rotate(90deg); }
.room__body {
  border-top: 1px solid var(--surface-line); padding: 18px 16px 16px;
  display: flex; flex-direction: column; gap: 18px;
}
.room__rules { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.room__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.room__actions .spacer { flex: 1; }
.room-grants { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.room-grant {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px;
  padding: 8px 10px; border: 1px solid var(--surface-line); border-radius: 10px; background: var(--bg-sunken);
}
.room-grant:hover { border-color: var(--brand); }
.room-grant__dot { width: 10px; height: 10px; border-radius: 999px; flex: none; }
.room-grant:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.input--colour { padding: 4px; height: 40px; cursor: pointer; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 6px; vertical-align: baseline; }

/* --- Room door screen ------------------------------------------------- */
/* Read at arm's length by someone holding a door open: one colour, one word. */
.door { width: min(760px, 100%); }
.door__head { display: flex; align-items: center; gap: 18px; text-align: left; }
.door__head h1 { margin: 0; }
.door__count {
  margin-left: auto; text-align: center; padding: 10px 18px; border-radius: 14px;
  background: rgb(255 255 255 / .09); border: 1px solid rgb(255 255 255 / .16); flex: none;
}
.door__count--full { background: rgb(244 63 94 / .22); border-color: rgb(244 63 94 / .5); }
.door__count-value { display: block; font-size: 30px; font-weight: 700; line-height: 1; }
.door__count-label { font-size: 12px; opacity: .7; }
.door__direction { display: flex; gap: 8px; justify-content: center; }
.door__dir {
  flex: 1; max-width: 220px; padding: 12px 16px; border-radius: 12px; cursor: pointer;
  background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .16);
  color: #fff; font-size: 16px; font-weight: 600;
}
.door__dir.is-on { background: rgb(96 165 250 / .3); border-color: rgb(96 165 250 / .6); }
.door--out .door__dir.is-on { background: rgb(251 191 36 / .28); border-color: rgb(251 191 36 / .6); }
.scan-frame--door #kiosk-video { max-width: 100%; aspect-ratio: 16/10; }
/* The verdict covers the camera entirely — nobody should have to work out
   which half of the screen answers the question. */
.door__verdict {
  position: absolute; inset: 0; border-radius: var(--radius-lg); z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 20px; text-align: center; color: #fff;
  animation: door-in .18s var(--ease);
}
.door__verdict--ok { background: #047857; }
.door__verdict--no { background: #9f1239; }
.door__mark { font-size: clamp(40px, 9vw, 68px); line-height: 1; font-weight: 700; }
.door__headline { font-size: clamp(20px, 4vw, 30px); letter-spacing: -0.02em; }
.door__who { font-size: clamp(18px, 3.4vw, 26px); font-weight: 650; }
.door__meta { font-size: 15px; opacity: .85; }
.door__reason { font-size: clamp(15px, 2.6vw, 19px); opacity: .95; margin-top: 6px; }
@keyframes door-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.door__log { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13px; }
.door__log-row {
  display: flex; gap: 10px; align-items: baseline; padding: 7px 11px;
  border-radius: 9px; background: rgb(255 255 255 / .06); border-left: 3px solid transparent;
}
.door__log-row--ok { border-left-color: #10b981; }
.door__log-row--no { border-left-color: #f43f5e; }
.door__log-name { font-weight: 600; }
.door__log-meta { margin-left: auto; opacity: .65; }
.door__swatch { width: 14px; height: 14px; border-radius: 999px; display: inline-block; }

/* --- Branding image slots --------------------------------------------- */
.brand-slot {
  display: grid; grid-template-columns: 168px 1fr; gap: 16px; align-items: start;
  padding: 14px; border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-sunken);
}
.brand-slot__preview {
  aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-elevated);
  border: 1px solid var(--surface-line);
}
.brand-slot__preview img { width: 100%; height: 100%; object-fit: contain; }
/* A chequerboard, so a transparent logo reads as transparent rather than white. */
.brand-slot__preview--checker {
  background-image:
    linear-gradient(45deg, var(--bg-sunken) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-sunken) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-sunken) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-sunken) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.brand-slot__empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-subtle); font-size: 12px;
}
.brand-slot__empty .icon { width: 22px; height: 22px; }
.brand-slot__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.brand-slot__specs { display: flex; flex-wrap: wrap; gap: 6px; }
.brand-slot__specs .chip { cursor: default; font-size: 11px; padding: 3px 8px; }
.brand-slot__specs .chip:hover { border-color: var(--surface-line); color: inherit; }
.chip--muted { color: var(--text-subtle); }
/* A row of chips used as tabs — which set of questions is being edited. */
.picker-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.brand-slot .icon { vertical-align: -2px; }
@media (max-width: 640px) {
  .brand-slot { grid-template-columns: 1fr; }
  .brand-slot__preview { max-width: 220px; }
}

/* --- Live preview panel ------------------------------------------------ */
/*
 * The preview should use whatever height the screen has left rather than a
 * fixed box — on a tall monitor a fixed height leaves a dead gap beneath it,
 * and on a laptop it runs off the bottom.
 *
 * The card sticks under the header and is exactly as tall as the space below
 * it; the iframe is the flexible row inside, so head and foot keep their own
 * height and everything left over goes to the page being previewed.
 */
.preview-panel {
  position: sticky;
  /* Under the top bar, and under the save bar as well while that is on
     screen. --save-bar-h is published by the save bar itself, because its
     height depends on its own text and because it comes and goes exactly
     when somebody is editing — which is when this pane is being watched. */
  top: calc(var(--header-h) + var(--save-bar-h, 0px) + 20px);
  height: calc(100dvh - var(--header-h) - var(--save-bar-h, 0px) - 40px);
  /* Below this the preview is too short to tell you anything, so let the page
     scroll instead of squashing it. */
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* The card fills the panel rather than shrinking to its contents: the panel
   is the thing that knows how tall a preview should be. */
.preview-panel > .card {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}
.preview-panel .card__head,
.preview-panel .card__foot { flex: none; }
/* min-height:0 lets a flex child actually shrink — without it the iframe keeps
   its intrinsic height and pushes the footer off the bottom. */
.preview-panel__body { flex: 1 1 auto; min-height: 0; padding: 0; }
.preview-panel__body iframe {
  display: block; width: 100%; height: 100%; border: 0; background: var(--bg);
}

/* Stacked layout: nothing to stick to, and the viewport is the whole column. */
@media (max-width: 1080px) {
  .preview-panel { position: static; height: min(72dvh, 720px); }
}
/* A short window — a laptop with the taskbar and a docked console open — is
   better served by scrolling than by a two-inch preview. */
@media (max-height: 560px) {
  .preview-panel { position: static; height: 460px; }
}

/* --- Ticket price ------------------------------------------------------ */
/*
 * A form reached by its own private link names itself. Quiet by design: it
 * tells somebody they are in the right place without competing with the
 * event's own title above it.
 */
/* The card that says something is wrong. Bordered in the warning colour so
   it reads as a problem before a word of it is read. */
.card--alert { border-color: color-mix(in srgb, var(--warn) 45%, var(--surface-line)); }

.form-intro { display: grid; gap: 4px; margin-bottom: 4px; }
.form-intro .eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--brand); display: block;
}
.form-intro p { margin: 0; }

.price-banner {
  border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-sunken); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.price-banner__label { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); }
.price-banner__amount { font-size: clamp(1.35rem, 3vw, 1.75rem); letter-spacing: -0.02em; }
.pay-summary {
  display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 16px; border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-sunken); flex-wrap: wrap;
}
.pay-summary strong { display: block; font-size: 17px; }
.pay-summary__label { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); }
.pay-summary__price { text-align: right; }
.pay-summary__price strong { font-size: clamp(1.2rem, 2.6vw, 1.5rem); }

/*
 * A group order's tickets. Numbered because the page is a checklist: the
 * buyer is working down a list of seats they have already paid for, and the
 * number is how they keep their place in it.
 */
/* minmax(0, 1fr), not the implicit `auto`. A grid column sized `auto` is as
   wide as its widest content, and the content here is a ticket name of sixty
   characters set `nowrap` — so the rows grew past the card and took the Edit
   button with them, off the right-hand edge. */
.order-tickets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.order-tickets__row {
  /* The same reason, one level down: a flex/grid item will not shrink below
     its content unless it is told it may. */
  min-width: 0;
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--surface-line);
  border-radius: var(--radius); background: var(--bg-elevated);
}
/* Edit and Ticket, side by side and never squeezed. flex:none keeps them at
   their own width; the name and the ticket type beside them give way, which
   is right — a ticket type can be sixty characters long and the buttons are
   the part that has to stay reachable. */
.order-tickets__do { display: flex; gap: 6px; flex: none; }

/* The buyer's own details, at the foot of their order. Quiet on purpose: it
   is a line of confirmation nearly every time it is read, and a way in on the
   rare occasion it is wrong. min-width:0 for the same reason as above — an
   address long enough to need it is an ordinary address. */
.order-buyer {
  display: flex; gap: 12px; align-items: center;
  margin-top: 22px; padding: 12px 14px;
  border: 1px solid var(--surface-line); border-radius: var(--radius);
  background: var(--bg-sunken);
}
.order-buyer__who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.order-buyer__who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-buyer > .btn { flex: none; }
.order-tickets__n {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-sunken); color: var(--text-muted);
  font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.order-tickets__who { flex: 1 1 auto; min-width: 0; }
.order-tickets__who strong { display: block; font-size: 15px; }
.order-tickets__who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* On a narrow card the two buttons drop under the name rather than off the
   edge of it. */
@media (max-width: 620px) {
  .order-tickets__row { flex-wrap: wrap; }
  .order-tickets__who { flex: 1 1 100%; order: 2; }
  .order-tickets__do { order: 3; width: 100%; justify-content: flex-end; }
}
.order-next { margin: 4px 0 0; font-size: 15px; }
/* Handing one seat out of an order ---------------------------------------
   The link is long and nobody reads it; it is there to be copied. So it is
   allowed to wrap rather than stretching the row, and the button that copies
   it sits beside it at a size a thumb can find. */
.order-invites__list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.order-invites__row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--surface-line); border-radius: var(--radius);
  background: var(--bg-sunken);
}
.order-invites__link { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.order-invites__link code { font-size: 12px; word-break: break-all; color: var(--text-muted); }
@media (max-width: 560px) {
  .order-invites__row { flex-direction: column; align-items: stretch; }
}
.order-next__type { color: var(--brand-strong); }

/* A summary card that would otherwise run to twenty rows. Native <details>,
   so it works with no JavaScript, keeps its state while the page is open and
   is reachable from a keyboard without anything being wired up. The marker is
   replaced by a caret that turns, because the default triangle sits on the
   baseline and looks like a bullet rather than a control. */
.foldout { border-top: 1px solid var(--surface-line); padding-top: 10px; }
.foldout__more {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--brand-strong); user-select: none;
}
.foldout__more::-webkit-details-marker { display: none; }
.foldout__more::before {
  content: ''; width: 7px; height: 7px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .15s ease;
}
.foldout[open] > .foldout__more::before { transform: rotate(-135deg) translate(-2px, -2px); }
.foldout__more:hover { color: var(--brand); }
.foldout__more:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .foldout__more::before { transition: none; } }
/* Order rows across a wide card. Three up on a desktop, so six of them are
   two rows rather than six, and one per line once there is no longer room
   for a name and a count side by side. */
.order-grid { display: grid; gap: 10px 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .order-grid { grid-template-columns: minmax(0, 1fr); } }

.foldout__open { display: none; }
.foldout[open] > .foldout__more > .foldout__shut { display: none; }
.foldout[open] > .foldout__more > .foldout__open { display: inline; }
/* What a mixed order actually contains, when it contains more than one kind. */
.order-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.order-lines li { display: flex; justify-content: space-between; gap: 12px; }

/* --- Ticket types, in the back office --------------------------------- */
/*
 * One row per kind, laid out as a table on a wide screen and as a stack of
 * labelled fields on a narrow one. Every cell keeps its label either way: an
 * organiser setting a sale window at 11pm the night before should never have
 * to count columns to work out which date box is which.
 */
.type-rows { display: flex; flex-direction: column; gap: 10px; }
/* A rate, shut: one line. Open: the form it always was. */
.type-row {
  border: 1px solid var(--surface-line); border-radius: var(--radius); background: var(--bg-sunken);
}
.type-row[open] { background: var(--bg-elevated); box-shadow: var(--shadow-sm); }

.type-row__summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; list-style: none;
  border-radius: var(--radius);
}
.type-row__summary::-webkit-details-marker { display: none; }
.type-row__summary:hover { background: var(--bg-sunken); }
.type-row__summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.type-row__chevron { display: inline-flex; color: var(--text-subtle); }
.type-row__chevron .icon { width: 15px; height: 15px; transition: transform .16s var(--ease); }
.type-row[open] .type-row__chevron .icon { transform: rotate(90deg); }
.type-row__title { font-weight: 600; font-size: 14.5px; min-width: 0; }
/* The facts you came to check, without opening anything: what it costs,
   what is left of it, and whether it is actually selling. */
.type-row__meta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.type-row__price-tag { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 13.5px; }

/* The form. The grid that was fighting for one screen's width now has the
   row to itself, so the columns are wide enough to read: "Whatever they
   choose" used to arrive as "Whatever they choos". */
/* The form. Nine fixed columns used to be declared here and the first of
   them — the name — was the one that gave way: their widths added up to
   more than the card, so the only flexible column collapsed and the name
   box arrived one character wide. A media query could not save it either,
   because the thing that is too narrow is the card, not the window.

   auto-fit works it out instead: as many 150px columns as fit, sharing
   what is left over. No breakpoints, and nothing to get wrong again when a
   tenth field is added. */
.type-row__body {
  display: grid; gap: 10px 12px; align-items: start;
  padding: 2px 14px 14px;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}
/* The name earns two: it holds a name and the line shown under it. */
.type-row__name { grid-column: span 2; }
@media (max-width: 640px) { .type-row__name { grid-column: auto; } }
/* The switch and the delete button, at the end of whatever row they land
   on: the columns are worked out by the browser now, so pinning them to a
   numbered one would only put them where a field should be. */
/* Kept for anything still drawing the old block; the switch and the delete
   button are on the summary line now. */
.type-row__actions { grid-column: -2 / -1; }

/* On the summary: a quiet control, not a field. */
.type-row__switch { margin: 0; }
.type-row__switch .checkbox__text { font-size: 13px; color: var(--text-muted); }
/* The attendee type is a sentence, not a number — one column cuts it to
   "Whatever they cho". */
.type-row__category { grid-column: span 2; }
@media (max-width: 640px) { .type-row__category { grid-column: auto; } }
/* The second line of the name cell, labelled but quietly. */
.field__label--sub { margin-top: 8px; font-weight: 500; color: var(--text-subtle); }
/* The two controls with no label of their own sit level with the inputs
   beside them, not with the labels above them. */
.type-row__licence, .type-row__actions { padding-top: 21px; }
.type-row__licence .field__hint { display: block; margin-top: 4px; }
/* When the code goes out. Two columns' worth, because its answers are
   sentences ("A few days after the event") and in one column the control
   shows about three words of them. Hidden until the rate actually sells a
   code — asking when something will be sent that is not being sold is a
   question with no right answer. */
.type-row__release { grid-column: span 2; }
.type-row__release .field__hint { display: block; margin-top: 4px; max-width: 44ch; }
.type-row__release-when .field__hint { display: block; margin-top: 4px; }
@media (max-width: 760px) { .type-row__release { grid-column: auto; } }
.type-row__desc { margin-top: 6px; font-size: 13px; }
/* Which forms carry this ticket: a strip across the bottom of the row, because
   a ticket nobody sells is invisible and the row has to say so. */
.type-row__forms {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  border-top: 1px dashed var(--surface-line); padding-top: 10px;
}
/* And which questions it brings with it: the same kind of statement about
   the ticket as a whole, so the same kind of strip. */
.type-row__questions {
  grid-column: 1 / -1; display: flex; flex-flow: row wrap; gap: 6px 10px; align-items: center;
  border-top: 1px dashed var(--surface-line); padding-top: 10px;
}
.type-row__questions .field__label { margin: 0 4px 0 0; }
.type-row__questions .select { width: auto; min-width: 190px; }
.type-row__questions .field__hint { flex: 1 1 240px; margin: 0; }
/* Pushes the "customize" button to the far end of the strip it shares. */
.type-row__questions .push { margin-left: auto; flex: 0 0 auto; }
.type-row__forms .field__label { margin: 0 4px 0 0; }
.type-row__forms .checkbox--inline { margin: 0; }
.type-row__actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
/* Where the rate is sold: a strip of its own, because for a link-only one it
   carries an address somebody has to copy, and an address squeezed into a
   grid column is an address nobody can read. */
/* A strip, but a flat one: for a rate sold on the page it is a label and a
   dropdown, and giving those a line each wasted thirty pixels on every
   ticket. The address and its controls wrap underneath when there is one. */
.type-row__where {
  grid-column: 1 / -1; border-top: 1px dashed var(--surface-line); padding-top: 10px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}
.type-row__where > .field { flex: 1 1 100%; margin: 0; }
.type-row__where .field__label { margin: 0 4px 0 0; }
.type-row__where > .select { width: auto; min-width: 280px; max-width: 100%; }
.type-row__where .checkbox--inline { margin: 0; }
.type-row input[type="datetime-local"] { font-size: 13px; }

/* --- Working on many rows at once ------------------------------------- */
/*
 * The bar appears only once something is ticked, so the ordinary case — a
 * list you are reading — is not carrying a row of destructive buttons.
 */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--surface-line);
  background: var(--brand-soft);
}
.bulk-bar__count { font-size: 14px; }
.bulk-bar__count strong { font-variant-numeric: tabular-nums; }
.table__tick { width: 34px; padding-right: 0 !important; }
.table__tick input { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
tr:has(.table__tick input:checked) { background: var(--brand-soft); }
/* Nine columns need more room than eight did, so the stack happens sooner —
   below this the row is unreadable rather than merely tight. */
@media (max-width: 1280px) {
  .type-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-row__name { grid-column: 1 / -1; }
  .type-row__licence { padding-top: 0; }
  .type-row__actions { grid-column: 1 / -1; flex-direction: row; padding-top: 0; justify-content: space-between; }
}

/* --- Ticket types on the public page ---------------------------------- */
/*
 * A price list you fill in. Name on the left, price, quantity on the right —
 * a row you can read across in one pass, and which stacks on a phone without
 * the quantity box ending up somewhere surprising.
 */
.tickets { display: flex; flex-direction: column; gap: 10px; }
.ticket {
  display: flex; align-items: center; gap: 14px; padding: 15px 17px;
  border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
  /* The accent runs down the edge of the one that is chosen. A tint alone
     was doing the whole job, and on a pale brand colour it was not doing
     it: the row looked no different from the one above it. */
  position: relative; overflow: hidden;
}
.ticket::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--brand); opacity: 0; transition: opacity .16s var(--ease);
}
.ticket.is-chosen, .ticket--choice:has(input:checked) { box-shadow: var(--shadow-sm); }
.ticket.is-chosen::before, .ticket--choice:has(input:checked)::before { opacity: 1; }
.ticket.is-chosen { border-color: var(--brand); background: var(--brand-soft); }
.ticket__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ticket__name { font-size: 15.5px; font-weight: 650; }
.ticket__note { font-size: 13px; color: var(--text-muted); }
.ticket__left { font-size: 12.5px; color: var(--warn); font-weight: 600; }
/* The price is the number somebody is scanning the list for, so it is the
   one thing on the row set larger than the body text. */
.ticket__price {
  font-size: 17px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: -0.015em;
}
.ticket__qty { flex: none; width: 82px; }
.ticket__limit { display: block; margin-top: 4px; font-size: 12px; color: var(--warn); text-align: center; }
.ticket__qty .input { text-align: center; padding-left: 8px; padding-right: 8px; }
/* Sold out and not-yet-open tiers stay on the page — their absence would read
   as a mistake to somebody who was sent a link to one — but they are plainly
   not for sale. */
/* The same row, as a choice rather than a quantity. The radio itself is not
   drawn — the whole row is the control, and the chosen one is tinted the way
   every other selected card in this application is. */
.ticket--choice { cursor: pointer; }
.ticket--choice input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ticket__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ticket__desc { font-size: 13px; color: var(--text-muted); }
.ticket--choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ticket--choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

.ticket--closed { background: var(--bg-sunken); opacity: .7; }
.ticket--closed .ticket__price { font-weight: 550; text-decoration: line-through; }
@media (max-width: 520px) {
  .ticket { flex-wrap: wrap; }
  .ticket__text { flex: 1 1 100%; }
}

/* --- Picker: a list where one row is the thing being edited ----------- */
/*
 * Used by the booths screen. The selected row is marked with a bar rather than
 * a fill, so the eye finds it without the list turning into a block of colour,
 * and the state survives a reload because the row is a real link.
 */
.picker { display: flex; flex-direction: column; }
.picker__label {
  padding: 10px 16px 6px; font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-subtle); font-weight: 650;
  border-top: 1px solid var(--surface-line);
}
.picker__row {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-top: 1px solid var(--surface-line); color: inherit;
  border-left: 3px solid transparent; transition: background .12s var(--ease);
}
/* A row is a link, but it reads as a list item: no underline, in any state.
   The selected bar and the background are what mark it. */
.picker__row,
.picker__row:hover,
.picker__row:focus,
.picker__row:focus-visible { text-decoration: none; }
.picker__row:first-child { border-top: 0; }
.picker__row:hover { background: var(--bg-sunken); }
.picker__row.is-selected { background: var(--bg-sunken); border-left-color: var(--brand); }
/* The row a table is currently narrowed to. */
.table tr.is-selected > td { background: var(--brand-soft); }
.picker__text { flex: 1 1 auto; min-width: 0; }
.picker__text strong { display: block; font-size: 14.5px; font-weight: 600; }
.picker__text small {
  display: block; font-size: 12.5px; color: var(--text-subtle);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/*
 * Only the selected booth's panel is on screen. Class-based rather than the
 * `hidden` attribute: an author `display:` rule beats the browser's own
 * [hidden] rule, and this application has lost an afternoon to that twice.
 */
/* Only the row being worked on is open. Author `display` rather than
   [hidden], which an author rule would beat anyway. */
.picker-panel,
.booth-panel { display: none; }
.picker-panel.is-active,
.booth-panel.is-active { display: block; }
.booth--off { opacity: .62; }

/* --- Landing page ------------------------------------------------------ */
/*
 * A full marketing page: dark hero with oversized type, then alternating
 * bands down to the form. Every colour here derives from --brand, the accent
 * the organiser already chose in Appearance, so the page is theirs rather
 * than a second palette bolted on.
 */
.public-shell--bare { --lp-ink: #f8fafc; --lp-ink-soft: rgb(248 250 252 / .72); }
.public-shell--bare .public-foot { color: var(--lp-ink-soft); opacity: 1; }
/* No page-wide scrim: each band owns its own background. */
.public-shell--bare::before { content: none; }

.lp-wrap { width: min(1140px, 100%); margin: 0 auto; padding: 0 22px; }
.lp-wrap--narrow { width: min(760px, 100%); }

.lp-hero {
  position: relative; color: var(--lp-ink);
  padding: clamp(56px, 9vw, 118px) 0 clamp(52px, 8vw, 96px);
  background:
    radial-gradient(ellipse 80% 60% at 12% -20%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 62%),
    linear-gradient(165deg, color-mix(in srgb, var(--brand) 26%, #0b1120), #0b1120 68%);
  overflow: hidden;
}
/* The event's own hero image, if there is one, sits under the gradient. */
.lp-hero--image::after {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .34;
  background-image: var(--lp-hero-image);
  background-size: cover; background-position: center;
  mix-blend-mode: luminosity;
}
.lp-hero__inner { position: relative; z-index: 1; width: min(1140px, 100%); margin: 0 auto; padding: 0 22px; }
.lp-hero__logo { max-height: 58px; max-width: min(100%, 380px); object-fit: contain; margin-bottom: 26px; display: block; }

.lp-eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--brand) 60%, #ffffff);
}
/* The headline is the page. Uppercase, tight, and as large as the viewport
   will carry without wrapping into confetti. */
.lp-hero__headline {
  font-size: clamp(2.3rem, 6.6vw, 4.6rem);
  line-height: .98; letter-spacing: -0.035em; text-transform: uppercase;
  font-weight: 800; max-width: 16ch; margin: 0;
  text-wrap: balance;
}
.lp-hero__lede {
  margin-top: 20px; max-width: 54ch;
  font-size: clamp(1.02rem, 1.7vw, 1.28rem); line-height: 1.5; color: var(--lp-ink-soft);
}
.lp-hero__meta {
  margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-size: 15px; color: var(--lp-ink-soft);
}
.lp-hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.lp-hero__meta .icon { width: 18px; height: 18px; opacity: .8; }

.lp-cta {
  margin-top: 32px; display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 26px; border-radius: 6px; font-size: 16.5px; font-weight: 700;
  letter-spacing: .01em; background: var(--brand); color: var(--brand-contrast, #fff);
  transition: transform .16s var(--ease), filter .16s var(--ease);
}
.lp-cta:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.08); }
.lp-cta .icon { width: 18px; height: 18px; }

.lp-hero__video {
  margin-top: 42px; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 9; background: #000; box-shadow: var(--shadow-lg);
  max-width: 880px;
}
.lp-hero__video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- Bands ------------------------------------------------------------- */
.lp-section { padding: clamp(48px, 7vw, 86px) 0; background: var(--bg-elevated); color: var(--text); }
.lp-section--muted { background: var(--bg-sunken); }
.lp-section--accent {
  background: var(--brand); color: var(--brand-contrast, #fff);
}
.lp-section--register { background: var(--bg-sunken); }
.lp-section__head { max-width: 62ch; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.lp-section__head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); letter-spacing: -0.03em;
  text-transform: uppercase; font-weight: 800; line-height: 1.05;
  text-wrap: balance;
}
.lp-section__head p { margin-top: 12px; color: var(--text-muted); font-size: 16.5px; line-height: 1.55; }
.lp-section--accent .lp-section__head p { color: inherit; opacity: .85; }

/* --- Numbers ----------------------------------------------------------- */
.lp-stats { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.lp-stat__value {
  display: block; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1;
}
.lp-stat__label { display: block; margin-top: 8px; font-size: 14px; opacity: .82; letter-spacing: .03em; }

/* --- Why attend -------------------------------------------------------- */
.lp-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.lp-card {
  border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-elevated); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.lp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lp-card__media { aspect-ratio: 16 / 10; background: var(--bg-sunken); }
.lp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-card__body { padding: 22px; display: flex; flex-direction: column; gap: 9px; }
.lp-card__body h3 { font-size: 1.15rem; letter-spacing: -0.015em; }
.lp-card__body p { color: var(--text-muted); font-size: 15px; line-height: 1.55; }
/* A four-across row of text-only cards gets a rule in the brand colour so it
   does not read as a plain list. */
.lp-card:not(:has(.lp-card__media)) { border-top: 3px solid var(--brand); }

/* --- Speakers ---------------------------------------------------------- */
.lp-speakers { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.lp-speaker { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.lp-speaker__portrait {
  aspect-ratio: 1; border-radius: 999px; overflow: hidden; margin: 0 auto 10px;
  width: min(100%, 168px); background: var(--brand-soft);
  display: grid; place-items: center;
  border: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
}
.lp-speaker__portrait img { width: 100%; height: 100%; object-fit: cover; }
.lp-speaker__portrait span { font-size: 2rem; font-weight: 700; color: var(--brand); letter-spacing: -0.02em; }
.lp-speaker h3 { font-size: 1.05rem; letter-spacing: -0.015em; }
.lp-speaker__role { font-size: 13.5px; color: var(--brand); font-weight: 600; }
.lp-speaker__bio { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

/* --- Quotes ------------------------------------------------------------ */
.lp-quotes { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.lp-quote {
  margin: 0; padding: 26px; border-radius: var(--radius-lg);
  background: var(--bg-sunken); border: 1px solid var(--surface-line);
  display: flex; flex-direction: column; gap: 18px;
}
.lp-quote blockquote {
  margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--text);
}
.lp-quote blockquote::before { content: "\201C"; color: var(--brand); font-size: 2.4rem; line-height: 0; vertical-align: -0.35em; margin-right: 2px; }
.lp-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.lp-quote figcaption img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; flex: none; }
.lp-quote figcaption strong { display: block; font-size: 14.5px; }
.lp-quote figcaption small { display: block; font-size: 13px; color: var(--text-muted); }

/* --- Questions --------------------------------------------------------- */
.lp-faq { display: flex; flex-direction: column; gap: 10px; }
/* Sets its own colour, not just its own background. Dropped into a layout
   whose column inherits light-on-dark — Split's pitch column does — an item
   that only sets a background renders white text on white. */
.lp-faq__item { border: 1px solid var(--surface-line); border-radius: var(--radius); background: var(--bg-elevated); color: var(--text); }
.lp-faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; cursor: pointer; font-weight: 620; list-style: none;
}
.lp-faq__item summary::-webkit-details-marker { display: none; }
.lp-faq__item summary .icon { flex: none; transition: transform .16s var(--ease); opacity: .5; }
.lp-faq__item[open] summary .icon { transform: rotate(90deg); }
.lp-faq__item[open] { border-color: color-mix(in srgb, var(--brand) 45%, var(--surface-line)); }
.lp-faq__answer { padding: 0 18px 17px; color: var(--text-muted); line-height: 1.6; }

/* --- The form at the end ----------------------------------------------- */
.lp-section--register .public-card { max-width: none; }

@media (max-width: 640px) {
  .lp-hero__headline { max-width: none; }
  .lp-speakers { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* --- Landing page editor ----------------------------------------------- */
.layout-choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/*
 * A card you choose between. The selected one has to be obvious at a glance
 * and from across a desk, so three things change together — the border
 * thickens, the surface tints, and a tick appears — rather than resting on a
 * 16px radio dot that a tired eye reads either way round.
 */
.layout-option {
  position: relative;
  display: flex; align-items: flex-start; gap: 11px; padding: 14px 38px 14px 14px;
  cursor: pointer; border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-sunken);
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.layout-option:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--surface-line)); }
.layout-option:has(input:focus-visible) { box-shadow: var(--ring); }
.layout-option:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
  /* An inset ring rather than a 2px border: a thicker border would move the
     text by a pixel every time the choice changed. */
  box-shadow: inset 0 0 0 1px var(--brand);
}
/* A style's whole proposition in one tile: its paper, its ink, and the
   shape of its corners. Cheaper to read than the sentence beside it, and
   the only part of the chooser that shows a dark style as dark. */
/* The preview pane telling you something is wrong with the deploy rather
   than with your change. Amber, not red: nothing is broken, it is just not
   listening yet. */
.is-warning { color: var(--warn); font-weight: 600; }

.style-swatch {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  border: 1px solid rgb(0 0 0 / .12);
}
.layout-option--style:has(input[value="editorial"]) .style-swatch { border-radius: 3px; font-family: ui-serif, Georgia, serif; }
.layout-option--style:has(input[value="corporate"]) .style-swatch { border-radius: 4px; }
.layout-option--style:has(input[value="vivid"]) .style-swatch { border-radius: 14px; }
.layout-option--style:has(input[value="spotlight"]) .style-swatch { border-color: rgb(255 255 255 / .18); }

/* The tick. Drawn with a border rather than a glyph so it stays crisp and
   needs no icon font. */
.layout-option:has(input:checked)::after {
  content: ""; position: absolute; top: 15px; right: 14px;
  width: 14px; height: 8px; border-left: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg);
  border-radius: 1px;
}
.layout-option input { margin-top: 2px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.layout-option__body { display: flex; flex-direction: column; gap: 3px; }
.layout-option__body strong { font-weight: 650; }
.layout-option:has(input:checked) .layout-option__body strong { color: var(--brand-strong); }
.layout-option__body small { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; }

.section-item {
  display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 120px auto;
  padding: 14px; border: 1px solid var(--surface-line); border-radius: var(--radius);
  background: var(--bg-sunken);
}
.section-item .col-span-2 { grid-column: span 2; }
.section-item__image { grid-column: 3; }
.section-item__image img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px;
  margin-bottom: 6px; background: var(--bg-elevated);
}
.section-item__image .input { padding: 6px; font-size: 11px; }
.section-item__remove { grid-column: 4; align-self: center; }
@media (max-width: 860px) {
  .section-item { grid-template-columns: minmax(0, 1fr) auto; }
  .section-item .col-span-2, .section-item__image { grid-column: 1; }
  .section-item__remove { grid-column: 2; align-self: start; }
}

/* --- Per-event Stripe account ------------------------------------------ */
/* Price on the left, which account it lands in on the right. Below 1080px
   they stack, because the webhook URL alone wants ~460px to stay legible. */
.pay-grid {
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
}
.pay-grid__pane { min-width: 0; }
@media (max-width: 1080px) { .pay-grid { grid-template-columns: 1fr; } }

.stripe-account {
  border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-sunken); padding: 16px; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
  /* A fieldset's default min-width is min-content and it ignores the track
     it was given, so without this it breaks out of the card on a narrow
     column instead of wrapping inside it. */
  min-width: 0;
}
.stripe-account legend { padding: 0 6px; }
.stripe-account code { font-size: 12.5px; overflow-wrap: anywhere; }
.stripe-account__current { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* The endpoint address gets its own row: it is long, it is copied rather than
   read, and threading it through a sentence made both hard to follow. */
.stripe-account__endpoint {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-elevated); border: 1px solid var(--surface-line);
  border-radius: 10px; padding: 8px 10px; margin: 2px 0;
}
.stripe-account__endpoint code { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }

.stripe-account__result { padding: 11px 13px; border-radius: 10px; font-size: 14px; }
.stripe-account__result--ok { background: var(--ok-soft); color: var(--ok); }
.stripe-account__result--error { background: var(--danger-soft); color: var(--danger); }
/* The same shape as the Stripe answer, because it answers the same kind of
   question: has this been set up properly somewhere else. */
.sender__result { padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; max-width: 62ch; }
.sender__result--ok { background: var(--ok-soft); color: var(--ok); }
.sender__result--error { background: var(--warn-soft); color: var(--warn); }

/* --- Something only the system team can do ----------------------------
   Two readers. The operator sees the instruction and nothing else; anybody
   else sees what it means for their event and a button. Same block, so a
   screen only has to say where the note goes. */
.operator-note {
  background: var(--warn-soft); color: var(--warn);
  border-radius: 10px; padding: 11px 13px; font-size: 13.5px; line-height: 1.5;
  max-width: 64ch; display: flex; flex-direction: column; gap: 9px;
}
.operator-note--self { display: block; }
.operator-note__says { margin: 0; }
.operator-note__state { font-size: 12.5px; opacity: .85; }

/* --- The requests queue ------------------------------------------------ */
.request {
  border: 1px solid var(--surface-line); border-radius: var(--radius);
  padding: 13px 15px; display: flex; flex-direction: column; gap: 8px;
}
.request--settled { opacity: .72; }
.request__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request__title { margin: 0; font-size: 15px; font-weight: 700; }
.request__meta { margin: 3px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
/* The instruction, set apart: it is the only line on the row that is an
   order rather than a description. */
.request__todo {
  margin: 0; font-size: 13.5px; line-height: 1.5;
  background: var(--bg-sunken); border-radius: 9px; padding: 9px 11px;
}
.request__detail { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; overflow-wrap: anywhere; }
.request__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.request__actions .input { flex: 1 1 240px; min-width: 0; }

@media print {
  /* These rules apply only to the badge document, which carries .is-badge on
     its <html>. They used to apply everywhere, and "hide everything that is
     not a badge" on a page with no badge on it is a blank sheet of paper —
     which is what a label printer produced whenever the kiosk had moved on to
     the next screen before the job reached it. Any other page now prints
     itself. */
  /* The page is exactly one label. Anything that is not the badge has to leave
     the layout completely — hiding it with `visibility` keeps its box, and a
     box taller than the label pushes the badge onto a second one. */
  html.is-badge, html.is-badge body {
    width: var(--badge-w, 70mm); height: var(--badge-h, 60mm);
    margin: 0; padding: 0; overflow: hidden; background: #fff;
  }
  html.is-badge body > *:not(.badge-sheet):not(.badge-print-stage) { display: none !important; }
  html.is-badge .badge-print-stage {
    display: contents !important;   /* the wrapper stops generating a box */
  }
  .badge-sheet {
    position: static; margin: 0; box-shadow: none; border-radius: 0;
    width: var(--badge-w, 70mm); height: var(--badge-h, 60mm);
    break-inside: avoid; page-break-inside: avoid;
  }
  .no-print { display: none !important; }
  /* Editor chrome is for arranging, never for the label. */
  .badge-el--draggable { outline: 0 !important; background: none !important; }
  .badge-el__handle { display: none !important; }
}

/* --- Utilities ------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--sm { gap: 8px; }
.stack--lg { gap: 22px; }
fieldset { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --- The days an event runs ------------------------------------------
   Four boxes and a bin, on one line while there is room for one. The
   date is given the space because it is the field that is read; the two
   times are narrow because they are usually empty, meaning "the usual
   hours", and a wide empty box reads as something left undone. */
.day-rows { display: flex; flex-direction: column; gap: 8px; }
.day-row {
  display: grid; gap: 8px; align-items: center;
  /* The times are wide enough for "11:00 PM": a 12-hour locale renders
     an am/pm field inside the box, and at 104px it was clipped. */
  grid-template-columns: minmax(140px, 1.1fr) 128px 128px minmax(120px, 1.4fr) auto;
}
.day-row .input { min-width: 0; }
.day-rows:empty { display: none; }
/* Column names, so the two time boxes do not have to be guessed at. They
   belong to the grid so they cannot drift out of line with it. */
.day-row--head {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
}
.day-rows:empty + .day-row--head, .day-row--head:last-child { display: none; }
@media (max-width: 760px) {
  /* The date keeps a line of its own; the two times share the next. */
  .day-row { grid-template-columns: 1fr 1fr auto; }
  .day-row > :nth-child(1) { grid-column: 1 / -1; }
  .day-row > :nth-child(4) { grid-column: 1 / 3; }
  .day-row--head { display: none; }
}
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.push { margin-left: auto; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.divider { height: 1px; background: var(--surface-line); border: 0; }
.text-sm { font-size: 13.5px; }
.text-xs { font-size: 12.5px; }
.fw-600 { font-weight: 620; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ======================================================================
   Type — Aura's scale. Applies everywhere; a Marquee attendee page overrides
   only the display treatment, further down.
   ====================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-500.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-500-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-600.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-600-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-700.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-700-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-800.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("../fonts/plus-jakarta-sans-800-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}


/* ======================================================================
   Skins — the visual style of an attendee page, chosen in Appearance.

     (base)          Aura. The design language of the whole application:
                     back office, kiosk, doors and attendee pages.
     .skin-marquee   Bold and editorial, for an attendee page that wants a
                     campaign look. Restates every value it changes, so it
                     never depends on what the base happens to be.

   .skin-aura needs no rules: it is the base, and a class that exists only to
   re-assert the default is a class that will drift from it.
   ====================================================================== */

.skin-marquee {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", "Noto Sans", Arial, "Apple Color Emoji", sans-serif;

  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-sunken: #eef1f7;
  --surface-line: #e4e8f0;

  --text: #0f172a;
  --text-muted: #5b6577;
  --text-subtle: #8892a4;

  --ok: #047857;      --ok-soft: #ecfdf5;
  --warn: #b45309;    --warn-soft: #fffbeb;
  --danger: #be123c;  --danger-soft: #fff1f2;
  --info: #0369a1;    --info-soft: #f0f9ff;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-xs: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-sm: 0 1px 3px rgb(15 23 42 / 0.08), 0 1px 2px rgb(15 23 42 / 0.04);
  --shadow: 0 10px 24px -12px rgb(15 23 42 / 0.22), 0 2px 6px -2px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 28px 60px -28px rgb(15 23 42 / 0.35);

  font-weight: 400;
  letter-spacing: normal;
}

@media (prefers-color-scheme: dark) {
  .skin-marquee {
    --bg: #0b1120;
    --bg-elevated: #121a2b;
    --bg-sunken: #0e1626;
    --surface-line: #23304a;
    --text: #e8edf7;
    --text-muted: #9aa8c0;
    --text-subtle: #6f7f9a;
    --ok: #34d399;      --ok-soft: #06281f;
    --warn: #fbbf24;    --warn-soft: #2a1f06;
    --danger: #fb7185;  --danger-soft: #2c0f19;
    --info: #38bdf8;    --info-soft: #06202e;
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.5);
    --shadow: 0 12px 28px -14px rgb(0 0 0 / 0.7);
    --shadow-lg: 0 30px 70px -30px rgb(0 0 0 / 0.8);
  }
}

/* Marquee's own component values, restoring what the Aura base changes. */
.skin-marquee .btn { border-radius: 10px; font-weight: 560; min-height: 0; padding: 8px 14px; }
.skin-marquee .btn--sm { min-height: 0; padding: 5px 10px; border-radius: 8px; }
.skin-marquee .btn--lg { min-height: 0; padding: 12px 22px; border-radius: 12px; }
.skin-marquee .btn--icon { border-radius: 10px; min-width: 0; padding: 7px; }
.skin-marquee .btn--danger { border-radius: 10px; }
.skin-marquee .btn:active { transform: none; }
.skin-marquee .input,
.skin-marquee .select,
.skin-marquee .textarea { padding: 9px 12px; background: var(--bg-elevated); }
.skin-marquee .checkbox,
.skin-marquee .radio { background: var(--bg-elevated); }
.skin-marquee .badge,
.skin-marquee .chip { border-radius: 99px; font-size: 12px; font-weight: 600; }
/* Tabular figures are Aura's; Marquee keeps proportional ones. */
.skin-marquee table,
.skin-marquee .lp-stat__value,
.skin-marquee .sp-stat strong,
.skin-marquee .pr-slot__when { font-variant-numeric: normal; }
.skin-marquee .field__label { font-weight: 600; font-size: 13px; }
.skin-marquee .fieldset > legend { font-size: 12px; font-weight: 650; letter-spacing: .07em; }
/* The uppercase display slab is Marquee's signature. */
.skin-marquee .lp-hero__headline,
.skin-marquee .lp-section__head h2 { text-transform: uppercase; }
.skin-marquee .lp-hero__headline { letter-spacing: -0.035em; }
.skin-marquee .lp-cta { border-radius: 6px; min-height: 0; }
.skin-marquee .lp-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; }

/* ======================================================================
   Editorial — a printed programme.

   Its whole idea is that nothing is elevated: no shadows, no fills, no
   rounded cards. Structure comes from hairline rules and from space, which
   is how a conference programme or a wedding invitation is set, and the
   headline is a serif at a size the rest of the page never approaches.

   The serif is the system's own — ui-serif is New York on Apple devices and
   Georgia or Iowan elsewhere, all of them real display faces. Nothing is
   fetched: the font policy here is self-hosted or system, never a CDN, and
   the content security policy would refuse one anyway.
   ====================================================================== */
.skin-editorial {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, "Times New Roman", serif;

  --bg: #faf7f2;
  --bg-elevated: #ffffff;
  --bg-sunken: #f3efe8;
  --surface-line: #e2dcd1;

  --text: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #8b8178;

  --ok: #15803d;      --ok-soft: #f0fdf4;
  --warn: #a16207;    --warn-soft: #fefce8;
  --danger: #b91c1c;  --danger-soft: #fef2f2;
  --info: #1d4ed8;    --info-soft: #eff6ff;

  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 5px;
  --radius-xl: 6px;

  /* Flat on purpose. A rule where a shadow would be is the whole style. */
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;

  font-weight: 400;
  letter-spacing: normal;
}
.skin-editorial body,
body.skin-editorial { font-weight: 400; letter-spacing: normal; }
.skin-editorial .public-hero h1 {
  font-family: var(--font-display);
  font-weight: 500; letter-spacing: -0.015em; line-height: 1.08;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
}
.skin-editorial .public-hero__blurb { font-size: 15px; line-height: 1.7; opacity: .82; }
.skin-editorial .public-card { border: 1px solid var(--surface-line); }
.skin-editorial .btn {
  border-radius: 3px; font-weight: 600; min-height: 42px; padding: 10px 20px;
  letter-spacing: .01em;
}
.skin-editorial .btn--sm { min-height: 34px; padding: 6px 12px; border-radius: 3px; }
.skin-editorial .btn--lg { min-height: 48px; padding: 13px 26px; border-radius: 3px; }
.skin-editorial .btn--icon { border-radius: 3px; min-width: 38px; padding: 9px; }
.skin-editorial .btn--danger { border-radius: 3px; }
.skin-editorial .btn:active { transform: none; }
.skin-editorial .input,
.skin-editorial .select,
.skin-editorial .textarea {
  border-radius: 3px; background: var(--bg-elevated); padding: 11px 13px;
}
.skin-editorial .checkbox,
.skin-editorial .radio { background: var(--bg-elevated); border-radius: 3px; }
.skin-editorial .field__label {
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted);
}
/* The price list, set as one: rules between the rows rather than a stack of
   separate cards, which is how a programme prints it. */
.skin-editorial .tickets { gap: 0; }
.skin-editorial .ticket {
  border: 0; border-top: 1px solid var(--surface-line);
  border-radius: 0; background: none; padding: 16px 2px;
}
.skin-editorial .ticket:last-child { border-bottom: 1px solid var(--surface-line); }
.skin-editorial .ticket.is-chosen,
.skin-editorial .ticket--choice:has(input:checked) { background: var(--brand-soft); }
.skin-editorial .ticket::before { inset: 0 auto 0 -10px; }
.skin-editorial .ticket__name { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.skin-editorial .ticket__price { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.skin-editorial .form-step__n {
  background: none; color: var(--text); border: 1px solid var(--text);
  font-family: var(--font-display); font-weight: 600;
}
.skin-editorial .form-step__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.skin-editorial .form-intro .eyebrow,
.skin-editorial .eyebrow { letter-spacing: .18em; font-weight: 700; font-size: 11px; }
.skin-editorial .badge, .skin-editorial .chip { border-radius: 3px; font-weight: 600; }

/* ======================================================================
   Spotlight — dark, with the accent used as light.

   The card is nearly black and translucent, so the backdrop shows through
   it; the primary button is the only bright object on the page and carries
   a glow to say so. Everything else is stated in pale ink at low contrast,
   which is what makes the one bright thing read as a spotlight.

   Its card colour is proposed by PageStyle and applied in layouts/public
   only where the organiser has not chosen one of their own.
   ====================================================================== */
.skin-spotlight {
  --bg: #0b1020;
  --bg-elevated: #141b31;
  --bg-sunken: #0e1428;
  --surface-line: #26304c;

  --text: #e7ecf5;
  --text-muted: #9aa6c0;
  --text-subtle: #6e7a96;

  --ok: #34d399;      --ok-soft: #07261d;
  --warn: #fbbf24;    --warn-soft: #2a1f06;
  --danger: #fb7185;  --danger-soft: #2c0f19;
  --info: #38bdf8;    --info-soft: #06202e;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgb(0 0 0 / .5);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / .45);
  --shadow: 0 18px 40px -20px rgb(0 0 0 / .8);
  --shadow-lg: 0 40px 90px -40px rgb(0 0 0 / .9);
}
/* Frosted, not opaque: the backdrop carries through the card, which is what
   stops a dark card on a dark page reading as a hole. The fallback for a
   browser without backdrop-filter is the flat colour underneath it, which is
   the card it would have had anyway. */
.skin-spotlight .public-card {
  background: color-mix(in srgb, var(--form-bg, #0b1020) 78%, transparent);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  border: 1px solid rgb(255 255 255 / .1);
}
@supports not (backdrop-filter: blur(1px)) {
  .skin-spotlight .public-card { background: var(--form-bg, #0b1020); }
}
.skin-spotlight .public-hero h1 { font-weight: 800; letter-spacing: -0.035em; }
/* The one bright object on the page. */
.skin-spotlight .btn--primary {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 55%, transparent),
              0 10px 34px -10px var(--brand);
}
.skin-spotlight .input,
.skin-spotlight .select,
.skin-spotlight .textarea,
.skin-spotlight .checkbox,
.skin-spotlight .radio {
  background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .14);
}
.skin-spotlight .ticket {
  background: rgb(255 255 255 / .035); border-color: rgb(255 255 255 / .1);
}
.skin-spotlight .ticket.is-chosen,
.skin-spotlight .ticket--choice:has(input:checked) {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
}
.skin-spotlight .ticket--closed { background: rgb(255 255 255 / .02); }

/* ======================================================================
   Corporate — a congress, a bank, a ministry.

   The chrome is a white panel carrying the logo and the details, sitting on
   grey, with the accent reduced to a rule along its top edge. Square-ish
   corners, 1px borders, no elevation to speak of. The restraint is the
   point: this is the style for an event whose attendees are being sent by
   their employer.
   ====================================================================== */
.skin-corporate {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --bg: #eef1f5;
  --bg-elevated: #ffffff;
  --bg-sunken: #f5f7fa;
  --surface-line: #d6dce5;

  --text: #111827;
  --text-muted: #4b5563;
  --text-subtle: #7b8696;

  --ok: #15803d;      --ok-soft: #f0fdf4;
  --warn: #b45309;    --warn-soft: #fffbeb;
  --danger: #b91c1c;  --danger-soft: #fef2f2;
  --info: #1d4ed8;    --info-soft: #eff6ff;

  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  --shadow-xs: 0 1px 1px rgb(17 24 39 / .05);
  --shadow-sm: 0 1px 2px rgb(17 24 39 / .07);
  --shadow: 0 2px 8px rgb(17 24 39 / .08);
  --shadow-lg: 0 6px 20px rgb(17 24 39 / .1);

  font-weight: 400;
  letter-spacing: normal;
}
/* The panel. On a wide screen it is the column beside the form; stacked, it
   is a band across the top — the same markup either way. */
.skin-corporate .public-hero__inner {
  background: #ffffff; color: #111827;
  border: 1px solid #d6dce5; border-top: 3px solid var(--brand, #1d4ed8);
  border-radius: 4px; padding: 26px 24px;
}
.skin-corporate .public-hero h1 {
  font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em;
}
.skin-corporate .public-hero__meta { opacity: 1; color: #4b5563; }
.skin-corporate .public-hero__blurb { opacity: 1; color: #4b5563; }
.skin-corporate .public-hero__logo { margin-bottom: 14px; }
.skin-corporate .btn {
  border-radius: 4px; font-weight: 600; min-height: 42px; padding: 10px 18px;
}
.skin-corporate .btn--sm { min-height: 34px; padding: 6px 12px; border-radius: 4px; }
.skin-corporate .btn--lg { min-height: 46px; padding: 12px 24px; border-radius: 4px; }
.skin-corporate .btn--icon { border-radius: 4px; min-width: 38px; padding: 9px; }
.skin-corporate .btn--danger { border-radius: 4px; }
.skin-corporate .btn:active { transform: none; }
.skin-corporate .input,
.skin-corporate .select,
.skin-corporate .textarea {
  border-radius: 4px; background: var(--bg-elevated); padding: 10px 12px;
}
.skin-corporate .checkbox,
.skin-corporate .radio { background: var(--bg-elevated); border-radius: 4px; }
.skin-corporate .field__label { font-size: 13px; font-weight: 600; }
.skin-corporate .ticket { border-radius: 4px; }
.skin-corporate .form-step__n { border-radius: 4px; font-weight: 700; }
.skin-corporate .form-step__title { font-weight: 650; }
.skin-corporate .badge, .skin-corporate .chip { border-radius: 3px; font-weight: 600; }

/* ======================================================================
   Vivid — loud on purpose.

   Oversized type, fat rounded tickets, pill buttons and a stronger wash
   behind the card. For a festival, a hackathon, a student event: the
   audience that reads restraint as "this will be boring".
   ====================================================================== */
.skin-vivid {
  --bg: #fdf2f8;
  --bg-elevated: #ffffff;
  --bg-sunken: #fbe9f3;
  --surface-line: #f0d7e6;

  --text: #1a1035;
  --text-muted: #574a74;
  --text-subtle: #8478a0;

  --ok: #047857;      --ok-soft: #ecfdf5;
  --warn: #c2410c;    --warn-soft: #fff7ed;
  --danger: #be123c;  --danger-soft: #fff1f2;
  --info: #6d28d9;    --info-soft: #f5f3ff;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-xs: 0 2px 4px rgb(26 16 53 / .08);
  --shadow-sm: 0 4px 10px rgb(26 16 53 / .1);
  --shadow: 0 16px 36px -14px rgb(26 16 53 / .28);
  --shadow-lg: 0 36px 80px -32px rgb(26 16 53 / .45);
}
/* A second light source, so the backdrop is a wash rather than a flat ramp. */
.skin-vivid::before {
  background: radial-gradient(ellipse 80% 60% at 12% -8%, rgb(255 255 255 / .3), transparent 62%),
              radial-gradient(ellipse 65% 50% at 95% 4%, rgb(255 255 255 / .22), transparent 60%),
              radial-gradient(ellipse 90% 60% at 60% 108%, rgb(255 255 255 / .14), transparent 62%);
}
.skin-vivid .public-hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.045em; line-height: 1.02;
}
.skin-vivid .public-hero__blurb { font-size: 15.5px; }
.skin-vivid .btn { font-weight: 750; }
.skin-vivid .btn--lg { min-height: 54px; font-size: 16px; }
.skin-vivid .ticket { padding: 18px 20px; border-width: 2px; }
.skin-vivid .ticket::before { width: 5px; }
.skin-vivid .ticket__name { font-size: 16.5px; font-weight: 750; }
.skin-vivid .ticket__price { font-size: 19px; font-weight: 800; }
.skin-vivid .form-step__n { width: 30px; height: 30px; flex-basis: 30px; font-size: 14px; }
.skin-vivid .form-step__title { font-size: 18px; font-weight: 750; }
.skin-vivid .form-step__note { margin-left: 41px; }

/* ======================================================================
   Aura's component values — the ones tokens alone cannot express. Global,
   because Aura is the system's design language and not one page's option.
   ====================================================================== */

/* Aura has no 400: 500 is the lightest weight in the system. */
body { font-weight: 500; letter-spacing: -0.005em; }
h1, .public-hero h1, .lp-hero__headline, .lp-section__head h2 { font-weight: 800; }
h2, h3 { font-weight: 700; }
.field__label { font-size: 13px; font-weight: 700; }
.fieldset > legend,
.price-banner__label,
.pay-summary__label,
.stat__label,
.lp-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.badge, .chip { font-size: 11px; font-weight: 600; border-radius: 8px; }
/* A chip is clickable but never the primary action — a row of them at the full
   44px would dominate the screen. 36px is Aura's small-control tier. */
.chip { min-height: 36px; }

/* Dates, prices and counts stop shifting their columns as digits change. */
table,
.stat__value,
.lp-stat__value,
.price-banner__value,
.pay-summary__value,
.sp-stat strong,
.pr-slot__when { font-variant-numeric: tabular-nums; }

/* 44px is the minimum comfortable touch target; anything primary gets it. */
.btn { border-radius: 999px; font-weight: 700; min-height: 44px; padding: 10px 20px; }
.btn--sm { min-height: 36px; padding: 7px 14px; border-radius: 999px; }
.btn--lg { min-height: 48px; padding: 13px 26px; border-radius: 999px; }
.btn--icon { border-radius: 50%; min-width: 44px; padding: 10px; }
.btn--danger { border-radius: 13px; }
.btn:active { transform: scale(.98); }
.btn { transition: transform .11s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease); }

/* Radii come from the tokens, which each skin sets — restating them here would
   override the very values a skin exists to change. Only what a token cannot
   express is stated: the field's roomier padding and its sunken ground. */
.input, .select, .textarea { padding: 12px 14px; background: var(--bg-sunken); }
.checkbox, .radio { background: var(--bg-sunken); }
.lp-cta, .po-cta, .pr-cta { border-radius: 999px; min-height: 44px; }

/* Sentence case: the uppercase slab belongs to Marquee. */
.lp-hero__headline, .lp-section__head h2 { text-transform: none; letter-spacing: -0.03em; }
.lp-eyebrow { letter-spacing: .05em; }

@media (prefers-reduced-motion: reduce) {
  .btn, .lp-card, .lp-cta, .po-cta, .pr-cta { transition: none; }
  .btn:active { transform: none; }
}

/* ======================================================================
   Split — the pitch on the left, the form pinned on the right.
   ====================================================================== */
.sp-shell {
  position: relative; z-index: 2;
  display: grid; gap: clamp(24px, 3vw, 48px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: start;
  width: min(1240px, 100%); margin: 0 auto;
  padding: clamp(40px, 6vw, 76px) 22px clamp(40px, 6vw, 72px);
}
/* Below this the form has nowhere to pin against and the pitch has no room,
   so it becomes one column with the form last. */
@media (max-width: 960px) { .sp-shell { grid-template-columns: 1fr; } }

.sp-pitch { min-width: 0; color: var(--on-backdrop, #fff); display: flex; flex-direction: column; gap: 18px; }
.sp-logo { max-height: 56px; max-width: min(100%, 340px); object-fit: contain; object-position: left center; align-self: flex-start; }
.sp-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .78; }
.sp-headline { font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.04; letter-spacing: -0.032em; text-wrap: balance; }
.sp-lede { font-size: clamp(1rem, 1.4vw, 1.16rem); line-height: 1.55; opacity: .84; max-width: 56ch; }

.sp-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14.5px; opacity: .86; }
.sp-facts li { display: inline-flex; align-items: center; gap: 8px; }
.sp-facts .icon { width: 17px; height: 17px; opacity: .8; }

.sp-video { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; background: #000; box-shadow: var(--shadow-lg); }
.sp-video iframe { width: 100%; height: 100%; border: 0; display: block; }

.sp-stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.sp-stat strong { display: block; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-stat span { display: block; margin-top: 5px; font-size: 13px; opacity: .76; }

.sp-block { display: flex; flex-direction: column; gap: 14px; }
.sp-block__head { font-size: 1.15rem; letter-spacing: -0.02em; opacity: .95; }

.sp-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sp-list li { display: flex; gap: 11px; align-items: flex-start; }
.sp-list .icon { width: 19px; height: 19px; flex: none; margin-top: 2px; opacity: .8; }
.sp-list strong { display: block; font-size: 15px; }
.sp-list small { display: block; margin-top: 2px; font-size: 13.5px; opacity: .74; line-height: 1.5; }

.sp-people { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sp-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sp-person__face {
  width: 42px; height: 42px; flex: none; border-radius: 999px; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .2);
}
.sp-person__face img { width: 100%; height: 100%; object-fit: cover; }
.sp-person__text { min-width: 0; }
.sp-person__text strong { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-person__text small { display: block; font-size: 12.5px; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sp-quote { margin: 0; padding: 18px 20px; border-radius: var(--radius-lg); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .16); }
.sp-quote blockquote { margin: 0; font-size: 15px; line-height: 1.6; }
.sp-quote figcaption { margin-top: 10px; font-size: 13px; opacity: .74; }

/* The form column. Sticky only where there is height to scroll against. */
.sp-form { min-width: 0; }
@media (min-width: 961px) {
  .sp-form__inner { position: sticky; top: 24px; }
}
.sp-form .public-card { max-width: none; margin: 0; }

/* ======================================================================
   Poster — one full screen of image, then the detail.
   ====================================================================== */
.po-hero {
  position: relative; z-index: 2;
  /* svh, not vh: on a phone vh is the height with the browser chrome hidden,
     so a 100vh hero is taller than the screen and the scroll cue lands under
     the address bar. */
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: clamp(48px, 8vw, 96px) 22px clamp(80px, 10vw, 120px);
  color: var(--on-backdrop, #fff);
}
.po-hero--image::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--po-image); background-size: cover; background-position: center;
}
/* A scrim, so the words hold against a photograph of any brightness. */
.po-hero--image::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(8 10 18 / .34), rgb(8 10 18 / .62));
}
/* The cap belongs on the headline, not the column: at 22ch the whole block was
   constrained and the date/venue/price line broke onto three rows. */
.po-hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: min(100%, 880px); }
.po-logo { max-height: 66px; max-width: min(100%, 320px); object-fit: contain; }
.po-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .84; }
.po-headline {
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: .95; letter-spacing: -0.04em;
  font-weight: 800; text-wrap: balance; max-width: 15ch;
}
.po-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 15px; opacity: .88; }
.po-facts span { display: inline-flex; align-items: center; gap: 8px; }
.po-facts .icon { width: 18px; height: 18px; opacity: .8; }
.po-cta {
  margin-top: 8px; display: inline-flex; align-items: center; min-height: 48px;
  padding: 14px 30px; border-radius: 999px; font-size: 16.5px; font-weight: 700;
  background: var(--brand); color: var(--brand-contrast, #fff); text-decoration: none;
  transition: transform .16s var(--ease), filter .16s var(--ease);
}
.po-cta:hover { transform: translateY(-1px); filter: brightness(1.08); text-decoration: none; }

.po-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%) rotate(90deg);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: inherit; opacity: .7; background: rgb(255 255 255 / .12);
  animation: po-nudge 2.4s var(--ease) infinite;
}
.po-scroll:hover { opacity: 1; }
@keyframes po-nudge {
  0%, 100% { transform: translateX(-50%) rotate(90deg) translateX(0); }
  50%      { transform: translateX(-50%) rotate(90deg) translateX(5px); }
}
@media (prefers-reduced-motion: reduce) { .po-scroll { animation: none; } }

.po-wrap { width: min(1140px, 100%); margin: 0 auto; padding: 0 22px; }
.po-wrap--narrow { width: min(760px, 100%); }
.po-band { position: relative; z-index: 2; padding: clamp(44px, 6vw, 80px) 0; background: var(--bg-elevated); color: var(--text); }
.po-band--tint { background: var(--bg-sunken); }
.po-lede { font-size: clamp(1.06rem, 1.7vw, 1.3rem); line-height: 1.6; text-align: center; color: var(--text-muted); }
.po-video { margin-top: 30px; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; background: #000; box-shadow: var(--shadow-lg); }
.po-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.po-band .public-card { max-width: none; }

/* ======================================================================
   Programme — the schedule is the argument.
   ====================================================================== */
.pr-wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 22px; }
.pr-wrap--narrow { width: min(720px, 100%); }

.pr-head { position: relative; z-index: 2; padding: clamp(30px, 4.5vw, 56px) 0; color: var(--on-backdrop, #fff); }
.pr-head__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pr-head__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pr-logo { max-height: 46px; max-width: min(100%, 260px); object-fit: contain; object-position: left center; align-self: flex-start; }
.pr-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; opacity: .76; }
.pr-headline { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.pr-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; opacity: .84; }
.pr-facts span { display: inline-flex; align-items: center; gap: 7px; }
.pr-facts .icon { width: 16px; height: 16px; opacity: .8; }
.pr-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 12px 24px;
  border-radius: 999px; font-weight: 700; font-size: 15.5px; white-space: nowrap;
  background: var(--brand); color: var(--brand-contrast, #fff); text-decoration: none;
  transition: transform .16s var(--ease), filter .16s var(--ease);
}
.pr-cta:hover { transform: translateY(-1px); filter: brightness(1.08); text-decoration: none; }

.pr-band { position: relative; z-index: 2; padding: clamp(38px, 5.5vw, 72px) 0; background: var(--bg-elevated); color: var(--text); }
.pr-band--tint { background: var(--bg-sunken); }
.pr-band__head { font-size: clamp(1.4rem, 2.6vw, 1.95rem); letter-spacing: -0.028em; margin-bottom: 22px; text-wrap: balance; }
.pr-band__sub { margin: -14px 0 20px; color: var(--text-muted); }
.pr-lede { font-size: clamp(1.04rem, 1.6vw, 1.22rem); line-height: 1.6; color: var(--text-muted); }
.pr-band .public-card { max-width: none; }

/* The timeline. The rule sits behind the markers rather than being drawn per
   row, so a row of any height keeps the line continuous. */
.pr-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; }
.pr-slot { display: grid; grid-template-columns: minmax(96px, 148px) minmax(0, 1fr); gap: 22px; padding: 20px 0; position: relative; }
.pr-slot + .pr-slot { border-top: 1px solid var(--surface-line); }
.pr-slot__rail { position: relative; padding-left: 22px; }
/* The marker and the line through it. */
.pr-slot__rail::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.pr-slot__rail::after {
  content: ""; position: absolute; left: 4px; top: 20px; bottom: -20px;
  width: 1px; background: var(--surface-line);
}
.pr-slot:last-child .pr-slot__rail::after { content: none; }
.pr-slot__when { font-size: 13.5px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.pr-slot__body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pr-slot__who { display: flex; align-items: center; gap: 12px; }
.pr-slot__face {
  width: 40px; height: 40px; flex: none; border-radius: 999px; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: var(--brand-soft); color: var(--brand);
}
.pr-slot__face img { width: 100%; height: 100%; object-fit: cover; }
.pr-slot__body h3 { font-size: 1.08rem; letter-spacing: -0.015em; }
.pr-slot__body p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }

@media (max-width: 620px) {
  .pr-slot { grid-template-columns: 1fr; gap: 10px; }
  .pr-slot__rail { padding-left: 22px; }
  .pr-slot__rail::after { content: none; }
}

/* --- Customers' own domains -------------------------------------------- */
.dns-record {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-sunken); border: 1px solid var(--surface-line);
  border-radius: var(--radius); padding: 12px 14px;
}
.dns-record > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dns-record__key {
  flex: none; width: 56px; font-size: 11px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted);
}
.dns-record code { font-size: 13px; overflow-wrap: anywhere; }

.domain-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.domain-events li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--surface-line);
  border-radius: var(--radius); background: var(--bg-sunken);
}
.domain-events__name { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.domain-events code { margin-left: auto; overflow-wrap: anywhere; }
.domain-events form { flex: none; }

.domain-result { padding: 12px 18px; font-size: 14px; border-top: 1px solid var(--surface-line); }
.domain-result--ok { background: var(--ok-soft); color: var(--ok); }
.domain-result--error { background: var(--danger-soft); color: var(--danger); }

/* --- The manual --------------------------------------------------------
 *
 * Two homes for the same content: a page you can bookmark and print, and a
 * panel that slides over whatever you were stuck on. The typography is the
 * same in both, because help that looks different in two places reads as
 * two different answers. */
.help__summary { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0 0 18px; }
.help__for { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.help__tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand-strong);
  background: var(--brand-soft, var(--bg-sunken)); border-radius: 999px; padding: 3px 9px;
}
.help__h3 { font-size: 14px; margin: 26px 0 10px; }

/* Numbered, because the whole point is that there is an order. The marker
   is drawn rather than left to the list, so it stays legible beside a bold
   first line at any size. */
.help__steps { list-style: none; counter-reset: help; margin: 0 0 4px; padding: 0; }
.help__steps > li {
  counter-increment: help; position: relative;
  padding: 0 0 16px 42px; line-height: 1.6; font-size: 14.5px;
}
.help__steps > li::before {
  content: counter(help); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
  color: #fff; background: var(--brand);
}
/* The line that runs between the numbers, so a long list still reads as one
   sequence rather than as a pile of separate instructions. */
.help__steps > li::after {
  content: ''; position: absolute; left: 12.5px; top: 30px; bottom: 2px;
  width: 1px; background: var(--surface-line);
}
.help__steps > li:last-child { padding-bottom: 0; }
.help__steps > li:last-child::after { display: none; }
.help__steps > li > strong { display: block; margin-bottom: 2px; }
.help__steps > li > span { color: var(--text-muted); }

.help__example {
  margin: 22px 0 0; padding: 14px 16px;
  border-left: 3px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-sunken);
}
.help__example p { margin: 8px 0 0; font-size: 14px; line-height: 1.65; }

.help__trouble { margin: 0; }
.help__trouble dt { font-weight: 650; font-size: 14px; margin-top: 14px; }
.help__trouble dt:first-child { margin-top: 0; }
.help__trouble dd { margin: 3px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

.help__see { display: flex; flex-wrap: wrap; gap: 8px; }
.help__chip {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--surface-line); color: var(--text); text-decoration: none;
}
.help__chip:hover { border-color: var(--brand); color: var(--brand-strong); }

/* The index. Cards rather than a list: each one has to carry a title, a
   sentence of what it is for and who it is for, and three lines of text in
   a list row is a wall. */
.help-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.help-card {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 14px 16px; border: 1px solid var(--surface-line); border-radius: var(--radius);
  background: var(--bg-elevated); text-decoration: none; color: var(--text);
}
.help-card:hover { border-color: var(--brand); }
.help-card > strong { font-size: 15px; }
.help-card__sum { font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.help-card__for { font-size: 12px; color: var(--text-subtle, var(--text-muted)); margin-top: 2px; }
.help-page { max-width: 760px; }

/* The panel. A sheet over the screen rather than a trip to another page,
   because the thing somebody is stuck on is on the screen behind it and
   they will want to look at both. */
.help-panel { position: fixed; inset: 0; z-index: 70; }
.help-panel[hidden] { display: none; }
.help-panel__scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.help-panel__sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%);
  display: flex; flex-direction: column; background: var(--bg-elevated);
  border-left: 1px solid var(--surface-line); box-shadow: -24px 0 60px rgba(15, 23, 42, .22);
  animation: help-in .18s ease-out;
}
@keyframes help-in { from { transform: translateX(16px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .help-panel__sheet { animation: none; } }
.help-panel__x { position: absolute; top: 12px; right: 12px; z-index: 1; }
.help-panel__content { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.help-panel__head { padding: 20px 56px 16px 22px; border-bottom: 1px solid var(--surface-line); }
.help-panel__head h2 { margin: 8px 0 0; font-size: 19px; }
.help-panel__body { padding: 20px 22px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.help-panel__foot {
  padding: 12px 22px; border-top: 1px solid var(--surface-line);
  display: flex; gap: 8px; flex-wrap: wrap; background: var(--bg-sunken);
}
/* The page behind must not scroll while the sheet is over it: on a phone
   that is how you end up scrolling the wrong thing and losing your place. */
body.help-open { overflow: hidden; }
@media (max-width: 560px) {
  .help-panel__sheet { width: 100%; border-left: 0; }
}

/* --- Accounts, and the log ---------------------------------------------- */
/* A card's own one-line explanation, under its title. The pages that run
   accounts are the pages somebody visits twice a year, so each card says
   what it is for rather than relying on being remembered. */
.card__sub { margin: 3px 0 0; font-size: .82rem; color: var(--text-subtle); font-weight: 400; }
.card__head h2 + .card__sub, .card__head > div { margin-right: auto; }
.card__head > div { min-width: 0; }

/* Label/value pairs, for the handful of facts a thing has. */
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .82rem; }
.meta dt { color: var(--text-subtle); }
.meta dd { margin: 0; }

/* A list of things that happened. Not a table: there is no column anyone
   wants to sort by, and the rows are sentences. */
.feed { list-style: none; margin: 0; padding: 0; }
.feed__item { padding: 11px 18px; border-bottom: 1px solid var(--surface-line); }
.feed__item:last-child { border-bottom: 0; }
.feed__main { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: .86rem; min-width: 0; }
.feed__main > span { min-width: 0; overflow-wrap: anywhere; }

/* One account's events, folded away. Twelve customers is twelve headings,
   and a page of twelve open grids is a page nobody reads. */
.account-group { margin-bottom: 14px; }
.account-group__head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; cursor: pointer; list-style: none;
  background: var(--bg-elevated); border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
}
.account-group__head::-webkit-details-marker { display: none; }
.account-group__head:hover { border-color: color-mix(in srgb, var(--brand) 32%, var(--surface-line)); }
.account-group__name { font-weight: 600; font-size: 1rem; min-width: 0; overflow-wrap: anywhere; }
.account-group__count { color: var(--text-subtle); font-size: .82rem; margin-left: auto; }
.account-group__caret { display: inline-flex; color: var(--text-subtle); transition: transform .15s ease; }
.account-group[open] > .account-group__head > .account-group__caret { transform: rotate(90deg); }
/* The caret is the only moving part, so honour the setting that asks for
   nothing to move. */
@media (prefers-reduced-motion: reduce) { .account-group__caret { transition: none; } }

/* A tick-box with a name and a line of detail under it. Used where a short
   list is chosen from in place of a table — moving events between accounts,
   and the areas a colleague may reach. */
.pick { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 7px 2px; }
.pick input { margin-top: 2px; flex: none; }
.pick > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick:hover > span > .fw-600 { color: var(--brand); }

/* --- Rating, on a survey ------------------------------------------------ */
/* Buttons, not a dropdown. On a phone at the back of a hall, five taps
   beats opening a select, and a row of numbers reads as a scale where a
   list of them reads as a form. */
.rating { display: flex; gap: 8px; flex-wrap: wrap; }
.rating__option { position: relative; }
.rating__option input { position: absolute; opacity: 0; pointer-events: none; }
.rating__option span {
  display: grid; place-items: center; min-width: 52px; min-height: 52px; padding: 0 10px;
  border: 1px solid var(--surface-line); border-radius: var(--radius-lg);
  background: var(--bg-elevated); font-size: 1.05rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.rating__option:hover span { border-color: color-mix(in srgb, var(--brand) 40%, var(--surface-line)); }
.rating__option input:checked + span {
  background: var(--brand); border-color: var(--brand); color: var(--brand-contrast);
}
.rating__option input:focus-visible + span { box-shadow: var(--ring); }
@media (prefers-reduced-motion: reduce) { .rating__option span { transition: none; } }

/* --- Save, kept within reach -------------------------------------------- */
/* Appears under the top bar once the real Save has scrolled off the bottom,
   and disappears again when it comes back — so a short page never grows a
   second button and a long one never loses its first. */
.save-bar {
  position: sticky; top: var(--header-h); z-index: 25;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 26px;
  border-bottom: 1px solid var(--surface-line);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 6px 16px -14px rgb(15 23 42 / 55%);
}
.save-bar[hidden] { display: none; }
.save-bar__what {
  font-size: .86rem; font-weight: 600; color: var(--text-muted);
  margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 640px) { .save-bar { padding: 9px 16px; } }
