@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:wght@400;500;600;700&display=swap');

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

:root {
    --navy: #05213A;
    --navy-light: #0a3358;
    --blue: #0177BF;
    --blue-soft: #1a8ad4;
    --green: #3D7A2A;
    --gold: #DFA126;
    --gold-light: #F0DDC0;
    --burgundy: #7b0b2f;
    --burgundy-light: #9a1040;
    --warm-brown: #B27D45;
    --white: #FFFFFF;
    --off-white: #f9f6f2;
    --light-bg: #f2ece4;
    --text: #1a1a1a;
    --text-body: #3d3d3d;
    --text-muted: #6b6b6b;
    --blue-tint: rgba(1, 119, 191, 0.06);
    --card-shadow: 0 8px 24px rgba(5, 33, 58, 0.1), 0 2px 8px rgba(5, 33, 58, 0.06);
    --card-shadow-hover: 0 12px 32px rgba(5, 33, 58, 0.16), 0 6px 16px rgba(5, 33, 58, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
}

body {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-body);
    background: radial-gradient(circle at 10% 0%, rgba(223, 161, 38, 0.2), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(1, 119, 191, 0.06), transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(123, 11, 47, 0.06), transparent 50%),
        var(--off-white);
    min-height: 100vh;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

a {
    color: var(--navy);
}

/* ── Navbar ────────────────────────────────────────────────────────── */

.navbar {
    background: rgba(255, 255, 255, 0.92);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(5, 33, 58, 0.08);
    box-shadow: 0 8px 24px rgba(5, 33, 58, 0.08);
    backdrop-filter: blur(14px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.nav-brand {
    color: var(--navy);
    text-decoration: none;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    padding: 0.75rem 0;
    letter-spacing: -0.01em;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link {
    display: block;
    color: var(--text-body);
    text-decoration: none;
    padding: 1.3rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: var(--navy);
}

.nav-link.active {
    font-weight: 700;
    position: relative;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1.1rem;
    right: 1.1rem;
    height: 3px;
    background: var(--gold);
    border-radius: 3px 3px 0 0;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 14px 28px rgba(5, 33, 58, 0.12);
    min-width: 240px;
    list-style: none;
    overflow: hidden;
    z-index: 200;
    border-top: 3px solid var(--gold);
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: background 0.15s;
}

.dropdown-menu a:hover {
    background: rgba(5, 33, 58, 0.06);
    color: var(--navy);
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-bottom: 0.5rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 0.75rem 0;
    }

    .nav-link.active::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: var(--off-white);
        border-radius: var(--radius);
        border-top: none;
    }

    .dropdown-menu a {
        padding: 0.5rem 1.5rem;
        text-transform: none;
    }
}

/* ── Header / Hero ────────────────────────────────────────────────── */

header {
    background: var(--navy);
    color: var(--white);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    border-bottom: 3px solid var(--gold);
}

header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    margin-bottom: 0.4rem;
    color: var(--white);
    letter-spacing: -0.02em;
}

.hero-header {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 5rem 2rem 4.5rem;
    overflow: hidden;
}

.hero-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(123, 11, 47, 0.3) 0%,
        rgba(5, 33, 58, 0.85) 30%,
        rgba(5, 33, 58, 0.7) 70%,
        rgba(1, 119, 191, 0.25) 100%
    );
}

.hero-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(223, 161, 38, 0.2), transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(1, 119, 191, 0.15), transparent 50%);
    pointer-events: none;
}

.hero-header > * {
    position: relative;
    z-index: 1;
}

.header-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.25rem;
    border: 4px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-family: 'Source Sans 3', sans-serif;
    opacity: 0.85;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Footer ────────────────────────────────────────────────────────── */

.site-footer {
    background: linear-gradient(120deg, var(--navy), var(--navy-light), #0c3a62);
    color: rgba(255, 255, 255, 0.65);
    margin-top: auto;
    font-size: 0.88rem;
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(5, 33, 58, 0.08));
    pointer-events: none;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 1.5rem;
        gap: 2rem;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-brand {
        align-items: center;
    }
}

.footer-brand p {
    line-height: 1.6;
}

.footer-contact a {
    color: var(--gold-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-links h4 {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

@media (max-width: 768px) {
    .footer-social {
        justify-content: center;
    }
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    transition: background 0.2s, transform 0.15s;
}

.footer-social a:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(223, 161, 38, 0.35);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ── Main content ──────────────────────────────────────────────────── */

main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2rem 3.5rem;
    flex: 1;
}

@media (max-width: 768px) {
    main {
        padding: 1.5rem 1.25rem 3rem;
    }
}

/* ── Breadcrumb ────────────────────────────────────────────────────── */

.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
    padding: 0.65rem 1.1rem;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow);
    color: var(--text-muted);
    border-top: 3px solid var(--gold);
}

