/* ── Imports: refined professional fonts ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Variables: sophisticated, calm, and accessible ─────────────────────── */
:root {
    --bg:           #f8fafc;
    --bg2:          #ffffff;
    --panel-border: rgba(0,0,0,0.06);
    --gold:         #3730a3;
    --gold-light:   #4338ca;
    --gold-dim:     rgba(55,48,163,0.08);
    --text:         #0f172a;
    --text-muted:   #475569;
    --text-dim:     #94a3b8;
    --green:        #10b981;
    --green-dim:    rgba(16,185,129,0.08);
    --amber:        #f59e0b;
    --amber-dim:    rgba(245,158,11,0.08);
    --red:          #ef4444;
    --red-dim:      rgba(239,68,68,0.08);
    --input-bg:     #ffffff;
    --input-border: #e2e8f0;
    --radius:       16px;
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.03), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 12px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --transition:   all 0.2s ease;
}

/* ── Reset & base: clean, modern, better readability ────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; scroll-behavior: smooth; max-width: 100vw; overflow-x: hidden; }

.page, .panel, .topnav { max-width: 100vw; overflow-x: hidden; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Two panel layout (desktop) / stacks on mobile ──────────────────────── */
.page {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.panel {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.panel-form {
    width: 440px;
    flex-shrink: 0;
    background: var(--bg2);
    border-right: 1px solid var(--panel-border);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.panel-result {
    flex: 1;
    background: var(--bg);
}

.panel-inner {
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
}

/* ── Header: refined, centered eyebrow ─────────────────────────────────── */
.site-header {
    margin-bottom: 32px;
    animation: fadeDown 0.5s ease both;
    text-align: center;
}

.header-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
    width: 100%;
}

.header-eyebrow::before, .header-eyebrow::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    opacity: 0.4;
    border-radius: 2px;
}

h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 8px;
}

h1 em {
    font-style: normal;
    color: var(--gold);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

/* ── Form elements: clean, spacious, accessible ─────────────────────────── */
#calculator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeUp 0.5s ease both 0.1s;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

label {
    display: block;
    margin-bottom: 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: -0.2px;
    text-transform: none;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--text);
    transition: var(--transition);
    appearance: none;
    box-shadow: var(--shadow-sm);
}

input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--input-border);
    border-bottom: 2px solid var(--gold);
    background: #ffffff;
    box-shadow: none;
}

input::placeholder { color: var(--text-dim); }

small {
    display: block;
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 0.7rem;
    line-height: 1.4;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── University search: dropdown refinement ─────────────────────────────── */
.search-wrapper { position: relative; }

.search-wrapper input[type="text"] {
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

.uni-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--bg2);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    backdrop-filter: blur(0);
}

.uni-dropdown.open { display: block; }

.uni-dropdown::-webkit-scrollbar { width: 4px; }
.uni-dropdown::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 4px; }

.uni-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--panel-border);
    transition: background 0.12s;
}
.uni-option:last-child { border-bottom: none; }
.uni-option:hover, .uni-option.focused { background: var(--gold-dim); color: var(--gold); }
.uni-option mark { background: transparent; color: var(--gold); font-weight: 600; }

.uni-no-results { padding: 14px; color: var(--text-dim); font-size: 0.8rem; text-align: center; }

#uni-hint { margin-top: 6px; font-size: 0.7rem; color: var(--text-dim); }
#uni-hint.selected { color: var(--green); }

/* ── Checkbox: refined interaction ───────────────────────────────────────── */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    transition: var(--transition);
    user-select: none;
    font-weight: normal;
    text-transform: none;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
}

.checkbox-label:hover { border-color: var(--gold); background: var(--gold-dim); }

.checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox-custom {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border: 1.5px solid var(--text-dim);
    border-radius: 6px;
    background: white;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.checkbox-custom::after {
    content: '';
    display: block;
    width: 5px; height: 9px;
    border: 2px solid white;
    border-top: none; border-left: none;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0;
    transition: opacity 0.1s;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--gold); border-color: var(--gold);
}
.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after { opacity: 1; }
.checkbox-text { font-size: 0.85rem; color: var(--text-muted); }
.checkbox-text strong { color: var(--text); font-weight: 600; }

/* ── Primary CTA button: modern, bold ───────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    box-shadow: 0 2px 6px rgba(37,99,235,0.2);
}

.btn-submit:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.25);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Badges: subtle meta info ───────────────────────────────────────────── */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
    animation: fadeUp 0.5s ease both 0.2s;
}

.badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--input-border);
    padding: 4px 12px;
    border-radius: 40px;
}

/* ── Result panel: clean and spacious ───────────────────────────────────── */
.result {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    animation: fadeUp 0.6s ease both 0.2s;
}

.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
}
.empty-icon svg { width: 100%; height: 100%; }

