/* ============================================================================
   printablecoloringpages.ai - design system
   ----------------------------------------------------------------------------
   CONCEPT
   A coloring page is pure black line art on white. The page must stay the
   hero, so the CANVAS is paper and the COLOUR lives in the chrome: the site is
   the crayon box around a blank sheet.

   Brand hue is TANGERINE (#E8590C family) - deliberately not the green this
   codebase was forked from, not kids-site primary red/blue/yellow, and not any
   incumbent's colour (Crayola red/green, SuperColoring blue, ColorBliss purple,
   Monday Mandala muted neutrals).

   TOKENS - every custom property is `--pcp-*`. Nothing is named for a colour
   it no longer is. Dark theme re-declares the same tokens under
   `:root[data-theme="dark"]`; components never hard-code a hex.

   ACCESSIBILITY - every text-on-colour pairing below is measured, not guessed.
   The eight crayon accents each ship a `-tint` surface and a `-ink` text colour
   that clears WCAG AA (>= 4.9:1) in both themes. Focus is always visible, tap
   targets are >= 44px, and every transition is disabled under
   `prefers-reduced-motion`.

   Loaded AFTER vendor Bootstrap 5.3 - this sheet layers on top of it.
   System font stack only; no web font is ever fetched.

   ----------------------------------------------------------------------------
   COMPONENT INDEX (the `.pcp-*` set is the shared vocabulary - use these
   instead of inventing new class names):

     .pcp-modes            wrapper for the dual-mode hero control
     .pcp-mode-toggle      segmented tablist (ships `hidden`, JS unhides)
     .pcp-mode-btn         one segment; active state = `aria-selected="true"`
     .pcp-mode-panel       one tabpanel; hide the inactive one with `hidden`
     .pcp-mode-hint        small reassurance line under a panel
     .pcp-prompt           the AI prompt form (label + textarea + actions)
     .pcp-prompt-actions   submit + secondary link row inside .pcp-prompt
     .pcp-prompt-more      the quiet "more options" link
     .pcp-prompt-box       a standalone large textarea (full generator page)
     .pcp-visibility       fieldset of radio rows (public / private)
     .pcp-empty            empty / zero-result state, carries the make-CTA
     .pcp-rated-cell       grid cell = card + a rating line underneath
     .pcp-rating           that rating line
     .pcp-theme-btn        light/dark toggle in the navbar
     .pcp-cat-menu         the navbar Categories dropdown
     .pcp-crayon-rail      the 8-colour strip used as a brand device
     .pcp-footer           footer grid
     .pcp-wordmark         the type half of the logo

   Inherited class names still in the templates (cf-grid, cf-card, cf-thumb,
   cf-cattile, cp-hub, bf-hero, bf-search, api-teaser ...) are kept because
   other templates and pages.js depend on them; only their looks changed.
   ============================================================================ */

/* ---------------------------------------------------------------- tokens -- */
:root {
    /* ink */
    --pcp-ink:        #1B1714;   /* headings, on paper: 17.81:1 */
    --pcp-body:       #4A423C;   /* body copy, on paper:  9.83:1 */
    --pcp-muted:      #6E645C;   /* secondary, on paper:  5.77:1 */

    /* paper */
    --pcp-paper:      #FFFFFF;   /* the sheet - always white, both themes */
    --pcp-canvas:     #FFFFFF;   /* page background */
    --pcp-surface:    #FFFFFF;   /* cards, popovers */
    --pcp-mat:        #F7F1E7;   /* warm band behind sheets + alt sections */
    --pcp-mat-2:      #EFE6D8;
    --pcp-line:       #E7DECF;
    --pcp-line-strong:#D8CDBC;
    --pcp-sheet-edge: #E4DBCC;   /* hairline drawn around a white thumbnail */

    /* brand - tangerine */
    --pcp-brand:      #E8590C;   /* identity hue: rails, stripes, focus */
    --pcp-brand-600:  #C2410C;   /* solid buttons, white text  5.18:1 */
    --pcp-brand-700:  #A63A06;   /* hover                      6.50:1 */
    --pcp-brand-ink:  #B34809;   /* links on paper             5.46:1 */
    --pcp-brand-tint: #FCF1EB;
    --pcp-brand-tint2:#F8DECD;

    /* crayon box - 8 accents, each with a tint surface and an AA ink */
    --pcp-crayon-1:  #DF590C; --pcp-crayon-1-tint: #FCF1EB; --pcp-crayon-1-line: #EDD7CA; --pcp-crayon-1-ink: #B34809;
    --pcp-crayon-2:  #E1A009; --pcp-crayon-2-tint: #FCF7EB; --pcp-crayon-2-line: #EDE3C9; --pcp-crayon-2-ink: #8C6306;
    --pcp-crayon-3:  #CA2154; --pcp-crayon-3-tint: #FBEDF1; --pcp-crayon-3-line: #E9CDD6; --pcp-crayon-3-ink: #C52052;
    --pcp-crayon-4:  #7A2DBE; --pcp-crayon-4-tint: #F4EDFA; --pcp-crayon-4-line: #DCCFE7; --pcp-crayon-4-ink: #8530CF;
    --pcp-crayon-5:  #175FD3; --pcp-crayon-5-tint: #ECF2FB; --pcp-crayon-5-line: #CCD8EB; --pcp-crayon-5-ink: #1861D8;
    --pcp-crayon-6:  #12C5D9; --pcp-crayon-6-tint: #EBFAFC; --pcp-crayon-6-line: #CBE9EC; --pcp-crayon-6-ink: #0B7682;
    --pcp-crayon-7:  #35B635; --pcp-crayon-7-tint: #EEF9EE; --pcp-crayon-7-line: #D1E6D1; --pcp-crayon-7-ink: #247B24;
    --pcp-crayon-8:  #B635B6; --pcp-crayon-8-tint: #F9EEF9; --pcp-crayon-8-line: #E6D1E6; --pcp-crayon-8-ink: #AA31AA;

    /* shape */
    --pcp-r-xl:  22px;
    --pcp-r-lg:  18px;
    --pcp-r:     14px;
    --pcp-r-sm:  10px;
    --pcp-pill:  999px;

    /* depth - warm shadows, never blue-grey */
    --pcp-shadow-sm: 0 1px 2px rgba(27,23,20,.06), 0 1px 3px rgba(27,23,20,.05);
    --pcp-shadow:    0 4px 18px rgba(27,23,20,.09);
    --pcp-shadow-lg: 0 18px 44px rgba(27,23,20,.16);
    --pcp-shadow-brand: 0 8px 22px rgba(194,65,12,.28);
    /* the treatment that keeps a white thumbnail from dissolving into the page */
    --pcp-sheet: 0 0 0 1px var(--pcp-sheet-edge), 0 1px 2px rgba(27,23,20,.10),
                 0 10px 18px -10px rgba(27,23,20,.35);
    --pcp-sheet-hi: 0 0 0 1px var(--pcp-sheet-edge), 0 2px 4px rgba(27,23,20,.12),
                 0 16px 26px -12px rgba(27,23,20,.42);

    --pcp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --pcp-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
                "Liberation Mono", monospace;

    --pcp-nav-bg: rgba(255,255,255,.90);

    /* ---- compatibility shim -------------------------------------------
       index.html and shared/rating-schema.html (owned by other work) still
       read these four. They are aliases now, not sources of truth - never
       add a new one, and never store a colour in a `--bf-*` name again. */
    --bf-bg:     var(--pcp-mat);
    --bf-border: var(--pcp-line);
    --bf-ink:    var(--pcp-ink);
    --bf-body:   var(--pcp-body);
    --bf-muted:  var(--pcp-muted);
}

