:root {
  color-scheme: light;
  --page: #f8f7ff;
  --surface: #ffffff;
  --surface-muted: #f3f0ff;
  --ink: #1d1d1f;
  --muted: #6e6a7a;
  --line: #ded8ee;
  --teal: #8a78f0;
  --teal-soft: #eeeaff;
  --amber: #c45f12;
  --amber-soft: #fff1dc;
  --rose: #b42318;
  --rose-soft: #ffe4df;
  --blue: #7c5cff;
  --blue-soft: #f0ecff;
  --navy: #2a2438;
  --orange: #b86cff;
  --shadow: 0 18px 45px rgba(83, 63, 132, 0.1);
  --soft-shadow: 0 8px 24px rgba(83, 63, 132, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #f4f0ff 0, #fbfaff 320px, var(--page) 100%);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #9b87ff, #c9b7ff, #e8dfff);
  z-index: 20;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.candidate-browser-tip {
  display: grid;
  flex: 0 1 336px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  width: min(336px, 100%);
  padding: 11px 13px;
  border: 1px solid #efca78;
  border-radius: 18px;
  background: rgba(255, 249, 232, 0.98);
  color: #594214;
  box-shadow: 0 10px 28px rgba(117, 84, 24, 0.16);
  backdrop-filter: blur(12px);
}

.candidate-browser-tip-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f2c45f;
  color: #4e390e;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.candidate-browser-tip p {
  margin: 0;
  font-size: 12px;
  line-height: 1.58;
}

.candidate-browser-tip strong {
  color: #7a5100;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(83, 63, 132, 0.06);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  color: var(--navy);
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

h3 {
  font-size: 17px;
  line-height: 1.45;
}

.topbar-actions,
.nav-actions,
.report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-page-nav {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 48px) 48px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-panel,
.stage-panel,
.main-panel,
.question-card,
.report-section,
.notice,
.stat-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-panel,
.stage-panel,
.main-panel {
  padding: 20px;
}

.profile-panel {
  border-top: 4px solid var(--blue);
}

.stage-panel {
  border-top: 4px solid var(--teal);
}

.profile-panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-note {
  color: #8a8497;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

input,
select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fbfdff;
  color: var(--ink);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(124, 92, 255, 0.18);
  outline-offset: 2px;
}

input:focus,
select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.08);
}

