/* Vouch – Nine-inspired. Fonts and colours follow nine.ch (Inter Tight, Sora, #4a3ce5); all are tokens below. */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-tight-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/sora-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/sora-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f6f6fa;
  --bg-tint: #f0f0f8;
  --surface: #ffffff;
  --surface-2: #fafafd;
  --ink: #101828;
  --ink-2: #404653;
  --muted: #70747e;
  --line: #e7e8e9;
  --line-strong: #cfd1d4;
  --brand-ink: #101828;
  --primary: #4a3ce5;
  --primary-hover: #3a2dcc;
  --primary-ink: #ffffff;
  --primary-soft: #eeedfd;
  --primary-soft-strong: #a59dff;
  --accent: #ff7a59;
  --accent-soft: #fff0eb;
  --ok: #138a52;
  --ok-soft: #e4f6ec;
  --warn: #a35e00;
  --warn-soft: #fff4dd;
  --danger: #c8321f;
  --danger-soft: #fdeceb;
  --focus: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(15 27 45 / .06);
  --shadow: 0 1px 2px rgb(15 27 45 / .05), 0 8px 24px -12px rgb(15 27 45 / .18);
  --shadow-lg: 0 24px 60px -20px rgb(15 27 45 / .35);
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --avatar-l: 92%; --avatar-c: 0.07; --avatar-text: 38%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b111b; --bg-tint: #101827; --surface: #121a28; --surface-2: #162032;
    --ink: #eef2f8; --ink-2: #c3cbd9; --muted: #8e9ab0; --line: #222d40; --line-strong: #33415a;
    --brand-ink: #eef2f8; --primary: #8f86ff; --primary-hover: #a59dff; --primary-ink: #0b111b;
    --primary-soft: #1f1c45; --primary-soft-strong: #4a3ce5; --accent: #ff8f72; --accent-soft: #2e1c19;
    --ok: #4cc98a; --ok-soft: #12291f; --warn: #f0b252; --warn-soft: #2c2210; --danger: #ff7b6b; --danger-soft: #2f1716;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .7);
    --avatar-l: 34%; --avatar-c: 0.06; --avatar-text: 88%;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.55; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.18; margin: 0 0 .4em; letter-spacing: -0.025em; font-weight: 600; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
em { font-style: normal; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.js-only { display: none !important; }
.js .js-only { display: flex !important; }
.print-only { display: none; }
::selection { background: var(--primary-soft-strong); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 560px; padding-top: 40px; padding-bottom: 40px; }
main.container { padding-top: 28px; padding-bottom: 48px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 20px; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 650; letter-spacing: -0.03em; font-size: 1.1rem; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.mainnav { display: flex; gap: 4px; margin-left: 8px; }
.mainnav a { color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 550; font-size: .94rem; }
.mainnav a:hover { background: var(--bg-tint); color: var(--ink); }
.mainnav a[aria-current] { background: var(--ink); color: var(--bg); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-tint); border: 1px solid var(--line); }
.lang a { font-size: .74rem; font-weight: 650; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.lang a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.usermenu, .export, .rowmenu { position: relative; }
.usermenu summary { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid transparent; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--surface); border-color: var(--line); }
.usermenu-name { font-weight: 560; font-size: .92rem; }
.i-chevron { width: 16px; height: 16px; transition: transform .2s; color: var(--muted); }
details[open] > summary .i-chevron { transform: rotate(180deg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; animation: pop .16s ease-out; }
.menu-right { right: 0; }
.menu-wide { min-width: 280px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px;
  color: var(--ink); text-decoration: none; font: inherit; font-size: .92rem; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg-tint); }
.menu button.danger { color: var(--danger); }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.menu-head small { color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-form { padding: 6px 10px 10px; }
.menu-form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-weight: 550; }
.menu-form input { padding: 8px 10px; font-size: .92rem; }
.menu a strong { display: block; font-weight: 600; }
.menu a small { display: block; color: var(--muted); font-size: .8rem; }
.filetype { font: 700 .66rem/1 var(--mono); letter-spacing: .04em; padding: 6px 0; width: 44px; text-align: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); flex: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.footer { padding: 24px 20px 36px; color: var(--muted); font-size: .84rem; display: flex; justify-content: center; }
.footer span { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- avatars, pills, tags ---------- */
.avatar { --h: 220; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: oklch(var(--avatar-l) var(--avatar-c) var(--h)); color: oklch(var(--avatar-text) 0.12 var(--h));
  font-weight: 680; font-size: .8rem; letter-spacing: .02em; user-select: none; }
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1rem; }
.avatar-empty { background: var(--bg-tint); color: var(--muted); border: 1.5px dashed var(--line-strong); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: .86rem; font-weight: 560; color: var(--ink-2); }
.pill-live { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.pill-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 620; background: var(--bg-tint); color: var(--ink-2); white-space: nowrap; }
.tag-primary { background: var(--primary-soft); color: var(--primary); }
.tag-ok, .tag[data-action="vote.cast"] { background: var(--ok-soft); color: var(--ok); }
.tag-warn, .tag[data-action="vote.update"] { background: var(--warn-soft); color: var(--warn); }
.tag-danger, .tag[data-action="vote.withdraw"] { background: var(--danger-soft); color: var(--danger); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--bg-tint); font-size: .78rem; font-weight: 700; }
.slot-tag { font: 600 .72rem var(--mono); color: var(--muted); }