/* ---------------------------------------------------------- dark theme --
   Same token names, different values: every component flips with them. The
   pre-paint script in base.html sets data-theme on <html> from localStorage
   (`pcp_theme`) so there is no flash of the wrong theme.
   One rule is absolute: a coloring-page thumbnail stays WHITE PAPER in both
   themes. Inverting the artwork would be inverting the product. */
:root[data-theme="dark"] {
    --pcp-ink:        #F5F0E9;   /* on canvas: 16.75:1 */
    --pcp-body:       #C6BDB3;   /* on canvas: 10.24:1 */
    --pcp-muted:      #9A9088;   /* on canvas:  6.07:1 */

    --pcp-canvas:     #12100E;
    --pcp-surface:    #1B1815;
    --pcp-mat:        #191614;
    --pcp-mat-2:      #232019;
    --pcp-line:       #322C25;
    --pcp-line-strong:#443C33;
    --pcp-sheet-edge: rgba(0,0,0,.5);

    --pcp-brand-ink:  #FF8A3D;   /* links on canvas: 8.10:1 */
    --pcp-brand-tint: #281B13;
    --pcp-brand-tint2:#3A2517;

    --pcp-crayon-1-tint: #281B13; --pcp-crayon-1-line: #4A3326; --pcp-crayon-1-ink: #EA6112;
    --pcp-crayon-2-tint: #282113; --pcp-crayon-2-line: #4A3F26; --pcp-crayon-2-ink: #D79B0E;
    --pcp-crayon-3-tint: #281319; --pcp-crayon-3-line: #4A2631; --pcp-crayon-3-ink: #E05880;
    --pcp-crayon-4-tint: #1E1328; --pcp-crayon-4-line: #39264A; --pcp-crayon-4-ink: #A76DD9;
    --pcp-crayon-5-tint: #131B28; --pcp-crayon-5-line: #26344A; --pcp-crayon-5-ink: #4E88E7;
    --pcp-crayon-6-tint: #132628; --pcp-crayon-6-line: #26464A; --pcp-crayon-6-ink: #16BDCF;
    --pcp-crayon-7-tint: #132813; --pcp-crayon-7-line: #264A26; --pcp-crayon-7-ink: #37AF37;
    --pcp-crayon-8-tint: #281328; --pcp-crayon-8-line: #4A264A; --pcp-crayon-8-ink: #CC5CCC;

    --pcp-shadow-sm: 0 1px 2px rgba(0,0,0,.45);
    --pcp-shadow:    0 6px 22px rgba(0,0,0,.5);
    --pcp-shadow-lg: 0 18px 48px rgba(0,0,0,.62);
    --pcp-sheet:    0 0 0 1px rgba(0,0,0,.55), 0 10px 22px -10px rgba(0,0,0,.8);
    --pcp-sheet-hi: 0 0 0 1px rgba(0,0,0,.55), 0 18px 30px -12px rgba(0,0,0,.9);

    --pcp-nav-bg: rgba(18,16,14,.92);
    color-scheme: dark;
}

/* Bootstrap + native surfaces that don't read our tokens. */
:root[data-theme="dark"] .dropdown-menu { background: var(--pcp-surface); border-color: var(--pcp-line); }
:root[data-theme="dark"] .dropdown-item { color: var(--pcp-body); }
:root[data-theme="dark"] .dropdown-divider { border-color: var(--pcp-line); }
:root[data-theme="dark"] .navbar-toggler-icon { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .card { background: var(--pcp-surface); }
:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] textarea { background: var(--pcp-surface); color: var(--pcp-ink); }
:root[data-theme="dark"] .form-control::placeholder { color: var(--pcp-muted); }
:root[data-theme="dark"] .accordion-item,
:root[data-theme="dark"] .accordion-button { background: var(--pcp-surface); color: var(--pcp-ink); }
:root[data-theme="dark"] .accordion-button::after { filter: invert(1); }
:root[data-theme="dark"] .table { color: var(--pcp-body); }
:root[data-theme="dark"] .btn-outline-secondary { color: var(--pcp-body); border-color: var(--pcp-line-strong); }
:root[data-theme="dark"] .btn-light { background: var(--pcp-mat-2); color: var(--pcp-ink); }

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--pcp-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pcp-body);
    background: var(--pcp-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }

/* Type scale: one confident jump per level, tight tracking on the big end. */
h1, h2, h3, h4, h5, h6 { color: var(--pcp-ink); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); letter-spacing: -0.028em; line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; letter-spacing: -0.014em; }
h4, .h4 { letter-spacing: -0.014em; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--pcp-body); line-height: 1.55; }

a { color: var(--pcp-brand-ink); text-decoration: none; }
a:hover { color: var(--pcp-brand-700); text-decoration: underline; }
:root[data-theme="dark"] a:hover { color: #FFA76B; }

.text-muted { color: var(--pcp-muted) !important; }
.text-secondary { color: var(--pcp-muted) !important; }
hr { border-color: var(--pcp-line); opacity: 1; }
code, pre, kbd { font-family: var(--pcp-font-mono); }
::selection { background: var(--pcp-brand-tint2); color: var(--pcp-ink); }

/* One focus treatment, everywhere, always visible. Tangerine on paper is
   3.35:1 and on the dark canvas 5.0:1 - both clear the 3:1 non-text floor. */
:focus-visible {
    outline: 3px solid var(--pcp-brand);
    outline-offset: 2px;
    border-radius: 4px;
}
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible {
    outline: 3px solid var(--pcp-brand);
    outline-offset: 2px;
    box-shadow: none;
}

/* The brand device: a strip of the crayon box. Used under the hero, on top of
   the empty state, and above the footer. */
.pcp-crayon-rail,
.bf-hero::after,
.pcp-empty::before {
    background: linear-gradient(90deg,
        var(--pcp-crayon-1) 0 12.5%, var(--pcp-crayon-2) 12.5% 25%,
        var(--pcp-crayon-3) 25% 37.5%,  var(--pcp-crayon-4) 37.5% 50%,
        var(--pcp-crayon-5) 50% 62.5%,  var(--pcp-crayon-6) 62.5% 75%,
        var(--pcp-crayon-7) 75% 87.5%,  var(--pcp-crayon-8) 87.5% 100%);
}
.pcp-crayon-rail { height: 5px; border-radius: var(--pcp-pill); }

/* --------------------------------------------------------------- navbar -- */
.navbar.site-nav {
    background: var(--pcp-nav-bg) !important;
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--pcp-line);
    padding-top: .5rem;
    padding-bottom: .5rem;
}
.navbar.site-nav .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding-top: .25rem;
    padding-bottom: .25rem;
}
.navbar.site-nav .navbar-brand svg { display: block; flex: 0 0 auto; }

/* Wordmark: heavy, tight, ink - with a crayon underline that ties the type to
   the mark. Sized off the parent so the footer copy can be smaller. */
.pcp-wordmark {
    position: relative;
    font-weight: 800;
    font-size: 1.16rem;
    letter-spacing: -0.035em;
    color: var(--pcp-ink);
    white-space: nowrap;
}
.pcp-wordmark::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 3px;
    border-radius: 2px;
    background: var(--pcp-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
}
.navbar-brand:hover .pcp-wordmark::after,
.pcp-footer-logo:hover .pcp-wordmark::after { transform: scaleX(1); }
.navbar-brand:hover, .pcp-footer-logo:hover { text-decoration: none; }

.navbar.site-nav .nav-link {
    color: #3F3730;                 /* 11.66:1 on paper */
    font-weight: 500;
    border-radius: 9px;
    padding: .5rem .75rem !important;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}
:root[data-theme="dark"] .navbar.site-nav .nav-link { color: #CFC6BC; }
.navbar.site-nav .nav-link:hover { color: var(--pcp-brand-ink); background: var(--pcp-brand-tint); }
.navbar.site-nav .nav-link.active {
    color: var(--pcp-brand-ink);
    font-weight: 700;
    background: var(--pcp-brand-tint);
}
.navbar.site-nav .navbar-toggler { border: 0; padding: .35rem .5rem; }
.navbar.site-nav .navbar-toggler:focus { box-shadow: none; }
.navbar.site-nav .btn { min-height: 44px; }

.pcp-theme-btn {
    background: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    cursor: pointer;
    color: inherit;
}
:root[data-theme="light"] .pcp-icon-sun { display: none; }
:root[data-theme="dark"] .pcp-icon-moon { display: none; }

/* Categories dropdown - eight hubs and a way out, never the whole taxonomy.
   Two columns on desktop so it stays one short block. */
.dropdown-menu {
    border-color: var(--pcp-line);
    border-radius: var(--pcp-r);
    box-shadow: var(--pcp-shadow);
    padding: .4rem;
}
.dropdown-item {
    border-radius: 8px;
    padding: .5rem .7rem;
    font-weight: 500;
    color: var(--pcp-body);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--pcp-brand-tint); color: var(--pcp-brand-ink); }
.pcp-cat-menu .pcp-cat-cols {
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (min-width: 992px) {
    .pcp-cat-menu { min-width: 380px; }
    .pcp-cat-menu .pcp-cat-cols { columns: 2; column-gap: .25rem; }
    .pcp-cat-menu .pcp-cat-cols li { break-inside: avoid; }
}
.pcp-cat-all { font-weight: 700; color: var(--pcp-brand-ink); }

/* -------------------------------------------------------------- buttons -- */
.btn {
    font-weight: 600;
    border-radius: var(--pcp-r-sm);
    padding: .6rem 1.2rem;
    min-height: 44px;
    transition: transform .12s ease, box-shadow .2s ease, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.05rem; border-radius: 13px; }
.btn-sm { min-height: 36px; padding: .35rem .8rem; }
.btn-primary {
    background: var(--pcp-brand-600);
    border-color: var(--pcp-brand-600);
    color: #fff;
    box-shadow: 0 1px 2px rgba(194,65,12,.28);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--pcp-brand-700) !important;
    border-color: var(--pcp-brand-700) !important;
    color: #fff;
    box-shadow: var(--pcp-shadow-brand);
}
.btn-outline-primary {
    color: var(--pcp-brand-ink);
    border-color: var(--pcp-line-strong);
    background: var(--pcp-surface);
}
.btn-outline-primary:hover {
    background: var(--pcp-brand-600);
    border-color: var(--pcp-brand-600);
    color: #fff;
}
.btn-outline-secondary {
    color: var(--pcp-body);
    border-color: var(--pcp-line-strong);
}
.btn-outline-secondary:hover {
    background: var(--pcp-mat-2);
    border-color: var(--pcp-line-strong);
    color: var(--pcp-ink);
}
.btn-light { background: var(--pcp-paper); color: var(--pcp-ink); border: 0; font-weight: 700; }