.two-fields {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 700;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.option:hover,
.stage-item:hover,
.value-item:hover {
  transform: translateY(-1px);
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.primary-button {
  border-color: #c8dff8;
  background: #edf6ff;
  color: #175d9c;
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.1);
}

.secondary-button {
  border-color: #d8d1f5;
  background: var(--teal-soft);
  color: #5744b3;
}

.ghost-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.ghost-button:hover {
  border-color: #c7bee8;
  background: #fbfaff;
}

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

.full-width {
  width: 100%;
}

.panel-heading,
.question-meta,
.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stage-list {
  display: grid;
  gap: 10px;
}

.stage-item {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
  text-align: left;
  box-shadow: var(--soft-shadow);
}

.stage-item.active {
  border-color: rgba(124, 92, 255, 0.38);
  background: linear-gradient(180deg, #fbfaff, var(--teal-soft));
}

.stage-item strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.stage-detail {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #ebe6f7;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c5cff, #b69cff);
  transition: width 0.2s ease;
}

.main-panel {
  min-height: 720px;
  border-top: 4px solid var(--orange);
  overflow: hidden;
}

.workspace.candidate-welcome-layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1120px;
  padding-top: 32px;
}

.workspace.candidate-welcome-layout .main-panel {
  min-height: calc(100vh - 168px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.candidate-welcome {
  display: grid;
  min-height: calc(100vh - 168px);
  place-items: center;
  padding: 18px 0 42px;
}

.candidate-welcome-card {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(100%, 820px);
  padding: 32px;
  border: 1px solid rgba(214, 219, 229, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 64px rgba(41, 43, 52, 0.12);
  text-align: center;
  backdrop-filter: blur(18px);
}

.candidate-welcome-logo {
  width: min(280px, 62vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f7;
  box-shadow: 0 18px 38px rgba(41, 43, 52, 0.16);
}

.candidate-welcome-copy {
  display: grid;
  gap: 14px;
  max-width: 690px;
  color: #46464f;
}

.candidate-welcome-kicker {
  justify-self: center;
  min-height: 28px;
  margin-bottom: 2px;
  padding: 5px 12px;
  border: 1px solid #dde6f3;
  border-radius: 999px;
  background: #f6f9ff;
  color: #4f627f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.candidate-welcome h2 {
  margin-bottom: 0;
  color: #1d1d1f;
  font-size: 28px;
  line-height: 1.28;
}

.candidate-welcome p {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
}

.candidate-welcome-button {
  min-width: 168px;
  min-height: 52px;
  border: 1px solid #d7e1ef;
  border-radius: 999px;
  padding: 0 28px;
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  color: #1d1d1f;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(74, 115, 167, 0.16);
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.candidate-welcome-button:hover {
  transform: translateY(-1px);
  border-color: #c6d5e8;
  background: linear-gradient(180deg, #ffffff, #e8f3ff);
  box-shadow: 0 16px 32px rgba(74, 115, 167, 0.2);
}

.candidate-welcome-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(74, 115, 167, 0.14);
}

.hidden {
  display: none !important;
}

.check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.check-row input {
  margin-top: 3px;
}

.form-hint {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.form-hint.ok {
  color: #047857;
}

.form-hint.warn {
  color: #b45309;
}

.assessment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.assessment-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.page-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #d8d1f5;
  border-radius: 999px;
  padding: 0 12px;
  background: #fbfaff;
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(83, 63, 132, 0.08);
}

.page-timer span {
  font-size: 12px;
  font-weight: 700;
}

.page-timer strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.page-timer.urgent {
  border-color: #f0ce80;
  background: #fff8e8;
  color: #714800;
}

.page-timer.expired {
  border-color: #f3c1b8;
  background: var(--rose-soft);
  color: var(--rose);
}

.assessment-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 99px;
  padding: 0 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.api {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.ready {
  background: var(--teal-soft);
  color: var(--teal);
}

.pill.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.question-list {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.question-card {
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.question-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.question-title {
  margin-bottom: 16px;
  white-space: pre-line;
  font-size: 16px;
  line-height: 1.7;
}

.choice-poles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}

.choice-pole {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.choice-pole span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.choice-pole strong {
  font-size: 16px;
  line-height: 1.5;
}

.b-pole {
  grid-template-columns: minmax(0, 1fr) 34px;
  text-align: right;
}

.b-pole span {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.b-pole strong {
  grid-column: 1;
  grid-row: 1;
}

.options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.option {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfdff;
  color: var(--ink);
  text-align: center;
  padding: 8px;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(83, 63, 132, 0.04);
}

.option.selected {
  border-color: rgba(124, 92, 255, 0.55);
  background: var(--blue-soft);
  color: #3a2375;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.13);
}

.scale-option-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.scale-side-badge {
  width: 22px;
  height: 22px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.scale-option.b-side .scale-side-badge {
  background: #eaf6ff;
  color: #1769aa;
}

.scale-option.a-side {
  justify-content: flex-start;
  padding-left: 18px;
}

.scale-option.neutral {
  justify-content: center;
}

.scale-option.b-side {
  justify-content: flex-end;
  padding-right: 18px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.value-item {
  position: relative;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 14px 14px 44px;
  text-align: left;
}

.value-item.selected {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.value-item.selected .rank-badge {
  background: var(--amber);
  color: #fff;
}

.value-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.value-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.value-rank-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  min-height: 64px;
  padding: 0;
  list-style: none;
}

.value-rank-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.value-rank-columns h3 {
  margin: 4px 0 10px;
}

.value-rank-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--soft-shadow);
  cursor: grab;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    opacity 0.16s ease;
}

.value-rank-row:hover {
  border-color: #c7bcea;
  box-shadow: 0 12px 28px rgba(83, 63, 132, 0.13);
}

.value-rank-row.reserve {
  background: #fbfbfd;
}

.value-rank-row .rank-badge {
  position: static;
}

.value-rank-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #827996;
  cursor: grab;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  touch-action: none;
}

.value-rank-drag-handle:hover,
.value-rank-drag-handle:focus-visible {
  background: var(--surface-muted);
  color: var(--blue);
}

.value-rank-row.is-dragging {
  opacity: 0.34;
}

.value-rank-drag-ghost {
  position: fixed;
  z-index: 1000;
  margin: 0;
  pointer-events: none;
  opacity: 0.96;
  cursor: grabbing;
  transform: rotate(0.5deg) scale(1.01);
  box-shadow: 0 20px 44px rgba(44, 33, 74, 0.22);
}

.value-rank-drop-marker {
  height: 6px;
  margin: -3px 4px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.13);
  list-style: none;
  pointer-events: none;
}

body.value-rank-dragging,
body.value-rank-dragging .value-rank-row,
body.value-rank-dragging .value-rank-drag-handle {
  cursor: grabbing;
  user-select: none;
}

.value-rank-row strong,
.value-rank-row span {
  display: block;
}

.value-rank-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.value-rank-actions {
  display: flex;
  gap: 6px;
}

.value-rank-actions button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: 800;
}

.value-rank-actions button:disabled {
  opacity: 0.35;
}

.notice {
  padding: 14px;
  color: var(--muted);
  line-height: 1.7;
  box-shadow: var(--soft-shadow);
}

.notice.warning {
  border-color: #f0ce80;
  background: #fff8e8;
  color: #714800;
}

.validation {
  min-height: 24px;
  margin: 8px 0;
  color: var(--rose);
  font-weight: 700;
}

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

.stat-box {
  min-height: 92px;
  padding: 14px;
  box-shadow: none;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-box strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.stat-box em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
}

.report-section {
  margin-top: 16px;
  padding: 16px;
  box-shadow: none;
}

.scoring-summary .notice {
  margin-bottom: 14px;
}

.summary-line {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 2px 6px 2px 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

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

.insight-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.insight-grid h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.score-list {
  display: grid;
  gap: 9px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 1fr) 38px;
  gap: 10px;
  align-items: center;
}

.score-row div:first-child {
  min-width: 0;
}

.score-row strong {
  display: block;
  font-size: 14px;
}

.score-row span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-row b {
  text-align: right;
}

.score-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-muted);
}

.score-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.limit-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

th {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 160px) minmax(0, 1fr) 50px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 12px;
  border-radius: 99px;
  background: var(--surface-muted);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--teal);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 48px 24px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.1), rgba(182, 156, 255, 0.08) 44%, rgba(232, 223, 255, 0.78)),
    #ffffff;
  text-align: center;
  color: var(--muted);
}

.empty-state > div {
  display: grid;
  gap: 14px;
  max-width: 640px;
}

.empty-state > div::before {
  content: "";
  display: block;
  width: 72px;
  height: 5px;
  margin: 0 auto 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #7c5cff, #b69cff, #e8dfff);
}

.empty-state h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
}