/* ---------- buttons ---------- */
.btn { --b: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid transparent; background: var(--b); color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .08s, box-shadow .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .6; cursor: default; }
.btn-primary.is-saved:disabled { background: var(--bg-tint); color: var(--muted); border-color: var(--line); box-shadow: none; opacity: 1; cursor: default; }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 80%, transparent); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-tint); color: var(--ink); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: 7px 13px; font-size: .86rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn .spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--bg-tint); color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-weight: 600; font-size: .9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
input[type=datetime-local] { padding: 9px 10px; font-size: .9rem; }
.input-group { position: relative; display: flex; }
.input-group input { padding-right: 46px; }
.input-addon { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0;
  background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.input-addon:hover, .input-addon[aria-pressed="true"] { color: var(--ink); background: var(--bg-tint); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.field-hint { color: var(--muted); font-size: .82rem; margin: 0; }
.field-hint.ok { color: var(--ok); }
.field-hint.bad, .counter.bad { color: var(--danger); }
.counter { font-variant-numeric: tabular-nums; }
.hint { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .86rem; margin: 22px 0 0; }
.hint .i { margin-top: 2px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .92rem; margin: 0 0 18px; }
.alert .i { margin-top: 2px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--primary-soft); color: var(--ink-2); }
.alert-info .i { color: var(--primary); }
.alert-warn { background: var(--warn-soft); color: var(--ink-2); }
.alert-warn .i { color: var(--warn); }
.alert code { white-space: normal; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--accent); margin-bottom: 14px; }

