:root {
    --coral: #FF6F61;
    --yellow: #FFD75E;
    --blue: #6ECFF6;
    --mint: #98E2C6;
    --lavender: #C7B9FF;
    --cream: #FFF9F3;
    --ink: #24212B;
    --muted: #6D6676;
    --line: #EEE3DA;
    --white: #FFFFFF;
    --shadow: 0 18px 48px rgba(36, 33, 43, .09);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Nunito", system-ui, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: "Baloo 2", system-ui, sans-serif; line-height: 1.02; margin: 0 0 .7rem; }
h1 { font-size: clamp(2.25rem, 4vw, 4.7rem); }
h2 { font-size: clamp(1.7rem, 2.5vw, 2.55rem); }
h3 { font-size: 1.45rem; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem clamp(1rem, 4vw, 3.5rem);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--coral);
    color: var(--white);
    font-family: "Baloo 2", cursive;
    font-size: 1.8rem;
    font-weight: 800;
    box-shadow: 5px 5px 0 var(--yellow);
}
.brand strong { display: block; font-family: "Baloo 2"; font-size: 1.35rem; }
.brand small { display: block; color: var(--muted); margin-top: -.25rem; }
.site-nav { display: flex; align-items: center; gap: .35rem; font-weight: 800; }
.site-nav a { padding: .65rem .85rem; border-radius: 999px; }
.site-nav a:hover, .nav-pill { background: var(--cream); }
.nav-toggle { display: none; border: 0; background: var(--yellow); border-radius: 10px; padding: .55rem .75rem; font-size: 1.2rem; }

