/*
    Danger Aware - rebuilt site.

    Ported from the Figma Make export in "Website creation/" (React + Tailwind v4). There is no
    Node in this repo, so rather than add a Tailwind build step every utility class was resolved to
    its literal value and written out here: text-sm is 14px/20px, rounded-2xl is 16px, py-3.5 is
    14px, max-w-7xl is 1280px, and so on. The tokens in :root are copied verbatim from the export's
    src/index.css, so colours are exact rather than eyeballed.

    Per-item colours (card accents, book spines, comic buttons) are NOT in here. The design stores
    them per row, so the views bind them as --accent / --accent-soft inline and every component
    below reads those. That is what lets one .book rule paint nine different spines - and what will
    keep working when an editor picks the colour in the admin panel.
*/

:root {
    /* from Website creation/src/index.css */
    --background: #FEFEF9;
    --foreground: #1A2E2B;
    --card: #FFFFFF;
    --primary: #1D7A6E;
    --primary-dark: #166058;
    --secondary: #E8F5F3;
    --muted: #F4F6F3;
    --muted-foreground: #6B7C79;
    --accent-amber: #F59E0B;
    --accent-amber-dark: #D97706;
    --border: #E2E8E6;
    --radius: 14px;

    /* derived, used in more than one place in the export */
    --nav-ink: #3D5652;
    --secondary-border: #C4DED9;
    --footer-bg: #1A2E2B;
    --footer-text: #A8B8B5;
    --footer-dim: #6B9490;
    --footer-line: #2D4A47;

    --shadow-sm: 0 1px 2px rgba(26, 46, 43, .05);
    --shadow-md: 0 4px 6px -1px rgba(26, 46, 43, .1), 0 2px 4px -2px rgba(26, 46, 43, .1);
    --shadow-lg: 0 10px 15px -3px rgba(26, 46, 43, .1), 0 4px 6px -4px rgba(26, 46, 43, .1);
    --shadow-xl: 0 20px 25px -5px rgba(26, 46, 43, .12), 0 8px 10px -6px rgba(26, 46, 43, .1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, .25);

    --font-heading: "Nunito", "Segoe UI", system-ui, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* header height, referenced by the sticky filter bar on Articles (top-16) */
    --header-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin: 0;
    line-height: 1.25;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    cursor: pointer;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

/* max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 */
.wrap {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 32px; } }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #fff;
    color: var(--foreground);
    padding: 12px 18px;
    font-weight: 700;
}

.skip-link:focus {
    left: 0;
}

/* Kept in the layout for keyboard and screen-reader users but off the design, which submits
   its searches by typing. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ------------------------------------------------------------------ header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 12px;
    background: var(--primary);
    display: grid;
    place-items: center;
    transition: background-color .15s;
}

.brand:hover .brand-mark {
    background: var(--primary-dark);
}

.brand-text {
    display: none;
}

@media (min-width: 640px) {
    .brand-text { display: block; }
}

.brand-name {
    display: block;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 18px;
    line-height: 1.25;
    color: var(--foreground);
}

.brand-tag {
    display: block;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .025em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.main-nav {
    display: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 1024px) {
    .main-nav { display: flex; }
}

.main-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-ink);
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.main-nav a:hover {
    background: var(--muted);
    color: var(--primary);
}

.main-nav a.is-active {
    background: var(--secondary);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    display: none;
    padding: 8px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--muted-foreground);
    transition: background-color .15s, color .15s;
}

@media (min-width: 640px) {
    .icon-btn { display: block; }
}

.icon-btn:hover {
    background: var(--muted);
    color: var(--primary);
}

.search-box {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--muted);
    border-radius: 9999px;
    padding: 8px 16px;
}

.search-box.is-open {
    display: flex;
}

.search-box.is-open + .icon-btn {
    display: none;
}

.search-box input {
    width: 144px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--foreground);
    outline: none;
}

.search-box input::placeholder {
    color: var(--muted-foreground);
}

.login-link {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-ink);
    transition: background-color .15s, color .15s;
}

@media (min-width: 640px) {
    .login-link { display: flex; }
}

.login-link:hover {
    background: var(--muted);
    color: var(--primary);
}

.nav-toggle {
    display: block;
    padding: 8px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--muted-foreground);
    line-height: 0;
}

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
}

.nav-toggle:hover {
    background: var(--muted);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    padding: 12px 0 16px;
}

.mobile-nav.is-open {
    display: block;
}

@media (min-width: 1024px) {
    .mobile-nav.is-open { display: none; }
}

.mobile-nav a {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-ink);
}

.mobile-nav a:hover {
    background: var(--muted);
}

.mobile-nav a.is-active {
    background: var(--secondary);
    color: var(--primary);
}

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    line-height: 1.5;
    transition: transform .15s, background-color .15s, opacity .15s;
    white-space: nowrap;
}

/* px-6 py-3.5 - the hero, contest and newsletter buttons */
.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

