/* meet.mensa.de host application. (Redesign 2026-10 is now the only stylesheet.) One deliberate style, applied everywhere (spec H9).

   Redesign 2026-10. Same classes, same markup contract; the look moves here.
   The ticket (boarding pass) stays the one shape every action takes: the wide half does
   the thing, the square half explains it, a perforation with two punched notches between. */

:root {
  color-scheme: light dark;

  /* Colour */
  --ink: #18202b;
  --ink-soft: #4a5464;
  --ground: #f6f5f1;
  --ground-2: #eceae3;
  --surface: #ffffff;
  --rule: #dad7ce;
  --rule-strong: #8f8b80;      /* 3:1 on white: input borders, ticket outlines */
  --accent: #0f5c63;
  --accent-dark: #0a4247;
  --accent-soft: #e2eeed;
  --on-accent: #ffffff;
  --bad: #a3302a;
  --bad-soft: #fbecea;
  --bad-line: #e2b9b4;
  --ok: #1b6a43;
  --ok-soft: #e3f1e8;
  --reg: #7a3b69;              /* "mit Anmeldung": second accent, same weight as --accent */
  --reg-soft: #f6eaf2;
  --pending: #7a5200;
  --pending-soft: #fbf1dc;
  --fail: #8a4300;
  --fail-soft: #fdeedd;
  --focus: #1f7d86;
  --shadow: 0 1px 2px rgba(24, 32, 43, .06), 0 4px 18px rgba(24, 32, 43, .06);

  /* Shape and space */
  --radius: 4px;
  --radius-lg: 4px;           /* sections, cards, panels: as in the original */
  --gap: 1rem;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem;

  /* Type. Source Sans 3 only if it is self-hosted; otherwise the system face. */
  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --t-xs: .78rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.125rem; --t-xl: 1.375rem; --t-2xl: 2rem;

  /* What a punched notch is filled with: the colour behind the ticket. */
  --notch: var(--ground);
}

/* Dark theme: follows the system unless the page sets data-theme on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eaed;
    --ink-soft: #aab3be;
    --ground: #12171d;
    --ground-2: #1e252e;
    --surface: #1a2028;
    --rule: #2f3843;
    --rule-strong: #67727e;
    --accent: #6cc3c8;
    --accent-dark: #93d6da;
    --accent-soft: #163539;
    --on-accent: #08191b;
    --bad: #ff9d91;
    --bad-soft: #3a1d1b;
    --bad-line: #6e3530;
    --ok: #74d3a0;
    --ok-soft: #13301f;
    --reg: #e3a9d3;
    --reg-soft: #35212f;
    --pending: #f0c46b;
    --pending-soft: #33290f;
    --fail: #ffb070;
    --fail-soft: #3a2412;
    --focus: #8fd8dd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --ink: #e8eaed;
  --ink-soft: #aab3be;
  --ground: #12171d;
  --ground-2: #1e252e;
  --surface: #1a2028;
  --rule: #2f3843;
  --rule-strong: #67727e;
  --accent: #6cc3c8;
  --accent-dark: #93d6da;
  --accent-soft: #163539;
  --on-accent: #08191b;
  --bad: #ff9d91;
  --bad-soft: #3a1d1b;
  --bad-line: #6e3530;
  --ok: #74d3a0;
  --ok-soft: #13301f;
  --reg: #e3a9d3;
  --reg-soft: #35212f;
  --pending: #f0c46b;
  --pending-soft: #33290f;
  --fail: #ffb070;
  --fail-soft: #3a2412;
  --focus: #8fd8dd;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-md)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1 { font-size: var(--t-2xl); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; margin: 0 0 var(--s3); text-wrap: balance; }
h2 { font-size: var(--t-xl); line-height: 1.25; font-weight: 650; letter-spacing: -.01em; margin: var(--s6) 0 var(--s3); }
p { margin: 0 0 var(--s4); text-wrap: pretty; }

.lead { font-size: var(--t-lg); color: var(--ink-soft); }
.hint { font-size: var(--t-sm); color: var(--ink-soft); }
.label-inline { color: var(--ink-soft); }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }

code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--ground-2);
  border-radius: 4px;
  padding: .1em .4em;
  overflow-wrap: anywhere;
}

/* The date of an event, under its title. */
.lead-date { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem; border-radius: 100px; background: var(--reg-soft); color: var(--reg); font-weight: 650; font-size: var(--t-md); font-variant-numeric: tabular-nums; }

.lead code { font-size: var(--t-sm); padding: .25em .55em; }

