/**
 * IB Math Master — Syllabus Pages
 * Shared across all four syllabus pages (AA HL, AA SL, AI HL, AI SL)
 *
 * ASTRA OWNS: body, h1-h6, p, a, .ast-container, primary buttons, container
 * SHARED.CSS OWNS: .ib-btn, .ib-cta, .ib-faq, .ib-section, .frac, .math
 * TOKENS.CSS OWNS: :root variables
 *
 * This file: syl-* scoped classes only, plus minimal ib-* overrides
 * No bare element selectors. No :root. No external resources.
 */


/* =========================================
   MATH NOTATION — Pure CSS
   Fractions, math font, formula blocks
   Zero dependencies, zero performance cost
   ========================================= */

.frac {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    flex-shrink: 0;
    font-size: 0.85em;
    line-height: 1.15;
    margin: 0 2px;
    vertical-align: middle;
}

.frac-num {
    border-bottom: 1.5px solid currentColor;
    padding: 0 3px 2px;
    text-align: center;
}

.frac-den {
    padding: 2px 3px 0;
    text-align: center;
}

.math {
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-size: 1.02em;
    font-style: italic;
    letter-spacing: 0.5px;
}

.math-block {
    background: var(--ib-light);
    border-radius: 6px;
    display: inline-block;
    margin: 2px 0;
    padding: 2px 10px;
}


/* =========================================
   HERO
   Navy background, centered, decorative orbs
   ========================================= */

.syl-hero {
    background: var(--ib-navy);
    overflow: hidden;
    padding: 100px 0 84px;
    position: relative;
    text-align: center;
}

.syl-hero::before {
    background: radial-gradient(ellipse at 30% 20%, rgba(56, 189, 248, 0.12) 0%, transparent 50%);
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.syl-hero::after {
    background: radial-gradient(ellipse at 70% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.syl-hero-orb {
    border-radius: 50%;
    filter: blur(80px);
    position: absolute;
    z-index: 0;
}

.syl-hero-orb-1 {
    background: rgba(56, 189, 248, 0.15);
    height: 400px;
    left: -10%;
    top: -20%;
    width: 400px;
}

.syl-hero-orb-2 {
    background: rgba(99, 102, 241, 0.1);
    bottom: -30%;
    height: 350px;
    right: -5%;
    width: 350px;
}

.syl-hero-orb-3 {
    background: rgba(56, 189, 248, 0.06);
    height: 200px;
    right: 30%;
    top: 20%;
    width: 200px;
}

.syl-hero-inner {
    margin: 0 auto;
    max-width: 780px;
    position: relative;
    z-index: 1;
}

/* Remove dot from eyebrow on syllabus pages (all breakpoints) */
.syl-hero .ib-eyebrow::before {
    display: none;
}

.syl-hero .ib-eyebrow {
    color: var(--ib-accent);
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.syl-hero h1 {
    color: var(--ib-white);
    margin-bottom: 20px;
}

.syl-hero-sub {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.65;
    margin: 0 auto 36px;
    max-width: 620px;
}


/* =========================================
   HERO — Navigation Pills
   Glassmorphic anchor links in hero
   ========================================= */

.syl-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}

.syl-pill {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--ib-radius-pill);
    color: var(--ib-white);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    text-decoration: none;
    transition: all var(--ib-transition-fast);
}

.syl-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    transform: translateY(-1px);
}

.syl-pill::after {
    content: ' \2193';
    font-size: 10px;
    opacity: 0.5;
}

.syl-hero-link {
    color: rgba(255, 255, 255, 0.55);
    display: inline-block;
    font-size: 14px;
}

.syl-hero-link a {
    color: var(--ib-accent);
    font-weight: 500;
}

.syl-hero-link a:hover {
    color: var(--ib-accent-soft);
    text-decoration: none;
}


/* =========================================
   ASSESSMENT HEADING
   Centered heading above assessment cards
   ========================================= */

.syl-assess-header {
    margin-bottom: 48px;
    text-align: center;
}


/* =========================================
   ASSESSMENT CARDS
   4-card grid with sky blue accent lines
   ========================================= */

.syl-assess-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 48px;
}

.syl-assess-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

.syl-assess-card {
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    overflow: hidden;
    padding: 28px 24px;
    position: relative;
    transition: all var(--ib-transition);
}