/* px-4 py-2.5 - the modal controls */
.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
}

.btn-amber {
    background: var(--accent-amber);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.btn-amber:hover {
    background: var(--accent-amber-dark);
    transform: scale(1.05);
}

.btn-amber:active {
    transform: scale(.95);
}

.btn-glass {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(4px);
    color: #fff;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, .25);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    opacity: .9;
}

.btn-accent:active {
    transform: scale(.95);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--muted);
}

.btn[disabled] {
    opacity: .3;
    cursor: not-allowed;
    transform: none;
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom right, #1A2E2B, #1D7A6E, #25A090);
}

/* the two blurred blobs behind the hero, at opacity-10 */
.hero-blobs {
    position: absolute;
    inset: 0;
    opacity: .1;
    pointer-events: none;
}

.hero-blobs i {
    position: absolute;
    border-radius: 50%;
    display: block;
}

.hero-blobs i:first-child {
    top: 40px;
    left: 40px;
    width: 288px;
    height: 288px;
    background: #fff;
    filter: blur(64px);
}

.hero-blobs i:last-child {
    bottom: 40px;
    right: 80px;
    width: 384px;
    height: 384px;
    background: var(--accent-amber);
    filter: blur(64px);
}

.hero-grid {
    position: relative;
    display: grid;
    gap: 48px;
    align-items: center;
    padding-block: 64px;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-block: 96px;
    }
}

.hero-copy {
    position: relative;
    z-index: 10;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .9);
}

.pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-amber);
    animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
    .pill::before { animation: none; }
}

.hero h1 {
    margin-top: 24px;
    font-weight: 900;
    color: #fff;
    font-size: 36px;
    line-height: 1.25;
}

@media (min-width: 640px) { .hero h1 { font-size: 48px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 60px; } }

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

.hero-lead {
    margin-top: 24px;
    max-width: 512px;
    font-size: 18px;
    line-height: 1.625;
    color: rgba(255, 255, 255, .85);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 40px;
}

.hero-stats dt {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 24px;
    line-height: 1.25;
    color: var(--accent-amber);
}

.hero-stats dd {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .7);
}

.hero-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-art-inner {
    position: relative;
    width: 320px;
    height: 320px;
}

@media (min-width: 1024px) {
    .hero-art-inner { width: 384px; height: 384px; }
}

.hero-art-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.hero-art svg {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, .15));
}

/* ------------------------------------------------------------------ safety notice */

.notice-bar {
    background: var(--secondary);
    border-bottom: 1px solid var(--secondary-border);
}

.notice-bar .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 24px;
    padding-block: 12px;
    font-size: 14px;
    text-align: center;
}

.notice-bar .safe {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
}

.notice-bar .sep,
.notice-bar .help {
    color: var(--muted-foreground);
}

.notice-bar .tel {
    font-weight: 700;
    color: var(--primary);
}

/* ------------------------------------------------------------------ sections */

.section {
    padding-block: 64px;
}

@media (min-width: 1024px) {
    .section { padding-block: 80px; }
}

.bg-cream { background: var(--background); }
.bg-muted { background: var(--muted); }

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

.section-head h2 {
    font-weight: 900;
    font-size: 30px;
    margin-bottom: 12px;
}

@media (min-width: 640px) {
    .section-head h2 { font-size: 36px; }
}

.section-head p {
    max-width: 672px;
    margin-inline: auto;
    font-size: 18px;
    color: var(--muted-foreground);
}

.section-head-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .section-head-row {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.section-head-row h2 {
    font-weight: 900;
    font-size: 30px;
}

@media (min-width: 640px) {
    .section-head-row h2 { font-size: 36px; }
}

.section-head-row p {
    margin-top: 8px;
    color: var(--muted-foreground);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    transition: gap .15s;
}

.link-arrow:hover {
    gap: 10px;
}

/* ------------------------------------------------------------------ resource cards */

.grid-4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.res-card {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: transform .15s, box-shadow .15s;
}

.res-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.res-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #7C3AED;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 9999px;
}

.res-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent-soft);
    display: grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
    margin-bottom: 16px;
}

.res-card h3 {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
}

.res-card p {
    font-size: 14px;
    line-height: 1.625;
    color: var(--muted-foreground);
    margin-bottom: 16px;
}

.res-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    transition: gap .15s;
}

.res-card:hover .res-cta {
    gap: 8px;
}

/* ------------------------------------------------------------------ explore tiles */

.grid-explore {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 640px) { .grid-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-explore { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid-explore { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.tile {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: var(--border);
    transition: transform .15s, box-shadow .15s;
}

.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.tile:hover img {
    transform: scale(1.05);
}

.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 46, 43, .8), rgba(26, 46, 43, .2) 50%, transparent);
}

.tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    z-index: 1;
}

