*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2541B2;
    --primary-light: #3b5bd9;
    --bg: #0a0a0a;
    --surface: #111111;
    --border: rgba(255,255,255,0.08);
    --text: #ffffff;
    --muted: #6b7280;
    --green: #4ade80;
    --red: #f43f5e;
    --blue: #60a5fa;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── Nav ── */
.nav {
    position: sticky; top: 0;
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.nav-inner {
    max-width: 1000px; margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.nav-logo-icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: white; flex-shrink: 0;
}
.nav-links { display: flex; gap: 20px; align-items: center; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: white; }
.nav-cta {
    padding: 8px 20px; background: white; color: #0a0a0a;
    border-radius: 100px; font-size: 13px; font-weight: 600;
    transition: background 0.2s;
}
.nav-cta:hover { background: #e5e5e5; }

/* ── Breadcrumb ── */
.breadcrumb {
    max-width: 1000px; margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 13px; color: var(--muted);
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: white; }
.breadcrumb-sep { color: #374151; }

/* ── Layout ── */
.page { max-width: 1000px; margin: 0 auto; padding: 40px 24px 100px; }

/* ── Hero ── */
.page-hero { text-align: center; margin-bottom: 52px; }
.college-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 100px;
    background: rgba(37,65,178,0.1); border: 1px solid rgba(37,65,178,0.3);
    color: #93c5fd; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 20px;
}
h1 {
    font-size: clamp(30px, 5.5vw, 52px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}
.page-hero p {
    font-size: 17px; color: var(--muted);
    max-width: 580px; margin: 0 auto; line-height: 1.7;
}
.hero-stats {
    display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
    margin-top: 32px; padding-top: 24px;
    border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 28px; font-weight: 800; color: var(--blue); }
.hero-stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Table of Contents ── */
.toc-container {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin: 0 auto 40px;
    max-width: 100%;
}
.toc-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toc-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 20px;
}
.toc-item a {
    font-size: 14px;
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.toc-item a:hover {
    color: white;
    text-decoration: underline;
}

/* ── Calculator Card ── */
.calc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}
.calc-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), #22d3ee);
}
.calc-card h2 {
    font-size: 22px; font-weight: 800; margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.calc-card-sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px; margin-bottom: 24px;
}
.calc-field label {
    display: block; font-size: 12px; font-weight: 700;
    color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.6px; margin-bottom: 8px;
}
.calc-field input {
    width: 100%; padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px; color: white;
    font-size: 18px; font-weight: 700; font-family: inherit;
    outline: none; transition: border-color 0.2s;
}
.calc-field input:focus { border-color: var(--primary-light); }
.calc-field input::placeholder { color: #374151; font-weight: 400; }

.target-row {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px; padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border); border-radius: 12px;
    font-size: 14px;
}
.target-row label { color: var(--muted); flex-shrink: 0; }
.target-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.target-btn {
    padding: 6px 14px; border-radius: 100px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04); color: var(--muted);
    transition: all 0.15s; font-family: inherit;
}
.target-btn:hover { background: rgba(255,255,255,0.08); color: white; }
.target-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.calc-btn {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; font-size: 16px; font-weight: 700;
    border: none; border-radius: 14px; cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    font-family: inherit; margin-bottom: 24px;
}
.calc-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 500px) { .result-grid { grid-template-columns: repeat(4, 1fr); } }
.result-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px; padding: 18px; text-align: center;
}
.result-label {
    font-size: 10px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.result-value {
    font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1;
}
.result-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }
.result-green { color: var(--green); }
.result-red   { color: var(--red); }
.result-white { color: white; }
.result-blue  { color: var(--blue); }

/* ── Status Banner ── */
.status-banner {
    display: none;
    padding: 14px 18px; border-radius: 12px;
    margin-bottom: 16px; font-size: 14px; font-weight: 600;
}
.status-safe {
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.25);
    color: var(--green);
}
.status-danger {
    background: rgba(244,63,94,0.08);
    border: 1px solid rgba(244,63,94,0.25);
    color: var(--red);
}

