/* Components. Every color, font and radius comes from theme.css (tokens);
   the system is described in docs/DESIGN.md. Logical properties throughout,
   so right-to-left languages mirror correctly. */

/* ===================================================================== */
/* Base                                                                  */
/* ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font); letter-spacing: -.003em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-block-end: env(safe-area-inset-bottom);
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.85rem, 1.5rem + 1.2vw, 2.4rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
[dir="rtl"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 2px; border-radius: var(--radius-xs); }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* the highlighter: one phrase per screen, marked the way a pen would */
.mark {
  font-style: normal; color: inherit; margin-inline: -.12em; padding-inline: .12em;
  background-image: linear-gradient(transparent 40%, var(--accent) 40%, var(--accent) 70%, transparent 70%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* on a dark surface the highlight becomes a solid cyan label (light text over cyan cannot be read) */
.on-ink .mark { background-image: linear-gradient(transparent 21%, var(--accent) 21%, var(--accent) 80%, transparent 80%); color: var(--accent-ink); margin-inline: 0; padding-inline: .22em; }
@media (prefers-color-scheme: dark) { .mark { background-image: linear-gradient(transparent 21%, var(--accent) 21%, var(--accent) 80%, transparent 80%); color: var(--accent-ink); margin-inline: 0; padding-inline: .22em; } }
/* the ink band: the one dark surface of a light page */
.on-ink { background: var(--ink); color: var(--on-ink); }
.on-ink .muted { color: var(--on-ink-muted); }
/* line motifs (a pin on a path), drawn in the current color through a mask */
.pattern { position: relative; isolation: isolate; }
.pattern::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: currentColor; opacity: .07;
  -webkit-mask: url(/assets/pattern.svg) 0 0 / 160px 160px; mask: url(/assets/pattern.svg) 0 0 / 160px 160px;
}
.frieze {
  display: block; inline-size: 100%; block-size: 32px; background: currentColor;
  -webkit-mask: url(/assets/frieze.svg) 0 / 64px 32px repeat-x; mask: url(/assets/frieze.svg) 0 / 64px 32px repeat-x;
}

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.grow { flex: 1; min-inline-size: 0; }
.stack-xs { display: grid; gap: 4px; }
.stack-sm { display: grid; gap: 8px; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.narrow { max-inline-size: 560px; margin-inline: auto; inline-size: 100%; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.linkish { border: 0; background: none; padding: 3px 0; min-block-size: 24px; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 12px; inset-block-start: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-xs); z-index: 50; }
main:focus { outline: none; }

/* ===================================================================== */
/* Shell: top bar, account menu, tab bar, reminder strip                 */
/* ===================================================================== */
.topbar {
  position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, calc((100% - 1040px) / 2)); padding-block-start: calc(10px + env(safe-area-inset-top));
  background: var(--ink); color: var(--on-ink); border-block-end: 1px solid var(--ink-line);
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.3rem/1 var(--font-display); color: var(--text); letter-spacing: -.01em; }
.topbar .brand, .land-nav .brand { color: var(--on-ink); }
.brand img { inline-size: 34px; block-size: 34px; border-radius: 10px; display: block; }
.brand:hover { text-decoration: none; }
.topnav { display: none; gap: 2px; margin-inline-start: 20px; }
.topnav a { padding: 10px 12px; border-radius: var(--radius-xs); color: var(--on-ink-muted); font-weight: 500; }
.topnav a:hover { color: var(--on-ink); background: rgb(255 255 255 / .08); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--on-ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
@media (min-width: 720px) { .topnav { display: flex; } }
.avatar {
  inline-size: 40px; block-size: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; font-size: .9rem;
}
.avatar.xl { inline-size: 64px; block-size: 64px; font-size: 1.35rem; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px); min-inline-size: 248px; z-index: 40;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-raised);
  padding: 6px; display: grid;
}
.menu-head { display: grid; padding: 10px 12px 12px; border-block-end: 1px solid var(--line); margin-block-end: 6px; overflow: hidden; }
.menu-head b, .menu-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-xs); color: var(--text);
  font-weight: 500; background: none; border: 0; cursor: pointer; text-align: start; inline-size: 100%;
}
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface-2); text-decoration: none; }
.menu svg { inline-size: 18px; block-size: 18px; color: var(--muted); }
main { max-inline-size: 760px; margin-inline: auto; padding: 24px 16px 112px; }
.tabbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 20; display: flex; justify-content: center; gap: 4px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-block-start: 1px solid var(--line);
}
.tabbar a {
  flex: 1; max-inline-size: 160px; display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: .8rem; font-weight: 600; min-block-size: 56px;
}
.tabbar a svg { inline-size: 24px; block-size: 24px; }
.tabbar a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
.tabbar a:hover { text-decoration: none; }
@media (min-width: 720px) { .tabbar { display: none; } main { padding-block-end: 48px; } }
.notice {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px max(16px, calc((100% - 760px) / 2));
  background: var(--brand-soft); color: var(--text); font-size: .875rem; line-height: 1.45; border-block-end: 1px solid var(--line);
}
.notice svg { inline-size: 18px; block-size: 18px; color: var(--brand); flex: none; margin-block-start: 1px; }
.notice .linkish { white-space: nowrap; }

