@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --bg: #fffbf5;
    --bg-soft: #fff4e6;
    --surface: #ffffff;
    --text: #1a2b3c;
    --text-muted: #5a6b7d;
    --text-soft: #8a9bab;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-soft: #eff6ff;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-soft: #fff7ed;
    --mint: #14b8a6;
    --mint-soft: #ecfdf5;
    --coral: #fb7185;
    --coral-soft: #fff1f2;
    --success: #22c55e;
    --border: #e8eef4;
    --shadow-sm: 0 2px 8px rgba(26, 43, 60, 0.06);
    --shadow: 0 12px 40px rgba(26, 43, 60, 0.08);
    --shadow-lg: 0 24px 64px rgba(26, 43, 60, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --nav-h: 68px;
    --font: 'Nunito', system-ui, sans-serif;
    --font-display: 'Fredoka', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Site Nav ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
}

.site-nav .logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.site-nav .logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-overlay {
    display: none;
}

.quick-picks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.quick-picks-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.quick-pick {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: 0.15s;
}

.quick-pick:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.section-show-more {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 16px auto 0;
}

.grid:not(.expanded) .card-more {
    display: none;
}

.tool-main-print-first .tool-header-compact {
    margin-bottom: 12px;
}

.tool-main-print-first .tool-header-compact h1 {
    margin-bottom: 6px;
}

.tool-sidebar-open {
    display: none;
    margin-top: 4px;
    font-size: 0.8125rem;
    padding: 8px 14px;
}

.nav-sidebar-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 1.125rem;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-sidebar-btn:hover {
    background: var(--bg);
}

.nav-catalog-btn {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary);
}

.tool-main-print-first .print-toolbar-primary {
    top: calc(var(--nav-h) + 4px);
    margin-bottom: 12px;
}

.print-toolbar-primary .btn-print-main {
    min-width: 7rem;
    font-size: 1rem;
    padding: 12px 20px;
}

.toolbar-more-menu {
    position: relative;
}

.toolbar-more-summary {
    list-style: none;
    cursor: pointer;
}

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

.toolbar-more-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 10rem;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 4px;
}

.toolbar-more-menu[open] .toolbar-more-panel {
    display: flex;
}

.toolbar-more-panel .btn {
    width: 100%;
    justify-content: flex-start;
}

.tool-details-panel {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.tool-details-panel summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 700;
    font-family: var(--font-display);
    list-style: none;
    user-select: none;
}

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

.tool-details-panel summary::after {
    content: '＋';
    float: right;
    color: var(--text-soft);
}

.tool-details-panel[open] summary::after {
    content: '−';
}

.tool-details-body {
    padding: 0 18px 18px;
    border-top: 1px solid var(--border);
}