.tile-caption strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 18px;
    line-height: 1.25;
    color: #fff;
}

.tile-caption span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

/* ------------------------------------------------------------------ cards (news, comics, articles) */

.grid-3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}

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

.card-media {
    overflow: hidden;
    background: var(--border);
    aspect-ratio: 16 / 9;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.card:hover .card-media img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.chip {
    background: var(--secondary);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
}

.meta-dim {
    font-size: 12px;
    color: var(--muted-foreground);
}

.card h3 {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.375;
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    line-height: 1.625;
    color: var(--muted-foreground);
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    transition: gap .15s;
}

.card:hover .card-cta {
    gap: 8px;
}

/* ------------------------------------------------------------------ contest band */

.contest {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom right, #4C1D95, #7C3AED, #BE185D);
    padding-block: 64px;
}

@media (min-width: 1024px) {
    .contest { padding-block: 80px; }
}

.contest-blobs {
    position: absolute;
    inset: 0;
    opacity: .1;
    pointer-events: none;
}

.contest-blobs i {
    position: absolute;
    border-radius: 50%;
    display: block;
}

.contest-blobs i:first-child {
    top: 0;
    left: 25%;
    width: 384px;
    height: 384px;
    background: #fff;
    filter: blur(64px);
}

.contest-blobs i:last-child {
    bottom: 0;
    right: 25%;
    width: 288px;
    height: 288px;
    background: var(--accent-amber);
    filter: blur(40px);
}

.contest .wrap {
    position: relative;
    z-index: 10;
}

.contest-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

@media (min-width: 1024px) {
    .contest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.contest .pill {
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .3);
}

.contest h2 {
    margin-top: 20px;
    margin-bottom: 16px;
    font-weight: 900;
    font-size: 36px;
    line-height: 1.25;
    color: #fff;
}

@media (min-width: 640px) {
    .contest h2 { font-size: 48px; }
}

.contest h2 .cream {
    color: #FDE68A;
}

.contest-lead {
    max-width: 512px;
    margin-bottom: 24px;
    font-size: 18px;
    line-height: 1.625;
    color: rgba(255, 255, 255, .8);
}

.tick-list {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.tick-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, .85);
}

.tick-list span {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: grid;
    place-items: center;
    font-size: 12px;
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sheet {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 16px;
    background: linear-gradient(to bottom right, var(--from), var(--to));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .15s;
}

.sheet:hover {
    transform: scale(1.05);
}

.sheet svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .1;
}

.sheet .emoji {
    position: relative;
    z-index: 1;
    font-size: 36px;
    line-height: 1;
}

.sheet p {
    position: relative;
    z-index: 1;
    padding-inline: 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: rgba(55, 65, 81, .6);
}

/* ------------------------------------------------------------------ newsletter */

.newsletter {
    background: var(--primary);
    padding-block: 64px;
}

@media (min-width: 1024px) {
    .newsletter { padding-block: 80px; }
}

.newsletter-inner {
    max-width: 672px;
    margin-inline: auto;
    padding-inline: 16px;
    text-align: center;
}

@media (min-width: 640px) {
    .newsletter-inner { padding-inline: 24px; }
}

.newsletter-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .2);
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
}

.newsletter-icon.is-done {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 36px;
}

.newsletter h2 {
    margin-bottom: 12px;
    font-weight: 900;
    font-size: 30px;
    color: #fff;
}

@media (min-width: 640px) {
    .newsletter h2 { font-size: 36px; }
}

.newsletter > .newsletter-inner > p {
    font-size: 18px;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 32px;
}

.subscribe {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 448px;
    margin-inline: auto;
}

@media (min-width: 640px) {
    .subscribe { flex-direction: row; }
}

.subscribe input {
    flex: 1;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-weight: 500;
    color: var(--foreground);
    outline: none;
}

.subscribe input::placeholder {
    color: var(--muted-foreground);
}

.subscribe input:focus {
    box-shadow: 0 0 0 2px var(--accent-amber);
}

.fineprint {
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
}

.newsletter .validation {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #FDE68A;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
    background: var(--footer-bg);
    color: #fff;
    margin-top: auto;
}

.site-footer .wrap {
    padding-block: 48px;
}