/* Focus: one ring everywhere, drawn outside the element so it never shifts layout. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline-offset: 1px; }

/* ---------------------------------------------------------------------------
   Masthead and footer
   --------------------------------------------------------------------------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s4);
  padding: var(--s3) max(1.25rem, calc((100% - 46rem) / 2 + 1.25rem));
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 700;
  font-size: var(--t-lg);
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
}
.brand:hover { color: var(--ink); text-decoration: none; }
/* No mark: there is no logo to show. Drop an <img> into .brand and add the grid back if one arrives. */
.brand-org { font-weight: 400; font-size: var(--t-xs); color: var(--ink-soft); letter-spacing: .01em; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }

.foot {
  border-top: 1px solid var(--rule);
  padding: var(--s5) 1.25rem;
  text-align: center;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}
.foot p { margin: 0; }

/* ---------------------------------------------------------------------------
   Page frame
   --------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
  padding-block: var(--s6) var(--s7);
}

.hero { margin-bottom: var(--s6); }

.panel {
  --notch: var(--surface);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  box-shadow: var(--shadow);
  margin-bottom: var(--s5);
}
.panel > h2:first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.stack { display: flex; flex-direction: column; gap: var(--s5); align-items: stretch; }
.stack > * { margin-block: 0; }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.inline { display: inline; }

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: .4rem; width: 100%; max-width: 32rem; min-width: 0; }
.field > p { margin: 0; }
.label, .field > .label { font-weight: 650; font-size: var(--t-md); }
.field small { color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.45; }

input[type=text], input[type=email], input[type=number],
input[type=datetime-local], textarea {
  font: inherit;
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
input:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--ink-soft); }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input:disabled, textarea:disabled { background: var(--ground-2); color: var(--ink-soft); }
textarea { resize: vertical; line-height: 1.5; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); width: 1.15rem; height: 1.15rem; margin: .18rem 0 0; flex: none; }

/* The address field: fixed prefix and the editable name, joined into one control. */
.field:has(> .label-inline) {
  display: grid;
  grid-template-columns: max-content minmax(7rem, 1fr);
  row-gap: .4rem;
  column-gap: 0;
}
.field:has(> .label-inline) > .label,
.field:has(> .label-inline) > small { grid-column: 1 / -1; }
.field > .label-inline {
  display: flex;
  align-items: center;
  padding: 0 .65rem;
  font-family: var(--mono);
  font-size: var(--t-sm);
  background: var(--ground-2);
  border: 1px solid var(--rule-strong);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.field > .label-inline + input { border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--mono); font-size: var(--t-sm); }

/* A value shown and not offered, because it cannot change in this state. */
.field > .label + p {
  padding: .6rem .8rem;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--ground-2);
  color: var(--ink);
}

/* Radio and checkbox cards. */
.choice, .check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .75rem .9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.choice:hover, .check:hover { border-color: var(--rule-strong); }
.choice:has(input:checked), .check:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}
.choice:has(input:focus-visible), .check:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice:has(input:disabled), .check:has(input:disabled) { cursor: default; border-style: dashed; box-shadow: none; }
.choice:has(input:disabled:not(:checked)), .check:has(input:disabled:not(:checked)) { opacity: .7; }
.choice span, .check span { display: flex; flex-direction: column; gap: .1rem; }
.choice strong { font-weight: 650; }
.choice small { color: var(--ink-soft); font-size: var(--t-sm); }

/* The registration choice wears its own accent, the one its pill wears on the dashboard. */
.choice-reg:has(input:checked) { border-color: var(--reg); box-shadow: inset 0 0 0 1px var(--reg); background: var(--reg-soft); }
.choice-reg input { accent-color: var(--reg); }

.consent {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  background: var(--ground-2);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  margin: 0;
}

/* The six digits of a confirmation code: one monospace cell per digit, underlined. */
.code {
  --cell: calc(1ch + .55em);
  width: calc(6 * var(--cell) + 1.6rem + 2px) !important;
  max-width: 100%;
  min-height: 3.5rem !important;
  padding: .5rem .8rem !important;
  font-family: var(--mono) !important;
  font-size: 1.6rem !important;
  letter-spacing: .55em;
  font-variant-numeric: tabular-nums;
  background:
    repeating-linear-gradient(90deg, var(--rule-strong) 0 1ch, transparent 1ch var(--cell))
    0 calc(100% - .35rem) / 100% 2px no-repeat content-box,
    var(--surface) !important;
}