/* ---------------------------------------------------------------- forms -- */
.form-control, .form-select {
    border-radius: var(--pcp-r-sm);
    border: 1.5px solid var(--pcp-line-strong);
    padding: .65rem .9rem;
    min-height: 44px;
    color: var(--pcp-ink);
    background-color: var(--pcp-surface);
}
.form-control::placeholder { color: var(--pcp-muted); opacity: 1; }
.form-control:focus, .form-select:focus {
    border-color: var(--pcp-brand);
    box-shadow: 0 0 0 4px rgba(232,89,12,.16);
}
.form-control-lg { padding: .9rem 1.05rem; border-radius: 13px; }
.form-label { font-weight: 600; color: var(--pcp-ink); margin-bottom: .35rem; }
.form-text { color: var(--pcp-muted); }
.form-check-input:checked { background-color: var(--pcp-brand-600); border-color: var(--pcp-brand-600); }
.form-check-input:focus { border-color: var(--pcp-brand); box-shadow: 0 0 0 4px rgba(232,89,12,.16); }

/* ----------------------------------------------------------------- hero -- */
.bf-hero {
    position: relative;
    background:
        radial-gradient(900px 420px at 50% -160px, var(--pcp-brand-tint), transparent 72%),
        var(--pcp-canvas);
    padding: 3.25rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--pcp-line);
}
.bf-hero::after {           /* crayon rail along the bottom edge */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 4px;
}
.bf-hero h1 {
    font-size: clamp(2rem, 5vw, 3.15rem);
    letter-spacing: -0.035em;
    margin: 0 auto 1rem;
    max-width: 22ch;
    text-wrap: balance;
}
.bf-hero .lead { max-width: 620px; margin: 0 auto; color: var(--pcp-body); }
.bf-hero .lead strong { color: var(--pcp-ink); }

.bf-trust {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem 1.35rem;
    color: var(--pcp-muted);
    font-size: .9rem;
    font-weight: 500;
}
.bf-trust span { display: inline-flex; align-items: center; gap: .35rem; }
.bf-trust span::before {
    content: "\2713";
    color: var(--pcp-brand-ink);
    font-weight: 800;
}

/* ------------------------------------------- dual-mode hero control -------
   Two ways in (make one / find one) sharing one block of space. Both forms
   are in the DOM server-side; JS only reveals the tablist and hides the panel
   that is not current. Nothing here depends on JS having run. */
.pcp-modes { max-width: 680px; margin: 1.9rem auto 0; }

.pcp-mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin: 0 auto 1rem;
    background: var(--pcp-mat);
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-pill);
}
.pcp-mode-btn {
    appearance: none;
    border: 0;
    background: transparent;
    border-radius: var(--pcp-pill);
    min-height: 44px;
    padding: .55rem 1.5rem;
    font: inherit;
    font-weight: 600;
    color: var(--pcp-body);
    cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.pcp-mode-btn:hover { color: var(--pcp-ink); }
.pcp-mode-btn[aria-selected="true"] {
    background: var(--pcp-brand-600);   /* white on #C2410C = 5.18:1 */
    color: #fff;
    box-shadow: 0 1px 2px rgba(194,65,12,.35);
}
.pcp-mode-panel { text-align: left; }
.pcp-mode-panel:focus { outline: none; }
.pcp-mode-hint {
    margin-top: .75rem;
    text-align: center;
    color: var(--pcp-muted) !important;
}

/* The prompt box: a sheet of paper you write on, not a form field. */
.pcp-prompt {
    background: var(--pcp-surface);
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r-lg);
    box-shadow: var(--pcp-shadow);
    padding: .95rem 1rem .85rem;
    text-align: left;
}
.pcp-prompt:focus-within {
    border-color: var(--pcp-brand);
    box-shadow: var(--pcp-shadow), 0 0 0 4px rgba(232,89,12,.14);
}
.pcp-prompt .form-label {
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pcp-muted);
    margin-bottom: .3rem;
}
.pcp-prompt textarea.form-control {
    border: 0;
    background: transparent;
    box-shadow: none !important;
    padding: .1rem .1rem .55rem;
    min-height: 0;
    font-size: 1.1rem;
    line-height: 1.45;
    color: var(--pcp-ink);
    resize: vertical;
}
.pcp-prompt textarea.form-control:focus { outline: none; }
.pcp-prompt-actions {
    display: flex;
    align-items: center;
    gap: .5rem 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--pcp-line);
    padding-top: .8rem;
}
.pcp-prompt-actions .btn { flex: 0 0 auto; }
.pcp-prompt-more { font-size: .88rem; color: var(--pcp-muted); font-weight: 500; }
.pcp-prompt-more:hover { color: var(--pcp-brand-ink); }

/* Standalone big textarea on the full generator page. */
.pcp-prompt-box { min-height: 118px; font-size: 1.05rem; line-height: 1.5; }

.pcp-visibility {
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r);
    padding: .9rem 1rem .75rem;
    background: var(--pcp-mat);
}
.pcp-visibility legend { float: none; width: auto; font-size: .95rem; margin-bottom: .5rem; }
.pcp-visibility .form-check { padding: .35rem .25rem .35rem 1.9rem; }
.pcp-visibility .form-check-label { cursor: pointer; }

