@layer foundation, asaf;

@layer foundation {
:root {
  color-scheme: light;
  --navy: #2d2018;
  --navy-soft: #442f22;
  --gold: #b7873d;
  --gold-strong: #7e2d24;
  --paper: #f3eee4;
  --surface: #fbf8f1;
  --white: #fffaf3;
  --ink: #1c1a17;
  --muted: #716a60;
  --line: #cfb37e;
  --line-soft: rgba(126, 45, 36, 0.18);
  --success: #385a42;
  --danger: #9b2e25;
  --warning: #7e2d24;
  --wine: #7e2d24;
  --wine-dark: #5d211b;
  --brass: #b7873d;
  --coffee: #2d2018;
  --coffee-2: #442f22;
  --ivory: #fffaf3;
  --panel-radius: 0;
  --control-radius: 0;
  --shadow: 0 18px 55px rgba(49, 33, 20, 0.12);
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC", "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti TC", "Noto Serif TC", serif;
  font-family: var(--font-ui);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(183, 135, 61, 0.07) 1px, transparent 1px) 50% 0 / min(96vw, 1180px) 100%,
    var(--paper);
}

.operator-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: radial-gradient(circle at 50% 15%, #fffdf8 0, #f7f1e7 48%, #eee3d3 100%);
}