/* Spam guard field, off screen rather than display:none so a bot still sees it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------------------
   The options panel ("Art der Konferenz, Zugang und Webinar-Modus")

   Folded, it is a full-width tinted bar with a round chevron button at its end, so it
   reads as something to open rather than as a heading. The current selection sits on
   its own line underneath (filled by static/options.js).
   --------------------------------------------------------------------------- */

.more {
  --notch: var(--surface);
  width: 100%;
  max-width: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: clip;
}
.more summary {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem 0;
  min-height: 3.75rem;
  padding: .85rem 4rem .85rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: calc(var(--radius-lg) - 1px);
  transition: background-color .12s;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::marker { content: ""; }
.more summary:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }
.more summary:focus-visible { outline-offset: -3px; }
/* The round button at the end of the bar, with a chevron drawn from two borders. */
.more summary::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: -1.125rem;
  border-radius: 50%;
  background: var(--accent);
}
.more summary::before {
  content: "";
  position: absolute;
  z-index: 1;
  right: calc(1rem + 1.125rem - .3rem);
  top: 50%;
  width: .6rem;
  height: .6rem;
  margin-top: -.45rem;
  border-right: 2px solid var(--on-accent);
  border-bottom: 2px solid var(--on-accent);
  transform: rotate(45deg);
  transition: transform .18s ease, margin .18s ease;
}
.more[open] > summary::before { transform: rotate(225deg); margin-top: -.15rem; }
.more[open] > summary {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
}
.summary-values {
  flex-basis: 100%;
  font-weight: 400;
  color: var(--ink);
  font-size: var(--t-sm);
}
.more > :not(summary) { margin: var(--s5) 1.1rem 0; }
/* Padding, not a margin on :last-child: the last child may be hidden (.if-not-reg). */
.more[open] { padding-bottom: 1.1rem; }

/* Registration fields, revealed when "Nur angemeldete Teilnehmende" is chosen. */
.regfields {
  --notch: var(--reg-soft);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  min-width: 0;
  margin-inline: 0;
  padding: var(--s5) 1.1rem 1.1rem;
  border: 1px solid var(--reg);
  border-radius: var(--radius-lg);
  background: var(--reg-soft);
}
.regfields legend {
  padding: 0 .4rem;
  margin-left: -.4rem;
  font-weight: 650;
  color: var(--reg);
}
.regfields .field { max-width: none; }

/* What shows depends on the chosen access. Without :has() support everything shows. */
@supports selector(:has(*)) {
  .stack:not(:has(input[data-reg]:checked)) .if-reg { display: none; }
  .stack:has(input[data-reg]:checked) .if-not-reg { display: none; }
}

/* ---------------------------------------------------------------------------
   Notices
   --------------------------------------------------------------------------- */

.note {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--ground-2);
  color: var(--ink);
}
.note::before {
  content: "";
  flex: none;
  width: .55rem;
  height: .55rem;
  margin-top: .5rem;
  border-radius: 50%;
  background: var(--ink-soft);
}
.note-ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.note-ok::before { background: var(--ok); }
.note-bad { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.note-bad::before { background: var(--bad); border-radius: 2px; transform: rotate(45deg); }

/* ---------------------------------------------------------------------------
   Room link, meta lists, cards, tables
   --------------------------------------------------------------------------- */

.roomlink {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  margin: 0 0 var(--s5);
}
.roomlink .label-inline { font-size: var(--t-sm); font-weight: 650; color: var(--ink-soft); }

.meta { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0 0 var(--s5); }
.meta dt { color: var(--ink-soft); font-size: var(--t-sm); padding-top: .1em; }
.meta dd { margin: 0; min-width: 0; }
@media (max-width: 30rem) {
  .meta { grid-template-columns: 1fr; gap: 0; }
  .meta dd + dt { margin-top: .6rem; }
}

.cards { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s4); }
/* Block, not flex: in the dashboard markup the start <form> closes the open <p class="actionbar">,
   so the form and the delete ticket are direct children of the card and must flow side by side. */