/* Search pill - hero "find" mode and every other search surface. */
.bf-search {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .4rem;
    background: var(--pcp-surface);
    border-radius: var(--pcp-pill);
    box-shadow: var(--pcp-shadow), 0 0 0 1px var(--pcp-line);
    padding: .35rem .35rem .35rem 1.1rem;
}
.bf-search:focus-within { box-shadow: var(--pcp-shadow), 0 0 0 2px var(--pcp-brand); }
.bf-search .form-control {
    border: 0;
    background: transparent;
    box-shadow: none !important;
    font-size: 1.05rem;
    padding-left: .25rem;
    min-width: 0;
    flex: 1 1 auto;
}
.bf-search .btn { border-radius: var(--pcp-pill); white-space: nowrap; flex: 0 0 auto; }

.cp-filter {
    display: flex;
    gap: .5rem;
    max-width: 560px;
    margin-inline: auto;
}
.cp-filter .form-control { border-radius: var(--pcp-pill); padding-left: 1.05rem; }
.cp-filter .btn { border-radius: var(--pcp-pill); }

/* ------------------------------------------------------- section rhythm -- */
.bf-section { padding: 3.25rem 0; }
.bf-section-tight { padding: 2.5rem 0; }
.section-head { margin-bottom: 1.6rem; }
.section-head .sub { color: var(--pcp-muted); margin: 0; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .76rem;
    font-weight: 800;
    color: var(--pcp-brand-ink);
    margin-bottom: .45rem;
}
.page-header { margin-bottom: 1.5rem; }

/* ------------------------------------------------- the coloring-page card --
   THE component. A coloring page is black line art on white, so a naive card
   is a white rectangle on a white page: the grid dissolves. Three things fix
   it and all three are needed.
     1. the thumbnail sits on a warm MAT, not on the page background;
     2. the artwork itself is drawn as a SHEET - white fill, hairline ring,
        and a soft drop shadow - so it reads as a physical piece of paper;
     3. the card carries its own border and elevation.
   Aspect ratio follows the real render (400x518), so the sheet nearly fills
   the well and there is no dead letterboxing. */
.cf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 16px;
}
@media (max-width: 575.98px) { .cf-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.cf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--pcp-surface);
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r);
    box-shadow: var(--pcp-shadow-sm);
    overflow: hidden;
    transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.cf-card:hover,
.cf-card:focus-within {
    transform: translateY(-3px);
    border-color: var(--pcp-brand-tint2);
    box-shadow: var(--pcp-shadow);
}
.cf-card .cf-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    padding: 9% 10%;
    background: var(--pcp-mat);
    border-bottom: 1px solid var(--pcp-line);
}
.cf-card .cf-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background-color: #FFFFFF;      /* the sheet, in both themes */
    border-radius: 2px;
    box-shadow: var(--pcp-sheet);
    transition: transform .18s ease, box-shadow .2s ease;
    /* placeholder until pages.js flips .is-loaded: a faint page-with-heart,
       the brand mark reduced to one stroke. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E3C7B4' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='4' y='2.5' width='16' height='19' rx='2'/%3E%3Cpath d='M12 17.5c-4-3-5-4.7-5-6.3 0-1.7 1.3-2.7 2.6-2.7 1 0 1.8.5 2.4 1.3.6-.8 1.4-1.3 2.4-1.3 1.3 0 2.6 1 2.6 2.7 0 1.6-1 3.3-5 6.3z'/%3E%3C/svg%3E");
    background-position: center;
    background-size: 40%;
    background-repeat: no-repeat;
}
.cf-card .cf-thumb img.is-loaded { background-image: none; }
.cf-card:hover .cf-thumb img { transform: translateY(-2px) scale(1.02); box-shadow: var(--pcp-sheet-hi); }

.cf-card .cf-name {
    display: block;
    padding: .6rem .8rem .7rem;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pcp-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cf-card .cf-name:hover { color: var(--pcp-brand-ink); text-decoration: none; }

/* Download chips, revealed on hover, always visible on touch. */
.cf-card .cf-quick {
    position: absolute;
    top: 8px; right: 8px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s, transform .18s;
}
.cf-card:hover .cf-quick, .cf-card:focus-within .cf-quick { opacity: 1; transform: translateY(0); }
@media (hover: none) { .cf-card .cf-quick { opacity: 1; transform: none; } }
.cf-quick a {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .03em;
    background: rgba(27,23,20,.86);
    color: #fff !important;
    backdrop-filter: blur(2px);
}
.cf-quick a:hover { background: var(--pcp-brand-600); text-decoration: none; }

/* Card + rating line as one grid cell. */
.pcp-rated-cell { display: flex; flex-direction: column; gap: .45rem; height: 100%; }
.pcp-rated-cell .cf-card { flex: 1 1 auto; }
.pcp-rating { text-align: center; color: var(--pcp-crayon-2-ink) !important; font-weight: 600; }
.pcp-rating .text-muted { font-weight: 500; }

/* ------------------------------------------------ the crayon box (chips) --
   Category tiles and topic hubs cycle through the eight accents, so a browse
   grid reads as a box of crayons rather than a list of links. Each tile is a
   tinted surface + a saturated stripe + AA-clearing ink of the same hue. */
.cf-cattiles,
.cp-hubs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.cf-cattile,
.cp-hub {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    min-height: 48px;
    padding: .6rem .85rem .6rem 1.15rem;
    overflow: hidden;
    border: 1px solid var(--chip-line, var(--pcp-line));
    border-radius: 12px;
    background: var(--chip-tint, var(--pcp-mat));
    color: var(--chip-ink, var(--pcp-ink));
    font-weight: 600;
    font-size: .93rem;
    line-height: 1.3;
    transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
.cf-cattile::before,
.cp-hub::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: var(--chip, var(--pcp-brand));
    transition: width .16s ease;
}
.cf-cattile:hover,
.cp-hub:hover {
    transform: translateY(-2px);
    box-shadow: var(--pcp-shadow-sm);
    color: var(--chip-ink, var(--pcp-ink));
    text-decoration: none;
}
.cf-cattile:hover::before,
.cp-hub:hover::before { width: 9px; }
.cf-cattile .n,
.cp-hub-count {
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 700;
    opacity: .72;
}
.cp-hub-name { min-width: 0; }
.cp-hub-lede { display: block; width: 100%; font-size: .85rem; color: var(--pcp-muted); }

