.topbar {justify-content:space-between;gap:12px;max-width:1060px;margin:auto;padding:16px 22px;min-height:58px;background:var(--bg)}
.topbar-brand {font-size:14px;font-weight:700;margin-right:auto;color:var(--muted)}
.main:has(#homeView:not(.hidden)),.main:has(#queryView:not(.hidden)),.main:has(#paidView:not(.hidden)) {max-width:1060px;padding-bottom:40px}
.portal-hero {padding:54px 36px 42px;border-radius:24px;background:radial-gradient(ellipse at 100% 0%,#6554b9 0%,transparent 65%),linear-gradient(125deg,#17264f,#343f85);color:#fff;position:relative;overflow:hidden}
.eyebrow {font-size:13px;letter-spacing:2px;font-weight:700;color:#6676a2}
.portal-hero .eyebrow {color:#d3dafa}
.portal-hero h1 {font-size:clamp(27px,4vw,42px);margin:20px 0 12px;letter-spacing:-1px;line-height:1.3}
.portal-hero p {font-size:18px;color:#e6e8ff;margin:0 0 25px}
.hero-note {font-size:12px;padding:7px 12px;border:1px solid #8c95b6;border-radius:20px;color:#e2e6ff}
.portal-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:24px}
.portal-tile {appearance:none;text-align:left;border:1px solid var(--line);border-radius:20px;background:var(--card);color:var(--text);padding:24px;cursor:pointer;box-shadow:var(--shadow);font:inherit;display:flex;flex-direction:column;gap:18px;transition:transform .15s,border-color .15s}
.portal-tile:hover {transform:translateY(-3px);border-color:#7f91cf}
.tile-top {display:flex;align-items:center;justify-content:space-between}
.tile-icon {font-size:24px;color:#4f62b1;font-weight:700;letter-spacing:-1px}
.service-badge {background:#edf2ff;color:#334d8e;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:600}
.tile-paid .service-badge {background:#fff0d6;color:#835419}
.tile-paid .tile-icon {color:#a67a37}
.portal-tile strong {font-size:23px}
.portal-tile>span:not(.tile-top):not(.tile-action) {font-size:14px;line-height:1.8;color:var(--muted)}
.tile-action {font-size:14px;font-weight:600;display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:18px;margin-top:auto;color:#536bbd}
.portal-footnote {text-align:center;color:var(--muted);font-size:13px;line-height:1.9;margin:28px 15px}
.page-heading {padding:20px 0}
.page-heading h1,#paidView h1 {font-size:28px;margin:12px 0}
.page-heading p,#paidView p {color:var(--muted);line-height:1.8}
.query-switch {display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.service-notice {padding:18px 20px;background:var(--active-tab-bg);border:1px solid var(--line);border-radius:14px;margin:20px 0;font-size:14px;line-height:1.8}
.service-notice p {margin:8px 0 0}
#historyFilters .row {gap:14px;align-items:end}
#historyFilters label {font-size:13px;color:var(--muted);display:flex;flex-direction:column;gap:6px;flex:1;min-width:135px}
#schoolSearchForm .input {flex:1;min-width:160px}
.school-match {font:inherit;color:var(--text);text-align:left;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--card);cursor:pointer;display:block;width:100%;margin:6px 0}
.school-match.selected {border-color:var(--primary);background:var(--active-tab-bg)}
.score-chart {width:100%;max-height:310px;margin:16px 0;color:var(--muted)}
.score-chart text {font-size:12px;fill:currentColor}
.chart-grid {stroke:var(--line);stroke-dasharray:4 4}
.chart-line {stroke:#536fca;stroke-width:3}
.chart-dot {fill:#536fca;stroke:var(--card);stroke-width:2}
.score-chart .chart-value {fill:var(--text);font-size:14px;font-weight:700}
.history-table-wrap {overflow-x:auto}
.history-table {border-collapse:collapse;width:100%;font-size:13px;min-width:520px}
.history-table caption {text-align:left;margin:0 0 12px;font-weight:700;font-size:15px}
.history-table td,.history-table th {padding:12px;text-align:left;border-bottom:1px solid var(--line);line-height:1.6}
.history-table thead {background:var(--active-tab-bg)}
.sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
button:focus-visible,input:focus-visible,select:focus-visible {outline:3px solid #8b9ee1;outline-offset:3px}
@media(max-width:700px) {.portal-grid {grid-template-columns:1fr;gap:14px;margin-top:18px}.portal-hero {padding:32px 24px}.portal-tile {padding:20px;gap:12px}.portal-tile strong {font-size:22px}.tile-icon {font-size:20px}.topbar {padding:12px 16px}.topbar-brand {font-size:12px}.portal-hero p {font-size:16px}.page-heading h1 {font-size:25px}}
@media(prefers-reduced-motion:reduce) {.portal-tile {transition:none}.portal-tile:hover {transform:none}}
@media(max-width:700px) {.score-chart text {font-size:20px}.score-chart .chart-value {font-size:22px}}
