:root {
  --bg: #f5f7fc;
  --panel: #ffffff;
  --panel-raised: #ffffff;
  --panel-soft: #eef2fa;
  --line: #e3e9f4;
  --line-strong: #cad5e8;
  --text: #101b2e;
  --text-soft: #374763;
  --muted: #5b6981;
  --faint: #606d84;
  --accent: #245fdf;
  --accent-strong: #1d4ed8;
  --accent-2: #7c3aed;
  --accent-soft: #e9effe;
  --accent-wash: rgba(37, 99, 235, 0.06);
  --good: #087b50;
  --good-soft: #e9f8f1;
  --warn: #9c5800;
  --warn-soft: #fff5df;
  --bad: #c63d45;
  --bad-soft: #fff0f1;
  --gold: #8b6309;
  --gold-soft: #fff7df;
  --on-accent: #ffffff;
  --shadow-1: 0 1px 2px rgba(16, 27, 46, 0.04), 0 10px 30px -18px rgba(16, 27, 46, 0.16);
  --shadow-2: 0 2px 8px rgba(16, 27, 46, 0.07), 0 22px 50px -24px rgba(16, 27, 46, 0.25);
  --gradient: linear-gradient(90deg, var(--accent), var(--accent-2));
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.28);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #090d17;
  --panel: #101625;
  --panel-raised: #141c2d;
  --panel-soft: #151d30;
  --line: #212b43;
  --line-strong: #344361;
  --text: #e8edf7;
  --text-soft: #c4cee1;
  --muted: #98a8c1;
  --faint: #7f8ca4;
  --accent: #6b96ff;
  --accent-strong: #8cafff;
  --accent-2: #ad94ff;
  --accent-soft: #1b2a50;
  --accent-wash: rgba(91, 140, 255, 0.09);
  --good: #45c894;
  --good-soft: #102d25;
  --warn: #f2bc5b;
  --warn-soft: #302510;
  --bad: #f08087;
  --bad-soft: #341b23;
  --gold: #e3bb60;
  --gold-soft: #2d2515;
  --on-accent: #08101f;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -18px rgba(0, 0, 0, 0.55);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.36), 0 22px 50px -22px rgba(0, 0, 0, 0.7);
  --focus: 0 0 0 3px rgba(107, 150, 255, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(680px 320px at 10% -90px, rgba(37, 99, 235, 0.11), transparent 70%),
    radial-gradient(590px 300px at 91% -110px, rgba(124, 58, 237, 0.09), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  content: "";
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 9px 13px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  z-index: 60;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
.header-inner {
  display: flex;
  width: min(1224px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 12px 22px;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 7px; }
html[data-theme="dark"] .brand img { padding: 3px; background: #e8edf7; }
.brand-sub {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}
.primary-nav {
  display: flex;
  min-width: 0;
  margin-right: 2px;
  margin-left: auto;
  overflow-x: auto;
  align-items: center;
  gap: 4px;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav a {
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--panel-soft); color: var(--text); text-decoration: none; }
.primary-nav a.active { background: var(--accent-soft); color: var(--accent); }
.primary-nav a.contribute-link {
  background: var(--accent);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 24%, transparent);
  color: #fff;
}
.primary-nav a.contribute-link:hover { background: var(--accent-strong); color: #fff; }
.header-actions {
  display: flex;
  flex: none;
  padding-left: 8px;
  border-left: 1px solid var(--line-strong);
  align-items: center;
  gap: 3px;
}
.header-sign-in, .header-sign-out, .header-profile, .header-test-lab, .header-account-switch {
  padding: 7px 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
}
.header-sign-in { border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow-1); }
.header-sign-in:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.header-profile:hover, .header-test-lab:hover, .header-sign-out:hover { color: var(--accent); text-decoration: none; }
.header-test-lab { color: var(--warn); }
.header-account-switch { border: 0; background: transparent; cursor: pointer; }
.header-account-switch:hover { color: var(--accent); }
.header-sign-out[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.theme-button {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: var(--shadow-1);
  color: var(--text-soft);
  cursor: pointer;
}
.theme-button:hover { border-color: var(--accent); color: var(--accent); }
.theme-button:focus-visible { outline-offset: 2px; }
.theme-icon { width: 18px; height: 18px; }
.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
.demo-banner {
  padding: 8px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  background: var(--warn-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}
.test-lab-banner { border-color: var(--warn); font-weight: 650; }
.test-lab-banner strong { color: var(--warn); letter-spacing: 0.04em; text-transform: uppercase; }

/* Shared layout and type */
.page-shell { width: min(1120px, calc(100% - 40px)); min-height: calc(100vh - 200px); margin: 0 auto; padding: 48px 0 84px; }
.page-profile, .page-badges { width: min(1020px, calc(100% - 40px)); }
.hero { display: flex; margin-bottom: 28px; align-items: flex-end; justify-content: space-between; gap: 30px; }
.hero-review { align-items: center; }
.hero h1 {
  max-width: 760px;
  margin: 4px 0 10px;
  font-size: clamp(2.15rem, 5.2vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.01;
}
.hero-compact h1 { font-size: clamp(2rem, 4.7vw, 3.55rem); }
.hero-copy { max-width: 720px; margin: 0; color: var(--text-soft); font-size: clamp(1rem, 1.8vw, 1.14rem); }
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}
h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.2; }
p { margin-top: 0; }
.privacy-note {
  display: flex;
  width: min(320px, 100%);
  flex: none;
  padding: 14px 16px;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-1);
  color: var(--good);
}
.privacy-note svg { flex: none; margin-top: 1px; }
.privacy-note span { display: block; }
.privacy-note strong { display: block; color: var(--text); font-size: 12.5px; }
.privacy-note small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.section-heading { display: flex; margin: 48px 0 16px; align-items: flex-end; justify-content: space-between; gap: 22px; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12.5px; text-align: right; }
.section-heading-action > a { flex: none; font-size: 13px; font-weight: 700; }

/* Buttons and states */
.primary-button, .secondary-button, .provider-button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 17px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.primary-button {
  border: 1px solid transparent;
  background: var(--gradient);
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 65%, transparent);
  color: var(--on-accent);
}
.primary-button:hover { filter: brightness(1.05); text-decoration: none; transform: translateY(-1px); }
.primary-button:disabled { background: var(--panel-soft); box-shadow: none; color: var(--faint); cursor: not-allowed; filter: none; transform: none; }
.secondary-button { border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); }
.secondary-button:hover { border-color: var(--accent); text-decoration: none; }
.hero-action { flex: none; }
.state-card, .auth-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
.state-card { display: flex; min-height: 118px; padding: 26px 28px; align-items: center; justify-content: center; gap: 15px; text-align: left; }
.state-card h2 { margin-bottom: 4px; font-size: 17px; }
.state-card p { max-width: 560px; margin: 0; color: var(--muted); font-size: 13px; }
.state-card .state-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}
.state-card .state-actions { display: flex; margin-top: 13px; flex-wrap: wrap; gap: 9px; }
.state-card.is-error .state-icon { background: var(--bad-soft); color: var(--bad); }
.state-card.is-offline .state-icon { background: var(--warn-soft); color: var(--warn); }
.spinner {
  width: 24px;
  height: 24px;
  flex: none;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sign in */
.auth-card { display: grid; padding: clamp(24px, 5vw, 42px); grid-template-columns: minmax(0, 1fr) minmax(250px, 350px); gap: 44px; align-items: center; }
.auth-card-compact { margin-top: 8px; }
.auth-copy h2 { margin: 3px 0 8px; font-size: clamp(1.55rem, 4vw, 2.2rem); }
.auth-copy p:last-child { max-width: 610px; margin: 0; color: var(--text-soft); }
.auth-actions { display: flex; flex-direction: column; gap: 10px; }
.provider-button { border: 1px solid var(--line-strong); background: var(--panel-raised); color: var(--text); box-shadow: var(--shadow-1); }
.provider-button:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.provider-button[aria-disabled="true"] { opacity: 0.48; pointer-events: none; }
.provider-github { background: var(--text); color: var(--bg); }
.auth-footnote { grid-column: 1 / -1; margin: -22px 0 0; color: var(--muted); font-size: 11.5px; }
.demo-auth-inline { min-width: 0; }
.demo-auth-note { display: flex; margin: 0 0 11px; flex-direction: column; gap: 2px; color: var(--text-soft); font-size: 12px; }
.demo-auth-note strong { color: var(--warn); }
.demo-access-field { display: flex; gap: 6px; color: var(--text-soft); font-size: 11px; font-weight: 750; flex-direction: column; }
.demo-access-field input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel-raised); color: var(--text); }
.demo-account-list { display: grid; margin-top: 10px; gap: 7px; }
.demo-account-option { display: flex; width: 100%; min-height: 52px; padding: 8px 10px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-raised); color: var(--text); text-align: left; cursor: pointer; }
.demo-account-option:hover, .demo-account-option:focus-visible { border-color: var(--accent); }
.demo-account-option.is-current { border-color: var(--good); background: var(--good-soft); }
.demo-account-copy { display: flex; min-width: 0; flex-direction: column; }
.demo-account-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.demo-account-copy small { overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.demo-account-meta { color: var(--accent); font-size: 9px; font-weight: 800; text-align: right; }
.demo-auth-status { min-height: 18px; margin: 7px 0 0; color: var(--text-soft); font-size: 10.5px; }
.demo-auth-dialog { width: min(620px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-3); }
.demo-auth-dialog::backdrop { background: rgb(4 8 16 / 0.72); }
.demo-auth-dialog-inner { position: relative; padding: clamp(20px, 5vw, 34px); }
.demo-auth-dialog h2 { margin: 3px 0 7px; }
.demo-auth-dialog p { color: var(--text-soft); }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-raised); color: var(--text); font-size: 20px; cursor: pointer; }