@media (min-width: 1024px) {
    .site-footer .wrap { padding-block: 64px; }
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.site-footer .brand {
    margin-bottom: 16px;
}

.site-footer .brand-text {
    display: block;
}

.site-footer .brand-name {
    font-size: 16px;
    color: #fff;
}

.site-footer .brand-tag {
    color: var(--footer-text);
}

.footer-blurb {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.625;
    color: var(--footer-text);
}

.footer-legal {
    font-size: 12px;
    font-weight: 500;
    color: var(--footer-dim);
}

.footer-col h3 {
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
}

.footer-col li + li {
    margin-top: 10px;
}

.footer-col a {
    font-size: 14px;
    color: var(--footer-text);
    transition: color .15s;
}

.footer-col a:hover {
    color: #fff;
}

.help-box {
    margin-top: 24px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(29, 122, 110, .2);
    border: 1px solid rgba(29, 122, 110, .3);
}

.help-box .head {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #6BCB9E;
}

.help-box .line {
    font-size: 12px;
    color: var(--footer-text);
}

.help-box .tel {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--footer-line);
    font-size: 12px;
    color: var(--footer-dim);
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom .badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ------------------------------------------------------------------ page headers */

.page-head {
    padding: 48px 16px;
    text-align: center;
}

.page-head-teal   { background: linear-gradient(to right, #1A2E2B, #1D7A6E); }
.page-head-purple { background: linear-gradient(to right, #4C1D95, #7C3AED); }
.page-head-blue   { background: linear-gradient(to right, #0369A1, #0EA5E9); }
.page-head-amber  { background: linear-gradient(to right, #92400E, #F59E0B); }
.page-head-slate  { background: linear-gradient(to right, #1A2E2B, #374151); }

.page-head h1 {
    margin-bottom: 12px;
    font-weight: 900;
    font-size: 36px;
    color: #fff;
}

@media (min-width: 640px) {
    .page-head h1 { font-size: 48px; }
}

.page-head p {
    max-width: 576px;
    margin-inline: auto;
    font-size: 18px;
    color: rgba(255, 255, 255, .8);
}

/* News searches from inside its page head rather than from the one in the site header. */
.head-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 448px;
    margin: 24px auto 0;
    color: rgba(255, 255, 255, .7);
}

.head-search svg {
    position: absolute;
    left: 14px;
    pointer-events: none;
}

.head-search input[type="search"] {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 9999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font: inherit;
    font-size: 16px;
    outline: none;
}

.head-search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, .5);
}

.head-search input[type="search"]:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .3);
}

.page-body {
    padding-block: 48px;
}

/* ------------------------------------------------------------------ library */

.bookcase {
    background: linear-gradient(to bottom, #8B5E3C, #6B4226);
    border: 1px solid #5A3418;
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-2xl);
}

@media (min-width: 640px) {
    .bookcase { padding: 32px; }
}

.shelf + .shelf {
    margin-top: 32px;
}

.shelf-books {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
}

@media (min-width: 640px) {
    .shelf-books { gap: 16px; }
}

.plank {
    height: 20px;
    margin-top: 4px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #A0683A 0%, #7A4E28 50%, #5A3418 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3);
}

.book-slot {
    position: relative;
    flex: none;
}

.book {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 52px;
    padding: 0;
    border: 0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background: var(--accent, #9CA3AF);
    box-shadow: var(--shadow-lg);
    transition: transform .2s;
}

.book.h-0 { height: 160px; }
.book.h-1 { height: 140px; }
.book.h-2 { height: 150px; }

.book.is-available {
    cursor: pointer;
}

.book-slot:hover .book.is-available {
    transform: translateY(-12px) rotate(-2deg);
}

.book.is-soon {
    background: #9CA3AF;
    cursor: default;
}

.book-inner {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 6px;
}

.book-title {
    display: block;
    width: 100%;
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 9px;
    line-height: 1.25;
    text-align: center;
    color: #fff;
    overflow-wrap: break-word;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.book-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    width: 100%;
}

.book-lines i {
    display: block;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .2);
}

.book-foot {
    display: block;
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, .3);
    opacity: .3;
}

.book-tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--foreground);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-xl);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 10;
}

.book-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--foreground);
}

.book-slot:hover .book.is-available + .book-tip,
.book.is-available:focus-visible + .book-tip {
    opacity: 1;
}

.shelf-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.shelf-legend div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}

.shelf-legend i {
    display: block;
    width: 16px;
    height: 24px;
    border-radius: 4px;
    background: var(--primary);
}

.shelf-legend i.soon {
    background: #9CA3AF;
}

.cta-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    padding: 24px;
    border-radius: 16px;
    background: var(--secondary);
    border: 1px solid var(--secondary-border);
}

@media (min-width: 640px) {
    .cta-strip {
        flex-direction: row;
        padding: 32px;
    }
}

.cta-strip .cta-icon {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 16px;
    background: var(--primary);
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
}

.cta-strip .cta-text {
    flex: 1;
    text-align: center;
}

@media (min-width: 640px) {
    .cta-strip .cta-text { text-align: left; }
}

.cta-strip h3 {
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 20px;
}

.cta-strip p {
    font-size: 14px;
    color: var(--muted-foreground);
}

.cta-strip .btn {
    flex: none;
    padding: 12px 24px;
}

/* ------------------------------------------------------------------ comics */

.comic-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--border);
}

.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.card:hover .comic-cover img {
    transform: scale(1.05);
}

.comic-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .4), transparent);
}

.pages-pill,
.age-pill {
    position: absolute;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
}

