/* THESIS: 考核是在演一张覆膜话术卡，拒绝深蓝渐变英雄 + 白卡片报名 + 四宫格规则。
   OWN-WORLD: 冷灰桌托冷白 PVC 卡；黑体正文；窄体数字；荧光笔黄占门槛行；红条只留给合规；控件是填空线和盖印。
   STORY: 学员先在卡顶填身份，看清四节拍和红禁语，再盖印开考；交卷后同一张卡变成盖章回执。
   FIRST VIEWPORT: 桌面露边，整张卡铺满；填空在上，标题与节拍表居中，红禁语贴底，开始答题是右下红章。
   FORM: 覆膜话术卡 · 构图 A 整页即卡 · seed d257f578 · index 3 · staging 登记后开考。 */

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --desk: #4a5560;
  --laminate: #f2f5f7;
  --ink: #1b2430;
  --mute: #3d4a57;
  --highlighter: #f0c400;
  --highlighter-ink: #3a2e00;
  --forbidden: #c01616;
  --forbidden-soft: #fde8e6;
  --ballpoint: #1f4ec4;
  --pass: #0f7a4a;
  --line: #c5ced6;
  --ghost: #d7dee5;
  --shadow: 0 14px 0 rgba(20, 26, 32, .22);
  --navy: #1b2430;
  --navy-2: #2a3542;
  --blue: #1f4ec4;
  --blue-soft: #e7eefc;
  --teal: #0f7a4a;
  --gold: #3a2e00;
  --gold-soft: #f0c400;
  --green: #0f7a4a;
  --green-soft: #e3f5ec;
  --red: #c01616;
  --red-soft: #fde8e6;
  --surface: #f2f5f7;
  --canvas: #4a5560;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255,255,255,.08), transparent 50%),
    var(--desk);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.65;
}
button, input, textarea, select { font: inherit; }
button { border: 0; }
[hidden] { display: none !important; }

