/* ==========================================================================
   Pyrexia flow: design system and shell
   The "one flow" home page. One light ground from top to bottom: paper, ink
   text, and colour that lives in the particle thread and in a few rationed
   accents.

   Loaded after ../assets/css/tokens.css and ../assets/css/components.css (the
   product kit: .pf, .app-*, .chip, .ring, .passcard, .phone, .tag, .ico), so
   nothing here re-uses a custom property or a class name from those two files.
   Flow tokens are --c-*, --fg*, --hair*, --fz-*, --sp-*; flow classes are
   .scene*, .flow-*, .s-<scene>__*.  See ../FLOW.md for snippets.

   Contents
     1  Tokens (colour, type, space, pace)   9  Rules, spec rows, accordion
     2  Reset and base                      10  Reveals (ui.js)
     3  Ground and scenes                   11  Navigation capsule and sheet
     4  Pinned scenes and pace              12  Chapters (keyboard only)
     5  Type, the margin note               13  Footer
     6  Buttons and links                   14  Engine hooks
     7  Artefact frame and bridge           15  Static mode, reduced motion,
     8  Chips and numerals                      forced colours, print
                                            16  Page transitions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1  Tokens
   -------------------------------------------------------------------------- */
/* Satoshi's stand-in while it loads (19 November 2026). A web font swaps in after the first paint,
   and the system face it replaced (Avenir Next on a Mac) set the same words wider, so a headline
   could lose a line and the page jumped (About at 1440: CLS 0.25). "Satoshi Fallback" is the
   system's Arial scaled to Satoshi's average width (measured on the site's own text) and given
   Satoshi's ascent, descent and line gap (1.01, 0.24 and 0.10 of the em), so the swap barely moves
   a line. It covers only the characters Satoshi has (not the no-break space, which Satoshi lacks
   and which Chrome takes from the next face in the list): anything else falls through to the
   system faces exactly as before, so once Satoshi has loaded nothing is drawn in it. */
