/* InZeDoku Marketing — design tokens alignés sur l'application (encre, crème, ambre, ciel)
   et sur la structure du site InZeWishBox (même squelette, même bascule de thème, même
   sélecteur de langue). Palette échantillonnée sur les captures d'écran de l'app. */

:root {
    --brand-ink: #142c3d;
    --brand-cream: #fff6e4;
    --brand-amber: #ffbe24;
    --brand-sky: #5fd3f7;
    --brand-blue: #276db0;
    --brand-blue-soft: #4399cb;
    --brand-mint: #a6cec5;
    --brand-lavender: #98b2e3;
    --brand-rose: #fed2c6;
    --brand-rose-strong: #f06d8a;
    --brand-pink: #f48fb9;
    --brand-grey: #7a7a7a;

    /* Tuiles pastel de l'accueil */
    --pastel-yellow: #fede63;
    --pastel-pink: #fed2c6;
    --pastel-blue: #cfe3f7;
    --pastel-green: #cdeedd;
    --pastel-peach: #ffe1c4;

    --bg: #f6f4ee;
    --bg-elevated: #ffffff;
    --bg-sunken: #eeeae0;
    --bg-cream: #fff6e4;
    --border: #e3ded2;
    --border-strong: #142c3d;
    --text-primary: #142c3d;
    --text-secondary: #55697a;
    --text-tertiary: #8a9aa8;

    --accent: #276db0;
    --accent-on: #ffffff;
    --cta: #ffbe24;
    --on-cta: #142c3d;
    --cta-alt: #5fd3f7;

    --success: #0aa37f;
    --warning: #e08e0b;
    --danger: #d9534f;
    --danger-text: #c62828;
    --info: #1f6feb;

    --hero-gradient: linear-gradient(160deg, #a6cec5 0%, #98b2e3 28%, #5b96bb 62%, #276db0 100%);
    --hero-text: #fff6e4;
    --hero-muted: rgba(255, 246, 228, 0.86);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    --shadow-card: 0 1px 2px rgba(20, 44, 61, 0.05), 0 4px 12px rgba(20, 44, 61, 0.07);
    --shadow-elevated: 0 4px 12px rgba(20, 44, 61, 0.10), 0 24px 48px rgba(20, 44, 61, 0.10);
    --shadow-ink: 0 3px 0 var(--brand-ink);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", "Liberation Mono", monospace;
}

/* Thème sombre — UNIQUEMENT sur choix explicite via le bouton ([data-theme="dark"]).
   Le thème clair est le défaut : on ne suit pas automatiquement le sombre de l'OS.
   Comme dans l'app, le sombre n'est pas une inversion : les lavis et les cadres sont recalibrés. */
:root[data-theme="dark"] {
    --danger-text: #ff6b66;
    --bg: #0f1b26;
    --bg-elevated: #16252f;
    --bg-sunken: #0b141c;
    --bg-cream: #1b2a36;
    --border: #253746;
    --border-strong: #6f8ea6;
    --text-primary: #f2efe6;
    --text-secondary: #a9b7c2;
    --text-tertiary: #6f8290;
    --accent: #7cc4ff;
    --on-cta: #142c3d;
    --pastel-yellow: #4a4425;
    --pastel-pink: #4a3230;
    --pastel-blue: #23364a;
    --pastel-green: #21403a;
    --pastel-peach: #4a3a2a;
    --hero-gradient: linear-gradient(160deg, #2b4a58 0%, #23406a 30%, #163c66 65%, #0f2d4f 100%);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.4), 0 24px 48px rgba(0, 0, 0, 0.35);
    --shadow-ink: 0 3px 0 #06101a;
}

/* Bouton de bascule de thème (injecté par theme.js dans le header) */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    width: 38px;
    height: 38px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: var(--space-3);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Groupe de contrôles header (lang switcher + theme toggle) — empêche le
   décalage visuel quand la nav change de largeur entre langues. */
.header-controls {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-3);
    flex-shrink: 0;
}
.header-controls .theme-toggle { margin-left: 0; }

/* Sélecteur de langue (dropdown injecté par lang-switcher.js) */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-switcher-trigger {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    height: 38px;
    min-width: 76px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-switcher-trigger:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.lang-switcher-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lang-switcher .lang-flag {
    display: inline-flex;
    width: 22px;
    height: 15px;
    line-height: 1;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.lang-switcher .lang-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lang-switcher .lang-caret {
    font-size: 10px;
    opacity: 0.65;
    margin-left: 2px;
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    padding: var(--space-1);
    margin: 0;
    z-index: 50;
}

/* Le champ du filtre, puis une liste qui DÉFILE : à quelques dizaines de
   langues, le menu ne doit pas déborder de l'écran. */
.lang-switcher-search {
    display: block;
    width: 100%;
    margin: 0 0 var(--space-1);
    padding: 8px 10px;
    font: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.lang-switcher-search:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
.lang-switcher-list {
    list-style: none;
    margin: 0;
    max-height: min(60vh, 420px);
    overflow-y: auto;
}
.lang-switcher-empty {
    padding: 8px 12px;
    color: var(--text-secondary);
    text-align: center;
}

.lang-switcher-menu li { margin: 0; }
.lang-switcher-menu li[hidden], .lang-switcher-empty[hidden] { display: none; }

.lang-switcher-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.lang-switcher-menu a:hover {
    background: var(--bg-sunken);
}

.lang-switcher-menu a.is-current {
    background: var(--bg-sunken);
    color: var(--accent);
    font-weight: 700;
}

.lang-switcher-menu .lang-code {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    min-width: 22px;
}

.lang-switcher-menu a.is-current .lang-code {
    color: var(--accent);
}

.lang-switcher-menu .lang-name {
    flex: 1;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 120ms ease;
}

a:hover {
    border-bottom-color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(140%) blur(8px);
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.brand-group {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 800;
    color: var(--text-primary);
    font-size: 18px;
    letter-spacing: -0.01em;
}

.brand:hover {
    border-bottom-color: transparent;
}

/* Le Z ambre et le e rose du logotype de l'application */
.brand .brand-z {
    color: var(--brand-amber);
}

.brand .brand-e {
    color: var(--brand-pink);
}

.brand-publisher {
    margin-left: 48px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.brand-publisher:hover {
    color: var(--accent);
    border-bottom-color: transparent;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: url("assets/logo.svg") center/cover no-repeat;
    /* Image-replacement : la « Z » du HTML sert de fallback texte mais
       doit être invisible quand l'image charge. */
    text-indent: -9999px;
    overflow: hidden;
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
    align-items: center;
}

.site-nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-bottom: none;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--text-primary);
}

/* Les langues aux mots longs : la nav allemande se resserre pour tenir sur une ligne à 1280 px,
   et le titre du hero descend d'un cran en allemand, italien et portugais pour éviter les phrases
   tournantes sur trois lignes. */
html[lang="de"] .site-nav {
    gap: var(--space-4);
}

html[lang="de"] .hero h1,
html[lang="it"] .hero h1,
html[lang="pt"] .hero h1 {
    font-size: clamp(32px, 4.6vw, 54px);
}

@media (max-width: 860px) {
    /* Sur petit écran la nav passe sous la marque, en rangée défilante :
       on garde l'accès à toutes les sections sans menu hamburger. */
    .site-header-inner {
        flex-wrap: wrap;
        row-gap: var(--space-2);
    }
    .site-nav {
        order: 3;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: var(--space-4);
        padding-bottom: var(--space-1);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .brand-publisher { margin-left: 48px; }
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover {
    border-bottom-color: transparent;
}

/* Pilule « Jouer » de l'application : ambre, encre, avec une tranche d'encre en dessous */
.btn-primary {
    background: var(--cta);
    color: var(--on-cta);
    border-color: var(--brand-ink);
    box-shadow: var(--shadow-ink);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--brand-ink), var(--shadow-card);
    border-bottom-color: var(--brand-ink);
}

/* Pilule « Code » : bleu ciel */
.btn-sky {
    background: var(--cta-alt);
    color: var(--brand-ink);
    border-color: var(--brand-ink);
    box-shadow: var(--shadow-ink);
}

.btn-sky:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--brand-ink), var(--shadow-card);
    border-bottom-color: var(--brand-ink);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-bottom-color: var(--border-strong);
}

/* Variante pour fond sombre / dégradé du hero */
.btn-ghost {
    background: rgba(255, 246, 228, 0.12);
    color: var(--hero-text);
    border-color: rgba(255, 246, 228, 0.7);
}

.btn-ghost:hover {
    background: rgba(255, 246, 228, 0.22);
    border-bottom-color: rgba(255, 246, 228, 0.7);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Layout */

main {
    flex: 1;
    width: 100%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

section {
    padding: var(--space-9) 0;
    /* Un lien d'ancre s'arrête sous l'en-tête collant, pas derrière lui. */
    scroll-margin-top: 72px;
}

@media (max-width: 860px) {
    section {
        scroll-margin-top: 120px;
    }
}

@media (max-width: 720px) {
    section {
        padding: var(--space-7) 0;
    }
}

.section-eyebrow {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.section-lead {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: var(--space-6);
}

.section-lead strong,
.feature-desc strong,
.mode-desc strong,
.geo-desc strong,
.step-desc strong {
    color: var(--text-primary);
}

/* Hero — le dégradé bleu de l'application, texte crème, pilules Jouer / Code */

.hero {
    padding: var(--space-8) 0 var(--space-8);
    background: var(--hero-gradient);
    color: var(--hero-text);
    position: relative;
    overflow: hidden;
}

.hero::after {
    /* halo doux, comme la lumière en haut de l'accueil */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.22), transparent 55%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--space-7);
    align-items: center;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-copy .hero-cta,
    .hero-copy .hero-trust {
        justify-content: center;
    }
}

.hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 var(--space-5);
    color: var(--hero-text);
}

.hero h1 .accent {
    color: var(--brand-amber);
}

/* Ligne tournante du hero : six phrases s'enchaînent en fondu, en alternant sudoku et
   calcudoku, synchronisées avec les captures empilées dans le téléphone (mêmes durées,
   mêmes délais). Grille empilée : la hauteur est celle de la phrase la plus haute, donc
   aucun saut de mise en page. 6 × 3 s = 18 s — 0,8 s de fondu entrant, 2,2 s pleinement
   visible, 0,8 s de fondu sortant qui chevauche l'entrée de la phrase suivante. */
.rotating-line {
    display: grid;
}

.rotating-line .word {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(8px);
    animation: heroRotate 18s ease-in-out infinite;
}

.rotating-line .word:nth-child(1) { animation-delay: 0s; }
.rotating-line .word:nth-child(2) { animation-delay: 3s; }
.rotating-line .word:nth-child(3) { animation-delay: 6s; }
.rotating-line .word:nth-child(4) { animation-delay: 9s; }
.rotating-line .word:nth-child(5) { animation-delay: 12s; }
.rotating-line .word:nth-child(6) { animation-delay: 15s; }

@keyframes heroRotate {
    0%      { opacity: 0; transform: translateY(8px); }
    4.44%   { opacity: 1; transform: translateY(0); }
    16.67%  { opacity: 1; transform: translateY(0); }
    21.11%  { opacity: 0; transform: translateY(-8px); }
    100%    { opacity: 0; transform: translateY(-8px); }
}

/* Les captures du téléphone suivent exactement la même cadence que les phrases. */
.phone-slides {
    display: grid;
}

.phone-slides .slide {
    grid-area: 1 / 1;
    opacity: 0;
    animation: heroFade 18s ease-in-out infinite;
}

.phone-slides .slide:nth-child(1) { animation-delay: 0s; }
.phone-slides .slide:nth-child(2) { animation-delay: 3s; }
.phone-slides .slide:nth-child(3) { animation-delay: 6s; }
.phone-slides .slide:nth-child(4) { animation-delay: 9s; }
.phone-slides .slide:nth-child(5) { animation-delay: 12s; }
.phone-slides .slide:nth-child(6) { animation-delay: 15s; }

@keyframes heroFade {
    0%      { opacity: 0; }
    4.44%   { opacity: 1; }
    16.67%  { opacity: 1; }
    21.11%  { opacity: 0; }
    100%    { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .rotating-line .word,
    .phone-slides .slide { animation: none; opacity: 0; }
    .rotating-line .word:first-child,
    .phone-slides .slide:first-child { opacity: 1; transform: none; }
}

.hero p.lead {
    font-size: clamp(17px, 2vw, 20px);
    color: var(--hero-muted);
    max-width: 600px;
    margin: 0 0 var(--space-6);
}

.hero p.lead strong {
    color: var(--hero-text);
}

@media (max-width: 900px) {
    .hero p.lead { margin-left: auto; margin-right: auto; }
}

/* Badge crème cerné d'encre — la pilule de l'application */
.hero-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-4);
    padding: 8px 20px;
    background: var(--brand-cream);
    color: var(--brand-ink);
    border: 2px solid var(--brand-ink);
    border-radius: var(--radius-md);
    font-size: clamp(13px, 1.4vw, 15px);
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: var(--shadow-ink);
}

.hero-badge .badge-sep {
    opacity: 0.45;
}

/* Deux publics, deux pilules crème : seul pour le plaisir, en classe pour apprendre */
.hero-audience {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0 0 var(--space-5);
}

.hero-audience .chip {
    font-size: 14px;
    padding: 6px 14px;
    background: var(--brand-cream);
    color: var(--brand-ink);
    border-color: var(--brand-ink);
}

@media (max-width: 900px) {
    .hero-audience { justify-content: center; }
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.hero-trust {
    margin-top: var(--space-6);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    color: var(--hero-muted);
    font-size: 14px;
}

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-note {
    margin-top: var(--space-4);
    font-size: 13px;
    color: var(--hero-muted);
}

.hero-note a {
    color: var(--hero-text);
    text-decoration: underline;
}

/* Capture d'écran dans un « téléphone » : cadre d'encre, coins ronds */
.hero-visual {
    display: flex;
    justify-content: center;
}

.phone {
    width: min(100%, 300px);
    border-radius: var(--radius-xl);
    border: 3px solid var(--brand-ink);
    overflow: hidden;
    box-shadow: var(--shadow-elevated), 0 6px 0 var(--brand-ink);
    background: var(--brand-ink);
    transform: rotate(-2deg);
}

.phone img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .phone { transform: none; width: min(100%, 260px); }
}

@media (prefers-reduced-motion: reduce) {
    .phone { transform: none; }
}

/* Modes — cartes avec capture d'écran */

.modes {
    background: var(--bg-elevated);
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.mode-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
}

.mode-shot {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top;
    display: block;
    border-radius: var(--radius-md);
    border: 2px solid var(--brand-ink);
    margin-bottom: var(--space-4);
}

.mode-title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: var(--space-2);
}

.mode-title small {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 2px;
}

.mode-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    flex: 1;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: var(--space-3);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-cream);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    white-space: nowrap;
}

