/*
 * IRONFORM app styles — the alpha-slice subset of the oracle's app.css,
 * rebuilt on the token sheet. Everything references tokens or roles; no raw
 * hex in structural rules (ADR-0032 discipline carried over).
 */

* { box-sizing: border-box; }
html { font-size: 16px; }
body.app {
  margin: 0;
  background: var(--b-bg);
  color: var(--b-fg);
  font-family: var(--b-font-body);
  font-size: var(--b-text-base);
  line-height: var(--b-leading-normal);
  min-height: 100vh;
}
a { color: var(--lb); text-decoration: none; }
b { font-weight: var(--b-weight-semibold); }
hr { border: 0; border-top: var(--b-border-w) solid var(--border-subtle); margin: var(--b-space-3) 0; }

/* ── App chrome ─────────────────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; gap: var(--b-space-4);
  padding: var(--b-space-3) var(--b-space-4);
  background: var(--bg);
  border-bottom: var(--b-border-w) solid var(--border-subtle);
}
.wordmark {
  font-family: var(--b-font-heading); font-weight: 800; font-size: var(--b-text-xl);
  letter-spacing: 0.02em; color: var(--text-primary); text-transform: uppercase;
}
.wordmark em { font-style: normal; color: var(--role-primary); }
.app-header .chrome { margin-left: auto; display: flex; align-items: center; gap: var(--b-space-3); }
.signin { display: inline-flex; align-items: center; gap: var(--b-space-1); color: var(--lb); font-weight: var(--b-weight-semibold); }
main.container { max-width: 720px; margin: 0 auto; padding: var(--b-space-4); }
.app-foot { max-width: 720px; margin: 0 auto; padding: var(--b-space-4); color: var(--text-faint); }
.judgefoot { display: block; text-align: center; color: var(--text-muted); padding: var(--b-space-4) 0; }
body.bare main.container { max-width: 900px; }

.theme-toggle {
  position: fixed; right: var(--b-space-4); bottom: var(--b-space-4); z-index: 50;
  background: var(--surface-overlay); color: var(--text-muted);
  border: var(--b-border-w) solid var(--border-strong); border-radius: var(--b-radius-full);
  padding: var(--b-space-2) var(--b-space-3); font: inherit; font-size: var(--b-text-sm);
  cursor: pointer; box-shadow: var(--b-shadow-md);
}
.theme-toggle:hover { background: var(--hover); }

/* ── Shared voltage bits ────────────────────────────────────────────── */
.pip, .livedot {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--b-font-mono); font-size: 9px; color: var(--role-attention);
}
.pip::before, .livedot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--role-attention); }
.bdot { display: inline-block; width: 8px; height: 8px; border-radius: var(--b-radius-full);
  background: var(--role-attention); margin-right: var(--b-space-1); animation: ifpulse 1.6s infinite var(--b-ease); }
@keyframes ifpulse { 50% { opacity: 0.35; } }
.chip {
  font-family: var(--b-font-heading); text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  border: var(--b-border-w) solid var(--border-strong); border-radius: 7px;
  padding: 6px 12px; display: inline-flex; align-items: center; gap: 4px;
}
.youpill {
  font-size: var(--b-text-xs); font-weight: var(--b-weight-bold); color: var(--role-presence);
  background: var(--green-a); border: var(--b-border-w) solid var(--green-line);
  border-radius: var(--b-radius-full); padding: 0 var(--b-space-2); margin-left: var(--b-space-2);
}
.ycount {
  font-size: var(--b-text-xs); font-weight: var(--b-weight-bold); color: var(--role-presence);
  background: var(--green-a); border-radius: var(--b-radius-full);
  padding: 0 var(--b-space-2); margin-left: var(--b-space-2);
}
.chev { color: var(--text-faint); margin-left: var(--b-space-2); }