.operator-login-card {
  width: min(100%, 460px);
  padding: 46px;
  border: 1px solid var(--gold, #c3a269);
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 24px 70px rgba(57, 39, 26, .14);
}

.operator-login-card > img { width: 170px; height: auto; margin-bottom: 28px; }
.operator-login-card h1 { margin: 8px 0 10px; font-size: clamp(34px, 6vw, 48px); }
.operator-login-card p { color: #6f665d; line-height: 1.7; }
.operator-login-card form { display: grid; gap: 12px; margin: 28px 0 18px; }
.operator-login-card label { font-weight: 700; }
.operator-login-card input { min-height: 54px; padding: 0 16px; border: 1px solid #aa9b89; background: #fff; font: inherit; }
.operator-login-card .button { min-height: 54px; margin-top: 4px; }
.operator-login-error { min-height: 24px; color: #8f2f25; }

@media (max-width: 520px) {
  .operator-login-card { padding: 32px 24px; }
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(156, 123, 66, 0.35);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 1440px);
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  align-items: start;
  gap: 10px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: min(100%, 196px);
  height: auto;
}

.brand-context {
  width: min(100%, 196px);
  padding-top: 8px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.progress-block {
  padding: 18px 20px 14px;
}

.progress-count {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.progress-count strong {
  color: var(--navy);
  font-size: 30px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.progress-count span,
.sidebar-label {
  color: var(--muted);
  font-size: 12px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.roster-search {
  padding: 0 14px 12px;
}

.roster-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.roster-search input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.roster {
  overflow: auto;
  padding: 0 10px 10px;
}

.student-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 9px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(217, 211, 200, 0.72);
}

.student-row:hover {
  background: rgba(156, 123, 66, 0.07);
}

.student-row[aria-current="true"] {
  background: var(--navy);
  color: var(--white);
  border-bottom-color: var(--navy);
  border-radius: var(--control-radius);
}

.student-number {
  color: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  opacity: 0.62;
}

.student-name {
  min-width: 0;
}

.student-name strong,
.student-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-name strong {
  font-size: 13px;
  font-weight: 610;
}

.student-name small {
  margin-top: 3px;
  color: inherit;
  font-size: 11px;
  opacity: 0.62;
}

.student-status {
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.mobile-roster-trigger,
.mobile-roster-close,
.roster-scrim {
  display: none;
}

.main {
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(20px, 3vw, 42px);
  color: var(--white);
  background: var(--navy);
}

.course-title {
  min-width: 0;
}

.course-title strong,
.course-title span {
  display: block;
}

.course-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 620;
}

.course-title span {
  margin-top: 4px;
  color: rgba(255, 254, 250, 0.66);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topnav a {
  padding: 10px 12px;
  color: rgba(255, 254, 250, 0.72);
  text-decoration: none;
  border-radius: var(--control-radius);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.class-switch select {
  min-height: 38px;
  padding: 0 30px 0 10px;
  color: var(--white);
  background: var(--navy-soft);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--control-radius);
  font-size: 12px;
}

.topnav > .button {
  min-height: 38px;
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
}

.judge-workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 38px);
}

.candidate-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.candidate-meta {
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candidate-head h1 {
  margin: 6px 0 4px;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.candidate-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.assessment-lifecycle {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.assessment-lifecycle strong {
  padding: 3px 7px;
  color: var(--navy);
  background: rgba(24, 40, 67, 0.08);
  border-radius: 999px;
  font-size: 11px;
}

.assessment-submitted strong {
  color: var(--success);
  background: rgba(54, 107, 78, 0.12);
}

.assessment-ready strong {
  color: var(--gold-strong);
  background: rgba(156, 123, 66, 0.12);
}

.assessment-draft strong {
  color: var(--warning);
  background: rgba(156, 123, 66, 0.08);
}

.total-display {
  min-width: 138px;
  text-align: right;
}

.total-display span,
.total-display small {
  display: block;
  color: var(--muted);
}

.timing-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 14px 0 18px;
  padding: 10px 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.timing-strip > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.timing-strip span,
.timing-strip p {
  color: var(--muted);
  font-size: 11px;
}

.timing-strip strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.timing-strip p {
  margin: 0;
}

.timing-strip.pass {
  border-color: rgba(54, 107, 78, 0.35);
  background: rgba(54, 107, 78, 0.08);
}

.total-display span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.total-display strong {
  color: var(--navy);
  font-size: 52px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.total-display small {
  margin-top: 4px;
  font-size: 11px;
}

.rubric {
  margin-top: 8px;
}

.criterion {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 88px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.criterion.is-active {
  background: rgba(156, 123, 66, 0.06);
  box-shadow: -14px 0 0 rgba(156, 123, 66, 0.06), 14px 0 0 rgba(156, 123, 66, 0.06);
}

.criterion.is-disabled {
  opacity: 0.58;
}

.criterion-copy {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  align-items: start;
  gap: 12px;
}

.criterion-code {
  color: var(--gold-strong);
  font-size: 20px;
  font-weight: 650;
}

.criterion-copy strong,
.criterion-copy small {
  display: block;
}

.criterion-copy strong {
  font-size: 15px;
  font-weight: 650;
}

.criterion-copy small {
  max-width: 56ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.criterion-weight {
  color: var(--muted);
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.score-options {
  display: grid;
  grid-template-columns: repeat(6, 46px);
  gap: 7px;
}

.score-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-size: 16px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  transition: transform 100ms ease, background-color 100ms ease, color 100ms ease;
}

.score-button:hover {
  border-color: var(--gold);
}

.score-button:active,
.button:active {
  transform: translateY(1px);
}

.score-button[aria-pressed="true"] {
  color: var(--white);
  background: var(--gold-strong);
  border-color: var(--gold-strong);
}

.criterion-feedback {
  min-height: 20px;
  margin: 6px 0 0 56px;
  color: var(--muted);
  font-size: 11px;
}

.notes {
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
}

.notes summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 11px 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.notes textarea {
  width: 100%;
  min-height: 84px;
  margin-bottom: 16px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  line-height: 1.5;
}

.attendance-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 13px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.attendance-control strong,
.attendance-control span {
  display: block;
}

.attendance-control strong {
  color: var(--navy);
  font-size: 12px;
}

.attendance-control span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.judge-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 20px calc(0px - clamp(20px, 3vw, 38px)) calc(0px - clamp(20px, 3vw, 38px));
  padding: 14px clamp(20px, 3vw, 38px);
  background: rgba(241, 238, 230, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.judge-footer .button:last-child {
  justify-self: end;
}

.save-state {
  color: var(--muted);
  font-size: 12px;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--navy);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--gold);
}

.button.primary {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.button.gold {
  color: var(--white);
  background: var(--gold-strong);
  border-color: var(--gold-strong);
}

.button.danger {
  color: var(--danger);
}

.button[aria-pressed="true"] {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.button:disabled,
.button.primary:disabled,
.button.gold:disabled {
  color: #5d5148;
  background: #e3d8c8;
  border-color: #b8a995;
  opacity: 1;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.review-page,
.report-page {
  width: min(1220px, calc(100% - 40px));
  margin: 30px auto 54px;
}

.review-header,
.report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 26px;
  padding: 28px 32px;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
}

.review-header h1,
.report-head h1 {
  margin: 5px 0 4px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.review-header p,
.report-head p {
  max-width: 68ch;
  margin: 0;
  color: rgba(255, 254, 250, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.document-kicker {
  color: #d5bd8f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.header-mark {
  width: clamp(142px, 15vw, 210px);
  align-self: center;
}

.header-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.review-body,
.report-body {
  padding: 26px 32px 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--panel-radius) var(--panel-radius);
  box-shadow: var(--shadow);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.metric {
  padding: 0 20px 18px;
  border-right: 1px solid var(--line);
}

.metric:first-child {
  padding-left: 0;
}

.metric:last-child {
  border-right: 0;
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
}

.metric strong {
  margin-top: 5px;
  color: var(--navy);
  font-size: 25px;
  font-weight: 630;
  font-variant-numeric: tabular-nums;
}

.review-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 20px;
}

.review-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.results-table th {
  padding: 11px 10px;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--navy);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.results-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.results-table tr:last-child td {
  border-bottom: 0;
}

.results-table .score-cell {
  color: var(--gold-strong);
  font-size: 15px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.provisional-score {
  color: var(--warning);
  font-size: 12px;
  font-weight: 650;
}

.result-pass {
  color: var(--success);
  font-weight: 650;
}

.result-fail {
  color: var(--danger);
  font-weight: 650;
}

.review-flags span {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 3px 6px;
  color: var(--warning);
  background: rgba(156, 123, 66, 0.1);
  border: 1px solid rgba(156, 123, 66, 0.25);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.review-empty {
  padding: 28px !important;
  color: var(--muted);
  text-align: center;
}

.link-button {
  color: var(--navy);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(24, 40, 67, 0.35);
  padding: 2px 0;
  font-size: 11px;
  font-weight: 650;
}

.link-button:disabled {
  color: var(--muted);
  border-bottom-color: transparent;
  cursor: not-allowed;
}

.document-status {
  margin-bottom: 18px;
  padding: 10px 12px;
  color: var(--warning);
  background: rgba(156, 123, 66, 0.1);
  border: 1px solid rgba(156, 123, 66, 0.3);
  border-radius: var(--control-radius);
  font-size: 12px;
}

.report-identifiers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 34px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.info-item span,
.info-item strong {
  display: block;
}

.info-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.info-item strong {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 620;
}

.report-rubric {
  border: 1px solid var(--line);
}

.report-rubric-head,
.report-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 82px 92px;
  align-items: center;
}

.report-rubric-head {
  min-height: 42px;
  color: var(--white);
  background: var(--navy-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-rubric-head > div,
.report-row > div {
  padding: 10px 12px;
}

.report-row {
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.report-row:last-child {
  border-bottom: 0;
}

.report-code {
  color: var(--gold-strong);
  font-size: 18px;
  font-weight: 660;
}

.report-criterion strong,
.report-criterion small {
  display: block;
}

.report-criterion strong {
  font-size: 13px;
}

.report-criterion small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.report-weight,
.report-score {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.report-score strong {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--navy);
  background: var(--paper);
  border-radius: var(--control-radius);
  font-size: 18px;
}

.report-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 28px;
  margin-top: 22px;
  padding: 22px;
  background: var(--paper);
  border-radius: var(--panel-radius);
}

.report-total p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.report-total-score span,
.report-total-score strong,
.report-result span,
.report-result strong {
  display: block;
}

.report-total-score span,
.report-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-total-score strong {
  color: var(--navy);
  font-size: 38px;
  font-weight: 620;
  line-height: 1;
}

.report-result strong {
  margin-top: 5px;
  color: var(--gold-strong);
  font-size: 17px;
}

.observation {
  min-height: 92px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.absence-record {
  margin: 22px 0;
  padding: 24px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
}

.absence-record span,
.absence-record strong {
  display: block;
}

.absence-record span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.absence-record strong {
  margin-top: 8px;
  color: var(--navy);
  font-size: 28px;
}

.absence-record p {
  margin: 10px auto 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.observation strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.observation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.document-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.page-actions {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 18px auto 0;
  padding: 8px;
  background: rgba(251, 250, 247, 0.95);
  border: 1px solid var(--line);
  border-radius: calc(var(--control-radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.empty-state {
  width: min(620px, calc(100% - 40px));
  margin: 14vh auto;
  padding: 36px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
}

.empty-state h1 {
  color: var(--navy);
}

.empty-state p {
  color: var(--muted);
  line-height: 1.55;
}

dialog {
  width: min(480px, calc(100% - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(24, 40, 67, 0.56);
  backdrop-filter: blur(4px);
}

#class-import-dialog {
  width: min(620px, calc(100% - 32px));
}

.class-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.class-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.class-fields input {
  min-width: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.class-fields .class-test-copy {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.class-fields .class-test-copy input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
}

.dialog-body {
  padding: 26px;
}

.dialog-body h2 {
  margin: 0 0 10px;
  color: var(--navy);
}

.dialog-body p {
  color: var(--muted);
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 26px 20px;
}

.file-drop {
  display: grid;
  gap: 5px;
  margin-top: 18px;
  padding: 18px;
  color: var(--navy);
  background: var(--paper);
  border: 1px dashed var(--gold);
  border-radius: var(--control-radius);
  cursor: pointer;
}

.file-drop strong {
  font-size: 14px;
}

.notes-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.notes-tools span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.notes-tools .button {
  flex: 0 0 auto;
}

.file-drop span {
  color: var(--muted);
  font-size: 11px;
}

.file-drop input {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.utm-status {
  margin-top: 14px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-size: 12px;
  line-height: 1.5;
}

.utm-status.success {
  color: var(--success);
  border-color: rgba(50, 106, 85, 0.35);
  background: rgba(50, 106, 85, 0.07);
}

.utm-status.error {
  color: var(--danger);
  border-color: rgba(154, 64, 59, 0.35);
  background: rgba(154, 64, 59, 0.07);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--control-radius);
  box-shadow: var(--shadow);
  font-size: 12px;
}

.review-flags span,
.evidence-item img {
  border-radius: 0;
}

.evidence-panel {
  margin-top: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
}

.evidence-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.evidence-heading h2 {
  margin: 4px 0;
  color: var(--navy);
  font-size: 18px;
}

.evidence-heading p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.evidence-file,
.file-button {
  position: relative;
  overflow: hidden;
}

.evidence-file input,
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.evidence-connection {
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-size: 11px;
}

.evidence-connection.warning {
  color: var(--warning);
  background: rgba(156, 123, 66, 0.08);
  border-color: rgba(156, 123, 66, 0.28);
}

.evidence-connection.success {
  color: var(--success);
  background: rgba(50, 106, 85, 0.07);
  border-color: rgba(50, 106, 85, 0.3);
}

.evidence-connection.error,
.error-text {
  color: var(--danger);
}

.evidence-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.evidence-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.evidence-item img {
  width: 72px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--paper);
}

.evidence-meta strong,
.evidence-meta span,
.evidence-meta code {
  display: block;
}

.evidence-meta strong {
  color: var(--navy);
  font-size: 12px;
}

.evidence-meta span,
.evidence-meta code,
.muted-text {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.evidence-meta code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-lock {
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

.evidence-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.danger-text {
  color: var(--danger);
}

.release-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 12px;
  color: var(--success);
  background: rgba(50, 106, 85, 0.07);
  border: 1px solid rgba(50, 106, 85, 0.28);
  border-radius: var(--control-radius);
  font-size: 11px;
}

.release-record code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .criterion {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .score-options {
    justify-content: end;
  }
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(86vw, 340px);
    height: 100dvh;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 180ms ease-out, visibility 0s linear 180ms;
  }

  .roster-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .roster-scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(28, 20, 15, 0.56);
    border: 0;
  }

  .roster-open .roster-scrim {
    display: block;
  }

  .mobile-roster-trigger {
    position: sticky;
    top: 0;
    z-index: 35;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    color: var(--ink);
    background: var(--surface);
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .mobile-roster-trigger strong {
    color: var(--wine);
    font-variant-numeric: tabular-nums;
  }

  .mobile-roster-trigger span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-roster-close {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 48px;
    min-height: 44px;
    display: block;
    color: var(--wine);
    background: var(--surface);
    border: 1px solid var(--line);
  }

  .roster-open {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .brand {
    padding: 12px 16px;
  }

  .brand-logo {
    width: 164px;
  }

  .progress-block {
    padding: 12px 16px 8px;
  }

  .roster-search {
    padding: 0 16px 12px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px 16px;
  }

  .topnav {
    overflow-x: auto;
  }

  .class-fields {
    grid-template-columns: 1fr;
  }

  .judge-workspace {
    padding: 20px 16px;
  }

  .candidate-head {
    grid-template-columns: 1fr;
  }

  .total-display {
    text-align: left;
  }

  .timing-strip {
    grid-template-columns: 1fr auto;
  }

  .timing-strip p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .criterion-copy {
    grid-template-columns: 38px minmax(0, 1fr) 42px;
  }

  .score-options {
    grid-template-columns: repeat(6, minmax(42px, 1fr));
  }

  .score-button {
    width: 100%;
  }

  .judge-footer {
    grid-template-columns: 1fr 1fr;
    margin: 20px -16px -20px;
    padding-inline: 16px;
  }

  .evidence-heading {
    grid-template-columns: 1fr;
  }

  .attendance-control {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-heading .button {
    width: 100%;
  }

  .evidence-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .evidence-item img {
    width: 62px;
    height: 54px;
  }

  .evidence-item > :last-child {
    grid-column: 2;
    justify-self: start;
  }

  .release-record {
    align-items: flex-start;
    flex-direction: column;
  }

  .save-state {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
  }

  .review-page,
  .report-page {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .review-header,
  .report-head {
    grid-template-columns: 1fr;
    padding: 22px 20px;
  }

  .header-mark {
    display: none;
  }

  .review-body,
  .report-body {
    padding: 20px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(n + 3) {
    padding-top: 15px;
  }

  .review-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .button-group {
    justify-content: stretch;
  }

  .button-group .button {
    flex: 1;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .results-table {
    min-width: 720px;
  }

  .report-identifiers {
    grid-template-columns: 1fr;
  }

  .report-rubric-head,
  .report-row {
    grid-template-columns: 48px minmax(0, 1fr) 56px 58px;
  }

  .report-rubric-head > div,
  .report-row > div {
    padding: 8px;
  }

  .report-total {
    grid-template-columns: 1fr 1fr;
  }

  .report-total p {
    grid-column: 1 / -1;
  }
}

.panel-setup,
.panel-rubric {
  display: grid;
  gap: 18px;
}

.panel-setup textarea,
.panel-selectors select,
.panel-score-head + .panel-rubric + label textarea {
  width: 100%;
  margin-top: 8px;
}

.panel-selectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.panel-selectors select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
}

.panel-device-identity,
.device-role {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 44px;
}

.panel-device-identity {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.panel-device-identity span,
.device-role span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.panel-device-identity strong,
.device-role strong {
  color: var(--ink);
  font-size: 16px;
}

.panel-device-identity small {
  color: var(--muted);
  font-size: 11px;
}

.panel-links-button {
  align-self: end;
  min-height: 44px;
}

.judge-device-nav {
  justify-content: flex-end;
}

.panel-score-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-rubric {
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 18px;
}

.panel-progress {
  margin-top: 28px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.task-card h2,
.task-card p {
  margin: 0;
}

.task-card h2 { font-size: 16px; }
.task-card p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.task-step { color: var(--gold); font: 700 17px Georgia, serif; }
.task-status { border-radius: 999px; padding: 5px 9px; background: #ede8df; font-size: 11px; font-weight: 700; }
.task-ready, .task-prepared, .task-sealed, .task-verified { background: #e3f2e8; color: #235f39; }
.task-blocked { background: #f7e5e2; color: #8c3028; }
.task-running, .task-in_progress { background: #fff0cc; color: #7a5511; }

.dashboard-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.config-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.config-card textarea { width: 100%; margin: 10px 0 14px; }

.attempt-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf8f1;
}

.attempt-control h3 { margin: 4px 0; }
.attempt-control p { margin: 0; color: var(--muted); }
.panel-evidence { margin: 18px 0; }
.panel-report-item { margin-top: 28px; break-inside: avoid; }
.panel-report-item h2 { margin: 5px 0 12px; font: 500 24px Georgia, serif; }

.panel-live-total {
  min-width: 190px;
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
}

.panel-live-total strong { color: var(--ink); font: 500 38px Georgia, serif; }
.panel-live-total strong small { color: var(--muted); font: 600 12px system-ui, sans-serif; }
.panel-live-total em { font-size: 12px; font-style: normal; }

.exam-display {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 5vw;
  color: #f8f2e7;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, #263b56 0, #111c2c 48%, #080d15 100%);
}

.exam-brand { color: #caa35b; font: 700 clamp(30px, 4vw, 64px) Georgia, serif; letter-spacing: .08em; }
.exam-brand span { display: block; margin-top: 5px; color: #d9d5ce; font: 400 11px system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.exam-course span { color: #caa35b; font-weight: 700; letter-spacing: .12em; }
.exam-course h1 { margin: 10px 0 4px; font: 500 clamp(24px, 3.4vw, 52px) Georgia, serif; }
.exam-course h2 { margin: 0; color: #d5d9df; font-size: clamp(18px, 2vw, 30px); font-weight: 400; }
.exam-clock { font: 300 clamp(82px, 17vw, 240px)/.9 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.exam-message { color: #caa35b; font: 700 clamp(22px, 3vw, 48px) Georgia, serif; }
.exam-instructions { max-width: 900px; margin: 0; color: #d5d9df; font-size: clamp(16px, 1.6vw, 24px); line-height: 1.6; white-space: pre-line; }
.exam-meta { color: #8994a3; font-size: 13px; }
.exam-actions { display: flex; gap: 10px; }
.exam-display.warning-5_min, .exam-display.warning-1_min { background: radial-gradient(circle at 50% 30%, #4c3523 0, #24170e 52%, #0d0906 100%); }
.exam-display.exam-ended { background: #260d0d; }
.exam-display.exam-ended .exam-message { color: #fff; }
}

@layer asaf {
/* stay.asaf-france.com alignment: same brand system, denser operational rhythm. */
h1,
.course-title strong,
.candidate-head h1,
.panel-live-total strong,
.metric strong,
.total-display strong {
  font-family: var(--font-display);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  color: var(--ink);
  background: rgba(255, 250, 243, 0.94);
  border-bottom: 1px solid rgba(169, 135, 82, 0.42);
  backdrop-filter: blur(18px) saturate(1.08);
}

.topbar::before,
.review-header::before,
.report-head::before,
.exam-display::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 84px;
  height: 5px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #1c4682 0 33.33%, #fff8ef 33.33% 66.66%, #b12c20 66.66% 100%);
}

.topbar ~ .review-page .review-header::before {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}

.course-title strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.course-title span {
  color: var(--muted);
}

.topnav {
  gap: 0;
  font-family: var(--font-ui);
}

.topnav-links,
.class-tools {
  display: flex;
  align-items: center;
}

.topnav a {
  min-height: 44px;
  padding: 0 18px;
  color: var(--muted);
  border-left: 1px solid rgba(169, 135, 82, 0.38);
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
}

.topnav a:first-child {
  border-left: 0;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--wine);
  background: rgba(126, 45, 36, 0.05);
}

.class-switch select {
  min-height: 44px;
  color: var(--ink);
  background: var(--paper-light, var(--surface));
  border: 1px solid var(--line);
  border-radius: 0;
}

.class-tools > .button {
  min-height: 44px;
  color: var(--wine);
  background: transparent;
  border-color: var(--wine);
}

.sidebar {
  background: rgba(255, 250, 243, 0.96);
  border-right-color: var(--line);
  box-shadow: 18px 0 55px rgba(49, 33, 20, 0.06);
}

.brand {
  min-height: 86px;
  border-bottom-color: var(--line);
}

.student-row {
  border-bottom-color: var(--line-soft);
}

.student-row:hover {
  background: rgba(126, 45, 36, 0.05);
}

.student-row[aria-current="true"] {
  color: var(--ivory);
  background: var(--wine);
  border-bottom-color: var(--wine);
  border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--brass);
}

.judge-workspace {
  padding-top: clamp(34px, 5vw, 64px);
}

.candidate-head h1,
.review-header h1,
.report-head h1 {
  font-weight: 500;
  letter-spacing: -0.025em;
}

.candidate-meta,
.document-kicker {
  color: var(--wine);
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.review-page,
.report-page {
  margin-top: 36px;
}

.review-header,
.report-head {
  position: relative;
  overflow: hidden;
  padding: 34px 38px;
  color: var(--ivory);
  background: var(--coffee);
  border-radius: 0;
}

.review-header .document-kicker,
.report-head .document-kicker {
  color: #d6b67f;
}

.review-header p,
.report-head p {
  color: rgba(255, 250, 243, 0.76);
}

.header-mark {
  width: clamp(142px, 15vw, 210px);
}

.review-body,
.report-body {
  background: rgba(255, 250, 243, 0.98);
  border-color: var(--line);
  border-radius: 0;
}

.metrics {
  border-top: 1px solid var(--line);
  border-bottom-color: var(--line);
}

.metric {
  padding-top: 18px;
  border-right-color: var(--line);
}

.metric strong {
  color: var(--coffee);
  font-size: 31px;
  font-weight: 500;
}

.button {
  min-height: 44px;
  border-radius: 0;
  font-weight: 700;
}

.button:hover {
  color: var(--wine-dark);
  border-color: var(--wine);
  background: rgba(126, 45, 36, 0.045);
}

.button.primary {
  color: var(--ivory);
  background: var(--coffee);
  border-color: var(--coffee);
}

.button.gold {
  color: var(--ivory);
  background: var(--wine);
  border-color: var(--wine);
}

.button.gold:hover,
.button.primary:hover {
  color: var(--ivory);
  background: var(--wine-dark);
  border-color: var(--wine-dark);
}

.button.danger {
  color: var(--danger);
  background: transparent;
  border-color: rgba(155, 46, 37, 0.42);
}

.button:disabled,
.button.primary:disabled,
.button.gold:disabled,
.score-button:disabled,
.evidence-file:has(input:disabled) {
  color: #6f665d;
  background: #e5ded3;
  border-color: #b9ad9d;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.62;
}

.score-button {
  color: var(--ink);
  background: var(--paper-light, var(--surface));
  border-color: rgba(126, 45, 36, 0.28);
  border-radius: 0;
}

.score-button:hover {
  color: var(--wine);
  border-color: var(--wine);
  background: rgba(126, 45, 36, 0.055);
}

.score-button[aria-pressed="true"] {
  color: var(--ivory);
  background: var(--wine);
  border-color: var(--wine);
  box-shadow: inset 0 -4px 0 var(--brass);
}

input,
textarea,
select,
.panel-selectors select,
.class-fields input,
.notes textarea {
  color: var(--ink);
  background: var(--paper-light, var(--surface));
  border-color: #8b8174;
  border-radius: 0;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--wine);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(126, 45, 36, 0.12);
}

.criterion {
  border-bottom-color: var(--line-soft);
}

.criterion.is-active {
  background: rgba(126, 45, 36, 0.055);
  box-shadow: inset 0 0 0 1px rgba(126, 45, 36, 0.28);
}

.criterion-code,
.task-step,
.report-code {
  color: var(--wine);
  font-family: var(--font-display);
}

.timing-strip,
.attendance-control,
.attempt-control,
.evidence-panel,
.file-drop,
.utm-status,
.evidence-connection,
.evidence-item,
.release-record,
.document-status,
dialog {
  border-radius: 0;
}

.attempt-control,
.evidence-panel,
.config-card {
  border-color: var(--line);
  border-top: 2px solid var(--wine);
  background: var(--paper-light, var(--surface));
}

.attempt-control {
  border-left: 1px solid var(--line);
}

.panel-live-total {
  padding-left: 0;
  border-left: 0;
}

.panel-live-total strong {
  color: var(--wine-dark);
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 700;
}

.panel-page {
  width: min(1280px, calc(100% - 32px));
}

.panel-header {
  padding: 22px 30px;
}

.panel-header h1 {
  margin-top: 3px;
  font-size: clamp(24px, 3vw, 34px);
}

.panel-header .header-mark {
  width: 132px;
}

.panel-page .review-body {
  padding-top: 20px;
}

.panel-page .panel-selectors {
  margin: 0 0 18px;
}

.panel-page .panel-score-head {
  position: sticky;
  top: 78px;
  z-index: 18;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 0;
  padding: 10px 0 16px;
  background: rgba(255, 250, 243, 0.98);
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.panel-page .panel-live-total {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-items: end;
  column-gap: 8px;
  row-gap: 2px;
  white-space: nowrap;
}

.panel-page .panel-live-total > span:first-child {
  font-size: 13px;
}

.panel-page .panel-live-total strong {
  grid-column: 2;
  grid-row: 1;
}

.panel-page .panel-live-total em {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 13px;
}

.panel-page .panel-live-total .panel-stage {
  grid-column: 1 / -1;
  grid-row: 3;
}

.panel-candidate-main {
  min-width: 0;
  flex: 1;
}

.panel-candidate-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.panel-candidate-line > div {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.panel-candidate-line .panel-step-button:first-child {
  grid-column: 2;
  grid-row: 1;
}

.panel-candidate-line .panel-step-button:last-child {
  grid-column: 3;
  grid-row: 1;
}

.panel-candidate-line h2,
.panel-candidate-line p {
  margin: 0;
}

.panel-candidate-line h2 {
  color: var(--coffee);
  font-family: var(--font-ui);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.panel-candidate-line p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.panel-step-button {
  min-width: 68px;
  min-height: 44px;
  padding-inline: 12px;
}

.panel-stage {
  color: var(--wine-dark);
  font-size: 13px;
  font-weight: 700;
}

.panel-gates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--line);
}

.panel-gates .attempt-control,
.panel-gates .evidence-panel {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 14px 0;
  border: 0;
  background: transparent;
}

.panel-gates .attempt-control {
  align-items: center;
  padding-right: 22px;
}

.panel-gates .evidence-panel {
  margin-left: 22px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.panel-gates h2,
.panel-gates p {
  margin: 0;
}

.panel-gates h2 {
  color: var(--coffee);
  font-size: 16px;
  font-weight: 700;
}

.panel-gates h2 span,
.panel-gates p {
  color: var(--muted);
  font-size: 14px;
}

.panel-gates p {
  margin-top: 3px;
}

.panel-gates .button {
  min-height: 44px;
  padding: 9px 13px;
}

.panel-evidence-summary .button {
  color: var(--wine-dark);
  background: transparent;
  border-color: var(--line-strong, var(--line));
}

.panel-gates .class-fields {
  margin-top: 0;
}

.panel-gates .utm-status {
  margin-top: 10px;
}

.panel-rubric .criterion {
  min-width: 0;
  min-height: 84px;
  padding: 11px 2px;
}

.panel-rubric .criterion-copy strong {
  font-size: 17px;
}

.panel-rubric .criterion-copy small {
  max-width: 50ch;
  font-size: 14px;
}

.panel-rubric .criterion-weight {
  font-size: 14px;
}

.panel-rubric .score-button {
  font-size: 18px;
}

.panel-note {
  margin-top: 8px;
}

.panel-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 18px -32px 0;
  padding: 12px 32px;
  background: rgba(255, 250, 243, 0.97);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 -12px 28px rgba(49, 33, 20, 0.07);
}

.panel-save-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

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

.panel-progress > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  color: var(--coffee);
  font-weight: 700;
  cursor: pointer;
}

.panel-progress[open] > summary {
  border-bottom: 1px solid var(--line);
}

.panel-progress .table-wrap {
  margin: 0;
}

.capture-page .metrics,
.capture-page > .review-body > .document-status,
.capture-page .panel-score-head,
.capture-page .panel-rubric,
.capture-page .panel-note,
.capture-page #panel-save-status,
.capture-page .panel-action-bar,
.capture-page .review-body > .button-group,
.capture-page .panel-progress,
.capture-page .panel-selectors label:first-child {
  display: none;
}

.capture-page .panel-selectors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.capture-page .panel-evidence {
  margin-top: 0;
}

.task-grid {
  gap: 0;
  border-top: 1px solid var(--line);
}

.task-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.task-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.task-card h2 {
  color: var(--coffee);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
}

.task-status {
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  border-radius: 0;
}

.config-card {
  padding: 24px 4px 28px;
  border: 0;
  border-top: 2px solid var(--wine);
  background: transparent;
}

.config-card h2 {
  margin-top: 0;
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
}

.panel-item-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.task-ready,
.task-prepared,
.task-sealed,
.task-verified {
  color: var(--success);
  background: transparent;
}

.task-blocked {
  color: var(--danger);
  background: transparent;
}

.task-running,
.task-in_progress {
  color: var(--wine);
  background: transparent;
}

.dashboard-config {
  gap: 22px;
}

[hidden] {
  display: none !important;
}

.workflow-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-tab {
  min-height: 62px;
  padding: 11px 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workflow-tab:last-child {
  border-right: 0;
}

.workflow-tab span,
.workflow-tab small {
  display: block;
}

.workflow-tab span {
  color: var(--coffee);
  font-size: 15px;
  font-weight: 750;
}

.workflow-tab small {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.workflow-tab[aria-selected="true"] {
  color: var(--wine-dark);
  background: rgba(126, 45, 36, 0.06);
  box-shadow: inset 0 -3px 0 var(--wine);
}

.workflow-tab:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(183, 135, 61, 0.45);
  outline-offset: -3px;
}

.dashboard-phase-content {
  margin-top: 26px;
}

.workflow-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
  gap: 36px;
  align-items: start;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.workflow-summary > div:first-child > span {
  color: var(--wine);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.workflow-summary h2 {
  margin: 6px 0 8px;
  color: var(--coffee);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
}

.workflow-summary p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.phase-task-list {
  border-top: 1px solid var(--line);
}

.phase-task-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.phase-task-list strong {
  color: var(--coffee);
  font-size: 13px;
}

.dashboard-phase-panel:not(.release-panel) {
  grid-template-columns: minmax(0, 900px);
}

.class-data-management {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.class-data-management > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  color: var(--coffee);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.class-data-management > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.class-data-management .button-group {
  padding-bottom: 18px;
}

.release-panel .config-card:last-child {
  grid-column: 1 / -1;
}

.onsite-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.onsite-links a {
  min-height: 44px;
  padding: 13px 18px 10px 0;
  color: var(--wine-dark);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.onsite-links a + a {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.config-card {
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 16px 36px rgba(49, 33, 20, 0.055);
}

.config-card h2,
.evidence-heading h2,
.dialog-body h2,
.empty-state h1 {
  color: var(--coffee);
  font-family: var(--font-display);
  font-weight: 600;
}

.results-table th {
  color: var(--ivory);
  background: var(--coffee);
  border-color: rgba(207, 179, 126, 0.35);
}

.results-table td {
  border-bottom-color: var(--line-soft);
}

.results-table tbody tr:nth-child(even) {
  background: rgba(183, 135, 61, 0.045);
}

.document-status {
  color: var(--wine-dark);
  background: rgba(183, 135, 61, 0.09);
  border-color: rgba(126, 45, 36, 0.22);
}

.toast {
  color: var(--ivory);
  background: var(--coffee);
  border: 1px solid var(--brass);
  border-radius: 0;
}

dialog::backdrop {
  background: rgba(28, 20, 15, 0.62);
}

.exam-display {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: stretch;
  gap: clamp(22px, 3vh, 42px);
  min-height: 100dvh;
  padding: clamp(30px, 4vw, 64px) clamp(28px, 5vw, 84px) clamp(24px, 3vw, 48px);
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 48% 44%, rgba(126, 45, 36, 0.2), transparent 38%),
    linear-gradient(145deg, #2d2018 0, #1d1511 52%, #100c0a 100%);
  text-align: left;
}

.exam-display::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -12%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 28% 34%, rgba(214, 182, 127, 0.16), transparent 34%),
    radial-gradient(ellipse at 72% 66%, rgba(126, 45, 36, 0.22), transparent 38%);
  opacity: 0.72;
  transform: translate3d(-2%, -1%, 0) scale(1.02);
  animation: exam-ambient-drift 22s ease-in-out infinite alternate;
}

.exam-display > * {
  position: relative;
  z-index: 1;
}

.exam-display::before {
  z-index: 2;
}

@keyframes exam-ambient-drift {
  to {
    opacity: 0.92;
    transform: translate3d(2%, 1%, 0) scale(1.08);
  }
}

.exam-masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: clamp(18px, 2.2vh, 30px);
  border-bottom: 1px solid rgba(214, 182, 127, 0.3);
}

.exam-brand img {
  display: block;
  width: clamp(168px, 15vw, 238px);
  height: auto;
}

.exam-session {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: rgba(255, 250, 243, 0.62);
  font-size: clamp(12px, 1vw, 15px);
  letter-spacing: 0.08em;
  text-align: right;
}

.exam-session span {
  color: #d6b67f;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.04em;
}

.exam-session strong {
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.11em;
}

.exam-stage {
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(15px, 2.2vh, 30px);
  text-align: center;
}

.exam-course span {
  display: block;
  color: rgba(255, 250, 243, 0.58);
  font-size: clamp(14px, 1.25vw, 20px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.exam-course h1 {
  margin: 7px 0 0;
  color: var(--ivory);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3.3vw, 58px);
  letter-spacing: 0.025em;
}

.exam-time {
  display: grid;
  justify-items: center;
  gap: clamp(5px, 1vh, 12px);
}

.exam-time > span {
  color: #d6b67f;
  font-family: var(--font-ui);
  font-size: clamp(12px, 1.1vw, 17px);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.exam-clock {
  color: var(--ivory);
  font-family: var(--font-ui);
  font-size: clamp(92px, 18vw, 266px);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.055em;
  text-shadow: 0 30px 80px rgba(18, 11, 7, 0.62);
}

.exam-message {
  color: #d6b67f;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.5vw, 42px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.exam-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: clamp(28px, 5vw, 80px);
  padding-top: clamp(18px, 2.2vh, 30px);
  border-top: 1px solid rgba(214, 182, 127, 0.3);
}

.exam-instructions {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 250, 243, 0.82);
  font-family: var(--font-ui);
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.5;
}

.exam-instructions span {
  display: block;
  margin-bottom: 5px;
  color: #d6b67f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.exam-footer-side {
  display: grid;
  justify-items: end;
  gap: 13px;
}

.exam-meta {
  display: flex;
  gap: 22px;
  color: rgba(255, 250, 243, 0.5);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.exam-actions {
  justify-content: flex-end;
}

.exam-actions .button {
  min-height: 44px;
  border-color: rgba(255, 250, 243, 0.26);
  color: var(--ivory);
  background: rgba(255, 250, 243, 0.04);
}

.exam-actions .button:hover {
  border-color: #d6b67f;
  background: rgba(214, 182, 127, 0.1);
}

.exam-actions .button.danger {
  border-color: rgba(196, 85, 72, 0.46);
  color: #e7a79e;
}

.exam-display.warning-5_min,
.exam-display.warning-1_min {
  background: radial-gradient(circle at 48% 44%, #6b3128 0, #2d2018 48%, #17100c 100%);
}

.exam-display.exam-ended {
  background: radial-gradient(circle at 48% 44%, #64241f 0, #351714 48%, #1c0e0c 100%);
}

.exam-display.exam-ended::after {
  animation: none;
  opacity: 0.35;
  transform: none;
}

.exam-display.exam-ended .exam-message {
  color: var(--ivory);
}

@media (max-width: 800px) {
  .exam-display {
    gap: 20px;
    padding: 28px 22px 22px;
  }

  .exam-brand img {
    width: 150px;
  }

  .exam-session span {
    display: none;
  }

  .exam-clock {
    font-size: clamp(70px, 19vw, 138px);
  }

  .exam-footer {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .exam-footer-side {
    justify-items: start;
  }

  .exam-meta {
    flex-wrap: wrap;
    gap: 5px 18px;
  }

  .exam-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 1280px) {
  .topbar {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding-block: 14px 12px;
  }

  .course-title strong {
    white-space: normal;
  }

  .topnav {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .topnav a {
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .review-page,
  .report-page {
    width: 100%;
    margin-top: 0;
  }

  .review-header,
  .report-head,
  .review-body,
  .report-body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .task-card:nth-child(odd) {
    border-right: 0;
  }

  .panel-page .panel-score-head {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  .panel-page .panel-live-total {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .panel-page .panel-live-total strong,
  .panel-page .panel-live-total em,
  .panel-page .panel-live-total .panel-stage {
    grid-column: auto;
    grid-row: 1;
  }

  .panel-page .panel-live-total .panel-stage {
    justify-self: end;
  }

  .panel-candidate-line {
    grid-template-columns: 1fr auto auto;
  }

  .panel-candidate-line > div {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .panel-step-button:first-child {
    grid-column: 2;
    grid-row: 2;
  }

  .panel-step-button:last-child {
    grid-column: 3;
    grid-row: 2;
  }

  .panel-gates,
  .panel-action-bar {
    grid-template-columns: 1fr;
  }

  .panel-gates .attempt-control {
    padding-right: 0;
  }

  .panel-gates .evidence-panel {
    margin-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .panel-action-bar {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .panel-action-bar .button-group {
    justify-content: stretch;
  }

  .workflow-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-tab:nth-child(2) {
    border-right: 0;
  }

  .workflow-tab:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .workflow-summary {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 760px) {
  .panel-selectors,
  .panel-rubric,
  .task-grid,
  .dashboard-config {
    grid-template-columns: 1fr;
  }
}

.panel-setup select,
.panel-selectors select,
.panel-evidence select {
  min-height: 44px;
  padding: 10px;
}

.link-button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 4px;
}

#pass-mark {
  min-height: 44px;
}

.pass-mark-input {
  width: 48px;
  border: 0;
  background: transparent;
  color: inherit;
}

.clipboard-fallback {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#exam-duration {
  min-height: 44px;
}

@media (max-width: 1280px) {
  .topnav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: visible;
  }

  .topnav-links {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .class-tools {
    flex: none;
  }
}

@media (max-width: 760px) {
  .topnav {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .class-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .class-switch select {
    width: 100%;
  }
}

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

.panel-scanner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 22px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.panel-scanner-copy {
  display: grid;
  gap: 3px;
}

.panel-scanner-copy span,
.panel-scanner-copy small {
  color: var(--muted);
  font-size: 13px;
}

.panel-scanner-copy strong {
  font-size: 20px;
}

.panel-scanner-actions,
.panel-manual-scan {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-manual-scan input {
  width: 180px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: var(--white);
}

.panel-scan-message {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-weight: 700;
}

.panel-scan-message.success { color: var(--success); }
.panel-scan-message.error { color: var(--danger); }

.panel-scanner-dialog {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 26, 23, 0.88);
}

.panel-scanner-camera {
  width: min(560px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
}

.panel-scanner-camera video {
  width: 100%;
  max-height: 62dvh;
  background: #111;
  object-fit: cover;
}

.panel-scanner-guide {
  color: var(--muted);
  text-align: center;
}

.panel-scan-waiting {
  min-height: 58dvh;
  display: grid;
  align-content: center;
  gap: 18px;
}

.locked-judge-page {
  margin-top: 0;
}

.locked-judge-page .panel-header {
  display: none;
}

.panel-waiting-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.panel-waiting-progress strong {
  color: var(--coffee);
  font-size: clamp(24px, 3vw, 34px);
}

@media (max-width: 1280px) {
  .judge-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .topnav.judge-device-nav {
    width: auto;
    display: flex;
    justify-content: flex-end;
    overflow: visible;
  }

  .panel-page .panel-score-head {
    top: 0;
  }
}

@media (max-width: 760px) {
  .judge-topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .topnav.judge-device-nav {
    justify-content: space-between;
  }

  .panel-scanner {
    grid-template-columns: 1fr;
  }

  .panel-scanner-actions,
  .panel-manual-scan {
    width: 100%;
  }

  .panel-scanner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-manual-scan input {
    width: 100%;
    min-width: 0;
  }

  .panel-waiting-progress {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 8mm;
  }

  body {
    background: white;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print,
  .page-actions,
  .topbar,
  .sidebar,
  .toast {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .review-page,
  .report-page {
    width: 100%;
    margin: 0;
  }

  .review-header,
  .report-head,
  .review-body,
  .report-body {
    box-shadow: none;
  }

  .review-header,
  .report-head {
    border-radius: 0;
  }

  .report-head {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px 22px;
  }

  .report-head h1 {
    font-size: 28px;
  }

  .report-head .header-mark {
    display: block;
    width: 130px;
  }

  .review-body,
  .report-body {
    border-radius: 0;
  }

  .report-body {
    padding: 16px 22px;
  }

  .report-identifiers {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .report-rubric-head {
    min-height: 34px;
  }

  .report-row {
    min-height: 52px;
  }

  .report-rubric-head > div,
  .report-row > div {
    padding: 6px 9px;
  }

  .report-score strong {
    width: 34px;
    height: 34px;
  }

  .report-total {
    margin-top: 14px;
    padding: 14px;
  }

  .observation {
    min-height: 68px;
    margin-top: 12px;
    padding: 12px 14px;
  }

  .document-footer {
    margin-top: 12px;
    padding-top: 8px;
  }

  .results-table {
    font-size: 9px;
  }

  .results-table th,
  .results-table td {
    padding: 6px;
  }

  .report-row,
  .report-total,
  .observation {
    break-inside: avoid;
  }
}
}
