﻿/* =========================================================
   MYSPELLINGS — CONSOLIDATED SHARED STYLES
   All regions. Homepages and worksheet pages.
   ========================================================= */

/* ---------- Foundation ---------- */

:root {
    --bg: #031126;
    --bg2: #071c3d;
    --panel: rgba(10, 30, 64, .96);
    --panel2: rgba(7, 22, 48, .99);
    --border: rgba(126, 179, 255, .22);
    --text: #ffffff;
    --muted: #b8c7df;
    --teal: #1fe0c3;
    --gold: #ffcf46;
    --shadow: 0 22px 60px rgba(0, 0, 0, .26);
    --max: 1320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
    background: radial-gradient(ellipse at 8% 4%, rgba(31, 224, 195, .12), transparent 28%), radial-gradient(ellipse at 95% 12%, rgba(80, 145, 255, .14), transparent 30%), linear-gradient(180deg, #031126, #061a35 52%, #031126);
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        opacity: .22;
        background-image: radial-gradient(circle at 8% 15%, #fff 0 1px, transparent 2px), radial-gradient(circle at 36% 72%, #fff 0 1px, transparent 2px), radial-gradient(circle at 78% 18%, #fff 0 1px, transparent 2px), radial-gradient(circle at 92% 82%, #fff 0 1px, transparent 2px);
    }

.page {
    position: relative;
    z-index: 1;
}

.container {
    width: min(var(--max), calc(100% - 48px));
    margin-inline: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: rgba(31, 224, 195, .15);
}

    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 3px solid var(--teal);
        outline-offset: 4px;
    }

::selection {
    color: #031126;
    background: var(--teal);
}

.desktop-content,
.site-footer {
    display: block;
}

.mobile-region-wrap,
.download-hint,
.hero-mascot,
.hero-copy .learn-more-link {
    display: none;
}

.brand-word {
    font-weight: 950;
    letter-spacing: -.055em;
    white-space: nowrap;
}

    .brand-word .my,
    .accent {
        color: var(--teal);
    }

    .brand-word .spellings {
        color: #fff;
    }

/* ---------- Header and navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: block;
    background: rgba(3, 13, 29, .95);
    border-bottom: 1px solid rgba(126, 179, 255, .16);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 84px;
    padding-block: 12px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    width: 175px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 18px;
    min-width: 0;
    color: #d8e4f6;
    font-size: .88rem;
    font-weight: 800;
}

    .nav-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        white-space: nowrap;
        transition: color .18s ease;
    }

        .nav-links a:hover,
        .nav-links .nav-current,
        .nav-links a[aria-current="page"] {
            color: var(--teal);
        }

.nav-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 12px;
}

.region-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.region-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(126, 179, 255, .3);
    border-radius: 999px;
    background: #0a1e40;
    color: #fff;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

    .region-button:hover,
    .region-button[aria-expanded="true"] {
        border-color: var(--teal);
        background: #0d2d49;
    }

.region-flag-img {
    width: 24px;
    height: 18px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .22);
}

.region-label {
    font-size: .88rem;
    line-height: 1;
}

.region-chevron {
    font-size: .72rem;
    opacity: .8;
}

.region-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    display: none;
    width: 248px;
    max-width: calc(100vw - 32px);
    max-height: 65vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #0a1e3c;
    box-shadow: 0 24px 54px rgba(0, 0, 0, .42);
}

.region-picker.open .region-menu {
    display: grid;
    gap: 5px;
}

.region-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

    .region-option::after {
        content: attr(aria-label);
        font-size: .88rem;
        font-weight: 750;
        line-height: 1.3;
    }

    .region-option:hover {
        background: rgba(255, 255, 255, .06);
    }

    .region-option.active {
        background: rgba(31, 224, 195, .12);
        border-color: rgba(31, 224, 195, .4);
    }

.region-option-flag-img {
    width: 32px;
    height: 23px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
}

.play-badge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    line-height: 0;
    transition: transform .18s ease;
}

.play-badge {
    width: 222px;
    max-width: 100%;
    height: auto;
}

.nav-play-badge .play-badge {
    width: 145px;
}

.download-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ---------- Homepage hero ---------- */

.hero {
    padding: clamp(40px, 5vw, 72px) 0 40px;
}

.hero-shell {
    position: relative;
}

.hero-grid {
    display: block;
}

.hero-copy {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    column-gap: clamp(28px, 4vw, 58px);
    width: 100%;
    max-width: none;
    text-align: left;
}

    .hero-copy > * {
        min-width: 0;
    }

h1 {
    margin: 0 0 22px;
    font-size: clamp(3rem, 5.2vw, 4.9rem);
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -.055em;
}

.hero-copy h1 {
    grid-column: 1;
    grid-row: 1;
    max-width: 640px;
}

.lead {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.hero-copy .lead {
    grid-column: 1;
    grid-row: 2;
    max-width: 560px;
    margin: 0 0 24px;
}

.hero-points {
    display: grid;
    gap: 12px;
    margin: 0 0 26px;
}

.hero-copy .hero-points {
    grid-column: 1;
    grid-row: 3;
}

.hero-point {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: #e8f3ff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
}

    .hero-point::before {
        content: "✓";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        border: 1px solid rgba(31, 224, 195, .4);
        border-radius: 50%;
        background: rgba(31, 224, 195, .1);
        color: var(--teal);
        font-size: .78rem;
        font-weight: 900;
    }

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
}

.hero-copy .hero-actions {
    grid-column: 1;
    grid-row: 4;
}

.trust-row,
.hero-trust-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    color: #cbd9ed;
    font-weight: 750;
}