/* ── Navigator (landing) ────────────────────────────────────────────── */
.nav-search {
  width: 100%; padding: var(--b-space-3); font: inherit;
  background: var(--surface-raised); color: var(--text-primary);
  border: var(--b-border-w) solid var(--border-strong); border-radius: var(--b-radius-md);
}
.nav-search::placeholder { color: var(--text-faint); }
.chips { display: flex; gap: var(--b-space-2); margin: var(--b-space-3) 0; }
.chips .chip { user-select: none; cursor: pointer; }
.chips .chip input { position: absolute; opacity: 0; pointer-events: none; }
.chips .chip.on, .chips .chip:has(input:checked) { color: var(--ink-on-primary); border-color: var(--lb); background: var(--lb); }
.noresults { color: var(--text-muted); padding: var(--b-space-5) 0; text-align: center; }
.seclbl {
  font-family: var(--b-font-heading); font-weight: 700;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin: var(--b-space-5) 0 9px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.evcard {
  display: flex; align-items: center; gap: var(--b-space-3);
  background: var(--surface-raised); color: var(--text-primary);
  border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md);
  padding: var(--b-space-3); margin-bottom: var(--b-space-2);
  transition: background var(--b-duration-fast) var(--b-ease);
}
.evcard:hover { background: var(--hover); }
.evcard.hero { border-color: var(--green-line); }
.evcard .date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  background: var(--bg); border: var(--b-border-w) solid var(--border-strong);
  border-radius: 10px;
}
.evcard .date .mo { font-family: var(--b-font-heading); font-size: 9px; text-transform: uppercase; color: var(--text-faint); line-height: 1; }
.evcard .date .dy { font-family: var(--b-font-mono); font-weight: 700; font-size: 16px; color: var(--text-muted); line-height: 1; }
.evcard.now .date .dy { color: var(--role-attention); }
.evbody { display: flex; flex-direction: column; min-width: 0; }
.evnm { font-family: var(--b-font-heading); text-transform: uppercase; letter-spacing: 0.03em; font-size: 16px; font-weight: 700; line-height: 1.1; }
.evmeta { font-family: var(--b-font-mono); font-size: 10px; color: var(--text-faint); }
.evmeta b { color: var(--role-presence); }
.evcard .pip, .evcard .chip { margin-left: auto; }
.evcard .pip + .chev, .evcard .chip + .chev { margin-left: var(--b-space-2); }
.evcard .chev:only-child { margin-left: auto; }

/* ── Event hub ──────────────────────────────────────────────────────── */
.hub .hubtop { display: flex; align-items: center; gap: var(--b-space-3); margin-bottom: var(--b-space-2); }
.hub .back {
  font-size: var(--b-text-xl); color: var(--text-muted); padding: 0 var(--b-space-2);
  border-radius: var(--b-radius-sm);
}
.hub .back:hover { background: var(--hover); }
.hub .hubtitle { font-family: var(--b-font-heading); font-weight: 800; font-size: var(--b-text-2xl); }
.evwhen { color: var(--text-muted); margin-bottom: var(--b-space-4); }
.modebar { display: flex; gap: var(--b-space-2); margin-bottom: var(--b-space-5); }
.mode {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-md); padding: var(--b-space-3);
}
.mode .ml { font-family: var(--b-font-heading); text-transform: uppercase; letter-spacing: 0.04em; font-size: 14px; font-weight: 800; }
.mode .ms { font-family: var(--b-font-mono); font-size: 9px; color: var(--text-faint); }
.mode.register { border-color: rgba(77,143,255,0.35); }
.mode.athlete { border-color: rgba(124,77,255,0.30); }
.mode.off { opacity: 0.45; }

/* ── Competition tree ───────────────────────────────────────────────── */
.tree { display: flex; flex-direction: column; }
.node {
  display: flex; align-items: center; gap: var(--b-space-2); width: 100%;
  color: var(--text-primary); background: var(--surface-raised);
  border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md);
  padding: var(--b-space-3); margin-bottom: var(--b-space-2); font: inherit; text-align: left;
}
a.node:hover { background: var(--hover); }
.node .nm { font-weight: var(--b-weight-semibold); }
.node .twig { color: var(--text-faint); font-family: var(--b-font-mono); }
.node .right { margin-left: auto; display: flex; align-items: center; gap: var(--b-space-2); }
.node .count { font-size: var(--b-text-sm); color: var(--text-faint); }
.node.leaf.off { opacity: 0.6; }
.branchbox { margin: 0; }
.branchbox > summary { list-style: none; cursor: pointer; }
.branchbox > summary::-webkit-details-marker { display: none; }
.branchbox[open] > summary .twig { transform: rotate(90deg); }
.node .twig { display: inline-block; transition: transform var(--b-duration-fast) var(--b-ease); }
.kids { margin-left: var(--b-space-5); }
.treelegend { font-size: var(--b-text-xs); color: var(--text-faint); margin-top: var(--b-space-2); }
.ss-missing { color: var(--text-muted); }

