:root {
  --ink: #1f2937;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --brand: #c0262e;
  --brand-dark: #961d24;
  --brand-soft: #fbebed;
  --brand-line: #f0c8cc;
  --teal: #0f6e56;
  --teal-soft: #e1f5ee;
  --amber: #854f0b;
  --amber-soft: #faeeda;
  --red: #a32d2d;
  --red-soft: #fcebeb;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.4; }
p { margin: 0 0 12px; }
ul { margin: 0; padding-left: 20px; }
li { margin-bottom: 6px; }

.app-shell {
  max-width: 780px;
  margin: 32px auto 64px;
  padding: 0 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink-3);
}
.site-header .brand { font-weight: 600; color: var(--brand-dark); font-size: 14px; }
.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
}
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 20px; background: var(--line-2); flex: none; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
h1 { font-size: 26px; margin-bottom: 10px; }
h2 { font-size: 19px; margin-bottom: 10px; }
h3 { font-size: 16px; margin-bottom: 8px; }
.lead { color: var(--ink-2); font-size: 15px; }
.muted { color: var(--ink-3); font-size: 13px; }
.small { font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--brand-dark); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--brand-soft); border-color: var(--brand); }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 22px; }

.notice {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--brand-dark);
  margin: 18px 0;
}
.notice.warn { background: var(--amber-soft); border-color: #efc97a; color: var(--amber); }
.notice.error { background: var(--red-soft); border-color: #f0b5b5; color: var(--red); }
.notice.ok { background: var(--teal-soft); border-color: #9fe1cb; color: var(--teal); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
input[type="text"], input[type="password"] {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  outline: none;
}
input[type="text"]:focus, input[type="password"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkbox input { margin-top: 4px; flex: none; }

.progress-wrap { margin-bottom: 20px; }
.progress-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.progress-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .25s; }

.question {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
}
.question.unanswered { border-color: var(--brand); background: #fffafa; }
.question .q-text { font-size: 15px; margin-bottom: 12px; }
.question .q-num { display: inline-block; min-width: 30px; color: var(--ink-3); font-size: 13px; }
.scale-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale-opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 6px 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all .12s;
}
.scale-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.scale-opt input { position: absolute; opacity: 0; pointer-events: none; }
.scale-opt.selected { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }

.quiz-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  padding: 14px 0 4px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(6px);
}
.status-line {
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.timer.urgent { color: #fff; background: #b91c1c; border-color: #b91c1c; }
.timer-hint { font-size: 12px; color: var(--ink-3); }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.submit-status { margin-bottom: 4px; }

.report { background: #fff; color: var(--ink); }
.report-head { border-bottom: 2px solid var(--brand); padding-bottom: 16px; margin-bottom: 22px; }
.report-head-top { display: flex; align-items: center; gap: 16px; }
.report-logo { height: 38px; width: auto; display: block; flex: none; }
.report-head .r-title { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.report-head .r-sub { font-size: 13px; color: var(--ink-3); }
.report-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; font-size: 13px; margin-bottom: 24px; }
.report-meta .m-label { color: var(--ink-3); margin-right: 8px; }
.report-hero { background: var(--brand-soft); border-radius: 12px; padding: 22px; margin-bottom: 22px; }
.report-hero .code { font-size: 38px; font-weight: 600; letter-spacing: .08em; color: var(--brand-dark); line-height: 1.1; }
.report-hero .name { font-size: 18px; font-weight: 600; color: var(--brand-dark); margin-top: 6px; }
.report-hero .tagline { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.report-section { margin-bottom: 24px; break-inside: avoid; }
.report-section h3 { font-size: 16px; color: var(--brand-dark); border-left: 3px solid var(--brand); padding-left: 10px; margin-bottom: 12px; }
.report-section p { font-size: 14px; color: var(--ink-2); }
.report-section ul { font-size: 14px; color: var(--ink-2); }
.cc-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-3);
  margin: 16px 0 6px;
}
.career-card {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  padding: 14px 18px;
}
.career-card .cc-label { margin-top: 0; }
.career-card .cc-value { font-size: 19px; font-weight: 600; color: var(--brand-dark); }
.career-card .cc-desc { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.dim-row { margin-bottom: 16px; }
.dim-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.dim-head .dim-name { font-weight: 500; }
.dim-head .dim-score { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dim-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.dim-a { background: var(--brand); }
.dim-b { background: #d8dde4; }
.dim-note { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.dim-desc { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.report-caveat {
  background: var(--amber-soft);
  border: 1px solid #efc97a;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--amber);
  break-inside: avoid;
}
.disclaimer-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}
.report-footer { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 14px; font-size: 11px; color: var(--ink-3); }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: middle; }
.data-table th { color: var(--ink-3); font-weight: 500; background: var(--bg); }
.data-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  white-space: nowrap;
}
.badge.badge-warn { background: var(--amber-soft); color: var(--amber); }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { flex: 1; min-width: 120px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .v { font-size: 22px; font-weight: 600; color: var(--brand-dark); }
.stat .k { font-size: 12px; color: var(--ink-3); }

.hidden { display: none !important; }
.center { text-align: center; }

@media (max-width: 560px) {
  .app-shell { margin: 16px auto 40px; padding: 0 12px; }
  .card { padding: 20px 16px; }
  h1 { font-size: 22px; }
  .scale-options { grid-template-columns: 1fr; }
  .scale-opt { min-height: 38px; justify-content: flex-start; padding-left: 14px; }
  .report-meta { grid-template-columns: 1fr; }
  .report-hero .code { font-size: 30px; }
  .report-head-top { gap: 10px; }
  .report-logo { height: 28px; }
  .report-head .r-title { font-size: 19px; }
  .timer-hint { display: none; }
  .data-table { font-size: 12px; }
}

@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; font-size: 12pt; }
  .app-shell { max-width: none; margin: 0; padding: 0; }
  .card { border: none; box-shadow: none; padding: 0; }
  .no-print { display: none !important; }
  .report-head { margin-bottom: 16px; }
  .report-logo { height: 32px; }
  .report-section { margin-bottom: 16px; break-inside: avoid; }
  .report-hero { padding: 14px; margin-bottom: 16px; }
  .report-hero .code { font-size: 28pt; }
  .disclaimer-box { font-size: 9pt; }
  .career-card { break-inside: avoid; }
  .dim-row { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