@font-face { font-family: "Satoshi Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); font-weight: 400; size-adjust: 98.16%; ascent-override: 102.89%; descent-override: 24.45%; line-gap-override: 10.19%; unicode-range: U+20-7E, U+A1-A9, U+AB-AC, U+AE-B9, U+BB-123, U+126-12B, U+12E-131, U+134-137, U+139-148, U+14A-14D, U+150-16B, U+16E-17E, U+192, U+1FA-1FF, U+218-21B, U+237, U+2C6-2C7, U+2D8-2DD, U+300-304, U+306-308, U+30A-30C, U+312, U+326-327, U+335, U+337-338, U+3A9, U+3C0, U+1E80-1E85, U+1EF2-1EF3, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2032, U+2039-203A, U+2042, U+2044, U+2070, U+2074-2079, U+2080-2089, U+20AC, U+2116-2117, U+2122, U+212E, U+215B-215E, U+2190-2199, U+2202, U+2205-2206, U+220F, U+2211-2212, U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-2265, U+25A0-25A1, U+25B2-25B3, U+25CA-25CB, U+25CF, U+262E, U+2713, U+FB00-FB04; }
@font-face { font-family: "Satoshi Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); font-weight: 500; size-adjust: 101.02%; ascent-override: 99.98%; descent-override: 23.76%; line-gap-override: 9.9%; unicode-range: U+20-7E, U+A1-A9, U+AB-AC, U+AE-B9, U+BB-123, U+126-12B, U+12E-131, U+134-137, U+139-148, U+14A-14D, U+150-16B, U+16E-17E, U+192, U+1FA-1FF, U+218-21B, U+237, U+2C6-2C7, U+2D8-2DD, U+300-304, U+306-308, U+30A-30C, U+312, U+326-327, U+335, U+337-338, U+3A9, U+3C0, U+1E80-1E85, U+1EF2-1EF3, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2032, U+2039-203A, U+2042, U+2044, U+2070, U+2074-2079, U+2080-2089, U+20AC, U+2116-2117, U+2122, U+212E, U+215B-215E, U+2190-2199, U+2202, U+2205-2206, U+220F, U+2211-2212, U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-2265, U+25A0-25A1, U+25B2-25B3, U+25CA-25CB, U+25CF, U+262E, U+2713, U+FB00-FB04; }
@font-face { font-family: "Satoshi Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); font-weight: 700; size-adjust: 97.4%; ascent-override: 103.7%; descent-override: 24.64%; line-gap-override: 10.27%; unicode-range: U+20-7E, U+A1-A9, U+AB-AC, U+AE-B9, U+BB-123, U+126-12B, U+12E-131, U+134-137, U+139-148, U+14A-14D, U+150-16B, U+16E-17E, U+192, U+1FA-1FF, U+218-21B, U+237, U+2C6-2C7, U+2D8-2DD, U+300-304, U+306-308, U+30A-30C, U+312, U+326-327, U+335, U+337-338, U+3A9, U+3C0, U+1E80-1E85, U+1EF2-1EF3, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2032, U+2039-203A, U+2042, U+2044, U+2070, U+2074-2079, U+2080-2089, U+20AC, U+2116-2117, U+2122, U+212E, U+215B-215E, U+2190-2199, U+2202, U+2205-2206, U+220F, U+2211-2212, U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-2265, U+25A0-25A1, U+25B2-25B3, U+25CA-25CB, U+25CF, U+262E, U+2713, U+FB00-FB04; }
:root {
  color-scheme: light;

  /* The ground and what is written on it. Contrast is measured on paper (#F7F5F0, warm white:
     the founder's choice of 13 November 2026; it was #F1EEE7). The paper is written ONCE, here:
     everything that needs it with an alpha (a glass surface) reads the channel tokens below, and the engine reads the page's own
     background at boot. Never write the value again in a scene, a page or a script. */
  --c-paper: #F7F5F0;           /* the one ground */
  --c-paper-rgb: 247 245 240;   /* the same, as channels: rgb(var(--c-paper-rgb) / .96) */
  --c-paper-hi: #FDFCFA;        /* a raised surface on paper: a tooltip, the phone menu's rows (1.06:1 against paper) */
  --c-paper-hi-rgb: 253 252 250;
  --c-paper-lo: #EDEAE3;        /* a sunken surface on paper */
  --c-card: #FFFFFF;            /* product artefacts only: a white card with a shadow means "this is the product" (1.09:1) */
  --c-ink: #1A1A1E;             /* ink: text, the primary button, the nav capsule */
  --c-ink-rgb: 26 26 30;
  --c-shade-rgb: 52 40 24;      /* the one shadow colour: warm, so a shadow on warm white is not grey */
  --c-on-paper: #1A1A1E;        /* text: 15.9:1 on paper, 17.3:1 on a white card */
  --c-on-paper-2: #504F4B;      /* muted text: 7.5:1 on paper, 8.2:1 on a white card. Nothing lighter is text */
  --c-on-ink: #F5F3EE;          /* text inside the nav capsule: 15.6:1 on ink */
  --c-on-ink-2: #A8A6A0;        /* muted text inside the capsule: 7.1:1 on ink */

  /* Rationed accents. Violet answers a press and marks one phrase; amber and magenta are
     graphics only (the thread, a status glyph): neither passes as text on paper. */
  --c-violet: #6B3BFF;          /* the dots' own violet: graphics, the capsule's button (white on it is 5.7:1), and the ONE
                                   violet clause of a page's main headline (display type only: 5.2:1 on paper) */
  --c-violet-deep: #5B2EE0;     /* violet TEXT and links, and what a filled button turns to on hover: 6.6:1 on paper, 7.2:1 on a white card */
  --c-violet-text: var(--c-violet-deep);
  --c-amber: #F2A100;           /* graphics only: 1.9:1 on paper. Never text */
  --c-magenta: #E83E8C;         /* heat, graphics only: 3.5:1 on paper. The "today" scene */
  --c-teal: #0E9F8E;            /* the dots' teal: graphics only (3.1:1 on paper) */
  /* The figures' tones (14 November 2026: the proof scene's figures, one dot colour each): a deeper
     tone of a dot colour, for display numerals only, each 4.5:1 or more on paper. */
  --c-teal-text: #0A7B6F;       /* 4.7:1 */
  --c-magenta-text: #C1276F;    /* 5.1:1 */
  --c-amber-text: #9C5B00;      /* 4.9:1 */
  --c-white: #FFFFFF;

  /* Type. Satoshi for everything a reader reads. Geist Mono only for real data (a code, a
     number in a table) and inside product mocks: never for a label above a headline. */
  --flow-sans: "Satoshi", "Satoshi Fallback", "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --flow-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* THE TYPE SCALE (design system, 13 November 2026; README.md, "Design system"). rem clamp() on
     a 16px root, so zoom and text-size settings hold. Sizes quoted are at 1440 wide, then a phone.
     Outside a product mock (.aui, .pf) nothing is set in any other size: no 13, 15, 17, 18.7, 22.

     Four text sizes.                                            at 1440   on a phone */
  --fz-caption: 0.875rem;                                     /* 14        14   captions, table keys, dates, mono data, small print */
  --fz-small: 1rem;                                           /* 16        16   card and footer text, notes, buttons, the nav */
  --fz-body: clamp(1.125rem, 1.079rem + 0.195vw, 1.25rem);    /* 20        18   paragraphs: everything meant to be read */
  --fz-lede: clamp(1.25rem, 1.158rem + 0.39vw, 1.5rem);       /* 24        20   a scene's or a page's first paragraph; a question */
  /* Two headline sizes on the home page. */
  --fz-h: clamp(2.5rem, 0.9rem + 5.2vw, 6rem);                /* 89        40   statement scenes: hero, today, record, platform, board, passport, close */
  --fz-h-md: clamp(2rem, 1.36rem + 2.73vw, 3.75rem);          /* 60        32   supporting scenes: checks, results, security, start, founders, questions */
  /* The cap for the statement scenes whose headline shares the window with a sculpture (today, record,
     close): the large size, held to the supporting size's height in a 900px window, so the page reads
     as two sizes, 89 and about 60 (design pass, 13 November 2026). A scene may cap it further by width. */
  --fz-statement: min(var(--fz-h), 6.6svh);
  /* Inner pages: one title size, one section size. */
  --fz-title: clamp(2.375rem, 1.1rem + 4.6vw, 4.75rem);       /* 76        38   the page's h1 */
  --fz-section: clamp(1.75rem, 1.398rem + 1.502vw, 2.75rem);  /* 44        28   every section heading (h2) */
  /* A sub-heading (a step, a card title, a sub-question) is the lede size at weight 500. */
  --fz-h-sm: var(--fz-lede);                                  /* 24        20 */
  --fz-num: clamp(5rem, 1.5rem + 14vw, 14rem);                /* 80 to 224: data may be enormous */
  /* Retired names. They resolve to the scale so no rule written before it can produce a fifth
     size; write the names above in anything new. */
  --fz-label: var(--fz-caption);                              /* was 13 */
  --fz-data: var(--fz-caption);                               /* was 13 */
  --fz-note: var(--fz-caption);                               /* 14 */
  --fz-hero: var(--fz-h);                                     /* was 42 to 100: the hero is a statement scene */

  /* Space: 4px steps. */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Layout. */
  --max-w: 80rem;                                             /* 1280 */
  --pad-x: clamp(1.5rem, 1.317rem + 0.78vw, 2rem);            /* 24 to 32 */
  --rail-w: 0rem;                                             /* retired with the chapter rail (13 November 2026): always 0, kept so scene rules that read it resolve */
  --note-w: 0rem;                                             /* room kept for margin notes (the "margin" option) */
  --col-gap: clamp(1rem, 0.817rem + 0.78vw, 1.5rem);          /* 16 to 24 */
  --scene-pad: clamp(5rem, 14svh, 10rem);                     /* a scene's own top and bottom air */
  --seam: var(--scene-pad);                                   /* retired with the ink ground: kept so old rules resolve */
  --nav-top: 0.875rem;
  --nav-h: 3.5rem;
  --nav-clear: calc(var(--nav-top) + var(--nav-h) + 1.5rem);  /* keep text below the capsule */

  /* Pace. Every length that exists to hold something in view (a pinned track, the room for a
     sticky hold, the gap between two keyframes) is written as a multiple of --pace, so the whole
     page slows down or speeds up together. 1 is the standard, calmer baseline of this pass; the
     prototype's Options panel sets data-opt-pace on <html> (see section 4). */
  --pace: 1;

  /* Shape. Two corner sizes on the whole site: 14px for anything rectangular, the pill for
     buttons and chips. */
  --rad-artefact: 14px;
  --rad-box: var(--rad-artefact);
  --rad-pill: 999px;

  /* Motion. A reveal is short: a headline is fully in about 0.6s after it enters the window. */
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-wipe: cubic-bezier(.215, .61, .355, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --dur-press: 120ms;
  --dur-hover: 300ms;
  --dur-wipe: 600ms;
  --dur-reveal: 520ms;
  --dur-rise: 420ms;
  --stagger-line: 60ms;
  --stagger-rise: 50ms;

  /* Icons as masks (painted with currentColor). */
  --fi-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.75 8h10.5M9 3.75 13.25 8 9 12.25'/%3E%3C/svg%3E");
  --fi-arrow-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5l7-7M5.75 4.5h5.75v5.75'/%3E%3C/svg%3E");
  --fi-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E");
  --fi-half: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.25' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M8 1.75a6.25 6.25 0 0 0 0 12.5Z'/%3E%3C/svg%3E");
  --fi-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E");
  --fi-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.25' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
  --fi-ring-dashed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.25' fill='none' stroke='%23000' stroke-width='1.5' stroke-dasharray='2.6 2.3'/%3E%3C/svg%3E");
  --fi-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E");
}

/* The engine's stylesheet (engine.css, loaded after this file) may still name an ink ground for
   its bands, its far-jump curtain and for what shows beyond the last scene. The page has no ink
   ground any more, so that name is pointed at paper here: whichever engine version loads, nothing
   behind the page can be dark. (html:root outranks the engine's :root.) */
html:root {
  --flow-ink: var(--c-paper);
  --flow-paper: var(--c-paper);
}

/* Phones: the page is one column and far longer, so the air between scenes is cut back. */
@media (max-width: 37.49em) {
  :root {
    --scene-pad: clamp(2.75rem, 7svh, 4rem);
  }
}

/* Semantic tokens. There is one set for the page: every scene, the footer and the phone menu
   read these. Use them, never a --c-* value, in scene CSS. A scene's data-theme no longer chooses
   anything here (it is always "paper"; the engine finds its scenes by the attribute).
   The only other set is the nav capsule's (data-ground="ink"): a solid ink pill is the page's one
   dark object, so its words read the same over paper, over a white artefact and over the thread. */
:root,
[data-ground="paper"] {
  --ground: var(--c-paper);
  --fg: var(--c-on-paper);
  --fg-2: var(--c-on-paper-2);
  --fg-quiet: #484744;                 /* the quiet clause of a two-tone headline (8.5:1 on paper) */
  --hair: rgb(var(--c-ink-rgb) / .14);     /* hairlines: decorative */
  --hair-2: rgb(var(--c-ink-rgb) / .5);    /* control rings: 3.3:1 on paper */
  --press: var(--c-ink);                   /* primary button: ink */
  --press-fg: var(--c-paper);              /* 15.9:1 */
  --wipe: var(--c-violet-deep);            /* what a filled button turns to on hover, on either ground */
  --wipe-fg: var(--c-white);               /* 7.2:1 */
  --mark: var(--c-violet-deep);            /* interactive marks: underlines, arrows, the accordion's plus */
  --spot: var(--c-violet);                 /* a graphic dot */
  --em: var(--c-violet);                   /* the ONE violet clause of a page's main headline: the dots' own violet (5.2:1, display type only) */
  --link: var(--c-violet-deep);
  --focus: var(--c-violet-deep);
  --glass-solid: rgb(var(--c-paper-hi-rgb) / .96);   /* a raised paper surface that floats over the page */
  --artefact-ring: rgb(var(--c-ink-rgb) / .14);
  --artefact-shadow: 0 1px 2px rgb(var(--c-shade-rgb) / .05), 0 6px 16px -6px rgb(var(--c-shade-rgb) / .12), 0 32px 64px -28px rgb(var(--c-shade-rgb) / .28);
  --float-shadow: 0 6px 16px -8px rgb(var(--c-shade-rgb) / .3);   /* a small raised paper thing: a tooltip, a floating label */
  --chip-due: #8A5A00;                     /* 5.4:1 on paper */
  --chip-expired: #B42318;                 /* 6.0:1 on paper */
}
[data-ground="ink"] {
  --ground: var(--c-ink);
  --fg: var(--c-on-ink);
  --fg-2: var(--c-on-ink-2);
  --hair: rgb(245 243 238 / .16);
  --hair-2: rgb(245 243 238 / .4);
  --press: var(--c-violet);                /* the capsule's button: violet, white text. Violet is a button's colour here only */
  --press-fg: var(--c-white);
  --wipe: var(--c-violet-deep);            /* the same hover as in the page: the fill deepens to violet text colour */
  --wipe-fg: var(--c-white);
  --mark: var(--c-violet);
  --spot: var(--c-violet);
  --em: var(--c-on-ink);
  --link: var(--c-on-ink);
  --focus: var(--c-on-ink);
  --glass-solid: rgb(var(--c-ink-rgb) / .96);
}

/* --------------------------------------------------------------------------
   2  Reset and base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-clear);
  background: var(--c-paper);
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol[class], ul[class] { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; border-spacing: 0; }
th { text-align: start; font-weight: inherit; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  /* Paper on the body too, so a host page's own body colour never shows (a shared preview frame
     sets one). While the engine runs, engine.css makes the body clear and paper is on <html>. */
  background: var(--c-paper);
  color: var(--fg);
  font-family: var(--flow-sans);
  font-size: var(--fz-body);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
strong, b { font-weight: 700; }
::selection { background: var(--c-violet); color: var(--c-white); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mono {
  font-family: var(--flow-mono);
  font-size: 0.92em;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.tnum { font-variant-numeric: tabular-nums; }
/* In the footer the mono figures are the caption size, not a fifth size of their own (design pass). */
.flow-footer .mono { font-size: var(--fz-caption); }
/* A phrase that must not break at its hyphen ("inspection-ready."). */
.flow-nowrap { white-space: nowrap; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.flow-skip {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 100;
  padding: 0.875rem 1.25rem;
  border-radius: var(--rad-pill);
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-250%);
}
.flow-skip:focus { transform: none; }
/* A scene takes focus when a link lands on it (so reading continues from there); it is not a control. */
.scene:focus, .scene:focus-visible { outline: none; }

/* --------------------------------------------------------------------------
   3  Ground and scenes
   One ground. Without a script every scene paints paper itself. Once the
   engine runs (html.flow-js) the scenes go transparent, the same paper is
   behind the page, and the thread is drawn between that and the content.
   Nothing changes ground anywhere on the page, so nothing has to be kept
   apart at a boundary: a scene's own air is --scene-pad, top and bottom.
   -------------------------------------------------------------------------- */
.flow { display: block; position: relative; z-index: 1; }

.scene {
  position: relative;
  padding-block: var(--scene-pad);
  background: var(--ground);
  color: var(--fg);
}
/* The column. Its gutters keep room, with the "margin" option, for the margin notes (left); they
   are kept equal so a centred scene stays centred. (--rail-w is 0: the chapter rail is retired.) */
.scene__inner {
  position: relative;
  width: min(100% - 2 * max(var(--pad-x), var(--rail-w), var(--note-w)), var(--max-w));
  margin-inline: auto;
}
.scene__inner--wide { --max-w: 90rem; }
.scene__inner--narrow { --max-w: 56rem; }

/* The engine owns the ground once it runs (engine.css). Here the scenes only step aside for it.
   If the engine never arrives, ui.js sets html.flow-static.flow-solo and the scenes keep their own. */
html.flow-js .scene { background: transparent; }

/* A 12-column grid for scene layouts: <div class="flow-grid"><div class="flow-col" style="--span:5">…
   Columns stack below 900px. --start is optional. */
.flow-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6) var(--col-gap); }
.flow-grid > * { min-width: 0; }
@media (min-width: 56.25em) {
  .flow-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .flow-col { grid-column: var(--start, auto) / span var(--span, 12); }
}
.flow-stack { display: grid; gap: var(--sp-5); align-content: start; justify-items: start; }
.flow-stack--lg { gap: var(--sp-6); }
.flow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-3); }

/* --------------------------------------------------------------------------
   4  Pinned scenes and pace
   <section class="scene scene--pin" style="--pin-len:260"> <div class="scene__track">
   <div class="scene__stage"> <div class="scene__inner">…</div></div></div></section>
   Live only: from 900px wide and 600px tall, with the engine running and motion
   allowed. Otherwise the track is an ordinary block and the stage is ordinary flow.
   ui.js writes --pin-p (0 to 1 along the track) on the scene.

   Pace. --pin-len is the track's height in window heights at the standard pace:
   one window for the stage itself and the rest (--pin-len minus 100) as scroll
   while the stage holds. Only that second part is multiplied by --pace, so
   "calm" gives every pinned scene 30% more scroll and "brisk" 20% less, and
   every beat written against --pin-p stretches with it.
   A keyframe marker in a pinned scene is placed by --at: the scroll, in svh at
   the standard pace, from the moment the stage locks to the moment the shape is
   fully formed: <span class="flow-key flow-key--at" style="--at:80" …> (or set
   --at on your own class in the scene stylesheet). It scales the same way.
   Outside a pinned scene, write any length that only exists to hold something in
   view as calc(<length> * var(--pace)).
   -------------------------------------------------------------------------- */
html[data-opt-pace="calm"] { --pace: 1.3; }
html[data-opt-pace="standard"] { --pace: 1; }
html[data-opt-pace="brisk"] { --pace: 0.8; }

.scene--pin { --pin-scroll: calc((var(--pin-len, 200) - 100) * var(--pace)); }   /* svh of scroll while the stage holds */
@media (min-width: 56.25em) and (min-height: 37.5em) and (prefers-reduced-motion: no-preference) {
  html.flow-js:not(.flow-static) .scene--pin { padding-block: 0; }
  html.flow-js:not(.flow-static) .scene--pin > .scene__track { height: calc((100 + var(--pin-scroll)) * 1svh); }
  html.flow-js:not(.flow-static) .scene--pin > .scene__track > .scene__stage {
    position: sticky;
    top: 0;
    height: 100svh;
    display: grid;
    align-content: center;
    padding-block: var(--nav-clear) var(--sp-7);
    overflow: clip;
  }
  /* A marker with --at: formed that many svh of scroll (at the standard pace) after the stage
     locks. The marker is formed when it crosses the middle of the window, hence the 50. The
     prefix is in :where(), so the rule weighs no more than two classes and a scene stylesheet
     can still out-rank it. Where the scene does not pin, an --at marker is at the middle of its
     scene (.flow-key) unless the scene stylesheet says otherwise. */
  :where(html.flow-js:not(.flow-static) .scene--pin) > .flow-key.flow-key--at { inset-block-start: calc((50 + var(--at, 0) * var(--pace)) * 1svh); }

  /* A hold in an ordinary scene: the block stays under the nav while the page scrolls on.
       <div class="flow-hold" style="--hold:40"> <div class="flow-hold__pin">…</div> </div>
     --hold is the scroll it stays for, in svh at the standard pace. The room is a real block after
     the pinned box, not padding (a sticky box cannot travel into its parent's padding). Use it
     only for a block that fits in the window under the nav; where it may not, cancel it in the
     scene stylesheet with a height query. Same conditions as a pinned scene: otherwise there is
     no hold and no extra length. */
  html.flow-js:not(.flow-static) .flow-hold > .flow-hold__pin { position: sticky; inset-block-start: var(--hold-top, var(--nav-clear)); }
  html.flow-js:not(.flow-static) .flow-hold::after { content: ""; display: block; height: calc(var(--hold, 30) * var(--pace) * 1svh); }
}

/* --------------------------------------------------------------------------
   5  Type, the margin note, and keeping words clear of the thread
   There is no label above a headline. A headline carries its scene alone; the
   reader's place is shown by the chapter name in the nav capsule, and by
   nothing else (the chapter rail is retired). (The old .flow-label, an accent
   dot and a word in mono capitals, is retired: the build fails on it.)

   Headline sizes (the whole list; see the type scale in section 1):
     .flow-h              statement scenes on the home page          89 at 1440
     .flow-h--md          supporting scenes on the home page         60
     .flow-h--title       an inner page's h1                         76
     .flow-h--section     every section heading on an inner page     44
     .flow-h--sm          a sub-heading: a step, a card title,       24, weight 500
                          a sub-question
   A scene or a page does not write a headline size of its own. It may cap the
   size for a short window with min(var(--fz-h), <a svh length>), nothing else.
   -------------------------------------------------------------------------- */
/* Scene headline: large, light, tight. One per scene. */
.flow-h {
  font-family: var(--flow-sans);
  font-size: var(--fz-h);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--fg);
}
.flow-h--hero { font-size: var(--fz-hero); }             /* the same size as .flow-h: the hero is a statement scene */
.flow-h--md { font-size: var(--fz-h-md); line-height: 1.05; letter-spacing: -0.03em; }
.flow-h--title { font-size: var(--fz-title); line-height: 1.03; letter-spacing: -0.034em; }
.flow-h--section { font-size: var(--fz-section); line-height: 1.08; letter-spacing: -0.028em; }
.flow-h--sm { font-size: var(--fz-h-sm); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.flow-h__line { display: block; }                        /* an authored line break */
/* Emphasis. Every headline may be two-tone; violet is rationed to one clause on the whole page:
     two-tone        .flow-h__quiet: the second clause steps back to a quiet grey (8.5:1). The
                     house style for every headline but one
     the violet one  .flow-h__em: ONE clause, in the page's MAIN headline only (the h1: the hero
                     on the home page, the title on an inner page), in the dots' own violet
                     (5.2:1, display type only). No other headline carries violet, and never amber */
/* The quiet clause is display type that the thread crosses in mid-morph (a body of dots on its way
   to the next shape), so it is a step darker than muted body text: #484744 is 8.0:1 on clean paper,
   and it stays at 4.5:1 or better where the same clause in #5B5A56 measured 3.7:1 to 4.4:1 for a
   moment (director's pass, founder revision 2). Muted text of body size keeps --fg-2; nothing is painted behind it (see "Words clear of the thread"). */
.flow-h__quiet { color: var(--fg-quiet, var(--fg-2)); }
.flow-h__em { color: var(--em); }
/* The rule holds itself: a violet clause anywhere but the h1 reads as the quiet clause. */
:where(h2, h3, h4, h5, h6) .flow-h__em { color: var(--fg-quiet, var(--fg-2)); }

.flow-lede {
  max-width: 34rem;
  font-size: var(--fz-lede);
  line-height: 1.36;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.flow-body {
  max-width: 34rem;
  font-size: var(--fz-body);
  line-height: 1.5;
  text-wrap: pretty;
}
.flow-small { max-width: 34rem; font-size: var(--fz-small); line-height: 1.5; text-wrap: pretty; }
/* Ink is the colour of everything meant to be read: a lede, a paragraph, a card's text. Muted is
   for what is secondary by nature only: a caption, a table key, a date, a footnote. */
.flow-muted { color: var(--fg-2); }
/* A small plain caption: the name of a figure, the heading of a short list, who said a quotation.
   Text face, sentence case, muted. Not for a word above a headline. */
.flow-caption {
  font-family: var(--flow-sans);
  font-size: var(--fz-note);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--fg-2);
}
/* Mono is for real data: a code, a reference, a date in a row. */
.flow-data {
  font-family: var(--flow-mono);
  font-size: var(--fz-data);
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.flow-data--caps { letter-spacing: 0.06em; text-transform: uppercase; }   /* a code that is written in capitals; never a label */

/* Retired. Anything still carrying the class reads as a plain caption (no dot, no capitals, no
   mono) until its scene is updated; build.mjs lists every one that is left. */
.flow-label { font-family: var(--flow-sans); font-size: var(--fz-note); font-weight: 500; line-height: 1.35; color: var(--fg-2); }

/* The margin note: the alternative to "no label", for the founder to compare.
     <p class="flow-note">Today</p>
     <h2 class="flow-h">…</h2>
   The chapter word as a small plain note in the text face: sentence case, no dot, no capitals,
   no mono. It is not shown at all unless <html data-opt-labels="margin"> (the prototype's Options
   panel). Then: below 1200px wide it sits above the headline; from 1200px it is set in the left
   margin of the page, its baseline on the baseline of the headline's first line. ui.js places it
   there (html.ui-notes; it writes the note's `translate`, so `transform` and `opacity` stay free
   for a reveal), and the column gives up a little width on both sides to make the margin
   (--note-w). Put it immediately before its heading, inside the same parent. */
.flow-note { display: none; }
html[data-opt-labels="margin"] .flow-note {
  display: block;
  margin-block-end: 0.625rem;
  font-family: var(--flow-sans);
  font-size: var(--fz-note);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
}
@media (min-width: 75em) {
  html[data-opt-labels="margin"] { --note-w: 7.5rem; }
  html.ui-notes[data-opt-labels="margin"] .flow-note {
    position: absolute;                 /* at its static position: ui.js moves it from there into the margin */
    width: calc(var(--note-w) - 2.25rem);
    margin: 0;
    text-align: end;
    text-wrap: balance;
    pointer-events: none;
  }
  html.ui-notes[data-opt-labels="margin"] .flow-note:not([data-placed]) { visibility: hidden; }
}

/* Words clear of the thread. Nothing is painted behind text: no patch, no halo, no plate, no
   gradient of paper (founder, 13 November 2026; the .flow-safe classes, the --safe tokens and the
   patch under a mock's caption are retired). Words sit directly on the page, and they are kept
   legible by the choreography alone:
     dock a drawn object clear of the words (move the dock, not the text's background);
     turn a field behind copy down at its keyframe (data-flow-alpha 0.08 to 0.12 for dust);
     keep the gather behind the words (data-flow-wait) and let a handed-off card's fringe go
     (data-flow-alpha 0.2 to 0.25 on the landing keyframe, 0 on its hold);
     the engine holds every loose dot under its contrast cap and keeps strays out of the band
     of the window where a scene's words stand (ENGINE.md, "Loose particles and text").
   A product mock keeps its white card: that is the object, not a backing. */

/* --------------------------------------------------------------------------
   6  Buttons and links
   Pills, in two kinds and two heights (48px, and 56px with --lg; 44px with
   --sm in the capsule only).
     Primary     .flow-btn: ink fill, paper text (15.9:1). In the page the
                 primary is always ink. Inside the nav capsule, and only there,
                 it is violet with white text (5.7:1): violet stays special.
     Secondary   .flow-btn--ring: a raised paper pill with a 1px ring.
   ONE hover rule (the same on keyboard focus, with the focus outline):
     a filled button deepens to the violet of links (#5B2EE0, white text,
     7.2:1): ink does in the page, violet does in the capsule;
     a ring button keeps its fill and its ring darkens to ink. It never fills,
     so it never looks like the primary;
     an arrow moves 3px. Nothing else moves, lifts or changes size.
   Nothing on the site writes a button hover of its own.
   -------------------------------------------------------------------------- */
.flow-btn {
  --btn-fill: var(--press);
  --btn-text: var(--press-fg);
  --btn-wipe: var(--wipe);
  --btn-wipe-text: var(--wipe-fg);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;                     /* 48 */
  padding: 0 1.5rem;
  border: 0;
  border-radius: var(--rad-pill);
  background: var(--btn-fill);
  color: var(--btn-text);
  font-family: var(--flow-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-hover) var(--ease-wipe), box-shadow var(--dur-hover) ease, transform var(--dur-press) ease;
}
.flow-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-wipe);
  clip-path: ellipse(120% 180% at 50% 310%);
  transition: clip-path var(--dur-wipe) var(--ease-wipe);
}
.flow-btn:hover, .flow-btn:focus-visible { color: var(--btn-wipe-text); }
.flow-btn:hover::before, .flow-btn:focus-visible::before { clip-path: ellipse(120% 180% at 50% 60%); }
.flow-btn:active { transform: scale(.98); }

/* Secondary: a 1px ring on a raised paper fill, so its word is never read against the thread.
   On hover the ring darkens to the text colour and nothing fills. */
.flow-btn--ring {
  --btn-fill: var(--glass-solid);
  --btn-text: var(--fg);
  --btn-wipe-text: var(--fg);
  box-shadow: inset 0 0 0 1px var(--hair-2);
}
.flow-btn--ring::before { content: none; }
.flow-btn--ring:hover, .flow-btn--ring:focus-visible { box-shadow: inset 0 0 0 1.5px var(--fg); }
.flow-btn--lg { min-height: 3.5rem; padding-inline: 1.875rem; }   /* taller, not larger: a button's word is always 16px */
.flow-btn--sm { min-height: 2.75rem; padding-inline: 1.125rem; }   /* 44: the floor */
@media (max-width: 39.99em) { .flow-btn--lg { min-height: 3rem; } }   /* phones: one button height, the hero's 48 (design pass) */
/* The narrowest windows (320px, the reflow width of WCAG 1.4.10): a long label wraps inside its pill
   rather than pushing the page sideways. */
@media (max-width: 22.49em) { .flow-btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 0.625rem; } }
.flow-btn--block { display: flex; width: 100%; }