/* ── Leaderboard (spectator board) ──────────────────────────────────── */
.lb { background: var(--broadcast); border: 1px solid rgba(255,255,255,0.07); border-radius: 15px; padding: 15px; box-shadow: 0 16px 40px rgba(0,0,0,0.7); color: #F0F0F5; }
:root[data-theme="hc"] .lb, :root[data-theme="light"] .lb { background: var(--surface-raised); border: var(--b-border-w) solid var(--border-strong); }
.btop { display: flex; align-items: baseline; gap: var(--b-space-3); margin-bottom: var(--b-space-3); }
.bev { font-family: var(--b-font-heading); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; font-weight: 700; color: var(--lv); }
.bwo { font-family: var(--b-font-heading); text-transform: uppercase; letter-spacing: 0.02em; font-size: 22px; font-weight: 900; color: #fff; line-height: 1; }
.bstate { margin-left: auto; color: var(--role-attention); font-weight: var(--b-weight-bold); font-size: var(--b-text-sm); }
.brows { display: flex; flex-direction: column; gap: var(--b-space-1); }
.brow {
  display: grid; grid-template-columns: 6px 2.2rem 1fr minmax(0,0.6fr) 3.5rem 4rem;
  align-items: center; gap: var(--b-space-2);
  background: var(--surface-raised); border-radius: var(--b-radius-sm);
  padding: var(--b-space-2) var(--b-space-3);
  font-size: var(--b-text-sm);
}
.brow .band { width: 4px; height: 1.6em; border-radius: 2px; background: var(--border-strong); }
.brow.rs-live .band { background: var(--sportscore-live-accent, var(--role-attention)); }
.brow.rs-disconnected .band { background: var(--role-danger); }
.brow.rs-final .band, .brow.rs-review .band { background: var(--text-faint); }
.brow .rk { font-family: var(--b-font-mono); font-weight: var(--b-weight-bold); text-align: right; }
.brow .nm { font-weight: var(--b-weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .ns { color: var(--bad-fg); font-weight: var(--b-weight-normal); }
.brow .prov { color: var(--text-muted); font-weight: var(--b-weight-normal); }
.brow .fin { color: var(--text-faint); font-weight: var(--b-weight-normal); }
.brow .aff { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .gap { font-family: var(--b-font-mono); color: var(--text-faint); text-align: right; }
.brow .sc { font-family: var(--b-font-mono); font-weight: var(--b-weight-bold); font-size: var(--b-text-base); text-align: right; }
.brow.rs-notstarted { opacity: 0.5; }
.brow:nth-child(-n+3) .rk { color: var(--sportscore-podium-highlight, var(--role-attention)); }

/* ── Jumbotron (wall) ───────────────────────────────────────────────── */
.jb { background: var(--broadcast); color: #F0F0F5; border-radius: var(--b-radius-lg); padding: var(--b-space-5); }
.jbhead { display: flex; align-items: baseline; gap: var(--b-space-3); margin-bottom: var(--b-space-4); }
.jbev { font-size: var(--b-text-sm); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; }
.jbwo { font-family: var(--b-font-heading); font-weight: 900; font-size: var(--b-text-3xl); }
.jblive { margin-left: auto; color: #FFB84D; font-weight: var(--b-weight-bold); }
.jbrows { display: flex; flex-direction: column; gap: var(--b-space-2); }
.jbrow {
  display: grid; grid-template-columns: 3rem 1fr 5rem 6rem; align-items: baseline; gap: var(--b-space-3);
  font-size: var(--b-text-lg); border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: var(--b-space-2);
}
.jbrow .rk { font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-2xl); text-align: right; }
.jbrow .nm { font-weight: var(--b-weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jbrow .aff, .jbrow .ns, .jbrow .prov, .jbrow .fin { opacity: 0.55; font-size: var(--b-text-base); font-weight: var(--b-weight-normal); }
.jbrow .gap { font-family: var(--b-font-mono); opacity: 0.6; text-align: right; }
.jbrow .sc { font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-2xl); text-align: right; }
.jbrow.rs-notstarted { opacity: 0.35; }

/* ── Registration funnel + paydoor (TEN-911) ───────────────────────── */
.regwrap, .paywrap { max-width: 560px; margin: 0 auto; }
.flash {
  border-radius: var(--b-radius-md); padding: var(--b-space-3);
  margin-bottom: var(--b-space-3); font-size: var(--b-text-sm);
}
.flash-error { background: var(--bad-a); color: var(--bad-fg); border: var(--b-border-w) solid var(--role-danger); }
.regcard {
  background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-lg); padding: var(--b-space-5);
  display: flex; flex-direction: column; gap: var(--b-space-3);
}
.regcard.regwon { border-color: var(--green-line); text-align: center; align-items: center; }
.regcheck {
  width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--b-radius-full); background: var(--green-a); color: var(--role-presence);
  font-size: var(--b-text-2xl); font-weight: var(--b-weight-bold);
}
.regbig { font-family: var(--b-font-heading); font-weight: 800; font-size: var(--b-text-3xl); }
.regsub { color: var(--text-muted); }
.regonward {
  display: inline-flex; flex-direction: column; gap: 2px; margin-top: var(--b-space-3);
  background: var(--surface-overlay); border: var(--b-border-w) solid var(--border-strong);
  border-radius: var(--b-radius-md); padding: var(--b-space-3) var(--b-space-5); color: var(--text-primary);
}
.regonward .ml { font-weight: var(--b-weight-bold); }
.regonward .ms { font-size: var(--b-text-xs); color: var(--text-faint); }
.regpasshint { color: var(--text-faint); font-size: var(--b-text-sm); }
.regevname { font-family: var(--b-font-heading); font-weight: 800; font-size: var(--b-text-2xl); }
.regevmeta { color: var(--text-muted); margin-top: calc(-1 * var(--b-space-2)); }
.regstate {
  background: var(--surface-overlay); border-radius: var(--b-radius-md);
  padding: var(--b-space-3); color: var(--text-muted);
}
.regstate.ok { color: var(--role-presence); background: var(--green-a); }
.regprice { font-family: var(--b-font-mono); font-weight: var(--b-weight-bold); font-size: var(--b-text-lg); }
.regcta {
  display: block; width: 100%; text-align: center; font: inherit; cursor: pointer;
  background: var(--role-presence); color: var(--ink-on-primary);
  font-weight: var(--b-weight-bold); font-size: var(--b-text-lg);
  border: 0; border-radius: var(--b-radius-md); padding: var(--b-space-4);
}
.regcta:hover { filter: brightness(1.05); }
.regnote { color: var(--text-faint); font-size: var(--b-text-sm); }
.regjoin { display: flex; flex-direction: column; gap: var(--b-space-2); }
.regjoinrow {
  display: flex; align-items: center; gap: var(--b-space-3);
  background: var(--surface-overlay); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-md); padding: var(--b-space-3); color: var(--text-primary);
}
.regjoinrow:hover { background: var(--hover); }
.regjoinrow .nm { font-weight: var(--b-weight-semibold); }
.regjoinrow .chev { margin-left: auto; }
.paycard {
  background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-lg); padding: var(--b-space-5);
  display: flex; flex-direction: column; gap: var(--b-space-3);
}
.payamt { font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-3xl); margin: 0; }
.paylead { color: var(--text-muted); margin: 0; }
.paybtn {
  display: block; width: 100%; text-align: center; font: inherit; cursor: pointer;
  background: var(--surface-overlay); color: var(--text-primary);
  border: var(--b-border-w) solid var(--border-strong);
  border-radius: var(--b-radius-md); padding: var(--b-space-4); font-weight: var(--b-weight-semibold);
}
.paybtn.primary { background: var(--role-primary); color: var(--ink-on-accent); border: 0; }
.paybtn:hover { filter: brightness(1.05); }
.paynote { color: var(--text-faint); font-size: var(--b-text-sm); margin: 0; }

/* ── My Day + the boarding pass (TEN-912) ──────────────────────────── */
.mdcard {
  max-width: 560px; margin: 0 auto; position: relative;
  background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-lg); padding: var(--b-space-5);
}
.mdscan-toggle { position: absolute; opacity: 0; pointer-events: none; }
.mdchecked { margin-left: auto; color: var(--role-presence); font-size: var(--b-text-sm); font-weight: var(--b-weight-semibold); }
.mdhero {
  background: var(--night); color: #F0F0F5; border-radius: var(--b-radius-md);
  padding: var(--b-space-4); margin: var(--b-space-3) 0;
}
:root[data-theme="light"] .mdhero, :root[data-theme="hc"] .mdhero { background: var(--surface-overlay); color: var(--text-primary); border: var(--b-border-w) solid var(--border-strong); }
.mdherotop { display: flex; align-items: center; }
.mdscanbtn {
  margin-left: auto; cursor: pointer; font-size: var(--b-text-sm); font-weight: var(--b-weight-semibold);
  background: var(--role-primary); color: var(--ink-on-accent);
  border-radius: var(--b-radius-md); padding: var(--b-space-2) var(--b-space-3);
}
.mdtitlerow { display: flex; align-items: center; gap: var(--b-space-2); margin-top: var(--b-space-2); }
.md-pill {
  font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-sm);
  background: rgba(255,255,255,0.14); border-radius: var(--b-radius-full); padding: 2px var(--b-space-3);
}
:root[data-theme="light"] .md-pill, :root[data-theme="hc"] .md-pill { background: var(--surface-raised); border: var(--b-border-w) solid var(--border-strong); }
.mdlist { display: flex; flex-direction: column; gap: var(--b-space-2); max-height: 320px; overflow-y: auto; }
.mdrow {
  display: flex; align-items: center; gap: var(--b-space-3);
  background: var(--surface-overlay); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-md); padding: var(--b-space-3);
}
.mdrow.done { opacity: 0.75; }
.mdrow.done .mddot { background: var(--role-attention); }
.mdrow.upnext .mddot { background: var(--role-primary); }
.mdrow.upcoming { opacity: 0.85; }
.mdrow.selected { border-color: var(--role-primary); box-shadow: 0 0 0 var(--b-ring-w) var(--blue-a); }
.mddot { width: 8px; height: 8px; border-radius: var(--b-radius-full); background: var(--border-strong); flex: none; }
.mdtime { font-family: var(--b-font-mono); font-weight: var(--b-weight-bold); min-width: 3.6rem; }
.mdmain { display: flex; flex-direction: column; min-width: 0; }
.mdlname { font-weight: var(--b-weight-semibold); }
.mdlsub { font-size: var(--b-text-sm); color: var(--text-faint); }
.mdright { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.mdrv { font-family: var(--b-font-mono); font-weight: var(--b-weight-bold); }
.mdrs { font-size: var(--b-text-xs); color: var(--text-faint); }

/* The pass overlay — B&W all-business, CSS checkbox toggle. */
.pass {
  display: none; position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  background: #fff; color: #000; padding: var(--b-space-5);
  text-align: center; font-family: var(--b-font-body);
}
.mdscan-toggle:checked ~ .pass { display: block; }
.passtop { display: flex; align-items: center; max-width: 420px; margin: 0 auto; }
.passeyebrow { font-size: var(--b-text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: #555; }
.passclose { margin-left: auto; font-size: var(--b-text-2xl); cursor: pointer; padding: 0 var(--b-space-3); }
.passname { font-family: var(--b-font-heading); font-weight: 900; font-size: var(--b-text-3xl); margin-top: var(--b-space-3); }
.passsub { color: #333; }
.passrule { border-top: 2px solid #000; max-width: 420px; margin: var(--b-space-3) auto; }
.passdetail { font-weight: var(--b-weight-semibold); }
.qrwrap { width: min(66vw, 300px); margin: var(--b-space-4) auto; }
.passidlbl { font-size: var(--b-text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: #555; }
.passid { font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-3xl); letter-spacing: 0.2em; }
.barcode { margin: var(--b-space-3) auto; }
.passidsm { font-family: var(--b-font-mono); color: #333; }
.passanum { display: flex; justify-content: space-between; max-width: 420px; margin: var(--b-space-3) auto; }
.passanum .muted { color: #888; }
.passfoot { font-size: var(--b-text-sm); color: #555; max-width: 420px; margin: 0 auto; }

/* ── Sessions (TEN-912) ─────────────────────────────────────────────── */
.sesswrap .empty { color: var(--text-muted); text-align: center; padding: var(--b-space-6) 0; }
.sesslist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--b-space-2); }
.sessmain {
  display: flex; align-items: center; gap: var(--b-space-3);
  background: var(--surface-raised); color: var(--text-primary);
  border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md);
  padding: var(--b-space-3);
}
.sessmain:hover { background: var(--hover); }
.sesswhen { font-family: var(--b-font-mono); font-size: var(--b-text-sm); color: var(--text-muted); min-width: 9rem; }
.sesstext { display: flex; flex-direction: column; min-width: 0; }
.sessnode { font-weight: var(--b-weight-semibold); }
.sessev { font-size: var(--b-text-sm); color: var(--text-faint); }
.sbadge {
  margin-left: auto; font-size: var(--b-text-xs); font-weight: var(--b-weight-bold);
  border-radius: var(--b-radius-full); padding: 2px var(--b-space-3);
}
.sbadge.enrolled { color: var(--role-presence); background: var(--green-a); }
.sbadge.reserved { color: var(--lb); background: var(--blue-a); }
.sbadge.declined, .sbadge.invited { color: var(--text-muted); background: var(--surface-overlay); }

/* ── The bell (TEN-912) ─────────────────────────────────────────────── */
.notif { position: relative; }
.notif-toggle { position: absolute; opacity: 0; pointer-events: none; }
.notif-btn { position: relative; cursor: pointer; font-size: var(--b-text-lg); }
.notif-badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--role-danger); color: var(--ink-on-color);
  font-size: var(--b-text-xs); font-weight: var(--b-weight-bold);
  border-radius: var(--b-radius-full); padding: 0 5px; min-width: 16px; text-align: center;
}
.notif-panel {
  display: none; position: absolute; right: 0; top: 130%; z-index: 60; width: 320px;
  background: var(--surface-overlay); border: var(--b-border-w) solid var(--border-strong);
  border-radius: var(--b-radius-md); box-shadow: var(--b-shadow-lg); padding: var(--b-space-3);
}
.notif-toggle:checked ~ .notif-panel { display: block; }
.notif-head { display: flex; align-items: baseline; margin-bottom: var(--b-space-2); }
.notif-titlebar { font-weight: var(--b-weight-bold); }
.notif-allread { margin-left: auto; font: inherit; font-size: var(--b-text-xs); color: var(--lb); background: none; border: 0; cursor: pointer; }
.notif-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--b-space-1); max-height: 300px; overflow-y: auto; text-align: left; }
.notif-row { border-radius: var(--b-radius-sm); padding: var(--b-space-2); display: flex; }
.notif-row.unread { background: var(--blue-a); }
.notif-row.unread .notif-dot { background: var(--role-primary); }
.notif-row.sev { border-left: 3px solid var(--role-critical); }
.notif-rowlink { display: flex; gap: var(--b-space-2); color: var(--text-primary); }
.notif-dot { width: 6px; height: 6px; border-radius: var(--b-radius-full); background: transparent; margin-top: 7px; flex: none; }
.notif-main { display: flex; flex-direction: column; }
.notif-rowtitle { font-size: var(--b-text-sm); font-weight: var(--b-weight-semibold); }
.notif-count { margin-left: var(--b-space-2); color: var(--role-attention); font-family: var(--b-font-mono); }
.notif-body { font-size: var(--b-text-xs); color: var(--text-muted); }
.notif-empty { color: var(--text-muted); text-align: center; padding: var(--b-space-4); list-style: none; }

/* ── The organizer plane (TEN-913) — stop-light surface, never the
      attention-gradient (the oracle's two-palette law) ───────────────── */
.mgwrap { max-width: 720px; margin: 0 auto; }
.mgev { margin-left: auto; color: var(--text-muted); }
.mgnav { text-align: right; margin-bottom: var(--b-space-2); }
.flash-ok { background: var(--good-a); color: var(--good); border: var(--b-border-w) solid var(--good); }
.recbox {
  background: var(--surface-raised); border-left: 3px solid var(--warn);
  border-radius: var(--b-radius-md); padding: var(--b-space-3); margin-bottom: var(--b-space-4);
}
.recrow { display: flex; align-items: center; gap: var(--b-space-2); padding: var(--b-space-2) 0; flex-wrap: wrap; }
.rbadge {
  font-size: var(--b-text-xs); font-weight: var(--b-weight-bold);
  border-radius: var(--b-radius-full); padding: 1px var(--b-space-2);
}
.rbadge.owes { color: var(--warn); background: var(--amber-a); }
.rbadge.unconfirmed { color: var(--lb); background: var(--blue-a); }
.rbadge.unlinked { color: var(--text-muted); background: var(--surface-overlay); }
.rbadge.overcap { color: var(--bad-fg); background: var(--bad-a); }
.recnote { font-size: var(--b-text-xs); color: var(--text-faint); }
.rbtn {
  font: inherit; font-size: var(--b-text-sm); font-weight: var(--b-weight-semibold); cursor: pointer;
  background: var(--surface-overlay); color: var(--text-primary);
  border: var(--b-border-w) solid var(--border-strong); border-radius: var(--b-radius-sm);
  padding: var(--b-space-1) var(--b-space-3);
}
.rbtn.primary { background: var(--role-primary); color: var(--ink-on-accent); border: 0; }
.rbtn:hover { filter: brightness(1.08); }
.regpolicybox { background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md); padding: var(--b-space-3); margin-bottom: var(--b-space-4); }
.polform { display: flex; flex-wrap: wrap; gap: var(--b-space-2); align-items: center; }
.polfee { display: inline-flex; align-items: center; gap: var(--b-space-1); font-size: var(--b-text-sm); color: var(--text-muted); }
.polfee input { width: 6rem; font: inherit; background: var(--surface-overlay); color: var(--text-primary); border: var(--b-border-w) solid var(--border-strong); border-radius: var(--b-radius-sm); padding: var(--b-space-1) var(--b-space-2); }
.polhint { flex-basis: 100%; font-size: var(--b-text-xs); color: var(--text-faint); }
.mgsheets { display: flex; flex-direction: column; gap: var(--b-space-2); margin-bottom: var(--b-space-4); }
.sheetform { display: flex; flex-wrap: wrap; gap: var(--b-space-2); align-items: center; }
.sheetform input[type=text] { flex: 1; min-width: 12rem; font: inherit; background: var(--surface-raised); color: var(--text-primary); border: var(--b-border-w) solid var(--border-strong); border-radius: var(--b-radius-sm); padding: var(--b-space-2); }
.sheetform select { font: inherit; background: var(--surface-raised); color: var(--text-primary); border: var(--b-border-w) solid var(--border-strong); border-radius: var(--b-radius-sm); padding: var(--b-space-2); }
.sheethint { flex-basis: 100%; font-size: var(--b-text-xs); color: var(--text-faint); }
.mgtable { display: flex; flex-direction: column; gap: var(--b-space-1); }
.mghead { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 0.4fr; font-size: var(--b-text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); padding: 0 var(--b-space-3); }
.mgrow { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 0.4fr; align-items: center; gap: var(--b-space-2); background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md); padding: var(--b-space-2) var(--b-space-3); }
.status { font-size: var(--b-text-sm); color: var(--text-muted); }
.status.paid, .status.committed { color: var(--good); }
.status.owes, .status.owing { color: var(--warn); }
.status.invited { color: var(--lb); }
.paycell { display: flex; align-items: center; gap: var(--b-space-2); }
.capline { font-family: var(--b-font-mono); color: var(--text-muted); margin-bottom: var(--b-space-2); }
.doorcount { color: var(--good); font-weight: var(--b-weight-semibold); margin-bottom: var(--b-space-2); }
.doorlist { display: flex; flex-direction: column; gap: var(--b-space-2); }
.drow { display: flex; align-items: center; gap: var(--b-space-3); background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md); padding: var(--b-space-3); flex-wrap: wrap; }
.drow.in { opacity: 0.7; }
.ddot { width: 10px; height: 10px; border-radius: var(--b-radius-full); flex: none; }
.ddot.on { background: var(--ok); }
.ddot.warn { background: var(--warn); }
.ddot.new { background: var(--lb); }
.dlabel { font-family: var(--b-font-mono); font-size: var(--b-text-xs); color: var(--text-muted); }
.dacts { margin-left: auto; display: flex; gap: var(--b-space-2); flex-wrap: wrap; }
.dacts form { display: inline-flex; gap: var(--b-space-2); }

