:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --ink: #192522;
  --muted: #61706c;
  --line: #d8e1e4;
  --brand: #0f766e;
  --brand-strong: #0a5752;
  --accent: #385fa8;
  --amber: #9a5c12;
  --danger: #b13b32;
  --ok: #18794e;
  --coral: #c45f49;
  --blue-soft: #eef3fc;
  --gold-soft: #fff7e7;
  --coral-soft: #fff1ed;
  --tenant-primary: #123c69;
  --tenant-secondary: #126b62;
  --tenant-accent: #d7a72f;
  --tenant-ink: #17201c;
  --tenant-surface: #f4f6f3;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(25, 43, 50, .09);
  --shadow-soft: 0 1px 2px rgba(25, 43, 50, .06), 0 8px 24px rgba(25, 43, 50, .045);
  --focus-ring: 0 0 0 3px rgba(15, 118, 110, .20);
}

* { box-sizing: border-box; }
html { min-width: 320px; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.55 Aptos, "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
.admin-brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: contain;
  padding: 3px;
  border: 1px solid rgba(18,60,105,.14);
  border-radius: 8px;
  background: #fff;
}
button, .export-card {
  min-height: 40px;
  border: 1px solid transparent;
  background: var(--brand);
  color: white;
  padding: 9px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
button:hover, .export-card:hover { background: var(--brand-strong); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.secondary { background: var(--accent); }
button.secondary:hover { background: #2c4d8a; }
button.ghost {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
button.ghost:hover {
  background: #f8fbf9;
  border-color: #c8d5ce;
  color: var(--brand-strong);
}
button.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  text-align: left;
  font-weight: 650;
  transform: none;
}
button.small-button { min-height: 32px; padding: 5px 10px; }
button.danger-button { color: #8f1d1d; border-color: #e5b8b8; background: #fff8f8; }
button.danger-button:hover { background: #ffecec; border-color: #d28a8a; }
button.wide { width: 100%; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
button:disabled:hover { transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}
input, textarea, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: white;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input[type="color"] {
  min-height: 44px;
  padding: 4px;
  cursor: pointer;
}
input:hover, textarea:hover, select:hover { border-color: #c8d5ce; }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: var(--focus-ring);
}
textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 620; color: #31413b; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; font-weight: 720; }
h2 { margin-bottom: 4px; font-size: 18px; line-height: 1.25; font-weight: 690; }
code { white-space: pre-wrap; word-break: break-word; color: #31413b; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.status { min-height: 22px; color: var(--muted); }
.status.error { color: var(--danger); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 720;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 520px);
  background: #edf2ee;
}
.login-visual {
  display: grid;
  align-items: end;
  padding: min(8vw, 72px);
  background:
    linear-gradient(120deg, rgba(18,107,98,.92), rgba(49,95,159,.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='800' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.18)' stroke-width='2'%3E%3Cpath d='M80 120h640M80 240h640M80 360h640M80 480h640M80 600h640M160 80v640M320 80v640M480 80v640M640 80v640'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: white;
}
.signal-card {
  max-width: 520px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: var(--radius);
  background: rgba(0,0,0,.20);
}
.signal-card strong { display: block; margin: 10px 0; font-size: 32px; line-height: 1.1; font-weight: 720; }
.signal-card p { margin-bottom: 0; color: rgba(255,255,255,.86); }
.brand-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.brand-preview-logo {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #c8d5ce;
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  overflow: hidden;
}
.brand-preview-logo img {
  max-width: 120px;
  max-height: 82px;
  object-fit: contain;
}
.brand-preview-logo img[src=""], .brand-preview-logo img:not([src]) { display: none; }
.brand-preview-logo span { font-weight: 700; color: var(--muted); }
.brand-preview p { margin-bottom: 12px; }
.login-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: min(8vw, 72px);
  background: white;
}
.product-mark, .brand-block, .candidate-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-mark span, .brand-block span, .candidate-brand span { display: block; color: var(--muted); font-size: 12px; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 18px;
  background: #173832;
  color: white;
  overflow-y: auto;
}
.brand-block strong { display: block; font-size: 16px; font-weight: 700; }
.brand-block span { color: #b9cbc6; }
.nav { display: grid; gap: 6px; }
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  color: #dce9e5;
  border-color: transparent;
  text-align: left;
  font-weight: 620;
  box-shadow: none;
  transform: none;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,.10); color: white; }
.nav button.active { box-shadow: inset 3px 0 0 #72d6c9; }
.nav-ico {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,.10);
  font-size: 11px;
  font-weight: 700;
}
.sidebar-note {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  color: #d7e0dc;
}
.sidebar-note strong { font-weight: 680; }
.sidebar-note span { color: #b9cbc6; font-size: 12px; }
.main {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 18px;
}
.topbar-select {
  min-width: 220px;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
}
.topbar-select select {
  min-height: 38px;
  padding: 7px 10px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.row-actions, .filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: max-content;
  justify-self: start;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.84);
}
.language-switcher button {
  min-height: 28px;
  padding: 4px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  transform: none;
}
.language-switcher button:hover { transform: none; background: #f2f6f4; }
.language-switcher button.active {
  background: var(--brand);
  color: white;
}
.topbar .language-switcher, .tenant-actions .language-switcher { justify-self: auto; }
.filter-preset-bar { position: relative; }
.filter-preset-bar > summary { min-height: 40px; display: flex; align-items: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); cursor: pointer; font-weight: 620; list-style: none; }
.filter-preset-bar > summary::-webkit-details-marker { display: none; }
.filter-preset-bar[open] > summary { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--focus-ring); }
.filter-preset-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 50; width: min(360px, calc(100vw - 32px)); display: grid; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.surface {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.view { min-width: 0; }
.table-wrap { max-width: 100%; }

.final-exams-surface {
  border-top: 3px solid var(--accent);
}

.final-exams-surface .eyebrow {
  color: var(--primary);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid .span-3 { grid-column: span 3; }
.grid .span-2 { grid-column: span 2; }

.grade-transmission-panel {
  border-top: 4px solid var(--accent);
}

.grade-transmission-note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  color: var(--muted);
  font-size: .9rem;
}

.grade-transmission-note strong { color: var(--ink); font-weight: 650; }
.eligibility-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.eligibility-toolbar .checkline { flex: 0 1 auto; }
.eligibility-filters { justify-content: flex-start; }
.eligibility-filters .search-input { min-width: min(360px, 100%); }
.eligibility-row-check { width: 18px; height: 18px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.metric:nth-child(1) { border-top: 3px solid var(--brand); }
.metric:nth-child(2) { border-top: 3px solid var(--accent); }
.metric:nth-child(3) { border-top: 3px solid var(--coral); }
.metric:nth-child(4) { border-top: 3px solid var(--tenant-accent); }
.metric strong { display: block; font-size: 30px; line-height: 1; font-weight: 720; }
.metric span { color: var(--muted); font-weight: 620; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.kpi-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.kpi-card:nth-child(3n + 1) { border-top: 3px solid var(--brand); }
.kpi-card:nth-child(3n + 2) { border-top: 3px solid var(--accent); }
.kpi-card:nth-child(3n) { border-top: 3px solid var(--tenant-accent); }
.kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 660;
  text-transform: uppercase;
}
.kpi-card strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 720;
}
.kpi-card small { color: var(--muted); }
.kpi-card.good { border-color: #b7ebcb; background: #f0fff6; }
.kpi-card.warn { border-color: #ffd7a3; background: #fff8ed; }
.kpi-card.risk { border-color: #f5b5ae; background: #fff5f3; }
.trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
  gap: 8px;
  min-height: 190px;
  align-items: end;
  padding: 12px 6px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}
.trend-day {
  min-width: 0;
  display: grid;
  align-items: end;
  gap: 5px;
  justify-items: center;
}
.trend-stack {
  width: 100%;
  min-height: 4px;
  display: grid;
  align-items: end;
  gap: 2px;
}
.trend-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: var(--brand);
}
.trend-bar.submissions { background: var(--accent); }
.trend-bar.events { background: #d7a72f; }
.trend-bar.alerts { background: var(--danger); }
.trend-label {
  color: var(--muted);
  font-size: 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.bar-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}
.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ee;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.compact-table table { font-size: 13px; }
.search-input { width: min(320px, 100%); }
.grade-import-area {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
}
.survey-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  background: linear-gradient(180deg, #eef5f2, #f8faf8);
}
.survey-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.survey-header {
  padding: 24px 0 6px;
}
.survey-header h1 {
  max-width: 820px;
}
.survey-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.survey-form {
  display: grid;
  gap: 14px;
}
.survey-question {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}
.survey-question legend {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 680;
}
.survey-question legend span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 12px;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 8px;
}
.choice-grid label, .stacked-options label, .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  font-weight: 520;
}
.choice-grid input, .stacked-options input, .inline-check input {
  width: auto;
  min-height: auto;
}
.stacked-options {
  display: grid;
  gap: 8px;
}
.survey-footer-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(248,250,248,0), #f8faf8 35%);
}
.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce4de;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .2s ease;
}
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fbfdfb; }
tbody tr:last-child td { border-bottom: 0; }
th {
  background: #f7faf8;
  font-size: 12px;
  color: #50645b;
  font-weight: 660;
  text-transform: uppercase;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 650;
  background: #edf4ff;
  color: var(--accent);
}
.pill.high { background: #fef3f2; color: var(--danger); }
.pill.medium { background: #fff7e8; color: var(--amber); }
.pill.ok { background: #ecfdf3; color: var(--ok); }
.empty-state {
  display: grid;
  gap: 4px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong { color: var(--ink); }
.result-box {
  min-height: 82px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf8;
  overflow: auto;
}

.copy-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(16, 33, 28, .24);
}
.copy-dialog::backdrop { background: rgba(9, 24, 20, .62); }
.copy-dialog-shell { min-height: min(720px, calc(100vh - 32px)); }
.copy-dialog-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
}
.copy-dialog-header h2 { margin-top: 3px; font-size: 22px; }
.copy-dialog-header p { margin-bottom: 0; }
.copy-dialog-close { flex: 0 0 auto; }
.copy-dialog > .copy-dialog-shell > .status { padding: 0 20px; }
.copy-dialog-content { display: grid; gap: 18px; padding: 18px 20px 28px; }
.copy-meta-grid, .copy-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.copy-meta-item, .copy-score-item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}
.copy-meta-item span, .copy-score-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.copy-meta-item strong, .copy-score-item strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-weight: 670;
}
.copy-score-item strong { font-size: 20px; }
.copy-review-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #bfd8d0;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #f6fbf9;
}
.copy-review-panel h3, .copy-section-title { margin: 0; font-size: 16px; font-weight: 680; }
.copy-review-fields {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) minmax(220px, 1fr) minmax(240px, 1.3fr);
  gap: 12px;
  align-items: start;
}
.copy-review-fields textarea { min-height: 86px; }
.copy-review-hint { margin: 0; color: var(--muted); font-size: 12px; }
.copy-answer-list { display: grid; gap: 12px; }
.copy-answer {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.copy-answer.correct { border-left: 4px solid var(--ok); }
.copy-answer.incorrect { border-left: 4px solid var(--danger); }
.copy-answer.ungraded { border-left: 4px solid #9aa8a1; }
.copy-answer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.copy-answer-head h3 { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 650; }
.copy-answer-number { color: var(--brand-strong); font-weight: 700; }
.copy-answer-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.copy-answer-value {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.copy-answer-value > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 620; }
.copy-answer-value table { font-size: 12px; }
.copy-answer-value th, .copy-answer-value td { padding: 7px 8px; white-space: normal; }
.copy-calculation-work {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #bfd8cf;
  border-radius: 6px;
  background: #f6fbf9;
}
.copy-calculation-work h4 { margin: 0; color: var(--brand-strong); font-size: 14px; font-weight: 650; }
.copy-calculation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.copy-calculation-grid .copy-answer-value:last-child { grid-column: 1 / -1; }
.copy-answer-feedback { margin: 0; padding-top: 2px; color: #41534b; }
.copy-manual-correction {
  display: grid;
  grid-template-columns: max-content minmax(120px, 160px) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.copy-decision-control {
  display: inline-flex;
  width: max-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f1f5f3;
}
.copy-decision-control button {
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #40534b;
  font-size: 12px;
  font-weight: 620;
  transform: none;
}
.copy-decision-control button:hover { background: #e4ede9; transform: none; }
.copy-decision-control button.active { background: var(--brand); color: #fff; box-shadow: 0 1px 3px rgba(18, 32, 28, .16); }
.copy-manual-reason { min-width: 0; font-size: 12px; }
.copy-manual-reason textarea { min-height: 78px; resize: vertical; }
.copy-manual-reason small { color: var(--muted); font-size: 11px; font-weight: 400; }
.copy-manual-points { min-width: 0; font-size: 12px; }
.copy-manual-points > span { display: flex; align-items: center; gap: 7px; }
.copy-manual-points input { min-width: 0; min-height: 36px; }
.copy-manual-points em { color: var(--muted); font-style: normal; white-space: nowrap; }
.submission-attachment-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.submission-attachment-panel h2 { margin: 3px 0 5px; font-size: 18px; }
.submission-attachment-panel p { margin: 0; }
.attachment-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 7px; background: var(--brand); color: #fff; cursor: pointer; }
.attachment-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.attachment-current { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.attachment-current > div:first-child { min-width: 0; display: grid; gap: 3px; }
.attachment-current strong { overflow-wrap: anywhere; font-weight: 650; }
.attachment-current span { color: var(--muted); font-size: 12px; }
.submission-attachment-panel > .status { grid-column: 1 / -1; }
.attachment-preview-dialog { width: min(1000px, calc(100vw - 32px)); height: min(780px, calc(100vh - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.attachment-preview-dialog::backdrop { background: rgba(11, 27, 23, .64); }
.attachment-preview-dialog > header { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.attachment-preview-dialog h2 { margin: 3px 0 0; font-size: 18px; overflow-wrap: anywhere; }
.attachment-preview-content { height: calc(100% - 76px); overflow: auto; padding: 16px; background: #eef2f0; }
.attachment-preview-content iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.attachment-preview-content img { display: block; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.document-text-preview { min-height: 100%; padding: 28px; background: #fff; box-shadow: 0 2px 10px rgba(15, 31, 26, .08); }
.document-text-preview pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.65 Arial, sans-serif; }
.copy-attachment-list { display: grid; gap: 8px; }
.copy-attachment-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--ink); text-align: left; transform: none; }
.copy-attachment-item:hover { border-color: var(--brand); background: #f1f8f5; transform: none; }
.copy-attachment-item span { display: grid; min-width: 0; gap: 3px; }
.copy-attachment-item strong { overflow-wrap: anywhere; font-weight: 650; }
.copy-attachment-item small { color: var(--muted); }
.copy-attachment-item em { color: var(--brand-strong); font-size: 13px; font-style: normal; white-space: nowrap; }
.copy-history { display: grid; gap: 8px; }
.copy-history-item {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.copy-history-item:last-child { border-bottom: 0; }
.copy-history-item strong { font-weight: 650; }

@media (max-width: 820px) {
  .copy-meta-grid, .copy-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copy-review-fields { grid-template-columns: 1fr; }
  .copy-answer-columns { grid-template-columns: 1fr; }
  .copy-calculation-grid { grid-template-columns: 1fr; }
  .copy-calculation-grid .copy-answer-value:last-child { grid-column: auto; }
  .copy-manual-correction { grid-template-columns: 1fr; }
  .copy-history-item { grid-template-columns: 1fr; gap: 3px; }
  .submission-attachment-panel { grid-template-columns: 1fr; }
  .attachment-current { align-items: stretch; flex-direction: column; }
}

@media (max-width: 560px) {
  .copy-dialog { width: 100vw; max-height: 100vh; border: 0; border-radius: 0; }
  .copy-dialog-shell { min-height: 100vh; }
  .copy-dialog-header, .copy-dialog-content { padding-left: 14px; padding-right: 14px; }
  .copy-meta-grid, .copy-score-grid { grid-template-columns: 1fr; }
  .copy-answer-head { display: grid; }
}
.color-swatch {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.12);
  margin-right: 4px;
  vertical-align: middle;
}
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.export-card {
  display: grid;
  gap: 6px;
  min-height: 110px;
  align-content: center;
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.export-card:hover { background: #f7faf8; color: var(--ink); }
.export-card strong { font-weight: 680; }
.export-card span { color: var(--muted); font-weight: 500; }

.field-actions { display: flex; align-items: end; }
.field-actions button { width: 100%; }
.secret-once {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #d7a72f;
  border-radius: 6px;
  background: #fffaf0;
}
.secret-once p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.settings-disclosure { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: #fbfcfb; }
.settings-disclosure summary { cursor: pointer; font-weight: 650; }
.settings-disclosure[open] summary { margin-bottom: 8px; }
.field-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.proctoring-notice { padding: 12px; border-left: 3px solid var(--amber); background: #fff8ec; color: var(--ink); line-height: 1.45; }
.media-capture-source { position: fixed; width: 2px; height: 2px; left: -20px; bottom: -20px; opacity: 0; pointer-events: none; }

.candidate-body { background: #f2f6f8; }
.exam-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.exam-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.timer-box {
  min-width: 132px;
  display: grid;
  justify-items: end;
  gap: 0;
}
.timer-box span { color: var(--muted); font-size: 12px; font-weight: 620; }
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  line-height: 1;
  font-weight: 740;
  color: var(--brand);
}
.exam-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
}
.candidate-welcome {
  min-height: calc(100vh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .65fr);
  align-items: center;
  gap: clamp(18px, 5vw, 56px);
}
.welcome-copy {
  display: grid;
  gap: 18px;
}
.welcome-copy h1 {
  max-width: 780px;
  font-size: clamp(34px, 5.8vw, 60px);
  font-weight: 700;
  letter-spacing: 0;
}
.welcome-copy p {
  max-width: 720px;
  color: #405049;
  font-size: 18px;
}
.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1;
}
.prep-grid article {
  min-height: 96px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
}
.prep-grid strong { font-size: 20px; font-weight: 700; }
.prep-grid span { color: var(--muted); }
.start-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--brand);
}
.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #405049;
}
.notice {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: #f7faf8;
  color: var(--muted);
}
.translation-notice {
  max-width: 760px;
  padding: 11px 12px;
  border: 1px solid #f2b56b;
  border-radius: var(--radius);
  background: #fff8ed;
  color: #7a3e06;
  font-size: 13px;
  font-weight: 620;
}

.preview-mode-banner {
  background: #fff7d6;
  border-bottom: 1px solid #e3c85f;
  color: #4f4100;
  font-size: 0.95rem;
  padding: 11px clamp(18px, 4vw, 56px);
  text-align: center;
}
.consent-line {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  font-weight: 620;
}
.consent-line input { width: auto; min-height: auto; margin-top: 4px; }
.exam-workspace { display: grid; gap: 16px; }
.exam-progress, .submit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}
.exam-progress { border-top: 3px solid var(--accent); }
.submit-bar { border-left: 4px solid var(--brand); }
.progress-meter {
  min-width: 130px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--ok);
  font-weight: 680;
}
.question-list { display: grid; gap: 12px; }
.candidate-progress-wrap { min-width: 230px; display: grid; gap: 7px; }
.candidate-progress-track { width: 100%; height: 6px; overflow: hidden; background: #dbe5e1; border-radius: 3px; }
.candidate-progress-track span { display: block; width: 0; height: 100%; background: var(--brand); transition: width .25s ease; }
.autosave-status { color: var(--muted); font-size: 12px; text-align: right; }
.section-nav {
  position: sticky;
  top: 78px;
  z-index: 12;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 5px 14px rgba(28,48,42,.08);
}
.section-nav button { flex: 0 0 auto; min-height: 34px; padding: 7px 11px; border: 0; color: #25433d; background: #edf5f2; font-size: 12px; font-weight: 600; }
.assessment-section { scroll-margin-top: 150px; padding: 26px 4px 8px; border-bottom: 2px solid var(--brand); }
.assessment-section h2 { margin: 4px 0 6px; font-size: 22px; }
.assessment-section p { max-width: 820px; margin: 0; color: var(--muted); }
.reference-question h3 { margin: 0 0 8px; font-size: 17px; }
.question-prompt { margin: 5px 0 0; color: #53625e; font-size: 14px; font-weight: 400; line-height: 1.55; }
.structured-table-wrap { width: 100%; margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); }
.structured-table { width: 100%; min-width: 600px; border-collapse: collapse; table-layout: fixed; }
.structured-table th, .structured-table td { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
.structured-table thead th { background: #173d3a; color: #fff; font-weight: 650; }
.structured-table tbody th { width: 34%; background: #f6f9f7; color: #263c37; font-weight: 600; text-align: left; }
.structured-table tr:last-child > * { border-bottom: 0; }
.structured-table tr > *:last-child { border-right: 0; }
.table-input { min-width: 84px; min-height: 38px; padding: 7px 8px; text-align: right; background: #fff; border-color: #b9cbc5; }
.table-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,107,98,.12); }
.number-response { display: flex; align-items: center; gap: 10px; max-width: 360px; margin-top: 14px; }
.number-response span { color: #53625e; font-size: 14px; }
.list-response { display: grid; gap: 9px; margin-top: 14px; }
.list-response label { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; }
.list-response label span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #dff1eb; color: #125b53; font-size: 12px; font-weight: 700; }
.question-hint { margin-top: 12px; color: #53625e; font-size: 13px; }
.question-hint summary { cursor: pointer; color: #125b53; font-weight: 600; }
.question-hint p { margin: 6px 0 0; }
.calculation-work {
  min-width: 0;
  margin: 18px 0 0;
  padding: 15px;
  border: 1px solid #a9cec2;
  border-radius: 7px;
  background: #f3faf7;
}
.calculation-work legend { padding: 0 7px; color: var(--brand-strong); font-size: 14px; font-weight: 650; }
.calculation-work > p { margin: 0 0 13px; color: #455b53; font-size: 13px; line-height: 1.5; }
.calculation-work-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calculation-work-fields label { display: grid; min-width: 0; gap: 6px; color: #263c37; font-size: 13px; font-weight: 600; }
.calculation-work-fields label:last-child { grid-column: 1 / -1; }
.calculation-work-fields textarea { width: 100%; min-height: 74px; resize: vertical; background: #fff; font-weight: 400; line-height: 1.5; }
@media (max-width: 720px) {
  .calculation-work-fields { grid-template-columns: 1fr; }
  .calculation-work-fields label:last-child { grid-column: auto; }
}
.question {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(18, 32, 28, .04);
}
.question-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.question-title span {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #edf4ff;
  color: var(--accent);
  font-weight: 680;
}
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choice {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.choice:hover { border-color: var(--brand); background: #f3faf7; box-shadow: 0 0 0 3px rgba(18,107,98,.08); }
.choice input { width: auto; min-height: auto; }
.done-panel {
  width: min(620px, 100%);
  margin: 10vh auto 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.tenant-body {
  min-height: 100vh;
  background: var(--tenant-surface);
  color: var(--tenant-ink);
}
.tenant-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(18,60,105,.12);
}
.tenant-logo, .tenant-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.tenant-logo-image {
  width: 148px;
  height: 70px;
  object-fit: contain;
  object-position: left center;
}
.tenant-logo:has(.tenant-logo-image:not(.hidden)) > span:last-child { display: none; }
.tenant-logo small { display: block; color: var(--muted); }
.tenant-actions a {
  color: var(--tenant-ink);
  text-decoration: none;
  font-weight: 620;
}
.tenant-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--tenant-primary);
  color: white !important;
  text-decoration: none;
  font-weight: 650;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tenant-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.tenant-button.secondary { background: var(--tenant-secondary); }
.tenant-button.ghost {
  background: white;
  color: var(--tenant-primary) !important;
  border: 1px solid rgba(18,60,105,.22);
}
.tenant-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(520px, calc(100svh - 140px), 700px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(46px, 8vw, 96px) clamp(18px, 6vw, 88px);
  background: var(--tenant-primary);
  color: white;
}
.tenant-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.tenant-hero.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(3, 22, 38, .64);
}
.tenant-hero-copy {
  width: min(760px, 100%);
}
.tenant-hero-copy h1 {
  max-width: 760px;
  margin: 12px 0 20px;
  font-size: 60px;
  line-height: 1.03;
  font-weight: 620;
  color: white;
  text-wrap: balance;
}
.tenant-hero-copy p {
  max-width: 680px;
  color: rgba(255,255,255,.9);
  font-size: 20px;
  line-height: 1.65;
}
.tenant-hero .eyebrow { color: var(--tenant-accent); }
.tenant-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.tenant-hero .tenant-button {
  background: var(--tenant-accent);
  color: #102535 !important;
}
.tenant-hero .tenant-button.secondary {
  background: rgba(255,255,255,.12);
  color: white !important;
  border: 1px solid rgba(255,255,255,.5);
}
.tenant-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.tenant-hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 999px;
  background: rgba(3,22,38,.36);
  color: rgba(255,255,255,.94);
  font-size: 14px;
}
.tenant-section {
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 64px);
}
.tenant-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tenant-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(18,60,105,.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}
.tenant-card > span {
  color: var(--tenant-secondary);
  font-weight: 680;
  letter-spacing: .08em;
}
.tenant-card h3 { margin: 0; color: var(--tenant-primary); font-weight: 700; }
.tenant-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: stretch;
  background: white;
}
.tenant-feature-media {
  min-height: 480px;
  margin: 0;
  overflow: hidden;
}
.tenant-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tenant-feature-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(40px, 7vw, 92px);
}
.tenant-feature-copy h2 {
  max-width: 620px;
  margin: 0;
  color: var(--tenant-primary);
  font-size: 44px;
  line-height: 1.1;
  font-weight: 610;
}
.tenant-feature-copy p {
  max-width: 620px;
  margin: 0;
  color: #485966;
  font-size: 18px;
  line-height: 1.7;
}
.tenant-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tenant-topic-list span {
  padding: 8px 11px;
  border-left: 3px solid var(--tenant-accent);
  background: var(--tenant-surface);
  color: var(--tenant-ink);
  font-size: 14px;
}
.process-section {
  display: grid;
  grid-template-columns: minmax(280px, .6fr) minmax(0, 1fr);
  gap: 24px;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.process-steps article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid rgba(18,60,105,.14);
}
.process-steps span {
  color: var(--tenant-accent);
  font-weight: 680;
}
.tenant-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 64px);
  border-top: 1px solid rgba(18,60,105,.14);
  color: var(--muted);
}
.tenant-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.summary-tile {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.summary-tile strong { font-size: 26px; font-weight: 720; }
.library-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.library-strip article {
  min-height: 86px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.library-strip strong {
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
}
.library-strip span,
.checkline {
  color: var(--muted);
  font-size: 13px;
}
.checkline {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.checkline input { width: 18px; height: 18px; }
.ai-result-head,
.ai-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-result-head { margin-bottom: 10px; }
.ai-history {
  display: grid;
  gap: 10px;
}
.ai-history-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.ai-history-item div:first-child {
  display: grid;
  gap: 4px;
}
.ai-history-item strong { font-weight: 680; }
.ai-history-item span {
  color: var(--muted);
  font-size: 13px;
}
.analysis-panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 980px) {
  .login-page, .app, .candidate-welcome { grid-template-columns: 1fr; }
  .login-visual { min-height: 320px; }
  .sidebar { position: static; height: auto; }
  .metrics, .kpi-grid, .grid.cols-2, .grid.cols-3, .grid.cols-4, .export-grid, .prep-grid, .tenant-card-grid, .tenant-feature, .process-section, .process-steps, .summary-grid, .library-strip, .secret-once { grid-template-columns: 1fr; }
  .secret-once p { grid-column: 1; }
  .grid .span-2, .grid .span-3 { grid-column: auto; }
  .tenant-feature-media { min-height: 360px; }
  .section-head, .topbar, .exam-progress, .submit-bar { align-items: stretch; flex-direction: column; }
  .tenant-header, .tenant-footer { align-items: flex-start; flex-direction: column; }
  .tenant-actions { flex-wrap: wrap; }
  .search-input { width: 100%; }
  th, td { white-space: normal; }
}

@media (max-width: 560px) {
  .main, .exam-main { padding: 14px; }
  .exam-header { align-items: flex-start; }
  .section-nav { top: 104px; margin-inline: -4px; }
  .candidate-progress-wrap { min-width: 0; width: 100%; }
  .autosave-status { text-align: left; }
  .structured-table th, .structured-table td { padding: 8px; }
  .timer-box { min-width: 104px; }
  .timer { font-size: 22px; }
  .welcome-copy h1 { font-size: 38px; }
  .signal-card strong { font-size: 28px; }
  .tenant-header { align-items: center; flex-direction: row; padding: 10px 14px; }
  .tenant-logo-image { width: 110px; height: 52px; }
  .tenant-actions > a:not(.tenant-button) { display: none; }
  .tenant-hero { min-height: calc(100svh - 92px); padding: 40px 18px; }
  .tenant-hero-copy h1 { font-size: 42px; }
  .tenant-hero-copy p { font-size: 17px; line-height: 1.55; }
  .tenant-feature-copy { padding: 36px 20px; }
  .tenant-feature-copy h2 { font-size: 32px; }
}

.session-expiry-warning {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: min(430px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e5c57b;
  border-left: 4px solid #ba7b18;
  border-radius: 7px;
  background: #fffaf0;
  box-shadow: 0 18px 50px rgba(24, 35, 32, .18);
}
.session-expiry-warning.hidden { display: none; }
.session-expiry-warning div { display: grid; gap: 3px; }
.session-expiry-warning strong { font-size: 14px; font-weight: 650; }
.session-expiry-warning span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.session-expiry-warning button { flex: 0 0 auto; }

/* Progressive UX foundation */
.ui-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; }
.icon-command, button.icon-command { width: 40px; min-width: 40px; padding: 8px; display: inline-grid; place-items: center; }
.mobile-nav-button { display: none !important; }
.breadcrumb { display: flex; align-items: center; gap: 7px; min-height: 22px; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.breadcrumb span + span::before { content: '/'; margin-right: 7px; color: #9aa7a1; }
.breadcrumb span:last-child { color: var(--brand-strong); font-weight: 650; }

.nav-spaces { gap: 3px; }
.nav-space { display: grid; gap: 2px; }
.nav .nav-space-toggle {
  min-height: 42px; padding: 9px 10px; color: #f2f6f4; font-size: 13px; font-weight: 680;
}
.nav .nav-space-toggle:hover { background: rgba(255,255,255,.07); }
.nav-space-toggle .nav-chevron { margin-left: auto; transition: transform .16s ease; }
.nav-space.open .nav-chevron { transform: rotate(180deg); }
.nav-space-items { display: none; gap: 2px; padding: 0 0 5px 10px; }
.nav-space.open .nav-space-items { display: grid; }
.nav .nav-space-items button { min-height: 38px; padding: 7px 10px; font-size: 13px; font-weight: 540; }
.nav .nav-space-items button.active { font-weight: 650; }

.role-home { display: grid; gap: 16px; padding: 22px; border-left: 4px solid var(--tenant-accent); }
.role-home-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.role-home-header h2 { font-size: 22px; font-weight: 650; }
.role-home-header p { margin: 4px 0 0; color: var(--muted); }
.role-home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.notification-button { position: relative; }
.notification-badge { position: absolute; inset: -5px -6px auto auto; display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; border: 2px solid var(--surface); border-radius: 10px; background: #b42318; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.notification-drawer .help-drawer-panel { width: min(440px, 100vw); }
.notification-list { display: grid; gap: 8px; padding: 18px; overflow: auto; }
.notification-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--tenant-primary); border-radius: 6px; background: var(--surface); }
.notification-item.high { border-left-color: #b42318; }
.notification-item.medium { border-left-color: #b58105; }
.notification-item.read { opacity: .68; }
.notification-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: var(--surface-soft); color: var(--ink); }
.notification-content { display: grid; gap: 3px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.notification-content:hover { transform: none; box-shadow: none; color: var(--tenant-primary); }
.notification-content span { color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
.notification-dismiss { width: 34px; height: 34px; }
.notification-empty { display: grid; gap: 5px; padding: 28px 18px; text-align: center; color: var(--muted); }
.notification-empty strong { color: var(--ink); }
.monitor-row-actions { flex-wrap: wrap; min-width: 210px; }
.loading-spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ui-spin .7s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation-duration: 1.6s; } }
.role-action-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 74px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; }
.role-action-card:hover { border-color: #b9ccc4; background: var(--surface-soft); }
.role-action-card .ui-icon { width: 22px; height: 22px; color: var(--brand); }
.role-action-card span { display: grid; gap: 2px; min-width: 0; }
.role-action-card strong { font-weight: 650; }
.role-action-card small { color: var(--muted); }

.toast-region { position: fixed; z-index: 5000; right: 18px; bottom: 18px; width: min(420px, calc(100vw - 28px)); display: grid; gap: 9px; pointer-events: none; }
.toast { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); background: #fff; box-shadow: 0 18px 50px rgba(14, 30, 25, .18); opacity: 0; transform: translateY(8px); transition: opacity .16s ease, transform .16s ease; pointer-events: auto; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast > div { display: grid; gap: 2px; }
.toast strong { font-weight: 680; }
.toast span { color: var(--muted); }
.toast-success { border-left-color: var(--ok); }
.toast-warning { border-left-color: var(--amber); }
.toast-error { border-left-color: var(--danger); }
.toast-action, .toast-close { min-height: 32px; padding: 5px 8px; background: transparent; color: var(--brand-strong); transform: none; }
.toast-close { width: 32px; border-radius: 50%; color: var(--muted); font-size: 19px; }
.toast-action:hover, .toast-close:hover { background: var(--surface-soft); transform: none; }

.confirm-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(11, 28, 23, .26); }
.confirm-dialog::backdrop { background: rgba(9, 24, 20, .62); }
.confirm-dialog-shell { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 15px; padding: 22px; }
.confirm-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #fff3df; color: #8a4d0f; font-weight: 750; }
.confirm-dialog h2 { margin: 0 0 7px; font-size: 20px; font-weight: 680; }
.confirm-dialog p { margin: 0; color: var(--muted); white-space: pre-line; }
.confirm-details { margin-top: 12px; }
.confirm-details pre { max-height: 150px; overflow: auto; white-space: pre-wrap; }
.confirm-dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; margin-top: 6px; }
button.danger-solid { background: var(--danger); color: #fff; }
button.is-loading { position: relative; padding-left: 34px; }
button.is-loading::before { content: ''; position: absolute; left: 13px; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ui-spin .7s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

.help-drawer { position: fixed; inset: 0; z-index: 4000; display: flex; justify-content: flex-end; background: rgba(9, 24, 20, 0); pointer-events: none; transition: background .18s ease; }
.help-drawer.open { background: rgba(9, 24, 20, .42); pointer-events: auto; }
.help-drawer-panel { width: min(430px, 100vw); height: 100%; display: grid; grid-template-rows: auto 1fr; background: #fff; box-shadow: -18px 0 55px rgba(9, 24, 20, .16); transform: translateX(100%); transition: transform .2s ease; }
.help-drawer.open .help-drawer-panel { transform: translateX(0); }
.help-drawer header { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 20px; border-bottom: 1px solid var(--line); }
.help-drawer header h2 { font-size: 21px; font-weight: 650; }
.help-drawer-content { overflow: auto; display: grid; align-content: start; gap: 22px; padding: 20px; }
.help-drawer-content p { color: var(--muted); line-height: 1.65; }
.help-good-practice { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 13px; border-left: 3px solid var(--tenant-accent); background: #fffaf0; }
.help-good-practice .ui-icon { color: var(--amber); }
.help-checklist { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.help-checklist-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.help-checklist label { grid-template-columns: 20px 1fr; align-items: start; font-weight: 500; }
.help-checklist input { width: 17px; min-height: 17px; }
.help-manual-link { color: var(--brand-strong); font-weight: 650; }
.has-field-help { position: relative; padding-top: 1px; }
.field-help-trigger { position: absolute; top: 0; right: 0; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid #a9bbb4; border-radius: 50%; color: var(--brand-strong); background: #fff; font-size: 11px; font-weight: 700; cursor: help; }
.embedded-help-tooltip {
  position: fixed; z-index: 3000; width: max-content; max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px; border-radius: 5px; background: #17211f; color: #fff;
  box-shadow: 0 10px 28px rgba(12, 24, 21, .22); font: 500 .76rem/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
  pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s ease, transform .12s ease;
}
.embedded-help-tooltip.visible { opacity: 1; transform: translateY(0); }
[data-help-fr], [data-help-en], [data-help] { text-decoration-skip-ink: auto; }

.evaluation-wizard { min-width: 0; max-width: 100%; padding: 0; overflow: clip; }
.wizard-heading { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.wizard-heading h2 { font-size: 23px; font-weight: 650; }
.wizard-heading p { margin: 5px 0 0; }
.segmented-control { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.segmented-control button { min-height: 34px; padding: 6px 11px; border: 0; background: transparent; color: var(--muted); box-shadow: none; transform: none; font-size: 13px; }
.segmented-control button.active { background: #fff; color: var(--brand-strong); box-shadow: 0 1px 4px rgba(17, 39, 31, .1); }
.wizard-stepper { width: 100%; min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface-soft); overflow-x: auto; }
.wizard-stepper button { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); box-shadow: none; transform: none; white-space: nowrap; font-weight: 560; }
.wizard-stepper button span { width: 25px; height: 25px; display: inline-grid; place-items: center; border: 1px solid #a9bbb4; border-radius: 50%; font-size: 12px; }
.wizard-stepper button.active { border-bottom-color: var(--brand); color: var(--brand-strong); }
.wizard-stepper button.active span, .wizard-stepper button.complete span { border-color: var(--brand); background: var(--brand); color: #fff; }
.wizard-body { min-height: 390px; padding: 26px 24px; }
.wizard-step { display: grid; gap: 22px; }
.wizard-step-heading { display: grid; gap: 4px; }
.wizard-step-heading > span { color: var(--brand); font-size: 12px; font-weight: 680; text-transform: uppercase; }
.wizard-step-heading h3 { margin: 0; font-size: 20px; font-weight: 650; }
.wizard-step-heading p { margin: 0; color: var(--muted); }
.wizard-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.wizard-footer > span { text-align: center; }
.evaluation-wizard > .status { margin: 0 24px 18px; }
.evaluation-wizard[data-mode="simple"] .expert-only { display: none !important; }
.wizard-info-panel { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 16px; border-left: 4px solid var(--brand); background: var(--surface-soft); }
.wizard-info-panel .ui-icon { width: 24px; height: 24px; color: var(--brand); }
.wizard-info-panel div { display: grid; gap: 3px; }
.wizard-info-panel strong { font-weight: 650; }
.wizard-info-panel span { color: var(--muted); }
.wizard-template-bar { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(240px, 1fr) auto auto; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.wizard-template-bar button { min-height: 44px; }
.question-import-panel { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--blue-soft); }
.question-import-panel > summary { padding: 13px 15px; color: var(--ink); cursor: pointer; font-weight: 620; }
.question-import-panel[open] > summary { border-bottom: 1px solid var(--line); }
.question-import-grid { display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr) auto; align-items: end; gap: 12px; padding: 15px; }
.question-import-action { display: flex; align-items: end; min-height: 64px; }
.question-import-panel > .status { margin: 0 15px 14px; }
.question-builder-simulation { display: grid; gap: 4px; margin: 10px 0 14px; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--blue-soft); color: var(--ink); font-size: 13px; }
.question-builder-simulation strong { color: var(--brand-strong); }
.wizard-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wizard-summary-grid > div { display: grid; gap: 4px; min-height: 82px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.wizard-summary-grid span { color: var(--muted); font-size: 12px; }
.wizard-summary-grid strong { font-weight: 650; overflow-wrap: anywhere; }
.wizard-validation-errors, .wizard-validation-success { display: grid; gap: 5px; margin-top: 12px; padding: 13px; border-left: 4px solid var(--danger); background: #fff5f3; color: #7d211b; }
.wizard-validation-success { border-left-color: var(--ok); background: #f0fbf5; color: #075d38; }
.field-error, .question-inline-errors, .question-builder-errors { color: var(--danger); font-size: 12px; }
.field-error:empty, .question-inline-errors:empty, .question-builder-errors:empty { display: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 2px rgba(180, 35, 24, .1); }

.question-builder-toolbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.97); }
.question-builder-toolbar > div:first-child { display: grid; gap: 3px; }
.question-builder-toolbar strong { font-weight: 650; }
.question-builder-toolbar span { color: var(--muted); font-size: 13px; }
.question-builder-toolbar b { color: var(--ink); font-weight: 650; }
.question-builder-toolbar select { min-width: 185px; }
.question-builder-list { display: grid; gap: 12px; margin-top: 12px; }
.question-builder-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.question-builder-card:focus-within { border-color: #8ebdb1; box-shadow: 0 0 0 3px rgba(18, 107, 98, .08); }
.question-builder-card.dragging { opacity: .55; }
.question-builder-card > header { display: grid; grid-template-columns: 36px 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 52px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.question-builder-card > header strong { font-weight: 620; }
.question-builder-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #e7f4f1; color: var(--brand-strong); font-size: 12px; font-weight: 680; }
.drag-handle { width: 34px; min-width: 34px; padding: 7px; border: 0; background: transparent; color: var(--muted); box-shadow: none; cursor: grab; transform: none; }
.question-card-actions { display: flex; gap: 3px; }
.question-builder-body { display: grid; gap: 13px; padding: 15px; }
.question-builder-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.question-builder-columns.compact-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.question-builder-columns .span-2 { grid-column: span 2; }
.builder-required { align-self: end; }
.legacy-test-editor > summary { padding: 17px 20px; color: var(--brand-strong); font-weight: 620; cursor: pointer; }
.legacy-test-editor[open] > summary { border-bottom: 1px solid var(--line); }
.legacy-test-editor-body { padding: 20px; }
.wizard-preview-dialog { width: min(1380px, calc(100vw - 30px)); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(11, 28, 23, .26); }
.wizard-preview-dialog::backdrop { background: rgba(9, 24, 20, .62); }
.wizard-preview-shell > header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 14px; padding: 20px; border-bottom: 1px solid var(--line); background: #fff; }
.wizard-preview-shell h2 { margin: 3px 0 0; font-size: 22px; font-weight: 650; }
.wizard-preview-body { display: grid; gap: 12px; max-height: 70vh; overflow: auto; padding: 20px; background: var(--surface-soft); }
.wizard-preview-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.wizard-preview-meta span { padding: 6px 9px; border: 1px solid var(--line); background: #fff; font-size: 12px; }
.wizard-preview-languages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.wizard-preview-column { min-width: 0; display: grid; gap: 10px; }
.wizard-preview-language { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.wizard-preview-language span { font-weight: 650; }
.wizard-preview-language small { color: var(--muted); }
.wizard-preview-body article { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.wizard-preview-body article > span { color: var(--brand); font-weight: 680; }
.wizard-preview-body article strong { font-weight: 600; }
.preview-choices { display: grid; gap: 6px; margin-top: 10px; }
.preview-choices span { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }

.candidate-network { display: none; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.candidate-network > span { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.candidate-network.offline { color: var(--danger); }
.candidate-network.offline > span { background: var(--danger); }
.candidate-experience-v2 .candidate-network { display: flex; }
.candidate-preflight { display: none; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.candidate-experience-v2 .candidate-preflight { display: grid; }
.candidate-preflight > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.candidate-preflight h3 { margin: 0; font-size: 15px; font-weight: 650; }
.candidate-preflight ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.candidate-preflight li { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 45px; padding: 7px; border: 1px solid var(--line); background: #fff; }
.candidate-preflight li > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e9f8f0; color: #076442; font-weight: 700; }
.candidate-preflight li.warning > span { background: #fff4df; color: #8a4d0f; }
.candidate-preflight li.error > span { background: #fff0ee; color: var(--danger); }
.candidate-preflight li div { display: grid; }
.candidate-preflight li strong { font-size: 12px; font-weight: 620; }
.candidate-preflight li small { color: var(--muted); font-size: 11px; }
.candidate-preflight p { margin: 0; font-size: 12px; }
.candidate-work-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 18px; }
.candidate-question-navigator { display: none; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.candidate-experience-v2 .candidate-question-navigator { display: grid; gap: 12px; }
.candidate-question-navigator > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.candidate-question-navigator strong { font-weight: 650; }
.candidate-question-navigator span { color: var(--muted); font-size: 12px; }
.question-palette { display: grid; grid-template-columns: repeat(5, minmax(32px, 1fr)); gap: 6px; }
.question-palette button { min-width: 0; min-height: 35px; padding: 5px; border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: none; transform: none; font-size: 12px; }
.question-palette button.answered { border-color: #87c7ac; background: #eaf8f1; color: #075d38; }
.question-palette button.marked { border-color: #d59a3b; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #d59a3b; }
.question-palette button.current { outline: 2px solid var(--brand); outline-offset: 1px; }
.palette-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.palette-legend span { display: flex; align-items: center; gap: 4px; }
.palette-legend i { width: 10px; height: 10px; border: 1px solid var(--line); background: #fff; }
.palette-legend i.answered { border-color: #87c7ac; background: #eaf8f1; }
.palette-legend i.marked { border: 2px solid #d59a3b; }
.mark-review-button { margin-left: auto; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); box-shadow: none; transform: none; font-size: 12px; white-space: nowrap; }
.mark-review-button.active { border-color: #d59a3b; background: #fff8e9; color: #76450d; }
.timer.warning { color: #8a4d0f; }
.timer.urgent { color: var(--danger); }
.candidate-review-dialog { width: min(620px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(11, 28, 23, .26); }
.candidate-review-dialog::backdrop { background: rgba(9, 24, 20, .62); }
.candidate-review-shell { display: grid; gap: 18px; padding: 22px; }
.candidate-review-shell header { display: grid; gap: 5px; }
.candidate-review-shell h2 { margin: 0; font-size: 22px; font-weight: 650; }
.candidate-review-shell p { margin: 0; color: var(--muted); }
.candidate-review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.candidate-review-summary > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); background: var(--surface-soft); }
.candidate-review-summary span { color: var(--muted); font-size: 12px; }
.candidate-review-summary strong { font-size: 20px; font-weight: 680; }
.candidate-review-summary .warning { border-color: #e1b363; background: #fff8e9; }
.candidate-review-shell footer { display: flex; justify-content: flex-end; gap: 9px; }
.submission-receipt { width: min(600px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px auto 0; padding: 15px; border: 1px solid #9acbb7; border-left: 4px solid var(--ok); background: #f1fbf6; text-align: left; }
.submission-receipt > div { display: grid; gap: 3px; }
.submission-receipt span { color: var(--muted); font-size: 12px; }
.submission-receipt strong { font-weight: 650; overflow-wrap: anywhere; }
.submission-receipt p { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.submission-receipt > button { grid-column: 1 / -1; justify-self: start; }
.monitor-queue-filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.monitor-queue-filters button { min-height: 35px; padding: 6px 11px; border: 0; background: transparent; color: var(--muted); box-shadow: none; transform: none; font-size: 13px; }
.monitor-queue-filters button.active { background: #fff; color: var(--brand-strong); box-shadow: 0 1px 4px rgba(17, 39, 31, .1); }
.trust-explainer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-bottom: 12px; padding: 11px 13px; border-left: 3px solid var(--tenant-accent); background: #fffaf0; }
.trust-explainer strong { font-size: 13px; font-weight: 650; }
.trust-explainer span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.trust-score-cell { display: grid; justify-items: start; gap: 3px; min-width: 165px; }
.trust-score-cell > span:not(.pill), .trust-score-cell small { color: var(--muted); font-size: 11px; }
.feature-advancedTables .table-wrap { max-height: min(68vh, 760px); overflow: auto; }
.feature-advancedTables .data-table thead { position: sticky; top: 0; z-index: 2; background: var(--surface-soft); box-shadow: 0 1px 0 var(--line); }
.feature-advancedTables .data-table th[data-sortable] { cursor: pointer; user-select: none; }
.feature-advancedTables .data-table th[data-sortable]:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.sort-indicator { display: inline-block; width: 9px; margin-left: 5px; color: var(--muted); }
th[aria-sort="ascending"] .sort-indicator::after { content: '↑'; }
th[aria-sort="descending"] .sort-indicator::after { content: '↓'; }
.feature-advancedTables .data-table tbody tr:hover { background: #f6faf8; }
.data-table-column-hidden { display: none !important; }
.data-table-tools { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: min(100%, 820px); min-width: min-content; min-height: 48px; margin-left: auto; padding: 6px 4px; background: #fff; color: var(--muted); font-size: 12px; }
.data-table-selection-summary { margin-right: auto; color: var(--brand-strong); font-weight: 620; white-space: nowrap; }
.data-table-selection-cell { width: 46px; min-width: 46px; padding: 0 !important; text-align: center; }
.data-table-selection-control { display: inline-flex; align-items: center; justify-content: center; width: 42px; min-height: 42px; cursor: pointer; }
.data-table-selection-cell input { position: relative; z-index: 1; width: 17px; min-height: 17px; accent-color: var(--brand); cursor: pointer; }
.data-table tbody tr:has([data-row-select]:checked) { background: color-mix(in srgb, var(--brand) 7%, #fff); }
.data-table-tools button, .data-table-tools summary { min-height: 34px; }
.data-table-page-size { display: flex; grid-template-columns: auto auto; align-items: center; gap: 6px; font-weight: 560; white-space: nowrap; }
.data-table-page-size select { width: auto; min-width: 68px; min-height: 34px; padding: 5px 28px 5px 8px; font-size: 12px; }
.data-table-column-picker { position: relative; }
.data-table-column-picker > summary { display: flex; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--brand-strong); cursor: pointer; font-weight: 620; list-style: none; }
.data-table-column-picker > summary::-webkit-details-marker { display: none; }
.data-table-column-picker[open] > summary { border-color: #9bbeb0; background: var(--surface-soft); }
.data-table-column-menu { position: absolute; top: calc(100% + 5px); right: 0; z-index: 8; width: min(280px, calc(100vw - 40px)); max-height: 320px; overflow: auto; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 16px 42px rgba(14, 30, 25, .18); }
.data-table-column-menu label { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; min-height: 34px; padding: 5px 7px; border-radius: 4px; font-size: 12px; font-weight: 540; }
.data-table-column-menu label:hover { background: var(--surface-soft); }
.data-table-column-menu input { width: 16px; min-height: 16px; }
.data-table-page-hidden { display: none; }
.data-table-pager { position: sticky; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 4px; color: var(--muted); font-size: 12px; }
.data-table-pager > div { display: flex; gap: 5px; }
.feature-newAdminNavigation .copy-dialog { width: min(980px, 100vw); height: 100vh; max-height: 100vh; margin: 0 0 0 auto; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.feature-newAdminNavigation .copy-dialog::backdrop { background: rgba(9, 24, 20, .42); }
.feature-newAdminNavigation .copy-dialog-shell { min-height: 100vh; }
.admin-not-found { min-height: 480px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; }
.admin-not-found > .ui-icon { width: 48px; height: 48px; color: var(--muted); }
.admin-not-found h2 { margin: 0; font-size: 25px; font-weight: 650; }
.admin-not-found p { max-width: 520px; margin: 0 0 8px; color: var(--muted); }
.academic-directory-hero { display: grid; gap: 18px; border-top: 3px solid var(--brand); }
.academic-summary { margin-top: 2px; }
.academic-management-grid { align-items: start; }
.academic-account-fields { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(220px, .8fr) minmax(280px, 1.2fr); align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--line); border-left: 3px solid var(--tenant-accent); background: var(--surface-soft); }
.progressive-disclosure { border: 1px solid var(--line); background: var(--surface-soft); }
.progressive-disclosure > summary { padding: 13px 15px; color: var(--brand-strong); cursor: pointer; font-weight: 620; }
.progressive-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.progressive-disclosure > div { padding: 15px; }
.checkbox-stack { display: grid; gap: 7px; padding: 11px 13px; border: 1px solid var(--line); background: var(--surface-soft); }
select[multiple] { min-height: 120px; padding: 6px; background-image: none; }
select[multiple] option { padding: 7px 8px; border-radius: 3px; }
.compact-tag { display: inline-block; margin: 2px; padding: 3px 6px; border: 1px solid #bdd4cc; border-radius: 3px; background: #f3faf7; color: var(--brand-strong); font-size: 11px; white-space: nowrap; }
.danger-text { color: var(--danger) !important; }
.saved-recipient-picker { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 10px; padding: 12px; border-left: 3px solid var(--brand); background: var(--surface-soft); }
.saved-recipient-picker select { min-height: 92px; }
.academic-thread { display: grid; gap: 12px; padding: 18px 22px; background: var(--surface-soft); }
.academic-message { width: min(78%, 720px); display: grid; gap: 8px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.academic-message.mine { justify-self: end; border-color: #9bc7b9; background: #eff9f5; }
.academic-message header { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.academic-message header strong { color: var(--ink); font-weight: 620; }
.academic-message p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.academic-message footer { color: var(--muted); font-size: 11px; }
.academic-reply-box { position: sticky; bottom: 0; display: grid; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fff; }
.academic-conversation-dialog .copy-dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--tenant-accent); }
.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; }

@media (max-width: 980px) {
  .feature-newAdminNavigation .app { display: block; }
  .feature-newAdminNavigation .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3000; width: min(320px, calc(100vw - 54px)); height: 100vh; transform: translateX(-102%); transition: transform .2s ease; }
  .feature-newAdminNavigation .app.nav-open .sidebar { transform: translateX(0); }
  .feature-newAdminNavigation .mobile-nav-button { display: inline-grid !important; }
  .role-home-actions { grid-template-columns: 1fr; }
  .wizard-stepper { display: flex; padding-inline: 12px; }
  .wizard-stepper button { flex: 0 0 145px; }
  .wizard-summary-grid, .question-builder-columns, .question-builder-columns.compact-fields, .wizard-template-bar, .question-import-grid, .wizard-preview-languages { grid-template-columns: 1fr; }
  .question-import-action { min-height: 0; }
  .question-builder-columns .span-2 { grid-column: auto; }
  .academic-account-fields { grid-template-columns: 1fr; }
  .academic-management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar .row-actions { width: 100%; }
  .topbar-select { width: 100%; }
  .toast-region { right: 14px; bottom: 14px; }
  .confirm-dialog-shell { grid-template-columns: 1fr; padding: 18px; }
  .confirm-dialog-actions { grid-column: 1; }
  .wizard-heading, .wizard-footer { align-items: stretch; flex-direction: column; }
  .wizard-body { padding: 20px 15px; }
  .wizard-heading { padding: 18px 15px; }
  .wizard-footer { padding: 12px 15px; }
  .question-builder-toolbar { align-items: stretch; flex-direction: column; }
  .question-builder-toolbar .row-actions, .question-builder-toolbar select { width: 100%; }
  .question-builder-card > header { grid-template-columns: 32px 28px minmax(0, 1fr); }
  .question-card-actions { grid-column: 3; }
  .candidate-work-layout { grid-template-columns: 1fr; }
  .candidate-question-navigator { position: static; max-height: none; }
  .question-palette { grid-template-columns: repeat(8, minmax(32px, 1fr)); }
  .candidate-preflight ul, .candidate-review-summary, .submission-receipt { grid-template-columns: 1fr; }
  .submission-receipt p { grid-column: 1; }
  .data-table-tools { justify-content: flex-start; width: max-content; margin: 0; }
  .saved-recipient-picker { grid-template-columns: 1fr; }
  .academic-message { width: 94%; }
  .academic-thread, .academic-reply-box { padding-inline: 14px; }
}

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

@media print {
  body.candidate-body * { visibility: hidden; }
  body.candidate-body #done, body.candidate-body #done * { visibility: visible; }
  body.candidate-body #done { position: absolute; inset: 0; display: grid !important; align-content: start; padding: 32px; background: #fff; }
  body.candidate-body [data-print-receipt] { display: none; }
}