.breadcrumb a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .sep {
    margin: 0 0.5rem;
    color: #bbb;
}

/* ── Section headings ──────────────────────────────────────────────── */

.section-heading {
    margin: 2.5rem 0 1.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--navy);
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.gold-line {
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--burgundy), var(--blue-soft));
    border: none;
    margin-bottom: 1.75rem;
    border-radius: 2px;
}

/* ── Welcome section (Home) ────────────────────────────────────────── */

.welcome-section {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1rem;
    border: 1px solid rgba(5, 33, 58, 0.06);
    border-top: 3px solid var(--gold);
}

.welcome-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.welcome-text {
    flex: 1;
}

.welcome-image {
    flex-shrink: 0;
    width: 220px;
}

.welcome-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border: 2px solid rgba(223, 161, 38, 0.15);
}

@media (max-width: 640px) {
    .welcome-content {
        flex-direction: column;
    }

    .welcome-image {
        width: 100%;
    }

    .welcome-section {
        padding: 1.75rem;
    }
}

.welcome-text h2 {
    color: var(--navy);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.welcome-text h3 {
    color: var(--navy);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    color: var(--text-body);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.welcome-text ul {
    padding-left: 1.5rem;
    color: var(--text-body);
}

.welcome-text li {
    margin-bottom: 0.35rem;
}

/* ── Grade cards ───────────────────────────────────────────────────── */

.grade-cards {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 540px) {
    .grade-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grade-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s;
    text-align: center;
}

.grade-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-6px);
}

.grade-card-image {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(5, 33, 58, 0.1);
}

.grade-book {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.grade-range {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.grade-chapters {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    background: rgba(223, 161, 38, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(223, 161, 38, 0.2);
}

/* ── Book layout (sidebar + content) ───────────────────────────────── */

.book-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.grade-sidebar {
    flex-shrink: 0;
    width: 180px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
}

.sidebar-link {
    display: block;
    padding: 0.8rem 1.25rem;
    text-decoration: none;
    color: var(--text-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.sidebar-link:hover {
    background: rgba(223, 161, 38, 0.08);
    border-left-color: var(--gold);
}

.sidebar-link.active {
    background: var(--navy);
    color: var(--white);
    border-left-color: var(--gold);
    font-weight: 600;
}

.book-content {
    flex: 1;
    min-width: 0;
}

.book-content h2 {
    color: var(--navy);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

@media (max-width: 640px) {
    .book-layout {
        flex-direction: column;
    }

    .grade-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 0.65rem 1rem;
    }

    .sidebar-link:hover {
        border-left: none;
        border-bottom-color: var(--gold);
    }

    .sidebar-link.active {
        border-left: none;
        border-bottom-color: var(--gold);
    }
}

/* ── Grade tabs ───────────────────────────────────────────────────── */

.grade-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.grade-tab {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    color: var(--text-body);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--card-shadow);
    border: 2px solid transparent;
    transition: all 0.25s;
}

.grade-tab:hover {
    border-color: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
}

.grade-tab.active {
    background: linear-gradient(180deg, var(--navy-light), var(--navy));
    color: var(--white);
    border-color: var(--navy);
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(5, 33, 58, 0.15);
}

/* ── Resource cards ───────────────────────────────────────────────── */

.resource-card {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s;
}

a.resource-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.resource-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 3rem;
    text-align: center;
}

.resource-body {
    flex: 1;
}

.resource-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.resource-detail {
    font-size: 0.9rem;
    color: var(--text-body);
    margin-bottom: 0.3rem;
}

.resource-detail p {
    margin-bottom: 0.5rem;
}

.resource-detail ul {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.resource-detail li {
    margin-bottom: 0.25rem;
}

.resource-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Book description ─────────────────────────────────────────────── */

.book-description {
    font-size: 0.95rem;
    color: var(--text-body);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ── Chapter list ──────────────────────────────────────────────────── */

.chapter-list {
    display: grid;
    gap: 1rem;
}

.chapter-card {
    display: block;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.2s;
}

.chapter-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateX(4px);
    border-left-color: var(--burgundy);
}

.chapter-number {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.chapter-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
}

/* ── Quiz form ─────────────────────────────────────────────────────── */

.quiz-form {
    display: grid;
    gap: 1.25rem;
}

.quiz-contact-group {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    display: grid;
    gap: 1.25rem;
    border-top: 3px solid var(--gold);
}

.quiz-contact-group .name-field {
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border-top: none;
}

.name-field {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
}

.name-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--navy);
    font-size: 0.95rem;
}

.name-field input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #dde3e8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text);
}

.name-field input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(223, 161, 38, 0.15);
}