.pages-pill {
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(4px);
    color: #fff;
}

.age-pill {
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, .9);
    color: var(--accent);
}

.comic-card h3 {
    font-weight: 900;
}

.comic-actions {
    display: flex;
    gap: 8px;
}

.comic-actions .btn-accent {
    flex: 1;
    padding-block: 10px;
    font-size: 14px;
}

.comic-actions .btn-outline {
    padding: 10px 14px;
    line-height: 0;
}

/* ------------------------------------------------------------------ modals */

.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(4px);
}

.modal[hidden] {
    display: none;
}

.modal-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 768px;
    max-height: 92vh;
    overflow: auto;
    border-radius: 24px;
    background: var(--foreground);
    box-shadow: var(--shadow-2xl);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.modal-head .kicker {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

.modal-head h2 {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
}

.modal-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 14px;
    transition: background-color .15s;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, .2);
}

.zoom-value {
    width: 48px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
}

.modal-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 24px;
    min-height: 256px;
}

.modal-page {
    width: 100%;
    max-width: 512px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    transform-origin: center center;
    transition: transform .2s;
}

.modal-page img {
    width: 100%;
    object-fit: contain;
}

.panel-caption {
    background: #fff;
    padding: 16px;
}

.panel-caption div {
    border: 2px solid var(--foreground);
    border-radius: 12px;
    padding: 16px;
    background: #FFFBEB;
}

.panel-caption p {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.625;
    color: var(--foreground);
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.modal-foot .btn-glass {
    background: rgba(255, 255, 255, .1);
    border: 0;
}

.modal-foot .btn-glass:hover {
    background: rgba(255, 255, 255, .2);
}

.dots {
    display: flex;
    gap: 6px;
}

.dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    transition: background-color .15s;
}

.dots button.is-current {
    background: var(--accent-amber);
}

/* light modal - the story reader */

.modal-light {
    background: rgba(0, 0, 0, .6);
}

.modal-light .modal-panel {
    max-width: 672px;
    max-height: 90vh;
    background: #fff;
}

.modal-light .modal-head {
    padding: 24px;
    border-bottom-color: var(--border);
}

@media (min-width: 640px) {
    .modal-light .modal-head { padding: 32px; }
}

.modal-light .kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--primary);
}

.modal-light .modal-head h2 {
    margin-top: 4px;
    font-weight: 900;
    font-size: 24px;
    color: var(--foreground);
}

.modal-light .tool-btn {
    background: transparent;
    border-radius: 12px;
    color: var(--muted-foreground);
}

.modal-light .tool-btn:hover {
    background: var(--muted);
}

.reader-body {
    padding: 24px;
}

@media (min-width: 640px) {
    .reader-body { padding: 32px; }
}

.reader-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.reader-dots i {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: var(--border);
}

.reader-dots i.is-current {
    width: 24px;
    background: var(--primary);
}

.reader-cover {
    width: 128px;
    height: 128px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 48px;
    background: var(--accent-soft);
}

.reader-body .lede {
    font-size: 18px;
    line-height: 2;
    font-weight: 500;
    color: var(--foreground);
}

.reader-body .body {
    margin-top: 16px;
    font-size: 16px;
    line-height: 2;
    color: var(--muted-foreground);
}

.reader-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.reader-controls span {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-foreground);
}

.think-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 16px;
    background: var(--secondary);
    border: 1px solid var(--secondary-border);
}

.think-box h4 {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.think-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
}

.think-box textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--secondary-border);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--foreground);
    resize: none;
}

.think-box textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

.think-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted-foreground);
}

.think-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

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

/* ------------------------------------------------------------------ articles */

.filter-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.filter-bar .row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-block: 12px;
}

.filter-bar a {
    flex: none;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--muted);
    color: var(--muted-foreground);
    transition: background-color .15s, color .15s;
}

.filter-bar a:hover {
    background: var(--secondary);
    color: var(--primary);
}

.filter-bar a.is-active {
    background: var(--primary);
    color: #fff;
}

.featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: box-shadow .15s;
}

