:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #17202a;
  --muted: #667485;
  --line: #dce4ee;
  --line-soft: #edf2f7;
  --primary: #1769aa;
  --primary-dark: #0f4f82;
  --accent: #16846f;
  --danger: #b42318;
  --warning: #a15c07;
  --shadow: 0 18px 46px rgba(23, 32, 42, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(135deg, #f7fbff 0%, #eef4f8 58%, #f7f7f1 100%);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  padding: 24px;
}

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

button {
  cursor: pointer;
}

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

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0;
}

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

h4 {
  margin-bottom: 6px;
  font-size: 16px;
}

p {
  line-height: 1.7;
}

.nav-tabs,
.button-row,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-btn,
.admin-tab,
.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  min-height: 42px;
  padding: 0 15px;
  font-weight: 800;
}

.nav-btn.active,
.admin-tab.active,
.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn.secondary {
  background: #f7fafc;
}

.btn.danger {
  border-color: rgba(180, 35, 24, 0.3);
  color: var(--danger);
  background: #fff7f6;
}

.small-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 228, 238, 0.95);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel + .panel,
#admin-panel > .panel {
  margin-top: 16px;
}

.compact-panel {
  max-width: 620px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 26px;
  min-height: 360px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(23, 105, 170, 0.09), rgba(22, 132, 111, 0.04)),
    rgba(255, 255, 255, 0.94);
}

.intro-copy h2 {
  font-size: 42px;
  line-height: 1.14;
  margin-bottom: 16px;
}

.intro-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}

.ai-disclosure {
  max-width: 680px;
  margin-top: 16px;
  border: 1px solid rgba(23, 105, 170, 0.22);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #eef6ff;
  color: #123d61;
  font-weight: 800;
  line-height: 1.6;
}

.report-disclosure {
  max-width: none;
  margin: 0 0 14px;
}

label {
  display: block;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd7e4;
  border-radius: var(--radius);
  color: var(--text);
  background: #fbfdff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  padding: 10px 11px;
  resize: vertical;
}

label input,
label select,
label textarea {
  margin-top: 7px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(23, 105, 170, 0.75);
  box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.1);
}

.access-form,
.inline-form,
.editor-form {
  display: grid;
  gap: 14px;
}

.inline-form {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.editor-form {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto auto;
  align-items: end;
  margin-bottom: 18px;
}

.wide-field {
  grid-column: span 2;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.error {
  color: var(--danger);
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.status-pill,
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: var(--radius);
  padding: 0 10px;
  background: #eef6ff;
  color: var(--primary-dark);
  font-weight: 900;
}

.quiz-group {
  display: none;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
  margin-top: 20px;
}

.quiz-group.active {
  display: block;
}

.quiz-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.question {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.question p {
  margin-bottom: 12px;
  font-weight: 800;
}

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

.scale label {
  margin: 0;
}

.scale input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scale span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.scale input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.scale-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.quiz-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 12px;
  margin: -4px -8px 18px;
  padding: 10px 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.quiz-stepper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.step-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px 0 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.step-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
}

.step-chip.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #eef6ff;
}

.step-chip.active span,
.step-chip.done span {
  background: var(--primary);
  color: #fff;
}

.step-chip.done {
  border-color: rgba(22, 132, 111, 0.4);
  color: #10664f;
}

.quiz-actions,
.quiz-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-footer {
  margin-top: 18px;
}

.report {
  background: #eef2f6;
}

#report-content {
  display: flex;
  justify-content: center;
}

.report-paper {
  width: min(100%, 920px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 0 12px 32px rgba(23, 32, 42, 0.08);
}

.report-cover {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.report-cover h2 {
  font-size: 36px;
  margin-bottom: 18px;
}

dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

dl div,
.summary-grid div {
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
}

dt,
.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.report-section {
  break-inside: avoid;
  margin-bottom: 26px;
}

.report-section > h3 {
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}

.ai-review-section {
  border: 1px solid rgba(23, 105, 170, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(135deg, #f4f9ff, #f8fbfa);
}

.ai-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.ai-review-header h3 {
  margin-bottom: 0;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ai-review-grid,
.ai-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ai-review-grid > div,
.ai-list-grid > div {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.ai-review-grid h4,
.ai-list-grid h4 {
  margin-bottom: 6px;
}

.ai-review-grid p,
.ai-list-grid p {
  margin-bottom: 6px;
}

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

.lead {
  font-size: 16px;
  color: #26313d;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.bar-label,
.bar-score {
  font-size: 13px;
  font-weight: 900;
}

.bar-score {
  text-align: right;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

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

.recommend-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.related-careers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.related-careers span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.related-careers em {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 8px;
  background: #f2f7f5;
  color: #10664f;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: #eef6ff;
  color: var(--primary-dark);
  font-weight: 900;
}

.muted {
  color: var(--muted);
  margin-bottom: 8px;
}

.score-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.score-pill,
.priority-pill {
  margin-bottom: 8px;
  font-size: 13px;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: var(--radius);
  padding: 0 10px;
  background: #f4f6f8;
  color: var(--muted);
  font-weight: 900;
}

.score-pill.strong {
  background: #e7f8f2;
  color: #10664f;
}

.score-pill.good {
  background: #eef6ff;
  color: var(--primary-dark);
}

.score-pill.mid {
  background: #fff7e8;
  color: var(--warning);
}

.score-pill.low {
  background: #f4f6f8;
  color: var(--muted);
}

.advice-list p,
.note-section p {
  border-left: 3px solid var(--line);
  padding-left: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 16px;
}

.admin-tabs {
  margin-bottom: 14px;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 11px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
}

code {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  background: var(--surface-soft);
}

.key-output {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.submission-list,
.config-list {
  display: grid;
  gap: 10px;
}

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

.submission-card div,
.config-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.config-item > div:first-child {
  min-width: 0;
}

.submission-card p,
.config-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.mapping-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mapping-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #d6e1eb;
  border-radius: 999px;
  padding: 0 9px;
  background: #f8fafc;
  color: #344252;
  font-size: 12px;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  body {
    padding: 16px;
  }

  .topbar,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-grid,
  .two-column,
  .summary-grid,
  .recommend-grid,
  .ai-review-grid,
  .ai-list-grid,
  .admin-grid,
  .inline-form,
  .editor-form,
  dl {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: auto;
  }

  .report-paper {
    padding: 22px;
  }

  .intro-copy h2 {
    font-size: 31px;
  }

  .bar-row {
    grid-template-columns: 86px 1fr 36px;
  }
}

@media print {
  html,
  body {
    background: #fff;
    padding: 0;
  }

  .topbar,
  .print-hidden,
  #access-card,
  #quiz-card,
  #admin-view,
  body:not(.printing-report) #report-card {
    display: none !important;
  }

  .app-shell {
    width: 100%;
  }

  .panel {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .report,
  #report-content {
    display: block;
    background: #fff;
  }

  .report-paper {
    width: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .report-section {
    page-break-inside: avoid;
  }
}
