/* Product page additions; shared branding comes from custom.css. */
.phonics-page { font-family: "Nunito", system-ui, sans-serif; }
.phonics-page h1, .phonics-page h2, .phonics-page h3 { line-height: 1.12; }
.phonics-page h1 { max-width: 18ch; font-size: clamp(2.6rem, 4.8vw, 4.2rem); }
.phonics-page h1 span { color: #17698e; }
.phonics-page h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
.phonics-page h3 { font-size: 1.45rem; }
.phonics-page p { line-height: 1.7; }
.phonics-page .eyebrow { color: #17698e; }
.phonics-page a:focus-visible, .phonics-page summary:focus-visible { outline: 3px solid #17698e; outline-offset: 5px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 12px 18px; border-radius: 12px; background: white; }
.skip-link:focus { top: 16px; }
.phonics-section { width: min(calc(100% - 40px), var(--max-width)); margin: 0 auto; }
.phonics-page .topbar { justify-content: space-between; }
.phonics-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.phonics-intro { max-width: 52ch; font-size: 1.15rem; color: #485b6b; }
.phonics-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 26px 0 18px; }
.phonics-note { font-size: 0.9rem; color: #485b6b; }
.phonics-art { margin: 0; padding: 14px; border-radius: 30px; background: white; box-shadow: var(--shadow); transform: rotate(2deg); }
.phonics-art img { width: 100%; height: auto; border-radius: 20px; }
.phonics-art figcaption { padding: 16px 8px 6px; text-align: center; font-weight: 800; }
.phonics-activities { padding-bottom: 72px; scroll-margin-top: 24px; }
.phonics-section-heading { max-width: 680px; margin-bottom: 30px; }
.phonics-section-heading p:not(.eyebrow) { color: #485b6b; }
.phonics-activity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.phonics-activity { margin: 0; }
.phonics-screen { padding: 20px 30px; border-radius: 24px; background: #e7f5fa; border: 1px solid var(--line); }
.phonics-activity:nth-child(2) .phonics-screen { background: #fff0cd; }
.phonics-activity:nth-child(3) .phonics-screen { background: #edf5d6; }
.phonics-activity:nth-child(4) .phonics-screen { background: #f1eaf7; }
.phonics-screen img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 20px #2130401a; }
.phonics-activity h3 { margin-top: 22px; }
.phonics-activity p { margin: 10px 0 0; color: #485b6b; }
.phonics-family { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 44px; align-items: center; padding-bottom: 64px; }
.phonics-family p { color: #485b6b; }
.phonics-practice-figure { margin: 0; }
.phonics-practice-art { width: 100%; height: auto; border-radius: 24px; }
.phonics-preview { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 24px 28px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.phonics-preview p { margin: 8px 0 0; }
.phonics-video-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.phonics-faq { max-width: 850px; padding-bottom: 72px; scroll-margin-top: 24px; }
.phonics-questions { margin-top: 28px; }
.phonics-questions details { padding: 22px 0; border-bottom: 1px solid #21304026; }
.phonics-questions summary { cursor: pointer; font-size: 1.15rem; font-weight: 800; }
.phonics-questions p { margin-bottom: 0; color: #485b6b; }
.phonics-questions a, .phonics-footer a { text-decoration: underline; text-underline-offset: 4px; }
.phonics-download { padding: 46px 28px; border-radius: 32px; background: #fff; border: 1px solid var(--line); text-align: center; scroll-margin-top: 24px; }
.phonics-download .store-badge-row { justify-content: center; margin: 26px 0 18px; }
.phonics-download .store-badge img { height: 54px; width: auto; max-width: 100%; }
.phonics-download .store-badge-google img { height: 50px; }
.phonics-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; padding: 32px 0; font-size: 0.95rem; }
.phonics-learning { padding-bottom: 72px; scroll-margin-top: 24px; }
.phonics-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.phonics-path > div { padding: 26px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.phonics-path dt { font-family: "Baloo 2", sans-serif; font-size: 1.5rem; line-height: 1.15; font-weight: 700; }
.phonics-path dd { margin: 14px 0 0; color: #485b6b; line-height: 1.7; }
.guide-main { width: min(calc(100% - 40px), 800px); margin: 0 auto; }
.guide-header { padding: 32px 0 24px; }
.guide-illustration { margin: 0 0 32px; }
.guide-illustration img { width: 100%; height: auto; border-radius: 24px; }
.guide-illustration figcaption { margin-top: 12px; color: #485b6b; font-size: 0.95rem; line-height: 1.6; }
.parent-guide-image { width: 100%; height: auto; border-radius: 16px; margin-bottom: 22px; }
.guide-page h1 { max-width: none; font-size: clamp(2.5rem, 5vw, 4rem); }
.guide-page h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.guide-breadcrumb { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; font-size: 0.9rem; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); margin-bottom: 36px; }
.guide-toc strong { flex-basis: 100%; }
.guide-main a:not(.button) { text-decoration: underline; text-underline-offset: 4px; color: #165b8e; }
.guide-body { font-size: 1.1rem; }
.guide-body section { margin-bottom: 40px; scroll-margin-top: 24px; }
.guide-body p, .guide-body li { color: #354b5c; line-height: 1.8; }
.guide-body ol { padding-left: 24px; }
.guide-body li + li { margin-top: 18px; }
.guide-example { margin: 32px 0 40px; padding: 26px; border-radius: 24px; background: #edf5d6; }
.sound-example { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.sound-example span { min-width: 56px; padding: 10px 14px; border-radius: 14px; background: white; font-family: "Baloo 2", sans-serif; font-size: 2rem; text-align: center; }
.sound-example span[aria-hidden] { background: transparent; min-width: 0; padding: 0; }
.guide-sources { padding: 26px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.guide-sources p, .guide-sources li { line-height: 1.7; }
.guide-sources li + li { margin-top: 10px; }
.guide-next { margin: 40px 0; padding: 28px; border-radius: 24px; background: #e7f5fa; }
.guide-next .text-link { display: block; margin: 20px 0; }
@media (max-width: 900px) {
    .phonics-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; }
    .phonics-page h1 { max-width: 22ch; }
    .phonics-art { width: min(100%, 580px); transform: none; }
    .phonics-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 22px; }
    .phonics-family { grid-template-columns: 1fr; gap: 20px; }
    .phonics-path { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
    .phonics-page .topbar { flex-direction: column; gap: 12px; }
    .phonics-page .topnav { gap: 0; width: 100%; justify-content: center; }
    .phonics-page .topnav a { width: auto; padding: 10px; font-size: 0.9rem; }
    .phonics-hero { padding-bottom: 48px; }
    .phonics-screen { padding: 12px; }
    .phonics-activity h3 { font-size: 1.2rem; }
    .phonics-preview { padding: 24px; }
    .phonics-download { padding: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .phonics-page *, .phonics-page *::before, .phonics-page *::after { animation: none !important; transition: none !important; }
}

/* Playful product treatment; guides keep their quieter reading layout. */
body.phonics-playful { background: #fffdf4; }
.phonics-playful .topbar { padding-bottom: 24px; }
.phonics-playful .phonics-hero { padding: 44px; margin-top: 8px; margin-bottom: 70px; background: #ffde66; border-radius: 54px 28px 54px 28px; gap: 36px; }
.phonics-playful h1 { font-size: clamp(3.2rem, 5.8vw, 5.2rem); max-width: 13ch; line-height: 0.98; }
.phonics-playful h1 span { color: #6232b4; }
.phonics-playful .phonics-hero .eyebrow { color: #62412c; }
.phonics-playful .phonics-intro { color: #28374b; font-size: 1.15rem; }
.phonics-playful .phonics-art { border-radius: 36px; padding: 10px; transform: rotate(3deg); box-shadow: 10px 14px 0 #e2b84a; }
.phonics-playful .phonics-art figcaption { padding-top: 12px; color: #6232b4; }
.phonics-playful .phonics-actions { margin: 20px 0; }
.phonics-store-row { gap: 14px; margin: 24px 0 12px; }
.phonics-store-row .store-badge img { width: auto; height: 50px; }
.phonics-store-row .store-badge-google img { height: 46px; }
.phonics-playful .phonics-section-heading { margin: 0 auto 36px; text-align: center; max-width: 760px; }
.phonics-playful .phonics-section-heading h2 { font-size: clamp(2.7rem, 4.7vw, 4rem); line-height: 1.02; }
.phonics-playful .phonics-section-heading .eyebrow { color: #6232b4; }
.phonics-playful .phonics-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.phonics-playful .phonics-activity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 180px); gap: 22px; align-items: center; padding: 32px; border-radius: 34px 62px 34px 34px; background: #9ee6ef; }
.phonics-playful .phonics-activity:nth-child(2) { background: #ffc4dd; border-radius: 62px 34px 34px 34px; }
.phonics-playful .phonics-activity:nth-child(3) { background: #d7ef90; border-radius: 34px 34px 62px 34px; }
.phonics-playful .phonics-activity:nth-child(4) { background: #d9c9fa; border-radius: 34px 34px 34px 62px; }
.phonics-playful .phonics-activity .phonics-screen { grid-column: 2; grid-row: 1; padding: 0; background: none; border: 0; border-radius: 0; transform: rotate(4deg); }
.phonics-playful .phonics-activity:nth-child(even) .phonics-screen { transform: rotate(-4deg); }
.phonics-playful .phonics-screen img { border: 5px solid white; border-radius: 18px; box-shadow: 0 12px 0 #21304018; }
.phonics-playful .phonics-activity figcaption { grid-column: 1; grid-row: 1; }
.phonics-playful .phonics-activity h3 { margin: 0 0 14px; font-size: clamp(1.8rem, 2.6vw, 2.5rem); }
.phonics-playful .phonics-activity p { color: #26394a; font-size: 1.05rem; }
.phonics-play-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 34px; align-items: center; background: #6533bc; color: #fffdf4; border-radius: 72px 32px 72px 32px; padding: 40px; margin-bottom: 76px; scroll-margin-top: 24px; }
.phonics-mascot-stage { position: relative; min-height: 360px; display: grid; place-items: center; }
.phonics-mascot-stage img { position: relative; z-index: 1; width: 100%; height: auto; transform: rotate(-8deg); filter: drop-shadow(0 15px 8px #29135c40); }
.phonics-pop { position: absolute; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 18px; font-family: "Baloo 2", sans-serif; font-size: 3rem; font-weight: 800; line-height: 1; box-shadow: 0 7px 0 #33127340; }
.pop-one { left: 0; top: 0; background: #ffde66; color: #61391f; transform: rotate(-12deg); }
.pop-two { left: 12px; bottom: 8px; background: #9ee6ef; color: #153c5b; transform: rotate(12deg); }
.pop-three { right: 0; top: 16px; background: #d7ef90; color: #2b512a; transform: rotate(10deg); }
.phonics-play-copy .eyebrow { color: #ffde66; }
.phonics-play-copy h2 { font-size: clamp(2.8rem, 4.8vw, 4.2rem); line-height: 1.02; }
.phonics-play-copy p:not(.eyebrow) { font-size: 1.12rem; color: #fffdf4; max-width: 43ch; }
.phonics-play-copy .phonics-video-actions { margin-top: 24px; }
.phonics-play-copy .text-link { color: #fffdf4; text-decoration: underline; text-underline-offset: 5px; }
.phonics-playful #guides .parent-guide-card { background: #fff3d4; border: none; box-shadow: none; border-radius: 32px; }
.phonics-playful #guides .parent-guide-card:nth-child(2) { background: #e7f4df; }
.phonics-playful .phonics-download { background: #9ee6ef; border: none; border-radius: 52px 28px 52px 28px; }
.phonics-playful .phonics-download h2 { font-size: clamp(2.8rem, 5vw, 4.2rem); }
@media (max-width: 1000px) {
    .phonics-playful .phonics-activity { grid-template-columns: minmax(0, 1fr) minmax(0, 140px); padding: 24px; gap: 16px; }
    .phonics-playful .phonics-hero { padding: 32px; }
}
@media (max-width: 760px) {
    .phonics-playful .phonics-activity-grid { grid-template-columns: 1fr; }
    .phonics-playful .phonics-activity { grid-template-columns: minmax(0, 1fr) minmax(0, 160px); }
    .phonics-play-band { grid-template-columns: 1fr; padding: 30px; gap: 18px; border-radius: 44px 24px 44px 24px; }
    .phonics-mascot-stage { min-height: 0; max-width: 380px; width: 100%; margin: 0 auto; }
    .phonics-play-copy { text-align: center; }
    .phonics-play-copy p { margin-left: auto; margin-right: auto; }
    .phonics-play-copy .phonics-video-actions { justify-content: center; }
}
@media (max-width: 440px) {
    .phonics-playful .phonics-hero { padding: 28px 22px; border-radius: 34px 20px 34px 20px; }
    .phonics-playful h1 { font-size: 3.1rem; }
    .phonics-store-row { gap: 10px; }
    .phonics-store-row .store-badge img { height: 43px; }
    .phonics-store-row .store-badge-google img { height: 40px; }
    .phonics-playful .phonics-activity { grid-template-columns: minmax(0, 1fr) minmax(0, 124px); padding: 22px; gap: 12px; }
    .phonics-playful .phonics-activity h3 { font-size: 1.8rem; }
    .phonics-playful .phonics-activity p { font-size: 0.96rem; }
    .phonics-pop { width: 52px; height: 52px; font-size: 2.4rem; }
}

/* A clear product-page arrival, with a brief greeting rather than a looping effect. */
.phonics-page-trail { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 4px; margin-bottom: 14px; }
.phonics-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 1rem; }
.phonics-breadcrumb a { color: #51259d; text-decoration: underline; text-underline-offset: 4px; font-weight: 800; }
.phonics-breadcrumb [aria-current] { font-weight: 800; }
.phonics-welcome { display: flex; align-items: center; gap: 12px; color: #51259d; font-family: "Baloo 2", sans-serif; font-size: 1.2rem; font-weight: 700; }
.phonics-welcome img { width: 80px; height: auto; transform-origin: 50% 85%; }
.phonics-playful h1 .phonics-heading-first { color: #213040; }
.phonics-heading-first, .phonics-heading-second { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
    .phonics-heading-first { animation: phonicsHeadingArrival 550ms ease-out both; }
    .phonics-heading-second { animation: phonicsHeadingArrival 550ms ease-out 120ms both; }
}
@keyframes phonicsHeadingArrival {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
    .phonics-page-trail { gap: 10px; }
    .phonics-breadcrumb { gap: 8px; font-size: 0.9rem; }
    .phonics-welcome span { display: none; }
    .phonics-welcome img { width: 56px; }
}

/* A finite dance, replayed by the character button. */
.phonics-welcome small { display: block; font-family: "Nunito", sans-serif; font-size: .75rem; font-weight: 600; }
.phonics-dancer { display: inline-grid; place-items: center; flex-shrink: 0; min-width: 64px; min-height: 52px; padding: 4px; border: 0; border-radius: 18px; background: transparent; cursor: pointer; }
.phonics-dancer:hover { background: #d9c9fa55; }
.phonics-dancer:focus-visible { outline: 3px solid #6232b4; outline-offset: 4px; }
.phonics-dancer img { display: block; }