@media (min-width: 1024px) {
    .featured { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.featured:hover {
    box-shadow: var(--shadow-xl);
}

.featured-media {
    overflow: hidden;
    background: var(--border);
}

@media (min-width: 1024px) {
    .featured-media { grid-column: span 3; }
}

.featured-media img {
    width: 100%;
    height: 256px;
    object-fit: cover;
    transition: transform .7s;
}

@media (min-width: 1024px) {
    .featured-media img { height: 100%; }
}

.featured:hover .featured-media img {
    transform: scale(1.05);
}

.featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}

@media (min-width: 640px) { .featured-body { padding: 32px; } }
@media (min-width: 1024px) { .featured-body { grid-column: span 2; } }

.featured-body .meta-row {
    margin-bottom: 16px;
}

.featured-body .chip {
    padding: 6px 12px;
}

.chip-featured {
    background: var(--accent-amber);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
}

.featured-body h2 {
    margin-bottom: 12px;
    font-weight: 900;
    font-size: 24px;
    line-height: 1.25;
}

@media (min-width: 640px) {
    .featured-body h2 { font-size: 30px; }
}

.featured-body > p {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.625;
    color: var(--muted-foreground);
}

.featured-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.featured-foot .author {
    font-size: 12px;
    font-weight: 600;
    color: var(--foreground);
}

.featured-foot .dim {
    font-size: 12px;
    color: var(--muted-foreground);
}

/* News has no author or read time under the featured story, only the date, so it sits where
   .featured-foot would. */
.featured-date {
    font-size: 12px;
    color: var(--muted-foreground);
}

/* A news card ends at its excerpt - there is no story page to send a "Read More" to yet - so the
   gap .card p leaves for that CTA comes off.

   flex:none with it: as the last child, .card p's flex:1 stretches the excerpt to the bottom of a
   card made tall by a neighbour's two-line title, and -webkit-line-clamp then paints a third line
   inside the taller box - the clamp's ellipsis lands on line two and the text keeps going. */
.news-card p {
    flex: none;
    margin-bottom: 0;
}

.article-card h3 {
    font-size: 16px;
}

.article-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--muted);
}

.article-foot p {
    margin: 0;
    font-size: 12px;
    color: var(--muted-foreground);
    display: block;
}

.article-foot span {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.empty {
    text-align: center;
    padding-block: 80px;
}

.empty .glyph {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty h3 {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 20px;
}

.empty p {
    color: var(--muted-foreground);
}

/* ------------------------------------------------------------------ coming soon / error */

.stub {
    text-align: center;
    padding-block: 96px;
}

.stub h2 {
    font-weight: 900;
    font-size: 30px;
    margin-bottom: 12px;
}

.stub p {
    max-width: 520px;
    margin: 0 auto 32px;
    font-size: 18px;
    color: var(--muted-foreground);
}

/* ------------------------------------------------------------------ coloring */

/* The one page in the design that is not in the teal palette - it keeps the old coloring app's
   orange, so it gets its own hero rather than a .page-head variant. */
.coloring-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom right, #F59E0B, #FB923C, #C2410C);
}

.coloring-blobs {
    position: absolute;
    inset: 0;
    opacity: .1;
    pointer-events: none;
}

.coloring-blobs i {
    position: absolute;
    display: block;
    border-radius: 50%;
}

.coloring-blobs i:first-child {
    top: 32px;
    left: 32px;
    width: 160px;
    height: 160px;
    background: #fff;
    filter: blur(32px);
}

.coloring-blobs i:last-child {
    bottom: 0;
    right: 48px;
    width: 256px;
    height: 256px;
    background: #FEF3C7;
    filter: blur(48px);
}

.coloring-mark {
    position: absolute;
    top: 8px;
    right: 16px;
    font-size: 128px;
    line-height: 1;
    opacity: .18;
    user-select: none;
    pointer-events: none;
}

.coloring-hero .wrap {
    position: relative;
    z-index: 10;
    padding-block: 48px;
}

@media (min-width: 1024px) {
    .coloring-hero .wrap { padding-block: 64px; }
}

.coloring-hero-copy {
    max-width: 672px;
}

/* The hero pills on the dark pages carry a pulsing amber dot. This one is a plain label. */
.pill-quiet::before {
    content: none;
}

.coloring-hero h1 {
    margin-top: 20px;
    margin-bottom: 16px;
    font-weight: 900;
    font-size: 36px;
    line-height: 1.25;
    color: #fff;
}

@media (min-width: 640px) { .coloring-hero h1 { font-size: 48px; } }
@media (min-width: 1024px) { .coloring-hero h1 { font-size: 60px; } }

.coloring-hero h1 .cream {
    color: #FEF3C7;
}

.coloring-lead {
    max-width: 512px;
    margin-bottom: 24px;
    font-size: 18px;
    line-height: 1.625;
    color: rgba(255, 255, 255, .85);
}

.coloring-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fact-solid,
.fact-glass {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 14px;
}

.fact-solid {
    background: #fff;
    color: #C2410C;
    font-weight: 700;
}

.fact-glass {
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-weight: 600;
}

.coloring-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 40px;
}

/* the difficulty filter */

.diff-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.diff-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted-foreground);
}

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

.diff-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 9999px;
    background: #fff;
    color: var(--muted-foreground);
    font-size: 14px;
    font-weight: 700;
    transition: background-color .15s, border-color .15s, color .15s;
}

