/* ===========================================================================
   spine.css — the shared visual system.
   ===========================================================================

   WHY THIS FILE EXISTS

   The redesign landed on index.html only, and it landed *inside* index.html's
   own <style> block. Nothing else could inherit it, so blog.html and books.html
   stayed on the previous violet brand and services.html invented a third
   palette (indigo + orange). Three design languages, one company.

   FR-033 requires the type scale, spacing rhythm, button geometry and footer to
   be identical across surfaces, with only ground, accent and imagery varying.
   That is only enforceable from one file. This is that file.

   It is written by hand, not extracted. Machine-extracting CSS out of
   index.html is what left an unbalanced brace in style.css and silently killed
   every rule after it — CSS never raises an error, it just stops applying.

   LOAD ORDER MATTERS

     <link rel="stylesheet" href="style.css">   <- legacy, still needed
     <link rel="stylesheet" href="spine.css">   <- must come after

   style.css is full of bare element selectors written before the include era
   (`nav`, `nav ul li`, `nav a`). They match the shared chrome and have already
   broken it twice. spine.css loads last so it wins, and every rule here is
   scoped to a class or a token.

   Tailwind's utilities are class selectors (0,1,0) and outrank bare element
   selectors (0,0,1) regardless of order. A page adopting this system must drop
   its `bg-gray-50` / `bg-white` body class, or the ground token will not apply.
   =========================================================================== */


/* ---------------------------------------------------------------------------
   1. Surface tokens

   Three surfaces, one spine. `--kms-accent` is the single knob a component
   reads for "this surface's primary action" — components never name a colour
   directly, so retuning a surface is a token edit, not a component edit.

   Every value carries through to the header, which is why the header can adapt
   to a dark hero (FR-032) without a second set of rules per page.
--------------------------------------------------------------------------- */

:root,
html[data-surface="books"] {
    --kms-paper: #F6FAFB;
    --kms-card: #FFFFFF;
    --kms-ink: #0C2027;
    --kms-ink-2: #3D5560;
    /* 4.64:1 on this surface's paper and 4.87:1 on its cards. It was #6B848F,
       which is 3.76:1 — fine for a caption and a fail for the running text it
       is actually used on (post meta, pagination, blockquote attribution,
       search placeholder). The two dark surfaces below were already clear at
       5.29-6.10:1 and are untouched; this was only ever wrong on the light
       one, which is why the token could not simply be retuned globally. */
    --kms-muted: #5D757E;
    --kms-rule: #DCE8EB;

    --kms-deep: #0B6E82;
    --kms-deep-2: #095A6B;
    --kms-cyan: #12A0BC;
    --kms-gold: #E39B2E;
    --kms-gold-ink: #7A4E05;

    /* Primary action on this surface. */
    --kms-accent: var(--kms-deep);
    --kms-accent-hover: var(--kms-deep-2);
    --kms-accent-ink: #FFFFFF;

    /* Chrome. Split out so a dark surface only overrides these four. */
    --kms-header-bg: rgba(246, 250, 251, 0.9);
    --kms-header-ink: var(--kms-ink);
    --kms-header-ink-2: var(--kms-ink-2);
    --kms-header-rule: var(--kms-rule);

    /* ---- motion tokens (product-motion protocol §2) ----
       Named intents, not one-off durations. Every animated change on this site
       picks one of these; if a component needs another value it needs a stated
       reason next to it. `--kms-motion-instant` exists so reduced-motion and
       urgent state changes can reuse the same declaration rather than
       duplicating the rule. */
    --kms-motion-feedback: 120ms;   /* press, check, small hover ack */
    --kms-motion-micro: 180ms;      /* icon/text swap, badge, field feedback */
    --kms-motion-standard: 240ms;   /* tabs, menus, accordions, content reveal */
    --kms-motion-emphasis: 320ms;   /* modal/panel open, deliberate navigation */
    --kms-motion-instant: 0ms;      /* reduced motion, urgent truth */
    /* Tight decelerating entrance; shorter accelerating exit. */
    --kms-ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
    --kms-ease-exit: cubic-bezier(0.4, 0, 1, 1);

    --kms-display: 'Outfit', 'Outfit Fallback', ui-sans-serif, system-ui, sans-serif;
    --kms-body: 'Inter', 'Inter Fallback', ui-sans-serif, system-ui, -apple-system, sans-serif;

    /* Keyboard focus. Two bands, not one, because a single ring only has to
       meet one ground and a control can sit on any of them: a white card, a
       gold button, a photograph, the deep hero. The cyan ring clears 3:1 on
       this surface's paper (3.10:1) and on both dark surfaces (5.33:1); the
       halo just outside it is the surface's own ink, so wherever the ring
       itself lands on something close to cyan, the halo is what you see.
       SC 2.4.11 asks for 3:1 against ADJACENT colours — two bands is how you
       guarantee that without knowing what is behind the control. */
    --kms-focus: var(--kms-cyan);
    --kms-focus-halo: rgba(12, 32, 39, .92);
}

/* Web Studio — business owners. Deep pool water, cyan light.
   The ground here must match the WebGL scene in pool.js, not merely be dark:
   the canvas fades into it at the edges. */
html[data-surface="web-studio"] {
    --kms-paper: #031C2A;
    --kms-card: #08293A;
    --kms-ink: #EAF6FA;
    --kms-ink-2: #A9C7D4;
    --kms-muted: #7B9EAE;
    --kms-rule: #123A4E;

    --kms-accent: var(--kms-cyan);
    --kms-accent-hover: #35B6D0;
    --kms-accent-ink: #04222E;

    /* Opaque, not 82%. A translucent bar composites whatever is behind it, and
       what is behind it at scroll 0 is the body — white on both money pages,
       whose lower halves really are light. 18% of white was enough to make the
       chrome read as a separate lighter bar sitting ON the hero, which is the
       exact thing FR-032 exists to prevent. Matches the hero's top gradient
       stop. */
    --kms-header-bg: #031C2A;
    --kms-header-ink: #EAF6FA;
    --kms-header-ink-2: #A9C7D4;
    --kms-header-rule: rgba(255, 255, 255, 0.12);
    /* Light halo — the ring's outer band has to clear a DARK ground here. */
    --kms-focus-halo: rgba(234, 246, 250, .92);
}

/* AI Coaching — parents and professionals. Same dark family as Web Studio so
   the two "work with us" surfaces read as siblings, but warmer and a shade
   lighter, with gold rather than cyan as the action colour.

   This replaces an indigo/violet ground with an orange CTA, which shared no
   colour with anything else on the site. */
html[data-surface="ai-coaching"] {
    --kms-paper: #072A33;
    --kms-card: #0C3843;
    --kms-ink: #F2FAFB;
    --kms-ink-2: #B4D0D7;
    --kms-muted: #86A8B2;
    --kms-rule: #164654;

    --kms-accent: var(--kms-gold);
    --kms-accent-hover: #F0AD45;
    --kms-accent-ink: #3A2503;

    --kms-header-bg: #06222B;   /* opaque — see the note on web-studio above */
    --kms-header-ink: #F2FAFB;
    --kms-header-ink-2: #B4D0D7;
    --kms-header-rule: rgba(255, 255, 255, 0.12);
    /* Light halo — the ring's outer band has to clear a DARK ground here. */
    --kms-focus-halo: rgba(234, 246, 250, .92);
}


/* The ground BEHIND the translucent chrome.

   FR-032 says no light bar on a dark hero, and the header tokens above deliver
   that — but only if something dark is painted behind them. services.html
   carries `<body class="bg-white">` (its lower half really is light), so at
   scroll 0 the 82%-opaque header composited 18% of WHITE into itself and sat
   on the hero as a visibly lighter bar. The defect was in the backdrop, not in
   the header.

   Paint the surface ground on `html`, not `body`: every section on these pages
   already declares its own background, so this shows only where nothing else
   paints — behind the chrome, and in the overscroll gutter, which was white
   too. `html[data-surface=...]` is (0,1,1) and outranks the `.bg-white`
   utility (0,1,0) without !important. */