/* An arrow that nudges: add .flow-arrow (or .flow-arrow--out for another site). */
.flow-arrow::after {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--fi-arrow) center / contain no-repeat;
          mask: var(--fi-arrow) center / contain no-repeat;
  transition: transform var(--dur-hover) var(--ease-expo);
}
.flow-arrow:hover::after { transform: translateX(3px); }
.flow-arrow--out::after { -webkit-mask-image: var(--fi-arrow-out); mask-image: var(--fi-arrow-out); }
.flow-arrow--out:hover::after { transform: translate(2px, -2px); }

/* Text links. Stand-alone: .flow-link (44px tall). In running text: any classless
   <a> inside a scene or the footer. Violet text (#5B2EE0, 6.6:1 on paper), always underlined. */
.flow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 2.75rem;
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.28em;
  transition: text-decoration-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.flow-link:hover { text-decoration-color: currentColor; }
/* A store whose address is not known yet (data-play-pending): the founder, 3 December 2026, "Show
   that the Android app is there, but don't let the link work". It is a span, not a link: it keeps its
   neighbours' shape, and nothing about it invites a click (no underline, arrow, hover or press). */
[data-play-pending] { cursor: default; }
.flow-link[data-play-pending] { color: var(--fg); text-decoration: none; }
.flow-btn--ring[data-play-pending]:hover { box-shadow: inset 0 0 0 1px var(--hair-2); }
.flow-btn[data-play-pending]:active { transform: none; }
:where(.scene, .flow-footer, .flow-sheet) a:not([class]) {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.24em;
  transition: text-decoration-color var(--dur-hover) ease;
}
:where(.scene, .flow-footer, .flow-sheet) a:not([class]):hover { text-decoration-color: currentColor; }