.empty-state p {
  margin: 0 auto;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

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

  .report-grid,
  .stats-grid,
  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .candidate-browser-tip {
    width: 100%;
    padding: 10px 12px;
  }

  .topbar,
  .assessment-head,
  .panel-heading,
  .report-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions,
  .nav-actions,
  .report-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .assessment-tools {
    justify-items: stretch;
  }

  .page-timer {
    justify-content: center;
  }

  .two-fields,
  .report-grid,
  .stats-grid,
  .insight-grid,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .options:not(.scale-options) {
    grid-template-columns: 1fr;
  }

  .scale-options {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 4px;
  }

  .scale-option {
    min-height: 50px;
    padding: 6px 2px;
    font-size: 11px;
    line-height: 1.25;
  }

  .scale-option-content {
    flex-direction: column;
    gap: 2px;
  }

  .scale-side-badge {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .scale-option.a-side,
  .scale-option.b-side {
    justify-content: center;
    padding-left: 4px;
    padding-right: 4px;
  }

  .score-row {
    grid-template-columns: 1fr 48px;
  }

  .score-row .score-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .value-rank-columns {
    grid-template-columns: 1fr;
  }

  .value-rank-row {
    grid-template-columns: 28px 32px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 9px;
  }

  .value-rank-actions {
    gap: 4px;
  }

  .value-rank-actions button {
    width: 32px;
    height: 32px;
  }

  .main-panel {
    min-height: auto;
    padding: 14px;
  }

  .question-card {
    padding: 14px;
  }

  .choice-poles {
    gap: 8px;
  }

  .choice-pole {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    min-height: 82px;
    padding: 10px 8px;
  }

  .b-pole {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .choice-pole span {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .choice-pole strong {
    font-size: 14px;
    line-height: 1.45;
  }

  .workspace.candidate-welcome-layout {
    padding: 18px 14px 32px;
  }

  .candidate-welcome {
    min-height: calc(100vh - 150px);
    padding: 10px 0 28px;
  }

  .candidate-welcome-card {
    gap: 18px;
    padding: 20px 16px;
  }

  .candidate-welcome-logo {
    width: min(220px, 72vw);
  }

  .candidate-welcome h2 {
    font-size: 24px;
  }

  .candidate-welcome p {
    font-size: 15px;
    line-height: 1.82;
  }

  .candidate-welcome-button {
    width: 100%;
  }

  .assessment-tools .nav-actions {
    display: none;
  }

  #assessment-view:not(.hidden) {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .mobile-page-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(96px, 1fr) auto minmax(96px, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(216, 209, 245, 0.92);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 32px rgba(41, 43, 52, 0.12);
    backdrop-filter: blur(18px);
  }

  .mobile-page-nav button {
    width: 100%;
    min-height: 48px;
  }

  .mobile-page-nav > span {
    min-width: 42px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }

  .mobile-page-nav > span strong {
    color: var(--ink);
    font-size: 15px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .side-panel,
  .assessment-view,
  .report-actions,
  .nav-actions,
  .mobile-page-nav,
  .validation {
    display: none !important;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .main-panel,
  .report-section,
  .stat-box {
    border: 0;
    box-shadow: none;
  }
}
