/* ── Imports: refined professional fonts ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?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&display=swap');

/* ── Variables: sophisticated, calm, and accessible ─────────────────────── */
:root {
    --bg:           #f8fafc;
    --bg2:          #ffffff;
    --panel-border: rgba(0,0,0,0.06);
    --gold:         #2563eb;
    --gold-light:   #3b82f6;
    --gold-dim:     rgba(37,99,235,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: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    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: 12px;
    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(--gold);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--gold-dim);
}

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 {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.35;
}

.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: three columns ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--bg2);
    border: 1px solid var(--input-border);
    border-radius: 18px;
    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: 14px;
    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; }
}

/* ── 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; }
.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);
    margin-left: 8px;
}

/* ── 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 */
}

.card-icon-btn.is-fav { border-color: #e05252; color: #e05252; background: #fef2f2; }
.card-icon-btn.is-cmp { border-color: #1a9e6e; color: #1a9e6e; background: #e8f7f2; }


/* ══════════════════════════════════════════════════════════════════════════
   MODAL STYLES (for signup modal) — moved from modal.js for consistency
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
#ac-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.22s ease;
}
#ac-modal-overlay.open {
    opacity: 1;
}

/* ── Modal Box ── */
#ac-modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 20px 24px 20px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    transform: translateY(12px);
    transition: transform 0.22s ease;
    font-family: 'Inter', system-ui, sans-serif;
}
#ac-modal-overlay.open #ac-modal-box {
    transform: translateY(0);
}

/* Compact form spacing inside modal */
#acm-form {
    gap: 6px;
}
#acm-form .acm-field {
    margin-bottom: 2px;
}
#acm-form .acm-section-label {
    margin: 4px 0 2px;
}
#acm-form .acm-consent-section {
    padding: 8px 12px;
    margin: 6px 0;
    gap: 6px;
}
#acm-form .acm-check-row {
    padding: 0;
}
#acm-form .acm-btn-primary {
    margin-top: 4px;
    padding: 10px 16px;
}
#ac-modal-subtitle {
    margin-bottom: 12px;
}
.acm-icon-row {
    margin-bottom: 4px;
}

/* Close button */
#ac-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
#ac-modal-close:hover {
    background: #f1f5f9;
    color: #334155;
}

/* Modal header */
.acm-icon-row {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 8px;
}
#ac-modal-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 5px;
}
#ac-modal-subtitle {
    text-align: center;
    font-size: 0.81rem;
    color: #64748b;
    margin: 0 0 18px;
    line-height: 1.55;
}

/* Modal section labels */
.acm-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 8px 0 6px;
}

/* Modal buttons */
.acm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}
.acm-btn:hover {
    transform: translateY(-1px);
}
.acm-btn:active {
    transform: translateY(0);
}
.acm-btn-primary {
    background: linear-gradient(135deg, #1a9e6e 0%, #0f7a55 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(26, 158, 110, 0.35);
    margin-top: 6px;
}
.acm-btn-primary:hover {
    box-shadow: 0 5px 18px rgba(26, 158, 110, 0.45);
}
.acm-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Modal form fields */
.acm-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}
.acm-field label {
    font-size: 0.72rem;  /* was 0.68rem — ~11.5px */
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.acm-field input,
.acm-field select {
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.87rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.acm-field input:focus,
.acm-field select:focus {
    border-color: #1a9e6e;
    box-shadow: 0 0 0 3px rgba(26, 158, 110, 0.12);
    background: #fff;
}
.acm-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

/* Modal consent section (single box with 3 checkboxes) */
/* Consent section */
.acm-consent-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e2e8f0;
}
.acm-consent-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.acm-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 4px 0;
}
.acm-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #1a9e6e;
    cursor: pointer;
}
.acm-check-row span {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.45;
}
.acm-check-row span a {
    color: #1a9e6e;
    text-decoration: none;
    font-weight: 500;
}
.acm-check-row span a:hover {
    text-decoration: underline;
}

/* Data broker disclosure box */
.acm-data-broker-disclosure {
    background: #fef9e6;
    border-left: 3px solid #f5a623;
    padding: 10px 12px;
    margin: 8px 0;
    font-size: 0.75rem;  /* was 0.65rem — changed to ~12px */
    color: #8b6914;
    line-height: 1.5;    /* was 1.4 — increased for readability */
    border-radius: 6px;
}
.acm-data-broker-disclosure a {
    color: #1a9e6e;
}

/* Modal error */
.acm-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.8rem;
    color: #dc2626;
    margin: 8px 0;
}

/* Sign in link */
.acm-signin-link {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 12px 0 3px;
}
.acm-signin-link a {
    color: #1a9e6e;
    font-weight: 600;
    text-decoration: none;
}
.acm-signin-link a:hover {
    text-decoration: underline;
}
.acm-later-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.78rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px 0 0;
}
.acm-later-btn:hover {
    color: #64748b;
}

/* Floating heart (already in your CSS, but ensuring consistency) */
#ac-float-heart {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 8000;
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    padding: 10px 18px 10px 14px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    user-select: none;
}
#ac-float-heart:hover {
    border-color: #e05252;
    box-shadow: 0 6px 24px rgba(224, 82, 82, 0.18);
    transform: translateY(-2px);
}
#ac-float-heart .fh-icon {
    font-size: 1.1rem;
    line-height: 1;
}
#ac-float-count {
    color: #64748b;
}

/* ── Responsive: hide left panel on mobile so button is visible ── */
@media (max-width: 700px) {
    #ac-modal-box {
        padding: 16px;
        max-width: 95%;
        max-height: 90vh;
    }
    /* Two-column layout becomes single column */
    #ac-modal-box > div:first-child {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    /* Hide the left pitch panel on mobile to save vertical space */
    #ac-modal-box > div:first-child > div:first-child {
        display: none;
    }
    .acm-field-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .acm-consent-section {
        padding: 8px 10px;
    }
    .acm-btn-primary {
        margin-top: 2px;
        padding: 10px 16px;
    }
    .acm-section-label {
        margin: 2px 0 2px;
    }
    #ac-modal-subtitle {
        margin-bottom: 8px;
    }
    #ac-float-heart {
        bottom: 16px;
        right: 16px;
        padding: 8px 12px 8px 10px;
    }
}


.ac-modal-feature div {
    display: flex;
    flex-direction: column;
    gap: 0px;
}
.ac-modal-feature div strong {
    font-size: 0.95rem;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}
.ac-modal-feature div span {
    font-size: 0.82rem;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

/* ── 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; }

    /* Floating heart button — move up to avoid browser chrome */
    #ac-float-heart { bottom: 72px; right: 14px; }
}

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

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