/* --------------------------------------------------------------------------
   7  Artefact frame and the product kit bridge
   A real-DOM product mock in the product's light skin: a white card on paper.
   White on warm white is a quiet difference (1.09:1), so the card is drawn out
   by its edge and its shadow, not by its fill: a 1px ink hairline at 14% and a
   warm three-part shadow (contact, lift, a long soft cast below). A white card
   with a shadow means "this is the product" and is used for nothing else: an
   information card on the site has no fill, no box and no shadow.
     <figure class="flow-artefact [flow-artefact--halo]">
       <div class="flow-artefact__frame" id="record-dock"> …existing .pf mock… </div>
       <figcaption class="flow-artefact__cap"><span>Staff record</span><span>Example data</span></figcaption>
     </figure>
   -------------------------------------------------------------------------- */
.flow-artefact {
  --halo: 0px;
  position: relative;
  display: grid;
  gap: 0.875rem;
  min-width: 0;
  padding: var(--halo);
}
.flow-artefact--halo { --halo: clamp(1rem, 3.2vw, 3.25rem); }   /* room for the particle halo to show round the frame */
.flow-artefact__frame {
  position: relative;
  min-width: 0;
  border-radius: var(--rad-artefact);
  background: var(--c-card);
  color: #111113;
  box-shadow: 0 0 0 1px var(--artefact-ring), var(--artefact-shadow);
  overflow: hidden;
  /* the product kit expects the old page's base type */
  color-scheme: light;
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: start;
  --focus: #3005C2;
}
/* A frame with a caption after it is a layer of its own, above the caption (as it has been since
   the caption carried a patch: the stacking is kept, the patch is gone). A frame without a caption
   keeps z-index auto, so a scene's own controls drawn over it stay on top. */
.flow-artefact__frame:has(~ .flow-artefact__cap) { z-index: 1; }
/* A .pf window (or pass card, or phone) dropped straight in gives up its own edge. */
.flow-artefact__frame > .pf { border: 0; border-radius: 0; box-shadow: none; }
.flow-artefact__frame--bare { background: none; box-shadow: none; overflow: visible; border-radius: 0; }
.flow-artefact__frame a:not([class]) { color: #3005C2; text-decoration-color: currentColor; text-decoration-thickness: 1px; }

/* The caption: the words "Example data". Text face, sentence case. Nothing is painted behind it:
   a handed-off card's keyframes let their fringe of dots go (data-flow-alpha), so none is left
   under the caption. */
.flow-artefact__cap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  font-family: var(--flow-sans);
  font-size: var(--fz-note);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--fg-2);
}

/* The product kit bridge. The first prototype's components read its own tokens (--bg, --ink,
   --line, --accent, --ok ...). Inside a frame they get the light product set, whatever the ground.
   Outside a frame they get the paper set, so copied section chrome (ruled rows, captions, a chip
   set straight on the ground) is legible on paper without a rewrite.
   .pf, .phone and .passcard re-declare the light set themselves (tokens.css). */
.flow-artefact__frame,
[data-kit="light"] {
  color-scheme: light;
  --bg: #F5F6F8; --surface: #FFFFFF; --sunken: #ECEEF2;
  --ink: #0D1117; --ink-2: #3F4856; --ink-3: #5E6878;
  --line: #D5DAE2; --line-strong: #B8C0CC; --border-control: #788395;
  --accent: #3005C2; --accent-hover: #24049A; --accent-tint: #EEEBFB; --on-accent: #FFFFFF;
  --btn-bg: #0D1117; --btn-bg-hover: #262D38; --btn-fg: #FFFFFF;
  --ok: #1B7A4B; --ok-tint: #E4F3EA; --due: #8A5A00; --due-tint: #FBF0D9;
  --expired: #B42318; --expired-tint: #FCE9E6; --pending: #4A5565; --pending-tint: #ECEEF2;
  --dot: #AEB6C4;
  --shadow-frame: 0 6px 22px rgb(13 17 23 / .08), 0 2px 6px rgb(13 17 23 / .05);
  --shadow-float: 0 18px 40px -12px rgb(13 17 23 / .22), 0 4px 10px rgb(13 17 23 / .06);
}
.scene,
.flow-footer,
[data-kit="paper"] {
  --bg: var(--c-paper); --surface: var(--c-paper-hi); --sunken: var(--c-paper-lo);
  --ink: var(--c-on-paper); --ink-2: #3D3C39; --ink-3: var(--c-on-paper-2);
  --line: rgb(var(--c-ink-rgb) / .14); --line-strong: rgb(var(--c-ink-rgb) / .28); --border-control: #76746E;
  --accent: var(--c-violet-deep); --accent-hover: #4720B8; --accent-tint: rgb(91 46 224 / .1); --on-accent: #FFFFFF;
  --btn-bg: var(--c-on-paper); --btn-bg-hover: #2E2E33; --btn-fg: var(--c-paper);
  --ok: #1B7A4B; --ok-tint: rgb(27 122 75 / .12); --due: #8A5A00; --due-tint: rgb(138 90 0 / .12);
  --expired: #B42318; --expired-tint: rgb(180 35 24 / .1); --pending: #4D4C48; --pending-tint: rgb(var(--c-ink-rgb) / .07);
  --dot: rgb(var(--c-ink-rgb) / .22);
  --shadow-frame: 0 6px 22px rgb(var(--c-shade-rgb) / .1), 0 2px 6px rgb(var(--c-shade-rgb) / .06);
  --shadow-float: 0 18px 40px -12px rgb(var(--c-shade-rgb) / .26), 0 4px 10px rgb(var(--c-shade-rgb) / .08);
}
/* Small helpers the first prototype's markup leans on (they lived in its base.css, which the flow
   page does not load). */