.cf-cattiles > *:nth-child(8n+1), .cp-hubs > *:nth-child(8n+1) { --chip: var(--pcp-crayon-1); --chip-tint: var(--pcp-crayon-1-tint); --chip-line: var(--pcp-crayon-1-line); --chip-ink: var(--pcp-crayon-1-ink); }
.cf-cattiles > *:nth-child(8n+2), .cp-hubs > *:nth-child(8n+2) { --chip: var(--pcp-crayon-2); --chip-tint: var(--pcp-crayon-2-tint); --chip-line: var(--pcp-crayon-2-line); --chip-ink: var(--pcp-crayon-2-ink); }
.cf-cattiles > *:nth-child(8n+3), .cp-hubs > *:nth-child(8n+3) { --chip: var(--pcp-crayon-3); --chip-tint: var(--pcp-crayon-3-tint); --chip-line: var(--pcp-crayon-3-line); --chip-ink: var(--pcp-crayon-3-ink); }
.cf-cattiles > *:nth-child(8n+4), .cp-hubs > *:nth-child(8n+4) { --chip: var(--pcp-crayon-4); --chip-tint: var(--pcp-crayon-4-tint); --chip-line: var(--pcp-crayon-4-line); --chip-ink: var(--pcp-crayon-4-ink); }
.cf-cattiles > *:nth-child(8n+5), .cp-hubs > *:nth-child(8n+5) { --chip: var(--pcp-crayon-5); --chip-tint: var(--pcp-crayon-5-tint); --chip-line: var(--pcp-crayon-5-line); --chip-ink: var(--pcp-crayon-5-ink); }
.cf-cattiles > *:nth-child(8n+6), .cp-hubs > *:nth-child(8n+6) { --chip: var(--pcp-crayon-6); --chip-tint: var(--pcp-crayon-6-tint); --chip-line: var(--pcp-crayon-6-line); --chip-ink: var(--pcp-crayon-6-ink); }
.cf-cattiles > *:nth-child(8n+7), .cp-hubs > *:nth-child(8n+7) { --chip: var(--pcp-crayon-7); --chip-tint: var(--pcp-crayon-7-tint); --chip-line: var(--pcp-crayon-7-line); --chip-ink: var(--pcp-crayon-7-ink); }
.cf-cattiles > *:nth-child(8n+8), .cp-hubs > *:nth-child(8n+8) { --chip: var(--pcp-crayon-8); --chip-tint: var(--pcp-crayon-8-tint); --chip-line: var(--pcp-crayon-8-line); --chip-ink: var(--pcp-crayon-8-ink); }

/* Neutral pills + tag chips (filters, related tags). */
.ff-pill, .cf-tags a {
    display: inline-block;
    padding: 6px 14px;
    min-height: 34px;
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-pill);
    font-size: .88rem;
    font-weight: 500;
    color: var(--pcp-body);
    background: var(--pcp-surface);
}
.ff-pill:hover, .cf-tags a:hover {
    background: var(--pcp-brand-tint);
    border-color: var(--pcp-brand-tint2);
    color: var(--pcp-brand-ink);
    text-decoration: none;
}
.ff-pill.active { background: var(--pcp-brand-600); border-color: var(--pcp-brand-600); color: #fff; }
.ff-pill .ff-pill-count { opacity: .65; font-size: .8rem; margin-left: 3px; }
.cf-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------ the empty state --
   A dead end turned into a generation. Deliberately looks like a fresh sheet
   waiting to be drawn on: dashed edge, crayon rail across the top. */
.pcp-empty {
    position: relative;
    max-width: 720px;
    margin-inline: auto;
    padding: 1.75rem 1.25rem 1.5rem;
    text-align: center;
    background: var(--pcp-mat);
    border: 1px dashed var(--pcp-line-strong);
    border-radius: var(--pcp-r-xl);
    overflow: hidden;
}
.pcp-empty::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}
.pcp-empty > .pcp-prompt { text-align: left; background: var(--pcp-surface); }
.pcp-empty .form-label { text-align: left; }

/* ---------------------------------------------------------- detail page -- */
.cf-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: clamp(1rem, 4vw, 2.5rem);
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r-lg);
    background: var(--pcp-mat);
    margin: 0;
}
.cf-stage img {
    max-width: 100%;
    max-height: 560px;
    object-fit: contain;
    background-color: #FFFFFF;
    border-radius: 3px;
    box-shadow: var(--pcp-sheet);
}
/* pages.js toggles .cf-dark to preview the art on a dark mat - the SHEET
   stays white, only the surround changes. */
.cf-stage.cf-dark { background: #211D19; border-color: #2E2924; }
.cf-stage .cf-stage-toggle {
    position: absolute;
    top: 10px; right: 10px;
    border: 1px solid var(--pcp-line-strong);
    background: var(--pcp-surface);
    color: var(--pcp-body);
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 11px;
    cursor: pointer;
}
.cf-stage.cf-dark .cf-stage-toggle { background: #2E2924; color: #E8E1D8; border-color: #433C34; }

.cp-dl .btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; }

/* Measured specs. Two columns, quiet labels, values in ink - the numbers are
   the product claim, so they get the weight. */
.cp-specs {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    font-size: .93rem;
    margin: 0 0 1.25rem;
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r);
    overflow: hidden;
}
.cp-specs dt,
.cp-specs dd {
    padding: .5rem .85rem;
    border-bottom: 1px solid var(--pcp-line);
    margin: 0;
}
.cp-specs dt { color: var(--pcp-muted); font-weight: 500; background: var(--pcp-mat); white-space: nowrap; }
.cp-specs dd { color: var(--pcp-ink); font-weight: 600; }
.cp-specs dt:nth-last-of-type(1), .cp-specs dd:nth-last-of-type(1) { border-bottom: 0; }