.empty-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.empty-sub {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.result-content {
    animation: fadeUp 0.4s ease both;
}

/* ── Chance display: dynamic, modern card ───────────────────────────────── */
.chance-display {
    text-align: center;
    padding: 36px 20px;
    border-radius: 24px;
    margin-bottom: 24px;
    border: 1px solid;
    position: relative;
    overflow: hidden;
    background: var(--bg2);
}

.chance-display.chance-high   { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.chance-display.chance-medium { border-color: var(--amber); background: var(--amber-dim); color: var(--amber); }
.chance-display.chance-low    { border-color: var(--red); background: var(--red-dim); color: var(--red); }

.chance-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(64px, 12vw, 96px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.chance-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 10px;
}

/* ── Stats grid: auto-fit columns (UK version — kept as-is) ─────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--bg2);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-family: 'Plus Jakarta Sans', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: 6px;
    font-weight: 500;
}

.stat-range {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ── Advice cards: structured, friendly ─────────────────────────────────── */
.advice-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.advice-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.advice-list li {
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--input-border);
    border-left: 4px solid var(--gold);
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.disclaimer {
    padding: 14px 16px;
    background: var(--bg2);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.5;
}
.disclaimer strong { color: var(--gold); font-weight: 600; }

/* Loading / error states */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gold);
    font-size: 0.9rem;
}

.error {
    text-align: center;
    padding: 16px;
    color: var(--red);
    background: var(--red-dim);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 14px;
    font-size: 0.85rem;
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 📱 Responsive: perfectly adapted for phones ────────────────────────── */
@media (max-width: 768px) {
    .page { flex-direction: column; }
    .panel-form { width: 100%; border-right: none; border-bottom: 1px solid var(--panel-border); }
    .panel-result { min-height: auto; }
    .panel-inner { padding: 28px 20px; }
    h1 { font-size: 1.8rem; }
    .result { justify-content: flex-start; }
    .empty-state { padding: 40px 16px; }
    .stats-grid { gap: 8px; }
    .stat-value { font-size: 1.2rem; }
    .chance-display { padding: 28px 16px; }
    .advice-list li { padding: 10px 14px; }
    .badges { margin-top: 20px; padding-top: 20px; }
}

/* ── 💻 Laptop/desktop-in-window scale-down ─────────────────────────────── */
@media (min-width: 769px) and (max-width: 1600px) {
    html { font-size: 14px; }

    .panel-form { width: 380px; }
    .panel-inner { padding: 28px 24px; }

    h1 { font-size: 1.6rem; }
    .subtitle { font-size: 0.82rem; }

    .empty-state { padding: 28px 16px; }
    .chance-display { padding: 22px 16px; }
    .chance-number { font-size: clamp(48px, 6vw, 64px); }

    .stat-value { font-size: 1.1rem; }
    .school-card { padding: 14px 16px; }
    .school-chance { font-size: 22px; }

    .topnav-inner { height: 52px; padding: 0 20px; }
}

/* ── Top navigation (polished) ──────────────────────────────────────────── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 300;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--panel-border);
}

.topnav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topnav-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.3px;
}

.topnav-links {
    display: flex;
    gap: 8px;
}

.topnav-link {
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.topnav-link:hover  { background: var(--gold-dim); color: var(--gold); }
.topnav-link.active { background: var(--gold-dim); color: var(--gold); font-weight: 600; }

/* ── Find page layout (consistency) ─────────────────────────────────────── */
.find-page {
    display: flex;
    min-height: calc(100vh - 60px);
}

.find-results-panel {
    overflow-y: auto;
}

/* ── Form divider (elegant) ─────────────────────────────────────────────── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 20px;
}
.form-divider::before, .form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--input-border);
}
.form-divider span {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 500;
}

/* ── Sliders: modern touch ──────────────────────────────────────────────── */
.slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: var(--input-border);
    border-radius: 10px;
    outline: none;
    margin: 10px 0 6px;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.1s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: none;
}

.slider-val {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.85rem;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ── Type pills (filter chips) ─────────────────────────────────────────── */
.type-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.pill {
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--input-border);
    background: var(--bg2);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover  { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.pill.active { background: var(--gold); border-color: var(--gold); color: white; }

/* In-state badge */
.instate-row {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.instate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 40px;
    background: var(--green-dim);
    border: 1px solid rgba(16,185,129,0.2);
    color: var(--green);
}
.instate-badge.outstate {
    background: var(--amber-dim);
    border-color: rgba(245,158,11,0.2);
    color: var(--amber);
}

/* Results header */
.results-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--input-border);
}
.results-count {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.results-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* School cards: clean, clickable, scannable */
.school-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.school-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg2);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    transition: var(--transition);
    animation: fadeUp 0.3s ease both;
    box-shadow: var(--shadow-sm);
}
.school-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}
.school-card-left { flex: 1; min-width: 0; }
.school-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.school-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.school-type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--bg);
    border: 1px solid var(--input-border);
    padding: 2px 10px;
    border-radius: 20px;
}
.school-rate {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.school-stats-row {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    gap: 12px;
}
.school-card-right {
    flex-shrink: 0;
    text-align: center;
    min-width: 80px;
}
.school-chance {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.school-chance.chance-high   { color: var(--green); }
.school-chance.chance-medium { color: var(--amber); }
.school-chance.chance-low    { color: var(--red); }
.school-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 5px;
}
.label-safety { color: var(--green); }
.label-match  { color: var(--amber); }
.label-reach  { color: var(--red); }

/* Select dropdown (state) */
select {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-dim);
}
select option {
    background: white;
    color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════
   HOLISTIC PROFILE CHECKLIST — append these rules to the bottom of style.css
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Checklist section wrapper ───────────────────────────────────────────── */
.checklist-section {
    border: 1px solid var(--input-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg2);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease;
}

.checklist-section:focus-within {
    border-color: var(--gold);
}

/* ── Accordion header ────────────────────────────────────────────────────── */
.checklist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    transition: background 0.15s ease;
}