.card {
  --notch: var(--surface);
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem 1.2rem;
  box-shadow: var(--shadow);
}
.card > * { margin: 0; }
.card > * + * { margin-top: .55rem; }
.card > form.inline { display: inline-flex; vertical-align: top; margin-top: .55rem; margin-right: .45rem; }
.card > form.inline ~ .ticket { vertical-align: top; margin-top: .55rem; margin-right: .45rem; }
/* The empty actionbar the parser leaves before the form is only the perforation: equal space on both sides. */
.card > .actionbar:has(+ form.inline) { padding-top: 0; }
.card > .actionbar + form.inline, .card > .actionbar + form.inline ~ .ticket { margin-top: .9rem; }
.card-title {
  font-weight: 650;
  font-size: var(--t-lg);
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
}
a.card-title:hover { color: var(--accent); text-decoration: underline; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; font-size: var(--t-sm); color: var(--ink-soft); }
.card-meta:has(.linkbox) { display: block; }
.card .hint { margin: 0; }
/* The actions sit below a perforation, like the stub of a ticket. */
.card > .actionbar {
  margin: .9rem 0 0;
  padding-top: .9rem;
  border-top: 1px dashed var(--rule);
}
/* The registration block of an event card: its own tinted strip. */
.card-event {
  --notch: var(--reg-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  margin-top: .2rem;
  padding: .7rem .8rem .7rem 1rem;
  border-radius: var(--radius);
  background: var(--reg-soft);
}
.card-event .card-meta { color: var(--ink); }
.card-event .actionbar { margin: 0; }
.card-history {
  --notch: var(--ground);
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: var(--s5); }
.grid { --notch: var(--surface); border-collapse: collapse; width: 100%; background: var(--surface); }
.grid th, .grid td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid th { font-size: var(--t-xs); font-weight: 650; color: var(--ink-soft); background: var(--ground-2); }
.grid .revoked { color: var(--ink-soft); }
.grid .revoked td:first-child { text-decoration: line-through; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 18rem; }

.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 1.5rem;
  padding: 0 .6rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font: 650 var(--t-xs)/1 var(--font);
  letter-spacing: .01em;
  white-space: nowrap;
  background: var(--ground-2);
  color: var(--ink-soft);
}

.pill-live { background: var(--ok-soft); color: var(--ok); }
.pill-planned { background: var(--accent-soft); color: var(--accent); }
.pill-ended { background: var(--ground-2); color: var(--ink-soft); }
.pill-reg { background: var(--reg-soft); color: var(--reg); }
/* A history entry: free is an offer (accent outline), held is quiet (D-127). */
.pill-free { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.pill-held { background: transparent; border-color: var(--rule); color: var(--ink-soft); }
/* Waiting for its code (D-147): dashed like a perforation, something still to do. */
.pill-pending { background: var(--pending-soft); border: 1px dashed var(--pending); color: var(--pending); }

/* A pill that opens its own explanation: it carries a small "i" so it reads as pressable. */
.pill-toggle { cursor: help; font-family: var(--font); }
.pill-toggle::after {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: .95rem;
  height: .95rem;
  margin-right: -.25rem;
  border-radius: 50%;
  font: italic 700 .62rem/1 Georgia, "Times New Roman", serif;
  box-shadow: inset 0 0 0 1px currentColor;
}
.pill-toggle:hover, .pill-toggle[aria-expanded="true"] { border-color: currentColor; }

@keyframes pulse { 50% { opacity: .35; } }

/* ---------------------------------------------------------------------------
   Actions

   Every action is one control shaped like a boarding pass: a wide left part that
   does the thing, a narrow square on the right that explains it, and a perforation
   with punched notches between them. One border encloses both, so it is never in
   doubt which explanation belongs to which button.
   --------------------------------------------------------------------------- */

/* The way out on one side and the way on on the other (D-125). */
.actionbar-split { justify-content: space-between; }

.actionbar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin: 0 0 var(--s4);
}

.ticket {
  --t-border: var(--rule-strong);
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-height: 2.75rem;
  max-width: 100%;
  border: 1px solid var(--t-border);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.25;
}

/* The half that does the thing. */
.ticket-action {
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  border: 0;
  border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
  background: transparent;
  color: var(--accent);
  padding: .55rem 1.1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  text-align: left;
  transition: background-color .12s, color .12s;
}
/* Background and colour always move together, so neither swallows the label. */
.ticket-action:hover,
.ticket-action:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}
.ticket-action:focus-visible { outline-offset: 3px; }

/* The half that explains it. */
.ticket-info {
  position: relative;
  font: italic 700 1rem/1 Georgia, "Times New Roman", serif;
  cursor: help;
  border: 0;
  border-left: 1px dashed var(--t-border);
  border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
  background: transparent;
  color: var(--ink-soft);
  width: 2.6rem;
  padding: 0;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .12s, color .12s;
}

