:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-soft: #f9fbfd;
  --ink: #1c2430;
  --muted: #5e6a7c;
  --line: #d8e0ea;
  --line-strong: #bac6d4;
  --accent: #2459c6;
  --accent-strong: #183f91;
  --accent-soft: #e8efff;
  --teal: #0f766e;
  --teal-soft: #e4f4f1;
  --amber: #a35c00;
  --amber-soft: #fff3dd;
  --red: #b42318;
  --red-soft: #fde8e5;
  --green: #166534;
  --green-soft: #e5f3e9;
  --shadow: 0 14px 34px rgba(29, 39, 59, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(245, 247, 250, 0.9)),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.loading-panel {
  margin-top: 20vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(232, 239, 255, 0.92), rgba(255, 255, 255, 0.96) 44%, rgba(228, 244, 241, 0.82));
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.brand {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-body {
  padding: 22px;
}

.account-access-section {
  max-width: 520px;
  margin: 26px auto 0;
  scroll-margin-top: 24px;
}

.account-access-section:focus {
  outline: 0;
}

.auth-panel {
  padding: 22px;
}

.landing-hero {
  position: relative;
  width: 100vw;
  min-height: clamp(560px, 78vh, 760px);
  overflow: hidden;
  margin: -24px calc(50% - 50vw) 0;
  background: #071423;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 13, 27, 0.92) 0%, rgba(6, 18, 36, 0.72) 38%, rgba(5, 14, 27, 0.2) 78%),
    linear-gradient(180deg, rgba(4, 13, 27, 0.42) 0%, rgba(4, 13, 27, 0.18) 54%, rgba(4, 13, 27, 0.7) 100%),
    url("assets/landing-ambulance-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(4, 13, 27, 0), rgba(4, 13, 27, 0.52));
  pointer-events: none;
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
  padding: 26px 24px 34px;
}

.landing-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.landing-wordmark {
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0;
}

.landing-stage {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  padding: 7px 11px;
  background: rgba(5, 17, 35, 0.34);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.landing-copy {
  max-width: 700px;
  padding: 76px 0 44px;
  color: #fff;
}

.landing-copy h1 {
  max-width: 680px;
  margin: 8px 0 14px;
  color: #fff;
  font-size: clamp(2.55rem, 5vw, 4.85rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.landing-kicker {
  margin: 0;
  color: rgba(184, 214, 255, 0.92);
  font-size: 0.86rem;
  font-weight: 800;
}

.landing-lede {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.55;
}

.landing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.landing-meta span {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(5, 17, 35, 0.32);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.landing-actions .button,
.landing-actions button.primary {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.landing-actions .button {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.request-access-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.landing-access-note a,
.request-access-note a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.landing-access-note a:hover,
.request-access-note a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.request-access-note {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.landing-access-note {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.45;
}

.landing-access-note a {
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

.landing-access-note a:hover {
  color: #dbeafe;
  text-decoration: underline;
}

.landing-association {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: min(560px, 100%);
  color: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  text-decoration: none;
}

.landing-association:hover {
  color: #fff;
}

.landing-association img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px;
}

.association-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 800;
}

.landing-association strong {
  display: block;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.07) translate3d(-1.4%, -0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero::before {
    animation: none;
  }
}

.methods-page h1 {
  max-width: 820px;
  margin: 6px 0 12px;
  font-size: 2rem;
  line-height: 1.14;
}

.methods-lede {
  max-width: 900px;
  margin: 0;
  color: #344154;
  font-size: 1.03rem;
  line-height: 1.6;
}

.methods-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 22px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.methods-facts > div {
  padding: 16px 14px;
  border-right: 1px solid var(--line);
}

.methods-facts > div:last-child {
  border-right: 0;
}

.methods-facts strong {
  display: block;
  color: var(--accent-strong);
  font-size: 1.55rem;
  line-height: 1;
}

.methods-facts span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.methods-section {
  max-width: 920px;
  padding-top: 18px;
}

.methods-section h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.methods-section p {
  margin: 0 0 12px;
  color: #344154;
  line-height: 1.65;
}

.methods-section sup {
  color: var(--accent-strong);
  font-weight: 800;
}

.reference-list {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #344154;
  font-size: 0.9rem;
  line-height: 1.55;
}

.reference-list li {
  margin-bottom: 8px;
}

.reference-list a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.reference-list a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.methods-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-aside {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.auth-aside h2,
.section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.auth-aside p,
.muted {
  color: var(--muted);
}

.auth-aside p {
  margin: 0 0 14px;
  line-height: 1.5;
}

.auth-aside .stat {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.auth-aside .stat-value,
.auth-aside .stat-label {
  width: 100%;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 750;
  line-height: 1.05;
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
  margin-top: 6px;
}

.segmented {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.button,
button.primary,
.tabs button,
.segmented button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 13px;
  font-weight: 650;
}

.tabs button {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.button.primary,
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.primary:hover,
button.primary:hover {
  background: var(--accent-strong);
}

.button.ghost,
button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.auth-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 700;
  text-align: left;
}

.link-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.button.danger,
button.danger {
  border-color: #f0b8b2;
  background: var(--red-soft);
  color: var(--red);
}

.button.subtle,
button.subtle,
.button.active,
.tabs button.active,
.segmented button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.two-col .field label {
  min-height: 2.35rem;
  display: flex;
  align-items: flex-end;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field legend,
.field-label {
  color: #303b4d;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(36, 89, 198, 0.22);
  outline-offset: 2px;
}

.alert {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 11px 12px;
  margin-bottom: 14px;
  background: var(--panel-soft);
}

.alert.error {
  border-color: #f1b5ad;
  background: var(--red-soft);
  color: var(--red);
}

.alert.success {
  border-color: #b8dbc4;
  background: var(--green-soft);
  color: var(--green);
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 13, 27, 0.68);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 13, 27, 0.36);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(232, 239, 255, 0.94), rgba(255, 255, 255, 0.96) 58%, rgba(228, 244, 241, 0.82));
}

.modal-header .landing-kicker {
  color: var(--accent-strong);
}

.modal-header h2 {
  margin: 5px 0 0;
  font-size: 1.4rem;
}

.modal-close {
  flex: 0 0 auto;
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 4px 22px 22px;
}

.instruction-grid > div {
  padding: 18px 18px 16px 0;
  border-bottom: 1px solid var(--line);
}

.instruction-grid > div:nth-child(2n) {
  padding-left: 18px;
}

.instruction-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.instruction-grid h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.instruction-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-mode-panel {
  margin-bottom: 16px;
}

.admin-mode-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-mode-header p {
  margin: 0;
  line-height: 1.45;
}

.evaluation-mode-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
}

.mode-choice {
  min-height: 90px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  cursor: pointer;
}

.mode-choice.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mode-choice input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.mode-choice strong {
  display: block;
  margin-bottom: 5px;
}

.mode-choice small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.evaluation-mode-form button {
  min-width: 120px;
  align-self: stretch;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.mode-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 20px;
  min-height: 220px;
}

.mode-panel::before,
.side-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

.mode-copy {
  min-height: 150px;
}

.mode-panel h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.mode-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.evaluator-help-link {
  margin-top: 2px;
}

.mode-panel .stat-grid {
  margin-top: 0;
}

.mode-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  min-height: 116px;
  align-content: start;
}

.mode-actions button {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.workbench {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.side-panel {
  overflow: hidden;
  position: sticky;
  top: 18px;
  padding: 16px;
}

.side-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.filter-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.question-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  max-height: 332px;
  overflow: auto;
  padding-right: 3px;
}

.question-button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.question-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.question-button.correct {
  border-color: #a9d5b8;
  background: var(--green-soft);
}

.question-button.incorrect {
  border-color: #e5aaa3;
  background: var(--red-soft);
}

.question-button.reviewed {
  border-color: #aed7d1;
  background: var(--teal-soft);
}

.question-button.active.correct,
.question-button.active.incorrect,
.question-button.active.reviewed {
  background: var(--accent);
  color: #fff;
}

.question-panel {
  overflow: hidden;
}

.question-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.question-header h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.question-header > div {
  min-width: 0;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.question-code {
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 4px 9px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pill.locked {
  border-color: #b8dbc4;
  background: var(--green-soft);
  color: var(--green);
}

.pill.filler {
  border-color: #f0d49e;
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.voting {
  border-color: #aed7d1;
  background: var(--teal-soft);
  color: var(--teal);
}

.pill.accepted {
  border-color: #b8dbc4;
  background: var(--green-soft);
  color: var(--green);
}

.pill.rejected {
  border-color: #f1b5ad;
  background: var(--red-soft);
  color: var(--red);
}

.pill.paused {
  border-color: #f0d49e;
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.tiebreaker {
  border-color: #f0d49e;
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.sandbox {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
}

.pill.beta {
  border-color: #f0d49e;
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.live {
  border-color: #b8dbc4;
  background: var(--green-soft);
  color: var(--green);
}

.question-body {
  padding: 20px;
}

.stem {
  margin: 0 0 18px;
  font-size: 1.03rem;
  line-height: 1.58;
}

.option-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.option-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  line-height: 1.45;
}

.option-row input {
  width: auto;
  margin-top: 3px;
}

.option-row.correct {
  border-color: #a9d5b8;
  background: var(--green-soft);
}

.option-row.incorrect {
  border-color: #e5aaa3;
  background: var(--red-soft);
}

.option-letter {
  font-weight: 800;
  margin-right: 4px;
}

.answer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
  margin-top: 14px;
}

.answer-panel h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.answer-panel p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.citation {
  color: var(--muted);
  font-size: 0.91rem;
}

.flag-panel {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.flag-panel h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.result-banner {
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  font-weight: 750;
}

.result-banner.correct {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #a9d5b8;
}

.result-banner.incorrect {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #e5aaa3;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0;
}

.checkbox-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.checkbox-grid input {
  appearance: none;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
}

.checkbox-grid input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-grid input:checked::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-grid input:disabled {
  background: var(--panel-soft);
  border-color: var(--line);
}

.checkbox-grid input:disabled + span {
  color: var(--muted);
}

.checkbox-grid legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pool-table {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.pool-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 140px 160px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 0.91rem;
}

.pool-row.admin-row {
  grid-template-columns: minmax(190px, 1fr) 140px 150px 120px minmax(180px, 1fr);
}

.pool-row.progress-row {
  grid-template-columns: minmax(170px, 1.1fr) 110px 135px minmax(140px, 0.8fr) minmax(180px, 1fr) minmax(150px, 1fr);
}

.pool-row.report-row {
  grid-template-columns: minmax(180px, 1fr) 120px 100px 100px;
}

.pool-row:first-child {
  border-top: 0;
}

.pool-head {
  background: var(--panel-soft);
  color: #303b4d;
  font-weight: 800;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-disclaimer {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 16px;
  }

  .menu-grid,
  .evaluation-mode-form,
  .workbench,
  .profile-grid,
  .pool-row,
  .pool-row.admin-row,
  .pool-row.progress-row,
  .pool-row.report-row,
  .methods-facts {
    grid-template-columns: 1fr;
  }

  .methods-facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .methods-facts > div:last-child {
    border-bottom: 0;
  }

  .side-panel {
    position: static;
  }

  .evaluation-mode-form button {
    min-height: 44px;
  }

  .landing-hero {
    min-height: clamp(560px, 76vh, 700px);
    margin-top: -16px;
  }

  .landing-hero::before {
    background-position: 60% center;
  }

  .landing-copy h1 {
    max-width: 620px;
  }

  .question-picker {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 640px) {
  .topbar,
  .question-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav,
  .toolbar-left,
  .toolbar-right,
  .mode-actions {
    justify-content: stretch;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .landing-association {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .landing-association img {
    width: 48px;
    height: 48px;
  }

  .landing-hero {
    min-height: min(660px, calc(100vh - 56px));
  }

  .landing-hero-inner {
    padding: 20px 16px 28px;
  }

  .landing-hero-top {
    align-items: flex-start;
  }

  .landing-copy {
    padding: 54px 0 28px;
  }

  .landing-copy h1 {
    font-size: 2.25rem;
  }

  .landing-lede,
  .landing-meta span {
    font-size: 0.98rem;
    line-height: 1.48;
  }

  .landing-stage {
    font-size: 0.8rem;
  }

  .landing-meta {
    gap: 7px;
  }

  .modal-header,
  .instruction-grid {
    grid-template-columns: 1fr;
  }

  .modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .instruction-grid > div,
  .instruction-grid > div:nth-child(2n) {
    padding: 16px 0;
  }

  .instruction-grid > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .instruction-grid > div:last-child {
    border-bottom: 0;
  }

  .landing-actions button {
    flex: 1 1 120px;
  }

  .nav button,
  .toolbar button,
  .mode-actions button {
    flex: 1 1 auto;
  }

  .two-col,
  .stat-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .two-col .field label {
    min-height: 0;
    display: block;
  }

  .question-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
