/* Ice-blue A: a quiet text zone, a decorative track, and clear score hierarchy. */
:root {
  --paper:#edf5fe; --white:#fff; --ink:#142746; --muted:#536984;
  --line:#dce8f6; --blue:#0071e3; --blue-soft:#e6f2ff; --green:#087e55; --orange:#bc553d;
  --radius:20px; --numeric:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  --shadow:0 6px 28px rgb(45 93 153 / 4%); --header-height:76px; color-scheme:light;
}
* { box-sizing:border-box; }
html { scroll-padding-top:0; }
body { margin:0; background:var(--paper); color:var(--ink); font:15px/1.65 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; -webkit-font-smoothing:antialiased; }
[hidden] { display:none!important; }
button,input,select { font:inherit; }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
button { min-height:44px; padding:10px 18px; border:1px solid var(--line); border-radius:11px; background:var(--white); color:var(--ink); font-weight:600; cursor:pointer; transition:background-color .16s,border-color .16s,box-shadow .16s; }
button:hover { background:#f1f7ff; border-color:#b8d2f0; }
button:disabled { opacity:.58; cursor:wait; }
button.is-loading::after { display:inline-block; flex:0 0 12px; width:12px; height:12px; margin-left:8px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; vertical-align:middle; animation:button-loading .65s linear infinite; content:""; }
@keyframes button-loading { to { transform:rotate(360deg); } }
a { color:var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #2587e9; outline-offset:3px; }
input,select { width:100%; min-width:0; min-height:50px; padding:12px 14px; border:1px solid #bed2e9; border-radius:11px; background:var(--white); color:var(--ink); font-size:16px; }
input:focus,select:focus { outline:3px solid #c7e3ff; border-color:var(--blue); }
input::placeholder { color:#6e829b; font-weight:400; }
input[aria-invalid="true"],select[aria-invalid="true"] { border-color:#bd4639; }
label { display:block; font-size:14px; font-weight:600; }
label>input,label>select { display:block; margin-top:9px; }
small,.hint { color:var(--muted); font-size:12px; font-weight:400; }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { line-height:1.3; }
h1 { margin-bottom:12px; font-size:42px; font-weight:750; letter-spacing:-1.3px; }
h2 { margin-bottom:14px; font-size:20px; font-weight:650; }
p { margin-bottom:12px; }
.primary { min-height:50px; border-color:var(--blue); background:var(--blue); color:#fff; font-weight:650; }
.primary:hover { border-color:#005fc3; background:#005fc3; }
.primary:disabled { background:var(--blue); color:#fff; }
.quiet { background:var(--white); font-weight:500; }
.text-button { border-color:transparent; background:transparent; color:var(--muted); font-weight:500; }
.text-button:hover { border-color:transparent; background:var(--blue-soft); color:var(--blue); }
.icon-button { display:grid; place-items:center; width:44px; height:44px; min-height:44px; padding:0; border:0; background:transparent; color:var(--muted); font-size:27px; }
.skip-link { position:absolute; top:-70px; left:16px; z-index:100; padding:12px 18px; border-radius:8px; background:#fff; }
.skip-link:focus { top:8px; }

/* Navigation represents the two existing student tools. */
.topbar { position:sticky; top:0; z-index:60; display:flex; align-items:center; gap:28px; min-height:var(--header-height); padding:12px max(28px,calc((100vw - 1320px)/2)); border-bottom:1px solid #e4edf8; background:#fff; }
.brand { display:flex; align-items:center; flex-shrink:0; gap:11px; color:var(--ink); }
.brand:hover { text-decoration:none; }
.brand-symbol { display:grid; place-items:center; width:36px; height:36px; border-radius:11px; background:var(--blue-soft); color:var(--blue); font-size:27px; font-style:normal; font-weight:500; line-height:1; }
.brand-title { font-size:25px; font-weight:750; letter-spacing:-.8px; line-height:1.1; }
.brand-title small { display:block; margin-top:5px; color:var(--muted); font-size:11px; font-weight:400; letter-spacing:0; }
.header-context { padding-left:24px; border-left:1px solid var(--line); color:var(--muted); font-size:13px; }
.header-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.header-actions>button { font-size:13px; }
#account { display:flex; align-items:center; gap:12px; font-size:13px; }
#account-name { max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar>#account { margin-left:auto; }
main { width:100%; max-width:1376px; margin:auto; padding:24px 28px 56px; }
#main-content,.score-report,.history-panel { scroll-margin-top:calc(var(--header-height) + 12px); }
#result-pane { scroll-margin-top:var(--header-height); }
.tool-switch { display:flex; align-items:center; gap:14px; margin-bottom:22px; }
.tool-switch button { display:flex; align-items:center; gap:9px; padding:11px 21px; border:0; background:transparent; color:var(--muted); font-size:15px; font-weight:600; }
.tool-switch button>span { font-size:21px; font-weight:500; line-height:1; }
.tool-switch button small { padding:2px 7px; border-radius:5px; background:#dfeaf7; color:#526885; font-size:11px; }
.tool-switch button[aria-pressed="true"] { background:#fff; color:var(--blue); box-shadow:var(--shadow); }
.tool-switch button[aria-pressed="true"] small { background:var(--blue-soft); color:#005fbf; }
.nav-caption { margin-left:auto; color:var(--muted); font-size:12px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:26px; }
.eyebrow { margin-bottom:9px; color:#0068d1; font-size:12px; font-weight:650; letter-spacing:.5px; }
.page-description { margin:0; color:var(--muted); font-size:15px; line-height:1.8; }
.scope-label { color:var(--green); font-size:12px; white-space:nowrap; }
.scope-label::before { display:inline-block; width:6px; height:6px; margin-right:8px; border-radius:50%; background:currentColor; content:""; }

/* A masked track stays in the right of the hero, behind all real content. */
.ice-hero { position:relative; isolation:isolate; min-height:220px; padding:31px 36px; overflow:hidden; border:1px solid #dcecff; border-radius:22px; background:linear-gradient(115deg,#e3f2ff 0%,#d9ecff 47%,#cbe5ff 100%); }
.ice-hero::before { position:absolute; z-index:-1; top:-14px; right:-78px; bottom:-72px; width:57%; background:url("/track-lanes.svg") center right/cover no-repeat; opacity:.94; -webkit-mask-image:linear-gradient(to right,transparent 0%,#000 42%); mask-image:linear-gradient(to right,transparent 0%,#000 42%); pointer-events:none; content:""; }
.ice-hero>* { position:relative; z-index:1; }
.page-heading.ice-hero { align-items:flex-start; justify-content:flex-start; }
.page-heading.ice-hero>div:first-child { max-width:76%; }
.page-heading.ice-hero h1 { max-width:860px; font-size:clamp(32px,3.3vw,48px); letter-spacing:-1.6px; }
.page-heading.ice-hero .page-description { max-width:700px; color:#405c7d; }
.page-heading.ice-hero>.scope-label,.page-heading.ice-hero>.quota { position:absolute; right:30px; bottom:24px; }
.page-heading.ice-hero>.scope-label { padding:8px 12px; border:1px solid #d4e7f9; border-radius:9px; background:rgb(255 255 255 / 90%); }
.panel { padding:28px; border:1px solid #e0eaf6; border-radius:var(--radius); background:var(--white); box-shadow:var(--shadow); }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:23px; }
.panel-heading h2 { margin:0; }
.panel-heading>span { color:var(--muted); font-size:12px; }

/* Physical-score calculation and all placeholder/result states. */
.calculator-layout { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(310px,1fr); align-items:stretch; gap:22px; }
.score-entry,.score-report { padding:30px; }
.sex-options { display:flex; align-items:center; gap:20px; margin:0 0 24px; padding:0; border:0; }
.sex-options legend { margin-bottom:10px; color:var(--muted); font-size:13px; font-weight:500; }
.sex-options>div { display:flex; gap:8px; }
.sex-options label { position:relative; margin:0; }
.sex-options input { position:absolute; width:1px; height:1px; min-height:0; opacity:0; }
.sex-options label span { display:grid; place-items:center; min-width:94px; min-height:44px; padding:8px 24px; border:1px solid var(--line); border-radius:10px; font-size:14px; cursor:pointer; }
.sex-options input:checked+span { border-color:#b2d7ff; background:var(--blue-soft); color:#0066ce; }
.sex-options input:focus-visible+span { outline:3px solid #2587e9; outline-offset:3px; }
.physical-inputs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.event-field { padding:18px 14px; border:1px solid #dce9f7; border-radius:14px; background:#f5f9ff; }
.event-title { display:flex; align-items:center; gap:10px; min-height:56px; }
.event-icon { display:grid; place-items:center; flex-shrink:0; width:30px; height:30px; border-radius:9px; background:#e3f0ff; color:var(--blue); font-size:21px; font-weight:400; }
.event-title>span:last-child { font-size:15px; }
.event-title small { display:block; margin-top:3px; font-size:12px; }
.input-unit { position:relative; display:block; margin-top:14px; }
.input-unit input { height:56px; padding-right:40px; font-family:var(--numeric); font-size:24px; font-weight:600; font-variant-numeric:tabular-nums; line-height:1.2; }
.input-unit>span { position:absolute; top:50%; right:13px; transform:translateY(-50%); color:var(--muted); font-size:12px; font-weight:400; pointer-events:none; }
.form-action { display:flex; align-items:center; gap:18px; margin-top:25px; }
.physical-submit { display:flex; align-items:center; justify-content:space-between; gap:28px; min-width:205px; }
.form-action>span { color:var(--muted); font-size:12px; }
.field-error { margin:12px 0 0; color:#b43b31; font-size:13px; }
.field-error:empty { display:none; }
.scoring-note { margin-top:25px; padding-top:17px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.scoring-note summary { min-height:44px; padding:9px 0; font-weight:400; cursor:pointer; }
.scoring-note p { margin:7px 0 0; line-height:1.85; }
.score-report { display:flex; flex-direction:column; border-color:#d8eaff; background:linear-gradient(160deg,#fff 0%,#eaf4ff 100%); }
.score-report .panel-heading { margin-bottom:18px; }
.status-dot { color:#0066ce!important; font-size:11px!important; }
.score-total-placeholder { margin:12px 0; color:#88a9d1; font-family:var(--numeric); font-size:72px; line-height:1.2; }
.score-total-placeholder>span { margin-left:12px; color:var(--muted); font-size:13px; }
#physical-placeholder>p { color:var(--muted); font-size:13px; line-height:1.9; }
.empty-score-lines { display:grid; gap:9px; margin-top:22px; padding-top:15px; border-top:1px solid #d6e4f4; }
.empty-score-lines>span { display:flex; justify-content:space-between; color:var(--muted); font-size:13px; }
.empty-score-lines b { font-weight:500; }
#physical-result .physical-total>span { color:var(--muted); font-size:13px; }
.physical-total>div { display:flex; align-items:baseline; gap:9px; margin:4px 0 17px; }
.physical-total strong { color:var(--blue); font:700 70px/1.2 var(--numeric); font-variant-numeric:tabular-nums; letter-spacing:-2.5px; }
.physical-total>div>span { color:var(--muted); font-size:13px; }
.physical-scores { display:grid; gap:10px; margin-bottom:16px; padding:17px 0; border-top:1px solid #d6e4f4; }
.physical-scores>div { display:flex; justify-content:space-between; color:var(--muted); font-size:13px; }
.physical-scores strong { color:var(--ink); font:600 16px/1.5 var(--numeric); font-variant-numeric:tabular-nums; }
#use-physical-score { display:flex; align-items:center; justify-content:space-between; width:100%; font-size:14px; }
#physical-result>.hint { margin:12px 0 0; text-align:center; font-size:12px; }
.next-step { display:flex; align-items:center; gap:16px; margin-top:18px; padding:20px 6px; }
.next-step-icon { display:grid; place-items:center; flex-shrink:0; width:40px; height:40px; border-radius:50%; background:#dfecfb; color:#536e91; font-size:23px; }
.next-step strong { font-size:14px; font-weight:600; }
.next-step p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.next-step button { margin-left:auto; font-size:13px; }

/* Query form and history, including the compact result-state form. */
.query-layout { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(310px,1fr); align-items:start; gap:22px; }
.query-entry .panel-heading { margin-bottom:22px; }
.query-grid { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.query-grid .subject-select { display:flex; grid-column:1/-1; align-items:center; gap:18px; }
.subject-select select { max-width:240px; margin:0; }
.query-grid .input-unit { margin-top:9px; }
.query-grid .input-unit input { padding-right:64px; }
.full { grid-column:1/-1; }
.query-action { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin-top:4px; padding-top:20px; border-top:1px solid var(--line); }
.query-action>.primary { min-width:235px; }
.query-action>span { width:100%; color:var(--muted); font-size:12px; }
#fresh-query { padding:8px 0; font-size:13px; }
#expiry { margin:12px 0 0; }
#expiry:empty { display:none; }
.quota { display:flex; align-items:baseline; gap:7px; padding:10px 16px; border:1px solid #d6e6f9; border-radius:12px; background:#fff; color:var(--muted); font-size:12px; white-space:nowrap; }
.quota strong { color:var(--blue); font:600 30px/1.2 var(--numeric); font-variant-numeric:tabular-nums; }
.query-guide { padding:22px 18px 8px; }
.query-guide h2 { font-size:17px; }
.query-guide ol { margin:21px 0 0; padding:0; list-style:none; counter-reset:guide; }
.query-guide li { position:relative; padding:0 0 23px 37px; counter-increment:guide; }
.query-guide li::before { position:absolute; top:0; left:0; display:grid; place-items:center; width:25px; height:25px; border:1px solid #b7d3f2; border-radius:50%; color:#0066ce; font:600 12px var(--numeric); content:counter(guide); }
.query-guide li:not(:last-child)::after { position:absolute; top:31px; bottom:7px; left:12px; width:1px; background:#d1e2f6; content:""; }
.query-guide strong { display:block; font-size:14px; font-weight:600; }
.query-guide span { display:block; margin-top:5px; color:var(--muted); font-size:13px; line-height:1.8; }
.activation-notice { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; padding:18px 22px; border:1px solid #cbe2fb; border-radius:15px; background:#e7f3ff; font-size:14px; }
.activation-notice p { margin:4px 0 0; color:#496685; font-size:12px; }
.activation-notice button { white-space:nowrap; }
.activation-notice-actions { display:flex; align-items:center; flex-shrink:0; gap:8px; }
.activation-notice-actions .primary { min-height:44px; }
.history-panel { margin-top:22px; padding:13px 24px; }
.history-panel>summary { min-height:44px; padding:10px 0; color:var(--ink); font-size:14px; font-weight:600; cursor:pointer; }
.history-panel>summary span { margin-left:10px; color:var(--green); font-size:12px; font-weight:400; }
.history-panel>.hint { margin:12px 0 4px; }
.history-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:15px 0; border-top:1px solid var(--line); }
.history-row:first-child { margin-top:12px; }
.history-row>div { min-width:0; }
.history-row strong { display:block; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.history-row small { display:block; margin-top:4px; font-size:12px; }
.history-row button { flex-shrink:0; font-size:13px; font-weight:500; white-space:nowrap; }
.history-row button[aria-current="true"] { border-color:#9ac9fb; background:var(--blue-soft); color:#0066ce; }
.query-empty { display:flex; align-items:center; justify-content:center; gap:20px; margin-top:26px; padding:36px 20px; color:var(--muted); }
.query-empty>span { color:#7199c6; font-size:38px; }
.query-empty h2 { margin:0 0 6px; color:var(--ink); font-size:16px; }
.query-empty p { margin:0; font-size:13px; }
.has-results .query-guide { display:none; }
.has-results .query-layout { display:block; }
.has-results .query-grid { grid-template-columns:180px 1fr 1fr minmax(235px,1fr); align-items:end; gap:18px; }
.has-results .subject-select { display:block; grid-column:auto; }
.has-results .subject-select select { max-width:none; height:56px; margin-top:9px; }
.has-results .query-action { grid-column:auto; margin:0; padding:0; border:0; }
.has-results .query-action .primary { width:100%; min-width:0; }
.has-results .query-action>span { font-size:11px; }
.has-results .query-entry .panel-heading { margin-bottom:18px; }
.has-results #fresh-query { min-height:44px; padding:7px 0; }

/* Result summary matches the selected reference; data remains in the iframe. */
.result-topline { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:28px 0 18px; }
.result-topline h2 { margin:0; font-size:28px; }
.result-topline>a { display:inline-flex; align-items:center; min-height:44px; font-size:13px; white-space:nowrap; }
.result-topline.ice-hero { align-items:flex-start; min-height:242px; padding:20px 36px; }
.result-topline.ice-hero .eyebrow { margin-bottom:4px; }
.result-topline.ice-hero>div:first-child { max-width:76%; }
.result-topline.ice-hero h2 { font-size:clamp(32px,3.3vw,48px); font-weight:750; line-height:1.15; letter-spacing:-1.5px; }
.result-topline.ice-hero>a { position:absolute; right:28px; bottom:22px; padding:5px 12px; border:1px solid #d2e5f8; border-radius:9px; background:rgb(255 255 255 / 94%); }
.result-subject { display:inline-flex; align-items:center; padding:3px 10px; border:1px solid #bcddff; border-radius:8px; background:#cde7ff; color:#005ebf; font-size:14px; font-weight:600; line-height:1.5; }
#current-result-context { max-width:760px; margin:7px 0 0; color:#496482; font-size:12px; line-height:1.7; }
.result-topline.ice-hero #current-result-context { margin-top:4px; }
.result-score-summary { display:flex; flex-wrap:wrap; align-items:start; gap:30px; margin-top:16px; }
.result-topline.ice-hero .result-score-summary { margin-top:10px; }
.result-score-summary>div,.result-score-summary>p { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 8px; min-width:156px; margin:0; }
.result-score-summary>div>p { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; margin:0; }
.result-score-summary>:not(:first-child) { padding-left:30px; border-left:1px solid #bcdaf7; }
.result-score-summary span { width:100%; color:var(--ink); font-size:14px; }
.result-score-summary strong { display:block; min-width:0; max-width:100%; overflow-wrap:anywhere; color:var(--blue); font:700 54px/1.15 var(--numeric); font-variant-numeric:tabular-nums; letter-spacing:-1.6px; }
.result-score-summary small { flex-shrink:0; color:var(--ink); font-size:14px; }
iframe { display:block; width:100%; height:600px; border:0; background:transparent; }
#sticky-methods { position:sticky; top:calc(var(--header-height) + 8px); z-index:20; display:flex; gap:4px; margin-bottom:16px; padding:6px; overflow-x:auto; border:1px solid #d5e6f9; border-radius:13px; background:#fff; box-shadow:0 3px 14px rgb(34 87 146 / 6%); }
#sticky-methods button { flex:1; padding:10px 13px; border:0; border-radius:9px; color:#31577e; font-size:14px; font-weight:500; white-space:nowrap; }
#sticky-methods button[aria-current="true"] { background:var(--blue); color:#fff; }

/* Feedback and account dialogs. Hidden states remain authoritative. */
#message:empty,#auth-feedback:empty,#activation-feedback:empty { display:none; }
#message,#auth-feedback,#activation-feedback { margin:0 0 20px; padding:12px 16px; border-radius:11px; font-size:13px; overflow-wrap:anywhere; }
.success { border:1px solid #bfe6d5; background:#eaf8f1; color:#087347; }
.error { border:1px solid #f1cbc5; background:#fff1ef; color:#a63830; }
.auth-open,.activation-open { overflow:hidden; }
.auth-overlay,.activation-overlay { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; overflow:auto; overscroll-behavior:contain; background:rgb(20 39 70 / 34%); backdrop-filter:blur(5px); }
.auth-overlay { z-index:80; }
.activation-overlay { z-index:90; }
.auth-card { position:relative; width:460px; max-width:100%; max-height:calc(100vh - 48px); max-height:calc(100dvh - 48px); padding:32px; overflow:auto; box-shadow:0 24px 90px rgb(19 46 80 / 18%); }
.auth-card>.icon-button { position:absolute; top:12px; right:12px; }
.auth-symbol { display:grid; place-items:center; width:44px; height:44px; margin-bottom:20px; border-radius:13px; background:var(--blue-soft); color:var(--blue); font-size:29px; }
.auth-card>h2 { margin-bottom:9px; font-size:27px; font-weight:700; letter-spacing:-.5px; }
.auth-card>.hint { margin-bottom:23px; font-size:13px; }
.tabs { display:flex; gap:25px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.tabs button { min-height:48px; padding:9px 0 13px; border:0; border-radius:0; background:transparent; color:var(--muted); font-size:15px; }
.tabs button[aria-pressed="true"] { color:#0066ce; box-shadow:0 2px var(--blue); }
.auth-card form label,.auth-layout form label,#manage-form label { margin:17px 0; }
.auth-card form .primary,.auth-layout form .primary { width:100%; margin-top:8px; }
.auth-card form>.hint { margin:16px 0 0; font-size:12px; line-height:1.85; }
.auth-card label small { display:block; margin-top:7px; font-size:12px; }
.register-notice { padding:14px 15px; border:1px solid #d3e8ff; border-radius:11px; background:var(--blue-soft); color:var(--ink); font-size:13px; }
.register-notice strong { display:block; font-weight:600; }
.register-notice span { display:block; margin-top:4px; color:var(--muted); font-size:12px; }

/* Free activation keeps the account, scores, and contact QR together. */
.activation-card { position:relative; width:780px; max-width:100%; max-height:calc(100vh - 48px); max-height:calc(100dvh - 48px); padding:32px; overflow:auto; overscroll-behavior:contain; border:1px solid var(--line); border-radius:22px; background:#fff; box-shadow:0 24px 90px rgb(19 46 80 / 18%); }
.activation-card>.icon-button { position:absolute; top:12px; right:12px; }
.activation-heading { padding-right:34px; }
.activation-free-label { display:inline-flex; align-items:center; gap:7px; margin-bottom:12px; color:var(--green); font-size:12px; font-weight:600; }
.activation-free-label::before { width:6px; height:6px; border-radius:50%; background:currentColor; content:""; }
.activation-heading h2 { margin:0 0 11px; font-size:30px; font-weight:750; letter-spacing:-.7px; }
.activation-heading p { margin:0; color:var(--muted); font-size:14px; line-height:1.8; }
.activation-steps { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; margin:24px 0 0; padding:25px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); list-style:none; }
.activation-steps>li { min-width:0; }
.activation-step-heading { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.activation-step-heading>span { display:grid; place-items:center; flex-shrink:0; width:27px; height:27px; border-radius:50%; background:var(--blue-soft); color:#0066ce; font:600 13px/1 var(--numeric); }
.activation-step-heading h3 { margin:0; font-size:16px; font-weight:650; }
.activation-account-step>label { margin-bottom:8px; color:var(--muted); font-size:13px; font-weight:500; }
.activation-account-row { display:flex; align-items:stretch; gap:8px; }
.activation-account-row input { flex:1; width:0; min-height:48px; padding:11px 12px; border-color:#c6def9; background:#f1f7ff; font-size:16px; }
.activation-account-row button { flex-shrink:0; padding:10px 12px; border-color:#c6def9; color:#0066ce; font-size:13px; }
.activation-help { margin:12px 0 0; color:var(--muted); font-size:12px; line-height:1.85; overflow-wrap:anywhere; }
.activation-score-note { margin-top:24px; padding:16px; border:1px solid #d5e7fb; border-radius:12px; background:#edf6ff; }
.activation-score-note>span { color:var(--muted); font-size:12px; }
.activation-score-note p { margin:8px 0; font-size:14px; font-weight:600; line-height:1.8; overflow-wrap:anywhere; }
.activation-score-note small { display:block; font-size:12px; line-height:1.8; }
.activation-contact-step { padding-left:27px; border-left:1px solid var(--line); }
.activation-qr { margin:0; text-align:center; }
.activation-qr img { display:block; width:100%; max-width:222px; height:auto; margin:0 auto; border-radius:8px; background:#fff; }
.activation-qr figcaption { margin-top:11px; color:var(--ink); font-size:13px; }
.activation-image-actions { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:6px; }
.activation-image-actions a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:6px 3px; font-size:12px; }
.activation-phone-help { margin-top:2px; font-size:12px; }
#activation-feedback { margin:18px 0 0; }
.activation-actions { display:flex; align-items:center; gap:12px; padding-top:22px; }
.activation-actions>.primary { flex:1; font-size:14px; }
.activation-actions>.text-button { min-height:50px; font-size:13px; }

/* Legal and administrator pages keep their existing layout and controls. */
footer { display:flex; align-items:center; flex-wrap:wrap; gap:12px 24px; max-width:1320px; margin:0 auto; padding:22px 0 30px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
footer>span:nth-child(2) { margin-right:auto; }
footer a { display:inline-flex; align-items:center; min-height:44px; color:var(--muted); }
.auth-layout { display:grid; grid-template-columns:1fr 420px; align-items:center; gap:70px; min-height:70vh; }
.intro h1 { font-size:42px; }
.intro>p:not(.eyebrow) { max-width:500px; color:var(--muted); }
.admission-lanes { display:grid; gap:12px; max-width:430px; margin:25px 0; }
.admission-lanes>div { display:flex; justify-content:space-between; gap:16px; padding:8px 0; border-bottom:1px solid var(--line); }
.admission-lanes b { color:var(--muted); font-size:12px; font-weight:400; }
.intro-foot { font-size:12px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:6px 0 25px; }
.section-heading h1 { margin:5px 0; font-size:30px; }
.admin-grid { display:grid; grid-template-columns:1fr 1.4fr; align-items:start; gap:24px; }
.admin-grid .panel { margin-bottom:24px; }
.admin-grid+.panel,#admin>details { margin-bottom:18px; }
summary { min-height:44px; padding:8px 0; cursor:pointer; }
.table-scroll { overflow-x:auto; }
table { width:100%; margin:15px 0; border-collapse:collapse; font-size:13px; }
td,th { padding:12px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; overflow-wrap:anywhere; }
th { background:#f0f7ff; color:var(--muted); font-weight:500; white-space:nowrap; }
.legal-page { max-width:900px; }
.legal-card h1 { font-size:32px; }
.legal-card h2 { margin:28px 0 10px; }
.legal-card p,.legal-card li { color:#475f7c; line-height:1.9; }

@media (max-width:1100px) {
  .header-context { display:none; }
  .calculator-layout,.query-layout { grid-template-columns:minmax(0,1.65fr) minmax(290px,1fr); }
  .score-entry,.score-report { padding:25px; }
  .physical-inputs { gap:10px; }
  .event-field { padding:16px 10px; }
  .event-icon { display:none; }
  .input-unit input { font-size:22px; }
  .form-action>span { max-width:160px; }
  .has-results .query-grid { grid-template-columns:160px 1fr 1fr; }
  .has-results .query-action { grid-column:1/-1; }
  .has-results .query-action>.primary { width:auto; min-width:235px; }
  .has-results .query-action>span { width:auto; }
  .auth-layout { gap:32px; }
  footer { margin-right:28px; margin-left:28px; }
}
@media (max-width:760px) {
  :root { --header-height:70px; }
  .topbar { gap:12px; min-height:70px; padding:12px 18px; }
  .brand { gap:8px; }
  .brand-title { font-size:22px; }
  .brand-title small { font-size:10px; }
  .brand-symbol { width:32px; height:32px; font-size:24px; }
  .header-actions { gap:3px; }
  .header-actions>button { min-height:44px; padding:8px 9px; font-size:12px; }
  #account { gap:0; }
  #account-name { display:none; }
  #account button { min-height:44px; padding:8px; font-size:12px; }
  main { padding:18px 16px 36px; }
  .tool-switch { gap:7px; margin-bottom:18px; }
  .tool-switch button { gap:7px; padding:11px 16px; font-size:14px; }
  .nav-caption { display:none; }
  .page-heading { display:block; margin-bottom:18px; }
  .page-heading h1 { font-size:30px; letter-spacing:-.9px; }
  .page-description { font-size:13px; line-height:1.8; }
  .scope-label { display:inline-block; margin-top:12px; font-size:12px; }
  .eyebrow { margin-bottom:8px; font-size:11px; }
  .ice-hero { min-height:204px; padding:25px 22px; border-radius:18px; }
  .ice-hero::before { top:33%; right:-98px; bottom:-86px; width:68%; opacity:.38; }
  .page-heading.ice-hero>div:first-child,.result-topline.ice-hero>div:first-child { max-width:100%; }
  .page-heading.ice-hero h1 { max-width:520px; font-size:31px; letter-spacing:-1px; }
  .page-heading.ice-hero .page-description { max-width:480px; font-size:13px; }
  .page-heading.ice-hero>.scope-label,.page-heading.ice-hero>.quota { position:relative; right:auto; bottom:auto; margin-top:14px; }
  .page-heading.ice-hero>.scope-label { padding:4px 9px; }
  .calculator-layout,.query-layout { grid-template-columns:1fr; gap:16px; }
  .panel,.score-entry,.score-report { padding:22px; border-radius:18px; }
  .panel-heading { margin-bottom:20px; }
  .panel-heading h2 { font-size:18px; }
  .panel-heading>span { font-size:11px; }
  .sex-options { margin-bottom:20px; }
  .physical-inputs { grid-template-columns:1fr; gap:11px; }
  .event-field { display:grid; grid-template-columns:1fr 140px; align-items:center; padding:12px 14px; }
  .event-title { gap:8px; min-height:44px; }
  .event-icon { display:grid; width:28px; height:28px; }
  .event-title>span:last-child { font-size:14px; }
  .event-title small { font-size:11px; }
  .event-field .input-unit { margin:0; }
  .event-field input { height:50px; padding-left:12px; font-size:22px; }
  .form-action { display:block; margin-top:22px; }
  .physical-submit { justify-content:center; gap:40px; width:100%; }
  .form-action>span { display:block; max-width:none; margin-top:10px; text-align:center; font-size:12px; }
  .scoring-note { margin-top:20px; padding-top:12px; }
  .score-report .panel-heading { margin-bottom:11px; }
  #physical-placeholder { display:grid; grid-template-columns:1fr 1fr; align-items:center; column-gap:18px; }
  .score-total-placeholder { margin:0; font-size:54px; }
  .score-total-placeholder>span { margin-left:6px; font-size:12px; }
  #physical-placeholder>p { margin:0; font-size:12px; }
  .empty-score-lines { display:flex; grid-column:1/-1; justify-content:space-between; gap:10px; margin-top:15px; padding-top:13px; }
  .empty-score-lines>span { gap:8px; font-size:12px; }
  .physical-total strong { font-size:64px; }
  .next-step { flex-wrap:wrap; gap:12px; margin-top:6px; padding:20px 2px 0; }
  .next-step-icon { display:none; }
  .next-step strong { font-size:14px; }
  .next-step p { font-size:12px; }
  .next-step button { padding:9px 13px; font-size:12px; }
  .query-grid { gap:19px 13px; }
  .query-grid .subject-select { display:block; }
  .subject-select select { max-width:none; margin-top:9px; }
  .query-grid label { font-size:14px; }
  .query-grid .input-unit input { padding-right:54px; font-size:23px; }
  .query-grid .input-unit>span { right:11px; font-size:12px; }
  .query-action { gap:10px; padding-top:18px; }
  .query-action>.primary { width:100%; min-width:0; }
  .query-action>span { font-size:12px; }
  .query-guide { padding:12px 10px 0; }
  .query-guide h2 { font-size:16px; }
  .query-guide ol { margin-top:17px; }
  .query-guide li { padding-bottom:19px; }
  .query-guide strong { font-size:14px; }
  .query-guide span { margin-top:4px; font-size:13px; }
  .quota { display:inline-flex; margin-top:13px; padding:7px 12px; font-size:12px; }
  .quota strong { font-size:26px; }
  .activation-notice { display:block; padding:17px 18px; }
  .activation-notice strong { font-size:14px; }
  .activation-notice p { font-size:12px; }
  .activation-notice-actions { flex-wrap:wrap; gap:8px; margin-top:13px; }
  .activation-notice-actions button { min-height:44px; margin-top:0; font-size:13px; }
  .history-panel { margin-top:17px; padding:11px 20px; }
  .history-row { align-items:flex-start; gap:12px; }
  .history-row strong { font-size:13px; }
  .history-row small { font-size:12px; }
  .history-row button { padding:9px 11px; font-size:12px; }
  .query-empty { gap:14px; margin-top:20px; padding:26px 3px; }
  .query-empty h2 { font-size:14px; }
  .query-empty p { font-size:12px; }
  .query-empty>span { font-size:30px; }
  .has-results .query-grid { grid-template-columns:1fr 1fr; gap:18px 13px; }
  .has-results .subject-select { grid-column:1/-1; }
  .has-results .subject-select select { height:50px; }
  .has-results .query-action { grid-column:1/-1; }
  .has-results .query-action>.primary { width:100%; min-width:0; }
  .has-results .query-action>span { width:100%; font-size:12px; }
  .result-topline { align-items:flex-end; gap:10px; margin:25px 0 16px; }
  .result-topline h2 { font-size:25px; }
  .result-topline>a { font-size:12px; }
  .result-topline.ice-hero { display:block; min-height:230px; padding:18px 22px; }
  .result-topline.ice-hero .eyebrow { display:flex; align-items:center; min-height:44px; margin-bottom:6px; padding-right:132px; }
  .result-topline.ice-hero h2 { font-size:28px; letter-spacing:-.8px; }
  .result-topline.ice-hero>a { position:absolute; top:18px; right:22px; bottom:auto; min-height:44px; margin-top:0; padding:5px 8px; font-size:12px; }
  .result-subject { padding:3px 8px; font-size:13px; }
  #current-result-context { max-width:100%; font-size:12px; }
  .result-topline.ice-hero #current-result-context { margin-top:8px; }
  .result-topline.ice-hero .result-score-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
  .result-score-summary>div,.result-score-summary>p { display:block; min-width:0; margin:0; }
  .result-score-summary>div>p { gap:6px; }
  .result-score-summary>:not(:first-child) { padding-left:14px; }
  .result-score-summary span { display:block; width:auto; font-size:12px; }
  .result-score-summary strong { font-size:40px; letter-spacing:-1.5px; }
  .result-score-summary small { font-size:13px; }
  #sticky-methods { top:var(--header-height); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin-bottom:15px; padding:5px; overflow:visible; border-radius:12px; }
  #sticky-methods button { min-width:0; padding:10px 5px; font-size:12.5px; line-height:1.3; }
  .auth-overlay { padding:16px; }
  .auth-card { max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); padding:28px 24px; }
  .auth-card>h2 { font-size:25px; }
  #message,#auth-feedback { padding:12px 14px; font-size:13px; }
  .activation-overlay { padding:12px; }
  .activation-card { max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); padding:27px 22px; border-radius:18px; }
  .activation-card>.icon-button { top:8px; right:8px; }
  .activation-heading { padding-right:25px; }
  .activation-heading h2 { font-size:27px; }
  .activation-heading p { font-size:13px; }
  .activation-steps { grid-template-columns:1fr; gap:23px; margin-top:22px; padding:23px 0; }
  .activation-step-heading { margin-bottom:15px; }
  .activation-score-note { margin-top:16px; padding:14px; }
  .activation-contact-step { padding:22px 0 0; border-top:1px solid var(--line); border-left:0; }
  .activation-phone-help { max-width:360px; margin:4px auto 0; font-size:12px; }
  .activation-actions { flex-direction:column; align-items:stretch; gap:6px; padding-top:19px; }
  .activation-actions>.primary { flex:auto; width:100%; }
  .activation-actions>.text-button { width:100%; min-height:44px; }
  footer { gap:9px 18px; margin:0 16px; padding:18px 0 24px; font-size:11px; }
  footer>span:nth-child(2) { order:2; width:100%; }
  .auth-layout { display:block; min-height:0; }
  .intro h1 { font-size:31px; }
  .admission-lanes,.intro-foot { display:none; }
  .auth-layout>.panel { margin-top:22px; }
  .admin-grid { grid-template-columns:1fr; gap:0; }
  .section-heading { align-items:flex-start; }
  .section-heading h1 { font-size:26px; }
  .section-heading .quiet { font-size:12px; }
  .legal-card h1 { font-size:28px; }
}
@media (max-width:370px) {
  .topbar { gap:8px; padding-right:12px; padding-left:12px; }
  .brand-title { font-size:20px; }
  .brand-title small { font-size:9px; }
  .brand-symbol { display:none; }
  .header-actions>button { padding-right:7px; padding-left:7px; font-size:12px; }
  .tool-switch button { padding-right:13px; padding-left:13px; }
  .page-heading.ice-hero h1 { font-size:28px; }
  .ice-hero,.result-topline.ice-hero { padding-right:19px; padding-left:19px; }
  .event-field { grid-template-columns:1fr 122px; padding-right:11px; padding-left:11px; }
  .event-icon { display:none; }
  .next-step button { margin:8px 0 0; }
  #physical-placeholder { grid-template-columns:1fr; gap:9px; }
  .empty-score-lines { flex-wrap:wrap; }
  .result-topline.ice-hero h2 { font-size:26px; }
  .result-topline.ice-hero>a { right:19px; }
  .result-topline.ice-hero .result-score-summary { gap:10px; }
  .result-score-summary>:not(:first-child) { padding-left:10px; }
  .result-score-summary>div>p { gap:5px; }
  .result-score-summary strong { font-size:34px; }
  .result-score-summary small { font-size:12px; }
  #sticky-methods button { font-size:12px; }
  .auth-card { padding:26px 22px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}
/* Temporary public query testing; preserve the complete score/account UI for restoration. */
.public-test .tool-switch,
.public-test #physical-panel,
.public-test .header-actions,
.public-test .history-panel,
.public-test .quota,
.public-test #activation-notice { display: none !important; }