.stack { display: grid; gap: 1rem; align-content: start; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
:is(.flow-artefact__frame, .pf, .phone, .passcard) .small { font-size: 0.875rem; line-height: 1.5; }
:is(.flow-artefact__frame, .pf, .phone, .passcard) .caption { font-size: 0.875rem; line-height: 1.45; color: var(--ink-3); }
:is(.flow-artefact__frame, .pf, .phone, .passcard) .label {
  display: flex;
  align-items: center;
  gap: 0.75em;
  font-family: var(--flow-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* playOnce(...).finish() jumps to the end state without animating. */
[data-play-skip], [data-play-skip] *, [data-play-skip] *::before, [data-play-skip] *::after {
  transition: none !important;
  animation: none !important;
}

/* Handoff: the frame arrives as its keyframe finishes forming. Add this class to the frame and put
   data-flow-weight="<marker id>" on the frame itself, never on an ancestor. */
/* The frame is its own compositor layer and is never quite at zero (0.3% cannot be seen), so it
   is painted and rastered as it scrolls into the window, before it is needed: when the keyframe
   lands, the fade is a change of one number on a ready layer, not a first paint of the whole artefact. */
.flow-handoff {
  opacity: clamp(.003, calc((var(--w, 1) - .62) / .38), 1);
  transform: scale(calc(.985 + .015 * var(--w, 1)));
  will-change: opacity, transform;
}
/* The weight stops at the frame. --w is a custom property, so it is inherited: without this rule
   every element inside the artefact (the board is 500 of them) is given a new computed style on
   each frame the engine writes the weight, and the collector has to clear all of it away, which is
   what a scroll stalls on. The frame's children set the property back to "not set", so their own
   style does not change with it and nothing below them is restyled. Nothing inside an artefact
   reads the frame's weight; an element in there that should follow a keyframe carries its own
   data-flow-weight. In general: put a weight on the element that uses it, or on a wrapper with
   only a few elements inside, never on a large container. */
.flow-handoff > * { --w: initial; }
/* Where nothing pins (phones and tablets) the frame scrolls into view long before its keyframe
   lands, and a reader who stops there must not be looking at an empty box. The artefact is simply
   there; the shards arrive on it and halo it. */
@media (max-width: 56.24em) {
  .flow-handoff { opacity: 1; transform: none; will-change: auto; }
}
/* Simple weight helpers for anything that should come and go with a keyframe. */
.flow-w-fade { opacity: var(--w, 1); }
.flow-w-rise { opacity: var(--w, 1); transform: translate3d(0, calc((1 - var(--w, 1)) * 1.5rem), 0); }

/* --------------------------------------------------------------------------
   8  Chips and numerals
   -------------------------------------------------------------------------- */
/* Status chip for the ground (inside a mock use the product kit's .chip instead).
   Glyph and word always; colour is a third signal. No green out here. Text face, sentence
   case, on a raised paper fill so the word is never read against the thread.
   On paper: the neutral and "done" words are ink (15.9:1), "due" is #8A5A00 (5.4:1),
   "expired" is #B42318 (6.0:1), "soon" is the muted text colour (7.5:1). */
.flow-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 1.75rem;
  padding: 0 0.75em 0 0.55em;
  border-radius: var(--rad-pill);
  background: var(--glass-solid);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  font-family: var(--flow-sans);
  font-size: var(--fz-note);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--chip-c, var(--fg));
}
.flow-chip::before {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  background: currentColor;
  -webkit-mask: var(--chip-glyph, var(--fi-ring)) center / contain no-repeat;
          mask: var(--chip-glyph, var(--fi-ring)) center / contain no-repeat;
}
.flow-chip--done { --chip-glyph: var(--fi-tick); }                                   /* Complete, Recorded, On file */
.flow-chip--due { --chip-glyph: var(--fi-half); --chip-c: var(--chip-due); }        /* Due soon */
.flow-chip--expired { --chip-glyph: var(--fi-cross); --chip-c: var(--chip-expired); } /* Expired */
.flow-chip--soon { --chip-glyph: var(--fi-ring); --chip-c: var(--fg-2); box-shadow: inset 0 0 0 1px var(--hair); }   /* Soon. No dashed line: nothing on the site is dashed.
   Prefer one quiet "Coming soon" heading over a group to a chip on each of its rows (the footer, the platform list). */

/* The huge numeral: data may be enormous while its label stays tiny. */
.flow-num {
  display: block;
  font-family: var(--flow-sans);
  font-size: var(--fz-num);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.055em;
  /* Proportional figures. Satoshi's tabular "1" has a flag and a slab foot to fill its cell, so
     at display size 114 and 18 read as a typewriter face. tabular-nums is for small data in a
     column only (.tnum, .mono), never for a figure that is looked at. */
  font-variant-numeric: lining-nums proportional-nums;
  color: var(--fg);
}
.flow-num--md { font-size: clamp(3.5rem, 1.5rem + 8vw, 8rem); }
.flow-num__unit {
  display: inline-block;
  margin-inline-start: 0.5em;
  font-family: var(--flow-sans);
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--fg-2);
  vertical-align: baseline;
}

/* --------------------------------------------------------------------------
   9  Rules, spec rows, accordion
   -------------------------------------------------------------------------- */
.flow-rule { height: 0; margin: 0; border: 0; border-block-start: 1px solid var(--hair); }
.flow-rule--dashed { border-block-start-style: solid; }   /* retired: nothing on the site is dashed. Reads as a plain rule */
.flow-rule--strong { border-block-start-color: var(--fg); }

/* Ruled rows: a quiet key, one plain sentence. <dl class="flow-spec"><div><dt>…</dt><dd>…</dd></div></dl> */
.flow-spec { display: grid; }
.flow-spec > div {
  display: grid;
  gap: 0.375rem 1.5rem;
  padding-block: 1.125rem;
  border-block-start: 1px solid var(--hair);
}
.flow-spec > div:last-child { border-block-end: 1px solid var(--hair); }
.flow-spec dt {
  font-family: var(--flow-sans);
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--fg-2);
  padding-block-start: 0.15em;
}
.flow-spec dd { max-width: 34rem; }
@media (min-width: 37.5em) {
  .flow-spec > div { grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); }
}

/* Ruled lines: the same rules as .flow-spec, with no key: one plain line each (the founder,
   19 November 2026: "we don't need a heading for each section. just write the line").
   <ul class="flow-lines" role="list"><li>…</li></ul> */
.flow-lines { display: grid; margin: 0; padding: 0; list-style: none; }
.flow-lines > li {
  padding-block: 1.125rem;
  border-block-start: 1px solid var(--hair);
  text-wrap: pretty;
}
.flow-lines > li:last-child { border-block-end: 1px solid var(--hair); }
.flow-lines abbr { text-decoration: none; }

/* Accordion: native details. Answers are in the HTML when collapsed.
   <div class="flow-acc"><details class="flow-acc__item" name="faq" data-faq>
     <summary><h3 class="flow-acc__q">Question?</h3></summary><div class="flow-acc__a"><p>Answer.</p></div></details></div> */
.flow-acc { border-block-end: 1px solid var(--hair); }
.flow-acc__item { border-block-start: 1px solid var(--hair); }
.flow-acc__item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
  padding-block: 1rem;
  cursor: pointer;
  list-style: none;
}
.flow-acc__item > summary::-webkit-details-marker { display: none; }
.flow-acc__item > summary::after {
  content: "";
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--mark);
  -webkit-mask: var(--fi-plus) center / contain no-repeat;
          mask: var(--fi-plus) center / contain no-repeat;
  transition: transform var(--dur-hover) var(--ease-expo);
}
.flow-acc__item[open] > summary::after { transform: rotate(45deg); }
.flow-acc__q { font-size: var(--fz-lede); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }
.flow-acc__a { display: grid; gap: 0.75rem; max-width: 40rem; padding-block-end: 1.75rem; color: var(--fg-2); }
/* Phones: closer rows (the target is still 56px tall) and a question one step smaller, so fewer wrap. */
@media (max-width: 37.49em) {
  .flow-spec > div,
  .flow-lines > li { padding-block: 0.875rem; }
  .flow-acc__item > summary { min-height: 3.5rem; padding-block: 0.75rem; gap: 1rem; }
  .flow-acc__q { font-size: 1.125rem; }
  .flow-acc__a { padding-block-end: 1.25rem; }
}

/* --------------------------------------------------------------------------
   10  Reveals (ui.js)
   Only when the head script has set html.ui-motion (script running, motion
   allowed, tab visible, not a ?seek= still). Everything is visible otherwise.
     data-lines            a heading: split into lines, each rising from a mask
     data-rise[="n"]       a block: fades and rises; n is its place in the stagger
     data-rise-group       the same for each child, in order
   A reveal is short, so that text is never met half-arrived: a three-line
   headline is whole 0.64s after it enters the window (and looks settled well
   before: the curve does nine tenths of its travel in the first third). A
   reader who is scrolling quickly gets a shorter one (.is-quick, set by ui.js
   from the scroll speed), and at a flick the text is simply there.
   -------------------------------------------------------------------------- */
html.ui-motion [data-lines]:not(.is-split):not(.is-in) { opacity: 0; }   /* opacity, not visibility: find-in-page and screen readers still reach it */
.flow-line {
  display: block;
  /* The mask is a clip a little larger than the line box, so descenders survive and
     nothing in the layout moves when a heading is split or put back. */
  clip-path: inset(-0.12em -1em -0.22em -1em);
}
.flow-line__in {
  display: block;
  transform-origin: 0 100%;
  will-change: transform;
}
html.ui-motion [data-lines].is-split .flow-line__in {
  transform: translate3d(0, 112%, 0) rotate(2deg);
  transition: transform var(--dur-reveal) var(--ease-expo) calc(var(--i, 0) * var(--stagger-line) + var(--rise-delay, 0ms));
}
html.ui-motion [data-lines].is-split.is-in .flow-line__in { transform: none; }
html.ui-motion [data-lines].is-split.is-quick .flow-line__in { transition-duration: 260ms; transition-delay: calc(var(--i, 0) * 30ms); }