/* ── My Result ──────────────────────────────────────────────────────── */
.mrcard {
  max-width: 560px; margin: 0 auto;
  background: var(--surface-raised); border: var(--b-border-w) solid var(--border-subtle);
  border-radius: var(--b-radius-lg); padding: var(--b-space-5);
}
.mrhdr { display: flex; align-items: baseline; gap: var(--b-space-3); }
.mreyebrow { font-size: var(--b-text-sm); color: var(--text-muted); }
.mrh1 { font-family: var(--b-font-heading); font-weight: 800; font-size: var(--b-text-2xl); }
.mrlens { margin-left: auto; color: var(--lb); font-weight: var(--b-weight-semibold); }
.mrme { display: flex; align-items: center; gap: var(--b-space-3); margin: var(--b-space-4) 0; }
.mrava {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--b-radius-full); background: var(--surface-overlay);
  font-weight: var(--b-weight-bold); color: var(--lv);
}
.mrnm { font-weight: var(--b-weight-semibold); }
.mraff { color: var(--text-muted); font-size: var(--b-text-sm); }
.mrfinal { margin-left: auto; color: var(--role-attention); font-size: var(--b-text-sm); font-weight: var(--b-weight-semibold); }
.mrhero {
  background: var(--night); color: #F0F0F5; border-radius: var(--b-radius-md);
  padding: var(--b-space-4); margin-bottom: var(--b-space-3);
}
:root[data-theme="light"] .mrhero, :root[data-theme="hc"] .mrhero { background: var(--surface-overlay); color: var(--text-primary); border: var(--b-border-w) solid var(--border-strong); }
.mrvoltage { color: var(--la); font-size: var(--b-text-xs); letter-spacing: 0.12em; text-transform: uppercase; font-weight: var(--b-weight-bold); }
.mrfixture { color: var(--text-muted); margin-top: var(--b-space-2); }
.mrname { font-family: var(--b-font-heading); font-weight: 800; font-size: var(--b-text-xl); }
.mrstats { display: flex; gap: var(--b-space-6); }
.mrstat { display: flex; flex-direction: column; }
.mrstat .v { font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-3xl); color: var(--gold); }
.mrstat .k { font-size: var(--b-text-sm); font-weight: var(--b-weight-semibold); }
.mrstat .sub { font-size: var(--b-text-xs); color: var(--text-faint); }
.mrprog { color: var(--text-muted); margin: var(--b-space-3) 0; }
.mrtodayhd { font-family: var(--b-font-heading); font-weight: var(--b-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--b-text-sm); color: var(--text-muted); }
.mrhint { font-size: var(--b-text-xs); color: var(--text-faint); margin-bottom: var(--b-space-3); }
.mrlist { display: flex; flex-direction: column; gap: var(--b-space-2); }
.mrrow {
  display: grid; grid-template-columns: 2.2rem 1fr auto auto auto; align-items: center; gap: var(--b-space-2);
  background: var(--surface-overlay); color: var(--text-primary);
  border: var(--b-border-w) solid var(--border-subtle); border-radius: var(--b-radius-md);
  padding: var(--b-space-3);
}
.mrrow:hover { background: var(--hover); }
.mrrow.podium { border-color: var(--sportscore-podium-highlight, var(--role-attention)); }
.mrmedal {
  width: 1.8rem; height: 1.8rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--b-radius-full); background: var(--surface-raised);
  font-family: var(--b-font-mono); font-weight: 700; font-size: var(--b-text-sm);
}
.mrmedal.gold { color: var(--ink-on-primary); background: var(--gold); }
.mrlname { font-weight: var(--b-weight-semibold); }
.mrlsub { color: var(--text-faint); font-size: var(--b-text-sm); }
.mrplace { font-family: var(--b-font-mono); font-weight: var(--b-weight-bold); }
.mrplace .of { color: var(--text-faint); font-weight: var(--b-weight-normal); font-size: var(--b-text-sm); }
.mrnav { display: flex; gap: var(--b-space-3); justify-content: center; margin-top: var(--b-space-4); }
.mrnav .on { font-weight: var(--b-weight-bold); color: var(--text-primary); }
.mrnav a { color: var(--lb); }

/* The oracle's tactile signature: instant pressed ack (§09). */
.evcard:active, .chip:active, a.node:active, .mode:active, .rbtn:active,
.regcta:active, .paybtn:active, .mrrow:active, .sessmain:active {
  transform: scale(0.985); filter: brightness(1.06);
}

/* The board share popover (TEN-920): CSS-toggle + the faux-QR renderer. */
.bqr { margin-left: auto; }
.bqr-toggle { position: absolute; opacity: 0; pointer-events: none; }
.bqrbtn {
  cursor: pointer; font-family: var(--b-font-heading); text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 11px; font-weight: 700; color: var(--t2, #A8A8B2);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 6px 10px;
}
.bqrpop {
  display: none; position: absolute; right: 15px; top: 60px; z-index: 40;
  background: #fff; color: #000; border-radius: 12px; padding: 14px; text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.bqr-toggle:checked ~ .bqrpop { display: block; }
.bqrpop .t { font-family: var(--b-font-heading); text-transform: uppercase; font-size: 11px; font-weight: 800; }
.bqrpop .qrwrap { width: 200px; margin: 10px auto; }
.bqrpop .s { font-size: 11px; color: #555; }
