:root {
  --ink: #16231f;
  --muted: #66736d;
  --paper: #ffffff;
  --canvas: #f3f6f2;
  --green: #0c6b4f;
  --green-dark: #084d3a;
  --lime: #d8ef86;
  --line: #dce4df;
  --warning: #a34a28;
  --shadow: 0 22px 60px rgba(28, 51, 42, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.test-banner { background: #17382f; color: #fff; text-align: center; padding: 8px 16px; font-size: 12px; letter-spacing: .08em; }
.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px)/2)); background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--green); color: var(--lime); display: grid; place-items: center; font-weight: 800; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
nav { display: flex; gap: 8px; }
.nav-link { border: 0; background: transparent; padding: 10px 14px; color: var(--muted); }
.nav-link:hover { color: var(--green); }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 58px; align-items: center; }
.hero-copy h1 { max-width: 720px; font-size: clamp(42px, 5.4vw, 72px); line-height: 1.03; letter-spacing: -.055em; margin: 18px 0 24px; }
.hero-copy > p { max-width: 650px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.eyebrow { color: var(--green); text-transform: uppercase; font-size: 12px; letter-spacing: .16em; font-weight: 800; }
.metric-row { display: flex; gap: 8px; margin-top: 36px; }
.metric-row div { min-width: 116px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.5); }
.metric-row strong, .metric-row span { display: block; }
.metric-row strong { font-size: 24px; color: var(--green); }
.metric-row span { color: var(--muted); font-size: 12px; margin-top: 5px; }
.card, .question-card, .progress-card, .report-paper { background: var(--paper); border: 1px solid rgba(216,226,220,.9); box-shadow: var(--shadow); border-radius: 24px; }
.form-card { padding: 28px; }
.card-heading { display: flex; gap: 14px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.card-heading h2, .card-heading p { margin: 0; }
.card-heading p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.step-pill { background: var(--lime); color: var(--green-dark); padding: 8px 10px; border-radius: 10px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 22px; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #425049; font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; color: var(--ink); padding: 10px 12px; outline: 0; transition: .2s; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(12,107,79,.1); }
.consent { display: flex; grid-template-columns: 18px 1fr; align-items: center; margin: 18px 0; font-weight: 500; line-height: 1.4; }
.consent input { min-height: auto; }
.primary-button, .secondary-button, .ghost-button, .danger-button { border-radius: 12px; min-height: 46px; padding: 0 18px; border: 1px solid transparent; font-weight: 750; }
.primary-button { background: var(--green); color: #fff; }
.primary-button:hover { background: var(--green-dark); }
.form-card > .primary-button { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.secondary-button { background: #fff; border-color: var(--line); color: var(--ink); }
.ghost-button { background: transparent; border-color: transparent; color: var(--green); }
.danger-button { background: #a74628; color: #fff; }
.error-message { color: #a03d22; min-height: 18px; font-size: 13px; margin-bottom: 0; }
.centered { text-align: center; }
.assessment-topline { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.assessment-topline h2 { margin: 7px 0 0; font-size: 28px; }
.save-status { display: flex; gap: 8px; color: var(--muted); align-items: center; font-size: 13px; }
.save-status span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #6bbb73; box-shadow: 0 0 0 5px rgba(107,187,115,.12); }
.progress-card { padding: 18px 22px; margin-bottom: 18px; box-shadow: none; }
.progress-copy { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
.progress-track { height: 6px; border-radius: 9px; background: #e9eee9; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #62a85a); transition: width .25s; }
.question-card { min-height: 390px; padding: clamp(28px, 5vw, 58px); display: grid; align-content: start; }
.question-number { width: 52px; height: 34px; border-radius: 20px; display: grid; place-items: center; background: #edf4ef; color: var(--green); font-weight: 800; font-size: 13px; }
.question-card h3 { font-size: clamp(22px, 3vw, 32px); line-height: 1.45; margin: 24px 0 30px; max-width: 900px; }
.option-list { display: grid; gap: 12px; }
.option-button { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; text-align: left; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); }
.option-button span:first-child { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #f0f3f1; color: var(--muted); font-weight: 800; }
.option-button:hover { border-color: #9bbbae; }
.option-button.selected { border-color: var(--green); background: #f0f8f3; box-shadow: 0 0 0 3px rgba(12,107,79,.08); }
.option-button.selected span:first-child { background: var(--green); color: #fff; }
.assessment-actions { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; }
.overview { margin-top: 18px; padding: 22px; display: flex; flex-wrap: wrap; gap: 7px; }
.overview button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.overview button.answered { background: #eaf5ee; border-color: #acd0ba; color: var(--green); font-weight: 700; }
.report-shell { max-width: 980px; }
.report-toolbar { display: flex; justify-content: space-between; margin-bottom: 16px; }
.report-paper { padding: 50px; border-radius: 4px; }
.report-header { display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: center; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.report-header h1 { margin: 5px 0 0; font-size: 30px; }
.pending-stamp { color: #b54e2c; border: 2px solid #b54e2c; padding: 8px 12px; transform: rotate(-4deg); font-weight: 900; letter-spacing: .12em; }
.report-notice { margin: 22px 0; background: #fff5e6; color: #754b16; border-left: 4px solid #d59637; padding: 13px 16px; font-size: 13px; }
.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.profile-grid div { background: #fff; padding: 14px; min-height: 72px; }
.profile-grid small, .profile-grid strong { display: block; }
.profile-grid small { color: var(--muted); margin-bottom: 7px; }
.report-section { margin-top: 38px; }
.section-title { display: flex; gap: 12px; align-items: center; }
.section-title span { color: var(--green); font-weight: 900; }
.section-title h2 { font-size: 20px; }
.section-lead { color: var(--muted); font-size: 13px; line-height: 1.7; }
.score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.score-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.score-item header { display: flex; justify-content: space-between; gap: 12px; }
.score-item small { color: var(--muted); }
.score-meter { height: 7px; background: #e9efeb; border-radius: 10px; overflow: hidden; margin-top: 12px; }
.score-meter i { display: block; height: 100%; background: var(--green); }
.validity-card { background: #f7f8f5; border-radius: 14px; padding: 20px; line-height: 1.7; }
.report-footer { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.admin-heading h1 { margin-bottom: 8px; }
.admin-heading p { color: var(--muted); }
.admin-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; padding: 20px; box-shadow: none; }
.table-wrap { overflow-x: auto; margin-top: 20px; box-shadow: none; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.empty { text-align: center; color: var(--muted); padding: 44px; }
.status-chip { display: inline-block; border-radius: 20px; padding: 5px 9px; background: #edf4ef; color: var(--green); font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #17382f; color: #fff; border-radius: 12px; padding: 12px 18px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .site-header { height: 66px; padding: 0 16px; }
  .brand small { display: none; }
  .brand strong { font-size: 14px; }
  nav .nav-link:first-child { display: none; }
  .shell { width: min(100% - 24px, 680px); padding: 32px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy h1 { font-size: 42px; }
  .metric-row { overflow-x: auto; }
  .form-card { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .assessment-topline { align-items: start; gap: 16px; }
  .save-status { font-size: 11px; }
  .question-card { min-height: 430px; padding: 24px 20px; }
  .question-card h3 { font-size: 23px; }
  .assessment-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ghost-button { order: 3; grid-column: 1 / -1; }
  .danger-button { grid-column: 1 / -1; }
  .report-paper { padding: 22px; }
  .report-header { grid-template-columns: 44px 1fr; }
  .pending-stamp { grid-column: 1 / -1; justify-self: end; }
  .profile-grid, .score-grid { grid-template-columns: 1fr; }
  .admin-controls { grid-template-columns: 1fr; }
}

@page { size: A4; margin: 12mm; }
@media print {
  body { background: #fff; }
  .test-banner, .site-header, .no-print { display: none !important; }
  .shell { width: 100%; margin: 0; padding: 0; }
  .report-paper { box-shadow: none; border: 0; padding: 0; }
  .score-item, .profile-grid, .validity-card { break-inside: avoid; }
  .report-section { break-inside: auto; }
}