/* Rating workspace */
.page-rate { width: min(1160px, calc(100% - 40px)); padding-top: 24px; }
.hero-review { margin-bottom: 18px; align-items: center; }
.hero-review h1 { margin: 2px 0 4px; font-size: clamp(1.85rem, 4vw, 2.75rem); line-height: 1.04; }
.hero-review .hero-copy { font-size: 0.98rem; }
.review-session-authenticated .page-rate { padding-top: 16px; }
.review-session-authenticated .hero-review { display: none; }
.rating-workspace { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: var(--shadow-2); }
.vote-receipt {
  position: absolute;
  z-index: 4;
  top: 13px;
  left: 50%;
  display: flex;
  min-height: 34px;
  padding: 6px 12px 6px 7px;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-raised) 92%, var(--good-soft));
  color: var(--good);
  box-shadow: var(--shadow-2);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -5px) scale(0.97);
}
.vote-receipt.is-visible { animation: review-recorded 0.46s ease-out forwards; }
.vote-receipt.is-pending { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); color: var(--accent); }
.vote-receipt.is-rejected { border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); background: var(--warn-soft); color: var(--warn); }
.vote-receipt-icon { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--good-soft); font-size: 12px; }
.vote-receipt.is-pending .vote-receipt-icon { background: var(--accent-soft); }
.vote-receipt.is-rejected .vote-receipt-icon { background: color-mix(in srgb, var(--warn) 13%, transparent); }
@keyframes review-recorded {
  0% { opacity: 0; transform: translate(-50%, -5px) scale(0.97); }
  45%, 100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.review-heading { display: flex; min-height: 56px; padding: 11px 18px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--panel-soft); }