.tool-details-body .desc-in-panel {
    margin: 14px 0 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.btn-compare-toggle {
    width: 100%;
    margin-top: 12px;
    justify-content: center;
}

.tool-compare-collapsed:not(.tool-compare-open) {
    display: none;
}

.tool-compare-open {
    display: block;
    margin-top: 12px;
}

/* ── Homepage Hero ── */
.hero {
    background: linear-gradient(160deg, #eff6ff 0%, #fff7ed 45%, #ecfdf5 100%);
    padding: 48px 24px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251,113,133,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 28px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.hero-tag a {
    color: inherit;
    text-decoration: none;
}

.hero-tag a:hover {
    color: var(--primary);
}

/* ── Hero v2: pain-first layout ── */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
    text-align: left;
    position: relative;
    z-index: 1;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

@media (max-width: 899px) {
    .hero-grid {
        text-align: center;
    }
    .hero-copy .hero-tags,
    .hero-cta-row {
        justify-content: center;
    }
}

.hero-copy .hero-badge {
    margin-bottom: 16px;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.hero-primary-cta {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.hero-primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--accent-hover);
    color: #fff;
}

.hero-cta-secondary {
    margin-top: 0 !important;
}

.hero-secondary-cta {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
}

.hero-secondary-cta:hover {
    text-decoration: underline;
}

.hero-visual {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.hero-mock-stack {
    position: relative;
    width: 240px;
    height: 300px;
}

.hero-mock-sheet {
    position: absolute;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
}

.sheet-back {
    inset: 24px 0 0 24px;
    background: #f8fafc;
    transform: rotate(4deg);
    opacity: 0.7;
}

.sheet-mid {
    inset: 12px 12px 12px 12px;
    background: #fff;
    transform: rotate(-2deg);
    opacity: 0.85;
}

.sheet-front {
    inset: 0 24px 24px 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mock-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    align-self: flex-start;
}

.mock-sticker {
    font-size: 3rem;
    margin-top: 24px;
}

.mock-sticker.s2 { font-size: 2rem; align-self: flex-end; margin-top: -20px; }
.mock-sticker.s3 { font-size: 1.75rem; align-self: flex-start; }

.mock-copies {
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 4px 10px;
    border-radius: 999px;
}

/* ── Homepage v3: cleaner hero & browse ── */
.hero-v3 {
    padding: 28px 24px 40px;
    background: linear-gradient(165deg, #f8fafc 0%, #eff6ff 40%, #fff7ed 100%);
    border-bottom: none;
}

.hero-shell {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-shell .hero-grid {
    order: 1;
}

.hero-shell .hero-highlights {
    order: 2;
}

.hero-shell .hero-vs-punch {
    order: 3;
}

@media (min-width: 901px) {
    .hero-shell .hero-highlights {
        order: 0;
        margin-bottom: 32px;
    }

    .hero-shell .hero-grid {
        order: 1;
    }

    .hero-shell .hero-vs-punch {
        order: 2;
        margin-top: 28px;
    }
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 920px;
    margin: 28px auto 0;
    width: 100%;
}

@media (min-width: 901px) {
    .hero-highlights {
        margin: 0 auto 0;
        max-width: none;
    }
}

.hero-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    padding: 18px 12px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.hero-highlight-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 4px;
}

.hero-highlight strong {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
}

.hero-highlight-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.hero-highlight--star {
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
    border-color: #6ee7b7;
}

.hero-highlight--star strong {
    color: #059669;
}

.hero-highlight--count {
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
    border-color: #93c5fd;
}

.hero-highlight--count strong {
    color: var(--primary);
}

.hero-v3 .hero-grid {
    max-width: 1140px;
    gap: 40px;
}

.hero-v3 h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.12;
    margin-bottom: 14px;
}

.hero-v3 h1 em {
    display: inline;
    font-style: normal;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-v3 .hero-sub {
    font-size: 1.0625rem;
    max-width: 520px;
    margin: 0 0 28px;
    line-height: 1.55;
    color: var(--text-muted);
}

.hero-v3 .hero-primary-cta {
    font-size: 1rem;
    padding: 14px 28px;
}

.hero-catalog-link {
    margin: 14px 0 0;
    font-size: 0.875rem;
}

.hero-catalog-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.hero-catalog-link a:hover {
    text-decoration: underline;
}

.hero-vs-punch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    max-width: 720px;
    margin: 20px auto 0;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8125rem;
    box-shadow: var(--shadow-sm);
}

.hero-vs-them {
    color: var(--text-soft);
    text-decoration: line-through;
    text-decoration-color: #fca5a5;
}

.hero-vs-arrow {
    color: var(--text-soft);
    font-weight: 700;
}

.hero-vs-us {
    color: var(--text);
    font-weight: 600;
}

.hero-vs-us strong {
    color: #059669;
}

@media (min-width: 901px) {
    .hero-vs-punch {
        max-width: none;
    }
}

.hero-preview-strip {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.hero-preview-sheet {
    width: 120px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: rotate(-3deg);
    transition: transform 0.2s;
}

.hero-preview-sheet--center {
    width: 140px;
    transform: rotate(0deg) translateY(-12px);
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.hero-preview-sheet:last-child {
    transform: rotate(3deg);
}

.hero-preview-sheet canvas,
.hero-preview-sheet .hy3-preview-img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-preview-sheet .hy3-preview-img,
.hero-showcase .hy3-preview-img {
    object-fit: cover;
    object-position: center top;
    border-radius: 4px;
}

@media (min-width: 901px) {
    .hero-preview-sheet {
        width: 140px;
    }

    .hero-preview-sheet--center {
        width: 168px;
        transform: rotate(0deg) translateY(-16px);
    }

    .hero-preview-strip {
        gap: 16px;
    }

    .hero-preview-strip {
        display: none;
    }

    .hero-showcase {
        display: block;
        position: relative;
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        min-height: 420px;
    }

    .hero-showcase-main-wrap {
        position: relative;
        z-index: 2;
        width: 74%;
        margin: 0 auto;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
        overflow: hidden;
        transform: rotate(-1.5deg);
    }

    .hero-showcase-main-wrap canvas,
    .hero-showcase-main-wrap .hy3-preview-img {
        display: block;
        width: 100%;
        height: auto;
    }

    .hero-showcase-mini {
        position: absolute;
        width: 34%;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 8px;
        box-shadow: var(--shadow);
        overflow: hidden;
        z-index: 3;
    }

    .hero-showcase-mini canvas,
    .hero-showcase-mini .hy3-preview-img {
        display: block;
        width: 100%;
        height: auto;
    }

    .hero-showcase-mini--tl {
        top: 4%;
        left: -2%;
        transform: rotate(-7deg);
    }

    .hero-showcase-mini--br {
        bottom: 2%;
        right: -2%;
        transform: rotate(6deg);
    }

    .hero-v3 .hero-grid {
        align-items: center;
        gap: 56px;
    }

    .hero-v3 .hero-copy {
        padding-right: 12px;
    }

    .hero-v3 h1 {
        font-size: clamp(2.5rem, 3.8vw, 3.5rem);
    }
}

.hero-showcase {
    display: none;
}

.home-categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 20px;
    position: relative;
    z-index: 2;
}

.home-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.home-cat-tile:hover,
.home-cat-tile.active {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.home-cat-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.home-cat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.home-cat-count {
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 2px;
}

.home-cat-tile:hover .home-cat-label,
.home-cat-tile.active .home-cat-label {
    color: var(--primary);
}

/* ── Audience quick links ── */
.home-audience {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto 20px;
    padding: 0 24px;
}

.home-audience-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: 0.15s;
}

.home-audience-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.section-count {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 700;
    color: var(--text-soft);
    background: var(--bg);
    padding: 2px 9px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 4px;
}

body.home .badge-grade,
body.home .badge-type-coloring,
body.home .badge-type-drawing,
body.home .badge-type-worksheet,
body.home .badge-type-craft {
    display: none;
}

body.home .grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    body.home .grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
        gap: 14px;
    }
}

@media (min-width: 901px) {
    body.home .home-catalog-main .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    body.home .home-search-panel {
        padding-left: 0;
        padding-right: 20px;
    }

    body.home .catalog-heading {
        text-align: left;
    }

    body.home .home-search-panel .search-count {
        text-align: left;
    }
}

@media (min-width: 1200px) {
    body.home .home-catalog-main .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1500px) {
    body.home .home-catalog-main .grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body.home .home-search-panel {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 640px) {
    .home-audience {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .home-audience::-webkit-scrollbar {
        display: none;
    }

    .home-audience-link {
        flex-shrink: 0;
    }
}

/* ── Homepage popular picks ── */
.home-popular {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4px 24px 20px;
    scroll-margin-top: calc(var(--nav-h) + 12px);
}

.home-popular-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.home-popular-head h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}

.home-popular-head p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.home-popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.home-pick-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.home-pick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #c7d2fe;
}

.home-pick-preview {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    padding: 12px 12px 0;
    pointer-events: none;
}

.home-pick-preview-inner {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.home-pick-preview canvas,
.home-pick-preview .hy3-preview-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-pick-preview canvas {
    border-radius: 0;
    box-shadow: none;
}

.home-pick-card--hy3 .home-pick-preview {
    background: #fff;
}

.home-pick-meta {
    padding: 12px 14px 14px;
}

.home-pick-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.home-pick-meta h3 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

@media (min-width: 641px) and (max-width: 900px) {
    .home-popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .home-popular-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 640px) {
    .home-popular-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .home-popular-grid::-webkit-scrollbar {
        display: none;
    }

    .home-pick-card {
        flex: 0 0 78%;
        max-width: 280px;
        scroll-snap-align: start;
    }

    .home-popular-head::after {
        content: 'Swipe →';
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-soft);
        margin-left: auto;
    }
}

/* ── How it works (3 steps) ── */
.home-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    max-width: 640px;
    margin: 0 auto 24px;
    padding: 0 24px;
    list-style: none;
}

.home-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
}

.home-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.home-step-text strong {
    font-weight: 700;
}

.home-step-arrow {
    color: var(--text-soft);
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 520px) {
    .home-step-arrow {
        display: none;
    }

    .home-steps {
        flex-direction: column;
        align-items: stretch;
    }

    .home-step {
        justify-content: flex-start;
    }
}

.catalog-heading {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 800;
    margin: 0 0 12px;
    text-align: center;
    scroll-margin-top: calc(var(--nav-h) + 8px);
}

.home-search-panel {
    max-width: none;
    margin: 0;
    padding: 10px 24px 12px;
    position: sticky;
    top: var(--nav-h);
    z-index: 85;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
}

body.home.scrolled-catalog .home-search-panel {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.home-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.home-search-row .search-box {
    flex: 1;
    margin: 0;
}

.home-filter-toggle {
    flex-shrink: 0;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: 0.15s;
}

.home-filter-toggle:hover,
.home-filter-toggle[aria-expanded="true"] {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.home-filters {
    margin-top: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.home-filters .filter-row {
    margin-bottom: 10px;
    padding: 0;
}

.home-filters .filter-row:last-child {
    margin-bottom: 0;
}

.home-search-panel .search-count {
    margin-top: 8px;
    text-align: left;
}

body.home .catalog-sticky-nav {
    display: none !important;
}

body.home .card-icon {
    display: none;
}

body.home .card.has-preview .card-compare {
    margin: -4px -4px 8px;
}

/* Hy3-inspired gallery: full-bleed color preview + caption chip */
body.home .card.has-preview {
    padding: 0;
    gap: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    background: #fff;
}

body.home .card.has-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #c7d2fe;
}

body.home .card.has-preview::before {
    display: none;
}

body.home .card-gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
}

body.home .card-gallery-frame {
    aspect-ratio: 1 / 1;
    background: linear-gradient(160deg, #fafafa 0%, #f1f5f9 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

body.home .card-gallery-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

body.home .card-gallery-frame canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

body.home .card-gallery-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #292524;
    letter-spacing: -0.01em;
    line-height: 1.25;
    min-height: 0;
}

body.home .card-gallery-emoji {
    font-size: 0.9375rem;
    line-height: 1;
    flex-shrink: 0;
}

body.home .card-gallery-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.home .card.has-preview > h3,
body.home .card.has-preview > .card-badges,
body.home .card.has-preview > p,
body.home .card.has-preview > .card-action {
    display: none;
}

body.home .card:not(.has-preview) p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8125rem;
}

body.home .card-action {
    display: none;
}

body.home .card-pain-hook,
body.home .badge-time {
    display: none;
}

body.home .card-badges {
    margin-bottom: -4px;
}

/* Hy3 featured gallery (from deploy-20260709) */
.home-values {
    max-width: 1100px;
    margin: 34px auto;
    padding: 0 16px;
}

.home-values-inner {
    background: linear-gradient(120deg, #ffe8f2, #e8f4ff 55%, #eaf9e8);
    border-radius: 20px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.home-values-inner h2 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    margin: 0 0 8px;
    color: #1c1917;
}

.home-values-inner p {
    color: #57534e;
    font-size: 0.9375rem;
    max-width: 640px;
    margin: 0 auto 14px;
    line-height: 1.6;
}

.home-values-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 0;
    margin: 0 0 16px;
}

.home-values-chips li {
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #292524;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
}

.home-values-cta {
    display: inline-block;
    background: #e11d48;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 0.875rem;
    margin: 4px;
}

.home-values-cta:hover {
    background: #be123c;
}

.home-values-cta--alt {
    background: #0284c7;
}

.home-values-cta--alt:hover {
    background: #0369a1;
}

.home-featured {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 16px 8px;
}

.home-featured h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    text-align: center;
    margin: 0 0 6px;
    color: #1c1917;
}

.home-featured-sub {
    text-align: center;
    color: #57534e;
    font-size: 0.9375rem;
    margin: 0 auto 22px;
    max-width: 520px;
    line-height: 1.6;
}

.home-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.home-featured-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    text-decoration: none;
    color: inherit;
}