/* ===================================================================== */
/* Surfaces and lists                                                    */
/* ===================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card.hero { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: none; }
.card.hero .muted { color: color-mix(in srgb, var(--brand-ink) 80%, transparent); }
.list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: inherit; min-block-size: 56px;
}
a.item:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty svg { inline-size: 26px; block-size: 26px; }
.page-head { display: grid; gap: 4px; margin-block-end: 18px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; font-size: .9rem; margin-block-end: 4px; }
.back svg { inline-size: 18px; block-size: 18px; }
button.back { border: 0; background: none; padding: 0; cursor: pointer; justify-self: start; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-block-end: 20px; border-block-end: 1px solid var(--line); }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; margin-block-end: -1px; border-block-end: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-block-end-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.feature-icon { inline-size: 40px; block-size: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.feature-icon svg { inline-size: 20px; block-size: 20px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; border-block-start: 1px solid var(--line); padding-block-start: 14px; }
.kv b { overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 6px; } }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }

/* ===================================================================== */
/* Buttons                                                               */
/* ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 48px; padding: 10px 20px;
  border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--btn); color: var(--btn-ink);
  font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .06s; white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); background: var(--surface); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--bad); color: var(--on-status); }
.btn.ok { background: var(--ok); color: var(--on-status); }
.btn.light { background: var(--surface); color: var(--text); }
.btn.light:hover { background: var(--surface-2); }
/* on the ink band the primary action is the cyan itself */
.on-ink .btn:not(.secondary, .ghost) { background: var(--accent); color: var(--accent-ink); }
.on-ink .btn:not(.secondary, .ghost):hover { background: color-mix(in srgb, var(--accent) 80%, #fff); }
.land-nav .btn:not(.ghost) { background: var(--accent); color: var(--accent-ink); }
.land-nav .btn.ghost { color: var(--on-ink); }
.land-nav .btn.ghost:hover { background: rgb(255 255 255 / .08); }
.btn.big { min-block-size: 56px; font-size: 1.08rem; inline-size: 100%; }
.btn.big-inline { min-block-size: 54px; padding-inline: 24px; font-size: 1.05rem; }
.btn.small { min-block-size: 40px; padding: 6px 14px; font-size: .9rem; }
.btn svg { inline-size: 20px; block-size: 20px; flex: none; }
[dir="rtl"] .btn svg[data-flip], [dir="rtl"] .back svg { transform: scaleX(-1); }

/* ===================================================================== */
/* Forms                                                                 */
/* ===================================================================== */
.field { display: grid; gap: 6px; }
.field > label, .field .row > label, .label { font-weight: 600; font-size: .9rem; }
.input, select.input {
  inline-size: 100%; min-block-size: 50px; padding: 10px 14px; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-sm); color: var(--text);
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
.input:user-invalid, .input[aria-invalid="true"] { border-color: var(--bad); }
.hint { font-size: .85rem; color: var(--muted); }
.pw { position: relative; }
.pw .input { padding-inline-end: 52px; }
.pw-toggle {
  position: absolute; inset-inline-end: 4px; inset-block-start: 50%; transform: translateY(-50%); inline-size: 44px; block-size: 40px;
  border: 0; background: none; color: var(--muted); border-radius: var(--radius-xs); cursor: pointer; display: grid; place-items: center;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle svg { inline-size: 20px; block-size: 20px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--radius-sm); }
.seg button {
  border: 0; background: transparent; padding: 10px; border-radius: var(--radius-xs); font-weight: 600; cursor: pointer; color: var(--muted);
  display: grid; gap: 2px; justify-items: center;
}
.seg button small { font-weight: 400; font-size: .75rem; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px;
  font-weight: 500; cursor: pointer; font-size: .9rem; min-block-size: 36px;
}
.chip-btn:hover { border-color: var(--brand); }
.chip-btn[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
/* an on/off switch: a real checkbox, restyled */
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { appearance: none; flex: none; inline-size: 44px; block-size: 26px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 20px; block-size: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
[dir="rtl"] .switch input:checked::after { transform: translateX(-18px); }
.switch input:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }

/* ===================================================================== */
/* Chips, banners, toasts, dialogs, spinners                             */
/* ===================================================================== */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip svg { inline-size: 14px; block-size: 14px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.banner { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: .92rem; }
.banner.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.banner.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.toasts { position: fixed; inset-inline: 0; inset-block-start: calc(12px + env(safe-area-inset-top)); z-index: 100; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 12px; }
.toast { pointer-events: auto; max-inline-size: 440px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); box-shadow: var(--shadow-raised); font-weight: 500; animation: rise .2s ease-out; }
.toast.bad { background: var(--bad); color: var(--on-status); }
.toast.ok { background: var(--ok); color: var(--on-status); }
@keyframes rise { from { transform: translateY(-6px); opacity: 0; } }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-inline-size: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-raised); }
dialog::backdrop { background: rgb(5 9 9 / .6); }
.spinner { inline-size: 22px; block-size: 22px; border-radius: 50%; border: 3px solid var(--line); border-block-start-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; }
.spinner.small { inline-size: 16px; block-size: 16px; border-width: 2px; border-color: color-mix(in srgb, currentColor 30%, transparent); border-block-start-color: currentColor; }
.loading { display: grid; place-items: center; padding: 60px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.big-icon { inline-size: 72px; block-size: 72px; border-radius: 50%; display: grid; place-items: center; animation: rise .25s ease-out; }
.big-icon svg { inline-size: 36px; block-size: 36px; }
.big-icon.ok { background: var(--ok-soft); color: var(--ok); }
.big-icon.warn { background: var(--warn-soft); color: var(--warn); }
.big-icon.bad { background: var(--bad-soft); color: var(--bad); }
.big-icon.brand { background: var(--brand-soft); color: var(--brand); }
.meter { block-size: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; block-size: 100%; border-radius: inherit; }

/* ===================================================================== */
/* Home: the composer (start in one tap) and the check-in action         */
/* ===================================================================== */
/* the cyan card: the one thing an organizer came to do, as on skillture.club's "Got a PIN?" card */
.composer { display: grid; gap: 14px; padding: 22px; }
.card.composer { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: var(--shadow-raised); }
.composer .muted { color: rgb(5 9 9 / .8); }
.composer .input { background: #fff; color: #050909; border-color: rgb(5 9 9 / .5); }
.composer .input:focus, .composer :focus-visible { outline-color: var(--accent-ink); border-color: var(--accent-ink); }
.composer .btn, .composer .btn:hover { background: var(--accent-ink); color: #fff; }
.composer .switch input { background: rgb(5 9 9 / .4); }
.composer .switch input:checked { background: var(--accent-ink); }
.composer h1 { font-size: 1.5rem; }
.composer-row { display: flex; gap: 10px; flex-wrap: wrap; }
.composer-row .input { flex: 1 1 240px; min-block-size: 56px; font-size: 1.05rem; font-weight: 500; }
.composer-row .btn { flex: 0 0 auto; min-block-size: 56px; padding-inline: 28px; font-size: 1.08rem; }
@media (max-width: 480px) { .composer-row .btn { flex: 1 1 100%; } }
.composer-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.composer-org { display: flex; align-items: center; gap: 8px; }
.composer-org select.input { min-block-size: 40px; inline-size: auto; max-inline-size: 220px; padding-block: 6px; }
/* the second action is an ink band, so nobody arriving to check in has to look for it */
.checkin-cta {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; min-block-size: 76px; border-radius: var(--radius); color: var(--on-ink);
  background: var(--ink); border: 1px solid var(--ink-line); font-size: 1.05rem;
}
.checkin-cta:hover { text-decoration: none; border-color: var(--accent); }
.checkin-cta .muted { color: var(--on-ink-muted); }
.checkin-cta .feature-icon { background: var(--accent); color: var(--accent-ink); inline-size: 44px; block-size: 44px; }
.checkin-cta > svg { inline-size: 22px; block-size: 22px; color: var(--accent); margin-inline-start: auto; flex: none; }
[dir="rtl"] .checkin-cta > svg { transform: scaleX(-1); }
.org-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.org-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.org-card:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.org-link { display: flex; align-items: center; gap: 12px; flex: 1; min-inline-size: 0; color: var(--text); }
.org-link:hover { text-decoration: none; }
.org-link b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-mark { inline-size: 40px; block-size: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; font-weight: 700; background: var(--brand-soft); color: var(--brand); }

/* ===================================================================== */
/* Live session                                                          */
/* ===================================================================== */
.qr-card { display: grid; justify-items: center; gap: 14px; padding: 22px 18px; }
.qr-box { position: relative; inline-size: min(100%, 360px); aspect-ratio: 1; background: #fff; border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); }
.qr-box svg { inline-size: 100%; block-size: 100%; display: block; }
.qr-box.stale { opacity: .35; transition: opacity .2s; }
.timer { inline-size: min(100%, 360px); block-size: 8px; border-radius: 999px; background: var(--ink); overflow: hidden; }
.timer > i { display: block; block-size: 100%; background: var(--accent); transform-origin: left; }
[dir="rtl"] .timer > i { transform-origin: right; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.stat b { display: block; font: 700 2.8rem/.95 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat.ok b { color: var(--ok); } .stat.warn b { color: var(--warn); }
.who { display: flex; align-items: center; gap: 10px; min-inline-size: 0; }
.who .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.reasons { font-size: .82rem; color: var(--muted); }
@media (min-width: 720px) { .two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; } }
/* projector mode: only the title, one big centered QR and the live count */
body.present .topbar, body.present .tabbar, body.present .notice, body.present .no-present, body.present .page-head, body.present .back, body.present .hint { display: none !important; }
body.present main { max-inline-size: none; padding: 16px; min-block-size: 100dvh; display: grid; place-items: center; }
body.present main > .stack { inline-size: 100%; }
body.present .two-col { display: block; }
body.present .qr-card { background: transparent; border: 0; box-shadow: none; padding: 0; gap: 18px; }
body.present .qr-box { inline-size: min(62vh, 90vw); max-inline-size: none; padding: clamp(8px, 1.6vh, 18px); }
body.present .timer { inline-size: min(62vh, 90vw); max-inline-size: none; }
.present-only { display: none; }
body.present .present-only { display: grid; justify-items: center; }
.present-title { font: 700 clamp(1.6rem, 3.8vh, 2.8rem)/1.1 var(--font-display); text-align: center; }
.present-stats { font-size: clamp(1.2rem, 3vh, 2rem); font-weight: 600; color: var(--muted); }
.present-stats b { font: 700 1.7em/1 var(--font-display); color: var(--ok); font-variant-numeric: tabular-nums; }

/* ===================================================================== */
/* Check-in                                                              */
/* ===================================================================== */
.result { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 28px 4px; }
.steps { display: grid; gap: 8px; }
.step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.step .n { inline-size: 28px; block-size: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: .85rem; flex: none; }
.step .n svg { inline-size: 16px; block-size: 16px; }
.step.done .n { background: var(--ok); color: var(--on-status); }
.step.now { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.camera { position: relative; inline-size: 100%; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: #000; }
.camera video, .camera img, .camera canvas { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.camera.scan { aspect-ratio: 1; }
.camera .frame { position: absolute; inset: 14%; border: 3px solid rgb(255 255 255 / .9); border-radius: var(--radius); box-shadow: 0 0 0 999px rgb(0 0 0 / .35); pointer-events: none; }
.camera .shutter-hint { position: absolute; inset-inline: 0; inset-block-end: 10px; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 4px #000; }
/* the pass: what an attendee shows at the door ("I am here", stamped) */
.pass {
  position: relative; inline-size: min(100%, 380px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-raised); text-align: start; overflow: hidden;
}
.pass-top { display: grid; gap: 4px; padding: 20px 22px 18px; }
.pass-top .eyebrow { color: var(--brand); }
.pass-top h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.pass-cut { position: relative; block-size: 0; border-block-start: 2px dashed var(--line); margin-inline: 14px; }
.pass-cut::before, .pass-cut::after { content: ""; position: absolute; inset-block-start: -11px; inline-size: 20px; block-size: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.pass-cut::before { inset-inline-start: -25px; } .pass-cut::after { inset-inline-end: -25px; }
.pass-bottom { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px 22px 20px; }
.pass-bottom .stack-xs span:first-child { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.pass-bottom b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stamp {
  inline-size: 74px; block-size: 74px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-12deg);
  border: 3px solid currentColor; font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; line-height: 1.05;
  animation: stamp .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp.ok { color: var(--ok); } .stamp.warn { color: var(--warn); } .stamp.bad { color: var(--bad); }
.stamp svg { inline-size: 22px; block-size: 22px; display: block; margin: 0 auto 2px; }
@keyframes stamp { from { transform: rotate(-12deg) scale(1.6); opacity: 0; } }

/* ===================================================================== */
/* Photos, reports, prose                                                */
/* ===================================================================== */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumb { position: relative; margin: 0; aspect-ratio: 4/3; border-radius: var(--radius-xs); overflow: hidden; background: var(--surface-2); }
.thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.thumb-del { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; inline-size: 32px; block-size: 32px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.thumb-del svg { inline-size: 16px; block-size: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table.table { inline-size: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 14px; text-align: start; border-block-end: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.table tr:last-child td { border-block-end: 0; }
.table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table td.name { white-space: normal; font-weight: 600; }
.rate { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.rate i { display: inline-block; inline-size: 64px; block-size: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rate i > i { display: block; block-size: 100%; background: var(--ok); }
.rate.low i > i { background: var(--warn); }
.report-filters { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-filters .input { min-inline-size: 0; }
.report-filters .field:last-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .report-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); } .report-filters .field:last-child { grid-column: auto; } }
.prose { display: grid; gap: 14px; line-height: 1.65; }
.prose h2 { margin-block-start: 10px; }
.prose ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; }

/* ===================================================================== */
/* Account pages                                                         */
/* ===================================================================== */
main.public { max-inline-size: none; padding: 0; }
.auth { min-block-size: 100dvh; display: grid; align-content: center; justify-items: center; gap: 20px; padding: 32px 16px; background: var(--bg); }
.auth.pattern::before { background: var(--brand); opacity: .07; }
.auth-brand { display: flex; align-items: center; gap: 10px; font: 700 1.5rem/1 var(--font-display); color: var(--text); }
.auth-brand img { border-radius: 10px; }
.auth-brand:hover { text-decoration: none; }
.auth-card { inline-size: min(100%, 440px); display: grid; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 5vw, 32px); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.75rem; }
.auth-context { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); }
.auth-context b { display: block; overflow-wrap: anywhere; }
.auth-context .feature-icon { background: var(--surface); }
.auth-foot { color: var(--muted); font-size: .95rem; }
.auth-foot a { font-weight: 600; }

/* ===================================================================== */
/* Landing                                                               */
/* ===================================================================== */
.landing { --wrap: 1120px; --pad: max(16px, calc((100% - var(--wrap)) / 2)); background: var(--surface); }
.land-nav {
  position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px var(--pad);
  background: var(--ink); color: var(--on-ink); border-block-end: 1px solid var(--ink-line);
}
.land-hero { display: grid; gap: 40px; align-items: center; padding: clamp(36px, 7vw, 88px) var(--pad) 56px; }
@media (min-width: 900px) { .land-hero { grid-template-columns: 1.05fr 1fr; } }
.hero-text { display: grid; gap: 20px; justify-items: start; }
.hero-text .eyebrow { color: var(--brand); }
.land-hero h1 { font-size: clamp(2.7rem, 1.5rem + 4.6vw, 4.6rem); letter-spacing: -.02em; line-height: 1.04; font-weight: 700; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); color: var(--muted); max-inline-size: 34rem; }
.hero-art { justify-self: center; inline-size: min(100%, 440px); }
.demo { display: grid; gap: 14px; justify-items: center; padding: 26px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-raised); }
.demo-title { font: 700 1.3rem/1.15 var(--font-display); text-align: center; }
.demo-qr { inline-size: 70%; aspect-ratio: 1; background: #fff; border-radius: var(--radius-sm); padding: 10px; border: 1px solid var(--line); }
.demo-qr svg { inline-size: 100%; block-size: 100%; display: block; }
.demo .timer { inline-size: 70%; }
.demo-count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.demo-count b { color: var(--ok); font: 700 1.6rem/1 var(--font-display); }
.demo-feed { inline-size: 100%; display: grid; gap: 6px; min-block-size: 152px; align-content: start; list-style: none; margin: 0; padding: 0; }
.demo-feed .item { min-block-size: 44px; padding: 8px 12px; animation: rise .3s ease-out; }
.land-section { padding: 56px var(--pad); display: grid; gap: 26px; }
.land-section.alt { background: var(--bg); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; max-inline-size: 42rem; }
.section-head h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); }
.problem-grid, .who-grid, .steps-grid, .modes-grid, .facts { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 760px) {
  .problem-grid { grid-template-columns: repeat(5, 1fr); }
  .steps-grid { grid-template-columns: repeat(5, 1fr); }
  .who-grid { grid-template-columns: repeat(5, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .modes-grid { grid-template-columns: 1fr 1fr; }
}
.problem-grid li { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: .95rem; }
.problem-grid svg { inline-size: 20px; block-size: 20px; color: var(--bad); }
.step-card { display: grid; gap: 8px; align-content: start; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.step-card svg { inline-size: 20px; block-size: 20px; color: var(--brand); flex: none; }
.step-num { font: 700 2.4rem/.9 var(--font-display); color: var(--brand); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.who-grid li { display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.who-grid svg { inline-size: 22px; block-size: 22px; color: var(--brand); }
.mode-card { display: grid; gap: 10px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { inline-size: 18px; block-size: 18px; color: var(--ok); flex: none; margin-block-start: 3px; }
.promise { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 72px var(--pad); color: var(--on-ink); background: var(--ink); overflow: hidden; }
.promise.pattern::before { background: var(--accent); opacity: .12; }
.promise h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); letter-spacing: -.02em; line-height: 1.12; font-weight: 700; max-inline-size: 20ch; }
.promise p { color: var(--on-ink-muted); max-inline-size: 40rem; }
.facts > div { display: grid; gap: 6px; padding: 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
.facts svg { inline-size: 22px; block-size: 22px; color: var(--brand); }
.land-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 20px var(--pad) 40px; color: var(--muted); }
.land-foot .frieze { flex: 0 0 100%; color: var(--line-strong); margin-block-end: 8px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