.chip-soft {
    background: var(--bg-sunken);
    border-color: var(--border);
    color: var(--text-secondary);
}

/* Mention rouge « expérimental — en développement », reprise du sélecteur de mode de l'application */
.mode-flag {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--danger-text);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    margin: 0 0 var(--space-2);
}

.mode-flag::before {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}

.mode-note {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-left: 3px solid var(--danger-text);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--bg-cream);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.mode-note .mode-flag-inline {
    color: var(--danger-text);
    font-weight: 800;
}

/* Plateaux — cinq cartes avec dessin vectoriel */

.geo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.geo-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
}

.geo-card img {
    width: 132px;
    height: 132px;
    display: block;
    margin: 0 auto var(--space-3);
}

.geo-title {
    font-weight: 800;
    margin-bottom: var(--space-1);
}

.geo-size {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-2);
}

.geo-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Deux cartes larges (multidoku, fenêtres bonus) */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.option-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-4);
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.option-card img {
    width: 120px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: 50% 45%;
    border-radius: var(--radius-md);
    border: 2px solid var(--brand-ink);
    display: block;
}

.option-title {
    font-weight: 800;
    margin-bottom: var(--space-1);
}

.option-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .option-card { grid-template-columns: 1fr; }
    .option-card img { width: 100%; aspect-ratio: 16 / 10; }
}

/* Photo de classe — cadre d'encre comme le téléphone du hero, recadrée en bandeau */
.classe-photo {
    margin: 0 0 var(--space-6);
}

.classe-photo picture,
.classe-photo img {
    display: block;
    width: 100%;
}

.classe-photo img {
    aspect-ratio: 2 / 1;
    object-fit: cover;
    object-position: center 42%;
    border-radius: var(--radius-xl);
    border: 3px solid var(--brand-ink);
    box-shadow: var(--shadow-elevated), 0 6px 0 var(--brand-ink);
}

.classe-photo figcaption {
    margin-top: var(--space-4);
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 720px) {
    .classe-photo img { aspect-ratio: 4 / 3; }
}

/* Steps */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-6);
    counter-reset: stepc;
}

.step {
    counter-increment: stepc;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
}

.step::before {
    content: counter(stepc);
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: var(--brand-amber);
    color: var(--brand-ink);
    border: 2px solid var(--brand-ink);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 0 4px var(--bg);
}

.step-title {
    font-weight: 700;
    margin-bottom: var(--space-2);
    padding-right: 56px;
    /* au moins la hauteur de la pastille numérotée, pour que la description commence dessous */
    min-height: 40px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

/* Features grid */

.features {
    background: var(--bg-elevated);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.feature {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.feature-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: var(--space-3);
}

.feature-title {
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

/* Liste numérotée à l'intérieur d'une carte feature */
.feature-list {
    margin: var(--space-3) 0;
    padding-left: var(--space-5);
    line-height: 1.5;
}

.feature-list li {
    margin-bottom: var(--space-2);
}

.feature-list li:last-child {
    margin-bottom: 0;
}

/* Code de partie — la pilule crème de l'écran de jeu */
.gamecode {
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 700;
    background: var(--bg-cream);
    color: var(--text-primary);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-pill);
    padding: 1px 10px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Touche de clavier */
.kbd {
    font-family: var(--font-mono);
    font-size: 0.85em;
    font-weight: 700;
    background: var(--bg-cream);
    color: var(--text-primary);
    border: 1.5px solid var(--border-strong);
    border-bottom-width: 3px;
    border-radius: var(--radius-sm);
    padding: 0 6px;
    white-space: nowrap;
}

/* Recette — un exemple de réglage, avec la capture et le code */
.recipe {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: var(--space-6);
    align-items: center;
    margin-top: var(--space-7);
    background: var(--bg-cream);
    border: 2px solid var(--brand-ink);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-ink);
}

.recipe h3 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
}

.recipe p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.recipe-settings {
    list-style: none;
    padding: 0;
    margin: var(--space-4) 0;
    display: grid;
    gap: 6px;
}

.recipe-settings li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.recipe-settings li:last-child {
    border-bottom: none;
}

.recipe-settings li span:first-child {
    color: var(--text-secondary);
}

.recipe-settings li span:last-child {
    font-weight: 700;
    text-align: right;
}

.recipe-visual {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
    align-items: end;
}

.recipe-visual .shot {
    width: 100%;
    max-width: 260px;
    border-radius: var(--radius-lg);
    border: 3px solid var(--brand-ink);
    display: block;
    justify-self: end;
}

.recipe-qr {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.recipe-qr img {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto var(--space-2);
    border-radius: var(--radius-md);
    border: 2px solid var(--brand-ink);
    background: #fff;
    padding: 6px;
}

@media (max-width: 900px) {
    .recipe { grid-template-columns: 1fr; }
    .recipe-visual { grid-template-columns: 1fr; justify-items: center; }
    .recipe-visual .shot { justify-self: center; }
}

/* Liste de résolution et chemin du joueur — deux feuilles telles que l'application les imprime */
.solve-intro {
    max-width: 800px;
    margin-top: var(--space-7);
}

.solve-intro p {
    font-size: 15px;
    line-height: 1.6;
    margin-top: var(--space-3);
}

.solve-sheets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-5);
    align-items: start;
    margin-top: var(--space-5);
}

.solve-sheets > * {
    min-width: 0;
}