.hero-copy .hero-trust-row {
    grid-column: 1;
    grid-row: 5;
    margin-top: 22px;
    font-size: .8rem;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(31, 224, 195, .4);
    border-radius: 50%;
    background: rgba(31, 224, 195, .08);
    color: var(--teal);
    font-size: .7rem;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.hero-copy .hero-visual {
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: center;
    margin: 0;
    padding: 12px 0;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 15% 0;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(31, 224, 195, .13), transparent 68%);
    pointer-events: none;
}

.hero-device {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    filter: drop-shadow(0 28px 38px rgba(0, 0, 0, .34));
}

    .hero-device img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

/* ---------- Sections and feature cards ---------- */

.section {
    padding: clamp(36px, 4.3vw, 58px) 0;
}

.feature-strip {
    padding: 18px 0 30px;
}

.feature-strip-grid,
.benefit-grid,
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mini-card,
.benefit,
.shot-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: radial-gradient(circle at 0% 0%, rgba(31, 224, 195, .055), transparent 45%), linear-gradient(160deg, var(--panel), var(--panel2));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .15);
}

.mini-card,
.benefit {
    padding: 26px;
}

.mini-icon-wrap,
.benefit-icon-wrap {
    display: flex;
    align-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 18px;
}

.mini-icon,
.benefit-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.mini-card h3,
.benefit h3,
.shot-caption h3 {
    margin: 0 0 9px;
    color: #fff;
    font-size: 1.12rem;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.mini-card p,
.benefit p,
.shot-caption p {
    margin: 0;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.65;
}

.section-title {
    margin: 0 0 14px;
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: -.045em;
    text-align: center;
    text-wrap: balance;
}

.section-sub {
    max-width: 740px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
    text-align: center;
    text-wrap: pretty;
}

.shot-card {
    overflow: hidden;
}

.shot-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #071833;
    border-bottom: 1px solid var(--border);
}

    .shot-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.shot-caption {
    padding: 24px;
}

/* ---------- About, worksheet promotion and final CTA ---------- */

.about-panel {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(160deg, var(--panel), var(--panel2));
    box-shadow: var(--shadow);
}

    .about-panel > *,
    .cta-panel > * {
        min-width: 0;
    }

.about-image {
    min-height: 400px;
    background: #071833;
}

    .about-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

.about-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 3.2vw, 44px);
}

    .about-copy h2,
    .cta-panel h2 {
        margin: 0 0 18px;
        font-size: clamp(1.9rem, 3vw, 3rem);
        font-weight: 950;
        line-height: 1.12;
        letter-spacing: -.045em;
        text-wrap: balance;
    }

    .about-copy p,
    .cta-panel p {
        margin: 0 0 16px;
        color: var(--muted);
        font-size: 1rem;
        line-height: 1.7;
    }

.about-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.about-point {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(126, 179, 255, .17);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}

    .about-point strong {
        display: block;
        margin-bottom: 5px;
        font-size: .93rem;
        line-height: 1.4;
    }

    .about-point span {
        display: block;
        color: var(--muted);
        font-size: .88rem;
        line-height: 1.55;
    }

