:root {
  /* Design tokens: color */
  --ink: #152033;
  --muted: #5f6c80;
  --secondary: #5f6c80;
  --quiet: #7b8798;
  --line: #d7e1ec;
  --divider: #e7edf4;
  --surface: #ffffff;
  --soft: #f8fafc;
  --app-bg: #f5f7fa;
  --brand: #0b2f5b;
  --brand-blue: #0f5fbf;
  --accent: #2f80ed;
  --brand-2: #e5a100;
  --warning: #f97316;
  --normal: #2e9e5b;
  --low: #4f8ec9;
  --high: #df8a32;
  --risk: #d9534f;
  --success: #2e9e5b;
  --focus-ring: rgba(47, 128, 237, .18);
  --focus-outline: rgba(47, 128, 237, .32);
  --surface-raised: #ffffff;
  --surface-subtle: #fbfdff;
  --surface-muted: #f3f6fa;
  --surface-panel: linear-gradient(180deg, #ffffff, #f8fafc);
  --text-on-brand: #ffffff;
  --table-head: var(--brand);
  --table-head-text: #ffffff;
  --table-row-hover: #f7fafd;
  --table-row-accent: #edf4fb;
  --info-bg: #eef6ff;
  --info-border: #cfe4fb;
  --info-text: #17436f;
  --risk-bg: #fff7ed;
  --risk-border: #f4d7b2;
  --risk-text: #68401a;
  --color-text: var(--ink);
  --color-muted: var(--muted);
  --color-border: var(--line);
  --color-surface: var(--surface);
  --color-surface-muted: var(--surface-muted);
  --color-primary: var(--accent);
  --color-primary-dark: var(--brand);
  --color-danger: var(--risk);
  --color-warning: var(--warning);
  --color-success: var(--success);
  --color-accent-orange: var(--warning);

  /* Print/report tokens: keep isolated */
  --pdf-ink: #152033;
  --pdf-brand: #062b52;
  --pdf-accent: #2f80ed;
  --pdf-line: #c9d9ec;

  /* Design tokens: spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --container-max: 1600px;
  --container-gutter: 24px;
  --section-gap: 30px;
  --card-padding: 30px;
  --card-padding-compact: 22px;
  --form-gap-x: 16px;
  --form-gap-y: 14px;

  /* Design tokens: control sizing */
  --control-height-sm: 38px;
  --control-height-md: 46px;
  --control-height-lg: 52px;
  --form-control-height: var(--control-height-md);
  --form-control-radius: 10px;

  /* Design tokens: radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-card: 8px;
  --radius-control: var(--form-control-radius);
  --radius-pill: 999px;
  --radius-table: 8px;
  --radius-dialog: 12px;
  --radius-report-card: 12px;
  --radius-pdf-card: 10px;

  /* Design tokens: shadow */
  --shadow: 0 6px 18px rgba(15, 45, 80, .06);
  --shadow-lg: 0 14px 34px rgba(15, 45, 80, .1);

  /* Typography tokens */
  --font-ui: Pretendard, "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --text-label: 15px;
  --text-body: 16px;
  --text-table: 15px;
  --title-page: clamp(30px, 3.5vw, 42px);

  /* Component tokens */
  --control-height: var(--form-control-height);
  --control-border: #c6d4e3;
  --control-bg: #ffffff;
  --control-disabled-bg: #f1f5f9;
  --table-head-bg: var(--brand);
  --table-row-border: var(--divider);
  --button-height: var(--form-control-height);
  --button-height-sm: var(--control-height-sm);
  --button-height-md: var(--control-height-md);
  --button-height-lg: var(--control-height-lg);
  --button-border: #c6d4e3;
  --button-bg: #ffffff;
  --button-primary-bg: var(--accent);
  --button-primary-bg-hover: #176fd6;
  --button-primary-shadow: 0 8px 16px rgba(47, 128, 237, .16);
  --badge-radius: var(--radius-pill);

  /* Shared controlled layout editor grid */
  --layout-editor-grid-unit: 72px;
  --layout-editor-grid-gap: 20px;
  --layout-editor-max-span: 6;
  --layout-editor-span-1: var(--layout-editor-grid-unit);
  --layout-editor-span-2: calc(var(--layout-editor-grid-unit) + var(--layout-editor-grid-gap) + var(--layout-editor-grid-unit));
  --layout-editor-span-3: calc(var(--layout-editor-span-2) + var(--layout-editor-grid-gap) + var(--layout-editor-grid-unit));
  --layout-editor-span-4: calc(var(--layout-editor-span-3) + var(--layout-editor-grid-gap) + var(--layout-editor-grid-unit));
  --layout-editor-span-5: calc(var(--layout-editor-span-4) + var(--layout-editor-grid-gap) + var(--layout-editor-grid-unit));
  --layout-editor-span-6: calc(var(--layout-editor-span-5) + var(--layout-editor-grid-gap) + var(--layout-editor-grid-unit));
  --layout-editor-grid-step: calc(var(--layout-editor-grid-unit) + var(--layout-editor-grid-gap));
  --report-page-bg: #ffffff;
  --report-screen-bg: var(--app-bg);

  /* Design tokens: layering */
  --z-popover: 1000;
  --z-modal: 2000;
  --z-toast: 3000;
}

/* Open Design reference application: screen UI only, product logic and print output unchanged. */
@media screen {
  :root {
    --od-ink: #152033;
    --od-ink-soft: #2d425b;
    --od-muted: #68788d;
    --od-border: #d8e3ef;
    --od-border-strong: #bfd0e3;
    --od-surface: #ffffff;
    --od-surface-soft: #f7faff;
    --od-surface-tint: #eef5fd;
    --od-navy: #123a63;
    --od-blue: #276fc8;
    --od-blue-dark: #1f5ca7;
    --od-green: #1f8f56;
    --od-warn: #d97812;
    --od-danger: #c84747;
    --od-shadow-soft: 0 10px 26px rgba(18, 58, 99, .065);
    --od-shadow-lift: 0 18px 42px rgba(18, 58, 99, .115);
  }

  body {
    color: var(--od-ink);
    background:
      linear-gradient(180deg, #fbfdff 0, #f5f8fc 320px),
      repeating-linear-gradient(90deg, rgba(18,58,99,.018) 0 1px, transparent 1px 40px),
      #f5f8fc;
  }

  .login-shell {
    box-shadow: var(--od-shadow-lift);
  }

  .app-header {
    border: 1px solid rgba(255,255,255,.16);
    background:
      linear-gradient(135deg, rgba(255,255,255,.08) 0 34%, rgba(255,255,255,0) 34%),
      linear-gradient(135deg, #123a63 0%, #255f9f 62%, #2d73bc 100%);
  }

  .app-header .header-main {
    gap: 22px;
  }

  .app-header .kda-logo-header {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  }

  .header-actions button,
  .header-actions .file-label,
  .header-actions span {
    backdrop-filter: blur(8px);
  }

  .tabs {
    background: rgba(255,255,255,.95);
    box-shadow: 0 16px 34px rgba(18,58,99,.07);
  }

  .tab {
    border-radius: 10px;
    font-weight: 800;
  }

  .tab.active {
    color: #fff;
    text-shadow: none;
  }

  .section-head p,
  .helper-text,
  .muted,
  .empty-state span {
    color: var(--od-muted);
  }

  .panel,
  .result-filter-card,
  .stats-filter-card,
  .self-entry-card,
  .preparation-subpanel,
  .offline-questionnaire-panel,
  .stats-mvp-card,
  .stats-report-card,
  .stats-table-card,
  .table-wrap {
    border-color: var(--od-border);
    box-shadow: var(--od-shadow-soft);
  }

  .result-filter-card,
  .stats-filter-card,
  .admin-filter-card,
  .ops-detail-panel {
    background:
      linear-gradient(180deg, #fff 0%, var(--od-surface-soft) 100%);
  }

  label,
  .field-label,
  .admin-floating-field > span,
  .admin-floating-field > label {
    color: var(--od-navy);
  }

  input,
  select,
  textarea,
  .form-control,
  .form-select {
    color: var(--od-ink);
    border-color: var(--od-border-strong);
  }

  input::placeholder,
  textarea::placeholder {
    color: #8d9aae;
  }

  button,
  .file-label,
  .ghost,
  .icon-button {
    border-color: var(--od-border-strong);
  }

  .primary,
  button.primary {
    background: linear-gradient(180deg, #347fdc 0%, var(--od-blue) 100%);
  }

  .primary:hover,
  button.primary:hover {
    background: linear-gradient(180deg, #2b72c8 0%, var(--od-blue-dark) 100%);
  }

  .segmented {
    padding: 4px;
    background: #eff5fb;
  }

  .segmented button {
    border-radius: 8px;
  }

  .summary-grid,
  .stats-mvp-summary-grid,
  .ops-status-grid,
  .preparation-card-grid {
    align-items: stretch;
  }

  .summary-card,
  #statsView .summary-card,
  .stats-mvp-summary-card,
  .ops-status-card {
    border-color: var(--od-border);
    background:
      linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  }

  .summary-card strong,
  .stats-mvp-summary-card strong,
  .ops-status-card strong {
    color: var(--od-ink);
  }

  #resultsView .summary-card.is-clickable:hover,
  #resultsView .summary-card.is-clickable:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(18,58,99,.11);
  }

  .table-wrap,
  .results-table-wrap,
  .stats-table-wrap {
    overflow: hidden;
  }

  .table-wrap th,
  .results-table-wrap th,
  .stats-table-wrap th {
    color: #f8fbff;
    border-bottom-color: rgba(255,255,255,.18);
    background: linear-gradient(180deg, #163f68 0%, var(--od-navy) 100%);
  }

  .table-wrap tbody tr:hover td,
  .results-table-wrap tbody tr:hover td,
  .stats-table-wrap tbody tr:hover td {
    background: #f6faff;
  }

  .result-sort-trigger,
  .admin-sort-trigger {
    border-color: rgba(255,255,255,.52);
  }

  .badge,
  .status-badge,
  .ops-status-badge,
  .risk-badge,
  .result-badge {
    letter-spacing: 0;
  }

  .stats-bar-track,
  .stats-factor-bar-track,
  .stats-concentration-bar-track {
    background: #e8eef5;
  }

  .stats-bar-fill,
  .stats-factor-bar-track span,
  .stats-concentration-bar-fill {
    background: linear-gradient(90deg, #2a6fb7, #4f91d4);
  }

  .preparation-card {
    min-height: 78px;
    box-shadow: 0 8px 18px rgba(18,58,99,.045);
  }

  .preparation-card span {
    color: var(--od-muted);
  }

  #adminContent {
    --admin-section-gap: 18px;
  }

  #adminContent .panel,
  #adminContent .table-wrap {
    box-shadow: 0 8px 20px rgba(18,58,99,.055);
  }

  #adminContent .admin-section-title,
  #adminContent .panel h3 {
    color: var(--od-navy);
  }

  #adminContent .admin-grid,
  #adminContent .chart-grid,
  #adminContent .institution-form-grid,
  #adminContent .user-form-grid {
    gap: var(--admin-section-gap);
  }

  @media (max-width: 760px) {
    .app-header {
      padding: 22px;
    }

    .tabs {
      padding: 10px;
    }

    .panel,
    .user-workspace-frame,
    #resultsView .result-search-frame,
    #statsView .stats-analysis-frame {
      padding: 20px;
    }
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--app-bg);
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .6; }

body.auth-locked .app-header,
body.auth-locked .tabs,
body.auth-locked main {
  display: none;
}
.login-screen {
  display: none;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 14%, rgba(98, 182, 238, .18), transparent 26%),
    radial-gradient(circle at 86% 22%, rgba(155, 208, 246, .24), transparent 30%),
    linear-gradient(135deg, #eef7ff 0%, #f8fbff 48%, #eaf5ff 100%);
}
body.auth-locked .login-screen {
  display: grid;
}
.login-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: min(1420px, 100%);
  min-height: min(820px, calc(100vh - 36px));
  padding: clamp(34px, 4.8vw, 68px) clamp(34px, 5.8vw, 92px) 96px;
  overflow: hidden;
  background:
    radial-gradient(circle at 4% 66%, rgba(122, 196, 246, .18) 0 18px, transparent 19px),
    radial-gradient(circle at 12% 64%, rgba(67, 166, 234, .16) 0 9px, transparent 10px),
    radial-gradient(circle at 48% 100%, rgba(93, 181, 240, .18) 0 260px, transparent 262px),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,253,255,.94));
  border: 1px solid rgba(164, 201, 232, .62);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(42, 91, 130, .18);
}
.login-shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 124px;
  background:
    radial-gradient(80% 90% at 58% 100%, rgba(216, 237, 253, .88), transparent 70%),
    linear-gradient(180deg, rgba(232, 245, 255, .35), rgba(221, 240, 255, .8));
  pointer-events: none;
}
.login-brand,
.login-card,
.login-footer {
  position: relative;
  z-index: 1;
}
.login-brand {
  position: absolute;
  top: clamp(22px, 4vw, 54px);
  bottom: 72px;
  left: clamp(18px, 5vw, 72px);
  z-index: 0;
  width: min(60%, 780px);
  background: url("assets/login-brand.png") center center / contain no-repeat;
  pointer-events: none;
}
.login-brand::after {
  display: none;
}
.login-brand-image {
  display: none;
}
.kda-mark {
  position: relative;
  width: 188px;
  height: 168px;
  margin-top: 0;
  color: #4ebeee;
  font-weight: 900;
}
.kda-ring {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  font-size: 21px;
  line-height: 1.06;
  letter-spacing: 0;
  transform: rotate(-18deg);
}
.kda-core {
  position: absolute;
  top: 42px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #fff;
  background: linear-gradient(160deg, #33aee8, #7bd2f6);
  border-radius: 50%;
  font-size: 30px;
  transform: translateX(-50%);
  box-shadow: inset 0 -10px 22px rgba(7, 118, 177, .2);
}
.kda-korean {
  position: absolute;
  right: 14px;
  bottom: 20px;
  left: 14px;
  font-size: 19px;
  transform: rotate(-8deg);
}
.association {
  margin: 0;
  color: #0d2d5f;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 900;
}
.association-sub {
  margin: 6px 0 30px;
  color: #0d2d5f;
  font-size: 18px;
  font-weight: 700;
}
.login-brand h1 {
  margin: 0;
  color: #073f82;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 900;
  letter-spacing: 0;
}
.disk-name {
  margin: 10px 0 26px;
  color: #2faaf0;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 800;
}
.brand-rule {
  width: 66px;
  height: 3px;
  margin-bottom: 22px;
  background: #39b5ee;
}
.brand-copy {
  margin: 0;
  color: #627082;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 700;
  line-height: 1.62;
}
.login-illustration {
  position: absolute;
  right: clamp(8px, 8vw, 94px);
  bottom: 44px;
  left: clamp(0px, 3vw, 54px);
  z-index: 0;
  height: 190px;
  opacity: .9;
  pointer-events: none;
}
.book-stack {
  position: absolute;
  bottom: 12px;
  left: 4%;
  width: 124px;
  height: 74px;
  background:
    linear-gradient(#fff 0 18px, #4da4ee 19px 41px, #fff 42px 60px, #2d85dd 61px);
  border: 5px solid rgba(54, 139, 222, .72);
  border-radius: 12px 22px 16px 12px;
  transform: skewY(-4deg);
  box-shadow: 14px 18px 34px rgba(40, 114, 179, .14);
}
.open-book {
  position: absolute;
  bottom: 0;
  left: 26%;
  width: 230px;
  height: 108px;
  background:
    linear-gradient(82deg, #fff 0 48%, #d3ecff 49% 51%, #fff 52%),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(68, 142, 216, .22) 16px 18px);
  border: 6px solid #4fa6ef;
  border-radius: 12px 12px 28px 28px;
  transform: perspective(500px) rotateX(8deg);
  box-shadow: 0 20px 38px rgba(27, 119, 202, .18);
}
.clipboard-card {
  position: absolute;
  right: 20%;
  bottom: 24px;
  width: 116px;
  height: 132px;
  background: #f8fbff;
  border: 7px solid #4d92dc;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(49, 119, 191, .18);
}
.clipboard-card::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 32px;
  width: 50px;
  height: 28px;
  background: #a8c7ec;
  border-radius: 12px 12px 6px 6px;
}
.clipboard-card::after {
  content: "";
  position: absolute;
  top: 42px;
  left: 24px;
  width: 68px;
  height: 58px;
  border-top: 8px solid rgba(68, 142, 216, .25);
  border-bottom: 8px solid rgba(68, 142, 216, .25);
}
.shield-card {
  position: absolute;
  right: 8%;
  bottom: 4px;
  width: 70px;
  height: 82px;
  background: linear-gradient(160deg, #6fb5f6, #2d7ccf);
  clip-path: polygon(50% 0, 92% 14%, 84% 72%, 50% 100%, 16% 72%, 8% 14%);
  box-shadow: 0 18px 34px rgba(45, 124, 207, .22);
}
.shield-card::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 25px;
  width: 21px;
  height: 21px;
  background: #fff;
  border-radius: 50% 50% 55% 55%;
}
.brain-cloud {
  position: absolute;
  right: 3%;
  bottom: 106px;
  width: 68px;
  height: 50px;
  border: 3px solid rgba(83, 172, 239, .35);
  border-radius: 36px;
}
.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  padding: 42px 44px 38px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(211, 222, 235, .95);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(36, 68, 99, .18);
  backdrop-filter: blur(12px);
}
.login-lock {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  color: #fff;
  background:
    linear-gradient(#e5f3ff, #e5f3ff) padding-box,
    linear-gradient(160deg, #36a9ed, #67c3f6) border-box;
  border: 20px solid transparent;
  border-radius: 50%;
  font-size: 0;
}
.login-lock::before {
  content: "";
  width: 25px;
  height: 20px;
  border: 4px solid #37a9ef;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  box-shadow: 0 12px 0 4px #37a9ef;
}
.login-card h2 {
  margin: 0 0 30px;
  color: #071b47;
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .16em;
}
.login-field {
  position: relative;
  display: block;
  margin-bottom: 16px;
  color: #6d788d;
  font-weight: 700;
}
.login-field input {
  min-height: 58px;
  padding: 0 58px 0 64px;
  border: 1px solid #cfd8e5;
  border-radius: 9px;
  color: #142237;
  background: rgba(255,255,255,.78);
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.login-field input::placeholder {
  color: #8a94a8;
}
.field-icon {
  position: absolute;
  top: 50%;
  left: 22px;
  z-index: 1;
  width: 24px;
  height: 24px;
  color: #7e8ba0;
  transform: translateY(-50%);
}
.user-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 7px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.user-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 1px;
  left: 3px;
  height: 10px;
  border: 2px solid currentColor;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.lock-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 12px;
  height: 11px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.lock-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.password-eye {
  position: absolute;
  top: 50%;
  right: 14px;
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  color: #7d889d;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-50%);
}
.login-card .login-submit {
  width: 100%;
  min-height: 62px;
  margin-top: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #43b5f5, #1d99e6);
  box-shadow: 0 14px 28px rgba(26, 148, 224, .2);
  font-size: 24px;
  font-weight: 900;
}
.login-links {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 24px;
  margin: 24px 0 30px;
}
.login-links span {
  height: 20px;
  background: #d7dee9;
}
.login-links button,
.login-links a {
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #1684dc;
  background: transparent;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}
.login-note {
  margin: 0;
  color: #7b8496;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
}
.login-footer {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 18px;
  padding: 0 24px;
  color: #7d8a9c;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}
.login-footer span + span {
  padding-left: 18px;
  border-left: 1px solid #bac6d4;
}
.login-footer small {
  flex: 0 0 100%;
  font-weight: 600;
}

@media (max-width: 1120px) {
  .login-shell {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 22px;
    padding: 34px 26px 100px;
  }
  .login-brand {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    z-index: 1;
    width: min(680px, 100%);
    height: min(58vh, 560px);
    margin-bottom: -96px;
    background-size: contain;
  }
  .login-card {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .login-screen {
    padding: 0;
  }
  .login-shell {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
  }
  .login-brand {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    z-index: 0;
    margin-bottom: 0;
    opacity: .18;
    background-position: center top;
    background-size: min(760px, 140%) auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 86%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 86%);
  }
  .kda-mark {
    width: 176px;
    height: 150px;
  }
  .kda-ring,
  .kda-korean {
    font-size: 18px;
  }
  .kda-core {
    top: 36px;
    width: 72px;
    height: 72px;
    font-size: 27px;
  }
  .association {
    font-size: 22px;
  }
  .login-brand h1 {
    font-size: 30px;
  }
  .disk-name,
  .brand-copy {
    font-size: 15px;
  }
  .login-card {
    position: relative;
    z-index: 2;
    padding: 32px 22px;
  }
  .login-card h2 {
    font-size: 32px;
  }
  .login-footer {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 0 16px;
    font-size: 13px;
  }
  .login-footer small {
    width: 100%;
    text-align: center;
  }
}

/* DISK login page: official institutional first screen */
.login-screen {
  padding: 24px;
  background: #fff;
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(36px, 6vw, 84px);
  width: min(1280px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  padding: clamp(30px, 4vw, 52px) clamp(44px, 5vw, 72px) clamp(112px, 8.8vw, 136px);
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e3ef;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(15,45,80,.14);
}

.login-shell::before {
  display: none;
}

.login-shell::after {
  display: none;
}

.login-brand,
.login-card,
.login-footer {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: block;
  align-self: start;
  width: auto;
  min-width: 0;
  max-width: 620px;
  padding: 0;
  background: none;
  pointer-events: auto;
  transform: translateY(-18px);
}

.login-brand::after,
.login-brand-image,
.kda-mark,
.kda-ring,
.kda-core,
.kda-korean,
.association,
.association-sub,
.disk-name,
.brand-rule,
.brand-copy,
.login-illustration,
.book-stack,
.open-book,
.clipboard-card,
.shield-card,
.brain-cloud {
  display: none;
}

.login-brand-mark {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-bottom: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(15,95,191,.20);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-kda-logo {
  margin-bottom: 22px;
}

.login-kda-logo,
.login-kda-logo img {
  height: 108px;
}

.login-org {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
}

.login-org-en,
.login-product-en {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}

.login-brand h1 {
  margin: 24px 0 16px;
  color: var(--brand);
  font-size: clamp(42px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-product-en {
  font-size: 18px;
}

.login-support {
  position: relative;
  margin: 26px 0 0;
  padding-top: 22px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
}

.login-support::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 3px;
  background: var(--accent);
  border-radius: 99px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  padding: 44px 42px 40px;
  background: rgba(255,255,255,.96);
  border: 1px solid #d9e3ef;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15,45,80,.14);
  backdrop-filter: blur(10px);
}

.login-lock {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: #eaf4ff;
  border: 0;
  border-radius: 22px;
  font-size: 0;
}

.login-lock::before {
  content: "";
  width: 24px;
  height: 18px;
  border: 4px solid var(--accent);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 13px 0 5px var(--accent);
}

.login-card h2 {
  margin: 0 0 30px;
  color: var(--brand);
  font-size: 36px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .12em;
}

.login-field {
  position: relative;
  display: block;
  margin-bottom: 14px;
}

.login-field input {
  min-height: 52px;
  padding: 0 54px 0 56px;
  border: 1px solid #c9d6e5;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  box-shadow: none;
}

.field-icon {
  left: 18px;
  color: #7b8798;
}

.password-eye {
  right: 10px;
  color: var(--muted);
}

.login-card .login-submit {
  min-height: 54px;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(47,128,237,.22);
  font-size: 20px;
}

.login-links {
  gap: 18px;
  margin: 24px 0 30px;
}

.login-links button,
.login-links a {
  color: var(--brand-blue);
  font-size: 15px;
}

.login-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.login-footer {
  position: absolute;
  right: 32px;
  bottom: 34px;
  left: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  color: #7b8798;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.login-footer small {
  flex: 0 0 100%;
  font-weight: 500;
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 36px 26px 100px;
  }

  .login-brand {
    max-width: 560px;
    text-align: center;
  }

  .login-brand-mark {
    margin-right: auto;
    margin-left: auto;
  }

  .login-kda-logo {
    margin-right: auto;
    margin-left: auto;
  }

  .login-support::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .login-card {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .login-screen {
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-brand h1 {
    font-size: 34px;
  }

  .login-org {
    font-size: 20px;
  }

  .login-kda-logo,
  .login-kda-logo img {
    height: 60px;
  }

  .login-product-en,
  .login-org-en {
    font-size: 14px;
  }

  .login-card {
    padding: 32px 22px;
  }

  .login-card h2 {
    font-size: 30px;
  }
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 38px;
  color: #fff;
  background: linear-gradient(135deg, #102532 0%, #0f5d73 100%);
}
.app-header h1 { margin: 0; font-size: 34px; letter-spacing: 0; }
.eyebrow { margin: 0 0 6px; color: #a8d6e8; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions span { padding: 10px 14px; background: rgba(255,255,255,.15); }
.header-settings-button {
  display: inline-grid;
  place-items: center;
}
.header-settings-icon {
  font-size: 24px;
  line-height: 1;
}
.field-preference-section-focus {
  animation: fieldPreferenceFocusPulse 1.1s ease;
}
@keyframes fieldPreferenceFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 128, 237, .28); }
  45% { box-shadow: 0 0 0 5px rgba(47, 128, 237, .14); }
  100% { box-shadow: 0 0 0 0 rgba(47, 128, 237, 0); }
}
.charge-request-pending-badge {
  border-color: rgba(255,255,255,.38);
  background: rgba(255, 247, 223, .22);
  color: #fff;
  font-weight: 900;
}
.charge-request-pending-badge.has-pending {
  box-shadow: 0 0 0 2px rgba(244, 213, 141, .25);
}
.app-message-badge {
  border-color: rgba(255,255,255,.38);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
}
.app-message-badge.has-unread {
  border-color: rgba(186, 230, 253, .72);
  background: rgba(14, 165, 233, .28);
  box-shadow: 0 0 0 2px rgba(186, 230, 253, .24);
}
.tabs {
  display: flex;
  gap: 2px;
  padding: 0 38px;
  background: #dfe7f0;
}
.tab {
  min-width: 140px;
  padding: 18px 22px;
  border: 0;
  background: transparent;
  color: #526072;
  font-weight: 800;
}
.tab.active { color: #fff; background: var(--brand); }
main { padding: 34px 38px 60px; }
.view { display: none; }
.view.active { display: block; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0 0 6px; font-size: 32px; }
.section-head p { margin: 0; color: var(--muted); }
.panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.panel.compact { padding: 16px; }
.segmented {
  display: inline-flex;
  border: 1px solid var(--brand);
  background: #fff;
}
.segmented button {
  min-width: 120px;
  padding: 12px 18px;
  border: 0;
  color: var(--brand);
  background: #fff;
  font-weight: 800;
}
.segmented button.active { color: #fff; background: var(--brand); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px 16px;
}
.form-row {
  display: grid;
  gap: var(--form-gap-y) var(--form-gap-x);
}
label, .inline-field { display: grid; gap: 7px; color: #354052; font-weight: 800; }
input,
select,
.form-control,
.form-select {
  width: 100%;
  min-height: var(--form-control-height);
  padding: 0 14px;
  border: 1px solid #cbd2dc;
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
  letter-spacing: 0;
  word-spacing: 0;
  text-transform: none;
}
.form-control,
.form-select {
  min-width: 0;
  font-family: var(--font-ui);
  border-color: var(--control-border);
  color: var(--color-text);
}
textarea {
  letter-spacing: 0;
  word-spacing: 0;
}
input[readonly] { background: #edf2f7; color: #445066; }
.date-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.email-split-field {
  min-width: 0;
}
.field-label {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}
.combobox-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}
.combobox-wrap > .form-control {
  width: 100%;
  padding-right: 40px;
}
.combobox-trigger {
  position: absolute;
  top: 0;
  right: 6px;
  bottom: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: auto;
  min-width: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transform: none;
  transition: color .12s ease;
}
.combobox-trigger:hover,
.combobox-trigger:hover:not(:disabled),
.combobox-trigger:focus-visible,
.combobox-trigger:active {
  color: var(--color-text);
  transform: none;
}
.combobox-trigger:focus-visible {
  outline: none;
}
.combobox-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: var(--z-popover);
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}
.combobox-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.combobox-option:hover,
.combobox-option.is-active {
  background: var(--color-surface-muted);
}
.combobox-empty {
  padding: 10px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}
.inline-field {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}
.inline-field legend { margin-right: 8px; font-weight: 800; }
.inline-field label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.inline-field input { width: auto; min-height: 0; }
.hidden,
.field-preference-hidden { display: none !important; }

.print-only {
  display: none !important;
}

body.printing-stats-report #statsPdfReportArea {
  display: block !important;
}

.kda-logo {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  max-width: 100%;
}

.kda-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.kda-logo-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--brand);
  background: #fff;
  border: 1px solid rgba(15, 95, 191, .18);
  border-radius: 12px;
  font-weight: 900;
}

.kda-logo img[hidden] + .kda-logo-fallback {
  display: grid;
}

.kda-logo-small,
.kda-logo-small img {
  height: 36px;
}

.kda-logo-medium,
.kda-logo-medium img {
  height: 72px;
}

.kda-logo-header,
.kda-logo-header img {
  height: 42px;
}

.kda-logo-result,
.kda-logo-result img {
  height: 96px;
}

.login-brand .login-kda-logo,
.login-brand .login-kda-logo img {
  height: 162px;
}

.question-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 12px;
  padding-top: 16px;
  border-top: 2px solid #e7edf4;
}
.question-tools span { color: var(--muted); margin-left: 10px; }
#omrInput { max-width: 360px; }
.question-table { width: 100%; border-collapse: collapse; }
.question-table { table-layout: fixed; }
.question-table th {
  padding: 13px 10px;
  background: #303843;
  color: #fff;
}
.question-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e9ef;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}
.question-table .no { width: 58px; text-align: center; background: #e6edf6; font-weight: 800; }
.question-table .question-text {
  min-width: 0;
  max-width: 100%;
  line-height: 1.65;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.question-table .scale { width: 48px; text-align: center; white-space: nowrap; }
.question-table th:first-child { width: 58px; }
.question-table th:nth-child(n+3) { width: 48px; }
.question-table input { width: 20px; min-height: 20px; accent-color: var(--brand); }
.question-table tr:focus-within { outline: 2px solid #8abbd1; outline-offset: -2px; }
.reverse-mark { color: var(--brand-2); font-size: 12px; font-weight: 800; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

button, .file-label {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #bdc6d2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.ghost { color: var(--brand); background: rgba(255,255,255,.9); }
.file-label input { display: none; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.summary-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.summary-card strong { display: block; font-size: 24px; margin-bottom: 4px; }
.summary-card span { color: var(--muted); }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e4e8ee; text-align: left; vertical-align: middle; }
th { background: #303843; color: #fff; }
.table-wrap th, .table-wrap td { white-space: nowrap; }
td.actions { display: flex; gap: 6px; }
.badge { display: inline-block; padding: 5px 9px; color: #fff; font-weight: 800; }
.state01 { background: var(--normal); }
.state02 { background: var(--low); }
.state03 { background: var(--high); }
.state04 { background: var(--risk); }

.chart-grid, .admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}
.span-2 { grid-column: span 2; }
.ops-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ops-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.ops-status-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

@media screen and (min-width: 1280px) {
  #opsStatusPanel .ops-status-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
  }

  #opsStatusPanel .ops-status-card {
    min-height: 96px;
    padding: 10px;
  }
}

.ops-status-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-status-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.ops-status-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.ops-status-card span:not(.ops-status-badge) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ops-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ops-status-badge--ok {
  color: #0b6b3a;
  background: #e9f8ef;
}

.ops-status-badge--warning {
  color: #8a5a00;
  background: #fff4d8;
}

.ops-status-badge--danger {
  color: #9c2b16;
  background: #ffe5dc;
}

.ops-status-badge--failed {
  color: #9b1c2d;
  background: #ffe4e9;
}

.ops-status-badge--unknown {
  color: #4f6174;
  background: #edf3f8;
}

.ops-status-detail {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

.ops-status-detail dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 14px;
  margin: 0;
}

.ops-status-detail div {
  min-width: 0;
}

.ops-status-detail dt {
  margin-bottom: 2px;
  color: var(--quiet);
  font-weight: 800;
}

.ops-status-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.ops-object-key {
  display: inline-block;
  max-width: min(100%, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.ops-object-copy-btn {
  min-height: 24px;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
}

.ops-status-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ops-status-external {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.ops-status-external > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-status-external p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.ops-status-restore-rehearsal {
  background: #fcfbf8;
}

.ops-status-bulk span,
.ops-status-bulk strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
}
.chart-box { min-height: 300px; display: grid; place-items: center; }
.chart-box svg { width: 100%; height: auto; max-height: 360px; }
.mini-form { display: grid; gap: 10px; }
.mini-form .criteria-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.plan-form { display: grid; gap: 10px; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.disabled-plan-row {
  opacity: .72;
}
.disabled-plan-row input {
  background: #f1f5f9;
  color: var(--muted);
  cursor: not-allowed;
}
.row-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.institution-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
}
.institution-form .institution-email-field {
  grid-column: span 2;
}
.admin-required-field {
  position: relative;
  display: block;
  min-width: 0;
  height: var(--control-height);
}
.admin-required-field input,
.admin-required-field select {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.admin-required-label {
  position: absolute;
  top: -6px;
  left: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  max-width: calc(100% - 24px);
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.admin-required-field.is-optional .admin-required-label {
  display: none;
}
#adminContent label:has(> .field-label),
#adminContent .email-field:has(> .field-label) {
  position: relative;
  display: block;
  min-width: 0;
}
#adminContent label:has(> .field-label) > .field-label,
#adminContent .email-field:has(> .field-label) > .field-label {
  position: absolute;
  top: -6px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  max-width: calc(100% - 24px);
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
#adminContent label:has(> .field-label) > input,
#adminContent label:has(> .field-label) > select,
#adminContent label:has(> .field-label) > textarea,
#adminContent label:has(> .field-label) > .form-control,
#adminContent label:has(> .field-label) > .form-select {
  width: 100%;
}
#adminContent .email-field:has(> .field-label) .email-input-group {
  min-height: var(--control-height);
}
.school-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(120px, 1fr) minmax(140px, 1fr) minmax(100px, .85fr) minmax(90px, .7fr) max-content;
  gap: 8px;
  align-items: start;
}
.user-form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
#adminContent h3 + .user-form {
  margin-top: 12px;
}
.campaign-form,
.target-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.campaign-form label,
.target-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.campaign-form .span-input,
.target-form .span-input {
  grid-column: span 4;
}
.campaign-management-layout {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.25fr);
  gap: 16px;
  align-items: start;
}
.campaign-list-pane,
.target-list-pane {
  min-width: 0;
}
.target-table-wrap table {
  min-width: 1280px;
}
.target-link-actions {
  min-width: 310px;
  flex-wrap: wrap;
  align-items: center;
}
.target-link-actions .table-action {
  margin: 2px;
  white-space: nowrap;
}
.target-link-helper {
  margin: 10px 0;
  color: #526070;
  font-size: 12px;
  line-height: 1.5;
}
.target-readiness,
.campaign-readiness-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.target-readiness.hidden,
.campaign-readiness-panel.hidden {
  display: none;
}
.target-readiness-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .18);
}
.target-readiness--danger,
.campaign-readiness-panel--danger {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}
.target-readiness--danger .target-readiness-dot {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .18);
}
.target-readiness--warning,
.campaign-readiness-panel--warning {
  border-color: #fde68a;
  color: #854d0e;
  background: #fffbeb;
}
.target-readiness--warning .target-readiness-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .2);
}
.target-readiness--success,
.campaign-readiness-panel--success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}
.target-readiness--success .target-readiness-dot {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
}
.group-target-lookup {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.group-target-lookup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.group-target-lookup-status {
  color: #64748b;
  white-space: nowrap;
}
.group-target-lookup-status.is-linked {
  color: #166534;
}
.group-target-lookup-status.is-warning {
  color: #b91c1c;
}
.group-target-lookup-dialog {
  max-width: min(920px, calc(100vw - 32px));
}
.group-target-lookup-dialog-body {
  max-height: min(65vh, 620px);
  overflow: auto;
}
.campaign-readiness-panel {
  display: grid;
  align-items: start;
  gap: 8px;
  margin: 0 0 12px;
}
.campaign-readiness-panel p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}
.campaign-readiness-status,
.campaign-readiness-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.campaign-retention-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #fbfdff;
}
.campaign-retention-form,
.campaign-retention-decision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.campaign-retention-form label,
.campaign-retention-decision label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.retention-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.retention-summary-card,
.campaign-retention-recent,
.campaign-retention-review {
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.retention-summary-card {
  display: grid;
  gap: 3px;
  min-height: 50px;
}
.retention-summary-card strong {
  color: #0f172a;
  font-size: 16px;
}
.campaign-retention-review {
  border-color: #facc15;
  color: #854d0e;
  background: #fffbeb;
}
.campaign-retention-review h5,
.campaign-retention-recent h5 {
  margin: 0 0 6px;
  color: inherit;
  font-size: 13px;
}
.campaign-retention-review dl,
.campaign-retention-recent dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
  margin: 0;
}
.campaign-retention-review div,
.campaign-retention-recent div {
  min-width: 0;
}
.campaign-retention-review dt,
.campaign-retention-recent dt {
  color: #64748b;
  font-size: 11px;
}
.campaign-retention-review dd,
.campaign-retention-recent dd {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
}
.campaign-retention-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.target-import-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #f8fafc;
}
.target-import-panel.is-disabled {
  color: #64748b;
  background: #f9fafb;
}
.target-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.target-import-head h5 {
  margin: 0 0 4px;
  color: #1f2937;
  font-size: 14px;
}
.target-import-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.target-import-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #fff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.target-import-file-button:has(input:disabled) {
  border-color: #cbd5e1;
  color: #94a3b8;
  background: #e5e7eb;
  cursor: not-allowed;
}
.target-import-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: inherit;
}
.target-import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.target-import-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.target-import-result,
.target-import-history {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.target-import-result strong,
.target-import-history strong {
  color: #0f172a;
}
.target-import-result-grid,
.target-import-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.target-import-result-grid span,
.target-import-history-grid span {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}
.target-import-history-list {
  display: grid;
  gap: 6px;
}
.target-import-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  background: #fbfdff;
}
.target-import-preview {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.target-import-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}
.target-import-table-wrap table {
  min-width: 1240px;
  table-layout: auto;
}
.target-import-table-wrap th:nth-child(1),
.target-import-table-wrap td:nth-child(1),
.target-import-table-wrap th:nth-child(2),
.target-import-table-wrap td:nth-child(2),
.target-import-table-wrap th:nth-child(3),
.target-import-table-wrap td:nth-child(3) {
  position: sticky;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 #e4e8ee;
}
.target-import-table-wrap th:nth-child(1),
.target-import-table-wrap th:nth-child(2),
.target-import-table-wrap th:nth-child(3) {
  z-index: 3;
  background: #123862;
  color: #fff;
}
.target-import-table-wrap th:nth-child(1),
.target-import-table-wrap td:nth-child(1) {
  left: 0;
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}
.target-import-table-wrap th:nth-child(2),
.target-import-table-wrap td:nth-child(2) {
  left: 76px;
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}
.target-import-table-wrap th:nth-child(3),
.target-import-table-wrap td:nth-child(3) {
  left: 202px;
  width: 320px;
  min-width: 320px;
  max-width: 320px;
}
.target-import-table-wrap td:nth-child(3) {
  white-space: normal;
  line-height: 1.45;
}
.target-import-table-wrap .target-status-chip {
  white-space: nowrap;
}
.target-import-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.target-import-warning-confirm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.target-import-warning-confirm input {
  width: 16px;
  height: 16px;
}
.target-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #d6dbe3;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.target-status-chip--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.target-status-chip--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.target-status-chip--muted {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #64748b;
}
.target-status-chip--danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}
.target-status-chip--warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.target-record-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.target-record-meta {
  max-width: 190px;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.target-record-meta:empty {
  display: none;
}
.target-action-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.campaign-list-pane tr.is-selected td {
  background: #eff6ff;
}
#screeningCampaignAdminPanel .badge {
  color: #075985;
  border: 1px solid #bae6fd;
  background: #e0f2fe;
}
#screeningTargetWarning {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid #f4c7a1;
  border-radius: 10px;
  color: #8a3b12;
  background: #fff7ed;
  font-size: 13px;
  font-weight: 800;
}
.history-section-head.compact {
  margin-top: 0;
}
.user-form input,
.user-form select,
.user-form button,
.user-form .admin-required-field {
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  box-sizing: border-box;
}
.user-form input[type="hidden"] {
  display: none;
}
.span-input { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.contact-public-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.contact-public-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 52px auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 30px;
}
.contact-public-switch-label {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  cursor: pointer;
}
.setting-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  flex: 0 0 auto;
  cursor: pointer;
}
.setting-switch input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.setting-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  border: 1px solid #b8c7d8;
  border-radius: 999px;
  background: #e5edf5;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.setting-switch-thumb {
  position: absolute;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
  transition: transform .16s ease;
}
.setting-switch input:checked + .setting-switch-track {
  border-color: #2563eb;
  background: #2563eb;
}
.setting-switch input:checked + .setting-switch-track .setting-switch-thumb {
  transform: translateX(20px);
}
.setting-switch input:focus-visible + .setting-switch-track {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}
.contact-public-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.contact-public-info-button {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #cbdceb;
  border-radius: 999px;
  color: var(--brand);
  background: #f8fbff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.contact-public-info-button:hover,
.contact-public-info-button:focus-visible {
  border-color: #9cc3e7;
  background: #eef6ff;
}
.contact-public-tooltip {
  display: none;
}
.bounded-tooltip-portal {
  position: fixed;
  z-index: 10000;
  box-sizing: border-box;
  width: max-content;
  padding: 12px 14px;
  border: 1px solid #7da9d5;
  border-radius: 10px;
  color: #0f253f;
  background: #f8fbff;
  box-shadow: 0 12px 30px rgba(15, 47, 91, .2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.bounded-tooltip-portal.is-open {
  opacity: 1;
  transform: translateY(0);
}
.contact-public-helper {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.admin-section-visibility-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.admin-section-visibility-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.admin-section-visibility-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}
.admin-section-visibility-option.is-locked {
  color: var(--muted);
  background: #f3f7fb;
}
.admin-section-visibility-lock {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--brand);
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 900;
}
.email-field,
.address-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #354052;
  font-weight: 800;
}
.email-input-group,
.email-split-field {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(130px, 1fr);
  gap: 8px;
  align-items: center;
}
.email-input-group span,
.email-split-field span {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}
.email-input-group input[name="emailCustomDomain"],
.email-input-group input[name="examineeEmailCustomDomain"] {
  grid-column: 1 / -1;
}

.institution-email-field .email-input-group input[name="emailCustomDomain"] {
  grid-column: auto;
}

.institution-email-field .email-split-field {
  grid-template-columns: minmax(92px, 1fr) auto minmax(116px, .9fr) minmax(116px, .9fr);
}
.email-field.is-custom-domain .email-split-field {
  grid-template-columns: minmax(120px, 1fr) auto minmax(130px, 1fr);
}
.email-field.is-custom-domain .email-split-field select[name="emailDomain"] {
  display: none;
}
.address-input-grid {
  display: grid;
  grid-template-columns: minmax(110px, .6fr) auto minmax(180px, 1.4fr) minmax(180px, 1fr);
  gap: 8px;
}
.address-search-button {
  white-space: nowrap;
}
.admin-form-actions,
.user-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.admin-form-actions button,
.user-form-actions button {
  flex: 0 0 auto;
  min-width: 86px;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}
.institution-form-actions {
  grid-column: 5 / -1;
  align-self: start;
  min-height: var(--control-height);
}
.school-form-actions {
  grid-column: auto;
  align-self: start;
  justify-content: flex-start;
  min-height: var(--control-height);
}
.user-form-actions.admin-form-actions {
  grid-column: 5 / -1;
}
.institution-readonly-summary {
  display: grid;
  gap: 4px;
  min-height: var(--control-height);
  padding: 9px 12px;
  border: 1px solid #cfe1f5;
  border-radius: var(--radius-control);
  background: #f4f8fd;
  color: var(--muted);
  box-sizing: border-box;
}
.institution-readonly-summary strong {
  color: var(--brand);
  font-size: 13px;
}
.institution-readonly-summary span {
  font-size: 12px;
  line-height: 1.35;
}
.admin-search-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr);
  gap: 8px;
  margin: 12px 0 14px;
}
.admin-search-bar.compact {
  margin-bottom: 10px;
}

.school-control-pane .admin-search-bar.compact {
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
}
.admin-list-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.usage-history-filters {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}
.usage-filter-row {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.usage-filter-row-primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.usage-filter-row-secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}
.charge-request-filter-row-primary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
}
.charge-request-filter-actions {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  align-items: end;
  max-width: 360px;
}
.charge-request-filter-actions .btn {
  width: 100%;
}
.history-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.history-section-head h3 {
  margin: 0;
}
.history-export-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.usage-history-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.usage-history-filters input,
.usage-history-filters .date-picker-trigger {
  min-height: var(--form-control-height);
  font-size: 16px;
}
.usage-history-filters input::placeholder {
  font-size: 15px;
}
.usage-history-filters .admin-date-control {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) auto;
  gap: 8px;
}
.usage-history-filters button {
  align-self: end;
  width: 100%;
  white-space: nowrap;
}
.institution-manager-usage-filter-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.institution-manager-usage-actions {
  grid-template-columns: repeat(2, minmax(140px, 160px));
  justify-content: start;
}
.institution-manager-usage-actions button {
  width: 100%;
}
.institution-form input[name="prepaidAmount"],
.institution-form input[name="monthlyEquivalentPerCaseAmount"],
.billing-editor-grid input[name="chargeAmount"] {
  min-width: 190px;
}
.institution-form input[name="perCaseAmount"],
.institution-form input[name="prepaidAmount"],
.institution-form input[name="monthlyEquivalentPerCaseAmount"],
.billing-editor-grid input[name="pricePerRecord"],
.billing-editor-grid input[name="chargeAmount"] {
  box-sizing: border-box;
  text-align: right;
}
.admin-pagination {
  align-items: center;
  margin-top: 12px;
}
.admin-pagination button {
  min-width: 72px;
}
.admin-pagination .page-indicator {
  min-width: 56px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.history-table-wrap {
  margin-top: 10px;
}
.usage-history-table-wrap table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}
.usage-history-table-wrap th,
.usage-history-table-wrap td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.usage-history-table-wrap th:nth-child(1),
.usage-history-table-wrap td:nth-child(1) {
  width: 17%;
}
.usage-history-table-wrap th:nth-child(2),
.usage-history-table-wrap td:nth-child(2) {
  width: 14%;
}
.usage-history-table-wrap th:nth-child(6),
.usage-history-table-wrap td:nth-child(6),
.usage-history-table-wrap th:nth-child(8),
.usage-history-table-wrap td:nth-child(8) {
  width: 10%;
}
.usage-history-table-wrap td.actions {
  overflow: visible;
}
.usage-history-table-wrap .usage-record-link {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.charge-history-row-deleted td {
  color: #800020;
}
.charge-history-row-deleted small,
.charge-history-row-modified small {
  color: inherit;
  font-weight: 800;
}
.charge-cell-modified {
  color: #800020;
  font-weight: 900;
}
.charge-edit-input {
  width: 108px;
  box-sizing: border-box;
  text-align: right;
  font: inherit;
}
.history-subtitle {
  margin-top: 22px;
}
.history-print-area {
  display: none;
}
.admin-empty-state {
  min-height: 96px;
  width: 100%;
}
.billing-calc-summary {
  min-height: 42px;
  width: max-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f4f8fd;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  box-sizing: border-box;
}

#institutionBillingCreditPreview {
  grid-column: span 3;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.charge-request-form textarea {
  min-height: 76px;
  resize: vertical;
}
.institution-manager-charge-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.institution-manager-charge-row label,
.institution-manager-charge-field {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.institution-manager-charge-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.institution-manager-charge-summary {
  display: contents;
}
.institution-manager-charge-field {
  min-height: var(--form-control-height);
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  box-sizing: border-box;
}
.institution-manager-charge-field strong {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.1;
}
.institution-manager-charge-field span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.institution-manager-charge-summary .warning-text {
  grid-column: 1 / -1;
  margin: 0;
}
.charge-request-table-wrap td {
  vertical-align: middle;
}
.charge-request-admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.charge-request-summary-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
}
.charge-request-summary-card strong {
  display: block;
  color: var(--brand);
  font-size: 14px;
}
.charge-request-summary-card span,
.charge-request-low-credit-list {
  color: var(--muted);
  font-size: 13px;
}
.charge-request-summary-card.has-pending {
  border-color: #c9dcf5;
  background: #eef5ff;
}
.charge-request-summary-card.has-low-credit {
  border-color: #f4d58d;
  background: #fffaf0;
}
.charge-request-low-credit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.charge-request-low-credit-item {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
}
.charge-request-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.charge-request-status--pending {
  color: #28527a;
  background: #eef5ff;
  border-color: #c9dcf5;
}
.charge-request-status--completed {
  color: #166534;
  background: #eaf8ee;
  border-color: #bde7c9;
}
.charge-request-status--rejected {
  color: #8f1d1d;
  background: #fdf0f0;
  border-color: #efc2c2;
}
.charge-request-status-select,
.charge-request-note-input {
  min-width: 120px;
}
.charge-request-row--pending {
  background: #f5f9ff;
}
.charge-request-row--completed {
  background: #f5fbf6;
}
.charge-request-row--rejected {
  background: #fff7f7;
}
.charge-request-row--pending:hover,
.charge-request-row--completed:hover,
.charge-request-row--rejected:hover {
  background: #eef6f8;
}

.low-credit-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  white-space: nowrap;
}

.low-credit-status i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

.low-credit-status--processed i {
  background: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, .12);
}

.low-credit-status--stopped i {
  background: #8b95a1;
  box-shadow: 0 0 0 3px rgba(139, 149, 161, .14);
}
.admin-section-note {
  margin: 6px 0 12px;
  color: var(--muted);
  font-weight: 800;
}
.preparation-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.preparation-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  box-shadow: 0 8px 20px rgba(15, 45, 80, .05);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  cursor: pointer;
}
.preparation-card.is-hovered {
  border-color: #8eb0cf;
  background: #f4f9ff;
  box-shadow: inset 0 0 0 1px #8eb0cf, 0 10px 22px rgba(20, 67, 107, .1);
  outline: 2px solid rgba(47, 111, 167, .18);
  outline-offset: 2px;
  transform: translateY(-1px);
}
.preparation-card:focus-visible {
  border-color: #4f8bc2;
  outline: 3px solid rgba(79, 139, 194, .22);
  outline-offset: 2px;
}
.preparation-card.is-active {
  border-color: #2f6fa7;
  background: #edf6ff;
  box-shadow: 0 12px 26px rgba(20, 67, 107, .16);
  outline: 2px solid rgba(47, 111, 167, .18);
  outline-offset: 2px;
}
.preparation-card-grid:not([data-hovered-card=""]) .preparation-card.is-active:not(.is-hovered) {
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 45, 80, .05);
  outline: 0;
  transform: none;
}
.preparation-card.is-active.is-hovered {
  border-color: #8eb0cf;
  background: #f4f9ff;
  box-shadow: inset 0 0 0 1px #8eb0cf, 0 10px 22px rgba(20, 67, 107, .1);
  outline: 2px solid rgba(47, 111, 167, .18);
  outline-offset: 2px;
  transform: translateY(-1px);
}
.preparation-card.is-pressed {
  border-color: #4f8bc2;
  background: #edf6ff;
  box-shadow: 0 8px 18px rgba(20, 67, 107, .12);
  transform: translateY(0);
}
.preparation-card strong {
  min-width: 0;
  max-width: 100%;
  color: var(--brand);
  font-size: 16px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.preparation-card span {
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.preparation-subpanel,
.offline-questionnaire-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.read-aloud-preparation-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.read-aloud-preparation-panel h3,
.online-self-entry-panel h3,
.offline-questionnaire-panel h3 {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
}
.read-aloud-preparation-panel p,
.online-self-entry-panel p,
.offline-questionnaire-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.questionnaire-print-controls {
  display: grid;
  gap: 12px;
}
.questionnaire-print-controls fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}
.questionnaire-print-controls legend {
  padding: 0 4px;
  color: var(--brand);
  font-weight: 900;
}
.questionnaire-segmented {
  width: fit-content;
}
.questionnaire-control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.questionnaire-control-module {
  display: grid;
  align-content: start;
  gap: 8px;
}
.questionnaire-design-fieldset {
  display: grid;
  align-content: start;
  gap: 8px;
}
.questionnaire-target-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.questionnaire-target-options input {
  width: 16px;
  min-height: 16px;
}
.questionnaire-target-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.disabled-option {
  color: #7b8794 !important;
  background: #f4f6f8 !important;
}
.disabled-option span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
}
.offline-student-grid {
  display: grid;
  grid-template-columns: minmax(110px, 1.05fr) 86px minmax(150px, 1.5fr) minmax(78px, .8fr) minmax(72px, .7fr) minmax(68px, .6fr) minmax(82px, .72fr) minmax(132px, 1fr);
  gap: 10px;
}
.offline-student-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.offline-birth-year-field {
  position: relative;
}
.offline-birth-year-warning {
  color: #b45309;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
}
.questionnaire-print-confirm-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
}
.questionnaire-print-confirm-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}
.questionnaire-print-confirm-list dt {
  color: var(--muted);
  font-weight: 900;
}
.questionnaire-print-confirm-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.self-entry-link-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
  align-items: end;
}
.self-entry-link-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.self-entry-link-form input,
.self-entry-link-form select {
  min-width: 0;
  min-height: var(--form-control-height);
}
.self-entry-link-form button {
  min-height: var(--form-control-height);
  align-self: end;
}
.self-entry-exam-form {
  display: block;
  margin: 14px 0 16px;
  align-items: initial;
}
.self-entry-form-grid {
  --self-entry-grid-unit: var(--layout-editor-grid-unit);
  --self-entry-field-gap-inline: var(--layout-editor-grid-gap);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
}
.self-entry-exam-form .self-entry-input-section {
  min-width: 0;
}
.self-entry-exam-form:not(.group-mode) .self-entry-person-section,
.self-entry-exam-form:not(.group-mode) .self-entry-group-section,
.self-entry-exam-form:not(.group-mode) .self-entry-person-section .self-entry-section-grid,
.self-entry-exam-form:not(.group-mode) .self-entry-group-section .self-entry-section-grid {
  display: contents;
}
.self-entry-exam-form.group-mode .self-entry-input-section,
.self-entry-delivery-section {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(15, 45, 80, .05);
}
.self-entry-exam-form:not(.group-mode) .self-entry-delivery-section {
  display: block;
  flex: 1 1 100%;
  min-width: 0;
}
.self-entry-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.self-entry-section-head h3 {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
}
.self-entry-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.self-entry-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.self-entry-section-grid {
  --self-entry-grid-unit: var(--layout-editor-grid-unit);
  --self-entry-field-gap-inline: var(--layout-editor-grid-gap);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 18px;
}
.self-entry-exam-form:not(.group-mode) .self-entry-form-grid {
  gap: 16px var(--self-entry-field-gap-inline);
}
.self-entry-exam-form.group-mode .self-entry-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.self-entry-exam-form.group-mode .self-entry-group-section {
  order: 1;
}
.self-entry-exam-form.group-mode .self-entry-person-section {
  order: 2;
}
.self-entry-exam-form.group-mode .self-entry-delivery-section {
  order: 3;
}
.self-entry-exam-form.group-mode .self-entry-group-section,
.self-entry-exam-form.group-mode .self-entry-person-section {
  border-color: rgba(191, 219, 254, .75);
  outline: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.self-entry-exam-form.group-mode .self-entry-group-section:hover,
.self-entry-exam-form.group-mode .self-entry-person-section:hover {
  border-color: rgba(96, 165, 250, .28);
  box-shadow: none;
}
.self-entry-exam-form.group-mode .self-entry-group-section:focus-within,
.self-entry-exam-form.group-mode .self-entry-person-section:focus-within,
.self-entry-exam-form.group-mode .self-entry-group-section.is-active,
.self-entry-exam-form.group-mode .self-entry-person-section.is-active {
  border-color: rgba(147, 197, 253, .45);
  background: rgba(239, 246, 255, .45);
  box-shadow: none;
}
.self-entry-exam-form.group-mode .self-entry-group-grid {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.self-entry-exam-form.group-mode .self-entry-person-grid {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.self-entry-delivery-grid {
  align-items: end;
}
.self-entry-exam-form label,
.self-entry-exam-form .email-field,
.self-entry-exam-form .inline-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.self-entry-exam-form input,
.self-entry-exam-form select {
  min-width: 0;
  min-height: var(--form-control-height);
}
.self-entry-exam-form [data-date-picker] {
  min-height: var(--form-control-height);
  padding: 0 16px;
  font-size: 16px;
}
.self-entry-exam-form [data-date-picker].tentative-date {
  border-color: var(--info-border);
  background: var(--info-bg);
}
.self-entry-exam-form .self-entry-field--gender {
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-inline-size: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.self-entry-exam-form .self-entry-field--gender legend {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}
.self-entry-exam-form .gender-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  padding: 0 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  background: var(--control-bg);
}
.self-entry-exam-form .gender-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
}
.self-entry-exam-form .gender-options input {
  width: 18px;
  min-height: 18px;
}
.self-entry-exam-form:not(.group-mode) .self-entry-field--test-level { order: 1; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--name { order: 2; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--grade { order: 3; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--gender { order: 4; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--exam-date { order: 5; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--birth-date { order: 6; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--age { order: 7; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--province { order: 8; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--regional { order: 9; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--project { order: 10; }
.self-entry-exam-form:not(.group-mode) .self-entry-field--institution { order: 11; }
.self-entry-exam-form:not(.group-mode) .self-entry-delivery-section {
  order: 1000;
  grid-column: 1 / -1;
}
.self-entry-exam-form.group-mode .self-entry-field--project { order: 1; }
.self-entry-exam-form.group-mode .self-entry-field--province { order: 2; }
.self-entry-exam-form.group-mode .self-entry-field--regional { order: 3; }
.self-entry-exam-form.group-mode .self-entry-field--city { order: 4; }
.self-entry-exam-form.group-mode .self-entry-field--school { order: 5; }
.self-entry-exam-form.group-mode .self-entry-field--institution { order: 6; }
.self-entry-exam-form.group-mode .self-entry-field--test-level { order: 1; }
.self-entry-exam-form.group-mode .self-entry-field--name { order: 2; }
.self-entry-exam-form.group-mode .self-entry-field--gender { order: 3; }
.self-entry-exam-form.group-mode .self-entry-field--exam-date { order: 4; }
.self-entry-exam-form.group-mode .self-entry-field--grade {
  order: 5;
  grid-column-start: 1;
}
.self-entry-exam-form.group-mode .self-entry-field--class-no { order: 6; }
.self-entry-exam-form.group-mode .self-entry-field--student-no { order: 7; }
.self-entry-exam-form.group-mode .self-entry-field--birth-date { order: 8; }
.self-entry-exam-form.group-mode .self-entry-field--age { order: 9; }
.self-entry-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-self: end;
  flex: 0 0 auto;
  min-width: 220px;
}

.self-entry-exam-form .self-entry-layout-field {
  flex: 0 1 var(--self-entry-field-basis, var(--layout-editor-span-4));
  min-width: 0;
  max-width: var(--self-entry-field-max, var(--layout-editor-span-4));
}

.self-entry-exam-form .form-field--span1 {
  --self-entry-field-span: 1;
  --self-entry-field-basis: var(--layout-editor-span-1);
  --self-entry-field-max: var(--layout-editor-span-1);
}

.self-entry-exam-form .form-field--xs {
  --self-entry-field-span: 2;
  --self-entry-field-basis: var(--layout-editor-span-2);
  --self-entry-field-max: var(--layout-editor-span-2);
}

.self-entry-exam-form .form-field--sm {
  --self-entry-field-span: 3;
  --self-entry-field-basis: var(--layout-editor-span-3);
  --self-entry-field-max: var(--layout-editor-span-3);
}

.self-entry-exam-form .form-field--md {
  --self-entry-field-span: 4;
  --self-entry-field-basis: var(--layout-editor-span-4);
  --self-entry-field-max: var(--layout-editor-span-4);
}

.self-entry-exam-form .form-field--lg {
  --self-entry-field-span: 5;
  --self-entry-field-basis: var(--layout-editor-span-5);
  --self-entry-field-max: var(--layout-editor-span-5);
}

.self-entry-exam-form .form-field--xl {
  --self-entry-field-span: 6;
  --self-entry-field-basis: var(--layout-editor-span-6);
  --self-entry-field-max: var(--layout-editor-span-6);
}

.self-entry-layout-edit-mode .self-entry-user-panel {
  border-color: #a8cceb;
  background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
}

.self-entry-layout-edit-mode .self-entry-person-grid,
.self-entry-layout-edit-mode .self-entry-group-grid {
  border-radius: 16px;
  background-image:
    linear-gradient(var(--layout-edit-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--layout-edit-grid-color) 1px, transparent 1px);
  background-size: var(--layout-edit-grid-step) 44px;
  background-position: -1px -1px;
}

.self-entry-delivery-grid > .email-field {
  order: 1;
}

.self-entry-delivery-grid > .self-entry-field--expires {
  order: 2;
}

.self-entry-delivery-grid > .self-entry-action-group {
  order: 3;
}

.self-entry-layout-edit-mode .self-entry-layout-field,
.self-entry-layout-edit-mode .self-entry-layout-editable-column {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  outline: 0;
  box-shadow: none;
  cursor: grab;
}

.self-entry-layout-edit-mode .self-entry-layout-field > .form-control,
.self-entry-layout-edit-mode .self-entry-layout-field > .form-select,
.self-entry-layout-edit-mode .self-entry-layout-field > .email-input-group,
.self-entry-layout-edit-mode .self-entry-layout-field > .date-picker-control,
.self-entry-layout-edit-mode .self-entry-layout-field > .grade-affiliation-control,
.self-entry-layout-edit-mode .self-entry-layout-field > .gender-options {
  outline: 1px dashed #8bb8dc;
  outline-offset: 3px;
  border-radius: var(--radius-control);
  cursor: grab;
}

.self-entry-layout-edit-mode .self-entry-layout-field:hover > .form-control,
.self-entry-layout-edit-mode .self-entry-layout-field:hover > .form-select,
.self-entry-layout-edit-mode .self-entry-layout-field:hover > .email-input-group,
.self-entry-layout-edit-mode .self-entry-layout-field:hover > .date-picker-control,
.self-entry-layout-edit-mode .self-entry-layout-field:hover > .grade-affiliation-control,
.self-entry-layout-edit-mode .self-entry-layout-field:hover > .gender-options {
  outline-color: #6fa6d2;
  box-shadow: 0 0 0 2px rgba(111, 166, 210, .08);
}

.self-entry-layout-edit-mode .self-entry-layout-field .layout-edit-size-button {
  right: -7px;
  bottom: -8px;
  z-index: 10;
  pointer-events: auto;
}

.self-entry-layout-edit-mode .self-entry-layout-field:hover .layout-edit-field-tools button,
.self-entry-layout-edit-mode .self-entry-layout-editable-column:hover .layout-edit-field-tools button {
  opacity: .82;
}

.self-entry-layout-edit-mode .layout-editable-field.is-drop-before::before,
.self-entry-layout-edit-mode .layout-editable-field.is-drop-after::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  z-index: 7;
  width: 3px;
  border-radius: 999px;
  background: #2d7ee6;
  box-shadow: 0 0 0 3px rgba(45, 126, 230, .14);
  pointer-events: none;
}

.self-entry-layout-edit-mode .layout-editable-field.is-drop-before::before {
  left: -10px;
}

.self-entry-layout-edit-mode .layout-editable-field.is-drop-after::before {
  right: -10px;
}

.self-entry-layout-edit-mode .layout-editable-field.is-dragging {
  opacity: .62;
  cursor: grabbing;
  box-shadow: 0 14px 28px rgba(21, 74, 112, .16);
}

.self-entry-layout-edit-mode .layout-editable-field.is-resizing,
.self-entry-layout-edit-mode.is-layout-resizing {
  cursor: ew-resize;
}
.self-entry-created-link {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid #c9dcf5;
  border-radius: var(--radius-control);
  background: #f5f9ff;
}
.self-entry-created-link span {
  color: var(--muted);
  font-weight: 800;
}
.self-entry-created-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
}
.self-entry-created-url-row input {
  min-width: 0;
}
.self-entry-email-status {
  margin: 0;
  color: var(--brand);
  font-weight: 900;
}
.self-entry-user-panel {
  margin-bottom: 18px;
}
.self-entry-table-wrap table {
  width: 100%;
  min-width: 960px;
}
.self-entry-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  contain: inline-size;
}
.self-entry-table-wrap th,
.self-entry-table-wrap td {
  text-align: center;
}
.self-entry-table-wrap th[data-self-entry-layout-column-key],
.self-entry-table-wrap td[data-self-entry-layout-column-key] {
  width: var(--self-entry-column-width);
  max-width: var(--self-entry-column-width);
}

.questionnaire-print-window {
  margin: 0;
  background: #e5e7eb;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.questionnaire-print-document {
  display: grid;
  gap: 18px;
  padding: 18px 0;
}
.questionnaire-print-examinee {
  display: contents;
}
.questionnaire-print-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 7mm 9mm 6mm;
  box-sizing: border-box;
  background: #fff;
  color: #111827;
  page-break-after: always;
  break-after: page;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
.questionnaire-print-page:last-child {
  page-break-after: auto;
  break-after: auto;
}
.questionnaire-print-sheet--mono {
  --questionnaire-border: #111827;
  --questionnaire-soft-border: #4b5563;
  --questionnaire-head-bg: #f3f4f6;
  --questionnaire-accent: #111827;
}
.questionnaire-print-sheet--color {
  --questionnaire-border: #183d63;
  --questionnaire-soft-border: #8aa4bd;
  --questionnaire-head-bg: #edf4fb;
  --questionnaire-accent: #183d63;
}
.questionnaire-print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 3mm;
  border-bottom: 2px solid var(--questionnaire-border);
}
.questionnaire-print-brand {
  display: block;
  min-width: 0;
}
.questionnaire-print-brand p,
.questionnaire-print-brand h1,
.questionnaire-print-brand span {
  margin: 0;
}
.questionnaire-print-brand p {
  color: var(--questionnaire-accent);
  font-size: 9px;
  font-weight: 900;
}
.questionnaire-print-brand h1 {
  margin-top: 1px;
  color: #111827;
  font-size: 16px;
  line-height: 1.18;
}
.questionnaire-print-brand span {
  display: block;
  margin-top: 2px;
  color: #4b5563;
  font-size: 9px;
  font-weight: 800;
}
.questionnaire-print-meta {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.questionnaire-print-info {
  margin: 3.4mm 0 2.4mm;
}
.questionnaire-print-info-grid {
  display: grid;
  grid-template-columns: 1.15fr .75fr 2fr .85fr;
  margin: 0;
  border: 1.5px solid var(--questionnaire-border);
  border-right: 0;
  border-bottom: 0;
}
.questionnaire-print-info-grid div {
  min-width: 0;
  border-right: 1px solid var(--questionnaire-soft-border);
  border-bottom: 1px solid var(--questionnaire-soft-border);
}
.questionnaire-print-info-grid dt {
  margin: 0;
  padding: 2.5px 4px;
  border-bottom: 1px solid var(--questionnaire-soft-border);
  background: var(--questionnaire-head-bg);
  color: #111827;
  font-size: 8.8px;
  font-weight: 900;
  text-align: center;
}
.questionnaire-print-info-grid dd {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12mm;
  margin: 0;
  padding: 2.4px 5px;
  font-size: 10.8px;
  font-weight: 800;
  text-align: center;
}
.questionnaire-print-handwrite-line {
  display: block;
  width: 100%;
  height: 8.4mm;
  border-bottom: 1.5px solid #111827;
}
.questionnaire-print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1.5px solid var(--questionnaire-border);
  font-size: 11.2px;
}
.questionnaire-print-col-number { width: 5.5%; }
.questionnaire-print-col-question { width: 62%; }
.questionnaire-print-col-answer { width: 6.5%; }
.questionnaire-print-table thead {
  display: table-header-group;
}
.questionnaire-print-table th,
.questionnaire-print-table td {
  border: 1px solid var(--questionnaire-soft-border);
  color: #111827;
  vertical-align: middle;
}
.questionnaire-print-table thead th {
  padding: 2.2px 2px;
  background: var(--questionnaire-head-bg);
  font-weight: 900;
  text-align: center;
}
.questionnaire-scale-head {
  display: grid;
  place-items: center;
  gap: 1px;
  line-height: 1.08;
}
.questionnaire-scale-head b {
  color: var(--questionnaire-accent);
  font-size: 9.4px;
  line-height: 1;
}
.questionnaire-scale-head small {
  color: #111827;
  font-size: 7.2px;
  font-weight: 900;
  line-height: 1.08;
  word-break: keep-all;
}
.questionnaire-print-number {
  padding: 2px;
  background: #fff;
  color: #111827;
  text-align: center;
}
.questionnaire-print-question {
  padding: 3px 5px;
  font-size: 11.6px;
  font-weight: 800;
  line-height: 1.34;
}
.questionnaire-answer-cell {
  min-height: 9.5mm;
  padding: 0;
  text-align: center;
}
.questionnaire-answer-cell span {
  display: inline-grid;
  place-items: center;
  width: 6.6mm;
  height: 6.6mm;
  border: 1.45px solid #111827;
  border-radius: 50%;
  box-shadow: none;
  font-size: 8.4px;
  font-weight: 900;
  line-height: 1;
}
.questionnaire-print-table tr {
  height: 10.25mm;
  break-inside: avoid;
  page-break-inside: avoid;
}
.questionnaire-print-table tr.questionnaire-print-row--q34 {
  height: 10.9mm;
}
.questionnaire-print-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2.5mm;
  padding-top: 1.4mm;
  border-top: 1px solid var(--questionnaire-soft-border);
  color: #4b5563;
  font-size: 8px;
  font-weight: 800;
}
.questionnaire-print-footer small {
  color: #6b7280;
  font-size: 6.8px;
}

.self-entry-column-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  color: inherit;
  font: inherit;
  line-height: 1.25;
  white-space: nowrap;
}

.self-entry-layout-edit-mode .self-entry-layout-editable-column {
  outline: 1px dashed #a9ccec;
  outline-offset: -3px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(68, 94, 125, .92), rgba(48, 56, 67, .96)),
    #303843;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.self-entry-layout-edit-mode .self-entry-layout-editable-column:hover {
  outline-color: #6fa6d2;
  box-shadow: inset 0 0 0 2px rgba(111, 166, 210, .08);
}

.self-entry-layout-edit-mode .self-entry-layout-editable-column .layout-edit-field-tools {
  top: 7px;
  right: 20px;
}

.self-entry-layout-edit-mode .self-entry-layout-editable-column .layout-edit-field-tools button {
  opacity: .86;
  border-color: rgba(213, 229, 244, .88);
  background: rgba(255, 255, 255, .88);
  color: #537d9f;
}

.self-entry-layout-edit-mode .self-entry-layout-editable-column .layout-edit-size-button {
  right: 4px;
  bottom: 4px;
  z-index: 10;
  pointer-events: auto;
  border-color: rgba(189, 212, 232, .98);
  background: rgba(255, 255, 255, .94);
}

.self-entry-layout-edit-mode .self-entry-row-actions button,
.self-entry-layout-edit-mode #userSelfEntryCreatedLink button,
.self-entry-layout-edit-mode .self-entry-action-group button {
  pointer-events: none;
}
.self-entry-table-wrap td.actions {
  align-items: center;
  justify-content: center;
}
.self-entry-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid transparent;
}
.self-entry-status--active {
  color: #28527a;
  background: #eef5ff;
  border-color: #c9dcf5;
}
.self-entry-status--expired {
  color: #64748b;
  background: #f1f5f9;
  border-color: #d8e0e8;
}
.self-entry-status--disabled {
  color: #8f1d1d;
  background: #fdf0f0;
  border-color: #efc2c2;
}
.self-entry-submission {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
}
.self-entry-submission-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.self-entry-submission__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(21, 32, 51, .04);
}
.self-entry-submission--submitted .self-entry-submission__dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(46, 158, 91, .14);
}
.self-entry-submission--unsubmitted .self-entry-submission__dot {
  background: var(--risk);
  box-shadow: 0 0 0 4px rgba(217, 83, 79, .14);
}
.self-entry-overdue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #f6c56f;
  background: #fff7e6;
  color: #9a5b00;
  font-size: .74rem;
  font-weight: 900;
}
.self-entry-management-cell {
  min-width: 112px;
}
.self-entry-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.self-entry-action-button {
  min-width: 0;
  padding: 4px 8px;
  font-size: 0.78rem;
}
.self-entry-action-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.self-entry-resend-box {
  width: min(100%, 620px);
}
.self-entry-resend-field {
  display: grid;
  gap: 6px;
  text-align: left;
}
.self-entry-resend-field span,
.self-entry-delete-note {
  color: var(--muted);
  font-size: .9rem;
}
.self-entry-row--active {
  background: #f8fbff;
}
.self-entry-row--expired {
  background: #f8fafc;
}
.self-entry-row--disabled {
  background: #fff7f7;
}
.self-entry-row--overdue {
  background: #fffaf0;
}
.self-entry-row:hover {
  background: #eef6f8;
}
html.self-entry-public-root,
body.self-entry-public-body {
  max-width: 100%;
  overflow: visible;
  overflow-x: clip;
  overflow-y: visible;
}
.self-entry-public-body {
  --self-entry-sticky-top: env(safe-area-inset-top, 0px);
  min-height: 100vh;
  margin: 0;
  background: #eef5f8;
  color: var(--ink);
}
.self-entry-public-shell {
  width: calc(100% - 32px);
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 0 48px;
}
.self-entry-public-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.self-entry-public-header > div {
  min-width: 0;
}
.self-entry-public-header h1 {
  margin: 4px 0;
  color: var(--brand);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.self-entry-public-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.self-entry-public-org {
  color: var(--brand-blue) !important;
}
.self-entry-public-card {
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.self-entry-state-card {
  text-align: center;
}
.self-entry-state-card h2 {
  margin: 0 0 10px;
  color: var(--brand);
}
.self-entry-state-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.self-entry-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--brand);
  font-weight: 900;
}
.self-entry-step h2 {
  margin: 0 0 14px;
  color: var(--brand);
}
.self-entry-question-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0 auto 10px;
  max-width: 960px;
}
.self-entry-question-heading h2 {
  margin-bottom: 0;
}
.self-entry-read-aloud-control {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-items: end;
  flex: 0 0 auto;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.self-entry-read-aloud-control button {
  min-width: 54px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #bfd3e8;
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
}
.self-entry-read-aloud-control button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.self-entry-read-aloud-help {
  grid-column: 1 / -1;
  max-width: 310px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
  word-break: keep-all;
}
.self-entry-metadata {
  margin-bottom: 16px;
}
.self-entry-info-summary {
  padding: 14px;
  border: 1px solid #d7e4f2;
  border-radius: 12px;
  background: #f8fbff;
}
.self-entry-info-summary__title {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}
.self-entry-info-summary__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.self-entry-info-summary__item {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(203, 220, 235, 0.82);
  border-radius: 9px;
  background: #fff;
}
.self-entry-info-summary__label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.self-entry-info-summary__value {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.self-entry-info-summary__placeholder {
  color: #8a98aa;
  font-weight: 800;
}
.self-entry-notice,
.self-entry-prefill-notice,
.self-entry-missing-notice {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: var(--radius-control);
  background: #fff7ed;
  color: #8a4b13;
  font-weight: 900;
  line-height: 1.5;
}
.self-entry-prefill-notice {
  background: #eef6ff;
  color: #245173;
}
.self-entry-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fafc;
  font-weight: 800;
  line-height: 1.55;
}
.self-entry-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.self-entry-info-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.self-entry-info-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.self-entry-info-form input,
.self-entry-info-form select {
  min-width: 0;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  font-size: 16px;
}
.self-entry-prefilled-field {
  position: relative;
}
.self-entry-prefill-tag {
  justify-self: start;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e4f7a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}
.self-entry-info-form input.self-entry-locked-input,
.self-entry-info-form select.self-entry-locked-input {
  border-color: #bfdbfe;
  background: #f1f7ff;
  color: #1f2937;
  cursor: not-allowed;
  opacity: 1;
}
.self-entry-info-form input.self-entry-locked-input {
  cursor: default;
}
.self-entry-question-help {
  max-width: 960px;
  margin: 0 auto 16px;
  color: #667085;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  word-break: keep-all;
}
.self-entry-read-aloud-only-notice,
.self-entry-audio-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-control);
  background: #fffbeb;
  color: #8a4b13;
  font-size: 13px;
  font-weight: 900;
}
.self-entry-sticky-scale {
  position: sticky;
  top: var(--self-entry-sticky-top);
  z-index: 20;
  box-sizing: border-box;
  max-width: 960px;
  margin: 10px auto 14px;
  padding: 10px 12px;
  border: 1px solid rgba(18, 59, 99, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(15, 45, 76, 0.08);
  backdrop-filter: blur(8px);
}
.self-entry-scale-title {
  margin-bottom: 6px;
  color: #123b63;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}
.self-entry-scale-items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.self-entry-scale-items span {
  min-width: 0;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}
.self-entry-scale-items strong {
  display: block;
  color: #123b63;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}
.self-entry-question-list {
  display: grid;
  gap: 18px;
  max-width: 960px;
  margin: 0 auto;
}
.self-entry-question {
  box-sizing: border-box;
  margin: 0;
  width: 100%;
  max-width: 100%;
  inline-size: 100%;
  max-inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  padding: 22px 20px;
  border: 1px solid rgba(15, 45, 76, 0.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 45, 76, 0.04);
  scroll-margin-top: calc(96px + var(--self-entry-sticky-top));
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.self-entry-question--active {
  border-color: rgba(18, 59, 99, 0.28);
  box-shadow: 0 4px 14px rgba(15, 45, 76, 0.08);
}
.self-entry-question:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}
.self-entry-question legend {
  display: flex;
  width: auto;
  margin: 0 0 10px;
  padding: 0;
}
.self-entry-question legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(18, 59, 99, 0.14);
  border-radius: 999px;
  background: #eef6ff;
  color: #123b63;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.self-entry-question-text {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.self-entry-response-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.self-entry-response-options label {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}
.self-entry-response-options input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.self-entry-response-options span {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(18, 59, 99, 0.22);
  border-radius: 14px;
  background: #fff;
  color: #123b63;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.self-entry-response-options input:checked + span {
  border-color: #123b63;
  background: #123b63;
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 59, 99, 0.18);
}
.self-entry-response-options input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}
.self-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 380px) {
  .self-entry-question {
    padding: 20px 16px;
  }
  .self-entry-question-text {
    font-size: 20px;
  }
  .self-entry-response-options {
    gap: 6px;
  }
  .self-entry-response-options span {
    min-height: 44px;
    font-size: 17px;
  }
  .self-entry-sticky-scale {
    padding: 9px 10px;
  }
  .self-entry-scale-items {
    gap: 4px;
  }
  .self-entry-scale-items span {
    font-size: 10.5px;
  }
  .self-entry-scale-items strong {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .self-entry-public-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .self-entry-public-header h1 {
    font-size: 24px;
  }
  .self-entry-question-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .self-entry-read-aloud-control {
    justify-items: start;
  }
  .self-entry-read-aloud-help {
    max-width: none;
    text-align: left;
  }
  .self-entry-question-text {
    word-break: normal;
  }
  .self-entry-question-help {
    font-size: 15px;
    line-height: 1.55;
  }
}

@media (min-width: 768px) {
  .self-entry-sticky-scale {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
  }
  .self-entry-scale-title {
    flex: 0 0 auto;
    margin-bottom: 0;
  }
  .self-entry-scale-items {
    flex: 1 1 auto;
    gap: 10px;
  }
  .self-entry-scale-items span {
    font-size: 13px;
  }
  .self-entry-scale-items strong {
    display: inline;
    margin-right: 4px;
    font-size: 14px;
  }
  .self-entry-question-text {
    font-size: 24px;
    line-height: 1.45;
  }
  .self-entry-response-options {
    grid-template-columns: repeat(5, minmax(84px, 132px));
    justify-content: space-between;
    gap: 12px;
  }
  .self-entry-response-options span {
    min-height: 46px;
    border-radius: 999px;
    font-size: 17px;
  }
}

@media (min-width: 1200px) {
  .self-entry-public-shell {
    width: min(960px, calc(100% - 64px));
  }
  .self-entry-question-list,
  .self-entry-question-heading,
  .self-entry-question-help,
  .self-entry-sticky-scale {
    max-width: 900px;
  }
}

.admin-panel-focus {
  box-shadow: 0 0 0 3px rgba(31, 121, 143, .24);
}

.pilot-assessment-panel {
  display: grid;
  gap: 18px;
}

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

.pilot-workflow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pilot-workflow-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 900;
  cursor: pointer;
}

.pilot-workflow-tabs button.active,
.pilot-workflow-tabs button:hover,
.pilot-workflow-tabs button:focus-visible {
  background: #fff;
  color: var(--text);
  outline: 2px solid rgba(37, 99, 235, .18);
}

.pilot-admin-next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 12px;
}

.pilot-admin-next-action span {
  color: var(--text-muted);
  font-weight: 900;
}

.pilot-admin-diagnostics summary,
.pilot-admin-help summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.pilot-admin-diagnostics form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.pilot-admin-help-content {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  color: var(--text);
}

.pilot-admin-help-content section {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.pilot-admin-help-content h4,
.pilot-admin-help-content h5,
.pilot-admin-help-content p,
.pilot-admin-help-content ul,
.pilot-admin-help-content ol,
.pilot-admin-help-content dl {
  margin: 0;
}

.pilot-admin-help-content h4 {
  font-size: 16px;
}

.pilot-admin-help-content h5 {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.pilot-admin-help-content ul,
.pilot-admin-help-content ol {
  display: grid;
  gap: 5px;
  padding-left: 22px;
  line-height: 1.55;
}

.pilot-admin-help-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.pilot-admin-help-glossary div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 10px;
}

.pilot-admin-help-glossary dt {
  font-weight: 900;
}

.pilot-admin-help-glossary dd {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

#pilotRealAiRecognitionBtn {
  border-color: rgba(185, 28, 28, .45);
  background: rgba(254, 242, 242, .88);
  color: #991b1b;
}

#pilotRealAiRecognitionBtn:disabled {
  opacity: .58;
}

.pilot-workflow-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .72);
  padding: 16px;
}

.pilot-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
  gap: 12px;
  align-items: start;
}

.pilot-section-heading h4 {
  margin: 2px 0 0;
  font-size: 1.08rem;
}

.pilot-section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.45;
}

.pilot-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.pilot-dashboard-cards article {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 12px;
}

.pilot-dashboard-cards span {
  display: block;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 900;
}

.pilot-dashboard-cards strong {
  display: block;
  margin-top: 8px;
  color: var(--brand);
  font-size: 1.18rem;
  font-weight: 950;
}

.pilot-ai-queue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 14px;
}

.pilot-ai-queue-card p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
}

.pilot-crop-management {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.pilot-crop-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pilot-crop-summary-cards article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
}

.pilot-crop-summary-cards span,
.pilot-crop-summary-cards small {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 850;
}

.pilot-crop-summary-cards strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--brand);
  font-size: 1.12rem;
  font-weight: 950;
}

.pilot-crop-filter-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilot-crop-filter-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text);
  padding: 7px 10px;
  font-size: .84rem;
  font-weight: 900;
  cursor: pointer;
}

.pilot-crop-filter-tabs button span {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: var(--radius-pill);
  align-items: center;
  justify-content: center;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: .78rem;
}

.pilot-crop-filter-tabs button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pilot-crop-filter-tabs button.active span {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.pilot-crop-readiness,
.pilot-crop-missing {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 10px 12px;
}

.pilot-crop-readiness strong {
  font-weight: 950;
}

.pilot-crop-readiness--ready {
  border-color: #b8dec6;
  background: #f1fbf5;
}

.pilot-crop-readiness--review {
  border-color: #d9c68d;
  background: #fffaf0;
}

.pilot-crop-readiness--blocked,
.pilot-crop-row-blocked {
  background: #fff8f8;
}

.pilot-crop-row-missing {
  background: #fffaf0;
}

.pilot-crop-batch-placeholder {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilot-crop-batch-placeholder small {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 800;
}

.pilot-ai-recognition-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  padding: 12px;
}

.pilot-ai-recognition-panel p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.45;
}

.pilot-ai-recognition-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pilot-ai-recognition-summary article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px;
}

.pilot-ai-recognition-summary span,
.pilot-ai-recognition-summary small {
  display: block;
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 850;
}

.pilot-ai-recognition-summary strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--brand);
  font-size: 1.08rem;
  font-weight: 950;
}

.pilot-ai-recognition-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilot-ai-recognition-actions small {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 850;
}

.pilot-crop-missing {
  align-items: flex-start;
}

.pilot-crop-missing span,
.pilot-crop-missing small {
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 800;
}

.pilot-crop-status {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #f7f8fb;
  color: var(--text);
  padding: 3px 8px;
  font-size: .78rem;
  font-weight: 900;
}

.pilot-crop-status--approved {
  border-color: #b8dec6;
  background: #eefaf3;
  color: #207a43;
}

.pilot-crop-status--generated,
.pilot-crop-status--review_needed,
.pilot-crop-status--pending {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-crop-status--rejected,
.pilot-crop-status--privacy_risk,
.pilot-crop-status--unreadable,
.pilot-crop-status--failed {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-ai-result-status {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #f7f8fb;
  color: var(--text);
  padding: 3px 8px;
  font-size: .78rem;
  font-weight: 900;
}

.pilot-ai-result-status--review_pending {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-ai-result-status--reviewed {
  border-color: #b8dec6;
  background: #eefaf3;
  color: #207a43;
}

.pilot-ai-result-status--rejected,
.pilot-ai-result-status--failed {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-ai-comparison-status {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #f7f8fb;
  color: var(--text);
  padding: 3px 8px;
  font-size: .76rem;
  font-weight: 900;
}

.pilot-ai-comparison-status--review_queue_ready,
.pilot-ai-comparison-status--human_reviewed,
.pilot-ai-comparison-status--finalized {
  border-color: #b8dec6;
  background: #eefaf3;
  color: #207a43;
}

.pilot-ai-comparison-status--human_review_pending,
.pilot-ai-comparison-status--comparison_pending {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-ai-comparison-status--rejected {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-ai-apply-badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #f7f8fb;
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: .76rem;
  font-weight: 900;
}

.pilot-ai-apply-badge--applied {
  border-color: #b8dec6;
  background: #eefaf3;
  color: #207a43;
}

.pilot-ai-apply-badge--blocked {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-crop-readiness-badge {
  display: inline-grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f7f8fb;
  padding: 6px 8px;
  font-size: .82rem;
  font-weight: 900;
}

.pilot-crop-readiness-badge strong {
  color: inherit;
  font-weight: 950;
}

.pilot-crop-readiness-badge small {
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 850;
}

.pilot-crop-readiness-badge--ready {
  border-color: #b8dec6;
  background: #eefaf3;
  color: #207a43;
}

.pilot-crop-readiness-badge--warning {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-crop-readiness-badge--danger {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-error-triage {
  display: grid;
  gap: 14px;
}

.pilot-error-triage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.pilot-error-triage-head div {
  display: grid;
  gap: 3px;
}

.pilot-error-triage-head strong {
  font-size: .98rem;
}

.pilot-error-triage-head span {
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 750;
}

.pilot-error-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.pilot-error-summary-cards article {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.pilot-error-summary-cards article.has-errors {
  border-color: #f0c7c7;
  background: #fff8f8;
}

.pilot-error-summary-cards span,
.pilot-error-summary-cards small {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 850;
}

.pilot-error-summary-cards strong {
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
}

.pilot-error-group {
  display: grid;
  gap: 8px;
}

.pilot-error-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.pilot-error-group header div {
  display: grid;
  gap: 3px;
}

.pilot-error-group header span {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 750;
}

.pilot-error-group mark {
  border-radius: var(--radius-pill);
  background: #fff1f1;
  color: var(--ux-danger);
  padding: 4px 9px;
  font-weight: 900;
}

.pilot-error-severity {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: .76rem;
  font-weight: 900;
}

.pilot-error-severity--high {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-error-severity--medium {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-crop-preview-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.pilot-crop-preview-content {
  display: grid;
  gap: 12px;
}

.pilot-crop-preview-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pilot-crop-preview-meta span {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 6px 8px;
  font-size: .84rem;
  font-weight: 850;
}

.pilot-crop-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.pilot-crop-preview-image {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: auto;
  min-height: 220px;
}

.pilot-crop-preview-image img {
  display: block;
  width: 100%;
  height: auto;
}

.pilot-crop-preview-image img.is-error {
  display: none;
}

.pilot-crop-preview-placeholder {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 20px;
  color: var(--ux-danger);
  font-weight: 850;
  text-align: center;
}

.pilot-crop-preview-status {
  display: block;
  border-top: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.pilot-crop-preview-status--loaded {
  color: var(--ux-success);
}

.pilot-crop-preview-status--error {
  color: var(--ux-danger);
  background: #fff1f1;
}

.pilot-crop-checklist {
  display: grid;
  gap: 10px;
}

.pilot-crop-checklist section {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 10px;
}

.pilot-crop-checklist label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: .84rem;
  font-weight: 800;
}

.pilot-crop-preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pilot-ai-result-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.pilot-ai-result-content {
  display: grid;
  gap: 12px;
}

.pilot-ai-result-warning,
.pilot-ai-result-source {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 10px;
  font-size: .88rem;
  font-weight: 850;
}

.pilot-ai-result-warning {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-ai-result-source {
  display: grid;
  gap: 6px;
}

.pilot-ai-result-source span {
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 800;
}

.pilot-ai-result-answer-table {
  max-height: 460px;
  overflow: auto;
}

.pilot-ai-answer-review-needed {
  background: #fffaf0;
}

.pilot-ai-review-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilot-ai-review-toolbar .active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pilot-ai-review-toolbar small {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 850;
}

.pilot-ai-apply-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilot-ai-review-note {
  display: grid;
  gap: 5px;
}

.pilot-ai-review-subtitle {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
}

.pilot-ai-result-answer-table select,
.pilot-ai-result-answer-table input {
  min-width: 86px;
}

.pilot-ai-result-answer-table .pilot-ai-answer-note {
  min-width: 140px;
}

.pilot-ai-review-needed-badge {
  display: inline-block;
  border-radius: var(--radius-pill);
  background: #fff1f1;
  color: var(--ux-danger);
  padding: 2px 7px;
  font-size: .76rem;
  font-weight: 900;
}

.pilot-ai-apply-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.pilot-ai-apply-content {
  display: grid;
  gap: 12px;
}

.pilot-ai-apply-conflict,
.pilot-ai-apply-ready {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 10px;
  font-size: .86rem;
  font-weight: 850;
}

.pilot-ai-apply-conflict {
  border-color: #f0c7c7;
  background: #fff8f8;
  color: var(--ux-danger);
}

.pilot-ai-apply-ready {
  border-color: #b8dec6;
  background: #f1fbf5;
  color: #207a43;
}

.pilot-ai-apply-answer-table {
  max-height: 360px;
  overflow: auto;
}

.pilot-ai-comparison-dialog,
.pilot-ai-human-review-dialog,
.pilot-ai-finalization-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.pilot-ai-comparison-content,
.pilot-ai-human-review-content,
.pilot-ai-finalization-content {
  display: grid;
  gap: 12px;
}

.pilot-ai-comparison-table {
  max-height: 520px;
  overflow: auto;
}

.pilot-ai-issue-chip {
  display: inline-block;
  margin: 1px 3px 1px 0;
  border: 1px solid #d9c68d;
  border-radius: var(--radius-pill);
  background: #fff8e8;
  color: #7a5900;
  padding: 2px 7px;
  font-size: .74rem;
  font-weight: 900;
}

.pilot-ai-human-review-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pilot-ai-human-review-layout figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: auto;
}

.pilot-ai-human-review-layout figcaption {
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  padding: 7px 9px;
  font-size: .82rem;
  font-weight: 900;
}

.pilot-ai-human-review-layout img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  object-fit: contain;
}

.pilot-ai-human-review-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 180px minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
}

.pilot-ai-finalization-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pilot-ai-finalization-summary span,
.pilot-ai-finalization-summary small,
.pilot-ai-finalization-blockers span,
.pilot-ai-finalization-warnings span {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #f7f8fb;
  padding: 4px 9px;
  font-size: .78rem;
  font-weight: 800;
}

.pilot-ai-finalization-blockers,
.pilot-ai-finalization-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.pilot-ai-finalization-blockers strong,
.pilot-ai-finalization-warnings strong {
  margin-right: 2px;
}

.pilot-ai-finalization-blockers span {
  border-color: #f0c7c7;
  background: #fff1f1;
  color: var(--ux-danger);
}

.pilot-ai-finalization-warnings span {
  border-color: #d9c68d;
  background: #fff8e8;
  color: #7a5900;
}

.pilot-ai-finalization-table {
  max-height: 480px;
  overflow: auto;
}

.pilot-list-section-heading {
  grid-column: 1 / -1;
}

.pilot-project-form,
.pilot-manager-form,
.pilot-student-form,
.pilot-roster-form {
  align-items: start;
}

.pilot-manager-notice,
.pilot-create-result,
.pilot-placeholder-panel,
.pilot-roster-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .72);
  padding: 14px 16px;
}

.pilot-manager-notice,
.pilot-create-result {
  display: grid;
  gap: 6px;
}

.pilot-manager-notice em,
.pilot-create-result span {
  color: var(--text-muted);
  font-style: normal;
}

.pilot-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  margin: 12px 0;
}

.pilot-status-grid strong {
  color: var(--brand);
}

.pilot-print-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.pilot-print-controls h4 {
  margin: 0 0 6px;
}

.pilot-manager-account-panel {
  display: grid;
  gap: 12px;
}

.pilot-manager-actions {
  min-width: 220px;
}

.pilot-manager-actions .table-action {
  margin: 2px;
}

.pilot-print-actions,
.pilot-manager-print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pilot-scan-form {
  align-items: start;
}

.pilot-qr-diagnostic-form {
  align-items: start;
}

.pilot-qr-diagnostic-result:empty {
  display: none;
}

.pilot-qr-diagnostic-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .78);
  padding: 14px;
}

.pilot-qr-diagnostic-card.status-success {
  border-color: rgba(37, 99, 235, .32);
}

.pilot-qr-diagnostic-card.status-failed {
  border-color: rgba(220, 38, 38, .28);
}

.pilot-qr-diagnostic-summary {
  display: grid;
  gap: 4px;
}

.pilot-qr-diagnostic-summary strong {
  color: var(--text);
}

.pilot-qr-diagnostic-summary span {
  color: var(--text-muted);
  font-size: .86rem;
}

.pilot-qr-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 0;
}

.pilot-qr-diagnostic-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, .82);
  padding: 8px;
}

.pilot-qr-diagnostic-grid dt {
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 800;
}

.pilot-qr-diagnostic-grid dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: .86rem;
}

.pilot-qr-response-preview {
  display: grid;
  gap: 10px;
}

.pilot-qr-response-preview p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: .88rem;
}

.pilot-qr-response-preview img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.pilot-scan-result:empty {
  display: none;
}

.pilot-scan-result {
  display: grid;
  gap: 10px;
}

.pilot-scan-result-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pilot-scan-result-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .74);
  padding: 10px 12px;
}

.pilot-scan-result-row strong {
  justify-self: end;
}

.pilot-scan-result-row em,
.pilot-scan-result-row code,
.pilot-scan-result-row small {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-style: normal;
  font-size: .86rem;
}

.pilot-scan-result-row.status-recognized strong {
  color: var(--normal);
}

.pilot-scan-result-row.status-review_needed strong,
.pilot-scan-result-row.status-superseded_sheet strong,
.pilot-scan-result-row.status-hold strong {
  color: var(--warning);
}

.pilot-scan-result-row.status-failed strong,
.pilot-scan-result-row.status-duplicate strong {
  color: var(--danger);
}

.pilot-reprint-count {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.pilot-manager-view-panel {
  display: grid;
  gap: 18px;
}

.pilot-manager-project-summary {
  display: grid;
  gap: 14px;
}

.pilot-manager-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .78);
  padding: 18px;
}

.pilot-manager-dashboard-card {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.pilot-manager-hero {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(460px, 1.25fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  padding: 16px;
}

.pilot-manager-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.pilot-manager-brand .kda-logo,
.pilot-manager-hero-logo {
  flex: 0 0 auto;
}

.pilot-manager-person {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pilot-manager-stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pilot-manager-stage-tabs span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 900;
}

.pilot-manager-clean-dashboard {
  padding: 0;
  overflow: visible;
}

.pilot-manager-clean-hero {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 9;
}

.pilot-manager-shell {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  width: 100%;
  align-items: start;
}

.pilot-manager-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line);
  background: var(--surface-subtle);
  padding: 14px;
  position: relative;
  align-self: start;
  width: 188px;
  min-width: 188px;
  max-width: 188px;
  min-height: 100%;
}

.pilot-manager-sidebar button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: .92rem;
  font-weight: 900;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.pilot-manager-sidebar button:hover,
.pilot-manager-sidebar button:focus-visible,
.pilot-manager-sidebar button.active {
  background: #fff;
  outline: 2px solid rgba(37, 99, 235, .18);
}

.pilot-manager-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
}

.pilot-manager-simple-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.pilot-manager-next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 12px;
}

.pilot-manager-next-action span {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 900;
}

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

.pilot-manager-dashboard-lists section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 12px;
}

.pilot-manager-dashboard-lists h4 {
  margin: 0;
  font-size: .98rem;
}

.pilot-manager-dashboard-lists ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pilot-manager-dashboard-lists button,
.pilot-manager-empty-line {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 10px;
  color: var(--text);
  text-align: left;
}

.pilot-manager-dashboard-lists button {
  cursor: pointer;
}

.pilot-manager-dashboard-lists button:hover,
.pilot-manager-dashboard-lists button:focus-visible {
  background: #fff;
  outline: 2px solid rgba(37, 99, 235, .18);
}

.pilot-manager-dashboard-lists strong {
  font-size: .9rem;
  font-weight: 900;
}

.pilot-manager-dashboard-lists span,
.pilot-manager-empty-line {
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 800;
}

.pilot-manager-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 900;
}

.pilot-manager-page-size .form-select {
  width: 84px;
}

.pilot-manager-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 900;
}

.pilot-manager-print-search {
  display: block;
}

.pilot-manager-check-panel .table-action-danger,
.pilot-manager-scan-upload .table-action-danger {
  color: var(--danger);
}

.pilot-manager-card,
.pilot-manager-stage {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .78);
  padding: 16px;
}

details.pilot-manager-card > summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  list-style-position: inside;
}

details.pilot-manager-card:not([open]) {
  padding: 14px 16px;
}

.pilot-manager-overview-card .pilot-dashboard-cards,
.pilot-manager-dashboard-card .pilot-dashboard-cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pilot-manager-inline-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pilot-manager-progress-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pilot-manager-progress-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 12px;
}

.pilot-manager-progress-list span {
  display: block;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 900;
}

.pilot-manager-progress-list strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: .98rem;
  font-weight: 950;
}

.pilot-manager-project-card h3 {
  margin: 4px 0 8px;
  font-size: 1.45rem;
}

.pilot-manager-project-card p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.pilot-manager-project-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.pilot-manager-project-card dl div,
.pilot-workflow-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 12px;
}

.pilot-manager-project-card dt,
.pilot-workflow-card span {
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 800;
}

.pilot-manager-project-card dd,
.pilot-workflow-card strong {
  display: block;
  margin: 4px 0 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
}

.pilot-manager-project-card .pilot-manager-person {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pilot-manager-project-card .pilot-manager-person div {
  min-height: 72px;
}

.pilot-manager-print-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.pilot-manager-project-card > .table-wrap {
  grid-column: 1 / -1;
}

.pilot-manager-stage,
.pilot-manager-project-card .pilot-ai-queue-card {
  grid-column: 1 / -1;
}

.pilot-manager-roster-tools,
.pilot-manager-student-form,
.pilot-manager-scan-upload {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .74);
  padding: 12px;
}

.pilot-manager-student-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.pilot-manager-student-form strong {
  grid-column: 1 / -1;
}

.pilot-manager-scan-upload span {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 700;
}

.pilot-review-panel,
.pilot-result-generation-panel {
  display: grid;
  gap: 14px;
}

.pilot-omr-review-editor {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  padding: 16px;
}

.pilot-omr-review-editor.hidden {
  display: none;
}

.pilot-omr-review-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.pilot-omr-review-image-pane {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pilot-omr-review-image {
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
}

.pilot-omr-review-image img {
  display: block;
  width: 100%;
  min-width: 320px;
  height: auto;
}

.pilot-omr-answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.pilot-omr-answer-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--surface);
}

.pilot-omr-answer-item span {
  font-weight: 900;
  color: var(--ink);
}

.pilot-omr-answer-item small {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-weight: 700;
}

.pilot-omr-answer-item.issue {
  border-color: rgba(234, 88, 12, .45);
  background: rgba(255, 247, 237, .78);
}

@media (max-width: 980px) {
  .pilot-omr-review-layout {
    grid-template-columns: 1fr;
  }
}

.pilot-manager-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.pilot-workflow-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
}

.pilot-list-layout {
  display: grid;
  gap: 14px;
}

.pilot-student-filters {
  display: grid;
  grid-template-columns: repeat(9, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.pilot-roster-preview:empty {
  display: none;
}

.pilot-roster-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-weight: 800;
}

.pilot-roster-preview-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.pilot-roster-preview-list h5 {
  margin: 0;
  font-size: .92rem;
}

.pilot-roster-preview-list span {
  color: var(--text-muted);
  font-size: .9rem;
}

.pilot-list-layout code {
  color: var(--text);
  font-size: .82rem;
  word-break: break-all;
}

@media (max-width: 980px) {
  .pilot-section-heading,
  .pilot-ai-queue-card,
  .pilot-manager-hero,
  .pilot-manager-inline-controls {
    grid-template-columns: 1fr;
  }

  .pilot-dashboard-cards,
  .pilot-manager-progress-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-manager-person {
    grid-template-columns: 1fr;
  }

  .pilot-assessment-grid {
    grid-template-columns: 1fr;
  }

  .pilot-manager-project-card,
  .pilot-manager-workflow-grid,
  .pilot-manager-shell {
    grid-template-columns: 1fr;
  }

  .pilot-manager-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .pilot-print-controls {
    grid-template-columns: 1fr;
  }

  .pilot-print-actions {
    justify-content: flex-start;
  }

  .pilot-student-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.billing-reset-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-color: rgba(224, 89, 89, .26);
  background: #fffafa;
}
.billing-reset-panel .warning-text {
  margin: 6px 0 0;
  color: #9f4c0b;
  font-size: 13px;
  font-weight: 800;
}
.institution-manager-grid .panel {
  align-content: start;
}
.institution-manager-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.institution-manager-info .detail-item {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fbff;
}
.institution-manager-info .detail-item strong {
  color: #516276;
  font-size: 12px;
}
.institution-manager-profile-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.institution-manager-profile-form label {
  display: grid;
  gap: 5px;
  color: #516276;
  font-size: 12px;
  font-weight: 800;
}
.institution-manager-profile-form .email-field,
.institution-manager-user-form .email-field {
  gap: 5px;
  color: #516276;
  font-size: 12px;
}
.institution-manager-profile-form .institution-manager-email-field,
.institution-manager-user-form .institution-manager-email-field {
  grid-column: 1 / -1;
}
.institution-manager-profile-actions {
  justify-content: flex-end;
  margin-top: 12px;
}
.institution-manager-user-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #f8fbff;
}
.institution-manager-user-form .admin-form-actions {
  grid-column: span 2;
  justify-content: flex-end;
  align-self: end;
}
.institution-manager-user-form input[readonly] {
  background: #eef4fb;
  color: #526273;
  cursor: default;
}
.institution-manager-admin-user-row {
  background: #fff7ed;
}
.institution-manager-grid .user-status-cell {
  vertical-align: middle;
}
.institution-manager-placeholder {
  border-style: dashed;
  background: #f8fbff;
}
.institution-manager-placeholder p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.danger-ghost {
  border-color: rgba(224, 89, 89, .42);
  color: #b33a3a;
  background: #fff;
}
.danger-ghost:hover,
.danger-ghost:focus-visible {
  border-color: rgba(224, 89, 89, .62);
  background: #fff0f0;
}
.billing-cell-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8fbff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.billing-cell-button:hover,
.billing-cell-button:focus-visible {
  border-color: var(--brand-2);
  background: #eaf4ff;
  outline: none;
}
.billing-cell-button.readonly {
  cursor: help;
}
.billing-cell-button strong,
.billing-cell-button .billing-line-main {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}
.billing-cell-button small,
.billing-cell-button span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}
.billing-limit-col,
.billing-limit-cell {
  width: 18%;
  max-width: 240px;
}
.institution-item {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
}
.institution-item-main,
.institution-policy-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.institution-item-main span:not(.policy-badge):not(.badge) {
  color: var(--muted);
  font-size: 13px;
}
.institution-policy-controls select,
.institution-policy-controls input {
  min-height: var(--form-control-height);
}
.policy-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.policy-badge.muted {
  margin-top: 4px;
  color: #38617f;
  background: #eef5fb;
}
.link-button { padding: 0; min-height: 0; border: 0; background: transparent; color: var(--brand); font-weight: 900; text-decoration: underline; }
.detail-panel { padding: 20px; }
.detail-section { margin-bottom: 22px; }
.detail-section h3 { margin: 0 0 10px; }
.detail-list { display: grid; gap: 8px; }
.detail-item { padding: 10px 12px; border: 1px solid var(--line); background: #fff; }
.admin-password-reset-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.question-admin-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.question-admin-head select { max-width: 180px; }
.question-admin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.question-admin-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.question-edit-row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: start; }
.question-edit-row span { padding: 9px 0; font-weight: 800; text-align: center; background: #e6edf6; }
.question-edit-row textarea { width: 100%; min-height: 54px; padding: 9px 11px; border: 1px solid #cbd2dc; resize: vertical; font: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--soft); border: 1px solid var(--line); }
.chip button { min-height: 0; padding: 0 4px; border: 0; background: transparent; color: var(--risk); }
.hint { margin: 12px 0 0; color: var(--muted); }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 24px; }
.donut-wrap svg { width: 220px; }
.legend-list { display: grid; gap: 10px; }
.legend-list div { display: flex; align-items: center; gap: 8px; }
.legend-list span { width: 14px; height: 14px; display: inline-block; }

/* Unified institutional dashboard system */
.app-header,
.tabs,
main {
  width: min(var(--container-max), calc(100% - (var(--container-gutter) * 2)));
  margin-right: auto;
  margin-left: auto;
}

.app-header {
  min-height: 120px;
  margin-top: var(--space-6);
  padding: var(--card-padding) 34px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.16), transparent 26%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-blue) 100%);
  box-shadow: var(--shadow-lg);
}

.app-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  min-width: 0;
}

.app-brand-text {
  min-width: 0;
}

.app-header .kda-logo-header,
.app-header .kda-logo-header img {
  height: 55px;
}

.app-header .kda-logo-header {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .14));
}

.app-header h1 {
  margin: 4px 0 0;
  color: var(--text-on-brand);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.18;
}

.app-header .eyebrow {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  font-weight: 800;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.header-actions span,
.header-actions button,
.header-actions .file-label {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.header-actions button,
.header-actions .file-label {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.header-actions button:hover,
.header-actions button:focus-visible,
.header-actions .file-label:hover,
.header-actions .file-label:focus-within {
  border-color: rgba(255, 255, 255, .58);
  color: var(--brand);
  background: rgba(255, 255, 255, .92);
}

.header-actions button:focus-visible,
.header-actions .file-label:focus-within {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(204, 234, 255, .32);
}

.header-actions button:active {
  background: rgba(255, 255, 255, .84);
}

.header-actions .header-settings-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 999px;
}

.header-actions .header-settings-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: inherit;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.header-actions #currentUserLabel:hover,
.header-actions #currentUserLabel:focus-visible {
  border-color: rgba(255, 255, 255, .58);
  color: var(--brand);
  background: rgba(255, 255, 255, .92);
}

.header-actions .header-user-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(390px, 100%);
  min-width: 0;
  white-space: nowrap;
  font-weight: 900;
}

.header-actions .header-user-info span {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.header-user-info-identity {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-info-separator {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .66);
}

.header-user-info-credit {
  flex: 0 0 auto;
}

.header-actions .charge-request-pending-badge {
  border-color: rgba(244, 213, 141, .58);
  background: rgba(255, 247, 223, .22);
  font-weight: 900;
}
.header-actions .app-message-badge.has-unread {
  border-color: rgba(186, 230, 253, .72);
  background: rgba(14, 165, 233, .28);
}

.tabs {
  gap: 8px;
  align-items: center;
  min-height: 72px;
  padding: 14px var(--space-6);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 28px rgba(15, 45, 80, .06);
}

.tab {
  min-width: 128px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.tab:hover {
  background: #eef5ff;
}

.tab.disabled,
.tab.disabled:hover {
  color: #8aa0b8;
  background: #f2f6fb;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .68;
}

.tab.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(47, 128, 237, .22);
}

main {
  padding: var(--section-gap) 0 72px;
}

.section-head {
  align-items: center;
  margin-bottom: 20px;
  padding: 4px 4px 0;
}

.section-head h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
}

.section-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.user-area-title {
  display: none;
}
.user-area-head {
  min-height: 0;
  margin-bottom: 14px;
  padding: 0 4px;
}
.user-area-head > div:first-child {
  min-width: 0;
}
.user-area-head p {
  max-width: 860px;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.panel,
.table-wrap,
.summary-card,
.detail-panel {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.panel {
  padding: var(--card-padding);
}

.panel.compact {
  padding: var(--card-padding-compact);
}

.user-workspace-frame {
  display: grid;
  gap: 18px;
  padding: 30px 32px;
  border-color: #d8e5f2;
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: 0 18px 44px rgba(20, 55, 90, .08);
}

.panel h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.segmented {
  overflow: hidden;
  padding: 4px;
  border: 1px solid #bdd3ea;
  border-radius: 999px;
  background: #f4f8fd;
}

.segmented button {
  min-width: 116px;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--brand);
  background: transparent;
}

.segmented button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(47, 128, 237, .22);
}

.form-grid {
  gap: 18px 18px;
}

label,
.inline-field {
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

input,
select,
textarea {
  min-height: var(--form-control-height);
  padding: 0 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--control-bg);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
  min-height: 72px;
  padding: 12px 14px;
}

input::placeholder,
textarea::placeholder {
  color: #8a96a8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 2px;
}

input[readonly],
input:disabled,
select:disabled {
  color: #566174;
  background: var(--control-disabled-bg);
}

.inline-field {
  min-height: var(--form-control-height);
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  background: var(--control-bg);
}

.inline-field legend {
  color: var(--ink);
}

.inline-field input,
.question-table input {
  accent-color: var(--accent);
}

.question-tools {
  margin: 28px 0 18px;
  padding: 22px 0 0;
  border-top: 1px solid var(--divider);
}

.question-tools strong {
  color: var(--ink);
  font-size: 17px;
}

.question-tools span {
  color: var(--muted);
  font-size: 15px;
}

#omrInput {
  width: min(420px, 100%);
  max-width: none;
}

.question-table,
.table-wrap table {
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.question-table th,
.table-wrap th {
  height: 50px;
  border-bottom: 0;
  background: var(--table-head);
  color: var(--table-head-text);
  font-weight: 900;
}

.question-table th:first-child,
.table-wrap th:first-child {
  border-top-left-radius: 14px;
}

.question-table th:last-child,
.table-wrap th:last-child {
  border-top-right-radius: 14px;
}

.question-table td,
.table-wrap td {
  border-bottom: 1px solid #e7edf5;
  color: var(--ink);
}

.question-table tr:hover td,
.table-wrap tbody tr:hover td {
  background: var(--table-row-hover);
}

#usersAdmin tr.user-personal-user-row td {
  background: #f3f4f6;
}

#usersAdmin tr.user-institution-staff-row td {
  background: #ede9fe;
}

#usersAdmin tr.user-institution-manager-row td {
  background: #dcfce7;
}

#usersAdmin tr.user-admin-row td {
  background: #e0f2fe;
}

#usersAdmin tr.user-chief-admin-row td {
  background: #fff3c4;
}

#usersAdmin tr.user-personal-user-row:hover td {
  background: #e5e7eb;
}

#usersAdmin tr.user-institution-staff-row:hover td {
  background: #ddd6fe;
}

#usersAdmin tr.user-institution-manager-row:hover td {
  background: #bbf7d0;
}

#usersAdmin tr.user-admin-row:hover td {
  background: #bae6fd;
}

#usersAdmin tr.user-chief-admin-row:hover td {
  background: #fde68a;
}

#usersAdmin td.actions {
  display: table-cell;
  vertical-align: middle;
}

#usersAdmin .user-status-cell {
  vertical-align: middle;
}

#usersAdmin .user-status-toggle,
.institution-manager-grid .user-status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-sizing: border-box;
  box-shadow: 0 8px 18px rgba(15, 45, 80, .1);
}

#usersAdmin button.user-status-toggle,
.institution-manager-grid button.user-status-toggle {
  cursor: pointer;
}

#usersAdmin button.user-status-toggle:hover,
.institution-manager-grid button.user-status-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 45, 80, .16);
}

#usersAdmin button.user-status-toggle:focus-visible,
.institution-manager-grid button.user-status-toggle:focus-visible {
  outline: 3px solid rgba(47, 128, 237, .26);
  outline-offset: 2px;
}

#usersAdmin .user-status-toggle.is-active,
.institution-manager-grid .user-status-toggle.is-active {
  background: #2563eb;
}

#usersAdmin .user-status-toggle.is-inactive,
.institution-manager-grid .user-status-toggle.is-inactive {
  background: #f97316;
}

#usersAdmin .user-status-toggle.is-deleted,
.institution-manager-grid .user-status-toggle.is-deleted {
  background: #d9534f;
}

#usersAdmin .user-status-toggle.is-protected,
.institution-manager-grid .user-status-toggle.is-protected {
  cursor: default;
  box-shadow: none;
}

#usersAdmin .user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 34px;
  height: 100%;
  margin: 0;
  flex-wrap: wrap;
}

#usersAdmin .user-row-actions button {
  align-self: center;
  margin: 0;
}

.question-table .no {
  color: var(--brand);
  background: var(--table-row-accent);
}

.question-table .question-text {
  color: #243148;
  font-size: 16px;
  line-height: 1.7;
}

.question-table .scale {
  width: 52px;
}

.question-table input {
  width: 20px;
  min-height: 20px;
}

button,
.file-label {
  min-height: var(--button-height);
  padding: 10px 17px;
  border: 1px solid var(--button-border);
  border-radius: var(--radius-control);
  color: var(--brand);
  background: var(--button-bg);
  font-weight: 900;
  transition: transform .12s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

button:hover,
.file-label:hover {
  border-color: #a9c4df;
  background: #f7fbff;
}

button:active {
  transform: translateY(1px);
}

.primary {
  color: var(--text-on-brand);
  border-color: var(--button-primary-bg);
  background: var(--button-primary-bg);
  box-shadow: var(--button-primary-shadow);
}

.primary:hover {
  border-color: var(--button-primary-bg-hover);
  background: var(--button-primary-bg-hover);
}

.ghost {
  color: var(--brand);
  background: #f8fafd;
}

.form-actions {
  gap: 12px;
  margin-top: 24px;
}

.filter-grid {
  gap: 14px;
}

.summary-grid {
  gap: 14px;
  margin: 20px 0;
}

.summary-card {
  padding: 18px;
}

.summary-card strong {
  color: var(--brand);
  font-size: 26px;
  font-weight: 900;
}

.summary-card span {
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-table);
}

.table-wrap th,
.table-wrap td {
  padding: 14px 16px;
}

.badge {
  border-radius: var(--badge-radius);
}

.chart-grid,
.admin-grid {
  gap: 18px;
}

.chart-box {
  min-height: 320px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafd);
}

.row-form,
.school-form,
.user-form,
.plan-row,
.mini-form .criteria-row {
  gap: 12px;
}

.chips {
  gap: 10px;
}

.chip,
.detail-item,
.question-edit-row span {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.question-edit-row textarea {
  border-color: #c9d6e5;
  border-radius: 12px;
}

.hint {
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.6;
}

/* Reusable component aliases for the DISK design system */
.app-shell,
.main-content {
  width: min(var(--container-max), calc(100% - (var(--container-gutter) * 2)));
  margin: 0 auto;
}

.brand-header {
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.16), transparent 26%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-blue) 100%);
}

.top-tab-navigation {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
}

.page-title,
.section-header {
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
}

.card,
.chart-panel,
.summary-panel,
.score-card,
.screen-chart-card,
.screen-result-table-section,
.info-alert,
.risk-alert,
.empty-state {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.card,
.chart-panel,
.summary-panel,
.score-card,
.screen-chart-card,
.screen-result-table-section {
  padding: var(--card-padding);
}

.action-button,
.primary-button,
.secondary-button,
.ghost-button {
  min-height: var(--button-height);
  padding: 10px 18px;
  border-radius: var(--radius-control);
  font-weight: 900;
}

.primary-button {
  color: var(--text-on-brand);
  border: 1px solid var(--button-primary-bg);
  background: var(--button-primary-bg);
  box-shadow: var(--button-primary-shadow);
}

.secondary-button {
  color: var(--brand);
  border: 1px solid var(--button-border);
  background: var(--button-bg);
}

.ghost-button {
  color: var(--brand);
  border: 1px solid transparent;
  background: transparent;
}

.form-grid,
.form-grid-component {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 20px 24px;
}

.form-field,
.text-field,
.select-field,
.date-field {
  display: grid;
  gap: 8px;
}

.radio-group,
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.segmented-control {
  display: inline-flex;
  overflow: hidden;
  padding: 4px;
  border: 1px solid #bdd3ea;
  border-radius: 999px;
  background: #f4f8fd;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  background: var(--table-head);
  color: var(--table-head-text);
}

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: var(--badge-radius);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.info-alert,
.risk-alert,
.empty-state {
  padding: 18px 20px;
  line-height: 1.7;
}

.info-alert {
  color: var(--info-text);
  background: var(--info-bg);
  border-color: var(--info-border);
}

.risk-alert {
  color: var(--risk-text);
  background: var(--risk-bg);
  border-color: var(--risk-border);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  background: var(--surface-subtle);
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

/* 검사 입력 page: data-entry optimized card */
#examView {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#examView .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 0 4px;
  border-bottom: 0;
}

#examView .section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 2.7vw, 38px);
}

#examView .section-head p {
  max-width: 820px;
  color: var(--muted);
}

#examForm.panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  background: var(--surface-raised);
}

#examForm .form-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 20px 24px;
}

#examForm .exam-input-section,
#examForm .exam-section-grid {
  display: contents;
}

#examForm .exam-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

#examForm .exam-section-head h3 {
  margin: 0;
  color: var(--brand);
  font-size: 19px;
}

#examForm .exam-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#examForm .exam-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#examForm label,
#examForm .inline-field {
  min-width: 0;
}

.required-mark {
  color: #d9534f;
  font-weight: 900;
  margin-left: 2px;
}
.field-required {
  color: #d9534f;
  font-weight: 900;
  margin-left: 2px;
}

.field-label-text {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

#examForm .individual-row-start {
  grid-column-start: 1;
}

#examForm input,
#examForm select {
  min-height: var(--form-control-height);
}

.grade-affiliation-control {
  display: grid;
  grid-template-columns: minmax(88px, .85fr) minmax(116px, 1.15fr);
  gap: 8px;
  align-items: center;
}

.grade-affiliation-control select {
  width: 100%;
}

@media (max-width: 520px) {
  .grade-affiliation-control {
    grid-template-columns: 1fr;
  }
}

#examForm:not(.group-mode) .exam-field--name { order: 1; }
#examForm:not(.group-mode) .exam-field--grade { order: 2; }
#examForm:not(.group-mode) .exam-field--gender { order: 3; }
#examForm:not(.group-mode) .exam-field--exam-date { order: 4; }
#examForm:not(.group-mode) .exam-field--birth-date { order: 5; }
#examForm:not(.group-mode) .exam-field--age { order: 6; }
#examForm:not(.group-mode) .exam-field--school { order: 7; }
#examForm:not(.group-mode) .exam-field--class-no { order: 8; }
#examForm:not(.group-mode) .exam-field--student-no { order: 9; }
#examForm:not(.group-mode) .exam-field--institution { order: 10; }
#examForm:not(.group-mode) .exam-field--project { order: 11; }
#examForm:not(.group-mode) .exam-field--province { order: 12; }
#examForm:not(.group-mode) .exam-field--regional { order: 13; }
#examForm:not(.group-mode) .exam-field--test-level { order: 14; }

#examForm.group-mode .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

#examForm.group-mode .exam-input-section {
  display: block;
  padding: 20px;
  border: 1px solid rgba(191, 219, 254, .75);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(15, 45, 80, .05);
  outline: none;
  transition: border-color 0s;
}

#examForm.group-mode .exam-input-section:hover {
  border-color: rgba(191, 219, 254, .75);
  box-shadow: none;
}

#examForm.group-mode .exam-input-section:focus-within {
  border-color: rgba(147, 197, 253, .45);
  background: rgba(239, 246, 255, .45);
  box-shadow: none;
}

#examForm.group-mode .exam-input-section.is-active {
  border-color: rgba(80, 140, 210, .72);
  background: rgba(239, 246, 255, .45);
  box-shadow: none;
}

#examForm.group-mode .exam-group-section,
#examForm.group-mode .exam-person-section,
.self-entry-exam-form.group-mode .self-entry-group-section,
.self-entry-exam-form.group-mode .self-entry-person-section {
  border-color: rgba(219, 234, 254, .82) !important;
  outline: 0 !important;
}

#examForm.group-mode .exam-group-section:hover,
#examForm.group-mode .exam-person-section:hover,
.self-entry-exam-form.group-mode .self-entry-group-section:hover,
.self-entry-exam-form.group-mode .self-entry-person-section:hover {
  border-color: rgba(219, 234, 254, .82) !important;
  box-shadow: none !important;
}

#examForm.group-mode .exam-group-section:focus-within,
#examForm.group-mode .exam-person-section:focus-within,
#examForm.group-mode .exam-group-section.is-active,
#examForm.group-mode .exam-person-section.is-active,
.self-entry-exam-form.group-mode .self-entry-group-section:focus-within,
.self-entry-exam-form.group-mode .self-entry-person-section:focus-within,
.self-entry-exam-form.group-mode .self-entry-group-section.is-active,
.self-entry-exam-form.group-mode .self-entry-person-section.is-active {
  border-color: rgba(80, 140, 210, .72) !important;
  background: rgba(239, 246, 255, .38) !important;
  box-shadow: none !important;
}

#examForm.group-mode .exam-group-section {
  order: 1;
}

#examForm.group-mode .exam-person-section {
  order: 2;
}

#examForm.group-mode .exam-section-grid {
  display: grid;
  gap: 18px 20px;
}

#examForm.group-mode .exam-group-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

#examForm.group-mode .exam-person-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

#examForm.group-mode .individual-row-start {
  grid-column-start: auto;
}

#examForm.group-mode .exam-field--project { order: 1; }
#examForm.group-mode .exam-field--province { order: 2; }
#examForm.group-mode .exam-field--regional { order: 3; }
#examForm.group-mode .exam-field--city { order: 4; }
#examForm.group-mode .exam-field--school { order: 5; }
#examForm.group-mode .exam-field--institution { order: 6; }
#examForm.group-mode .exam-field--test-level { order: 1; }
#examForm.group-mode .exam-field--name { order: 2; }
#examForm.group-mode .exam-field--gender { order: 3; }
#examForm.group-mode .exam-field--exam-date { order: 4; }
#examForm.group-mode .exam-field--grade {
  order: 5;
  grid-column-start: 1;
}
#examForm.group-mode .exam-field--class-no { order: 6; }
#examForm.group-mode .exam-field--student-no { order: 7; }
#examForm.group-mode .exam-field--birth-date { order: 8; }
#examForm.group-mode .exam-field--age { order: 9; }

#examForm.exam-form--adaptive .form-grid {
  --exam-grid-unit: var(--layout-editor-grid-unit);
  --exam-field-gap-inline: var(--layout-editor-grid-gap);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px var(--exam-field-gap-inline);
  width: 100%;
  max-width: none;
  min-width: 0;
}

.layout-edit-mode-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #bfd7ee;
  border-radius: 14px;
  background: #f4faff;
  box-shadow: 0 10px 24px rgba(21, 74, 112, .08);
}

.layout-edit-mode-banner strong {
  display: block;
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}

.layout-edit-mode-banner p {
  margin: 0;
  color: #4c6479;
  font-size: 13px;
  font-weight: 800;
}

.layout-edit-inline-warning {
  min-height: 18px;
  margin: 4px 0 0;
  color: var(--warning);
  font-size: 12px;
  font-weight: 900;
}

.layout-edit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.layout-edit-actions button {
  min-height: 36px;
}

.layout-edit-surface {
  --layout-edit-grid-unit: var(--layout-editor-grid-unit);
  --layout-edit-grid-gap: var(--layout-editor-grid-gap);
  --layout-edit-grid-step: var(--layout-editor-grid-step);
  --layout-edit-grid-color: rgba(93, 137, 176, .14);
}

.layout-edit-grid {
  width: 100%;
  max-width: none;
  min-width: 0;
  background-image:
    linear-gradient(var(--layout-edit-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--layout-edit-grid-color) 1px, transparent 1px);
}

.layout-edit-target {
  position: relative;
}

#examForm.layout-edit-mode {
  border-color: #a8cceb;
  background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
}

#examForm.layout-edit-mode .form-grid,
#examForm.layout-edit-mode .exam-section-grid {
  width: 100%;
  max-width: none;
  min-width: 0;
  border-radius: 16px;
  background-image:
    linear-gradient(var(--layout-edit-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--layout-edit-grid-color) 1px, transparent 1px);
  background-size: var(--layout-edit-grid-step) 44px;
  background-position: -1px -1px;
}

#examForm.layout-edit-mode .layout-editable-field {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  outline: 0;
  box-shadow: none;
  cursor: grab;
  transition: outline-color .14s ease, box-shadow .14s ease, opacity .14s ease, transform .14s ease;
}

#examForm.layout-edit-mode .layout-editable-field > .form-control,
#examForm.layout-edit-mode .layout-editable-field > .form-select,
#examForm.layout-edit-mode .layout-editable-field > .combobox-wrap,
#examForm.layout-edit-mode .layout-editable-field > .date-picker-control,
#examForm.layout-edit-mode .layout-editable-field > .grade-affiliation-control,
#examForm.layout-edit-mode .layout-editable-field > .gender-options {
  outline: 1px dashed #8bb8dc;
  outline-offset: 3px;
  border-radius: var(--radius-control);
  cursor: grab;
  transition: outline-color .14s ease, box-shadow .14s ease;
}

#examForm.layout-edit-mode .layout-editable-field:hover > .form-control,
#examForm.layout-edit-mode .layout-editable-field:hover > .form-select,
#examForm.layout-edit-mode .layout-editable-field:hover > .combobox-wrap,
#examForm.layout-edit-mode .layout-editable-field:hover > .date-picker-control,
#examForm.layout-edit-mode .layout-editable-field:hover > .grade-affiliation-control,
#examForm.layout-edit-mode .layout-editable-field:hover > .gender-options {
  outline-color: #6fa6d2;
  box-shadow: 0 0 0 2px rgba(111, 166, 210, .08);
}

#examForm.layout-edit-mode .layout-editable-field.is-dragging {
  opacity: .62;
  cursor: grabbing;
  box-shadow: 0 14px 28px rgba(21, 74, 112, .16);
  transform: translateY(-1px);
}

#examForm.layout-edit-mode .layout-editable-field.is-resizing,
#examForm.layout-edit-mode.is-layout-resizing {
  cursor: ew-resize;
}

#examForm.layout-edit-mode .layout-editable-field.is-dragging > .form-control,
#examForm.layout-edit-mode .layout-editable-field.is-dragging > .form-select,
#examForm.layout-edit-mode .layout-editable-field.is-dragging > .combobox-wrap,
#examForm.layout-edit-mode .layout-editable-field.is-dragging > .date-picker-control,
#examForm.layout-edit-mode .layout-editable-field.is-dragging > .grade-affiliation-control,
#examForm.layout-edit-mode .layout-editable-field.is-dragging > .gender-options {
  outline-color: var(--brand);
  cursor: grabbing;
}

#examForm.layout-edit-mode .layout-editable-field.is-drop-before::before,
#examForm.layout-edit-mode .layout-editable-field.is-drop-after::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  z-index: 5;
  width: 3px;
  border-radius: 999px;
  background: #2d7ee6;
  box-shadow: 0 0 0 3px rgba(45, 126, 230, .14);
  pointer-events: none;
}

#examForm.layout-edit-mode .layout-editable-field.is-drop-before::before {
  left: -10px;
}

#examForm.layout-edit-mode .layout-editable-field.is-drop-after::before {
  right: -10px;
}

.layout-edit-interaction-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 10px;
  cursor: grab;
  background: transparent;
}

#examForm.layout-edit-mode .layout-editable-field.is-dragging .layout-edit-interaction-layer {
  cursor: grabbing;
}

.layout-edit-field-tools {
  position: absolute;
  top: 26px;
  right: -10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.layout-edit-field-tools button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid #c7d9e9;
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: #7197b5;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  opacity: .48;
  transition: opacity .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
}

#examForm.layout-edit-mode .layout-editable-field:hover .layout-edit-field-tools button,
#examForm.layout-edit-mode .layout-editable-field:focus-within .layout-edit-field-tools button {
  opacity: .82;
}

.layout-edit-field-tools button:hover,
.layout-edit-field-tools button:focus-visible {
  border-color: #93b9da;
  color: var(--brand);
  background: #fff;
}

.layout-edit-drag-handle {
  cursor: grab;
  letter-spacing: -2px;
}

.layout-edit-drag-handle:active {
  cursor: grabbing;
}

#examForm.layout-edit-mode .layout-editable-field::after {
  display: none;
}

.layout-edit-size-button {
  position: absolute;
  right: -7px;
  bottom: -8px;
  z-index: 4;
  min-width: 42px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #bdd4e8;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #537d9f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: ew-resize;
  box-shadow: 0 3px 8px rgba(21, 74, 112, .08);
}

.layout-edit-size-button::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 1px;
  opacity: .72;
}

.layout-edit-size-button:hover,
.layout-edit-size-button:focus-visible {
  border-color: #8fb8d8;
  background: #fff;
  color: var(--brand);
}

#resultsView.result-layout-edit-mode .result-filter-card,
#statsView.stats-layout-edit-mode .stats-filter-card {
  grid-template-columns: minmax(0, 1fr);
  border-color: #a8cceb;
  background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
}

#resultsView.result-layout-edit-mode #resultFilters,
#statsView.stats-layout-edit-mode #statsFilters {
  --result-grid-unit: var(--layout-editor-grid-unit);
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(var(--layout-editor-grid-unit), var(--layout-editor-grid-unit)));
  gap: 14px var(--layout-editor-grid-gap);
  width: 100%;
  max-width: none;
  min-width: 0;
  border-radius: 16px;
  background-image:
    linear-gradient(var(--layout-edit-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--layout-edit-grid-color) 1px, transparent 1px);
  background-size: var(--layout-edit-grid-step) 44px;
  background-position: -1px -1px;
}

#resultFilters .result-layout-filter-field {
  grid-column: span var(--result-filter-span, 4);
}

#resultsView #resultFilters .result-layout-filter-field {
  grid-column: span var(--result-filter-span, 4);
}

#statsFilters .stats-layout-filter-field,
#statsView #statsFilters .stats-layout-filter-field {
  grid-column: span var(--stats-filter-span, 4);
}

#resultsView.result-layout-edit-mode .result-layout-filter-field,
#statsView.stats-layout-edit-mode .stats-layout-filter-field,
#resultsView.result-layout-edit-mode .result-layout-editable-column {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  outline: 0;
  box-shadow: none;
  cursor: grab;
}

#resultsView.result-layout-edit-mode .result-layout-filter-field > .form-control,
#resultsView.result-layout-edit-mode .result-layout-filter-field > .form-select,
#resultsView.result-layout-edit-mode .result-layout-filter-field > .combobox-wrap,
#resultsView.result-layout-edit-mode .result-layout-filter-field > .date-picker-control,
#statsView.stats-layout-edit-mode .stats-layout-filter-field > .form-control,
#statsView.stats-layout-edit-mode .stats-layout-filter-field > .form-select,
#statsView.stats-layout-edit-mode .stats-layout-filter-field > .combobox-wrap,
#statsView.stats-layout-edit-mode .stats-layout-filter-field > .date-picker-control {
  outline: 1px dashed #8bb8dc;
  outline-offset: 3px;
  border-radius: var(--radius-control);
  cursor: grab;
}

#resultsView.result-layout-edit-mode .result-layout-filter-field:hover > .form-control,
#resultsView.result-layout-edit-mode .result-layout-filter-field:hover > .form-select,
#resultsView.result-layout-edit-mode .result-layout-filter-field:hover > .combobox-wrap,
#resultsView.result-layout-edit-mode .result-layout-filter-field:hover > .date-picker-control,
#statsView.stats-layout-edit-mode .stats-layout-filter-field:hover > .form-control,
#statsView.stats-layout-edit-mode .stats-layout-filter-field:hover > .form-select,
#statsView.stats-layout-edit-mode .stats-layout-filter-field:hover > .combobox-wrap,
#statsView.stats-layout-edit-mode .stats-layout-filter-field:hover > .date-picker-control {
  outline-color: #6fa6d2;
  box-shadow: 0 0 0 2px rgba(111, 166, 210, .08);
}

#resultsView.result-layout-edit-mode .result-layout-editable-column {
  outline: 1px dashed #8bb8dc;
  outline-offset: -4px;
  cursor: grab;
  padding: 12px 14px;
  background: #303843;
  color: #fff;
}

#resultsView.result-layout-edit-mode .result-layout-editable-column:hover {
  outline-color: #6fa6d2;
  box-shadow: inset 0 0 0 2px rgba(111, 166, 210, .08);
}

#resultsView.result-layout-edit-mode .result-layout-filter-field.is-dragging,
#statsView.stats-layout-edit-mode .stats-layout-filter-field.is-dragging,
#resultsView.result-layout-edit-mode .result-layout-editable-column.is-dragging {
  opacity: .62;
  cursor: grabbing;
  box-shadow: 0 14px 28px rgba(21, 74, 112, .16);
}

#resultsView.result-layout-edit-mode .result-layout-filter-field.is-resizing,
#statsView.stats-layout-edit-mode .stats-layout-filter-field.is-resizing,
#resultsView.result-layout-edit-mode .result-layout-editable-column.is-resizing,
#resultsView.result-layout-edit-mode.is-layout-resizing,
#statsView.stats-layout-edit-mode.is-layout-resizing {
  cursor: ew-resize;
}

#resultsView.result-layout-edit-mode .layout-editable-field.is-drop-before::before,
#resultsView.result-layout-edit-mode .layout-editable-field.is-drop-after::before,
#statsView.stats-layout-edit-mode .layout-editable-field.is-drop-before::before,
#statsView.stats-layout-edit-mode .layout-editable-field.is-drop-after::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  z-index: 7;
  width: 3px;
  border-radius: 999px;
  background: #2d7ee6;
  box-shadow: 0 0 0 3px rgba(45, 126, 230, .14);
  pointer-events: none;
}

#resultsView.result-layout-edit-mode .layout-editable-field.is-drop-before::before,
#statsView.stats-layout-edit-mode .layout-editable-field.is-drop-before::before {
  left: -10px;
}

#resultsView.result-layout-edit-mode .layout-editable-field.is-drop-after::before,
#statsView.stats-layout-edit-mode .layout-editable-field.is-drop-after::before {
  right: -10px;
}

#resultsView.result-layout-edit-mode .result-layout-editable-column .layout-edit-field-tools {
  top: 7px;
  right: 20px;
}

#resultsView.result-layout-edit-mode .result-layout-editable-column .layout-edit-size-button {
  right: 4px;
  bottom: 4px;
  z-index: 10;
  pointer-events: auto;
}

#resultsView.result-layout-edit-mode .result-layout-filter-field .layout-edit-size-button,
#statsView.stats-layout-edit-mode .stats-layout-filter-field .layout-edit-size-button {
  right: -7px;
  bottom: -8px;
}

#resultsView.result-layout-edit-mode .result-layout-filter-field:hover .layout-edit-field-tools button,
#statsView.stats-layout-edit-mode .stats-layout-filter-field:hover .layout-edit-field-tools button,
#resultsView.result-layout-edit-mode .result-layout-editable-column:hover .layout-edit-field-tools button {
  opacity: .82;
}

#resultsView.result-layout-edit-mode .result-sort-trigger,
#resultsView.result-layout-edit-mode .result-sort-menu,
#resultsView.result-layout-edit-mode .result-row-actions button {
  pointer-events: none;
}

#resultsView .result-column-label,
#resultsView th:not(.sortable-result-head) > .result-column-label,
#resultsView.result-layout-edit-mode .result-layout-editable-column > .result-column-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  color: inherit;
  font: inherit;
  line-height: 1.25;
  white-space: nowrap;
}

#resultsView.result-layout-edit-mode .result-layout-editable-column > .result-sort-trigger {
  display: none;
}

.results-table-wrap th[data-result-layout-column-key],
.results-table-wrap td[data-result-layout-column-key] {
  width: var(--result-column-width);
  max-width: var(--result-column-width);
}

#examForm.exam-form--adaptive:not(.group-mode) .exam-input-section,
#examForm.exam-form--adaptive:not(.group-mode) .exam-section-grid {
  display: contents;
}

#examForm.exam-form--adaptive.group-mode .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: none;
}

#examForm.exam-form--adaptive.group-mode .exam-section-grid {
  --exam-grid-unit: var(--layout-editor-grid-unit);
  --exam-field-gap-inline: var(--layout-editor-grid-gap);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px var(--exam-field-gap-inline);
  width: 100%;
  max-width: none;
  min-width: 0;
}

#examForm.exam-form--adaptive .exam-layout-field {
  flex: var(--exam-field-grow, 0) 1 var(--exam-field-basis, var(--layout-editor-span-4));
  min-width: 0;
  max-width: var(--exam-field-max, var(--layout-editor-span-4));
}

#examForm.exam-form--adaptive .form-field--span1 {
  --exam-field-span: 1;
  --exam-field-basis: var(--layout-editor-span-1);
  --exam-field-max: var(--layout-editor-span-1);
}

#examForm.exam-form--adaptive .form-field--xs {
  --exam-field-span: 2;
  --exam-field-basis: var(--layout-editor-span-2);
  --exam-field-max: var(--layout-editor-span-2);
}

#examForm.exam-form--adaptive .form-field--sm {
  --exam-field-span: 3;
  --exam-field-basis: var(--layout-editor-span-3);
  --exam-field-max: var(--layout-editor-span-3);
}

#examForm.exam-form--adaptive .form-field--md {
  --exam-field-span: 4;
  --exam-field-basis: var(--layout-editor-span-4);
  --exam-field-max: var(--layout-editor-span-4);
}

#examForm.exam-form--adaptive .form-field--lg {
  --exam-field-span: 5;
  --exam-field-basis: var(--layout-editor-span-5);
  --exam-field-max: var(--layout-editor-span-5);
}

#examForm.exam-form--adaptive .form-field--xl {
  --exam-field-span: 6;
  --exam-field-basis: var(--layout-editor-span-6);
  --exam-field-max: var(--layout-editor-span-6);
}

#examForm.exam-form--adaptive .exam-field--school {
  --exam-field-max: var(--layout-editor-span-5);
}

#examForm.exam-form--adaptive .individual-row-start,
#examForm.exam-form--adaptive.group-mode .exam-field--grade {
  grid-column-start: auto;
}

@media (max-width: 960px) {
  #examForm.exam-form--adaptive .form-field--span1 {
    --exam-field-basis: 88px;
    --exam-field-max: 112px;
  }

  #examForm.exam-form--adaptive .form-field--xs {
    --exam-field-basis: 140px;
    --exam-field-max: 170px;
  }

  #examForm.exam-form--adaptive .form-field--sm {
    --exam-field-basis: 200px;
    --exam-field-max: 240px;
  }

  #examForm.exam-form--adaptive .form-field--md {
    --exam-field-basis: 280px;
    --exam-field-max: 360px;
  }

  #examForm.exam-form--adaptive .form-field--lg,
  #examForm.exam-form--adaptive .form-field--xl {
    --exam-field-basis: 360px;
    --exam-field-max: 100%;
  }
}

@media (max-width: 720px) {
  .layout-edit-mode-banner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .layout-edit-actions {
    justify-content: flex-start;
  }

  .layout-edit-actions button {
    flex: 1 1 110px;
  }

  #examForm.exam-form--adaptive .exam-layout-field,
  #examForm.exam-form--adaptive .exam-field--city {
    flex: 1 1 100%;
    max-width: none;
  }
}

#examForm .exam-field--gender {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto var(--form-control-height);
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  inline-size: 100%;
  max-width: none;
  max-inline-size: none;
  min-width: 0;
  min-inline-size: 0;
  min-height: auto;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 7px;
}

#examForm .exam-field--gender legend,
#examForm .exam-field--gender > .field-label-text {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}

#examForm .gender-options {
  display: flex;
  align-items: center;
  justify-self: stretch;
  justify-content: space-evenly;
  gap: 18px;
  width: 100%;
  inline-size: 100%;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  background: var(--control-bg);
}

#examForm .gender-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  font-weight: 800;
}

#examForm .gender-options input {
  width: 18px;
  min-height: 18px;
}

#examForm.exam-form--adaptive .exam-layout-field {
  width: auto;
  inline-size: auto;
  max-width: var(--exam-field-max, 380px);
  max-inline-size: var(--exam-field-max, 380px);
}

@media (max-width: 720px) {
  #examForm.exam-form--adaptive .exam-layout-field,
  #examForm.exam-form--adaptive .exam-field--city {
    width: 100%;
    inline-size: 100%;
    max-width: none;
    max-inline-size: none;
  }
}

#examForm .question-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 620px);
  align-items: stretch;
  gap: 16px;
  margin: 26px 0 18px;
  padding-top: 22px;
}

#examForm .question-tools-main {
  display: grid;
  align-content: center;
  gap: 11px;
  min-width: 0;
}

#examForm .question-tools-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

#examForm .inline-help-button {
  min-height: 30px;
  padding: 4px 9px;
  color: var(--brand);
  border: 1px solid var(--info-border);
  border-radius: 999px;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

#examForm .inline-help-button:hover {
  border-color: var(--brand);
  background: #fff;
}

#examForm .exam-progress-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#examForm .question-tools strong {
  font-size: 18px;
  white-space: nowrap;
}

#examForm .question-tools span {
  margin-left: 0;
  color: var(--muted);
  line-height: 1.7;
}

#examForm .response-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#examForm .response-scale span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #d8e4ef;
  border-radius: 999px;
  color: #32485c;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

#examForm .response-scale b {
  color: #173f68;
  font-variant-numeric: tabular-nums;
}

#examForm .entry-support-panel {
  display: grid;
  grid-template-columns: minmax(330px, 1.5fr) minmax(170px, .8fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

#examForm .omr-field,
#examForm .exam-progress-card {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d8e4ef;
  border-radius: 12px;
  background: #ffffff;
}

#examForm .omr-field {
  display: grid;
  gap: 5px;
  align-content: start;
  background: #fbfdff;
}

#examForm .omr-field > span,
#examForm .exam-progress-card > span {
  color: #31516f;
  font-size: 13px;
  font-weight: 900;
}

#examForm #omrInput {
  width: 100%;
  max-width: none;
  min-height: 36px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

#examForm .omr-field small,
#examForm .exam-progress-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

#examForm .exam-progress-card {
  display: grid;
  align-content: center;
  gap: 5px;
}

#examForm .exam-progress-card strong {
  color: #123b66;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#examForm .exam-progress-bar {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

#examForm .exam-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2f80ed;
  transition: width .16s ease;
}

#examForm .exam-save-readiness {
  color: #8a4b18;
}

#examForm.exam-ready-to-save .exam-progress-card {
  border-color: #bfe2ce;
  background: #f4fbf7;
}

#examForm.exam-ready-to-save .exam-progress-card strong,
#examForm.exam-ready-to-save .exam-save-readiness {
  color: #177245;
}

#examForm.exam-ready-to-save .exam-progress-bar span {
  background: #2e9e5b;
}

#examForm .save-action-group {
  display: grid;
  justify-items: end;
  gap: 7px;
}

#examForm .always-show-result-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

#examForm .always-show-result-option input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--brand);
}

#examForm .birth-date-field {
  gap: 7px;
}

.exam-workflow-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
  color: #486176;
  font-size: 13px;
  font-weight: 800;
}

.exam-workflow-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid #d8e4f1;
  border-radius: 999px;
  background: #fff;
}

.exam-workflow-summary strong {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  background: #173f68;
  border-radius: 999px;
  font-size: 12px;
}

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

#examForm [data-date-picker] {
  min-height: var(--form-control-height);
  padding: 0 16px;
  font-size: 16px;
}

#examForm [data-date-picker].tentative-date {
  border-color: var(--info-border);
  background: var(--info-bg);
}

#examForm .date-picker-trigger {
  min-height: var(--form-control-height);
}

#resultsView .filter-field-type--date .date-picker-control,
#statsView .filter-field-type--date .date-picker-control {
  width: 100%;
}

#resultsView .filter-field-type--date [data-date-picker],
#statsView .filter-field-type--date [data-date-picker] {
  min-height: var(--form-control-height);
  padding: 0 14px;
}

#resultsView .filter-field-type--date .date-picker-trigger,
#statsView .filter-field-type--date .date-picker-trigger {
  min-height: var(--form-control-height);
}

.usage-history-filters .date-picker-trigger {
  min-height: var(--form-control-height);
}

#examForm .manual-select-group,
.self-entry-exam-form .manual-select-group {
  display: grid;
  gap: 8px;
}

.date-picker-popup {
  position: absolute;
  z-index: 80;
  padding: 18px;
  border: 1px solid #c9d9ea;
  border-radius: 22px;
  background: #eef4fb;
  box-shadow: 0 22px 54px rgba(15, 37, 63, .18);
}

.date-picker-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 14px;
  align-items: center;
  padding: 4px 2px 12px;
  color: #163c66;
  background: transparent;
}

.date-picker-title {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  min-width: 0;
  font-size: 20px;
  font-weight: 900;
}

.date-picker-nav,
.date-picker-heading-button {
  border-color: #c2d5e9;
  color: #1d4f84;
  background: rgba(255, 255, 255, .78);
}

.date-picker-nav {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.date-picker-heading-button {
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
}

.date-picker-nav:hover:not(:disabled),
.date-picker-heading-button:hover,
.date-picker-heading-button:focus-visible {
  border-color: #8fb5dd;
  background: #fff;
}

.date-picker-year-tools {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin: 14px 0 8px;
}

.date-picker-year-tools strong {
  color: var(--brand);
  font-size: 16px;
}

.date-picker-year-tools button {
  min-height: 38px;
  padding: 7px 10px;
  border-color: #d6e1ef;
  border-radius: 12px;
  background: #f7fbff;
}

.date-picker-months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 8px;
}

.date-picker-month {
  min-height: 42px;
  padding: 8px;
  border-color: #d6e1ef;
  border-radius: 12px;
  color: var(--brand);
  background: #f7fbff;
}

.date-picker-month.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.date-picker-weekdays {
  margin: 16px 0 10px;
  color: #6a7e95;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.date-picker-day,
.date-picker-blank {
  width: min(40px, 100%);
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  justify-self: center;
  padding: 0;
  border-radius: 999px;
}

.date-picker-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: transparent;
  color: #17324f;
  background: transparent;
  font-weight: 900;
}

.date-picker-day:hover:not(:disabled),
.date-picker-day:focus-visible {
  border-color: #fff;
  background: #fff;
}

.date-picker-day.today {
  border-color: #8fb5dd;
  color: #1f5f9f;
  background: rgba(255, 255, 255, .68);
}

.date-picker-day.selected {
  color: #fff;
  border-color: #123f6f;
  background: #123f6f;
}

.date-picker-day.is-outside-month {
  color: #9aa9ba;
  background: transparent;
}

.date-picker-day:disabled,
.date-picker-month:disabled,
.date-picker-nav:disabled,
.date-picker-year-tools button:disabled,
.date-wheel-item:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
}

.date-wheel {
  position: absolute;
  top: 64px;
  z-index: 3;
  display: grid;
  gap: 6px;
  max-height: 222px;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  border: 1px solid #d4e2f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 34px rgba(15, 37, 63, .16);
  scroll-snap-type: y proximity;
}

.date-wheel-year {
  left: calc(50% - 150px);
  width: 170px;
}

.date-wheel-month {
  right: calc(50% - 150px);
  width: 150px;
}

.date-wheel-item {
  min-height: 34px;
  padding: 0 12px;
  border-color: transparent;
  border-radius: 999px;
  color: #526a82;
  background: transparent;
  font-weight: 900;
  scroll-snap-align: center;
}

.date-wheel-item:hover:not(:disabled),
.date-wheel-item:focus-visible {
  color: #123f6f;
  background: #edf5ff;
}

.date-wheel-item.is-active {
  color: #fff;
  border-color: #123f6f;
  background: #123f6f;
}

.self-entry-link-action-choice {
  display: grid;
  gap: 10px;
}

.self-entry-link-action-choice button {
  width: 100%;
}

.self-entry-link-action-choice .hint {
  margin: 2px 0 0;
}

#questions {
  min-height: 430px;
  overflow: visible;
  padding-bottom: 2px;
}

#questions .question-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(460px, 1fr));
  gap: 18px;
  align-items: start;
  min-width: 960px;
}

#questions .question-column {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: #fff;
}

#questions .question-column-head {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--divider);
  background: #eaf4ff;
}

#questions .question-column-body {
  max-height: calc(clamp(430px, 62vh, 680px) - 55px);
  overflow: auto;
  background: #fff;
  scroll-padding-top: 12px;
}

#questions .question-table {
  min-width: 0;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
}

#questions .question-table th {
  height: 54px;
  color: #123b66;
  background: #eaf4ff;
  text-align: center;
}

#questions .question-table th:nth-child(2) {
  text-align: left;
}

#questions .question-table-head th {
  position: static;
  box-shadow: 0 1px 0 rgba(30, 81, 123, .08);
}

#questions .question-table td {
  min-height: 58px;
  padding: 14px 12px;
}

#questions .question-col-no {
  width: 68px;
}

#questions .question-col-scale {
  width: 58px;
}

#questions .question-table .no {
  width: 68px;
  color: var(--brand);
  background: #f1f6fc;
  text-align: center;
  font-weight: 900;
}

#questions .question-table .question-text {
  padding-left: 18px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

#questions .question-table .scale {
  width: 58px;
  text-align: center;
}

#questions .question-table .score-choice {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 36px;
  cursor: pointer;
}

#questions .question-table input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

#questions .question-table .score-choice span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#questions .question-table tr {
  scroll-margin: 72px 0 24px;
}

#questions .question-table tr:focus {
  outline: 2px solid rgba(47, 128, 237, .45);
  outline-offset: -2px;
}

#questions .question-table tr.question-complete td {
  background: #fbfdff;
}

#questions .question-table tr.question-active td,
#questions .question-table tr.question-active:hover td {
  background: #eaf4ff;
}

#questions .question-table tr.question-active .no {
  border-left: 4px solid var(--accent);
  background: #dceeff;
}

#examForm .form-actions {
  padding-top: 22px;
  border-top: 1px solid var(--divider);
}

/* 결과 검색 page: institutional record search */
#resultsView .section-head {
  align-items: center;
  margin-bottom: 10px;
}

#resultsView .section-head p {
  max-width: 680px;
}

#resultsView .result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 2px;
}

#resultsView .result-actions button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
}

#resultsView .selection-count {
  min-width: 76px;
  padding: 8px 11px;
  border: 1px solid var(--info-border);
  border-radius: 999px;
  color: var(--info-text);
  background: var(--info-bg);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

#resultsView .result-mode-switch {
  display: inline-flex;
  gap: 6px;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6faff;
  flex: 0 0 auto;
}

#resultsView .result-mode-switch button {
  min-height: 36px;
  padding: 7px 15px;
  border-radius: 999px;
  color: var(--brand);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
}

#resultsView .result-mode-switch button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(47, 128, 237, .18);
}

#resultsView .result-filter-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 16px;
  padding: 26px;
  border-color: #d9e7f4;
  background: #f8fbff;
  box-shadow: none;
}

#resultsView .filter-grid {
  display: contents;
}

#resultsView .filter-grid label {
  min-width: 0;
}

#resultsView .result-filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  grid-column: span 2;
  justify-self: stretch;
  width: 100%;
  margin-top: 0;
}

#resultsView .result-filter-actions button,
#statsView .stats-filter-actions button {
  min-width: 136px;
  min-height: var(--form-control-height);
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

#resultsView .summary-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  margin: 0;
}

#resultsView .summary-card {
  min-height: 92px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f9fbfe);
}

#resultsView .summary-card.is-clickable {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#resultsView .summary-card.is-clickable:hover,
#resultsView .summary-card.is-clickable:focus-visible {
  border-color: var(--result-color);
  box-shadow: 0 12px 26px rgba(15, 45, 80, .12);
  outline: 2px solid color-mix(in srgb, var(--result-color) 20%, transparent);
  outline-offset: 2px;
  transform: translateY(-1px);
}

#resultsView .summary-card.is-active {
  border-color: var(--result-color);
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--result-color) 8%, #fff));
}

#resultsView .summary-card.is-static {
  cursor: default;
}

#resultsView .summary-card strong {
  color: var(--brand);
  font-size: 28px;
}

#resultsView .summary-card--state01 strong,
#resultsView .summary-card--state02 strong,
#resultsView .summary-card--state03 strong,
#resultsView .summary-card--state04 strong {
  color: var(--result-color);
}

#resultsView .summary-card span {
  font-size: 14px;
}

.result-list-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.page-size-control select {
  width: auto;
  min-width: 86px;
  min-height: 38px;
  padding: 0 30px 0 12px;
  border-radius: 999px;
  background-color: #fff;
}

.result-pagination {
  margin-top: 14px;
}

.results-table-wrap {
  border-radius: 22px;
}

.results-table-wrap table {
  width: 100%;
  min-width: 1200px;
}

.results-table-wrap th {
  position: relative;
  height: 54px;
  text-align: center;
}

.sortable-result-head {
  overflow: visible;
}

.result-sort-trigger {
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
}

.result-sort-trigger:hover,
.result-sort-trigger:focus-visible,
.sortable-result-head.is-sorted .result-sort-trigger {
  color: var(--brand);
  background: #edf5ff;
}

.sort-indicator {
  margin-left: 4px;
  font-size: 11px;
}

.result-sort-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% - 6px);
  left: 50%;
  display: grid;
  min-width: 118px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 45, 80, .16);
  transform: translateX(-50%);
}

.result-sort-menu button {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  color: #123b66 !important;
  background: #fff !important;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.result-sort-menu button:hover,
.result-sort-menu button:focus-visible {
  color: var(--brand) !important;
  background: #edf5ff !important;
}

.current-sort-label {
  padding: 4px 10px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.results-table-wrap td {
  height: 58px;
  font-size: 15px;
  text-align: center;
}

.results-table-wrap .result-select-cell,
.results-table-wrap .result-select-head {
  width: 44px;
  text-align: center;
}

.results-table-wrap .result-select-cell input,
.results-table-wrap .result-select-head input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--brand-blue);
}

.results-table-wrap .result-index {
  color: var(--brand);
  background: #f1f6fc;
  text-align: center;
  font-weight: 900;
}

.results-table-wrap .result-score {
  color: #f97316;
  font-weight: 900;
  text-align: center;
}

.results-table-wrap .actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}

.results-table-wrap .actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.results-table-wrap .actions button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
}

/* 통계 분석 page: executive analytics dashboard */
#statsView .section-head {
  align-items: center;
  margin-bottom: 14px;
}

#statsView .section-head p {
  max-width: 720px;
}

#statsView .stats-filter-card {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  align-items: end;
  gap: 16px;
  padding: 28px 32px;
  border-radius: 24px;
  border-color: #d9e7f4;
  background: #f8fbff;
  box-shadow: none;
}

#statsView .stats-frame-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -4px;
}

#statsView .filter-grid {
  display: contents;
}

#statsView .filter-grid label {
  min-width: 0;
}

#statsView .stats-filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  grid-column: span 4;
  justify-self: stretch;
  width: 100%;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#statsView .summary-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

#statsView .summary-card {
  position: relative;
  min-height: 108px;
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

#statsView .summary-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #eef6ff;
}

#statsView .summary-card:nth-child(5)::before,
#statsView .summary-card:nth-child(6)::before {
  background: #fff7ed;
}

#statsView .summary-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

#statsView .summary-card:nth-child(5) strong,
#statsView .summary-card:nth-child(6) strong {
  color: var(--warning);
}

#statsView .summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.stats-chart-grid {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 18px;
}

.stats-chart-grid .chart-panel {
  min-width: 0;
  padding: 24px;
  border-radius: 24px;
}

.stats-chart-grid .chart-panel h3,
.stats-table-card h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.stats-chart-grid .chart-box {
  min-height: 270px;
  padding: 8px;
  border: 1px solid var(--divider);
  border-radius: 18px;
  background: #fff;
}

.stats-chart-grid .chart-box svg {
  width: 100%;
  max-height: 330px;
}

.stats-empty {
  width: 100%;
  min-height: 210px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--muted);
  background: #f8fbff;
  border: 1px dashed #cfe0f2;
  border-radius: 16px;
}

.stats-empty strong {
  color: var(--ink);
}

.stats-empty span {
  margin-top: 6px;
}

.stats-table-card {
  margin-top: 18px;
  padding: 28px 32px;
  border-radius: 24px;
}

.stats-table-card .screen-card-head {
  margin-bottom: 18px;
}

.stats-table-card .screen-card-head h3 {
  margin-bottom: 0;
}

.stats-table-card .screen-card-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.stats-print-filter-summary {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fbff;
}

.stats-print-filter-summary h3 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 16px;
}

.stats-print-filter-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
}

.stats-print-filter-summary div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px;
}

.stats-print-filter-summary dt {
  color: var(--muted);
  font-weight: 900;
}

.stats-print-filter-summary dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stats-table-wrap {
  border-radius: 16px;
}

.stats-table-wrap table {
  min-width: 900px;
}

.stats-table-wrap th {
  background: var(--brand);
  color: #fff;
  text-align: center;
}

.stats-table-wrap tbody th {
  color: var(--ink);
  background: #edf5fc;
  text-align: left;
}

.stats-table-wrap td {
  color: var(--secondary);
  font-weight: 700;
  text-align: center;
}

.stats-risk-count {
  color: var(--warning) !important;
  font-weight: 900 !important;
}

.stats-caution,
.stats-factor-caution {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #cfe0f2;
  border-radius: 14px;
  background: #f4f9ff;
  color: #24415d;
  font-weight: 800;
  line-height: 1.55;
}

.stats-factor-caution {
  background: #fffaf0;
  border-color: #f4d59f;
  color: #6f4a08;
}

.stats-request-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid #bfd6ec;
  border-radius: 14px;
  background: #f7fbff;
  color: #24415d;
  font-weight: 800;
}

.stats-request-status.is-loading::before {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 3px solid #c8dced;
  border-top-color: var(--brand);
  border-radius: 50%;
  content: "";
  animation: stats-request-spin 0.8s linear infinite;
}

.stats-request-status.is-loading #statsRequestStatusText {
  flex: 1;
}

.stats-request-status.is-error {
  border-color: #efc5c2;
  background: #fff7f6;
  color: #8a2f2a;
}

@keyframes stats-request-spin {
  to { transform: rotate(360deg); }
}

.stats-mvp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: #f8fbff;
}

.stats-mvp-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--secondary);
  font-weight: 900;
  transition: none;
  cursor: pointer;
}

.stats-mvp-tab.is-active,
.stats-mvp-tab[aria-selected="true"] {
  background: #eaf4ff;
  border-color: #6ea8df;
  color: #0f4f82;
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, .16);
}

.stats-mvp-tab[aria-selected="false"]:focus-visible {
  background: transparent;
  border-color: transparent;
  color: var(--secondary);
  outline: 2px solid rgba(147, 197, 253, .45);
  outline-offset: 2px;
  box-shadow: none;
}

.stats-mvp-panel {
  display: none;
}

.stats-mvp-panel.is-active {
  display: block;
}

.stats-mvp-panel[hidden] {
  display: none !important;
}

#statsView .stats-mvp-summary-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

#statsView .stats-mvp-summary-card {
  min-height: 132px;
}

#statsView .stats-mvp-summary-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

#statsView .stats-mvp-top-factors-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.stats-top-factor-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats-top-factor-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  color: #24415d;
  font-size: 13px;
  font-weight: 900;
}

.stats-top-factor-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.stats-top-factor-empty {
  color: var(--muted);
  font-size: 15px;
}

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

.stats-mvp-grid--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-mvp-card {
  min-width: 0;
  padding: 24px;
  border-radius: 20px;
}

.stats-mvp-card h3,
.stats-report-card h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.stats-mvp-list {
  display: grid;
  gap: 10px;
}

.stats-mvp-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) max-content;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}

.stats-mvp-list-row:last-child {
  border-bottom: 0;
}

.stats-mvp-list-row span {
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stats-mvp-list-row strong {
  color: var(--brand);
  font-size: 17px;
  text-align: right;
}

.stats-mvp-list-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 700;
}

.stats-factor-bar-list {
  display: grid;
  gap: 12px;
}

.stats-factor-bar-row {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.stats-factor-bar-row:last-child {
  border-bottom: 0;
}

.stats-factor-bar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
}

.stats-factor-bar-head span {
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.stats-factor-bar-head strong {
  color: var(--brand);
  font-size: 15px;
}

.stats-factor-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.stats-factor-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stats-bar-color, #4f8ec9);
}

.stats-factor-bar-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-mini-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5edf6;
  border-radius: 12px;
}

.stats-mini-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}

.stats-mini-table th,
.stats-mini-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: center;
  white-space: nowrap;
}

.stats-mini-table th {
  color: #24415d;
  background: #f4f9ff;
  font-weight: 900;
}

.stats-mini-table tbody th {
  color: var(--ink);
  background: #fbfdff;
  text-align: left;
}

.stats-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.stats-response-card small {
  color: #7c2d12 !important;
  font-weight: 900 !important;
}

.stats-badge--danger {
  background: #fff1f2;
  color: #be123c;
}

.stats-badge--warning {
  background: #fff7ed;
  color: #c2410c;
}

.stats-badge--normal {
  background: #ecfdf5;
  color: #047857;
}

.stats-badge--muted {
  background: #f1f5f9;
  color: #475569;
}

.stats-report-card {
  padding: 28px 32px;
  border-radius: 24px;
}

.stats-report-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(260px, 1.2fr);
  gap: 18px;
}

.stats-report-grid h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.stats-report-section {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.stats-report-section--wide {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}

.stats-report-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.stats-support-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stats-support-counts span {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce8f4;
  border-radius: 12px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stats-support-counts strong {
  display: block;
  color: var(--brand);
  font-size: 20px;
  line-height: 1.2;
}

.stats-report-choice-list,
.stats-report-checklist {
  display: grid;
  gap: 8px;
}

.stats-report-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 0;
  cursor: pointer;
  color: var(--secondary);
  font-weight: 800;
}

.stats-report-option input[type="radio"],
.stats-report-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  flex: 0 0 16px;
  accent-color: var(--brand-blue);
}

.stats-report-type-option {
  padding: 11px 12px;
  border: 1px solid #dce8f4;
  border-radius: 12px;
  background: #fbfdff;
}

.stats-report-type-option:has(input:checked) {
  border-color: #8fbce7;
  background: #f0f7ff;
  color: var(--brand);
}

.stats-support-scenario-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-support-scenario-option {
  align-items: flex-start;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #dce8f4;
  border-radius: 12px;
  background: #fff;
  line-height: 1.45;
}

.stats-report-check-option {
  padding: 6px 2px;
}

.stats-report-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.stats-report-actions p,
.stats-report-actions small {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 900px) {
  #statsView .stats-mvp-summary-grid,
  .stats-mvp-grid,
  .stats-mvp-grid--wide,
  .stats-report-grid {
    grid-template-columns: 1fr;
  }

  .stats-mvp-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .stats-mvp-tab {
    flex: 0 0 auto;
  }

  .stats-support-counts,
  .stats-support-scenario-list {
    grid-template-columns: 1fr;
  }
}

.state01,
.state02,
.state03,
.state04 {
  color: #fff;
}

.state01 { background: var(--normal); }
.state02 { background: var(--low); }
.state03 { background: #f97316; }
.state04 { background: var(--risk); }

dialog {
  width: min(1280px, 96vw);
  max-height: 92vh;
  border: 0;
  padding: 0;
  border-radius: var(--radius-dialog);
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(13, 25, 38, .45); }
.visually-hidden {
  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;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 { margin: 0; }
#userDetailDialog,
#institutionDetailDialog {
  max-height: min(90vh, 920px);
  overflow: hidden;
  background: var(--surface-raised);
}
#userDetailDialog[open],
#institutionDetailDialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
#userDetail,
#institutionDetail {
  min-height: 0;
  max-height: calc(90vh - 76px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.admin-contact-dialog {
  width: min(480px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.admin-contact-dialog::backdrop {
  background: rgba(13, 25, 38, .36);
}
.admin-contact-dialog .dialog-head h2 {
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}
.user-billing-dialog {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.user-billing-dialog .dialog-head h2 {
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}
.admin-password-reset-dialog {
  width: min(520px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.admin-password-reset-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.admin-password-reset-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.admin-password-reset-form input {
  min-height: 44px;
}
.admin-password-reset-target {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-muted);
  color: var(--brand);
  font-weight: 900;
}
.admin-password-reset-actions {
  margin-top: 0;
}
.app-message-compose-dialog {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.app-message-compose-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.app-message-compose-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.app-message-recipient {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-muted);
  color: var(--brand);
  font-weight: 900;
  line-height: 1.5;
}
.app-message-compose-form textarea {
  min-height: 150px;
  resize: vertical;
}
.app-message-compose-actions {
  margin-top: 0;
}
.app-message-inbox-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(84vh, 760px);
  overflow: hidden;
  background: var(--surface-raised);
}
.app-message-inbox-content {
  display: grid;
  gap: 12px;
  max-height: calc(84vh - 88px);
  overflow-y: auto;
  padding: 18px 20px 22px;
}
.app-message-empty {
  margin: 0;
  padding: 26px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}
.app-message-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
}
.app-message-card.is-unread {
  border-color: #7dd3fc;
  background: #eff6ff;
}
.app-message-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.app-message-card-head h3 {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: 18px;
}
.app-message-date {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.app-message-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 900;
}
.app-message-status.is-unread {
  color: #075985;
  background: #bae6fd;
}
.app-message-status.is-read {
  color: var(--muted);
  background: var(--surface-muted);
}
.app-message-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.app-message-meta div {
  display: flex;
  gap: 8px;
}
.app-message-meta dt {
  font-weight: 900;
}
.app-message-meta dd {
  margin: 0;
}
.app-message-body {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.app-message-card-actions {
  display: flex;
  justify-content: flex-end;
}
.message-dialog {
  width: min(460px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.message-dialog.has-details {
  width: min(620px, calc(100vw - 32px));
}
.message-dialog .dialog-head {
  background: var(--surface-muted);
}
.message-dialog .dialog-head h2 {
  color: var(--brand);
  font-size: 21px;
  font-weight: 900;
}
.message-dialog.tone-warning .dialog-head {
  background: #fff7ed;
  border-bottom-color: var(--risk-border);
}
.message-dialog.tone-warning .dialog-head h2 {
  color: var(--risk-text);
}
.message-dialog-body {
  padding: 22px 24px 4px;
}
.message-dialog-body p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}
.message-dialog-extra {
  margin-top: 16px;
}
.message-dialog-actions {
  padding: 18px 24px 22px;
  justify-content: flex-end;
}
.record-edit-banner {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid #f1c27d;
  border-radius: 14px;
  background: #fff8eb;
  box-shadow: 0 10px 24px rgba(151, 92, 12, .08);
}
.record-edit-banner-copy {
  display: grid;
  gap: 6px;
}
.record-edit-banner-copy strong {
  color: #8a4b08;
  font-size: 18px;
}
.record-edit-banner-copy span {
  color: #6f4a22;
  font-weight: 800;
}
.record-edit-reason-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}
.record-edit-reason-field textarea {
  min-height: 72px;
  resize: vertical;
}
.record-edit-reason-field small {
  color: var(--muted);
  font-weight: 600;
}
.record-edit-mode .segmented [data-exam-type] {
  pointer-events: none;
}
.record-edit-confirm-summary,
.record-edit-history-meta,
.record-edit-change-list {
  display: grid;
  gap: 8px;
  margin: 0;
}
.record-edit-confirm-summary > div,
.record-edit-history-meta > div,
.record-edit-change-list > div {
  display: grid;
  grid-template-columns: minmax(120px, .65fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: start;
}
.record-edit-confirm-summary dt,
.record-edit-history-meta dt,
.record-edit-change-list dt {
  color: var(--muted);
  font-weight: 800;
}
.record-edit-confirm-summary dd,
.record-edit-history-meta dd,
.record-edit-change-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  word-break: break-word;
}
.record-edit-history-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: hidden;
}
.record-edit-history-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.record-edit-history-content {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 20px 24px 28px;
  overflow: auto;
}
.record-edit-history-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
}
.record-edit-history-item > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.record-edit-history-item > header strong {
  color: var(--brand);
  font-size: 18px;
}
.record-edit-history-item > header time {
  color: var(--muted);
  font-size: 14px;
}
.record-edit-history-item h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
}
.record-edit-change-list dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.record-edit-change-list dd b {
  color: var(--brand);
}
.record-edit-empty-change {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.result-row-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.table-action-edit sup {
  position: relative;
  top: -.35em;
  margin-left: 1px;
  font-size: .68em;
  line-height: 0;
}
.table-action-history {
  color: #6b4c9a;
  border-color: #d8c9ee;
  background: #faf7ff;
}
.table-action-history:hover:not(:disabled) {
  color: #fff;
  border-color: #6b4c9a;
  background: #6b4c9a;
}
@media (max-width: 760px) {
  .record-edit-banner {
    grid-template-columns: 1fr;
  }
  .record-edit-confirm-summary > div,
  .record-edit-history-meta > div,
  .record-edit-change-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.help-dialog {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.help-dialog:not([open]) {
  display: none;
}
.help-dialog::backdrop {
  background: rgba(13, 25, 38, .45);
}
.help-audience-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px 0;
  background: #fff;
}
.help-audience-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  background: #fff;
  font-weight: 900;
}
.help-audience-tabs button.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}
.help-search-row {
  padding: 14px 18px;
  background: #fff;
}
.help-search-row input {
  width: 100%;
  min-height: 44px;
}
.help-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  height: min(600px, calc(100vh - 230px));
  border-top: 1px solid var(--divider);
}
.help-section-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f7fafe;
  border-right: 1px solid var(--divider);
}
.help-section-list button {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 900;
}
.help-section-list button:hover,
.help-section-list button:focus-visible {
  color: var(--brand);
  border-color: var(--info-border);
  background: #fff;
}
.help-section-list button.active {
  color: var(--brand);
  border-color: var(--info-border);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 45, 80, .07);
}
.help-content {
  min-width: 0;
  min-height: 0;
  padding: 24px 28px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  color: var(--ink);
}
.help-content h3 {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
}
.help-screenshot {
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 16px;
  background: #f7fafe;
}
.help-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}
.help-video {
  margin: 22px 0 18px;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 16px;
  background: #f7fafe;
  box-shadow: 0 12px 30px rgba(15, 45, 80, .08);
}
.help-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #071f35;
}
.help-tutorial-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #071f35;
}
.help-video-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #82410f !important;
  background: #fff7e8;
  text-align: center;
}
.help-video-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--divider);
  background: #fff;
}
.help-video-actions button {
  flex: 0 0 auto;
}
.help-video-actions span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.help-content ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}
.help-step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}
.help-tip,
.help-warning {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--info-border);
  border-radius: 14px;
  background: var(--info-bg);
  color: var(--info-text);
}
.help-warning {
  border-color: rgba(220, 93, 55, .32);
  background: rgba(255, 246, 239, .86);
  color: #8f3c19;
}
.help-tip strong,
.help-warning strong {
  font-size: 14px;
  font-weight: 950;
}
.help-tip ul,
.help-warning ul {
  font-size: 15px;
}
.help-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}
.help-shortcut-grid div {
  display: grid;
  grid-template-columns: minmax(86px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
}
.help-shortcut-grid dt {
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--brand);
  font-weight: 950;
  text-align: center;
}
.help-shortcut-grid dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.help-faq-list {
  display: grid;
  gap: 10px;
}
.help-faq-list details {
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
}
.help-faq-list summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 950;
}
.help-faq-list p {
  padding: 0 14px 14px;
}
.help-content p,
.help-empty {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.help-intro {
  margin-bottom: 14px !important;
  color: var(--ink) !important;
  font-weight: 800;
}
.help-note {
  margin-top: 16px !important;
  padding: 12px 14px;
  border: 1px solid var(--info-border);
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--info-text) !important;
  font-weight: 800;
}

/* Role-based help center foundation */
body.help-center-open {
  overflow: hidden;
}
.help-center-screen {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  background: #f4f7fb;
}
.help-center-screen.hidden {
  display: none;
}
.help-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 3vw, 42px);
  color: #fff;
  background: linear-gradient(135deg, #102532 0%, #0f5d73 100%);
}
.help-center-header h2,
.help-center-header p {
  margin: 0;
}
.help-center-header h2 {
  font-size: clamp(24px, 3vw, 34px);
}
.help-center-eyebrow {
  color: #b9e4ef;
  font-size: 13px;
  font-weight: 900;
}
.help-center-header-actions,
.section-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.help-center-header .ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .1);
}
.help-center-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr) minmax(260px, 520px) auto;
  align-items: end;
  gap: 12px 18px;
  padding: 14px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--divider);
  background: #fff;
}
.help-role-summary {
  display: grid;
  gap: 2px;
  align-self: center;
}
.help-role-summary span,
.help-search-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.help-role-summary strong {
  color: var(--brand);
  font-size: 16px;
}
.help-search-label {
  display: grid;
  gap: 5px;
}
.help-search-label input {
  width: 100%;
  min-height: 44px;
}
.help-search-status {
  align-self: center;
  min-width: 150px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.help-center-toolbar .help-audience-tabs {
  align-self: center;
  padding: 0;
  background: transparent;
}
.help-route-notice {
  padding: 9px clamp(18px, 3vw, 42px);
  color: #82410f;
  border-bottom: 1px solid #f0c890;
  background: #fff7e8;
  font-weight: 800;
}
.help-center-screen .help-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  min-height: 0;
  height: auto;
  border-top: 0;
}
.help-center-screen .help-section-list {
  align-content: start;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  border-right: 1px solid var(--divider);
  background: #edf3f9;
}
.help-home-link {
  margin-bottom: 8px;
  border-color: var(--info-border) !important;
  background: #fff !important;
}
.help-toc-group {
  display: grid;
  gap: 4px;
}
.help-toc-group + .help-toc-group {
  margin-top: 14px;
}
.help-toc-group h3 {
  margin: 0;
  padding: 5px 10px;
  color: #39556b;
  font-size: 13px;
  font-weight: 950;
}
.help-toc-query {
  margin: 2px 0 12px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.help-main,
body.auth-locked .help-center-screen .help-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.help-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 11px clamp(20px, 4vw, 54px);
  overflow-x: auto;
  color: var(--muted);
  border-bottom: 1px solid var(--divider);
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
}
.help-breadcrumbs button {
  padding: 0;
  color: var(--brand);
  border: 0;
  background: transparent;
  font-weight: 900;
}
.help-center-screen .help-content {
  min-width: 0;
  min-height: 0;
  padding: 32px clamp(20px, 5vw, 72px) 44px;
  overflow: auto;
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
.help-article,
.help-home {
  width: min(920px, 100%);
  margin: 0 auto;
}
.help-article > header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--divider);
}
.help-article h1,
.help-home h1 {
  margin: 6px 0 12px;
  color: #123d55;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
  word-break: keep-all;
}
.help-article h2,
.help-related h2 {
  margin: 0 0 12px;
  color: #174d68;
  font-size: 23px;
}
.help-meta {
  margin: 0 !important;
  color: #5d778a !important;
  font-size: 13px !important;
  font-weight: 800;
}
.help-article-section,
.help-related {
  padding-top: 28px;
  scroll-margin-top: 20px;
}
.help-on-this-page {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 20px 0 4px;
  padding: 13px 16px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
}
.help-on-this-page strong {
  color: var(--ink);
}
.help-on-this-page a {
  color: var(--brand);
  font-weight: 800;
}
.help-center-screen .help-screenshot {
  margin-top: 22px;
}
.help-screenshot figcaption,
.help-video figcaption,
.help-image-fallback {
  margin: 0 !important;
  padding: 10px 14px;
  color: var(--muted) !important;
  border-top: 1px solid var(--divider);
  font-size: 13px !important;
}
.help-image-callouts {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 12px 16px 14px 42px;
  color: var(--ink);
  border-top: 1px solid var(--divider);
  background: #fbfdff;
  line-height: 1.55;
}
.help-image-callouts li::marker {
  color: var(--brand);
  font-weight: 950;
}
.help-image-fallback {
  color: #82410f !important;
  background: #fff7e8;
}
.help-video-transcript {
  border-top: 1px solid var(--divider);
  background: #fff;
}
.help-video-transcript summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--brand);
  font-weight: 900;
}
.help-video-transcript ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 18px 16px 38px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}
.help-field-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}
.help-field-grid > div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
}
.help-field-grid dt {
  color: var(--brand);
  font-weight: 950;
  overflow-wrap: anywhere;
}
.help-field-grid dd {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}
.help-field-grid dd > span {
  color: var(--ink);
  font-weight: 850;
}
.help-field-grid dd > small {
  color: #5d778a;
}
.help-field-grid dd > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.help-terms {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.help-terms div {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
}
.help-terms dt {
  color: var(--brand);
  font-weight: 950;
}
.help-terms dd {
  margin: 0;
}
.help-home-hero {
  padding: clamp(22px, 4vw, 40px);
  color: #fff;
  border-radius: 20px;
  background: linear-gradient(135deg, #123d55, #18758c);
}
.help-home-hero h1,
.help-home-hero p {
  color: #fff !important;
}
.help-home-hero .help-meta {
  color: #bfe8f1 !important;
}
.help-home-section {
  margin-top: 30px;
}
.help-home-section > h3 {
  margin: 0 0 13px;
  color: #174d68;
  font-size: 22px;
}
.help-role-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.help-role-card > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--divider);
  border-radius: 13px;
  background: #fff;
}
.help-role-card strong {
  color: var(--brand);
  font-size: 13px;
}
.help-role-card span {
  color: var(--muted);
  line-height: 1.6;
}
.help-card-grid,
.help-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.help-article-card,
.help-category-grid button {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  color: var(--ink);
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}
.help-article-card:hover,
.help-article-card:focus-visible,
.help-category-grid button:hover,
.help-category-grid button:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(15, 45, 80, .09);
}
.help-article-card strong,
.help-category-grid button > span {
  color: var(--brand);
  font-size: 16px;
  font-weight: 950;
}
.help-article-card span,
.help-category-grid small {
  color: var(--muted);
  line-height: 1.55;
}
.help-article-card small {
  color: #70879a;
}
.help-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.help-quick-links button {
  min-height: 40px;
  padding: 8px 13px;
  color: var(--brand);
  border: 1px solid var(--info-border);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
}
.help-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(20px, 4vw, 54px);
  border-top: 1px solid var(--divider);
  background: #fff;
}
.help-toc-toggle {
  display: none;
}
.login-help-button,
.context-help-button {
  min-height: 38px;
  padding: 8px 13px;
  color: var(--brand);
  border: 1px solid var(--info-border);
  border-radius: 999px;
  background: #f8fbff;
  font-weight: 900;
  white-space: nowrap;
}
.login-help-button {
  display: block;
  width: 120px;
  max-width: 100%;
  margin: 10px auto 24px;
}
.help-center-screen :focus-visible,
.context-help-button:focus-visible,
.login-help-button:focus-visible {
  outline: 3px solid #f5bf42;
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .help-dialog {
    width: calc(100vw - 18px);
  }
  .help-audience-tabs {
    flex-wrap: wrap;
  }
  .help-layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 250px);
  }
  .help-section-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }
  .help-section-list button {
    width: auto;
    white-space: nowrap;
  }
  .help-content {
    padding: 20px;
  }
}
@media (max-width: 900px) {
  .help-center-header {
    align-items: flex-start;
  }
  .help-center-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .help-center-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .help-center-toolbar .help-audience-tabs,
  .help-search-label {
    grid-column: 1 / -1;
  }
  .help-search-status {
    min-width: 0;
  }
  .help-toc-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    color: var(--brand);
    border: 1px solid var(--info-border);
    border-radius: 10px;
    background: #fff;
    font-weight: 900;
  }
  .help-center-screen .help-layout {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
  }
  .help-center-screen .help-section-list {
    position: absolute;
    z-index: 3;
    inset: 0 0 auto;
    display: none;
    max-height: min(58vh, 520px);
    border-right: 0;
    border-bottom: 1px solid var(--divider);
    box-shadow: 0 18px 30px rgba(15, 45, 80, .18);
  }
  .help-center-screen .help-section-list.is-open {
    display: grid;
  }
  .help-main,
  body.auth-locked .help-center-screen .help-main {
    grid-column: 1;
  }
}
@media (max-width: 620px) {
  .help-center-header {
    gap: 12px;
    padding: 13px 14px;
  }
  .help-center-header h2 {
    font-size: 23px;
  }
  .help-center-eyebrow {
    display: none;
  }
  .help-center-header-actions .ghost {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }
  .help-center-toolbar {
    gap: 8px 10px;
    padding: 10px 14px;
  }
  .help-center-toolbar .help-audience-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .help-center-toolbar .help-audience-tabs button {
    flex: 0 0 auto;
    padding: 0 12px;
  }
  .help-center-screen .help-content {
    padding: 22px 16px 34px;
  }
  .help-breadcrumbs,
  .help-pagination {
    padding-right: 16px;
    padding-left: 16px;
  }
  .help-card-grid,
  .help-category-grid,
  .help-role-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-terms div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .help-field-grid > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .help-pagination {
    flex-direction: column;
  }
  .help-pagination button {
    width: 100%;
  }
  .section-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .context-help-button {
    align-self: flex-end;
  }
  .help-video-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .help-video-actions button {
    width: 100%;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .help-center-header {
    align-items: center;
    padding: 7px 20px;
  }
  .help-center-header h2 {
    font-size: 21px;
  }
  .help-center-eyebrow,
  .help-role-summary > span,
  .help-search-label > span {
    display: none;
  }
  .help-center-header-actions .ghost {
    min-height: 34px;
    padding: 6px 12px;
  }
  .help-center-toolbar {
    grid-template-columns: max-content minmax(240px, 1fr) auto auto;
    gap: 8px 12px;
    padding: 6px 20px;
  }
  .help-center-toolbar .help-audience-tabs,
  .help-search-label {
    grid-column: auto;
  }
  .help-center-toolbar .help-audience-tabs {
    max-width: 300px;
  }
  .help-search-label input {
    min-height: 36px;
  }
  .help-search-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .help-toc-toggle {
    min-height: 36px;
  }
  .help-breadcrumbs {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .help-center-screen .help-content {
    padding-top: 14px;
    padding-bottom: 20px;
  }
  .help-pagination {
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .help-pagination .ghost {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
.test-notice-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(780px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}
.test-notice-dialog::backdrop {
  background: rgba(13, 25, 38, .42);
  backdrop-filter: blur(2px);
}
.test-notice-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(780px, calc(100vh - 28px));
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(217, 227, 239, .92);
  border-radius: 22px;
  box-shadow: 0 28px 76px rgba(15, 45, 80, .22);
}
.test-notice-head {
  background: linear-gradient(180deg, #f8fbff, #eef5fc);
}
.test-notice-head h2 {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
}
.test-notice-body {
  padding: 24px 28px 8px;
  overflow: auto;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}
.test-notice-body p {
  margin: 0 0 14px;
}
.test-notice-body ul {
  display: grid;
  gap: 6px;
  margin: 2px 0 18px;
  padding-left: 22px;
}
.test-notice-body li {
  padding-left: 2px;
}
.test-notice-actions {
  padding: 18px 28px 24px;
  justify-content: flex-end;
  border-top: 1px solid var(--divider);
  background: #fff;
}
.test-notice-actions .primary {
  min-width: 138px;
  border-radius: var(--radius-pill);
}
.batch-report-page-dialog {
  width: min(1420px, calc(100vw - 24px));
  height: min(94vh, 1000px);
  max-height: min(94vh, 1000px);
  overflow: hidden;
  background: var(--surface-raised);
}
.batch-report-page-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.batch-report-page-dialog .dialog-head h2 {
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}
.batch-report-page-form {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.batch-output-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(370px, 450px);
  min-width: 0;
  height: 100%;
  min-height: 0;
}
.batch-output-preview-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: #eef3f9;
}
.batch-output-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.batch-output-preview-head > div {
  min-width: 0;
}
.batch-output-preview-head h3 {
  margin: 0;
  color: var(--brand);
  font-size: 17px;
  font-weight: 900;
}
.batch-output-preview-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.batch-output-settings-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: #fff;
}
.batch-output-settings-scroll {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}
.batch-report-page-summary {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--info-border);
  border-radius: 12px;
  color: var(--info-text);
  background: var(--info-bg);
  font-weight: 900;
}
.batch-report-mode {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.batch-report-mode legend {
  width: 100%;
  margin-bottom: 8px;
  color: var(--brand);
  font-weight: 900;
}
.batch-report-mode label,
.batch-report-select-all,
.batch-report-page-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--ink);
  font-weight: 800;
}
.batch-report-mode label {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
}
.batch-report-page-options {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}
.batch-report-page-options.is-disabled {
  opacity: .55;
}
.batch-report-page-checklist {
  display: grid;
  gap: 8px;
}
.batch-report-page-checklist label {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.batch-report-page-form input[type="radio"],
.batch-report-page-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--brand-blue);
}
.batch-report-page-actions {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.batch-output-composition-section {
  display: grid;
  gap: 10px;
}
.batch-output-composition-section > h3 {
  margin: 0;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}
.batch-output-composition-options {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}
.batch-output-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--surface-raised);
  cursor: pointer;
}
.batch-output-option:has(input:checked) {
  border-color: var(--brand-blue);
  background: var(--info-bg);
  box-shadow: 0 0 0 2px rgba(47, 128, 237, .12);
}
.batch-output-option.is-disabled {
  border-style: dashed;
  cursor: not-allowed;
}
.batch-output-option input {
  width: 19px;
  height: 19px;
  min-height: 19px;
  margin: 2px 0 0;
  accent-color: var(--brand-blue);
}
.batch-output-option > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.batch-output-option strong {
  color: var(--brand);
  font-size: 14px;
  line-height: 1.35;
  word-break: keep-all;
}
.batch-output-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  word-break: keep-all;
}
.batch-output-option-notice {
  display: block;
  margin-top: 4px;
  color: var(--risk);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.5;
}
.batch-output-preview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.batch-output-summary-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.batch-output-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.batch-output-summary-card strong {
  min-width: 0;
  color: var(--brand);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.batch-output-manifest-section,
.batch-output-progress,
.batch-output-completion {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.batch-output-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.batch-output-section-head h3,
.batch-output-completion h3 {
  margin: 0;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}
.batch-output-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.batch-output-manifest {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow: auto;
}
.batch-output-manifest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: #f8fbff;
}
.batch-output-manifest-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.batch-output-manifest-row strong,
.batch-output-group-preview-button {
  color: var(--brand);
  font-weight: 900;
}
.batch-output-manifest-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.batch-output-manifest-row code,
.batch-output-completion code {
  min-width: 0;
  color: #334155;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.batch-output-group-preview-button {
  min-width: 0;
  min-height: 30px;
  padding: 3px 8px;
  border: 1px solid #cbdceb;
  border-radius: 999px;
  background: #fff;
}
.batch-output-group-control {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 420px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}
.batch-output-group-control select {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: #fff;
}
.batch-output-page-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.batch-output-page-navigation span {
  min-width: 68px;
  padding: 8px 10px;
  border: 1px solid var(--info-border);
  border-radius: 999px;
  color: var(--info-text);
  background: var(--info-bg);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}
.batch-output-preview-viewport {
  min-width: 0;
  min-height: 0;
  padding: 18px;
  border: 1px solid #c7d5e5;
  border-radius: 14px;
  background: #dfe7f1;
  overflow: auto;
  outline: none;
}
.batch-output-preview-viewport:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .28);
}
#batchOutputPreviewViewport .batch-output-preview-document {
  display: block;
  width: 210mm;
  margin: 0 auto;
  transform-origin: top center;
}
#batchOutputPreviewViewport .pdf-page {
  box-shadow: 0 8px 28px rgba(15, 37, 63, .2);
}
.batch-output-progress progress {
  width: 100%;
  height: 14px;
  accent-color: var(--brand-blue);
}
.batch-output-progress > strong {
  color: var(--ink);
  font-size: 14px;
}
.batch-output-progress > p,
.batch-output-completion p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}
.batch-output-progress > button,
.batch-output-completion > button {
  justify-self: start;
}
.batch-output-completion {
  border-color: var(--info-border);
  background: var(--info-bg);
}
.batch-output-failure-list {
  margin-top: 10px;
  color: var(--risk);
}
.batch-output-failure-list ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.batch-output-print-restriction {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #e5b8c3;
  border-radius: 12px;
  color: #8f1d3d;
  background: #fff7fa;
  font-size: 13px;
  font-weight: 900;
}
.bulk-pdf-capture-root {
  position: fixed;
  top: 0;
  left: -12000px;
  width: 210mm;
  height: auto;
  pointer-events: none;
  z-index: -1;
}
#bulkPdfCaptureRoot .report-document {
  display: block !important;
  width: 210mm;
}
#bulkPdfCaptureRoot .pdf-page {
  margin: 0 !important;
  box-shadow: none !important;
}
.bulk-group-cover-body {
  position: absolute;
  inset: 4mm 0 14mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20mm 18mm 28mm;
  color: var(--pdf-ink);
  text-align: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(47, 128, 237, .12), transparent 35%),
    linear-gradient(180deg, #fff 0%, #f4f8fd 100%);
}
.bulk-group-cover-logo {
  width: 34mm;
  height: 25mm;
  object-fit: contain;
}
.bulk-group-cover-org {
  margin: 5mm 0 0;
  color: var(--pdf-brand);
  font-size: 15px;
  font-weight: 900;
}
.bulk-group-cover-school {
  margin: 18mm 0 4mm;
  color: #334155;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.35;
  word-break: keep-all;
}
.bulk-group-cover-body h1 {
  margin: 0;
  color: var(--pdf-brand);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
}
.bulk-group-cover-divider {
  width: 34mm;
  height: 3px;
  margin: 13mm 0;
  background: linear-gradient(90deg, var(--pdf-brand), var(--brand-blue));
}
.bulk-group-cover-body h2 {
  margin: 0;
  color: var(--pdf-brand);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.3;
  word-break: keep-all;
}
.bulk-group-cover-body > strong {
  margin-top: 7mm;
  color: var(--pdf-accent);
  font-size: 24px;
  font-weight: 900;
}
.bulk-group-cover-period {
  margin: 18mm 0 0;
  padding: 3mm 6mm;
  border: 1px solid var(--pdf-line);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
}
@media (max-width: 900px) {
  .batch-report-page-dialog {
    width: min(100vw - 12px, 900px);
    height: min(96dvh, 1000px);
    max-height: min(96dvh, 1000px);
  }
  .batch-output-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(180px, 44%) minmax(0, 1fr);
  }
  .batch-output-preview-pane {
    gap: 8px;
    padding: 10px;
  }
  .batch-output-settings-pane {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .batch-output-settings-scroll {
    padding: 14px;
  }
  .batch-report-mode {
    flex-direction: column;
  }
  .batch-output-page-navigation {
    flex: 0 0 auto;
  }
  .batch-output-page-navigation button {
    min-width: 0;
  }
  .batch-output-preview-viewport {
    padding: 8px;
  }
}
@media (max-width: 520px) {
  .batch-report-page-dialog .dialog-head {
    padding: 10px 12px;
  }
  .batch-output-preview-head {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }
  .batch-output-preview-head p {
    display: none;
  }
  .batch-output-page-navigation {
    justify-content: space-between;
  }
  .batch-output-page-navigation button {
    flex: 1 1 0;
  }
  .batch-output-preview-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .batch-report-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
  }
}
.charge-export-dialog {
  width: min(620px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.charge-export-dialog .dialog-head h2 {
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}
.charge-export-form {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
}
.charge-export-message {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--info-border);
  border-radius: 12px;
  color: var(--info-text);
  background: var(--info-bg);
  font-weight: 900;
}
.charge-export-period {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.charge-export-period legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--brand);
  font-weight: 900;
}
.charge-export-period label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 800;
}
.charge-export-period input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--brand-blue);
}
.charge-export-conditional,
.charge-export-date-grid,
.charge-export-text-grid {
  display: grid;
  gap: 12px;
}
.charge-export-date-grid,
.charge-export-text-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.charge-export-conditional label,
.charge-export-date-grid label,
.charge-export-text-grid label {
  display: grid;
  gap: 7px;
  color: var(--brand);
  font-weight: 900;
}
.charge-export-conditional select,
.charge-export-date-grid input,
.charge-export-text-grid input {
  min-height: var(--form-control-height);
  border-radius: var(--radius-control);
  background: #fff;
}
.charge-export-form .date-picker-trigger {
  padding-inline: 12px;
  white-space: nowrap;
}
.charge-export-actions {
  margin-top: 2px;
  justify-content: flex-end;
}
.group-info-load-dialog {
  width: min(720px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--surface-raised);
}
.group-info-load-dialog .dialog-head h2 {
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}
.group-info-load-body {
  padding: 20px 24px 24px;
}
.group-info-load-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
}
.group-info-option {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
  text-align: left;
}
.group-info-option:hover,
.group-info-option:focus-visible {
  border-color: var(--brand-2);
  background: #f0f7ff;
}
.group-info-option strong {
  color: var(--brand);
  font-size: 15px;
}
.group-info-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.billing-editor-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}
.billing-editor-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.billing-editor-form input,
.billing-editor-form select {
  min-height: var(--control-height);
}
.billing-editor-user {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
}
.billing-editor-user strong {
  color: var(--brand);
  font-size: 16px;
}
.billing-editor-user span,
.billing-editor-user small {
  color: var(--muted);
}
.billing-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.billing-calculation {
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #cfe1f5;
  border-radius: var(--radius-control);
  background: #f4f8fd;
  color: var(--muted);
}
.billing-calculation strong {
  color: var(--brand);
  font-size: 15px;
}
.billing-editor-actions {
  margin-top: 0;
}
.admin-contact-content {
  padding: 24px;
  background: var(--surface-raised);
}
.admin-contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
}
.admin-contact-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--surface-subtle);
}
.admin-contact-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}
.admin-contact-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.admin-contact-empty {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--info-border);
  border-radius: 14px;
  color: var(--info-text);
  background: var(--info-bg);
  font-weight: 800;
  line-height: 1.7;
}

/* Phase 1 UX polish: screen-only consistency pass. Keep print/PDF templates isolated. */
@media screen {
  body {
    font-size: 15px;
  }

  .app-header,
  .tabs,
  main {
    width: min(1500px, calc(100% - 40px));
  }

  .app-header {
    min-height: 104px;
    padding: 22px 28px;
    border-radius: 18px 18px 0 0;
  }

  .app-brand {
    gap: 14px;
  }

  .app-header .kda-logo-header,
  .app-header .kda-logo-header img {
    height: 48px;
  }

  .app-header h1 {
    margin-top: 3px;
    font-size: clamp(28px, 2.4vw, 36px);
  }

  .app-header .eyebrow {
    font-size: 13px;
  }

  .header-actions {
    gap: 7px;
  }

  .header-actions span,
  .header-actions button,
  .header-actions .file-label {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.2;
  }

  .tabs {
    gap: 6px;
    min-height: 60px;
    padding: 10px 16px;
    border-radius: 0 0 16px 16px;
  }

  .tab {
    min-width: 116px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 15px;
  }

  main {
    padding: 24px 0 56px;
  }

  .section-head {
    gap: 18px;
    margin-bottom: 16px;
  }

  .section-head h2 {
    font-size: clamp(25px, 2vw, 31px);
  }

  .section-head p {
    max-width: 820px;
    font-size: 15px;
    line-height: 1.55;
  }

  .panel,
  .table-wrap,
  .summary-card,
  .detail-panel {
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(15, 45, 80, .06);
  }

  .panel {
    padding: 22px;
  }

  .panel.compact {
    padding: 18px;
  }

  .panel h3 {
    margin-bottom: 14px;
    font-size: 18px;
  }

  label,
  .inline-field {
    gap: 6px;
    font-size: 14px;
  }

  input,
  select,
  textarea {
    min-height: var(--form-control-height);
    padding: 0 12px;
    border-radius: var(--radius-control);
    font-size: 14px;
  }

  textarea {
    padding: 10px 12px;
  }

  .inline-field {
    min-height: var(--form-control-height);
    padding: 8px 12px;
    border-radius: var(--radius-control);
  }

  button,
  .file-label {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.2;
  }

  .primary {
    box-shadow: 0 8px 18px rgba(47, 128, 237, .14);
  }

  .ghost,
  .secondary-button {
    border-color: #d5e0eb;
    background: #fbfdff;
  }

  .form-actions,
  .filter-actions,
  .result-actions,
  .report-dialog-actions,
  .history-export-actions {
    align-items: center;
    flex-wrap: wrap;
  }

  .filter-grid {
    gap: 12px;
  }

  .summary-grid {
    gap: 12px;
    margin: 16px 0;
  }

  .summary-card {
    min-height: 82px;
    padding: 14px 16px;
  }

  .summary-card strong {
    font-size: 24px;
  }

  .summary-card span {
    font-size: 13px;
    line-height: 1.35;
  }

  .table-wrap {
    border-radius: 12px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
  }

  .table-wrap th {
    height: 44px;
  }

  .table-wrap tbody tr:nth-child(even) td {
    background: #fcfdff;
  }

  .table-wrap tbody tr:hover td {
    background: #f3f8ff;
  }

  td.actions,
  .results-table-wrap .actions {
    align-items: center;
    gap: 6px;
  }

  .badge {
    min-height: 26px;
    padding: 4px 10px;
    font-size: 12px;
  }

  .segmented {
    border-radius: 10px;
  }

  .segmented button {
    min-height: 38px;
    border-radius: 7px;
    font-size: 14px;
  }

  .login-card {
    width: min(420px, 100%);
    padding: 34px 32px;
    border-radius: 16px;
  }

  .login-field,
  .login-card .login-submit {
    border-radius: 10px;
  }

  #examView {
    padding: 0;
    border-radius: 0;
  }

  #examView .section-head {
    margin-bottom: 14px;
    padding-bottom: 0;
  }

  #examView .section-head h2 {
    font-size: clamp(28px, 2.3vw, 34px);
  }

  #examForm .form-grid {
    gap: 14px 16px;
  }

  #examForm input,
  #examForm select,
  #examForm [data-date-picker],
  #examForm .date-picker-trigger {
    min-height: var(--form-control-height);
  }

  #examForm .question-tools {
    gap: 14px;
    margin: 22px 0 16px;
    padding: 16px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: #fbfdff;
  }

  #examForm .question-tools strong {
    font-size: 16px;
  }

  #examForm .question-tools span {
    font-size: 14px;
    line-height: 1.5;
  }

  #questions {
    min-height: 400px;
  }

  #questions .question-columns {
    gap: 14px;
  }

  #questions .question-column {
    min-height: 400px;
    border-radius: 10px;
  }

  #questions .question-column-body {
    max-height: calc(clamp(400px, 60vh, 640px) - 48px);
  }

  #questions .question-table th {
    height: 48px;
  }

  #questions .question-table td {
    padding: 11px 10px;
  }

  #questions .question-table .question-text {
    padding-left: 14px;
    font-size: 15px;
    line-height: 1.55;
  }

  #questions .question-col-no,
  #questions .question-table .no {
    width: 58px;
  }

  #questions .question-col-scale,
  #questions .question-table .scale {
    width: 50px;
  }

  #questions .question-table input[type="radio"] {
    width: 20px;
    min-height: 20px;
  }

  #examForm .form-actions {
    margin-top: 18px;
    padding-top: 18px;
  }

  #resultsView .result-filter-card,
  #statsView .stats-filter-card,
  .stats-table-card {
    padding: 22px;
    border-radius: 14px;
  }

  #resultsView .filter-grid,
  #statsView .filter-grid {
    gap: 14px 16px;
  }

  #resultsView .summary-card,
  #statsView .summary-card {
    min-height: 86px;
    border-radius: 12px;
  }

  .results-table-wrap {
    border-radius: 12px;
  }

  .results-table-wrap th {
    height: 48px;
  }

  .results-table-wrap td {
    height: 52px;
    font-size: 14px;
  }

  .results-table-wrap .actions button {
    min-height: 32px;
    padding: 6px 10px;
  }

  .stats-chart-grid {
    gap: 14px;
  }

  .stats-chart-grid .chart-panel {
    padding: 20px;
    border-radius: 14px;
  }

  .stats-chart-grid .chart-box {
    min-height: 250px;
    border-radius: 12px;
  }

  .admin-grid {
    gap: 14px;
  }

  .admin-grid .panel {
    padding: 20px;
  }

  .row-form,
  .school-form,
  .user-form,
  .plan-row,
  .mini-form .criteria-row,
  .usage-history-filters {
    gap: 10px;
  }

  .user-form input,
  .user-form select,
  .user-form button {
    min-height: var(--form-control-height);
    font-size: 13px;
  }

  .email-input-group,
  .address-input-grid {
    gap: 8px;
  }

  .chips {
    gap: 8px;
  }

  .chip,
  .detail-item,
  .question-edit-row span,
  .institution-readonly-summary,
  .billing-calc-summary {
    border-radius: 10px;
  }

  dialog {
    border-radius: 14px;
  }

  .dialog-head {
    padding: 14px 18px;
  }

  .dialog-head h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .message-dialog-body,
  .admin-contact-content,
  .group-info-load-body,
  .billing-editor-form {
    padding: 20px;
  }

  .date-picker-popup,
  .result-sort-menu {
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(15, 37, 63, .18);
  }

  .date-picker-head {
    border-radius: 10px;
  }

  .date-picker-day,
  .date-picker-blank,
  .date-picker-month {
    border-radius: 8px;
  }

  .group-info-option {
    color: var(--ink);
  }
}
#report { padding: 0; background: var(--report-page-bg); }
.report-page {
  width: 1120px;
  min-height: 760px;
  margin: 0 auto;
  padding: 38px 44px;
  background: var(--report-page-bg);
  border: 0;
  outline: 0;
}
.report-page + .report-page { border-top: 1px solid #e6e9ee; }
.cover-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 820px;
}
.cover-kicker {
  color: #65717f;
  font-size: 20px;
  font-weight: 800;
}
.cover-page h1 {
  margin: 18px 0 22px;
  color: #05070a;
  font-size: 58px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}
.cover-line {
  width: 100%;
  height: 5px;
  margin-bottom: 34px;
  background: #3f4246;
}
.cover-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #d8dee7;
  border-left: 1px solid #d8dee7;
}
.cover-summary div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 52px;
  border-right: 1px solid #d8dee7;
  border-bottom: 1px solid #d8dee7;
}
.cover-summary span {
  display: grid;
  place-items: center start;
  padding: 0 14px;
  background: #eef3f7;
  color: #4a5665;
  font-weight: 800;
}
.cover-summary strong {
  display: grid;
  place-items: center start;
  min-width: 0;
  padding: 0 14px;
  color: #222832;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.cover-result {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  margin-top: 42px;
  padding: 20px 28px;
  color: #fff;
  background: #4a4e54;
}
.cover-result span {
  font-size: 22px;
  font-weight: 800;
}
.cover-result strong {
  color: #f6ad3d;
  font-size: 48px;
  line-height: 1;
}
.cover-result em {
  min-width: 240px;
  padding: 18px 22px;
  background: #d94343;
  font-style: normal;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}
.cover-note {
  margin-top: 24px;
  color: #68727e;
  font-size: 15px;
  line-height: 1.7;
}
.report-title { display: flex; align-items: end; justify-content: space-between; border-bottom: 3px solid #dfe5ec; padding-bottom: 12px; }
.report-title h1 { margin: 0; font-size: 42px; color: #132c3a; }
.report-title span { color: var(--muted); font-weight: 800; }
.report-bar { margin: 22px 0; padding: 20px 22px; background: linear-gradient(180deg, #f7f8fa, #edf1f5); border-radius: 18px; text-align: center; }
.report-bar strong { color: var(--brand-2); font-size: 44px; }
.report-state { padding: 14px; color: #fff; text-align: center; font-size: 25px; font-weight: 900; border-radius: 16px; }
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0; }
.info-row { display: grid; grid-template-columns: 115px 1fr; border: 1px solid #d8dee7; border-radius: 12px; overflow: hidden; }
.info-row b { padding: 10px; background: #eef3f7; }
.info-row span { padding: 10px; }
.report-section { margin-top: 26px; }
.report-section h2 { margin: 0 0 12px; padding: 10px 14px; color: #fff; background: #132c3a; border-radius: 12px; font-size: 18px; }
.report-chart { min-height: 360px; }
.report-chart svg { width: 100%; height: auto; max-height: 410px; }
.report-table { table-layout: fixed; font-size: 12px; }
.report-table th { background: #28323c; }
.report-table th, .report-table td {
  padding: 8px 7px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: center;
}
.report-table td:first-child, .report-table th:first-child {
  width: 24%;
  text-align: left;
}
.report-table td:last-child, .report-table th:last-child {
  width: 15%;
}
.report-table .score-cell {
  color: #d47a1f;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-table .score-cell strong {
  display: inline-block;
  min-width: 52px;
  max-width: 100%;
  padding: 0 2px;
  text-align: center;
}
.criteria-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.criteria-table th {
  padding: 10px;
  color: #fff;
  background: #3f4246;
  text-align: center;
}
.criteria-table td {
  padding: 10px;
  border: 1px solid #d8dee7;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.criteria-table td:first-child,
.criteria-table td:nth-child(2) {
  width: 120px;
  text-align: center;
  font-weight: 800;
}
.note { margin-top: 14px; color: #444; line-height: 1.7; text-align: center; }
.report-intro { line-height: 1.8; color: #303946; }
.factor-grid { display: grid; gap: 8px; margin-top: 14px; }
.factor-row { display: grid; grid-template-columns: 170px 1fr; border: 1px solid #d8dee7; border-radius: 12px; overflow: hidden; }
.factor-row b { padding: 10px; background: #eef3f7; }
.factor-row span { padding: 10px; }
.legend-list.compact { grid-template-columns: repeat(2, max-content); }
.result-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.result-header h1 {
  margin: 0;
  color: #05070a;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0;
}
.result-header span {
  color: #7c8490;
  font-weight: 800;
}
.score-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32%;
  align-items: center;
  min-height: 74px;
  margin-bottom: 44px;
  color: #e9edf1;
  background: #4a4e54;
}
.score-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 0 18px 0 28px;
}
.score-title {
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}
.score-title strong { color: #fff; }
.score-number {
  color: #f6ad3d;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}
.score-total {
  color: #f3f5f7;
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}
.score-total span {
  color: #cbd0d6;
  font-size: 15px;
}
.score-state {
  display: grid;
  align-self: stretch;
  place-items: center;
  min-width: 0;
  padding: 10px 18px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
}
.report-section h2 {
  margin: 0 0 18px;
  padding: 0;
  color: #30343a;
  background: transparent;
  border-radius: 0;
  font-size: 19px;
  font-weight: 800;
}
.report-section h2::before { content: "· "; }
.result-divider {
  height: 3px;
  margin-bottom: 36px;
  background: #3f4246;
}
.main-chart {
  display: grid;
  place-items: center;
  min-height: 470px;
}
.main-chart svg {
  width: 100%;
  max-width: 980px;
  height: auto;
}
.compact-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 3px solid #3f4246;
}
.compact-page-head h1 {
  margin: 0;
  font-size: 30px;
}
.compact-page-head span {
  color: #737b86;
  font-weight: 800;
}
.result-table-page .report-table {
  margin-top: 16px;
}
.report-table {
  border-top: 0;
}
.report-table tfoot td {
  background: #f5f6f8;
  font-weight: 900;
}
.interpretation {
  margin-top: 28px;
  padding: 22px;
  background: #f7f8fa;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  line-height: 1.75;
  text-align: center;
}
.explanation-page .report-section h2 {
  padding: 10px 14px;
  color: #fff;
  background: #3f4246;
  border-radius: 0;
}
.explanation-page .report-section h2::before { content: ""; }

.print-result-pages {
  display: none;
}
.screen-result {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 34px 50px;
  background: #fff;
  box-sizing: border-box;
  overflow-x: auto;
}
.screen-result-main {
  min-width: 1080px;
  min-height: 720px;
}
.screen-result-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 42px;
}
.screen-result-header h1 {
  margin: 0;
  color: #05070a;
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
}
.screen-result-header button {
  min-width: 136px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  background: #b4b4b4;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.screen-section-title {
  margin-top: 42px;
  color: #30343a;
  font-size: 18px;
  font-weight: 800;
}
.screen-section-title::before {
  content: "· ";
}
.screen-result-divider {
  height: 3px;
  margin: 18px 0 38px;
  background: #3f4246;
}
.screen-chart {
  display: grid;
  justify-items: center;
  min-height: 520px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
}
.screen-chart svg {
  width: 980px;
  max-width: none;
  height: auto;
}
.screen-result-table-section {
  padding: 18px 0 0;
  overflow-x: auto;
  min-width: 1080px;
}
.screen-result-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 22px;
  font-size: 17px;
}
.screen-result-table thead th {
  padding: 18px 10px;
  background: #3f3f3f;
  color: #fff;
  font-weight: 800;
  text-align: center;
}
.screen-result-table tbody th {
  width: 22%;
  padding: 18px 20px;
  background: #dce6f2;
  color: #707070;
  border-bottom: 1px solid #fff;
  text-align: left;
  font-weight: 500;
}
.screen-result-table tbody td,
.screen-result-table tfoot td,
.screen-result-table tfoot th {
  padding: 18px 10px;
  border-bottom: 1px solid #e2e2e2;
  color: #707070;
  text-align: center;
  font-weight: 500;
}
.screen-result-table tfoot th,
.screen-result-table tfoot td {
  background: #f7f7f7;
  font-weight: 800;
}
.screen-result-table .screen-score {
  color: #ff8a1c;
  font-weight: 900;
}
.screen-result-note {
  padding: 34px 20px !important;
  color: #707070 !important;
  font-size: 20px;
  line-height: 1.55;
}
.screen-result-note strong {
  color: #e87922;
}

/* 검사 결과 page: calm clinical result dashboard */
#reportDialog {
  width: min(1380px, 96vw);
}

.result-view-window {
  margin: 0;
  overflow: hidden;
  background: var(--report-screen-bg);
}

.result-window-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background: var(--report-screen-bg);
}

.result-window-head {
  position: sticky;
  top: 0;
  z-index: 20;
  justify-content: flex-end;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

#reportDialog .dialog-head {
  justify-content: flex-end;
  padding: 18px 24px;
}

.report-dialog-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 230px) auto auto minmax(320px, auto);
  align-items: center;
  justify-content: end;
  gap: 14px;
  width: 100%;
}

.report-dialog-toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}

.report-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.report-navigation button {
  min-width: 72px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

.report-navigation span {
  min-width: 58px;
  padding: 8px 10px;
  border: 1px solid var(--info-border);
  border-radius: 999px;
  color: var(--info-text);
  background: var(--info-bg);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.report-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.report-zoom-controls button {
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}

.report-zoom-controls .report-zoom-fit {
  min-width: 96px;
  font-size: 14px;
}

.report-zoom-controls .report-zoom-fit[aria-pressed="true"] {
  border-color: var(--brand-blue);
  color: var(--info-text);
  background: var(--info-bg);
}

.report-zoom-controls output {
  min-width: 66px;
  padding: 9px 10px;
  border: 1px solid var(--info-border);
  border-radius: 999px;
  color: var(--info-text);
  background: var(--info-bg);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.report-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-dialog-actions button {
  min-width: 104px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
}

#report {
  background: var(--report-screen-bg);
}

.report-preview-viewport {
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  outline: none;
  background: var(--report-screen-bg);
  scrollbar-gutter: stable both-edges;
}

.report-preview-viewport:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(47, 128, 237, .28);
}

.report-preview-viewport #report {
  min-width: 100%;
  min-height: 100%;
}

.report-preview-stage {
  position: relative;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.report-preview-stage.is-zoom-ready {
  flex: 0 0 auto;
}

.report-preview-stage.is-zoom-ready > .screen-result {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  margin: 0;
  transform-origin: top left;
}

.screen-result {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
  background: var(--report-screen-bg);
  box-sizing: border-box;
  overflow-x: hidden;
}

.screen-result-main {
  min-width: 0;
  min-height: 0;
}

.screen-page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px 32px;
  border-radius: var(--radius-report-card);
}

.screen-result-logo {
  margin-top: 0;
}

.screen-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.screen-page-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.16;
}

.screen-page-title p:not(.screen-kicker) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.screen-page-title .screen-organization {
  margin: 8px 0 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.screen-print-help {
  flex: 0 0 auto;
}

.screen-summary-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(220px, .8fr) minmax(260px, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--line);
  box-shadow: 0 8px 24px rgba(15, 45, 80, .08);
}

.screen-summary-panel > div {
  min-width: 0;
  padding: 24px 28px;
  background: var(--surface-raised);
}

.screen-summary-id {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.screen-summary-score,
.screen-summary-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.screen-summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.screen-summary-profile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
}

.screen-summary-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.screen-summary-profile-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.screen-summary-id strong,
.screen-summary-name {
  display: block;
  max-width: 100%;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.screen-summary-id small,
.screen-summary-score small {
  display: block;
  margin-top: 8px;
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.screen-summary-id .screen-summary-birthdate,
.screen-summary-id .screen-summary-school,
.screen-summary-id .screen-summary-test-meta {
  margin-top: 6px;
  line-height: 1.45;
}

.screen-summary-id .screen-summary-school {
  color: var(--brand);
  font-weight: 900;
}

.screen-summary-id .screen-summary-subtitle {
  margin-top: 10px;
  color: var(--secondary) !important;
  font-weight: 900;
}

.screen-summary-score strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  color: var(--accent);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .95;
}

.screen-summary-state strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.2;
}

.screen-summary-state::after {
  content: "";
  display: block;
  min-height: 21px;
  margin-top: 8px;
}

.risk-state01 .screen-summary-state strong { background: var(--normal); }
.risk-state02 .screen-summary-state strong { background: var(--low); }
.risk-state03 .screen-summary-state strong { background: var(--warning); }
.risk-state04 .screen-summary-state strong { background: var(--risk); }

.screen-info-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--info-border);
  border-radius: 16px;
  color: var(--info-text);
  background: var(--info-bg);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.screen-chart-note {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.screen-info-line span {
  display: inline-grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
  font-style: normal;
}

.screen-chart-card,
.screen-result-table-section {
  margin-top: 18px;
  padding: 28px 32px;
  border-radius: var(--radius-report-card);
}

.screen-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.screen-card-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.screen-card-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.status-badge.info {
  color: var(--info-text);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
}

.screen-chart {
  display: grid;
  justify-items: center;
  min-height: 0;
  padding: 12px 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
}

.screen-chart svg {
  width: min(100%, 1040px);
  max-width: 1040px;
  height: auto;
}

.screen-result-table-section {
  min-width: 0;
  overflow: visible;
}

.screen-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--divider);
  border-radius: 16px;
}

.screen-result-table {
  width: 100%;
  min-width: 980px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 15px;
}

.screen-result-table thead th {
  padding: 16px 12px;
  background: var(--table-head);
  color: var(--table-head-text);
  border: 0;
  font-weight: 900;
  text-align: center;
}

.screen-result-table thead th:first-child { border-top-left-radius: 14px; }
.screen-result-table thead th:last-child { border-top-right-radius: 14px; }

.screen-result-table tbody th,
.screen-result-table tfoot th {
  width: 22%;
  padding: 15px 18px;
  border-bottom: 1px solid var(--divider);
  color: var(--ink);
  background: var(--table-row-accent);
  text-align: left;
  font-weight: 800;
}

.screen-result-table tbody td,
.screen-result-table tfoot td {
  padding: 15px 10px;
  border-bottom: 1px solid var(--divider);
  color: var(--secondary);
  background: var(--surface-raised);
  text-align: center;
  font-weight: 600;
}

.screen-result-table tfoot th,
.screen-result-table tfoot td {
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
}

.screen-result-table .screen-score {
  color: var(--warning);
  font-weight: 900;
}

.screen-result-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 18px 20px !important;
  border: 1px solid var(--risk-border);
  border-radius: 16px;
  color: var(--risk-text) !important;
  background: var(--risk-bg);
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
}

.screen-result-note strong {
  align-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--warning);
  font-size: 13px;
  font-weight: 900;
}

.screen-result-note p {
  margin: 0;
}

.screen-result-note b {
  color: var(--warning);
}

.tod-page {
  position: relative;
  width: 980px;
  min-height: 1320px;
  padding: 0;
  color: #000;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 18px;
}
.tod-content {
  position: relative;
  padding-top: 72px;
}
.tod-date {
  position: absolute;
  top: 1px;
  right: 0;
  margin: 0;
  color: #222;
  font-size: 16px;
  font-weight: 800;
}
.tod-page h2 {
  margin: 0 0 50px;
  padding-left: 0;
  color: #000;
  background: none;
  border-radius: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
}
.tod-page h2::before {
  content: "»";
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0 12px 0 0;
  border: 0;
  color: #4a98b9;
  transform: none;
  vertical-align: middle;
}
.tod-page h2 span {
  color: #767676;
  font-size: .72em;
  font-weight: 700;
}
.tod-page h3 {
  margin: 0 0 18px;
  color: #111;
  font-size: 25px;
  font-weight: 500;
}
.tod-page h3 span {
  color: #2077a5;
  border-bottom: 1px solid #2077a5;
}
.tod-bottom {
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 100%;
  margin: 0;
}
.tod-bottom img {
  height: auto;
}
.tod-cover {
  min-height: 1320px;
}
.tod-cover-top {
  margin-bottom: 141px;
  padding-bottom: 2px;
  border-bottom: 3px solid #79c4ec;
}
.tod-cover-top p {
  margin: 0 0 100px;
}
.tod-cover-top p img {
  width: 100%;
}
.tod-cover-top h1 {
  margin: 0;
  padding: 0 0 69px 74px;
  border-bottom: 2px solid #79c4ec;
  color: #3f3f3f;
  font-size: 78px;
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1.1;
}
.tod-cover-content {
  width: 832px;
  margin: 0 auto;
}
.tod-cover-info {
  margin: 0 0 220px;
  padding: 0;
  border-top: 2px dashed #d7edf9;
  list-style: none;
}
.tod-cover-info li {
  padding: 2px 0;
  border-bottom: 2px dashed #d7edf9;
}
.tod-cover-info dl {
  display: grid;
  grid-template-columns: 231px minmax(0, 1fr);
  margin: 0;
}
.tod-cover-info dt {
  padding: 18px 0 17px 11px;
  background: #d7edf9;
  font-weight: 500;
}
.tod-cover-info dt span {
  display: block;
  border-right: 2px solid #79c4ec;
}
.tod-cover-info dd {
  margin: 0;
  padding: 18px 0 17px 38px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tod-intro {
  margin: 0;
  padding: 18px 0 17px;
  border-top: 1px solid #d9d9d9;
  border-bottom: 1px solid #d9d9d9;
  color: #000;
  line-height: 1.9;
  text-align: justify;
  letter-spacing: .6px;
}
.tod-cover-bottom {
  left: 0;
  text-align: center;
}
.tod-info .tod-notice {
  margin: 0 0 20px;
  font-size: 25px;
  font-weight: 700;
}
.tod-factor-table,
.tod-result-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.tod-factor-table {
  margin-bottom: 100px;
  border-top: 2px solid #7f7f7f;
  border-bottom: 2px solid #7f7f7f;
}
.tod-factor-table th {
  width: 246px;
  padding: 20px 0 16px 20px;
  background: #d7edf9;
  color: #010101 !important;
  border-bottom: 1px solid #fff;
  text-align: left;
  font-weight: 800;
  line-height: 1.4;
}
.tod-factor-table td {
  padding: 20px 0 16px 25px;
  color: #353535;
  border-bottom: 1px solid #bfc0c2;
  line-height: 1.4;
}
.tod-range {
  margin: -8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: 1.2px;
}
.tod-range li {
  margin-bottom: 8px;
}
.tod-total {
  margin-bottom: 98px;
  border-top: 2px solid #a4a4a4;
  border-bottom: 2px solid #a4a4a4;
}
.tod-total p {
  margin: 0;
  text-align: center;
}
.tod-score {
  padding: 42px 0 38px;
  background: #e9e9e9;
  color: #999;
  font-size: 35px;
}
.tod-score span {
  font-size: 60px;
  font-weight: 800;
}
.tod-score em {
  color: #555;
  font-size: 40px;
  font-style: normal;
}
.tod-score small {
  color: #464646;
  font-size: 20px;
}
.tod-state {
  height: 124px;
  background: #f6f6f6;
  color: #555;
  font-size: 30px;
  line-height: 126px;
}
.tod-state strong {
  border-bottom: 2px solid currentColor;
  font-size: 43px;
}
.tod-total.state01 .tod-score span,
.tod-total.state01 .tod-state strong { color: #2e9e5b; }
.tod-total.state02 .tod-score span,
.tod-total.state02 .tod-state strong { color: #4f8ec9; }
.tod-total.state03 .tod-score span,
.tod-total.state03 .tod-state strong { color: #f07900; }
.tod-total.state04 .tod-score span,
.tod-total.state04 .tod-state strong { color: #ec303e; }
.tod-graph {
  width: 980px;
  height: 663px;
}
.tod-graph svg {
  width: 100%;
  height: auto;
  display: block;
}
.tod-result-table th,
.tod-result-table td {
  border-bottom: 1px solid #bfc0c2;
  text-align: center;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.tod-result-table thead th {
  width: 151px;
  padding: 21px 0 19px;
  background: #3f3f3f;
  color: #fff;
  font-weight: 500;
}
.tod-result-table thead th:first-child {
  width: 184px;
}
.tod-result-table tbody th {
  width: 164px;
  padding: 20px 0 16px 20px;
  background: #d7edf9;
  color: #010101 !important;
  border-bottom: 1px solid #fff;
  text-align: left;
  font-weight: 800;
}
.tod-result-table tbody td {
  padding: 20px 0 16px;
  font-size: 16px;
}
.tod-result-table tfoot th {
  padding: 18px 0 17px;
  background: #d7edf9;
  color: #010101 !important;
  font-size: 20px;
  font-weight: 800;
}
.tod-result-table tfoot td {
  padding: 24px 0 19px;
  font-size: 16px;
}
.tod-result-score {
  color: #f07900;
  font-weight: 800;
}
.tod-result-bottom {
  padding: 22px 16px !important;
  color: #333;
  font-size: 15px !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

/* Dedicated 5-page DISK PDF report template */
.report-document {
  display: none;
  color: var(--pdf-ink);
  font-family: var(--font-ui);
  margin: 0;
  padding: 0;
}

.pdf-page {
  position: relative;
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--report-page-bg);
}

.report-document .pdf-page:not(:last-child) {
  page-break-after: always;
  break-after: page;
}

.report-document .pdf-page:last-child {
  page-break-after: auto !important;
  break-after: auto !important;
}

.pdf-header {
  position: relative;
  height: 31mm;
  padding: 7mm 16mm 0;
  overflow: hidden;
}

.pdf-header::after {
  content: "";
  position: absolute;
  top: 6mm;
  right: -14mm;
  width: 82mm;
  height: 28mm;
  border: 1px solid rgba(47, 128, 237, .12);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.pdf-top-band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4mm;
  background: linear-gradient(90deg, var(--pdf-brand), var(--brand-blue));
}

.pdf-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-kda,
.pdf-kda-logo {
  display: inline-grid;
  place-items: center;
  width: 16mm;
  height: 16mm;
  border-radius: 50%;
  color: var(--text-on-brand);
  background: var(--pdf-accent);
  font-size: 17px;
  font-weight: 900;
}

.pdf-kda-logo {
  display: block;
  width: 20mm;
  height: 16mm;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.pdf-brand-divider {
  width: 1px;
  height: 16mm;
  background: var(--pdf-line);
}

.pdf-brand strong {
  display: block;
  color: var(--pdf-brand);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.pdf-brand small {
  display: block;
  margin-top: 4px;
  color: #5f6c80;
  font-size: 11px;
  font-weight: 700;
}

.pdf-date-badge {
  position: absolute;
  z-index: 2;
  top: 10mm;
  right: 16mm;
  padding: 6px 10px;
  border: 1px solid var(--pdf-line);
  border-radius: 999px;
  color: var(--pdf-brand);
  background: var(--report-page-bg);
  font-size: 12px;
  font-weight: 900;
}

.pdf-page-body {
  padding: 0 16mm 20mm;
}

.pdf-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14mm;
  display: grid;
  place-items: center;
  background: var(--pdf-brand);
  color: var(--text-on-brand);
}

.pdf-footer p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.pdf-footer span {
  position: absolute;
  right: 16mm;
  font-size: 11px;
  font-weight: 900;
}

.pdf-page-title {
  margin-bottom: 8mm;
  padding-bottom: 4mm;
  border-bottom: 2px solid #2f80ed;
}

.pdf-page-title h1,
.pdf-cover-title h1 {
  margin: 0;
  color: var(--pdf-brand);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}

.pdf-page-title p,
.pdf-cover-title span {
  display: block;
  margin-top: 8px;
  color: #5f6c80;
  font-size: 14px;
  font-weight: 700;
}

.pdf-cover-org {
  display: block;
  margin-top: 10px;
  color: var(--pdf-brand);
  font-size: 14px;
  font-weight: 900;
}

.pdf-cover-title {
  margin-top: 8mm;
  margin-bottom: 12mm;
  padding-bottom: 8mm;
  border-bottom: 3px solid var(--pdf-accent);
}

.pdf-cover-title p {
  margin: 0 0 8px;
  color: var(--pdf-accent);
  font-size: 15px;
  font-weight: 900;
}

.pdf-card {
  padding: 18px 20px;
  border: 1px solid var(--pdf-line);
  border-radius: var(--radius-pdf-card);
  background: var(--report-page-bg);
  box-shadow: 0 4px 12px rgba(15, 45, 80, .08);
}

.pdf-card h2,
.pdf-chart-section h2 {
  margin: 0 0 13px;
  color: var(--pdf-brand);
  font-size: 21px;
  font-weight: 900;
}

.pdf-page-3 .pdf-chart-section h2 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.pdf-student-card {
  display: grid;
  gap: 0;
  margin-bottom: 11mm;
}

.pdf-info-row {
  display: grid;
  grid-template-columns: 12mm 36mm 1px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 17mm;
  border-bottom: 1px dashed var(--pdf-line);
}

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

.pdf-group-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6mm;
  padding-top: 4mm;
  color: var(--pdf-ink);
  font-size: 12px;
  font-weight: 800;
}

.pdf-group-meta-row strong {
  margin-right: 2mm;
  color: var(--pdf-brand);
  font-size: 12px;
}

.pdf-info-icon,
.pdf-icon-circle,
.pdf-factor-icon,
.pdf-alert-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-on-brand);
  background: var(--brand-blue);
  font-weight: 900;
}

.pdf-info-icon {
  width: 10mm;
  height: 10mm;
}

.pdf-info-row strong {
  color: var(--pdf-brand);
  font-size: 14px;
  font-weight: 900;
}

.pdf-info-row small {
  display: block;
  margin-top: 2px;
  color: #7b8798;
  font-size: 10px;
}

.pdf-info-row em {
  height: 12mm;
  background: #dde8f5;
}

.pdf-info-row p {
  margin: 0;
  color: var(--pdf-ink);
  font-size: 15px;
  font-weight: 800;
}

.pdf-cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58mm;
  gap: 7mm;
}

.pdf-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdf-check-list li {
  position: relative;
  padding-left: 18px;
  color: var(--pdf-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.pdf-check-list li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pdf-accent);
}

.pdf-group-guide {
  display: grid;
  align-content: start;
  gap: 9px;
}

.pdf-status-pill {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text-on-brand);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.pdf-status-pill.state01 { background: #2e9e5b; }
.pdf-status-pill.state02 { background: #4f8ec9; }
.pdf-status-pill.state03 { background: #f97316; }
.pdf-status-pill.state04 { background: #d9534f; }

.pdf-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8mm 0 4mm;
}

.pdf-section-title span {
  display: inline-grid;
  place-items: center;
  width: 11mm;
  height: 11mm;
  border-radius: 50%;
  color: var(--text-on-brand);
  background: var(--brand-blue);
  font-size: 17px;
  font-weight: 900;
}

.pdf-section-title h2 {
  margin: 0;
  color: var(--pdf-brand);
  font-size: 24px;
  font-weight: 900;
}

.pdf-section-title small {
  margin-left: 8px;
  color: #7b8798;
  font-size: 15px;
  font-weight: 800;
}

.pdf-section-copy {
  margin: 0 0 4mm;
  color: #5f6c80;
  font-size: 13px;
  font-weight: 700;
}

.pdf-factor-card {
  padding: 0 18px;
}

.pdf-factor-row {
  display: grid;
  grid-template-columns: 9mm 42mm 1fr;
  align-items: center;
  gap: 12px;
  min-height: 14mm;
  border-bottom: 1px dashed var(--pdf-line);
}

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

.pdf-factor-icon {
  width: 7mm;
  height: 7mm;
  font-size: 11px;
}

.pdf-factor-row strong {
  color: var(--pdf-brand);
  font-size: 13px;
  font-weight: 900;
}

.pdf-factor-row p {
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid #dde8f5;
  color: var(--pdf-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.pdf-guide-card {
  margin-top: 4mm;
  background: #f8fbff;
}

.pdf-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 76mm) minmax(0, 44mm) minmax(0, 58mm);
  gap: 1px;
  overflow: hidden;
  margin: 1mm 0 5mm;
  border: 1px solid var(--pdf-line);
  border-radius: 16px;
  background: var(--pdf-line);
}

.pdf-page-3 .pdf-summary-card {
  margin-bottom: 4mm;
}

.pdf-summary-card > div {
  min-height: 37mm;
  padding: 12px 14px;
  background: var(--report-page-bg);
}

.pdf-summary-id {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.pdf-summary-label {
  display: block;
  margin-bottom: 5px;
  color: #5f6c80;
  font-size: 10px;
  font-weight: 900;
}

.pdf-summary-profile {
  display: grid;
  grid-template-columns: 11mm minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
}

.pdf-icon-circle {
  width: 11mm;
  height: 11mm;
  font-size: 13px;
}

.pdf-summary-profile-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.pdf-summary-profile-text strong {
  color: var(--pdf-brand);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.pdf-summary-card small {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  color: #5f6c80;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.pdf-summary-card .pdf-summary-school,
.pdf-summary-card .pdf-summary-subtitle {
  font-weight: 900;
}

.pdf-summary-card .pdf-summary-school {
  color: var(--pdf-brand);
}

.pdf-summary-card .pdf-summary-subtitle {
  margin-top: 5px;
  color: var(--secondary);
}

.pdf-summary-score,
.pdf-summary-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pdf-summary-score strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 13mm;
  color: var(--pdf-accent);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.pdf-summary-state strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 13mm;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.pdf-summary-state::after {
  content: "";
  display: block;
  min-height: 14px;
  margin-top: 3px;
}

.risk-state01 .pdf-summary-state strong { background: var(--normal); }
.risk-state02 .pdf-summary-state strong { background: var(--low); }
.risk-state03 .pdf-summary-state strong { background: var(--warning); }
.risk-state04 .pdf-summary-state strong { background: var(--risk); }

.pdf-chart-section {
  margin-top: 4mm;
  padding-top: 3mm;
  border-top: 2px solid #dde8f5;
}

.pdf-page-3 .pdf-chart-section {
  margin-top: 2mm;
  padding-top: 2mm;
}

.pdf-chart-wrap {
  display: grid;
  justify-items: center;
  height: 136mm;
  overflow: hidden;
}

.pdf-page-3 .pdf-chart-wrap {
  height: 121mm;
}

.pdf-chart-wrap svg {
  width: 184mm;
  max-width: 100%;
  height: auto;
}

.pdf-info-bar {
  margin: 4mm 0 0;
  padding: 10px 14px;
  border: 1px solid var(--pdf-line);
  border-radius: 12px;
  color: var(--brand);
  background: #eaf4ff;
  font-size: 13px;
  font-weight: 800;
}

.pdf-page-3 .pdf-info-bar {
  position: absolute;
  right: 16mm;
  bottom: 16mm;
  left: 16mm;
  margin: 0;
  padding: 5px 14px;
}

.pdf-table-card {
  overflow: hidden;
  border: 1px solid var(--pdf-line);
  border-radius: 14px;
}

.pdf-score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.pdf-score-table th,
.pdf-score-table td {
  padding: 9px 7px;
  border-bottom: 1px solid #dde8f5;
  color: var(--pdf-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
}

.pdf-score-table thead th {
  background: var(--pdf-brand);
  color: var(--text-on-brand);
  font-size: 11px;
  font-weight: 900;
}

.pdf-score-table thead th:first-child { border-top-left-radius: 12px; }
.pdf-score-table thead th:last-child { border-top-right-radius: 12px; }

.pdf-score-table tbody th,
.pdf-score-table tfoot th {
  background: #eaf4ff;
  color: var(--pdf-brand);
  text-align: left;
  font-weight: 900;
}

.pdf-score-table tfoot th,
.pdf-score-table tfoot td {
  background: #f8fbff;
  font-weight: 900;
}

.pdf-score {
  color: #f97316 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.pdf-row-icon {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--pdf-accent);
}

.pdf-recommendation {
  display: grid;
  grid-template-columns: 13mm 1fr;
  gap: 12px;
  margin-top: 8mm;
  padding: 16px;
  border: 1px solid #fdba74;
  border-radius: 16px;
  background: #fff4ea;
}

.pdf-alert-icon {
  width: 11mm;
  height: 11mm;
  background: #f97316;
}

.pdf-recommendation p {
  margin: 0;
  color: var(--pdf-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.75;
}

.pdf-recommendation strong {
  color: #f97316;
}

.result-recommendation-message,
.result-group-comparison-message,
.result-follow-up-message {
  display: block;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.result-group-comparison-message,
.result-follow-up-message {
  margin-top: 8px;
}

.pdf-comment-page .pdf-page-body {
  padding-bottom: 16mm;
}

.pdf-comment-page .pdf-page-title {
  margin-bottom: 5mm;
}

.pdf-comment-page .pdf-page-title h1 {
  font-size: 32px;
}

.pdf-comment-page .pdf-page-title p {
  max-width: 150mm;
  line-height: 1.55;
}

.pdf-comment-info,
.pdf-comment-section,
.pdf-comment-checklist {
  box-shadow: 0 3px 10px rgba(15, 45, 80, .06);
}

.pdf-comment-info {
  margin-bottom: 3mm;
  padding: 14px 16px;
}

.pdf-comment-info h2,
.pdf-comment-section h2,
.pdf-comment-checklist h2 {
  margin: 0 0 10px;
  color: var(--pdf-brand);
  font-size: 16px;
  font-weight: 900;
}

.pdf-comment-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--pdf-line);
  border-radius: 12px;
  background: var(--pdf-line);
}

.pdf-comment-info-grid div {
  display: grid;
  grid-template-columns: 26mm 1fr;
  align-items: center;
  min-height: 11mm;
  padding: 8px 10px;
  background: #fff;
}

.pdf-comment-info-grid strong {
  color: var(--pdf-brand);
  font-size: 12px;
  font-weight: 900;
}

.pdf-comment-info-grid span {
  min-height: 14px;
  color: var(--pdf-ink);
  font-size: 12px;
  font-weight: 800;
}

.pdf-comment-section {
  margin-bottom: 3mm;
  padding: 14px 16px;
}

.pdf-writing-lines {
  display: grid;
  gap: 6px;
  min-height: 84mm;
  padding: 3px 2px 0;
}

.pdf-writing-lines span {
  display: block;
  border-bottom: 1px solid #dde8f5;
}

.pdf-comment-saved-text {
  min-height: 84mm;
  max-height: 84mm;
  margin: 0;
  overflow: hidden;
  color: var(--pdf-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  white-space: normal;
}

.pdf-comment-checklist {
  padding: 14px 16px;
}

.pdf-comment-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.pdf-comment-check-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pdf-ink);
  font-size: 12px;
  font-weight: 800;
}

.pdf-comment-check-grid em {
  display: inline-block;
  width: 4.2mm;
  height: 4.2mm;
  border: 1.5px solid var(--pdf-accent);
  border-radius: 4px;
  background: #fff;
  flex: 0 0 auto;
}

.pdf-comment-other-line {
  height: 8mm;
  margin-top: 8px;
  border-bottom: 1px solid #dde8f5;
}

.pdf-signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14mm;
  margin-top: 5mm;
  color: var(--pdf-brand);
  font-size: 13px;
  font-weight: 900;
}

.pdf-signature-row p {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.pdf-signature-row span {
  flex: 1;
  border-bottom: 1.5px solid var(--pdf-brand);
}

@media screen {
  :root {
    --ux-blue-900: #092b55;
    --ux-blue-700: #185fa9;
    --ux-blue-050: #f3f8ff;
    --ux-border: #d8e4f1;
    --ux-muted-panel: #f8fbff;
    --ux-danger: #c83f3f;
  }

  .login-screen {
    padding: 24px;
  }

  .login-shell {
    width: min(1280px, 100%);
    min-height: min(760px, calc(100vh - 48px));
    border-color: rgba(131, 178, 220, .5);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(21, 65, 112, .16);
  }

  .login-card {
    border: 1px solid rgba(15, 95, 191, .12);
    box-shadow: 0 18px 44px rgba(16, 62, 108, .14);
  }

  .login-lock {
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 16px;
  }

  .login-card h2 {
    margin-bottom: 22px;
    color: var(--ux-blue-900);
    font-size: 26px;
  }

  .login-field {
    min-height: 52px;
    border-color: var(--ux-border);
    background: var(--ux-muted-panel);
  }

  .login-field:focus-within {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--focus-ring);
  }

  .password-eye {
    min-height: 34px;
    padding: 5px 10px;
  }

  .app-header {
    background:
      linear-gradient(135deg, rgba(9, 43, 85, .96), rgba(24, 95, 169, .96)),
      var(--ux-blue-900);
  }

  .app-brand-text {
    display: grid;
    gap: 3px;
  }

  .header-actions #currentUserLabel {
    background: rgba(255, 255, 255, .18);
    font-weight: 900;
  }

  .header-actions #currentUserLabel:hover,
  .header-actions #currentUserLabel:focus-visible {
    border-color: rgba(255, 255, 255, .58);
    color: var(--brand);
    background: rgba(255, 255, 255, .92);
  }

  .header-actions #recordCount {
    color: #dff0ff;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .tab {
    border: 1px solid transparent;
  }

  .tab.active {
    border-color: rgba(47, 128, 237, .28);
  }

  .view {
    animation: ux-view-enter .16s ease-out;
  }

  @keyframes ux-view-enter {
    from { opacity: .72; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head > div:first-child {
    min-width: 0;
  }

  .panel h3,
  .history-section-head h3,
  .screen-card-head h3 {
    letter-spacing: 0;
  }

  .filter-grid {
    align-items: end;
  }

  .filter-field {
    min-width: 0;
  }

  .filter-field > span {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    color: var(--ux-blue-900);
    font-size: 13px;
    font-weight: 900;
  }

  .filter-field input,
  .filter-field select {
    background: #fff;
  }

  .filter-field--keyword {
    grid-column: span 2;
  }

  #resultFilters .filter-field--startDate,
  #resultFilters .filter-field--endDate,
  #statsFilters .filter-field--startDate,
  #statsFilters .filter-field--endDate {
    max-width: none;
  }

  #examView {
    background: transparent;
  }

  #examView .section-head {
    border-bottom-color: var(--ux-border);
  }

  #examForm .exam-input-section {
    min-width: 0;
  }

  #examForm.group-mode .exam-input-section {
    border-radius: 14px;
  }

  #examForm.group-mode .exam-section-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider);
  }

  #examForm .inline-field {
    justify-content: flex-start;
  }

  #examForm .inline-field legend {
    min-width: 42px;
  }

  #examForm .question-tools {
    position: sticky;
    top: 76px;
    z-index: 10;
  }

  #omrInput {
    font-variant-numeric: tabular-nums;
  }

  #questions .question-column-head {
    position: sticky;
    top: 0;
    z-index: 8;
  }

  #questions .question-table tbody tr {
    transition: background .12s ease, box-shadow .12s ease;
  }

  #questions .question-table tr.question-active td {
    box-shadow: inset 0 1px 0 rgba(47, 128, 237, .14), inset 0 -1px 0 rgba(47, 128, 237, .14);
  }

  #questions .question-table tr.question-complete .no {
    color: #0c7a43;
  }

  #questions .question-table input[type="radio"] {
    cursor: pointer;
  }

  #examForm .save-action-group .primary {
    min-width: 160px;
  }

  #resultsView .result-actions,
  #statsView .section-head > button {
    flex-shrink: 0;
  }

  #resultsView .result-mode-switch {
    margin: 0;
  }

  #resultsView .result-filter-card,
  #statsView .stats-filter-card {
    border-color: var(--ux-border);
    background: linear-gradient(180deg, #fff, var(--ux-muted-panel));
  }

  #resultSummary,
  #statsSummary {
    align-items: stretch;
  }

  .summary-card {
    display: grid;
    align-content: center;
    gap: 3px;
  }

  .summary-card strong {
    font-variant-numeric: tabular-nums;
  }

  main .table-wrap {
    scrollbar-gutter: stable;
  }

  main .table-wrap th {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  main .table-wrap tbody td,
  main .table-wrap tbody th {
    border-bottom-color: #edf2f7;
  }

  .results-table-wrap table {
    min-width: 1160px;
  }

  .result-row td {
    vertical-align: middle;
  }

  .result-row td:nth-child(4),
  .result-row td:nth-child(7),
  .result-row td:nth-child(8) {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .result-row-actions {
    min-width: 132px;
  }

  .table-action {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
  }

  .table-action-primary {
    color: var(--ux-blue-700);
    border-color: #bfd7f2;
    background: #f2f8ff;
  }

  .table-action-primary:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
  }

  .table-action-danger {
    color: var(--ux-danger);
    border-color: #f0c7c7;
    background: #fff8f8;
  }

  .table-action-danger:hover {
    color: #fff;
    border-color: var(--ux-danger);
    background: var(--ux-danger);
  }

  .result-sort-menu {
    top: calc(100% + 4px);
  }

  .empty-state {
    min-height: 142px;
    border-style: dashed;
    box-shadow: none;
  }

  .empty-state strong {
    color: var(--ux-blue-900);
    font-size: 16px;
  }

  .empty-state span {
    max-width: 460px;
    margin-top: 6px;
    line-height: 1.55;
  }

  .stats-chart-grid .chart-panel,
  .stats-table-card {
    border-color: var(--ux-border);
  }

  .chart-panel h3 {
    color: var(--ux-blue-900);
  }

  #adminContent.admin-grid {
    align-items: stretch;
  }

  #adminContent > .panel {
    border-color: var(--ux-border);
  }

  #adminContent > .panel > h3,
  #usageHistoryPanel .history-section-head h3 {
    color: var(--ux-blue-900);
  }

  .billing-reset-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-color: #f2d2b6 !important;
    background: #fffaf5;
  }

  .billing-reset-panel .warning-text {
    margin: 4px 0 0;
  }

  .admin-search-bar {
    padding: 12px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: var(--ux-muted-panel);
  }

  .admin-search-bar input {
    background: #fff;
  }

  .usage-history-filters {
    padding: 14px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: var(--ux-muted-panel);
  }

  .history-section-head {
    gap: 12px;
  }

  .history-subtitle {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--divider);
  }

  .billing-cell-button {
    border-radius: 10px;
  }

  .pagination button {
    min-width: 38px;
    min-height: 34px;
    padding: 6px 10px;
  }

  .pagination .page-indicator {
    align-self: center;
  }

  dialog {
    border: 1px solid rgba(216, 228, 241, .9);
    overflow: hidden;
  }

  .dialog-head {
    background: linear-gradient(180deg, #f8fbff, #eef5fc);
  }

  .dialog-head .ghost {
    background: #fff;
  }

  .message-dialog-actions {
    border-top: 1px solid var(--divider);
    background: #fbfdff;
  }

  .message-dialog .primary {
    min-width: 92px;
  }

  #reportDialog .dialog-head {
    position: sticky;
    top: 0;
    z-index: 25;
  }

  .report-dialog-toolbar {
    grid-template-columns: minmax(150px, 220px) auto auto minmax(0, 1fr);
    gap: 10px;
  }

  .report-dialog-actions button {
    min-width: 88px;
  }

  .screen-page-title,
  .screen-chart-card,
  .screen-result-table-section {
    border-color: var(--ux-border);
  }
}

@media (max-width: 980px) {
  .result-window-head {
    padding: 10px 12px;
  }
  .report-dialog-toolbar {
    grid-template-columns: minmax(180px, 1fr) auto;
    justify-content: stretch;
  }
  .report-dialog-toolbar > #chartType,
  .report-dialog-toolbar > .report-zoom-controls {
    grid-column: 1;
  }
  .report-dialog-toolbar > .report-navigation,
  .report-dialog-toolbar > .report-dialog-actions {
    grid-column: 2;
  }
  .form-grid, .filter-grid, .summary-grid, .chart-grid, .admin-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-component { grid-template-columns: 1fr 1fr; }
  #examForm .form-grid { grid-template-columns: 1fr 1fr; }
  #examForm.group-mode .exam-group-grid,
  #examForm.group-mode .exam-person-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #examForm .question-tools { grid-template-columns: 1fr; }
  #examForm .entry-support-panel { grid-template-columns: minmax(0, 1fr); }
  #examForm #omrInput { justify-self: stretch; }
  #questions {
    overflow-x: auto;
  }
  #questions .question-columns {
    min-width: 0;
    grid-template-columns: 1fr;
  }
  #questions .question-column-body {
    max-height: 465px;
  }
  #resultsView .filter-grid,
  #statsView .filter-grid,
  #resultsView .summary-grid { grid-template-columns: 1fr 1fr; }
  #statsView .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .institution-form { grid-template-columns: 1fr 1fr; }
  .school-form { grid-template-columns: 1fr 1fr; }
  .user-form { grid-template-columns: 1fr 1fr; }
  .institution-form-actions,
  .school-form-actions,
  .user-form-actions.admin-form-actions {
    grid-column: 1 / -1;
  }
  .usage-filter-row-primary,
  .usage-filter-row-secondary {
    grid-template-columns: 1fr 1fr;
  }
  .charge-request-filter-row-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .charge-request-filter-actions {
    max-width: none;
  }
  .institution-manager-charge-row,
  .institution-manager-usage-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .span-input { grid-column: span 2; }
  .span-4 { grid-column: span 2; }
  .span-2 { grid-column: span 2; }
  .campaign-form,
  .target-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .campaign-form .span-input,
  .target-form .span-input {
    grid-column: 1 / -1;
  }
  .campaign-management-layout {
    grid-template-columns: 1fr;
  }
  .address-input-grid { grid-template-columns: 1fr auto; }
  .address-input-grid .address-base,
  .address-input-grid .address-detail { grid-column: 1 / -1; }
  .screen-result { padding: 34px 22px 44px; }
  .screen-page-title,
  .screen-card-head {
    align-items: stretch;
    flex-direction: column;
  }
  .screen-summary-panel {
    grid-template-columns: 1fr;
  }
  .screen-summary-panel > div {
    padding: 22px 24px;
  }
}
@media (max-width: 720px) {
  .self-entry-public-shell {
    width: calc(100% - 20px);
    padding-top: 18px;
  }
  .self-entry-public-header {
    align-items: flex-start;
  }
  .self-entry-public-card {
    padding: 18px;
    border-radius: 14px;
  }
  .self-entry-metadata,
  .self-entry-info-form {
    grid-template-columns: 1fr;
  }
  .self-entry-question-heading {
    align-items: center;
    flex-wrap: wrap;
  }
  .self-entry-info-summary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .self-entry-actions {
    flex-direction: column-reverse;
  }
  .self-entry-actions button {
    width: 100%;
  }
  .self-entry-link-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .self-entry-exam-form,
  .self-entry-exam-form:not(.group-mode) .self-entry-form-grid,
  .self-entry-exam-form.group-mode .self-entry-group-grid,
  .self-entry-exam-form.group-mode .self-entry-person-grid,
  .self-entry-delivery-grid {
    grid-template-columns: 1fr;
  }
  .self-entry-link-form button,
  .self-entry-created-url-row {
    grid-column: 1 / -1;
  }
  .self-entry-created-url-row {
    grid-template-columns: 1fr;
  }
  .login-brand .login-kda-logo,
  .login-brand .login-kda-logo img {
    height: 112px;
  }
  .app-header, .section-head, .question-tools, .dialog-head {
    align-items: stretch;
    flex-direction: column;
  }
  .app-brand {
    align-items: flex-start;
  }
  .app-header .kda-logo-header,
  .app-header .kda-logo-header img {
    height: 53px;
  }
  .report-dialog-toolbar {
    grid-template-columns: 1fr;
  }
  .report-dialog-toolbar > #chartType,
  .report-dialog-toolbar > .report-navigation,
  .report-dialog-toolbar > .report-zoom-controls,
  .report-dialog-toolbar > .report-dialog-actions {
    grid-column: 1;
  }
  .report-dialog-actions {
    flex-wrap: wrap;
  }
  .report-dialog-actions button {
    flex: 1 1 104px;
  }
  main { padding: 22px 16px 48px; }
  .tabs { padding: 0 16px; overflow-x: auto; }
  .form-grid, .filter-grid, .summary-grid, .chart-grid, .admin-grid, .report-grid {
    grid-template-columns: 1fr;
  }
  .campaign-form,
  .target-form {
    grid-template-columns: 1fr;
  }
  .campaign-management-layout {
    grid-template-columns: 1fr;
  }
  .form-grid-component,
  .search-bar {
    grid-template-columns: 1fr;
  }
  #examView { padding: 0; }
  #examView .section-head {
    align-items: stretch;
    flex-direction: column;
  }
  #examForm .form-grid { grid-template-columns: 1fr; }
  #examForm.group-mode .exam-group-grid,
  #examForm.group-mode .exam-person-grid {
    grid-template-columns: 1fr;
  }
  .exam-workflow-summary {
    margin-top: 0;
  }
  .exam-workflow-summary span {
    flex: 1 1 130px;
  }
  #examForm .entry-support-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  #examForm .exam-section-head {
    align-items: stretch;
    flex-direction: column;
  }
  #examForm .exam-section-actions {
    justify-content: stretch;
  }
  #examForm .exam-section-actions button {
    flex: 1;
  }
  #examForm .save-action-group {
    justify-items: stretch;
  }
  #examForm .always-show-result-option {
    justify-content: flex-end;
  }
  #examForm .question-tools > div { display: grid; }
  #questions .question-column {
    min-height: 360px;
  }
  #questions .question-column-body {
    max-height: 425px;
  }
  #resultsView .filter-grid,
  #statsView .filter-grid,
  #resultsView .summary-grid { grid-template-columns: 1fr; }
  #statsView .summary-grid { grid-template-columns: 1fr; }
  #statsView .stats-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }
  #resultsView .result-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .user-form { grid-template-columns: 1fr; }
  .institution-form { grid-template-columns: 1fr; }
  .charge-export-date-grid,
  .charge-export-text-grid { grid-template-columns: 1fr; }
  .usage-history-filters,
  .usage-filter-row-primary,
  .usage-filter-row-secondary { grid-template-columns: 1fr; }
  .charge-request-filter-row-primary,
  .charge-request-filter-actions { grid-template-columns: 1fr; }
  .span-input { grid-column: span 1; }
  .span-4 { grid-column: span 1; }
  .span-2 { grid-column: span 1; }
  .email-input-group,
  .address-input-grid {
    grid-template-columns: 1fr;
  }
  .billing-editor-grid {
    grid-template-columns: 1fr;
  }
  .user-form-actions {
    justify-content: stretch;
  }
  .user-form-actions button {
    flex: 1 1 0;
  }
  .question-table { font-size: 14px; }
  .question-table th:first-child, .question-table .no { width: 44px; }
  .question-table th:nth-child(n+3), .question-table .scale { width: 36px; }
  .question-table td, .question-table th { padding: 10px 6px; }
  .question-table input { width: 18px; min-height: 18px; }
  .screen-result { padding: 28px 16px 38px; }
  .screen-page-title,
  .screen-chart-card,
  .screen-result-table-section {
    padding: 22px;
    border-radius: 18px;
  }
  .screen-page-title h1 {
    font-size: 30px;
  }
  .screen-summary-id strong {
    font-size: 22px;
  }
  .screen-summary-score strong {
    font-size: 44px;
  }
  .screen-summary-state strong {
    min-height: 50px;
    font-size: 24px;
  }
  .screen-card-head h2 {
    font-size: 21px;
  }
  .screen-result-note {
    grid-template-columns: 1fr;
  }
}

@media screen {
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  input,
  select,
  textarea {
    min-height: var(--form-control-height);
    border-radius: var(--radius-control);
    font-size: 15px;
  }

  button,
  .file-label {
    min-height: 42px;
    border-radius: 999px;
    font-size: 15px;
  }

  .login-field input {
    min-height: 54px;
    border-radius: 10px;
    font-size: 16px;
  }

  .login-card .login-submit {
    min-height: 56px;
    border-radius: 999px;
    font-size: 20px;
  }

  .password-eye,
  .date-picker-trigger,
  .table-action,
  .usage-record-link,
  .charge-reason-button {
    border-radius: 999px;
  }

  .app-header h1 {
    font-size: clamp(30px, 2.4vw, 38px);
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 45, 80, .06);
  }

  .tab {
    min-height: 48px;
    border-radius: 999px;
    font-size: 16px;
  }

  .view {
    scroll-margin-top: 80px;
  }

  .section-head h2 {
    font-size: clamp(27px, 2.6vw, 34px);
  }

  .section-head p,
  .hint,
  .empty-state span {
    font-size: 15px;
  }

  label,
  .filter-field > span,
  .admin-contact-list dt {
    font-size: 14px;
  }

  .table-wrap th,
  .table-wrap td,
  .results-table-wrap th,
  .results-table-wrap td {
    font-size: 15px;
    line-height: 1.45;
  }

  .table-wrap.small th,
  .table-wrap.small td {
    font-size: 14.5px;
  }

  .results-table-wrap tbody tr.result-row td {
    background: #fff;
  }

  .results-table-wrap tbody tr.result-row:nth-child(even) td {
    background: #f8fafc;
  }

  .results-table-wrap tbody tr.result-row:hover td {
    background: #eef5ff;
  }

  .result-row-actions {
    gap: 7px;
  }

  .table-action {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 14px;
  }

  #resultsView .filter-field--keyword,
  #statsView .filter-field--keyword {
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    background: #f6f9fd;
  }

  #resultsView .filter-field--keyword input,
  #statsView .filter-field--keyword input {
    min-height: var(--form-control-height);
    border-color: #cfdceb;
    background: #fff;
  }

  #questions .question-table {
    table-layout: fixed;
  }

  #questions .question-col-no {
    width: 42px;
  }

  #questions .question-col-scale {
    width: 38px;
  }

  #questions .question-table th,
  #questions .question-table td {
    padding: 9px 5px;
  }

  #questions .question-table .question-text {
    font-size: 15px;
    line-height: 1.58;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  #questions .question-table input[type="radio"] {
    width: 18px;
    min-height: 18px;
  }

  #examForm .form-actions button,
  #examForm .save-action-group .primary {
    min-height: 48px;
    padding-right: 20px;
    padding-left: 20px;
    font-size: 16px;
  }

  #examForm .save-action-group .primary {
    min-width: 172px;
  }

  .usage-history-filters {
    align-items: end;
  }

  .usage-filter-row-primary,
  .usage-filter-row-secondary {
    grid-template-columns: 1fr;
  }

  .usage-history-filters #runUsageHistorySearch,
  .usage-history-filters #resetUsageHistorySearch {
    align-self: end;
    min-width: 112px;
  }

  .usage-record-link {
    min-height: 0;
    padding: 0;
    border: 0;
    color: var(--brand-blue);
    background: transparent;
    font-size: inherit;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .usage-record-link:hover {
    color: var(--brand);
  }

  .charge-actor-cell {
    display: grid;
    justify-items: start;
    gap: 6px;
    min-width: 104px;
  }

  .charge-reason-button {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .charge-reason-dialog {
    width: min(720px, calc(100vw - 32px));
  }

  .charge-reason-content {
    display: grid;
    gap: 18px;
  }

  .charge-reason-list {
    display: grid;
    gap: 10px;
    margin: 0;
  }

  .charge-reason-list div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #e2eaf3;
    border-radius: 12px;
    background: #f8fbff;
  }

  .charge-reason-list dt {
    color: var(--brand);
    font-weight: 900;
  }

  .charge-reason-list dd {
    margin: 0;
    color: var(--ink);
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .charge-reason-values h3 {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 17px;
  }

  .charge-reason-values table {
    width: 100%;
    border-collapse: collapse;
  }

  .charge-reason-values th,
  .charge-reason-values td {
    padding: 9px 10px;
    border: 1px solid #dbe7f3;
    font-size: 14px;
    text-align: left;
  }

  .charge-reason-values th {
    color: var(--brand);
    background: #eef6ff;
  }

  .pdf-kda-logo {
    width: 24mm;
    height: 16mm;
    object-fit: contain;
    object-position: left center;
  }

  .pdf-group-identity {
    margin: 4mm 0 0;
    padding: 8px 12px;
    border: 1px solid var(--pdf-line);
    border-radius: 12px;
    color: var(--pdf-brand);
    background: #f8fbff;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
  }

  .btn,
  .btn-pill,
  button,
  .file-label,
  .action-button,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .billing-cell-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease;
  }

  button:hover:not(:disabled),
  .file-label:hover,
  .action-button:hover,
  .primary-button:hover,
  .secondary-button:hover,
  .ghost-button:hover,
  .billing-cell-button:hover {
    transform: translateY(-1px);
  }

  button:focus-visible,
  .file-label:focus-within,
  .action-button:focus-visible,
  .primary-button:focus-visible,
  .secondary-button:focus-visible,
  .ghost-button:focus-visible,
  .billing-cell-button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px var(--focus-ring);
  }

  button:disabled {
    transform: none;
    cursor: not-allowed;
  }

  .btn-primary,
  .primary,
  .primary-button {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(47, 128, 237, .16);
  }

  .btn-primary:hover:not(:disabled),
  .primary:hover:not(:disabled),
  .primary-button:hover:not(:disabled) {
    color: #fff;
    border-color: var(--brand-blue);
    background: var(--brand-blue);
  }

  .btn-secondary,
  .btn-ghost,
  .ghost,
  .secondary-button,
  .ghost-button,
  .file-label,
  .table-action-primary {
    color: var(--brand);
    border-color: #cbdceb;
    background: #fff;
  }

  .btn-secondary:hover:not(:disabled),
  .btn-ghost:hover:not(:disabled),
  .ghost:hover:not(:disabled),
  .secondary-button:hover:not(:disabled),
  .ghost-button:hover:not(:disabled),
  .file-label:hover,
  .table-action-primary:hover:not(:disabled) {
    color: var(--brand-blue);
    border-color: #9ec3ea;
    background: #eef6ff;
  }

  .btn-danger,
  .table-action-danger {
    color: #9b2c3f;
    border-color: #e7c2c9;
    background: #fff7f8;
  }

  .btn-danger:hover:not(:disabled),
  .table-action-danger:hover:not(:disabled) {
    color: #fff;
    border-color: #9b2c3f;
    background: #9b2c3f;
  }

  .btn-compact,
  .table-action,
  .charge-reason-button,
  .usage-record-link,
  .pagination button,
  .report-dialog-actions button,
  .history-export-actions button,
  .date-picker-trigger {
    min-height: 34px;
    padding: 0 12px;
    font-size: 14px;
  }

  input,
  select,
  textarea,
  .date-picker-control {
    border-radius: 10px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions span,
  .header-actions button,
  .header-actions .file-label {
    min-height: 38px;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 800;
  }

  .header-actions span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .22);
    color: #eff7ff;
    background: rgba(255, 255, 255, .15);
  }

  .header-actions .header-settings-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .header-actions .header-settings-icon {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    font-size: 24px;
  }

  .header-actions .header-user-info {
    justify-content: flex-start;
    max-width: min(430px, 100%);
    text-align: left;
  }

  .segmented {
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: #edf5fc;
  }

  .segmented button {
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid #cbdceb;
    color: var(--brand);
    background: #fff;
  }

  .segmented button.active,
  .btn-toggle.is-active {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(15, 47, 91, .16);
  }

  .tab {
    border-radius: 999px;
  }

  .login-links button,
  .login-links a {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
  }

  .login-links button:hover,
  .login-links a:hover {
    border-color: #cbdceb;
    background: #eef6ff;
  }

  .table-action,
  .charge-reason-button {
    border-radius: 999px;
    font-weight: 800;
  }

  .result-row-actions {
    min-width: 132px;
  }

  .charge-modified-value-cell {
    color: #8f1d3d;
    font-weight: 900;
  }

  .charge-modified-value {
    display: inline-block;
    margin-right: 7px;
  }

  .charge-reason-button {
    min-height: 28px;
    padding: 0 10px;
    color: #8f1d3d;
    border-color: #dfb4c0;
    background: #fff7fa;
    font-size: 12.5px;
    vertical-align: middle;
  }

  .charge-reason-button:hover:not(:disabled) {
    color: #fff;
    border-color: #8f1d3d;
    background: #8f1d3d;
  }

  .usage-record-link {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #cbdceb;
    color: var(--brand-blue);
    background: #fff;
    text-decoration: none;
  }

  .date-picker-day,
  .date-picker-blank {
    width: min(40px, 100%);
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 999px;
  }

  .date-picker-month,
  .date-picker-nav,
  .date-picker-year,
  .date-picker-heading-button,
  .date-picker-year-tools button {
    border-radius: 999px;
  }

  .summary-card {
    border-top: 4px solid var(--result-color, var(--brand));
  }

  .summary-card strong {
    color: var(--result-color, var(--brand));
  }

  .summary-card span {
    color: color-mix(in srgb, var(--result-color, var(--brand)) 72%, #334155);
  }

  .result-score {
    color: var(--result-color, var(--brand));
    font-weight: 900;
  }

  #adminContent .admin-card-half {
    grid-column: span 1;
    width: 100%;
  }

  #adminContent .admin-card-plans,
  #adminContent .admin-card-criteria {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  #monthlyPlansForm,
  #criteriaForm {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .admin-card-note {
    margin: 2px 0 14px;
  }

  .admin-save-button {
    justify-self: start;
    min-width: 190px;
    height: var(--form-control-height);
    min-height: var(--form-control-height);
    padding: 0 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
  }

  .admin-password-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: var(--form-gap-y) var(--form-gap-x);
    align-items: center;
  }

  .admin-password-form .form-control {
    width: 100%;
    min-width: 0;
  }

  .admin-password-form > .admin-save-button {
    justify-self: stretch;
    min-width: 120px;
  }

  .plan-form > .admin-save-button,
  .mini-form > .admin-save-button,
  .admin-password-form > .admin-save-button {
    height: var(--form-control-height);
    min-height: var(--form-control-height);
  }

  .plan-form > .admin-save-button,
  .mini-form > .admin-save-button {
    margin-top: auto;
  }

  .admin-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
    align-items: start;
    gap: 16px;
  }

  .usage-history-layout {
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  }

  .admin-list-pane,
  .admin-edit-pane,
  .admin-filter-pane {
    min-width: 0;
  }

  .admin-control-pane {
    margin: 10px 0 14px;
    padding: 14px;
    border: 1px solid var(--divider);
    border-radius: 16px;
    background: #f8fbff;
  }

  .admin-control-pane .admin-search-bar {
    margin-top: 12px;
    margin-bottom: 0;
  }

  .admin-list-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
  }

  .admin-list-two-columns > .empty-state {
    grid-column: 1 / -1;
  }

  .usage-history-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .institution-list.admin-list-two-columns {
    display: grid;
  }

  .usage-history-card,
  .school-admin-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--divider);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 45, 80, .06);
  }

  .usage-card-head,
  .school-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  .usage-card-head strong,
  .school-card-head strong {
    min-width: 0;
    color: var(--brand);
    overflow-wrap: anywhere;
  }

  .compact-card-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
  }

  .compact-card-fields div {
    min-width: 0;
  }

  .compact-card-fields dt {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }

  .compact-card-fields dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .compact-card-actions {
    justify-content: flex-end;
  }

  .usage-history-card .usage-record-link {
    flex: 0 0 auto;
  }

  .usage-history-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .usage-filter-row-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .usage-filter-row-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-edit-pane {
    padding: 14px;
    border: 1px solid var(--divider);
    border-radius: 14px;
    background: #f8fbff;
  }

  .plan-form .plan-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: #f8fbff;
  }

  .plan-form .plan-row span {
    color: var(--brand);
    font-weight: 900;
  }

  .institution-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 12px;
    overflow: hidden;
  }

  .institution-item-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .institution-item-primary strong,
  .institution-name-link {
    flex: 0 1 auto;
    min-width: 0;
    color: var(--brand);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .institution-name-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 900;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .institution-detail-users {
    margin-top: 8px;
  }

  .institution-address {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .institution-item-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .institution-item-secondary .policy-badge {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .institution-item-spacer {
    display: none;
  }

  .institution-policy-controls {
    justify-content: flex-end;
    white-space: nowrap;
  }

  .institution-policy-controls button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .usage-history-layout .usage-history-filters {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
  }

  .usage-history-layout .history-table-wrap {
    margin: 0;
  }

  .school-sort-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, .55fr);
    gap: 10px;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: #f8fbff;
  }

  .school-sort-controls select {
    color: var(--ink);
    background: #fff;
    opacity: 1;
  }

  .school-table-wrap {
    margin-top: 12px;
    overflow: visible;
  }

  .school-table-wrap table {
    width: 100%;
  }

  .school-table-wrap th {
    position: relative;
    overflow: visible;
  }

  .question-admin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .billing-limit-cell {
    width: 170px;
    min-width: 160px;
    max-width: 190px;
    white-space: normal !important;
  }

  .billing-cell-button {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 4px;
    width: 100%;
    max-width: none;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 12px;
    text-align: left;
    white-space: normal;
    overflow: hidden;
    transform: none !important;
  }

  .billing-cell-button span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .billing-cell-button span:nth-child(n+3) {
    display: none;
  }

  .user-form-actions button {
    min-height: var(--form-control-height);
    padding: 0 20px;
    font-size: 15px;
  }

  .user-form-actions .user-cancel-button {
    border-color: #cbdceb;
    color: var(--brand);
    background: #f4f8fc;
  }

  .charge-actor-cell {
    display: table-cell;
    min-width: 80px;
    white-space: normal;
  }

  .charge-modified-value-cell {
    white-space: normal !important;
  }

  .stats-chart-grid .chart-panel,
  .stats-table-card {
    cursor: zoom-in;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
  }

  .stats-chart-grid .chart-panel:hover {
    border-color: #b8d3f0;
    box-shadow: 0 14px 34px rgba(15, 45, 80, .12);
    transform: translateY(-1px);
  }

  .stats-chart-grid .chart-panel::after {
    content: "확대";
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 9px;
    border: 1px solid #cbdceb;
    border-radius: 999px;
    color: var(--brand);
    background: #fff;
    font-size: 12px;
    font-weight: 900;
  }

  .stats-chart-grid .chart-panel {
    position: relative;
    cursor: pointer;
  }

  .stats-table-card {
    position: relative;
    cursor: default;
  }

  .stat-expand-dialog {
    width: min(1120px, calc(100vw - 40px));
    max-height: min(860px, calc(100vh - 40px));
  }

  .stat-expand-content {
    padding: 24px;
    background: #f8fbff;
  }

  .stat-expand-content .chart-box {
    min-height: 520px;
    padding: 18px;
    border: 1px solid var(--divider);
    border-radius: 18px;
    background: #fff;
  }

  .stat-expand-content .chart-box svg {
    width: 100%;
    max-height: 620px;
  }

  .stat-expand-content .table-wrap {
    max-height: 620px;
  }

  .self-profile-dialog {
    width: min(980px, calc(100vw - 40px));
    max-height: min(860px, calc(100vh - 32px));
    overflow: hidden;
  }

  .self-profile-dialog[open] {
    display: flex;
    flex-direction: column;
  }

  .self-profile-dialog .dialog-head {
    flex: 0 0 auto;
  }

  .self-profile-form {
    display: grid;
    gap: 16px;
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px;
  }

  .self-profile-section {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
    border: 1px solid var(--divider);
    border-radius: 16px;
    background: #f8fbff;
  }

  .self-profile-section h3 {
    margin: 0;
    color: var(--brand);
    font-size: 16px;
  }

  .exam-confirmation-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px 18px;
    min-height: 0;
  }

  .exam-confirmation-settings .contact-public-field,
  .exam-confirmation-settings .contact-public-row {
    min-height: 0;
  }

  .exam-confirmation-settings .contact-public-row {
    grid-template-columns: minmax(0, 1fr) 52px auto;
  }

  .field-preference-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .field-preference-layout-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .field-preference-layout-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
  }

  .field-preference-help {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }

  .field-preference-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
  }

  .field-preference-panels > [aria-labelledby="examInputPreferenceGroupTitle"] {
    grid-column: 1;
    grid-row: 1;
  }

  .field-preference-panels > [aria-labelledby="resultSearchPreferenceGroupTitle"] {
    grid-column: 2;
    grid-row: 1;
  }

  .field-preference-panels > [aria-labelledby="statisticsPreferenceGroupTitle"] {
    grid-column: 1;
    grid-row: 2;
  }

  .field-preference-panels > [aria-labelledby="selfEntryPreferenceGroupTitle"] {
    grid-column: 2;
    grid-row: 2 / span 2;
  }

  #adminSectionVisibilityProfileSection {
    grid-column: 1;
    grid-row: 3;
  }

  .field-preference-group {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--divider);
    border-radius: 14px;
    background: #fff;
  }

  .field-preference-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  .field-preference-group h4 {
    margin: 0;
    color: var(--brand);
    font-size: 15px;
    line-height: 1.35;
    word-break: keep-all;
  }

  .field-preference-subsettings {
    display: grid;
    gap: 8px;
  }

  .field-preference-panel {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  .field-preference-panel--disabled {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--warm-surface) 72%, #fff);
  }

  .field-preference-disabled-message {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
  }

  .field-preference-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .field-preference-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #d7e3ef;
    border-radius: 10px;
    background: #f8fbff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
    text-align: left;
    word-break: keep-all;
  }

  .field-preference-toggle:hover,
  .field-preference-toggle:focus-visible {
    border-color: #a9c8e7;
    background: #eef7ff;
  }

  .field-preference-toggle > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .field-preference-count {
    flex: 0 0 auto;
    color: #5c7590;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .field-preference-chevron {
    color: #6987a3;
    font-size: 13px;
    line-height: 1;
    transition: transform .16s ease;
  }

  .field-preference-toggle[aria-expanded="true"] .field-preference-chevron {
    transform: rotate(180deg);
  }

  .field-preference-help-button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid #d7e3ef;
    border-radius: 999px;
    color: #476782;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
  }

  .field-preference-help-button:hover,
  .field-preference-help-button:focus-visible {
    border-color: #a9c8e7;
    color: var(--brand);
    background: #eef7ff;
  }

  .field-preference-list-panel {
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid #e3ebf3;
    border-radius: 12px;
    background: #fbfdff;
  }

  .field-preference-panel-tools {
    display: flex;
    justify-content: flex-end;
  }

  .field-preference-reset {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .field-preference-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid #e0e9f2;
    border-radius: 12px;
    background: #fff;
  }

  .field-preference-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid #e8eff6;
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    word-break: keep-all;
  }

  .field-preference-option:last-child {
    border-bottom: 0;
  }

  .field-preference-option input {
    order: 3;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0 0 0 auto;
    cursor: pointer;
  }

  .field-preference-option input:disabled {
    cursor: not-allowed;
  }

  .field-preference-option > span:not(.field-preference-lock) {
    order: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .field-preference-option.is-fixed {
    color: var(--muted);
    cursor: default;
    background: #f8fbff;
  }

  .field-preference-option--placement {
    display: grid;
    grid-template-columns: minmax(88px, .9fr) minmax(196px, 1.5fr) 58px minmax(58px, auto);
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 12px;
    cursor: default;
  }

  .field-preference-option--placement > .field-preference-name {
    order: 0;
    grid-column: 1;
    grid-row: 1;
    white-space: normal;
    overflow: visible;
  }

  .field-placement-control {
    order: 1;
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(96px, 1fr));
    gap: 6px;
    align-items: center;
  }

  .field-placement-option {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 4px 6px;
    border: 1px solid #d8e4ef;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
  }

  .field-preference-option--placement .field-placement-option input {
    order: 0;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
  }

  .field-placement-visible {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .field-preference-option--placement .field-placement-visible input {
    order: 0;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
  }

  .field-preference-option--placement .field-preference-lock {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  @media (max-width: 720px) {
    .contact-public-row {
      grid-template-columns: minmax(0, 1fr) 52px auto;
    }

    .exam-confirmation-settings {
      grid-template-columns: minmax(0, 1fr);
    }

    .field-preference-section-head {
      align-items: flex-start;
    }

    .field-preference-layout-actions {
      flex: 0 1 auto;
    }

    .field-preference-option--placement {
      grid-template-columns: 1fr;
      align-items: start;
    }

    .field-placement-control {
      grid-column: 1;
      grid-template-columns: 1fr;
    }

    .field-placement-visible,
    .field-preference-option--placement .field-preference-lock {
      grid-column: 1;
      justify-self: start;
    }
  }

  .field-preference-lock {
    order: 2;
    margin-left: 2px;
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid #d6e1ec;
    color: #54708a;
    background: #f4f8fb;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
  }

  @media screen and (max-width: 980px) {
    .field-preference-panels {
      grid-template-columns: 1fr;
    }

    .field-preference-panels > .field-preference-group,
    #adminSectionVisibilityProfileSection {
      grid-column: 1;
      grid-row: auto;
    }
  }

  @media screen and (max-width: 720px) {
    .field-preference-toggle {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .field-preference-count {
      grid-column: 1 / 2;
      grid-row: 2;
    }

    .field-preference-chevron {
      grid-column: 2;
      grid-row: 1 / span 2;
    }
  }

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

  .self-profile-grid label,
  .self-profile-grid .email-field,
  .self-profile-grid .address-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
  }

  .self-profile-address {
    grid-column: 1 / -1;
  }

  .institution-match-summary {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cbdceb;
    border-radius: 12px;
    color: var(--brand);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
  }

  .self-profile-actions {
    position: static;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--divider);
    background: transparent;
    backdrop-filter: none;
  }

  .self-profile-section .self-profile-actions {
    padding-top: 0;
    border-top: 0;
  }

  .self-profile-actions {
    justify-content: flex-end;
  }
}

@media screen and (max-width: 980px) {
  .admin-two-column,
  .usage-history-layout {
    grid-template-columns: 1fr;
  }

  .plan-form .plan-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .plan-form .plan-row span {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 720px) {
  #resultsView .filter-field--keyword,
  #statsView .filter-field--keyword {
    grid-template-columns: 1fr;
    justify-content: stretch;
    border-radius: 18px;
  }

  .charge-reason-list div {
    grid-template-columns: 1fr;
  }

  .institution-policy-controls {
    justify-content: flex-start;
  }

  .institution-item {
    grid-template-columns: 1fr;
  }

  .plan-form .plan-row,
  .school-sort-controls,
  .question-admin-list,
  .admin-list-two-columns,
  .compact-card-fields,
  .self-profile-grid {
    grid-template-columns: 1fr;
  }

  .stat-expand-content {
    padding: 14px;
  }

  .stat-expand-content .chart-box {
    min-height: 380px;
  }
}
@media (max-width: 980px) {
  .preparation-card-grid,
  .offline-student-grid,
  .questionnaire-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .questionnaire-design-fieldset {
    grid-template-columns: 1fr;
  }
  .read-aloud-preparation-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
@media (max-width: 640px) {
  .preparation-card-grid,
  .offline-student-grid,
  .questionnaire-control-row {
    grid-template-columns: 1fr;
  }
  .questionnaire-target-options label,
  .questionnaire-print-options label,
  .questionnaire-choice-group label {
    width: 100%;
  }
}

@media screen {
  /* Phase 1 shared design system normalization. Screen-only by design. */
  .panel,
  .summary-card,
  .detail-panel,
  .table-wrap,
  .preparation-panel,
  .ops-status-card,
  .target-readiness,
  .campaign-readiness-panel,
  .billing-calculation,
  .institution-match-summary {
    border-color: var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-raised);
    box-shadow: var(--shadow);
  }

  .panel.compact,
  .result-filter-card,
  .stats-filter-card,
  .ops-status-card,
  .summary-card {
    padding: var(--card-padding-compact);
  }

  .user-workspace-frame {
    border-color: var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-raised);
    box-shadow: var(--shadow);
  }

  .section-head h2,
  .user-area-title {
    color: var(--ink);
    font-size: var(--title-page);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .section-head p,
  .user-area-head p,
  .hint,
  small {
    color: var(--muted);
  }

  .panel h3,
  .stats-mvp-card h3,
  .stats-table-card h3,
  .screen-card-head h3,
  .history-section-head h3,
  .dialog-head h2 {
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0;
  }

  label,
  .inline-field,
  .field-label,
  .field-label-text {
    color: var(--ink);
    font-size: var(--text-label);
    font-weight: 800;
    line-height: 1.35;
  }

  .form-control,
  .form-select,
  input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
  select,
  textarea,
  .date-picker-control,
  .combobox-wrap,
  .grade-affiliation-control,
  .email-field input,
  .email-field select {
    min-height: var(--form-control-height);
    border-color: var(--control-border);
    border-radius: var(--radius-control);
    color: var(--ink);
    background: var(--control-bg);
    box-shadow: none;
  }

  textarea {
    min-height: 86px;
  }

  .form-control:focus,
  .form-select:focus,
  input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus,
  select:focus,
  textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
  }

  input[readonly],
  input:disabled,
  select:disabled,
  textarea:disabled {
    color: #566174;
    background: var(--control-disabled-bg);
  }

  .date-picker-trigger {
    min-height: var(--control-height-sm);
    border-radius: var(--radius-control);
  }

  button,
  .btn,
  .btn-pill,
  .file-label,
  .action-button,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .billing-cell-button {
    min-height: var(--button-height-md);
    padding: 0 16px;
    border-color: var(--button-border);
    border-radius: var(--radius-control);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
    box-shadow: none;
  }

  .primary,
  .btn-primary,
  .primary-button {
    color: var(--text-on-brand);
    border-color: var(--button-primary-bg);
    background: var(--button-primary-bg);
    box-shadow: var(--button-primary-shadow);
  }

  .primary:hover:not(:disabled),
  .btn-primary:hover:not(:disabled),
  .primary-button:hover:not(:disabled) {
    color: var(--text-on-brand);
    border-color: var(--button-primary-bg-hover);
    background: var(--button-primary-bg-hover);
  }

  .ghost,
  .btn-secondary,
  .btn-ghost,
  .secondary-button,
  .ghost-button,
  .file-label {
    color: var(--brand);
    border-color: var(--button-border);
    background: var(--surface);
  }

  .ghost:hover:not(:disabled),
  .btn-secondary:hover:not(:disabled),
  .btn-ghost:hover:not(:disabled),
  .secondary-button:hover:not(:disabled),
  .ghost-button:hover:not(:disabled),
  .file-label:hover {
    color: var(--brand-blue);
    border-color: #9bbce0;
    background: var(--info-bg);
  }

  .btn-danger,
  .table-action-danger {
    color: #9b2c3f;
    border-color: #e7c2c9;
    background: #fff7f8;
  }

  button:focus-visible,
  a:focus-visible,
  .file-label:focus-within,
  .btn:focus-visible,
  .table-action:focus-visible {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--focus-ring);
  }

  .segmented {
    gap: 4px;
    padding: 4px;
    border-color: var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-muted);
  }

  .segmented button {
    min-height: var(--control-height-sm);
    border-radius: calc(var(--radius-control) - 2px);
    border-color: transparent;
    color: var(--brand);
    background: transparent;
    box-shadow: none;
  }

  .segmented button:hover:not(:disabled) {
    color: var(--text-on-brand);
    border-color: var(--brand);
    background: var(--brand);
  }

  .segmented button.active,
  .btn-toggle.is-active {
    color: var(--text-on-brand);
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: none;
  }

  .segmented button.active:hover:not(:disabled) {
    color: var(--text-on-brand);
    border-color: var(--button-primary-bg-hover);
    background: var(--button-primary-bg-hover);
  }

  .tab {
    min-height: var(--control-height-sm);
    border-radius: var(--radius-control);
  }

  .tab.active {
    color: var(--text-on-brand);
    background: var(--brand);
  }

  .table-wrap {
    border-color: var(--line);
    border-radius: var(--radius-table);
    background: var(--surface);
    box-shadow: none;
  }

  .table-wrap table,
  .question-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--text-table);
  }

  .table-wrap th,
  .question-table th {
    height: 46px;
    background: var(--table-head);
    color: var(--table-head-text);
    font-weight: 900;
    letter-spacing: 0;
  }

  .table-wrap td,
  .question-table td {
    border-bottom-color: var(--table-row-border);
    color: var(--ink);
  }

  .table-wrap tbody tr:hover td,
  .question-table tbody tr:hover td {
    background: var(--table-row-hover);
  }

  .table-action,
  .charge-reason-button,
  .usage-record-link,
  .pagination button,
  .report-dialog-actions button,
  .history-export-actions button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 850;
  }

  .badge,
  .status-badge,
  .target-status-chip,
  .policy-badge,
  .ops-status-badge,
  .stats-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: var(--badge-radius);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
  }

  .state01 { background: var(--normal); }
  .state02 { background: var(--low); }
  .state03 { background: var(--high); }
  .state04 { background: var(--risk); }

  .ops-status-card {
    gap: 10px;
    min-height: 112px;
    background: var(--surface-subtle);
    box-shadow: none;
  }

  .ops-status-badge--ok {
    color: #0b6b3a;
    background: #e9f8ef;
  }

  .ops-status-badge--warning {
    color: #8a5a00;
    background: #fff4d8;
  }

  .ops-status-badge--danger,
  .ops-status-badge--failed {
    color: #9b1c2d;
    background: #ffe4e9;
  }

  .ops-status-badge--unknown {
    color: #4f6174;
    background: #edf3f8;
  }

  dialog {
    border-color: var(--line);
    border-radius: var(--radius-dialog);
    background: var(--surface-raised);
    box-shadow: var(--shadow-lg);
  }

  .dialog-head {
    border-bottom-color: var(--divider);
    background: var(--surface-muted);
  }

  .message-dialog.tone-warning .dialog-head {
    border-bottom-color: var(--risk-border);
    background: var(--risk-bg);
  }

  .preparation-card {
    border-color: var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-raised);
    box-shadow: var(--shadow);
  }

  .preparation-card:hover,
  .preparation-card.is-hovered,
  .preparation-card.is-active.is-hovered {
    border-color: #9bbce0;
    background: #f4f9ff;
    box-shadow: inset 0 0 0 1px #9bbce0, 0 8px 20px rgba(15, 45, 80, .08);
  }

  .preparation-card.is-active {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--brand);
  }

  .preparation-card.is-active.is-hovered {
    border-color: #9bbce0;
    background: #f4f9ff;
    box-shadow: inset 0 0 0 1px #9bbce0, 0 8px 20px rgba(15, 45, 80, .08);
  }
}

@media screen {
  /* Phase 2 user workflow refinement. Keep behavior and output templates unchanged. */
  #examView,
  #resultsView,
  #statsView {
    display: none;
    gap: 22px;
  }

  #examView.active,
  #resultsView.active,
  #statsView.active {
    display: grid;
  }

  #examView .section-head,
  #resultsView .section-head,
  #statsView .section-head {
    margin-bottom: 0;
    padding: 4px 4px 0;
  }

  #examView .section-head p,
  #resultsView .section-head p,
  #statsView .section-head p {
    max-width: 760px;
  }

  #examView .user-area-head {
    align-items: end;
    gap: 16px;
  }

  #examView .exam-workflow-summary {
    margin: 0;
  }

  #examForm.panel {
    display: grid;
    gap: 20px;
    padding: 26px 32px;
  }

  #examForm .form-grid {
    gap: 16px;
  }

  #examForm .exam-input-section {
    padding: 0;
  }

  #examForm .exam-section-grid {
    gap: 14px 18px;
  }

  #examForm .entry-support-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(190px, 220px);
    gap: 16px;
    align-items: stretch;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--divider);
    border-radius: var(--radius-card);
    background: var(--surface-subtle);
  }

  #examForm .exam-progress-summary {
    border-color: var(--divider);
    border-radius: var(--radius-card);
    background: var(--surface);
  }

  #questions {
    display: grid;
    gap: 16px;
  }

  #questions .question-table {
    box-shadow: none;
  }

  #questions .question-table .question-text {
    color: var(--ink);
    line-height: 1.65;
    word-break: keep-all;
  }

  #questions .question-table .no {
    color: var(--brand);
    background: var(--table-row-accent);
  }

  #resultsView .user-workspace-frame,
  #statsView .user-workspace-frame {
    gap: 18px;
    padding: 26px 32px;
  }

  #resultsView .result-toolbar,
  #statsView .stats-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
  }

  #resultsView .result-filter-card,
  #statsView .stats-filter-card {
    background: var(--surface-subtle);
    box-shadow: none;
  }

  #resultsView .filter-grid,
  #statsView .filter-grid {
    align-items: end;
    gap: 14px 18px;
  }

  #resultsView .filter-actions,
  #statsView .filter-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
  }

  #resultsView .summary-grid,
  #statsView .summary-grid {
    margin: 0;
    gap: 12px;
  }

  #resultsView .summary-card,
  #statsView .summary-card {
    min-height: 106px;
    border-top-width: 3px;
    box-shadow: none;
  }

  #resultsView .result-list-head,
  #statsView .stats-mvp-tabs {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-subtle);
  }

  #resultsView .results-table-wrap {
    margin-top: 0;
  }

  #resultsView .results-table-wrap th,
  #resultsView .results-table-wrap td,
  #statsView .stats-table-wrap th,
  #statsView .stats-table-wrap td {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #statsView .stats-mvp-panel {
    gap: 16px;
  }

  #statsView .stats-mvp-grid,
  #statsView .stats-factor-grid {
    gap: 16px;
  }

  #statsView .stats-mvp-card,
  #statsView .stats-table-card,
  #statsView .stats-report-card {
    box-shadow: none;
  }

}

@media screen and (max-width: 980px) {
  #examForm .entry-support-panel {
    grid-template-columns: 1fr;
  }

  #resultsView .user-workspace-frame,
  #statsView .user-workspace-frame,
  #examForm.panel {
    padding: 20px;
  }
}

@media screen and (max-width: 720px) {
  #examView .user-area-head,
  #resultsView .result-toolbar,
  #statsView .stats-actions,
  #resultsView .filter-actions,
  #statsView .filter-actions {
    align-items: stretch;
    justify-content: flex-start;
  }

  #resultsView .filter-actions,
  #statsView .filter-actions {
    flex-direction: column;
  }

  #resultsView .filter-actions button,
  #statsView .filter-actions button {
    width: 100%;
  }
}

@media screen {
  /* Phase 3 admin and operations refinement. Visual hierarchy only. */
  #adminView {
    gap: 22px;
  }

  #adminView .section-head {
    margin-bottom: 0;
    padding: 4px 4px 0;
  }

  #adminContent.admin-grid {
    gap: 18px;
    align-items: start;
  }

  #adminContent > .panel {
    padding: 24px 28px;
    box-shadow: none;
  }

  #adminContent > .panel.span-2 {
    grid-column: 1 / -1;
  }

  #adminContent > .panel > h3,
  #adminContent .history-section-head h3,
  #adminContent .screen-card-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
  }

  #adminContent > .panel > p,
  #adminContent .history-section-head p,
  #adminContent .screen-card-head p,
  #adminContent .admin-card-note {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
  }

  #adminContent .history-section-head,
  #adminContent .screen-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--divider);
  }

  #adminContent .history-actions,
  #adminContent .ops-actions,
  #adminContent .admin-section-actions,
  #adminContent .charge-request-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  #opsStatusPanel {
    border-top: 4px solid var(--brand);
  }

  #opsStatusPanel .ops-status-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
  }

  #opsStatusPanel .ops-status-card {
    min-height: 118px;
    padding: 16px;
    border-color: var(--line);
    background: var(--surface-subtle);
  }

  #opsStatusPanel .ops-status-card h4 {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
  }

  #opsStatusPanel .ops-status-card strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
  }

  @media screen and (min-width: 1280px) {
    #opsStatusPanel .ops-status-grid {
      grid-template-columns: repeat(8, minmax(0, 1fr));
      gap: 6px;
    }

    #opsStatusPanel .ops-status-card {
      min-height: 96px;
      padding: 10px;
    }

    #opsStatusPanel .ops-status-card strong {
      font-size: 14px;
      line-height: 1.35;
    }
  }

  #opsStatusPanel .ops-status-detail,
  #opsStatusPanel .ops-restore-rehearsal-detail,
  #opsStatusPanel .ops-external-backup-detail {
    border-color: var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-subtle);
  }

  #adminContent .table-wrap {
    border-color: var(--line);
    box-shadow: none;
  }

  #adminContent .table-wrap.small th,
  #adminContent .table-wrap.small td,
  #adminContent .history-table-wrap th,
  #adminContent .history-table-wrap td {
    padding: 10px 12px;
    font-size: 13px;
  }

  #adminContent td.actions,
  #adminContent .actions {
    vertical-align: middle;
  }

  #adminContent .table-action,
  #adminContent .billing-cell-button,
  #adminContent .charge-reason-button,
  #adminContent .usage-record-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  #adminContent .row-form,
  #adminContent .school-form,
  #adminContent .user-form,
  #adminContent .mini-form,
  #adminContent .plan-form,
  #adminContent .admin-password-form,
  #adminContent .charge-request-filter-form,
  #adminContent .screening-campaign-form,
  #adminContent .target-filter-form {
    gap: 12px;
    align-items: end;
  }

  #adminContent .form-control,
  #adminContent .form-select,
  #adminContent input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
  #adminContent select,
  #adminContent textarea {
    min-height: 42px;
    font-size: 14px;
  }

  #adminContent textarea {
    min-height: 76px;
  }

  #screeningCampaignAdminPanel .target-readiness,
  #screeningCampaignAdminPanel .campaign-readiness-panel,
  #screeningCampaignAdminPanel .target-import-preview,
  #screeningCampaignAdminPanel .target-import-history,
  #screeningCampaignAdminPanel .retention-policy-panel,
  #screeningCampaignAdminPanel .archive-review-panel {
    border-color: var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-subtle);
    box-shadow: none;
  }

  #screeningCampaignAdminPanel .target-status-chip,
  #screeningCampaignAdminPanel .policy-badge,
  #screeningCampaignAdminPanel .badge {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
  }

  #adminSelfEntryPanel .self-entry-table-wrap,
  #chargeRequestAdminPanel .charge-request-table-wrap,
  #usageHistoryPanel .usage-history-table-wrap {
    margin-top: 12px;
  }

  .institution-manager-grid .panel,
  .institution-manager-placeholder {
    box-shadow: none;
  }

  .policy-badge {
    border-color: var(--line);
    background: var(--surface-muted);
  }

  .policy-badge.muted {
    color: var(--muted);
    background: var(--surface-subtle);
  }
}

@media screen and (max-width: 980px) {
  #adminContent .history-section-head,
  #adminContent .screen-card-head {
    display: grid;
  }

  #adminContent .history-actions,
  #adminContent .ops-actions,
  #adminContent .admin-section-actions,
  #adminContent .charge-request-admin-actions {
    justify-content: flex-start;
  }
}

@media screen {
  #examForm .entry-support-panel {
    margin-top: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    gap: 8px !important;
  }

  #examForm .omr-field,
  #examForm .exam-progress-card {
    padding: 8px 10px;
  }
}
@media print {
  :root {
    --print-ink: #111827;
    --print-muted: #4b5563;
    --print-line: #cbd5e1;
    --print-soft-line: #e5e7eb;
    --print-surface: #ffffff;
    --print-soft: #f8fafc;
  }

  html, body {
    width: 210mm;
    margin: 0 !important;
    padding: 0 !important;
  }
  @page { size: A4 portrait; margin: 0; }
  body { background: #fff; }
  body.questionnaire-print-window {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.questionnaire-print-window .questionnaire-print-document {
    display: block !important;
    padding: 0 !important;
  }
  body.questionnaire-print-window .questionnaire-print-page {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 7.5mm 9mm 6mm !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
  }
  body.questionnaire-print-window .questionnaire-print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  body.questionnaire-print-window .questionnaire-print-header {
    align-items: flex-start !important;
    min-height: 20mm !important;
    border-bottom-color: var(--print-ink) !important;
  }
  body.questionnaire-print-window .questionnaire-print-brand h1 {
    color: var(--print-ink) !important;
  }
  body.questionnaire-print-window .questionnaire-print-brand span,
  body.questionnaire-print-window .questionnaire-print-footer,
  body.questionnaire-print-window .questionnaire-print-footer small {
    color: var(--print-muted) !important;
  }
  body.questionnaire-print-window .questionnaire-print-info-grid {
    border-color: var(--print-ink) !important;
  }
  body.questionnaire-print-window .questionnaire-print-info-grid dt {
    background: var(--print-soft) !important;
  }
  body.questionnaire-print-window .questionnaire-print-info-grid dd {
    min-height: 12.5mm !important;
  }
  body.questionnaire-print-window .questionnaire-print-handwrite-line {
    height: 8.8mm !important;
    border-bottom-color: var(--print-ink) !important;
  }
  body.questionnaire-print-window .questionnaire-print-number {
    background: var(--print-surface) !important;
  }
  body.questionnaire-print-window .questionnaire-print-question {
    line-height: 1.34 !important;
  }
  body.questionnaire-print-window .questionnaire-answer-cell span {
    width: 7mm !important;
    height: 7mm !important;
    border-color: var(--print-ink) !important;
  }
  body.printing-report:not(.bulk-print-window) > :not(dialog), body.printing-stats > header, body.printing-stats > nav, body.printing-history > :not(#historyPrintArea) { display: none !important; }
  body.printing-stats .print-only {
    display: block !important;
  }
  body.printing-stats main {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
  }
  body.printing-stats #statsView {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  body.printing-stats #statsView .section-head {
    margin-bottom: 7px !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid #cbd5e1 !important;
  }
  body.printing-stats #statsView .section-head h2 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }
  body.printing-stats #statsView .section-head button,
  body.printing-stats #statsView .stats-filter-card,
  body.printing-stats #statExpandDialog {
    display: none !important;
  }
  body.printing-stats #statsView .summary-grid,
  body.printing-stats #statsView .stats-chart-grid {
    gap: 5px !important;
  }
  body.printing-stats #statsView .summary-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    margin: 6px 0 7px !important;
  }
  body.printing-stats #statsView .summary-card {
    min-height: 0 !important;
    padding: 6px 8px !important;
    border-color: var(--print-soft-line) !important;
    background: var(--print-surface) !important;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }
  body.printing-stats #statsView .summary-card strong {
    font-size: 19px !important;
  }
  body.printing-stats #statsView .summary-card span {
    margin-top: 3px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
  }
  body.printing-stats #statsView .stats-chart-grid {
    display: block !important;
    margin: 0 !important;
    font-size: 0 !important;
  }
  body.printing-stats #statsView .chart-panel,
  body.printing-stats #statsView .stats-table-card,
  body.printing-stats #statsView .stats-print-filter-summary {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    transform: none !important;
  }
  body.printing-stats #statsView .stats-print-filter-summary {
    margin: 0 0 6px !important;
    padding: 6px 8px !important;
    border-color: var(--print-soft-line) !important;
    border-radius: 7px !important;
    background: var(--print-soft) !important;
  }
  body.printing-stats #statsView .stats-print-filter-summary h3 {
    margin: 0 0 4px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
  body.printing-stats #statsView .stats-print-filter-summary dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px 8px !important;
    font-size: 9.5px !important;
  }
  body.printing-stats #statsView .stats-print-filter-summary p {
    margin: 0 !important;
    font-size: 10px !important;
  }
  body.printing-stats #statsView .chart-panel::after {
    display: none !important;
  }
  body.printing-stats #statsView .chart-panel,
  body.printing-stats #statsView .stats-table-card {
    padding: 7px !important;
    border: 1px solid var(--print-soft-line) !important;
    border-radius: 7px !important;
    background: var(--print-surface) !important;
  }
  body.printing-stats #statsView .chart-panel {
    display: inline-block !important;
    width: calc(50% - 4px) !important;
    margin: 0 4px 5px 0 !important;
    vertical-align: top !important;
    font-size: 10px !important;
  }
  body.printing-stats #statsView .chart-panel:nth-child(2n) {
    margin-right: 0 !important;
  }
  body.printing-stats #statsView .chart-panel:nth-child(3) {
    break-before: page;
    page-break-before: always;
  }
  body.printing-stats #statsView .chart-panel h3,
  body.printing-stats #statsView .stats-table-card h3 {
    margin: 0 0 5px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    break-after: avoid;
    page-break-after: avoid;
  }
  body.printing-stats #statsView .chart-box {
    min-height: 104px !important;
    padding: 2px !important;
    border-radius: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.printing-stats #statsView .chart-box svg {
    max-height: 126px !important;
  }
  body.printing-stats #statsView .stats-table-card {
    margin-top: 2px !important;
    break-before: auto;
    page-break-before: auto;
  }
  body.printing-stats #statsView .stats-table-card .screen-card-head {
    margin-bottom: 4px !important;
  }
  body.printing-stats #statsView .stats-table-card .screen-card-head p {
    margin-top: 2px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }
  body.printing-stats #statsView .stats-table-wrap {
    overflow: visible !important;
    break-inside: auto;
    page-break-inside: auto;
  }
  body.printing-stats #statsView table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    font-size: 8.8px !important;
  }
  body.printing-stats #statsView th,
  body.printing-stats #statsView td {
    padding: 3px 4px !important;
    border-color: var(--print-soft-line) !important;
    line-height: 1.22 !important;
  }
  body.printing-stats #statsView thead {
    display: table-header-group;
  }
  body.printing-stats #statsView tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.printing-stats.printing-stats-report #statsView > :not(#statsPdfReportArea) {
    display: none !important;
  }
  body.printing-stats.printing-stats-report #statsPdfReportArea {
    display: block !important;
    padding: 0 !important;
    color: #111827;
    background: #fff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-document {
    display: block;
    max-width: none;
    margin: 0;
    color: #111827;
    font-size: 10px;
    line-height: 1.35;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #123b66;
    break-after: avoid;
    page-break-after: avoid;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header p {
    margin: 0 0 3px;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header h1 {
    margin: 0 0 7px;
    color: #123b66;
    font-size: 20px;
    line-height: 1.2;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dl,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 10px;
    margin: 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header div,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dt,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary dt {
    color: #64748b;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dd,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary dd {
    min-width: 0;
    margin: 0;
    color: #111827;
    font-weight: 800;
    overflow-wrap: anywhere;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary {
    margin: 0 0 8px;
    padding: 6px 8px;
    border: 1px solid #dbe4ef;
    border-radius: 7px;
    background: #f8fbff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary h3 {
    margin: 0 0 4px;
    color: #123b66;
    font-size: 11px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section {
    margin: 0 0 8px;
    padding: 7px;
    border: 1px solid var(--print-soft-line);
    border-radius: 7px;
    background: var(--print-surface);
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section h2 {
    margin: 0 0 6px;
    color: #123b66;
    font-size: 13px;
    line-height: 1.2;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section h3 {
    margin: 6px 0 4px;
    color: #24415d;
    font-size: 11px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section .summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    margin: 0 !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section .summary-card {
    min-height: 0 !important;
    padding: 6px 7px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section .summary-card::before {
    display: none !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section .summary-card strong {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section .summary-card span,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section .summary-card small {
    margin-top: 2px !important;
    font-size: 8.8px !important;
    line-height: 1.25 !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid > div,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-card,
  body.printing-stats.printing-stats-report #statsView .stats-report-callout {
    padding: 6px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fbfdff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid strong,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-card strong,
  body.printing-stats.printing-stats-report #statsView .stats-report-callout strong {
    display: block;
    color: #123b66;
    font-size: 14px;
    line-height: 1.2;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid span,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-card span,
  body.printing-stats.printing-stats-report #statsView .stats-report-callout span,
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 8.8px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-callout {
    grid-column: 1 / -1;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table-wrap {
    overflow: visible !important;
    border-radius: 6px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap table,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    font-size: 8px !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap th,
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap td,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table th,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table td {
    padding: 3px 4px !important;
    border: 1px solid #e2e8f0 !important;
    white-space: normal !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-list {
    gap: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-row {
    gap: 3px;
    padding: 4px 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-caution,
  body.printing-stats.printing-stats-report #statsView .stats-report-note {
    margin: 0 0 5px;
    padding: 5px 6px;
    border-radius: 6px;
    font-size: 8.8px;
    line-height: 1.35;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts span {
    padding: 6px 7px;
    border-radius: 6px;
    font-size: 8.8px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts strong {
    font-size: 14px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-caution-list {
    margin: 0;
    padding-left: 17px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-caution-list li {
    margin-bottom: 3px;
    color: #334155;
    font-weight: 700;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-document {
    max-width: 188mm;
    margin: 0 auto;
    color: #172033;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 9.4px;
    line-height: 1.42;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr);
    gap: 10px 18px;
    margin-bottom: 8px;
    padding: 0 0 9px;
    border-bottom: 2.5px solid #183d63;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-brand {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-brand > span {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid #183d63;
    border-radius: 3px;
    color: #183d63;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-brand p,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-title-block p,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-title-block span {
    margin: 0;
    color: #5d6b7f;
    font-size: 8.5px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-brand strong {
    display: block;
    margin-top: 2px;
    color: #172033;
    font-size: 12px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-title-block {
    grid-column: 1 / 2;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-title-block h1 {
    margin: 2px 0 3px;
    color: #102f4e;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dl {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: end;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid #cbd7e5;
    border-radius: 4px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dl > div {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 0;
    min-height: 22px;
    border-bottom: 1px solid #d9e2ec;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dl > div:last-child {
    border-bottom: 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dt,
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dd {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 4px 6px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dt {
    background: #eef4fa;
    color: #294763;
    font-size: 8px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-header dd {
    margin: 0;
    color: #172033;
    font-size: 8.6px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary {
    margin: 0 0 8px;
    padding: 6px 8px;
    border: 1px solid #cfd9e5;
    border-radius: 4px;
    background: #f7fafc;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-filter-summary h3 {
    margin: 0 0 4px;
    color: #183d63;
    font-size: 10px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section {
    margin: 0 0 8px;
    padding: 9px;
    border: 1px solid #ccd8e5;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 7px;
    color: #102f4e;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section h2::before {
    content: "";
    width: 4px;
    height: 13px;
    border-radius: 1px;
    background: #183d63;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-section--executive {
    padding: 10px;
    border-color: #b9c9da;
    background: #fbfdff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-executive {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(190px, .82fr);
    gap: 9px;
    align-items: stretch;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-executive-main {
    display: grid;
    gap: 7px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi {
    min-height: 48px;
    padding: 7px 8px;
    border: 1px solid #d3deea;
    border-radius: 4px;
    background: #fff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi strong {
    display: block;
    color: #102f4e;
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi span {
    display: block;
    margin-top: 3px;
    color: #3d4d63;
    font-size: 8.3px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi small {
    display: block;
    margin-top: 2px;
    color: #697789;
    font-size: 7.8px;
    font-weight: 750;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi--risk strong {
    color: #a33a28;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-kpi--primary {
    background: #f4f8fc;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-interpretation,
  body.printing-stats.printing-stats-report #statsView .stats-report-callout {
    padding: 7px 8px;
    border: 1px solid #d4deea;
    border-left: 4px solid #315f8d;
    border-radius: 4px;
    background: #f7fafc;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-interpretation strong,
  body.printing-stats.printing-stats-report #statsView .stats-report-callout strong {
    display: block;
    margin-bottom: 2px;
    color: #102f4e;
    font-size: 10.5px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-interpretation span,
  body.printing-stats.printing-stats-report #statsView .stats-report-callout span {
    display: block;
    color: #4b5b70;
    font-size: 8.4px;
    font-weight: 750;
  }
  body.printing-stats.printing-stats-report #statsView .stats-badge--warning,
  body.printing-stats.printing-stats-report #statsView .stats-report-interpretation.stats-badge--warning {
    border-left-color: #c88721;
    background: #fff8ed;
  }
  body.printing-stats.printing-stats-report #statsView .stats-badge--danger,
  body.printing-stats.printing-stats-report #statsView .stats-report-interpretation.stats-badge--danger {
    border-left-color: #a43d35;
    background: #fff5f4;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-card {
    display: grid;
    gap: 7px;
    padding: 8px;
    border: 1px solid #cbd8e6;
    border-radius: 4px;
    background: #fff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-head h3 {
    margin: 0;
    color: #102f4e;
    font-size: 11px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-head p {
    margin: 2px 0 0;
    color: #697789;
    font-size: 8px;
    font-weight: 750;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-body {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-donut {
    display: block;
    width: 104px;
    height: 104px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-legend {
    display: grid;
    gap: 3px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-legend-row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) max-content max-content;
    gap: 5px;
    align-items: center;
    min-height: 18px;
    padding-bottom: 3px;
    border-bottom: 1px solid #edf1f6;
    color: #24364a;
    font-size: 8.2px;
    font-weight: 850;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-legend-row:last-child {
    border-bottom: 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-swatch {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: var(--swatch);
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-legend-row strong {
    color: #102f4e;
    font-size: 8.6px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-result-chart-legend-row small {
    color: #5d6b7f;
    font-size: 8px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-trend-report {
    display: grid;
    gap: 7px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-head h3 {
    margin: 0;
    color: #102f4e;
    font-size: 11px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-head p {
    margin: 2px 0 0;
    color: #697789;
    font-size: 8px;
    font-weight: 750;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-wrap {
    overflow: hidden;
    border: 1px solid #cbd8e6;
    border-radius: 4px;
    background: #fff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-line-chart {
    display: block;
    width: 100%;
    height: auto;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-axis-label {
    fill: #607187;
    font-size: 8px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-point-label,
  body.printing-stats.printing-stats-report #statsView .stats-yearly-rate-label {
    fill: #102f4e;
    font-size: 8px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    color: #334155;
    font-size: 8.3px;
    font-weight: 850;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-legend i {
    display: inline-block;
    width: 16px;
    height: 3px;
    border-radius: 999px;
    background: var(--legend-color);
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-chart-legend .stats-yearly-legend-dashed {
    height: 0;
    border-top: 2px dashed var(--legend-color);
    background: transparent;
  }
  body.printing-stats.printing-stats-report #statsView .stats-yearly-exact-table {
    margin-top: 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-grid,
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid > div,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-card,
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts span {
    padding: 7px 8px;
    border: 1px solid #d3deea;
    border-radius: 4px;
    background: #fff;
    color: #4b5b70;
    font-size: 8.2px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-risk-grid strong,
  body.printing-stats.printing-stats-report #statsView .stats-report-response-card strong,
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts strong {
    display: block;
    color: #102f4e;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-subsection--chart {
    margin-top: 7px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-subsection--chart .stats-result-chart-body {
    grid-template-columns: 126px minmax(0, 1fr);
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-subsection--chart .stats-result-donut {
    width: 126px;
    height: 126px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale {
    display: grid;
    gap: 7px;
    margin-top: 7px;
    padding: 8px;
    border: 1px solid #cbd8e6;
    border-radius: 4px;
    background: #fff;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-head h3 {
    margin: 0;
    color: #102f4e;
    font-size: 11px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-head p {
    margin: 2px 0 0;
    color: #697789;
    font-size: 8px;
    font-weight: 750;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-stack {
    display: flex;
    width: 100%;
    height: 15px;
    overflow: hidden;
    border: 1px solid #d5e0eb;
    border-radius: 999px;
    background: #edf2f7;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-stack-segment {
    display: block;
    min-width: 0;
    height: 100%;
    background: var(--segment-color);
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-legend {
    display: grid;
    gap: 4px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) max-content max-content;
    gap: 5px;
    align-items: center;
    min-height: 18px;
    padding-bottom: 3px;
    border-bottom: 1px solid #edf1f6;
    color: #24364a;
    font-size: 8.2px;
    font-weight: 850;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-row:last-child {
    border-bottom: 0;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-swatch {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: var(--swatch);
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-row strong {
    color: #102f4e;
    font-size: 8.8px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-followup-scale-row small {
    color: #5d6b7f;
    font-size: 8px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap table,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    font-size: 7.8px !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap th,
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap td,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table th,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table td {
    padding: 4px 5px !important;
    border: 1px solid #d4deea !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-table-wrap th,
  body.printing-stats.printing-stats-report #statsView .stats-mini-table th {
    background: #eef4fa !important;
    color: #1f3c5a !important;
    font-weight: 900 !important;
  }
  body.printing-stats.printing-stats-report #statsView .stats-badge {
    min-width: 0;
    min-height: 18px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 7.6px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-caution,
  body.printing-stats.printing-stats-report #statsView .stats-report-note {
    margin: 0 0 6px;
    padding: 6px 7px;
    border: 1px solid #e4c987;
    border-radius: 4px;
    background: #fffaf0;
    color: #6a4a0f;
    font-size: 8.2px;
    font-weight: 800;
    line-height: 1.35;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-list {
    gap: 5px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-row {
    display: grid;
    gap: 3px;
    padding: 5px 0;
    border-bottom: 1px solid #e7edf4;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-head span,
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-head strong {
    color: #102f4e;
    font-size: 8.8px;
    font-weight: 900;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-track {
    height: 6px;
    background: #edf2f7;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-track span {
    background: #477eae;
  }
  body.printing-stats.printing-stats-report #statsView .stats-factor-bar-row small {
    color: #5d6b7f;
    font-size: 7.8px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-support-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 6px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-caution-list {
    margin: 0;
    padding-left: 16px;
  }
  body.printing-stats.printing-stats-report #statsView .stats-report-caution-list li {
    margin-bottom: 3px;
    color: #293a4f;
    font-size: 8.7px;
    font-weight: 800;
  }
  body.printing-stats.printing-stats-report #statsView .stats-pdf-footer {
    margin-top: 8px;
    padding-top: 5px;
    border-top: 1px solid #cbd7e5;
    color: #59697d;
    font-size: 7.8px;
    font-weight: 800;
    text-align: center;
  }
  body.printing-history #historyPrintArea {
    display: block !important;
    padding: 0;
  }
  body.printing-history .history-print-document {
    color: #111;
    font-size: 10px;
  }
  body.printing-history .history-print-document h1 {
    margin: 0 0 8px;
    color: #123b66;
    font-size: 22px;
  }
  body.printing-history .history-print-document p {
    margin: 0 0 6px;
    color: #334155;
  }
  body.printing-history .history-print-document table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
  }
  body.printing-history .history-print-document th,
  body.printing-history .history-print-document td {
    padding: 5px 6px;
    border: 1px solid #cbd5e1;
    white-space: normal;
    vertical-align: top;
  }
  body.printing-history .history-print-document th {
    background: #eaf4ff !important;
    color: #123b66 !important;
    font-weight: 900;
  }
  dialog[open] { position: static; width: auto; max-height: none; box-shadow: none; border-radius: 0; }
  dialog {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  dialog::backdrop, .dialog-head { display: none; }
  #report { margin: 0; padding: 0; }
  .screen-result { display: none !important; }
  .print-result-pages {
    display: block !important;
    width: 210mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .print-result-pages > :not(.report-document) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .report-document {
    display: block !important;
    width: 210mm !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.printing-report #reportDialog[open] {
    width: 210mm !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.result-view-window.printing-report > #reportWindowShell {
    display: block !important;
    width: 210mm !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  body.result-view-window.printing-report .result-window-head {
    display: none !important;
  }
  body.result-view-window.printing-report .report-preview-viewport {
    display: block !important;
    width: 210mm !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.result-view-window.printing-report .report-preview-stage {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .report-page {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    page-break-after: auto;
    break-after: auto;
    page-break-before: auto;
    break-before: auto;
    page-break-inside: avoid;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.printing-report .report-page,
  body.printing-report .pdf-page,
  body.printing-report .screen-result-table-section,
  body.printing-report .report-card,
  body.printing-report .report-section {
    box-shadow: none !important;
  }
  body.printing-report .screen-result-table-section,
  body.printing-report .screen-table-scroll {
    border-color: var(--print-soft-line) !important;
    background: var(--print-surface) !important;
  }
  body.printing-report .screen-result-table thead th,
  body.printing-report .report-table th {
    background: #1f2937 !important;
    color: #fff !important;
  }
  body.printing-report .screen-result-table tbody th,
  body.printing-report .screen-result-table tfoot th,
  body.printing-report .screen-result-table tbody td,
  body.printing-report .screen-result-table tfoot td,
  body.printing-report .report-table td {
    border-color: var(--print-soft-line) !important;
  }
  .report-document .report-page:not(:last-child) {
    page-break-after: always;
    break-after: page;
  }
  .report-document .report-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .report-document > *:last-child {
    margin-bottom: 0 !important;
  }
  .pdf-page {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  .no-print,
  .print-hidden,
  .screen-only {
    display: none !important;
  }
  .pdf-page-body {
    padding-right: 16mm;
    padding-left: 16mm;
  }
  .report-page + .report-page { border-top: 0; }
  .cover-page {
    min-height: 297mm;
    justify-content: center;
  }
  .cover-kicker { font-size: 14px; }
  .cover-page h1 { font-size: 42px; margin: 12px 0 18px; }
  .cover-line { height: 4px; margin-bottom: 24px; }
  .cover-summary div { grid-template-columns: 85px minmax(0, 1fr); min-height: 38px; }
  .cover-summary span,
  .cover-summary strong { padding: 0 9px; font-size: 11px; }
  .cover-result { gap: 10px; margin-top: 28px; padding: 14px 18px; }
  .cover-result span { font-size: 15px; }
  .cover-result strong { font-size: 34px; }
  .cover-result em { min-width: 160px; padding: 13px 16px; font-size: 20px; }
  .cover-note { margin-top: 18px; font-size: 10px; }
  .result-header { margin-bottom: 22px; }
  .result-header h1 { font-size: 30px; }
  .score-banner { grid-template-columns: minmax(0, 1fr) 31%; }
  .score-banner { min-height: 54px; margin-bottom: 28px; }
  .score-main { gap: 7px; padding: 0 10px 0 14px; }
  .score-title { flex-basis: 245px; font-size: 10.5px; }
  .score-number { font-size: 28px; }
  .score-total { font-size: 15px; }
  .score-total span { font-size: 9px; }
  .score-state { font-size: 22px; }
  .report-section { margin-top: 18px; }
  .report-section h2 { font-size: 15px; margin-bottom: 12px; }
  .result-divider { margin-bottom: 18px; }
  .main-chart { min-height: 375px; }
  .main-chart svg { max-width: 100%; }
  .compact-page-head h1 { font-size: 23px; }
  .report-table { font-size: 10px; }
  .report-table th, .report-table td { padding: 6px 5px; }
  .interpretation { margin-top: 18px; padding: 14px; font-size: 12px; }
  .factor-row { grid-template-columns: 135px 1fr; font-size: 11px; }
  .report-intro { font-size: 12px; }
  .criteria-table { font-size: 10px; }
  .criteria-table th, .criteria-table td { padding: 6px; }
  body.printing-report {
    width: auto !important;
  }
  body.printing-report #report {
    width: 210mm;
    margin: 0 auto;
    padding: 0;
  }
  body.printing-report .print-result-pages {
    width: 210mm;
    margin: 0;
    padding: 0;
  }
  body.printing-report .report-document {
    width: 210mm;
    margin: 0;
    padding: 0;
  }
  body.printing-report .tod-page {
    width: 980px;
    height: 1450px;
    min-height: 1450px;
    margin: 18mm auto;
    padding: 0;
    overflow: hidden;
    zoom: .68;
    break-after: page;
    page-break-after: always;
  }
  body.printing-report .tod-content { padding-top: 72px; }
  body.printing-report .tod-cover-top { margin-bottom: 141px; }
  body.printing-report .tod-cover-top p { margin-bottom: 100px; }
  body.printing-report .tod-cover-top h1 { padding-left: 74px; padding-bottom: 69px; white-space: nowrap; font-size: 72px; }
  body.printing-report .tod-cover-info { margin-bottom: 220px; }
  body.printing-report .tod-page h2 { font-size: 40px; margin-bottom: 50px; }
  body.printing-report .tod-page h3 { font-size: 25px; margin-bottom: 18px; }
  body.printing-report .tod-factor-table { margin-bottom: 100px; }
  body.printing-report .tod-total { margin-bottom: 98px; }
  body.printing-report .tod-score { font-size: 35px; padding: 42px 0 38px; }
  body.printing-report .tod-score span { font-size: 60px; }
  body.printing-report .tod-score em { font-size: 40px; }
  body.printing-report .tod-score small { font-size: 20px; }
  body.printing-report .tod-state { height: 124px; font-size: 30px; line-height: 126px; }
  body.printing-report .tod-state strong { font-size: 43px; }
  body.printing-report .tod-graph { width: 980px; height: 663px; }
  body.printing-report .tod-graph svg {
    width: 980px;
    height: 663px;
  }
  body.printing-report .tod-bottom { bottom: 20px; }
  @page { size: A4; margin: 0; }
}

#examForm .date-picker-trigger,
#resultsView .filter-field-type--date .date-picker-trigger,
#statsView .filter-field-type--date .date-picker-trigger,
.usage-history-filters .date-picker-trigger,
.charge-export-form .date-picker-trigger,
.self-entry-exam-form .date-picker-trigger,
.date-picker-trigger {
  width: var(--form-control-height);
  height: var(--form-control-height);
  min-width: var(--form-control-height);
  min-height: var(--form-control-height);
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--form-control-height);
  position: relative;
  font-size: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: middle;
}

#examForm .date-picker-trigger::before,
#resultsView .filter-field-type--date .date-picker-trigger::before,
#statsView .filter-field-type--date .date-picker-trigger::before,
.usage-history-filters .date-picker-trigger::before,
.charge-export-form .date-picker-trigger::before,
.self-entry-exam-form .date-picker-trigger::before,
.date-picker-trigger::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
  margin: 0;
  border: 0;
  border-radius: 0;
  transform: translate(-50%, -50%);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1.5A2.5 2.5 0 0 1 22 6.5v12a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5v-12A2.5 2.5 0 0 1 4.5 4H6V3a1 1 0 0 1 1-1Zm13 8H4v8.5c0 .28.22.5.5.5h15a.5.5 0 0 0 .5-.5V10ZM4.5 6a.5.5 0 0 0-.5.5V8h16V6.5a.5.5 0 0 0-.5-.5h-15Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1.5A2.5 2.5 0 0 1 22 6.5v12a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 2 18.5v-12A2.5 2.5 0 0 1 4.5 4H6V3a1 1 0 0 1 1-1Zm13 8H4v8.5c0 .28.22.5.5.5h15a.5.5 0 0 0 .5-.5V10ZM4.5 6a.5.5 0 0 0-.5.5V8h16V6.5a.5.5 0 0 0-.5-.5h-15Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (min-width: 900px) {
  #resultsView .result-filter-card,
  #statsView .stats-filter-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .usage-filter-row-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .field-preference-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .field-preference-list {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 899px) {
  #resultsView .result-filter-card,
  #statsView .stats-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #resultsView .result-filter-actions,
  #statsView .stats-filter-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .usage-filter-row-secondary {
    grid-template-columns: 1fr 1fr;
  }

  .institution-form-actions,
  .school-form-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  #resultsView .result-filter-card,
  #statsView .stats-filter-card {
    grid-template-columns: 1fr;
  }

  #resultsView.result-layout-edit-mode #resultFilters,
  #statsView.stats-layout-edit-mode #statsFilters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 10px;
  }

  #resultsView .filter-field--keyword,
  #statsView .filter-field--keyword,
  #resultsView .result-filter-actions,
  #statsView .stats-filter-actions {
    grid-column: 1 / -1;
  }

  #resultsView .result-filter-actions button,
  #statsView .stats-filter-actions button {
    width: 100%;
  }

  .self-entry-exam-form .self-entry-layout-field {
    flex: 1 1 100%;
    max-width: none;
  }

  .self-entry-action-group {
    flex: 1 1 100%;
    min-width: 0;
  }

  #selfEntryView .self-entry-user-panel,
  #selfEntryView .self-entry-exam-form,
  #selfEntryView .self-entry-form-grid,
  #selfEntryView .self-entry-section-grid,
  #selfEntryView .self-entry-layout-field,
  #selfEntryView .table-wrap {
    max-width: 100%;
    min-width: 0;
  }

  #selfEntryView .self-entry-created-url-row {
    grid-template-columns: 1fr;
  }

  #selfEntryView {
    overflow-x: hidden;
  }

  #selfEntryView .self-entry-table-wrap table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed;
  }

  #selfEntryView .self-entry-table-wrap th,
  #selfEntryView .self-entry-table-wrap td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .usage-filter-row-secondary {
    grid-template-columns: 1fr;
  }

  .institution-manager-charge-row,
  .institution-manager-usage-filter-row,
  .institution-manager-usage-actions,
  .admin-password-form {
    grid-template-columns: 1fr;
  }
}

#resultsView .filter-field,
#statsView .filter-field {
  display: grid;
  gap: 4px;
  align-content: end;
  min-width: 0;
}

#resultsView .result-filter-card,
#statsView .stats-filter-card {
  gap: 14px 16px;
  padding: 22px 24px;
}

#resultsView .filter-field > .field-label,
#statsView .filter-field > .field-label {
  min-height: 16px;
  line-height: 1.25;
}

#examForm .form-select,
.self-entry-exam-form .form-select,
#resultsView .filter-field .form-select,
#statsView .filter-field .form-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.25 7.5 10 12.25 14.75 7.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
}

#resultsView .filter-field--keyword,
#statsView .filter-field--keyword {
  display: grid;
  grid-template-columns: 1fr;
  grid-column: auto;
  align-items: stretch;
  justify-content: stretch;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#resultsView .result-filter-actions {
  display: flex;
  grid-column: span 2;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  justify-self: end;
  width: auto;
  min-width: 0;
}

#resultsView .result-filter-actions button {
  width: auto;
  min-width: 112px;
  justify-self: auto;
  flex: 0 0 auto;
}

#resultsView.result-layout-edit-mode .result-filter-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#resultsView.result-layout-edit-mode .result-filter-actions button {
  width: auto;
  min-width: 136px;
  justify-self: auto;
  grid-column: auto;
}

#statsView .stats-filter-actions {
  display: flex;
  grid-column: span 4;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  justify-self: end;
  width: auto;
  min-width: 0;
}

#statsView .stats-filter-actions button {
  width: auto;
  min-width: 112px;
  justify-self: auto;
  flex: 0 0 auto;
}

#statsView.stats-layout-edit-mode .stats-filter-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#statsView.stats-layout-edit-mode .stats-filter-actions button {
  width: auto;
  min-width: 136px;
  justify-self: auto;
  grid-column: auto;
}

#resultsView .result-filter-card > #resultLayoutEditBanner,
#statsView .stats-filter-card > #statsLayoutEditBanner {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 2px;
}

#resultsView .result-filter-card > #resultLayoutEditBanner.layout-edit-mode-banner,
#statsView .stats-filter-card > #statsLayoutEditBanner.layout-edit-mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#resultsView .result-filter-card > #resultLayoutEditBanner.layout-edit-mode-banner > div:first-child,
#statsView .stats-filter-card > #statsLayoutEditBanner.layout-edit-mode-banner > div:first-child {
  flex: 1 1 320px;
  min-width: 220px;
}

#resultsView .result-filter-card > #resultLayoutEditBanner .layout-edit-actions,
#statsView .stats-filter-card > #statsLayoutEditBanner .layout-edit-actions {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  #resultsView .result-filter-card > #resultLayoutEditBanner.layout-edit-mode-banner > div:first-child,
  #statsView .stats-filter-card > #statsLayoutEditBanner.layout-edit-mode-banner > div:first-child,
  #resultsView .result-filter-card > #resultLayoutEditBanner .layout-edit-actions,
  #statsView .stats-filter-card > #statsLayoutEditBanner .layout-edit-actions {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (min-width: 900px) {
  #resultsView .result-filter-card,
  #statsView .stats-filter-card {
    grid-template-columns: repeat(auto-fill, minmax(var(--layout-editor-grid-unit), var(--layout-editor-grid-unit)));
    column-gap: var(--layout-editor-grid-gap);
    overflow: visible;
  }

  #resultsView .filter-field--testLevel,
  #resultsView .filter-field--schoolLevel,
  #resultsView .filter-field--schoolName,
  #resultsView .filter-field--grade,
  #resultsView .filter-field--classNo,
  #resultsView .filter-field--gender,
  #statsView .filter-field--testLevel,
  #statsView .filter-field--schoolLevel,
  #statsView .filter-field--schoolName,
  #statsView .filter-field--grade,
  #statsView .filter-field--classNo,
  #statsView .filter-field--gender {
    grid-column: span 5;
  }

  #resultsView .filter-field--stateKey,
  #resultsView .filter-field--projectName,
  #resultsView .filter-field--provinceOffice,
  #resultsView .filter-field--regionalOffice,
  #resultsView .filter-field--testingInstitution,
  #resultsView .filter-field--startDate,
  #resultsView .filter-field--endDate,
  #resultsView .filter-field--keyword,
  #statsView .filter-field--stateKey,
  #statsView .filter-field--projectName,
  #statsView .filter-field--provinceOffice,
  #statsView .filter-field--regionalOffice,
  #statsView .filter-field--testingInstitution,
  #statsView .filter-field--startDate,
  #statsView .filter-field--endDate,
  #statsView .filter-field--keyword {
    grid-column: span 6;
  }

  #resultsView .result-filter-actions {
    grid-column: span 4;
    align-self: end;
  }

  #statsView .stats-filter-actions {
    grid-column: span 6;
    align-self: end;
    flex-wrap: nowrap;
    justify-self: start;
    justify-content: flex-start;
    width: auto;
    min-width: max-content;
  }

  #statsView .stats-filter-actions button {
    align-self: end;
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  #statsView {
    max-width: 100%;
    overflow-x: hidden;
  }

  #statsView .stats-mvp-summary-grid,
  #statsView .stats-mvp-grid,
  #statsView .stats-mvp-grid--wide,
  #statsView .stats-report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #statsView .stats-mvp-tabs {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  #statsView .stats-mvp-card,
  #statsView .stats-report-card,
  #statsView .stats-table-card {
    min-width: 0;
  }

  #statsView .stats-table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  #statsView:not(.stats-layout-edit-mode) .stats-filter-card {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    padding: 18px;
  }

  #statsView:not(.stats-layout-edit-mode) .filter-field,
  #statsView:not(.stats-layout-edit-mode) .stats-filter-actions {
    grid-column: 1 / -1;
  }

  #statsView:not(.stats-layout-edit-mode) .stats-filter-actions {
    justify-content: stretch;
    width: 100%;
  }

  #statsView:not(.stats-layout-edit-mode) .stats-filter-actions button {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  #statsView .stats-mvp-tabs {
    margin-inline: 0;
    padding: 4px;
  }

  #statsView .stats-mvp-tab {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  #statsView .stats-mvp-summary-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #statsView .stats-mvp-summary-card {
    min-height: 112px;
  }

  .stats-report-card {
    padding: 20px;
  }

  .stats-report-type-option {
    padding: 10px;
  }
}

#resultsView .result-search-frame,
#statsView .stats-analysis-frame {
  display: grid;
  gap: 18px;
  padding: 30px 32px;
}

#resultsView .result-search-frame .result-filter-card,
#statsView .stats-analysis-frame .stats-filter-card {
  border-color: #d9e7f4;
  background: #f8fbff;
  box-shadow: none;
}

#resultsView .result-search-frame .summary-grid,
#statsView .stats-analysis-frame .summary-grid,
#statsView .stats-analysis-frame .stats-mvp-tabs,
#statsView .stats-analysis-frame .stats-caution,
#statsView .stats-analysis-frame .stats-request-status,
#statsView .stats-analysis-frame .stats-factor-caution {
  margin-top: 0;
  margin-bottom: 0;
}

#statsView .stats-analysis-frame .stats-table-card {
  margin-top: 0;
}

@media (max-width: 720px) {
  #resultsView .result-search-frame,
  #statsView .stats-analysis-frame {
    padding: 20px;
  }
}

body.exam-view-active:not(.auth-locked) .tabs,
body.admin-view-active:not(.auth-locked) .tabs {
  position: static;
  top: auto;
}

/* v2 visual refresh experiment: screen-only layer. Print/report output stays isolated. */
@media screen {
  :root {
    --ink: #152033;
    --muted: #657386;
    --secondary: #657386;
    --quiet: #8290a2;
    --line: #d8e2ee;
    --divider: #e8eef5;
    --surface: #ffffff;
    --soft: #f7f9fc;
    --app-bg: #f3f6fa;
    --brand: #12345a;
    --brand-blue: #2563b8;
    --accent: #2d74d6;
    --brand-2: #d99a18;
    --warning: #e87521;
    --normal: #2e9e5b;
    --low: #4f8ec9;
    --high: #d7822c;
    --risk: #cf4a48;
    --success: #238a54;
    --focus-ring: rgba(45, 116, 214, .16);
    --focus-outline: rgba(45, 116, 214, .34);
    --surface-raised: #ffffff;
    --surface-subtle: #fbfcfe;
    --surface-muted: #f1f5f9;
    --surface-panel: linear-gradient(180deg, #ffffff, #f8fafc);
    --table-head: #143a63;
    --table-row-hover: #f2f7fc;
    --table-row-accent: #edf4fb;
    --info-bg: #eef6ff;
    --info-border: #c9ddf2;
    --info-text: #16436d;
    --risk-bg: #fff6ed;
    --risk-border: #f1d0ad;
    --risk-text: #673b17;
    --control-border: #c7d4e2;
    --button-border: #c7d4e2;
    --button-primary-bg: #2d74d6;
    --button-primary-bg-hover: #215fae;
    --button-primary-shadow: 0 9px 18px rgba(45, 116, 214, .18);
    --radius-card: 10px;
    --radius-control: 10px;
    --radius-table: 10px;
    --shadow: 0 8px 22px rgba(18, 52, 90, .065);
    --shadow-lg: 0 18px 44px rgba(18, 52, 90, .12);
  }

  body {
    background:
      linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0) 240px),
      var(--app-bg);
  }

  .login-screen {
    background:
      linear-gradient(135deg, #eef4fb 0%, #f8fbff 48%, #edf5fb 100%);
  }

  .login-shell {
    border-color: #d3deea;
    border-radius: 22px;
    box-shadow: 0 26px 68px rgba(18, 52, 90, .15);
  }

  .login-card {
    border-color: #d7e2ee;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(18, 52, 90, .13);
  }

  .login-card .login-submit {
    background: linear-gradient(180deg, #337ee3, #2369c6);
  }

  .app-header {
    min-height: 112px;
    border-color: rgba(255,255,255,.2);
    border-radius: 22px 22px 0 0;
    background:
      linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,0) 42%),
      linear-gradient(135deg, #12345a 0%, #1f5f9f 100%);
    box-shadow: 0 18px 42px rgba(18, 52, 90, .13);
  }

  .app-header h1 {
    letter-spacing: 0;
  }

  .header-actions span,
  .header-actions button,
  .header-actions .file-label {
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.1);
  }

  .header-actions button:hover,
  .header-actions button:focus-visible,
  .header-actions .file-label:hover,
  .header-actions .file-label:focus-within {
    color: var(--brand);
    background: rgba(255,255,255,.95);
    border-color: rgba(255,255,255,.62);
  }

  .tabs {
    gap: 6px;
    min-height: 66px;
    border-color: #d7e2ee;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 26px rgba(18, 52, 90, .055);
  }

  .tab {
    min-height: 42px;
    border: 1px solid transparent;
    color: #294c72;
  }

  .tab:hover {
    color: var(--brand);
    border-color: #d4e2f1;
    background: #f1f6fb;
  }

  .tab.active {
    color: #fff;
    border-color: #245fa9;
    background: linear-gradient(180deg, #3279d7, #2568bd);
    box-shadow: 0 8px 18px rgba(37, 104, 189, .18);
  }

  .panel,
  .table-wrap,
  .summary-card,
  .detail-panel,
  .stats-mvp-card,
  .stats-report-card,
  .stats-table-card,
  .preparation-subpanel,
  .offline-questionnaire-panel {
    border-color: #d8e2ee;
    background: var(--surface-raised);
    box-shadow: var(--shadow);
  }

  .panel,
  .stats-mvp-card,
  .stats-report-card,
  .stats-table-card {
    border-radius: 12px;
  }

  .user-workspace-frame,
  #resultsView .result-search-frame,
  #statsView .stats-analysis-frame {
    border-color: #d8e4ef;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(18, 52, 90, .07);
  }

  #resultsView .result-search-frame .result-filter-card,
  #statsView .stats-analysis-frame .stats-filter-card {
    border-color: #dbe6f2;
    background: #f8fbfe;
  }

  input,
  select,
  textarea {
    border-color: var(--control-border);
    background-color: #fff;
  }

  input:hover,
  select:hover,
  textarea:hover {
    border-color: #aebfd2;
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
  }

  .segmented {
    border-color: #c9d8e9;
    background: #f4f7fb;
  }

  .segmented button {
    color: #244d78;
  }

  .segmented button:hover:not(:disabled) {
    color: var(--text-on-brand);
    border-color: var(--brand);
    background: var(--brand);
  }

  .segmented button.active {
    color: var(--text-on-brand);
    background: linear-gradient(180deg, #3279d7, #2568bd);
    box-shadow: 0 7px 16px rgba(37, 104, 189, .18);
  }

  .segmented button.active:hover:not(:disabled) {
    color: var(--text-on-brand);
    border-color: var(--button-primary-bg-hover);
    background: linear-gradient(180deg, #2d6fc7, #215fae);
  }

  button,
  .file-label {
    border-color: var(--button-border);
    background: #fff;
    color: #214b76;
  }

  button:hover,
  .file-label:hover {
    border-color: #a9bfd5;
    background: #f5f9fd;
  }

  .primary {
    color: #fff;
    border-color: var(--button-primary-bg);
    background: linear-gradient(180deg, #3279d7, #2568bd);
    box-shadow: var(--button-primary-shadow);
  }

  .primary:hover {
    border-color: var(--button-primary-bg-hover);
    background: linear-gradient(180deg, #2a6fc8, #215fae);
  }

  .ghost {
    color: #214b76;
    background: #f8fafc;
  }

  .summary-card {
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #fbfcfe);
  }

  .summary-card strong {
    color: var(--brand);
  }

  #resultsView .summary-card.is-clickable {
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
  }

  #resultsView .summary-card.is-clickable:hover,
  #resultsView .summary-card.is-clickable:focus-visible {
    box-shadow: 0 10px 24px rgba(18, 52, 90, .1);
  }

  .table-wrap,
  .results-table-wrap,
  .stats-table-wrap,
  .stats-mini-table-wrap {
    border-color: #d8e2ee;
    border-radius: 12px;
  }

  .question-table th,
  .table-wrap th,
  .results-table-wrap th,
  .stats-table-wrap th {
    background: var(--table-head);
  }

  .table-wrap td,
  .results-table-wrap td,
  .stats-table-wrap td,
  .stats-mini-table td {
    border-bottom-color: #e8eef5;
  }

  .table-wrap tbody tr:hover td,
  .results-table-wrap tbody tr:hover td,
  .stats-table-wrap tbody tr:hover td {
    background: var(--table-row-hover);
  }

  .result-sort-trigger:hover,
  .result-sort-trigger:focus-visible,
  .sortable-result-head.is-sorted .result-sort-trigger {
    color: var(--brand);
    background: #eef5fb;
  }

  .badge,
  .stats-badge,
  .ops-status-badge {
    letter-spacing: 0;
  }

  .ops-status-grid {
    gap: 8px;
  }

  .ops-status-card {
    border-color: #d8e2ee;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbfe);
    box-shadow: 0 7px 18px rgba(18, 52, 90, .055);
  }

  .ops-status-detail,
  .ops-status-external {
    border-color: #d8e2ee;
    background: #f8fbfe;
  }

  .preparation-card {
    border-color: #d8e2ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(18, 52, 90, .06);
  }

  .preparation-card.is-hovered {
    border-color: #9bbce0;
    background: #f4f9ff;
    box-shadow: inset 0 0 0 1px #9bbce0, 0 10px 24px rgba(18, 52, 90, .1);
  }

  .preparation-card.is-active {
    border-color: #2d74d6;
    background: #eef6ff;
    box-shadow: inset 0 0 0 1px rgba(45, 116, 214, .22), 0 11px 24px rgba(45, 116, 214, .12);
  }

  .preparation-card-grid:not([data-hovered-card=""]) .preparation-card.is-active:not(.is-hovered) {
    border-color: #d8e2ee;
    background: #fff;
    box-shadow: 0 8px 20px rgba(18, 52, 90, .06);
  }

  .preparation-card.is-active.is-hovered {
    border-color: #9bbce0;
    background: #f4f9ff;
    box-shadow: inset 0 0 0 1px #9bbce0, 0 10px 24px rgba(18, 52, 90, .1);
  }

  .stats-mvp-tabs {
    border-color: #d8e2ee;
    background: #f5f8fc;
  }

  .stats-mvp-tab {
    color: #52677e;
  }

  .stats-mvp-tab:hover {
    background: #ffffff;
    color: var(--brand);
  }

  .stats-mvp-tab.is-active,
  .stats-mvp-tab[aria-selected="true"] {
    border-color: #9fbee0;
    background: #eaf3ff;
    color: #16436d;
  }

  .stats-factor-bar-track {
    background: #edf2f7;
  }

  .stats-factor-bar-track span {
    background: var(--stats-bar-color, #3979b8);
  }

  .admin-grid,
  .chart-grid {
    gap: 16px;
  }

  #adminContent .panel,
  #adminContent .table-wrap {
    box-shadow: 0 7px 18px rgba(18, 52, 90, .055);
  }
}

/* v2 visual refresh experiment pass 2: calmer Open Design-inspired polish. */
@media screen {
  :root {
    --ink: #172235;
    --muted: #66758a;
    --quiet: #8794a6;
    --line: #dbe4ef;
    --divider: #e9eef5;
    --app-bg: #f4f7fb;
    --brand: #14375d;
    --brand-blue: #285f9f;
    --accent: #2b6fc9;
    --surface-muted: #f3f6fa;
    --table-head: #153a60;
    --table-row-hover: #f4f8fc;
    --control-border: #c9d5e3;
    --button-border: #cbd7e5;
    --button-primary-bg: #2b6fc9;
    --button-primary-bg-hover: #225da8;
    --focus-ring: rgba(43, 111, 201, .15);
    --focus-outline: rgba(43, 111, 201, .35);
    --shadow: 0 7px 20px rgba(20, 55, 92, .055);
    --shadow-lg: 0 18px 42px rgba(20, 55, 92, .105);
  }

  body {
    background:
      linear-gradient(180deg, #fbfdff 0, #f4f7fb 260px),
      #f4f7fb;
  }

  .login-shell,
  .app-header,
  .tabs,
  .user-workspace-frame,
  #resultsView .result-search-frame,
  #statsView .stats-analysis-frame,
  .panel,
  .table-wrap,
  .summary-card,
  .stats-mvp-card,
  .stats-report-card,
  .stats-table-card,
  .preparation-subpanel,
  .offline-questionnaire-panel {
    border-color: var(--line);
  }

  .app-header {
    min-height: 108px;
    padding: 26px 34px;
    background:
      linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,0) 44%),
      linear-gradient(135deg, #15375d 0%, #285f9f 100%);
    box-shadow: 0 16px 38px rgba(20, 55, 92, .12);
  }

  .app-header h1 {
    font-size: clamp(29px, 2.8vw, 40px);
  }

  .app-header .eyebrow {
    color: rgba(255,255,255,.76);
  }

  .header-actions span,
  .header-actions button,
  .header-actions .file-label {
    min-height: 40px;
    border-color: rgba(255,255,255,.25);
    background: rgba(255,255,255,.105);
  }

  .tabs {
    min-height: 64px;
    padding: 12px 22px;
  }

  .tab {
    min-width: 124px;
    min-height: 42px;
    color: #244766;
  }

  .tab:hover {
    color: var(--brand);
    border-color: #cfdeee;
    background: #f4f8fc;
  }

  .tab.active {
    border-color: #2768ba;
    background: linear-gradient(180deg, #337bd8 0%, #286ac0 100%);
    box-shadow: 0 8px 18px rgba(40, 106, 192, .18);
  }

  main {
    padding-top: 28px;
  }

  .section-head {
    margin-bottom: 18px;
  }

  .section-head h2 {
    color: #172235;
  }

  .panel,
  .summary-card,
  .stats-mvp-card,
  .stats-report-card,
  .stats-table-card,
  .preparation-subpanel,
  .offline-questionnaire-panel {
    background: #fff;
    box-shadow: var(--shadow);
  }

  .panel {
    padding: 26px;
  }

  .panel.compact {
    padding: 20px;
  }

  .user-workspace-frame,
  #resultsView .result-search-frame,
  #statsView .stats-analysis-frame {
    padding: 28px 30px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(20, 55, 92, .065);
  }

  #resultsView .result-search-frame .result-filter-card,
  #statsView .stats-analysis-frame .stats-filter-card {
    background: #f8fbfe;
  }

  input,
  select,
  textarea,
  .form-control,
  .form-select {
    border-color: var(--control-border);
    background-color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  }

  input:hover,
  select:hover,
  textarea:hover,
  .form-control:hover,
  .form-select:hover {
    border-color: #afc0d3;
  }

  input:focus,
  select:focus,
  textarea:focus,
  .form-control:focus,
  .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
  }

  button,
  .file-label {
    border-color: var(--button-border);
    color: #21486f;
    background: #fff;
  }

  button:hover,
  .file-label:hover {
    border-color: #adc1d7;
    background: #f6f9fc;
  }

  .primary {
    border-color: var(--button-primary-bg);
    background: linear-gradient(180deg, #337bd8 0%, #286ac0 100%);
    box-shadow: 0 8px 17px rgba(40, 106, 192, .18);
  }

  .primary:hover {
    border-color: var(--button-primary-bg-hover);
    background: linear-gradient(180deg, #2d70c7 0%, #225da8 100%);
  }

  .ghost {
    border-color: #cdd9e7;
    color: #244766;
    background: #f8fafc;
  }

  .segmented {
    border-color: #cdd9e7;
    background: #f5f8fb;
  }

  .segmented button.active {
    background: linear-gradient(180deg, #337bd8 0%, #286ac0 100%);
  }

  .summary-card {
    padding: 18px 20px;
  }

  .summary-card strong {
    color: var(--brand);
  }

  #resultsView .summary-card.is-active {
    background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--result-color) 7%, #fff));
  }

  .table-wrap th,
  .results-table-wrap th,
  .stats-table-wrap th,
  .question-table th {
    background: var(--table-head);
  }

  .table-wrap td,
  .results-table-wrap td,
  .stats-table-wrap td {
    background-clip: padding-box;
  }

  .results-table-wrap .result-index {
    color: var(--brand);
    background: #f2f7fc;
  }

  .result-sort-trigger:hover,
  .result-sort-trigger:focus-visible,
  .sortable-result-head.is-sorted .result-sort-trigger {
    color: var(--brand);
    background: #edf4fb;
  }

  .stats-mvp-card {
    padding: 22px;
  }

  .stats-mvp-tab.is-active,
  .stats-mvp-tab[aria-selected="true"] {
    border-color: #acc9e8;
    background: #eef6ff;
    color: var(--brand);
  }

  .stats-factor-bar-track {
    height: 7px;
  }

  .ops-status-card {
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 55, 92, .05);
  }

  @media screen and (min-width: 1280px) {
    #opsStatusPanel .ops-status-grid {
      gap: 6px;
    }

    #opsStatusPanel .ops-status-card {
      padding: 9px;
    }
  }

  .preparation-card {
    border-color: var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .preparation-card strong {
    color: var(--brand);
  }

  #adminContent .panel {
    padding: 22px;
  }

  #adminContent .panel h3 {
    margin-bottom: 14px;
  }

  #adminContent .admin-grid,
  #adminContent .chart-grid {
    gap: 14px;
  }

  #adminContent .table-wrap th,
  #adminContent .table-wrap td {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Warm paper clinical dashboard experiment: screen UI only. */
@media screen {
  :root {
    --warm-bg: #f6f1e8;
    --warm-bg-soft: #faf7f1;
    --warm-surface: #fffdfa;
    --warm-surface-muted: #f3eee5;
    --warm-line: #ded3c3;
    --warm-line-strong: #cfc0ad;
    --warm-ink: #1f2933;
    --warm-muted: #6f766f;
    --warm-navy: #173f5f;
    --warm-blue: #2f6f8f;
    --warm-blue-dark: #245b77;
    --warm-copper: #b96b3c;
    --warm-copper-soft: #f8ece4;
    --warm-green: #3f7d58;
    --warm-danger: #d9534f;
    --warm-shadow: 0 10px 28px rgba(65, 47, 28, .075);
    --warm-shadow-soft: 0 7px 18px rgba(65, 47, 28, .055);
  }

  body {
    color: var(--warm-ink);
    background:
      radial-gradient(96rem 76rem at -14% -18%, rgba(185, 107, 60, .055), transparent 72%),
      radial-gradient(110rem 86rem at 112% 96%, rgba(47, 111, 143, .026), transparent 76%),
      linear-gradient(145deg, #fbf8f1 0%, #f9f5ed 48%, var(--warm-bg) 100%);
    background-attachment: fixed;
  }

  .app-header {
    background:
      linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,0) 42%),
      linear-gradient(135deg, #153a59 0%, var(--warm-navy) 56%, var(--warm-blue-dark) 100%);
    box-shadow: 0 16px 36px rgba(39, 47, 36, .13);
  }

  .tabs {
    background: rgba(255,253,250,.96);
    border-color: var(--warm-line);
    box-shadow: var(--warm-shadow-soft);
  }

  .tab {
    color: #263f55;
  }

  .tab:hover {
    border-color: #d7c8b5;
    background: var(--warm-surface-muted);
  }

  .tab.active {
    border-color: var(--warm-blue);
    background: linear-gradient(180deg, #367b9d 0%, var(--warm-blue) 100%);
    box-shadow: 0 8px 18px rgba(47, 111, 143, .18);
  }

  main {
    color: var(--warm-ink);
  }

  .section-head p,
  .helper-text,
  .muted,
  .empty-state span {
    color: var(--warm-muted);
  }

  .login-shell,
  .user-workspace-frame,
  #resultsView .result-search-frame,
  #statsView .stats-analysis-frame,
  .panel,
  .table-wrap,
  .summary-card,
  .stats-mvp-card,
  .stats-report-card,
  .stats-table-card,
  .preparation-subpanel,
  .offline-questionnaire-panel,
  .ops-status-card {
    border-color: var(--warm-line);
    background: var(--warm-surface);
    box-shadow: var(--warm-shadow);
  }

  #resultsView .result-search-frame .result-filter-card,
  #statsView .stats-analysis-frame .stats-filter-card,
  .result-filter-card,
  .stats-filter-card,
  .admin-filter-card,
  .ops-detail-panel,
  .link-delivery-box {
    border-color: var(--warm-line);
    background: linear-gradient(180deg, #fffdfa 0%, var(--warm-bg-soft) 100%);
  }

  label,
  .field-label,
  .admin-floating-field > span,
  .admin-floating-field > label {
    color: var(--warm-navy);
  }

  input,
  select,
  textarea,
  .form-control,
  .form-select {
    color: var(--warm-ink);
    border-color: var(--warm-line-strong);
    background-color: #fffefa;
  }

  input:hover,
  select:hover,
  textarea:hover,
  .form-control:hover,
  .form-select:hover {
    border-color: #bca88f;
  }

  input:focus,
  select:focus,
  textarea:focus,
  .form-control:focus,
  .form-select:focus {
    border-color: var(--warm-blue);
    box-shadow: 0 0 0 4px rgba(47, 111, 143, .14);
  }

  button,
  .file-label,
  .ghost,
  .icon-button {
    border-color: #cdbda7;
    color: var(--warm-navy);
    background: #fffdfa;
  }

  button:hover,
  .file-label:hover,
  .ghost:hover,
  .icon-button:hover {
    border-color: #bca88f;
    background: #fbf6ee;
  }

  .primary,
  button.primary {
    border-color: var(--warm-blue);
    background: linear-gradient(180deg, #3d82a3 0%, var(--warm-blue) 100%);
    box-shadow: 0 9px 18px rgba(47, 111, 143, .18);
  }

  .primary:hover,
  button.primary:hover {
    border-color: var(--warm-blue-dark);
    background: linear-gradient(180deg, #347592 0%, var(--warm-blue-dark) 100%);
  }

  .segmented {
    border-color: var(--warm-line);
    background: #f5efe6;
  }

  .segmented button.active {
    background: linear-gradient(180deg, #3d82a3 0%, var(--warm-blue) 100%);
  }

  .summary-card,
  #statsView .summary-card,
  .stats-mvp-summary-card,
  .ops-status-card {
    background: linear-gradient(180deg, #fffefa 0%, #fbf8f1 100%);
  }

  .summary-card strong,
  .stats-mvp-summary-card strong,
  .ops-status-card strong {
    color: var(--warm-ink);
  }

  #resultsView .summary-card.is-active {
    border-color: color-mix(in srgb, var(--result-color) 45%, var(--warm-line));
    background: linear-gradient(180deg, #fffefa, color-mix(in srgb, var(--result-color) 7%, #fff8ef));
  }

  .table-wrap th,
  .results-table-wrap th,
  .stats-table-wrap th,
  .question-table th {
    background: linear-gradient(180deg, #1f4b70 0%, var(--warm-navy) 100%);
  }

  .table-wrap tbody tr:hover td,
  .results-table-wrap tbody tr:hover td,
  .stats-table-wrap tbody tr:hover td {
    background: #fff8ef;
  }

  .results-table-wrap .result-index {
    color: var(--warm-navy);
    background: #f7efe4;
  }

  .result-sort-trigger:hover,
  .result-sort-trigger:focus-visible,
  .sortable-result-head.is-sorted .result-sort-trigger {
    color: var(--warm-navy);
    background: #f4eadb;
  }

  .stats-bar-fill,
  .stats-factor-bar-track span,
  .stats-concentration-bar-fill {
    background: linear-gradient(90deg, var(--warm-blue), #6c9f9a);
  }

  .stats-mvp-tab.is-active,
  .stats-mvp-tab[aria-selected="true"] {
    border-color: #c7b99f;
    background: #f7efe4;
    color: var(--warm-navy);
  }

  .preparation-card,
  .self-entry-card {
    border-color: var(--warm-line);
    background: #fffdfa;
    box-shadow: 0 8px 18px rgba(65, 47, 28, .045);
  }

  .preparation-card strong {
    color: var(--warm-navy);
  }

  .preparation-card span {
    color: var(--warm-muted);
  }

  .ops-status-badge.success,
  .status-badge.success {
    background: color-mix(in srgb, var(--warm-green) 14%, #fff);
    color: var(--warm-green);
  }

  .risk-badge,
  .result-badge {
    box-shadow: none;
  }

  #examView .exam-workflow-summary,
  #examForm .question-tools,
  #examForm .exam-input-section,
  #examForm .group-target-lookup,
  #examForm .target-readiness {
    border-color: var(--warm-line);
    background: linear-gradient(180deg, #fffdfa 0%, var(--warm-bg-soft) 100%);
  }

  #examForm .question-tools span {
    color: var(--warm-muted);
  }

  #examForm .response-scale span {
    border-color: var(--warm-line-strong);
    color: var(--warm-ink);
    background: #fffefa;
  }

  #examForm .response-scale b {
    color: var(--warm-blue-dark);
  }

  #examForm .omr-field,
  #examForm .exam-progress-card {
    border-color: var(--warm-line);
    background: #fffefa;
  }

  #examForm .omr-field > span,
  #examForm .exam-progress-card > span,
  #examForm .exam-progress-card strong {
    color: var(--warm-navy);
  }

  #examForm .exam-progress-bar {
    background: #eadfce;
  }

  #examForm .exam-progress-bar span {
    background: var(--warm-blue);
  }

  #examForm.exam-ready-to-save .exam-progress-card {
    border-color: color-mix(in srgb, var(--warm-green) 38%, var(--warm-line));
    background: color-mix(in srgb, var(--warm-green) 9%, #fffefa);
  }

  #examForm.exam-ready-to-save .exam-progress-card strong,
  #examForm.exam-ready-to-save .exam-save-readiness {
    color: var(--warm-green);
  }

  #adminContent .panel,
  #adminContent .table-wrap {
    background: var(--warm-surface);
    box-shadow: var(--warm-shadow-soft);
  }

  #adminContent .admin-section-title,
  #adminContent .panel h3 {
    color: var(--warm-navy);
  }
}

/* Warm experiment refinements gathered from visual review. */
@media screen {
  #examView .exam-workflow-summary {
    width: fit-content;
    max-width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #examView .exam-workflow-summary span {
    border-color: var(--warm-line);
    background: #fffdfa;
    box-shadow: 0 3px 8px rgba(65, 47, 28, .035);
  }

  #examForm.panel {
    border-color: var(--warm-line);
    background: var(--warm-surface);
  }

  #examForm.group-mode .exam-input-section,
  #examForm.group-mode .exam-input-section:hover,
  #examForm.group-mode .exam-input-section:focus-within,
  #examForm.group-mode .exam-input-section.is-active,
  #examForm .question-tools {
    border-color: var(--warm-line) !important;
    background: linear-gradient(180deg, #fffdfa 0%, var(--warm-bg-soft) 100%);
    box-shadow: 0 8px 18px rgba(65, 47, 28, .04);
  }

  #examForm.group-mode .exam-input-section:focus-within,
  #examForm.group-mode .exam-input-section.is-active {
    background: linear-gradient(180deg, #fffdfa 0%, var(--warm-bg-soft) 100%);
  }

  #questions .question-column-body,
  #questions .question-table {
    background: #fffdfa;
  }

  #questions .question-table th {
    color: var(--warm-navy);
    background: #f3eadb;
  }

  #questions .question-table .no {
    color: var(--warm-navy);
    background: #f6efe4;
  }

  #questions .question-table tr.question-active td,
  #questions .question-table tr.question-active:hover td {
    background: #fff6ea;
  }

  #questions .question-table tr.question-active .no {
    border-left-color: var(--warm-blue);
    background: #eadcc8;
  }

  .app-header .kda-logo-header {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    filter: none;
  }

  body.admin-view-active:not(.auth-locked) {
    background:
      radial-gradient(90rem 72rem at -12% -16%, rgba(185, 107, 60, .055), transparent 72%),
      radial-gradient(96rem 76rem at 108% 92%, rgba(47, 111, 143, .03), transparent 74%),
      linear-gradient(145deg, #fbf8f1 0%, #f9f4ea 50%, var(--warm-bg) 100%);
    background-attachment: fixed;
  }

  #adminLogin {
    box-sizing: border-box;
    width: min(520px, calc(100% - 64px));
    margin-top: 64px;
    margin-inline: auto;
    padding: 22px 24px 24px;
  }

  #adminLogin .row-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  #statsView .stats-summary-card--confirmed::before {
    background: color-mix(in srgb, var(--risk) 10%, #fff);
  }

  #statsView .stats-summary-card--high::before {
    background: color-mix(in srgb, var(--warning) 11%, #fff);
  }

  #statsView .summary-card.stats-summary-card--confirmed strong,
  #statsView .stats-mvp-summary-card.stats-summary-card--confirmed strong,
  #statsView .stats-summary-card--confirmed span {
    color: var(--risk);
  }

  #statsView .summary-card.stats-summary-card--high strong,
  #statsView .stats-mvp-summary-card.stats-summary-card--high strong,
  #statsView .stats-summary-card--high span {
    color: var(--warning);
  }

  #statsView .stats-bar-row[style*="--stats-bar-color"] .stats-factor-bar-head span,
  #statsView .stats-bar-row[style*="--stats-bar-color"] .stats-factor-bar-head strong,
  #statsView .stats-bar-row[style*="--stats-bar-color"] small {
    color: var(--stats-bar-color);
  }

  .stats-risk-term {
    font-weight: 900;
  }

  .stats-risk-term--confirmed,
  .stats-support-count--confirmed strong,
  .stats-report-kpi--confirmed strong {
    color: var(--risk);
  }

  .stats-risk-term--high,
  .stats-support-count--high strong,
  .stats-report-kpi--high strong {
    color: var(--warning);
  }

  .stats-support-count--confirmed {
    border-color: color-mix(in srgb, var(--risk) 24%, #dce8f4);
    background: color-mix(in srgb, var(--risk) 5%, #fff);
  }

  .stats-support-count--high {
    border-color: color-mix(in srgb, var(--warning) 24%, #dce8f4);
    background: color-mix(in srgb, var(--warning) 6%, #fff);
  }

  #statsView #statsResultDistribution .stats-bar-row[style*="--stats-bar-color"] .stats-factor-bar-track span,
  #statsView #statsResultDistribution .stats-bar-row[style*="--stats-bar-color"] .stats-bar-track span {
    background: var(--stats-bar-color);
  }

  #loginScreen .login-kda-logo img {
    filter: hue-rotate(-18deg) saturate(.86);
  }

  #loginScreen .login-kda-logo .kda-logo-fallback,
  #loginScreen .login-org-en,
  #loginScreen .login-product-en,
  #loginScreen .login-links button,
  #loginScreen .login-links a,
  #loginScreen .password-eye,
  #loginScreen .field-icon {
    color: var(--warm-blue);
  }

  #loginScreen .login-lock {
    background:
      linear-gradient(color-mix(in srgb, var(--warm-blue) 13%, #fff), color-mix(in srgb, var(--warm-blue) 13%, #fff)) padding-box,
      linear-gradient(160deg, #3d82a3, var(--warm-blue)) border-box;
  }

  #loginScreen .login-lock::before {
    border-color: var(--warm-blue);
    box-shadow: 0 12px 0 4px var(--warm-blue);
  }

  #loginScreen .login-card .login-submit {
    border-color: var(--warm-blue);
    background: linear-gradient(180deg, #3d82a3 0%, var(--warm-blue) 100%);
    box-shadow: 0 14px 28px rgba(47, 111, 143, .2);
  }

  #loginScreen .login-card .login-submit:hover,
  #loginScreen .login-card .login-submit:focus-visible {
    border-color: var(--warm-blue-dark);
    background: linear-gradient(180deg, #347592 0%, var(--warm-blue-dark) 100%);
  }
}

body.printing-stats.printing-stats-report #statsView .stats-risk-term--confirmed,
body.printing-stats.printing-stats-report #statsView .stats-support-count--confirmed strong,
body.printing-stats.printing-stats-report #statsView .stats-report-kpi--confirmed strong {
  color: var(--risk);
}

body.printing-stats.printing-stats-report #statsView .stats-risk-term--high,
body.printing-stats.printing-stats-report #statsView .stats-support-count--high strong,
body.printing-stats.printing-stats-report #statsView .stats-report-kpi--high strong {
  color: var(--warning);
}

#resultsView .summary-card--state01 strong,
#resultsView .summary-card--state02 strong,
#resultsView .summary-card--state03 strong,
#resultsView .summary-card--state04 strong {
  color: var(--result-color);
}

/* 통계분석 필터는 사용자 편집 대신 제품 고정 그리드로 표시한다. */
#statsView .stats-filter-card {
  grid-template-columns: repeat(16, minmax(0, 1fr));
  align-items: end;
}

#statsView #statsFilters {
  display: contents;
}

#statsView #statsFilters .stats-layout-filter-field {
  grid-column: span var(--stats-filter-span, 3);
}

#statsView .stats-filter-actions {
  grid-column: span 4;
  align-self: end;
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
  width: auto;
  min-width: max-content;
}

#statsView #statsFilters .filter-field--gender,
#statsView #statsFilters .filter-field--testingInstitution {
  grid-column: 1 / span var(--stats-filter-span, 2);
}

#resultsView .result-filter-actions {
  grid-column: 1 / -1;
  justify-self: end;
  justify-content: flex-end;
  width: 100%;
}

/* 검사 입력 OMR 영역은 진행 상태와 저장 액션을 하나의 작업대로 묶는다. */
#examForm .entry-support-panel {
  grid-template-columns: minmax(300px, 1fr) minmax(260px, auto);
  align-items: center;
}

#examForm .entry-support-panel > .omr-field {
  align-content: center;
}

#examForm .exam-progress-inline {
  display: grid;
  gap: 6px;
}

#examForm .entry-support-panel > .form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: 0;
}

#examForm .entry-support-panel .save-action-group {
  justify-items: end;
}

@media (max-width: 899px) and (min-width: 641px) {
  #statsView .stats-filter-card {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  #statsView .stats-filter-actions {
    grid-column: 1 / -1;
    min-width: 0;
    flex-wrap: wrap;
    justify-self: end;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  #examForm .entry-support-panel {
    grid-template-columns: 1fr;
  }

  #examForm .entry-support-panel > .form-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  #examForm .entry-support-panel > .form-actions > button,
  #examForm .entry-support-panel .save-action-group {
    flex: 1 1 180px;
  }

  #examForm .entry-support-panel .save-action-group {
    justify-items: stretch;
  }

  #statsView .stats-filter-card {
    grid-template-columns: 1fr;
  }

  #statsView #statsFilters .stats-layout-filter-field,
  #statsView .stats-filter-actions {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  #statsView .stats-filter-actions {
    justify-content: flex-end;
  }
}

/* 안정화: OMR/액션 영역은 부모 카드 안에서만 확장하고, 검사 입력 안내문은 좌측 정렬로 유지한다. */
@media screen {
  #examView .user-area-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  #examView .user-area-head > div:first-child {
    grid-column: auto;
    justify-self: auto;
    text-align: left;
  }

  #examView .user-area-head .segmented {
    grid-column: auto;
    justify-self: end;
    flex: 0 0 auto;
  }

  #examView .user-area-head p {
    max-width: 760px;
  }

  #examForm .entry-support-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    column-gap: clamp(16px, 2vw, 28px);
    overflow: hidden;
  }

  #examForm .entry-support-panel > .omr-field,
  #examForm #omrInput,
  #examForm .entry-support-panel > .form-actions,
  #examForm .entry-support-panel .save-action-group {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #examForm .entry-support-panel > .omr-field,
  #examForm #omrInput {
    width: 100%;
  }

  #examForm .entry-support-panel > .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 240px;
  }

  #examForm .entry-support-panel > .form-actions > button,
  #examForm .entry-support-panel .save-action-group,
  #examForm .entry-support-panel .save-action-group > button {
    width: 100%;
    max-width: 240px;
    box-sizing: border-box;
  }

  #examForm .entry-support-panel .save-action-group {
    display: grid;
    justify-items: stretch;
    gap: 8px;
  }

  .segmented button:not(.active):not([aria-pressed="true"]):hover:not(:disabled) {
    color: var(--brand);
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 73, 116, .08);
  }

  .segmented button:not(.active):not([aria-pressed="true"]):hover:not(:disabled) * {
    color: inherit;
  }

  .segmented button.active:hover:not(:disabled),
  .segmented button[aria-pressed="true"]:hover:not(:disabled) {
    color: var(--text-on-brand);
    border-color: var(--button-primary-bg-hover);
    background: var(--button-primary-bg-hover);
    box-shadow: 0 7px 16px rgba(20, 73, 116, .16);
  }

  #questions {
    --question-score-col-width: 48px;
    --question-header-bg: #f1e7d5;
    --question-scrollbar-width: 10px;
    --question-scrollbar-gutter: 10px;
    --question-scrollbar-track: #f1f3f5;
    --question-scrollbar-thumb: #c4c9cf;
    --question-scrollbar-thumb-hover: #adb5bd;
  }

  #questions .question-column-body {
    scrollbar-gutter: stable;
  }

  #questions .question-column-head {
    overflow: hidden;
    box-sizing: border-box;
    padding-right: 0;
    background: var(--question-header-bg);
  }

  #questions .question-table-head {
    width: 100%;
  }

  #questions .question-table-head th {
    background: var(--question-header-bg);
  }

  #questions .question-col-scrollbar-gutter,
  #questions .question-scrollbar-gutter {
    width: var(--question-scrollbar-gutter);
    min-width: var(--question-scrollbar-gutter);
    max-width: var(--question-scrollbar-gutter);
    padding: 0;
    background: var(--question-header-bg);
    text-align: center;
    vertical-align: middle;
  }

  #questions .question-column-body {
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--question-scrollbar-thumb) var(--question-scrollbar-track);
  }

  #questions .question-column-body::-webkit-scrollbar {
    width: var(--question-scrollbar-width);
    background: var(--question-scrollbar-track);
  }

  #questions .question-column-body::-webkit-scrollbar-track {
    margin-top: 4px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: var(--question-scrollbar-track);
  }

  #questions .question-column-body::-webkit-scrollbar-thumb {
    border: 2px solid var(--question-scrollbar-track);
    border-radius: 999px;
    background: var(--question-scrollbar-thumb);
  }

  #questions .question-column-body::-webkit-scrollbar-thumb:hover {
    background: var(--question-scrollbar-thumb-hover);
  }

  #questions .question-col-scale,
  #questions .question-table th:nth-child(n+3):not(.question-scrollbar-gutter),
  #questions .question-table .scale {
    width: var(--question-score-col-width);
    min-width: var(--question-score-col-width);
    max-width: var(--question-score-col-width);
    padding-right: 0;
    padding-left: 0;
    text-align: center;
    vertical-align: middle;
  }

  #questions .question-table .score-choice {
    display: grid;
    place-items: center;
    width: 100%;
    margin: 0;
  }

  .recommendation-contact-line {
    display: inline-block;
    line-height: 1.7;
  }
}

@media screen and (max-width: 1180px) {
  #examForm .entry-support-panel {
    grid-template-columns: 1fr;
  }

  #examForm .entry-support-panel > .form-actions {
    max-width: 100%;
  }

  #examForm .entry-support-panel > .form-actions > button,
  #examForm .entry-support-panel .save-action-group,
  #examForm .entry-support-panel .save-action-group > button {
    max-width: 100%;
  }
}

.read-aloud-panel {
  max-width: 1100px;
  margin: 0 auto;
}

.read-aloud-toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.read-aloud-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.read-aloud-items {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.read-aloud-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.read-aloud-item strong {
  font-size: 17px;
  line-height: 1.45;
}

.read-aloud-item em {
  justify-self: end;
  font-style: normal;
  font-weight: 800;
  color: var(--primary);
}

.read-aloud-item--played {
  border-color: #cbd5e1;
  background: #f7fafc;
}

.read-aloud-item--played em {
  color: #536273;
}

.read-aloud-item.is-playing {
  border-color: var(--primary);
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(17, 94, 167, .12);
}

.read-aloud-item--active {
  border-color: var(--primary);
  background: #eef6ff;
}

.read-aloud-item--active em {
  color: var(--primary);
}

@media (max-width: 720px) {
  .read-aloud-item {
    grid-template-columns: 1fr;
  }

  .read-aloud-item em {
    justify-self: start;
  }
}

#examForm.exam-form--adaptive {
  container: exam-response / inline-size;
}

#selfEntryView .self-entry-user-panel {
  container: self-entry-prep / inline-size;
}

@media screen and (min-width: 821px) and (max-width: 1180px) and (min-height: 521px) {
  #questions {
    overflow: visible;
  }

  #questions .question-columns {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

/* Adaptive preparation and response layout: switch to safe cards in narrow or short touch-sized spaces. */
@media screen and (max-width: 820px),
       screen and (max-height: 520px) and (max-width: 960px),
       screen and (pointer: coarse) and (max-width: 960px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  main,
  .view,
  .panel,
  .user-workspace-frame,
  #examForm,
  #selfEntryView,
  #selfEntryView .self-entry-user-panel,
  #selfEntryView .preparation-card-grid,
  #selfEntryView .preparation-card,
  #selfEntryView .preparation-panel,
  #selfEntryView .preparation-subpanel,
  #selfEntryView .offline-questionnaire-panel,
  #selfEntryView .screen-card-head,
  #selfEntryView .self-entry-form-grid,
  #selfEntryView .self-entry-input-section,
  #selfEntryView .self-entry-section-grid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #selfEntryView .section-head {
    gap: 14px;
  }

  #selfEntryView .self-entry-user-panel {
    padding: 18px 14px;
    border-radius: 20px;
    overflow: hidden;
  }

  #selfEntryView .section-head > div,
  #selfEntryView .section-head p,
  #selfEntryView .preparation-card strong,
  #selfEntryView .preparation-card span,
  #selfEntryView .screen-card-head h3,
  #selfEntryView .screen-card-head p,
  #selfEntryView .self-entry-section-head h3,
  #selfEntryView .self-entry-section-head p {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  #selfEntryView .preparation-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #selfEntryView .preparation-card {
    width: 100%;
    padding: 17px 18px;
    border-radius: 18px;
  }

  #selfEntryView .preparation-card strong {
    font-size: 18px;
    line-height: 1.35;
  }

  #selfEntryView .preparation-card span {
    font-size: 14px;
    line-height: 1.55;
  }

  #selfEntryView .preparation-panel,
  #selfEntryView .preparation-subpanel,
  #selfEntryView .offline-questionnaire-panel {
    width: 100%;
    padding: 18px;
    border-radius: 20px;
    overflow: hidden;
  }

  #selfEntryView .screen-card-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  #examForm.panel {
    gap: 18px;
    padding: 18px 14px;
    overflow: hidden;
  }

  #examForm .question-tools {
    gap: 14px;
    margin: 18px 0 14px;
    padding: 16px;
    border-radius: 20px;
    overflow: hidden;
  }

  #examForm .question-tools-main,
  #examForm .entry-support-panel,
  #examForm .entry-support-panel > .omr-field,
  #examForm .entry-support-panel > .form-actions,
  #examForm .entry-support-panel .save-action-group {
    min-width: 0;
    max-width: 100%;
  }

  #examForm .response-scale {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #examForm .response-scale span {
    min-width: 0;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  #examForm .entry-support-panel {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 18px;
    overflow: hidden;
  }

  #examForm .entry-support-panel > .form-actions {
    max-width: 100%;
  }

  #examForm .entry-support-panel > .form-actions > button,
  #examForm .entry-support-panel .save-action-group,
  #examForm .entry-support-panel .save-action-group > button {
    max-width: 100%;
  }

  #questions {
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }

  #questions .question-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 0;
  }

  #questions .question-column {
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #questions .question-column-head {
    display: none;
  }

  #questions .question-column-body {
    max-height: none;
    overflow: visible;
    background: transparent;
    scrollbar-gutter: auto;
  }

  #questions .question-table,
  #questions .question-table tbody,
  #questions .question-table tr,
  #questions .question-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #questions .question-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  #questions .question-table colgroup,
  #questions .question-table thead {
    display: none;
  }

  #questions .question-table tbody {
    display: grid;
    gap: 14px;
  }

  #questions .question-table tr {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    padding: 20px 16px;
    border: 1px solid rgba(23, 63, 95, .16);
    border-radius: 22px;
    background: #fffdfa;
    box-shadow: 0 6px 16px rgba(65, 47, 28, .045);
    scroll-margin: 96px 0 28px;
  }

  #questions .question-table tr.question-active {
    border-color: rgba(47, 111, 143, .38);
    box-shadow: 0 8px 20px rgba(47, 111, 143, .08);
  }

  #questions .question-table tr:focus,
  #questions .question-table tr:focus-visible {
    outline: 3px solid rgba(47, 111, 143, .18);
    outline-offset: 3px;
  }

  #questions .question-table tr.question-active td,
  #questions .question-table tr.question-active:hover td,
  #questions .question-table tr.question-complete td,
  #questions .question-table tbody tr:hover td {
    background: transparent;
  }

  #questions .question-table .no {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: auto;
    min-width: 44px;
    max-width: max-content;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(47, 111, 143, .16);
    border-radius: 999px;
    background: #edf6ff;
    color: var(--warm-navy, #173f5f);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
  }

  #questions .question-table .no::before {
    content: "Q";
  }

  #questions .question-table tr.question-active .no {
    border-left: 1px solid rgba(47, 111, 143, .16);
    background: #e6f1fb;
  }

  #questions .question-table .question-text {
    grid-column: 1 / -1;
    padding: 2px 0 12px;
    color: #111827;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  #questions .question-table .question-text .reverse-mark {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
  }

  #questions .question-table .scale {
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    text-align: center;
  }

  #questions .question-table .score-choice {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
  }

  #questions .question-table input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  #questions .question-table .score-choice span {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 44px;
    border: 1px solid rgba(23, 63, 95, .22);
    border-radius: 14px;
    clip: auto;
    clip-path: none;
    overflow: visible;
    background: #fff;
    color: var(--warm-navy, #173f5f);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    white-space: normal;
  }

  #questions .question-table input[type="radio"]:checked + span {
    border-color: var(--warm-blue, #2f6f8f);
    background: var(--warm-blue, #2f6f8f);
    color: #fff;
    box-shadow: 0 4px 12px rgba(47, 111, 143, .18);
  }

  #questions .question-table input[type="radio"]:focus-visible + span {
    outline: 3px solid rgba(47, 111, 143, .2);
    outline-offset: 2px;
  }
}

@container self-entry-prep (max-width: 760px) {
  #selfEntryView .preparation-card-grid,
  #selfEntryView .preparation-card,
  #selfEntryView .preparation-panel,
  #selfEntryView .preparation-subpanel,
  #selfEntryView .offline-questionnaire-panel,
  #selfEntryView .screen-card-head,
  #selfEntryView .self-entry-form-grid,
  #selfEntryView .self-entry-input-section,
  #selfEntryView .self-entry-section-grid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #selfEntryView .preparation-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #selfEntryView .preparation-card {
    width: 100%;
    padding: 17px 18px;
    border-radius: 18px;
  }

  #selfEntryView .preparation-card strong,
  #selfEntryView .preparation-card span,
  #selfEntryView .screen-card-head h3,
  #selfEntryView .screen-card-head p,
  #selfEntryView .self-entry-section-head h3,
  #selfEntryView .self-entry-section-head p {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  #selfEntryView .preparation-card strong {
    font-size: 18px;
    line-height: 1.35;
  }

  #selfEntryView .preparation-card span {
    font-size: 14px;
    line-height: 1.55;
  }

  #selfEntryView .screen-card-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}

@container exam-response (max-width: 760px) {
  #examForm .question-tools {
    gap: 14px;
    margin: 18px 0 14px;
    padding: 16px;
    border-radius: 20px;
    overflow: hidden;
  }

  #examForm .question-tools-main,
  #examForm .entry-support-panel,
  #examForm .entry-support-panel > .omr-field,
  #examForm .entry-support-panel > .form-actions,
  #examForm .entry-support-panel .save-action-group {
    min-width: 0;
    max-width: 100%;
  }

  #examForm .response-scale {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #examForm .response-scale span {
    min-width: 0;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  #examForm .entry-support-panel {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 18px;
    overflow: hidden;
  }

  #examForm .entry-support-panel > .form-actions {
    max-width: 100%;
  }

  #examForm .entry-support-panel > .form-actions > button,
  #examForm .entry-support-panel .save-action-group,
  #examForm .entry-support-panel .save-action-group > button {
    max-width: 100%;
  }

  #questions {
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }

  #questions .question-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 0;
  }

  #questions .question-column {
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #questions .question-column-head {
    display: none;
  }

  #questions .question-column-body {
    max-height: none;
    overflow: visible;
    background: transparent;
    scrollbar-gutter: auto;
  }

  #questions .question-table,
  #questions .question-table tbody,
  #questions .question-table tr,
  #questions .question-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #questions .question-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  #questions .question-table colgroup,
  #questions .question-table thead {
    display: none;
  }

  #questions .question-table tbody {
    display: grid;
    gap: 14px;
  }

  #questions .question-table tr {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    padding: 20px 16px;
    border: 1px solid rgba(23, 63, 95, .16);
    border-radius: 22px;
    background: #fffdfa;
    box-shadow: 0 6px 16px rgba(65, 47, 28, .045);
    scroll-margin: 96px 0 28px;
  }

  #questions .question-table tr.question-active {
    border-color: rgba(47, 111, 143, .38);
    box-shadow: 0 8px 20px rgba(47, 111, 143, .08);
  }

  #questions .question-table tr:focus,
  #questions .question-table tr:focus-visible {
    outline: 3px solid rgba(47, 111, 143, .18);
    outline-offset: 3px;
  }

  #questions .question-table tr.question-active td,
  #questions .question-table tr.question-active:hover td,
  #questions .question-table tr.question-complete td,
  #questions .question-table tbody tr:hover td {
    background: transparent;
  }

  #questions .question-table .no {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: auto;
    min-width: 44px;
    max-width: max-content;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(47, 111, 143, .16);
    border-radius: 999px;
    background: #edf6ff;
    color: var(--warm-navy, #173f5f);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
  }

  #questions .question-table .no::before {
    content: "Q";
  }

  #questions .question-table tr.question-active .no {
    border-left: 1px solid rgba(47, 111, 143, .16);
    background: #e6f1fb;
  }

  #questions .question-table .question-text {
    grid-column: 1 / -1;
    padding: 2px 0 12px;
    color: #111827;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  #questions .question-table .question-text .reverse-mark {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
  }

  #questions .question-table .scale {
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    text-align: center;
  }

  #questions .question-table .score-choice {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
  }

  #questions .question-table input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  #questions .question-table .score-choice span {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 44px;
    border: 1px solid rgba(23, 63, 95, .22);
    border-radius: 14px;
    clip: auto;
    clip-path: none;
    overflow: visible;
    background: #fff;
    color: var(--warm-navy, #173f5f);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    white-space: normal;
  }

  #questions .question-table input[type="radio"]:checked + span {
    border-color: var(--warm-blue, #2f6f8f);
    background: var(--warm-blue, #2f6f8f);
    color: #fff;
    box-shadow: 0 4px 12px rgba(47, 111, 143, .18);
  }

  #questions .question-table input[type="radio"]:focus-visible + span {
    outline: 3px solid rgba(47, 111, 143, .2);
    outline-offset: 2px;
  }
}

@media screen and (max-width: 380px) {
  #examForm.panel {
    padding: 16px 12px;
  }

  #examForm .question-tools,
  #selfEntryView .self-entry-user-panel,
  #examForm .entry-support-panel {
    padding: 14px 12px;
  }

  #questions .question-table tr {
    gap: 6px;
    padding: 18px 14px;
    border-radius: 20px;
  }

  #questions .question-table .question-text {
    font-size: 20px;
  }

  #questions .question-table .score-choice,
  #questions .question-table .score-choice span {
    min-height: 42px;
  }

  #questions .question-table .score-choice span {
    font-size: 17px;
  }
}
