:root {
    --ink: #17324d;
    --ink-soft: #526477;
    --paper: #ffffff;
    --page: #f7fafc;
    --line: #dfe7ee;
    --navy: #17324d;
    --navy-deep: #0e2438;
    --blue: #2d72d9;
    --blue-soft: #eaf3ff;
    --teal: #16877c;
    --teal-soft: #e7f8f4;
    --green: #4c8f52;
    --green-soft: #eef8ed;
    --gold: #c78519;
    --gold-soft: #fff5de;
    --rose: #b65574;
    --rose-soft: #fff0f5;
    --purple: #7557b5;
    --purple-soft: #f2edff;
    --orange: #d2692a;
    --orange-soft: #fff0e5;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 8px 26px rgba(24, 50, 77, .07);
    --shadow: 0 18px 50px rgba(24, 50, 77, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--navy-deep);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid rgba(223, 231, 238, .92);
    backdrop-filter: blur(12px);
}
.utility-bar {
    background: var(--navy-deep);
    color: #dbe8f4;
    font-size: .78rem;
}
.utility-inner {
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.utility-note { color: #a9c0d3; }
.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--navy);
    text-decoration: none;
}
.brand-mark {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: block;
}
.brand-mark::before,
.brand-mark::after,
.brand-mark i {
    content: "";
    position: absolute;
    width: 26px;
    height: 31px;
    border: 2px solid var(--navy);
    border-radius: 5px;
    background: #fff;
}
.brand-mark::before { left: 2px; top: 7px; transform: rotate(-8deg); opacity: .6; }
.brand-mark::after { right: 2px; top: 2px; transform: rotate(7deg); opacity: .8; }
.brand-mark i:first-child { left: 8px; top: 5px; z-index: 2; }
.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) { display: none; }
.brand-copy { display: grid; line-height: 1.03; }
.brand-copy strong { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.brand-copy span { font-size: 1.32rem; font-weight: 900; letter-spacing: -.025em; }
.primary-nav { display: flex; align-items: center; gap: 26px; }
.primary-nav a {
    color: #314b62;
    text-decoration: none;
    font-size: .94rem;
    font-weight: 700;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}
.primary-nav a:hover { color: var(--blue); }
.primary-nav .nav-highlight {
    padding: 11px 16px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 5px 14px rgba(23, 50, 77, .16);
}
.primary-nav .nav-highlight:hover { color: #fff; background: #214566; transform: translateY(-1px); }
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
}
.nav-toggle i { display: block; height: 2px; margin: 5px 0; border-radius: 99px; background: var(--navy); }

/* Shared typography and buttons */
main.container { padding-top: 34px; padding-bottom: 86px; }
h1, h2, h3 { color: var(--ink); margin-top: 0; }
h1 { font-size: clamp(2.65rem, 6vw, 5.35rem); line-height: .98; letter-spacing: -.055em; }
h2 { font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.04; letter-spacing: -.045em; }
h3 { line-height: 1.16; letter-spacing: -.025em; }
.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .145em;
    text-transform: uppercase;
}
.lead { font-size: 1.15rem; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 17px;
    margin: 5px 8px 5px 0;
    border: 1px solid var(--navy);
    border-radius: 10px;
    color: var(--navy);
    background: #fff;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 850;
    line-height: 1.2;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(24, 50, 77, .11); }
