/* DataProof, in Leukaemia Foundation colours: a navy frame, royal-blue actions, light-blue selection,
   lime for celebration, and one brand colour per term status. Light and dark come from one token set. */

:root {
  color-scheme: light dark;

  /* brand */
  --navy: #000d35;
  --royal: #001489;
  --sky: #adc9ff;
  --lime: #ccfb61;
  --teal: #12d1c2;
  --lavender: #b094ff;

  /* surfaces and ink */
  --paper: light-dark(#f3f5fa, #00081f);
  --surface: light-dark(#ffffff, #000d35);
  --surface-2: light-dark(#eef2fb, #0b1a4d);
  --ink: light-dark(#000d35, #f2f4fa);
  --ink-2: light-dark(#26304f, #c9cfe3);
  --muted: light-dark(#565e78, #9aa3c2);
  --line: light-dark(#e0e5f0, #1b2a5c);
  --line-strong: light-dark(#c2c9db, #31437f);

  /* actions */
  --accent: light-dark(#001489, #adc9ff);
  --accent-ink: light-dark(#ffffff, #000d35);
  --accent-hover: light-dark(#000d35, #d6e4ff);
  --accent-soft: light-dark(#e6edff, #14266a);

  /* the frame */
  --frame: light-dark(#000d35, #000614);
  --frame-ink: #f2f4fa;
  --frame-muted: #a9b4d6;

  /* term statuses: text colour, soft surface, solid fill (charts, buttons) and the ink on that fill */
  --verified: light-dark(#05706a, #3fe0d1);
  --verified-soft: light-dark(#d5f5f1, #063a40);
  --verified-fill: light-dark(#087a72, #12d1c2);
  --on-verified: light-dark(#ffffff, #000d35);
  --proposed: light-dark(#2c3800, #ccfb61);
  --proposed-soft: light-dark(#e4fca8, #26340a);
  --proposed-fill: light-dark(#a5d82e, #ccfb61);
  --challenge: light-dark(#5a33c9, #c9b5ff);
  --challenge-soft: light-dark(#efe9ff, #261b55);
  --challenge-fill: light-dark(#7d5ae6, #b094ff);
  --clash: light-dark(#b8222a, #ff8a8f);
  --clash-soft: light-dark(#fde6e6, #43141c);
  --clash-fill: light-dark(#c0262d, #ff8a8f);
  --on-clash: light-dark(#ffffff, #000d35);
  --similar: light-dark(#934a00, #ffb766);
  --similar-soft: light-dark(#fff0dc, #3d2610);
  --similar-fill: light-dark(#e08a2c, #ffb766);
  --muted-soft: light-dark(#eaedf3, #101e4f);
  --gold: light-dark(#946b00, #f2c94c);
  --gold-soft: light-dark(#fff6d6, #3a2f08);

  --shadow-c: light-dark(rgb(0 13 53 / .07), rgb(0 0 0 / .4));
  --shadow: 0 0 #0000;  /* resting surfaces: no shadow; a 1px line or a tone step separates them */
  --shadow-lg: 0 2px 4px var(--shadow-c), 0 18px 48px var(--shadow-c);
  --radius: 18px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);

  /* The Foundation's fonts win when they're installed or licensed; Figtree and Outfit are free matches. */
  --display: Gilroy, Outfit, "Segoe UI", system-ui, sans-serif;
  --sans: "Proxima Nova", Figtree, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;

  --tok-kw: light-dark(#5a33c9, #c9b5ff);
  --tok-fn: light-dark(#001489, #adc9ff);
  --tok-str: light-dark(#05706a, #3fe0d1);
  --tok-num: light-dark(#934a00, #ffb766);
  --tok-com: light-dark(#6c7390, #8390b5);
  --tok-var: light-dark(#0057b8, #8fd1ff);
  --tok-cls: light-dark(#9a2b5c, #ff9ec7);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  overflow-x: hidden;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--lime) 75%, transparent); color: var(--navy); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: 1.3rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code, pre, .mono { font-family: var(--mono); }
table { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.prewrap { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--accent); padding: 10px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 8px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain-list li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }

/* icons */
.i {
  width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.17em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- the frame: navy top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--frame); color: var(--frame-ink); }
.topbar__inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--frame-ink); }
.brand__mark { display: inline-flex; line-height: 0; overflow: visible; }
.brand__mark--lg { margin-bottom: 1rem; }
.brand__name { font: 800 1.2rem/1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }

/* The DataProof mark: two pages and an equals sign. On hover the pages line up. */
.logo { overflow: visible; display: block; }
.logo__back, .logo__front { transform-box: view-box; transition: transform .45s var(--ease-out); }
.logo__back { fill: var(--sky); transform-origin: 25.5px 19.5px; transform: rotate(8deg); }
.logo__page { fill: var(--royal); }
.logo__fold { fill: #ffffff; opacity: .22; }
.logo__eq { fill: var(--lime); transition: filter .3s ease; }
.topbar .logo__page { fill: #2346d6; }
.brand:hover .logo__back, .brand:focus-visible .logo__back { transform: translate(-7px, 5px) rotate(0deg); }
.brand:hover .logo__front, .brand:focus-visible .logo__front { transform: translate(0, -1px); }
.brand:hover .logo__eq, .brand:focus-visible .logo__eq { filter: drop-shadow(0 0 3px rgb(204 251 97 / .9)); }

.nav { display: flex; gap: 2px; flex-wrap: nowrap; flex: 1; white-space: nowrap; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  color: var(--frame-ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; font-weight: 600;
  transition: background-color .15s ease, color .15s ease;
}
.nav a { color: var(--frame-muted); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--frame-ink); background: rgb(255 255 255 / .08); } }
.nav a[aria-current="page"] { background: rgb(255 255 255 / .14); color: #ffffff; }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--lime); color: var(--navy); font: 700 .75rem/1 var(--sans);
}
.count--muted { background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.me { display: flex; align-items: center; gap: 6px; }
.me form { margin: 0; }
.me__points {
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--frame-ink); font-size: .9rem; white-space: nowrap;
  padding: 4px 12px 4px 4px; border-radius: 999px; min-height: 40px;
}
.me__points:hover { background: rgb(255 255 255 / .1); }
.me__points strong { color: var(--lime); font-variant-numeric: tabular-nums; }
.me__points .avatar { background: var(--sky); color: var(--navy); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  background: none; border: 0; color: var(--frame-ink); font-size: 1.05rem;
}
.icon-btn:hover { background: rgb(255 255 255 / .1); }
[data-theme-toggle] { position: relative; }
[data-theme-toggle] .i { position: absolute; transition: transform .35s var(--ease-out), opacity .2s ease; }
.icon-btn .i-moon, :root[data-theme="dark"] .icon-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"] .icon-btn .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
  :root:not([data-theme="light"]) .icon-btn .i-moon { opacity: 1; transform: none; }
}
.topbar .link-btn { color: var(--frame-muted); min-height: 40px; padding: 4px 10px; white-space: nowrap; }
.topbar .link-btn:hover { color: var(--frame-ink); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle { display: none; }
.nav .nav__add { margin-left: auto; background: var(--lime); color: var(--navy); }
.nav .nav__add:hover, .nav .nav__add[aria-current="page"] { background: #e2ff9a; color: var(--navy); }
.nav__add .i { stroke-width: 2.6; }

@media (max-width: 1120px) {
  .topbar__inner { flex-wrap: wrap; gap: 8px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 6px; order: 3; min-height: 40px;
    background: rgb(255 255 255 / .1); border: 0; color: var(--frame-ink); border-radius: 999px;
    padding: 8px 16px; font: 600 .95rem var(--sans); cursor: pointer;
  }
  .nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; padding: 4px 0 8px; }
  .nav.is-open { display: flex; }
  .nav a { min-height: 44px; }
  .nav .nav__add { margin: 6px 0 0; align-self: flex-start; }
  .me { order: 2; margin-left: auto; }
  .me__points span:last-child { display: none; }
  .me__points { padding-right: 4px; }
}
@media (max-width: 520px) {
  .nav-toggle { order: 2; padding: 8px 12px; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .me { order: 1; margin-left: auto; }
  .brand__name { display: none; }
}

/* ---------- layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 32px 16px 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: .35rem; }
.page-head p { margin-bottom: 0; }
.page-head h1 a { color: inherit; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { margin-bottom: 1rem; font-size: .9rem; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; min-height: 32px; }
.crumbs a:hover { color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card > h2:first-child { margin-top: 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty .logo { margin: 0 auto 1rem; }
.empty--page { padding: 96px 16px; }
.error-code { font: 800 4.5rem/1 var(--display); color: var(--line-strong); letter-spacing: -0.04em; }
.error-code .i { width: 4rem; height: 4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 650 .95rem var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .16s var(--ease-out), background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--accent); }
.btn:active, .rating__btn:active, .vote__btn:active, .icon-btn:active, .chip--link:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--verify { background: var(--verified-fill); border-color: var(--verified-fill); color: var(--on-verified); }
.btn--verify:hover { background: color-mix(in srgb, var(--verified-fill) 85%, var(--ink)); border-color: transparent; }
.btn--challenge { background: var(--challenge-soft); border-color: color-mix(in srgb, var(--challenge) 35%, transparent); color: var(--challenge); }
.btn--challenge:hover { background: var(--challenge); border-color: var(--challenge); color: var(--surface); }
.btn--ghost-danger { background: transparent; border-color: color-mix(in srgb, var(--clash) 50%, transparent); color: var(--clash); }
.btn--ghost-danger:hover { background: var(--clash-soft); border-color: var(--clash); }
.btn--danger { background: var(--clash-fill); border-color: var(--clash-fill); color: var(--on-clash); }
.btn--danger:hover { background: color-mix(in srgb, var(--clash-fill) 85%, var(--ink)); }
.btn--sm { min-height: 34px; padding: 5px 14px; font-size: .875rem; gap: 6px; }
.btn--lg { min-height: 50px; padding: 12px 18px; font-size: 1rem; white-space: normal; }
.btn--block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row--center { justify-content: center; }

/* ---------- pills, chips, flags ---------- */
.pill, .chip, .flag, .calc-tag {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  font-size: .78rem; font-weight: 650; padding: 2px 10px; line-height: 1.55; white-space: nowrap; vertical-align: middle;
}
.pill .i, .flag .i { width: 1em; height: 1em; stroke-width: 2.4; }
.chip { background: var(--surface-2); color: var(--ink-2); font-weight: 550; }
.chip--owner { box-shadow: inset 0 0 0 1px var(--accent); }
.pill--verified, .pill--upheld { background: var(--verified-soft); color: var(--verified); }
.pill--proposed, .pill--open { background: var(--proposed-soft); color: var(--proposed); }
.pill--challenged { background: var(--challenge-soft); color: var(--challenge); }
.pill--needs_work { background: var(--similar-soft); color: var(--similar); }
.pill--deprecated, .pill--rejected { background: var(--muted-soft); color: var(--muted); }
.flag--clash { background: var(--clash-soft); color: var(--clash); }
.flag--similar { background: var(--similar-soft); color: var(--similar); }
.calc-tag { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); font: 500 .72rem var(--mono); border-radius: 6px; padding: 0 7px; }

/* ---------- avatars ---------- */
.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; text-decoration: none;
}
.avatar--xs { width: 24px; height: 24px; font-size: .66rem; }
.avatar--sm { width: 32px; height: 32px; font-size: .76rem; }
.avatar--lg { width: 60px; height: 60px; font-size: 1.25rem; font-family: var(--display); }
.avatar--xl { width: 76px; height: 76px; font-size: 1.7rem; font-family: var(--display); }
.person { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 550; }
.person:hover { color: var(--accent); }

/* ---------- flashes ---------- */
.flashes { display: grid; gap: 8px; margin-bottom: 1.25rem; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .95rem; animation: rise-in .35s var(--ease-out) both; }
.flash--success { background: var(--verified-soft); color: var(--ink); }
.flash--info { background: var(--accent-soft); color: var(--ink); }
.flash--warning { background: var(--similar-soft); color: var(--ink); }
.flash--error { background: var(--clash-soft); color: var(--ink); }
@keyframes rise-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- tabs + search ---------- */
.tabs {
  display: flex; gap: 4px; margin-bottom: 1.25rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--line);
}
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 44px;
  color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent;
  white-space: nowrap; font-weight: 600;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab__count { font-size: .75rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 0 7px; font-variant-numeric: tabular-nums; }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; max-width: 100%; min-height: 44px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; min-height: 4.5em; }
textarea.mono { font-size: .88rem; line-height: 1.5; tab-size: 4; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; border-color: var(--accent); }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }

.finder { position: relative; margin-bottom: 1.5rem; }
.finder__row { display: flex; gap: 8px; flex-wrap: wrap; }
.finder__field { position: relative; flex: 1 1 320px; }
.finder__field .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.finder__field input { min-height: 52px; padding-left: 46px; border-radius: 999px; font-size: 1.05rem; border-color: var(--line-strong); }
.finder select { width: auto; min-height: 52px; border-radius: 999px; padding: 0 16px; }
.finder .btn { min-height: 52px; }
.finder .hint { margin: 8px 4px 0; }
.finder__clear { align-self: center; }
.filters select, .inline-form select { width: auto; }

/* live "what you might mean" results */
.suggest:empty { display: none; }
.suggest {
  margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px; transform-origin: top center; animation: drop-in .18s var(--ease-out) both;
}
@keyframes drop-in { from { opacity: 0; transform: scale(.98) translateY(-4px); } }
.suggest__title { font: 650 .85rem var(--sans); color: var(--muted); margin: 4px 8px 6px; }
.meaning__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.meaning__list li { padding: 10px 12px; border-radius: var(--radius-sm); }
.meaning__list li:hover { background: var(--surface-2); }
.meaning__list p { margin: 2px 0 0; color: var(--ink-2); font-size: .92rem; }
.meaning__list a { color: var(--ink); font-family: var(--display); font-size: 1.02rem; }
.meaning__dym { margin: 0 8px 6px; font-size: .92rem; }
.meaning__results { margin-bottom: 1.5rem; }
.meaning__results h2 { margin-top: 0; font-size: 1.1rem; }
mark { background: color-mix(in srgb, var(--lime) 70%, transparent); color: var(--navy); border-radius: 3px; padding: 0 2px; }
.chip--link { cursor: pointer; text-decoration: none; color: var(--accent); background: var(--accent-soft); border: 0; margin: 0 2px; min-height: 28px; font: inherit; font-size: .85rem; font-weight: 600; }
.chip--link:hover { background: var(--sky); color: var(--navy); }

/* ---------- glossary list ---------- */
.glossary { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 28px; }
.az {
  position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 0;
  font: 700 .82rem var(--display); text-align: center;
}
.az a, .az span { display: grid; place-items: center; height: 24px; border-radius: 8px; }
.az a { color: var(--accent); text-decoration: none; }
.az a:hover { background: var(--accent); color: var(--accent-ink); }
.az span { color: var(--line-strong); }
.letter { margin-bottom: 2rem; scroll-margin-top: 88px; }
.letter__head {
  display: flex; align-items: baseline; gap: 12px;
  font: 800 2.4rem/1 var(--display); color: var(--accent); margin: 0 0 .25rem; letter-spacing: -0.03em;
}
.letter__head::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; transform: translateY(-.35em); }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { padding: 16px 0 14px; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.entry__name { font: 700 1.2rem var(--display); color: var(--ink); text-decoration: none; margin-right: 4px; letter-spacing: -0.01em; }
.entry__name:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.entry--deprecated .entry__name { text-decoration: line-through; color: var(--muted); }
.entry__def { color: var(--ink-2); margin: 0 0 6px; max-width: 72ch; }
.entry__meta { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.entry__reviewed { font-size: .8rem; color: var(--muted); }

@media (max-width: 640px) {
  .glossary { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .az {
    position: sticky; top: 64px; z-index: 5; flex-direction: row; overflow-x: auto;
    background: var(--paper); padding: 6px 0; gap: 2px; scrollbar-width: none; margin: 0 -16px; padding-inline: 12px;
  }
  .az a, .az span { min-width: 34px; height: 40px; }
}

/* ---------- term page ---------- */
.term__head { margin-bottom: 1.25rem; }
.term__title h1 { margin-bottom: .5rem; }
.term__badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.term__actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 2rem; }
.term__actions:empty { display: none; }
.term__actions form { margin: 0; }

/* The definition is the reason people come: big, on a light-blue page. */
.definition {
  background: color-mix(in srgb, var(--sky) 22%, var(--surface)); border-radius: var(--radius); padding: 26px 28px 20px;
  box-shadow: var(--shadow); margin-bottom: 1rem;
}
.definition__text { font: 500 clamp(1.2rem, 1.05rem + .6vw, 1.45rem)/1.5 var(--sans); color: var(--ink); max-width: 62ch; margin-bottom: .75rem; text-wrap: pretty; }
.definition__by { margin: 0; }

/* One-line status under the definition: what's going on, and where to go. */
.notices { display: grid; gap: 8px; margin-bottom: 1rem; }
.notice {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; border-radius: var(--radius-sm); font-size: .95rem;
}
.notice__icon { display: grid; place-items: center; flex-shrink: 0; }
.notice__icon .i { width: 22px; height: 22px; }
.notice__text { flex: 1; min-width: 200px; }
.notice__text p { margin: 2px 0 0; color: var(--ink-2); }
.notice--challenge { background: var(--challenge-soft); }
.notice--challenge .notice__icon { color: var(--challenge); }
.notice--clash { background: var(--clash-soft); }
.notice--clash .notice__icon { color: var(--clash); }
.notice--warn { background: var(--similar-soft); }
.notice--warn .notice__icon { color: var(--similar); }
.notice--muted { background: var(--muted-soft); }
.notice--muted .notice__icon { color: var(--muted); }

.term__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
@media (max-width: 860px) { .term__grid { grid-template-columns: minmax(0, 1fr); } }
.term__main > section { margin-bottom: 2rem; }
.section-title, .versus__label { font: 700 1.05rem/1.3 var(--display); color: var(--ink); margin: 0 0 .6rem; letter-spacing: -0.01em; }
.facts { margin: 0 0 1rem; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.side-box h3 { font-size: .98rem; margin-top: .75rem; }
.side-box h3:first-child { margin-top: 0; }
.side-box summary { cursor: pointer; font: 700 .98rem var(--display); min-height: 28px; }
.side-box[open] summary { margin-bottom: .75rem; }
.stack { display: grid; gap: 6px; margin-bottom: 12px; }
.stack label { font-weight: 600; font-size: .9rem; }
.history { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history__def { margin: 0; color: var(--muted); }
.callout { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 1rem; }
.callout--warn { background: var(--similar-soft); }
.challenge-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* clash comparison */
.clash-panel { background: var(--clash-soft); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 2rem; scroll-margin-top: 88px; }
.clash-panel h2 { display: flex; align-items: center; gap: 8px; color: var(--clash); margin-top: 0; font-size: 1.15rem; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.compare__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.compare__col p:last-child { margin-bottom: 0; }
.compare__col--this { box-shadow: inset 0 0 0 2px var(--line-strong); }
.compare__unit { font-weight: 700; font-size: .88rem; margin-bottom: .35rem; }
.compare--code { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.compare--choose .choice { display: flex; flex-direction: column; }
.choice__text { flex: 1; }
.choice .btn-row { margin-top: .5rem; }
.choice form { margin: 0; }
.clash-group {
  margin-bottom: 1.5rem; padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 88px;
}
.clash-group h2 { display: flex; align-items: center; gap: 10px; margin-top: 0; font-size: 1.2rem; }
.clash-group__icon { display: grid; place-items: center; flex-shrink: 0; }
.clash-group--clash .clash-group__icon { color: var(--clash); }
.clash-group--repeated .clash-group__icon, .clash-group--similar .clash-group__icon { color: var(--similar); }
.clash-group__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.clash-group__head form { margin: 0; }

/* code */
.code-tabs { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.code-tabs__bar { display: flex; gap: 2px; align-items: center; background: var(--surface-2); padding: 6px 6px 0; }
.code-tabs__bar [role="tab"] {
  border: 0; background: none; padding: 9px 16px; min-height: 40px; cursor: pointer; font: 650 .88rem var(--sans);
  color: var(--muted); border-radius: 10px 10px 0 0;
}
.code-tabs__bar [role="tab"]:hover { color: var(--ink); }
.code-tabs__bar [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); }
.code-tabs__copy {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 4px 6px auto; border: 0; background: none;
  color: var(--accent); cursor: pointer; font: 650 .85rem var(--sans); padding: 6px 12px; min-height: 34px; border-radius: 999px;
}
.code-tabs__copy:hover { background: var(--surface); }
pre.code { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: .88rem; line-height: 1.65; background: var(--surface); }
.compare--code pre.code { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.code .k, .code .kd, .code .kn, .code .kr, .code .kc, .code .ow { color: var(--tok-kw); font-weight: 600; }
.code .nf, .code .nb, .code .fm { color: var(--tok-fn); }
.code .s, .code .s1, .code .s2, .code .sa { color: var(--tok-str); }
.code .m, .code .mi, .code .mf { color: var(--tok-num); }
.code .c, .code .c1, .code .cm { color: var(--tok-com); font-style: italic; }
.code .nv { color: var(--tok-var); }
.code .nc { color: var(--tok-cls); }
.code .o { color: var(--ink-2); }

/* ---------- forms ---------- */
.form { max-width: 820px; }
.form__row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 650; margin-bottom: 4px; }
.field .hint { margin: -2px 0 8px; }
.field--error input, .field--error textarea, .field--error select { border-color: var(--clash); }
.req { color: var(--clash); }
.hint { color: var(--muted); font-size: .875rem; margin: 4px 0; }
.error-text, .warn-text, .ok { display: flex; align-items: flex-start; gap: 6px; font-size: .875rem; margin: 4px 0 0; }
.error-text { color: var(--clash); }
.warn-text { color: var(--similar); }
.ok { color: var(--verified); font-weight: 650; }
.error-text .i, .warn-text .i, .ok .i { margin-top: .15em; }
.optional { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.optional summary { cursor: pointer; font-weight: 650; min-height: 28px; }
.optional[open] summary { margin-bottom: 12px; }
.form__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.current-def { max-width: 820px; }
.current-def p:nth-child(2) { font: 1.15rem/1.55 var(--sans); margin: 0 0 .4rem; }
.current-def p:last-child { margin: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.field--end { align-self: end; }
.switch { display: inline-flex; gap: 8px; align-items: center; font-weight: 550; min-height: 40px; }
.switch input { width: 20px; }

/* live clash check */
.clash-live:empty { display: none; }
.clash-live { margin: -4px 0 18px; display: grid; gap: 6px; }
.clash-live__item { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .9rem; animation: rise-in .25s var(--ease-out) both; }
.clash-live__item--duplicate, .clash-live__item--clash { background: var(--clash-soft); }
.clash-live__item--aligned { background: var(--verified-soft); }
.clash-live__item--similar { background: var(--similar-soft); }
.clash-live__item a { color: var(--ink); font-weight: 600; }
.clash-live__item p { margin: 2px 0 0; color: var(--ink-2); }

/* ---------- challenges ---------- */
.challenge-card { display: flex; gap: 16px; align-items: flex-start; margin: 0; }
.challenge-card__body { flex: 1; min-width: 0; }
.challenge-card__body p:last-child { margin-bottom: 0; }
.challenge-card__term { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.challenge-card__term a { font: 700 1.1rem var(--display); color: var(--ink); text-decoration: none; }
.challenge-card__term a:hover { color: var(--accent); text-decoration: underline; }
.challenge-card > .btn { align-self: center; }
.score { display: grid; text-align: center; min-width: 58px; padding: 8px; border-radius: var(--radius-sm); background: var(--surface-2); }
.score__n { font: 800 1.35rem var(--display); font-variant-numeric: tabular-nums; }
.score__l { font-size: .72rem; color: var(--muted); }
.diff { font: 1.08rem/1.75 var(--sans); }
.diff del { background: var(--clash-soft); color: var(--clash); text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.diff ins { background: var(--verified-soft); color: var(--verified); text-decoration: none; border-radius: 4px; padding: 0 3px; }
.vote { display: flex; gap: 8px; margin-bottom: .5rem; }
.vote form { margin: 0; flex: 1; }
.vote__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 44px; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 700 1rem var(--sans); cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .15s ease;
}
.vote__btn:hover:not(:disabled) { background: var(--surface-2); }
.vote__btn.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vote__btn:disabled { opacity: .55; cursor: not-allowed; }
.votes-inline { font-size: .82rem; color: var(--muted); margin-left: 4px; }

.case { margin-bottom: 1.75rem; }
.case__quote {
  margin: 0 0 .6rem; padding: 14px 18px; background: var(--challenge-soft); border-radius: var(--radius-sm);
  font: 1.05rem/1.6 var(--sans); color: var(--ink);
}
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-bottom: 1.75rem; }
.versus__arrow { align-self: center; color: var(--muted); }
.versus__arrow .i { width: 28px; height: 28px; }
.versus__card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.versus__card--after { box-shadow: var(--shadow), inset 0 0 0 2px var(--challenge-fill); border-color: transparent; }
.versus__card--after.is-adopted { box-shadow: var(--shadow), inset 0 0 0 2px var(--verified-fill); background: var(--verified-soft); }
.versus__card--after.is-rejected { opacity: .75; box-shadow: var(--shadow); }
.versus__card--after.is-rejected .versus__text { text-decoration: line-through; text-decoration-color: var(--muted); }
.versus__text { font: 1.12rem/1.6 var(--sans); flex: 1; margin-bottom: 1rem; }
.versus__text--none { font: italic .95rem/1.5 var(--sans); color: var(--muted); }
.versus__by { margin: 0; font-size: .875rem; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .versus { grid-template-columns: 1fr; }
  .versus__arrow { transform: rotate(90deg); justify-self: center; }
}
.decision {
  background: var(--surface); border-radius: var(--radius); padding: 20px 22px; margin: 1.75rem 0;
  box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); scroll-margin-top: 90px;
}
.decision h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.decision--waiting { box-shadow: none; border: 1px dashed var(--line-strong); }
.decision.resolution--upheld { box-shadow: var(--shadow), inset 0 0 0 2px var(--verified-fill); }
.decision.resolution--rejected { box-shadow: var(--shadow), inset 0 0 0 2px var(--line-strong); }
.decision__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
@media (max-width: 520px) { .decision__buttons { grid-template-columns: 1fr; } }
.btn.is-locked { cursor: not-allowed; opacity: .85; white-space: normal; }
.lock-note { display: flex; align-items: center; gap: 8px; margin: -4px 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--challenge-soft); color: var(--challenge); font-size: .9rem; }
.lock-note--warn { background: var(--similar-soft); color: var(--similar); }

.history__item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.history__item div { display: grid; gap: 2px; }
.history__icon { display: grid; place-items: center; width: 26px; height: 22px; color: var(--muted); }
.history__icon .i { width: 16px; height: 16px; }
.history__item--verified .history__icon, .history__item--challenge_upheld .history__icon, .history__item--reviewed .history__icon { color: var(--verified); }
.history__item--challenged .history__icon { color: var(--challenge); }
.history__item--needs_work .history__icon { color: var(--similar); }
.history__item--challenge_rejected .history__icon, .history__item--deprecated .history__icon { color: var(--clash); }

/* ---------- dashboard ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.panel > h2:first-child, .panel > .sr-only:first-child + h2 { margin-top: 0; font-size: 1.1rem; }
.panel h2 { font-size: 1.1rem; }

.agreement { display: grid; grid-template-columns: minmax(240px, 2fr) 5fr; gap: 28px; align-items: center; }
.agreement__figure { font: 500 1.1rem/1 var(--display); color: var(--muted); margin: 0 0 .4rem; }
.agreement__figure strong { font: 800 2.6rem/1 var(--display); color: var(--ink); letter-spacing: -0.03em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.agreement__caption { margin: 0; color: var(--ink-2); font-size: .95rem; max-width: 34ch; }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.strip__cell { padding: 4px 18px; border-left: 1px solid var(--line); }
.strip dt { font-size: .85rem; line-height: 1.3; min-height: 2.6em; }
.strip dt a { color: var(--muted); text-decoration: none; }
.strip dt a:hover { color: var(--accent); text-decoration: underline; }
.strip dd { margin: 4px 0 0; font: 700 1.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.strip__cell--clash.is-flagged dd { color: var(--clash); }
.strip__cell--challenge.is-flagged dd { color: var(--challenge); }
.strip__cell--similar.is-flagged dd { color: var(--similar); }
@media (max-width: 900px) {
  .agreement { grid-template-columns: 1fr; gap: 18px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .strip__cell { border-left: 0; padding: 0; }
  .strip__cell:last-child { grid-column: 1 / -1; }
  .strip dt { min-height: 0; }
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.dash-grid h2 { margin-top: 0; }
.donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut svg { width: 180px; height: 180px; flex-shrink: 0; }
.donut .legend-table { flex: 1; min-width: 200px; width: auto; }
.donut__slice { stroke: var(--surface); stroke-width: 2; cursor: default; transition: opacity .15s ease; outline: none; }
.donut__slice:focus-visible { stroke: var(--ink); }
.donut.is-focusing .donut__slice:not(.is-active) { opacity: .3; }
.donut .legend-table tr.is-active th, .donut .legend-table tr.is-active td { background: var(--surface-2); }
.donut__total { font: 800 34px var(--display); fill: var(--ink); }
.donut__caption { font: 13px var(--sans); fill: var(--muted); }
.donut__slice.slice--clashing { fill: var(--clash-fill); }
.donut__slice.slice--verified { fill: var(--verified-fill); }
.donut__slice.slice--proposed { fill: var(--proposed-fill); }
.donut__slice.slice--challenged { fill: var(--challenge-fill); }
.donut__slice.slice--needs_work { fill: var(--similar-fill); }
.donut__slice.slice--deprecated { fill: var(--line-strong); }
.legend-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legend-table th, .legend-table td { padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 500; text-align: left; }
.legend-table tr:last-child th, .legend-table tr:last-child td { border-bottom: 0; }
.legend-table th { display: flex; align-items: center; gap: 10px; }
.legend-table th a { color: var(--ink); text-decoration: none; }
.legend-table th a:hover { text-decoration: underline; }
.legend-table td.num { text-align: right; width: 4em; }
.slice--clashing { background: var(--clash-fill); }
.slice--verified { background: var(--verified-fill); }
.slice--proposed { background: var(--proposed-fill); }
.slice--challenged { background: var(--challenge-fill); }
.slice--needs_work { background: var(--similar-fill); }
.slice--deprecated { background: var(--line-strong); }
.legend__swatch { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }

/* Each unit's status mix: one bar, segments in proportion, readable at any number of terms. */
.unit-table__mix { width: 28%; min-width: 160px; vertical-align: middle; }
.stackbar { display: flex; gap: 2px; height: 12px; }
.stackbar span { border-radius: 2px; min-width: 3px; }
.stackbar span:first-child { border-radius: 6px 2px 2px 6px; }
.stackbar span:last-child { border-radius: 2px 6px 6px 2px; }
.stackbar span:only-child { border-radius: 6px; }
td.is-flagged { color: var(--clash); font-weight: 700; }
.attention__list { list-style: none; margin: 0; padding: 0; }
.attention__item { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.attention__item:last-child { border-bottom: 0; }
.attention__body { display: grid; min-width: 0; }
.attention__body a { color: var(--ink); text-decoration: none; }
.attention__body a:hover { color: var(--accent); text-decoration: underline; }
.attention__icon { display: grid; place-items: center; color: var(--muted); }
.attention__icon .i { width: 20px; height: 20px; }
.attention__item--clash .attention__icon { color: var(--clash); }
.attention__item--challenge .attention__icon { color: var(--challenge); }
.attention__item--pending .attention__icon { color: var(--muted); }
.attention__item--review .attention__icon { color: var(--similar); }
.empty-inline { display: grid; justify-items: center; gap: 10px; color: var(--muted); padding: 28px 0; text-align: center; }
.table-wrap.table-wrap--flat { border: 0; margin: 0; background: none; }
.preview .num, .preview th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- versions ---------- */
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 900px; }
.version--current { box-shadow: var(--shadow), inset 0 0 0 2px var(--verified-fill); border-color: transparent; }
.version__head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; margin-bottom: .75rem; }
.version__head p { margin: 2px 0 0; }
.version__num {
  display: grid; place-items: center; min-width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font: 800 1.1rem var(--display);
}
.version__def { font: 1.08rem/1.6 var(--sans); }
.version__calc { margin-top: .5rem; }
.version__calc summary { cursor: pointer; font-weight: 650; font-size: .92rem; margin-bottom: .4rem; min-height: 28px; }
.vtag { display: inline-block; font: 700 .72rem var(--mono); background: var(--accent-soft); color: var(--accent); border-radius: 5px; padding: 0 5px; margin-right: 2px; }
.inline-review { margin: 6px 0 0; }
.inline-review .link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; font-size: .85rem; }

/* ---------- confirm dialog ---------- */
.confirm-dialog {
  border: 0; border-radius: var(--radius); padding: 22px 24px; max-width: min(460px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.confirm-dialog::backdrop { background: rgb(0 13 53 / .5); }
.confirm-dialog[open] { animation: dialog-in .2s var(--ease-out) both; }
.confirm-dialog[open]::backdrop { animation: fade-in .2s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
.confirm-dialog__msg { font: 1.05rem/1.55 var(--sans); margin: 0 0 18px; }
.confirm-dialog__actions { justify-content: flex-end; }

/* ---------- admin ---------- */
.unit-list { display: grid; gap: 8px; margin-bottom: 1.25rem; }
.unit-form { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em 4em 4.5em; gap: 8px; align-items: center; margin: 0; }
.unit-form--head { font-size: .82rem; font-weight: 650; color: var(--muted); }
.unit-form__code { text-transform: uppercase; }
.unit-form__count { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .unit-form { grid-template-columns: minmax(0, 1fr) 6em; }
  .unit-form--head, .unit-form__count { display: none; }
}
.page-head--tight { margin-bottom: .5rem; align-items: center; }
.page-head--tight h2 { margin: 0; }
.request-card { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.request-card:last-child { border-bottom: 0; }
.request-card__who p { margin: 2px 0 6px; }
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.invite-row form { margin: 0; }
.people-list { display: grid; gap: 8px; }
.person-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 8.5em 10em 3.5em 4.5em; gap: 8px; align-items: center; margin: 0; }
.person-form--head { font-size: .82rem; font-weight: 650; color: var(--muted); }
.person-form__name { font-weight: 650; overflow-wrap: anywhere; }
.person-form.is-inactive .person-form__name { color: var(--muted); text-decoration: line-through; }
.person-form select, .person-form input[type="email"] { width: 100%; }
@media (max-width: 860px) {
  .person-form { grid-template-columns: 1fr 1fr; }
  .person-form--head { display: none; }
}

/* ---------- stats / steward ---------- */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stat {
  display: grid; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 180px;
}
.stat__n { font: 700 1.6rem/1.1 var(--display); font-variant-numeric: tabular-nums; order: 2; }
.stat__l { order: 1; }
.stat--clash .stat__n { color: var(--clash); }
.stat--challenge .stat__n { color: var(--challenge); }
.stat__l { color: var(--muted); font-size: .875rem; }
.queue { margin-bottom: 2rem; }
.queue-item { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; margin: 0; }
.queue-item__body { min-width: 0; flex: 1; }
.queue-item__body p:last-child { margin: 0; }
.queue-item__actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 130px; }
.queue-item__actions form { margin: 0; }
.queue-item__actions .btn { width: 100%; }
@media (max-width: 640px) { .queue-item { flex-direction: column; } .queue-item__actions { flex-direction: row; } }

/* ---------- upload ---------- */
.steps { list-style: none; counter-reset: step; padding: 24px; max-width: 820px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 24px 52px; margin-left: 16px; }
.steps > li::after { content: ""; position: absolute; left: -1px; top: 34px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps > li::before {
  content: counter(step); position: absolute; left: -17px; top: -4px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 800 1rem var(--display);
}
.steps h2 { margin-top: 0; font-size: 1.12rem; }
.mini-table { border-collapse: collapse; font-size: .88rem; margin-bottom: .5rem; }
.mini-table th, .mini-table td { padding: 5px 18px 5px 0; text-align: left; border-bottom: 1px solid var(--line); }
.dropzone { display: grid; gap: 12px; }
.dropzone input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone__label {
  display: grid; place-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 32px 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2);
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone__label:hover, .dropzone.is-over .dropzone__label { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within .dropzone__label { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone__icon { color: var(--accent); }
.dropzone__icon .i { width: 32px; height: 32px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; }
table.preview { border-collapse: collapse; width: 100%; font-size: .9rem; }
.preview th, .preview td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.preview th { color: var(--muted); font-weight: 500; font-size: .85rem; white-space: nowrap; border-bottom-color: var(--line-strong); }
.preview tbody tr:last-child td { border-bottom: 0; }
.row--error { background: color-mix(in srgb, var(--clash-soft) 55%, transparent); }
.row--warn { background: color-mix(in srgb, var(--similar-soft) 45%, transparent); }

/* ---------- leaderboard + profile ---------- */
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .board-layout { grid-template-columns: minmax(0, 1fr); } }
.earn h2 { margin-top: 0; }
.earn .legend-table th { display: table-cell; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin-bottom: 1.75rem; }
.podium__place {
  display: grid; justify-items: center; gap: 6px; text-align: center; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 10px;
  box-shadow: var(--shadow); transition: transform .2s var(--ease-out), box-shadow .2s ease;
}
@media (hover: hover) and (pointer: fine) { .podium__place:hover { transform: translateY(-3px); } }
.podium__place--1 { order: 2; padding-top: 30px; }
.podium__place--2 { order: 1; }
.podium__place--3 { order: 3; }
.podium__pts { font: 800 1.2rem var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }

/* Medals: a numbered disc with a ribbon notch, gold/silver/bronze rims. */
.medal {
  --rim: var(--gold);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in srgb, var(--rim) 22%, var(--surface));
  box-shadow: inset 0 0 0 3px var(--rim); color: var(--ink); font: 800 1.05rem var(--display);
}
.medal--2 { --rim: light-dark(#7d8597, #c3c9d6); }
.medal--3 { --rim: light-dark(#a35b26, #e09a63); }
.board { list-style: none; padding: 0; margin: 0; }
.board__row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 52px; border-bottom: 1px solid var(--line); }
.board__row.is-me { background: var(--accent-soft); border-radius: var(--radius-sm); border-bottom-color: transparent; }
.board__rank { width: 24px; font: 800 1rem var(--display); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.board__unit { flex: 1; }
.board__badges { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; color: var(--muted); }
.board__pts { font-weight: 750; min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .board__unit { display: none; } .board__row .person { flex: 1; } }
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 0; }
.profile-head__pts { margin-left: auto; display: grid; text-align: right; }
.badges { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.badge--earned { box-shadow: var(--shadow); }
.badge--locked { background: transparent; border-style: dashed; }
.badge--locked .medallion { filter: grayscale(1); opacity: .4; }
.badge--locked strong { color: var(--muted); }
.progress { display: block; width: 100%; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* Badge medallion: navy disc, light-blue rim, lime icon. Earned ones catch the light now and then. */
.medallion {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  background: var(--navy);
  box-shadow: inset 0 0 0 3px var(--sky), inset 0 0 0 5px var(--navy);
  color: var(--lime);
}
.medallion .i { width: 26px; height: 26px; stroke-width: 2.2; }
.medallion::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 30%; width: 26%;
  background: rgb(255 255 255 / .4); transform: translateX(-260%) skewX(-20deg);
}
.badge--earned:hover .medallion::after, .toast .medallion::after { animation: shine 1.1s var(--ease-out) .35s both; }
@keyframes shine { to { transform: translateX(260%) skewX(-20deg); } }

/* ---------- sign-in ---------- */
.page--login { min-height: 100vh; display: grid; place-items: center; }
.login { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; max-width: 920px; width: 100%; }
.login__intro {
  position: relative; overflow: hidden;
  background: var(--royal); color: #ffffff; border-radius: var(--radius); padding: 40px 36px;
}
.login__intro h1 { color: #ffffff; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); margin-bottom: .25rem; }
.login__tagline { font: 700 1.15rem/1.4 var(--display); color: var(--lime); margin-bottom: 1rem; }
.login__intro > p:not(.login__tagline) { font: 1.08rem/1.6 var(--sans); color: #dfe7ff; max-width: 40ch; margin: 0; }

/* Pages arrive askew and settle into one neat stack, the front one drawn like the logo. */
.login__leaves { display: flex; margin-top: 30px; height: 44px; }
.login__leaves span {
  position: relative; width: 33px; height: 42px; border-radius: 7px; margin-right: -21px;
  background: var(--sky); box-shadow: inset 0 0 0 2px var(--navy);
  animation: leaf-settle .7s var(--ease-out) calc(.25s + var(--i) * 80ms) both;
}
.login__leaves span:last-child { background: #ffffff; }
.login__leaves span:last-child::before, .login__leaves span:last-child::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 4px; border-radius: 2px; background: var(--lime);
  box-shadow: 0 0 0 1px var(--navy);
}
.login__leaves span:last-child::before { top: 16px; }
.login__leaves span:last-child::after { top: 25px; }
.login__leaves span:nth-child(1) { --from: translate(-14px, 16px) rotate(-26deg); }
.login__leaves span:nth-child(2) { --from: translate(10px, -14px) rotate(20deg); }
.login__leaves span:nth-child(3) { --from: translate(-6px, 12px) rotate(-12deg); }
.login__leaves span:nth-child(4) { --from: translate(14px, -18px) rotate(32deg); }
.login__leaves span:nth-child(5) { --from: translate(-10px, 10px) rotate(-18deg); }
.login__leaves span:nth-child(6) { --from: translate(18px, -6px) rotate(14deg); }
@keyframes leaf-settle { from { transform: var(--from); opacity: 0; } 40% { opacity: 1; } }
.login__intro .logo__page { fill: #ffffff; }
.login__intro .logo__fold { fill: var(--royal); }
.login__form h2 { margin-top: 0; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; gap: 20px; } .login__intro { padding: 28px 24px; } }
.auth-links { margin: 14px 0 0; font-size: .92rem; text-align: center; }
.auth-alt { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.auth-alt p { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.demo-hint { margin-top: 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: .9rem; }
.demo-hint p { margin: 0 0 6px; }
.demo-hint ul { margin: 0; padding-left: 18px; }
.demo-hint code { font-size: .85rem; }

/* ---------- shared terms, ratings ---------- */
.unit-list-side li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.unit-list-side form { margin: 0; }
.add-unit { display: flex; gap: 6px; margin-top: 8px; }
.add-unit select { flex: 1; min-width: 0; }
.existing-term { max-width: 820px; box-shadow: var(--shadow), inset 0 0 0 2px var(--teal); }
.existing-term h2 { margin-top: 0; }
.existing-term__def { font-size: 1.08rem; }
.existing-term form { margin: 0; }

.approval {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; line-height: 1.55;
  font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle;
}
.approval .i { width: 1em; height: 1em; }
.approval__n { font-weight: 500; color: var(--muted); }
.approval--high { background: var(--verified-soft); color: var(--verified); }
.approval--low { background: var(--clash-soft); color: var(--clash); }
.rating__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rating__row form { margin: 0; }
.rating__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 .95rem var(--sans);
  font-variant-numeric: tabular-nums; transition: transform .15s var(--ease-out), background-color .15s ease;
}
.rating__btn:hover:not(:disabled) { background: var(--surface-2); }
.rating__btn.is-active { background: var(--sky); border-color: var(--accent); color: var(--navy); }
.rating__btn:disabled { opacity: .55; cursor: not-allowed; }
.rating__summary { margin: 0 0 0 6px; font-size: .92rem; color: var(--ink-2); }

/* =========================================================
   Celebrations (animations.js). One authored moment each.
   ========================================================= */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-scene { position: absolute; left: 50%; top: 42%; display: grid; justify-items: center; gap: 18px; transform: translate(-50%, -50%); }
.fx-scene.is-leaving { animation: fx-out .45s ease both; }
@keyframes fx-out { to { opacity: 0; transform: translate(-50%, -54%); } }

/* Verified: the two pages slide together and line up, the equals sign draws in, the seal presses down. */
.fx-pages { width: 150px; height: 150px; overflow: visible; filter: drop-shadow(0 18px 30px rgb(0 13 53 / .28)); }
.fx-pages__back, .fx-pages__front { transform-box: view-box; transform-origin: 22px 22px; }
.fx-pages__back { fill: var(--sky); animation: page-back .7s var(--ease-out) both; }
.fx-pages__front .logo__page { fill: var(--royal); }
.fx-pages__front { animation: page-front .7s var(--ease-out) both; }
.fx-pages__eq { fill: var(--lime); transform-box: fill-box; transform-origin: left center; animation: eq-draw .35s var(--ease-out) both; }
.fx-pages__eq--2 { animation-delay: .78s; }
.fx-pages__eq--1 { animation-delay: .66s; }
@keyframes page-back { from { opacity: 0; transform: translate(-46px, 10px) rotate(-16deg); } to { opacity: 1; transform: translate(6px, -5px) rotate(8deg); } }
@keyframes page-front { from { opacity: 0; transform: translate(46px, -6px) rotate(14deg); } to { opacity: 1; transform: none; } }
@keyframes eq-draw { from { transform: scaleX(0); } }

.fx-seal {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font: 800 clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem)/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--verified-fill); background: var(--surface);
  padding: .32em .7em; border-radius: 16px; box-shadow: inset 0 0 0 5px currentColor, 0 14px 30px rgb(0 13 53 / .22);
  rotate: -6deg; animation: seal-press .5s cubic-bezier(.3, 1.4, .5, 1) .95s both;
}
.fx-seal .i { width: .9em; height: .9em; stroke-width: 3; }
.fx-seal::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 currentColor;
  animation: ink-spread .7s ease-out 1.15s both;
}
@keyframes seal-press { from { opacity: 0; transform: scale(1.8); } 60% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@keyframes ink-spread { from { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } to { box-shadow: 0 0 0 26px transparent; } }
.fx-thud { animation: thud .3s var(--ease-out) 1.05s both; }
@keyframes thud { 0%, 100% { transform: none; } 35% { transform: translateY(3px); } }

/* Challenge: a chain-mail gauntlet is thrown down, lands with a clank and a few sparks. */
.fx-gauntlet { width: clamp(150px, 120px + 8vw, 210px); height: auto; overflow: visible; animation: gauntlet-throw .62s cubic-bezier(.55, 0, .85, .35) both, gauntlet-settle .5s var(--ease-out) .62s both; }
.fx-gauntlet__art { filter: drop-shadow(0 16px 18px rgb(0 13 53 / .35)); }
@keyframes gauntlet-throw { from { transform: translate(-30vw, -75vh) rotate(-70deg) scale(.9); } to { transform: translate(0, 0) rotate(14deg) scale(1); } }
@keyframes gauntlet-settle { 0% { transform: rotate(14deg); } 35% { transform: translateY(-14px) rotate(4deg); } 100% { transform: rotate(8deg); } }
.fx-shadow { width: 150px; height: 18px; margin-top: -26px; border-radius: 50%; background: rgb(0 13 53 / .28); filter: blur(6px); animation: shadow-land .62s cubic-bezier(.55, 0, .85, .35) both; }
@keyframes shadow-land { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.fx-sparks { position: absolute; left: 50%; top: 62%; width: 0; height: 0; }
.fx-sparks span {
  position: absolute; left: 0; top: 0; width: 4px; height: 16px; border-radius: 2px; background: var(--lime);
  transform-origin: 50% 100%; rotate: var(--a); opacity: 0;
  animation: spark .5s var(--ease-out) .6s both;
}
.fx-sparks span:nth-child(even) { background: var(--sky); height: 11px; }
@keyframes spark { 0% { opacity: 1; transform: translateY(0) scaleY(.4); } 100% { opacity: 0; transform: translateY(-46px) scaleY(1); } }
.fx-banner {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 clamp(1.1rem, .9rem + 1vw, 1.6rem)/1 var(--display); letter-spacing: .02em;
  color: #ffffff; background: var(--navy); border-radius: 999px; padding: .65em 1.2em;
  box-shadow: 0 14px 30px rgb(0 13 53 / .3); animation: banner-in .45s var(--ease-out) .72s both;
}
.fx-banner .i { color: var(--lime); }
@keyframes banner-in { from { opacity: 0; transform: translateY(16px) scale(.92); } }
.fx-nudge { animation: nudge .32s var(--ease-out) .62s both; }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateY(4px); } 65% { transform: translateY(-1px); } }

/* Badge unlocked: the card flips in, the medallion catches the light. */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 10px; perspective: 900px; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 14px; width: 340px; max-width: 100%;
  background: var(--surface); border-radius: var(--radius); padding: 14px 18px 14px 14px; box-shadow: var(--shadow-lg);
  transform-origin: center; animation: card-flip .7s var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out .4s ease both; }
.toast strong { display: block; font: 800 1.08rem var(--display); }
.toast p { margin: 0; font-size: .875rem; color: var(--muted); }
.toast__label { color: var(--gold) !important; font-weight: 700; }
@keyframes card-flip { from { opacity: 0; transform: rotateY(-80deg) translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  /* Celebrations still say what happened, as a calm fade. */
  .fx-scene, .toast { animation: fx-calm 2.2s ease both !important; }
  .fx-scene *, .fx-scene::after, .fx-seal::after { animation: none !important; }
  .fx-sparks, .fx-shadow { display: none; }
  .fx-gauntlet { transform: rotate(8deg); }
}
@keyframes fx-calm { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- data dictionary ---------- */
.field-name { font: 500 .85rem var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.strip--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strip__cell--clash.is-flagged dd { color: var(--clash); }
.fields-table__label { font-weight: 650; color: var(--ink); margin-right: 6px; }
.fields-table__label:hover { color: var(--accent); }
.fields-table tr.is-removed td { color: var(--muted); }
.fields-table__sub { display: none; }
@media (max-width: 640px) {
  .fields-table__wide { display: none; }
  .fields-table__sub { display: block; margin-top: 2px; font-size: .82rem; color: var(--muted); }
}
.fields-table tr.is-removed .fields-table__label { text-decoration: line-through; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 24px; }
.pager .muted { margin: 0 auto; }

/* Picklist values: a wrap of plain chips. In a change, additions are teal, removals struck through in red. */
.values { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.values li { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: .88rem; }
.values--inline { margin: 6px 0 0; }
.values--diff .is-added { background: var(--verified-soft); color: var(--verified); font-weight: 650; }
.values--diff .is-added::before { content: "+ "; }
.values--diff .is-removed { background: var(--clash-soft); color: var(--clash); text-decoration: line-through; }
.rename { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.rename del { color: var(--clash); text-decoration: line-through; }
.rename ins { color: var(--verified); text-decoration: none; font-weight: 650; }
.rename .i { color: var(--muted); }
.flag-card__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 6px; }
.flag-card__head a { color: var(--ink); text-decoration: none; }
.flag-card__head a:hover { color: var(--accent); text-decoration: underline; }
.flag-card__note { margin: 0 0 6px; color: var(--ink-2); }
.link-form { margin-top: 12px; }
.link-form select { flex: 1; min-width: 0; max-width: 460px; }
.sf-fields { list-style: none; margin: 0; padding: 0; }
.sf-fields > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sf-fields > li:last-child { border-bottom: 0; }
.sf-fields p { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.sf-fields a { color: var(--ink); text-decoration: none; }
.sf-fields a:hover { color: var(--accent); text-decoration: underline; }

/* Flag form: pick what changed, then only its input shows (all show without script). */
.flag-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.flag-form legend { font-weight: 650; margin-bottom: 8px; padding: 0; }
.choice-list { display: grid; gap: 6px; }
.choice-list__item {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.choice-list__item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-list__item input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.flag-form.is-enhanced [data-for] { display: none; }
.flag-form.is-enhanced [data-for].is-shown { display: block; animation: rise-in .2s var(--ease-out) both; }
@media (min-width: 1121px) and (max-width: 1280px) {
  .me__points span:last-child { display: none; }
  .me__points { padding-right: 4px; }
  .nav a { padding: 8px 10px; }
}

/* Business-unit dropdown (replaces tabs, which ran off the page once there were many units). */
.finder .finder__unit { max-width: 320px; text-overflow: ellipsis; }
.filter-note { margin: -8px 0 20px; color: var(--ink-2); }
.unit-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.unit-filter label { font-weight: 650; }
.unit-filter select { width: auto; max-width: 100%; min-width: 220px; }
@media (max-width: 640px) { .finder .finder__unit { max-width: none; flex: 1 1 100%; } }

/* The points badge opens the leaderboard, so it shows as current there. */
.me__points[aria-current="page"] { background: rgb(255 255 255 / .14); }
