:root {
  font: 16px/1.55 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #202c49;
  background: #f2f5fc;
  --primary: #464cc4;
  --line: #dce4f2;
  --muted: #576783;
}
*, *::before, *::after { box-sizing: border-box; }
:root, dialog { touch-action: manipulation; }
body { display: flex; flex-direction: column; min-height: 100dvh; margin: 0; }
.top { display: grid; place-items: center; min-height: 48px; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 16px; font-weight: 700; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 100px; }
.card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 4vw, 32px); margin-bottom: 14px; box-shadow: 0 8px 32px #30477c0a; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { line-height: 1.23; font-size: clamp(28px, 6vw, 42px); }
h2 { font-size: 24px; }
h3 { margin-top: 18px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; background: var(--primary); color: #fff; min-height: 44px; padding: 9px 15px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; margin: 4px 8px 4px 0; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #7264d2; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
.secondary { background: #eef2fb; color: #374780; border-color: var(--line); }
progress { width: 100%; height: 13px; accent-color: var(--primary); }
.login { background: #f5f6fe; padding: 12px; border-radius: 12px; margin-top: 10px; }
.support { position: fixed; right: env(safe-area-inset-right, 0px); top: 54%; writing-mode: vertical-rl; min-height: 0; margin: 0; padding: 7px 4px; border-radius: 6px 0 0 6px; background: #17665d; font-size: 11px; font-weight: 500; line-height: 1.25; }
.status { position: fixed; z-index: 1; bottom: 65px; left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px); padding: 10px 14px; margin: auto; background: #222b4b; border-radius: 10px; color: #fff; }
.status:empty { display: none; }
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 24px; color: inherit; width: min(380px, 92vw); }
dialog::backdrop { background: #10173580; }
dialog button:not(.close), dialog a { display: flex; width: 100%; margin: 8px 0; }
.close { float: right; min-width: 44px; margin: -12px -12px 0 0; background: #eef2fb; color: #202c49; }
body:has(.in-quiz) { background: #fff; }
main.in-quiz { background: #fff; }
.quiz-card { --option-background: #edf3ff; --option-border: #dce7fa; }
.quiz-card[data-group="1"] { --option-background: #eaf6f0; --option-border: #d4ebe0; }
.quiz-card[data-group="2"] { --option-background: #f3effb; --option-border: #e9ddf6; }
.quiz-card[data-group="3"] { --option-background: #fbf1e7; --option-border: #f1e0ce; }
.quiz-card[data-group="4"] { --option-background: #eaf4fa; --option-border: #d7eaf5; }
.quiz-card { width: min(100%, 536px); margin: auto; }
.quiz-card h1 { font-size: 16px; margin: 18px 0 8px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 10px; padding: 0; list-style: none; }
.steps li { text-align: center; position: relative; display: grid; justify-items: center; gap: 5px; color: #626770; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 10px; left: calc(50% + 16px); width: calc(100% - 32px); height: 1px; background: #b0b2b7; }
.steps .reached { color: #4469bf; }
.step-number { display: grid; place-content: center; height: 22px; width: 22px; border: 1px solid #9298a3; border-radius: 50%; font-size: 12px; font-weight: 700; }
.reached .step-number { background: #527ad1; border-color: #527ad1; color: #fff; }
.step-label { font-size: clamp(10px, 2.75vw, 13px); font-weight: 600; white-space: nowrap; }
.group-progress { display: flex; align-items: center; gap: 8px; color: #4469bf; font-weight: 700; }
.group-progress progress { height: 8px; accent-color: #527ad1; }
.quiz-card canvas { display: block; }
.matrix { width: 100%; height: 162px; padding: 7px; object-fit: contain; margin-bottom: 18px; background: var(--option-background); border-radius: 10px; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 3vw, 20px); }
.quiz-options .option { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); align-items: center; justify-content: stretch; text-align: left; padding: 6px 12px; margin: 0; min-height: 66px; border: 1px solid var(--option-border); color: #35476b; background: var(--option-background); }
.option canvas { width: 100%; height: 54px; object-fit: contain; pointer-events: none; }
.option[aria-pressed="true"] { background: #b5cbfa; border-color: #6287da; color: #15274a; opacity: 1; }

#lookup-form label { display: block; font-size: 14px; font-weight: 650; }
#order-id { width: 100%; padding: 10px; margin: 7px 0; border-radius: 8px; border: 1px solid var(--line); font: inherit; }

@media (max-width: 600px) {
  main.in-quiz { padding-inline: 24px; }
}

main:has(> .assessment-report-reference, > #preview, > #full-report) { padding-inline: 0; }
main:has(> .assessment-report-reference, > #preview) > .card { margin-inline: 12px; }
#preview[hidden] { display: none; }

.site-filing { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); text-align: center; font-size: 12px; }
.site-filing a { color: var(--muted); }