.hero, .page-hero {
    margin: 0 auto;
    max-width: 1180px;
    padding: clamp(2rem, 6vw, 5.5rem) clamp(1rem, 3vw, 2rem);
}
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}
.hero h1 { max-width: 720px; }
.text-coral { color: #F44D86; }
.text-mint { color: #22B8A9; }
.text-purple { color: #8358D9; }
.hero-copy p, .page-hero p, .section-heading p { color: var(--muted); font-size: 1.15rem; max-width: 720px; }
.eyebrow, .label {
    font-family: "Montserrat", system-ui, sans-serif;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .08em;
    font-weight: 800;
    color: var(--coral);
}
.hero-actions, .chip-row, .download-panel { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: .78rem 1.05rem;
    border-radius: 14px;
    border: 2px solid var(--ink);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.button.primary { background: var(--coral); color: var(--white); }
.button.secondary { background: var(--yellow); }
.button.danger { background: #B42318; color: var(--white); }
.button.small {
    min-height: 38px;
    padding: .48rem .7rem;
    border-radius: 10px;
    font-size: .9rem;
    box-shadow: 3px 3px 0 var(--ink);
}
.hero-preview {
    position: relative;
    min-height: 430px;
}
.hero-sparkle {
    position: absolute;
    z-index: 1;
    font-family: "Baloo 2", system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 800;
}
.hero-sparkle.one { left: 2rem; top: 1.4rem; color: var(--blue); }
.hero-sparkle.two { right: 5.4rem; top: 2.8rem; color: #F44D86; }
.hero-sparkle.three { right: 1.4rem; bottom: 4.2rem; color: var(--mint); }
.preview-sheet {
    position: absolute;
    display: flex;
    align-items: end;
    justify-content: center;
    width: 245px;
    height: 315px;
    padding: 1.2rem;
    border-radius: 20px;
    border: 3px solid var(--ink);
    background: var(--white);
    box-shadow: var(--shadow);
    font-family: "Baloo 2";
    font-size: 1.45rem;
    font-weight: 800;
}
.preview-sheet::before {
    content: "";
    position: absolute;
    inset: 1.1rem 1.1rem 4.5rem;
    border: 3px solid currentColor;
    border-radius: 16px;
    background:
        linear-gradient(currentColor, currentColor) 50% 42% / 52% 6px no-repeat,
        linear-gradient(currentColor, currentColor) 50% 57% / 40% 6px no-repeat,
        linear-gradient(currentColor, currentColor) 50% 72% / 48% 6px no-repeat;
    opacity: .8;
}
.preview-sheet.coral { left: 0; top: 44px; color: var(--coral); transform: rotate(-7deg); }
.preview-sheet.yellow { right: 10px; top: 4px; color: var(--yellow); transform: rotate(6deg); }
.preview-sheet.blue { left: 120px; bottom: 0; color: var(--blue); transform: rotate(-4deg); }

.search-band, .section, .email-optin, .resource-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 2rem);
}
.big-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    padding: .75rem;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 20px;
    box-shadow: 7px 7px 0 var(--mint);
}
input, select, textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .75rem .9rem;
    font: inherit;
    background: var(--white);
}
textarea { min-height: 130px; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.audience-grid, .category-grid, .collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 320px));
    justify-content: start;
    align-items: start;
    gap: 1rem;
}
.audience-card, .category-card, .resource-card, .collection-card, .filters, .details-box, .content-block, .resource-side, .admin-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.audience-card {
    min-height: 110px;
    display: grid;
    place-items: center;
    padding: 1rem;
    font-family: "Baloo 2";
    font-size: 1.45rem;
    font-weight: 800;
    border-color: rgba(36, 33, 43, .08);
}
.audience-card:nth-child(5n+1) { background: linear-gradient(135deg, #fff, rgba(255, 111, 97, .12)); }
.audience-card:nth-child(5n+2) { background: linear-gradient(135deg, #fff, rgba(255, 215, 94, .16)); }
.audience-card:nth-child(5n+3) { background: linear-gradient(135deg, #fff, rgba(110, 207, 246, .14)); }
.audience-card:nth-child(5n+4) { background: linear-gradient(135deg, #fff, rgba(152, 226, 198, .14)); }
.audience-card:nth-child(5n+5) { background: linear-gradient(135deg, #fff, rgba(199, 185, 255, .16)); }
.category-card { padding: 1.25rem; border-top: 9px solid var(--accent, var(--blue)); }
.category-card span { font-size: 2rem; }
.category-card p, .resource-card p, .collection-card p { color: var(--muted); }
.resource-card { overflow: hidden; }
.resource-card .thumb-link {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    padding: .75rem;
    background: linear-gradient(180deg, #fffaf4 0%, #fff 72%, #fff7ed 100%);
    border-bottom: 1px solid var(--line);
}
.resource-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}
.collection-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    background: linear-gradient(180deg, #fffaf4 0%, #fff 72%, #fff7ed 100%);
    border-bottom: 1px solid var(--line);
    padding: .75rem;
}
.card-body, .collection-card { padding: 1rem; }
.chip-row span {
    padding: .35rem .55rem;
    border-radius: 999px;
    background: var(--cream);
    font-size: .85rem;
    font-weight: 800;
}
.pastel { background: rgba(152, 226, 198, .22); border-radius: 28px; }
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.split > div, .email-optin {
    background: var(--white);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
}
.collection-list { display: grid; gap: .6rem; }
.collection-list a { padding: .7rem; background: var(--cream); border-radius: 12px; font-weight: 800; }
.email-optin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}
.email-optin form { display: flex; gap: .75rem; flex-wrap: wrap; }
.newsletter-message {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}
.newsletter-message.is-success { color: #16745D; }
.newsletter-message.is-error { color: #B64033; }
.page-hero.small {
    padding-bottom: 1.3rem;
}
.breadcrumbs { color: var(--muted); font-weight: 800; margin-bottom: 1rem; }
.with-sidebar {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}
.filters { padding: 1rem; position: sticky; top: 86px; }
.filters form { display: grid; gap: .8rem; }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: auto; min-height: auto; }
.finder-panel {
    padding-top: .5rem;
}
.finder-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.finder-form .hero-actions {
    grid-column: 1 / -1;
}
.resource-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.5rem;
    align-items: start;
}
.resource-intro-card {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    margin: 1.25rem 0;
}
.resource-preview {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: var(--white);
}
.lead { font-size: 1.2rem; color: var(--muted); }
.download-button { margin: 1rem 0; }
.details-box, .content-block, .resource-side { padding: 1rem; margin: 1rem 0; }
.resource-intro-card .details-box { margin: 0; }
.details-box dl { display: grid; grid-template-columns: 150px 1fr; gap: .5rem; }
.details-box dt { font-weight: 900; }
.pin-block img { max-width: 420px; border-radius: 18px; }
.pin-block {
    display: grid;
    gap: 1rem;
    justify-items: start;
}
.included-pages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.included-page {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--cream);
}
.included-page img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    background: var(--white);
    padding: .45rem;
}
.included-page figcaption {
    display: flex;
    justify-content: center;
    padding: .8rem;
}
.final-download {
    border: 2px solid var(--ink);
    box-shadow: 7px 7px 0 var(--yellow);
}
.resource-side { position: sticky; top: 86px; display: grid; gap: .7rem; }
.resource-side a { display: block; padding: .7rem; border-radius: 12px; background: var(--cream); font-weight: 800; }
.prose { max-width: 850px; }
.site-footer {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    justify-content: space-between;
    align-items: start;
    gap: 2rem;
    padding: 2rem clamp(1rem, 4vw, 3.5rem);
    background: var(--ink);
    color: var(--white);
}
.site-footer p { color: rgba(255,255,255,.75); }
.site-footer nav { display: grid; gap: .4rem; }
.site-footer nav span {
    color: rgba(255,255,255,.55);
    font-weight: 800;
}
.footer-social a { color: var(--yellow); }
.flash {
    max-width: 1100px;
    margin: 1rem auto 0;
    padding: .8rem 1rem;
    border-radius: 12px;
    background: var(--mint);
    font-weight: 800;
}
.flash.error { background: #FFD1D1; }
.preview-banner {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--yellow);
    font-weight: 900;
}
.preview-banner a {
    margin-left: .75rem;
    text-decoration: underline;
}

.admin-shell { max-width: 1180px; margin: 0 auto; padding: 2rem 1rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.admin-card { padding: 1rem; }
.admin-card p { color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; }
.admin-table th, .admin-table td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; }
.admin-actions { display: flex; align-items: center; gap: .75rem; }
.admin-actions form { margin: 0; }
.link-action {
    border: 0;
    padding: 0;
    background: transparent;
    color: #0F766E;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.danger-zone {
    margin: 0 0 1rem;
    padding: 1rem;
    background: #FFF4F4;
    border: 1px solid #F4B4B4;
    border-radius: 14px;
}
.danger-zone summary {
    color: #B42318;
    cursor: pointer;
    font-weight: 900;
}
.danger-zone p { color: var(--muted); }
.danger-zone form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: .75rem;
    align-items: end;
}
.link-danger {
    border: 0;
    padding: 0;
    background: transparent;
    color: #B42318;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-form .full { grid-column: 1 / -1; }
.page-image-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.page-image-editor legend { font-weight: 900; }
.page-image-editor label {
    display: grid;
    gap: .35rem;
    padding: .5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.page-image-editor img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    background: #fff;
}

@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute;
        inset: 68px 1rem auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: .75rem;
        background: var(--white);
        border-radius: 16px;
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .hero, .split, .with-sidebar, .resource-layout, .resource-intro-card, .admin-form, .finder-form { grid-template-columns: 1fr; }
    .hero-preview { min-height: 330px; }
    .preview-sheet { width: 190px; height: 245px; }
    .search-band, .section, .email-optin, .resource-layout { padding-inline: 1rem; }
    .big-search, .email-optin, .email-optin form { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
    .filters, .resource-side { position: static; }
    .site-footer { grid-template-columns: 1fr; }
}