.diff-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.diff-tab.is-active {
    background: var(--foreground);
    border-color: var(--foreground);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.diff-count {
    margin-left: 2px;
    padding: 2px 6px;
    border-radius: 9999px;
    background: var(--muted);
    font-size: 12px;
}

.diff-tab.is-active .diff-count {
    background: rgba(255, 255, 255, .2);
}

/* One rule per level, read by both the filter chips and the per-card badges. */
.diff-easy     { --dot: #22C55E; --diff-bg: #DCFCE7; --diff-ink: #166534; }
.diff-medium   { --dot: #EAB308; --diff-bg: #FEF9C3; --diff-ink: #854D0E; }
.diff-advanced { --dot: #EF4444; --diff-bg: #FEE2E2; --diff-ink: #991B1B; }

.diff-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--dot, currentColor);
}

.diff-tab.is-active .diff-dot {
    background: #fff;
}

.diff-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    padding: 3px 8px;
    border-radius: 9999px;
    background: var(--diff-bg, var(--muted));
    color: var(--diff-ink, var(--muted-foreground));
    font-size: 11px;
    font-weight: 700;
}

.diff-chip .diff-dot {
    width: 6px;
    height: 6px;
}

/* the gallery */

.sheet-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (min-width: 640px) {
    .sheet-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .sheet-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sheet-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.sheet-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* The tile runs from the sheet's soft accent to its deeper stop, both set on the card. */
.sheet-preview {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(to bottom right, var(--accent-soft), var(--to));
}

.sheet-preview svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .2;
}

.sheet-emoji {
    position: relative;
    z-index: 1;
    font-size: 60px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(26, 46, 43, .15));
}

.new-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 9999px;
    background: var(--accent-amber);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sheet-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px;
}

@media (min-width: 640px) {
    .sheet-body { padding: 16px; }
}

.sheet-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.sheet-title-row h3 {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
    font-size: 14px;
}

@media (min-width: 640px) {
    .sheet-title-row h3 { font-size: 16px; }
}

/* Two cards to a row on a phone leaves no space for the blurb, so the design drops it there. */
.sheet-body > p {
    display: none;
}

@media (min-width: 640px) {
    .sheet-body > p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 12px;
        font-size: 12px;
        line-height: 1.625;
        color: var(--muted-foreground);
    }
}

.sheet-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.sheet-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
}

.sheet-actions .btn-accent {
    flex: 1;
}

.btn-square {
    flex: none;
    padding: 8px 10px;
}

/* the contest banner and the classroom strip */

.contest-banner {
    position: relative;
    overflow: hidden;
    margin-top: 56px;
    padding: 32px;
    border-radius: 24px;
    background: linear-gradient(to right, #7C3AED, #BE185D);
}

@media (min-width: 640px) {
    .contest-banner { padding: 40px; }
}

.contest-banner-mark {
    position: absolute;
    top: -24px;
    right: -16px;
    font-size: 120px;
    line-height: 1;
    opacity: .1;
    user-select: none;
    pointer-events: none;
}

.contest-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

@media (min-width: 640px) {
    .contest-banner-inner {
        flex-direction: row;
        align-items: center;
    }
}

.contest-banner-inner > div {
    flex: 1;
}

.contest-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 9999px;
    background: rgba(255, 255, 255, .2);
    color: #FDE047;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.contest-banner h2 {
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
}

@media (min-width: 640px) {
    .contest-banner h2 { font-size: 30px; }
}

.contest-banner p {
    max-width: 448px;
    font-size: 14px;
    line-height: 1.625;
    color: rgba(255, 255, 255, .8);
}

.contest-banner .fine {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
}

.btn-white {
    flex: none;
    background: #fff;
    color: #7C3AED;
    font-weight: 900;
}

.btn-white:hover {
    background: #F3EEFF;
}

.classroom-pack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--secondary-border);
    border-radius: 24px;
    background: var(--secondary);
    text-align: center;
}

@media (min-width: 640px) {
    .classroom-pack {
        flex-direction: row;
        padding: 32px;
        text-align: left;
    }
}

.classroom-mark {
    font-size: 36px;
    line-height: 1;
}

.classroom-pack > div {
    flex: 1;
}

.classroom-pack h2 {
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 20px;
}

.classroom-pack p {
    font-size: 14px;
    color: var(--muted-foreground);
}

/* the sheet preview overlay */

.modal-sheet .modal-panel {
    max-width: 512px;
}

.sheet-stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: linear-gradient(to bottom right, var(--accent-soft, var(--muted)), var(--to, var(--border)));
}

.sheet-stage svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .15;
}

.sheet-stage .sheet-emoji {
    font-size: 96px;
}

.stage-note {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-size: 14px;
    font-style: italic;
    font-weight: 600;
    color: rgba(55, 65, 81, .4);
}

.sheet-detail {
    padding: 24px;
}

.sheet-detail > p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.625;
    color: var(--muted-foreground);
}

.sheet-detail-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-sheet .diff-chip {
    padding: 4px 10px;
    font-size: 12px;
}

.sheet-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contest-link {
    font-size: 12px;
    font-weight: 700;
    color: #7C3AED;
}