.syl-assess-card::before {
    background: var(--ib-accent-hover);
    content: '';
    height: 3px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.syl-assess-card:hover {
    box-shadow: var(--ib-shadow-lg);
    transform: translateY(-4px);
}

.syl-assess-pct {
    color: var(--ib-accent-hover);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.syl-assess-name {
    color: var(--ib-navy);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.syl-assess-meta {
    border-top: 1px solid var(--ib-border);
    padding-top: 14px;
}

.syl-assess-duration {
    color: var(--ib-text);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.syl-assess-calc {
    color: var(--ib-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.syl-assess-text {
    color: var(--ib-text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 720px;
}

.syl-assess-text a {
    border-bottom: 1px solid var(--ib-accent-soft);
    color: var(--ib-accent-hover);
    font-weight: 600;
    padding-bottom: 1px;
    transition: border-color var(--ib-transition-fast);
}

.syl-assess-text a:hover {
    border-bottom-color: var(--ib-accent-hover);
    text-decoration: none;
}


/* =========================================
   COURSE CHECK PROMPT
   AA vs AI comparison link block
   ========================================= */

.syl-course-check {
    background: var(--ib-light);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-sm);
    margin-top: 36px;
    padding: 20px 24px;
    text-align: center;
}

.syl-course-check p {
    color: var(--ib-text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.syl-course-check strong {
    color: var(--ib-navy);
}

.syl-course-check a {
    color: var(--ib-accent-hover);
    font-weight: 600;
}


/* =========================================
   TOPICS LAYOUT
   Two-column grid: content + sticky nav
   ========================================= */

.syl-topics-layout {
    display: grid;
    gap: 48px;
    grid-template-columns: 1fr 200px;
}

.syl-topics-main {
    order: 1;
}


/* =========================================
   STICKY NAVIGATION — Desktop
   Right sidebar with colored right borders
   ========================================= */

.syl-page-nav {
    align-self: start;
    order: 2;
    position: sticky;
    top: 100px;
}

.syl-page-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
}

.syl-page-nav-label {
    color: var(--ib-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 12px 6px;
    text-transform: uppercase;
}

.syl-page-nav-divider {
    border-top: 1px solid var(--ib-border);
    margin: 8px 0;
}

.syl-page-nav-link {
    border-radius: var(--ib-radius-xs) 0 0 var(--ib-radius-xs);
    border-right: 3px solid transparent;
    color: var(--ib-text-muted);
    display: block;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 12px;
    position: relative; /* FIX 3: needed for ::after touch target */
    text-align: right;
    text-decoration: none;
    transition: all var(--ib-transition-fast);
}

/* FIX 3: invisible overlay expands touch target to 44×44px without visual change */
.syl-page-nav-link::after {
    content: '';
    display: block;
    left: 50%;
    min-height: 44px;
    min-width: 44px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.syl-page-nav-link:hover {
    background: var(--ib-light);
    color: var(--ib-navy);
    text-decoration: none;
}

/* Topic-colored nav links */
.syl-page-nav-link[data-topic="1"] { border-right-color: var(--topic-1-border); }
.syl-page-nav-link[data-topic="2"] { border-right-color: var(--topic-2-border); }
.syl-page-nav-link[data-topic="3"] { border-right-color: var(--topic-3-border); }
.syl-page-nav-link[data-topic="4"] { border-right-color: var(--topic-4-border); }
.syl-page-nav-link[data-topic="5"] { border-right-color: var(--topic-5-border); }

.syl-page-nav-link[data-topic="1"]:hover,
.syl-page-nav-link[data-topic="1"].is-active { color: var(--topic-1); background: var(--topic-1-bg); font-weight: 600; }
.syl-page-nav-link[data-topic="2"]:hover,
.syl-page-nav-link[data-topic="2"].is-active { color: var(--topic-2); background: var(--topic-2-bg); font-weight: 600; }
.syl-page-nav-link[data-topic="3"]:hover,
.syl-page-nav-link[data-topic="3"].is-active { color: var(--topic-3); background: var(--topic-3-bg); font-weight: 600; }
.syl-page-nav-link[data-topic="4"]:hover,
.syl-page-nav-link[data-topic="4"].is-active { color: var(--topic-4); background: var(--topic-4-bg); font-weight: 600; }
.syl-page-nav-link[data-topic="5"]:hover,
.syl-page-nav-link[data-topic="5"].is-active { color: var(--topic-5); background: var(--topic-5-bg); font-weight: 600; }

/* Section links (non-topic) */
.syl-page-nav-link.syl-nav-section { border-right-color: var(--ib-border); }
.syl-page-nav-link.syl-nav-section:hover,
.syl-page-nav-link.syl-nav-section.is-active { color: var(--ib-navy); background: var(--ib-light); font-weight: 600; border-right-color: var(--ib-navy); }

/* Mobile wrappers — invisible on desktop */
.syl-mob-topics,
.syl-mob-sections {
    display: contents;
}

/* Toggle button — unused, hidden */
.syl-nav-toggle {
    display: none;
}


/* =========================================
   AUTHORITY INTRO
   Centered teacher breakdown above topics
   ========================================= */

.syl-authority-intro {
    margin: 0 auto 40px;
    max-width: 700px;
    text-align: center;
}

.syl-authority-intro p {
    color: var(--ib-text-secondary);
    font-size: 17px;
    line-height: 1.8;
}

.syl-authority-intro p strong {
    color: var(--ib-navy);
    font-weight: 600;
}


/* =========================================
   TOPIC BLOCKS
   Always expanded, colored borders
   ========================================= */

.syl-topic-block {
    margin-bottom: 48px;
}

.syl-topic-block:last-child {
    margin-bottom: 0;
}

.syl-topic-heading {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 14px;
}

.syl-topic-num {
    border-radius: var(--ib-radius-xs);
    color: var(--ib-white);
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    text-align: center;
}

.syl-topic-num[data-t="1"] { background: var(--topic-1); }
.syl-topic-num[data-t="2"] { background: var(--topic-2); }
.syl-topic-num[data-t="3"] { background: var(--topic-3); }
.syl-topic-num[data-t="4"] { background: var(--topic-4); }
.syl-topic-num[data-t="5"] { background: var(--topic-5); }

/* Explicit color on topic titles for all breakpoints */
.syl-topic-title {
    color: var(--ib-navy);
    font-size: clamp(23px, 3vw, 29px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0; /* FIX 1: removes Astra heading margin that breaks flex alignment with badge */
}

/* Topic heading bottom borders */
[data-topic="1"] .syl-topic-heading { border-bottom: 3px solid var(--topic-1-border); }
[data-topic="2"] .syl-topic-heading { border-bottom: 3px solid var(--topic-2-border); }
[data-topic="3"] .syl-topic-heading { border-bottom: 3px solid var(--topic-3-border); }
[data-topic="4"] .syl-topic-heading { border-bottom: 3px solid var(--topic-4-border); }
[data-topic="5"] .syl-topic-heading { border-bottom: 3px solid var(--topic-5-border); }


/* =========================================
   SUBTOPICS
   Individual content items within topics
   ========================================= */

.syl-subtopic {
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.syl-subtopic:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.syl-subtopic h4 {
    align-items: center;
    color: var(--ib-navy);
    display: flex;
    font-size: 17px;
    font-weight: 700;
    gap: 10px;
    margin-bottom: 10px;
}

.syl-subtopic h4 .syl-sub-num {
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
}

[data-topic="1"] .syl-sub-num { background: var(--topic-1-chip); color: var(--topic-1); }
[data-topic="2"] .syl-sub-num { background: var(--topic-2-chip); color: var(--topic-2); }
[data-topic="3"] .syl-sub-num { background: var(--topic-3-chip); color: var(--topic-3); }
[data-topic="4"] .syl-sub-num { background: var(--topic-4-chip); color: var(--topic-4); }
[data-topic="5"] .syl-sub-num { background: var(--topic-5-chip); color: var(--topic-5); }

.syl-subtopic ul {
    color: var(--ib-text-secondary);
    font-size: 17px; /* FIX 2: +1px across all breakpoints */
    line-height: 1.85;
    list-style: none;
    padding-left: 0;
}

.syl-subtopic ul li {
    overflow-wrap: break-word;
    padding: 3px 0 3px 24px;
    position: relative;
    word-wrap: break-word;
}

.syl-subtopic ul li::before {
    border-radius: 50%;
    content: '';
    height: 6px;
    left: 6px;
    position: absolute;
    top: 13px;
    width: 6px;
}

[data-topic="1"] .syl-subtopic ul li::before { background: var(--topic-1-border); }
[data-topic="2"] .syl-subtopic ul li::before { background: var(--topic-2-border); }
[data-topic="3"] .syl-subtopic ul li::before { background: var(--topic-3-border); }
[data-topic="4"] .syl-subtopic ul li::before { background: var(--topic-4-border); }
[data-topic="5"] .syl-subtopic ul li::before { background: var(--topic-5-border); }


/* =========================================
   CROSS-LINKS
   Links to other syllabus pages
   ========================================= */

.syl-cross-links {
    align-items: center;
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 48px;
    padding: 20px 24px;
}

.syl-cross-links-label {
    color: var(--ib-text-muted);
    font-size: 14px;
    font-weight: 600;
}

.syl-cross-link {
    background: var(--ib-accent-softer);
    border: 1px solid var(--ib-accent-soft);
    border-radius: var(--ib-radius-xs);
    color: var(--ib-accent-hover);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    text-decoration: none;
    transition: all var(--ib-transition-fast);
}

.syl-cross-link:hover {
    background: var(--ib-accent-soft);
    color: var(--ib-navy);
    text-decoration: none;
}


/* =========================================
   EMAIL CAPTURE
   Navy card with email input
   ========================================= */

.syl-email {
    margin: 0 auto;
    max-width: 620px;
}

.syl-email-card {
    background: var(--ib-navy);
    border-radius: var(--ib-radius-xl);
    color: var(--ib-white);
    overflow: hidden;
    padding: 48px 40px;
    position: relative;
    text-align: center;
}

.syl-email-card > * {
    position: relative;
    z-index: 1;
}

.syl-email-card h3 {
    color: var(--ib-white);
    margin-bottom: 12px;
}

.syl-email-card > p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 24px;
}

.syl-email-form {
    display: flex;
    gap: 10px;
    margin: 0 auto 16px;
    max-width: 440px;
}

.syl-email-input {
    background: var(--ib-white);
    border: 2px solid var(--ib-white);
    border-radius: var(--ib-radius-sm);
    color: var(--ib-navy);
    flex: 1;
    font-family: inherit;
    font-size: 15px;
    padding: 14px 18px;
}

.syl-email-input::placeholder {
    color: var(--ib-text-muted);
}

.syl-email-input:focus {
    border-color: var(--ib-accent);
    outline: none;
}

.syl-email-btn {
    background: var(--ib-accent);
    border: none;
    border-radius: var(--ib-radius-sm);
    color: var(--ib-navy);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 24px;
    transition: all var(--ib-transition);
    white-space: nowrap;
}

.syl-email-btn:hover {
    background: var(--ib-accent-hover);
    color: var(--ib-white);
    transform: translateY(-2px);
}

.syl-email-fine {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    line-height: 1.6;
}

/* Secondary email variant (smaller, after FAQ) */
.syl-email-secondary .syl-email-card {
    padding: 36px 32px;
}

.syl-email-secondary .syl-email-card h3 {
    font-size: 20px;
}

.syl-email-secondary .syl-email-card > p {
    font-size: 15px;
    margin-bottom: 20px;
}


/* =========================================
   WHERE STUDENTS STRUGGLE
   Red X icon cards in 2-column grid
   ========================================= */

.syl-struggle-header {
    margin-bottom: 36px;
    text-align: center;
}

.syl-struggle-header p {
    color: var(--ib-text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin: 12px auto 0;
    max-width: 640px;
}

.syl-struggle-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

.syl-struggle-card {
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    display: flex;
    gap: 16px;
    padding: 24px;
    transition: box-shadow var(--ib-transition);
}

.syl-struggle-card:hover {
    box-shadow: var(--ib-shadow-md);
}

.syl-struggle-icon {
    align-items: center;
    background: #fef2f2;
    border-radius: var(--ib-radius-xs);
    color: #ef4444;
    display: flex;
    flex-shrink: 0;
    font-size: 18px;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.syl-struggle-text {
    color: var(--ib-text-secondary);
    font-size: 15px;
    line-height: 1.65;
}


/* =========================================
   GRADE COMPARISON (5 vs 7)
   Orange and green side-by-side cards
   ========================================= */

.syl-grade-wrapper {
    margin: 0 auto;
    max-width: 800px;
}

.syl-grade-wrapper > h2 {
    margin-bottom: 32px;
    text-align: center;
}

.syl-grade-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr 1fr;
}

.syl-grade-card {
    border-radius: var(--ib-radius-lg);
    padding: 32px 28px;
}

.syl-grade-card-5 {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.syl-grade-card-7 {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.syl-grade-badge {
    border-radius: var(--ib-radius-pill);
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 6px 18px;
}

.syl-grade-card-5 .syl-grade-badge {
    background: #fdba74;
    color: #7c2d12;
}

.syl-grade-card-7 .syl-grade-badge {
    background: #86efac;
    color: #14532d;
}

.syl-grade-card p {
    color: var(--ib-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.syl-grade-bottom {
    background: var(--ib-light);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    margin-top: 24px;
    padding: 24px 28px;
    text-align: center;
}

.syl-grade-bottom p {
    color: var(--ib-text-secondary);
    font-size: 16px;
    font-weight: 500;
}


/* =========================================
   HOW TUTORING HELPS
   Green checkmark cards in 2-column grid
   ========================================= */

.syl-tutor-header {
    margin-bottom: 36px;
    text-align: center;
}

.syl-tutor-header p {
    color: var(--ib-text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin: 12px auto 0;
    max-width: 680px;
}

.syl-tutor-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 28px;
}

.syl-tutor-card {
    align-items: flex-start;
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    display: flex;
    gap: 16px;
    padding: 22px;
    transition: box-shadow var(--ib-transition);
}

.syl-tutor-card:hover {
    box-shadow: var(--ib-shadow-sm);
}

.syl-tutor-icon {
    align-items: center;
    background: #ecfdf5;
    border-radius: var(--ib-radius-xs);
    color: #10b981;
    display: flex;
    flex-shrink: 0;
    font-size: 18px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.syl-tutor-text {
    color: var(--ib-text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.syl-tutor-full {
    grid-column: 1 / -1;
}


/* =========================================
   MID-PAGE CTA
   Bordered section with centered button
   ========================================= */

.syl-midcta-inner {
    margin: 0 auto;
    max-width: 600px;
    text-align: center;
}

.syl-midcta-inner h3 {
    margin-bottom: 16px;
}

.syl-midcta-inner > p {
    color: var(--ib-text-secondary);
    font-size: 16px;
    margin-bottom: 28px;
}


/* =========================================
   PROOF + TEXT LINKS
   ========================================= */

.syl-proof-link {
    align-items: center;
    background: none;
    border: none;
    border-radius: 0;
    color: var(--ib-accent-hover);
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 6px;
    margin-top: 20px;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: all var(--ib-transition-fast);
}

.syl-proof-link:hover {
    color: var(--ib-navy);
    text-decoration: underline;
}

.syl-text-link {
    color: var(--ib-text-muted);
    font-size: 14px;
    margin-top: 16px;
}

.syl-text-link a {
    color: var(--ib-accent-hover);
    font-weight: 500;
}

.syl-closing {
    border-left: 3px solid var(--ib-accent-soft);
    color: var(--ib-text-muted);
    font-size: 16px;
    font-style: italic;
    padding: 4px 0 4px 20px;
}


/* =========================================
   FAQ — Syllabus Overrides
   Narrows left column; darker answer text
   Base FAQ styles live in shared.css
   ========================================= */

.syl-faq .ib-faq-grid {
    grid-template-columns: 280px 1fr;
}

.syl-faq .ib-faq-answer p {
    color: var(--ib-text-secondary);
}

.syl-faq .ib-faq-answer a {
    border-bottom: 1px solid var(--ib-accent-soft);
    color: var(--ib-accent-hover);
    font-weight: 500;
}

.syl-faq .ib-faq-answer a:hover {
    border-bottom-color: var(--ib-accent-hover);
    text-decoration: none;
}


/* =========================================
   FINAL CTA — Syllabus Overrides
   Adjusts h2 size from shared.css default
   ========================================= */

.syl-cta .ib-cta-content h2 {
    font-size: clamp(30px, 4vw, 42px);
}

.syl-cta-proof {
    color: var(--ib-accent);
    display: inline-block;
    font-size: 14px;
    margin-top: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.syl-cta-proof:hover {
    color: var(--ib-accent-soft);
    text-decoration: underline;
}


/* =========================================
   RESPONSIVE — 1024px (Tablet)
   ========================================= */

@media (max-width: 1024px) {
    .syl-topics-layout {
        grid-template-columns: 1fr;
    }

    /*
     * FIX: position:sticky breaks if ANY ancestor has overflow:hidden.
     * Gutenberg wrappers and Astra containers often set this.
     * Force overflow:visible on the entire ancestor chain.
     */
    .entry-content .wp-block-html,
    .syl-topics-layout,
    .ib-section,
    .ib-section-light {
        overflow: visible;
    }

    /*
     * Sticky nav — compact 3-column card
     * #masthead is sticky at top:0 z-index:999, approx 70px tall.
     * top:80px sits just below it with a small gap.
     * Topics split into 2 sub-columns (3 rows max), sections as 3rd column.
     */
    .syl-page-nav {
        background: rgba(255, 255, 255, 0.97);
        border: 1px solid var(--ib-border);
        border-radius: 6px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
        margin: 0 0 24px;
        order: -1;
        padding: 8px 10px;
        position: sticky;
        top: 80px;
        z-index: 50;
    }

    /* Outer grid: topics area (2fr) + sections column (auto) */
    .syl-page-nav-list {
        align-items: start;
        display: grid;
        gap: 0 8px;
        grid-template-columns: 1fr 1fr auto;
    }

    .syl-page-nav-list li {
        display: contents;
    }

    /* Override display:contents for the two wrapper li elements.
     * Specificity 0,2,1 beats the generic li rule above (0,1,1). */
    .syl-page-nav-list li.syl-mob-topics {
        display: grid;
    }

    .syl-page-nav-list li.syl-mob-sections {
        display: flex;
    }

    .syl-page-nav-label {
        display: none;
    }

    .syl-page-nav-divider {
        display: none;
    }

    /* Topics — span first 2 columns, internal 2-col grid */
    .syl-mob-topics {
        display: grid;
        gap: 0 8px;
        grid-column: 1 / 3;
        grid-template-columns: 1fr 1fr;
    }

    /* Section links — 3rd column, stacked */
    .syl-mob-sections {
        align-self: start;
        border-left: 1px solid var(--ib-border);
        display: flex;
        flex-direction: column;
        gap: 0;
        grid-column: 3;
        padding-left: 8px;
    }

    .syl-page-nav-link {
        align-items: center;
        background: none;
        border: none;
        border-radius: 3px;
        color: var(--ib-text-muted);
        display: flex;
        font-size: 11px;
        font-weight: 500;
        line-height: 1.2;
        padding: 3px 5px;
        text-align: left;
        white-space: nowrap;
    }

    .syl-page-nav-link:hover {
        background: var(--ib-light);
    }

    .syl-page-nav-link::before {
        border-radius: 50%;
        content: '';
        display: inline-block;
        flex-shrink: 0;
        height: 5px;
        margin-right: 4px;
        width: 5px;
    }

    .syl-page-nav-link[data-topic="1"]::before { background: var(--topic-1); }
    .syl-page-nav-link[data-topic="2"]::before { background: var(--topic-2); }
    .syl-page-nav-link[data-topic="3"]::before { background: var(--topic-3); }
    .syl-page-nav-link[data-topic="4"]::before { background: var(--topic-4); }
    .syl-page-nav-link[data-topic="5"]::before { background: var(--topic-5); }

    .syl-page-nav-link[data-topic="1"].is-active { color: var(--topic-1); background: var(--topic-1-bg); font-weight: 700; }
    .syl-page-nav-link[data-topic="2"].is-active { color: var(--topic-2); background: var(--topic-2-bg); font-weight: 700; }
    .syl-page-nav-link[data-topic="3"].is-active { color: var(--topic-3); background: var(--topic-3-bg); font-weight: 700; }
    .syl-page-nav-link[data-topic="4"].is-active { color: var(--topic-4); background: var(--topic-4-bg); font-weight: 700; }
    .syl-page-nav-link[data-topic="5"].is-active { color: var(--topic-5); background: var(--topic-5-bg); font-weight: 700; }

    .syl-page-nav-link.syl-nav-section {
        color: var(--ib-text-muted);
        font-size: 10px;
    }

    .syl-page-nav-link.syl-nav-section::before {
        background: var(--ib-border);
    }

    .syl-page-nav-link.syl-nav-section.is-active {
        background: var(--ib-light);
        color: var(--ib-navy);
        font-weight: 700;
    }

    .syl-page-nav-link.syl-nav-section.is-active::before {
        background: var(--ib-navy);
    }

    /* Grids collapse */
    .syl-faq .ib-faq-grid {
        gap: 32px;
        grid-template-columns: 1fr;
    }

    .syl-struggle-grid,
    .syl-grade-grid,
    .syl-tutor-grid {
        grid-template-columns: 1fr;
    }

    /* Cross-links stay horizontal with wrap */
    .syl-cross-links {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
}


/* =========================================
   RESPONSIVE — 768px (Small tablet)
   ========================================= */

@media (max-width: 768px) {
    .syl-hero {
        padding: 72px 0 56px;
    }

    .syl-pills {
        gap: 6px;
    }

    .syl-pill {
        font-size: 11px;
        padding: 6px 14px;
    }

    .syl-assess-grid {
        gap: 12px;
        grid-template-columns: repeat(2, 1fr);
    }

    /* SL 3-card: keep 3 columns at tablet (still fits), remove centering cap */
    .syl-assess-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }

    .syl-email-form {
        flex-direction: column;
    }

    .syl-email-card {
        padding: 32px 20px;
    }

    .syl-topic-heading {
        gap: 10px;
    }

    .syl-topic-title {
        font-size: 21px;
    }

    /* Astra mobile header is shorter (~60px) */
    .syl-page-nav {
        padding: 6px 8px;
        top: 70px;
    }

    .syl-page-nav-link {
        font-size: 10.5px;
        padding: 2px 4px;
    }

    .syl-page-nav-link::before {
        height: 4px;
        margin-right: 3px;
        width: 4px;
    }

    .syl-page-nav-link.syl-nav-section {
        font-size: 9.5px;
    }

    .syl-mob-sections {
        padding-left: 8px;
    }

    /* Cross-links pill sizing for small screens */
    .syl-cross-link {
        font-size: 13px;
        padding: 5px 12px;
    }
}


/* =========================================
   RESPONSIVE — 480px (Mobile)
   ========================================= */

@media (max-width: 480px) {
    .syl-pills {
        gap: 5px;
    }

    .syl-pill {
        font-size: 10px;
        padding: 5px 12px;
    }

    .syl-pill::after {
        display: none;
    }

    .syl-hero-sub {
        font-size: 15px;
    }

    /* Assessment cards stay 2x2 on mobile */
    .syl-assess-grid {
        gap: 10px;
        grid-template-columns: repeat(2, 1fr);
    }

    /* SL 3-card: single column on mobile (avoids 2+1 orphan) */
    .syl-assess-grid-3 {
        grid-template-columns: 1fr;
    }

    .syl-assess-card {
        padding: 18px 14px;
    }

    .syl-assess-pct {
        font-size: 28px;
    }

    .syl-assess-name {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .syl-assess-duration {
        font-size: 13px;
    }

    .syl-assess-calc {
        font-size: 11px;
    }

    .syl-subtopic h4 {
        flex-wrap: wrap;
    }

    .syl-subtopic ul li {
        font-size: 16px; /* FIX 2: +1px (was 15px) */
        padding-left: 18px;
    }

    .syl-subtopic ul li::before {
        height: 5px;
        left: 2px;
        top: 11px;
        width: 5px;
    }

    /* Astra mobile header ~55-60px */
    .syl-page-nav {
        padding: 5px 6px;
        top: 65px;
    }

    .syl-page-nav-link {
        font-size: 10px;
        padding: 2px 3px;
    }

    .syl-page-nav-link::before {
        height: 4px;
        margin-right: 3px;
        width: 4px;
    }

    .syl-page-nav-link.syl-nav-section {
        font-size: 9px;
    }

    .syl-mob-sections {
        padding-left: 6px;
    }

    .syl-email-card h3 {
        font-size: 20px;
    }

    /* Cross-links still horizontal, smaller */
    .syl-cross-link {
        font-size: 12px;
        padding: 4px 10px;
    }

    .syl-cross-links-label {
        font-size: 12px;
    }
}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .syl-pill,
    .syl-assess-card,
    .syl-email-btn,
    .syl-cross-link {
        transition-duration: 0.01ms !important;
    }
}