html[data-surface="web-studio"]  { background-color: #031C2A; }
html[data-surface="ai-coaching"] { background-color: #06222B; }

/* ---------------------------------------------------------------------------
   2. Chrome adapts to its surface  (FR-032)

   These override the chrome block at the end of style.css, which hardcodes the
   light palette. Previously a light bar sat on top of both dark heroes with a
   hard cut across it.

   Scoped to [data-surface] on <html> so light pages are untouched and the
   legacy rules keep working for anything not yet migrated.
--------------------------------------------------------------------------- */

html[data-surface="web-studio"] .hdr,
html[data-surface="ai-coaching"] .hdr {
    background: var(--kms-header-bg);
    border-bottom-color: var(--kms-header-rule);
}

html[data-surface="web-studio"] .hdr .logo,
html[data-surface="ai-coaching"] .hdr .logo { color: var(--kms-header-ink); }

html[data-surface="web-studio"] .hdr .logo span,
html[data-surface="ai-coaching"] .hdr .logo span { color: var(--kms-cyan); }

html[data-surface="web-studio"] .hdr .nav a,
html[data-surface="ai-coaching"] .hdr .nav a { color: var(--kms-header-ink-2); }

html[data-surface="web-studio"] .hdr .nav a:hover,
html[data-surface="ai-coaching"] .hdr .nav a:hover { color: var(--kms-header-ink); }

html[data-surface="web-studio"] .hdr .hdr-cta,
html[data-surface="ai-coaching"] .hdr .hdr-cta {
    background: var(--kms-accent);
    color: var(--kms-accent-ink);
}

html[data-surface="web-studio"] .hdr .hdr-cta:hover,
html[data-surface="ai-coaching"] .hdr .hdr-cta:hover {
    background: var(--kms-accent-hover);
    color: var(--kms-accent-ink);
}

/* Web Studio FR-040 (D2, 2026-10-18): its primary action is the site's
   deep-teal button, as on every light page — not the surface's cyan accent,
   which stays for links and focus on the dark ground. White on #0B6E82 is
   5.89:1. */
html[data-surface="web-studio"] .hdr .hdr-cta { background: var(--kms-deep); color: #FFFFFF; }
html[data-surface="web-studio"] .hdr .hdr-cta:hover { background: var(--kms-deep-2); color: #FFFFFF; }

/* The mobile bottom bar is fixed over the page ground, so on a dark surface a
   white bar is the single most jarring element on the screen. */
html[data-surface="web-studio"] .bottombar,
html[data-surface="ai-coaching"] .bottombar {
    background: var(--kms-header-bg);
    border-top-color: var(--kms-header-rule);
}

html[data-surface="web-studio"] .bottombar a,
html[data-surface="ai-coaching"] .bottombar a,
html[data-surface="web-studio"] .bottombar button,
html[data-surface="ai-coaching"] .bottombar button { color: var(--kms-header-ink-2); }


/* ---------------------------------------------------------------------------
   3. Page base

   `.kms` on <body> opts a page into the spine. It is a class, not a bare
   `body` selector, so it outranks Tailwind's `bg-gray-50` (both 0,1,0 — later
   wins) instead of losing to it.
--------------------------------------------------------------------------- */

.kms {
    margin: 0;
    background: var(--kms-paper);
    color: var(--kms-ink);
    font-family: var(--kms-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.kms .wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* `:where()` on the scope, deliberately. `.kms a` is (0,1,1) and beats
   Tailwind's `.text-white` at (0,1,0), so every link an author had written as
   a white-on-colour BUTTON came out in the accent instead: "Buy on Amazon" on
   news.html rendered #0B6E82 on a teal gradient (1.56:1), the same button on
   swim-stars.html 1.57:1, and "Review on Goodreads" #0B6E82 on amber-800 —
   1.00:1, which is invisible. All three are conversion links.

   `:where(.kms)` contributes ZERO specificity, so this becomes (0,0,1): still
   later than style.css's bare `a` rule, so unstyled links keep the surface
   accent, but any element that names its own colour now wins — which is what
   writing `text-white` on a button means. The previous fix for this handled
   only links inside `.kms-band`; the trap was everywhere else too. */
:where(.kms) a { color: var(--kms-accent); }

/* Not scoped to `.kms`. The version that was cost services.html — a money page
   whose <body> carries `bg-white`, not `kms` — its entire focus indicator: it
   fell through to style.css's global rule, which drew the ring at 35% alpha.
   Focus is not a themed component; every page gets it. */
:focus-visible {
    outline: 3px solid var(--kms-focus);
    outline-offset: 3px;
    /* The second band. `outline-offset` leaves a gap that shows whatever is
       behind the control, so the ring alone can vanish against a cyan card or
       a photograph; the halo sits just outside it in the surface's own ink and
       is what carries the 3:1 in that case. Rendered as a box-shadow because
       an element gets one outline and this has to coexist with it. */
    box-shadow: 0 0 0 6px var(--kms-focus-halo);
    border-radius: 2px;
}


/* ---------------------------------------------------------------------------
   4. Type scale  (FR-033 — identical across surfaces)

   One scale, driven by clamp() so it is fluid rather than stepped at
   breakpoints. Only the ground and accent change per surface; these do not.
--------------------------------------------------------------------------- */

.kms .eyebrow {
    font-family: 'Inter', 'Inter Caps Fallback', ui-sans-serif, system-ui, -apple-system, sans-serif;  /* caps: see includes/fonts.css */
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--kms-accent);
    margin: 0 0 1rem;
}

.kms h1, .kms .h1 {
    font-family: var(--kms-display);
    font-weight: 800;
    font-size: clamp(2.3rem, 7vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0 0 1.1rem;
    text-wrap: balance;
}

.kms h2, .kms .h2 {
    font-family: var(--kms-display);
    font-weight: 700;
    font-size: clamp(1.65rem, 3.6vw, 2.4rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    text-wrap: balance;
}

.kms h3, .kms .h3 {
    font-family: var(--kms-display);
    font-weight: 700;
    font-size: 1.18rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
}

.kms .lede {
    font-size: 1.11rem;
    color: var(--kms-ink-2);
    margin: 0 0 1.7rem;
    max-width: 34rem;
}

.kms .small { font-size: 0.9rem; color: var(--kms-muted); }


/* ---------------------------------------------------------------------------
   5. Buttons  (FR-033 — one geometry everywhere)

   52px min-height clears the 44px tap target (FR-022) with room for a border,
   and is the same on every surface. Colour comes from --kms-accent, so a
   surface retune never touches this rule.
--------------------------------------------------------------------------- */

.kms .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 1.6rem;
    border-radius: 7px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.kms .btn-1 { background: var(--kms-accent); color: var(--kms-accent-ink); }
.kms .btn-1:hover { background: var(--kms-accent-hover); color: var(--kms-accent-ink); }

.kms .btn-2 {
    background: transparent;
    color: var(--kms-accent);
    border-color: var(--kms-rule);
}
.kms .btn-2:hover { border-color: var(--kms-accent); }


/* ---------------------------------------------------------------------------
   6. Cards
--------------------------------------------------------------------------- */

.kms .card {
    background: var(--kms-card);
    border: 1px solid var(--kms-rule);
    border-radius: 12px;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.kms .card:hover {
    border-color: var(--kms-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(12, 32, 39, .10);
}


/* ---------------------------------------------------------------------------
   7. Entrance reveal

   One cadence across a whole block rather than each element racing its
   neighbour. The stagger must satisfy n <= duration/stagger + 1 or the last
   item lands after the block has finished reading as one movement:
   .55s / 70ms + 1 = 8 items maximum per .reveal group.
--------------------------------------------------------------------------- */

/* Gated on `kms-js`, which the shared header sets at parse time. Without it a
   visitor with JavaScript disabled would get a page of invisible blocks. */
html.kms-js .kms .reveal > * { opacity: 0; transform: translateY(14px); }

.kms .reveal.in > *,
html.kms-js .kms .reveal.in > * {
    opacity: 1;
    transform: none;
    transition: opacity .55s cubic-bezier(.22, .61, .36, 1),
                transform .55s cubic-bezier(.22, .61, .36, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
}

/* Scroll-in entrances, opt-in: put `kms-enter` on a section and every
   `.reveal` group inside it plays a bigger entrance than the one above, when
   the shared observer marks it `.in`: 56px rise, .9s expo-out, 110ms stagger
   (n <= .9s / 110ms + 1 = 9). Direction per group:
     .enter-left    headings, from the reading edge
     .enter-center  centred headings, a shorter rise
     .enter-right   the right-hand column, from the right (>= 900px; stacked, it rises)
   or set --enter-from on the group's children for anything else.

   Triggered, not scrubbed: a scroll-scrubbed version on /services.html
   (a348c682) tracked the scroll exactly and read as ordinary scrolling — the
   owner saw no difference. Keyed on html.motion-on, so it plays even under
   the OS reduced-motion setting (owner decision 2026-10-08: the Animations
   button is the off switch) and Off gets the plain blocks. Pages without
   kms-motion.js have neither class and keep the small reveal above.
   transform/opacity only. overflow-x: clip keeps the from-the-right column
   from widening the page; clip, unlike hidden, is not a scroll container,
   so view() timelines and sticky inside still bind to the page. */
.kms-enter { overflow-x: clip; }
html.kms-js.motion-on .kms-enter .reveal > * {
    opacity: 0; transform: var(--enter-from, translateY(56px) scale(.97));
}
html.kms-js.motion-on .kms-enter .reveal.in > * {
    opacity: 1; transform: none;
    transition: opacity .7s ease-out, transform .9s cubic-bezier(.16, 1, .3, 1);
    transition-delay: calc(var(--i, 0) * 110ms);
}
.kms-enter .reveal.enter-left > * { --enter-from: translateX(-56px); }
.kms-enter .reveal.enter-center > * { --enter-from: translateY(40px); }
@media (min-width: 900px) {
    .kms-enter .reveal.enter-right > * { --enter-from: translateX(80px) scale(.94); }
}

/* Post cards (blog index, "More in" on a post) enter one CARD at a time: each
   card is its own .reveal, so a card below the fold waits until it is
   reached instead of finishing out of sight with the rest of the grid. The
   card moves as a whole on the individual `translate`/`scale` properties,
   leaving `transform` to its .16s hover lift; the children stay put. In two
   columns the right-hand card of a row arrives 110ms after the left. */
html.kms-js .kms .post.reveal > *,
html.kms-js .kms .post.reveal.in > * { opacity: 1; transform: none; transition: none; }
html.kms-js.motion-on .kms-enter .post.reveal { opacity: 0; translate: 0 56px; scale: .97; }
html.kms-js.motion-on .kms-enter .post.reveal.in {
    opacity: 1; translate: none; scale: none;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease,
                opacity .7s ease-out, translate .9s cubic-bezier(.16, 1, .3, 1), scale .9s cubic-bezier(.16, 1, .3, 1);
    transition-delay: 0s, 0s, 0s, var(--card-d, 0s), var(--card-d, 0s), var(--card-d, 0s);
}
@media (min-width: 760px) {
    .kms .posts > .post:nth-child(2n) { --card-d: 110ms; }
}

/* A post's section headings slide in from the left as they are reached, the
   heading as a whole (like a card), so the paragraphs under them never wait. */
html.kms-js .kms .art-h.reveal > *,
html.kms-js .kms .art-h.reveal.in > * { opacity: 1; transform: none; transition: none; }
html.kms-js.motion-on .kms-enter .art-h.reveal { opacity: 0; translate: -40px 0; }
html.kms-js.motion-on .kms-enter .art-h.reveal.in {
    opacity: 1; translate: none;
    transition: opacity .6s ease-out, translate .9s cubic-bezier(.16, 1, .3, 1);
}

/* A lead photo (the blog's featured post, a post's hero) settles from a
   slight zoom as the page opens. Never hidden: it is the LCP element, and a
   transform on a painted image does not move LCP. */
@keyframes kms-settle { from { transform: scale(1.06); } to { transform: none; } }
html.motion-on .kms .post-featured .post-media img,
html.motion-on .kms .art-hero img { animation: kms-settle 1.6s cubic-bezier(.16, 1, .3, 1) both; }


/* ---------------------------------------------------------------------------
   8. Reduced motion  (FR-034)

   Not negotiable and not per-page: services.html shipped an `infinite`
   animation on every CTA with no motion rule of any kind, which made each
   button a permanently moving target.
--------------------------------------------------------------------------- */

/* The visitor's own Animations choice (kms-motion.js: html.motion-on /
   html.motion-off) beats the OS setting in both directions, so every rule
   here has a `:not(.motion-on)` escape AND an html.motion-off copy below.
   Pages that do not load kms-motion.js never get either class, so for them
   this is exactly the plain media query it was. Add a rule here, add it there. */
@media (prefers-reduced-motion: reduce) {
    html:not(.motion-on) .kms *, html:not(.motion-on) .kms *::before, html:not(.motion-on) .kms *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    html:not(.motion-on) .kms .card:hover { transform: none; }
    html.kms-js:not(.motion-on) .kms .reveal > * { opacity: 1; transform: none; }
    /* SVG line-draw is a transition on stroke-dashoffset, so the blanket
       `transition: none` above already stops it — but the pre-draw state is
       a dashoffset, not a transition, and has to be cleared explicitly or
       the artwork stays invisible for anyone who asked for less motion. */
    html:not(.motion-on) .kms-draw [pathLength] { stroke-dashoffset: 0 !important; }
    html:not(.motion-on) .kms-wl-drift { animation: none !important; }
}
html.motion-off .kms *, html.motion-off .kms *::before, html.motion-off .kms *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}
html.motion-off .kms .card:hover { transform: none; }
html.kms-js.motion-off .kms .reveal > * { opacity: 1; transform: none; }
html.motion-off .kms-draw [pathLength] { stroke-dashoffset: 0 !important; }
html.motion-off .kms-wl-drift { animation: none !important; }


/* ===========================================================================
   9. Editorial — the blog index and post cards

   These live in the spine rather than in blog.html because the generated
   article pages need the same components. Putting them in blog.html would
   repeat the original mistake: a design that exists inside one page and that
   nothing else can inherit.
   =========================================================================== */

/* --- masthead ------------------------------------------------------------
   The old hero was a 50/50 split with a stock photo of a child at a tablet —
   nothing to do with swimming, parenting or books — followed by a full-screen
   centred "Featured Articles" heading before a single article appeared. Two
   screens of throat-clearing.

   A masthead states what this is and then gets out of the way; the controls
   sit inside it so the first thing below the fold is an article. */
.kms .blog-head {
    position: relative; overflow: hidden;
    padding: 3rem 0 1.75rem;
    border-bottom: 1px solid var(--kms-rule);
    background:
        radial-gradient(60% 120% at 82% 0%, rgba(18, 160, 188, .10), transparent 70%),
        radial-gradient(40% 90% at 8% 20%, rgba(227, 155, 46, .08), transparent 72%);
}
.kms .blog-head h1 { margin-bottom: .75rem; }
.kms .blog-head .lede { margin-bottom: 1.9rem; }
.kms .blog-head .blog-motion { margin-top: 1.25rem; }
/* kms-motion.js unhides the button on DOMContentLoaded, after first paint;
   collapsed until then it pushed the article list down 56px (CLS .019).
   Its space is held instead (invisible, so not focusable, without JS). */
.kms .blog-head .blog-motion[hidden] { display: flex; visibility: hidden; }

/* Intro left, controls in a panel right (>=1024px), filling the masthead's
   empty half. The waterline (shared artwork, see 13a) drifts along the foot
   and bubbles rise behind the content; both are motion-on only. */
.kms .blog-head-grid { position: relative; z-index: 1; }
/* The panel enters whole (as .post cards do): a card frame waiting empty
   while its contents slide in read as a loading glitch. */
html.kms-js .kms :is(.blog-find, .ab-lanes).reveal > *,
html.kms-js .kms :is(.blog-find, .ab-lanes).reveal.in > * { opacity: 1; transform: none; transition: none; }
html.kms-js.motion-on .kms-enter :is(.blog-find, .ab-lanes).reveal { opacity: 0; translate: 64px 0; scale: .96; }
html.kms-js.motion-on .kms-enter :is(.blog-find, .ab-lanes).reveal.in {
    opacity: 1; translate: none; scale: none;
    transition: opacity .7s ease-out, translate 1s cubic-bezier(.16, 1, .3, 1), scale 1s cubic-bezier(.16, 1, .3, 1);
}
@media (max-width: 1023px) {
    html.kms-js.motion-on .kms-enter :is(.blog-find, .ab-lanes).reveal { translate: 0 32px; scale: none; }
}
.kms .blog-find { margin-top: 1.6rem; }
.kms .blog-find__t { display: none; }
@media (min-width: 1024px) {
    .kms .blog-head { padding: 3.25rem 0 3.5rem; }
    .kms .blog-head-grid {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
        gap: 3rem; align-items: center;
    }
    /* One line beside the panel: the full 3.9rem title wrapped "Blog" alone. */
    .kms .blog-head h1 { font-size: clamp(2.6rem, 4.1vw, 3.6rem); }
    .kms .blog-head .lede { margin-bottom: 0; }
    .kms .blog-find {
        margin-top: 0; padding: 1.5rem 1.5rem 1.4rem;
        background: var(--kms-card);
        border: 1px solid var(--kms-rule); border-radius: 16px;
        box-shadow: 0 22px 44px -28px rgba(6, 34, 43, .38);
    }
    .kms .blog-find__t {
        display: block; margin: 0 0 .85rem;
        font-family: var(--kms-display); font-weight: 700; font-size: 1.08rem; color: var(--kms-ink);
    }
    .kms .blog-find .blog-search { max-width: none; }
}

.kms .kms-bubbles { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.kms .kms-bubbles i {
    position: absolute; bottom: -28px; left: var(--x);
    width: var(--s); height: var(--s); border-radius: 50%;
    border: 1.5px solid rgba(11, 110, 130, .5);
    background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .95), rgba(18, 160, 188, .16) 62%);
    opacity: 0;   /* still page: no bubbles, rather than bubbles frozen mid-rise */
}
.kms .kms-bubbles i:nth-child(1)  { --x: 4%;  --s: 14px; --d: 15s; --w: -3s;  --sway: 14px; }
.kms .kms-bubbles i:nth-child(2)  { --x: 31%; --s: 9px;  --d: 18s; --w: -11s; --sway: -10px; }
.kms .kms-bubbles i:nth-child(3)  { --x: 47%; --s: 22px; --d: 13s; --w: -6s;  --sway: 18px; }
.kms .kms-bubbles i:nth-child(4)  { --x: 58%; --s: 12px; --d: 16s; --w: -1s;  --sway: -14px; }
.kms .kms-bubbles i:nth-child(5)  { --x: 71%; --s: 30px; --d: 19s; --w: -9s;  --sway: 12px; }
.kms .kms-bubbles i:nth-child(6)  { --x: 84%; --s: 16px; --d: 14s; --w: -5s;  --sway: -16px; }
.kms .kms-bubbles i:nth-child(7)  { --x: 95%; --s: 10px; --d: 17s; --w: -13s; --sway: 10px; }
.kms .kms-bubbles i:nth-child(8)  { --x: 66%; --s: 8px;  --d: 12s; --w: -8s;  --sway: -8px; }
.kms .kms-bubbles i:nth-child(9)  { --x: 90%; --s: 24px; --d: 20s; --w: -15s; --sway: -12px; }
.kms .kms-bubbles i:nth-child(10) { --x: 17%; --s: 11px; --d: 16s; --w: -7s;  --sway: 12px; }
html.motion-on .kms .kms-bubbles i { animation: kms-bubble var(--d) linear var(--w) infinite; }
@keyframes kms-bubble {
    0%   { opacity: 0; transform: translate3d(0, 0, 0); }
    12%  { opacity: .9; }
    50%  { transform: translate3d(var(--sway), -260px, 0); }
    85%  { opacity: .6; }
    100% { opacity: 0; transform: translate3d(0, -540px, 0); }
}

/* --- about page -------------------------------------------------------------
   Same masthead as the blog (intro left, panel right from 1024px, waterline +
   bubbles behind), with the panel listing what KeepsMeS makes. Sections below
   are spine cards in place of the Tailwind tints and hover-scaled buttons. */
.kms .ab-head {
    position: relative; overflow: hidden;
    padding: 3rem 0 3.25rem;
    border-bottom: 1px solid var(--kms-rule);
    background:
        radial-gradient(60% 120% at 82% 0%, rgba(18, 160, 188, .10), transparent 70%),
        radial-gradient(40% 90% at 8% 20%, rgba(227, 155, 46, .08), transparent 72%);
}
.kms .ab-head-grid { position: relative; z-index: 1; display: grid; gap: 2rem; }
.kms .ab-head .lede { margin-bottom: 1.6rem; }
.kms .ab-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
/* Held, not collapsed, until kms-motion.js unhides it (CLS; see .blog-motion). */
.kms .ab-motion[hidden] { display: flex; visibility: hidden; }
.kms .ab-lanes {
    padding: 1.25rem 1.25rem .75rem;
    background: var(--kms-card);
    border: 1px solid var(--kms-rule); border-radius: 16px;
    box-shadow: 0 22px 44px -28px rgba(6, 34, 43, .38);
}
.kms .ab-lanes__t { font-size: 1.08rem; margin: 0 0 .35rem .25rem; }
.kms .ab-lanes ul { list-style: none; margin: 0; padding: 0; }
.kms .ab-lanes li + li { border-top: 1px solid var(--kms-rule); }
.kms .ab-lanes a {
    display: flex; align-items: center; gap: .9rem;
    padding: .85rem .25rem; color: var(--kms-ink); text-decoration: none;
}
.kms .ab-lane__i {
    flex: none; display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 12px;
    font-size: 1.25rem; color: var(--kms-deep); background: rgba(18, 160, 188, .1);
}
.kms .ab-lane__b { flex: 1; min-width: 0; }
.kms .ab-lane__b b { display: block; font-family: var(--kms-display); font-size: 1.05rem; }
.kms .ab-lane__b span { display: block; font-size: .9rem; color: var(--kms-ink-2); }
.kms .ab-lane__go {
    flex: none; color: var(--kms-deep);
    transition: transform var(--kms-motion-micro) var(--kms-ease-enter);
}
.kms .ab-lanes a:hover .ab-lane__b b { color: var(--kms-deep); }
.kms .ab-lanes a:hover .ab-lane__go, .kms .ab-lanes a:focus-visible .ab-lane__go { transform: translateX(4px); }
@media (min-width: 1024px) {
    .kms .ab-head { padding: 3.5rem 0 4rem; }
    .kms .ab-head-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 3.5rem; align-items: center; }
    .kms .ab-head h1 { font-size: clamp(2.6rem, 4.6vw, 3.9rem); }
}

.kms .ab-section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.kms .ab-section--tint { background: var(--kms-card); border-block: 1px solid var(--kms-rule); }
.kms .ab-sec-head { text-align: center; max-width: 40rem; margin: 0 auto 2.75rem; }
.kms .ab-sec-head .lede { margin: 0 auto; }
.kms .ab-values { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .kms .ab-values { grid-template-columns: repeat(3, 1fr); } }
.kms .ab-card {
    padding: 1.75rem; background: var(--kms-card);
    border: 1px solid var(--kms-rule); border-radius: 16px;
}
.kms .ab-card p { margin: 0; color: var(--kms-ink-2); }
.kms .ab-card__i, .kms .ab-why__i {
    display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem;
    border-radius: 12px; font-size: 1.35rem; color: #fff;
    background: linear-gradient(135deg, var(--kms-cyan), var(--kms-deep));
}
.kms .ab-card__i--gold { background: linear-gradient(135deg, var(--kms-gold), #C97F16); color: var(--kms-gold-ink); }
.kms .ab-why {
    display: grid; gap: 2rem; align-items: center; margin-top: 3rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: rgba(18, 160, 188, .07); border: 1px solid var(--kms-rule); border-radius: 20px;
}
.kms .ab-why__lead { margin: 0; font-size: 1.08rem; color: var(--kms-ink-2); max-width: 34rem; }
.kms .ab-why__list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.kms .ab-why__list li { display: flex; gap: 1rem; align-items: flex-start; }
.kms .ab-why__list b { display: block; color: var(--kms-ink); }
.kms .ab-why__list li > span:last-child { color: var(--kms-ink-2); }
.kms .ab-why__i { flex: none; width: 40px; height: 40px; margin: 0; font-size: 1.1rem; }
.kms .ab-why__img, .kms .ab-series__img { margin: 0; }
.kms .ab-why__img img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; }
.kms .ab-series { display: grid; gap: 2.25rem; align-items: center; }
.kms .ab-series p { color: var(--kms-ink-2); margin: 0 0 .9rem; }
.kms .ab-series__by { font-weight: 600; color: var(--kms-deep) !important; margin: -.4rem 0 1.1rem !important; }
.kms .ab-series .ab-ctas { margin-top: 1.5rem; }
.kms .ab-series__img img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 24px 48px -28px rgba(6, 34, 43, .5); }
@media (min-width: 900px) {
    .kms .ab-why, .kms .ab-series { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

/* --- swim stars (series page) ----------------------------------------------
   The about masthead (.ab-head) with Xavier diving on the right, then
   .ab-section / .ab-card sections. New here: the seasons row, whose age
   markers are joined by a lane rope (alternating teal and gold floats) that
   draws across as the row enters; the cast; the parent resources; the FAQ.
   The dive illustration is the desktop LCP, so it is never faded in: it only
   bobs, motion-on only, transform only. */
.kms .ss-head .eyebrow { margin-bottom: .8rem; }
.kms .ss-facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .92rem; color: var(--kms-ink-2); }
.kms .ss-facts li { display: flex; align-items: center; gap: .4rem; }
.kms .ss-facts .i { color: var(--kms-deep); }
.kms .ss-head .ab-motion { margin-top: 1.1rem; }
.kms .ss-art { margin: 0 auto; width: min(12rem, 60vw); aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle at 50% 60%, rgba(18, 160, 188, .18), rgba(18, 160, 188, .04) 62%, transparent 70%); }
.kms .ss-art img { display: block; width: 100%; height: auto; border-radius: 50%; }
html.motion-on .kms .ss-art img { animation: ss-bob 6s ease-in-out infinite; }
@keyframes ss-bob {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50%      { transform: translate3d(0, -10px, 0) rotate(-1.5deg); }
}
@media (min-width: 640px) { .kms .ss-art { width: 22rem; } }
@media (min-width: 1024px) { .kms .ss-art { width: 28rem; } }

.kms .ss-seasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.kms .ss-season { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1rem; }
.kms .ss-mark {
    position: relative; z-index: 1; display: grid; place-content: center; text-align: center;
    width: 56px; height: 56px; border-radius: 50%; color: #fff;
    background: var(--kms-deep);   /* solid: the gradient's cyan end put "age" at 3.4:1 */
    box-shadow: 0 0 0 5px var(--kms-paper);
}
.kms .ss-mark b { font-family: var(--kms-display); font-size: 1.35rem; line-height: 1; }
.kms .ss-mark small { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
/* The lane rope. Vertical between stacked markers; horizontal from 900px. */
.kms .ss-season:not(:last-child)::after {
    content: ""; position: absolute; left: 26px; top: 56px; bottom: -1.75rem; width: 4px; border-radius: 2px;
    background: repeating-linear-gradient(180deg, var(--kms-deep) 0 10px, var(--kms-gold) 10px 20px);
    transform-origin: top;
}
html.kms-js.motion-on .kms-enter .ss-seasons.reveal .ss-season::after { transform: scaleY(0); }
html.kms-js.motion-on .kms-enter .ss-seasons.reveal.in .ss-season::after {
    transform: none; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
    transition-delay: calc(var(--i, 0) * 110ms + 350ms);
}
/* Stacked, the cover floats so the copy runs full width beneath it: a cover
   column beside the text left the text ~130px wide at 390. */
.kms .ss-season__card {
    display: flow-root; padding: 1.25rem;
    background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: 16px;
}
.kms .ss-season__card img { float: left; width: 72px; height: auto; margin: 0 1rem .6rem 0; border-radius: 6px; box-shadow: 0 12px 24px -14px rgba(6, 34, 43, .55); }
.kms .ss-season__card p { margin: 0 0 .7rem; color: var(--kms-ink-2); font-size: .95rem; }
.kms .ss-season__n { font-size: .78rem !important; font-weight: 600; letter-spacing: .04em; color: var(--kms-deep) !important; margin-bottom: .3rem !important; }
.kms .ss-season__hook { font-weight: 600; color: var(--kms-ink) !important; }
.kms .ss-buy, .kms .ss-link { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-weight: 600; color: var(--kms-deep); text-decoration: none; }
.kms .ss-buy .i { transition: transform var(--kms-motion-micro) var(--kms-ease-enter); }
.kms .ss-buy:hover .i, .kms .ss-buy:focus-visible .i { transform: translateX(4px); }
.kms .ss-link:hover, .kms .ss-buy:hover { color: var(--kms-deep-2); text-decoration: underline; }
@media (min-width: 900px) {
    .kms .ss-seasons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
    .kms .ss-season { grid-template-columns: 1fr; gap: 1.25rem; align-content: start; }
    .kms .ss-season:not(:last-child)::after {
        left: 64px; top: 26px; bottom: auto; width: auto; height: 4px; right: calc(-1.5rem - 8px);
        background: repeating-linear-gradient(90deg, var(--kms-deep) 0 10px, var(--kms-gold) 10px 20px);
        transform-origin: left;
    }
    html.kms-js.motion-on .kms-enter .ss-seasons.reveal .ss-season::after { transform: scaleX(0); }
    .kms .ss-season__card { height: 100%; }
    .kms .ss-season__card img { float: none; display: block; width: 120px; margin: 0 0 1.1rem; }
}
.kms .ss-more { text-align: center; margin: 2rem 0 0; color: var(--kms-ink-2); }
.kms .ss-more a { color: var(--kms-deep); font-weight: 600; }

.kms .ss-cast { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.kms .ss-cast .ab-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 1rem; padding: 1.25rem 1.4rem; }
.kms .ss-cast .ab-card > :not(.ss-av) { grid-column: 2; }
.kms .ss-cast h3 { margin: 0; }
.kms .ss-av {
    grid-row: 1 / span 3; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    font-family: var(--kms-display); font-weight: 800; font-size: 1.2rem; color: #fff;
    background: linear-gradient(135deg, var(--kms-cyan), var(--kms-deep));
}
.kms .ss-av--gold { background: linear-gradient(135deg, var(--kms-gold), #C97F16); color: #2E1D00; }  /* gold-ink is 2.5:1 here */
.kms .ss-cast .ss-role { font-size: .82rem; font-weight: 600; color: var(--kms-deep); margin: .1rem 0 .45rem; }
@media (min-width: 640px) { .kms .ss-cast { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .kms .ss-cast { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }

.kms .ss-help { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.kms .ss-help__a { display: flex; flex-direction: column; height: 100%; color: var(--kms-ink); text-decoration: none;
    transition: transform var(--kms-motion-standard) var(--kms-ease-enter), box-shadow var(--kms-motion-standard) var(--kms-ease-enter), border-color var(--kms-motion-standard); }
.kms .ss-help__a p { margin-bottom: 1rem; }
.kms .ss-help__a:hover, .kms .ss-help__a:focus-visible { transform: translateY(-3px); border-color: var(--kms-cyan); box-shadow: 0 18px 36px -24px rgba(6, 34, 43, .45); }
.kms .ss-help__go { margin-top: auto; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--kms-deep); }
.kms .ss-help__a:hover .ss-help__go .i { transform: translateX(4px); }
.kms .ss-help__go .i { transition: transform var(--kms-motion-micro) var(--kms-ease-enter); }
@media (min-width: 640px) { .kms .ss-help { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kms .ss-help { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }

/* Same disclosure as the services FAQ (.cx-faq, inline there). */
.kms .ss-faq { display: grid; gap: .75rem; max-width: 46rem; margin-inline: auto; }
.kms .ss-faq details { background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: 12px; }
.kms .ss-faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    min-height: 44px; padding: .85rem 1.2rem; cursor: pointer; list-style: none;
    font-weight: 600; color: var(--kms-ink);
}
.kms .ss-faq summary::-webkit-details-marker { display: none; }
.kms .ss-faq summary::after {
    content: ""; flex: none; width: .55rem; height: .55rem; margin-top: -.25rem;
    border-right: 2px solid var(--kms-muted); border-bottom: 2px solid var(--kms-muted);
    transform: rotate(45deg); transition: transform var(--kms-motion-standard) var(--kms-ease-enter);
}
.kms .ss-faq details[open] summary::after { transform: rotate(225deg); margin-top: .25rem; }
.kms .ss-faq details p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--kms-ink-2); line-height: 1.6; }
.kms .ss-faq details a { color: var(--kms-deep); font-weight: 600; }

.kms .ss-next { display: grid; gap: 1.25rem; }
.kms .ss-next .ab-card { display: flex; flex-direction: column; align-items: flex-start; }
.kms .ss-next .ab-card p:not(.eyebrow) { margin-bottom: 1.25rem; }
.kms .ss-next .eyebrow { margin-bottom: .6rem; }
.kms .ss-next__jade { background: linear-gradient(135deg, rgba(227, 155, 46, .10), rgba(18, 160, 188, .06)), var(--kms-card); }
@media (min-width: 800px) { .kms .ss-next { grid-template-columns: 1fr 1fr; } }

/* --- news page ---------------------------------------------------------------
   The about masthead (shelf panel = .ab-lanes), then a feed, newest first.
   Each item is its own .reveal, so a card below the fold waits for its own
   scroll; the lane rope between markers (the swim-stars one, vertical) is
   drawn as its item enters. A marker carries a date only when it is on record. */
.kms .nw-feed { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 1.75rem; max-width: 52rem; }
.kms .nw-item { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .7rem; scroll-margin-top: 6rem; }
.kms .nw-mark {
    position: relative; z-index: 1; display: grid; place-content: center; text-align: center;
    width: 44px; height: 44px; border-radius: 50%; color: #fff;
    background: var(--kms-deep); box-shadow: 0 0 0 5px var(--kms-paper);
}
.kms .nw-mark b { font-family: var(--kms-display); font-size: .78rem; line-height: 1.05; }
.kms .nw-mark small { font-size: .6rem; letter-spacing: .04em; }
.kms .nw-mark--gold { background: linear-gradient(135deg, var(--kms-gold), #C97F16); color: #2E1D00; }
.kms .nw-mark--quiet { background: var(--kms-card); color: var(--kms-deep); border: 2px solid var(--kms-deep); }
.kms .nw-mark--quiet b { font-size: .62rem; }
.kms .nw-item:not(:last-child)::after {
    content: ""; position: absolute; left: 20px; top: 44px; bottom: -1.75rem; width: 4px; border-radius: 2px;
    background: repeating-linear-gradient(180deg, var(--kms-deep) 0 10px, var(--kms-gold) 10px 20px);
    transform-origin: top;
}
/* An item enters whole, like a .post card. The first one is on the first
   screen at 1440 and its blurb is the LCP element: faded, LCP waited for the
   fade (1.2-1.3s, measured). So it rises without fading, never hidden. */
html.kms-js .kms .nw-item.reveal > *,
html.kms-js .kms .nw-item.reveal.in > * { opacity: 1; transform: none; transition: none; }
html.kms-js.motion-on .kms-enter .nw-item.reveal { opacity: 0; translate: 0 56px; scale: .97; }
html.kms-js.motion-on .kms-enter .nw-item.reveal:first-child { opacity: 1; }
html.kms-js.motion-on .kms-enter .nw-item.reveal.in {
    opacity: 1; translate: none; scale: none;
    transition: opacity .7s ease-out, translate .9s cubic-bezier(.16, 1, .3, 1), scale .9s cubic-bezier(.16, 1, .3, 1);
}
html.kms-js.motion-on .kms-enter .nw-item.reveal::after { transform: scaleY(0); }
html.kms-js.motion-on .kms-enter .nw-item.reveal.in::after {
    transform: none; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1) .35s;
}
/* Stacked, the cover floats so the copy runs full width beneath it (see .ss-season__card). */
.kms .nw-card {
    display: flow-root; padding: 1rem;
    background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: 16px;
}
.kms .nw-card--jade { background: linear-gradient(135deg, rgba(227, 155, 46, .10), rgba(18, 160, 188, .06)), var(--kms-card); }
.kms .nw-cover { float: left; width: 60px; height: auto; margin: 0 1rem .6rem 0; border-radius: 6px; box-shadow: 0 12px 24px -14px rgba(6, 34, 43, .55); }
.kms .nw-cover--blank {
    display: grid; place-items: center; aspect-ratio: 2 / 3;
    font-family: var(--kms-display); font-size: 2rem; font-weight: 700; color: #2E1D00;
    background: linear-gradient(135deg, var(--kms-gold), #C97F16);
}
.kms .nw-body h3 { margin: 0 0 .6rem; }
.kms .nw-body p { margin: 0 0 1rem; color: var(--kms-ink-2); }
.kms .nw-body p b { color: var(--kms-ink); }
.kms .nw-kicker { font-size: .8rem !important; font-weight: 600; letter-spacing: .04em; color: var(--kms-deep) !important; margin-bottom: .35rem !important; }
.kms .nw-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; clear: both; }
/* Blog posts in the What's new feed (generate-whats-new.js): no cover, so the
   card is one column at every width, and the title is the link. */
.kms .nw-card--post .nw-body h3 a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.kms .nw-card--post .nw-body h3 a:hover { color: var(--kms-deep); }
.kms .nw-card--post .nw-body p:last-child { margin-bottom: 0; }
.kms .nw-more { max-width: 52rem; margin: 1.75rem auto 0; }
.kms .nw-updated { margin: -.4rem 0 1.4rem; font-size: .9rem; font-weight: 600; color: var(--kms-deep); }
@media (min-width: 640px) {
    .kms .nw-item { grid-template-columns: 72px minmax(0, 1fr); gap: 1.25rem; }
    .kms .nw-mark { width: 72px; height: 72px; }
    .kms .nw-mark b { font-size: 1.1rem; }
    .kms .nw-mark--quiet b { font-size: .9rem; }
    .kms .nw-item:not(:last-child)::after { left: 34px; top: 72px; }
    .kms .nw-mark small { font-size: .66rem; }
    .kms .nw-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: 1.5rem; }
    .kms .nw-cover { float: none; width: 120px; margin: 0; }
    .kms .nw-cover--blank { font-size: 3.4rem; }
    .kms .nw-ctas { clear: none; }
    .kms .nw-card--post { grid-template-columns: minmax(0, 1fr); }
}
/* Closing card, centred (news review ask, early-reader "Ready?"). */
.kms .ab-close { max-width: 40rem; margin: 0 auto; text-align: center; }
.kms .ab-close .eyebrow { margin-bottom: .6rem; }
.kms .ab-close p:not(.eyebrow) { margin-bottom: 1.25rem; }
.kms .ab-close .ab-ctas { justify-content: center; }

/* --- early-reader page -------------------------------------------------------
   About masthead with Book 1 (the book that goes free) on the right; the steps
   are .ss-seasons (marker + lane rope); the sign-up is the shared newsletter
   band carrying this page's own three-field form. */
.kms .er-head .eyebrow { margin-bottom: .8rem; }
.kms .er-head .lede { margin-bottom: .9rem; }
.kms .er-sub { margin: 0 0 1.6rem; color: var(--kms-ink-2); max-width: 36rem; }
.kms .er-motion { margin-top: 1.1rem; }
.kms .er-book { position: relative; margin: 0 auto; width: 12rem; }
.kms .er-book img {
    display: block; width: 100%; height: auto; border-radius: 8px;
    box-shadow: 0 30px 50px -26px rgba(6, 34, 43, .6);
    transform: rotate(-3deg);
}
html.motion-on .kms .er-book img { animation: er-bob 6s ease-in-out infinite; }
@keyframes er-bob {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50%      { transform: rotate(-1.5deg) translateY(-10px); }
}
/* Under the cover, not on it: pinned to the corner it covered "by Miles Lee". */
.kms .er-book { text-align: center; }
.kms .er-tag {
    margin-top: 1.4rem;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .85rem; border-radius: 999px;
    font-size: .85rem; font-weight: 700; color: #2E1D00;   /* gold-ink is 2.5:1 on gold */
    background: var(--kms-gold); box-shadow: 0 10px 22px -12px rgba(6, 34, 43, .55);
}
@media (min-width: 1024px) {
    .kms .er-head .ab-head-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); }
    .kms .er-book { width: 17rem; }
}
.kms .er-steps .ab-card { padding: 1.4rem; }
.kms .er-steps h3 { margin: 0 0 .5rem; }
@media (min-width: 900px) { .kms .er-steps .ab-card { height: 100%; } }
.kms .er-form { display: grid; gap: 1rem; }
.kms .er-field label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 600; color: #F2FAFB; }
.kms .er-field .nl-input { width: 100%; }
.kms .er-field select.nl-input { appearance: auto; }
.kms .er-submit { width: 100%; min-height: 52px; }

/* --- search --------------------------------------------------------------- */
.kms .blog-search { position: relative; max-width: 34rem; }
.kms .blog-search input {
    width: 100%;
    min-height: 52px;
    padding: 0 2.9rem 0 2.9rem;
    font: inherit;
    font-size: 1rem;
    color: var(--kms-ink);
    background: var(--kms-card);
    border: 1px solid var(--kms-rule);
    border-radius: 999px;
}
.kms .blog-search input::placeholder { color: var(--kms-muted); }
.kms .blog-search input:focus { border-color: var(--kms-accent); outline: none; }
.kms .blog-search input:focus-visible { outline: 3px solid var(--kms-cyan); outline-offset: 2px; }
.kms .blog-search .icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--kms-muted); pointer-events: none;
}
.kms .blog-search button {
    position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border: 0; background: none; color: var(--kms-muted); cursor: pointer; border-radius: 50%;
}
.kms .blog-search button:hover { color: var(--kms-ink); }
/* script.js shows the clear button by removing `hidden`; the display:flex
   above outranked Tailwind's .hidden, so an empty box always showed an ×. */
.kms .blog-search button.hidden { display: none; }

/* --- category filters -----------------------------------------------------
   `active` is the only class JavaScript touches now, so these can be restyled
   without editing script.js. */
.kms .filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 0; padding: 0; }
.kms .category-filter {
    display: inline-flex; align-items: center; gap: .4rem;
    min-height: 44px; padding: 0 1.05rem;
    font: inherit; font-size: .92rem; font-weight: 600;
    color: var(--kms-ink-2);
    background: var(--kms-card);
    border: 1px solid var(--kms-rule);
    border-radius: 999px;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
/* product-motion recipe `tabs-sliding`, adapted. Job: FEEDBACK on a selection.

   NOT a travelling indicator. The catalog's default is an indicator that slides
   to the chosen option, and that is wrong for THIS control: `.filters` wraps on
   narrow tablets and scrolls sideways on a phone, so a shared indicator would
   fly across a line break or off the visible strip. The honest equivalent
   for a wrapping group is the pill acknowledging its own selection in place.

   Colour and border only — both compositor-cheap, neither reflows, and the
   pressed state is already carried by aria-pressed so the meaning never depends
   on the transition finishing. */
.kms .category-filter {
    transition:
        background-color var(--kms-motion-micro) var(--kms-ease-enter),
        border-color var(--kms-motion-micro) var(--kms-ease-enter),
        color var(--kms-motion-micro) var(--kms-ease-enter);
}
.kms .category-filter:hover { border-color: var(--kms-accent); color: var(--kms-ink); }
.kms .category-filter.active {
    background: var(--kms-accent);
    border-color: var(--kms-accent);
    color: var(--kms-accent-ink);
}
/* Phone: one row that scrolls sideways inside itself, not three rows of pills
   (148px) pushing the first card down. The row bleeds into the wrap's 1.5rem
   gutter so a chip cut by the screen edge says "more this way"; the fade is
   kept inside that gutter so it never dims a chip at rest. Block padding
   leaves room for the 6px focus halo, which overflow would otherwise clip. */
@media (max-width: 759px) {
    .kms .filters {
        flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
        margin: .6rem -1.5rem 0; padding: .5rem 1.5rem; scroll-padding-inline: 1.5rem;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 .75rem, #000 calc(100% - 1.5rem), transparent);
                mask-image: linear-gradient(90deg, transparent, #000 .75rem, #000 calc(100% - 1.5rem), transparent);
    }
    .kms .filters::-webkit-scrollbar { display: none; }
    .kms .category-filter { flex: none; }
}

/* --- category chips -------------------------------------------------------
   Static class per category, NOT `bg-${color}-100` built at generate time.
   A dynamically-assembled utility name is invisible to Tailwind's scanner and
   is exactly the kind of string T020 has to hunt down and safelist before the
   CDN can be dropped. One less. */
.kms .chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .28rem .7rem; border-radius: 999px;
    font-size: .76rem; font-weight: 700; letter-spacing: .02em;
    white-space: nowrap;
}
.kms .chip-swimming       { background: #DDF1F5; color: #08505E; }
.kms .chip-parenting      { background: #FBEBD3; color: #7A4E05; }
.kms .chip-product-reviews{ background: #E4EEF0; color: #2C4C55; }
.kms .chip-ai             { background: #D9F0EC; color: #0C5348; }

/* --- post cards ----------------------------------------------------------- */
.kms .posts { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .kms .posts { grid-template-columns: repeat(2, 1fr); } }

.kms .post {
    display: flex; flex-direction: column;
    background: var(--kms-card);
    border: 1px solid var(--kms-rule);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.kms .post:hover {
    border-color: var(--kms-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(12, 32, 39, .10);
}
.kms .post-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--kms-rule); }
.kms .post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kms .post-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.kms .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: .8rem; }
.kms .post-meta time, .kms .post-meta .read, .kms .post-meta .date { font-size: .82rem; color: var(--kms-muted); }

/* ---------------------------------------------------------------------------
   Confirmation page (thank-you.html)

   One page, three arrivals: the newsletter, the coaching intake and the Web
   Studio lead all POST here. It is short and it is the last thing a converting
   visitor sees, so it gets the surface treatment rather than a bare column.
--------------------------------------------------------------------------- */

.kms .ty-main {
    min-height: 68vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 9vw, 6rem) 1.5rem;
}

.kms .ty { max-width: 34rem; text-align: center; }

/* The mark was a filled indigo disc. A ring in the surface accent reads as
   confirmation without pulling more weight than the sentence under it. */
.kms .ty__mark {
    width: 62px;
    height: 62px;
    margin: 0 auto 1.75rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--kms-accent);
    background: color-mix(in srgb, var(--kms-accent) 10%, transparent);
    border: 2px solid color-mix(in srgb, var(--kms-accent) 32%, transparent);
}
.kms .ty__mark svg { width: 28px; height: 28px; }

.kms .ty__lede {
    font-size: 1.12rem;
    color: var(--kms-ink-2);
    margin: 0 0 1.25rem;
}

.kms .ty__next {
    /* --kms-ink-2, not --kms-muted. Muted is #6B848F, which measures 3.78:1
       against this surface's paper — fine for a caption, a fail for a
       paragraph, where AA wants 4.5:1. This is 7.55:1. */
    color: var(--kms-ink-2);
    margin: 0 0 2.25rem;
    text-wrap: pretty;
}

.kms .ty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    justify-content: center;
}

/* The Table of Contents heading is an h2 so the article outline does not jump
   h1 -> h3, but it must keep reading as a small utility label rather than as a
   section title. Sized by CLASS, not by level: `.kms .kms-toc__title` is (0,2,0)
   and beats the `.kms h2` scale at (0,1,1), so the level is free to be whatever
   the document structure needs. `article nav h3` in style.css is (0,0,3) and
   never won here — the values below are the ones that actually shipped. */
.kms .kms-toc__title {
    font-family: var(--kms-display);
    font-weight: 700;
    font-size: 1.18rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
    text-wrap: initial;
}

.kms .post h2, .kms .post h3 { margin: 0 0 .5rem; }
.kms .post h3 { font-size: 1.24rem; }
.kms .post a.title { color: var(--kms-ink); text-decoration: none; }
.kms .post:hover a.title { color: var(--kms-accent); }
.kms .post p { margin: 0 0 1.1rem; color: var(--kms-ink-2); font-size: .97rem; }

/* Byline. E-E-A-T wants a named human and a date on every post (T046); a card
   that shows neither is the same anonymous content an answer engine discards. */
.kms .byline {
    margin-top: auto; padding-top: .9rem;
    border-top: 1px solid var(--kms-rule);
    display: flex; align-items: center; gap: .5rem;
    font-size: .84rem; color: var(--kms-muted);
}
.kms .byline b { color: var(--kms-ink-2); font-weight: 600; }

/* Featured post: same component, wider. */
.kms .post-featured { margin-bottom: 1.5rem; }
@media (min-width: 860px) {
    .kms .post-featured { display: grid; grid-template-columns: 1.05fr 1fr; }
    .kms .post-featured .post-media { aspect-ratio: auto; height: 100%; }
    .kms .post-featured .post-body { padding: 2rem 2.2rem; justify-content: center; }
    .kms .post-featured h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
    .kms .post-featured p { font-size: 1.05rem; }
}

/* --- empty state and pagination ------------------------------------------- */
.kms .no-results { text-align: center; padding: 3.5rem 0; }
.kms .pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2.5rem; }
.kms .pagination button {
    min-height: 44px; min-width: 44px; padding: 0 1.1rem;
    font: inherit; font-weight: 600; color: var(--kms-ink-2);
    background: var(--kms-card); border: 1px solid var(--kms-rule);
    border-radius: 8px; cursor: pointer;
}
.kms .pagination button:hover:not(:disabled) { border-color: var(--kms-accent); color: var(--kms-ink); }
.kms .pagination button:disabled { opacity: .45; cursor: default; }
.kms .pagination .page-info { font-size: .9rem; color: var(--kms-muted); }

/* --- newsletter band ------------------------------------------------------
   Was a purple -> indigo -> blue gradient, the largest remaining block of the
   previous brand on the site. Deep pool water with a gold action, matching the
   Coaching surface. */
.kms .kms-newsletter {
    position: relative; overflow: hidden;
    padding: clamp(3.5rem, 9vw, 6rem) 0;
    background: linear-gradient(120deg, #06222B 0%, #0B3B47 55%, #072A33 100%);
    color: #F2FAFB;
    /* The band is the Coaching surface in miniature: gold action, light halo. */
    --kms-accent: var(--kms-gold);
    --kms-accent-hover: #F0AD45;
    --kms-accent-ink: #3A2503;
    --kms-focus-halo: rgba(234, 246, 250, .92);
}
/* Spine markup in place of the Tailwind block blog and books each carried
   (text-5xl/py-20/two decorative white circles). Text left, form right from
   900px; stacked, still left-aligned, below. */
.kms .nl-grid { position: relative; z-index: 1; display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 900px) { .kms .nl-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.kms .kms-newsletter h2 { color: #F2FAFB; }
.kms .kms-newsletter .lede { color: #B4D0D7; margin-bottom: 0; }
.kms .kms-newsletter .small { color: #B4D0D7; margin: .9rem 0 0; }
.kms .nl-trap { display: none; }
.kms .nl-row { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 520px) { .kms .nl-row { flex-direction: row; } }
.kms .nl-input {
    flex: 1; min-width: 0; min-height: 52px; padding: 0 1.1rem;
    font: inherit; color: #0B2A33; background: #F6FAFB;
    border: 1px solid rgba(255, 255, 255, .22); border-radius: 7px;
}
.kms .nl-input::placeholder { color: #4E6A73; opacity: 1; }

/* ---------------------------------------------------------------------------
   10. Article pages

   The generated post pages were the last surface still painting themselves the
   previous brand: an indigo->violet reading-progress bar, pull quote, author
   box, table of contents and every inline link. Each of those was a Tailwind
   gradient or colour utility written into generate-article-pages.js, so they
   are now named components taking the surface accent.
--------------------------------------------------------------------------- */

.kms .kms-progress {
    position: fixed; top: 0; left: 0; z-index: 50;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--kms-deep), var(--kms-cyan));
    transform: scaleX(0); transform-origin: 0 50%;   /* blog-post.js scales it */
}
/* style.css's `#progress-bar` (an id, so it outranks the rule above) eased the
   width and painted the old indigo->violet gradient; undo both at id weight. */
.kms #progress-bar { transition: none; background: linear-gradient(90deg, var(--kms-deep), var(--kms-cyan)); }
/* --kms-deep, not --kms-cyan, at the light end. The initial sits at 17px/700,
   which is NOT large text under SC 1.4.3 (that needs 18.66px bold), so it wants
   4.5:1 — and white on --kms-cyan #12A0BC is 3.10:1, which dragged the whole
   gradient down to 4.16:1 measured. Deep -> deep-2 is 5.89:1 at its lightest
   and still reads as a gradient. */
.kms .kms-avatar   { background: linear-gradient(135deg, var(--kms-deep), var(--kms-deep-2)); color: #fff; }

/* Post layout (generate-article-pages.js). Title, dek and byline first, the
   photo after it at 16:9: the photo used to lead at a fixed 384px height,
   a square on a phone that filled the first screen and pushed the headline
   below the fold. The column is 48rem, about 80 characters of body text;
   style.css's `main article { max-width: 55rem }` let lines run past 100. */
.kms .art { padding: clamp(1.75rem, 4vw, 3.5rem) 0 3rem; }
.kms .art-wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.kms .art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; margin-bottom: 1.1rem; }
.kms .art-meta time, .kms .art-meta span:not(.chip) { font-size: .9rem; font-weight: 500; color: var(--kms-muted); }
.kms .art-title { font-size: clamp(2.1rem, 5.2vw, 3.4rem); margin-bottom: 1rem; }
.kms .art-dek { font-size: clamp(1.08rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--kms-ink-2); margin: 0 0 1.5rem; }
.kms .art-author { display: flex; align-items: center; gap: .75rem; }
.kms .art-author .kms-avatar {
    width: 2.75rem; height: 2.75rem; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700;
}
.kms .art-author p { margin: 0; line-height: 1.3; }
.kms .art-author__name { font-weight: 600; color: var(--kms-ink); }
.kms .art-author__role { font-size: .85rem; color: var(--kms-muted); }
.kms .art-hero {
    margin: 2rem 0 1.75rem; aspect-ratio: 16 / 9; overflow: hidden;
    border-radius: 18px; background: var(--kms-rule);
    box-shadow: 0 18px 40px -18px rgba(12, 32, 39, .35);
}
.kms .art-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Animations switch sits on its own line under the share icons (owner
   2026-11-23: no longer inside the share row), right-aligned above the TOC. */
.kms .art .art-motion { justify-content: flex-end; margin: -1.25rem 0 1.5rem; }
.kms .art .article-content { margin-bottom: 3rem; }

/* Table of contents. style.css's `article nav` rules hang a violet triangle
   (#6366f1, the retired brand) on every item; this list has no markers, the
   sub-sections indent under a rule instead. */
.kms .kms-toc {
    background: #EAF4F7; border-left: 4px solid var(--kms-accent);
    border-radius: 0 12px 12px 0; padding: 1.25rem 1.5rem; margin: 0 0 2.5rem;
}
.kms .kms-toc ul { list-style: none; margin: 0; padding: 0; }
.kms .kms-toc li { padding: 0; margin: 0; }
.kms .kms-toc li::before { content: none; }
.kms .kms-toc li.sub { margin-left: .2rem; padding-left: 1rem; border-left: 1px solid #BFD9E0; font-size: .95rem; }
.kms .kms-toc a {
    display: inline-block; padding: .3rem 0; color: var(--kms-accent);
    font-weight: 500; text-decoration: none;
}
.kms .kms-toc a:hover { color: var(--kms-deep-2); }

/* The end of the post: next step, author, related, back. */
.kms .art-box { padding: 1.75rem 1.9rem; border-radius: 0 14px 14px 0; margin: 0 0 1.5rem; }
.kms .art-box h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin: 0 0 .6rem; }
.kms .art-box p { color: var(--kms-ink-2); margin: 0 0 1rem; line-height: 1.65; }
.kms .art-box p.small { margin: 1rem 0 0; font-size: .9rem; color: var(--kms-ink-2); }   /* muted is 4.40:1 on the warm end of the box */
.kms .art-box > .btn { display: inline-flex; }
.kms .art-related { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--kms-rule); }
.kms .art-related h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.kms .posts-more .post h3 { font-size: 1.12rem; }
.kms .posts-more .post p { font-size: .94rem; margin: 0; }
.kms .art-back { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--kms-rule); }

.kms .kms-authorbox {
    background: linear-gradient(120deg, #EEF7F9 0%, #FBF3E6 100%);
    border-left: 4px solid var(--kms-accent);
}

.kms .kms-accent-bg { background: var(--kms-accent); color: var(--kms-accent-ink); }
.kms .kms-accent-bg:hover, .kms .hover\:kms-accent-bg-h:hover {
    background: var(--kms-accent-hover);
    color: var(--kms-accent-ink);
}
.kms .kms-accent-tint { background: #EAF4F7; }
.kms .kms-accent-border { border-color: var(--kms-accent); }
.kms .kms-accent-border-soft { border-color: #7FC3D2; }
.kms .kms-accent-text { color: var(--kms-accent); }
.kms .kms-accent-text:hover, .kms .kms-accent-text-h:hover { color: var(--kms-deep-2); }

/* ---------------------------------------------------------------------------
   11. Soft tint panels

   The remaining pages used pastel Tailwind gradients (purple-50 -> violet-50,
   indigo-50 -> blue-50) for "soft card" panels. Two tints in the brand's own
   two hues replace every one of them.
--------------------------------------------------------------------------- */

.kms .kms-tint-cool {
    background: linear-gradient(135deg, #EEF7F9 0%, #E3F1F5 100%);
    border: 1px solid #C9E2E8;
}
.kms .kms-tint-warm {
    background: linear-gradient(135deg, #FDF6EA 0%, #FBEEDA 100%);
    border: 1px solid #EFDCBD;
}
.kms .kms-block-accent { background: linear-gradient(135deg, var(--kms-cyan), var(--kms-deep-2)); }
.kms .kms-circle-tint  { background: #DDF1F5; }
.kms .kms-on-dark-soft { color: #B4D0D7; }

/* --- book topic chips -----------------------------------------------------
   `bg-${color}-100 text-${color}-800` and a `from-${color}-100 to-${color}-200`
   card ground, all assembled at generate time in generate-books.js — three more
   class names Tailwind's scanner cannot see (T020). Static per topic instead. */
.kms .chip-topic-swimming   { background: #DDF1F5; color: #08505E; }
.kms .chip-topic-parenting  { background: #FBEBD3; color: #7A4E05; }
.kms .chip-topic-motivation { background: #D9F0EC; color: #0C5348; }
.kms .chip-topic-technology { background: #E0EEF2; color: #1F4A57; }
.kms .chip-topic-ai         { background: #E4EAF0; color: #26405A; }
.kms .chip-topic-sports     { background: #F6E3DC; color: #7B3B22; }
.kms .chip-topic-other      { background: #E9EFF1; color: #3D5560; }

.kms .kms-cover-ground { background: linear-gradient(135deg, #E3F1F5 0%, #C9E2E8 100%); }

/* --- photographic hero scrim ---------------------------------------------
   Text over a photograph has no ground colour any check can read, so its
   contrast is whatever that part of the image happens to be. A scrim makes the
   ground knowable: at 0.86 alpha over the darkest possible pixel (black) the
   effective ground is still rgb(212,215,216), which is what the ratios below
   are computed against — a worst case, not a sample. */
.kms .kms-hero-scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg,
        rgba(246, 250, 251, 0.90) 0%,
        rgba(246, 250, 251, 0.86) 55%,
        rgba(246, 250, 251, 0.94) 100%);
}

/* Over a scrim the accent is one step deeper. --kms-deep measures 4.07:1
   against the worst-case ground, and an 18px semibold eyebrow is NOT "large
   text" under WCAG (that starts at 18.66px bold or 24px regular), so 4.07
   fails AA outright. --kms-deep-2 measures 5.40:1. */
.kms .kms-hero-photo .kms-accent-text,
.kms .kms-hero-photo .eyebrow { color: var(--kms-deep-2); }
/* On a dark band the accent eyebrow is teal on deep teal, 2.06:1. It takes
   the band's ink instead (swim-stars.html lead-magnet block). */
.kms .kms-band .eyebrow { color: inherit; }

/* --- shared bands and utilities used by the remaining pages --------------- */
.kms .kms-band {
    background: linear-gradient(110deg, #06222B 0%, #0B3B47 50%, #072A33 100%);
    color: #F2FAFB;
}
/* `a` belongs in this list. `.kms a { color: var(--kms-accent) }` is (0,1,1)
   and beats Tailwind's `text-white` at (0,1,0), so every link written white on
   a dark band came out in the accent colour — on swim-stars.html that left a
   teal "Read Free with Kindle Unlimited" on a translucent dark button, close
   to illegible. Links on a band take the band's ink. */
.kms .kms-band h1, .kms .kms-band h2, .kms .kms-band h3,
.kms .kms-band p { color: inherit; }
/* Same `:where()` treatment, and for a second reason. At (0,2,1) this rule
   also outranked `.kms .kms-accent-text` at (0,2,0), so the newsletter CTA —
   a `bg-white` button sitting inside a dark band on about.html, shop.html and
   swim-stars.html — inherited the BAND's near-white ink onto its own white
   background: #F2FAFB on #FFFFFF, 1.06:1. The primary call to action on three
   pages was invisible. At (0,0,1) a link that names its own colour keeps it,
   and a plain link on a band still takes the band's ink. */
:where(.kms .kms-band) a { color: inherit; }
.kms .kms-ring:focus { box-shadow: 0 0 0 3px rgba(18, 160, 188, .45); }
.kms .kms-accent-border { border-color: var(--kms-accent); }
.kms .hover\:kms-accent-border-h:hover { border-color: var(--kms-accent); }
.kms .kms-image-veil { background: linear-gradient(to top, rgba(6, 34, 43, .55), transparent); }

/* --- gradient text --------------------------------------------------------
   Distinct from .kms-band, which paints a background. These two are NOT
   interchangeable: swapping a gradient-text class for a band turns a coloured
   word into a solid block with the word knocked out of it. */
.kms .kms-grad-text {
    background: linear-gradient(100deg, var(--kms-deep) 0%, var(--kms-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- in-page nav scrollspy ------------------------------------------------
   `.is-current` is the only class the scroll handler touches, so the highlight
   can be restyled without editing script.js. */
.kms .is-current { color: var(--kms-accent); font-weight: 600; }


/* ===========================================================================
   12. Icons  —  the replacement for emoji
   ===========================================================================

   The sprite itself lives at the top of includes/header.html so it is in the
   DOM before any <use> that references it. See that file for why emoji had to
   go.

   `.i` is the only sizing contract: 1em square, optically centred against the
   cap height of the text beside it. Because the symbols paint in currentColor,
   an icon inside a chip takes the chip's colour, and an icon on a dark surface
   takes that surface's token — no per-context overrides.
--------------------------------------------------------------------------- */

/* `svg.i` unscoped, `.kms .i` scoped. Both, on purpose.
   `.i` alone is far too generic to let loose, but the scoped-only version broke
   the moment an icon landed on a page that is not `.kms`: blog/5-tips shipped
   as `<body class="bg-gray-50">`, the rule did not apply, and an <svg> with no
   width falls back to the SVG default of 300x150px. One icon pushed a 390px
   page out to 486. That page was converted in T091 and retired in T103, so the
   example is now historical — KEEP THE UNSCOPED RULE ANYWAY. The next page
   added off the spine would reintroduce the same 300x150 fallback, and the
   rationale does not depend on the page that happened to expose it. Element+class is specific enough to be safe and reaches
   every page. Every emitted icon also carries width="1em" height="1em" as
   presentation attributes, so it is correctly sized with NO stylesheet at all;
   CSS still wins where it loads. */
svg.i,
.kms .i {
    width: 1em;
    height: 1em;
    flex: none;
    display: inline-block;
    vertical-align: -0.14em;   /* sits on the baseline, not below it */
    fill: none;
    stroke: currentColor;
    overflow: visible;
}
/* Solid symbols (the stars, the platform marks) carry their own fill and must
   not inherit the stroke default above. */
svg.i-solid,
.kms .i-solid { fill: currentColor; stroke: none; }

.kms .i-lg { width: 1.5em; height: 1.5em; }
.kms .i-xl { width: 2.25em; height: 2.25em; }

/* An icon-plus-label pair, the shape most of the emoji were standing in for. */
.kms .with-i { display: inline-flex; align-items: center; gap: .45em; }

/* Rating rows. Stars are DATA, so the row carries an accessible name and the
   individual stars are hidden from the tree — a screen reader should hear
   "rated 4.5 out of 5", not "star star star star half-star". */
.kms .rating { display: inline-flex; align-items: center; gap: .12em; color: var(--kms-gold); }
.kms .rating .i { width: 1.05em; height: 1.05em; }
.kms .rating-value { margin-left: .45em; color: var(--kms-ink-2); font-weight: 600; font-size: .875rem; }


/* NOTE ON SCOPING for the rest of this file.
   Sections 12 and 13 split deliberately. Anything with a SHORT name — .i,
   .rule, .sheen, .rating, .with-i — stays under `.kms`, because those are
   generic enough to collide with a page's own CSS. Anything already prefixed
   `kms-` is UNSCOPED: services.html carries `<body class="bg-white">` and
   websites.html `<body class="ws">`, so neither has a `.kms` ancestor and
   neither could use a decoration that required one. A `kms-` prefix is its own
   namespace; a second scope on top of it buys nothing and costs two pages. */

/* ===========================================================================
   13. Premium surface detail
   ===========================================================================

   Four devices, each earning its place. Restraint is the point: this is a
   brand parents buy children's books from, so "premium" here means the care
   visible in a well-set page — hairlines, light, paper — not neon and glass.
--------------------------------------------------------------------------- */

/* --- 13a. Water light -----------------------------------------------------
   A band of interfering sine streamlines: what pool caustics look like from
   below. Generated, not drawn by hand — see the header comment in the SVG.

   Both harmonic periods divide the artwork width exactly, so a second copy
   placed one width along joins the first with no seam and the pair can drift
   forever. The spline through the samples is periodic too, so the TANGENT
   matches at the join and not merely the y value (worst case 0.36 degrees).

   Colour comes from `currentColor`, so the band is teal on Books, cyan on Web
   Studio and gold on Coaching without a second copy of the artwork. */

.kms-wl-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.kms-wl { display: block; width: 100%; height: 100%; }

.kms-wl-drift {
    animation: kmsWlDrift 54s linear infinite;
    /* Promote once. Without this Chromium re-rasterises 28 stroked splines
       every frame and the band alone can hold the compositor at 100%. */
    will-change: transform;
}
@keyframes kmsWlDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(-1200px); }   /* exactly one artwork width */
}

/* Anything sitting on top of a band needs to be lifted out of it. */
.kms-over { position: relative; z-index: 1; }


/* --- 13b. Hairline rules --------------------------------------------------
   A rule that fades at both ends instead of stopping dead. Cheap, and it is
   most of the difference between a page that looks typeset and one that looks
   assembled. */

.kms .rule {
    height: 1px;
    border: 0;
    margin: 0;
    background: linear-gradient(90deg,
        transparent,
        var(--kms-rule) 18%,
        var(--kms-rule) 82%,
        transparent);
}
.kms .rule-gold {
    background: linear-gradient(90deg,
        transparent,
        rgba(227, 155, 46, .35) 16%,
        var(--kms-gold) 50%,
        rgba(227, 155, 46, .35) 84%,
        transparent);
}
/* A short centred rule used under section headings. */
.kms .rule-short { width: 4.5rem; margin-inline: auto; }


/* --- 13c. Film grain ------------------------------------------------------
   Dark grounds on this site are all gradients, and an 8-bit gradient across a
   large area BANDS — visible steps, worst on the coaching hero. A few percent
   of fractal noise dithers the step away, which is the same reason film stocks
   never showed banding.

   `stitchTiles="stitch"` is load-bearing: without it every 160px tile restarts
   the noise field and the seams read as a grid. */

/* No `position` here on purpose. The rule needs a positioned ancestor for the
   ::after, but half its use sites are already `fixed` or `absolute` and
   asserting `relative` would rip them out of place — websites.html hangs the
   grain off its full-bleed fixed scrim. Add `relative` at the use site if the
   element does not already have a position.

   No `isolation: isolate` either — that was the first draft and it was wrong.
   Isolating creates a stacking context, so `mix-blend-mode: overlay` then
   blends the noise against the ELEMENT's own background instead of everything
   painted behind it. On websites.html that would have dithered the scrim and
   left the WebGL gradient underneath banding exactly as before. The ::after is
   `inset: 0`, so it cannot bleed past the element without isolation anyway. */
.kms-grain { /* intentionally empty — see above */ }
.kms-grain::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: .05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* --- 13d. Specular sweep --------------------------------------------------
   A light sweep across a card on hover. Only on DARK surfaces and accent
   blocks: on a white card a white sweep is invisible and a dark one reads as a
   smudge, so the token is undefined on the light surface and the rule then
   paints nothing.

   Runs on :hover only, never `infinite`. An always-moving control is a
   permanently moving target — that defect already shipped once on
   services.html and made every CTA hard to hit. */

.kms .sheen { position: relative; overflow: hidden; }
.kms .sheen::after {
    content: "";
    position: absolute;
    inset: -40% -20%;
    pointer-events: none;
    background: linear-gradient(105deg,
        transparent 40%,
        var(--kms-sheen, transparent) 50%,
        transparent 60%);
    transform: translateX(-130%);
    opacity: 0;
}
.kms .sheen:hover::after,
.kms .sheen:focus-within::after {
    animation: kmsSheen .9s cubic-bezier(.16, 1, .3, 1);
}
@keyframes kmsSheen {
    0%   { transform: translateX(-130%); opacity: 0; }
    18%  { opacity: 1; }
    100% { transform: translateX(130%); opacity: 0; }
}

html[data-surface="web-studio"] { --kms-sheen: rgba(174, 235, 250, .30); }
html[data-surface="ai-coaching"] { --kms-sheen: rgba(255, 226, 168, .26); }


/* --- 13e. Line-draw -------------------------------------------------------
   Vector artwork that draws itself when it scrolls into view.

   Every animated path must carry `pathLength="1"`, which renormalises its
   geometry so one dash unit is the whole path. That removes the usual
   getTotalLength() measurement pass entirely — no JS, and no wrong length when
   the SVG is scaled by its container. */

.kms-draw [pathLength] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.kms-draw.in [pathLength] {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s cubic-bezier(.16, 1, .3, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
}


/* --- 13f. Share row -------------------------------------------------------
   Sharing is a secondary action at the end of a post, so it is a row of
   outline buttons at small size, not three saturated brand-coloured blocks
   competing with the article's own call to action. */

.kms .btn-sm { padding: .5rem .85rem; font-size: .875rem; }

.kms .share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin: 0 0 2rem;
}
.kms .share-row .small { margin-right: .25rem; }
/* Icon-only share buttons (owner 2026-11-23): label + five squares stay on
   one line down to a 320 px phone (44 px, 40 px below 360 px). Names live in
   aria-label and title. min-height overrides the 52 px .btn touch floor. */
.kms .share-row { gap: .5rem; }
.kms .share-row .share-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; min-height: 0; padding: 0; flex: none;
}
@media (max-width: 359px) {
    .kms .share-row { gap: .375rem; }
    .kms .share-row .share-icon { width: 2.5rem; height: 2.5rem; }
    /* Older-layout posts have 24 px side padding (272 px row at 320): the
       label margin is the 4 px that wrapped the email icon. */
    .kms .share-row .small { margin-right: 0; }
}
.kms .share-row .share-icon svg { width: 1.15rem; height: 1.15rem; }
.kms .share-row .share-icon[hidden] { display: none; }
.kms .share-note { flex-basis: 100%; margin: 0; font-size: .875rem; }


/* --- 13g. Waterline -------------------------------------------------------
   The band anchored to the foot of a hero, fading upward — a waterline rather
   than a full-bleed texture. Stretching the 1200x240 artwork over a whole tall
   hero makes the strokes fat and the drift look slow; pinning it to a fixed
   height at the bottom keeps the line weight honest at every viewport. */

.kms-waterline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(96px, 13vw, 158px);
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    /* Fade the top edge so the band emerges from the ground instead of
       starting on a hard line. */
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%, #000);
            mask-image: linear-gradient(to bottom, transparent, #000 70%, #000);
    opacity: .5;
}
.kms-waterline .kms-wl { height: 100%; }


/* --- 13h. Affiliate buy links --------------------------------------------
   Each product card used to carry THREE full-width buttons of equal weight —
   "Read Review" in brand teal, "Buy on Amazon" in amber-500 and "Buy on
   SwimOutlet" in blue-500 — so the card had no primary action and two of its
   three colours appeared nowhere else on the site.

   The card is one link to our own review. Buying is a secondary line under it,
   because the review page is where the case for the product actually is; the
   affiliate links live there too. `rel="nofollow sponsored"` is added at the
   same time — these are paid links and were not marked as such, which is a
   Google Search Essentials requirement, not a style preference. */

.kms .buy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .4rem;
    margin: .7rem 0 0;
    font-size: .8rem;
}
.kms .buy-link {
    color: var(--kms-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.kms .buy-link:hover { color: var(--kms-deep-2); text-decoration-thickness: 2px; }

/* SC 2.5.8 — an inline link that is a standalone target rather than part of a
   sentence, padded out to a 24px hit rect. padding-block on an INLINE box
   grows the rect without touching the line box, so nothing reflows.
   The 2px is measured for the 17px card type in the article "More in ..."
   cards (content box 20.00px, line box 28.90px). It is NOT a general-purpose
   utility: a 15px or 14px link needs more, and a line-height under 24px would
   push the padded box onto the neighbouring line. Other sites on this page set
   their own value next to their own CSS for that reason. */
.kms-tap { padding-block: 2px; }

/* The article next-step cross-sell ("Family AI coaching", "Start with Swim
   Stars Book 1"): 14px text in a 20px text-sm line, content box 17px. 3.5px
   each side makes the hit rect 24px. The line is shorter than 24px, so the
   padded box overlaps the neighbouring line by 2px; that line is plain text
   with no other target, and nothing is painted on the padding. No reflow. */
.kms-tap-sm { padding-block: 3.5px; }

/* ===========================================================================
   14. Cross-Document View Transitions (Phase 6 / T060–T063)
   =========================================================================== */

@view-transition {
    navigation: auto;
}

/* Chrome stability across page navigation (T061):
   Header and bottom bar persist smoothly across page swaps rather than popping. */
header.hdr {
    view-transition-name: site-header;
}

nav.bottombar {
    view-transition-name: site-bottombar;
}

/* Surface transition blending (T062):
   Cross-fade root with clean easing curve to eliminate jarring flashes between
   light (Books) and dark (Web Studio / AI Coaching) surfaces. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.22s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-old(site-header),
::view-transition-new(site-header),
::view-transition-old(site-bottombar),
::view-transition-new(site-bottombar) {
    animation-duration: 0.22s;
}

/* Reduced motion suppression (T063 / FR-034):
   Strictly bypass all view transitions when the user requests reduced motion. */
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}


/* ================================================================
   Accordion disclosure — product-motion recipe `accordion`
   ================================================================
   Job: DISCLOSURE. 18 <details> across services.html (12) and websites.html
   (6) snapped open with no transition; the only open-state styling that
   existed anywhere was a background tint and a +/- glyph swap.

   Progressive enhancement on purpose. `::details-content` plus
   `interpolate-size: allow-keywords` is what makes a height of `auto`
   animatable; browsers without it get TODAY'S behaviour (an instant snap),
   which is a no-op rather than a regression. That is why this needs no markup
   change across eighteen elements — nothing here is load-bearing for layout,
   only for the transition.

   `content-visibility` is transitioned with `allow-discrete` so the content is
   not hidden until the height animation has finished; without it the panel
   vanishes at frame 0 and the height animates over nothing.

   The protocol requires the final state be readable without waiting for
   motion: the content is in the DOM and exposed to assistive tech throughout,
   and <details>/<summary> keep their own semantics and keyboard behaviour. We
   add no ARIA and no JS. */

:root { interpolate-size: allow-keywords; }

details::details-content {
    block-size: 0;
    overflow: hidden;
    transition:
        block-size var(--kms-motion-standard) var(--kms-ease-enter),
        content-visibility var(--kms-motion-standard) allow-discrete;
}
details[open]::details-content { block-size: auto; }

/* The marker turns with the panel rather than jumping. Scoped to summaries
   that actually carry a rotating marker; the +/- glyph swap on websites.html
   is a content change, not a rotation, and is left alone. */
details > summary { transition: color var(--kms-motion-feedback) var(--kms-ease-exit); }

@media (prefers-reduced-motion: reduce) {
    /* Not "a faster animation" — no animation. The open state is the truth and
       it appears immediately. */
    details::details-content {
        transition-duration: var(--kms-motion-instant);
    }
    details > summary { transition-duration: var(--kms-motion-instant); }
    .kms .category-filter { transition-duration: var(--kms-motion-instant); }
}


/* ===========================================================================
   15. The cover fan

   Promoted out of index.html's inline <style>, where no other surface could
   reach it. It belongs to /books.html — the page whose visitor is deciding
   about these exact three books — now that the homepage is a router rather
   than a page that runs a product demo in its own fold.

   Unchanged apart from being scoped to `.kms` like everything else here. Every
   custom property it uses is local to the component and it reads no surface
   token, which is why it moved without a single declaration being edited.

   The pointer handler lives in script.js and looks for the nearest
   [data-tilt-area]. That attribute is REQUIRED and there is deliberately no
   fallback: the handler used to end with `|| fan`, and when an earlier pass
   moved the fan out of the element it had been listening on, that fallback
   took over in silence — the tilt still "worked", but only once the pointer
   was already on the covers, which is the one behaviour the handler exists to
   avoid.
   =========================================================================== */

/* ---------- the cover fan ----------

   On mobile these come FIRST — a stranger should see what you sell
   before they read about it.

   These were three bare <img> tags: the most visually dominant element
   on the page was not clickable, and only the middle one responded to
   anything. Each is now a link to its own book, and all three move as
   one object.

   Every transform is composed from custom properties rather than
   written out per state. That is what lets the resting fan, the
   group-hover spread and the single-cover lift compose instead of
   overwriting each other — and it keeps the whole interaction to four
   rules with no !important anywhere.

   Depth is parallax, not per-cover translateZ, and that is a hard
   engine constraint rather than a preference. Inside a preserve-3d
   context Chromium stops matching :hover on any element pushed to
   negative Z — it still paints it and elementsFromPoint still returns
   it, but the hover rule never fires, so the two outer covers could not
   be hovered at all while the middle one (positive Z) worked. Isolated
   by elimination: neutralising --tz or preserve-3d restored hover;
   neutralising the rotation or the tilt changed nothing.

   So the stack tilts as one plane under .covers's perspective, and each
   cover carries a --par factor that shifts it with the pointer. Near
   covers travel further than far ones, which is what the eye actually
   reads as depth, and every cover stays a normal 2D hit target.

   Nothing here animates on its own. services.html shipped an
   `infinite` CTA animation that made every button a permanently moving
   target; a hero that never stops moving is the same mistake with a
   better excuse. */
.kms .covers {
    order: -1; display: flex; justify-content: center; position: relative;
    /* Perspective belongs HERE, on the element that is never itself
       transformed — not on .covers-in, which carries the pointer tilt.
       With both on one element, Chromium stopped delivering :hover to
       any cover with a negative translateZ: the pointer was provably
       inside the box and elementsFromPoint returned the link, but
       :hover never matched, so the two outer covers could not be hovered
       at all while the middle one (positive Z) worked. */
    perspective: 1200px;
}

/* The shelf. Without a ground the covers read as three JPEGs pasted at
   angles; a single soft ellipse is enough to put them in a room. It
   sits outside .covers-in so it stays flat while the fan tilts. */
.kms .covers::after {
    content: "";
    position: absolute; z-index: 0;
    left: 8%; right: 8%; bottom: -6px; height: 26px;
    background: radial-gradient(50% 50% at 50% 50%, rgba(12, 32, 39, .20), transparent 72%);
    filter: blur(5px);
    pointer-events: none;
}

.kms .covers-in {
    display: flex; align-items: flex-end; gap: 0;
    /* Definite width. Each cover is 30% of this box; left to shrink-to-fit,
       the box took its width from the images, so until they loaded the covers
       were ~100px tall and grew to ~290px: CLS 0.074 @390 on a slow connection,
       invisible locally where images arrive instantly. min(100%, 3 x 190px) is
       what the loaded fan always resolved to, so the finished layout is unchanged. */
    width: 100%; max-width: 570px;
    /* --px/--py are written by the pointer handler, -1..1 from centre.
       They are set on this element and read by the covers below, which
       inherit them. */
    transform: rotateY(calc(var(--px, 0) * 9deg)) rotateX(calc(var(--py, 0) * -6deg));
    transition: transform .28s cubic-bezier(.22, .61, .36, 1);
}

.kms .cover {
    --tx: 0px; --ty: 0px; --rot: 0deg; --sc: 1;
    --par: 0px;   /* parallax travel: near covers move further */
    display: block; width: 30%; max-width: 190px;
    position: relative; z-index: 1;
    border-radius: 4px;
    transform:
        translate(calc(var(--tx) + var(--px, 0) * var(--par)),
                  calc(var(--ty) + var(--py, 0) * var(--par) * 0.4))
        rotate(var(--rot)) scale(var(--sc));
    transition: transform .5s cubic-bezier(.22, .61, .36, 1),
                filter .5s cubic-bezier(.22, .61, .36, 1),
                box-shadow .5s cubic-bezier(.22, .61, .36, 1);
    box-shadow: 0 14px 34px rgba(12, 32, 39, .17);
}
.kms .cover img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* Resting fan. --par opposes between near and far so the covers slide
   against each other rather than drifting as one block; scale carries
   the size hierarchy that translateZ would otherwise have given. */
.kms .cover-2 { --rot: -7deg; --ty: 10px; --par: -7px; }
.kms .cover-1 { --ty: -14px; --sc: 1.1; --par: 14px; z-index: 3; }
.kms .cover-3 { --rot: 7deg; --ty: 10px; --par: -7px; }

/* Group hover — the fan opens. :focus-within gives a keyboard user the
   identical state, which is why the spread lives here and not in JS.

   The trigger is .covers (the grid cell) and NOT .covers-in (the fan
   itself), which is load-bearing. Hung off the fan, the outer covers
   could not be clicked: moving toward one opened the fan, the spread
   slid that cover 26px further out, and the pointer landed in the gap
   it left behind — you had to chase the thing you were aiming at.
   Measured, not guessed: hover was acquired on the middle cover and
   failed on both outer ones.

   .covers is wider than the fan and is not transformed, so the fan is
   already open by the time the pointer arrives and every cover is
   aimed at where it will actually be. */
.kms .covers:hover .cover-2, .kms .covers:focus-within .cover-2 { --tx: -26px; --rot: -11deg; --ty: 2px; }
.kms .covers:hover .cover-1, .kms .covers:focus-within .cover-1 { --ty: -24px; --sc: 1.13; }
.kms .covers:hover .cover-3, .kms .covers:focus-within .cover-3 { --tx: 26px; --rot: 11deg; --ty: 2px; }

/* One cover singled out: it comes forward, the others give way. The
   two rules are disjoint (:hover vs :not(:hover)) so neither needs to
   out-specify the other. */
.kms .covers:has(.cover:hover) .cover:not(:hover),
.kms .covers:has(.cover:focus-visible) .cover:not(:focus-visible) {
    --sc: .9;
    filter: saturate(.78) brightness(.94);
}
.kms .covers .cover:hover, .kms .covers .cover:focus-visible {
    --sc: 1.26; --ty: -30px; --rot: 0deg;
    box-shadow: 0 28px 60px rgba(12, 32, 39, .32);
    z-index: 5;
}


/* The series facts beside the fan on /books.html. Kept minimal and local to
   the books hero rather than reusing index.html's `.facts` strip, which is a
   horizontal rule-separated row built for a different measure. */
.kms .books-hero-facts {
    display: grid; gap: 0; margin: 0 0 1.8rem; padding: 0; list-style: none;
    font-size: 0.95rem; color: var(--kms-ink-2);
}
.kms .books-hero-facts li { padding: 0.55rem 0; border-top: 1px solid var(--kms-rule); }
.kms .books-hero-facts li:first-child { border-top: 0; }
.kms .books-hero-facts b { color: var(--kms-ink); font-weight: 600; }

/* --- /books v2 (specs/books-page-v2): start-here path, reader quotes, first page.
   Scoped `bk-` because index.html does not load this sheet, so its `.voice`
   component cannot be shared; this is the books-page copy, not a fork of it. */
/* The fan is anchored, not centred. Centred against the text column it moved
   whenever the column's height changed: the lede wraps to 3 lines in the
   fallback font and 4 in Inter, so the swap shifted the fan 14px (CLS 0.125 @1440,
   vitals-audit). 8rem is the centred offset at 1440, so it looks the same there. */
@media (min-width: 768px) { .kms .bk-fan { align-self: start; margin-top: 8rem; } }
.kms .bk-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.8rem; }
.kms .bk-section { padding: 4.5rem 0; }
.kms .bk-section--tint { background: var(--kms-paper); border-block: 1px solid var(--kms-rule); }
.kms .bk-h2 {
    font-family: var(--kms-display, 'Outfit', sans-serif);
    font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; letter-spacing: -0.02em;
    font-weight: 700; color: var(--kms-ink); margin: 0 0 2rem;
}
.kms .bk-path { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .kms .bk-path { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.kms .bk-step {
    display: grid; grid-template-columns: 4.5rem 1fr; grid-template-rows: auto auto 1fr;
    column-gap: 1rem; align-items: start; height: 100%;
    padding: 1rem; border: 1px solid var(--kms-rule); border-radius: 12px;
    background: var(--kms-card); color: var(--kms-ink); text-decoration: none;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.kms .bk-step:hover { border-color: var(--kms-accent); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(12, 32, 39, .10); }
.kms .bk-step img { grid-row: 1 / span 3; width: 4.5rem; height: auto; border-radius: 4px; box-shadow: 0 4px 12px rgba(12, 32, 39, .18); }
.kms .bk-step__n { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--kms-muted); }
.kms .bk-step--first { border-color: var(--kms-accent); }
.kms .bk-step--first .bk-step__n { color: var(--kms-accent); }
.kms .bk-step__t { font-weight: 700; font-size: 1.1rem; margin: .15rem 0 .35rem; }
.kms .bk-step__hook { font-size: .95rem; line-height: 1.5; color: var(--kms-ink-2); }
.kms .bk-voices-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 2rem; }
.kms .bk-voices-head .bk-h2 { margin: 0; }
/* Native underlines (mw-guidance: custom-text-decorations); padding-block-end +1px replaces the old 1px border so the SC 2.5.8 target keeps its height. */
.kms .bk-voices-head a { color: var(--kms-accent); font-weight: 600; text-decoration: underline 1px transparent; text-underline-offset: 0.2em; padding-block: 2px 3px; }
.kms .bk-voices-head a:hover { text-decoration-color: var(--kms-accent); }
.kms .bk-voices { display: grid; gap: 1.2rem; }
@media (min-width: 780px) { .kms .bk-voices { grid-template-columns: repeat(3, 1fr); } }
.kms .bk-voice {
    margin: 0; padding: 1.5rem; background: var(--kms-card);
    border: 1px solid var(--kms-rule); border-radius: 12px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
}
.kms .bk-voice blockquote { margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--kms-ink); }
.kms .bk-voice figcaption { font-size: .85rem; color: var(--kms-muted); }
.kms .bk-voice figcaption b { color: var(--kms-ink-2); font-weight: 600; }
.kms .bk-page {
    max-width: 40rem; padding: clamp(1.5rem, 4vw, 2.75rem);
    background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: 4px;
    box-shadow: 0 1px 0 var(--kms-rule), 0 18px 40px rgba(12, 32, 39, .08);
}
@media (prefers-reduced-motion: reduce) { html:not(.motion-on) .kms .bk-step:hover { transform: none; } }
html.motion-off .kms .bk-step:hover { transform: none; }

/* --- /books layout pass (2026-10-06) ---------------------------------------
   The reading path says its order out loud: a numbered connector between
   steps (down on a phone, across from 760px). It sits in the grid gap, so it
   costs no layout, and it belongs to its <li>, so the path's reveal brings it
   in with the card it leads from. */
.kms .bk-path > li { position: relative; }
.kms .bk-path > li:not(:last-child)::after {
    content: ""; position: absolute; z-index: 2; pointer-events: none;
    left: 2.25rem; bottom: -1rem; width: 1.5rem; height: 1rem;
    background: var(--kms-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M12 16 2 4h20z'/%3E%3C/svg%3E") center / 14px 10px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M12 16 2 4h20z'/%3E%3C/svg%3E") center / 14px 10px no-repeat;
}
@media (min-width: 760px) {
    .kms .bk-path > li:not(:last-child)::after {
        left: auto; right: -1.5rem; bottom: auto; top: 50%;
        width: 1.5rem; height: 1.5rem; margin-top: -.75rem;
        -webkit-mask-size: 10px 14px; mask-size: 10px 14px;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24'%3E%3Cpath d='M16 12 4 2v20z'/%3E%3C/svg%3E");
                mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24'%3E%3Cpath d='M16 12 4 2v20z'/%3E%3C/svg%3E");
    }
}
.kms .bk-step { height: 100%; }

/* The hero hands straight on to the reading path: its old 5rem foot plus the
   path's 4.5rem head left ~200px of nothing between "Start with Book 1" and
   the books it starts. */
.kms .bk-hero { padding-bottom: 1rem; }
@media (min-width: 768px) { .kms .bk-hero { padding-bottom: 2rem; } }

/* Catalogue cards: the description and the buy button sit on one line across
   a row however long each hook runs. */
.kms .bk-card details { margin-top: auto; }


/* Section heads for the catalogue: the same eyebrow + bk-h2 as the sections
   above, instead of a second, centred, larger heading style. */
.kms .bk-head { margin-bottom: 2rem; }
.kms .bk-head .bk-h2 { margin-bottom: .5rem; }
.kms .bk-head p:not(.eyebrow) { color: var(--kms-ink-2); font-size: 1.05rem; margin: 0; max-width: 40rem; }
.kms .bk-subhead { font-family: var(--kms-display); font-weight: 700; font-size: 1.35rem; color: var(--kms-ink); margin: 3.5rem 0 1.25rem; }

/* Catalogue shelves + filter (books-filter.js). One shelf per kind of book;
   the filter buttons are built from the shelves, and reuse the blog's
   .filters / .category-filter pills. `hidden` must beat the display rules. */
.kms .books-hero-facts a { color: var(--kms-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding-block: 2px; }
.kms .bk-filterbar { margin: 0 0 .5rem; }
.kms .bk-filterbar[hidden], .kms .bk-shelf[hidden] { display: none; }
.kms .bk-filterbar .filters { margin-top: 0; }
@media (max-width: 759px) {
    .kms .bk-filterbar .filters {
        flex-wrap: wrap;
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
        -webkit-mask-image: none;
                mask-image: none;
    }
}
.kms .bk-filter__n { font-size: .8rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.kms .bk-filter-status { margin: .75rem 0 0; font-size: .92rem; color: var(--kms-muted); min-height: 1.4em; }
.kms .bk-shelf__head { margin: 3rem 0 1.25rem; }
.kms .bk-shelf__head .bk-subhead { margin: 0 0 .35rem; }
.kms .bk-shelf__head p { margin: 0; max-width: 40rem; color: var(--kms-ink-2); }
.kms .bk-card__meta { font-size: .85rem; font-weight: 600; color: var(--kms-muted); }
.kms .bk-card__meta > span { white-space: nowrap; } /* break only at the dots */
/* A shelf that a filter brings back slides in; the ones that stay are left
   alone. Transform/opacity only, so no layout shift; motion-on is the default
   and the Animations button (motion-off) stills it. */
@keyframes bk-shelf-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
html.motion-on .kms .bk-shelf.bk-shelf--in { animation: bk-shelf-in var(--kms-motion-emphasis) var(--kms-ease-enter) both; }

/* "More about this book" (books-detail.js): the tile keeps its size and the
   text opens in a full-width panel under the tile's row. */
.kms .bk-card .bk-more {
    margin: auto 0 1.25rem; width: 100%; min-height: 44px;
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .7rem 1rem; border: 1px solid var(--kms-rule); border-radius: .75rem;
    background: var(--kms-paper); color: var(--kms-ink); font: 600 .875rem/1.2 var(--kms-body);
    cursor: pointer; text-align: left;
    transition: border-color var(--kms-motion-micro) var(--kms-ease-enter), background-color var(--kms-motion-micro) var(--kms-ease-enter);
}
.kms .bk-card .bk-more:hover { border-color: var(--kms-accent); }
.kms .bk-card .bk-more + a { margin-top: 0; }   /* the button takes the free space, so the row lines up */
.kms .bk-card .bk-more[aria-expanded="true"] { border-color: var(--kms-accent); background: var(--kms-card); }
.kms .bk-more__i { transform: rotate(90deg); transition: transform var(--kms-motion-standard) var(--kms-ease-enter); color: var(--kms-accent); }
.kms .bk-more[aria-expanded="true"] .bk-more__i { transform: rotate(-90deg); }
.kms .bk-card.is-open { box-shadow: 0 0 0 2px var(--kms-accent), 0 14px 32px rgba(12, 32, 39, .14); }
.kms .bk-card details[hidden] { display: none; }

/* Phone tiles: the stacked tile was ~790px, a full screen per book, mostly
   cover art. Below 768px (one column) the cover sits beside title + meta and the hook and
   buttons run full width under them. The last div is the content wrapper.
   Use :last-of-type so a sample-page template after it does not affect the
   grid. The tile still opens the reading panel under itself. */
@media (max-width: 767px) {
    .kms .bk-card {
        display: grid; grid-template-columns: 6.25rem minmax(0, 1fr);
        grid-template-rows: auto auto auto 1fr;   /* a tall cover's extra height goes under the meta line */
        column-gap: 1rem; align-items: start; padding: 1.25rem;
    }
    .kms .bk-card > .kms-cover-ground {
        grid-column: 1; grid-row: 1 / span 4; padding: 0; background: none; border-radius: 0; overflow: visible;
    }
    .kms .bk-card > .kms-cover-ground img { width: 100%; max-height: none; }
    .kms .bk-card > div.p-6:last-of-type { display: contents; }
    .kms .bk-card > div.p-6:last-of-type > * { grid-column: 2; }
    .kms .bk-card > div.p-6:last-of-type > .mb-3 { margin-bottom: .4rem; }
    .kms .bk-card > div.p-6:last-of-type > h4 { font-size: 1.05rem; line-height: 1.3; }
    .kms .bk-card > div.p-6:last-of-type > .bk-card__meta { margin-bottom: 0; font-size: .8rem; }
    .kms .bk-card > div.p-6:last-of-type > p.leading-relaxed,
    .kms .bk-card > div.p-6:last-of-type > details,
    .kms .bk-card > div.p-6:last-of-type > .bk-more,
    .kms .bk-card > div.p-6:last-of-type > a { grid-column: 1 / -1; }
    .kms .bk-card > div.p-6:last-of-type > p.leading-relaxed { margin: 1rem 0; }
    .kms .bk-card .bk-more { margin: 0 0 .75rem; }
}

.kms .bk-detail {
    grid-column: 1 / -1; position: relative;
    display: grid; grid-template-columns: 10rem minmax(0, 44rem); gap: 2.25rem; align-items: start;
    padding: 2rem 3.5rem 2rem 2rem; margin-top: -.75rem;
    background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: 1rem;
    box-shadow: 0 14px 36px rgba(12, 32, 39, .10);
}
.kms .bk-detail[hidden] { display: none; }
.kms .bk-detail:focus { outline: none; }
.kms .bk-detail:focus-visible { outline: 2px solid var(--kms-accent); outline-offset: 3px; }
/* The pointer up to the tile this panel belongs to. */
.kms .bk-detail::before {
    content: ""; position: absolute; top: -9px; left: calc(var(--caret-x, 50%) - 9px);
    width: 16px; height: 16px; transform: rotate(45deg);
    background: var(--kms-card); border-left: 1px solid var(--kms-rule); border-top: 1px solid var(--kms-rule);
}
.kms .bk-detail__cover img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 8px 22px rgba(12, 32, 39, .18); }
.kms .bk-detail__t { font-family: var(--kms-display); font-weight: 700; font-size: 1.45rem; line-height: 1.25; color: var(--kms-ink); margin: 0 0 .35rem; }
.kms .bk-detail .bk-card__meta { margin: 0 0 1.1rem; }
.kms .bk-detail__text p { font-size: 1.04rem; line-height: 1.7; color: var(--kms-ink-2); margin: 0 0 1em; max-width: 40rem; }
.kms .bk-detail__buy { margin-top: .5rem; }
.kms .bk-detail__close {
    position: absolute; top: .75rem; right: .75rem; width: 44px; height: 44px;
    display: grid; place-items: center; border: 0; border-radius: 999px;
    background: transparent; color: var(--kms-ink-2); font-size: 1.15rem; cursor: pointer;
}
.kms .bk-detail__close:hover { background: var(--kms-paper); color: var(--kms-ink); }
@media (max-width: 767px) {
    .kms .bk-detail { grid-template-columns: 1fr; padding: 1.5rem 1.25rem; gap: 0; }
    .kms .bk-detail__cover { display: none; }   /* the tile right above shows it */
    .kms .bk-detail__t { padding-right: 2.5rem; }
}
@keyframes bk-detail-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
html.motion-on .kms .bk-detail.is-entering { animation: bk-detail-in var(--kms-motion-emphasis) var(--kms-ease-enter) both; }
html.motion-off .kms .bk-more__i { transition: none; }

/* /read/<book>.html: a free sample chapter (owner 2026-11-04: conversion).
   The chapter sits on the same paper card the old /books excerpt used
   (.bk-page), in a book face, at a reading measure. */
.kms .rd { padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; }
.kms .rd .art-wrap { max-width: 52rem; }
.kms .rd-head { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 2rem; align-items: center; margin-bottom: 2.5rem; }
.kms .rd-head__cover img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 16px 34px rgba(12, 32, 39, .22); }
.kms .rd-title { font-size: clamp(1.8rem, 4.4vw, 2.7rem); line-height: 1.12; margin: .35rem 0 .6rem; }
.kms .rd-dek { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.5; color: var(--kms-ink-2); margin: 0 0 .8rem; }
.kms .rd-head .bk-card__meta { margin: 0 0 1.25rem; }
.kms .rd-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.kms .rd-setup { max-width: 40rem; margin: 0 auto 1.5rem; padding: 1rem 1.25rem; border-left: 3px solid var(--kms-accent); background: var(--kms-card); border-radius: 0 .75rem .75rem 0; color: var(--kms-ink-2); line-height: 1.6; }
.kms .rd-setup b { color: var(--kms-ink); }
.kms .rd-text { margin: 0 auto; scroll-margin-top: 6rem; }
.kms .rd-text > p, .kms .rd-flow > p, .kms .rd-text .rd-sub {
    font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
    font-size: 1.15rem; line-height: 1.75; color: var(--kms-ink); margin: 0 0 1em;
}
.kms .rd-text .rd-sub { font-weight: 700; font-size: 1.05rem; margin: 1.75em 0 .5em; letter-spacing: .02em; }
.kms .rd-ch { font-family: var(--kms-display); font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.2; text-align: center; margin: .5rem 0 2rem; color: var(--kms-ink); }
.kms .rd-ch span { display: block; font: 600 .8rem/1 var(--kms-body); letter-spacing: .14em; text-transform: uppercase; color: var(--kms-muted); margin-bottom: .6rem; }
.kms .rd-text > p:first-of-type::first-letter, .kms .rd-flow > p:first-of-type::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: .08em .1em 0 0; color: var(--kms-ink); font-weight: 700; }
.kms .rd-break { border: 0; height: 1.5em; margin: 1.5em 0; text-align: center; }
.kms .rd-break::after { content: "\2022\2003\2022\2003\2022"; color: var(--kms-muted); font-size: .9rem; }
.kms .rd-end {
    display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 2rem; align-items: center;
    max-width: 40rem; margin: 3rem auto 0; padding: 2rem; border-radius: 1rem;
    background: var(--kms-card); border: 1px solid var(--kms-rule); box-shadow: 0 14px 36px rgba(12, 32, 39, .10);
}
.kms .rd-end img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 12px 26px rgba(12, 32, 39, .22); }
.kms .rd-end .bk-h2 { margin: .25rem 0 .6rem; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.kms .rd-end p { line-height: 1.6; color: var(--kms-ink-2); margin: 0 0 1.25rem; }
.kms .rd-end__facts { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: .875rem; font-weight: 600; color: var(--kms-muted); }
.kms .rd-more { max-width: 40rem; margin: 3rem auto 0; }
.kms .rd-more ul { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .75rem; }
.kms .rd-more li { padding: 0; margin: 0; }
.kms .rd-more li::before { content: none; }   /* style.css `article nav` hangs a violet triangle on each item */
.kms .rd-more__a { display: flex; align-items: center; gap: 1rem; min-height: 44px; padding: .6rem; border-radius: .75rem; border: 1px solid var(--kms-rule); background: var(--kms-card); color: var(--kms-ink); text-decoration: none; transition: border-color var(--kms-motion-micro) var(--kms-ease-enter); }
.kms .rd-more__a:hover { border-color: var(--kms-accent); }
.kms .rd-more__a img { width: 3rem; height: auto; border-radius: 3px; flex: none; }
.kms .rd-more__a > span { display: grid; gap: .15rem; }
.kms .rd-more__a > span > span { font-size: .875rem; color: var(--kms-muted); }
/* Wide read and look-inside pages (owner 2026-11-21): "More ..." is a row of
   tiles across the page, 3 across from 640px, not a long list down a 640px
   column. Phones keep the compact one-line rows. */
@media (min-width: 640px) {
    .kms .art-wrap:is(:has(.rd-paged), :has(.in-pages--wide)) .rd-more { max-width: 72rem; }
    .kms .art-wrap:is(:has(.rd-paged), :has(.in-pages--wide)) .rd-more ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
    .kms .art-wrap:is(:has(.rd-paged), :has(.in-pages--wide)) .rd-more__a {
        flex-direction: column; align-items: stretch; gap: 0; height: 100%; padding: 0; overflow: hidden; border-radius: 1rem;
        transition: border-color var(--kms-motion-micro) var(--kms-ease-enter), transform var(--kms-motion-micro) var(--kms-ease-enter), box-shadow var(--kms-motion-micro) var(--kms-ease-enter);
    }
    .kms .art-wrap:is(:has(.rd-paged), :has(.in-pages--wide)) .rd-more__a:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(12, 32, 39, .14); }
    .kms .art-wrap:is(:has(.rd-paged), :has(.in-pages--wide)) .rd-more__a img {
        box-sizing: content-box; width: auto; height: clamp(9rem, 16vw, 13rem); max-width: 100%; object-fit: contain;
        padding: 1.25rem; margin: 0 auto; border-radius: 0; filter: drop-shadow(0 8px 14px rgba(12, 32, 39, .22));
    }
    .kms .art-wrap:is(:has(.rd-paged), :has(.in-pages--wide)) .rd-more__a > span { padding: 1rem 1.1rem 1.2rem; border-top: 1px solid var(--kms-rule); align-content: start; }
}

/* Look-inside pages (/inside/): activity books and journals have no chapter
   to read, so the sample pages sit in a grid under the header. */
.kms .in-pages { max-width: 72rem; margin: 0 auto; scroll-margin-top: 88px; }
.kms .in-pages__lede { color: var(--kms-muted); margin: .35rem 0 1.25rem; }
.kms .in-pages__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1.75rem 1.5rem; }
.kms .in-pages__grid li { padding: 0; margin: 0; }
.kms .in-pages__grid li::before { content: none; }
.kms .in-pages__grid figure { margin: 0; }
.kms .in-pages__grid a { display: block; border-radius: 6px; transition: transform var(--kms-motion-micro) var(--kms-ease-enter), box-shadow var(--kms-motion-micro) var(--kms-ease-enter); }
.kms .in-pages__grid a:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(12, 32, 39, .16); }
.kms .in-pages__grid img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--kms-rule); border-radius: 6px; box-shadow: 0 6px 16px rgba(12, 32, 39, .10); }
.kms .in-pages__grid figcaption { margin-top: .65rem; font-size: .9rem; line-height: 1.5; color: var(--kms-ink-2); }
@media (max-width: 640px) {
    .kms .in-pages__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .9rem; }
    .kms .in-pages__grid figcaption { font-size: .8rem; }
}
@media (max-width: 639px) {
    .kms .rd-head { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.1rem; align-items: start; }
    .kms .rd-head .rd-dek, .kms .rd-head .bk-card__meta, .kms .rd-ctas { grid-column: 1 / -1; }
    /* Stacked, full width: side by side they fit in the fallback font and wrap
       once the web font lands, a 64px shift (CLS 0.097). */
    .kms .rd-ctas { display: grid; }
    .kms .rd-ctas .btn { width: 100%; text-align: center; }
    .kms .rd-head__text { display: contents; }
    .kms .rd-head__text > .eyebrow, .kms .rd-title { grid-column: 2; }
    .kms .rd-head__cover { grid-row: 1 / span 2; }
    .kms .rd-text p { font-size: 1.08rem; }
    .kms .rd-end { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.1rem; padding: 1.4rem; align-items: start; }
}
/* /book/<slug>.html: one page per book (2026-11-20). Reuses .rd-head and
   .ss-faq; these add the facts table, the section rhythm and the lists. */
.kms .bk-sec { max-width: 44rem; margin: 0 auto 2.75rem; }
.kms .bk-sec > h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0 0 .8rem; text-wrap: balance; }
.kms .bk-sec > p { line-height: 1.7; color: var(--kms-ink-2); margin: 0 0 1em; max-width: 65ch; }
.kms .bk-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem 1.5rem; margin: 0; padding: 1.25rem 1.4rem; background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: .9rem; }
.kms .bk-facts dt { font-weight: 600; color: var(--kms-ink); }
.kms .bk-facts dd { margin: 0; color: var(--kms-ink-2); font-variant-numeric: tabular-nums; }
.kms .bk-list, .kms .bk-qs { margin: 0; padding-left: 1.25rem; display: grid; gap: .55rem; line-height: 1.6; color: var(--kms-ink-2); }
.kms .bk-list { list-style: disc outside; }
.kms .bk-qs { list-style: decimal outside; }
.kms .bk-list li, .kms .bk-qs li { display: list-item; padding-left: .2rem; }
.kms .bk-list li::before, .kms .bk-qs li::before { content: none; }
.kms .bk-list li::marker { color: var(--kms-accent); }
.kms .bk-qs li::marker { color: var(--kms-accent); font-weight: 700; }
.kms .bk-list b { color: var(--kms-ink); }
.kms .bk-sec .ss-faq { margin: 0; max-width: none; }
.kms .bk-note { margin-top: 1rem !important; padding: .9rem 1.1rem; background: var(--kms-card); border: 1px solid var(--kms-rule); border-left: 3px solid var(--kms-accent); border-radius: 0 .75rem .75rem 0; }
.kms .bk-note b { color: var(--kms-ink); }
.kms .bk-sec > .bk-buy { margin: 1.1rem 0 0; }
/* Book info under the chapter: one column on phones; on wide screens two
   columns, so the page uses the width while every line stays readable. */
.kms .bk-info { max-width: 72rem; margin: 3.5rem auto 0; }
@media (min-width: 1024px) {
    .kms .bk-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; align-items: start; }
    .kms .bk-info > .bk-sec { max-width: none; margin: 0 0 3rem; }
}
/* At-a-glance strip under the title: the three things a parent checks first. */
.kms .rd-glance { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.kms .rd-glance li { margin: 0; padding: .6rem .75rem; background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: .7rem; display: grid; gap: .1rem; font-size: .85rem; line-height: 1.35; color: var(--kms-ink-2); }
.kms .rd-glance li::before { content: none; }
.kms .rd-glance b { color: var(--kms-ink); font-size: .95rem; }
@media (max-width: 639px) {
    .kms .rd-head .rd-glance { grid-column: 1 / -1; grid-template-columns: 1fr; gap: .4rem; }
    .kms .rd-glance li { grid-template-columns: max-content 1fr; gap: .6rem; align-items: baseline; }
}
@media (max-width: 639px) {
    .kms .bk-facts { grid-template-columns: 1fr; gap: .1rem; }
    .kms .bk-facts dd { margin-bottom: .55rem; }
}
/* Paged chapter (read-pager.js): the chapter as pages you turn. The book is a
   fixed-height window; .rd-flow is laid out in columns as wide as one page,
   so the text continues sideways, page after page. Gap = 2 x the side
   padding, so every page keeps the same margins either side of the spine. */
.kms .rd .art-wrap:has(.rd-paged) { max-width: none; }
/* Look-inside pages use the width the same way (owner 2026-11-21): header
   as wide as a read page, sample pages and book info at the .bk-info width,
   three pages across on wide screens so each one is big enough to read. */
.kms .rd .art-wrap:has(.in-pages--wide) { max-width: none; }
@media (min-width: 1024px) {
    .kms .in-pages--wide .in-pages__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
}
.kms .rd-head { max-width: 64rem; margin-left: auto; margin-right: auto; }
/* Header as wide as the open book below it, with a cover big enough to read
   (2026-11-20). Phones: the eyebrow runs full width above the cover, the
   glance rows and buttons tighten, so page 1 of the chapter shows on the
   first screen. Buttons stay a fixed two-column grid: a flex row wraps when
   the web font lands (the CLS note above). */
@media (min-width: 640px) {
    .kms .rd-head { grid-template-columns: 12.5rem minmax(0, 1fr); gap: 3rem; }
}
@media (max-width: 639px) {
    .kms .rd-head { row-gap: .9rem; margin-bottom: 1.75rem; }
    .kms .rd-head__text > .eyebrow { grid-column: 1 / -1; grid-row: 1; margin: 0; }
    .kms .rd-head__cover { grid-row: 2 / span 1; }
    .kms .rd-head .rd-title { grid-row: 2; align-self: center; margin: 0; }
    .kms .rd-head .rd-dek, .kms .rd-head .bk-card__meta { margin: 0; }
    .kms .rd-head .rd-glance { margin: 0; }
    .kms .rd-glance li { padding: .5rem .75rem; }
    .kms .rd-ctas { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .kms .rd-ctas .btn { padding-left: .5rem; padding-right: .5rem; white-space: nowrap; }
}
.kms .rd-text.rd-paged {
    max-width: none; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0;
    scroll-margin-top: 5rem;
}
.kms .rd-book {
    position: relative; overflow: clip; touch-action: pan-y;
    /* The real trim: 6 x 9 in per page (CSS inches), print margins. */
    width: calc(6in * var(--pv, 1)); height: 9in;
    padding: .75in .75in 1in;
    background: var(--kms-card); border: 1px solid var(--kms-rule); border-radius: 6px;
    box-shadow: 0 1px 0 var(--kms-rule), 0 22px 48px rgba(12, 32, 39, .12);
}
.kms .rd-book:focus { outline: none; }
.kms .rd-book:focus-visible { outline: 3px solid var(--kms-focus); outline-offset: 3px; }
.kms .rd-flow { height: 100%; column-fill: auto; will-change: transform; }
html.motion-on .kms .rd-flow.is-turning { transition: transform var(--kms-motion-emphasis) var(--kms-ease-enter); }
.kms .rd-flow p { orphans: 2; widows: 2; }
.kms .rd-flow .rd-ch, .kms .rd-flow .rd-sub { break-after: avoid; }
.kms .rd-flow .rd-ch { margin-top: 1.5rem; }
/* The buy box is the last page. */
.kms .rd-flow .rd-end {
    break-before: column; break-inside: avoid; display: block; max-width: none;
    margin: 0; padding: 1rem 0 0; border: 0; background: none; box-shadow: none; text-align: center;
}
.kms .rd-flow .rd-end img { width: auto; max-width: 8rem; max-height: 11rem; margin: 0 auto 1rem; display: block; }
.kms .rd-flow .rd-end p:not(.eyebrow) { margin: 0 auto 1.1rem; max-width: 26rem; }
.kms .rd-flow .rd-end__facts { justify-content: center; }
.kms .rd-folio { position: absolute; bottom: .45in; font: 600 .8rem/1 var(--kms-body); color: var(--kms-muted); font-variant-numeric: tabular-nums; }
.kms .rd-folio--l { left: .75in; }
.kms .rd-folio--r { right: .75in; }
/* Print type: Georgia 12 pt (16px), a touch more leading for a screen. */
.kms .rd-flow > p, .kms .rd-flow .rd-sub { font-size: 1rem; line-height: 1.5; }
.kms .rd-stage { display: grid; grid-template-columns: auto auto auto; grid-template-areas: "prev book next" ". count ."; justify-content: center; align-items: center; gap: 1rem 1.25rem; }
.kms .rd-stage .rd-book { grid-area: book; }
.kms .rd-nav--prev { grid-area: prev; }
.kms .rd-nav--next { grid-area: next; }
.kms .rd-stage .rd-count { grid-area: count; }
/* The turning page: a soft shadow sweeps across as the text slides. */
.kms .rd-sweep { position: absolute; inset: 0; pointer-events: none; opacity: 0; display: none; }
.kms .rd-sweep.is-fwd, .kms .rd-sweep.is-back { display: block; }   /* only while a page turns: at rest nothing sits over the text */
@keyframes rd-sweep-fwd { 0% { opacity: 0; transform: translateX(60%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(-60%); } }
@keyframes rd-sweep-back { 0% { opacity: 0; transform: translateX(-60%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(60%); } }
.kms .rd-sweep { background: linear-gradient(90deg, transparent 35%, rgba(12, 32, 39, .07) 48%, rgba(255, 255, 255, .5) 52%, transparent 65%); }
html.motion-on .kms .rd-sweep.is-fwd { animation: rd-sweep-fwd var(--kms-motion-emphasis) var(--kms-ease-enter); }
html.motion-on .kms .rd-sweep.is-back { animation: rd-sweep-back var(--kms-motion-emphasis) var(--kms-ease-enter); }
.kms .rd-nav {
    flex: none; width: 48px; height: 48px; display: grid; place-items: center;
    border: 1px solid var(--kms-rule); border-radius: 999px; background: var(--kms-card); color: var(--kms-ink);
    font-size: 1.15rem; cursor: pointer; transition: border-color var(--kms-motion-micro) var(--kms-ease-enter);
}
.kms .rd-nav:hover:not(:disabled) { border-color: var(--kms-accent); }
.kms .rd-nav:disabled { opacity: .35; cursor: default; }
.kms .rd-nav__back { transform: rotate(180deg); }
.kms .rd-count { margin: 0; min-width: 10rem; text-align: center; font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; color: var(--kms-ink-2); }
/* An open book: two pages and a spine. CSS sets --pv, so the book is the
   right width at first paint (read-pager.js reads it; setting it from JS
   widened the book after paint, CLS 0.24). */
/* Owner (11-04, later): "scale the pages to fit the browser ... 2 pages at a
   time", 1 on phones. From 760px the whole page is drawn in one unit, --u
   (one inch of the printed page): as large as the window allows (height
   minus the header and the page count, width minus the arrows), never above 1.25in,
   never below .7in (a short window scrolls rather than shrink the type
   past reading). Everything inside is in em of font-size = --u / 6 (12 pt at
   1in), so the page keeps the print proportions and the same page breaks at
   every size. Pure CSS: right at first paint, no shift. */
@media (min-width: 760px) {
    .kms .rd-book {
        --u: max(.7in, min(1.25in, (100dvh - 8rem) / 9, (100vw - 12rem) / (6 * var(--pv, 1))));
        width: calc(var(--u) * 6 * var(--pv, 1)); height: calc(var(--u) * 9);
        padding: calc(var(--u) * .75) calc(var(--u) * .75) var(--u);
        font-size: calc(var(--u) / 6);
    }
    .kms .rd-book .rd-flow > p, .kms .rd-book .rd-flow .rd-sub, .kms .rd-book .rd-end p { font-size: 1em; }
    .kms .rd-book .rd-ch { font-size: 1.75em; margin: .85em 0 1.15em; }
    .kms .rd-book .rd-ch span { font-size: .46em; }
    .kms .rd-book .rd-break::after { font-size: .9em; }
    .kms .rd-book .rd-end .eyebrow { font-size: .8em; }
    .kms .rd-book .rd-end .bk-h2 { font-size: 1.6em; }
    .kms .rd-book .rd-end__facts { font-size: .875em; }
    .kms .rd-book .rd-end img { max-width: 8em; max-height: 11em; }
    .kms .rd-book .rd-end p:not(.eyebrow) { max-width: 26em; }
    .kms .rd-book .rd-folio { font-size: .8em; bottom: calc(var(--u) * .45); }
    .kms .rd-book .rd-folio--l { left: calc(var(--u) * .75); }
    .kms .rd-book .rd-folio--r { right: calc(var(--u) * .75); }
}
@media (min-width: 1100px) {
    .kms .rd-book { --pv: 2; }
    /* A layer behind the text, not a background on the page: the page stays
       a plain colour, so the contrast audit can measure the text on it. */
    .kms .rd-book::before {
        content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 2.5rem); width: 5rem; pointer-events: none;
        background: linear-gradient(90deg, transparent, rgba(12, 32, 39, .045) 49%, rgba(12, 32, 39, .09) 50%, rgba(12, 32, 39, .045) 51%, transparent);
    }
    .kms .rd-flow { position: relative; }
}
@media (max-width: 639px) {
    /* Leaves room for the arrows above the phone tab bar. */
    .kms .rd-book { padding: 1.75rem 1.4rem 2.6rem; }
    .kms .rd-folio--l { left: 50%; transform: translateX(-50%); bottom: .9rem; }
    .kms .rd-flow .rd-end img { display: none; }   /* the cover is at the top of the page; the box must fit one phone page */
    .kms .rd-flow .rd-end .bk-h2 { font-size: 1.3rem; }
    /* Short phones cap the page height (below), so the end box drops its padding
       and the small facts line to stay on one page. */
    .kms .rd-flow .rd-end { padding-top: 0; }
    .kms .rd-flow .rd-end__facts { display: none; }
    .kms .rd-flow .rd-end p:not(.eyebrow) { margin-bottom: .9rem; line-height: 1.5; }
}
@media (max-width: 759px) {
    .kms .rd-stage { grid-template-columns: auto 1fr auto; grid-template-areas: "book book book" "prev count next"; gap: .9rem .5rem; }
    .kms .rd-book { width: 100%; height: auto; aspect-ratio: 2 / 3; }
}
@media (max-width: 639px) {
    /* Short phones (iPhone SE, 667px): a 2:3 page plus the arrows ran under the
       bottom bar. Cap the page so page + arrows fit between the top header and
       the bottom bar; the pager just makes more pages. */
    .kms .rd-book { max-height: calc(100vh - 13.5rem - env(safe-area-inset-bottom, 0px)); max-height: calc(100svh - 13.5rem - env(safe-area-inset-bottom, 0px)); }
}
/* Read-chapter badge on a novel's cover: a link (works without JavaScript). */
.kms a.bk-peek-btn { text-decoration: none; }

/* "Peek inside" (books-peek.js): a badge on the cover opens a page viewer. */
.kms .bk-peek-btn {
    position: relative; display: inline-block; padding: 0; border: 0; background: none;
    cursor: pointer; border-radius: .5rem; line-height: 0; max-width: 100%;
}
.kms .bk-peek-btn:focus-visible { outline: 2px solid var(--kms-accent); outline-offset: 4px; }
.kms .bk-peek-btn__badge {
    position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%);
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    padding: .45rem .85rem; border-radius: 999px; line-height: 1.1;
    background: var(--kms-ink); color: var(--kms-card); font: 600 .8rem/1.1 var(--kms-body);
    box-shadow: 0 6px 16px rgba(12, 32, 39, .25);
    transition: background-color var(--kms-motion-micro) var(--kms-ease-enter);
}
.kms .bk-peek-btn:hover .bk-peek-btn__badge,
.kms .bk-peek-btn:focus-visible .bk-peek-btn__badge { background: var(--kms-accent); color: var(--kms-accent-ink); }
.kms .bk-card.has-peek > .kms-cover-ground { overflow: visible; padding-bottom: 2.25rem; }
@media (max-width: 767px) {
    .kms .bk-card.has-peek > .kms-cover-ground { padding-bottom: 1.1rem; }
    .kms .bk-card > .kms-cover-ground .bk-peek-btn { width: 100%; }
    .kms .bk-peek-btn__badge { font-size: .72rem; padding: .4rem .6rem; gap: .3rem; }
}

html.bk-peek-open { overflow: hidden; }
.bk-peek {
    position: fixed; inset: 0; margin: auto;   /* the site reset zeroes dialog margins; restore centring */
    width: calc(100vw - 2rem); height: calc(100dvh - 2rem); max-width: none; max-height: none;   /* room for a real 8.5 x 11 in page */
    padding: 0; border: 0; border-radius: 1.25rem; overflow: hidden;
    background: var(--kms-paper); color: var(--kms-ink);
    box-shadow: 0 30px 80px rgba(12, 32, 39, .35);
}
.bk-peek[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.bk-peek::backdrop { background: rgba(12, 32, 39, .62); }
.bk-peek__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1rem .6rem 1.5rem; }
.bk-peek__t { font-family: var(--kms-display); font-weight: 700; font-size: 1.25rem; line-height: 1.25; margin: 0; color: var(--kms-ink); }
.bk-peek__sub { margin: .2rem 0 0; font-size: .875rem; color: var(--kms-muted); font-weight: 600; }
.bk-peek__close, .bk-peek__nav {
    flex: none; width: 44px; height: 44px; display: grid; place-items: center;
    border: 1px solid var(--kms-rule); border-radius: 999px; background: var(--kms-card);
    color: var(--kms-ink); font-size: 1.1rem; cursor: pointer;
    transition: border-color var(--kms-motion-micro) var(--kms-ease-enter), opacity var(--kms-motion-micro) var(--kms-ease-enter);
}
.bk-peek__close { border-color: transparent; background: transparent; }
.bk-peek__close:hover, .bk-peek__nav:hover:not(:disabled) { border-color: var(--kms-accent); }
.bk-peek__nav:disabled { opacity: .35; cursor: default; }
.bk-peek__back { transform: rotate(180deg); }
.bk-peek__track {
    position: relative; display: flex; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 .75rem;
}
.bk-peek__track::-webkit-scrollbar { display: none; }
.bk-peek__track:focus { outline: none; }
.bk-peek__track:focus-visible { outline: 3px solid var(--kms-focus); outline-offset: -6px; border-radius: .9rem; box-shadow: none; }  /* inside the track: the global halo would paint over the header and footer */
.bk-peek__slide {
    flex: 0 0 100%; scroll-snap-align: start; min-width: 0; height: 100%;
    overflow-y: auto; overscroll-behavior: contain; padding: .5rem .75rem;
}
/* Owner (11-04, later): "scale the pages to fit the browser ... 2 pages at a
   time", 1 on phones. Each slide is a size container; the page is as wide as
   fits both its width and its height (less the caption allowance), keeping
   the 8.5 x 11 in shape, so the whole page is always in view. The caption
   sits above the page so it is read first. */
.bk-peek__slide { container-type: size; }
.bk-peek__slide figure { margin: auto; width: min(100%, (100cqh - 4.25rem) * 8.5 / 11); display: flex; flex-direction: column; align-items: center; gap: .65rem; }
.bk-peek__slide:not(.bk-peek__end) { display: flex; }   /* margin:auto centres the page in the slide, and never clips it when it overflows */
.bk-peek__slide figcaption { order: -1; }
/* An open book: two pages meet at the spine. Spreads always start on an
   even slide (the arrows move by two), and the buy slide is a spread of its
   own so the last page never repeats. Assumes an even page count (6). */
@media (min-width: 900px) {
    .bk-peek__slide { flex-basis: 50%; }
    .bk-peek__slide:nth-child(odd):not(.bk-peek__end) figure { margin-right: 0; }
    .bk-peek__slide:nth-child(even) figure { margin-left: 0; }
    .bk-peek__slide.bk-peek__end { flex-basis: 100%; }
}
.bk-peek__slide img {
    display: block; width: 100%; height: auto;
    background: #fff; border-radius: 3px; box-shadow: 0 2px 4px rgba(12, 32, 39, .08), 0 12px 30px rgba(12, 32, 39, .16);
}
.bk-peek__slide figcaption { flex: none; max-width: 36rem; text-align: center; font-size: .9rem; line-height: 1.45; color: var(--kms-ink-2); }
.bk-peek__slide figcaption b { color: var(--kms-ink); }
.bk-peek__end { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; }
.bk-peek__slide .bk-peek__endcover { width: auto; height: auto; object-fit: contain; max-height: 38%; max-width: 60%; border-radius: 4px; box-shadow: 0 12px 30px rgba(12, 32, 39, .22); margin-bottom: 1rem; }
.bk-peek__endt { font-family: var(--kms-display); font-weight: 700; font-size: 1.35rem; margin: 0; color: var(--kms-ink); }
.bk-peek__endp { margin: 0 0 1rem; max-width: 24rem; color: var(--kms-ink-2); line-height: 1.5; }
.bk-peek__endp:empty { display: none; }
.bk-peek__buy { min-width: 14rem; }
.bk-peek__again { margin-top: .5rem; min-height: 44px; padding: 0 1rem; border: 0; background: none; color: var(--kms-ink-2); font: 600 .875rem var(--kms-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bk-peek__foot { display: flex; align-items: center; justify-content: center; gap: 1.25rem; padding: .6rem 1rem 1rem; }
.bk-peek__count { margin: 0; min-width: 11rem; text-align: center; font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--kms-ink-2); }
/* Phones: the viewer is the whole screen. */
@media (max-width: 599px) {
    .bk-peek { width: 100vw; height: 100dvh; border-radius: 0; }
    .bk-peek__head { padding: .75rem .5rem .25rem 1rem; }
    .bk-peek__t { font-size: 1.05rem; }
    .bk-peek__track { padding: 0; }
    .bk-peek__slide { padding: .25rem .75rem; }
    .bk-peek__foot { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}
@keyframes bk-peek-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bk-peek-fade { from { opacity: 0; } to { opacity: 1; } }
html.motion-on .bk-peek[open] { animation: bk-peek-in var(--kms-motion-emphasis) var(--kms-ease-enter) both; }
html.motion-on .bk-peek[open]::backdrop { animation: bk-peek-fade var(--kms-motion-standard) ease-out both; }

/* Coming next: the two announced titles as one quiet row. */
.kms .bk-next { display: grid; gap: 1.2rem; }
@media (min-width: 760px) { .kms .bk-next { grid-template-columns: repeat(2, 1fr); } }
.kms .bk-next__item {
    display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1.25rem; align-items: start;
    padding: 1.25rem; border: 1px dashed var(--kms-rule); border-radius: 12px; background: var(--kms-card);
}
.kms .bk-next__ph {
    grid-row: 1 / span 4; width: 4.5rem; aspect-ratio: 2 / 3; border-radius: 4px;
    background: linear-gradient(160deg, #12A0BC, #0B6E82); display: grid; place-items: center; color: rgba(255,255,255,.7);
}
.kms .bk-next__ph svg { width: 1.6rem; height: 1.6rem; }
.kms .bk-next__n { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--kms-gold-ink); }
.kms .bk-next__t { font-weight: 700; font-size: 1.1rem; color: var(--kms-ink); margin: .15rem 0 .25rem; }
.kms .bk-next__d { font-size: .95rem; color: var(--kms-ink-2); margin: 0 0 .75rem; }
.kms .bk-next__item a { justify-self: start; color: var(--kms-accent); font-weight: 600; text-decoration: underline 1px currentColor; text-underline-offset: 0.2em; padding-block: 2px 3px; }

/* The Animations button. Same component as the homepage's (home-wow.css),
   which index.html carries itself because it does not load this sheet. */
.motion-toggle-row { display: flex; margin: 0; }
.motion-toggle-row[hidden] { display: none; }
.motion-toggle {
    display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem;
    padding: .35rem .85rem; border: 1px solid var(--kms-rule); border-radius: 999px;
    background: var(--kms-card); color: var(--kms-ink-2); font: 600 .85rem/1 var(--kms-body); cursor: pointer;
}
.motion-toggle:hover { background: #E2EFF3; }
.motion-toggle:focus-visible { outline: 2px solid var(--kms-accent); outline-offset: 2px; }
.motion-toggle .mt-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #8A9BA3; }
.motion-toggle[aria-pressed="true"] .mt-dot { background: var(--kms-accent); }
.motion-toggle .mt-state { color: var(--kms-ink); }

/* --- /books motion ----------------------------------------------------------
   Everything below runs only when motion is allowed: OS + the Animations
   button, via html.motion-on / html.motion-off / html.motion-gentle
   (kms-motion.js). Transform and opacity only — layout never moves, so none
   of it can cost CLS — and nothing touches the hero text, the LCP element.

   1. The deal. On arrival the three covers come off one stack into the fan:
      a `from`-only keyframe animates TO whatever the resting transform is, so
      the fan's own geometry (and the pointer tilt after it) stays in the rules
      above. Covers never start invisible: an image held at opacity 0 is not
      "painted" for LCP. */
@keyframes bkDeal {
    from { transform: translate(var(--deal-x, 0), 18px) rotate(0deg) scale(.94); }
}
@keyframes bkDealTop {
    from { transform: translate(0, 26px) scale(1.02); }
}
html:not(.motion-off):not(.motion-gentle) .kms .bk-fan .cover {
    animation: bkDeal .95s cubic-bezier(.2, .8, .2, 1) both;
}
html:not(.motion-off):not(.motion-gentle) .kms .bk-fan .cover-2 { --deal-x: 92%;  animation-delay: .12s; }
html:not(.motion-off):not(.motion-gentle) .kms .bk-fan .cover-3 { --deal-x: -92%; animation-delay: .22s; }
html:not(.motion-off):not(.motion-gentle) .kms .bk-fan .cover-1 { animation-name: bkDealTop; animation-duration: .8s; }

/* 1a. The water the covers stand in. Wider than the fan and centred on its
      foot; the hero clips the overhang. Under the covers, above the shelf. */
.kms .bk-fan .kms-waterline {
    left: -8%; right: -8%; bottom: -14px; height: 72px;
    opacity: .5;
}
/* Beside the text from 768px: overhang only on the outer (left) side, so no
   stroke runs under the lede or the buttons. */
@media (min-width: 768px) {
    .kms .bk-fan .kms-waterline { left: -16%; right: -2%; bottom: -34px; height: 120px; }
}
.kms .bk-fan .covers-in { position: relative; z-index: 1; }

/* 1b. Depth on the way out. As the hero scrolls off, the fan rises a little
      faster than the page and comes slightly toward the reader. Scroll-driven
      (no JS, compositor-only) and written with the individual `translate` /
      `scale` properties, so it composes with the deal and the pointer tilt
      instead of overwriting their `transform`. Browsers without scroll
      timelines simply keep a still fan. */
@supports (animation-timeline: view()) {
    /* `overflow: hidden` makes the hero a scroll container, and view() binds
       to the NEAREST one — a box that never scrolls, so the rise sat at 0%.
       `clip` clips identically without being a scroller. */
    .kms .bk-hero { overflow: clip; }
    @keyframes bkFanRise { to { translate: 0 -56px; scale: 1.04; } }
    html:not(.motion-off):not(.motion-gentle) .kms .bk-fan {
        animation: bkFanRise linear both;
        animation-timeline: view();
        animation-range: exit 0% exit 100%;
    }
}

/* 2. Covers in the catalogue lift toward the reader when their card is
      hovered or focused — the card already darkens its shadow; this says
      "this one". */
.kms .bk-card .bk-card__cover { transition: transform .45s cubic-bezier(.22, .61, .36, 1), box-shadow .45s cubic-bezier(.22, .61, .36, 1); }
.kms .bk-card:hover .bk-card__cover,
.kms .bk-card:focus-within .bk-card__cover { transform: translateY(-6px) rotate(-1.2deg) scale(1.03); box-shadow: 0 22px 40px rgba(12, 32, 39, .28); }
@media (prefers-reduced-motion: reduce) {
    html:not(.motion-on) .kms .bk-card:hover .bk-card__cover,
    html:not(.motion-on) .kms .bk-card:focus-within .bk-card__cover { transform: none; }
}
html.motion-off .kms .bk-card:hover .bk-card__cover,
html.motion-off .kms .bk-card:focus-within .bk-card__cover { transform: none; }

/* 3. The path's connectors arrive after the card they lead from, so the
      order reads 1 -> 2 -> 3 as it builds. (Reveal fades the <li>; this adds
      a short push in the reading direction.) */
html.kms-js .kms .bk-path.reveal > li::after { opacity: 0; transform: translateY(-6px); }
html.kms-js .kms .bk-path.reveal.in > li::after {
    opacity: 1; transform: none;
    transition: opacity .4s ease-out, transform .4s cubic-bezier(.22, .61, .36, 1);
    transition-delay: calc(var(--i, 0) * 70ms + .45s);
}
@media (min-width: 760px) {
    html.kms-js .kms .bk-path.reveal > li::after { transform: translateX(-8px); }
    html.kms-js .kms .bk-path.reveal.in > li::after { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    html.kms-js:not(.motion-on) .kms .bk-path.reveal > li::after { opacity: 1; transform: none; }
}
html.kms-js.motion-off .kms .bk-path.reveal > li::after { opacity: 1; transform: none; }


/* ---- reduced motion ----

   This nearly did not make the journey. The fan's CSS was lifted out of
   index.html by range, and its reduced-motion rules lived in that page's ONE
   shared @media block, outside the range — so the component arrived here
   complete except for the part that stops it moving, and /books.html would
   have shipped a fully animating fan to a visitor who asked for stillness.

   Killing the transition alone is not enough: the fan would still JUMP between
   states, which is motion, just badly timed. Resetting the individual custom
   properties does not work either — the :has() recede rule scores (0,5,0) and
   outranks any per-cover override.

   So the transform EXPRESSION is replaced, and whatever the hover rules do to
   --sc, --ty or --rot is simply never read. Same specificity as the base
   `.kms .cover` rule and later in the file, so it wins without !important.

   Hover still reads: the shadow deepens and the unhovered covers dim. Neither
   of those is movement. */
@media (prefers-reduced-motion: reduce) {
    html:not(.motion-on) .kms .covers-in { transform: none; }
    html:not(.motion-on) .kms .cover { transform: translate(0, var(--ty0)) rotate(var(--rot0)) scale(var(--sc0)); }
}
/* The Animations button's "off" (kms-motion.js) — the same still fan. */
html.motion-off .kms .covers-in { transform: none; }
html.motion-off .kms .cover { transform: translate(0, var(--ty0)) rotate(var(--rot0)) scale(var(--sc0)); }
.kms .cover-2 { --ty0: 10px;  --rot0: -7deg; --sc0: 1; }
.kms .cover-1 { --ty0: -14px; --rot0: 0deg;  --sc0: 1.1; }
.kms .cover-3 { --ty0: 10px;  --rot0: 7deg;  --sc0: 1; }


/* ===========================================================================
   16. The responsive viewport demo

   The single most persuasive thing this studio owns for the one buyer it is
   aimed at — and it had never been on /websites.html. It lived in index.html's
   inline <style>, five screens down a page whose other half is shopping for
   children's books.

   .vp-frame is a container-query context and .vp-page responds to ITS inline
   size, which is what makes this a demonstration rather than an illustration.
   Swap the frame for three static images and the claim stops being true.

   Two things changed on the way here, both mechanical:
     - scoped to `.kms`, like everything else in this file;
     - index.html's local token names (--ink, --rule, --card, ...) rewritten to
       the --kms-* names, since those local ones exist only inside that one
       page's <style> block and resolve to nothing anywhere else.

   Its width control lives in script.js.

   NOT scoped to `.kms`, unlike everything else in this file.

   That was the first attempt and it would have shipped broken: /websites.html
   is <body class="ws">, with its own complete design system, so every `.kms
   .vp-*` rule would simply never have matched. Adding `kms` to that body would
   have dropped this file's type scale, buttons and cards onto a page that
   already has its own.

   `vp-` is already a namespace, which is why `.kms` bought nothing here. The
   generic names in this file (.chip, .card) are the ones that need the scope.

   =========================================================================== */

/* ---------- the viewport demo ----------
   product-motion recipe `card-resize`. Job: SPATIAL CONTINUITY — the
   same surface changes size, and the point is that the reader watches
   it re-form rather than seeing a different picture appear. */

.vp-controls { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.vp-btn {
    font: inherit; font-size: 0.88rem; font-weight: 600;
    min-height: 44px; padding: 0 1rem;
    color: var(--kms-ink-2); background: var(--kms-card);
    border: 1px solid var(--kms-rule); border-radius: 999px; cursor: pointer;
    transition:
        background-color var(--kms-motion-micro, 180ms) ease,
        border-color var(--kms-motion-micro, 180ms) ease,
        color var(--kms-motion-micro, 180ms) ease;
}
.vp-btn:hover { border-color: var(--kms-deep); color: var(--kms-ink); }
.vp-btn.is-on { background: var(--kms-deep); border-color: var(--kms-deep); color: #fff; }

.vp-readout {
    margin: 0 0 0.8rem; font-size: 0.82rem; color: var(--kms-muted);
    letter-spacing: 0.02em;
}

/* The frame is the container-query context. This is what makes the demo
   a demonstration: .vp-page below responds to THIS box's inline size,
   exactly as a real page responds to a viewport. Swap this for three
   static images and the claim stops being true. */
.vp-frame {
    container-type: inline-size;
    width: 100%; max-width: 100%;
    margin-inline: auto;
    background: var(--kms-card);
    border: 1px solid var(--kms-rule);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(12, 32, 39, .10);
    /* `width` is a layout property and animating it is normally the
       wrong choice — but the RESIZE is the message here, and the frame
       is a single isolated box with no siblings to reflow. Named token,
       emphasis: this is a deliberate change of state, not a micro-ack. */
    transition: width var(--kms-motion-emphasis, 320ms) cubic-bezier(0.16, 1, 0.3, 1);
}

/* The sample page was grey placeholder bars. It read as a LOADING
   SKELETON, not as a website, which is why watching it resize was
   unsatisfying — the mechanism was right and there was nothing worth
   looking at inside it. Real type, real colour, and one of our own
   illustrations. */
.vp-page { font-size: 11px; line-height: 1.45; color: var(--kms-ink); }

.vp-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--kms-rule);
}
.vp-logo { font-family: var(--kms-display); font-weight: 800; font-size: 1.05em; color: var(--kms-ink); }
.vp-nav { display: none; gap: 0.9rem; }
.vp-nav b { font-weight: 500; font-size: 0.95em; color: var(--kms-ink-2); }
.vp-burger { display: flex; flex-direction: column; gap: 3px; }
.vp-burger i { width: 17px; height: 2px; background: var(--kms-ink-2); border-radius: 2px; }

.vp-hero { display: grid; gap: 0.9rem; padding: 1rem; }
.vp-hero-art img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    border-radius: 8px;
}
.vp-hero-art { height: 104px; border-radius: 8px; overflow: hidden; }
.vp-kicker {
    display: inline-block; font-size: 0.82em; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--vp-accent, var(--kms-gold-ink));
    margin-bottom: 0.35rem;
}
.vp-title {
    display: block; font-family: var(--kms-display); font-weight: 800;
    font-size: 1.9em; line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}
.vp-sub { display: block; font-size: 1em; color: var(--kms-ink-2); margin-bottom: 0.6rem; }
.vp-cta {
    display: inline-block; background: var(--vp-accent, var(--kms-deep)); color: var(--vp-accent-ink, #fff);
    font-size: 0.95em; font-weight: 600; padding: 7px 13px; border-radius: 5px;
}
/* --vp-accent / --vp-accent-ink: the brand-colour swatches of /websites.html's
   build demo (build-reel.js). Unset everywhere else, so the fallbacks — the
   colours this sample always had — are what every other page paints. Each
   swatch is pre-measured at >=4.5:1 against white, both ways round. */

.vp-cards { display: grid; gap: 0.6rem; padding: 0 1rem 1rem; }
.vp-card { border: 1px solid var(--kms-rule); border-radius: 8px; padding: 0.7rem 0.8rem; }
.vp-card b { display: block; font-family: var(--kms-display); font-size: 1em; margin-bottom: 2px; }
.vp-card span { font-size: 0.95em; color: var(--kms-ink-2); }

/* The reflow itself — three genuinely different layouts, not three
   sizes of one. Phone: burger, stacked hero, one card column. Tablet:
   real nav, two card columns, hero still stacked. Desktop: hero splits
   into two columns and the cards go to three. */
@container (min-width: 620px) {
    .vp-nav { display: flex; }
    .vp-burger { display: none; }
    .vp-hero { padding: 1.4rem; }
    .vp-hero-art { height: 132px; }
    .vp-cards { grid-template-columns: repeat(2, 1fr); padding: 0 1.4rem 1.4rem; }
}
@container (min-width: 900px) {
    .vp-page { font-size: 12px; }
    .vp-hero { grid-template-columns: 1.05fr 0.95fr; align-items: center; padding: 1.8rem; gap: 1.6rem; }
    .vp-hero-art { height: 186px; }
    .vp-cards { grid-template-columns: repeat(3, 1fr); padding: 0 1.8rem 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    /* The width IS the information. It arrives at once. */
    .vp-frame { transition-duration: 0ms; }
    .vp-btn { transition-duration: 0ms; }
}

/* The frame pins its own palette, and that is not a detail.

   .vp-page is a simulation of a customer's website. Left to inherit, it takes
   whatever --kms-* the host surface defines — so on /websites.html, a
   data-surface="web-studio" page, the sample bakery would have rendered in
   near-black with pale text. A demo of "the site we would build you" cannot
   change colour depending on which of our pages it is sitting on.

   Redefining the tokens on the frame is the same move `.aud-biz` makes for
   --kms-muted: fix it once for the subtree rather than colouring each child.
   The CONTROL above the frame is ours, not the customer's, so it is left to
   adapt to the host surface. */
.vp-frame {
    --kms-card: #FFFFFF;
    --kms-ink: #0C2027;
    --kms-ink-2: #3D5560;
    --kms-muted: #5D757E;
    --kms-rule: #DCE8EB;
    --kms-deep: #0B6E82;
    --kms-gold-ink: #7A4E05;
}