.review-heading h2 { margin-top: 1px; font-size: 16px; }
.context-label { color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.blind-copy { margin: 0; color: var(--muted); font-size: 10.5px; text-align: right; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--line-strong); }
.progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gradient); transition: width 0.35s ease; }
#vote-form { padding: 15px 18px 13px; }
.outcome-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fieldset-help { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; }
.section-context { scroll-margin-top: 72px; margin: 0 0 12px; padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel-soft); }
.section-context .context-label { display: block; margin-bottom: 4px; }
.section-context-heading { margin: 0; color: var(--text); font-size: 14px; font-weight: 750; line-height: 1.35; }
.section-must-cover { margin: 5px 0 0; color: var(--text-soft); font-size: 12.5px; line-height: 1.5; }
.passage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.passage-option {
  scroll-margin-top: 72px;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 260px;
  padding: 13px 16px 11px;
  flex-direction: column;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: var(--panel-raised);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.passage-option:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-1px); }
.passage-option:has(input:focus-visible), .passage-option.is-focused { box-shadow: var(--focus), var(--shadow-1); }
.passage-option:has(input:checked), .passage-option.is-selected { border-color: var(--accent); background: var(--accent-wash); box-shadow: 0 0 0 1px var(--accent), var(--shadow-2); }
.passage-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.passage-head { display: flex; padding-bottom: 9px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.passage-head > span { display: block; }
.passage-head strong, .passage-head small { display: block; }
.passage-head strong { font-size: 13px; }
.passage-head small { color: var(--muted); font-size: 10px; }
.choice-mark { display: grid !important; width: 23px; height: 23px; margin-left: auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: transparent; font-size: 11px; }
.is-selected .choice-mark, label:has(input:checked) .choice-mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.excerpt {
  display: block;
  padding: 12px 0 9px;
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(0.96rem, 1.35vw, 1.04rem);
  line-height: 1.56;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* Content-beat passages run to ~360 words: keep both columns readable side by
   side (a comfortable measure, no inner scrolling) and let them wrap to one
   column on narrow screens. */
@media (min-width: 721px) {
  .passage-grid { gap: 16px; }
  .passage-option { min-height: 220px; }
  .excerpt { max-width: 62ch; }
}
.word-count { display: block; margin-top: auto; color: var(--faint); font-size: 9.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.feedback-field { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.field-heading { display: flex; margin-bottom: 5px; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-heading label { font-size: 12px; font-weight: 750; }
.field-heading span { color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
textarea, input[type="text"], input[type="url"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel-raised);
  color: var(--text);
  outline: 0;
}
textarea { min-height: 58px; padding: 9px 11px; line-height: 1.45; resize: vertical; }
textarea:focus, input[type="text"]:focus, input[type="url"]:focus { border-color: var(--accent); box-shadow: var(--focus); }
::placeholder { color: var(--faint); opacity: 0.8; }
.human-check {
  display: grid;
  min-height: 68px;
  margin-top: 10px;
  padding: 10px 12px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-soft);
}
.human-check strong { display: block; font-size: 11.5px; }
.human-check p { margin: 1px 0 0; color: var(--muted); font-size: 10.5px; }
.human-check.is-verified { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: var(--good-soft); }
.human-check.is-verified p { color: var(--good); }
.human-check.has-error { border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); background: var(--warn-soft); }
.turnstile-widget { min-width: 0; }
.human-check-retry { min-height: 36px; padding: 6px 11px; font-size: 11px; }
.submit-dock { display: flex; min-height: 44px; margin-top: 10px; align-items: center; justify-content: space-between; gap: 16px; }
.mobile-choice-strip { display: none; }
.selection-status { margin: 0; color: var(--muted); font-size: 11px; }
.selection-status.has-choice { color: var(--good); font-weight: 700; }
.vote-actions { display: grid; min-width: 330px; grid-template-columns: minmax(145px, auto) minmax(140px, 180px); gap: 8px; }
.both-bad-button { position: relative; display: flex; min-height: 42px; padding: 8px 12px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text-soft); font: inherit; font-size: 11.5px; font-weight: 750; cursor: pointer; }
.both-bad-button:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.both-bad-button:focus-visible { box-shadow: var(--focus); outline: 0; }
.both-bad-button:disabled { cursor: not-allowed; opacity: 0.48; }
.neither-mark { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 14px; line-height: 1; }
.submit-vote { width: 100%; min-width: 0; min-height: 42px; }
.submit-vote.is-busy svg, .both-bad-button.is-busy .neither-mark { display: none; }
.submit-vote.is-busy::after, .both-bad-button.is-busy::after { width: 15px; height: 15px; border: 2px solid color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; border-radius: 50%; content: ""; animation: spin 0.75s linear infinite; }
.task-context-details { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 10.5px; }
.task-context-details summary { display: flex; min-width: 0; cursor: pointer; align-items: center; gap: 10px; color: var(--accent-strong); font-weight: 750; }
.task-summary-label { overflow: hidden; color: var(--muted); font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.task-instructions { margin: 9px 0 0; color: var(--text-soft); }
.task-context-details dl { display: grid; gap: 6px; margin: 8px 0 0; }
.task-context-details dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.task-context-details dt { color: var(--muted); font-weight: 750; }
.task-context-details dd { margin: 0; }
.task-context-details ul { margin: 0; padding-left: 17px; }
.compact-leaderboard { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow-1); }
.compact-board-heading { display: flex; min-height: 62px; padding: 12px 16px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.compact-board-heading h2 { font-size: 17px; }
.compact-board-heading a { flex: none; font-size: 11px; font-weight: 750; }
.compact-board-state { margin: 0; padding: 18px; color: var(--muted); font-size: 11px; text-align: center; }
.compact-leader-list { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; }
.compact-leader-row { display: grid; min-width: 0; min-height: 58px; padding: 9px 12px; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-top: 1px solid var(--line); }
.compact-leader-row:nth-child(odd) { border-right: 1px solid var(--line); }
.compact-leader-row:nth-child(-n+2) { border-top: 0; }
.compact-leader-row:hover { background: var(--accent-wash); }
.compact-leader-rank { color: var(--muted); font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; }
.compact-leader-row.is-podium .compact-leader-rank { color: var(--gold); }
.compact-reviewer-identity { display: flex; min-width: 0; align-items: center; gap: 8px; }
.compact-reviewer-identity .reviewer-avatar { width: 31px; height: 31px; border-radius: 9px; }
.compact-reviewer-identity .reviewer-name, .compact-reviewer-identity .reviewer-handle { max-width: 145px; }
.compact-leader-standing { display: flex; align-items: flex-end; flex-direction: column; gap: 2px; }
.compact-leader-score { color: var(--muted); font-size: 8.5px; white-space: nowrap; }

/* Profile */
.profile-card { display: flex; padding: clamp(22px, 4vw, 32px); align-items: flex-start; gap: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-1); }
.profile-avatar, .reviewer-avatar { display: grid; flex: none; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); background: var(--accent-soft); color: var(--accent); font-weight: 850; }
.profile-avatar { width: 68px; height: 68px; border-radius: 18px; font-size: 21px; }
.profile-avatar img, .reviewer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.profile-name-row h2 { overflow-wrap: anywhere; }
.title-chip { display: inline-flex; padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; }
.profile-handle { margin: 2px 0 8px; color: var(--muted); font-size: 12px; }
.profile-bio { max-width: 680px; margin: 0 0 10px; color: var(--text-soft); font-size: 13px; white-space: pre-line; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-link { display: inline-flex; padding: 5px 9px; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--text-soft); font-size: 10.5px; font-weight: 750; }
.social-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.visibility-copy { margin: 11px 0 0; color: var(--muted); font-size: 10.5px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-width: 0; padding: 17px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow-1); }
.stat-card.stat-accent { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--accent-wash); }
.stat-label { display: block; min-height: 34px; color: var(--muted); font-size: 9.5px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.stat-card strong { display: block; overflow: hidden; font-size: clamp(1.35rem, 3vw, 1.8rem); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.progress-card { display: grid; margin-top: 18px; padding: clamp(22px, 4vw, 30px); grid-template-columns: minmax(220px, 0.8fr) minmax(330px, 1.2fr); gap: 46px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-1); }
.progress-card-copy h2 { margin: 4px 0 7px; font-size: 20px; }
.progress-card-copy p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.progress-track-large { height: 10px; }
.requirement-list { display: flex; margin: 13px 0 0; padding: 0; flex-direction: column; list-style: none; gap: 7px; }
.requirement-list li { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 10.5px; }
.requirement-list .requirement-mark { display: grid; width: 16px; height: 16px; flex: none; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 8px; }
.requirement-list li.is-complete { color: var(--good); }
.requirement-list li.is-complete .requirement-mark { border-color: var(--good); background: var(--good-soft); }
.badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.badge-card { position: relative; display: flex; min-width: 0; padding: 16px; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-1); }
.badge-card.is-locked { background: color-mix(in srgb, var(--panel) 70%, var(--panel-soft)); opacity: 0.73; }
.badge-emblem { display: grid; width: 42px; height: 42px; flex: none; place-items: center; border: 1px solid color-mix(in srgb, var(--gold) 27%, var(--line)); border-radius: 12px; background: var(--gold-soft); color: var(--gold); font-size: 18px; font-weight: 900; }
.badge-card.is-locked .badge-emblem { border-color: var(--line); background: var(--panel-soft); color: var(--faint); filter: grayscale(1); }
.badge-copy { min-width: 0; }
.badge-copy strong { display: block; font-size: 12px; }
.badge-copy p { margin: 2px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.badge-date { display: block; margin-top: 6px; color: var(--good); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.inline-empty { padding: 20px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); text-align: center; }
.inline-empty strong, .inline-empty span { display: block; }
.inline-empty strong { color: var(--text); font-size: 12.5px; }
.inline-empty span { margin-top: 3px; font-size: 10.5px; }
.settings-card { display: grid; margin-top: 48px; padding: clamp(22px, 4vw, 32px); grid-template-columns: minmax(200px, 0.6fr) minmax(420px, 1.4fr); gap: 46px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-1); }
.settings-intro h2 { margin: 4px 0 7px; }
.settings-intro p:last-child { color: var(--muted); font-size: 11.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 14px; }
.form-field { min-width: 0; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { display: block; margin-bottom: 5px; color: var(--text-soft); font-size: 11px; font-weight: 750; }
.form-field input { height: 42px; padding: 9px 11px; }
.form-field small { display: block; margin-top: 4px; color: var(--faint); font-size: 9.5px; line-height: 1.4; }
.input-prefix { display: flex; height: 42px; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel-raised); }
.input-prefix:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.input-prefix > span { padding-left: 11px; color: var(--muted); }
.input-prefix input { height: 100%; padding-left: 3px; border: 0; background: transparent; box-shadow: none !important; }
.visibility-toggle { position: relative; display: flex; margin-top: 21px; padding: 14px; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); cursor: pointer; }
.visibility-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-control { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; background: var(--line-strong); transition: background 0.15s; }
.toggle-control::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); content: ""; transition: transform 0.15s; }
.visibility-toggle input:checked + .toggle-control { background: var(--accent); }
.visibility-toggle input:checked + .toggle-control::after { transform: translateX(16px); }
.visibility-toggle input:focus-visible + .toggle-control { box-shadow: var(--focus); }
.visibility-toggle strong, .visibility-toggle small { display: block; }
.visibility-toggle strong { font-size: 11.5px; }
.visibility-toggle small { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.form-actions { display: flex; min-height: 44px; margin-top: 15px; align-items: center; justify-content: flex-end; gap: 15px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 10.5px; }
.account-card { display: grid; margin-top: 18px; padding: clamp(20px, 4vw, 28px); grid-template-columns: minmax(260px, 1fr) auto; align-items: center; gap: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-1); }
.account-card h2 { margin: 3px 0 7px; font-size: 18px; }
.account-card p { max-width: 690px; margin: 0; color: var(--muted); font-size: 10.5px; }
.account-actions { display: flex; max-width: 390px; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.account-actions .secondary-button, .danger-button { min-height: 39px; padding: 8px 12px; font-size: 10.5px; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--bad) 48%, var(--line)); border-radius: 9px; background: var(--bad-soft); color: var(--bad); font-weight: 800; cursor: pointer; }
.danger-button:hover { border-color: var(--bad); }
.danger-button:disabled { opacity: 0.48; cursor: not-allowed; }
.account-card .account-status { grid-column: 1 / -1; margin-top: -15px; color: var(--warn); }
.confirm-dialog { width: min(500px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 17px; background: var(--panel-raised); color: var(--text); box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38); }
.confirm-dialog::backdrop { background: rgba(5, 10, 20, 0.62); backdrop-filter: blur(3px); }
.confirm-dialog form { padding: clamp(22px, 5vw, 32px); }
.dialog-icon { display: grid; width: 42px; height: 42px; margin-bottom: 13px; place-items: center; border-radius: 50%; background: var(--bad-soft); color: var(--bad); font-size: 17px; font-weight: 900; }
.confirm-dialog h2 { margin-bottom: 8px; font-size: 20px; }
.confirm-dialog p { color: var(--text-soft); font-size: 11.5px; }
.confirm-dialog label { display: block; margin: 18px 0 6px; font-size: 11px; }
.confirm-dialog input { width: 100%; height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text); }
.confirm-dialog input:focus { border-color: var(--bad); outline: 2px solid color-mix(in srgb, var(--bad) 35%, transparent); outline-offset: 2px; }
.confirm-dialog .dialog-status { min-height: 17px; margin: 7px 0 0; color: var(--bad); font-size: 10.5px; }
.dialog-actions { display: flex; margin-top: 16px; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }

/* Leaderboard */
.board-controls { display: flex; margin-bottom: 17px; padding: 12px 14px; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-1); }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-label { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.segmented-control { display: flex; padding: 3px; border-radius: 10px; background: var(--panel-soft); }
.segmented-control button { min-height: 32px; padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.segmented-control button:hover { color: var(--text); }
.segmented-control button[aria-pressed="true"] { background: var(--panel-raised); box-shadow: 0 1px 4px rgba(16,27,46,.11); color: var(--accent); }
.leaderboard-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-2); }
.leaderboard-heading { display: flex; padding: 20px 22px; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.leaderboard-heading h2 { font-size: 19px; }
.board-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 10px; }
.board-meta span { padding: 4px 8px; border-radius: 99px; background: var(--panel-soft); }
.table-scroll { overflow-x: auto; outline: 0; }
.table-scroll:focus-visible { box-shadow: inset var(--focus); }
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.leaderboard-table th { padding: 10px 13px; background: var(--panel-soft); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.065em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.leaderboard-table td { padding: 12px 13px; border-top: 1px solid var(--line); vertical-align: middle; }
.leaderboard-table tbody tr:first-child td { border-top: 0; }
.leaderboard-table tbody tr:hover { background: var(--accent-wash); }
.leaderboard-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.rank-cell { width: 64px; color: var(--muted); font-weight: 850; }
.rank-cell.is-podium { color: var(--gold); }
.reviewer-cell { display: flex; min-width: 200px; align-items: center; gap: 10px; }
.reviewer-avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 10px; }
.reviewer-name { display: block; max-width: 210px; overflow: hidden; color: var(--text); font-size: 11.5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.reviewer-handle { display: block; max-width: 210px; overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.reviewer-profile-link { color: inherit; }
.reviewer-profile-link:hover { text-decoration: none; }
.reviewer-profile-link:hover .reviewer-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.table-title { display: inline-flex; padding: 3px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-weight: 750; white-space: nowrap; }
.rating-provisional { display: block; color: var(--faint); font-size: 8.5px; }
.badge-count { display: inline-flex; align-items: center; gap: 3px; }
.viewer-position { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--accent-soft); color: var(--text-soft); font-size: 11px; text-align: center; }
.board-note { display: flex; margin-top: 17px; padding: 16px 18px; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.board-note-icon { display: grid; width: 25px; height: 25px; flex: none; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 850; }
.board-note h2 { margin-bottom: 3px; font-size: 12.5px; }
.board-note p { margin: 0; color: var(--muted); font-size: 10.5px; }

/* Published human preference results */
.snapshot-card { display: flex; padding: 19px 22px; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-1); }
.snapshot-card h2 { font-size: 17px; }
.snapshot-card p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.snapshot-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.snapshot-actions > span { padding: 5px 9px; border-radius: 99px; background: var(--panel-soft); color: var(--muted); font-size: 9.5px; font-weight: 700; }
.snapshot-actions a { font-size: 10.5px; font-weight: 750; }
.results-stats { margin: 14px 0; }
.results-card { margin-top: 14px; }
.result-model { min-width: 210px; color: var(--text); }
.result-model > strong { display: block; font-size: 11.5px; }
.result-status { display: inline-flex; margin-top: 4px; padding: 2px 7px; border-radius: 99px; font-size: 8.5px; font-weight: 800; }
.status-qualified { background: var(--good-soft); color: var(--good); }
.status-provisional { background: var(--warn-soft); color: var(--warn); }
.status-calibration_only,
.status-insufficient_evidence { background: var(--panel-soft); color: var(--muted); }
.results-table tr.is-unqualified { background: color-mix(in srgb, var(--panel-soft) 55%, transparent); }
.results-table tr.is-unqualified .rank-cell { color: var(--faint); }
.result-score { color: var(--accent); font-weight: 850; }
.result-interval { color: var(--muted); font-variant-numeric: tabular-nums; }
.result-coverage { min-width: 92px; }
.coverage-meter { display: inline-block; width: 48px; height: 5px; margin-right: 6px; overflow: hidden; border-radius: 99px; background: var(--line-strong); vertical-align: 2px; }
.coverage-meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.result-coverage small { color: var(--muted); font-size: 9px; }
/* Badges and title ladder */
.badge-grid-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.badge-grid-catalog .badge-card { min-height: 116px; }
.badge-requirement { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.title-ladder-card { display: grid; margin-top: 48px; padding: clamp(22px, 4vw, 32px); grid-template-columns: minmax(220px, 0.65fr) minmax(390px, 1.35fr); gap: 44px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-1); }
.title-ladder-intro h2 { margin: 4px 0 8px; }
.title-ladder-intro p:last-child { color: var(--muted); font-size: 11.5px; }
.title-ladder { position: relative; display: flex; margin: 0; padding: 0; flex-direction: column; list-style: none; gap: 8px; }
.title-ladder::before { position: absolute; top: 19px; bottom: 19px; left: 16px; width: 2px; background: var(--line); content: ""; }
.title-step { position: relative; display: grid; min-height: 55px; padding: 10px 12px 10px 48px; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 11px; }
.title-step.is-current { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: var(--accent-wash); }
.title-step-marker { position: absolute; z-index: 1; left: 5px; display: grid; width: 24px; height: 24px; place-items: center; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--panel); color: var(--faint); font-size: 8px; font-weight: 850; }
.title-step.is-complete .title-step-marker, .title-step.is-current .title-step-marker { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.title-step strong { display: block; font-size: 11.5px; }
.title-step small { display: block; color: var(--muted); font-size: 9px; }
.title-step-points { color: var(--muted); font-size: 9.5px; font-weight: 750; white-space: nowrap; }

/* Privacy and terms */
.prose-card { padding: clamp(24px, 5vw, 44px); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-1); }
.legal-prose { max-width: 900px; }
.legal-updated { margin-bottom: 28px !important; color: var(--faint) !important; font-size: 10px !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.legal-prose section { padding: 23px 0; border-top: 1px solid var(--line); }
.legal-prose section:first-of-type { padding-top: 0; border-top: 0; }
.legal-prose section:last-child { padding-bottom: 0; }
.legal-prose h2 { margin-bottom: 7px; font-size: 17px; }
.legal-prose p, .legal-prose li { color: var(--text-soft); font-size: 12.5px; line-height: 1.7; }
.legal-prose p { max-width: 78ch; margin-bottom: 0; }
.legal-prose ul { margin: 8px 0 10px; padding-left: 21px; }
.legal-prose li + li { margin-top: 5px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; width: min(1120px, calc(100% - 40px)); min-height: 78px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10.5px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-inner a { color: var(--text-soft); font-weight: 650; }

/* Responsive */
@media (max-width: 1180px) {
  .header-inner { width: 100%; padding-inline: 16px; gap: 8px; }
  .brand-sub { display: none; }
  .primary-nav a { padding-inline: 9px; font-size: 12.5px; }
  .header-sign-out { display: none; }
}

@media (max-width: 900px) {
  .header-inner { gap: 8px; }
  .primary-nav a { padding-inline: 8px; font-size: 12px; }
  .privacy-note { width: 270px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-card, .title-ladder-card { grid-template-columns: 1fr; gap: 25px; }
  .account-card { grid-template-columns: 1fr; gap: 18px; }
  .account-actions { max-width: none; justify-content: flex-start; }
  .account-card .account-status { margin-top: -8px; }
  .badge-grid, .badge-grid-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { position: relative; }
  .header-inner { width: min(100% - 24px, 680px); min-height: auto; padding: 12px 0 8px; flex-wrap: wrap; }
  .brand { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .primary-nav { order: 3; width: 100%; margin: 1px 0 0; }
  .primary-nav { overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
  .primary-nav a { min-height: 40px; padding: 7px 10px; font-size: 11.5px; scroll-snap-align: start; }
  .primary-nav a[target="_blank"] { display: none; }
  .page-shell, .page-profile, .page-badges { width: min(100% - 26px, 680px); padding-top: 34px; padding-bottom: 65px; }
  .page-rate { padding-top: 16px; padding-bottom: calc(198px + env(safe-area-inset-bottom)); }
  .hero, .hero-review { align-items: flex-start; flex-direction: column; gap: 18px; }
  .hero-review { margin-bottom: 14px; gap: 8px; }
  .hero h1 { max-width: 620px; }
  .privacy-note { width: 100%; }
  .hero-action { align-self: stretch; }
  .auth-card { grid-template-columns: 1fr; gap: 24px; }
  .auth-footnote { margin-top: -11px; }
  .review-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .blind-copy { text-align: left; }
  .rating-workspace { margin-bottom: calc(150px + env(safe-area-inset-bottom)); overflow: visible; }
  .passage-grid { grid-template-columns: 1fr; }
  .passage-option { min-height: auto; }
  .excerpt { min-height: 0; }
  .human-check { grid-template-columns: 1fr; align-items: stretch; }
  .human-check-retry { justify-self: start; }
  .submit-dock {
    position: fixed;
    z-index: 58;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    min-height: 0;
    margin: 0;
    padding: 7px;
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 88%, transparent);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel-raised) 94%, transparent);
    box-shadow: 0 10px 32px rgb(14 24 50 / 0.2);
    backdrop-filter: blur(16px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  .rating-workspace.is-vote-dock-offscreen .submit-dock { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(10px); }
  .mobile-choice-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mobile-choice-button {
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--panel);
    color: var(--text-soft);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    touch-action: manipulation;
  }
  .mobile-choice-button:hover { border-color: var(--accent); color: var(--accent); }
  .mobile-choice-button.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .mobile-choice-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 2px; }
  .selection-status { min-height: 14px; overflow: hidden; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
  .vote-actions { width: 100%; min-width: 0; grid-template-columns: minmax(135px, 1fr) minmax(120px, 1fr); }
  .vote-actions button { min-height: 48px; touch-action: manipulation; }
  textarea, input[type="text"], input[type="url"] { font-size: 16px; }
  .vote-receipt {
    position: fixed;
    z-index: 59;
    top: auto;
    bottom: calc(142px + env(safe-area-inset-bottom));
    max-width: calc(100% - 24px);
    white-space: nowrap;
  }
  .compact-leader-list { grid-template-columns: 1fr; }
  .compact-leader-row:nth-child(odd) { border-right: 0; }
  .compact-leader-row:nth-child(2) { border-top: 1px solid var(--line); }
  .progress-card { grid-template-columns: 1fr; gap: 22px; }
  .board-controls { align-items: stretch; flex-direction: column; }
  .filter-group { justify-content: space-between; }
  .snapshot-card { align-items: flex-start; flex-direction: column; }
  .snapshot-actions { justify-content: flex-start; }
}

@media (max-width: 540px) {
  .brand-sub { display: none; }
  .header-inner { width: calc(100% - 20px); }
  .brand > span:not(.brand-sub) { font-size: 13px; }
  .primary-nav a { min-height: 40px; padding: 7px 9px; font-size: 11.5px; }
  .theme-button { flex-basis: 44px; width: 44px; height: 44px; }
  .header-actions { padding-left: 5px; gap: 1px; }
  .header-sign-in, .header-profile, .header-test-lab, .header-account-switch { padding-inline: 6px; font-size: 11px; }
  .header-account-switch { max-width: 51px; overflow: hidden; text-overflow: ellipsis; }
  .page-shell, .page-profile, .page-badges { width: calc(100% - 20px); padding-top: 27px; }
  .hero { margin-bottom: 21px; }
  .hero h1 { font-size: clamp(2rem, 12vw, 3rem); }
  #vote-form { padding: 13px 11px 11px; }
  .review-heading { padding: 10px 12px; }
  .passage-option { padding: 12px 13px 11px; }
  .excerpt { font-size: 1rem; line-height: 1.58; }
  .compact-board-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .compact-leader-row { grid-template-columns: 30px minmax(0, 1fr); }
  .compact-leader-standing { grid-column: 2; align-items: flex-start; }
  .profile-card { flex-direction: column; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 14px 12px; }
  .badge-grid, .badge-grid-catalog { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-heading > p { text-align: left; }
  .board-controls { padding: 10px; }
  .filter-group { align-items: flex-start; flex-direction: column; gap: 5px; }
  .segmented-control { width: 100%; }
  .segmented-control button { flex: 1; }
  .leaderboard-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .board-meta { justify-content: flex-start; }
  .footer-inner { width: calc(100% - 24px); padding: 19px 0; align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-height: 520px) and (max-width: 900px) {
  .primary-nav a { min-height: 40px; }
  .page-rate { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .rating-workspace { margin-bottom: calc(72px + env(safe-area-inset-bottom)); overflow: visible; }
  .submit-dock {
    position: fixed;
    z-index: 58;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    display: grid;
    min-height: 0;
    margin: 0;
    padding: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 88%, transparent);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel-raised) 94%, transparent);
    box-shadow: 0 10px 32px rgb(14 24 50 / 0.2);
    backdrop-filter: blur(16px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  .rating-workspace.is-vote-dock-offscreen .submit-dock { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(10px); }
  .mobile-choice-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mobile-choice-button { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); color: var(--text-soft); font: inherit; font-size: 12px; font-weight: 800; touch-action: manipulation; }
  .mobile-choice-button.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .mobile-choice-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 2px; }
  .selection-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vote-actions { width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote-actions button { min-height: 44px; touch-action: manipulation; }
  .vote-receipt { position: fixed; z-index: 59; top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); white-space: nowrap; }
  textarea, input[type="text"], input[type="url"] { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .primary-button, .toggle-control, .progress-track > span { forced-color-adjust: none; }
  .passage-option, .both-bad-button, .state-card, .auth-card, .leaderboard-card, .compact-leaderboard { border-width: 2px; }
}