.ticket-info:hover,
.ticket-info[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.ticket-info[aria-expanded="true"] { box-shadow: inset 0 -3px 0 var(--accent); }

/* Variants. Each states its own hover pair. */
.ticket-primary { --t-border: var(--accent); background: var(--accent); }
.ticket-primary .ticket-action { color: var(--on-accent); }
.ticket-primary .ticket-action:hover,
.ticket-primary .ticket-action:focus-visible { background: var(--accent-dark); color: var(--on-accent); }
.ticket-primary .ticket-info { color: var(--on-accent); border-left-color: color-mix(in srgb, var(--on-accent) 55%, transparent); }
.ticket-primary .ticket-info:hover,
.ticket-primary .ticket-info[aria-expanded="true"] { background: var(--accent-dark); color: var(--on-accent); box-shadow: none; }

.ticket-danger { --t-border: var(--bad-line); }
.ticket-danger .ticket-action { color: var(--bad); }
.ticket-danger .ticket-action:hover,
.ticket-danger .ticket-action:focus-visible { background: var(--bad); color: var(--surface); }
.ticket-danger .ticket-info:hover,
.ticket-danger .ticket-info[aria-expanded="true"] { background: var(--bad-soft); color: var(--bad); box-shadow: none; }

.ticket-small { min-height: 2.25rem; }
.ticket-small .ticket-action { padding: .35rem .75rem; font-size: var(--t-sm); }
.ticket-small .ticket-info { width: 2.1rem; font-size: .9rem; }

.ticket-back .ticket-action::before { content: "\2190"; font-weight: 400; }

/* The address and the control that copies it, as one object (D-117). */
.linkbox {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--ground-2);
  overflow: hidden;
}
.linkbox code {
  display: flex;
  align-items: center;
  background: none;
  padding: .35rem .7rem;
  font-size: var(--t-sm);
  color: var(--ink);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  border-radius: 0;
}
.linkbox code::-webkit-scrollbar { display: none; }
.linkcopy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.6rem;
  padding: 0;
  border: 0;
  border-left: 1px dashed var(--rule-strong);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color .12s, color .12s;
}
.linkcopy:hover,
.linkcopy:focus-visible { color: var(--accent); background: var(--accent-soft); }
.linkcopy:focus-visible { outline-offset: -3px; }
.linkcopy .icon-copied { display: none; }
.linkcopy.copied { color: var(--ok); background: var(--ok-soft); }
.linkcopy.copied .icon-copy { display: none; }
.linkcopy.copied .icon-copied { display: inline; }

/* Revealed by static/copy.js. Must come after .ticket and .linkcopy to beat them. */
.copyonly { display: none; }

/* A marker with no action beside it, for a value on the page rather than a button. */
.info-solo {
  font: italic 700 .85rem/1 Georgia, "Times New Roman", serif;
  cursor: help;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  margin-left: .2rem;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
}
.info-solo:hover, .info-solo[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* A plain button with nothing to explain: the masthead and similar. */
.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--accent);
  padding: .45rem .95rem;
  text-decoration: none;
  line-height: 1.25;
  transition: background-color .12s, color .12s, border-color .12s;
}
.btn:hover, .btn:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  text-decoration: none;
}
.btn-small { min-height: 2.25rem; padding: .3rem .75rem; font-size: var(--t-sm); }

/* ---------------------------------------------------------------------------
   The explanation panel, placed against the viewport by static/info.js.
   --------------------------------------------------------------------------- */