.button.primary { background: var(--navy); color: #fff; }
.button.secondary { background: #fff; color: var(--navy); }
.button.ghost { border-color: #bdcbd7; background: rgba(255, 255, 255, .72); }
.button.light { border-color: #fff; background: #fff; color: var(--navy-deep); }
.button-large { min-height: 50px; padding: 14px 20px; border-radius: 12px; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--navy);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 850;
}
.text-link span { transition: transform .18s ease; }
.text-link:hover span { transform: translateX(3px); }

/* Homepage hero */
.home-page main.container { padding-top: 0; }
.home-hero {
    position: relative;
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(380px, .84fr);
    gap: 50px;
    align-items: center;
    padding: 72px 0 66px;
}
.home-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 15px;
    width: 94vw;
    max-width: 1420px;
    height: 430px;
    z-index: -2;
    transform: translateX(-50%);
    border-radius: 44px;
    background:
        radial-gradient(circle at 78% 18%, rgba(45, 114, 217, .12), transparent 30%),
        radial-gradient(circle at 17% 84%, rgba(22, 135, 124, .09), transparent 25%),
        linear-gradient(135deg, #f2f8ff 0%, #fbfdff 55%, #f5fbf8 100%);
}
.hero-copy { max-width: 720px; }
.hero-copy h1 { max-width: 720px; margin-bottom: 22px; }
.hero-lead {
    max-width: 670px;
    margin: 0;
    color: var(--ink-soft);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.68;
}
.hero-actions { margin-top: 30px; }
.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 25px 0 0;
    padding: 0;
    list-style: none;
    color: #486073;
    font-size: .9rem;
    font-weight: 750;
}
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points span {
    width: 21px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal);
    font-size: .75rem;
    font-weight: 900;
}
.hero-visual {
    position: relative;
    min-height: 465px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.paper-stack,
.mini-sheet {
    position: absolute;
    width: 326px;
    height: 420px;
    border-radius: 10px;
    border: 1px solid #d8e2ea;
    background: #fff;
    box-shadow: var(--shadow);
}
.paper-stack-back { transform: translate(35px, 15px) rotate(8deg); background: #e9f3ff; }
.paper-stack-mid { transform: translate(-27px, 10px) rotate(-6deg); background: #f1fbf8; }
.mini-sheet {
    z-index: 2;
    padding: 34px 30px;
    transform: rotate(1.2deg);
    box-shadow: 0 24px 60px rgba(23, 50, 77, .16);
}
.mini-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.mini-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .11em;
}
.mini-stars { color: #f2b634; font-size: .72rem; letter-spacing: .18em; }
.mini-sheet strong { display: block; margin-bottom: 24px; color: var(--navy); font-size: 1.13rem; }
.mini-question {
    display: grid;
    grid-template-columns: 25px 1fr 66px;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    color: #52687b;
    font-size: .86rem;
    border-bottom: 1px dashed #dde5eb;
}
.mini-question i { height: 28px; border: 1px solid #d6e0e8; border-radius: 5px; background: #fbfdfe; }
.mini-divider { height: 5px; width: 70%; margin: 26px 0 18px; border-radius: 99px; background: #e8eef3; }
.mini-shapes { display: flex; gap: 15px; align-items: center; }
.mini-shapes b { width: 34px; height: 34px; display: block; border: 2px solid #8eb4da; border-radius: 50%; }
.mini-shapes b:nth-child(2) { border-radius: 5px; border-color: #85c4b9; }
.mini-shapes b:nth-child(3) { width: 0; height: 0; border: 18px solid transparent; border-bottom: 31px solid #efc16a; border-top: 0; border-radius: 0; }
.mini-shapes b:nth-child(4) { border-radius: 4px 14px; border-color: #c2a9db; }
.mini-footer-line { width: 46%; height: 5px; margin-top: 28px; border-radius: 99px; background: #e8eef3; }
.hero-sticker {
    position: absolute;
    z-index: 3;
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: #fff;
    font-weight: 950;
    box-shadow: 0 15px 35px rgba(23, 50, 77, .18);
}
.sticker-one { left: 1%; top: 14%; transform: rotate(-10deg); background: var(--teal); }
.sticker-two { right: 0; bottom: 13%; transform: rotate(8deg); background: var(--orange); }

/* Homepage sections */
.quick-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 10px 0 96px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.quick-strip > div { padding: 23px 26px; border-right: 1px solid var(--line); }
.quick-strip > div:last-child { border-right: 0; }
.quick-strip strong { display: block; margin-bottom: 2px; color: var(--navy); font-size: 1.42rem; line-height: 1.2; }
.quick-strip span { color: var(--ink-soft); font-size: .83rem; }
.home-section { padding: 0 0 104px; scroll-margin-top: 125px; }
.section-heading { margin-bottom: 34px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p:not(.eyebrow),
.split-heading > p { max-width: 480px; margin: 0; color: var(--ink-soft); }
.split-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}
.centered-heading { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.centered-heading > p:not(.eyebrow) { margin-left: auto; margin-right: auto; }
.compact-heading { margin-bottom: 26px; }

.home-subject-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 420px));
    justify-content: center;
    gap: 20px;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}
.subject-card {
    min-height: 252px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 7px 24px rgba(23, 50, 77, .045);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: #cad8e4; }
.subject-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.subject-mark {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.25rem;
    font-weight: 950;
}
.resource-count {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f4f7f9;
    color: #647687;
    font-size: .7rem;
    font-weight: 800;
}
.subject-card h3 { margin: 0 0 9px; font-size: 1.38rem; }
.subject-card p { margin: 0 0 20px; color: var(--ink-soft); font-size: .91rem; line-height: 1.65; }
.subject-card .text-link { margin-top: auto; }
.subject-card--english .subject-mark { background: var(--rose-soft); color: var(--rose); }
.subject-card--science .subject-mark { background: var(--teal-soft); color: var(--teal); }
.subject-card--history .subject-mark { background: var(--gold-soft); color: var(--gold); }
.subject-card--geography .subject-mark { background: var(--green-soft); color: var(--green); }
.subject-card--other .subject-mark { background: var(--purple-soft); color: var(--purple); }

.age-section {
    margin: 0 calc((100vw - min(1180px, calc(100vw - 36px))) / -2);
    padding: 92px max(18px, calc((100vw - 1180px) / 2)) 100px;
    background: var(--navy-deep);
    color: #fff;
}
.age-section .eyebrow { color: #8fc5ff; }
.age-section h2 { color: #fff; }
.age-section .section-heading > p:not(.eyebrow) { color: #b6c8d8; }
.age-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.age-card {
    min-height: 330px;
    display: grid;
    grid-template-columns: 42% 58%;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .17);
}
.age-illustration {
    position: relative;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(145deg, #e9f4ff, #d7eaff);
}
.age-card-older .age-illustration { background: linear-gradient(145deg, #e8f9f2, #d6f1e7); }
.age-number {
    position: relative;
    z-index: 2;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    font-weight: 950;
    letter-spacing: -.08em;
    color: var(--blue);
}
.age-card-older .age-number { color: var(--teal); }
.age-dot { position: absolute; border-radius: 50%; background: rgba(45, 114, 217, .13); }
.age-card-older .age-dot { background: rgba(22, 135, 124, .13); }
.age-dot-one { width: 160px; height: 160px; left: -45px; top: -35px; }
.age-dot-two { width: 120px; height: 120px; right: -36px; bottom: 15px; }
.age-line { position: absolute; width: 170px; height: 170px; border: 2px dashed rgba(45, 114, 217, .25); border-radius: 50%; transform: rotate(15deg); }
.age-card-older .age-line { border-color: rgba(22, 135, 124, .25); }
.age-card-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 34px; }
.age-kicker { color: var(--blue); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.age-card-older .age-kicker { color: var(--teal); }
.age-card h3 { margin: 7px 0 10px; font-size: 2rem; }
.age-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: .9rem; }
.age-count { margin-bottom: 14px; color: #728292; font-size: .75rem; font-weight: 800; }
.age-card .button { margin-top: auto; }

#popular-topics { padding-top: 100px; }
.topic-cloud { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.topic-pill {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(23, 50, 77, .04);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.topic-pill:hover { transform: translateY(-2px); border-color: #bdd0df; box-shadow: var(--shadow-sm); }
.topic-pill span { color: var(--navy); font-weight: 850; line-height: 1.25; }
.topic-pill small { margin-top: 5px; color: #718292; font-size: .72rem; }

.featured-section { padding-bottom: 110px; }
.worksheet-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.worksheet-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 7px 24px rgba(23, 50, 77, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}
.worksheet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.worksheet-card-preview {
    position: relative;
    height: 230px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #eff5fa, #f8fbfd);
}
.worksheet-card-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .25s ease; }
.worksheet-card:hover .worksheet-card-preview img { transform: scale(1.02); }
.worksheet-placeholder {
    width: 150px;
    height: 190px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
    padding: 30px 22px;
    border: 1px solid #d5e0e8;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(23, 50, 77, .1);
}
.worksheet-placeholder i { display: block; height: 7px; border-radius: 99px; background: #dfe8ef; }
.worksheet-placeholder i:nth-child(2) { width: 75%; }
.worksheet-placeholder i:nth-child(3) { width: 88%; }
.worksheet-placeholder b { margin-top: auto; color: #8aa0b1; font-size: .7rem; letter-spacing: .12em; }
.free-label {
    position: absolute;
    top: 13px;
    right: 13px;
    padding: 6px 9px;
    border-radius: 7px;
    background: var(--navy);
    color: #fff;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .08em;
}
.worksheet-card-body { padding: 21px 21px 23px; }
.worksheet-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.worksheet-meta span {
    padding: 4px 7px;
    border-radius: 6px;
    background: var(--blue-soft);
    color: #356c9f;
    font-size: .65rem;
    font-weight: 850;
}
.worksheet-meta span:nth-child(2) { background: var(--teal-soft); color: #26796f; }
.worksheet-card h3 { margin: 0 0 9px; font-size: 1.15rem; }
.worksheet-card h3 a { text-decoration: none; }
.worksheet-card h3 a:hover { color: var(--blue); }
.worksheet-card p { min-height: 47px; margin: 0 0 16px; color: var(--ink-soft); font-size: .84rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty-home-panel {
    padding: 34px;
    border: 1px dashed #b9c9d6;
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}
.empty-home-panel strong { font-size: 1.15rem; }
.empty-home-panel p { max-width: 650px; margin: 8px auto 0; color: var(--ink-soft); }

.trust-section {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 54px;
    align-items: center;
    padding: 78px;
    margin-bottom: 104px;
    border-radius: var(--radius-lg);
    background: #eef6fb;
}
.trust-copy > p:not(.eyebrow) { max-width: 670px; color: var(--ink-soft); }
.trust-list { display: grid; gap: 12px; margin-top: 30px; }
.trust-list > div { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start; }
.trust-list span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #fff;
    color: var(--blue);
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(23, 50, 77, .08);
}
.trust-list p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.trust-list strong { display: block; margin-bottom: 2px; color: var(--navy); font-size: .94rem; }
.trust-panel {
    padding: 34px;
    border-radius: 22px;
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow);
}
.trust-icon {
    width: 49px;
    height: 49px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 15px;
    background: #fff;
    color: var(--teal);
    font-size: 1.35rem;
    font-weight: 950;
}
.trust-panel h3 { color: #fff; font-size: 1.42rem; }
.trust-panel ul { margin: 20px 0 0; padding: 0; list-style: none; }
.trust-panel li { position: relative; padding: 9px 0 9px 25px; color: #cddae4; border-top: 1px solid rgba(255, 255, 255, .09); font-size: .87rem; }
.trust-panel li::before { content: "✓"; position: absolute; left: 0; color: #8dd3c8; font-weight: 900; }

.faq-section { max-width: 860px; margin: 0 auto; }
.faq-list { display: grid; gap: 10px; }
.faq-list details {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(23, 50, 77, .035);
}
.faq-list summary {
    position: relative;
    padding: 19px 50px 19px 21px;
    cursor: pointer;
    color: var(--navy);
    font-weight: 850;
    list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 20px; top: 15px; font-size: 1.35rem; color: #6c8092; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 21px 20px; color: var(--ink-soft); font-size: .91rem; }

.home-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    margin-top: 4px;
    padding: 47px 52px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--navy-deep), #214b70);
    color: #fff;
    box-shadow: var(--shadow);
}
.home-cta .eyebrow { color: #9dceff; }
.home-cta h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.home-cta p:not(.eyebrow) { margin: 0; color: #bfd0de; }
.home-cta .button { flex: 0 0 auto; margin: 0; }

/* Worksheet page and Step 2 utility pages */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 28px; color: #6a7c8b; font-size: .86rem; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.worksheet-page { max-width: 920px; padding-top: 18px; }
.worksheet-page > header { max-width: 820px; }
.worksheet-page h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.worksheet-preview { max-width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.card,
.check-panel,
.download-panel,
.placeholder-panel,
.intro-copy {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
}
.download-panel, .placeholder-panel, .intro-copy { margin-top: 26px; }
.download-panel h2, .placeholder-panel h2 { font-size: 1.45rem; }
.check-list { display: grid; gap: 12px; max-width: 780px; }
.check-row { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 5px 20px; }
.check-row small { grid-column: 1 / -1; }
.check-row.ok { border-left: 5px solid #258a48; }
.check-row.bad { border-left: 5px solid #ba2c2c; }

/* Footer */
.site-footer { margin-top: 0; background: #fff; border-top: 1px solid var(--line); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 70px;
    padding-top: 58px;
    padding-bottom: 48px;
}
.footer-brand { margin-bottom: 16px; }
.footer-brand-block > p { max-width: 450px; margin: 0; color: #687b8b; font-size: .88rem; }
.footer-grid h2 { margin: 5px 0 14px; font-size: .78rem; letter-spacing: .11em; text-transform: uppercase; }
.footer-grid nav { display: grid; gap: 9px; }
.footer-grid nav a { color: #667989; text-decoration: none; font-size: .85rem; }
.footer-grid nav a:hover { color: var(--blue); }
.footer-bottom {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    color: #7a8a97;
    font-size: .77rem;
}
.footer-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 1060px) {
    .home-hero { grid-template-columns: 1fr 400px; gap: 25px; }
    .home-hero h1 { font-size: clamp(2.7rem, 6vw, 4.6rem); }
    .paper-stack, .mini-sheet { width: 285px; height: 382px; }
    .mini-sheet { padding: 28px 25px; }
    .mini-question { grid-template-columns: 22px 1fr 58px; }
    .home-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 880px; }
    .topic-cloud { grid-template-columns: repeat(3, 1fr); }
    .age-card { grid-template-columns: 38% 62%; }
    .trust-section { padding: 58px; gap: 38px; }
}

@media (max-width: 820px) {
    .utility-note { display: none; }
    .utility-inner { justify-content: center; }
    .header-inner { min-height: 70px; }
    .brand-copy span { font-size: 1.13rem; }
    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
    .nav-toggle { display: block; margin-left: auto; }
    .primary-nav {
        position: absolute;
        top: 101px;
        left: 18px;
        right: 18px;
        display: none;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow);
    }
    .primary-nav.is-open { display: grid; }
    .primary-nav a { padding: 12px; border-radius: 9px; }
    .primary-nav a:hover { background: #f5f8fa; }
    .primary-nav .nav-highlight { margin-top: 3px; text-align: center; }
    .home-hero { min-height: 0; grid-template-columns: 1fr; padding: 58px 0 48px; }
    .home-hero::before { height: 78%; bottom: 0; }
    .hero-copy { max-width: 680px; }
    .hero-visual { min-height: 420px; }
    .quick-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 78px; }
    .quick-strip > div:nth-child(2) { border-right: 0; }
    .quick-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .split-heading { display: block; }
    .split-heading > p { margin-top: 14px; }
    .home-section { padding-bottom: 82px; }
    .age-section { padding-top: 76px; padding-bottom: 82px; }
    .age-grid { grid-template-columns: 1fr; }
    .age-card { min-height: 300px; }
    #popular-topics { padding-top: 80px; }
    .worksheet-card-grid { grid-template-columns: repeat(2, 1fr); }
    .topic-cloud { grid-template-columns: repeat(2, 1fr); }
    .trust-section { grid-template-columns: 1fr; margin-bottom: 84px; padding: 46px; }
    .trust-panel { max-width: 520px; }
    .home-cta { align-items: flex-start; flex-direction: column; padding: 40px; }
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 35px; }
}

@media (max-width: 580px) {
    .container { width: min(100% - 26px, 1180px); }
    .utility-bar { font-size: .7rem; }
    .brand-copy strong { font-size: .64rem; }
    .brand-copy span { font-size: 1rem; }
    .home-hero { padding-top: 46px; }
    .home-hero h1 { font-size: clamp(2.55rem, 13vw, 3.8rem); }
    .hero-lead { font-size: 1rem; }
    .hero-actions { display: grid; gap: 8px; }
    .hero-actions .button { width: 100%; margin: 0; }
    .hero-points { display: grid; gap: 10px; }
    .hero-visual { min-height: 350px; transform: scale(.88); margin: -10px -25px -20px; }
    .paper-stack, .mini-sheet { width: 260px; height: 350px; }
    .mini-sheet { padding: 24px 22px; }
    .mini-sheet-top { margin-bottom: 20px; }
    .mini-sheet strong { margin-bottom: 14px; }
    .mini-question { padding: 8px 0; }
    .mini-divider { margin: 17px 0 14px; }
    .mini-shapes b { width: 27px; height: 27px; }
    .mini-shapes b:nth-child(3) { border-width: 14px; border-bottom-width: 25px; }
    .sticker-one { left: 0; }
    .sticker-two { right: 0; }
    .quick-strip { margin-top: 0; margin-bottom: 68px; }
    .quick-strip > div { padding: 18px; }
    .quick-strip strong { font-size: 1.2rem; }
    .quick-strip span { font-size: .74rem; }
    .home-subject-grid { grid-template-columns: 1fr; }
    .subject-card { min-height: 230px; }
    .section-heading { margin-bottom: 25px; }
    .age-section {
        margin-left: -13px;
        margin-right: -13px;
        padding-left: 13px;
        padding-right: 13px;
    }
    .age-card { grid-template-columns: 1fr; }
    .age-illustration { min-height: 170px; }
    .age-card-copy { padding: 27px; }
    .age-card .button { width: 100%; margin-right: 0; }
    .topic-cloud { grid-template-columns: 1fr; }
    .topic-pill { min-height: 78px; }
    .worksheet-card-grid { grid-template-columns: 1fr; }
    .worksheet-card-preview { height: 245px; }
    .trust-section { margin-left: -2px; margin-right: -2px; padding: 32px 24px; border-radius: 22px; }
    .trust-list > div { grid-template-columns: 40px 1fr; }
    .trust-panel { padding: 27px; }
    .home-cta { padding: 32px 25px; border-radius: 22px; }
    .home-cta .button { width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px 22px; }
    .footer-brand-block { grid-column: 1 / -1; }
    .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding: 20px 0; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* Step 4 archive pages */
.archive-page main.container { padding-top: 26px; }
.archive-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 48px;
    align-items: center;
    min-height: 350px;
    margin-bottom: 72px;
    padding: 54px 58px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f4f9ff 0%, #fff 58%, #f1faf7 100%);
    box-shadow: var(--shadow-sm);
}
.archive-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(45, 114, 217, .06);
}
.archive-hero-copy { position: relative; z-index: 1; max-width: 780px; }
.archive-hero h1 { max-width: 800px; margin-bottom: 18px; font-size: clamp(2.55rem, 5.5vw, 4.7rem); }
.archive-hero-copy > p:not(.eyebrow) { max-width: 750px; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.archive-stats { display: inline-flex; align-items: baseline; gap: 9px; margin-top: 24px; padding: 10px 14px; border: 1px solid #d8e5ef; border-radius: 999px; background: rgba(255,255,255,.8); }
.archive-stats strong { font-size: 1.15rem; }
.archive-stats span { color: #617587; font-size: .82rem; font-weight: 750; }
.archive-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 170px;
    height: 170px;
    margin-left: auto;
    border: 10px solid rgba(255,255,255,.72);
    border-radius: 40px;
    background: var(--blue-soft);
    color: var(--blue);
    box-shadow: 0 18px 45px rgba(23,50,77,.12);
    font-size: 4rem;
    font-weight: 900;
    transform: rotate(4deg);
}
.archive-hero--english .archive-mark { background: var(--rose-soft); color: var(--rose); }
.archive-hero--science .archive-mark { background: var(--teal-soft); color: var(--teal); }
.archive-hero--history .archive-mark { background: var(--gold-soft); color: var(--gold); }
.archive-hero--geography .archive-mark { background: var(--green-soft); color: var(--green); }
.archive-hero--other .archive-mark { background: var(--purple-soft); color: var(--purple); }
.archive-section { padding-bottom: 78px; }
.archive-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.archive-section-heading h2 { margin-bottom: 0; font-size: clamp(1.85rem, 3.5vw, 2.7rem); }
.archive-section-heading > p { max-width: 470px; margin: 0; color: var(--ink-soft); font-size: .92rem; }
.archive-topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.archive-topic-card {
    display: grid;
    gap: 7px;
    min-height: 112px;
    align-content: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(23,50,77,.04);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.archive-topic-card:hover { transform: translateY(-2px); border-color: #b9cfdf; box-shadow: var(--shadow-sm); }
.archive-topic-card strong { color: var(--ink); font-size: 1rem; }
.archive-topic-card span { color: #738493; font-size: .79rem; font-weight: 750; }
.worksheet-results { padding-top: 8px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.pagination a, .pagination span { text-decoration: none; }
.pagination-arrow { justify-self: start; color: var(--navy); font-size: .87rem; font-weight: 800; }
.pagination-arrow:last-child { justify-self: end; }
.pagination-arrow.is-disabled { color: #a4b0ba; }
.pagination-pages { display: flex; align-items: center; gap: 6px; }
.pagination-pages a, .pagination-pages .is-current { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); font-size: .82rem; font-weight: 800; }
.pagination-pages .is-current { border-color: var(--navy); background: var(--navy); color: #fff; }
.pagination-pages > span:not(.is-current) { color: #8b98a3; }
.archive-age-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 8px;
    padding: 34px 38px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
}
.archive-age-links h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.15rem); }
.archive-age-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.archive-hero-compact { grid-template-columns: minmax(0, 1fr) minmax(220px, 310px); min-height: 300px; }
.archive-parent-link {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
    padding: 24px;
    border: 1px solid #dce7ef;
    border-radius: 18px;
    background: rgba(255,255,255,.86);
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(23,50,77,.07);
}
.archive-parent-link span { color: #748797; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.archive-parent-link strong { font-size: 1.05rem; }
.archive-parent-link b { margin-top: 10px; color: var(--blue); font-size: 1.3rem; }
.related-topics { padding-top: 10px; }
.age-archive-hero { background: linear-gradient(135deg, #fff7e6 0%, #fff 58%, #edf8ff 100%); }
.age-hero-number {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 190px;
    height: 190px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 18px 45px rgba(23,50,77,.16);
    font-size: 3.15rem;
    font-weight: 900;
    letter-spacing: -.05em;
}
.age-subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 14px; max-width: 734px; margin-left: auto; margin-right: auto; }
.age-subject-grid--single { grid-template-columns: minmax(0, 360px); }
.age-subject-card {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 13px;
    align-items: center;
    min-height: 90px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(23,50,77,.04);
}
.age-subject-card:hover { border-color: #b8cddd; box-shadow: var(--shadow-sm); }
.age-subject-mark { grid-row: 1 / 3; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.age-subject-card strong { align-self: end; font-size: .98rem; }
.age-subject-card small { align-self: start; color: #758694; font-size: .75rem; }
.age-subject-card b { grid-column: 3; grid-row: 1 / 3; color: #8ca0af; }
.age-subject-card--english .age-subject-mark { background: var(--rose-soft); color: var(--rose); }
.age-subject-card--science .age-subject-mark { background: var(--teal-soft); color: var(--teal); }
.age-subject-card--history .age-subject-mark { background: var(--gold-soft); color: var(--gold); }
.age-subject-card--geography .age-subject-mark { background: var(--green-soft); color: var(--green); }
.age-subject-card--other .age-subject-mark { background: var(--purple-soft); color: var(--purple); }
.archive-age-links-single { margin-top: 2px; }


/* Exact-age topic browser: two balanced subject panels with age-filtered topic links. */
.age-topics-section { padding-top: 4px; }
.age-topic-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    max-width: 1040px;
    margin: 0 auto;
}
.age-topic-columns--single {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}
/* Subject landing pages use the full content width so the topic hub feels
   like a primary navigation area rather than a narrow card. */
.subject-age-topics-section .age-topic-columns--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
    width: 100%;
}
.subject-age-topics-section .age-topic-panel {
    width: 100%;
}
.subject-age-topics-section .age-topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}
.age-topic-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23,50,77,.05);
}
.age-topic-panel-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.age-topic-panel-heading .age-subject-mark { flex: 0 0 48px; }
.age-topic-panel-heading h3 { margin: 1px 0 0; font-size: 1.35rem; }
.age-topic-panel-heading .eyebrow { margin-bottom: 0; }
.age-topic-panel--english .age-subject-mark { background: var(--rose-soft); color: var(--rose); }
.age-topic-list { display: grid; gap: 9px; }
.age-topic-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #e2ebf1;
    border-radius: 12px;
    background: #fbfdff;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.age-topic-link:hover { transform: translateY(-1px); border-color: #bfd0dd; box-shadow: 0 6px 16px rgba(23,50,77,.06); }
.age-topic-link span { color: var(--ink); font-size: .92rem; font-weight: 800; }
.age-topic-link small { color: #778997; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.age-topic-link b { color: #8ca0af; font-size: .95rem; }
.age-topic-all { display: inline-flex; margin-top: 17px; color: var(--navy); font-size: .82rem; font-weight: 850; text-decoration: none; }
.age-topic-all:hover { text-decoration: underline; }
.age-filtered-topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .archive-hero { grid-template-columns: minmax(0, 1fr) 150px; padding: 42px; }
    .archive-mark { width: 135px; height: 135px; font-size: 3.1rem; }
    .age-hero-number { width: 145px; height: 145px; font-size: 2.5rem; }
    .archive-topic-grid { grid-template-columns: repeat(2, 1fr); }
    .age-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 734px; }
    .age-subject-grid--single { grid-template-columns: minmax(0, 360px); }
    .age-filtered-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 680px) {
    .archive-page main.container { padding-top: 18px; }
    .archive-hero, .archive-hero-compact { grid-template-columns: 1fr; gap: 24px; min-height: 0; margin-bottom: 56px; padding: 32px 25px; }
    .archive-hero h1 { font-size: clamp(2.45rem, 12vw, 3.55rem); }
    .archive-mark, .age-hero-number { width: 104px; height: 104px; margin-left: 0; border-width: 6px; border-radius: 25px; font-size: 2.25rem; }
    .age-hero-number { border-radius: 50%; }
    .archive-parent-link { max-width: 100%; }
    .archive-section { padding-bottom: 60px; }
    .archive-section-heading { display: block; }
    .archive-section-heading > p, .archive-section-heading > .text-link { margin-top: 10px; }
    .archive-topic-grid, .age-subject-grid, .age-subject-grid--single, .age-filtered-topic-grid { grid-template-columns: 1fr; max-width: 100%; }
    .age-topic-columns { grid-template-columns: 1fr; }
    .subject-age-topics-section .age-topic-list { grid-template-columns: 1fr; }
    .age-topic-panel { padding: 18px; }
    .age-topic-link { grid-template-columns: minmax(0, 1fr) 18px; }
    .age-topic-link small { grid-column: 1; grid-row: 2; white-space: normal; }
    .age-topic-link b { grid-column: 2; grid-row: 1 / 3; }
    .pagination { grid-template-columns: 1fr 1fr; }
    .pagination-pages { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
    .pagination-arrow { grid-row: 2; }
    .archive-age-links { align-items: flex-start; flex-direction: column; padding: 28px 24px; }
    .archive-age-buttons { justify-content: flex-start; }
    .archive-age-buttons .button { width: 100%; margin-right: 0; }
}

/* =========================================================
   STEP 5 — UNIVERSAL EXACT-AGE BROWSING
   ========================================================= */
.home-age-band-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.home-age-band-panel {
    padding: 28px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background: rgba(255,255,255,.07);
    box-shadow: 0 14px 34px rgba(6, 25, 43, .16);
}
.home-age-band-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.home-age-band-heading span:not(.text-link span) {
    color: #a9c0d4;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.home-age-band-heading h3 {
    margin: 4px 0 0;
    color: #fff;
    font-size: 1.65rem;
}
.home-age-band-heading .text-link { color: #dcecff; white-space: nowrap; }
.home-exact-age-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.home-exact-age-card {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 1px 12px;
    align-items: center;
    min-height: 82px;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
    background: #fff;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.home-exact-age-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(3,20,34,.18); }
.home-exact-age-number {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.35rem;
    font-weight: 900;
}
.home-age-band-panel:nth-child(2) .home-exact-age-number { background: var(--teal-soft); color: var(--teal); }
.home-exact-age-card strong { align-self: end; color: var(--navy); font-size: .92rem; }
.home-exact-age-card small { align-self: start; color: #718292; font-size: .68rem; line-height: 1.3; }
.home-exact-age-card b { grid-column: 3; grid-row: 1 / 3; color: #90a4b3; }
.age-system-note { margin: 22px auto 0; color: #b7cada; text-align: center; font-size: .82rem; }
.age-system-note a { color: #fff; font-weight: 800; }

.age-directory-hero,
.exact-age-hero { background: linear-gradient(135deg, #fff7e6 0%, #fff 55%, #edf8ff 100%); }
.age-hero-number--wide { font-size: 2.55rem; }
.exact-age-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.exact-age-directory-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 17px;
    align-items: center;
    min-height: 116px;
    padding: 18px 21px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(23,50,77,.05);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.exact-age-directory-card:hover { transform: translateY(-2px); border-color: #b7cddd; box-shadow: var(--shadow-sm); }
.exact-age-directory-card .exact-age-number {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.7rem;
    font-weight: 900;
}
.exact-age-directory-card:nth-child(n+4) .exact-age-number { background: var(--teal-soft); color: var(--teal); }
.exact-age-directory-card div { display: grid; gap: 3px; }
.exact-age-directory-card strong { color: var(--navy); font-size: 1rem; }
.exact-age-directory-card small { color: var(--ink-soft); font-size: .76rem; font-weight: 750; }
.exact-age-directory-card p { margin: 5px 0 0; color: #7b8c99; font-size: .72rem; }
.exact-age-directory-card b { color: #8aa0b1; font-size: 1.15rem; }
.age-range-directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.age-range-directory-card {
    display: grid;
    gap: 7px;
    min-height: 220px;
    align-content: center;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 7px 24px rgba(23,50,77,.05);
}
.age-range-directory-card > span { color: var(--blue); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.age-range-directory-card:nth-child(2) > span { color: var(--teal); }
.age-range-directory-card strong { color: var(--navy); font-size: 2rem; }
.age-range-directory-card p { margin: 0 0 10px; color: var(--ink-soft); font-size: .88rem; }
.age-range-directory-card b { color: var(--blue); font-size: .82rem; }
.age-range-directory-card:nth-child(2) b { color: var(--teal); }
.universal-age-note {
    display: grid;
    gap: 5px;
    margin-bottom: 8px;
    padding: 25px 28px;
    border-radius: 18px;
    background: #eef6fb;
}
.universal-age-note strong { color: var(--navy); }
.universal-age-note p { margin: 0; color: var(--ink-soft); font-size: .84rem; }

.exact-age-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.exact-age-tile {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 1px 12px;
    align-items: center;
    min-height: 88px;
    padding: 15px 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(23,50,77,.04);
}
.exact-age-tile > span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.28rem;
    font-weight: 900;
}
.exact-age-tile strong { align-self: end; color: var(--navy); }
.exact-age-tile small { align-self: start; color: #758694; font-size: .68rem; }
.exact-age-tile b { grid-column: 3; grid-row: 1 / 3; color: #91a4b2; }
.age-subject-card.is-empty { opacity: .58; box-shadow: none; cursor: default; }
.age-subject-card.is-empty:hover { border-color: var(--line); box-shadow: none; }
.age-sibling-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 8px;
    padding: 26px 30px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}
.age-sibling-nav > span { color: var(--navy); font-weight: 850; }
.age-sibling-nav > div { display: flex; flex-wrap: wrap; gap: 8px; }
.age-sibling-nav a {
    display: grid;
    place-items: center;
    min-width: 65px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--navy);
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}
.age-sibling-nav a:hover,
.age-sibling-nav a.is-current { border-color: var(--navy); background: var(--navy); color: #fff; }
.archive-age-buttons.age-button-grid { gap: 8px; max-width: 520px; }
.archive-age-buttons.age-button-grid .button { min-width: 76px; padding: 10px 14px; }

@media (max-width: 980px) {
    .home-age-band-grid { grid-template-columns: 1fr; }
    .exact-age-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .exact-age-directory-grid,
    .age-range-directory-grid { grid-template-columns: 1fr; }
    .home-age-band-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .age-sibling-nav { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
    .home-age-band-panel { padding: 20px; }
    .home-exact-age-grid,
    .exact-age-row { grid-template-columns: 1fr; }
    .exact-age-directory-card { grid-template-columns: 60px minmax(0, 1fr) auto; padding: 16px; }
    .exact-age-directory-card .exact-age-number { width: 60px; height: 60px; font-size: 1.45rem; }
    .age-sibling-nav > div { width: 100%; }
    .age-sibling-nav a { flex: 1 1 72px; }
}

/* Step 6 — full worksheet detail page */
.worksheet-detail-page main.container { padding-top: 26px; padding-bottom: 96px; }
.worksheet-breadcrumbs { margin-bottom: 26px; }
.worksheet-breadcrumbs > span:last-child { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worksheet-detail { display: grid; gap: 38px; }
.worksheet-detail-header {
    position: relative;
    overflow: hidden;
    padding: 46px 50px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f4f9ff 0%, #fff 62%, #eef9f5 100%);
    box-shadow: var(--shadow-sm);
}
.worksheet-detail-header::after {
    content: "";
    position: absolute;
    right: -86px;
    bottom: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(45, 114, 217, .055);
}
.worksheet-detail-heading { position: relative; z-index: 1; max-width: 900px; }
.worksheet-title-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; color: #667b8d; font-size: .8rem; font-weight: 750; }
.worksheet-title-meta a { color: var(--blue); text-decoration: none; }
.worksheet-title-meta a:hover { text-decoration: underline; }
.resource-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 9px; border-radius: 999px; background: var(--green-soft); color: #397740; font-size: .67rem; font-weight: 950; letter-spacing: .08em; }
.worksheet-detail h1 { max-width: 900px; margin-bottom: 18px; font-size: clamp(2.45rem, 5vw, 4.65rem); line-height: 1; }
.worksheet-detail-lead { max-width: 830px; margin: 0; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.7; }
.worksheet-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.worksheet-detail-main { min-width: 0; display: grid; gap: 30px; }
.worksheet-detail-sidebar { position: sticky; top: 132px; display: grid; gap: 20px; }
.worksheet-preview-panel,
.worksheet-copy-panel,
.worksheet-download-card,
.worksheet-facts-card,
.worksheet-age-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.worksheet-preview-panel { padding: 28px; }
.worksheet-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.worksheet-section-heading .eyebrow { margin-bottom: 7px; }
.worksheet-section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.worksheet-section-heading > span { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: .72rem; font-weight: 850; }
.worksheet-preview-frame { overflow: hidden; min-height: 420px; display: grid; place-items: center; padding: 24px; border: 1px solid #d8e2ea; border-radius: 16px; background: #eef3f6; }
.worksheet-detail-preview { display: block; width: min(100%, 760px); height: auto; max-height: 920px; object-fit: contain; object-position: top center; border-radius: 6px; background: #fff; box-shadow: 0 18px 45px rgba(23,50,77,.16); }
.worksheet-preview-frame--empty { min-height: 500px; grid-template-columns: 1fr; gap: 24px; align-content: center; text-align: center; }
.worksheet-preview-frame--empty > p { max-width: 460px; margin: 0 auto; color: var(--ink-soft); font-size: .86rem; }
.worksheet-preview-placeholder { width: min(330px, 80%); aspect-ratio: .72; display: flex; flex-direction: column; gap: 13px; padding: 34px; border-radius: 8px; background: #fff; box-shadow: 0 18px 45px rgba(23,50,77,.14); text-align: left; }
.worksheet-preview-placeholder strong { margin-bottom: 14px; font-size: 1.15rem; }
.worksheet-preview-placeholder span { height: 9px; border-radius: 99px; background: #e3ebf1; }
.worksheet-preview-placeholder span:nth-of-type(2) { width: 72%; }
.worksheet-preview-placeholder span:nth-of-type(3) { width: 88%; }
.worksheet-preview-placeholder span:nth-of-type(4) { width: 62%; }
.worksheet-preview-placeholder b { margin-top: auto; color: #8da0af; font-size: .75rem; letter-spacing: .14em; }
.worksheet-copy-panel { padding: 32px; }
.worksheet-copy-panel h2 { max-width: 720px; margin-bottom: 18px; font-size: clamp(1.65rem, 3vw, 2.3rem); }
.worksheet-long-copy { color: var(--ink-soft); font-size: .96rem; line-height: 1.82; }
.worksheet-download-card { padding: 27px; border-top: 4px solid var(--blue); }
.worksheet-download-card .eyebrow { margin-bottom: 8px; }
.worksheet-download-card h2 { margin-bottom: 10px; font-size: 1.65rem; }
.worksheet-download-card > p:not(.eyebrow) { margin: 0 0 18px; color: var(--ink-soft); font-size: .86rem; line-height: 1.6; }
.worksheet-download-actions { display: grid; gap: 9px; }
.worksheet-download-actions .button { width: 100%; margin: 0; }
.worksheet-download-button { gap: 9px; }
.worksheet-download-button > span { font-size: 1.08rem; }
.worksheet-download-unavailable { display: block; padding: 14px; border: 1px dashed #c5d1da; border-radius: 11px; background: #f8fafb; color: #758694; font-size: .82rem; font-weight: 750; }
.worksheet-download-notes { display: grid; gap: 7px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.worksheet-download-notes li { position: relative; padding-left: 20px; color: #647888; font-size: .77rem; }
.worksheet-download-notes li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 950; }
.worksheet-facts-card { padding: 24px; }
.worksheet-facts-card h2 { margin-bottom: 15px; font-size: 1.15rem; }
.worksheet-facts { margin: 0; }
.worksheet-facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid #edf1f4; font-size: .8rem; }
.worksheet-facts > div:first-child { border-top: 0; padding-top: 0; }
.worksheet-facts > div:last-child { padding-bottom: 0; }
.worksheet-facts dt { color: #7a8c9a; font-weight: 700; }
.worksheet-facts dd { margin: 0; color: var(--navy); font-weight: 850; text-align: right; }
.worksheet-facts a { color: var(--blue); text-decoration: none; }
.worksheet-age-card { padding: 24px; }
.worksheet-age-card .eyebrow { margin-bottom: 5px; }
.worksheet-age-card h2 { margin-bottom: 14px; font-size: 1.22rem; }
.worksheet-age-links { display: grid; gap: 8px; }
.worksheet-age-links a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 11px; border-radius: 9px; background: #f5f8fa; color: var(--navy); text-decoration: none; font-size: .79rem; font-weight: 850; }
.worksheet-age-links a:hover { background: var(--blue-soft); color: var(--blue); }
.worksheet-age-links .age-subject-link { margin-top: -5px; padding-top: 4px; padding-bottom: 4px; background: transparent; color: #6d8190; font-size: .72rem; font-weight: 700; }
.ad-slot { display: grid; place-items: center; align-content: center; gap: 2px; border: 1px dashed #c8d3dc; border-radius: 12px; background: #f7f9fb; color: #8a99a5; text-align: center; }
.ad-slot span { font-size: .64rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.ad-slot small { font-size: .64rem; }
.ad-slot-horizontal { min-height: 108px; }
.ad-slot-rectangle { min-height: 250px; }
.worksheet-related-section,
.worksheet-topic-section { padding-top: 14px; }
.worksheet-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.worksheet-related-grid .worksheet-card-preview { height: 210px; }
.worksheet-topic-section { padding-top: 20px; border-top: 1px solid var(--line); }
.worksheet-promo-panel { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: 40px 44px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--navy-deep), #214b70); color: #fff; box-shadow: var(--shadow); }
.worksheet-promo-panel .eyebrow { color: #99ccff; }
.worksheet-promo-panel h2 { margin-bottom: 8px; color: #fff; font-size: clamp(1.75rem, 3vw, 2.45rem); }
.worksheet-promo-panel p:not(.eyebrow) { max-width: 700px; margin: 0; color: #c2d2df; font-size: .9rem; }
.worksheet-promo-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; }
.worksheet-promo-actions .button { margin: 4px; }
.worksheet-promo-actions .button.ghost { border-color: rgba(255,255,255,.55); background: transparent; color: #fff; }

@media (max-width: 980px) {
    .worksheet-detail-layout { grid-template-columns: 1fr; }
    .worksheet-detail-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .worksheet-download-card { grid-row: span 2; }
    .ad-slot-rectangle { min-height: 180px; }
    .worksheet-promo-panel { align-items: flex-start; flex-direction: column; }
    .worksheet-promo-actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
    .worksheet-detail-page main.container { padding-top: 20px; padding-bottom: 72px; }
    .worksheet-breadcrumbs > span:last-child { display: none; }
    .worksheet-detail { gap: 26px; }
    .worksheet-detail-header { padding: 32px 25px; border-radius: 22px; }
    .worksheet-detail h1 { font-size: clamp(2.25rem, 11vw, 3.45rem); }
    .worksheet-detail-lead { font-size: .98rem; }
    .worksheet-title-meta { font-size: .74rem; }
    .worksheet-preview-panel { padding: 20px; }
    .worksheet-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .worksheet-preview-frame { min-height: 320px; padding: 14px; }
    .worksheet-preview-frame--empty { min-height: 390px; }
    .worksheet-copy-panel { padding: 25px; }
    .worksheet-detail-sidebar { grid-template-columns: 1fr; }
    .worksheet-download-card { grid-row: auto; }
    .worksheet-related-grid { grid-template-columns: 1fr; }
    .worksheet-related-grid .worksheet-card-preview { height: 245px; }
    .worksheet-promo-panel { padding: 31px 25px; border-radius: 22px; }
    .worksheet-promo-actions { width: 100%; display: grid; }
    .worksheet-promo-actions .button { width: 100%; margin: 4px 0; }
}

/* Step 9 — public worksheet search */
.home-search-form{display:flex;gap:8px;max-width:610px;margin:25px 0 2px;padding:7px;border:1px solid rgba(23,50,77,.16);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(23,50,77,.08)}
.home-search-form label{flex:1}.home-search-form input{width:100%;height:46px;padding:0 13px;border:0;outline:0;background:transparent;color:var(--navy);font:inherit}.home-search-form button{min-width:112px;border:0;border-radius:10px;background:var(--navy);color:#fff;font:inherit;font-size:.82rem;font-weight:850;cursor:pointer}.home-search-form button:hover{background:#244764}
.search-page main.container{padding-bottom:90px}.search-hero{margin:30px 0 34px;padding:42px;border-radius:24px;background:linear-gradient(135deg,#edf6fb 0%,#f7fbfd 60%,#fff7e9 100%);border:1px solid var(--line)}
.search-hero h1{margin:5px 0 10px;color:var(--navy);font-size:clamp(2rem,5vw,3.5rem);line-height:1.02}.search-hero>div>p:last-child{max-width:690px;color:var(--ink-soft)}
.public-search-form{display:grid;grid-template-columns:minmax(240px,1fr) 190px 145px auto;gap:10px;margin-top:25px;padding:10px;border-radius:15px;background:#fff;box-shadow:0 10px 32px rgba(23,50,77,.08)}
.public-search-form input,.public-search-form select{width:100%;height:48px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 12px;color:var(--navy);font:inherit;outline:0}.public-search-form input:focus,.public-search-form select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(43,109,176,.1)}.public-search-form .button{height:48px;border:0;cursor:pointer}
.search-results-section{margin-bottom:40px}.search-results-heading{margin-bottom:22px}.search-empty-panel,.search-start-panel{margin:28px 0;padding:36px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:0 8px 28px rgba(23,50,77,.05)}.search-empty-panel{text-align:center}.search-empty-panel strong{display:block;color:var(--navy);font-size:1.35rem}.search-empty-panel p{color:var(--ink-soft)}.search-empty-actions{display:flex;justify-content:center;gap:9px;margin-top:18px}.search-start-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.8fr);gap:45px;align-items:center}.search-start-panel h2{margin:5px 0 10px;color:var(--navy);font-size:2rem}.search-start-panel p{color:var(--ink-soft)}.search-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:9px}.search-shortcuts a{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border:1px solid var(--line);border-radius:11px;color:var(--navy);font-weight:800;text-decoration:none;background:#fafcfd}.search-shortcuts a:hover{border-color:var(--blue);background:#fff}.search-shortcuts span{color:var(--blue)}
@media(max-width:900px){.public-search-form{grid-template-columns:1fr 1fr}.search-query-field{grid-column:1/-1}.public-search-form .button{width:100%}.search-start-panel{grid-template-columns:1fr}}
@media(max-width:600px){.home-search-form{margin-top:20px}.home-search-form button{min-width:88px}.search-hero{padding:25px 18px;margin-top:18px}.public-search-form{grid-template-columns:1fr}.search-query-field{grid-column:auto}.search-start-panel,.search-empty-panel{padding:24px 18px}.search-shortcuts{grid-template-columns:1fr}.search-empty-actions{flex-direction:column}}

/* Step 10 — curated worksheet collections and printable packs */
.collection-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.collection-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #dbe5ee;border-radius:18px;background:#fff;box-shadow:0 10px 30px rgba(23,50,77,.06)}.collection-card-visual{position:relative;display:flex;align-items:center;justify-content:center;min-height:188px;overflow:hidden;background:linear-gradient(145deg,#f4f8fb,#e8f1f7);text-decoration:none}.collection-card-visual>img{width:100%;height:210px;object-fit:cover;object-position:top center}.collection-type-badge{position:absolute;left:14px;top:14px;padding:7px 9px;border-radius:999px;background:#17324d;color:#fff;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.collection-stack{position:relative;width:112px;height:132px}.collection-stack i,.collection-stack b{position:absolute;inset:0;border:1px solid #cad9e5;border-radius:10px;background:#fff;box-shadow:0 8px 18px rgba(23,50,77,.08)}.collection-stack i:nth-child(1){transform:translate(-16px,9px) rotate(-7deg)}.collection-stack i:nth-child(2){transform:translate(14px,7px) rotate(6deg)}.collection-stack i:nth-child(3){transform:translate(0,0)}.collection-stack b{display:flex;align-items:center;justify-content:center;font-size:38px;color:#17324d}.collection-stack b:after{content:'printables';position:absolute;bottom:22px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#6e7e8d}.collection-card-body{display:flex;flex:1;flex-direction:column;padding:19px}.collection-card-meta{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}.collection-card-meta span{padding:5px 8px;border-radius:999px;background:#eef4f8;color:#4d6477;font-size:11px;font-weight:750}.collection-card h3{margin:0 0 8px;font-size:21px;line-height:1.2}.collection-card h3 a{color:inherit;text-decoration:none}.collection-card p{margin:0 0 16px;color:#617383;font-size:14px;line-height:1.6}.collection-card .text-link{margin-top:auto}.collection-section-cta{display:flex;justify-content:center;margin-top:24px}.home-collections-section{border-top:1px solid #e2ebf1;padding-top:58px}.collections-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);gap:55px;align-items:center;margin:28px 0 60px;padding:56px;border-radius:28px;background:linear-gradient(135deg,#eef7fb,#f8fbf4);border:1px solid #d9e9e9}.collections-hero h1{max-width:760px;margin:8px 0 16px;font-size:clamp(38px,5vw,64px);line-height:1.02}.collections-hero p:not(.eyebrow){max-width:720px;color:#50677a;font-size:18px;line-height:1.7}.collections-hero-stack{position:relative;height:275px}.collections-hero-stack span{position:absolute;left:50%;top:50%;width:190px;height:238px;border:1px solid #cfdee7;border-radius:17px;background:#fff;box-shadow:0 18px 40px rgba(23,50,77,.10)}.collections-hero-stack span:nth-child(1){transform:translate(-62%,-50%) rotate(-10deg)}.collections-hero-stack span:nth-child(2){transform:translate(-38%,-50%) rotate(9deg)}.collections-hero-stack span:nth-child(3){display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translate(-50%,-50%)}.collections-hero-stack b{font-size:48px;color:#17324d}.collections-hero-stack small{text-transform:uppercase;letter-spacing:.1em;color:#708294;font-weight:800}.collection-featured-section{margin-bottom:60px}.collection-subject-group{margin-top:38px}.collection-group-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #e3ebf1}.collection-group-heading h3{margin:0;font-size:24px}.collection-group-heading span{color:#718292;font-size:13px}.collection-explainer{display:grid;grid-template-columns:minmax(230px,.75fr) minmax(0,1.75fr);gap:42px;margin:65px 0;padding:44px;border-radius:24px;background:#17324d;color:#fff}.collection-explainer h2{margin:8px 0 0;font-size:31px}.collection-explainer .eyebrow{color:#bcd8e8}.collection-explainer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.collection-explainer-grid>div{padding-left:18px;border-left:1px solid rgba(255,255,255,.18)}.collection-explainer-grid span{display:block;margin-bottom:20px;color:#bcd8e8;font-weight:800}.collection-explainer-grid strong{display:block;margin-bottom:7px}.collection-explainer-grid p{margin:0;color:#dce8ef;font-size:13px;line-height:1.65}.collection-detail-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.55fr);gap:50px;align-items:center;margin:25px 0 44px;padding:50px;border:1px solid #dbe7ed;border-radius:26px;background:linear-gradient(135deg,#f8fbfd,#f1f8f4)}.collection-kicker-row{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-bottom:13px}.collection-kicker-row>*{padding:6px 9px;border-radius:999px;background:#e6f0f5;color:#35546b;font-size:11px;font-weight:800;text-decoration:none}.collection-detail-copy h1{margin:0 0 15px;font-size:clamp(36px,5vw,59px);line-height:1.04}.collection-detail-copy>p{max-width:760px;margin:0;color:#536a7c;font-size:18px;line-height:1.7}.collection-hero-actions{display:flex;flex-wrap:wrap;gap:11px;margin-top:25px}.collection-pack-visual{position:relative;height:250px}.collection-pack-visual span{position:absolute;left:50%;top:50%;width:175px;height:215px;border:1px solid #d4e0e7;border-radius:15px;background:#fff;box-shadow:0 15px 32px rgba(23,50,77,.09)}.collection-pack-visual span:nth-child(1){transform:translate(-61%,-50%) rotate(-9deg)}.collection-pack-visual span:nth-child(2){transform:translate(-39%,-50%) rotate(8deg)}.collection-pack-visual span:nth-child(3){display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translate(-50%,-50%)}.collection-pack-visual b{font-size:45px;color:#17324d}.collection-pack-visual small{margin-top:5px;color:#7a8a98;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.collection-intro-panel{max-width:940px;margin:0 auto 55px;padding:32px 36px;border-left:4px solid #2e789f;background:#f7fafc;border-radius:0 16px 16px 0}.collection-intro-panel h2{margin:7px 0 14px;font-size:28px}.collection-intro-panel>div{color:#536b7d;line-height:1.8}.collection-resource-section{margin:55px 0}.collection-resource-list{display:grid;gap:16px;margin:0;padding:0;list-style:none}.collection-resource-item{display:grid;grid-template-columns:58px 150px minmax(0,1fr);gap:20px;align-items:center;padding:18px;border:1px solid #dce6ed;border-radius:17px;background:#fff}.collection-resource-number{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:#17324d;color:#fff;font-weight:850}.collection-resource-preview{height:120px;overflow:hidden;border:1px solid #e0e7ed;border-radius:10px;background:#f5f8fa}.collection-resource-preview img{width:100%;height:100%;object-fit:cover;object-position:top}.collection-resource-preview .worksheet-placeholder{height:100%;min-height:0}.collection-resource-copy h3{margin:6px 0 7px;font-size:22px}.collection-resource-copy h3 a{color:inherit;text-decoration:none}.collection-resource-copy>p{margin:0;color:#607383;font-size:14px;line-height:1.6}.collection-editor-note{padding-left:12px;border-left:3px solid #c9dbe6;font-style:italic}.collection-resource-actions{display:flex;align-items:center;gap:15px;margin-top:11px}.collection-resource-actions>span{color:#52755f;font-size:12px;font-weight:750}.collection-use-panel{display:flex;align-items:center;justify-content:space-between;gap:35px;margin:54px 0;padding:37px 40px;border-radius:22px;background:#17324d;color:#fff}.collection-use-panel h2{margin:7px 0 9px;font-size:30px}.collection-use-panel p:not(.eyebrow){max-width:800px;margin:0;color:#d8e5ed;line-height:1.7}.collection-use-panel .eyebrow{color:#bcd8e8}.collection-related-section{margin-top:58px}.worksheet-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.worksheet-collection-grid .collection-card-visual{min-height:145px}.worksheet-collection-grid .collection-card-visual>img{height:170px}.search-collection-results{margin:44px 0 16px;padding-bottom:36px;border-bottom:1px solid #e1e9ef}
@media(max-width:980px){.collection-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.collections-hero,.collection-detail-hero{grid-template-columns:1fr}.collections-hero-stack,.collection-pack-visual{height:210px}.collection-explainer{grid-template-columns:1fr}.collection-resource-item{grid-template-columns:50px 120px minmax(0,1fr)}}
@media(max-width:700px){.collection-card-grid,.worksheet-collection-grid,.collection-explainer-grid{grid-template-columns:1fr}.collections-hero,.collection-detail-hero{padding:30px 22px;margin-top:16px}.collections-hero-stack,.collection-pack-visual{display:none}.collection-explainer{padding:30px 23px}.collection-explainer-grid>div{padding:14px 0 0;border-left:0;border-top:1px solid rgba(255,255,255,.18)}.collection-resource-item{grid-template-columns:42px 84px minmax(0,1fr);gap:12px;padding:12px}.collection-resource-preview{height:88px}.collection-resource-copy h3{font-size:17px}.collection-resource-copy>p,.collection-resource-copy .worksheet-meta{display:none}.collection-resource-actions{align-items:flex-start;flex-direction:column;gap:5px}.collection-use-panel{align-items:flex-start;flex-direction:column;padding:28px 24px}.collection-intro-panel{padding:25px 22px}.collection-group-heading{align-items:flex-start;flex-direction:column;gap:5px}}

/* Step 13 generated collection packs */
.collection-pack-status{margin-top:13px!important;color:#667c8d!important;font-size:13px!important;font-weight:700}.collection-inline-downloads{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.collection-inline-downloads .button{margin:0}.collection-hero-actions .button{white-space:nowrap}@media(max-width:560px){.collection-hero-actions{align-items:stretch;flex-direction:column}.collection-hero-actions .button{width:100%;text-align:center}.collection-inline-downloads{align-items:stretch;flex-direction:column}.collection-inline-downloads .button{width:100%;text-align:center}}

/* Step 14 — launch accessibility, legal/contact and error polish */
:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #2b6db0;outline-offset:3px}
.footer-grid{grid-template-columns:1.55fr repeat(3,minmax(0,1fr));gap:46px}
.legal-page,.contact-page,.error-page{max-width:860px;margin:0 auto;padding:64px 0 96px}.legal-page h1,.contact-page h1,.error-page h1{font-size:clamp(2.4rem,6vw,4.5rem);margin-bottom:16px}.legal-updated{color:var(--ink-soft);font-size:.86rem}.legal-copy{display:grid;gap:10px;margin-top:36px}.legal-copy h2{margin:28px 0 0;font-size:1.45rem}.legal-copy p{margin:0;color:var(--ink-soft);line-height:1.8}.legal-note{margin-top:28px;padding:18px 20px;border:1px solid #e8d69c;border-radius:12px;background:#fff9e8;color:#635222;line-height:1.6}.contact-intro{max-width:720px;margin-bottom:30px}.contact-intro>p:last-child{color:var(--ink-soft);line-height:1.75}.public-contact-form{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:30px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-sm)}.public-contact-form label{display:grid;gap:8px;color:var(--navy);font-weight:800;font-size:.86rem}.public-contact-form label:nth-of-type(4),.public-contact-form label:nth-of-type(5),.public-contact-form .form-privacy-note,.public-contact-form .button{grid-column:1/-1}.public-contact-form input,.public-contact-form textarea{width:100%;border:1px solid #cad6df;border-radius:10px;padding:12px 13px;background:#fff;color:var(--navy);font:inherit}.public-contact-form textarea{resize:vertical}.form-privacy-note{margin:0;color:var(--ink-soft);font-size:.78rem;line-height:1.6}.hp-field{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.form-success,.form-errors{margin:0 0 22px;padding:17px 19px;border-radius:12px}.form-success{border:1px solid #b9dfcb;background:#eefaf3;color:#246341}.form-errors{border:1px solid #efc4c4;background:#fff1f1;color:#8b3131}.form-errors ul{margin:8px 0 0;padding-left:20px}.error-search-form{display:flex;gap:10px;max-width:620px;margin:28px 0 18px}.error-search-form label{flex:1}.error-search-form input{width:100%;height:48px;border:1px solid var(--line);border-radius:10px;padding:0 13px;font:inherit}.error-actions{display:flex;flex-wrap:wrap;gap:8px}.error-actions .button{margin:0}
@media(max-width:900px){.footer-grid{grid-template-columns:1.5fr 1fr 1fr}.footer-grid>div:last-child{grid-column:2/-1}}
@media(max-width:580px){.footer-grid{grid-template-columns:1fr 1fr}.footer-grid>div:last-child{grid-column:auto}.public-contact-form{grid-template-columns:1fr;padding:22px}.public-contact-form label,.public-contact-form label:nth-of-type(4),.public-contact-form label:nth-of-type(5),.public-contact-form .form-privacy-note,.public-contact-form .button{grid-column:1}.error-search-form{display:grid}.error-search-form .button{width:100%}}

/* Compact navigation on age subject/topic pages: keep full topic directories on the age landing page only. */
.age-context-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 22px;
    padding: 14px 18px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 16px;
    background: var(--surface, #fff);
}
.age-context-nav .text-link { margin: 0; }
@media (max-width: 640px) {
    .age-context-nav { align-items: flex-start; flex-direction: column; }
}


/* ========================================================================
   RewardClass Free Resources theme
   Mirrors the RewardClass visual language: Open Sans, navy, coral, gold,
   warm cream surfaces, rounded cards and playful reward-style accents.
   ======================================================================== */
:root {
    --ink: #07122d;
    --ink-soft: #566070;
    --paper: #ffffff;
    --page: #fffdf8;
    --line: #e7e7e7;
    --navy: #07122d;
    --navy-deep: #07122d;
    --blue: #2563eb;
    --blue-soft: #eef4ff;
    --teal: #0ea5a4;
    --teal-soft: #e8fbf8;
    --green: #2f9e62;
    --green-soft: #edf9f2;
    --gold: #f4b400;
    --gold-soft: #fff7db;
    --rose: #ff4f2f;
    --rose-soft: #fff0eb;
    --purple: #7c3aed;
    --purple-soft: #f3edff;
    --orange: #ff8a00;
    --orange-soft: #fff4df;
    --radius-sm: 13px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 10px 28px rgba(7, 18, 45, .08);
    --shadow: 0 18px 44px rgba(7, 18, 45, .12);
}

body {
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--page);
}

.container { width: min(1200px, calc(100% - 36px)); }

/* RewardClass header */
.rewardclass-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(255,255,255,.98);
    border-bottom: 0;
    box-shadow: 0 5px 22px rgba(7,18,45,.06);
    backdrop-filter: blur(14px);
}
.rewardclass-header .header-inner {
    width: min(1140px, calc(100% - 24px));
    min-height: 68px;
    padding-left: 12px;
    padding-right: 12px;
    gap: 22px;
}
.brand-cluster {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}
.rc-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #07122d;
    text-decoration: none;
    white-space: nowrap;
}
.rc-brand-mark {
    width: 37px;
    height: 37px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd33d, #f4b400);
    color: #07122d;
    box-shadow: 0 8px 18px rgba(244,180,0,.22);
    font-size: 18px;
    line-height: 1;
}
.rc-brand-word {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.8px;
    line-height: 1;
}
.rc-brand-word > span { color: #ff4f2f; }
.brand-divider {
    width: 1px;
    height: 34px;
    background: #e4e5e8;
}
.resource-brand {
    display: grid;
    text-decoration: none;
    line-height: 1.15;
}
.resource-brand strong {
    color: #07122d;
    font-size: 13px;
    font-weight: 800;
}
.resource-brand small {
    margin-top: 3px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
}
.rc-platform-nav {
    gap: 6px;
    margin-left: auto;
}
.rc-platform-nav a {
    padding: 9px 10px;
    border-radius: 8px;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}
.rc-platform-nav a:hover,
.rc-platform-nav a.is-current {
    color: #111827;
    background: #f6f6f6;
}
.rc-platform-nav .rc-login {
    margin-left: 3px;
    border: 1px solid #e5e7eb;
    background: #fff;
}
.rc-platform-nav .nav-highlight,
.rc-platform-nav .rc-trial {
    padding: 10px 15px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff4f5f, #ff3d2e);
    color: #fff;
    box-shadow: 0 9px 18px rgba(255,79,47,.20);
}
.rc-platform-nav .nav-highlight:hover,
.rc-platform-nav .rc-trial:hover {
    background: linear-gradient(135deg, #ff4557, #f23528);
    color: #fff;
    transform: translateY(-1px);
}
.resource-nav-shell {
    border-top: 1px solid #f0eee9;
    border-bottom: 1px solid #f0e6c5;
    background: linear-gradient(90deg, #fffaf0, #fff7db, #fffaf0);
}
.resource-nav-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.resource-nav-label {
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.resource-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.resource-nav a {
    padding: 7px 10px;
    border-radius: 8px;
    color: #3f3a30;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}
.resource-nav a:hover {
    background: rgba(255,255,255,.78);
    color: #07122d;
}

/* Shared RewardClass controls */
h1, h2, h3 { color: #07122d; }
.eyebrow {
    color: #92400e;
    font-weight: 800;
}
.button {
    border-radius: 13px;
    font-weight: 800;
}
.button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #ff4f5f, #ff3d2e);
    color: #fff;
    box-shadow: 0 10px 21px rgba(255,79,47,.18);
}
.button.primary:hover {
    background: linear-gradient(135deg, #ff4557, #f23528);
    color: #fff;
}
.button.reward-gold,
.button.secondary {
    border-color: transparent;
    background: linear-gradient(135deg, #ffd33d, #f4b400);
    color: #111827;
    box-shadow: 0 10px 21px rgba(244,180,0,.16);
}
.button.reward-gold:hover,
.button.secondary:hover {
    color: #111827;
    box-shadow: 0 13px 28px rgba(244,180,0,.22);
}
.button.ghost {
    border-color: #eadfb9;
    background: #fffdf6;
    color: #07122d;
}
.text-link { color: #07122d; }
.text-link:hover { color: #ff4f2f; }

/* Homepage */
.home-page main.container { padding-top: 0; }
.home-hero {
    min-height: 610px;
    padding: 70px 0 64px;
}
.home-hero::before {
    bottom: 16px;
    height: 455px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,211,61,.28), transparent 29%),
        radial-gradient(circle at 13% 88%, rgba(255,79,47,.10), transparent 26%),
        linear-gradient(135deg, #fffaf0 0%, #fffdf8 52%, #fff3cf 100%);
    box-shadow: inset 0 0 0 1px rgba(244,180,0,.08);
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    margin: 0 0 15px;
    padding: 9px 14px;
    border: 1px solid #f6d36f;
    border-radius: 999px;
    background: #fff7db;
    color: #92400e;
    box-shadow: 0 8px 20px rgba(146,64,14,.07);
    font-size: 13px;
    font-weight: 800;
}
.home-hero .eyebrow { margin-bottom: 9px; }
.home-hero h1 {
    color: #07122d;
    letter-spacing: -2.7px;
}
.rc-accent {
    position: relative;
    display: inline;
    color: #ff4f2f;
}
.rc-accent::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 3px;
    right: 3px;
    bottom: 3px;
    height: 9px;
    border-radius: 999px;
    background: rgba(244,180,0,.30);
}
.hero-lead {
    color: #394150;
    font-weight: 600;
}
.home-search-form {
    border-color: #ece2bf;
    box-shadow: 0 12px 30px rgba(7,18,45,.08);
}
.home-search-form button {
    background: #07122d;
    color: #fff;
}
.hero-points li { color: #4b5563; }
.hero-points span {
    background: #fff3cf;
    color: #92400e;
}
.paper-stack,
.mini-sheet {
    border-color: #eee0ae;
    box-shadow: 0 22px 48px rgba(7,18,45,.12);
}
.paper-stack-back { background: #fff1c1; }
.paper-stack-mid { background: #fff0eb; }
.mini-badge {
    background: #fff7db;
    color: #92400e;
}
.hero-sticker {
    border: 2px solid rgba(255,255,255,.75);
    box-shadow: 0 16px 30px rgba(7,18,45,.16);
}
.sticker-one { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.sticker-two { background: linear-gradient(135deg, #ff8a00, #ff4f2f); }

.quick-strip {
    border-color: #efe8d6;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(7,18,45,.06);
}
.quick-strip > div { border-right-color: #efe8d6; }
.quick-strip strong { color: #07122d; }

/* Resource cards */
.subject-card,
.worksheet-card,
.age-topic-panel,
.age-subject-card,
.home-age-band-panel,
.collection-card,
.public-contact-form {
    border-color: #ece8dc;
    border-radius: 22px;
    box-shadow: 0 10px 27px rgba(7,18,45,.055);
}
.subject-card:hover,
.worksheet-card:hover,
.age-topic-panel:hover,
.age-subject-card:hover {
    border-color: #f0d574;
    box-shadow: 0 16px 34px rgba(7,18,45,.10);
}
.subject-card--maths .subject-mark,
.age-subject-card--maths .age-subject-mark,
.age-topic-panel--maths .age-subject-mark {
    background: #fff7db;
    color: #92400e;
}
.subject-card--english .subject-mark,
.age-subject-card--english .age-subject-mark,
.age-topic-panel--english .age-subject-mark {
    background: #fff0eb;
    color: #d83a25;
}
.resource-count,
.worksheet-meta span {
    background: #fff7db;
    color: #7c4a00;
}
.worksheet-meta span:nth-child(2) {
    background: #eef4ff;
    color: #2456a6;
}
.free-label,
.resource-badge {
    background: linear-gradient(135deg, #ff4f5f, #ff3d2e);
    color: #fff;
}
.topic-pill,
.age-topic-link {
    border-color: #ebe7dc;
    background: #fff;
}
.topic-pill:hover,
.age-topic-link:hover {
    border-color: #f4c94a;
    box-shadow: 0 8px 18px rgba(244,180,0,.10);
}
.age-topic-link b { color: #ff4f2f; }

/* Age + archive surfaces */
.age-section {
    background:
        radial-gradient(circle at 87% 14%, rgba(255,211,61,.15), transparent 25%),
        radial-gradient(circle at 10% 80%, rgba(255,79,47,.10), transparent 22%),
        #07122d;
}
.age-section .eyebrow { color: #ffd33d; }
.age-archive-hero,
.page-hero,
.archive-hero,
.worksheet-detail-header {
    border-color: #f1dfaa;
    background: linear-gradient(135deg, #fff7db 0%, #fffdf8 54%, #fff0eb 100%);
}
.age-hero-number {
    background: #07122d;
    color: #ffd33d;
}
.age-context-nav,
.age-sibling-nav {
    border-color: #ece6d7;
    background: #fff;
    box-shadow: 0 8px 22px rgba(7,18,45,.045);
}
.age-sibling-nav a:hover,
.age-sibling-nav a.is-current {
    border-color: #07122d;
    background: #07122d;
    color: #fff;
}

/* Worksheet detail */
.worksheet-title-meta a,
.breadcrumbs a { color: #d83a25; }
.worksheet-preview-panel,
.worksheet-copy-panel,
.worksheet-download-card,
.worksheet-facts-card,
.worksheet-age-card {
    border-color: #ece8dc;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(7,18,45,.055);
}
.worksheet-download-card {
    background: linear-gradient(145deg, #07122d 0%, #13264e 100%);
}
.worksheet-download-card h2,
.worksheet-download-card h3 { color: #fff; }
.worksheet-download-card p { color: #dbe2ef; }
.worksheet-download-card .button.primary {
    background: linear-gradient(135deg, #ffd33d, #f4b400);
    color: #07122d;
}
.worksheet-preview-frame { background: #fffdf8; }

/* Conversion strip + footer */
.rewardclass-conversion-strip {
    margin-top: 0;
    padding: 42px 0;
    background:
        radial-gradient(circle at 84% 30%, rgba(255,211,61,.18), transparent 25%),
        linear-gradient(135deg, #fff7db, #fffaf0 55%, #fff0eb);
    border-top: 1px solid #f1dfaa;
}
.rewardclass-conversion-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}
.rewardclass-conversion-inner > div:first-child { max-width: 720px; }
.conversion-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
}
.rewardclass-conversion-inner h2 {
    margin: 0 0 8px;
    font-size: clamp(27px, 3.5vw, 40px);
    letter-spacing: -1.3px;
}
.rewardclass-conversion-inner p {
    margin: 0;
    color: #4b5563;
    line-height: 1.7;
}
.conversion-actions {
    min-width: max-content;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.conversion-actions .button { margin: 0; }

.rewardclass-footer {
    padding-top: 54px;
    border-top: 0;
    background: #07122d;
    color: #fff;
}
.rewardclass-footer .footer-grid { padding-top: 0; }
.rewardclass-footer h2 { color: #fff; }
.rewardclass-footer p { color: #c7d0df; }
.rewardclass-footer nav a {
    color: #b9c4d4;
}
.rewardclass-footer nav a:hover,
.footer-platform-link:hover {
    color: #ffd33d;
}
.rc-brand--footer { color: #fff; margin-bottom: 17px; }
.rc-brand--footer .rc-brand-word { color: #fff; }
.footer-platform-link {
    display: inline-flex;
    margin-top: 8px;
    color: #ffd33d;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.rewardclass-footer .footer-bottom {
    border-top-color: rgba(255,255,255,.11);
    color: #96a3b6;
}

/* Responsive RewardClass navigation */
@media (max-width: 1050px) {
    .rc-platform-nav { gap: 2px; }
    .rc-platform-nav a { padding: 8px 7px; font-size: 12px; }
    .resource-brand small { display: none; }
}
@media (max-width: 880px) {
    .rewardclass-header .header-inner { min-height: 68px; }
    .brand-divider { display: none; }
    .resource-brand {
        padding: 5px 8px;
        border-radius: 8px;
        background: #fff7db;
    }
    .resource-brand strong { font-size: 11px; }
    .nav-toggle { display: block; margin-left: auto; }
    .rc-platform-nav {
        position: absolute;
        top: 68px;
        left: 18px;
        right: 18px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 13px;
        border: 1px solid #ebe7dc;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 18px 38px rgba(7,18,45,.14);
    }
    .rc-platform-nav.is-open { display: flex; }
    .rc-platform-nav a { padding: 11px 12px; }
    .rc-platform-nav .rc-login { margin-left: 0; }
    .resource-nav-inner {
        min-height: 42px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .resource-nav-inner::-webkit-scrollbar { display: none; }
    .resource-nav-label { display: none; }
    .resource-nav { min-width: max-content; }
    .rewardclass-conversion-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }
    .conversion-actions { min-width: 0; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 26px, 1200px); }
    .rc-brand-word { font-size: 18px; }
    .rc-brand-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 16px; }
    .resource-brand { display: none; }
    .home-hero { padding-top: 48px; }
    .home-hero h1 { letter-spacing: -1.8px; }
    .hero-pill { font-size: 11px; }
    .rewardclass-conversion-strip { padding: 34px 0; }
    .conversion-actions { width: 100%; }
    .conversion-actions .button { width: 100%; }
}

/* Exact RewardClass logo + simplified platform header */
.rc-brand-logo {
    display: inline-flex;
    align-items: center;
    min-height: 35px;
}
.rc-brand-logo {
    transform: translate(-52px);
}
.rc-brand-logo img {
    display: block;
    width: auto;
    height: 31.2px;
    max-width: 197px;
    object-fit: contain;
}
.rc-platform-nav--simple {
    display: flex !important;
    position: static !important;
    width: auto !important;
    margin-left: auto;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.rc-platform-nav--simple .rc-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}
.rc-platform-nav--simple .rc-home-button:hover {
    background: #f6f6f6;
    color: #111827;
}
.rc-brand-logo--footer {
    width: fit-content;
    margin-bottom: 17px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff;
}
.rc-brand-logo--footer img {
    height: 36px;
    max-width: 203px;
}
@media (max-width: 880px) {
    .rc-brand-logo img { height: 35px; max-width: 197px; }
    .rc-platform-nav--simple { display: flex !important; }
    .rc-platform-nav--simple .rc-home-button { min-height: 38px; padding: 8px 13px; }
}
@media (max-width: 520px) {
    .rewardclass-header .header-inner { gap: 10px; }
    .brand-cluster { gap: 8px; }
    .rc-brand-logo img { height: 35px; max-width: 197px; }
    .resource-brand small { display: none; }
    .resource-brand strong { font-size: 10px; }
    .rc-platform-nav--simple .rc-home-button { padding: 7px 10px; font-size: 12px; }
    .rc-brand-logo--footer img { height: 32px; max-width: 180px; }
}

/* Subject landing pages: keep the full Age 5–11 selector on one line on desktop. */
@media (min-width: 901px) {
    .subject-archive .archive-age-buttons.age-button-grid {
        flex-wrap: nowrap;
        max-width: none;
        gap: 8px;
    }
    .subject-archive .archive-age-buttons.age-button-grid .button {
        flex: 0 0 auto;
        min-width: 72px;
        margin: 0;
        padding: 10px 12px;
        white-space: nowrap;
    }
}