html.ui-motion [data-rise]:not(.is-in),
html.ui-motion [data-rise-group]:not(.is-in) > * {
  opacity: 0;
  transform: translate3d(0, 1rem, 0);
}
html.ui-motion [data-rise],
html.ui-motion [data-rise-group] > * {
  transition:
    opacity 320ms ease calc(var(--rise-i, 0) * var(--stagger-rise) + var(--rise-delay, 0ms)),
    transform var(--dur-rise) var(--ease-expo) calc(var(--rise-i, 0) * var(--stagger-rise) + var(--rise-delay, 0ms));
}
html.ui-motion [data-rise].is-quick,
html.ui-motion [data-rise-group].is-quick > * { transition-duration: 180ms, 240ms; transition-delay: 0ms; }
/* Keyboard focus that lands inside a block before its reveal has played shows the block at once:
   focus is never on something faded. */
html.ui-motion :is([data-rise], [data-rise-group] > *):focus-within { opacity: 1; transform: none; transition: none; }
/* Once an element has arrived it gives its transition back, so --w and hover styles are not slowed. */
html.ui-motion [data-rise].is-done,
html.ui-motion [data-rise-group].is-done > * { transition: none; }

/* --------------------------------------------------------------------------
   11  Navigation: a compact floating capsule, and a full-screen sheet
   The capsule is the page's one dark object (data-ground="ink" on the header):
   a solid ink pill with light text. It does not depend on what is under it, so
   there is no moment, over paper, a white artefact or the thread, at which its
   words can lose contrast (quiet links 6.4:1 at worst, over white).
   Beside the wordmark it names the chapter the reader is in (ui.js writes it
   from the scroll position): with no label above any headline, this name is
   the page's wayfinding, and the only one. Everything in it is the text face,
   16px from 640px wide and 14px on a phone.
   One line at every width. On a phone the name sits beside the wordmark, as it
   does on a desktop, when there is room for all of it; when there is not, it
   is not shown (never cut short, never a second line).
   -------------------------------------------------------------------------- */
.flow-nav {
  position: fixed;
  inset: var(--nav-top) 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 0.75rem;
  pointer-events: none;
  transition: opacity 600ms ease, transform 900ms var(--ease-expo);
}
.flow-nav__capsule {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-height: var(--nav-h);
  padding: 0.375rem 0.375rem 0.375rem 1.125rem;
  border-radius: var(--rad-pill);
  background: var(--glass-solid);
  box-shadow: 0 0 0 1px rgb(var(--c-ink-rgb) / .06), 0 10px 28px -14px rgb(26 22 14 / .5), 0 2px 6px -2px rgb(26 22 14 / .22);
  color: var(--fg);
}
/* A little of what is behind shows as a soft tint, never as detail. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .flow-nav__capsule {
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
            backdrop-filter: blur(20px) saturate(1.4);
  }
}
/* The brand block: the wordmark and the chapter beside it, on one line.
   The block is one row tall and wraps: a chapter name that does not fit beside the wordmark (a
   long name on a narrow phone) goes to a second row, and that row is outside the block's height,
   so it is clipped away whole. From 640px the name has a slot of fixed width and never wraps. */
.flow-nav__id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  height: 2.75rem;
  margin-inline-end: auto;
  overflow: hidden;
}
.flow-nav__brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 2.75rem;
  padding-inline-end: 0.75rem;
  color: inherit;
}
.flow-nav__brand:focus-visible { outline-offset: -4px; }   /* inside the row, so the row's clip does not cut it */
.flow-nav__brand svg { width: auto; height: 1.25rem; }

/* The current chapter. One word or a short phrase, sentence case, text face. The slot has a
   fixed width from 640px up, so the capsule never changes size as the name changes. */
.flow-nav__chapter {
  display: flex;
  align-items: center;
  flex: none;
  max-width: 100%;
  height: 2.75rem;
  overflow: hidden;
  font-family: var(--flow-sans);
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: var(--fg);
}
.flow-nav__chapter-in {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 240ms ease;
}
.flow-nav__chapter-in::before { content: "/"; margin-inline-end: 0.625rem; color: var(--fg-2); font-weight: 400; }
.flow-nav__chapter-in:empty { opacity: 0; }
html:not(.ui-js) .flow-nav__chapter { display: none; }        /* the name is written by the script */

.flow-nav__links { display: none; }
.flow-nav__links > ul { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.flow-nav__link,
.flow-nav__signin {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  font-family: var(--flow-sans);
  font-size: var(--fz-small);
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--fg-2);
  transition: color var(--dur-hover) ease;
}
.flow-nav__link:hover, .flow-nav__signin:hover { color: var(--fg); }
/* The part of the page the reader is in: full colour and a fine underline. No dot. */
.flow-nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0.75rem;
  inset-block-end: 0.5rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 400ms var(--ease-expo);
}
.flow-nav__link[aria-current] { color: var(--fg); }
.flow-nav__link[aria-current]::after { transform: none; }

/* The two menus, Primary care and Secondary care (js/menu.js; their links are written once, in
   partials/_menu-primary-care.html and _menu-secondary-care.html). A menu's word has a small
   chevron after it, and its list is a quiet panel under the capsule in the capsule's own language:
   ink, light words, the nav's 16px (the caption size for the "Coming soon" name). The panel is out
   of the flow, so opening it moves nothing, and while it is shut it is out of the tab order and
   out of the accessibility tree (visibility). The script opens it (hover after a short pause,
   click, Enter, Space, the arrow keys) and closes it (Esc, a click outside, focus leaving it).
   Without the script (the nav has no data-menus), a list shows while the pointer is over its word
   or focus is inside it, and the word itself is a link to the overview. */
.flow-nav__item { position: relative; }
.flow-nav__trigger::after { inset-inline-end: 1.75rem; }      /* the underline is the word's, not the chevron's */
.flow-nav__chev {
  --fi-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6'/%3E%3C/svg%3E");
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  margin-inline-start: 0.375rem;
  background: currentColor;
  -webkit-mask: var(--fi-chev) center / contain no-repeat;
          mask: var(--fi-chev) center / contain no-repeat;
  transition: transform 300ms var(--ease-expo);
}
.flow-nav__item.is-open > .flow-nav__trigger { color: var(--fg); }
.flow-nav__item.is-open .flow-nav__chev { transform: rotate(180deg); }
.flow-nav__panel {
  position: absolute;
  inset-block-start: calc(100% + 0.875rem);                    /* half a rem under the capsule */
  inset-inline-start: -0.5rem;                                 /* its words line up with the menu's word */
  z-index: 1;
  min-width: 14rem;
  padding: 0.5rem;
  border-radius: 1.25rem;
  background: var(--glass-solid);
  box-shadow: 0 0 0 1px rgb(var(--c-ink-rgb) / .06), 0 18px 40px -18px rgb(26 22 14 / .55), 0 2px 6px -2px rgb(26 22 14 / .22);
  color: var(--fg);
  visibility: hidden;
  opacity: 0;
  transform: translate3d(0, -0.25rem, 0);
  transition: opacity 140ms ease, transform 300ms var(--ease-expo), visibility 0s linear 140ms;
}
/* The gap between the word and its panel is part of the menu, so the pointer can cross it. */
.flow-nav__panel::before { content: ""; position: absolute; inset: -0.875rem 0 100% 0; }
.flow-nav__item.is-open > .flow-nav__panel,
.flow-nav__links:not([data-menus]) .flow-nav__item:is(:hover, :focus-within) > .flow-nav__panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 160ms ease, transform 300ms var(--ease-expo), visibility 0s;
}
/* A menu shut by a choice (a link was followed) goes at once, not with its fade. */
.flow-nav__item.is-instant > .flow-nav__panel { transition: none; }
/* Leaving the page (pageswap, js/menu.js): no list, open or still fading, is in the old page's picture. */
.flow-nav__links.is-leaving .flow-nav__panel { visibility: hidden; opacity: 0; transition: none; }
/* Leaving the page from an open menu: the panel has its own part in the page transition (section
   16), so it fades out where it is and is not carried into the next page's capsule. */