.learn-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    gap: 8px;
    min-height: 48px;
    margin-top: 20px;
    padding: 12px 20px;
    border: 1px solid rgba(31, 224, 195, .5);
    border-radius: 12px;
    color: var(--teal);
    font-size: .95rem;
    font-weight: 850;
    line-height: 1.4;
    text-align: center;
    transition: background .18s ease, border-color .18s ease;
}

.worksheet-step-label,
.worksheet-kicker {
    display: block;
    color: var(--teal);
    font-size: .76rem;
    font-weight: 900;
    line-height: 1.5;
    letter-spacing: .1em;
    text-transform: uppercase;
}

body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label) {
    position: relative;
    isolation: isolate;
    border-color: rgba(31, 224, 195, .38);
    background: radial-gradient(ellipse at 100% 0%, rgba(31, 224, 195, .16), transparent 55%), linear-gradient(135deg, #0b2945, #07182f);
}

    body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label)::after {
        content: "";
        position: absolute;
        right: -90px;
        bottom: -130px;
        z-index: -1;
        width: 330px;
        height: 330px;
        border: 44px solid rgba(31, 224, 195, .065);
        border-radius: 50%;
        pointer-events: none;
    }

    body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label) .worksheet-step-label {
        margin-bottom: 12px;
    }

    body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label) .learn-more-link {
        border-color: transparent;
        background: var(--teal);
        color: #031126;
        box-shadow: 0 10px 28px rgba(31, 224, 195, .13);
    }

.cta-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    align-items: center;
    gap: 32px;
    overflow: hidden;
    padding: clamp(26px, 3vw, 40px);
    border: 1px solid rgba(31, 224, 195, .25);
    border-radius: 30px;
    background: radial-gradient(circle at 100% 0%, rgba(31, 224, 195, .13), transparent 45%), linear-gradient(150deg, var(--panel), var(--panel2));
    box-shadow: var(--shadow);
}

.cta-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.cta-image {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #071833;
}

    .cta-image img {
        width: 100%;
        height: auto;
    }

/* ---------- Footer ---------- */

.site-footer {
    padding: 30px 0 42px;
}

.footer-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.footer-brand {
    margin-bottom: 6px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 20px;
    font-size: .9rem;
    font-weight: 750;
}

    .footer-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

        .footer-links a:hover {
            color: var(--teal);
        }

.copyright {
    width: 100%;
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(126, 179, 255, .12);
    color: #a1b4cf;
    font-size: .84rem;
}

/* =========================================================
   WORKSHEETS — SCOPED TO WORKSHEET PAGES
   ========================================================= */

body[data-page="worksheets"] .worksheet-hero {
    padding: 56px 0 38px;
}

body[data-page="worksheets"] .worksheet-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

body[data-page="worksheets"] .worksheet-hero-copy {
    min-width: 0;
}

    body[data-page="worksheets"] .worksheet-hero-copy h1 {
        max-width: 690px;
        margin: 12px 0 22px;
        font-size: clamp(3rem, 4.8vw, 4.6rem);
        line-height: 1.05;
    }

body[data-page="worksheets"] .worksheet-lead {
    max-width: 650px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

body[data-page="worksheets"] .worksheet-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: #e8f3ff;
    font-weight: 800;
}

    body[data-page="worksheets"] .worksheet-hero-points span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    body[data-page="worksheets"] .worksheet-hero-points b {
        color: var(--teal);
    }

/* Paper preview */

body[data-page="worksheets"] .worksheet-hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 440px;
    padding: 24px 0;
}

body[data-page="worksheets"] .worksheet-paper-preview {
    position: relative;
    z-index: 2;
    width: min(530px, 88%);
    min-height: 375px;
    overflow: hidden;
    padding: 0 28px 0;
    border-radius: 20px;
    background: #fff;
    color: #17232d;
    transform: rotate(-2deg);
    box-shadow: 0 28px 64px rgba(0, 0, 0, .36);
}

body[data-page="worksheets"] .worksheet-preview-brand {
    display: flex;
    align-items: center;
    min-height: 80px;
    margin: 0 -28px 22px;
    padding: 14px 24px;
    border-bottom: 4px solid var(--gold);
    background: #031126;
}

    body[data-page="worksheets"] .worksheet-preview-brand img {
        width: 205px;
        max-width: 100%;
    }