.solve-card-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: var(--space-2);
}

.solve-card-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.solve-sheet {
    background: var(--bg-elevated);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    box-shadow: var(--shadow-ink);
}

.solve-sheet-title {
    font-weight: 800;
    font-size: 15px;
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.solve-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: solve;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.solve-list > li {
    counter-increment: solve;
    position: relative;
    padding: 5px 0 5px 2.6em;
}

.solve-list > li::before {
    content: counter(solve) ".";
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--text-tertiary);
    font-weight: 700;
}

.solve-list strong {
    color: var(--text-primary);
}

.solve-list ul {
    list-style: none;
    padding: 0;
    margin: 2px 0 0;
}

.solve-list ul li {
    position: relative;
    padding-left: 1.2em;
}

.solve-list ul li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}

.solve-sheet-foot {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-tertiary);
}

.solve-sheet-foot.is-verdict {
    color: var(--text-secondary);
    font-weight: 600;
}

.solve-list .is-error {
    color: var(--danger);
    font-weight: 800;
}

/* Fiches — code + QR à scanner depuis l'application */
.fiche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.fiche {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
}

.fiche img {
    width: 148px;
    height: 148px;
    display: block;
    margin: 0 auto var(--space-3);
    border-radius: var(--radius-md);
    border: 2px solid var(--brand-ink);
    background: #fff;
    padding: 6px;
    image-rendering: pixelated;
}

.fiche-title {
    font-weight: 800;
    margin-bottom: var(--space-1);
}

.fiche-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.fiche .gamecode,
.recipe-qr .gamecode {
    /* Les codes longs (réglages de tables, fractions) se replient sur leurs tirets
       plutôt que de déborder de la carte. */
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    display: inline-block;
    max-width: 100%;
    border-radius: var(--radius-md);
    line-height: 1.5;
}

/* Documentation — deux cartes de téléchargement */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.doc-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.doc-icon {
    font-size: 36px;
    line-height: 1;
}

/* Sous le titre de chaque livre : son objectif, entre parenthèses */
.doc-goal {
    margin: 2px 0 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.doc-title {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.01em;
}

.doc-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.doc-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
    flex: 1;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* Pricing / versions */

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.price-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
}

.price-card.highlighted {
    border: 2px solid var(--brand-ink);
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
}

.price-card.highlighted::before {
    content: attr(data-ribbon);
    position: absolute;
    top: 24px;
    right: -50px;
    width: 220px;
    background: var(--brand-amber);
    color: var(--brand-ink);
    padding: 4px 0;
    transform: rotate(35deg);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    white-space: pre-line; /* le saut de ligne vient de data-ribbon */
}

.price-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.price-amount {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
}

.price-amount small {
    font-size: 0.5em;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.price-cycle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--space-5);
}

.price-cycle strong {
    color: var(--text-primary);
}

.price-features {
    list-style: none;
    padding: 0;
    flex: 1;
    margin-bottom: var(--space-5);
}

.price-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.price-features li:last-child {
    border-bottom: none;
}

.price-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 800;
    flex-shrink: 0;
}

.price-features li.is-limit::before {
    content: "◔";
    color: var(--warning);
}

/* Tier comparison table (gamme gratuite) */

.tier-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
}

.tier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tier-table th,
.tier-table td {
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.tier-table th {
    background: var(--bg-sunken);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.tier-table tbody tr:last-child td {
    border-bottom: none;
}

.tier-table tbody tr:hover {
    background: var(--bg-sunken);
}

.tier-table td:first-child {
    font-weight: 700;
}

.tier-table td:last-child {
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    text-align: right;
}

.tier-table td .chip {
    font-size: 11px;
}

/* Deux colonnes côte à côte (gamme gratuite + hors gratuité) */
.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: var(--space-5);
    align-items: start;
    margin-top: var(--space-7);
}

/* min-width: 0 sur les enfants : sans cela, la table (th en nowrap) impose sa largeur
   minimale à la colonne et fait déborder la page sur mobile. */
.two-col > * {
    min-width: 0;
}

@media (max-width: 900px) {
    .two-col { grid-template-columns: minmax(0, 1fr); }
}

.aside-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.aside-card h4 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: var(--space-3);
}

.aside-card ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
}

.aside-card li {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    line-height: 1.5;
}

.aside-card li::before {
    content: "◔";
    color: var(--warning);
    font-weight: 800;
    flex-shrink: 0;
}

.aside-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: var(--space-3);
}

/* Encadré */
.callout {
    background: var(--bg-cream);
    border: 2px solid var(--brand-ink);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    box-shadow: var(--shadow-ink);
}

.callout strong { font-weight: 800; }
.callout p { margin: 0 0 10px; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; font-size: 21px; line-height: 1.3; margin-bottom: 8px; }
.callout ul { margin: 0; padding-left: 22px; }
.callout li { margin: 4px 0; }
/* En tête du hero : la pastille puis l'encadré, même crème, même encre, même arrondi, même ombre.
   La pastille et l'image sont centrées dans la colonne ; les encadrés, eux, la remplissent. */
.hero-top { position: relative; z-index: 1; margin-bottom: var(--space-7); text-align: center; }
.hero .callout {
    background: var(--brand-cream);
    color: var(--brand-ink);
    border: 2px solid var(--brand-ink);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-ink);
    padding: var(--space-4) 20px;
    text-align: left;
}
.hero .callout strong, .hero .callout .reassure-grids figure { color: var(--brand-ink); }
.hero .callout-learn { margin-bottom: var(--space-4); }

/* L'image du hero : un fond sans texte, et par-dessus les libellés de la page, posés par hero-labels.js
   d'après public/assets/hero/labels.js. Même cadre que la pastille et les encadrés. */
.hero-image {
    position: relative;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto var(--space-4);
    background: #fff6e4;
    border: 2px solid var(--brand-ink);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-ink);
    overflow: hidden;
    text-align: left;
}
.hero-image-bg { display: block; width: 100%; height: auto; }
.hero-labels {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
    pointer-events: none;
    visibility: hidden;
}
.hero-image.is-ready .hero-labels { visibility: visible; }
.hero-labels li {
    position: absolute;
    margin: 0;
    color: #343a38;
    font-weight: 700;
    white-space: normal;
}
.hero-labels li.is-light { color: #fff6e4; }
@media (max-width: 720px) {
    .hero-labels { display: none; }
}
.callout-lead { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.emoji-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; }
.emoji-list li { display: flex; gap: 10px; margin: 0; line-height: 1.5; }
.li-emoji { flex: none; width: 1.7em; text-align: center; }
@media (max-width: 900px) { .emoji-list { grid-template-columns: 1fr; } }

/* L'encadré « n'ayez pas peur du mot sudoku » : le texte à gauche, une 2×2 et une 3×3 à droite */
.callout-reassure { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-5); align-items: center; }
.reassure-grids { display: flex; gap: var(--space-5); align-items: flex-end; justify-content: center; }
.reassure-grids figure { margin: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.mini-sudoku.is-2 { grid-template-columns: repeat(2, 1fr); width: 72px; max-width: none; margin: 0 auto 6px; }
.mini-sudoku.is-3 { grid-template-columns: repeat(3, 1fr); width: 108px; max-width: none; margin: 0 auto 6px; }
.mini-sudoku.is-2 span, .mini-sudoku.is-3 span { font-size: 18px; }
.mini-sudoku.is-2 span:nth-child(2n), .mini-sudoku.is-3 span:nth-child(3n) { border-right: 0; }
.mini-sudoku.is-2 span:nth-child(n+3), .mini-sudoku.is-3 span:nth-child(n+7) { border-bottom: 0; }
.mini-sudoku.is-5 { grid-template-columns: repeat(5, 1fr); }
.mini-sudoku.is-5 span { font-size: 17px; }
.mini-sudoku.is-5 span:nth-child(5n) { border-right: 0; }
.mini-sudoku.is-5 span:nth-child(n+21) { border-bottom: 0; }
/* Mots courts en 4×4 : dans le hero et dans la carte Sudoku */
.mini-sudoku.is-hero4, .mini-sudoku.is-words4 { width: 200px; max-width: none; margin: 0 auto 6px; }
.mini-sudoku.is-hero4 span, .mini-sudoku.is-words4 span { font-size: 12px; padding: 0 2px; white-space: nowrap; }
.mini-sudoku.is-2 span { font-size: 20px; }
.mini-sudoku.is-3 span { font-size: 15px; }

/* Carte Sudoku : trois grilles en fondu, chiffres, lettres, mots — même cadence que le hero */
.mode-slides { position: relative; background: #fff6e4; }
.mode-slide {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    opacity: 0;
    animation: modeFade 25s ease-in-out infinite;
}
.mode-slide:nth-child(2) { animation-delay: 5s; }
.mode-slide:nth-child(3) { animation-delay: 10s; }
.mode-slide:nth-child(4) { animation-delay: 15s; }
.mode-slide:nth-child(5) { animation-delay: 20s; }
.mode-slide .mini-sudoku { margin: 0; width: 200px; max-width: none; }
.mode-slide .mini-sudoku.is-3 { width: 150px; }
.mode-slide .mini-sudoku.is-3 span { font-size: 22px; }
.mini-sudoku .dot { display: inline-block; width: 20px; height: 20px; border-radius: 50%; }
.mini-sudoku .dot-r { background: #f0546a; }
.mini-sudoku .dot-g { background: #46c07a; }
.mini-sudoku .dot-b { background: #3f8ff2; }
.mini-sudoku.is-emoji span { font-size: 22px; }
.mode-slide-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #142c3d; }
@keyframes modeFade {
    0% { opacity: 0; } 3% { opacity: 1; } 17% { opacity: 1; } 21% { opacity: 0; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .mode-slide { animation: none; }
    .mode-slide:first-child { opacity: 1; }
}
.hero-badge .badge-key { font-weight: 800; color: #c62828; } /* rouge lisible sur la crème, dans les deux thèmes */
@media (max-width: 1000px) {
    .callout-reassure { grid-template-columns: 1fr; }
    .reassure-grids { flex-wrap: wrap; }
}

/* FAQ */

details.faq {
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) 0;
}

details.faq summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

details.faq summary::-webkit-details-marker {
    display: none;
}

details.faq summary::after {
    content: "+";
    font-size: 22px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 200ms ease;
}

details.faq[open] summary::after {
    content: "−";
}

details.faq[open] summary {
    margin-bottom: var(--space-3);
}

details.faq p {
    color: var(--text-secondary);
    line-height: 1.6;
}

details.faq p + p {
    margin-top: var(--space-3);
}

/* CTA band — ambre comme le bouton Jouer */

.cta-band {
    background: var(--brand-amber);
    color: var(--brand-ink);
    text-align: center;
    padding: var(--space-8) 0;
}

.cta-band h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.cta-band p {
    color: rgba(20, 44, 61, 0.78);
    margin-bottom: var(--space-5);
    font-size: 17px;
}

.cta-band p a {
    color: var(--brand-ink);
    text-decoration: underline;
}

.cta-band .hero-cta {
    justify-content: center;
}

.cta-band .btn-ink {
    background: var(--brand-ink);
    color: var(--brand-cream);
    border-color: var(--brand-ink);
    box-shadow: 0 3px 0 rgba(20, 44, 61, 0.35);
}

.cta-band .btn-ink:hover {
    transform: translateY(-1px);
    border-bottom-color: var(--brand-ink);
}

.cta-band .btn-secondary {
    border-color: var(--brand-ink);
    color: var(--brand-ink);
}

.cta-band .btn-secondary:hover {
    background: rgba(255, 246, 228, 0.45);
    border-bottom-color: var(--brand-ink);
}

/* Vie privée — 2 colonnes : (1) garanties pleine hauteur, (2) paire empilée */
.charter-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: stretch;
}

.charter-col-stack {
    display: grid;
    gap: var(--space-5);
    align-content: start;
}

.charter-col {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand-amber);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
}

.charter-col-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-4);
}

.charter-item {
    margin-bottom: var(--space-4);
}

.charter-item:last-child {
    margin-bottom: 0;
}

.charter-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.charter-item p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

.charter-guarantees {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-3);
}

.charter-guarantees li {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

/* Emojis en pastille ronde crème devant titres, principes et garanties. */
.charter-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    margin-right: 0.4em;
    border-radius: 50%;
    background: var(--pastel-blue);
    font-size: 0.95em;
    line-height: 1;
    vertical-align: -0.35em;
}

.charter-col-title .charter-emoji {
    font-size: 1.05em;
    vertical-align: -0.4em;
}

/* Variante « barré » — superpose une croix rouge sur l'emoji (ex. 📡 barré = aucun réseau). */
.charter-emoji--barred {
    position: relative;
}

.charter-emoji--barred::before,
.charter-emoji--barred::after {
    content: "";
    position: absolute;
    left: 12%;
    top: 42%;
    width: 76%;
    height: 2.5px;
    background: var(--danger);
    border-radius: 2px;
    transform-origin: center;
}

.charter-emoji--barred::before {
    transform: rotate(-45deg);
}

.charter-emoji--barred::after {
    transform: rotate(45deg);
}

@media (max-width: 900px) {
    .charter-cols {
        grid-template-columns: 1fr;
    }
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-7) 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-5);
    align-items: center;
}

