:root {
  --bg: #0a0a0f;
  --bg-soft: #111119;
  --fg: #f3f4f8;
  --muted: #9aa0b4;
  --accent: #ff3d7f;
  --accent-fg: #0a0a0f;
  --card: #14141d;
  --line: #24242f;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  --ok: #35d07f;
  --warn: #ffb020;
  --bad: #ff4d4d;
}

* { box-sizing: border-box; }

/* ---------- ops: sale switcher ---------- */
.sale-select {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  max-width: 100%;
}

/* ---------- scrollbars ---------- */
/* The ledger feed is the first place a browser's default grey bar appears
   inside a card, and it reads as an OS control dropped into the design. One
   treatment for every scroll container: a thin inset pill that picks up the
   tenant's accent on hover. `scrollbar-color` covers Firefox; the WebKit
   pseudo-elements cover Chrome, Safari and Edge. */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 34%, transparent);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 999px;
  min-height: 32px;
}

*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  background-clip: content-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox only. Declaring `scrollbar-color` on `*` would make Chrome ignore
   every `::-webkit-scrollbar` rule above and fall back to an overlay bar, so
   the standard properties live behind a feature query Chrome does not match. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--muted) 38%, transparent) transparent;
  }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark { color: var(--accent); font-size: 18px; }
.brand-name { font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em; }

.nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.nav-link { color: var(--muted); display: inline-flex; align-items: center; min-height: 32px; }
.nav-link:hover { color: var(--fg); }
.nav-link.is-active { color: var(--fg); }
.nav-sep { width: 1px; height: 16px; background: var(--line); }
.powered { color: var(--muted); font-size: 12px; }
.powered strong { color: var(--accent); letter-spacing: 0.1em; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer-note { font-style: italic; }

/* ---------- typography ---------- */

h1 { font-size: 40px; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 12px; }
h2 { font-size: 20px; letter-spacing: -0.02em; margin: 0 0 12px; }
h3 { font-size: 15px; letter-spacing: -0.01em; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.lead { font-size: 17px; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.center { text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- layout ---------- */

.hero { padding: 8px 0 32px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card-tight { padding: 14px; }
.card-accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.right { text-align: right; }
.spacer { flex: 1; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { min-height: 110px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ---------- stats ---------- */

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-value.xl { font-size: 46px; }
.stat-hint { font-size: 11px; color: var(--muted); }
.stat-value.ok { color: var(--ok); }
.stat-value.bad { color: var(--bad); }

/* ---------- badges & pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
}
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.badge.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- bars ---------- */

.bar { height: 7px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; background: var(--accent); transition: width 0.3s ease; }
.bar-fill.ok { background: var(--ok); }
.bar-fill.warn { background: var(--warn); }

/* ---------- tier cards ---------- */

.tier { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.tier-name { font-weight: 700; }
.tier-price { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tier.is-selected { border-color: var(--accent); }

/* ---------- ticket ---------- */

.ticket {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 760px) { .ticket { grid-template-columns: 1fr; } }

.qr-wrap {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-wrap svg { width: 100%; height: auto; display: block; }
.qr-frozen { outline: 3px solid var(--warn); outline-offset: 4px; }

.code-line {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  max-height: 96px;
  overflow: hidden;
}

/* ---------- state machine ---------- */

.states { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.state {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-soft);
}
.state.is-active { border-color: var(--accent); color: var(--fg); box-shadow: 0 0 0 1px var(--accent) inset; }
.state.is-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.state.is-failed { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

/* ---------- tables & feeds ---------- */

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); font-weight: 600; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }

.feed { display: flex; flex-direction: column; gap: 0; max-height: 260px; overflow-y: auto; font-size: 12px; scrollbar-gutter: stable; padding-right: 2px; }
.feed-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.feed-kind { font-family: ui-monospace, Menlo, monospace; color: var(--accent); }

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
}
.notice.bad { border-left-color: var(--bad); }
.notice.ok { border-left-color: var(--ok); }
.notice.warn { border-left-color: var(--warn); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }

.big-number { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
/* ==========================================================================
   v2 additions — language switch, payment plans, resale, sweeper, login
   Appended rather than interleaved: the sheet above is the base layer and every
   token below reuses it (--accent, --line, --card), so a new brand still only
   has to declare the variables.
   ========================================================================== */

.lang-switch {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-switch:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.narrow {
  max-width: 640px;
}

/* Two columns where the right one is a control panel: wider than half, and
   collapsing to one column well before a phone. */
.grid.split {
  grid-template-columns: 1.35fr 1fr;
}

@media (max-width: 900px) {
  .grid.split {
    grid-template-columns: 1fr;
  }
}

/* -- payment plan picker -------------------------------------------------- */

.plan-choice {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.plan-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.plan-option:hover {
  border-color: var(--accent);
}

.plan-option.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.plan-name {
  font-weight: 600;
}

.schedule {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-row:nth-child(odd) {
  background: var(--bg-soft);
}

/* -- resale --------------------------------------------------------------- */

.resale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

/* -- queue progress ------------------------------------------------------- */

.live-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  margin: 4px 0 16px;
}

.live-meter-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.6s ease;
}

/* -- small buttons -------------------------------------------------------- */

.btn-xs {
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 8px;
}

/* -- login ---------------------------------------------------------------- */

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg, #0b0b0f);
  color: var(--fg, #f4f4f5);
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", sans-serif);
  margin: 0;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card, #14141a);
  border: 1px solid var(--line, #26262f);
  border-radius: var(--radius, 16px);
  padding: 28px;
}

.login-card h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

.login-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(127, 127, 127, 0.15);
  padding: 1px 5px;
  border-radius: 5px;
}

/* The plan/resale cards on the ticket page sit side by side and should start
   their headings at the same line, whatever their content height. */
.grid .card h3:first-child {
  margin-top: 0;
}

/* -- raportul public de onestitate --------------------------------------- */
.proof-banner {
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.proof-seal {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.claims {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.claims li {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 0.9rem;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}
.claims li:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 720px) {
  .claims li { grid-template-columns: 1fr; gap: 0.15rem; }
}
.big-number {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  margin: 0.2rem 0 0.1rem;
}
.fineprint {
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin-top: 1.6rem;
}
.claims li.fail strong { color: #ff6b6b; }
.claims .bad { color: #ff6b6b; }
.grid.split { align-items: start; }

/* -- selectable ticket-type cards --------------------------------------- */
/* A <button> does not inherit `color`, so these cards rendered in the browser's
   default button text colour on a dark background — the one control a buyer has
   to read was the least readable thing on the page. */
.tier-card {
  color: var(--fg);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tier-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tier-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-soft));
}
.tier-card .tier-price { color: var(--fg); }
.tier-check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12px;
  font-weight: 700;
}
.tier-card[disabled] { opacity: 0.5; cursor: not-allowed; }

/* -- collapsible signed payload ----------------------------------------- */
.payload-card summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  min-height: 24px;
  display: list-item;
}

.payload-card[open] summary { margin-bottom: 8px; }

.payload summary {
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
.payload summary:hover { color: var(--fg); }
.payload[open] summary { color: var(--fg); margin-bottom: 6px; }

/* -- gate verdicts ------------------------------------------------------- */
/* The door shows one decision at a time and it must be readable from a metre
   away, in the dark, on a phone held by someone wearing gloves. */
.verdict {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.verdict.ok { color: var(--ok); }
.badge-fast {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* The event page is a document and its numbers are patched by a poller, so
   visibility is driven by the `hidden` attribute. Nothing else in this file sets
   `display` on those nodes; this rule is what makes `hidden` mean hidden. */
[hidden] { display: none !important; }

/* -- waiting list block inside a sold-out tier --------------------------- */
.waitlist {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-soft));
}
.waitlist input { font-size: 13px; }
.warn-text { color: var(--warn); }

/* ==========================================================================
   v3 additions — what the browser said, on a phone

   Every rule below was written after loading the pages at 1440, 820 and 390 px
   and looking at the result, not after reading the sheet. The pattern they all
   share: the desktop layout was the layout, and the narrow widths were left to
   the browser to negotiate — which it does by scrolling the page sideways.
   ========================================================================== */

/* A grid child defaults to min-width: auto, so one wide table inside a card
   widens its whole column and the document, not the card, becomes the scroll
   container. Nothing in a card may vote on the page width. */
.grid > * { min-width: 0; }
.card { min-width: 0; }
.row-between { flex-wrap: wrap; }

/* -- the console's two columns ------------------------------------------- */
/* The console used an inline `grid-template-columns: 1.4fr 1fr`, so no media
   query could reach it: at 820 px the second column hung 32 px outside the
   viewport, at 390 px the whole console was a 852 px page. */
.grid.ops { grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 900px) {
  .grid.ops { grid-template-columns: 1fr; }
}

/* -- tables that carry five or six numbers -------------------------------- */
/* Squeezed into 350 px the settlement headers merged into "RAILCOMENZI" and
   the amounts ran together ("329.949,0015.713,14"). A table with six numeric
   columns is allowed to be wider than a phone: the wrapper scrolls. */
.table-scroll { overflow-x: auto; }
@media (max-width: 720px) {
  .table-scroll { margin: 0 -2px; padding: 0 2px; }
  .table-scroll table { min-width: 460px; }
}

/* -- payment schedule rows ----------------------------------------------- */
/* On the ticket page the third column is a date *and* a pay button; at 390 px
   both wrapped to three lines each. The date and the button get their own row
   and the numbers keep the first one. */
.tier-price { white-space: nowrap; }
@media (max-width: 620px) {
  .schedule-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  /* Only the rows that carry a pay button need the extra line; a bare date stays
     on the same line as the amount it belongs to. */
  .schedule-row:has(button) > :nth-child(3) { grid-column: 1 / -1; justify-self: end; }
  .tier { flex-wrap: wrap; }
  .tier > :last-child { width: 100%; justify-content: flex-end; }
  .upgrade-row { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .upgrade-row .btn { margin-left: auto; }
}

/* -- the header on a phone ------------------------------------------------ */
/* The nav was a single unwrapping row 395 px wide: on a 390 px viewport every
   page scrolled sideways and "powered by EPS" sat outside the screen. The
   brand keeps the first line, the links take the second, and the things that
   are decorations on a phone ("powered by", the separator) step aside. */
@media (max-width: 720px) {
  .shell { padding: 0 14px 40px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 14px 0 10px; margin-bottom: 22px; }
  .brand-name { font-size: 14px; }
  .nav { width: 100%; flex-wrap: wrap; gap: 4px 16px; }
  /* 20 px tall links are below the 24 px minimum a thumb can hit. */
  .nav-link { display: inline-flex; align-items: center; min-height: 32px; }
  .nav-sep, .powered { display: none; }
  .lang-switch { margin-left: auto; min-height: 28px; }
  .footer { flex-direction: column; gap: 4px; }
  h1 { font-size: 26px; }
  .big-number { font-size: 44px; }
  .verdict { font-size: 26px; }
}

/* -- age-band choices ------------------------------------------------------ */
/* `.choice` was in the markup and in no stylesheet: the three labels rendered as
   bare text with a padded radio (the global input rule gives every input 11px of
   padding), and on a phone "MINOR 15–18" broke across two lines mid-label. */
.choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.choice:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.choice.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input[type="radio"] { width: auto; padding: 0; margin: 0; accent-color: var(--accent); }

@media (max-width: 620px) {
  .row { flex-wrap: wrap; }
}

/* ==========================================================================
   v4 additions — a catalogue, not a checkout

   The first three layers built the mechanics; this one gives them a shopfront.
   Every rule below exists to answer one question a buyer asks before trusting a
   ticketing site: what is on, where, how much, and is it actually still there?
   The art is generated from the event row (see EpsWeb.EventArt) so a new brand
   gets a poster without an image upload — and a page with no stock photography
   does not look like a prototype.
   ========================================================================== */

/* -- typography: a display face per brand, body stays legible -------------- */
h1, h2, h3, .brand-name, .tier-price, .buy-price, .feature-stat-title, .act-name {
  font-family: var(--font-display, var(--font));
}
h1 { text-wrap: balance; }
h2 { text-wrap: balance; }

/* -- generated posters ----------------------------------------------------- */

.poster {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 12% 8%, color-mix(in srgb, var(--p-glow) 48%, transparent) 0%, transparent 52%),
    radial-gradient(95% 85% at 88% 98%, color-mix(in srgb, var(--p-from) 90%, transparent) 0%, transparent 64%),
    linear-gradient(158deg, var(--p-from) 0%, var(--p-to) 76%);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(75% 65% at 68% 36%, color-mix(in srgb, var(--p-glow) 34%, transparent) 0%, transparent 70%);
}

.poster-rings { position: absolute; inset: 0; }

.poster-grain {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
  opacity: 0.45;
  mix-blend-mode: overlay;
}

.poster-mark {
  position: absolute;
  right: -0.06em;
  bottom: -0.24em;
  font-size: 9rem;
  line-height: 1;
  color: color-mix(in srgb, var(--p-glow) 30%, transparent);
  text-shadow: 0 0 80px color-mix(in srgb, var(--p-glow) 45%, transparent);
  pointer-events: none;
}

.poster-top {
  position: absolute;
  inset: 14px 16px auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.poster-eyebrow,
.poster-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.poster-label { color: var(--p-glow); }

.poster-bottom {
  position: absolute;
  inset: auto 16px 14px;
}

.poster-lineup {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* The pattern is the only thing that changes between posters: the palette comes
   from the event, so two events by the same organiser can be cousins, not twins. */
.poster--orb .poster-rings {
  background:
    radial-gradient(circle at 67% 43%, transparent 0 17%, color-mix(in srgb, var(--p-glow) 55%, transparent) 17.2% 17.7%, transparent 18%),
    radial-gradient(circle at 67% 43%, transparent 0 29%, color-mix(in srgb, var(--p-glow) 34%, transparent) 29.2% 29.6%, transparent 30%),
    radial-gradient(circle at 67% 43%, transparent 0 44%, color-mix(in srgb, var(--p-glow) 20%, transparent) 44.2% 44.4%, transparent 45%);
}

.poster--beam .poster-rings {
  background: conic-gradient(from 198deg at 50% -8%, transparent 0 39%, color-mix(in srgb, var(--p-glow) 42%, transparent) 46%, transparent 53% 100%);
  opacity: 0.6;
}

.poster--grid .poster-rings {
  background-image:
    linear-gradient(color-mix(in srgb, var(--p-glow) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--p-glow) 22%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
}

.poster--sun .poster-rings {
  background: repeating-linear-gradient(180deg, transparent 0 18px, color-mix(in srgb, var(--p-glow) 32%, transparent) 18px 20px);
  -webkit-mask-image: linear-gradient(180deg, transparent 42%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 42%, #000 100%);
}

.poster--ridge .poster-rings {
  background: repeating-linear-gradient(115deg, color-mix(in srgb, var(--p-glow) 17%, transparent) 0 2px, transparent 2px 26px);
  -webkit-mask-image: linear-gradient(180deg, transparent 18%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 18%, #000 100%);
}

.poster--bloom .poster-rings {
  background:
    radial-gradient(circle at 72% 26%, color-mix(in srgb, var(--p-glow) 40%, transparent) 0 8%, transparent 9%),
    radial-gradient(circle at 83% 58%, color-mix(in srgb, var(--p-glow) 26%, transparent) 0 14%, transparent 15%),
    radial-gradient(circle at 58% 74%, color-mix(in srgb, var(--p-glow) 20%, transparent) 0 11%, transparent 12%);
  filter: blur(7px);
}

.poster--wave .poster-rings {
  background: repeating-radial-gradient(ellipse at 50% 122%, transparent 0 30px, color-mix(in srgb, var(--p-glow) 22%, transparent) 30px 33px);
}

/* -- chips ---------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  font-size: 12px;
  color: var(--fg);
}

.chip-sm {
  padding: 4px 9px;
  font-size: 11px;
  color: var(--muted);
  background: transparent;
}

/* -- section heads -------------------------------------------------------- */

.section { margin-top: 40px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.03em;
  margin: 0;
}

.section-head .eyebrow { margin-bottom: 6px; }

/* -- the featured event --------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 40px;
  align-items: center;
  padding: 6px 0 46px;
  border-bottom: 1px solid var(--line);
}

.feature h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 18px;
}

.feature .lead { font-size: 17px; }

.feature-art { display: block; min-width: 0; }
.poster-tall { aspect-ratio: 4 / 4.6; }
.poster-tall .poster-mark { font-size: 15rem; }

.feature-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.feature-stat { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.feature-stat-title { font-size: 14px; font-weight: 700; }

/* -- filters -------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: 6px; }

.filter {
  appearance: none;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.filter:hover { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

/* -- event cards ---------------------------------------------------------- */

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.event-card-art { position: relative; }

.event-card .poster { aspect-ratio: 16 / 10; border: 0; border-radius: 0; }
.event-card .poster-mark { font-size: 6.5rem; }

.event-flag {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.event-flag.ok { color: #9cf0c0; }
.event-flag.warn { color: #ffcf7a; }
.event-flag.bad { color: #ff9a9a; }
.event-flag.accent { color: var(--accent); }

.event-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 16px 16px 14px;
}

.event-card-body h3 { font-size: 17px; letter-spacing: -0.02em; margin: 0; }

.event-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.event-price { font-size: 14px; font-weight: 700; }
.event-cta { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* -- trust band ----------------------------------------------------------- */

.trust-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 22px;
  margin-top: 46px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.trust { display: flex; flex-direction: column; gap: 5px; }
.trust-icon { color: var(--accent); font-size: 16px; line-height: 1; }
.trust strong { font-size: 13px; }

/* -- white-label band ----------------------------------------------------- */

.brand-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* -- event page: art hero ------------------------------------------------- */

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
}

.back-link:hover { color: var(--fg); }

.event-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
}

.event-hero-poster {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.event-hero-poster .poster-top,
.event-hero-poster .poster-bottom { display: none; }

.event-hero-poster .poster-mark {
  font-size: clamp(200px, 34vw, 420px);
  right: -0.04em;
  bottom: -0.3em;
}

.event-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 46%, color-mix(in srgb, var(--bg) 94%, transparent) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 78%, transparent) 0%, transparent 72%);
}

.event-hero-body {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 46px 46px 42px;
}

.event-hero h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 14px;
}

.event-hero .lead { font-size: 16px; }

/* -- lineup --------------------------------------------------------------- */

.lineup-grid {
  display: grid;
  grid-template-columns: repeat(var(--lineup-days, 4), minmax(0, 1fr));
  gap: 14px;
}

.event-secondary { margin-top: 16px; align-items: start; }

@media (max-width: 1000px) {
  .lineup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .lineup-grid { grid-template-columns: 1fr; }
}

.lineup-day {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.lineup-date {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lineup-act { display: flex; flex-direction: column; gap: 1px; }
.act-name { font-size: 14px; font-weight: 600; }
.act-name.is-headliner { font-size: 18px; font-weight: 800; letter-spacing: -0.025em; }
.act-stage { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* -- event page: body ----------------------------------------------------- */

.event-main { margin-top: 30px; }
.sidebar { position: sticky; top: 16px; }

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.highlight { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }

.tier-rights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tier-rights .chip { background: transparent; color: var(--muted); }
.tier-rights + .bar { margin-top: 12px; }

.buy-price {
  margin: 2px 0 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* -- FAQ ------------------------------------------------------------------ */

.faq { padding: 12px 0; border-bottom: 1px solid var(--line); }
.faq:last-child { padding-bottom: 0; border-bottom: 0; }

.faq summary {
  display: flex;
  align-items: center;
  min-height: 32px;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 8px 0 0; font-size: 13px; }

/* -- checkout: which event am I buying? ----------------------------------- */

.checkout-event {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.checkout-event-art { flex: 0 0 92px; width: 92px; }
.checkout-event-art .poster { aspect-ratio: 16 / 10; border-radius: 8px; }
.checkout-event-art .poster-top,
.checkout-event-art .poster-bottom { display: none; }
.checkout-event-art .poster-mark { font-size: 44px; }
.checkout-event-body { flex: 1; min-width: 0; }
.checkout-event-body h2 { margin: 0; font-size: 18px; }

/* -- footer --------------------------------------------------------------- */

.footer {
  display: block;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 24px;
}

.footer-brand .brand { font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 7px; }
.footer-col h4 {
  margin: 0 0 4px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}
.footer-col a { display: inline-flex; align-items: center; min-height: 28px; }
.footer-col a:hover { color: var(--fg); }
.footer-plain { color: var(--muted); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* -- large button --------------------------------------------------------- */

.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

/* -- v4 responsive -------------------------------------------------------- */

@media (max-width: 1000px) {
  .feature { grid-template-columns: 1fr; gap: 26px; }
  .feature-art { order: -1; }
  .poster-tall { aspect-ratio: 16 / 10; }
  .poster-tall .poster-mark { font-size: 10rem; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .highlight-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (max-width: 720px) {
  .feature { padding-bottom: 34px; }
  .feature h1 { font-size: 38px; }
  .section { margin-top: 30px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filters { width: 100%; }
  .event-grid { grid-template-columns: 1fr; }
  .trust-band { grid-template-columns: 1fr; padding: 18px; }
  .event-hero { min-height: 0; }
  .event-hero-body { padding: 26px 20px 26px; }
  .event-hero h1 { font-size: 34px; }
  .event-hero .lead { font-size: 15px; }
  .highlight-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .checkout-event { flex-wrap: wrap; }
  .checkout-event-body { flex-basis: calc(100% - 108px); }
  .checkout-event > .btn { margin-left: auto; }
}

@media (max-width: 480px) {
  .highlight-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .event-card .poster { aspect-ratio: 4 / 3; }
}

/* -- v4.1: sticky chrome, cleaner card labels ----------------------------- */

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -20px 32px;
  padding: 18px 20px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.event-card-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 720px) {
  .topbar { margin: 0 -14px 22px; padding: 14px 14px 10px; }
  .event-flag { right: 10px; top: 10px; }
  .nav-link { min-width: 24px; }
}

/* -- mobile buy bar ------------------------------------------------------- */
/* On a phone the lineup and the tier list push the identity form a long way
   down the page. The bar is the primary action, always one thumb away; it
   points at the tickets, not at the form, because choosing a price comes first. */
.buy-bar { display: none; }

@media (max-width: 900px) {
  .with-buy-bar { padding-bottom: 84px; }

  .buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .buy-bar-price { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .buy-bar-price strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buy-bar .btn { flex: 0 0 auto; min-height: 42px; }
  .buy-bar .btn { font-size: 13px; padding: 10px 14px; }
}