body[data-page="worksheets"] .worksheet-preview-meta {
    color: #52636d;
    font-size: .8rem;
    font-weight: 800;
}

body[data-page="worksheets"] .worksheet-preview-title {
    margin: 8px 0 6px;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.3;
}

body[data-page="worksheets"] .worksheet-preview-step {
    margin-bottom: 16px;
    color: #087463;
    font-size: 1.05rem;
    font-weight: 900;
}

body[data-page="worksheets"] .worksheet-preview-lines {
    display: grid;
    gap: 10px;
    font-weight: 800;
}

    body[data-page="worksheets"] .worksheet-preview-lines span {
        padding-bottom: 8px;
        border-bottom: 1px solid #d6dede;
        overflow-wrap: anywhere;
    }

body[data-page="worksheets"] .worksheet-preview-footer {
    position: static;
    margin: 22px -28px 0;
    padding: 12px 28px;
    background: #edf7f4;
    color: #086b5c;
    font-size: .75rem;
    font-weight: 850;
    line-height: 1.5;
}

body[data-page="worksheets"] .worksheet-mascot {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: 150px;
    pointer-events: none;
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .32));
}

/* Pack introduction */

body[data-page="worksheets"] .worksheet-pack-intro {
    padding: 4px 0 24px;
}

body[data-page="worksheets"] .worksheet-pack-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center;
    gap: 28px;
    padding: 30px;
    border: 1px solid rgba(31, 224, 195, .28);
    border-radius: 26px;
    background: radial-gradient(circle at 100% 0%, rgba(31, 224, 195, .1), transparent 45%), linear-gradient(150deg, var(--panel), var(--panel2));
}

    body[data-page="worksheets"] .worksheet-pack-banner > * {
        min-width: 0;
    }

    body[data-page="worksheets"] .worksheet-pack-banner h2 {
        margin: 8px 0 12px;
        font-size: clamp(1.8rem, 2.7vw, 2.5rem);
        font-weight: 900;
        line-height: 1.15;
        letter-spacing: -.035em;
    }

    body[data-page="worksheets"] .worksheet-pack-banner > div > p {
        margin: 0;
        color: var(--muted);
        line-height: 1.65;
    }

body[data-page="worksheets"] .worksheet-pack-audiences {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body[data-page="worksheets"] .worksheet-audience {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
}

    body[data-page="worksheets"] .worksheet-audience strong {
        display: block;
        margin-bottom: 7px;
        color: var(--teal);
        font-weight: 850;
    }

    body[data-page="worksheets"] .worksheet-audience span {
        display: block;
        color: #c0cee1;
        font-size: .88rem;
        line-height: 1.6;
    }

/* Builder and guide */

body[data-page="worksheets"] .worksheet-section {
    padding: 24px 0 56px;
}

body[data-page="worksheets"] .worksheet-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    grid-template-areas: "maker guide";
    align-items: start;
    gap: 26px;
    width: min(100%, var(--max));
    margin-inline: auto;
}

    body[data-page="worksheets"] .worksheet-layout.container {
        width: min(var(--max), calc(100% - 48px));
    }

@media (max-width: 600px) {
    body[data-page="worksheets"] .worksheet-layout.container {
        width: calc(100% - 32px);
    }
}

body[data-page="worksheets"] .worksheet-panel,
body[data-page="worksheets"] .worksheet-guide-panel {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: radial-gradient(circle at 100% 0%, rgba(31, 224, 195, .07), transparent 38%), linear-gradient(160deg, var(--panel), var(--panel2));
    box-shadow: var(--shadow);
}

body[data-page="worksheets"] .worksheet-panel {
    grid-area: maker;
}

body[data-page="worksheets"] .worksheet-guide-panel {
    grid-area: guide;
    position: static;
    align-self: start;
    padding: 26px;
}

body[data-page="worksheets"] .worksheet-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

    body[data-page="worksheets"] .worksheet-panel-head > div:first-child {
        flex: 1 1 260px;
        min-width: 0;
    }