.field-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.quiz-section-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.quiz-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dde3e8;
}

.question-card {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--blue);
}

.question-card.q-matching   { border-left-color: var(--green); }
.question-card.q-mc         { border-left-color: var(--blue); }
.question-card.q-tf         { border-left-color: var(--gold); }
.question-card.q-short      { border-left-color: var(--warm-brown); }

.question-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.question-num-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.q-matching .question-num-badge   { background: var(--green); }
.q-mc .question-num-badge         { background: var(--blue); }
.q-tf .question-num-badge         { background: var(--gold); }
.q-short .question-num-badge      { background: var(--warm-brown); }

.question-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(223, 161, 38, 0.1);
    color: var(--gold);
    border: 1px solid rgba(223, 161, 38, 0.2);
}

.q-matching .question-type-badge   { background: rgba(61, 122, 42, 0.08); color: var(--green); border-color: rgba(61, 122, 42, 0.2); }
.q-mc .question-type-badge         { background: var(--blue-tint); color: var(--blue); border-color: rgba(1, 119, 191, 0.2); }
.q-tf .question-type-badge         { background: rgba(223, 161, 38, 0.1); color: #b8860b; border-color: rgba(223, 161, 38, 0.2); }
.q-short .question-type-badge      { background: rgba(178, 125, 69, 0.08); color: var(--warm-brown); border-color: rgba(178, 125, 69, 0.2); }

.question-text {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 1.15rem;
    line-height: 1.55;
    color: var(--navy);
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1px solid #eef1f4;
}

.option-label:last-child {
    margin-bottom: 0;
}

.option-label:hover {
    background: rgba(223, 161, 38, 0.06);
    border-color: rgba(223, 161, 38, 0.2);
}

.option-label input[type="radio"] {
    accent-color: var(--navy);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.option-label span {
    font-size: 0.95rem;
    color: var(--text-body);
}

.short-answer-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #dde3e8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text);
    resize: vertical;
}

.short-answer-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(223, 161, 38, 0.15);
}

select.short-answer-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.submit-btn {
    background: linear-gradient(180deg, var(--navy-light), var(--navy));
    color: var(--white);
    border: none;
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: 100%;
    box-shadow: 0 10px 20px rgba(5, 33, 58, 0.15);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
    border-radius: 50px 50px 0 0;
}