.site-footer a {
    color: var(--text-secondary);
    border-bottom: none;
    margin: 0 var(--space-3);
}

.site-footer a:hover {
    color: var(--text-primary);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: var(--space-2);
}

@media (max-width: 720px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .site-footer nav {
        justify-content: center;
    }
    .site-footer a {
        display: inline-block;
        margin: 0 var(--space-2);
    }
}

/* Utilities */

.muted {
    color: var(--text-secondary);
}

.center {
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2);
}

.section-header .section-lead {
    margin-left: auto;
    margin-right: auto;
}

.sub-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
}

.mt-7 { margin-top: var(--space-7); }
.mt-5 { margin-top: var(--space-5); }
.mb-5 { margin-bottom: var(--space-5); }
.small { font-size: 14px; }

/* Fallback banner — shown when user hits a non-translated language URL */
.fallback-banner {
    background: #fef3c7;
    border-bottom: 1px solid #f59e0b;
    color: #78350f;
    padding: 10px 16px;
    font-size: 0.92rem;
    text-align: center;
}
.fallback-banner strong { font-weight: 600; }

/* Pages secondaires (confidentialité) */
.prose {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
}

.prose h1 {
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: var(--space-3);
}

.prose h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: var(--space-7) 0 var(--space-3);
}

.prose p,
.prose li {
    color: var(--text-secondary);
    line-height: 1.7;
}

.prose p + p {
    margin-top: var(--space-3);
}

.prose ul {
    padding-left: var(--space-5);
    margin: var(--space-3) 0;
    display: grid;
    gap: 6px;
}

.prose strong {
    color: var(--text-primary);
}

.prose .updated {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-6);
}

/* Apprendre à lire — sudokus 4×4 en lettres, accents, syllabes et mots, dessinés en HTML (pas d'image) */
.read-block { margin-top: var(--space-7); }
.read-block .section-eyebrow { margin-bottom: var(--space-2); }

.read-lead {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.6;
    max-width: 72ch;
    margin-bottom: var(--space-5);
}

.read-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
}

.read-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.read-card {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

@media (min-width: 1100px) {
    .read-grid:not(.cols-3) .read-card { grid-template-columns: 240px minmax(0, 1fr); align-items: center; }
    .read-grid:not(.cols-3) .mini-sudoku { max-width: 240px; margin: 0; }
}

@media (max-width: 720px) {
    .read-grid, .read-grid.cols-3 { grid-template-columns: 1fr; }
}

.read-card figcaption { color: var(--text-secondary); font-size: 15px; line-height: 1.55; }
.read-card figcaption strong { color: var(--text-primary); }
.read-lead strong { color: var(--text-primary); }

/* La grille garde les couleurs de l'application, en clair comme en sombre */
.mini-sudoku {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    aspect-ratio: 1;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background: #fff6e4;
    border: 2.5px solid #142c3d;
    border-radius: 6px;
    overflow: hidden;
}

.mini-sudoku span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-right: 1px solid rgba(20, 44, 61, 0.35);
    border-bottom: 1px solid rgba(20, 44, 61, 0.35);
    color: #142c3d;
    font-weight: 800;
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1;
}