.home-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border-color: #c7d2fe;
}

.home-featured-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.home-featured-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.home-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}

.home-featured-card:hover .home-featured-thumb img {
    transform: scale(1.04);
}

.home-featured-cap {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #292524;
    padding: 12px 10px 14px;
    line-height: 1.3;
}

.home-featured-more-wrap {
    margin-top: 20px;
}

.home-featured-more-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
    padding: 10px 16px;
    margin: 0 auto;
    width: fit-content;
    border-radius: 999px;
    background: var(--primary-soft);
    transition: background 0.15s;
}

.home-featured-more-toggle::-webkit-details-marker {
    display: none;
}

.home-featured-more-toggle::after {
    content: '▾';
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.home-featured-more-wrap[open] .home-featured-more-toggle::after {
    transform: rotate(180deg);
}

.home-featured-more-toggle:hover {
    background: #dbeafe;
}

.home-featured-more {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .home-featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .home-featured-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 14px;
        padding: 2px 2px 10px;
        scrollbar-width: none;
    }

    .home-featured-grid::-webkit-scrollbar {
        display: none;
    }

    .home-featured-card {
        flex: 0 0 min(68vw, 220px);
        scroll-snap-align: start;
    }

    .home-featured-more-wrap[open] .home-featured-more {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 14px;
        padding: 2px 2px 10px;
    }

    .home-featured-more-wrap[open] .home-featured-more .home-featured-card {
        flex: 0 0 min(68vw, 220px);
    }
}

/* Hy3 / AI color+lineart tool stage */
.ai-stage {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 640px;
    width: 100%;
}

.ai-preview-pane,
.ai-print-sheet {
    width: 100%;
}

.ai-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.ai-lineart-img {
    background: #fff;
}

/* Printable sheet: Name/Date + color guide in header, full line art below (no overlay) */
.print-sheet-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 2px 0 10px;
    border-bottom: 2px solid #1c1917;
    margin-bottom: 10px;
    font-size: 0.8125rem;
    color: #292524;
}

.print-sheet-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    flex: 1;
    min-width: 0;
}

.print-sheet-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    margin-right: 4px;
}

.print-sheet-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.print-sheet-line {
    display: inline-block;
    width: 120px;
    border-bottom: 1.5px solid #78716c;
    height: 0;
}

.print-sheet-line--short {
    width: 72px;
}

.print-sheet-art {
    position: relative;
    background: #fff;
    border: 1.5px solid #d6d3d1;
    border-radius: 4px;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.print-sheet-art .ai-lineart-img {
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    object-position: center center;
    border-radius: 0;
    padding: 4px;
    box-sizing: border-box;
    image-rendering: auto;
}

/* Color guide in header — fixed square, full image, never covers the doodle area */
.print-color-guide {
    position: static;
    flex: 0 0 104px;
    width: 104px;
    margin: 0;
    background: #fff;
    border: 2px solid #1c1917;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    z-index: auto;
    align-self: center;
}

.print-color-guide img {
    width: 100px;
    height: 100px;
    max-width: none;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #fff;
}

.print-color-guide figcaption {
    font-size: 0.58rem;
    font-weight: 700;
    text-align: center;
    padding: 2px 2px 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #44403c;
    background: #fafaf9;
    border-top: 1px solid #e7e5e4;
    line-height: 1.2;
}

.print-sheet-footer {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: #78716c;
    text-align: center;
}

@media print {
    .ai-stage {
        background: none;
        padding: 0;
        box-shadow: none;
        max-width: none;
        position: static !important;
        width: 100%;
    }

    .ai-stage,
    .ai-stage * {
        visibility: visible;
    }

    .ai-preview-pane {
        display: none !important;
    }

    .ai-print-sheet {
        display: flex !important;
        flex-direction: column;
        visibility: visible !important;
        page-break-inside: avoid;
        break-inside: avoid;
        max-height: 10.2in;
        overflow: hidden;
    }

    .print-sheet-header {
        flex-shrink: 0;
        padding-bottom: 0.1in;
        margin-bottom: 0.08in;
        align-items: center;
    }

    .print-sheet-art {
        flex: 1 1 auto;
        aspect-ratio: auto;
        border: 1pt solid #a8a29e;
        height: auto;
        min-height: 0;
        max-height: 8.75in;
        overflow: hidden;
    }

    .print-sheet-art .ai-lineart-img {
        max-height: 8.65in;
        width: 100%;
        height: auto;
        padding: 0.04in;
    }

    .print-color-guide {
        flex: 0 0 1.1in;
        width: 1.1in;
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-color-guide img {
        width: 1.05in;
        height: 1.05in;
    }

    .print-sheet-footer {
        flex-shrink: 0;
        margin: 0.06in 0 0;
        font-size: 8pt;
        page-break-before: avoid;
        break-before: avoid;
    }
}

@media print {
    .ai-color-img {
        display: none !important;
    }

    .ai-lineart-img {
        display: block !important;
    }
}

body.home .section-block {
    scroll-margin-top: calc(var(--nav-h) + 20px);
}

@media (max-width: 640px) {
    body.home .card-gallery-label {
        font-size: 0.85rem;
        padding: 10px 12px;
        gap: 6px;
    }

    body.home .card-compare {
        grid-template-columns: 1fr;
    }

    body.home .card-compare .compare-pane + .compare-pane {
        display: none;
    }

    body.home .card-compare .compare-label {
        display: none;
    }
}

.pain-section-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.pain-section-wrap > summary {
    cursor: pointer;
    list-style: none;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color 0.15s, border-color 0.15s;
}

.pain-section-wrap > summary::-webkit-details-marker {
    display: none;
}

.pain-section-wrap > summary::after {
    content: ' ▾';
    font-size: 0.85em;
}

.pain-section-wrap[open] > summary {
    color: var(--text);
    border-color: var(--primary);
    margin-bottom: 8px;
}

.pain-section-wrap[open] > summary::after {
    content: ' ▴';
}

.pain-section-wrap .pain-section {
    padding-top: 16px;
}

.pain-section-wrap .pain-section-head h2 {
    display: none;
}

.home-faq-wrap {
    max-width: 720px;
    margin: 0 auto 32px;
    padding: 0 24px;
}

.home-faq-wrap > summary {
    cursor: pointer;
    list-style: none;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color 0.15s, border-color 0.15s;
}

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

.home-faq-wrap > summary::after {
    content: ' ▾';
    font-size: 0.85em;
}

.home-faq-wrap[open] > summary {
    color: var(--text);
    border-color: var(--primary);
    margin-bottom: 12px;
}

.home-faq-wrap[open] > summary::after {
    content: ' ▴';
}

.home-faq-wrap .home-faq {
    margin: 0;
    padding: 0;
}

.home-faq-wrap .home-faq h2 {
    display: none;
}

.home-browse-fab {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 800;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.45);
    transition: transform 0.15s, opacity 0.2s, bottom 0.2s;
}

body.pk-cookie-visible .home-browse-fab {
    bottom: calc(var(--cookie-bar-h, 72px) + 12px + env(safe-area-inset-bottom, 0px));
}

.home-browse-fab:hover {
    transform: translateX(-50%) translateY(-2px);
}

@media (min-width: 901px) {
    .home-browse-fab {
        display: none !important;
    }
}

body.home .trust-bar {
    display: none;
}

@media (max-width: 768px) {
    .hero-v3 {
        padding: 16px 16px 28px;
    }

    .hero-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 24px;
    }

    .hero-highlight {
        padding: 14px 10px 12px;
    }

    .hero-vs-punch {
        margin-top: 16px;
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
        padding: 10px 14px;
        text-align: center;
        justify-content: center;
    }

    .hero-vs-them {
        display: block;
        width: 100%;
    }

    .hero-vs-arrow {
        display: none;
    }

    .hero-vs-us {
        display: block;
        width: 100%;
    }

    .hero-v3 .hero-grid {
        text-align: center;
    }

    .hero-v3 .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-v3 .hero-cta-row {
        justify-content: center;
    }

    .hero-preview-strip {
        margin-top: 8px;
    }

    .hero-preview-sheet {
        width: 96px;
    }

    .hero-preview-sheet--center {
        width: 112px;
    }

    .home-categories {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 0;
        padding-bottom: 20px;
    }
}