/* Body prose: one measure, generous leading. */
.cp-prose { max-width: 68ch; color: var(--pcp-body); }
.cp-prose p { line-height: 1.72; margin-bottom: 1rem; }
.cp-prose h2 { margin-top: 2rem; }
.cp-prose ul, .cp-prose ol { line-height: 1.7; }
.cp-genform { max-width: 640px; }
.cp-steps li, .cp-tests li, .cp-team li { margin-bottom: .9rem; }
.cp-tests, .cp-team { padding-left: 1.1rem; }
.cp-avatar { border-radius: 50%; object-fit: cover; }

/* Copy-to-clipboard rows. */
.cf-snippet {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--pcp-mat);
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r-sm);
    padding: .5rem .75rem;
    font-size: .85rem;
}
.cf-snippet code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pcp-body); }
.cf-copybtn {
    border: 1px solid var(--pcp-line-strong);
    background: var(--pcp-surface);
    color: var(--pcp-body);
    border-radius: 7px;
    font-size: .75rem;
    font-weight: 700;
    padding: 5px 11px;
    cursor: pointer;
    white-space: nowrap;
}
.cf-copybtn:hover { background: var(--pcp-brand-tint); border-color: var(--pcp-brand-tint2); color: var(--pcp-brand-ink); }

/* ------------------------------------------------------------- licences -- */
.lic-section {
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r);
    background: var(--pcp-surface);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.15rem;
}
.lic-section h2 { font-size: 1.2rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lic-facts { list-style: none; padding: 0; margin: .75rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .3rem .75rem; }
.lic-facts li { font-size: .92rem; color: var(--pcp-body); }
.lic-facts li::before { font-weight: 800; margin-right: .45rem; }
.lic-facts li.yes::before { content: "\2713"; color: var(--pcp-crayon-7-ink); }
.lic-facts li.no::before  { content: "\2715"; color: var(--pcp-crayon-3-ink); }
.lic-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--pcp-pill);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
    background: var(--pcp-mat-2);
    color: var(--pcp-body);
}
.lic-badge.lic-cc0           { background: var(--pcp-crayon-7-tint); color: var(--pcp-crayon-7-ink); }
.lic-badge.lic-public-domain { background: var(--pcp-crayon-6-tint); color: var(--pcp-crayon-6-ink); }
.lic-badge.lic-cc-by         { background: var(--pcp-crayon-2-tint); color: var(--pcp-crayon-2-ink); }

/* --------------------------------------------------------------- cards ---- */
.card {
    border: 1px solid var(--pcp-line);
    border-radius: var(--pcp-r);
    background: var(--pcp-surface);
    box-shadow: none;
}
.card.shadow-sm { box-shadow: var(--pcp-shadow-sm) !important; }
.side-card { border: 1px solid var(--pcp-line); border-radius: var(--pcp-r); }
.side-card .side-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pcp-muted); font-weight: 800; }
.side-card a.side-link { display: block; padding: .5rem .65rem; border-radius: 8px; color: var(--pcp-body); font-weight: 500; }
.side-card a.side-link:hover { background: var(--pcp-brand-tint); color: var(--pcp-brand-ink); text-decoration: none; }
.onboarding-card { border: 1px solid var(--pcp-line); border-radius: var(--pcp-r-lg); background: var(--pcp-surface); }
.ob-icon { color: var(--pcp-brand-ink); }