.infotext {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(24rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: .8rem 1rem;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 400 var(--t-sm)/1.5 var(--font);
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 28px rgba(24, 32, 43, .2);
}
.infotext[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   Rundmail preview (static/preview.js)
   --------------------------------------------------------------------------- */

.mailpreview { display: flex; flex-direction: column; gap: .4rem; width: 100%; max-width: 36rem; }
.mail {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mail-head {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .25rem 1rem;
  margin: 0;
  padding: .8rem 1.1rem;
  background: var(--ground-2);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
}
.mail-head dt { color: var(--ink-soft); }
.mail-head dd { margin: 0; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.mail-body { padding: 1rem 1.1rem 0; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 3rem; }
.mail-foot { margin: 1rem 1.1rem 0; padding-top: .8rem; border-top: 1px dashed var(--rule); font-size: var(--t-sm); }
.mail-foot code { display: inline-block; margin-top: .25rem; }
.mail-sig { margin: .8rem 1.1rem 1rem; color: var(--ink-soft); font-size: var(--t-sm); }
.mail-empty { color: var(--ink-soft); font-weight: 400; font-style: italic; }

/* ---------------------------------------------------------------------------
   Waiting for the conference to open
   --------------------------------------------------------------------------- */

.armed {
  --notch: var(--surface);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
  margin-bottom: var(--s5);
}
.armed h2 { margin: 0 0 .2rem; font-size: var(--t-lg); }
.armed p { margin: 0; color: var(--ink-soft); }
.armed dl { margin: .8rem 0 0; }
.armed-name { font-weight: 650; color: var(--ink); }

.spinner {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: .1rem;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* The poller's heartbeat: three dots that breathe. */
.waiting {
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: .35em;
  margin-top: var(--s4);
  animation: pulse 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 4s; }
  .pill-live::before, .waiting { animation: none; }
  * { transition: none !important; }
}

/* ---------------------------------------------------------------------------
   Small screens (360px and up)
   --------------------------------------------------------------------------- */

@media (max-width: 30rem) {
  .masthead { padding-inline: 1rem; }
  .wrap { padding-inline: 1rem; padding-block: var(--s5) var(--s6); }
  h1 { font-size: 1.6rem; }
  .panel { padding: 1.1rem; }
  .card { padding: 1rem; }
  .field:has(> .label-inline) { grid-template-columns: 1fr; }
  .field > .label-inline { border-right: 1px solid var(--rule-strong); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; min-height: 2.25rem; }
  .field > .label-inline + input { border-radius: 0 0 var(--radius) var(--radius); }
  .more summary { padding-left: .9rem; }
  .more > :not(summary) { margin-inline: .9rem; }
  .regfields { padding-inline: .9rem; }
  .actionbar-split { flex-direction: column-reverse; align-items: stretch; }
  .actionbar-split .ticket .ticket-action { flex: 1; }
}

/* The room name, editable inside the link (start screen of a free name). */
.linkbox-edit { align-items: center; background: var(--ground-2); }
.linkbox-edit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.linkbox-prefix { padding: .35rem 0 .35rem .7rem; font: var(--t-sm) var(--mono); color: var(--ink-soft); white-space: nowrap; cursor: text; }
.linkbox-edit input.linkbox-slug {
  width: auto;
  min-width: 4ch;
  min-height: 0;
  margin: .3rem 0;
  padding: .1rem .15rem;
  border: 0;
  border-bottom: 2px dashed var(--accent);
  border-radius: 3px 3px 0 0;
  background: transparent;
  color: var(--accent);
  font: 600 var(--t-sm) var(--mono);
  field-sizing: content;
}
.linkbox-edit input.linkbox-slug:hover { background: var(--surface); }
.linkbox-edit input.linkbox-slug:focus { background: var(--surface); box-shadow: none; outline: 0; border-bottom-style: solid; }
.linkbox-edit input.linkbox-slug:invalid { color: var(--bad); border-bottom-color: var(--bad); }
.linkbox-pen { display: inline-flex; align-items: center; padding: 0 .55rem 0 .35rem; color: var(--accent); cursor: text; align-self: stretch; }
.linkbox-edit .linkcopy { align-self: stretch; }
.roomlink .hint { margin: 0; }
@media (max-width: 30rem) { .linkbox-edit { flex-wrap: wrap; } .linkbox-edit .linkcopy { margin-left: auto; } .linkbox-edit input.linkbox-slug { min-width: 0; max-width: calc(100% - 2.5rem); } }

/* Plain grouping for fields that only an event uses; no box of its own. */
.fieldset-plain { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; margin: 0; padding: 0; border: 0; }
/* A chapter of the settings page, the unfolded twin of a .more panel. */
.chapter { display: flex; flex-direction: column; gap: 1.1rem; }
.chapter > h2 { margin: 1rem 0 0; }

/* Inside a chapter every field spans the chapter's full width, so all boxes line up. */
.more .field, .chapter .field, .regfields .field, .fieldset-plain .field { max-width: none; width: auto; }
.more > .field, .more > .fieldset-plain, .more > .regfields { width: auto; }

/* Chapters that follow the start form (Rundmail, Anmeldungen on an event). */
.chapters-after { margin-top: 1.5rem; }
.stack > .actionbar:last-child { margin-bottom: 0; }
.more > form.stack, .more > .tablewrap { margin-top: 1.1rem; }
.more > .tablewrap { margin-inline: 0; border-inline: 0; border-radius: 0; }

/* Forms inside a panel use the panel's full width. */
.panel .field { max-width: none; }

/* A choice that this conference can no longer take: shown, blocked out. */
.choice:has(input:disabled:not(:checked)) { opacity: .5; cursor: not-allowed; border-style: dashed; }

/* Undeliverable mails, at the end of the Anmeldungen chapter. */
.mailfail { display: flex; flex-direction: column; gap: .4rem; margin-top: 1.1rem; }
.mailfail .label { color: var(--bad); }
.mailfail li { font-size: .9rem; }

/* The address field of a new conference, drawn as the editable link. */
.field > .linkbox-edit { align-self: flex-start; }

/* Visually hidden, still read out. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Info marker attached to the end of a link box, the same seam as the copy button. */
.linkinfo {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.4rem; align-self: stretch; padding: 0; border: 0;
  border-left: 1px dashed var(--rule-strong, var(--rule));
  background: var(--surface); color: var(--ink-soft);
  font: italic 700 .95rem/1 Georgia, "Times New Roman", serif; cursor: help;
}
.linkinfo:hover, .linkinfo[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft, #eef1ec); }
.linkinfo:focus-visible { outline-offset: -3px; }

/* A meta list inside a form: the form's gap does the spacing, same as the room link above. */
.stack > .meta { margin: 0; }

/* New conference: "Weiter" first, the editable link beside it, one row. */
form.stack:has(> .field > .linkbox-edit) { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem; }
form.stack:has(> .field > .linkbox-edit) > .actionbar { order: -1; margin: 0; }
form.stack:has(> .field > .linkbox-edit) > .field { width: auto; max-width: 100%; flex: 0 1 auto; }
.panel:has(> form.stack > .field > .linkbox-edit) { padding-block: 1.1rem 1.25rem; }
.panel:has(> form.stack > .field > .linkbox-edit) > h2 { margin: 0 0 .75rem; }

/* "Weiter" and the link box share one height: the taller decides. */
form.stack:has(> .field > .linkbox-edit) { align-items: stretch; }
form.stack:has(> .field > .linkbox-edit) > .field > .linkbox-edit { flex: 1 1 auto; }
form.stack:has(> .field > .linkbox-edit) > .actionbar { align-items: stretch; }

/* A registration whose mail could not be delivered: the row in orange, a pill under the address. */
.grid tr.undelivered td { background: var(--fail-soft, #fdf0e0); }
.pill-failed { margin-top: .35rem; background: var(--fail-soft, #fdf0e0); border: 1px solid var(--fail, #8a4b00); color: var(--fail, #8a4b00); }

/* The part of a message that asks for a manual step. */
.needs-action { font-weight: 700; color: var(--fail, #8a4b00); background: var(--fail-soft, #fdf0e0); padding: 0 .25em; border-radius: 3px; }

/* Light / dark switch in the masthead (static/theme.js): no frame, small, quiet. */
.btn.themetoggle {
  min-height: 2rem;
  width: 2rem;
  padding: 0;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}
.btn.themetoggle:hover, .btn.themetoggle:focus-visible { background: var(--ground-2); color: var(--ink); border-color: transparent; }
.nav > .themetoggle { margin-left: -.3rem; }

/* Grid items default to min-width:auto and would grow to the longest link. */
.cards > .card { min-width: 0; }
.card .linkbox { max-width: 100%; }

/* Narrow screens: the domain is shortened to its first part, e.g. "meet…/", so it still reads as
   the same address. The full address stays in the text (copy.js copies textContent) and in the
   title of the shortened part. */
@media (max-width: 30rem) {
  .link-host { font-size: 0; }
  .link-host::before { content: attr(data-short); font-size: var(--t-sm); color: var(--ink-soft); }
}

/* Edit control used wherever a value can be changed: a pencil, labelled "bearbeiten". Markup: <a class="change change-icon" title="bearbeiten" aria-label="bearbeiten"><svg …/></a> */
.change-icon { position: relative; display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin: -.4rem -.5rem -.4rem 0; border-radius: 4px; color: var(--accent); text-decoration: none; }
.change-icon:hover, .change-icon:focus-visible { background: var(--accent-soft); color: var(--accent); }
.change-icon::after { content: attr(aria-label); position: absolute; right: 0; bottom: calc(100% + .3rem); padding: .2rem .45rem; border-radius: 4px; background: var(--ink); color: var(--surface); font-size: var(--t-sm); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; }
.change-icon:hover::after, .change-icon:focus-visible::after { opacity: 1; }


/* ---------------------------------------------------------------------------
   Assistance for creating a conference, and the settings page built from the
   same questions (D-153). The start block on the landing page and the
   dashboard, the steps, the overview, and the overlay a settings row opens.
   --------------------------------------------------------------------------- */

/* The two ways to start, side by side: "Sofort starten" and "Genauer einstellen". */
.starts { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .75rem; }
.starts > li { display: flex; min-width: 0; }
.ticket-tile { flex: 1; width: 100%; background: var(--surface); box-shadow: var(--shadow); }
.ticket-tile .ticket-action { flex: 1; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .2rem; padding: .9rem 1rem 1rem; }
.ticket-tile .ticket-action strong, .ticket-tile .ticket-action small { display: block; flex: none; align-self: stretch; width: 100%; }
.ticket-tile .ticket-action strong { line-height: 1.3; font-size: var(--t-lg); font-weight: 650; }
.ticket-tile .ticket-action small { font-weight: 400; font-size: var(--t-sm); line-height: 1.4; color: var(--ink-soft); }
.ticket-tile .ticket-action:hover small, .ticket-tile .ticket-action:focus-visible small { color: inherit; }
.ticket-tile .ticket-info { align-self: stretch; }
/* The step bar: one segment per step; on a phone only the current one is named. */
.steps { list-style: none; margin: 0 0 var(--s5); padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .35rem; counter-reset: step; }
.steps li { counter-increment: step; min-width: 0; padding-top: .45rem; border-top: 4px solid var(--rule); font-size: var(--t-xs); line-height: 1.3; color: var(--ink-soft); }
.steps li::before { content: counter(step) ". "; font-weight: 700; }
.steps li.done { border-top-color: var(--accent); }
.steps li.done a { color: var(--accent); }
.steps li[aria-current="step"] { border-top-color: var(--accent); color: var(--ink); font-weight: 650; }
@media (max-width: 30rem) {
  .steps { grid-auto-columns: auto; }
  .steps li:not([aria-current]) > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .steps li[aria-current] { grid-column: span 1; }
}

input[type=date] {
  font: inherit; width: 100%; min-height: 2.75rem; padding: .55rem .75rem;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
input[type=date]:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* The overview, and the settings page built from it: each answer with its way back. */
.summary-list { padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.summary-list dd { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; }
.summary-list dd > span { min-width: 0; overflow-wrap: anywhere; text-wrap: pretty; }
.summary-list dd > .change { flex: none; margin-left: auto; }
.change { font-size: var(--t-sm); }
.optional { font-weight: 400; color: var(--ink-soft); }

/* The overview's link field sits in a wrapper so app.css's one-line "Weiter" layout does not apply. */
.linkfield > .field { max-width: none; }

/* Landing: link field centred, same gap to the tiles as the tiles have to the next panel. */
.hero:has(> form.stack.wizard) { display: flex; flex-direction: column; gap: var(--s5); margin-bottom: var(--s5); }
.hero:has(> form.stack.wizard) > h1 { margin: 0; }
.hero > form.stack.wizard { gap: var(--s5); margin: 0; }
.hero > form.stack.wizard > .starts { margin-top: 0; }
.hero .linkfield > .field { justify-items: center; align-items: center; text-align: center; }
.hero .linkfield .linkbox { margin-inline: auto; }

/* Fields span the full content width, like the stepper above them. */
.field { max-width: none; }

/* Landing: "Sofort starten" is the default path, the wizard is the quieter alternative. */
.hero .starts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ticket-tile.ticket-primary { background: var(--accent); }
.ticket-tile.ticket-primary .ticket-action, .ticket-tile.ticket-primary .ticket-action small,
.ticket-tile.ticket-primary .ticket-info { color: var(--on-accent); }
.hero .ticket-quiet { background: transparent; box-shadow: none; }
@media (max-width: 40rem) { .hero .starts { grid-template-columns: minmax(0, 1fr); } }

/* Settings: one summary, each pencil opens the matching question (static/editsheet.js). */
.settings-summary { width: 100%; }
.settings-summary dt { white-space: nowrap; }
button.change { font: inherit; font-size: var(--t-sm); background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; flex: none; }
button.change:hover { color: var(--ink); }
.editsheet { width: min(40rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--bg, var(--surface)); color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
.editsheet::backdrop { background: rgb(0 0 0 / .55); }
.editsheet > h2 { margin: 0; padding: 1.1rem 1.25rem; font-size: var(--t-lg); border-bottom: 1px solid var(--rule); }
.editsheet-body { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: var(--s5); }
.editsheet-body > * { margin: 0; }
.editsheet-body .field { max-width: none; }
.editsheet .actionbar { position: sticky; bottom: 0; margin: 0; padding: .9rem 1.25rem; background: inherit; border-top: 1px solid var(--rule); }
.editsaved { width: 100%; }

/* Without script the pencil jumps to the question, which then shows in the page rather than
   as an overlay. The overlay is a dialog, which is display:none until it is opened. */
dialog.editsheet:target:not([open]) { display: block; position: static; inset: auto; width: 100%; max-height: none; margin: var(--s5) 0 0; box-shadow: none; }
a.change { font-size: var(--t-sm); }