@media (max-width: 420px) {
    .home-categories {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .home-cat-tile {
        padding: 10px 6px;
    }

    .home-cat-icon {
        font-size: 1.25rem;
    }
}

@media (min-width: 901px) {
    .hero-v3 .hero-copy .hero-cta-row {
        justify-content: flex-start;
    }
}

/* ── Pain scenarios ── */
.pain-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 32px;
}

.pain-section-head {
    text-align: center;
    margin-bottom: 24px;
}

.pain-section-head h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.pain-section-head p {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.scenario-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: 0.15s;
    font-family: inherit;
    text-decoration: none;
    color: inherit;
}

.scenario-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.scenario-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.scenario-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.scenario-pain {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.main-content.scenario-highlight {
    animation: pk-flash 0.8s ease;
}

@keyframes pk-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

/* ── Homepage stats bar & pillars ── */
.home-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 960px;
    margin: -12px auto 0;
    padding: 0 24px 32px;
    position: relative;
    z-index: 1;
}

.home-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.home-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--primary);
    line-height: 1.2;
}

.home-stat span {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.home-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto 8px;
    padding: 0 24px 24px;
}

.pillar-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 20px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.pillar-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pillar-coloring { border-top: 4px solid var(--coral); }
.pillar-worksheets { border-top: 4px solid var(--primary); }
.pillar-learn { border-top: 4px solid #22c55e; }

.pillar-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.pillar-card h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 0;
}

.pillar-card p {
    flex: 1;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pillar-link {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
}

.home-faq {
    max-width: 720px;
    margin: 48px auto 32px;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .home-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-pillars {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .home-stats-bar {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Vs competitors ── */
.vs-section {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 32px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.vs-section h2 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.vs-section-compact {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 0 24px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.vs-section-compact > summary {
    cursor: pointer;
    list-style: none;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color 0.15s, border-color 0.15s;
}

.vs-section-compact > summary::-webkit-details-marker {
    display: none;
}

.vs-section-compact > summary::after {
    content: ' ▾';
    font-size: 0.85em;
}

.vs-section-compact[open] > summary {
    color: var(--text);
    border-color: var(--primary);
    margin-bottom: 16px;
}

.vs-section-compact[open] > summary::after {
    content: ' ▴';
}

.vs-section-compact .vs-grid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.vs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.vs-col {
    padding: 16px;
    border-radius: var(--radius-sm);
}

.vs-them {
    background: #f8fafc;
}

.vs-us {
    background: linear-gradient(135deg, #eff6ff, #ecfdf5);
    border: 1px solid #bfdbfe;
}

.vs-col h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.vs-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.7;
}

.vs-them li::before {
    content: '✗ ';
    color: #94a3b8;
}

.vs-us li::before {
    content: '✓ ';
    color: var(--success);
}

.card-pain-hook {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin: -4px 0 0;
}

.badge-time {
    background: #fef3c7;
    color: #92400e;
}

.how-to-trust {
    flex-basis: 100%;
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 4px;
}

/* ── Search ── */
.search-wrap {
    max-width: 520px;
    margin: 32px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 4px 4px 18px;
    box-shadow: var(--shadow);
    transition: 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12), var(--shadow);
}

.search-box svg {
    flex-shrink: 0;
    color: var(--text-soft);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font: inherit;
    font-size: 1rem;
    padding: 12px 14px;
    background: transparent;
    color: var(--text);
}

.search-box input::placeholder {
    color: var(--text-soft);
}

.search-count {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-soft);
    font-weight: 600;
    margin-top: 10px;
    min-height: 1.2em;
}

/* ── Homepage sticky catalog nav ── */
.catalog-sticky-nav {
    --catalog-nav-h: 52px;
    position: sticky;
    top: var(--nav-h);
    z-index: 90;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 8px 24px 10px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.catalog-sticky-nav::-webkit-scrollbar {
    display: none;
}

.catalog-nav-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.catalog-nav-link:hover {
    border-color: var(--primary);
    color: var(--text);
}

.catalog-nav-link.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.catalog-nav-count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-soft);
    background: var(--bg);
    padding: 2px 7px;
    border-radius: 999px;
}

.catalog-nav-link.active .catalog-nav-count {
    color: var(--primary);
    background: #fff;
}

@media (max-width: 640px) {
    .catalog-sticky-nav {
        margin-top: 12px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .catalog-nav-link {
        padding: 7px 12px;
        font-size: 0.75rem;
    }
}

/* ── Homepage catalog sidebar ── */
.home-catalog-wrap {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-areas:
        "search search"
        "sidebar main";
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
    gap: 0 20px;
}

.home-search-panel {
    grid-area: search;
}

.home-sidebar,
#homeSidebar {
    grid-area: sidebar;
}

.home-catalog-main {
    grid-area: main;
    min-width: 0;
}

.home-sidebar {
    margin-top: 20px;
    position: sticky;
    top: calc(var(--nav-h) + 8px);
    height: calc(100vh - var(--nav-h) - 24px);
    align-self: start;
}

.home-catalog-main .main-content {
    max-width: none;
    margin: 0;
}

.sidebar-cat {
    border: none;
    margin: 0;
    padding: 0;
}

.sidebar-cat-label {
    cursor: pointer;
    list-style: none;
    padding: 2px 4px;
}

.sidebar-cat-label::-webkit-details-marker {
    display: none;
}

.sidebar-cat-anchor {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.sidebar-cat-anchor:hover {
    background: var(--bg);
}

.sidebar-count-inline {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-soft);
    background: var(--bg);
    padding: 2px 7px;
    border-radius: 999px;
}

.sidebar-cat-body {
    padding: 2px 0 8px 8px;
}

.sidebar-cat-empty {
    display: none;
}

body.has-home-sidebar .section-block {
    scroll-margin-top: calc(var(--nav-h) + 16px);
}

@media (min-width: 901px) {
    body.has-home-sidebar .home-catalog-main > .catalog-sticky-nav {
        display: none;
    }
}

@media (max-width: 900px) {
    .home-catalog-wrap {
        grid-template-columns: 1fr;
        grid-template-areas:
            "search"
            "main";
        gap: 0;
    }

    .home-sidebar,
    #homeSidebar {
        grid-area: unset;
    }

    .home-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 88vw;
        z-index: 160;
        transform: translateX(-100%);
        transition: transform 0.25s;
        height: 100vh;
        margin-top: 0;
        padding-top: calc(var(--nav-h) + 16px);
        box-shadow: var(--shadow-lg);
    }

    .home-sidebar.open {
        transform: translateX(0);
    }

    .home-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        z-index: 920;
    }

    body.has-home-sidebar .nav-sidebar-btn {
        display: inline-flex;
    }
}

/* ── Main Content ── */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.section-block {
    margin-bottom: 48px;
    scroll-margin-top: calc(var(--nav-h) + var(--catalog-nav-h, 52px) + 12px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
}

.section-icon.boys { background: #dbeafe; }
.section-icon.girls { background: #fce7f3; }
.section-icon.animals { background: #fef3c7; }
.section-icon.homeschool { background: #d1fae5; }
.section-icon.chinese { background: #fee2e2; }
.section-icon.craft { background: #fef3c7; }

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
}

.section-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #c7d2fe;
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.card-action {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card.hidden {
    display: none;
}

.card.has-preview .card-icon {
    display: none;
}

.card.has-preview .card-compare {
    margin-bottom: 4px;
}

.card.has-preview .compare-frame {
    min-height: 168px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.card.has-preview .compare-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}

/* ── 2-minute lesson plan (tool pages) ── */
.lesson-plan-panel {
    background: linear-gradient(135deg, #fefce8, #fff7ed);
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.lesson-plan-panel h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 6px;
}

.lesson-plan-intro {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.lesson-plan-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.55;
}

.lesson-plan-list li {
    margin-bottom: 8px;
}

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

/* ── Scenario landing pages (/for/) ── */
.for-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.for-main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    width: 100%;
}

.for-hero {
    text-align: center;
    margin-bottom: 40px;
}

.for-hero-split {
    display: grid;
    grid-template-columns: 1fr min(280px, 38%);
    gap: 28px 32px;
    align-items: center;
    text-align: left;
    margin-bottom: 40px;
}

.for-hero-split.for-hero-single,
.for-hero.for-hero-single {
    grid-template-columns: 1fr;
    text-align: center;
}

.for-hero-split .for-sub,
.for-hero-split .for-pain-list {
    margin-left: 0;
    margin-right: 0;
}

.for-hero-split .for-pain-list {
    max-width: none;
}

.for-hero-preview {
    text-align: center;
}

.for-preview-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 8px;
}

.for-preview-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-sm);
    line-height: 0;
}

.for-preview-frame canvas {
    width: 100%;
    height: auto;
    display: block;
}

.for-preview-caption {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 720px) {
    .for-hero-split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .for-hero-split .for-pain-list {
        margin-left: auto;
        margin-right: auto;
    }

    .for-hero-preview {
        order: -1;
        max-width: 220px;
        margin: 0 auto;
    }
}

.for-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.for-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 8px;
}

.for-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 12px;
}

.for-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 20px;
    line-height: 1.55;
}

.for-pain-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 24px;
    max-width: 480px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
}