/* ---------- auth ---------- */
.page-auth { background: var(--surface); }
main.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; background: #101828; color: #eef2f8; }
.auth-art .brand { color: #eef2f8; }
.auth-art-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; }
.auth-quote { font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 13ch; margin: 0 0 8vh; }
.auth-quote em { color: #a59dff; }
.orbs span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: -1; }
.orbs span:nth-child(1) { width: 420px; height: 420px; background: #4a3ce5; right: -120px; top: -80px; animation: drift 18s ease-in-out infinite alternate; }
.orbs span:nth-child(2) { width: 300px; height: 300px; background: #ff7a59; left: -60px; bottom: 10%; opacity: .4; animation: drift 22s ease-in-out infinite alternate-reverse; }
.orbs span:nth-child(3) { width: 220px; height: 220px; background: #a59dff; right: 20%; bottom: -60px; opacity: .35; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }
.auth-panel { display: flex; flex-direction: column; padding: 24px; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; }
.auth-card h1 { font-size: 2rem; }
.auth-brand-mobile { display: none; margin-bottom: 28px; }

/* ---------- vote page ---------- */
.hero { padding: 28px 0 30px; max-width: 760px; }
.display { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 650; letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 16px; }
.display em { color: var(--primary); }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 62ch; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.progress-dots { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); font-weight: 560; margin-left: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); transition: background .3s, transform .3s; }
.dot.on { background: var(--accent); transform: scale(1.15); }
.progress-dots span[data-progress-label] { margin-left: 4px; }

.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.slot { padding: 22px; position: relative; transition: border-color .25s, box-shadow .25s, transform .25s; scroll-margin-top: 90px; }
.slot.is-filled { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.slot.is-dirty { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); }
.slot.just-saved { animation: saved .9s ease-out; }
@keyframes saved { 30% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow); } }
.slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.slot-num { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.slot-state { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.slot.is-filled .slot-state { color: var(--ok); }
.slot.is-dirty .slot-state { color: var(--primary); }
.slot-state .i { width: 15px; height: 15px; }
.slot-form > * + * { margin-top: 18px; }
.nominee-field { position: relative; }
.js .nominee-select { position: absolute; opacity: 0; pointer-events: none; height: 1px; width: 1px; }
.nominee-btn { width: 100%; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); border: 1.5px dashed var(--line-strong);
  background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.nominee-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.is-filled .nominee-btn, .nominee-btn.chosen { border-style: solid; border-color: var(--line); background: var(--surface); }
.is-filled .nominee-btn:hover, .nominee-btn.chosen:hover { border-color: var(--primary); }
.nominee-btn.shake { animation: shake .4s; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.nominee-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nominee-text strong { font-size: 1.06rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nominee-text small { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nominee-change { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: .86rem; font-weight: 600; }
.self-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink-2); font-size: .88rem; }
.self-note .i { color: var(--accent); margin-top: 2px; }
.prompts { flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.slot-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.saved-at { margin-left: auto; font-size: .8rem; color: var(--muted); }
.nominee-static { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.reason-quote { margin: 0 0 10px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: pre-wrap; color: var(--ink-2); }
.slot-empty-static { padding: 28px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* picker */
.picker { padding: 0; border: 0; background: transparent; width: min(560px, calc(100vw - 24px)); max-height: min(680px, calc(100vh - 48px)); color: var(--ink); }
.picker::backdrop { background: rgb(11 17 27 / .45); backdrop-filter: blur(3px); }
.picker[open] { animation: dialog-in .2s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.picker-inner { display: flex; flex-direction: column; max-height: min(680px, calc(100vh - 48px)); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px 22px; }
.picker-head h2 { margin: 0; }
.picker-search { position: relative; padding: 8px 18px 12px; }
.picker-search .i { position: absolute; left: 32px; top: 50%; transform: translateY(-60%); color: var(--muted); }
.picker-search input { padding-left: 42px !important; font-size: 1rem; border-radius: 999px !important; background: var(--surface-2) !important; }
.picker-list { list-style: none; margin: 0; padding: 4px 10px 10px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.picker-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.picker-list li[aria-selected="true"] { background: var(--primary-soft); }
.picker-list li .p-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.picker-list li .p-text strong { font-weight: 600; }
.picker-list li .p-text small { color: var(--muted); font-size: .82rem; }
.picker-list mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.picker-list .p-badges { display: flex; gap: 4px; }
.picker-list li.current { box-shadow: inset 0 0 0 1.5px var(--primary); }
.picker-empty { padding: 30px; text-align: center; color: var(--muted); }
.picker-foot { display: flex; gap: 16px; justify-content: center; padding: 10px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); background: var(--surface-2); }
kbd { font: 600 .7rem var(--mono); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface); margin-right: 2px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 560; font-size: .92rem; box-shadow: var(--shadow-lg); animation: toast-in .3s cubic-bezier(.2, .9, .3, 1.2); }
.toast-error { background: var(--danger); color: #fff; }
.toast.out { animation: toast-out .25s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

/* ---------- admin ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-tint); border-radius: 999px; border: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 580; font-size: .92rem; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.export summary { list-style: none; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kpi-row { display: flex; align-items: center; gap: 14px; }
.kpi-value { font-family: var(--display); font-size: 1.9rem; font-weight: 650; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .95rem; color: var(--muted); font-weight: 560; margin-left: 4px; letter-spacing: 0; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi .pill { align-self: flex-start; }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--bg-tint) 0); }
.ring span { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.bar { display: block; height: 6px; border-radius: 99px; background: var(--bg-tint); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head.wrap { flex-wrap: wrap; align-items: center; }
.section-head h2 { margin: 0; }
.section-head p { margin: 2px 0 0; }
.leaderboard { list-style: none; margin: 0; padding: 0; }
.leaderboard li + li { border-top: 1px solid var(--line); }
.leaderboard summary { display: grid; grid-template-columns: 30px 36px minmax(0, 1.2fr) minmax(60px, 1fr) auto 18px; align-items: center; gap: 12px; padding: 12px 6px; border-radius: 12px; }
.leaderboard summary:hover { background: var(--surface-2); }
.rank { font-weight: 720; font-size: .9rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rank-1 { color: var(--accent); font-size: 1.05rem; }
.lb-name { display: flex; flex-direction: column; min-width: 0; }
.lb-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar { height: 8px; background: var(--bg-tint); border-radius: 99px; overflow: hidden; }
.lb-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.lb-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-count strong { font-size: 1.1rem; }
.lb-count small { color: var(--muted); }
.lb-reasons { padding: 4px 6px 18px 84px; }
.reason { margin: 12px 0 0; }
.reason blockquote { margin: 0; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; border-left: 3px solid var(--accent); white-space: pre-wrap; color: var(--ink-2); font-size: .94rem; }
.reason figcaption { font-size: .82rem; margin-top: 6px; font-weight: 600; }
.people-mini { list-style: none; padding: 0; margin: 0 0 12px; max-height: 360px; overflow-y: auto; }
.people-mini li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.people-mini li > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.people-mini small { color: var(--muted); font-size: .78rem; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state .i { width: 32px; height: 32px; color: var(--line-strong); margin-bottom: 8px; }
.empty-state.small { padding: 32px 16px; }
.error-code { font-family: var(--display); font-weight: 700; font-size: 6rem; line-height: 1; color: var(--accent); margin: 0 0 8px; }

.search-box { position: relative; width: min(280px, 100%); }
.search-box .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding: 8px 12px 8px 36px !important; border-radius: 999px !important; font-size: .9rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -24px; padding: 0 24px; }
.card.table-wrap { margin: 0; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; width: 1%; }
.table-compact td { padding: 8px 12px; }
.table tr.is-inactive td { opacity: .55; }
.table tr:target td { background: var(--primary-soft); }
.who { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.who > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.who small { color: var(--muted); font-size: .8rem; }
.arrow { color: var(--muted); white-space: nowrap; padding-top: 18px !important; }
.reason-cell { white-space: pre-wrap; min-width: 260px; max-width: 520px; color: var(--ink-2); }
.pw { font-weight: 700; letter-spacing: .04em; }
.filter-empty { padding: 16px 0 0; text-align: center; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.back-link:hover { color: var(--ink); }

.import-card { margin-bottom: 20px; }
.import-card > summary { margin: 0; align-items: center; }
.import-card > summary h2 { display: flex; align-items: center; gap: 8px; }
.import-card > summary > span { display: flex; flex-direction: column; gap: 4px; }
.import-form { margin-top: 18px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.dropzone { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .i { width: 26px; height: 26px; color: var(--primary); }
.dropzone span { display: flex; flex-direction: column; }
.dropzone small { color: var(--muted); }
.help-list { margin: 0; padding-left: 18px; }
.help-list li + li { margin-top: 4px; }
textarea.mono { font-family: var(--mono); font-size: .86rem; }
.shared-pw { max-width: 420px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form input { max-width: 320px; }
.danger-zone { margin-top: 20px; border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.danger-zone h2 { display: flex; align-items: center; gap: 8px; color: var(--danger); }
.reset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.reset-grid .inline-form input { max-width: 140px; font-family: var(--mono); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
@media (max-width: 640px) { .reset-grid { grid-template-columns: 1fr; } }

/* password */
.pw-card { padding: 32px; }
.meter { height: 6px; border-radius: 99px; background: var(--bg-tint); overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s, background .3s; background: var(--danger); }
.meter-label { font-size: .8rem; color: var(--muted); margin: 0; min-height: 1.2em; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.checklist li { display: flex; align-items: center; gap: 8px; transition: color .2s; }
.checklist .i { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: var(--bg-tint); color: transparent; transition: all .2s; }
.checklist li.ok { color: var(--ink); }
.checklist li.ok .i { background: var(--ok); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  main.auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-brand-mobile { display: block; }
  .slots { grid-template-columns: 1fr; }
  .import-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .usermenu-name, .mainnav + .topbar-right .usermenu-name { display: none; }
  .topbar-inner { gap: 10px; }
  .mainnav { margin-left: 0; }
  .mainnav a { padding: 6px 10px; font-size: .88rem; }
  .topbar .brand-name { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 1.6rem; }
  .card-pad { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .slot { padding: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .leaderboard summary { grid-template-columns: 24px 36px minmax(0, 1fr) auto 16px; }
  .lb-bar { display: none; }
  .lb-reasons { padding-left: 6px; }
  .tabs a { padding: 7px 11px; }
  .tabs a .i { display: none; }
  .saved-at { margin-left: 0; width: 100%; }
  .picker-foot { display: none; }
  .picker { max-height: calc(100vh - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- print: credential slips ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; color: #000; display: block; }
  .topbar, .footer, .no-print, .toasts, .skip { display: none !important; }
  main.container { padding: 0; max-width: none; }
  .print-only { display: block; }
  .slips { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .slip { break-inside: avoid; border: 1px dashed #999; padding: 9mm 8mm; font-size: 10.5pt; color: #000; }
  .slip-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4mm; }
  .slip-head .mark { width: 18px; height: 18px; }
  .slip-head span { margin-left: auto; color: #555; font-size: 9pt; }
  .slip-hello { font-weight: 650; margin: 0 0 3mm; }
  .slip dl { display: grid; grid-template-columns: auto 1fr; gap: 1.5mm 4mm; margin: 0 0 3mm; }
  .slip dt { color: #555; }
  .slip dd { margin: 0; font-weight: 700; word-break: break-all; }
  .slip-foot { font-size: 8.5pt; color: #555; margin: 0; }
}