.checklist-header:hover {
    background: var(--gold-dim);
}

.checklist-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checklist-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.checklist-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.checklist-subtitle {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.checklist-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Count badge (shows number of checked items) ─────────────────────────── */
.checklist-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--gold);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 40px;
    line-height: 1;
}

/* ── Chevron: rotates when open ───────────────────────────────────────────── */
.checklist-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-dim);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.checklist-body.open ~ * .checklist-chevron,
.checklist-header[aria-expanded="true"] .checklist-chevron {
    transform: rotate(180deg);
}

/* ── Collapsible body ────────────────────────────────────────────────────── */
.checklist-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 0px solid var(--input-border);
}

.checklist-body.open {
    max-height: 600px;
    border-top-width: 1px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 6px;
}

/* ── Individual checklist row ────────────────────────────────────────────── */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
    user-select: none;
    /* reset label styles */
    font-weight: normal;
    text-transform: none;
    font-size: inherit;
    color: inherit;
    margin-bottom: 0;
}

.checklist-item:hover {
    background: var(--gold-dim);
}

/* Hide native checkbox */
.checklist-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkbox box */
.checklist-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--text-dim);
    border-radius: 5px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    position: relative;
}

.checklist-check::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0;
    transition: opacity 0.1s ease;
}

.checklist-item input[type="checkbox"]:checked ~ .checklist-check {
    background: var(--gold);
    border-color: var(--gold);
}

.checklist-item input[type="checkbox"]:checked ~ .checklist-check::after {
    opacity: 1;
}

/* Text + weight badge row */
.checklist-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
    min-width: 0;
}

.checklist-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.checklist-item input[type="checkbox"]:checked ~ .checklist-text .checklist-label {
    color: var(--text);
    font-weight: 500;
}

/* Weight badges */
.checklist-weight {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.01em;
}

.checklist-weight-high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.checklist-weight-mid {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.checklist-weight-low {
    background: rgba(37, 99, 235, 0.08);
    color: var(--gold);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Footnote inside the body */
.checklist-disclaimer {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-align: center;
    padding: 6px 10px 12px;
    line-height: 1.4;
    margin: 0;
}

/* ── Result badge (shown in result panel after calculation) ──────────────── */
.checklist-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 40px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--gold);
}

/* ── Find page: results meta row ─────────────────────────────────────────── */
.results-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* ── Mobile adjustments ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .checklist-header {
        padding: 12px 14px;
    }
    .checklist-items {
        padding: 6px 8px 4px;
    }
    .checklist-item {
        padding: 8px 8px;
    }
    .checklist-label {
        font-size: 0.78rem;
    }
    .checklist-result-badge {
        margin-left: 0;
    }
    .results-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.uni-page-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
}
.uni-page-link:hover { color: #fff; }

.school-name-link {
    text-decoration: none;
    color: inherit;
}
.school-name-link:hover .school-name {
    color: var(--accent, #2563eb);
    text-decoration: underline;
}

.uni-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.uni-option-name {
    flex: 1;
}
.uni-option-link {
    font-size: 0.72rem;
    color: var(--accent, #2563eb);
    text-decoration: none;
    white-space: nowrap;
    margin-left: 12px;
    opacity: 0.7;
}
.uni-option-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.test-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
 
.test-toggle-btn {
    flex: 1;
    padding: 7px 0;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    background: var(--bg2);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: var(--transition);
}
 
.test-toggle-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-dim);
}
 
.test-toggle-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* ── SAT / ACT toggle (find page) ────────────────────────────────────────── */
.test-type-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.test-pill {
    flex: 1;
    padding: 7px 0;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    background: var(--bg2);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: var(--transition);
}

.test-pill:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-dim);
}