.for-pain-list li {
    padding: 6px 0 6px 24px;
    position: relative;
}

.for-pain-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.for-primary-cta {
    display: inline-block;
    margin-top: 8px;
}

.for-steps {
    margin-bottom: 40px;
}

.for-steps h2,
.for-featured h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 16px;
    text-align: center;
}

.for-steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.for-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.for-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.for-steps li strong {
    display: block;
    margin-bottom: 4px;
}

.for-steps li p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.for-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.for-featured-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: 0.15s;
}

.for-featured-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.for-featured-preview {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    background: #fff;
    line-height: 0;
}

.for-featured-preview canvas {
    width: 100%;
    height: auto;
    display: block;
}

.for-featured-card h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.for-featured-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    flex: 1;
    margin-bottom: 10px;
}

.for-featured-cta {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}

.for-back {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.for-back a {
    color: var(--primary);
    font-weight: 600;
}

.for-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.for-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.for-compliance-note {
    margin: 32px 0 0;
    padding: 14px 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text);
}

.for-compliance-note p {
    margin: 0;
}

.for-related {
    margin-top: 40px;
}

.for-related h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 14px;
    text-align: center;
}

.for-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.for-related-card {
    display: block;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.15s;
}

.for-related-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.for-state-picker {
    margin: -16px 0 32px;
    text-align: center;
}

.for-state-picker h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 12px;
}

.for-state-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.for-state-btn {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.15s;
}

.for-state-btn:hover {
    border-color: var(--primary);
}

.for-state-btn.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.for-breadcrumb span {
    margin: 0 6px;
    opacity: 0.5;
}

.for-studio-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-sm);
}

.for-studio-strip strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.for-studio-strip p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.for-pack-promo {
    padding: 14px 18px;
    margin: 0 0 28px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.for-pack-promo p {
    margin: 0;
}

.for-pack-promo strong {
    color: var(--text);
}

.for-featured-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.for-studio-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    padding-left: 4px;
}

.for-studio-link:hover {
    text-decoration: underline;
}

.for-hub .for-hero {
    margin-bottom: 28px;
}

.for-seasonal-spotlight {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.for-seasonal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.for-seasonal-chip:hover {
    background: #ffedd5;
    border-color: #fdba74;
    text-decoration: none;
}

.for-faq {
    margin-top: 48px;
    margin-bottom: 24px;
}

.for-faq h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 16px;
    text-align: center;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 16px;
    list-style: none;
}

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

.faq-item summary::after {
    content: '+';
    float: right;
    font-weight: 700;
    color: var(--primary);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tool-faq-panel {
    margin-top: 20px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.tool-faq-panel h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin: 0 0 12px;
}

.studio-scenario-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    background: linear-gradient(90deg, #eff6ff, #ecfdf5);
    border-bottom: 1px solid #bfdbfe;
}

.studio-scenario-emoji {
    font-size: 1.5rem;
}

.studio-scenario-text {
    flex: 1;
    min-width: 180px;
}

.studio-scenario-text strong {
    display: block;
    font-size: 0.9rem;
}

.studio-scenario-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.studio-scenario-back {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

.studio-scenario-back:hover {
    text-decoration: underline;
}
.card-preview,
.card-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.card-gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-gallery-frame {
    width: 100%;
    overflow: hidden;
}

.card-gallery-frame canvas {
    width: 100%;
    height: auto;
    display: block;
}

.compare-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.card-preview-loading,
.card-compare-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: var(--text-soft);
}

.how-to-print {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--mint-soft);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: #0f766e;
}

.how-to-print strong {
    font-family: var(--font-display);
    margin-right: 4px;
}

.paper-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: #1e40af;
}

.paper-hint.hidden {
    display: none;
}

.paper-hint-dismiss {
    flex-shrink: 0;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 0 4px;
}

.mobile-print-bar {
    display: none;
}

.canvas-loading canvas {
    opacity: 0.3;
}

.canvas-loading::after {
    content: 'Loading template…';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    pointer-events: none;
}

.card-preview,
.card-compare {
    margin-bottom: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px;
    border: 1px solid var(--border);
    pointer-events: none;
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.preview-actions .btn.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary);
}

.preview-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.tool-compare {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.compare-header {
    margin-bottom: 16px;
}

.compare-header h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.compare-header p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.tool-compare .compare-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.compare-pane {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.compare-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
}

.compare-label.blank {
    background: #f1f5f9;
    color: var(--text-muted);
}

.compare-label.example {
    background: #fef3c7;
    color: #b45309;
}

.compare-frame {
    background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
    border-radius: 8px;
    padding: 8px;
    line-height: 0;
    overflow: hidden;
}

.compare-frame canvas,
.card-compare canvas {
    width: 100%;
    height: auto;
    display: block;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.compare-arrow {
    color: var(--text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.print-stage-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 20px 0 10px;
    text-align: center;
}

.card .card-icon {
    display: none;
}

.card h3 {
    margin-top: 0;
}

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

    .compare-arrow {
        transform: rotate(90deg);
    }
}

/* ── Trust bar ── */
.trust-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: center;
    margin-top: 16px;
}

.trust-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.trust-item span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-copy {
    margin: 0 0 10px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
}

.footer-legal a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-legal a:hover {
    text-decoration: underline;
}

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

/* ══════════════════════════════════════
   TOOL PAGES
   ══════════════════════════════════════ */
.tool-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tool-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 0;
}

.tool-sidebar {
    border-right: 1px solid var(--border);
    background: var(--surface);
    padding: 20px 14px 24px;
    position: sticky;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-head {
    padding: 0 8px 4px;
}

.sidebar-head h3 {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--text);
}

.sidebar-count {
    display: block;
    font-size: 0.75rem;
    color: var(--text-soft);
    margin-top: 2px;
}

.sidebar-search-wrap {
    display: block;
    padding: 0 4px;
}

.sidebar-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    background: var(--bg);
}

.sidebar-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-group {
    border: none;
    margin: 0;
    padding: 0;
}

.sidebar-group-label {
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    padding: 4px 10px 6px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.sidebar-group-label::before {
    content: '▸';
    font-size: 0.625rem;
    transition: transform 0.15s ease;
}

.sidebar-group[open] > .sidebar-group-label::before {
    transform: rotate(90deg);
}

.sidebar-group-label::-webkit-details-marker {
    display: none;
}

.sidebar-group-links,
.sidebar-group-flat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-group-empty {
    display: none;
}

.sidebar-all-link {
    display: block;
    padding: 10px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.sidebar-all-link:hover {
    text-decoration: underline;
}

.sidebar-all-link-secondary {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
    font-weight: 500;
    color: var(--text-soft);
}

.hub-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
}

.hub-layout .for-main,
.hub-layout .teachers-hub-main {
    max-width: none;
    margin: 0;
    min-width: 0;
}

.hub-sidebar {
    position: sticky;
    top: var(--nav-h);
}

.teachers-hub-main {
    min-width: 0;
}

.sidebar-fallback {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 0 8px;
    line-height: 1.5;
}

.sidebar-fallback a {
    color: var(--primary);
}

.tool-sidebar h3 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    padding: 0 12px;
    margin-bottom: 8px;
}