.flow-nav__item.is-open > .flow-nav__panel { view-transition-name: flow-nav-menu; }
/* Primary care: the modules, then the coming-soon group beside them, after a hairline. */
.flow-nav__panel--wide {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: start;
  column-gap: 0.5rem;
}
.flow-nav__panel .flow-menu__soon { padding-inline-start: 0.5rem; box-shadow: inset 1px 0 0 var(--hair); }
.flow-nav__panel .flow-menu__list a,
.flow-nav__panel .flow-menu__label {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding-inline: 0.75rem;
  font-family: var(--flow-sans);
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.flow-nav__panel .flow-menu__list a {
  border-radius: 0.75rem;
  color: var(--fg);
  text-decoration: none;
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.flow-nav__panel .flow-menu__list a:hover { background: rgb(245 243 238 / .08); }
.flow-nav__panel .flow-menu__list a:focus-visible { outline-offset: -2px; border-radius: 0.75rem; }
.flow-nav__panel .flow-menu__list a[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.flow-nav__panel .flow-menu__label { font-size: var(--fz-caption); font-weight: 400; color: var(--fg-2); }
.flow-nav__panel .flow-menu__soon a { color: var(--fg-2); }  /* 7.1:1 on the panel's ink */
.flow-nav__panel .flow-menu__soon a:hover { color: var(--fg); }
@media (prefers-reduced-motion: reduce) {
  .flow-nav__panel { transform: none; }
  .flow-nav__chev { transition: none; }
}
/* 1024 to 1151px: with two menus (their chevrons and "Primary care" for "Platform") the capsule
   measured 1015px, more than the window leaves it below about 1050px. The words keep their size;
   the air between them is cut from 12px to 8px a side, which brings it to about 967px. */
@media (min-width: 64em) and (max-width: 71.99em) {
  .flow-nav__link, .flow-nav__signin { padding-inline: 0.5rem; }
  .flow-nav__link::after { inset-inline: 0.5rem; }
  .flow-nav__trigger::after { inset-inline-end: 1.5rem; }
  .flow-nav__panel { inset-inline-start: -0.75rem; }
}

.flow-nav__actions { display: flex; align-items: center; flex: none; gap: 0.375rem; }
.flow-nav__signin { display: none; }
.flow-nav__menu {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border-radius: var(--rad-pill);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  font-family: var(--flow-sans);
  font-size: var(--fz-small);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg);
  transition: box-shadow var(--dur-hover) ease;
}
.flow-nav__menu:hover, .flow-nav__menu:focus-visible { box-shadow: inset 0 0 0 1.5px var(--fg); }   /* the ring button's hover (section 6) */
html.ui-js .flow-nav__menu { display: inline-flex; }        /* the sheet needs the script */

/* Phones: the capsule is as wide as the window and one line tall, always. Its words are the
   caption size and its two buttons are closer, which leaves the chapter about 90px beside the
   wordmark at 390px wide: "Compliance", "The platform" and "How you start" fit; a longer name
   is not shown (see .flow-nav__id), so give a scene with a long chapter a short data-chapter-nav. */
@media (max-width: 39.99em) {
  .flow-nav { padding-inline: 0.5rem; }
  .flow-nav__capsule { padding-inline-start: 1rem; }
  .flow-nav__brand { padding-inline-end: 0.5rem; }
  .flow-nav__brand svg { height: 1.0625rem; }
  .flow-nav__chapter { font-size: var(--fz-caption); color: var(--fg-2); }
  .flow-nav__chapter-in::before { margin-inline-end: 0.375rem; }
  .flow-nav__cta, .flow-nav__menu { padding-inline: 0.8125rem; font-size: var(--fz-caption); }   /* 14px here, not the 16px button rule: at 16 the chapter name has no room in a one-line capsule (design pass checked it) */
}
@media (min-width: 26em) and (max-width: 39.99em) {
  .flow-nav { padding-inline: 0.75rem; }
}
@media (min-width: 40em) {
  .flow-nav { padding-inline: 1rem; }
  .flow-nav__capsule { width: auto; gap: 0.5rem; }
  .flow-nav__id { flex: none; flex-wrap: nowrap; margin-inline-end: 0.5rem; }
  .flow-nav__chapter { width: 10.5rem; }
}
@media (min-width: 64em) {
  .flow-nav__links { display: block; }
  .flow-nav__signin { display: inline-flex; }
  .flow-nav__actions { gap: 0.25rem; margin-inline-start: 0.25rem; padding-inline-start: 0.5rem; box-shadow: inset 1px 0 0 var(--hair); }
  html.ui-js .flow-nav__menu { display: none; }
  .flow-nav__id { margin-inline-end: 0.25rem; }
}
/* The capsule does not wait for the engine's intro (13 November 2026: the words, and the way
   round the site, are in the page from the first moment; the intro plays in the hero's own dock,
   beside them). It used to be held above the page until html.flow-intro was dropped. */

/* The sheet: the phone menu, full screen, on paper like the page. The two actions are pinned
   at the bottom. */
.flow-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--c-paper);
  color: var(--fg);
  overscroll-behavior: contain;
}
.flow-sheet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: flow-sheet-in 500ms var(--ease-expo) both; }
.flow-sheet::backdrop { background: var(--c-paper); }
@keyframes flow-sheet-in { from { opacity: 0; transform: translate3d(0, -1rem, 0); } }
.flow-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--nav-top) + 0.375rem) 1.125rem 0.375rem 1.875rem;
}
.flow-sheet__head .flow-nav__brand svg { height: 1.25rem; }
.flow-sheet__head .flow-nav__menu { display: inline-flex; }
.flow-sheet__body { overflow-y: auto; padding: 1.5rem 1.875rem; }
.flow-sheet__list li { border-block-end: 1px solid var(--hair); }
.flow-sheet__list li:first-child { border-block-start: 1px solid var(--hair); }
.flow-sheet__list a {
  -webkit-tap-highlight-color: transparent;   /* its own hover and focus; the default blue box was caught in the page transition's old picture */
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--fg);
}
.flow-sheet__list a::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  background: var(--mark);
  -webkit-mask: var(--fi-arrow) center / contain no-repeat;
          mask: var(--fi-arrow) center / contain no-repeat;
}
.flow-sheet[open] :is(.flow-sheet__group, .flow-sheet__list > li) { animation: flow-sheet-item 500ms var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 35ms + 60ms); }
@keyframes flow-sheet-item { from { opacity: 0; transform: translate3d(0, 1rem, 0); } }
/* The two menus in the sheet: each under its name, set as large as the page links below them but
   not a link itself (each list starts with its overview). Their links are the lede size, one to a
   row; the coming-soon modules are quieter, the nav's size in muted ink, several to a row. */
.flow-sheet__group { padding-block: 0.25rem 1.25rem; border-block-start: 1px solid var(--hair); }
.flow-sheet__h {
  display: flex;
  align-items: center;
  min-height: 4.25rem;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.flow-sheet__group .flow-menu__list a {
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: var(--fz-lede);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
}
.flow-sheet__group .flow-menu__list a:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 1.5px; text-underline-offset: 0.24em; }
.flow-sheet__group .flow-menu__list a[aria-current] { color: var(--link); }
.flow-sheet__group .flow-menu__label { margin-block-start: 0.75rem; font-size: var(--fz-caption); color: var(--fg-2); }
.flow-sheet__group .flow-menu__soon .flow-menu__list { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
.flow-sheet__group .flow-menu__soon a { font-size: var(--fz-small); color: var(--fg-2); }
.flow-sheet__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 1.125rem calc(1.125rem + env(safe-area-inset-bottom, 0px));
  border-block-start: 1px solid var(--hair);
}

/* --------------------------------------------------------------------------
   12  Chapters: the keyboard's way round the page (built by ui.js)
   The chapter rail, a ruler of ticks down the right edge of the window, is
   retired (founder, 13 November 2026): the capsule already names the chapter,
   and the reader's place is shown once. --rail-w is 0 at every width.
   What the rail also was, a list of the page's chapters straight after the
   capsule in the tab order, is kept. Nothing of it is drawn until one of its
   links has keyboard focus; then that link shows as an ink pill under the
   capsule, as the skip link does at the top of the page. The current chapter
   carries aria-current.
   -------------------------------------------------------------------------- */
.flow-chapters__list { margin: 0; padding: 0; list-style: none; }
.flow-chapters__link {
  position: fixed;
  inset-block-start: calc(var(--nav-top) + var(--nav-h) + 0.625rem);
  inset-inline-start: 50%;
  z-index: 60;
  padding: 0.875rem 1.25rem;
  border-radius: var(--rad-pill);
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: var(--fz-small);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: translate(-50%, 0);
}
.flow-chapters__link:not(:focus) {
  /* not shown, still in the tab order (the .vh recipe) */
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

/* --------------------------------------------------------------------------
   13  Footer (on paper, like the page; sits after <main>)
   It paints its own paper, with the engine running too: the thread's last
   shape belongs to the closing scene, and the small print is read on a clean
   ground. A hairline is its only edge.
   What is in it (13 November 2026): the wordmark; five even columns of links
   (the platform, Coming soon, Secondary care, Company, For staff); the small
   print in ONE style (14px, muted); a last row with the copyright line and the
   two legal links. No button (the capsule has the page's "Book a demo", and it
   is always in view), no tagline, no feed link.
   "Coming soon" is one quiet heading over the five names, which are set in the
   muted colour: no chip beside any of them.
   -------------------------------------------------------------------------- */
.flow-footer {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-8) var(--sp-5);
  border-block-start: 1px solid var(--hair);
  background: var(--c-paper);
  color: var(--fg);
  font-size: var(--fz-small);
  line-height: 1.5;
}
.flow-footer__in { display: grid; gap: var(--sp-7); }
.flow-footer__top { display: flex; align-items: center; }
.flow-footer__brand { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; }
.flow-footer__brand svg { width: auto; height: 1.5rem; }
/* Two columns on a phone (the platform beside what is coming, then the rest), three from 600px,
   five from 900px. Every column is the same width. */
.flow-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--col-gap); align-items: start; }
.flow-footer__h {
  margin-block-end: 0.25rem;
  font-family: var(--flow-sans);
  font-size: var(--fz-caption);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--fg-2);
}
.flow-footer__list li { break-inside: avoid; }
/* A row is a 44px target; a label that wraps keeps its own air above and below, so two wrapped
   labels never touch. */
.flow-footer__list a,
.flow-footer__list .flow-plain {
  display: inline-flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-block: 0.5rem;
  line-height: 1.3;
  color: var(--fg);
  text-decoration: none;
  text-wrap: balance;
}
.flow-footer__list a:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 1.5px; text-underline-offset: 0.28em; }
/* What is coming: the same rows, a step quieter (7.5:1). */
.flow-footer__list--quiet a,
.flow-footer__list--quiet .flow-plain { color: var(--fg-2); }
.flow-footer__list--quiet a:hover { color: var(--fg); }

/* The small print. One style: the caption size, muted. A code keeps the mono face and a link its
   underline; nothing here is in ink, so no line of it leads. */