/* ── Sections ── */
.content-section { margin-bottom: 56px; }
.content-section h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; color: white; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.content-section h3 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; color: #f1f5f9; }
.content-section p { color: #d1d5db; line-height: 1.8; margin-bottom: 16px; }
.content-section ul, .content-section ol { padding-left: 20px; color: #d1d5db; line-height: 1.8; margin-bottom: 16px; }
.content-section ul li, .content-section ol li { margin-bottom: 6px; }

/* ── Component Blocks (Warning, Info, Callouts) ── */
.info-card {
    background: rgba(37,65,178,0.07);
    border: 1px solid rgba(37,65,178,0.2);
    border-radius: 16px; padding: 24px; margin: 24px 0;
}
.info-card h4 { font-size: 15px; font-weight: 700; color: #93c5fd; margin-bottom: 10px; }
.info-card p { color: #9ca3af; font-size: 14px; line-height: 1.8; margin: 0; }

.warning-card {
    background: rgba(244,63,94,0.06);
    border: 1px solid rgba(244,63,94,0.2);
    border-radius: 16px; padding: 24px; margin: 24px 0;
}
.warning-card h4 { font-size: 15px; font-weight: 700; color: #fca5a5; margin-bottom: 10px; }
.warning-card p { color: #d1d5db; font-size: 14px; line-height: 1.8; margin: 0; }

.formula-box {
    background: rgba(37,65,178,0.08);
    border: 1px solid rgba(37,65,178,0.2);
    border-radius: 14px; padding: 20px 24px; margin: 24px 0;
    color: #93c5fd; font-size: 15px; font-weight: 600; line-height: 1.7;
    font-family: monospace, monospace;
}

.example-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 16px; padding: 24px; margin: 24px 0;
}
.example-box h4 {
    font-size: 13px; font-weight: 700; color: var(--blue);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px;
}
.example-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.example-row:last-child { border-bottom: none; }
.example-row-label { color: var(--muted); }
.example-row-value { font-weight: 700; }

/* ── Rule Table ── */
.rule-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.rule-table th {
    text-align: left; padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
}
.rule-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.rule-table tr:last-child td { border-bottom: none; }
.pill {
    display: inline-block; padding: 2px 8px; border-radius: 100px;
    font-size: 11px; font-weight: 700;
}
.pill-green { background: rgba(74,222,128,0.15); color: var(--green); }
.pill-red   { background: rgba(244,63,94,0.15);  color: var(--red); }
.pill-yellow{ background: rgba(234,179,8,0.15);  color: #fbbf24; }

/* ── FAQ ── */
.faq-section { margin-bottom: 56px; }
.faq-title { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 24px; color: white; }
.faq-item {
    border: 1px solid var(--border); border-radius: 14px;
    margin-bottom: 10px; overflow: hidden;
}
.faq-q {
    width: 100%; background: rgba(255,255,255,0.03); border: none;
    color: white; font-family: inherit; font-size: 15px; font-weight: 600;
    padding: 18px 20px; text-align: left; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    transition: background 0.2s;
}
.faq-q:hover { background: rgba(255,255,255,0.06); }
.faq-q .arrow { flex-shrink: 0; transition: transform 0.25s; font-size: 12px; color: var(--muted); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
    padding: 0 20px; color: var(--muted); font-size: 14px; line-height: 1.8;
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 20px 18px; }

/* ── Link Cards ── */
.link-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; margin-top: 16px;
}
.link-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 22px;
    transition: border-color 0.2s, transform 0.2s;
    display: flex; flex-direction: column; gap: 8px;
}
.link-card:hover { border-color: rgba(59,91,217,0.4); transform: translateY(-2px); }
.link-card-icon { font-size: 22px; }
.link-card-title { font-size: 15px; font-weight: 700; color: white; }
.link-card-desc { font-size: 13px; color: var(--muted); }

/* ── Footer ── */
.footer {
    text-align: center; padding: 40px 24px;
    border-top: 1px solid var(--border);
    color: var(--muted); font-size: 13px;
    margin-top: 60px;
}
.footer a { color: var(--blue); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .calc-card { padding: 24px 16px; }
    h1 { letter-spacing: -1px; }
    .hero-stats { gap: 20px; }
    .calc-grid { grid-template-columns: 1fr 1fr; }
}