body[data-page="worksheets"] .worksheet-panel h2,
body[data-page="worksheets"] .worksheet-guide-panel h2 {
    margin: 8px 0 12px;
    font-size: clamp(1.8rem, 2.5vw, 2.35rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.035em;
}

body[data-page="worksheets"] .worksheet-guide-panel h2 {
    font-size: 1.9rem;
}

body[data-page="worksheets"] .worksheet-panel-head p,
body[data-page="worksheets"] .worksheet-guide-intro {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

body[data-page="worksheets"] .worksheet-region-chip {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 8px;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    color: #e8f3ff;
    font-size: .8rem;
    font-weight: 850;
}

/* Source selection */

body[data-page="worksheets"] .worksheet-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

body[data-page="worksheets"] button.worksheet-mode-button {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    min-height: 96px;
    margin: 0;
    padding: 17px;
    border: 1px solid rgba(126, 179, 255, .28);
    border-radius: 15px;
    background: #081c39;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

body[data-page="worksheets"] .worksheet-mode-button strong {
    display: block;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.35;
}

body[data-page="worksheets"] .worksheet-mode-button span {
    display: block;
    color: #b8c7df;
    font-size: .85rem;
    line-height: 1.5;
}

body[data-page="worksheets"] button.worksheet-mode-button.active {
    border-color: var(--teal);
    background: linear-gradient(145deg, #0b454b, #0a2b40);
    box-shadow: inset 0 0 0 1px rgba(31, 224, 195, .18);
}

body[data-page="worksheets"] .worksheet-mode-button.active strong {
    color: var(--teal);
}

body[data-page="worksheets"] .worksheet-mode-panel {
    display: block;
    width: 100%;
    min-width: 0;
}

    body[data-page="worksheets"] .worksheet-mode-panel[hidden],
    body[data-page="worksheets"] .worksheet-list-preview[hidden] {
        display: none;
    }

/* Fields */

body[data-page="worksheets"] .worksheet-field-grid,
body[data-page="worksheets"] .worksheet-words,
body[data-page="worksheets"] .worksheet-preview-words {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

body[data-page="worksheets"] .worksheet-field {
    min-width: 0;
}

    body[data-page="worksheets"] .worksheet-field label,
    body[data-page="worksheets"] .worksheet-words-fieldset legend {
        display: block;
        margin-bottom: 8px;
        color: #fff;
        font-size: .92rem;
        font-weight: 800;
    }

    body[data-page="worksheets"] .worksheet-field input,
    body[data-page="worksheets"] .worksheet-field select,
    body[data-page="worksheets"] .worksheet-word input {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 50px;
        padding: 11px 13px;
        border: 1px solid rgba(126, 179, 255, .35);
        border-radius: 11px;
        background: #040f24;
        color: #fff;
        font-size: 1rem;
        font-weight: 650;
        line-height: 1.5;
        transition: border-color .18s ease, background .18s ease;
    }

    body[data-page="worksheets"] .worksheet-field select {
        color-scheme: dark;
        text-overflow: ellipsis;
    }

    body[data-page="worksheets"] .worksheet-field input::placeholder,
    body[data-page="worksheets"] .worksheet-word input::placeholder {
        color: #92a7c4;
        opacity: 1;
        font-weight: 400;
    }

    body[data-page="worksheets"] .worksheet-field input:focus,
    body[data-page="worksheets"] .worksheet-field select:focus,
    body[data-page="worksheets"] .worksheet-word input:focus {
        border-color: var(--teal);
        background: #06182b;
        outline: 2px solid var(--teal);
        outline-offset: 2px;
    }

    body[data-page="worksheets"] .worksheet-field input:disabled,
    body[data-page="worksheets"] .worksheet-field select:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

    body[data-page="worksheets"] .worksheet-field input[aria-invalid="true"],
    body[data-page="worksheets"] .worksheet-word input[aria-invalid="true"] {
        border-color: #ffb6b6;
    }

body[data-page="worksheets"] .worksheet-list-preview {
    width: 100%;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: rgba(2, 12, 30, .48);
}

    body[data-page="worksheets"] .worksheet-list-preview h3 {
        margin: 8px 0 16px;
        font-size: 1.3rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

body[data-page="worksheets"] .worksheet-preview-words {
    gap: 9px 12px;
}

    body[data-page="worksheets"] .worksheet-preview-words span {
        display: block;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid rgba(126, 179, 255, .15);
        border-radius: 10px;
        background: rgba(255, 255, 255, .035);
        color: #dce7f5;
        font-size: .92rem;
        font-weight: 750;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

body[data-page="worksheets"] .worksheet-words-fieldset {
    min-width: 0;
    margin: 26px 0 0;
    padding: 0;
    border: 0;
}

body[data-page="worksheets"] .worksheet-field-help {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.6;
}

body[data-page="worksheets"] .worksheet-words {
    gap: 12px 16px;
}

body[data-page="worksheets"] .worksheet-word {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

body[data-page="worksheets"] .worksheet-word-number {
    color: #a2b6d0;
    font-size: .82rem;
    font-weight: 850;
    text-align: right;
}

body[data-page="worksheets"] .worksheet-create-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    margin-top: 26px;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: linear-gradient(135deg, #28e2c8, #17c6ae);
    color: #031126;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(31, 224, 195, .12);
    transition: filter .18s ease, box-shadow .18s ease;
}

    body[data-page="worksheets"] .worksheet-create-button:disabled {
        opacity: .5;
        cursor: not-allowed;
        box-shadow: none;
    }

body[data-page="worksheets"] .worksheet-status {
    min-height: 24px;
    margin-top: 12px;
    color: #dce7f5;
    font-size: .9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

    body[data-page="worksheets"] .worksheet-status.success {
        color: var(--teal);
    }

    body[data-page="worksheets"] .worksheet-status.error {
        color: #ffb6b6;
    }

body[data-page="worksheets"] .worksheet-privacy-note {
    margin: 10px 0 0;
    color: #a0b3ce;
    font-size: .8rem;
    line-height: 1.6;
    text-align: center;
}

/* Guide */

body[data-page="worksheets"] .worksheet-four-steps {
    display: grid;
    gap: 20px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

    body[data-page="worksheets"] .worksheet-four-steps li {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: start;
        gap: 12px;
    }

    body[data-page="worksheets"] .worksheet-four-steps > li > span {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: var(--teal);
        color: #031126;
        font-weight: 900;
    }

    body[data-page="worksheets"] .worksheet-four-steps strong {
        display: block;
        margin-bottom: 5px;
    }

    body[data-page="worksheets"] .worksheet-four-steps p {
        margin: 0;
        color: #b0c1d9;
        font-size: .88rem;
        line-height: 1.6;
    }

body[data-page="worksheets"] .worksheet-guide-app {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

    body[data-page="worksheets"] .worksheet-guide-app strong {
        color: var(--gold);
        font-size: 1rem;
    }

    body[data-page="worksheets"] .worksheet-guide-app p {
        margin: 10px 0 18px;
        color: var(--muted);
        line-height: 1.65;
    }

    body[data-page="worksheets"] .worksheet-guide-app .play-badge {
        width: 180px;
    }

body[data-page="worksheets"] .worksheet-bottom-cta {
    padding-top: 0;
}

/* ---------- Pointer interactions ---------- */

@media (hover: hover) and (pointer: fine) {
    .play-badge-link:hover {
        transform: translateY(-2px);
    }

    .learn-more-link:hover {
        background: rgba(31, 224, 195, .12);
        border-color: var(--teal);
    }

    body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label) .learn-more-link:hover {
        background: #65efdb;
    }

    body[data-page="worksheets"] button.worksheet-mode-button:hover:not(:disabled) {
        border-color: var(--teal);
    }

    body[data-page="worksheets"] .worksheet-create-button:hover:not(:disabled) {
        filter: brightness(1.06);
        box-shadow: 0 16px 34px rgba(31, 224, 195, .2);
    }
}

/* =========================================================
   RESPONSIVE — ONE ORDERED SET OF BREAKPOINTS
   ========================================================= */

@media (max-width: 1150px) {
    .nav {
        flex-wrap: wrap;
        gap: 8px 20px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        padding-top: 6px;
        border-top: 1px solid rgba(126, 179, 255, .14);
        gap: 4px 24px;
    }

    body[data-page="worksheets"] .worksheet-layout {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 22px;
    }

    body[data-page="worksheets"] .worksheet-panel {
        padding: 24px;
    }

    body[data-page="worksheets"] .worksheet-guide-panel {
        padding: 22px;
    }
}

@media (max-width: 1000px) {
    html {
        scroll-padding-top: 24px;
    }

    .site-header {
        position: relative;
    }

    .hero-copy {
        grid-template-columns: minmax(0, 1fr);
        max-width: 760px;
        margin-inline: auto;
    }

        .hero-copy h1 {
            font-size: clamp(2.8rem, 6.6vw, 4.2rem);
        }

        .hero-copy .lead {
            max-width: 660px;
        }

        .hero-copy .hero-visual {
            grid-column: 1;
            grid-row: 5;
            width: 100%;
            max-width: 680px;
            justify-self: center;
            padding: 28px 0 10px;
        }

        .hero-copy .hero-trust-row {
            grid-row: 6;
            margin-top: 14px;
        }

    .feature-strip-grid,
    .benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 700px;
        margin-inline: auto;
    }

    .about-panel,
    .cta-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-image {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        min-height: 0;
        height: 300px;
        overflow: hidden;
        padding: 12px 16px 0;
    }

        .about-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center bottom;
        }

    .about-copy {
        padding: 30px;
    }

    .cta-image {
        width: 100%;
        max-width: 700px;
        justify-self: center;
    }

    body[data-page="worksheets"] .worksheet-hero-grid,
    body[data-page="worksheets"] .worksheet-pack-banner {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    body[data-page="worksheets"] .worksheet-hero-copy {
        max-width: 740px;
    }

    body[data-page="worksheets"] .worksheet-hero-visual {
        width: 100%;
        max-width: 600px;
        min-height: 400px;
        justify-self: center;
    }

    body[data-page="worksheets"] .worksheet-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "maker" "guide";
    }

    body[data-page="worksheets"] .worksheet-panel,
    body[data-page="worksheets"] .worksheet-guide-panel {
        padding: 30px;
    }
}

@media (max-width: 600px) {
    .container {
        width: calc(100% - 32px);
    }

    .nav {
        min-height: 0;
        gap: 8px 12px;
        padding: 12px 0 6px;
    }

    .brand-logo {
        width: 150px;
    }

    .nav-play-badge {
        display: none;
    }

    .nav-links {
        justify-content: flex-start;
        gap: 0 16px;
        padding-top: 4px;
        font-size: .8rem;
    }

        .nav-links a {
            min-height: 44px;
        }

            .nav-links a[href*="privacy"] {
                display: none;
            }

    .region-button {
        padding-inline: 11px;
    }

    .hero {
        padding: 30px 0 26px;
    }

    .hero-copy h1 {
        max-width: 100%;
        margin-bottom: 18px;
        font-size: clamp(2.4rem, 9vw, 3.2rem);
        line-height: 1.07;
        letter-spacing: -.045em;
    }

    .hero-copy .lead {
        margin-bottom: 20px;
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-points {
        gap: 11px;
        margin-bottom: 22px;
    }

    .hero-point {
        gap: 9px;
        font-size: .94rem;
        line-height: 1.5;
    }

    .hero-actions .play-badge {
        width: 205px;
    }

    .hero-copy .hero-visual {
        padding: 24px 0 8px;
    }

    .hero-copy .hero-trust-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        font-size: .8rem;
    }

    .trust-item {
        min-width: 0;
        align-items: flex-start;
    }

    .section {
        padding: 32px 0;
    }

    .feature-strip {
        padding: 16px 0 24px;
    }

    .feature-strip-grid,
    .benefit-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .mini-card,
    .benefit {
        padding: 22px;
        border-radius: 20px;
    }

    .mini-icon-wrap,
    .benefit-icon-wrap {
        width: 58px;
        height: 58px;
        margin-bottom: 14px;
    }

    .mini-icon,
    .benefit-icon {
        width: 56px;
        height: 56px;
    }

    .section-title {
        font-size: clamp(1.8rem, 7vw, 2.35rem);
    }

    .section-sub {
        margin-bottom: 24px;
        font-size: .96rem;
    }

    .showcase-grid {
        gap: 18px;
    }

    .shot-card,
    .about-panel,
    .cta-panel {
        border-radius: 22px;
    }

    .shot-caption {
        padding: 22px;
    }

    .about-image {
        height: 240px;
    }

    .about-copy,
    .cta-panel {
        padding: 24px;
    }

        .about-copy h2,
        .cta-panel h2 {
            font-size: clamp(1.8rem, 7vw, 2.3rem);
        }

    .about-points {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .about-point {
        padding: 14px;
    }

    body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label) .about-copy {
        grid-row: 1;
    }

    body:not([data-page="worksheets"]) .about-panel:has(.worksheet-step-label) .about-image {
        grid-row: 2;
        height: 220px;
    }

    .learn-more-link {
        align-self: stretch;
        width: 100%;
    }

    .cta-panel {
        gap: 24px;
    }

    .footer-panel {
        flex-direction: column;
        gap: 18px;
    }

    .footer-links {
        gap: 0 18px;
    }

    .site-footer {
        padding: 20px 0 30px;
    }

    body[data-page="worksheets"] .worksheet-hero {
        padding: 32px 0 24px;
    }

    body[data-page="worksheets"] .worksheet-hero-copy h1 {
        font-size: clamp(2.35rem, 9vw, 3.1rem);
        letter-spacing: -.04em;
    }

    body[data-page="worksheets"] .worksheet-lead {
        font-size: 1rem;
    }

    body[data-page="worksheets"] .worksheet-hero-points {
        display: grid;
        gap: 10px;
        font-size: .94rem;
    }

    body[data-page="worksheets"] .worksheet-hero-visual {
        min-height: 0;
        padding: 16px 0 24px;
    }

    body[data-page="worksheets"] .worksheet-paper-preview {
        width: 90%;
        min-height: 0;
        padding: 0 20px;
        border-radius: 17px;
        transform: rotate(-1deg);
    }

    body[data-page="worksheets"] .worksheet-preview-brand {
        min-height: 64px;
        margin: 0 -20px 18px;
        padding: 12px 18px;
    }

        body[data-page="worksheets"] .worksheet-preview-brand img {
            width: 170px;
        }

    body[data-page="worksheets"] .worksheet-preview-title {
        font-size: 1.2rem;
    }

    body[data-page="worksheets"] .worksheet-preview-footer {
        margin-inline: -20px;
        padding: 12px 20px;
    }

    body[data-page="worksheets"] .worksheet-mascot {
        width: 94px;
        right: 0;
        bottom: 0;
    }

    body[data-page="worksheets"] .worksheet-pack-banner,
    body[data-page="worksheets"] .worksheet-panel,
    body[data-page="worksheets"] .worksheet-guide-panel {
        padding: 22px;
        border-radius: 21px;
    }

    body[data-page="worksheets"] .worksheet-section {
        padding: 18px 0 40px;
    }

    body[data-page="worksheets"] .worksheet-layout {
        gap: 20px;
    }

    body[data-page="worksheets"] .worksheet-panel-head {
        display: block;
    }

    body[data-page="worksheets"] .worksheet-region-chip {
        margin-top: 16px;
    }

    body[data-page="worksheets"] .worksheet-mode-switch,
    body[data-page="worksheets"] .worksheet-field-grid,
    body[data-page="worksheets"] .worksheet-words,
    body[data-page="worksheets"] .worksheet-preview-words,
    body[data-page="worksheets"] .worksheet-pack-audiences {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-page="worksheets"] button.worksheet-mode-button {
        min-height: 84px;
        padding: 15px 16px;
    }

    body[data-page="worksheets"] .worksheet-list-preview {
        padding: 16px;
    }
}

@media (max-width: 380px) {
    .nav-links {
        gap: 0 12px;
        font-size: .76rem;
    }

    .brand-logo {
        width: 138px;
    }

    .about-copy,
    .cta-panel,
    body[data-page="worksheets"] .worksheet-panel,
    body[data-page="worksheets"] .worksheet-guide-panel,
    body[data-page="worksheets"] .worksheet-pack-banner {
        padding: 18px;
    }
}

/* Keep this last so later interaction rules cannot override it. */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Larger hero artwork without changing the page structure. */

@media (min-width: 1001px) {
    /* Grow into the column gap, keeping the right edge aligned. */
    .hero-copy .hero-visual {
        width: 110%;
        max-width: none;
        justify-self: end;
    }

    /* Make the worksheet fox a visible part of the composition. */
    body[data-page="worksheets"] .worksheet-mascot {
        width: 220px;
        right: -8px;
        bottom: -12px;
    }
}

@media (min-width: 601px) and (max-width: 1000px) {
    body[data-page="worksheets"] .worksheet-mascot {
        width: 185px;
        bottom: -8px;
    }
}

@media (max-width: 600px) {
    body[data-page="worksheets"] .worksheet-mascot {
        width: 125px;
        right: 0;
        bottom: -6px;
    }
}