.flow-footer__facts {
  display: grid;
  gap: var(--sp-4) var(--col-gap);
  padding-block-start: var(--sp-6);
  border-block-start: 1px solid var(--hair);
  font-size: var(--fz-caption);
  line-height: 1.5;
  color: var(--fg-2);
}
.flow-footer__company { display: grid; gap: 0.125rem; align-content: start; font-style: normal; justify-items: start; }
.flow-footer__company a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.flow-footer__notes { display: grid; gap: 0.5rem; align-content: start; }
.flow-footer__notes p { max-width: 44rem; }
.flow-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding-block-start: var(--sp-3);
  border-block-start: 1px solid var(--hair);
  font-size: var(--fz-caption);
  color: var(--fg-2);
}
.flow-footer__legal ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
/* The legal links, and (prototype only) the way across to the conventional version of this page. */
.flow-footer__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--fg-2);
  text-decoration: none;
  transition: color var(--dur-hover) ease;
}
.flow-footer__legal a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 1.5px; text-underline-offset: 0.28em; }
@media (min-width: 37.5em) {
  .flow-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 56.25em) {
  .flow-footer__cols { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .flow-footer__facts { grid-template-columns: 2fr 3fr; }
}
/* With a mouse the rows close up to 32px: the list reads as a list. Touch keeps 44px. */
@media (min-width: 56.25em) and (hover: hover) and (pointer: fine) {
  .flow-footer__list a, .flow-footer__list .flow-plain { min-height: 2rem; padding-block: 0.25rem; }
}

/* --------------------------------------------------------------------------
   14  Engine hooks (the engine's own rules are in engine.css)
   -------------------------------------------------------------------------- */
/* A keyframe marker: an empty point in a scene. Place it with top (or inset-block-start). */
.flow-key {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
}
/* An anchored label follows the n-th part of a shape while the thread is live.
   The engine writes transform on the element itself: centre the content on an inner child. */
html.flow-live [data-flow-anchor] {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  will-change: transform;
}
/* A dock is only a box for the shape to fit; it has no look of its own. */
.flow-dock { pointer-events: none; min-width: 0; }

/* The scroll cue. In the hero only, and quiet: a plain word in the caption size and a short still
   hairline (nothing runs down it any more). It is there to say the page goes on, to a reader who
   has not moved yet, so it leaves at the first scroll and does not come back: ui.js sets
   html.ui-scrolled once the page has moved, and the cue fades and gives up its place in the tab
   order. A page opened part of the way down never shows it. */
.flow-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  font-family: var(--flow-sans);
  font-size: var(--fz-caption);
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--fg-2);
  transition: color var(--dur-hover) ease, opacity 400ms ease, visibility 0s linear 0s;
}
.flow-cue:hover { color: var(--fg); }
.flow-cue::before {
  content: "";
  width: 1px;
  height: 1.5rem;
  background: var(--hair-2);
}
html.ui-scrolled .flow-cue.flow-cue {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease, visibility 0s linear 400ms;
}

/* --------------------------------------------------------------------------
   15  Static mode, reduced motion, forced colours, print
   -------------------------------------------------------------------------- */
/* Static mode (no WebGL, reduced motion, low power): no pinning (see 4), all
   --w read as 1 because every use is written var(--w, 1), and anchored labels
   stay in normal flow (see 14). Nothing else is needed here. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}

/* ?review=1: every claim still awaiting the founder's sign-off is outlined; its reason is the tooltip. */
html.review [data-confirm] { outline: 1px dashed var(--c-magenta); outline-offset: 4px; }

@media (forced-colors: active) {
  .flow-btn, .flow-nav__capsule, .flow-nav__menu, .flow-chip, .flow-artefact__frame { border: 1px solid CanvasText; }
  .flow-btn::before { display: none; }
  .flow-chip::before, .flow-arrow::after, .flow-acc__item > summary::after, .flow-sheet__list a::after { background: CanvasText; forced-color-adjust: none; }
}

@media print {
  :root, [data-theme], [data-ground] {
    --ground: #FFFFFF; --fg: #000000; --fg-2: #333333; --hair: #999999; --hair-2: #666666;
    --em: #000000; --spot: #000000; --link: #000000; --mark: #000000;
  }
  html, html.flow-js, body { background: #FFFFFF !important; color: #000000; }
  .flow-nav, .flow-chapters, .flow-sheet, .flow-cue, .flow-skip, canvas, .flow-key, .flow-proto, .flow-opt, .flow-note { display: none !important; }
  .scene, .scene:is([data-theme]) { padding-block: 1.5rem !important; background: none !important; opacity: 1 !important; break-inside: avoid; }
  .scene--pin > .scene__track { height: auto !important; }
  .scene--pin .scene__stage { position: static !important; height: auto !important; }
  [data-lines], [data-rise], [data-rise-group] > *, .flow-line__in { visibility: visible !important; opacity: 1 !important; transform: none !important; }
  [data-flow-anchor] { position: static !important; transform: none !important; }
  .flow-artefact__frame { box-shadow: 0 0 0 1px #999999; }
  .flow-btn { background: none; color: #000000; box-shadow: inset 0 0 0 1px #000000; }
}

/* --------------------------------------------------------------------------
   16  Page transitions (the founder, 14 November 2026: moving between pages
   felt abrupt; it should be transitional, but snappy)
   Moving between any two pages of the site (the home page, Secondary care,
   the Passport, News, About, an article) is one short, quiet move instead of
   a cut: the capsule holds still, the old page lifts away as it fades, and
   the new page rises into place. These are cross-document view transitions,
   and every page loads this file, so every page opts in here, and the page
   being opened styles the move.
     The capsule      view-transition-name: flow-nav. It is in the same place
                      on every page, so it does not move; the chapter name
                      beside the wordmark crossfades.
     The page         the root snapshot (everything but the capsule and the
                      thread): the old page fades out in 130ms (easing in) as
                      it lifts 10px; from 40ms the new one fades in (160ms)
                      as it rises 12px into place (190ms, the expo ease).
                      They overlap enough that the window is never blank
                      (one of the two is at 0.5 or more throughout; the
                      first cut, 90ms against 70ms, left two near-empty
                      frames), and the 22px between them keeps two
                      headlines from reading over each other. 230ms in all.
     The thread       the particle canvas (view-transition-name: flow-thread):
                      the old page's shape dissolves (fades as it goes soft)
                      and the new page's condenses out of the same softness
                      as it rises with its page. The engine draws the new
                      page's shape live underneath, so nothing waits for it.
     Behind them      paper (::view-transition), so the few pixels the page
                      moves through never show anything else.
     Arriving at a place on the home page (/#platform from an inner page):
                      the home page keeps itself out of sight (html.flow-
                      arriving) until it has landed there, then fades in
                      (180ms), so the move never rises into the hero and
                      then cuts (js/ui.js, initAnchors).
     Reduced motion   a 120ms crossfade; nothing moves, nothing blurs. Every
                      moving or blurring rule is inside a no-preference
                      query, and the reduced block names each picture.
   Nothing waits for the particle engine: it boots in the new page as usual.
   Nothing blocks a navigation, back and forward make the same move, and a
   browser without view transitions simply navigates. Same-page links
   (#platform) are not page navigations and keep the engine's eased scroll.
   -------------------------------------------------------------------------- */
@view-transition { navigation: auto; }

.flow-nav__capsule { view-transition-name: flow-nav; }
.flow-canvas { view-transition-name: flow-thread; }
/* With the phone menu open, the capsule and the thread are under the sheet: they leave with the
   page rather than being lifted above the sheet for the length of the move, and the new page's
   capsule arrives with the new page (the :only-child rule below). */
html:has(.flow-sheet[open]) :is(.flow-nav__capsule, .flow-canvas) { view-transition-name: none; }
/* The capsule's glass is off for the length of a move (its fill is 96% opaque, so nothing shows of
   the change): left on, the browser blurs whatever is behind the new capsule's picture even while
   that picture is still transparent (a soft band across the open phone menu's head). */
html:active-view-transition .flow-nav__capsule { -webkit-backdrop-filter: none; backdrop-filter: none; }

::view-transition { background: var(--c-paper); }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(*) { animation-duration: 200ms; animation-timing-function: var(--ease-expo); }
  ::view-transition-old(root) { animation: flow-vt-fade-out 130ms cubic-bezier(.4, 0, 1, 1) both, flow-vt-lift 130ms cubic-bezier(.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: flow-vt-fade-in 160ms cubic-bezier(.2, .6, .35, 1) 40ms both, flow-vt-rise 190ms var(--ease-expo) 40ms both; }
  ::view-transition-old(flow-thread) { animation: flow-vt-fade-out 140ms cubic-bezier(.4, 0, 1, 1) both, flow-vt-lift 140ms cubic-bezier(.4, 0, 1, 1) both, flow-vt-soften 140ms ease-in both; }
  ::view-transition-new(flow-thread) { animation: flow-vt-fade-in 190ms cubic-bezier(.2, .6, .35, 1) 40ms both, flow-vt-rise 190ms var(--ease-expo) 40ms both, flow-vt-condense 190ms cubic-bezier(.2, .6, .35, 1) 40ms both; }
  /* The capsule's two pictures differ only in the chapter name: a quick crossfade. Coming from the
     open phone menu there is no old capsule: the new one arrives with its page. */
  ::view-transition-old(flow-nav),
  ::view-transition-new(flow-nav) { animation-duration: 160ms; animation-timing-function: ease; }
  ::view-transition-new(flow-nav):only-child { animation: flow-vt-fade-in 160ms cubic-bezier(.2, .6, .35, 1) 40ms both; }
}

@keyframes flow-vt-fade-out { to { opacity: 0; } }
@keyframes flow-vt-fade-in { from { opacity: 0; } }
@keyframes flow-vt-lift { to { transform: translateY(-10px); } }
@keyframes flow-vt-rise { from { transform: translateY(12px); } }
@keyframes flow-vt-soften { to { filter: blur(5px); } }
@keyframes flow-vt-condense { from { filter: blur(5px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*) { animation: none; }
  ::view-transition-old(root), ::view-transition-old(flow-thread), ::view-transition-old(flow-nav) { animation: flow-vt-fade-out 120ms linear both; }
  ::view-transition-new(root), ::view-transition-new(flow-thread), ::view-transition-new(flow-nav) { animation: flow-vt-fade-in 120ms linear both; }
}

/* Arriving at a place on the home page (above): out of sight until landed, then a short fade (opacity
   only: a transform on <main> would move its pinned and fixed parts). */
html.flow-arriving :is(#main, .flow-footer, .flow-canvas, .flow-ground) { opacity: 0; }
html.flow-landed :is(#main, .flow-footer, .flow-canvas) { animation: flow-vt-fade-in 180ms cubic-bezier(.2, .6, .35, 1) both; }
@media print { html.flow-arriving :is(#main, .flow-footer) { opacity: 1; } }
