:root {
  --ink: #14243a;
  --muted: #607086;
  --line: #dce5ef;
  --soft: #f4f8fc;
  --brand: #0b5da8;
  --brand-dark: #073f73;
  --accent: #15a3a3;
  --danger: #ad2d2d;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(22, 49, 82, 0.12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #eef4f9;
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, #edf5fb 0, #f8fbfd 45%, #eef4f9 100%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 50px; }
.hero { background: radial-gradient(circle at top right, rgba(72, 200, 207, .32), transparent 38%), linear-gradient(135deg, #083d6e, #0b67ad); color: white; border-radius: 24px; padding: 34px; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; box-shadow: var(--shadow); }
.hero h1 { margin: 5px 0 10px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.04em; }
.hero-copy { max-width: 760px; margin: 0; line-height: 1.75; color: rgba(255,255,255,.9); }
.eyebrow { margin: 0; letter-spacing: .16em; font-size: .78rem; font-weight: 800; opacity: .82; }
.hero-badge { white-space: nowrap; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); padding: 10px 14px; border-radius: 999px; font-size: .9rem; }
.notice { margin: 18px 0; padding: 15px 18px; background: #fff9e8; border: 1px solid #f0dda8; border-radius: 14px; line-height: 1.65; color: #654d12; }
.progress-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 8px 24px rgba(22,49,82,.06); }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.progress-track { height: 9px; background: #e8eff5; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 16.666%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: inherit; transition: width .25s ease; }
form { margin-top: 18px; background: white; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.step { display: none; }
.step.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-heading { display: flex; gap: 15px; align-items: flex-start; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 5px; font-size: 1.45rem; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.step-number { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; background: #e8f4fe; color: var(--brand); font-weight: 900; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
label { display: block; font-size: .94rem; font-weight: 700; color: #263a52; }
input, select, textarea { width: 100%; margin-top: 8px; border: 1px solid #cdd9e5; border-radius: 11px; padding: 12px 13px; background: #fff; color: var(--ink); outline: none; transition: border .15s ease, box-shadow .15s ease; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: #58a7dd; box-shadow: 0 0 0 4px rgba(66, 153, 212, .13); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(173,45,45,.1); }
.required, .consent-box b { color: var(--danger); }
.step > label, fieldset, .table-card, .consent-box { margin-top: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
legend { padding: 0 7px; font-size: .94rem; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.choice-grid label { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: var(--soft); border-radius: 10px; font-weight: 600; }
.choice-grid input { width: auto; margin: 0; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.action-right { display: flex; gap: 10px; }
button { border: 0; border-radius: 11px; padding: 11px 17px; font-weight: 800; }
button.primary { background: linear-gradient(135deg, var(--brand), #168bbd); color: white; box-shadow: 0 8px 18px rgba(11,93,168,.22); }
button.primary:hover { background: var(--brand-dark); }
button.secondary { background: #edf4f9; color: #21425f; }
button.ghost { background: transparent; color: var(--brand); border: 1px solid #bdd3e6; }
button.small { padding: 8px 11px; font-size: .86rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
.hidden { display: none !important; }
.error-box { margin-top: 15px; background: #fff0f0; border: 1px solid #efb7b7; color: #842323; padding: 13px 15px; border-radius: 11px; line-height: 1.55; }
.table-card { border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: #fbfdff; }
.table-head, .school-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.table-head h3 { margin: 0; }
.school-rows { display: grid; gap: 14px; margin-top: 14px; }
.school-row { padding: 16px; border: 1px solid #d4e1ec; background: white; border-radius: 14px; }
.school-row .grid { margin-top: 12px; }
.school-row > label { margin-top: 12px; }
.remove-school { padding: 5px 8px; background: transparent; color: #a33b3b; font-size: .84rem; }
.consent-box { background: #f5f9fc; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.check-line { display: flex; align-items: flex-start; gap: 11px; font-weight: 600; line-height: 1.55; }
.check-line + .check-line { margin-top: 12px; }
.check-line input { width: auto; margin: 4px 0 0; }
.honeypot { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; overflow: hidden; }
.result-card { margin-top: 20px; background: white; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.spinner { width: 46px; height: 46px; border: 5px solid #dceaf4; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
.result-header h2 { margin: 5px 0; }
.result-header p { color: var(--muted); }
.score-ring { width: 108px; height: 108px; flex: 0 0 auto; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--accent) 0deg, var(--brand) 260deg, #e8eff5 260deg); border: 8px solid #fff; box-shadow: 0 0 0 1px #dce5ef, 0 8px 20px rgba(22,49,82,.13); }
.score-ring strong { font-size: 1.8rem; line-height: 1; color: white; text-shadow: 0 1px 4px rgba(0,0,0,.2); }
.score-ring span { font-size: .75rem; color: white; font-weight: 800; }
.report-section { margin: 22px 0; }
.report-section h3 { font-size: 1.1rem; margin: 0 0 10px; color: #123d62; }
.report-section p { line-height: 1.75; }
.report-section ul { margin: 9px 0 0; padding-left: 20px; line-height: 1.7; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.report-box { border: 1px solid var(--line); background: #f9fcfe; border-radius: 14px; padding: 16px; }
.report-box h4 { margin: 0 0 8px; }
.school-review { border-left: 4px solid var(--brand); padding: 13px 15px; margin: 10px 0; background: #f6faff; border-radius: 0 12px 12px 0; }
.timeline-item { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-period { font-weight: 900; color: var(--brand); }
.priority-pill { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: white; font-weight: 900; margin-right: 7px; }
.result-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 0 0; }
@media (max-width: 760px) {
  .app-shell { width: min(100% - 18px, 1120px); padding-top: 10px; }
  .hero { padding: 23px; border-radius: 18px; flex-direction: column; }
  form, .result-card { padding: 20px 16px; border-radius: 18px; }
  .grid.two, .report-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-actions, .result-header { align-items: stretch; }
  .form-actions { flex-direction: column-reverse; }
  .action-right { display: grid; grid-template-columns: 1fr 1fr; }
  .action-right .primary:last-child { grid-column: 1 / -1; }
  #prevBtn { width: 100%; }
  .timeline-item { grid-template-columns: 1fr; gap: 5px; }
  .score-ring { width: 88px; height: 88px; }
}
@media print {
  body { background: white; }
  .hero, .notice, .progress-card, form, footer, .result-actions { display: none !important; }
  .app-shell { width: 100%; padding: 0; }
  .result-card { box-shadow: none; border: 0; margin: 0; padding: 0; }
}
.success-mark { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: #e7f7ee; color: #187653; font-size: 2rem; font-weight: 900; margin-bottom: 14px; }
#successPanel h2 { margin: 6px 0 10px; }
#successPanel > p { line-height: 1.7; }
.submission-meta { color: var(--muted); font-size: .9rem; word-break: break-all; }