.tool-sidebar a,
.sidebar-link {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.15s;
    line-height: 1.35;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tool-sidebar a.hidden,
.sidebar-link.hidden {
    display: none;
}

.tool-sidebar a:hover,
.sidebar-link:hover {
    background: var(--bg);
    color: var(--text);
}

.tool-sidebar a.current,
.sidebar-link.current {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tool-main {
    padding: 32px 32px 48px;
    min-width: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-soft);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb > span:last-child {
    color: var(--text);
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.tool-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.tool-header .desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.6;
}

/* Print toolbar */
.print-toolbar {
    position: sticky;
    top: var(--nav-h);
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 24px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    margin-right: 4px;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    margin: 0 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-ghost {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: #c7d2fe;
}

.btn-ghost.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn-accent:hover {
    background: #d97706;
}

.custom-input,
.custom-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: 0.15s;
}

.custom-input:focus,
.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Paper preview */
.paper-stage {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: var(--radius);
    padding: 32px 24px;
    display: flex;
    justify-content: center;
}

#canvas-wrap {
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    max-width: 640px;
    width: 100%;
    line-height: 0;
    position: relative;
}

#canvas-wrap::before {
    content: 'Preview';
    position: absolute;
    top: -28px;
    left: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
}

canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.tool-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--accent-soft);
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 20px;
    font-size: 0.875rem;
    color: #92400e;
}

.tool-tip-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

/* Keep menu FAB off the color guide + print sheet */
body.ai-print-view .sidebar-toggle {
    bottom: 96px;
    right: 12px;
}

body.ai-print-view .mobile-print-bar {
    z-index: 210;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text);
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Legacy class compat — hidden after JS enhancement */
.legacy-toolbar { display: none; }

@media (max-width: 900px) {
    .tool-layout,
    .hub-layout {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 160;
        transform: translateX(-100%);
        transition: transform 0.25s;
        height: 100vh;
        padding-top: calc(var(--nav-h) + 16px);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tool-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 155;
        cursor: pointer;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        z-index: 920;
    }

    .nav-sidebar-btn,
    .tool-sidebar-open {
        display: inline-flex;
    }

    .site-nav {
        gap: 8px;
    }

    .tool-main {
        padding: 20px 16px 80px;
    }

    .print-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group {
        flex-wrap: wrap;
    }

    .print-toolbar-primary .btn-secondary-action {
        display: none;
    }

    .print-toolbar-primary .toolbar-more-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
    }

    .print-toolbar-primary .btn-print-main {
        flex: 1;
        min-height: 48px;
    }

    .print-toolbar-primary .toolbar-primary-actions {
        width: 100%;
    }

    .toolbar-divider {
        display: none;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        z-index: 120;
        overflow-y: auto;
    }

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

    .nav-links a {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-overlay:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--nav-h);
        background: rgba(15, 23, 42, 0.35);
        z-index: 110;
    }

    body.nav-open {
        overflow: hidden;
    }

    .mobile-print-bar,
    .studio-mobile-print-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        gap: 10px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(8px);
    }

    .mobile-print-bar .btn {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }

    body.tool-page.pk-cookie-visible .mobile-print-bar {
        bottom: var(--cookie-bar-h, 72px);
    }

    body.tool-page.pk-cookie-visible {
        padding-bottom: 0;
    }

    body.tool-page.pk-cookie-visible .tool-main {
        padding-bottom: calc(80px + var(--cookie-bar-h, 72px) + env(safe-area-inset-bottom, 0px));
    }
}

@media print {
    .site-nav,
    .tool-sidebar,
    .print-toolbar,
    .tool-header,
    .breadcrumb,
    .tool-compare,
    .print-stage-label,
    .tool-tip,
    .how-to-print,
    .paper-hint,
    .mobile-print-bar,
    .studio-mobile-print-bar,
    .lesson-plan-panel,
    .tool-faq-panel,
    .tool-details-panel,
    .btn-compare-toggle,
    .sidebar-toggle,
    .site-footer,
    .sidebar-overlay,
    .educator-panel,
    .tool-meta-bar,
    .skill-tags {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .tool-layout,
    .tool-main {
        display: block;
        padding: 0;
        margin: 0;
    }

    .paper-stage {
        background: none;
        padding: 0;
    }

    .ai-stage {
        background: none;
        padding: 0;
        box-shadow: none;
        max-width: none;
    }

    #canvas-wrap {
        box-shadow: none;
        max-width: none;
    }

    #canvas-wrap::before {
        display: none;
    }

    body * {
        visibility: hidden;
    }

    .ai-preview-pane {
        display: none !important;
    }

    .ai-print-sheet {
        display: block !important;
        visibility: visible !important;
    }

    .ai-print-sheet,
    .ai-print-sheet * {
        visibility: visible !important;
    }

    #canvas-wrap,
    #canvas-wrap *,
    .ai-stage,
    .ai-stage * {
        visibility: visible;
    }

    #canvas-wrap,
    .ai-stage {
        position: static !important;
        left: auto;
        top: auto;
        width: 100%;
    }

    canvas {
        border: none;
    }

    .ai-color-img {
        display: none !important;
    }

    .ai-lineart-img {
        display: block !important;
        visibility: visible !important;
    }

    .print-color-guide {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.tool-page .container,
    body.tool-page .tool-layout,
    body.tool-page .tool-main {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    @page {
        size: letter;
        margin: 0.35in;
    }
}

/* ── Audience & Age (US/EU parent + teacher UX) ── */
.audience-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto 32px;
    padding: 0 24px;
}

.audience-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

.audience-card.parents { border-top: 4px solid var(--coral); }
.audience-card.teachers { border-top: 4px solid var(--primary); }

.audience-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audience-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.audience-card ul {
    margin-top: 10px;
    padding-left: 18px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.age-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 720px;
    margin: 0 auto 28px;
    padding: 0 24px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    max-width: 960px;
    margin: 0 auto 10px;
    padding: 0 24px;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    min-width: 42px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-chip,
.age-chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.15s;
    font-family: var(--font);
}

.age-chip:hover,
.age-chip.active,
.filter-chip:hover,
.filter-chip.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.audience-card-link {
    margin: 12px 0 0;
    font-size: 0.85rem;
}