/* ------------------------------------------------------------- accordion -- */
.accordion { --bs-accordion-border-color: var(--pcp-line); border-radius: var(--pcp-r); overflow: hidden; }
.accordion-item { border-color: var(--pcp-line); background: var(--pcp-surface); }
.accordion-button { font-weight: 600; color: var(--pcp-ink); padding: 1rem 1.15rem; }
.accordion-button:not(.collapsed) { color: var(--pcp-brand-ink); background: var(--pcp-brand-tint); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { color: var(--pcp-body); }

/* ------------------------------------------------------------ API teaser -- */
.api-teaser {
    background: linear-gradient(135deg, #241E19 0%, #3A2E24 100%);
    border-radius: var(--pcp-r-xl);
    color: #E9E1D8;
    padding: 2.25rem;
}
.api-teaser h2 { color: #fff; }
.api-teaser .eyebrow { color: #FFB07A; }        /* 8.2:1 on #241E19 */
.api-teaser p { color: #D7CCC0; }
.api-teaser pre {
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--pcp-r-sm);
    padding: 1rem 1.1rem;
    margin: 0;
    overflow-x: auto;
}
.api-teaser pre code { color: #FFC79E; font-size: .88rem; }

/* --------------------------------------------------------------- alerts --
   Bootstrap's defaults are blue/green/red from a different palette. These read
   from the crayon tokens, so they flip with the theme and every pairing is the
   measured >= 4.9:1 ink-on-tint. */
.alert { border-radius: var(--pcp-r); border-width: 1px; }
.alert-info      { background: var(--pcp-crayon-5-tint); border-color: var(--pcp-crayon-5-line); color: var(--pcp-crayon-5-ink); }
.alert-warning   { background: var(--pcp-crayon-2-tint); border-color: var(--pcp-crayon-2-line); color: var(--pcp-crayon-2-ink); }
.alert-danger    { background: var(--pcp-crayon-3-tint); border-color: var(--pcp-crayon-3-line); color: var(--pcp-crayon-3-ink); }
.alert-success   { background: var(--pcp-crayon-7-tint); border-color: var(--pcp-crayon-7-line); color: var(--pcp-crayon-7-ink); }
.alert-secondary { background: var(--pcp-mat); border-color: var(--pcp-line); color: var(--pcp-body); }
.alert-primary   { background: var(--pcp-brand-tint); border-color: var(--pcp-brand-tint2); color: var(--pcp-brand-ink); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }

.badge.bg-primary { background: var(--pcp-brand-600) !important; }
.badge.bg-secondary { background: var(--pcp-mat-2) !important; color: var(--pcp-body) !important; }

/* ------------------------------------------------------------- misc bits -- */
.breadcrumb { font-size: .88rem; }
.breadcrumb-item a { color: var(--pcp-muted); }
.breadcrumb-item.active { color: var(--pcp-ink); }
.nav-tabs .nav-link { color: var(--pcp-muted); font-weight: 600; border-radius: 10px 10px 0 0; }
.nav-tabs .nav-link.active { color: var(--pcp-brand-ink); }
pre { border-radius: var(--pcp-r-sm); }
.ff-pager { display: flex; align-items: center; justify-content: center; }
.page-link { color: var(--pcp-brand-ink); }
.page-item.active .page-link { background: var(--pcp-brand-600); border-color: var(--pcp-brand-600); }
.pricing-card { border-radius: var(--pcp-r-lg); transition: transform .2s; }
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured { border: 2px solid var(--pcp-brand); }
.popular-badge { background: var(--pcp-brand-600); color: #fff; }
#card-element { border: 1px solid var(--pcp-line-strong); padding: .75rem; border-radius: var(--pcp-r-sm); }
.hidden { display: none !important; }
.alert ul { margin: 0; padding-left: 1rem; }
.spinner-border-sm { width: 1rem; height: 1rem; }

/* The rating widget's own <style> hard-codes a green "thanks"; this outranks
   it on specificity without touching that template. */
.bf-rate .bf-rate-thanks { color: var(--pcp-crayon-7-ink); }
.bf-rate { border-top: 1px solid var(--pcp-line); }

/* Dropzone injected by tools.js on any file input. */
.bf-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .25rem;
    padding: 2.25rem 1.25rem;
    border: 2px dashed var(--pcp-line-strong);
    border-radius: var(--pcp-r-lg);
    background: var(--pcp-mat);
    cursor: pointer;
    margin-bottom: 1.25rem;
    transition: border-color .15s, background .15s;
}
.bf-dropzone:hover, .bf-dropzone.is-dragover { border-color: var(--pcp-brand); background: var(--pcp-brand-tint); }
.bf-dropzone .dz-title { font-weight: 700; color: var(--pcp-ink); }
.bf-dropzone .dz-title .dz-browse { color: var(--pcp-brand-ink); text-decoration: underline; }
.bf-dropzone .dz-hint { color: var(--pcp-muted); font-size: .9rem; }
.bf-dropzone .dz-file {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--pcp-brand-tint);
    border: 1px solid var(--pcp-brand-tint2);
    border-radius: 9px;
    padding: .5rem .85rem;
    margin: .25rem;
    font-size: .92rem;
    color: var(--pcp-ink);
}
.bf-dropzone .dz-clear { background: none; border: 0; color: var(--pcp-muted); font-size: .85rem; text-decoration: underline; cursor: pointer; }
.btn .bf-spinner {
    display: inline-block;
    width: 1.05em; height: 1.05em;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: .5rem;
    vertical-align: -.15em;
    animation: pcp-spin .7s linear infinite;
}
@keyframes pcp-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- footer --
   Four short columns and a bottom bar. The old footer looped all 32 category
   hubs on every page of the site: that is a wall of links nobody scans and a
   crawl-budget leak. Eight top hubs and a way to the rest. */
footer.site-footer {
    background: var(--pcp-mat);
    border-top: 1px solid var(--pcp-line);
    padding: 2.5rem 0 1.5rem;
}
.pcp-footer {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 1.75rem 2rem;
}
.pcp-footer-logo { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.pcp-footer-logo .pcp-wordmark { font-size: 1.02rem; }
.pcp-footer-tag { color: var(--pcp-muted); font-size: .88rem; max-width: 34ch; margin: 0 0 .8rem; }
.site-footer .ff-fhead {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--pcp-muted);
    font-weight: 800;
    margin-bottom: .55rem;
}
.site-footer .ff-fcol a {
    display: block;
    padding: .22rem 0;
    font-size: .9rem;
    color: var(--pcp-body);
    font-weight: 500;
}
.site-footer .ff-fcol a:hover { color: var(--pcp-brand-ink); }
.pcp-footer-bar {
    margin-top: 2rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--pcp-line);
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    justify-content: center;
    align-items: center;
    font-size: .84rem;
    color: var(--pcp-muted);
    text-align: center;
}
.pcp-footer-bar a { color: var(--pcp-muted); }
.pcp-footer-bar a:hover { color: var(--pcp-brand-ink); }

@media (max-width: 767.98px) {
    .pcp-footer { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .pcp-footer-brand { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------- responsive -- */
@media (max-width: 991.98px) {
    .navbar.site-nav .navbar-nav { padding: .35rem 0; }
    .navbar.site-nav .dropdown-menu { border: 0; box-shadow: none; padding-left: .5rem; }
}
@media (max-width: 767.98px) {
    .bf-hero { padding: 2.5rem 0 2.25rem; }
    .bf-section, .bf-section-tight { padding: 2rem 0; }
    .api-teaser { padding: 1.5rem; }
    .pcp-mode-btn { padding: .55rem 1.15rem; }
    .pcp-prompt-actions .btn { width: 100%; }
    .pcp-prompt-actions { justify-content: center; text-align: center; }
    .cp-specs { font-size: .9rem; }
}
@media (max-width: 479.98px) {
    .bf-search { padding: .3rem .3rem .3rem .85rem; }
    .bf-search .form-control { font-size: 1rem; }
    .bf-search .btn { padding: .55rem .9rem; font-size: .95rem; }
    .cf-cattiles, .cp-hubs { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------ reduced motion --
   Movement is decoration here; nothing depends on it. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .cf-card:hover, .cf-cattile:hover, .cp-hub:hover, .pricing-card:hover { transform: none; }
    .cf-card:hover .cf-thumb img { transform: none; }
}

/* -------------------------------------------------------------- print --
   Somebody will hit Ctrl+P on the page itself. Give them the artwork. */
@media print {
    .navbar.site-nav, .site-footer, .bf-rate, .cf-quick, .pcp-modes, .api-teaser { display: none !important; }
    body { background: #fff; color: #000; }
    .cf-stage { border: 0; background: #fff; padding: 0; }
    .cf-stage img { box-shadow: none; max-height: none; }
}