.test-pill.active {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.sat-bar-wrap {
    position: relative;
    margin-top: 20px; /* room for the avg label above */
}

/* ── Mobile fix: scale down text, padding, buttons ─────────────────────── */
@media (max-width: 480px) {

    /* Base font size — scales everything down */
    html { font-size: 14px; }

    /* Panel inner padding — more breathing room for narrow screens */
    .panel-inner { padding: 20px 16px; }

    /* Headings */
    h1 { font-size: 1.5rem; }

    /* Inputs and buttons — comfortable tap targets without being huge */
    input[type="number"],
    input[type="text"],
    select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn-submit {
        padding: 13px;
        font-size: 0.9rem;
    }

    /* Nav links — don't overflow */
    .topnav-links { gap: 2px; }
    .topnav-link  { padding: 6px 10px; font-size: 0.78rem; }
    .topnav-brand { font-size: 1rem; }

    /* School cards — stack inner content */
    .school-card  { flex-direction: column; align-items: flex-start; gap: 10px; }
    .school-card-right { width: 100%; display: flex; align-items: center; gap: 12px; }
    .school-chance { font-size: 22px; }

    /* Stats grid — 2 columns instead of 3 */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Chance display number */
    .chance-number { font-size: 72px; }

    /* Field row — stack on very small screens */
    .field-row { grid-template-columns: 1fr; }

    /* Pills — smaller */
    .pill { padding: 5px 12px; font-size: 0.75rem; }

    /* Checklist */
    .checklist-label { font-size: 0.75rem; }

}

@media (max-width: 768px) {
    .find-page {
        flex-direction: column;
    }

    .find-results-panel {
        min-height: auto;
        width: 100%;
    }
}

/* ── iOS zoom fix: prevent auto-zoom on input focus ─────────────────────── */
@media (max-width: 768px) {
    input[type="number"],
    input[type="text"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ── Test-blind badge ────────────────────────────────────────────────────── */
.test-blind-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 40px;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
}

/* ══════════════════════════════════════════════════════════════════════════
   ROAM THEME v5 — appended after the original rules
   Surfaces: warm grey, white, night, charcoal, signal yellow
   Radii: 10px (controls) / 14px (cards) / 18px (hero card)
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg:           #ecebe7;
    --bg2:          #ffffff;
    --panel-border: rgba(0,0,0,0.05);

    /* --gold is INK (near-black): existing text/fill rules keep working,
       yellow is applied explicitly below. */
    --gold:         #151516;
    --gold-light:   #2b2b2e;
    --gold-dim:     rgba(192,221,249,0.16);

    --yellow:       #c0ddf9;
    --yellow-hover: #a8d1f7;
    --yellow-soft:  rgba(192,221,249,0.16);
    --night:        #121213;
    --night-2:      #1c1c1e;
    --night-3:      #2a2a2d;
    --night-border: #2c2c2f;
    --stone:        #e4e3de;
    --surface:      #f6f5f2;
    --accent:       #151516;

    --r-control:    10px;
    --r-card:       14px;
    --r-hero:       18px;

    --text:         #121213;
    --text-muted:   #55555a;
    --text-dim:     #8e8e93;
    --input-border: #e4e3df;
    --radius:       14px;
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.04);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body { font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif; }

/* Full-bleed two-panel layout; the seam between them is a wavy edge */
.page { gap: 0; padding: 0; background: var(--surface); }
.panel { border-radius: 0; }
.panel-form { background: var(--surface); border-right: none; box-shadow: none; }

.panel-result,
.find-results-panel {
    position: relative;
    background-color: var(--night);
    /* faint contour lines, a nod to the map */
    background-image:
        repeating-radial-gradient(circle at 78% 18%, transparent 0 34px, rgba(255,255,255,0.035) 35px 36px),
        repeating-radial-gradient(circle at 12% 88%, transparent 0 42px, rgba(255,255,255,0.03) 43px 44px);
    color: #fff;
}

/* Seam: the dark panel has big rounded outer corners, and one smooth bump
   of the light surface pushes into it, with a small grab handle */
.panel-result { border-radius: 28px 0 0 28px; }
.panel-result::before {
    content: "";
    position: absolute;
    left: 0; top: 55%;
    width: 40px; height: 200px;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 200'%3E%3Cpath fill='%23f6f5f2' d='M0 0 C0 34 26 40 26 74 L26 126 C26 160 0 166 0 200 Z'/%3E%3C/svg%3E");
}
.panel-result::after {
    content: "";
    position: absolute;
    left: 9px; top: 55%;
    width: 4px; height: 30px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: #c9c8c3;
    z-index: 2;
    pointer-events: none;
}
.panel-result > .panel-inner { padding-left: 56px; position: relative; z-index: 2; }

/* Room at the top for the floating glass nav */
.panel-inner { padding-top: 88px; }

/* ── Top nav: floating liquid glass ──────────────────────────────────────── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 300;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 12px 12px 0;
    margin-bottom: -64px;      /* content slides up underneath the glass */
    overflow: visible;
    pointer-events: none;
}
.topnav-inner {
    position: relative;
    pointer-events: auto;
    height: 52px;
    padding: 0 8px 0 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.5);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.14),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(255,255,255,0.25);
}
/* specular highlight */
.topnav-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg,
        rgba(255,255,255,0.55) 0%,
        rgba(255,255,255,0) 38%,
        rgba(255,255,255,0) 70%,
        rgba(255,255,255,0.25) 100%);
}
.topnav-inner > * { position: relative; z-index: 1; }
.topnav-brand { font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.topnav-brand::before {
    content: "";
    display: inline-block;
    width: 32px; height: 32px;
    margin-right: 10px;
    vertical-align: middle;
    background: url('/static/logo192px.png') center / 100% 100% no-repeat;
    -webkit-mask-image: radial-gradient(circle closest-side, #000 calc(100% - 4px), transparent 100%);
    mask-image: radial-gradient(circle closest-side, #000 calc(100% - 4px), transparent 100%);
}
.topnav-link { border-radius: var(--r-control); }

/* Hamburger + dropdown (glass) */
.nav-toggle-wrap { position: relative; }
.nav-toggle-btn {
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 12px;
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); transition: var(--transition);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 8px rgba(0,0,0,0.08);
}
.nav-toggle-btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--text); }
.nav-dropdown {
    position: fixed; top: 0; right: 0;
    background: rgba(255,255,255,0.72);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.85);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
    min-width: 210px; padding: 6px;
    display: none; flex-direction: column; gap: 2px; z-index: 9999;
}
.nav-dropdown.open { display: flex; }
.nav-dropdown-link {
    padding: 11px 14px; border-radius: var(--r-control); font-size: 0.875rem; font-weight: 500;
    color: var(--text); text-decoration: none; transition: background .15s;
}
.nav-dropdown-link:hover { background: var(--yellow-soft); color: var(--text); }
.nav-dropdown-link.active { background: var(--yellow); color: var(--text); font-weight: 600; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.header-eyebrow { color: var(--text-muted); letter-spacing: 0.1em; }
.header-eyebrow::before, .header-eyebrow::after { display: none; }

h1 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 2.2rem;
    letter-spacing: -0.035em;
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
input[type="number"],
input[type="text"] {
    border: none;
    border-radius: var(--r-control);
    padding: 13px 16px;
    box-shadow: var(--shadow-sm);
}
input[type="number"]:focus,
input[type="text"]:focus {
    border: none;
    box-shadow: 0 0 0 2px var(--yellow);
}
.search-wrapper input[type="text"] {
    padding-left: 44px;
    background-position: 16px center;
}
select {
    border: none;
    border-radius: var(--r-control);
    padding: 13px 40px 13px 16px;
    box-shadow: var(--shadow-sm);
}
select:focus { box-shadow: 0 0 0 2px var(--yellow); }
label { color: var(--text); font-weight: 500; }

/* University search dropdown */
.uni-dropdown { border: none; border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(0,0,0,0.16); }
.uni-option:hover, .uni-option.focused { background: var(--yellow-soft); color: var(--text); }
.uni-option mark { color: var(--text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--yellow); }
.uni-option-link { color: var(--text); opacity: 0.55; }
.uni-option-link:hover { opacity: 1; }
#uni-hint.selected { color: #0f9d6b; }

/* ── Primary button ──────────────────────────────────────────────────────── */
.btn-submit {
    background: var(--yellow);
    color: var(--text);
    border-radius: var(--r-control);
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(192,221,249,0.32);
}
.btn-submit:hover {
    background: var(--yellow-hover);
    box-shadow: 0 10px 22px rgba(192,221,249,0.42);
}

/* ── SAT/ACT toggle + filter pills ───────────────────────────────────────── */

.pill { border: none; border-radius: var(--r-control); background: #fff; box-shadow: var(--shadow-sm); }
.pill:hover { background: var(--yellow-soft); color: var(--text); }
.pill.active { background: var(--yellow); color: var(--text); }

/* ── Holistic checklist ──────────────────────────────────────────────────── */
.checklist-item { border-radius: var(--r-control); }
.checklist-count-badge { background: var(--yellow); color: var(--text); }
.checklist-check, .checkbox-custom { border-radius: 4px; }
.checklist-item input[type="checkbox"]:checked ~ .checklist-check,
.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--yellow); border-color: var(--yellow);
}
.checklist-check::after, .checkbox-custom::after { border-color: var(--text); }
.checklist-icon {
    width: 18px; height: 18px; flex: none;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; color: var(--text);
    background: var(--yellow);
}
.checklist-icon::before { content: "+"; }
.checklist-weight-low, .checklist-result-badge {
    background: var(--yellow-soft); border-color: rgba(192,221,249,0.35); color: var(--text);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { background: #fff; border: none; border-radius: 8px; box-shadow: var(--shadow-sm); }
.instate-badge, .checklist-result-badge, .test-blind-badge { border-radius: 8px; }
.test-blind-badge { background: var(--night-3); border-color: #3a3a3e; color: var(--yellow); }

/* ── Results panel (night) ───────────────────────────────────────────────── */
.empty-title { color: #f2f2f0; font-family: 'Outfit', sans-serif; font-weight: 500; }
.empty-sub { color: var(--text-dim); }

.loading { color: var(--yellow); }
.error { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); border-radius: var(--r-card); }

.chance-display { border-radius: var(--r-hero); background-color: var(--night-2); }
.chance-number { font-family: 'Outfit', sans-serif; font-weight: 600; }

/* Stat boxes */
.stat-item { border: none; border-radius: var(--r-card); }
.stat-value { font-family: 'Outfit', sans-serif; font-weight: 600; color: var(--text); }

/* Advice boxes: white, yellow marker */
.advice-list li {
    border: none;
    border-radius: var(--r-card);
    box-shadow: inset 4px 0 0 var(--yellow);
}

/* Notes: stone box */
.disclaimer { background: var(--stone); border-color: transparent; border-radius: var(--r-card); color: #55555a; }
.disclaimer strong { color: var(--text); }

.legal-disclaimer { border-top-color: var(--night-border) !important; }
.legal-disclaimer strong { color: #d6d6d9; }
.legal-disclaimer a { color: var(--yellow); }

/* ── School cards: dark ───────────────────────────── */
.school-card {
    background: var(--night-2);
    border: 1px solid var(--night-border);
    border-radius: var(--r-card);
    box-shadow: none;
}
.school-card:hover { border-color: var(--yellow); box-shadow: none; }
.school-name { color: #fff; }
.school-name-link:hover .school-name { color: var(--yellow); }
.school-type { background: var(--night-3); border-color: #3a3a3e; color: #c4c4c8; border-radius: 6px; }
.school-rate { color: #b8b8bd; }
.school-stats-row { color: var(--text-dim); }
.school-chance { font-family: 'Outfit', sans-serif; font-weight: 600; }

.results-count { color: #fff; font-family: 'Outfit', sans-serif; font-weight: 600; }
.results-sub { color: var(--text-dim); }
.results-header { border-bottom-color: var(--night-border); }

/* ── Sliders ─────────────────────────────────────────────────────────────── */
.slider::-webkit-slider-thumb { background: var(--yellow); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.slider::-moz-range-thumb { background: var(--yellow); border: 3px solid #fff; }
.slider-val { color: var(--text); }

/* ── University profile button ───────────────────────────────────────────── */
.uni-profile-btn {
    display: block;
    text-align: center;
    margin-top: 14px;
    padding: 11px 20px;
    background: var(--yellow);
    color: var(--text) !important;
    border-radius: var(--r-control);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .18s;
}
.uni-profile-btn:hover { background: var(--yellow-hover); }

/* ── "Explore Popular Schools" links: white, yellow on hover ───────────── */
.popular-link {
    display: block;
    padding: 14px 16px;
    background: #fff;
    border-radius: var(--r-card);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background .15s;
}
.popular-link:hover { background: var(--yellow); color: var(--text); }

/* ── Typography: one font everywhere (inputs/buttons had their own) ──────── */
:root { --font: 'Urbanist', 'Outfit', 'Inter', system-ui, -apple-system, sans-serif; }

body, button, select, textarea,
input[type="number"], input[type="text"], input[type="email"],
.topnav-brand, h1, h2, h3,
.empty-title, .chance-number, .stat-value, .results-count, .school-chance,
.btn-submit, .pill, .test-toggle-btn, .test-pill {
    font-family: var(--font);
}

/* Centre "Admission Chance" vertically with the logo */
.topnav-brand { display: flex; align-items: center; line-height: 1; }
.topnav-brand::before { flex: none; }

/* ── Glass: GPA field, SAT/ACT toggle, Holistic Profile Boost ────────────── */
/* one soft yellow glow behind the form so the glass has something to blur */
.panel-form {
    background-color: var(--surface);
    background-image: radial-gradient(circle 240px at 30% 40%, rgba(192,221,249,0.22), transparent 70%);
}

#gpa {
    background: rgba(255,255,255,0.55);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
}
#gpa:focus {
    background: rgba(255,255,255,0.75);
    box-shadow: 0 0 0 2px var(--yellow), inset 0 1px 0 rgba(255,255,255,0.9);
}

.test-toggle-btn, .test-pill {
    background: rgba(255,255,255,0.5);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: var(--r-control);
    box-shadow: 0 4px 14px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
}
.test-toggle-btn:hover, .test-pill:hover { background: rgba(192,221,249,0.25); color: var(--text); }
.test-toggle-btn.active, .test-pill.active {
    background: rgba(192,221,249,0.8);
    color: var(--text);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 6px 16px rgba(192,221,249,0.3), inset 0 1px 0 rgba(255,255,255,0.6);
}

.checklist-section {
    position: relative;
    border-radius: var(--r-card);
    background: rgba(255,255,255,0.55);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 28px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
}
.checklist-section:focus-within {
    box-shadow: 0 0 0 2px var(--yellow), inset 0 1px 0 rgba(255,255,255,0.9);
}
.checklist-section::before {          /* specular highlight */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 40%);
}
.checklist-section > * { position: relative; z-index: 1; }

/* ── Mobile: panels stack; the seam keeps the PC look, turned sideways ──── */
@media (max-width: 768px) {
    .topnav { padding: 8px 8px 0; margin-bottom: -60px; }

    /* colour + texture behind the glass nav and glass fields */
    .panel-form {
        background-image:
            radial-gradient(circle 190px at 88% 0%, rgba(192,221,249,0.5), transparent 70%),
            repeating-radial-gradient(circle at 12% 6%, transparent 0 26px, rgba(0,0,0,0.012) 27px 28px),
            radial-gradient(circle 260px at 30% 38%, rgba(192,221,249,0.22), transparent 70%);
        border-bottom: none;
    }
    .panel-form > .panel-inner { padding-bottom: 52px; }

    /* dark sheet: big rounded top corners + one bump of light surface hanging
       down from its top edge, with a small grab handle */
    .panel-result {
        margin-top: -28px;
        border-radius: 28px 28px 0 0;
        z-index: 2;
    }
    .panel-result::before {
        left: 50%; top: 0;
        width: 200px; height: 28px;
        transform: translateX(-50%);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 28'%3E%3Cpath fill='%23f6f5f2' d='M0 0 C34 0 40 24 74 24 L126 24 C160 24 166 0 200 0 Z'/%3E%3C/svg%3E");
    }
    .panel-result::after {
        left: 50%; top: 9px;
        width: 34px; height: 4px;
        transform: translateX(-50%);
    }
    .panel-result > .panel-inner { padding-left: 20px; padding-top: 52px; }

    h1 { font-size: 1.9rem; }
}




/* ── Empty-state icon ping ───────────────────────────────────────────────── */
.empty-icon { border-radius: 50%; animation: pulseRing 2.6s ease-out infinite; }
@keyframes pulseRing {
    0%   { box-shadow: 0 0 0 0 rgba(192,221,249,0.35); }
    100% { box-shadow: 0 0 0 30px rgba(192,221,249,0); }
}

@media (prefers-reduced-motion: reduce) {
    .empty-icon { animation: none; }
}






/* ══════════════════════════════════════════════════════════════════════════
   ROAM THEME v7 — clean soft-white inputs (append to bottom)
   Raised white surfaces, hairline edges, soft shadows, black active states,
   yellow kept as the accent.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --card-bg:     linear-gradient(180deg, #ffffff 0%, #f8f8f9 100%);
    --card-shadow: 0 1px 1px rgba(16,16,20,0.03),
                   0 8px 24px rgba(16,16,20,0.06),
                   inset 0 1px 0 #ffffff;
    --hairline:    1px solid rgba(16,16,20,0.05);
}

/* ── Backdrop: one faint warm wash, like the glow on the drone ───────────── */
.panel-form {
    background-color: var(--surface);   /* keep: the seam SVG uses this colour */
    background-image: radial-gradient(circle 220px at 90% 0%, rgba(192,221,249,0.22), transparent 70%);
    background-repeat: no-repeat;
}

/* ── Header chip ─────────────────────────────────────────────────────────── */
.header-eyebrow {
    width: auto;
    padding: 6px 14px;
    font-size: 10px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--card-shadow);
}
.header-eyebrow::before {
    display: block;
    width: 6px; height: 6px;
    opacity: 1;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 8px var(--yellow);
}

/* ── Labels: small, bold, caps ───────────────────────────────────────────── */
.form-group > label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Inputs: flat white, hairline edge, soft lift ────────────────────────── */
.panel-form input[type="number"],
.panel-form input[type="text"],
.panel-form select,
#gpa {
    background-color: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: var(--hairline);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}
.panel-form input[type="number"]:focus,
.panel-form input[type="text"]:focus,
.panel-form select:focus,
#gpa:focus {
    background-color: #fff;
    border-color: transparent;
    box-shadow: var(--card-shadow), 0 0 0 2px var(--yellow);
}

/* ── University dropdown ─────────────────────────────────────────────────── */
.uni-dropdown {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: var(--hairline);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(16,16,20,0.12);
}

/* ── SAT / ACT: white pill track, black active segment ───────────────────── */
.test-toggle,
.test-type-toggle {
    gap: 0;
    padding: 4px;
    background: #fff;
    border: var(--hairline);
    border-radius: 999px;
    box-shadow: var(--card-shadow);
}
.test-toggle-btn, .test-pill {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    border-radius: 999px;
    box-shadow: none;
    color: var(--text-muted);
}
.test-toggle-btn:hover, .test-pill:hover {
    background: rgba(16,16,20,0.04);
    color: var(--text);
}
.test-toggle-btn.active, .test-pill.active,
.test-toggle-btn.active:hover, .test-pill.active:hover {
    background: var(--night);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16,16,20,0.22);
}

/* ── Holistic checklist: raised white card ───────────────────────────────── */
.checklist-section {
    background: var(--card-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: var(--hairline);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
}
.checklist-section::before { display: none; }
.checklist-section:focus-within { box-shadow: var(--card-shadow); border-color: rgba(16,16,20,0.05); }
.checklist-header:hover { background: rgba(16,16,20,0.025); }

.checklist-icon {
    width: 24px; height: 24px;
    border-radius: 8px;
    background: var(--night);
    color: var(--yellow);
}
.checklist-count-badge { background: var(--night); color: #fff; }

.checklist-item:hover { background: rgba(16,16,20,0.03); }
.checklist-item:has(input:checked) { background: rgba(192,221,249,0.12); }
.checklist-check {
    background: #fff;
    border-color: rgba(16,16,20,0.2);
    border-radius: 6px;
}
.checklist-item input[type="checkbox"]:checked ~ .checklist-check {
    background: var(--night);
    border-color: var(--night);
}
.checklist-check::after,
.checklist-item input[type="checkbox"]:checked ~ .checklist-check::after { border-color: #fff; }

/* ── Primary button: black pill ──────────────────────────────────────────── */
.btn-submit {
    background: var(--night);
    color: #fff;
    border-radius: 999px;
    padding: 15px 20px;
    box-shadow: 0 10px 24px rgba(16,16,20,0.22), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-submit:hover {
    background: var(--night-3);
    box-shadow: 0 12px 28px rgba(16,16,20,0.28), 0 0 22px rgba(192,221,249,0.25);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badges { border-top: none; }
.badge {
    background: #fff;
    border: var(--hairline);
    border-radius: 999px;
    box-shadow: var(--card-shadow);
}





/* ══════════════════════════════════════════════════════════════════════════
   ROAM THEME v8 — sleek results panel (append to bottom)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Remove the glowing dot in the header chip ───────────────────────────── */
.header-eyebrow::before { display: none; }

/* ── Hero card: dark raised card with a soft tinted wash at the top ──────── */
.chance-display { --tone: 192,221,249; }
.chance-display.chance-high   { --tone: 16,185,129; }
.chance-display.chance-medium { --tone: 245,158,11; }
.chance-display.chance-low    { --tone: 239,68,68; }

.chance-display,
.chance-display.chance-high,
.chance-display.chance-medium,
.chance-display.chance-low {
    background-color: var(--night-2);
    background-image: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(var(--tone),0.16), transparent 70%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 40px 20px 34px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
}
.chance-number {
    font-weight: 500;
    letter-spacing: -0.045em;
}
.chance-label {
    display: inline-block;
    margin-top: 16px;
    padding: 6px 14px;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    opacity: 1;
    border-radius: 999px;
    border: 1px solid rgba(var(--tone),0.35);
    background: rgba(var(--tone),0.1);
}

/* ── Stat tiles: dark, hairline edge ─────────────────────────────────────── */
.stat-item {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 16px 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.stat-value { color: #fff; font-weight: 500; letter-spacing: -0.02em; }
.stat-label {
    color: #8e8e93;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}
.stat-range { color: #6c6c72; }

/* ── Advice: small caps heading, quiet cards, tiny yellow dot ────────────── */
.advice-heading {
    color: #8e8e93;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
}
.advice-list li {
    position: relative;
    padding: 14px 16px 14px 36px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    color: #c9c9cd;
}
.advice-list li::before {
    content: "";
    position: absolute;
    left: 16px; top: 21px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--yellow);
}

/* ── Notes ───────────────────────────────────────────────────────────────── */
.disclaimer {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    color: #8e8e93;
}
.disclaimer strong { color: #fff; }

/* ── School cards (College Finder) to match ──────────────────────────────── */
.school-card {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.school-card:hover { border-color: rgba(192,221,249,0.6); }









/* ══════════════════════════════════════════════════════════════════════════
   v8.1 — results panel contrast fix (append after v8)
   ══════════════════════════════════════════════════════════════════════════ */

/* Re-point the colour variables to light values inside the dark panel only.
   Anything in there that uses var(--text / --text-muted / --text-dim / --gold)
   becomes readable, including markup I haven't seen. */
.panel-result {
    --text:       #f4f4f2;
    --text-muted: #c4c4c9;
    --text-dim:   #9d9da3;
    --gold:       #ffffff;
    color: #f4f4f2;
}

/* The yellow profile button needs dark text, so put it back */
.panel-result .uni-profile-btn { color: #121213 !important; }

/* Hero number: brighter tones so they pop on the dark card */
.chance-display.chance-high   .chance-number { color: #34d399; }
.chance-display.chance-medium .chance-number { color: #fbbf24; }
.chance-display.chance-low    .chance-number { color: #f87171; }
.chance-display .chance-label { color: #f4f4f2; }

/* Cards and tiles slightly lighter than the panel so they separate from it */
.chance-display,
.chance-display.chance-high,
.chance-display.chance-medium,
.chance-display.chance-low { background-color: #1f1f22; }

.stat-item,
.advice-list li,
.school-card { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.1); }

/* Text inside them */
.stat-value   { color: #ffffff; }
.stat-label   { color: #b4b4ba; }
.stat-range   { color: #9d9da3; }
.advice-heading { color: #b4b4ba; }
.advice-list li { color: #e4e4e7; }
.disclaimer   { color: #b4b4ba; border-color: rgba(255,255,255,0.12); }
.school-rate  { color: #c4c4c9; }
.school-stats-row { color: #9d9da3; }
.results-sub  { color: #9d9da3; }





/* ── Match stat tiles + insights to the hero card background ─────────────── */
.stat-item,
.advice-list li {
    background: #1f1f22;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
}










/* ══════════════════════════════════════════════════════════════════════════
   v9 — lighter results panel (DISABLED — remove this line and the closing one to re-enable)

:root {
    --panel-dark: #4a4a50;
    --card-dark:  #56565d;
}

.panel-result,
.find-results-panel {
    background-color: var(--panel-dark);
}

.chance-display,
.chance-display.chance-high,
.chance-display.chance-medium,
.chance-display.chance-low,
.stat-item,
.advice-list li {
    background-color: var(--card-dark);
}

.legal-disclaimer { border-top-color: rgba(255,255,255,0.1) !important; }
.results-header   { border-bottom-color: rgba(255,255,255,0.1); }

══════════════════════════════════════════════════════════════════════════ */

/* ── Mobile: slightly larger brand, vertically centered in the nav ──────── */
@media (max-width: 480px) {
    .topnav-inner .topnav-brand {
        font-size: 1.2rem;
        height: 100%;
        display: flex;
        align-items: center;
        line-height: 1;
    }
}


/* ── Mobile: logo sized for 3x screens ──────────────────────────────────── */
@media (max-width: 768px) {
    .topnav-brand::before {
        background-image: url('/static/logo192px.png');
        background-size: 100% 100%;
        border-radius: 0;
    }
}






/* Order: logo, Union Jack, name */
.topnav-brand::before { order: -2; margin-right: 8px; }

.topnav-brand::after {
    content: "";
    order: -1;
    flex: none;
    width: 30px;
    height: 18px;
    margin-right: 10px;
    background: url('/static/union-jack120px.png') center / 100% 100% no-repeat;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(16,16,20,0.12);
}

@media (max-width: 480px) {
    .topnav-brand::after { width: 25px; height: 15px; margin-right: 8px; }
}