.submit-btn:hover {
    background: linear-gradient(180deg, var(--burgundy-light), var(--burgundy));
    box-shadow: 0 12px 28px rgba(123, 11, 47, 0.25);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ── Results ───────────────────────────────────────────────────────── */

.score-card {
    text-align: center;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    color: var(--white);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.score-great { background: linear-gradient(135deg, var(--green), #4a9932); }
.score-good  { background: linear-gradient(135deg, var(--warm-brown), var(--gold)); }
.score-try   { background: linear-gradient(135deg, #c0392b, #e74c3c); }

.score-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
}

.score-label {
    font-size: 1.1rem;
    margin-top: 0.4rem;
    opacity: 0.9;
}

.results-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.result-card {
    display: flex;
    gap: 1rem;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid #ddd;
    transition: transform 0.15s;
}

.result-card:hover {
    transform: translateX(2px);
}

.result-card.correct   { border-left-color: var(--green); }
.result-card.incorrect { border-left-color: #d21a1a; }
.result-card.review    { border-left-color: var(--gold); }

.result-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.correct .result-status   { color: var(--white); background: var(--green); }
.incorrect .result-status { color: var(--white); background: #d21a1a; }
.review .result-status    { color: var(--white); background: var(--gold); }

.result-body { flex: 1; }

.result-question {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--navy);
    font-size: 0.95rem;
}

.result-answer {
    font-size: 0.9rem;
    color: var(--text-body);
}

.result-correct {
    font-size: 0.9rem;
    color: var(--green);
    margin-top: 0.2rem;
}

.result-note {
    font-size: 0.85rem;
    color: var(--warm-brown);
    font-style: italic;
    margin-top: 0.2rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.25s;
    box-shadow: 0 10px 20px rgba(5, 33, 58, 0.12);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
    border-radius: 50px 50px 0 0;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(180deg, var(--navy-light), var(--navy));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--burgundy-light), var(--burgundy));
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(123, 11, 47, 0.25);
}

.btn-secondary {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-secondary:hover {
    background: linear-gradient(180deg, var(--navy-light), var(--navy));
    color: var(--white);
    transform: translateY(-2px);
}

/* ── About page ────────────────────────────────────────────────────── */

.about-section {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1rem;
    border: 1px solid rgba(5, 33, 58, 0.06);
    border-top: 3px solid var(--gold);
}

.about-section h2 {
    color: var(--navy);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.about-section p {
    color: var(--text-body);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.about-info-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .about-info-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-section {
        padding: 1.75rem;
    }
}

@media (max-width: 480px) {
    .about-info-row {
        grid-template-columns: 1fr;
    }
}

.about-info-card {
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    border-top: 3px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s;
}

.about-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.about-info-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.about-info-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.contact-headshot {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 3px solid var(--gold-light);
    margin: 0 auto 1rem;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.team-details {
    padding: 1.25rem 1.75rem;
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.7;
    text-align: left;
}

.team-details p {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.6rem;
}

.team-details ul {
    padding-left: 1.25rem;
}

.team-details li {
    margin-bottom: 0.35rem;
}

/* ── Contact page ──────────────────────────────────────────────────── */

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 540px) {
    .contact-cards {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    display: block;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.75rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--burgundy));
}

.contact-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.contact-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--navy);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.contact-card-role {
    font-size: 0.82rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.85rem;
}

.contact-card-detail {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
}

.contact-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    margin: 0 auto 1.25rem;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
    transition: transform 0.25s, background 0.25s;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
}

.contact-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .contact-info-row {
        grid-template-columns: 1fr;
    }
}

.contact-info-card {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s;
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.contact-info-card:hover .contact-icon {
    transform: scale(1.1);
    background: var(--burgundy);
}

.contact-info-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.contact-info-card p {
    font-size: 0.9rem;
    color: var(--text-body);
    margin: 0;
    line-height: 1.7;
}

.contact-info-card a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
}

.contact-info-card a:hover {
    text-decoration: underline;
}

.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(31, 27, 25, 0.06);
}

.contact-map iframe {
    display: block;
    border-radius: var(--radius-lg);
}

/* ── Reflection form ──────────────────────────────────────────────── */

.reflect-intro {
    font-size: 0.95rem;
    color: var(--text-body);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.reflect-contact-group {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    border-top: 3px solid var(--gold);
}

.reflect-contact-group .name-field {
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    border-top: none;
}

.reflect-contact-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 1rem;
    margin-top: 1.25rem;
}

@media (max-width: 540px) {
    .reflect-contact-row {
        grid-template-columns: 1fr;
    }
}

.session-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #dde3e8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.session-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(223, 161, 38, 0.15);
}

.reflect-options-group {
    display: grid;
    gap: 0;
}

.reflect-option {
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: 0;
    box-shadow: var(--card-shadow);
    border-left: 4px solid #dde3e8;
    transition: border-color 0.25s, background 0.2s;
    overflow: hidden;
}

.reflect-option:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.reflect-option:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.reflect-option + .reflect-option {
    border-top: 1px solid #eef1f4;
}

.reflect-option.active {
    border-left-color: var(--gold);
    background: rgba(223, 161, 38, 0.04);
}

.reflect-option-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.5rem;
    cursor: pointer;
    transition: background 0.15s;
}

.reflect-option-header:hover {
    background: rgba(223, 161, 38, 0.06);
}

.reflect-option-header input[type="radio"] {
    accent-color: var(--navy);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.reflect-option-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef1f4;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.reflect-option.active .reflect-option-number {
    background: var(--navy);
    color: var(--white);
}

.reflect-option-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.reflect-option-title {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
}

.reflect-option-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

.reflect-option-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.reflect-option.active .reflect-option-body {
    max-height: 400px;
    padding: 0 1.5rem 1.5rem;
}

.reflect-option-body textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #dde3e8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reflect-option-body textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(223, 161, 38, 0.15);
}

.reflect-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.reflect-prompt-item {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--white);
    border: 1px solid rgba(223, 161, 38, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-body);
    font-style: italic;
}

/* ── Reflection success ───────────────────────────────────────────── */

.success-card {
    text-align: center;
    padding: 3rem 2.5rem;
    background: linear-gradient(180deg, #fffdf8, var(--white));
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--green);
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-card h2 {
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.success-card p {
    color: var(--text-body);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* ── Focus Accessibility ──────────────────────────────────────────── */

*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* ── Micro-Interactions ──────────────────────────────────────────── */

.contact-icon {
    transition: transform 0.25s ease, background 0.25s ease;
}

/* ── Reduced Motion ──────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .grade-card,
    .chapter-card,
    .resource-card,
    .contact-card,
    .contact-info-card,
    .about-info-card,
    .btn,
    .submit-btn,
    .contact-icon,
    .question-card,
    .result-card {
        transition: none;
    }
}