.audience-card-link a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 720px) {
    .audience-bar {
        grid-template-columns: 1fr;
    }

    .filter-row {
        padding: 0 16px;
    }

    .filter-label {
        width: 100%;
    }
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-age { background: var(--mint-soft); color: #0d9488; }
.badge-grade { background: var(--primary-soft); color: var(--primary); }
.badge-type-drawing { background: var(--coral-soft); color: #e11d48; }
.badge-type-coloring { background: #dcfce7; color: #15803d; }
.badge-type-worksheet { background: var(--accent-soft); color: #c2410c; }
.badge-type-craft { background: #f3e8ff; color: #7c3aed; }

/* Educator guidance on tool pages */
.educator-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.educator-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
}

.educator-box.parent { border-left: 4px solid var(--coral); }
.educator-box.teacher { border-left: 4px solid var(--primary); }

.educator-box h4 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    margin-bottom: 6px;
}

.educator-box p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.skill-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--bg-soft);
    border-radius: 999px;
    color: var(--text-muted);
}

.tool-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.use-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.use-pill {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 4px 10px;
    background: var(--mint-soft);
    color: #0f766e;
    border-radius: 999px;
}

@media (max-width: 700px) {
    .audience-bar,
    .educator-panel {
        grid-template-columns: 1fr;
    }
}

@media print {
    .educator-panel,
    .tool-meta-bar,
    .use-list {
        display: none !important;
    }
}

/* ── Print Studio ── */
.hidden { display: none !important; }

.hero-studio-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.hero-studio-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-pricing-note {
    margin-top: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-pricing-note a {
    color: var(--primary);
    font-weight: 600;
}

.studio-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.studio-value-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    padding: 10px 24px;
    background: linear-gradient(165deg, #f8fafc 0%, #eff6ff 55%, #fff7ed 100%);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.studio-value-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.studio-header {
    padding: 14px 24px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.studio-header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.studio-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.studio-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}

.studio-toolbar-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.studio-toolbar-primary .btn-accent {
    min-width: 120px;
}

.studio-toolbar-settings-wrap {
    display: contents;
}

.studio-toolbar-settings-summary {
    display: none;
}

.studio-toolbar-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.studio-toolbar-divider {
    display: block;
}

.studio-copies {
    align-items: center;
    gap: 4px;
}

.copies-num {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.copies-input {
    width: 48px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.btn-icon {
    min-width: 36px;
    padding: 8px 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.studio-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 1fr 220px;
    gap: 0;
    min-height: 0;
}

.studio-panel {
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.studio-inspector {
    border-right: none;
    border-left: 1px solid var(--border);
    padding: 16px;
}

.studio-panel-head {
    padding: 12px 12px 8px;
}

.studio-panel-head h2,
.studio-inspector h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 8px;
}

.studio-panel-head input[type="search"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}

.studio-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 0 8px 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.studio-tabs::-webkit-scrollbar {
    display: none;
}

.studio-tab {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.studio-tab.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.studio-abby-banner {
    margin: 0 8px 8px;
    padding: 8px 10px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.studio-abby-banner a {
    font-weight: 600;
}

.studio-asset-grid {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    align-content: start;
}

.studio-asset {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    background: linear-gradient(145deg, #fff8eb 0%, #fff0f5 50%, #eef6ff 100%);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.studio-asset:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.studio-asset canvas,
.studio-asset-canvas {
    width: 64px;
    height: 64px;
    display: block;
    pointer-events: none;
    border-radius: 4px;
}

.studio-asset img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
}

.studio-asset span {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.studio-hint {
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--text-soft);
    border-top: 1px solid var(--border);
}

.studio-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: #eef2f7;
    overflow: auto;
}

.studio-edit-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
    margin-right: 4px;
    border-right: 1px solid var(--border);
}

.studio-edit-group .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-danger-text {
    color: var(--coral);
}

.btn-danger-text:hover:not(:disabled) {
    background: var(--coral-soft);
    border-color: var(--coral);
}

.studio-pair-toggle.active {
    color: var(--primary);
    font-weight: 700;
}

.studio-canvas-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 840px;
}

.studio-check {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.studio-header-copy {
    min-width: 0;
}

.studio-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 420px;
    line-height: 1.45;
    margin-top: 4px;
}

.studio-quickstarts-wrap {
    width: 100%;
    max-width: 840px;
    margin-bottom: 12px;
}

.studio-quickstarts-details {
    border: none;
    margin: 0;
    padding: 0;
}

.studio-quickstarts-summary {
    display: none;
    list-style: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    padding: 10px 14px;
    background: var(--primary-soft);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
}

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

.studio-quickstarts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    border: 1px solid #bfdbfe;
}

.qs-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: 4px;
}

.qs-btn {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    transition: 0.15s;
}

.qs-btn:hover {
    border-color: var(--primary);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.studio-canvas-wrap {
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    line-height: 0;
    position: relative;
}

.studio-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 12px,
        rgba(59, 130, 246, 0.03) 12px,
        rgba(59, 130, 246, 0.03) 24px
    );
    border: 2px dashed #cbd5e1;
    border-radius: 4px;
    margin: 12px;
}

.studio-empty.hidden {
    display: none;
}

.studio-empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.studio-empty p:last-child {
    font-size: 0.85rem;
    color: var(--text-soft);
    text-align: center;
    max-width: 280px;
    line-height: 1.4;
}

.studio-canvas-wrap.has-items .studio-empty {
    display: none;
}

.studio-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

.inspector-empty {
    color: var(--text-soft);
    font-size: 0.9rem;
    padding: 12px 0;
}

.inspector-name {
    font-weight: 700;
    text-transform: capitalize;
    margin-bottom: 12px;
}

.studio-field {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.studio-field input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

.studio-text-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    font-size: 0.95rem;
}

.inspector-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.studio-classnames {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.studio-classnames h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.studio-classnames-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 8px;
}

.studio-classnames-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 88px;
}

.studio-classnames-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.studio-classnames-count {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.studio-footer {
    margin-top: auto;
}

.studio-link-btn {
    text-decoration: none;
}

.studio-print-stack {
    display: none;
}

@media print {
    body.studio-page .site-nav,
    body.studio-page .studio-header,
    body.studio-page .studio-shell,
    body.studio-page .studio-footer,
    body.studio-page .site-footer,
    body.studio-page #pk-toast {
        display: none !important;
    }

    body.studio-page .studio-print-stack {
        display: block !important;
    }

    body.studio-page .studio-print-page {
        page-break-after: always;
    }

    body.studio-page .studio-print-page:last-child {
        page-break-after: auto;
    }

    body.studio-page .studio-print-page canvas {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 960px) {
    .studio-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .studio-library {
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .studio-asset-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .studio-inspector {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

/* ── Plan / pricing ── */
.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 8px;
}

.plan-badge-free {
    background: var(--cream);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.plan-badge-free span {
    color: var(--primary);
}

.plan-badge-plus {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
}

.studio-plan-badge-wrap {
    display: inline-flex;
    align-items: center;
}

.studio-asset.locked {
    opacity: 0.72;
    cursor: pointer;
    position: relative;
}

.studio-asset.locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    pointer-events: none;
}

.studio-asset-lock {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.85rem;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.studio-pair-toggle.plan-gated {
    opacity: 0.65;
}

.pk-upgrade-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pk-upgrade-modal.open {
    display: flex;
}

.pk-upgrade-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.pk-upgrade-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.pk-upgrade-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.pk-upgrade-card h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.pk-upgrade-reason {
    color: var(--text-muted);
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.pk-upgrade-features {
    margin: 0 0 20px;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.pk-upgrade-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pricing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pricing-hero {
    text-align: center;
    padding: 48px 24px 24px;
    max-width: 640px;
    margin: 0 auto;
}

.pricing-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin-bottom: 12px;
}

.pricing-hero p {
    color: var(--text-muted);
    line-height: 1.6;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px;
}

.pricing-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card-featured {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0 16px;
}

.pricing-price span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    flex: 1;
    margin: 0 0 20px;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.pricing-cta {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.pricing-redeem {
    max-width: 520px;
    margin: 32px auto;
    padding: 0 24px;
    text-align: center;
}

.license-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.license-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

.license-status {
    margin-top: 12px;
    color: var(--primary);
    font-weight: 600;
    min-height: 1.4em;
}

.pricing-scaffold-note {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #92400e;
    background: #fef3c7;
    border-radius: 8px;
    line-height: 1.45;
}

.pricing-architecture {
    max-width: 900px;
    margin: 48px auto 64px;
    padding: 0 24px;
}

.pricing-architecture h2 {
    text-align: center;
    margin-bottom: 24px;
}

.arch-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.arch-step {
    background: var(--cream);
    border-radius: 12px;
    padding: 20px;
}

.arch-num {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.arch-step h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.arch-step p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pricing-bundle-dl {
    max-width: 520px;
    margin: 0 auto 40px;
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
}

.pricing-bundle-dl.hidden {
    display: none;
}

.pricing-bundle-dl h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.pricing-bundle-dl p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 16px;
    line-height: 1.5;
}
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.license-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.5;
}

.pricing-faq {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 24px;
}

.pricing-faq h2 {
    text-align: center;
    margin-bottom: 20px;
}

.faq-list {
    margin: 0;
}

.faq-list > div {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.faq-list > div:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-list dt {
    font-weight: 700;
    margin-bottom: 6px;
}

.faq-list dd {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.faq-list a {
    color: var(--primary);
}

/* ── Legal pages ── */
.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-main {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.legal-main h1 {
    font-family: var(--font-display);
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.legal-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.legal-main h2 {
    font-size: 1.1rem;
    margin: 28px 0 10px;
}

.legal-main h3 {
    font-size: 1rem;
    margin: 16px 0 8px;
    color: var(--text-soft);
}

.legal-main p,
.legal-main li {
    line-height: 1.65;
    color: var(--text);
}

.legal-main ul {
    padding-left: 1.25rem;
    margin-bottom: 16px;
}

.legal-main a {
    color: var(--primary);
}

.legal-main code {
    font-size: 0.85em;
    background: var(--cream);
    padding: 2px 6px;
    border-radius: 4px;
}

.error-main {
    text-align: center;
    max-width: 520px;
}

.error-icon {
    font-size: 3rem;
    margin: 0 0 0.5rem;
    line-height: 1;
}

.error-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 1.5rem;
}

.error-cta-row .hero-primary-cta {
    font-size: 0.9375rem;
    padding: 12px 22px;
}

@media (min-width: 769px) {
    .studio-mobile-print-bar {
        display: none !important;
    }
}

/* ── Cookie consent bar ── */
body.pk-cookie-visible {
    padding-bottom: var(--cookie-bar-h, 72px);
}

.pk-cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    padding: 14px 20px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.85rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

@media (max-width: 640px) {
    .pk-cookie-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        font-size: 0.8125rem;
    }

    .pk-cookie-bar p {
        max-width: none;
        line-height: 1.4;
    }

    .pk-cookie-actions {
        justify-content: stretch;
    }

    .pk-cookie-actions .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
}

.pk-cookie-bar p {
    margin: 0;
    max-width: 520px;
    line-height: 1.5;
}

.pk-cookie-bar a {
    color: #93c5fd;
}

.pk-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pk-upgrade-legal {
    margin: 14px 0 0;
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-muted);
}

.pk-upgrade-legal a {
    color: var(--primary);
}

/* ── Teachers landing ── */
.teachers-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.teachers-page .hub-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px 0;
    width: 100%;
}

.teachers-page .hub-sidebar {
    top: calc(var(--nav-h) + 8px);
    max-height: calc(100vh - var(--nav-h) - 24px);
    overflow-y: auto;
}

@media (max-width: 900px) {
    .teachers-page .hub-layout {
        padding-left: 0;
        padding-right: 0;
    }
}

.teachers-hero {
    text-align: center;
    padding: 48px 24px 32px;
    max-width: 720px;
    margin: 0 auto;
}

.teachers-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: 16px;
}

.teachers-hero h1 em {
    font-style: normal;
}

.teachers-sub {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.teachers-stats {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 20px;
}

.teachers-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.teachers-vs {
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.teachers-tools,
.teachers-packs,
.teachers-situations,
.teachers-license {
    max-width: 960px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.teachers-tools h2,
.teachers-packs h2,
.teachers-situations h2,
.teachers-license h2,
.for-hub-section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 16px;
    text-align: center;
}

.teachers-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.teachers-tool-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: 0.15s;
}

.teachers-tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.teachers-tool-icon {
    font-size: 1.5rem;
}

.teachers-tool-card h3 {
    font-size: 0.95rem;
    font-family: var(--font-display);
}

.teachers-tool-card p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.teachers-packs-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 20px;
}

.teachers-packs-head p,
.pricing-packs-head p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.pricing-packs {
    max-width: 1080px;
    margin: 0 auto 32px;
    padding: 0 24px;
}

.pricing-packs-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 20px;
}

.pricing-packs-head h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.pricing-packs-grid {
    padding-top: 0;
}

.pricing-pack-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: -8px 0 12px;
    line-height: 1.45;
}

.teachers-pack-note,
.teachers-more {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.teachers-license-list {
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 0.9rem;
}

.for-hub-section-title {
    text-align: left;
    max-width: 960px;
    margin: 32px auto 12px;
    padding: 0 24px;
}

.for-hub .for-main {
    max-width: 100%;
}

.for-hub .scenario-grid {
    max-width: 960px;
    margin: 0 auto 8px;
    padding: 0 24px;
}

.for-hub-compliance-intro {
    max-width: 960px;
    margin: -4px auto 12px;
    padding: 0 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Scenario landing hero ── */
.for-scenario-hero-wrap {
    padding-bottom: 24px;
}

.for-scenario-hero-wrap .for-breadcrumb {
    max-width: 960px;
    margin: 0 auto 16px;
    padding: 0 24px;
    font-size: 0.8125rem;
}

.for-scenario-hero-wrap .hero-highlights {
    max-width: 920px;
    margin: 0 auto 20px;
    padding: 0 24px;
}

.for-scenario-hero-wrap .for-scenario-hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 8px;
}

.for-scenario-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.15;
}

.for-scenario-hero .for-primary-cta {
    margin-top: 4px;
}

body.for-page .for-main {
    padding-top: 24px;
}

.hub-layout .for-main {
    padding-top: 20px;
}

.pricing-hero-wrap {
    padding-bottom: 20px;
}

.pricing-hero-wrap .hero-highlights {
    max-width: 920px;
    margin: 0 auto 20px;
    padding: 0 24px;
}

.pricing-hero-wrap .pricing-hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 8px;
    text-align: center;
}

.pricing-hero-wrap .pricing-hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .studio-value-strip {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        padding: 8px 16px;
    }

    .studio-value-strip::-webkit-scrollbar {
        display: none;
    }

    .studio-value-pill {
        flex-shrink: 0;
    }

    .studio-header {
        padding: 12px 16px 10px;
    }

    .studio-header-copy .studio-tagline {
        display: none;
    }

    .studio-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 10px;
    }

    .studio-toolbar-primary {
        margin-left: 0;
        order: -1;
        display: none;
    }

    body.studio-page {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    body.studio-page.pk-cookie-visible {
        padding-bottom: calc(68px + var(--cookie-bar-h, 72px) + env(safe-area-inset-bottom, 0px));
    }

    body.studio-page.pk-cookie-visible .studio-mobile-print-bar,
    body.studio-page.pk-cookie-visible .mobile-print-bar {
        bottom: var(--cookie-bar-h, 72px);
    }

    .studio-toolbar-settings-wrap {
        display: block;
    }

    .studio-toolbar-settings-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: #fff;
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--text-muted);
        cursor: pointer;
        list-style: none;
    }

    .studio-toolbar-settings-summary::-webkit-details-marker {
        display: none;
    }

    .studio-toolbar-settings-summary::after {
        content: '▾';
        font-size: 0.75rem;
        color: var(--text-soft);
    }

    .studio-toolbar-settings-wrap[open] .studio-toolbar-settings-summary::after {
        content: '▴';
    }

    .studio-toolbar-settings {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 8px;
        padding: 10px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .studio-toolbar-divider {
        display: none;
    }

    .studio-quickstarts-summary {
        display: block;
    }

    .studio-quickstarts-details:not([open]) .studio-quickstarts {
        display: none;
    }

    .studio-quickstarts {
        border-top: none;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .sources-page-wrap .sources-page {
        padding-top: 16px;
    }

    .for-scenario-hero-wrap .hero-highlights,
    .pricing-hero-wrap .hero-highlights,
    .landing-hero-wrap .hero-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ── Shared landing hero (Teachers, Situations hub) ── */
.landing-hero-wrap {
    background: linear-gradient(165deg, #f8fafc 0%, #eff6ff 40%, #fff7ed 100%);
    padding: 24px 24px 32px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.landing-hero-wrap .hero-highlights {
    max-width: 920px;
    margin: 0 auto 24px;
}

.landing-hero-wrap .hero-vs-punch {
    max-width: 720px;
    margin: 20px auto 0;
}

.landing-hero-wrap h1 em,
.for-hub-hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.for-hub-hero-wrap {
    padding-bottom: 28px;
}

.landing-hero-wrap .teachers-hero {
    padding-top: 0;
    padding-bottom: 8px;
}

.for-hub-hero {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.for-hub-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 12px;
}

.teachers-vs-wrap {
    max-width: 960px;
    margin: 0 auto 32px;
    padding: 0 24px;
}

.teachers-vs-wrap > summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    list-style: none;
    padding: 10px 16px;
    border: 1px dashed var(--border);
    border-radius: 999px;
    background: var(--surface);
    transition: 0.15s;
}

.teachers-vs-wrap > summary::-webkit-details-marker {
    display: none;
}

.teachers-vs-wrap > summary::after {
    content: ' ▾';
}

.teachers-vs-wrap[open] > summary {
    margin-bottom: 16px;
    border-color: var(--primary);
    color: var(--primary);
}

.teachers-vs-wrap[open] > summary::after {
    content: ' ▴';
}

.teachers-vs-wrap .teachers-vs {
    margin-bottom: 0;
    padding: 0;
}

.teachers-vs-wrap .teachers-vs h2 {
    display: none;
}

@media (max-width: 768px) {
    .landing-hero-wrap {
        padding: 16px 16px 24px;
    }

    .landing-hero-wrap .hero-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .landing-hero-wrap .hero-vs-punch {
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
    }

    .landing-hero-wrap .hero-vs-arrow {
        display: none;
    }

    .landing-hero-wrap .hero-vs-them,
    .landing-hero-wrap .hero-vs-us {
        display: block;
        width: 100%;
        text-align: center;
    }
}