.topbar {
  height: 64px;
  padding: 0 max(20px, calc((100vw - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #3d4650;
  border-bottom: 1px solid #2f3841;
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; color: #f2f5f7; text-decoration: none; }
.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d7dee5;
  box-shadow: inset 0 0 0 4px #3d4650, 0 0 0 1px #8b949e;
}
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { font-size: 15px; font-weight: 700; }
.brand small { color: #c5ced6; font-size: 12px; margin-top: 2px; }
.topbar-meta { display: flex; align-items: center; gap: 14px; color: #f2f5f7; }
.save-state { color: #8ee0b4; font-size: 13px; }
.timer {
  color: #f0c400;
  font-family: "Barlow Condensed", ui-monospace, sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: .06em;
  line-height: 1;
}

main { min-height: calc(100vh - 64px); padding: 28px 16px 48px; }

.script-card,
.exam-sidebar,
.exam-content,
.result-view {
  position: relative;
}

.script-card {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 40px 32px;
  background:
    linear-gradient(125deg, rgba(255,255,255,.42) 0 9%, transparent 22%),
    var(--laminate);
  border: 1px solid #d9e0e6;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.card-holes {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 52px;
  pointer-events: none;
}
.card-holes i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--desk);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 3px #d7dee5;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: var(--ink);
  padding-top: 10px;
}
.start-card { order: -1; background: none; color: inherit; border-radius: 0; padding: 0 0 8px; box-shadow: none; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.card-heading h2 { margin: 4px 0 0; color: var(--ink); line-height: 1.25; font-size: 22px; font-weight: 700; }
.step-label {
  color: var(--mute);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-pill {
  background: var(--highlighter);
  color: var(--highlighter-ink);
  border: 0;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mute);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 14px;
}
.landing h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 900;
}
.hero-copy { max-width: 70ch; margin: 14px 0 0; color: var(--mute); font-size: 16px; }
.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  max-width: none;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}
.metric-row div { padding: 0; display: flex; align-items: baseline; gap: 6px; }
.metric-row strong, .metric-row span { display: inline; }
.metric-row strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}
.metric-row span { margin-top: 0; color: var(--mute); font-size: 13px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 4px; color: var(--mute); font-size: 12px; font-weight: 700; }
.field b { color: var(--forbidden); }
.field input, .field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ballpoint);
  padding: 8px 0 7px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field textarea:focus {
  border-bottom-color: var(--ballpoint);
  box-shadow: 0 1px 0 var(--ballpoint);
}
.field input::placeholder, .field textarea::placeholder { color: #8b95a1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.privacy-note, .muted { color: var(--mute); font-size: 12px; }
.privacy-note { margin: 12px 0 0; text-align: left; }

.button {
  cursor: pointer;
  border-radius: 3px;
  padding: 11px 16px;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.button:hover { transform: translateY(1px); }
.button:active { transform: translateY(2px); }
.button:focus-visible { outline: 2px solid var(--ballpoint); outline-offset: 3px; }
.button-primary { color: #fff; background: var(--ink); box-shadow: 0 3px 0 #0b1016; }
.button-secondary { color: var(--ink); background: #e4e9ee; box-shadow: 0 2px 0 #b7c0c8; }
.button-ghost { color: #f2f5f7; background: transparent; border: 1px solid #8b949e; }
.button-small { padding: 6px 10px; font-size: 13px; }
.button-block { display: block; width: 100%; margin-top: 8px; }
#startButton {
  background: var(--forbidden);
  box-shadow: 0 4px 0 #7a0d0d;
  letter-spacing: .12em;
  font-size: 18px;
}
#startButton:hover { background: #a01212; }

.rule-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--ink);
}
.rule-grid article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0 14px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 0;
  box-shadow: none;
}
.rule-grid article:nth-child(-n+3) {
  background: linear-gradient(90deg, var(--highlighter) 0 8px, transparent 8px);
  padding-left: 16px;
}
.rule-grid h3 { grid-column: 2; color: var(--ink); margin: 0 0 4px; font-size: 17px; }
.rule-grid p { grid-column: 2; color: var(--mute); margin: 0; font-size: 13px; }
.rule-icon {
  grid-row: 1 / span 2;
  width: auto;
  height: auto;
  display: block;
  background: none;
  color: var(--ink);
  border-radius: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 22px;
}
.danger-rule {
  margin-top: 16px;
  padding: 14px 16px !important;
  background: var(--forbidden) !important;
  border: 0 !important;
  color: #fff;
  grid-template-columns: 28px 1fr !important;
}
.danger-rule .rule-icon,
.danger-rule h3,
.danger-rule p { color: #fff; }
.danger-rule p { color: #ffd7d4; }

.exam-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
}
.exam-sidebar,
.exam-content,
.result-card,
.result-hero {
  background:
    linear-gradient(125deg, rgba(255,255,255,.38) 0 8%, transparent 20%),
    var(--laminate);
  border: 1px solid #d9e0e6;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.exam-sidebar { position: sticky; top: 88px; align-self: start; padding: 16px; }
.candidate-mini { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.candidate-mini strong, .candidate-mini small { display: block; }
.candidate-mini small { color: var(--mute); margin-top: 2px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
#sectionNav { padding: 12px 0; display: grid; gap: 4px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  text-align: left;
  cursor: pointer;
  color: var(--mute);
  background: transparent;
  border-radius: 0;
}
.nav-item:hover { background: #e8edf1; color: var(--ink); }
.nav-item.active {
  background: var(--highlighter);
  color: var(--highlighter-ink);
  font-weight: 700;
}
.nav-item.done .nav-dot { background: var(--pass); color: #fff; border-color: var(--pass); }
.nav-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.nav-copy strong, .nav-copy small { display: block; }
.nav-copy strong { font-size: 13px; }
.nav-copy small { font-size: 11px; color: inherit; opacity: .72; font-weight: 500; }
.overall-progress { border-top: 1px solid var(--ink); padding-top: 14px; }
.overall-progress > div:first-child { display: flex; justify-content: space-between; font-size: 12px; }
.overall-progress small { color: var(--mute); }
.progress-track { height: 4px; margin: 8px 0; background: var(--ghost); border-radius: 0; overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--ink); }

.exam-content { min-width: 0; padding: 8px 8px 16px; }
.exam-intro {
  margin: 0 0 12px;
  padding: 20px 22px 16px;
  color: var(--ink);
  border-radius: 0;
  background: var(--highlighter);
  box-shadow: none;
}
.exam-intro .eyebrow { margin-bottom: 4px; color: var(--highlighter-ink); }
.exam-intro h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.3; }
.exam-intro p { margin: 0; color: var(--highlighter-ink); }
.intro-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.intro-meta span {
  padding: 3px 7px;
  border-radius: 0;
  border: 1px solid var(--highlighter-ink);
  color: var(--highlighter-ink);
  font-size: 12px;
}

.question-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 22px;
  margin-bottom: 0;
  box-shadow: none;
}
.question-card.invalid { background: var(--forbidden-soft); box-shadow: none; }
.question-head { display: flex; align-items: flex-start; gap: 12px; }
.question-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--ink);
  background: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
}
.question-title { flex: 1; }
.question-title h2 { margin: 1px 0 4px; color: var(--ink); font-size: 16px; line-height: 1.6; }
.question-title small { color: var(--mute); }
.choice-options { display: grid; gap: 8px; margin: 14px 0 0 40px; }
.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  transition: background-color .12s ease;
}
.choice-option:hover { background: #e8edf1; }
.choice-option:has(input:checked) { background: var(--highlighter); border-bottom-color: var(--ink); }
.choice-option input { margin-top: 5px; accent-color: var(--ink); }
.answer-area { margin: 14px 0 0 40px; }
.answer-area textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.8;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--ink);
  padding: 10px 8px;
  background:
    repeating-linear-gradient(transparent, transparent 27px, var(--ghost) 27px, var(--ghost) 28px);
}
.answer-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--mute); font-size: 12px; margin-top: 6px; }
.answer-footer .enough { color: var(--pass); font-weight: 700; }
.scenario-tip {
  margin: 0 22px 8px;
  padding: 10px 0;
  color: var(--highlighter-ink);
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--ink);
  border-radius: 0;
  font-size: 13px;
}
.customer-line {
  margin: 12px 0 0 40px;
  padding: 10px 0;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ballpoint);
  border-radius: 0;
  font-size: 14px;
}
.customer-line strong { color: var(--ballpoint); }
.exam-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px 8px;
}
.exam-actions span { color: var(--mute); font-size: 13px; }