.mini-sudoku:not(.is-2):not(.is-3):not(.is-5) span:nth-child(4n) { border-right: 0; }
.mini-sudoku:not(.is-2):not(.is-3):not(.is-5) span:nth-child(n+13) { border-bottom: 0; }
.mini-sudoku:not(.is-2):not(.is-3):not(.is-5) span:nth-child(4n+2) { border-right: 2.5px solid #142c3d; }
.mini-sudoku:not(.is-2):not(.is-3):not(.is-5) span:nth-child(n+5):nth-child(-n+8) { border-bottom: 2.5px solid #142c3d; }

.read-card.is-words .mini-sudoku span {
    font-size: 12px;
    padding: 0 2px;
    white-space: nowrap;
}

.read-note {
    margin-top: var(--space-4);
    color: var(--text-tertiary);
    font-size: 14px;
}

/* The approved pastel identity, shared by every page and language.
   Keep the original icon and game screenshots in their original colours. */
:root {
  --bg: #f1f6f6;
  --bg-elevated: #f8fafb;
  --bg-sunken: #e3eef0;
  --bg-cream: #edf5f5;
  --border: #cddfe4;
  --border-strong: #477281;
  --text-primary: #17384c;
  --text-secondary: #456271;
  --text-tertiary: #56717d;
  --accent: #306b7c;
  --brand-cream: #eef6f7;
  --brand-amber: #afd9dc;
  --brand-sky: #c5e6e8;
  --brand-blue: #477b8e;
  --cta: #407588;
  --on-cta: #f7fbfc;
  --cta-alt: #c5e6e8;
  --pastel-yellow: #d9ebee;
  --pastel-blue: #dbeaf3;
  --pastel-green: #dceee7;
  --pastel-pink: #f1e0e4;
  --hero-surface: #dfeff5;
  --class-surface: #e5f1f3;
  --footer-surface: #3e6474;
  --radius-lg: 18px;
  --shadow-card: 0 2px 12px rgb(31 77 91 / 4%);
  --shadow-elevated: 0 12px 32px rgb(31 77 91 / 12%);
}
:root[data-theme="dark"] {
  --bg: #162a33;
  --bg-elevated: #1d3440;
  --bg-sunken: #203d48;
  --bg-cream: #243e47;
  --border: #385560;
  --border-strong: #789daa;
  --text-primary: #e7f1f4;
  --text-secondary: #bdced6;
  --text-tertiary: #a8c1cb;
  --accent: #a8d9e3;
  --cta: #a6d3dc;
  --on-cta: #163543;
  --cta-alt: #294c5b;
  --hero-surface: #203f4e;
  --class-surface: #1c3540;
  --footer-surface: #102932;
  --pastel-blue: #294756;
  --pastel-green: #25463d;
  --pastel-pink: #493c4c;
}
@font-face { font-family: 'Nunito Sans'; src: url('assets/fonts/nunito-sans-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('assets/fonts/nunito-sans-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('assets/fonts/nunito-sans-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('assets/fonts/nunito-sans-800.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Kalam'; src: url('assets/fonts/kalam-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
:root { --font-sans: 'Nunito Sans', sans-serif; }
body { font-family: var(--font-sans); text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
button, input { font: inherit; }
button { cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px;
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -100px; padding: 12px 20px; color: var(--text-primary); background: var(--bg-elevated); border: 2px solid var(--accent); }
.skip-link:focus { top: 12px; }
.container { max-width: 1180px; padding-inline: 32px; }
.container-narrow { max-width: 850px; padding-inline: 32px; }
section { padding-block: 64px; scroll-margin-top: 108px; }
[id] { scroll-margin-top: 112px; }
h2 { font-size: clamp(26px, 3.1vw, 38px); line-height: 1.16; letter-spacing: -.035em; }
.site-header { background: var(--bg-elevated); backdrop-filter: none; }
.site-header-inner { max-width: 1280px; padding: 18px 28px; gap: 24px; }
.brand { font-size: 27px; letter-spacing: -.055em; color: var(--text-primary); flex-shrink: 0; gap: 12px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; }
.site-nav { margin-left: auto; gap: 24px; }
.site-nav a { font-size: 14px; font-weight: 600; padding-block: 10px; color: var(--text-primary); }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.header-controls { margin: 0; gap: 6px; }
.lang-switcher-trigger { min-height: 40px; padding-inline: 8px; }
.theme-toggle { width: 40px; height: 40px; }
.header-try { padding: 10px 20px !important; font-size: 14px !important; }
.menu-toggle { display: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); background: var(--bg-elevated); padding: 9px 12px; }
.btn { border-radius: 9px; min-height: 46px; padding: 12px 22px; font-size: 16px; font-weight: 650; line-height: 1.4; box-shadow: none; border: 1px solid transparent; gap: 10px; text-align: center; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgb(20 56 76 / 9%); }
.btn-primary, .btn-ink { color: var(--on-cta); background: var(--cta); border-color: var(--cta); }
.btn-primary:hover, .btn-ink:hover { color: var(--on-cta); background: var(--cta); border-color: var(--cta); filter: brightness(.95); }
.btn-secondary, .btn-sky { color: var(--text-primary); background: var(--bg-sunken); border-color: var(--border); }
.btn-secondary:hover, .btn-sky:hover { color: var(--text-primary); background: var(--bg-sunken); border-color: var(--accent); }
.text-link { color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; border: 0; }
.text-link:hover { color: var(--text-primary); }
.eyebrow { color: var(--accent); font-weight: 750; font-size: 12px; line-height: 1.5; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 22px; }
.home-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--hero-surface); padding-block: 64px 60px; }
.home-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .37; background: radial-gradient(circle at 20% 110%, #a8dacf 0 13%, transparent 13.2%), radial-gradient(circle at 99% 100%, #c6c6e7 0 15%, transparent 15.2%); }
.home-hero::after { content: ""; position: absolute; z-index: -1; width: 540px; height: 540px; right: -70px; top: -60px; transform: rotate(-10deg); opacity: .15; background-image: linear-gradient(#82b7bf 3px, transparent 3px), linear-gradient(90deg, #82b7bf 3px, transparent 3px); background-size: 135px 135px; }
.home-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 60px; }
.home-copy h1 { font-size: clamp(38px, 4.8vw, 60px); font-weight: 800; line-height: 1.04; letter-spacing: -.045em; margin: 0 0 26px; max-width: 650px; }
.home-lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 555px; color: var(--text-primary); margin-bottom: 28px; }
.home-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.home-trust { margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.hero-puzzle { position: relative; padding: 10px 12px 0; margin: 0; max-width: 425px; width: 100%; justify-self: end; }
.puzzle-paper { background: #f5f9fa; border: 1px solid #d1e0e7; padding: 28px; box-shadow: 0 12px 20px rgb(43 91 111 / 13%); transform: rotate(-5deg); position: relative; z-index: 1; }
.puzzle-shadow { position: absolute; inset: 35px -7px 66px 55px; transform: rotate(9deg); background: #c7e1e6; box-shadow: 0 4px 12px rgb(43 91 111 / 8%); border: 1px solid #bad4de; }
.hero-puzzle figcaption { margin-top: 34px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.sample-grid { display: grid; grid-template-columns: repeat(4,1fr); aspect-ratio: 1; width: 100%; max-width: 225px; margin: 22px auto; border: 2px solid #234454; background: #f7fafb; color: #17384c; }
.sample-grid > span { display: flex; align-items: center; justify-content: center; min-width: 0; aspect-ratio: 1; border-right: 1px solid #8ca5b0; border-bottom: 1px solid #8ca5b0; font-size: 25px; font-weight: 650; }
.sample-grid > span:nth-child(4n) { border-right: 0; }
.sample-grid > span:nth-last-child(-n+4) { border-bottom: 0; }
.sample-grid > span:nth-child(4n+2) { border-right: 2px solid #234454; }
.sample-grid > span:nth-child(n+5):nth-child(-n+8) { border-bottom: 2px solid #234454; }
.hero-sample { max-width: none; margin: 0; }
.hero-sample > span { font-size: clamp(25px, 3vw, 42px); }
.shape { display: block; width: 56%; aspect-ratio: 1; }
.shape-circle { border-radius: 50%; background: #df798b; }
.shape-square { background: #68abc9; }
.shape-triangle { background: #9b95c7; clip-path: polygon(50% 0,100% 100%,0 100%); }
.shape-diamond { background: #72b5a1; transform: rotate(45deg) scale(.78); }
.calc-sample > span { position: relative; font-size: 24px; border-right: 1px solid #8ca5b0; border-bottom: 2px solid #234454; padding-top: 12px; }
.calc-sample small { position: absolute; top: 1px; left: 4px; font-size: 11px; font-weight: 700; }
.learning-section { padding-block: 50px; }
.learning-section h2 { text-align: center; margin-bottom: 28px; }
.learning-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.learning-card { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--border); border-radius: 14px; padding: 24px; background: var(--bg-elevated); color: var(--text-primary); text-align: center; transition: border-color .15s,transform .15s; }
.learning-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.learning-card h3 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 6px; }
.learning-card p { color: var(--text-secondary); font-size: 15px; }
.learning-card .text-link { margin-top: auto; }
.class-teaser { background: var(--class-surface); padding-block: 42px; }
.class-teaser-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.class-teaser figure { margin: 0; }
.class-teaser img { display: block; width: 100%; height: 360px; object-fit: cover; object-position: 58% center; border-radius: 16px; }
.class-teaser h2 { margin-bottom: 24px; }
.class-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 20px; }
.class-steps li { display: flex; align-items: flex-start; gap: 16px; }
.class-steps h3 { font-size: 18px; line-height: 1.3; margin-bottom: 3px; }
.class-steps p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.step-number { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #274958; background: #bfdee5; font-size: 19px; font-weight: 700; }
.class-steps li:nth-child(2) .step-number { background: #edd3d6; }
.class-steps li:nth-child(3) .step-number { background: #c4e4d9; }
.offer-teaser { padding-block: 48px; }
.offer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 52px; align-items: center; }
.offer-grid h2 { font-size: 30px; margin-bottom: 14px; }
.offer-grid p { max-width: 470px; color: var(--text-secondary); }
.offer-price { display: flex; align-items: center; gap: 28px; padding-left: 40px; border-left: 1px solid var(--border); }
.offer-price p { margin-bottom: 12px; }
.offer-price strong { color: var(--text-primary); font-size: 21px; }
.offer-price svg { flex: 0 0 60px; }
.home-faq { padding-block: 42px; border-top: 1px solid var(--border); }
.home-faq h2 { font-size: 26px; margin-bottom: 15px; }
.home-faq .text-link { display: inline-block; margin-top: 18px; }
.home-faq details.faq summary { font-size: 16px; }
.site-footer { background: var(--footer-surface); color: #edf6f9; border: 0; padding: 30px 0 20px; }
.site-footer-inner { max-width: 1180px; grid-template-columns: 1fr auto; padding-inline: 32px; gap: 20px; }
.site-footer .brand { color: #f3f9fa; }
.site-footer .brand img { width: 38px; height: 38px; }
.site-footer a { color: #edf6f9; margin: 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer nav { gap: 22px; }
.footer-brand { display: flex; gap: 28px; align-items: center; }
.footer-brand p { border-left: 1px solid #91abb6; padding-left: 24px; font-size: 13px; }
.copyright { grid-column: 1/-1; font-size: 12px; opacity: .9; }
.page-intro { padding: 38px 0 45px; background: var(--hero-surface); }
.breadcrumb { font-size: 13px; margin-bottom: 26px; color: var(--text-secondary); display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.page-intro .eyebrow { margin-bottom: 12px; }
.page-intro h1 { font-size: clamp(34px,4vw,52px); line-height: 1.08; letter-spacing: -.04em; max-width: 850px; margin-bottom: 20px; }
.intro-lead { max-width: 790px; font-size: 19px; color: var(--text-secondary); }
.activity-picker h2 { margin-bottom: 16px; }
.picker-intro { color: var(--text-secondary); max-width: 790px; margin-bottom: 30px; }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.activity-card { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 22px; padding: 24px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px; align-items: start; }
.activity-shot { border-radius: 10px; width: 130px; height: auto; }
.activity-copy h3 { font-size: 21px; line-height: 1.2; margin-bottom: 8px; }
.activity-copy > p { font-size: 14px; color: var(--text-secondary); }
.activity-code { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.activity-code img { width: 62px; height: 62px; flex-shrink: 0; border-radius: 4px; }
.activity-code code { font-size: 11px; word-break: break-all; user-select: all; }
.activity-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.activity-actions .btn { padding: 9px 13px; font-size: 13px; }
.activity-actions .text-link { font-size: 13px; }
.copy-code.copied { background: var(--pastel-green); color: var(--text-primary); }
.progression-section { background: var(--class-surface); }
.progression-section .container { display: grid; grid-template-columns: 1.8fr 1fr; gap: 48px; align-items: center; }
.progression-section h2 { margin-bottom: 18px; }
.progression-section p:not(.eyebrow) { max-width: 650px; margin-bottom: 18px; color: var(--text-secondary); }
.reading-section .read-block { margin-top: 0; padding-top: 0; border: 0; }
.section-title { letter-spacing: -.035em; }
.section-lead { font-size: 17px; max-width: 760px; }
.section-header { margin-bottom: 34px; }
.feature, .geo-card, .mode-card, .option-card, .doc-card, .price-card, .step, .fiche { border-color: var(--border); background: var(--bg-elevated); box-shadow: none; }
.feature-desc, .mode-desc, .geo-desc, .step-desc, .doc-desc { font-size: 15px; line-height: 1.65; }
.features-grid { gap: 22px; }
.feature { padding: 24px; }
.feature-title { font-size: 17px; }
.feature-icon { font-size: 22px; }
.mode-card { padding: 22px; }
.mode-title small { color: var(--accent); }
.mode-shot { border: 1px solid var(--border-strong); background: #f3f8f9; }
.mini-sudoku { background: #edf5f7; }
.mode-note, .callout { background: var(--bg-sunken); }
.mode-slide { animation: none; display: none; opacity: 1; }
.mode-slide:first-child { display: flex; }
.mode-slides.is-controlled .mode-slide { display: none; }
.mode-slides.is-controlled .mode-slide.is-active { display: flex; }
.mode-controls { display: flex; gap: 5px; flex-wrap: wrap; margin: -4px 0 14px; }
.mode-controls button { background: var(--bg); color: var(--text-primary); border: 1px solid var(--border); border-radius: 5px; padding: 7px; font-size: 11px; }
.mode-controls button[aria-pressed="true"] { background: var(--cta); color: var(--on-cta); }
.geo-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.geo-card { padding: 25px; }
.geo-card img { width: 115px; height: 115px; }
.geo-desc { max-width: 290px; margin-inline: auto; }
.geo-size { color: var(--accent); }
.recipe { background: var(--class-surface); border-color: var(--border); }
.class-photo img, .class-visual img { border-color: var(--border); }
.solve-sheet { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-strong); }
.solve-sheets { gap: 28px; }
.solve-sheet-title { color: var(--text-primary); }
.solve-sheet-foot { color: var(--text-secondary); }
.solve-list { font-size: 14px; }
.price-card { border: 1px solid var(--border); }
.price-card.highlighted { border: 2px solid var(--accent); }
.price-card.highlighted::before, .price-card.highlighted::after { background: var(--pastel-green); color: var(--text-primary); }
.pricing-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pricing-cards .price-card:nth-child(3) { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 2fr; column-gap: 40px; }
.pricing-cards .price-card:nth-child(3) .price-features { grid-column: 2; grid-row: 1/5; columns: 2; column-gap: 28px; }
.pricing-cards .price-card:nth-child(3) .price-features li { break-inside: avoid; }
.pricing-cards .price-card:nth-child(3) .btn { align-self: start; justify-self: start; }
.price-amount { font-size: 36px; }
.tier-table-wrap { border-color: var(--border); }
.tier-table th { background: var(--bg-sunken); }
.tier-table td { background: var(--bg-elevated); }
.next-step { padding-block: 40px; background: var(--class-surface); }
.next-step .container { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.prose { max-width: 860px; margin-inline: auto; padding: 54px 32px; }
.prose h1 { font-size: clamp(32px,4vw,46px); }
.privacy-charter { max-width: 1180px; margin: 0 auto 40px; padding-inline: 32px; }
.privacy-charter > summary { padding: 18px 0; color: var(--accent); cursor: pointer; font-weight: 700; }
.privacy-charter .charter { padding-block: 32px; }
.content-disclosure { border: 1px solid var(--border); border-radius: 12px; margin-top: 28px; padding: 0 24px; background: var(--bg-elevated); }
.content-disclosure > summary { padding: 20px 0; cursor: pointer; color: var(--accent); font-weight: 700; }
.content-disclosure > .features-grid, .content-disclosure > .solve-sheets { margin-bottom: 24px; }
.content-disclosure[open] > summary { margin-bottom: 12px; }
.charter-col { background: var(--bg-elevated); }
.charter-col-title { color: var(--text-primary); }
details.faq { padding-block: 18px; }
details.faq summary { min-height: 30px; }
details.faq p { font-size: 16px; line-height: 1.7; }
.page-classroom #classroom > .container > .section-header { display: none; }
.page-versions #versions > .container > .section-header { display: none; }
:root[data-theme="dark"] .hero-puzzle figcaption { color: var(--text-secondary); }
:root[data-theme="dark"] .puzzle-paper { background: #e4eef1; }
:root[data-theme="dark"] .puzzle-shadow { background: #426773; border-color: #426773; }
:root[data-theme="dark"] .hero-badge { color: #183d4b; }
@media (min-width: 1450px) { .home-hero { padding-block: 78px; } }
@media (max-width: 1120px) {
  .site-header-inner { gap: 15px; padding-inline: 22px; }
  .site-nav { gap: 14px; }
  .brand { font-size: 23px; }
  .brand img { width: 36px; height: 36px; }
  .header-try { display: none; }
  .home-hero-grid { gap: 32px; }
  .activity-card { grid-template-columns: 95px minmax(0,1fr); gap: 16px; padding: 20px; }
  .activity-shot { width: 95px; }
}
@media (max-width: 900px) {
  .site-header-inner { flex-wrap: wrap; gap: 12px; }
  .menu-toggle { display: block; margin-left: auto; }
  .site-nav { order: 3; display: flex; width: 100%; margin: 0; overflow: visible; flex-wrap: wrap; gap: 5px 22px; padding: 8px 0; }
  .has-js .site-nav { display: none; }
  .has-js .site-nav.is-open { display: flex; }
  .site-nav a { padding: 9px 0; }
  .header-controls { margin-left: 0; }
  .home-copy h1 { font-size: 43px; }
  .home-lead { font-size: 18px; }
  .home-hero-grid { grid-template-columns: 1.1fr .9fr; gap: 26px; }
  .puzzle-paper { padding: 18px; }
  .class-teaser-grid { gap: 28px; }
  .class-teaser img { height: 350px; }
  .offer-grid { gap: 25px; }
  .offer-price { padding-left: 24px; gap: 18px; }
  .offer-price svg { display: none; }
  .activity-grid { grid-template-columns: 1fr; }
  .activity-card { grid-template-columns: 130px minmax(0,1fr); }
  .activity-shot { width: 130px; }
  .activity-code code { font-size: 13px; }
  .geo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer-inner { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .container, .container-narrow { padding-inline: 22px; }
  section { padding-block: 40px; }
  .site-header-inner { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 21px; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .menu-toggle { font-size: 13px; padding: 8px 10px; }
  .header-controls { gap: 4px; }
  .theme-toggle { width: 34px; height: 36px; font-size: 16px; }
  .lang-switcher-trigger { min-height: 36px; min-width: auto; padding: 6px; gap: 4px; }
  .lang-switcher-trigger .lang-flag { display: none; }
  .home-hero { padding-block: 38px 34px; }
  .home-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .home-copy h1 { font-size: clamp(36px,8.7vw,48px); max-width: 520px; margin-bottom: 20px; }
  .home-copy .eyebrow { margin-bottom: 16px; font-size: 11px; }
  .home-lead { margin-bottom: 22px; }
  .home-actions { gap: 18px; }
  .home-actions .btn { width: 100%; }
  .home-actions > .text-link { font-size: 15px; }
  .home-trust { margin-top: 16px; }
  .hero-puzzle { max-width: 285px; justify-self: center; padding-inline: 10px; }
  .puzzle-paper { padding: 18px; }
  .hero-sample > span { font-size: 27px; }
  .hero-puzzle figcaption { margin-top: 24px; font-size: 12px; }
  .learning-grid { grid-template-columns: 1fr; gap: 14px; }
  .learning-card { display: grid; grid-template-columns: 1fr 120px; text-align: left; gap: 4px 18px; padding: 20px; align-items: start; }
  .learning-card h3 { grid-column: 1; align-self: end; font-size: 22px; }
  .learning-card p { grid-column: 1; font-size: 14px; }
  .learning-card .sample-grid { grid-column: 2; grid-row: 1/4; width: 120px; margin: 0; }
  .learning-card .sample-grid > span { font-size: 16px; }
  .learning-card .calc-sample > span { padding-top: 8px; }
  .learning-card .calc-sample small { font-size: 8px; left: 2px; }
  .learning-card .text-link { grid-column: 1; font-size: 14px; margin-top: 10px; }
  .class-teaser-grid { grid-template-columns: 1fr; gap: 28px; }
  .class-teaser img { height: auto; aspect-ratio: 4/3; }
  .class-teaser h2 { margin-bottom: 24px; }
  .offer-grid { grid-template-columns: 1fr; gap: 25px; }
  .offer-grid h2 { font-size: 29px; }
  .offer-price { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .offer-price svg { display: block; }
  .footer-brand { flex-wrap: wrap; gap: 16px; }
  .footer-brand p { padding-left: 16px; }
  .site-footer-inner { padding-inline: 22px; text-align: left; }
  .site-footer nav { gap: 14px 22px; }
  .page-intro { padding-block: 25px 35px; }
  .page-intro h1 { font-size: 36px; }
  .intro-lead { font-size: 17px; }
  .activity-card { grid-template-columns: 85px minmax(0,1fr); padding: 16px; gap: 15px; }
  .activity-shot { width: 85px; }
  .activity-copy h3 { font-size: 19px; }
  .activity-code { flex-wrap: wrap; }
  .activity-code img { width: 58px; height: 58px; }
  .activity-code code { font-size: 11px; }
  .activity-actions { gap: 14px; }
  .activity-actions .btn { font-size: 12px; padding-inline: 10px; }
  .progression-section .container { grid-template-columns: 1fr; gap: 10px; }
  .progression-section .sample-grid { max-width: 210px; }
  .geo-grid, .pricing-cards { grid-template-columns: 1fr; }
  .pricing-cards .price-card:nth-child(3) { display: flex; }
  .pricing-cards .price-card:nth-child(3) .price-features { columns: 1; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-shot { max-height: 280px; }
  .mode-card { padding: 22px; }
  .prose { padding: 35px 22px; }
  .privacy-charter { padding-inline: 22px; }
  .doc-actions { flex-wrap: wrap; }
  .home-faq h2 { font-size: 25px; }
}
@media (max-width: 360px) {
  .brand { font-size: 19px; }
  .brand img { width: 30px; height: 30px; }
  .site-header-inner { gap: 7px; padding-inline: 12px; }
  .learning-card { grid-template-columns: 1fr 100px; gap: 4px 12px; padding: 16px; }
  .learning-card .sample-grid { width: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .learning-card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .home-actions, .copy-code, .header-controls, .skip-link { display: none !important; }
  body { background: white; color: #172e3c; }
  section { padding-block: 24px; }
  .activity-card, .learning-card, .doc-card { break-inside: avoid; }
}

/* Stationery and classroom artwork from the approved illustrated mockup. */
:root:not([data-theme="dark"]) {
  --bg: #f7fafb; --bg-elevated: #fbfcfc; --hero-surface: #e2f1f9;
  --class-surface: #e8f3f7; --footer-surface: #527f91; --cta: #487f92;
}
h1, h2, h3, .brand { font-weight: 800; }
.home-hero { padding-block: 30px; }
.home-hero::before { background: radial-gradient(ellipse at 3% 110%, #c4e5dd 0 22%, transparent 22.3%); opacity: .48; }
.home-hero::after { display: none; }
.home-hero-grid { grid-template-columns: 1.15fr 1fr; gap: 10px; }
.home-copy h1 { font-size: clamp(40px, 4.5vw, 58px); line-height: 1.08; letter-spacing: -.045em; }
.home-copy .eyebrow { margin-bottom: 16px; }
.home-lead { font-size: 20px; max-width: 500px; }
.stationery-scene { position: relative; width: 100%; aspect-ratio: 1.15; container-type: inline-size; }
.stationery-sheet, .back-sheet { position: absolute; background: #fafcfc; border: 1px solid #d5e3e8; box-shadow: 3px 10px 14px #29455b22; padding: 5%; }
.stationery-sheet { width: 65%; left: 15%; top: 19%; transform: rotate(-9deg); z-index: 2; }
.back-sheet { width: 57%; left: 32%; top: 21%; transform: rotate(10deg); }
.back-sheet .sample-grid { margin: 0; max-width: none; opacity: .75; }
.stationery-sheet .sample-grid { margin: 0; max-width: none; }
.stationery-sheet .sample-grid > span { font-size: 8cqw; font-weight: 600; }
.pencil-note { font-family: 'Kalam', cursive; font-weight: 400; line-height: 1.25; color: #375c74; }
.observe-note { position: absolute; right: 0; top: 0; font-size: 5.6cqw; transform: rotate(7deg); z-index: 3; }
.challenge-note { position: absolute; left: 0; bottom: 0; font-size: 5cqw; transform: rotate(-8deg); z-index: 3; }
.red-pencil { position: absolute; width: 84%; height: auto; left: 20%; bottom: 9%; transform: rotate(-24deg); z-index: 4; filter: drop-shadow(2px 6px 3px #29455b33); }
.pencil-arrow { position: absolute; width: 20%; left: 3%; top: 57%; transform: rotate(22deg); fill: none; stroke: #5d8ba2; stroke-width: 2; stroke-linecap: round; }
.sample-grid { grid-template-rows: repeat(4,minmax(0,1fr)); }
.sample-grid > span { position: relative; min-height: 0; overflow: hidden; }
.shape { width: 55%; max-height: 55%; flex-shrink: 0; }
.shape-circle { background: #73b5b5; }
.shape-triangle { background: #e58892; }
.shape-square { background: #6bafca; }
.shape-diamond { background: #84bfa5; }
.learning-section { padding-block: 38px 42px; }
.learning-card { padding: 24px 20px; border-radius: 12px; box-shadow: 0 3px 8px #315e7310; }
.learning-card .sample-grid { max-width: 215px; }
.class-teaser-grid { gap: 38px; }
.class-art { position: relative; margin: 0; width: 100%; aspect-ratio: 4/3; container-type: inline-size; overflow: hidden; border-radius: 12px; }
.class-art > img, .class-teaser .class-art > img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; border: 0; border-radius: 0; }
.class-board { position: absolute; left: 49%; top: 9%; width: 28%; aspect-ratio: 1; }
.class-board .sample-grid { width: 100%; height: 100%; max-width: none; margin: 0; border-width: 1px; background: #fcfdfb; }
.class-board .sample-grid > span { border-width: 1px; }
.class-notes { position: absolute; left: 7%; top: 9%; font-size: 3.5cqw; transform: rotate(-4deg); }
.class-steps { gap: 16px; }
.step-number { background: #518b9f; color: white; }
.class-steps li:nth-child(2) .step-number { background: #c66377; }
.class-steps li:nth-child(3) .step-number { background: #428871; }
.intro-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: center; }
.page-intro { padding-block: 28px; overflow: hidden; }
.page-intro .stationery-scene { max-width: 340px; justify-self: end; }
.footer-brand p { font-family: 'Kalam', cursive; font-size: 19px; line-height: 1.3; }
.offer-price { position: relative; }
.offer-price::after { content: ''; position: absolute; width: 28px; height: 20px; top: -10px; right: 25%; border-top: 3px solid #dc7d8b; border-right: 3px solid #dc7d8b; transform: rotate(-14deg); }
:root[data-theme="dark"] .pencil-note { color: #c0dce8; }
:root[data-theme="dark"] .class-notes { color: #375c74; }
@media (max-width: 900px) {
  .home-copy h1 { font-size: 42px; }
  .home-lead { font-size: 18px; }
  .intro-grid { gap: 20px; grid-template-columns: 1.5fr 1fr; }
}
@media (max-width: 640px) {
  .home-hero-grid, .intro-grid { grid-template-columns: 1fr; gap: 25px; }
  .home-copy h1 { font-size: clamp(36px, 8.7vw, 48px); }
  .stationery-scene { max-width: 340px; justify-self: center; }
  .page-intro .stationery-scene { max-width: 240px; justify-self: center; }
  .home-hero { padding-block: 34px; }
  .learning-card .sample-grid { max-width: 120px; }
  .class-teaser-grid { gap: 28px; }
}

/* Teaching and privacy are primary benefits, alongside explicit home navigation. */
.nav-privacy { white-space: nowrap; }
.privacy-emphasis { color: #b94f64; font-size: 1.2em; font-weight: 800; }
:root[data-theme="dark"] .privacy-emphasis { color: #f2a0af; }
.site-header .brand > span { display: flex; flex-direction: column; line-height: 1.08; }
.site-header .brand small { font-size: 11px; font-weight: 600; letter-spacing: .015em; margin-top: 5px; color: var(--text-secondary); }
.site-header-inner { max-width: 1400px; gap: 18px; }
.site-nav { gap: 18px; }
.hero-access > .eyebrow, .page-intro .eyebrow, .homework-heading > .eyebrow {
  display: inline-block; padding: 9px 15px; border: 1px solid #9fcaba;
  border-radius: 10px; background: #d8eee3; color: #275a49;
  font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: none;
}
.home-trust { display: block; line-height: 1.6; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.class-free { color: var(--accent); font-size: 18px; font-weight: 800; margin: -8px 0 23px; }
.privacy-spotlight { padding-block: 26px; background: var(--pastel-green); border-block: 1px solid var(--border); }
.privacy-spotlight-inner { display: flex; align-items: center; gap: 24px; }
.privacy-spotlight svg { width: 48px; height: 52px; flex: 0 0 48px; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.privacy-spotlight h2 { font-size: 24px; margin-bottom: 8px; letter-spacing: -.02em; }
.privacy-spotlight p { max-width: 840px; margin-bottom: 10px; color: var(--text-secondary); }
.privacy-spotlight .privacy-benefits { font-weight: 800; color: var(--text-primary); }
.privacy-spotlight .text-link { font-size: 14px; }
@media (min-width: 901px) and (max-width: 1180px) {
  .site-header-inner { gap: 12px; padding-inline: 16px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 12px; }
  .site-header .brand { font-size: 21px; gap: 8px; }
  .header-try { display: none; }
}
@media (max-width: 640px) {
  .hero-access > .eyebrow, .page-intro .eyebrow { font-size: 14px; }
  .privacy-spotlight-inner { gap: 15px; align-items: flex-start; }
  .privacy-spotlight svg { width: 32px; height: 38px; flex-basis: 32px; }
  .privacy-spotlight h2 { font-size: 22px; }
  .privacy-spotlight p { font-size: 14px; }
  .site-header-inner { gap: 8px; }
}

/* A shared activity can travel home on paper or on a personal device. */
.class-jump { display: flex; gap: 28px; padding-block: 20px; }
.homework-section { background: var(--class-surface); }
.homework-heading { max-width: 850px; margin-bottom: 28px; }
.homework-heading .eyebrow { margin-bottom: 12px; }
.homework-heading h2 { margin-bottom: 18px; }
.homework-heading > p:last-child { font-size: 19px; color: var(--text-secondary); }
.homework-art { margin: 0 0 30px; border-radius: 16px; overflow: hidden; }
.homework-art img { display: block; width: 100%; height: auto; }
.homework-content { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start; }
.homework-content ol { padding-left: 25px; margin: 0; }
.homework-content li { padding-left: 9px; margin-bottom: 18px; line-height: 1.65; }
.homework-content li::marker { color: var(--accent); font-weight: 800; }
.homework-content .class-free { margin-top: 0; }
.homework-platform { font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.homework-teaser-link { display: block; margin-top: 18px; }
@media (max-width: 640px) {
 .homework-content { grid-template-columns: 1fr; gap: 15px; }
 .homework-heading > p:last-child { font-size: 17px; }
 .homework-art { margin-inline: -10px; border-radius: 10px; }
}
.homework-heading h1 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.1; letter-spacing: -.035em; margin-bottom: 20px; }
.homework-callout { padding-block: 28px; }
.homework-callout h2 { font-size: 25px; margin-bottom: 12px; }
.homework-callout p { max-width: 850px; margin-bottom: 14px; color: var(--text-secondary); }
@media (min-width: 901px) { .site-nav { gap: 14px; } .site-nav a { white-space: nowrap; } }
@media (min-width: 901px) and (max-width: 1250px) { .header-try { display: none; } .site-nav { gap: 10px; } .site-nav a { font-size: 12px; } }

/* Restored positioning: playful maths and progression for every age. */
.hero-access > .eyebrow, .page-intro .eyebrow, .homework-heading > .eyebrow { background: #fbe5e8; border-color: #dca0ab; color: #a4263c; }
.home-audience { font-size: 15px; font-weight: 800; color: var(--text-secondary); margin: 0 0 14px; }
.home-offline { margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.home-offline a { text-decoration: underline; text-underline-offset: 3px; }
.home-trust { margin-top: 10px; }
.calc-intro { background: var(--bg-elevated); padding-block: 42px; }
.calc-intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 38px; align-items: center; }
.calc-intro h2 { margin-bottom: 18px; }
.calc-intro .eyebrow { color: #af4057; margin-bottom: 10px; }
.calc-intro p:not(.eyebrow) { color: var(--text-secondary); margin-bottom: 16px; }
.calc-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.calc-examples figure { margin: 0; text-align: center; min-width: 0; }
.calc-examples .sample-grid { margin-top: 0; margin-bottom: 12px; }
.calc-examples figcaption { font-size: 15px; font-weight: 800; }
.restored-progression { padding-block: 38px; background: var(--class-surface); }
.restored-progression .progression-panel { margin: 0; padding: 26px; border: 2px solid var(--border); border-radius: 14px; background: var(--bg-elevated); box-shadow: none; }
.restored-progression .callout-title { display: block; font-size: 26px; line-height: 1.2; color: var(--text-primary); }
.restored-progression .callout-lead { max-width: 850px; margin-top: 14px; }
.restored-progression .callout-reassure { margin-top: 26px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.restored-progression .reassure-text .callout-title { font-size: 20px; }
.restored-progression .reassure-text li { font-size: 15px; }
.restored-progression .reassure-grids { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; }
.restored-progression .reassure-grids figure { margin: 0; }
.restored-progression .mini-sudoku { width: 120px; height: 120px; }
.restored-progression .mini-sudoku span { min-width: 0; }
.restored-progression .reassure-grids figcaption { font-size: 12px; margin-top: 10px; }
.restored-progression .is-words { display: none; }
@media (max-width: 900px) { .calc-intro-grid { grid-template-columns: 1fr; } .calc-examples { max-width: 470px; width: 100%; margin-inline: auto; } }
@media (max-width: 640px) { .restored-progression .callout-reassure { grid-template-columns: 1fr; } .calc-examples { gap: 14px; } .calc-examples .calc-sample > span { font-size: 20px; } }
.stationery-sheet .calc-sample > span { font-size: 6cqw; padding-top: 9%; }
.stationery-sheet .calc-sample small { font-size: 2.8cqw; top: 2%; left: 8%; }
.class-board .calc-sample > span { font-size: 3.5cqw; padding-top: 18%; }
.class-board .calc-sample small { font-size: 1.6cqw; left: 6%; }

/* Cage boundaries follow the puzzle data, independently of Sudoku blocks. */
.sample-grid.calc-sample > span { border-right: 1px solid #a2b5bd; border-bottom: 1px solid #a2b5bd; }
.sample-grid.calc-sample > .cage-right { border-right: 2px solid #234454; }
.sample-grid.calc-sample > .cage-bottom { border-bottom: 2px solid #234454; }
.sample-grid.calc-sample > .edge-right { border-right: 0; }
.sample-grid.calc-sample > .edge-bottom { border-bottom: 0; }

/* Real two-cell cages alternate with the retained irregular examples. */
.sample-grid.calc-sample > span.single-given { padding: 0; }
.calc-slides { width: 100%; max-width: 225px; margin: 22px auto; }
.calc-frame { display: none; }
.calc-frame.is-active { display: block; }
.calc-slides .sample-grid { margin: 0; max-width: none; }
.stationery-sheet .calc-slides, .class-board .calc-slides { margin: 0; max-width: none; }
.class-board .calc-slides, .class-board .calc-frame { height: 100%; }
.calc-examples .calc-slides { margin-top: 0; margin-bottom: 12px; }
.calc-motion-control { grid-column: 1/-1; justify-self: center; padding: 6px 18px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 7px; color: var(--text-primary); font: inherit; font-size: 13px; }
.calc-motion-control[hidden] { display: none; }
.restored-progression .emoji-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; margin-top: 22px; }
.restored-progression .emoji-list li { margin: 0; font-size: 15px; line-height: 1.6; }
@media (max-width: 640px) {
 .learning-card .calc-slides { grid-column: 2; grid-row: 1/4; width: 120px; margin: 0; }
 .learning-card .calc-slides .sample-grid { width: 100%; }
 .restored-progression .progression-panel { padding: 20px; }
 .restored-progression .emoji-list { grid-template-columns: 1fr; }
}
@media (max-width: 360px) { .learning-card .calc-slides { width: 100px; } }

.restored-progression.reassurance-intro .callout-reassure { margin-top: 0; }
.reassure-grids .grid-phase { display: block; font-weight: 800; margin-top: 4px; }
.reassure-grids .calc-motion-control { flex-basis: 100%; }
.mini-sudoku .solved-value { color: #a83c40; }

/* Make the product name unmistakable in the first screen. */
.home-copy h1 { font-size: clamp(54px, 5.5vw, 72px); margin-bottom: 20px; }
.home-product-name { display: block; line-height: 1; letter-spacing: -.055em; }
.home-tagline { display: block; max-width: 520px; margin-top: 12px; font-size: clamp(27px, 2.8vw, 36px); line-height: 1.16; letter-spacing: -.025em; }
@media (max-width: 640px) {
  .home-copy h1 { font-size: clamp(48px, 12vw, 64px); }
  .home-tagline { font-size: clamp(26px, 6.5vw, 32px); margin-top: 10px; }
}

/* Deliberate teacher resources, separate from prose and numbered steps. */
.teaching-resource { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.teaching-resource-title { flex: 1 1 220px; font-size: 15px; line-height: 1.45; font-weight: 700; color: var(--text-primary); }
.class-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.dossier-download.btn {
 display: inline-flex; align-items: center; justify-content: center; gap: 8px;
 padding: 10px 16px; min-height: 44px; max-width: 100%;
 background: var(--cta); color: var(--on-cta); border: 1px solid var(--cta);
 border-radius: 9px; font-size: 14px; font-weight: 800; line-height: 1.4;
 white-space: normal; text-align: center; text-decoration: none; box-shadow: none;
}
.class-actions .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; border-radius: 9px; }
.dossier-download.btn:hover { filter: brightness(.92); }
.dossier-download.btn:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 4px; }
.page-classroom .class-activity-link { margin-top: 24px; }
.page-classroom #classroom .callout { border: 1px solid var(--border); box-shadow: none; border-radius: 12px; padding: 20px 24px; }
@media (max-width: 640px) { .teaching-resource { align-items: flex-start; } }

/* Direct booking links: no third-party widget loaded on the site. */
.header-booking { flex-shrink: 0; white-space: nowrap; padding: 10px 14px; font-size: 13px; }
.booking-contact { background: var(--bg-elevated); border-top: 1px solid var(--border); padding-block: 38px; }
.booking-contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; }
.booking-contact h2 { font-size: clamp(24px, 2.5vw, 32px); margin-bottom: 12px; }
.booking-contact p { max-width: 680px; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.booking-contact .booking-note { font-size: 13px; margin-top: 10px; }
.booking-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; flex-shrink: 0; }
.booking-actions .booking-button { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1300px) {
 .site-header-inner { flex-wrap: wrap; }
 .site-nav { order: 3; flex-basis: 100%; justify-content: center; margin-left: 0; }
 .header-controls { margin-left: auto; }
}
@media (max-width: 640px) {
 .header-booking { order: 2; margin-left: auto; font-size: 12px; padding: 8px 12px; }
 .site-header-inner { flex-wrap: wrap; }
 .booking-contact-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
 .booking-actions { align-items: flex-start; }
}
@media print { .booking-contact { display: none; } }

/* Platform shortcuts beside the teaching badge, above the product name. */
.hero-access { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 24px; }
.hero-access > .eyebrow { margin: 0; justify-self: start; }
.platform-links { display: flex; align-items: center; justify-content: center; grid-column: 2; gap: 10px; }
.platform-link { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 48px; min-height: 54px; padding: 5px 3px; border: 1px solid transparent; border-radius: 9px; color: var(--text-primary); text-decoration: none; font-size: 10px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.platform-link svg { flex-shrink: 0; }
a.platform-link:hover { background: var(--bg-elevated); border-color: var(--border); }
.platform-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.platform-link[aria-disabled="true"] { color: #818991; opacity: .65; cursor: default; }
@media (max-width: 900px) { .hero-access { grid-template-columns: minmax(0, 1fr); gap: 12px; } .platform-links { grid-column: 1; justify-self: center; gap: 4px; } .platform-link { min-width: 44px; padding-inline: 2px; } }

.platform-link[aria-disabled="true"] svg { filter: grayscale(1); }
.store-pending, .store-pending:hover { opacity: .55; filter: grayscale(1); cursor: default; pointer-events: none; }

/* Home video: local poster, YouTube player inserted only on click (site.js). */
.video-section { padding-block: 52px; }
.video-section h2 { text-align: center; margin-bottom: 24px; }
.video-player { max-width: 880px; margin: 0 auto; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-lg); background: var(--bg-sunken); box-shadow: var(--shadow-elevated); }
.video-frame > a, .video-frame > button, .video-frame > iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: none; }
.video-facade { cursor: pointer; }
.video-facade img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; left: 50%; top: 80%; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; background: var(--brand-ink); box-shadow: var(--shadow-elevated); transform: translate(-50%, -50%); transition: transform .15s ease, background-color .15s ease; }
.video-play svg { margin-left: 4px; fill: currentColor; }
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { background: var(--accent); transform: translate(-50%, -50%) scale(1.08); }
.video-facade:focus-visible { outline: 4px solid var(--accent); outline-offset: -4px; border-radius: var(--radius-lg); }
.video-player figcaption { display: grid; gap: 4px; margin-top: 14px; text-align: center; }
.video-caption { font-weight: 700; color: var(--text-primary); }
.video-note { font-size: 13px; color: var(--text-secondary); }
.video-link { display: inline-block; margin-top: 14px; }
.footer-channel { display: inline-flex; align-items: center; gap: 6px; }
.footer-channel svg { flex-shrink: 0; }
@media (max-width: 640px) { .video-section { padding-block: 36px; } .video-play { top: 84%; width: 44px; height: 44px; } .video-play svg { width: 20px; height: 20px; margin-left: 3px; } }
@media (prefers-reduced-motion: reduce) { .video-play { transition: none; } .video-facade:hover .video-play, .video-facade:focus-visible .video-play { transform: translate(-50%, -50%); } }