.contest-link:hover {
    text-decoration: underline;
}

/* .btn is display:inline-flex, which outranks the browser's own [hidden] rule - the overlay's
   download link is hidden that way when a sheet has no file. Same reason as .modal[hidden]. */
.btn[hidden] {
    display: none;
}

/* ------------------------------------------------------------------ article detail */

.article-page {
    max-width: 768px;
    margin-inline: auto;
    padding: 32px 16px;
}

@media (min-width: 640px) {
    .article-page { padding-inline: 24px; }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted-foreground);
    transition: color .15s;
}

.back-link:hover {
    color: var(--primary);
}

.article-page .meta-row {
    gap: 12px;
    margin-bottom: 16px;
}

.article-page .chip {
    padding: 6px 12px;
}

.article-page .meta-dim {
    font-size: 14px;
}

.article-page h1 {
    margin-bottom: 16px;
    font-weight: 900;
    font-size: 30px;
    line-height: 1.25;
}

@media (min-width: 640px) {
    .article-page h1 { font-size: 36px; }
}

.article-page .byline {
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-foreground);
}

.article-hero {
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--border);
}

.article-hero img {
    width: 100%;
    height: 256px;
    object-fit: cover;
}

@media (min-width: 640px) {
    .article-hero img { height: 320px; }
}

.article-page .lede {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 2;
    color: var(--foreground);
}

.article-page .body {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 2;
    color: var(--nav-ink);
}

.takeaway {
    margin-block: 32px;
    padding: 24px;
    border-radius: 16px;
    background: var(--secondary);
    border: 1px solid var(--secondary-border);
}

.takeaway h3 {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.takeaway p {
    font-size: 16px;
    line-height: 1.625;
    color: var(--foreground);
}

.related {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.related h3 {
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.related-card {
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: box-shadow .15s;
}

.related-card:hover {
    box-shadow: var(--shadow-md);
}

.related-card img {
    width: 100%;
    height: 128px;
    object-fit: cover;
    transition: transform .5s;
}

.related-card:hover img {
    transform: scale(1.05);
}

.related-card > div {
    padding: 16px;
}

.related-card .cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.related-card p {
    margin-top: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.375;
    color: var(--foreground);
}

/* ------------------------------------------------------------------ videos */

.page-head-indigo { background: linear-gradient(to right, #1E1B4B, #4C1D95); }

.filter-bar-purple a.is-active {
    background: #4C1D95;
    color: #fff;
}

.filter-bar-purple a:hover {
    background: #F3EEFF;
    color: #4C1D95;
}

.chip-cartoon {
    background: #F3EEFF;
    color: #7C3AED;
}

.chip-neutral {
    background: var(--muted);
    color: var(--muted-foreground);
    font-weight: 600;
    padding: 6px 12px;
}

.video-featured {
    box-shadow: var(--shadow-sm);
}

.video-featured .featured-media {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: var(--foreground);
    cursor: pointer;
}

.video-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--foreground);
}

.video-featured .video-thumb {
    aspect-ratio: 16 / 9;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .9;
    transition: transform .5s;
}

.video-featured .video-thumb:hover img,
.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    transition: transform .15s;
}

.play-badge-lg {
    width: 64px;
    height: 64px;
    background: #fff;
    box-shadow: var(--shadow-2xl);
}

.video-thumb:hover .play-badge,
.video-card:hover .play-badge {
    transform: translate(-50%, -50%) scale(1.1);
}

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.duration-sm {
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
}

.video-featured .featured-body .meta-row + h2 {
    margin-bottom: 12px;
}

.video-featured .featured-body > p {
    margin-bottom: 20px;
}

.watch-now {
    margin-top: 24px;
    align-self: flex-start;
    padding: 12px 20px;
}

.video-grid {
    gap: 20px;
}

.video-card {
    padding: 0;
    border: 1px solid var(--border);
    text-align: left;
    background: var(--card);
}

.video-card .card-media {
    aspect-ratio: 16 / 9;
    display: block;
}

.video-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.video-card .meta-row {
    margin-bottom: 8px;
}

.video-title {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.375;
    color: var(--foreground);
}

.video-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.625;
    color: var(--muted-foreground);
}

/* player overlay - a bare panel on a dark backdrop, not the boxed modal the comics use */

.modal-video {
    background: rgba(0, 0, 0, .9);
}

.video-panel {
    width: 100%;
    max-width: 768px;
}

.video-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.video-head h3 {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
}

.modal-video .tool-btn {
    border-radius: 12px;
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #0A1A18;
}

.video-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .6;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.video-overlay p {
    font-size: 14px;
    color: rgba(255, 255, 255, .7);
}

.play-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .2);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
}

.video-caption {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
}

.stub .glyph {
    font-size: 48px;
    margin-bottom: 16px;
}

.fineprint-dark {
    margin-top: -16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--muted-foreground);
}

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