.result-view { max-width: 1080px; margin: 0 auto; padding: 0 0 24px; }
.result-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--ink);
  padding: 28px 32px;
  border-radius: 6px;
}
.result-hero.fail { background: var(--forbidden); color: #fff; box-shadow: 0 14px 0 #7a0d0d; }
.result-hero.fail .eyebrow,
.result-hero.fail p:last-child { color: #ffd7d4; }
.result-hero h1 { margin: 0; font-size: 36px; }
.result-hero p:last-child { color: var(--mute); margin-bottom: 0; }
.score-ring {
  width: auto;
  height: auto;
  flex: none;
  display: block;
  text-align: right;
  border-radius: 0;
  background: none;
  position: relative;
}
.score-ring::before { display: none; }
.score-ring strong, .score-ring span { position: static; display: block; }
.score-ring strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 72px;
  line-height: .9;
  font-weight: 700;
}
.score-ring span { color: var(--mute); font-size: 13px; margin-top: 4px; }
.result-hero.fail .score-ring span { color: #ffd7d4; }
.result-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; margin-top: 16px; }
.result-card {
  padding: 22px 24px;
  margin-top: 16px;
}
.result-grid .result-card { margin-top: 0; }
.module-score {
  display: grid;
  grid-template-columns: 150px 1fr 72px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.module-score:first-child { border-top: 0; }
.module-score span { color: var(--ink); font-size: 13px; }
.module-score strong {
  text-align: right;
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16px;
}
.mini-track { height: 4px; background: var(--ghost); border-radius: 0; overflow: hidden; }
.mini-track i { display: block; height: 100%; background: var(--ink); }
.compliance-ok, .compliance-fail { padding: 12px 0; border-radius: 0; }
.compliance-ok { color: var(--pass); background: none; }
.compliance-fail { color: #fff; background: var(--forbidden); padding: 14px; }
.compliance-ok strong, .compliance-fail strong { display: block; margin-bottom: 5px; }
.flag-list { margin: 10px 0 0; padding-left: 19px; }
.review-item { border-top: 1px solid var(--line); padding: 12px 0; }
.review-item:first-child { border-top: 0; }
.review-summary {
  width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto 24px;
  align-items: center;
  gap: 13px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  background: transparent;
}
.review-summary h3 { margin: 0; color: var(--ink); font-size: 15px; }
.review-summary p { margin: 3px 0 0; color: var(--mute); font-size: 12px; }
.review-score {
  padding: 3px 7px;
  color: var(--highlighter-ink);
  background: var(--highlighter);
  border-radius: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.review-body { display: none; margin: 12px 0 0; padding: 12px 0 0; background: none; border-top: 1px dashed var(--line); border-radius: 0; font-size: 13px; }
.review-item.open .review-body { display: block; }
.review-answer { white-space: pre-wrap; color: var(--ink); }
.feedback-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.feedback-box { padding: 10px 0; border-radius: 0; }
.feedback-box strong { display: block; margin-bottom: 5px; }
.feedback-box ul { margin: 0; padding-left: 18px; }
.feedback-good { background: none; color: var(--pass); }
.feedback-miss { background: none; color: var(--highlighter-ink); }
.feedback-risk { margin-top: 12px; background: var(--forbidden-soft); color: #8f1b12; padding: 10px; }
.override-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.override-grid .field { margin-bottom: 12px; }
.manual-compliance {
  display: grid;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 12px 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.manual-compliance strong { color: var(--ink); font-size: 13px; }
.manual-compliance label { display: flex; align-items: flex-start; gap: 8px; color: var(--mute); font-size: 13px; }
.manual-compliance input { margin-top: 5px; accent-color: var(--forbidden); }
.override-row { display: flex; align-items: end; gap: 12px; }
.override-row .field { width: 220px; margin: 0; }
.override-row .grow { flex: 1; width: auto; }
.result-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

dialog {
  width: min(480px, calc(100% - 32px));
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: var(--laminate);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20, 26, 32, .62); }
dialog form { padding: 24px; }
dialog h2 { margin: 0 0 8px; color: var(--ink); }
dialog p { color: var(--mute); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  opacity: 0;
  z-index: 50;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
  box-shadow: var(--shadow);
  transition: .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .landing-hero { gap: 20px; }
  .exam-shell { grid-template-columns: 1fr; }
  .exam-sidebar { position: static; }
  #sectionNav { display: grid; grid-template-columns: repeat(4, 1fr); }
  .nav-item { justify-content: center; }
  .nav-copy small { display: none; }
  .result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { padding: 0 12px; }
  .brand strong { font-size: 13px; }
  .save-state { display: none; }
  main { padding: 14px 10px 36px; }
  .script-card { padding: 28px 16px 20px; }
  .landing h1 { font-size: 32px; }
  .metric-row { gap: 10px 16px; }
  .two-col { grid-template-columns: 1fr; }
  #sectionNav { grid-template-columns: 1fr 1fr; }
  .question-card { padding: 16px 12px; }
  .choice-options, .answer-area, .customer-line { margin-left: 0; }
  .exam-intro, .exam-actions { padding-left: 12px; padding-right: 12px; }
  .scenario-tip { margin: 0 12px 8px; }
  .exam-actions { flex-wrap: wrap; }
  .exam-actions span { order: -1; width: 100%; text-align: center; }
  .result-hero { align-items: flex-start; padding: 20px 16px; flex-direction: column; }
  .score-ring { text-align: left; }
  .score-ring strong { font-size: 56px; }
  .module-score { grid-template-columns: 1fr auto; }
  .module-score .mini-track { display: none; }
  .feedback-columns { grid-template-columns: 1fr; }
  .override-grid { grid-template-columns: 1fr; }
  .override-row { align-items: stretch; flex-direction: column; }
  .override-row .field { width: 100%; }
  .result-actions .button { flex: 1 1 45%; }
}

@media print {
  body { background: #fff; }
  .topbar, .result-actions, #toggleReview, .examiner-review button { display: none !important; }
  main { padding: 0; }
  .result-view { max-width: none; padding: 0; }
  .result-hero, .result-card { box-shadow: none; break-inside: avoid; }
  .review-body { display: block !important; }
  .review-item { break-inside: avoid; }
}
