/* KYNYTYX marketing site, Round 6 "the living clock" (#1543), on the Tide
   tokens. This sheet is GENERATED by marketing/src/build.mjs from
   marketing/src/styles/*.css; edit those, never styles.css.

   The marketing site and the app look different on purpose (owner ruling
   2026-10-06): the app stays on Keystone v2 (packages/ds, square, signal);
   this site is Tide (rounded, apricot, ink, pills). The brand guards cover
   the app; marketingTide.test.js covers this sheet. */

/* --- Fonts --------------------------------------------------------------
   Self-hosted, never hotlinked: a CDN would need a CSP exception. Geist is
   the variable cut (weights 300-700), because the display and h2 sizes are
   set at 450. OFL-1.1, licence in fonts/OFL-Geist.txt. */
@font-face {
    font-family: 'Geist';
    src: url('/fonts/geist-var-latin.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('/fonts/geist-mono-400-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('/fonts/geist-mono-500-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
/* A metrics-matched local fallback, so the 88px headline does not jump when
   Geist arrives (spec 10, CLS < 0.05). Overrides as next/font computes them
   for Geist on Arial. */
@font-face {
    font-family: 'Geist Fallback';
    src: local('Arial');
    ascent-override: 95.94%;
    descent-override: 28.16%;
    line-gap-override: 0%;
    size-adjust: 104.76%;
}

/* --- Tokens (spec section 2) ---------------------------------------------- */
:root {
    /* Grounds */
    --color-paper:        #F6F2EB;   /* page ground */
    --color-surface:      #FFFFFF;   /* cards, controls */
    --color-surface-soft: #FAF7F2;   /* inset panels inside cards */
    --color-face:         #FBF8F3;   /* the clock face */
    --color-chip:         #F3EEE6;   /* secondary buttons, unselected chips */
    --color-peach-panel:  #FCEEE4;   /* notification panel, appointment */
    --color-sage-panel:   #EEF0EE;   /* sharing panel, lab ranges */
    --color-apricot-soft: #FBF1E8;   /* the "alongside" points panel */
    --color-wave-1:       #FCE7D9;
    --color-wave-2:       #F9D7C1;
    --color-wave-3:       #FBEADF;

    /* Text and lines */
    --color-ink:          #24365A;   /* text, primary lines, dark buttons */
    --color-ink-muted:    #5B5852;   /* secondary text, 4.5:1+ on paper and white */
    --color-on-night:     #F6F2EB;
    --color-on-night-muted: #C3CBDA;
    --color-rule:         #E6DED1;   /* dividers, the off switch */
    --color-rule-soft:    #ECE5DA;   /* status-group rules, planned tiles */
    --color-rule-chip:    #E8E0D4;   /* the inset ring on chips */
    --color-rule-face:    #EDE6DA;   /* the clock's baseline ring */
    --color-rule-strong:  #D3C9B9;   /* clock ticks */
    --color-axis:         #E2DACD;   /* chart axes, the record rail */
    --color-guide:        #C9BEAE;   /* dotted chart guides */

    /* Accent */
    --color-apricot:      #EE7A4C;   /* primary CTA fill, magnesium, accents */
    --color-apricot-text: #A84D27;   /* accent text and links on light grounds */
    --color-apricot-hover: #83391B;
    --color-on-apricot:   #1B2233;   /* text on apricot */
    --color-taupe:        #A39A8C;   /* third series (omeprazole), quiet markers */
    --color-taupe-dot:    #9C9384;   /* the planned-status ring, third point */

    /* The hero sky (spec 5); the live clock interpolates between these. */
    --color-night:        #1D2A45;
    --color-dawn:         #F3D9C8;
    --color-dusk:         #EBC9B8;

    /* Radius follows hierarchy: bigger container, bigger radius. */
    --radius-sm:   8px;    /* logo slots */
    --radius-md:   16px;   /* rows, tiles */
    --radius-md-l: 20px;   /* cards inside panels, notifications */
    --radius-lg:   24px;   /* the controls card, insets */
    --radius-lg-l: 32px;   /* feature cards, screenshots */
    --radius-xl:   36px;   /* feature panels */
    --radius-pill: 999px;  /* buttons, chips */

    --shadow-card:   0 1px 2px rgba(36, 54, 90, .04), 0 14px 36px -18px rgba(36, 54, 90, .16);
    --shadow-lift:   0 2px 4px rgba(36, 54, 90, .05), 0 28px 56px -20px rgba(36, 54, 90, .22);
    --shadow-raised: 0 1px 2px rgba(20, 30, 55, .06), 0 16px 40px -20px rgba(20, 30, 55, .28);
    --shadow-tile:   0 1px 2px rgba(36, 54, 90, .05), 0 8px 20px -14px rgba(36, 54, 90, .2);

    --ease-out: cubic-bezier(.2, .7, .2, 1);

    /* Type: one family, tabular numerals for every time and measurement. */
    --font-body: 'Geist', 'Geist Fallback', system-ui, sans-serif;
    --font-display: 'Geist', 'Geist Fallback', system-ui, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --gutter: 16px;
    --content: 1200px;
    --section-top: 88px;

    /* --- Round 2 names, pointed at Tide values -----------------------------
       carried.css (the pages Round 6 does not redesign) reads these. New
       rules use the --color-* names above. */
    --ink:         var(--color-ink);
    --ink-soft:    var(--color-ink-muted);
    --ink-faint:   var(--color-ink-muted);
    --bone:        var(--color-paper);
    --paper:       var(--color-surface);
    --recessed:    var(--color-surface-soft);
    --line:        var(--color-rule);
    --line-strong: var(--color-rule-strong);
    --accent-text: var(--color-apricot-text);
    --ash:         var(--color-on-night-muted);
    --line-dark:   rgba(246, 242, 235, .18);
    --s-4: 4px;   --s-8: 8px;   --s-12: 12px; --s-16: 16px;
    --s-24: 24px; --s-32: 32px; --s-40: 40px; --s-56: 56px;
    --s-80: 80px;
    --control-h: 44px;
}
@media (min-width: 600px) { :root { --section-top: 120px; } }

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-paper);
    -webkit-font-smoothing: antialiased;
    /* The waves and the hero sky are full-bleed; nothing may make the page
       scroll sideways at 320px (spec 3). */
    overflow-x: clip;
}
img { max-width: 100%; display: block; }
svg { display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
strong { font-weight: 600; }
a { color: var(--color-apricot-text); }
a:hover { color: var(--color-apricot-hover); }
.tnum, time { font-variant-numeric: tabular-nums; }

/* --- Focus: 2px, 3px offset, on every interactive element (spec 11) -------
   The spec asks for an apricot ring; apricot itself is 2.5:1 on paper, under
   the 3:1 a focus indicator needs (WCAG 1.4.11, and #1020 item 2 for the
   app). The ring is the apricot TEXT colour instead: 5.0:1 on paper. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-apricot-text);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 20;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    background: var(--color-ink);
    color: var(--color-paper);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: var(--gutter); color: var(--color-paper); }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- Layout: 1200px of content, 16px gutters on a phone ------------------- */
.wrap { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }
@media (min-width: 600px) { .wrap { width: min(var(--content), 100% - 80px); } }
.section { padding-top: var(--section-top); }

/* --- Type (spec 2) --------------------------------------------------------- */
h1 {
    font-size: clamp(50px, 6.2vw, 88px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 450;
    text-wrap: balance;
}
h2 {
    font-size: clamp(36px, 3.7vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 450;
}
.section-lead {
    margin-top: 20px;
    max-width: 640px;
    font-size: clamp(17px, 1.4vw, 20px);
    line-height: 1.6;
    color: var(--color-ink-muted);
}
.section-sub {
    margin-top: 16px;
    max-width: 560px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-ink-muted);
}
.fine-print, figcaption {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-ink-muted);
}
.fine-print { margin-top: 20px; max-width: 760px; }

/* The one section ornament: the apricot wave above a heading. */
.wave-mark { width: 64px; height: 14px; margin-bottom: 24px; }
.wave-mark path {
    fill: none;
    stroke: var(--color-apricot);
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: kx-draw 2.4s cubic-bezier(.4, 0, .2, 1) .4s both;
}
@media (max-width: 599px) { .wave-mark { width: 56px; } }

/* --- Buttons: pills, 44px floor, 52px in the hero (spec 4) ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: transform .5s var(--ease-out), background-color .5s, color .5s;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { min-height: 52px; padding: 0 28px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 500; }
.btn-apricot, .btn-apricot:hover { background: var(--color-apricot); color: var(--color-on-apricot); }
.btn-ink, .btn-ink:hover { background: var(--color-ink); color: var(--color-paper); }
.btn-white, .btn-white:hover { background: var(--color-surface); color: var(--color-ink); font-weight: 500; }
.btn-chip, .btn-chip:hover { background: var(--color-chip); color: var(--color-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* The tertiary action: an arrow link, 44px tall so it is a real target. */
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}
.arrow-link svg { width: 16px; height: 16px; flex: none; transition: transform .5s var(--ease-out); }
.arrow-link:hover svg { transform: translateX(3px); }

/* --- Cards, panels, chips ------------------------------------------------- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg-l);
    box-shadow: var(--shadow-card);
    transition: transform .7s var(--ease-out), box-shadow .7s var(--ease-out);
}
.feature-panel { border-radius: var(--radius-xl); padding: 32px; }
.panel-peach { background: var(--color-peach-panel); }
.panel-sage { background: var(--color-sage-panel); padding: 24px; }
.feature-panel figcaption { margin-top: 16px; }

.chips { list-style: none; margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips-sm { margin-top: 14px; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    box-shadow: inset 0 0 0 1px var(--color-rule-chip);
    font-size: 14px;
    font-weight: 500;
}
.chips-sm .chip { height: 36px; padding: 0 12px; }
.chip-icon { color: var(--color-apricot-text); flex: none; }

/* --- Motion: one orchestrated moment, everything else quiet (spec 6) ----- */
@keyframes kx-draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes kx-drift { from { transform: translateX(0); } to { transform: translateX(-720px); } }
@keyframes kx-drift-back { from { transform: translateX(-720px); } to { transform: translateX(0); } }
@keyframes kx-drift-long { from { transform: translateX(0); } to { transform: translateX(-1440px); } }
@keyframes kx-breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes kx-fade { from { opacity: 0; } }
@keyframes kx-ride {
    0% { offset-distance: 0%; opacity: 0; }
    6% { opacity: 1; }
    88% { offset-distance: 100%; opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}
@keyframes kx-travel {
    0% { left: 0; opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { left: calc(100% - 10px); opacity: 0; }
}
@media (hover: hover) {
    .card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* --- Header ---------------------------------------------------------------- */
.site-header { position: relative; z-index: 5; color: var(--color-ink); }
.header-row { display: flex; align-items: center; gap: 48px; min-height: 80px; }
.lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}
.lockup:hover { color: inherit; }
.mark-kx { width: 46px; height: 28px; flex: none; }
.kx-ink { fill: currentColor; }
.kx-accent { fill: var(--color-apricot); }
.wordmark { font-size: 16px; font-weight: 600; letter-spacing: 0.24em; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: 28px; flex: 1; }
.site-nav a, .header-login {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}
.site-nav a:hover, .header-login:hover { color: inherit; text-decoration: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--color-apricot); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* The phone menu is a <details> sheet: it works with no script at all. */
.menu { display: none; position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-sheet {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    padding: 8px;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-raised);
    display: grid;
}
.menu-sheet a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    color: var(--color-ink);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}
.menu-sheet a:hover { background: var(--color-chip); color: var(--color-ink); }

@media (max-width: 1023px) {
    .site-nav { display: none; }
    .menu { display: block; }
}
@media (max-width: 599px) {
    .header-row { gap: 12px; min-height: 68px; }
    .header-actions { gap: 8px; }
    .header-login { display: none; }
    .wordmark { font-size: 14px; letter-spacing: 0.2em; }
}
@media (max-width: 359px) { .wordmark { display: none; } }

/* --- The closing band on the waves (spec 1, Home 10) ----------------------- */
.tide-closing {
    position: relative;
    margin-top: var(--section-top);
    height: 420px;
    overflow: hidden;
}
.waves { position: absolute; inset: 0; }
.wave { position: absolute; left: 0; top: 0; width: 2880px; height: 420px; }
.wave-3 { fill: var(--color-wave-3); animation: kx-drift-long 90s linear infinite; }
.wave-1 { fill: var(--color-wave-1); animation: kx-drift 52s linear infinite; }
.wave-2 { fill: var(--color-wave-2); animation: kx-drift-back 38s linear infinite; }
.tide-closing-row {
    position: relative;
    padding-top: 196px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    flex-wrap: wrap;
}
.tide-closing h2 { font-size: clamp(40px, 3.9vw, 56px); line-height: 1.05; letter-spacing: -0.035em; }
@media (max-width: 599px) {
    .tide-closing { height: 460px; }
    .tide-closing-row { padding-top: 168px; }
    .tide-closing .btn-row { width: 100%; flex-direction: column; }
    .tide-closing .btn { width: 100%; }
}

/* --- Footer: quiet, under the waves ---------------------------------------- */
footer {
    background: var(--color-wave-2);
    padding-block: 48px 32px;
    font-size: 15px;
}
.footer-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 12px; align-content: start; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand .lockup { color: var(--color-ink); }
.footer-brand p { color: var(--color-ink); max-width: 32ch; }
.footer-col h2 { font-size: 14px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.footer-col ul { list-style: none; margin-top: 4px; }
.footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-ink);
    text-decoration: none;
}
.footer-col a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(36, 54, 90, .16);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: var(--color-ink);
}

/* --- Home: the hero and the living clock (spec 5) ---------------------------
   The hero ground is the sky for the time shown. Without script it is the
   14:10 sky, which is paper; the live clock (PR 3) moves it. */
.page-home .site-header { background: var(--hero-sky, var(--color-paper)); color: var(--hero-ink, var(--color-ink)); }
.hero {
    background: var(--hero-sky, var(--color-paper));
    color: var(--hero-ink, var(--color-ink));
    padding: 70px 0 96px;
    transition: background-color 1.4s ease, color 1.4s ease;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 620px);
    grid-template-areas: "copy clock" "ctas clock" "readout clock";
    grid-template-rows: auto auto 1fr;
    column-gap: 60px;
    justify-content: space-between;
    align-items: start;
}
.hero-copy { grid-area: copy; }
.hero-ctas { grid-area: ctas; margin-top: 36px; }
.readout { grid-area: readout; }
.hero-clock { grid-area: clock; margin-top: -46px; }
.hero h1 { color: inherit; }
.hero-lead {
    margin-top: 36px;
    max-width: 470px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--hero-muted, var(--color-ink-muted));
    transition: color 1.4s ease;
}

/* The readout: what the day means at the time shown. */
.readout {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--hero-rule, var(--color-rule));
}
.readout-at { font-size: 15px; line-height: 20px; font-weight: 600; }
.readout-estimated { font-size: 13px; line-height: 18px; color: var(--hero-muted, var(--color-ink-muted)); }
.readout-rows { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.readout-rows li {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 72px 150px;
    gap: 14px;
    align-items: baseline;
}
.swatch { width: 12px; height: 12px; border-radius: 50%; align-self: center; }
.swatch-apricot { background: var(--color-apricot); }
.swatch-ink { background: var(--color-ink); box-shadow: 0 0 0 1px var(--hero-swatch-ring, transparent); }
.swatch-taupe { background: var(--color-taupe); }
.readout-name { font-size: 16px; line-height: 22px; font-weight: 500; }
.readout-pct {
    font-size: 26px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.readout-note { font-size: 14px; line-height: 20px; color: var(--hero-muted, var(--color-ink-muted)); }
.readout-empty { margin-top: 12px; font-size: 15px; color: var(--hero-muted, var(--color-ink-muted)); }

/* The dial. Geometry is in a 600-unit viewBox; colours are here. */
.clock { width: 100%; max-width: 600px; height: auto; margin: 0 auto; filter: drop-shadow(0 24px 48px rgba(20, 30, 55, .16)); }
.clock-face { fill: var(--color-face); }
.band { fill: none; stroke-width: 10; stroke-linecap: round; }
.band-sleep { stroke: var(--color-ink); stroke-opacity: .16; }
.band-workout { stroke: var(--color-apricot); stroke-opacity: .45; }
.ticks line { stroke: var(--color-rule-strong); stroke-width: 1.5; stroke-linecap: round; }
.hour-labels text, .clock-day {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    fill: var(--color-ink-muted);
    text-anchor: middle;
    font-variant-numeric: tabular-nums;
}
.clock-day { font-size: 14px; }
.clock-time {
    font-family: var(--font-body);
    font-size: 48px;
    font-weight: 500;
    letter-spacing: -1px;
    fill: var(--color-ink);
    text-anchor: middle;
    font-variant-numeric: tabular-nums;
}
.baseline { fill: none; stroke: var(--color-rule-face); stroke-width: 1.5; }
.shape { stroke-linejoin: round; transition: opacity .6s ease; }
.shape-mg { fill: var(--color-apricot); fill-opacity: .16; stroke: var(--color-apricot); stroke-width: 3; }
.shape-d3 { fill: var(--color-ink); fill-opacity: .08; stroke: var(--color-ink); stroke-width: 2; }
.shape-ome { fill: var(--color-taupe); fill-opacity: .12; stroke: var(--color-taupe); stroke-width: 2; }
.clock-center { fill: var(--color-surface); }
.marker { fill: var(--color-surface); stroke-width: 1.75; transition: opacity .6s ease; }
.marker-mg { stroke: var(--color-apricot); }
.marker-d3 { stroke: var(--color-ink); }
.marker-ome { stroke: var(--color-taupe); }
.marker-mg.is-taken { fill: var(--color-apricot); }
.marker-d3.is-taken { fill: var(--color-ink); }
.marker-ome.is-taken { fill: var(--color-taupe); }
.hand { stroke: var(--color-ink); stroke-width: 2; stroke-linecap: round; }
.dot { stroke: var(--color-surface); stroke-width: 2; transition: opacity .6s ease; }
.dot-mg { fill: var(--color-apricot); }
.dot-d3 { fill: var(--color-ink); }
.dot-ome { fill: var(--color-taupe); }
[data-off] { opacity: 0; }

/* The controls card. Without script it carries only the legend; the live
   clock (PR 3) adds play, the slider, the chips and the evening dose. */
.clock-controls {
    width: min(560px, 100%);
    margin: 20px auto 0;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-ink);
    box-shadow: var(--shadow-raised);
}
.clock-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; line-height: 18px; color: var(--color-ink-muted); }
.clock-legend > span { display: flex; align-items: center; gap: 8px; }
.legend-band { width: 18px; height: 6px; border-radius: 3px; }
.legend-sleep { background: rgba(36, 54, 90, .16); }
.legend-workout { background: rgba(238, 122, 76, .45); }
.legend-ring { width: 9px; height: 9px; border-radius: 50%; border: 1.75px solid var(--color-ink); }
.hero-clock figcaption {
    width: min(560px, 100%);
    margin: 12px auto 0;
    color: var(--hero-muted, var(--color-ink-muted));
    transition: color 1.4s ease;
}

@media (max-width: 1199px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); column-gap: 40px; }
    .readout-rows li { grid-template-columns: 14px minmax(0, 1fr) 64px; }
    .readout-note { grid-column: 2 / -1; margin-top: -8px; }
}
@media (max-width: 899px) {
    /* Stacked: headline and intro, clock, controls, readout, CTAs (spec 3). */
    .hero { padding: 32px 0 24px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "clock" "readout" "ctas"; grid-template-rows: none; }
    .hero-clock { margin-top: 32px; }
    .clock { max-width: 480px; }
    .readout { margin-top: 32px; }
}
@media (max-width: 599px) {
    .hero-lead { margin-top: 24px; font-size: 17px; }
    .clock { max-width: 358px; }
    .hero-ctas { flex-direction: column; }
    .hero-ctas .btn { width: 100%; }
}

/* --- Know where you are in your day ----------------------------------------- */
.rhythm-grid { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.curve-card { padding: 32px 40px; }
.card-title { font-size: 17px; line-height: 22px; font-weight: 600; }
.curve-stage { position: relative; margin-top: 18px; width: 100%; max-width: 600px; aspect-ratio: 2 / 1; }
.curve-svg { width: 100%; height: 100%; }
.curve-ground { fill: var(--color-surface-soft); }
.curve-axis { stroke: var(--color-axis); stroke-width: 1.5; stroke-linecap: round; }
.curve-fill { fill: var(--color-apricot); opacity: .1; animation: kx-fade 2.4s ease 2s both; }
.curve-line { fill: none; stroke: var(--color-apricot); stroke-width: 4; stroke-linecap: round; animation: kx-draw 3.2s cubic-bezier(.4, 0, .2, 1) .3s both; }
.curve-guides line { stroke: var(--color-guide); stroke-width: 1.5; stroke-dasharray: 1 5; stroke-linecap: round; }
.curve-span line { stroke: var(--color-ink); stroke-width: 1.5; stroke-linecap: round; }
.curve-svg text { font-family: var(--font-body); font-size: 13px; }
.curve-strong, .curve-strong text { font-weight: 600; fill: var(--color-ink); }
.curve-muted { fill: var(--color-ink-muted); }
.curve-accent text { font-weight: 500; fill: var(--color-apricot-text); }
/* The dot that rides the curve. It rides in the 600x300 frame, so it only
   rides where the stage is drawn at that size; smaller, it rests. */
.curve-rider {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: 0 0 0 3px var(--color-apricot), 0 0 0 9px rgba(238, 122, 76, .18);
    offset-path: path('M40,250 C80,250 100,50 150,50 C230,50 300,200 520,238 C540,240 552,240 560,240');
    offset-rotate: 0deg;
    offset-anchor: center;
    opacity: 0;
    animation: kx-ride 9s cubic-bezier(.45, 0, .55, 1) 1.5s infinite;
}
@media (max-width: 1199px) { .curve-rider { display: none; } }
.phases { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.phase-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--color-apricot-text); }
.phase-body { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--color-ink-muted); }
.points {
    list-style: none;
    padding: 32px 36px;
    border-radius: var(--radius-lg-l);
    background: var(--color-apricot-soft);
    display: grid;
    align-content: center;
    gap: 28px;
}
.point-head { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 22px; font-weight: 600; }
.point-body { margin-top: 6px; padding-left: 18px; font-size: 15px; line-height: 1.55; color: var(--color-ink-muted); }
.dot-sm { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-apricot { background: var(--color-apricot); }
.dot-ink { background: var(--color-ink); }
.dot-taupe { background: var(--color-taupe-dot); }
@media (max-width: 1199px) { .rhythm-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) {
    .curve-card { padding: 24px 18px; }
    .phases { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .points { padding: 24px; }
}

/* --- Bring in what you already track ---------------------------------------- */
.status-groups { margin-top: 48px; border-bottom: 1px solid var(--color-rule-soft); }
.status-group {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 22px 0;
    border-top: 1px solid var(--color-rule-soft);
}
.status-label { display: flex; align-items: center; gap: 10px; min-height: 60px; font-size: 15px; line-height: 1.3; font-weight: 600; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status-connected { background: var(--color-ink); }
.status-in-progress { background: var(--color-apricot); box-shadow: 0 0 0 4px var(--color-wave-1); animation: kx-breathe 4s ease-in-out infinite; }
.status-planned { border: 1.5px solid var(--color-taupe-dot); }
.tiles { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.tile {
    width: 180px;
    height: 60px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-tile);
    display: flex;
    align-items: center;
    gap: 10px;
}
.tile-planned { background: var(--color-surface-soft); color: var(--color-ink-muted); box-shadow: inset 0 0 0 1px var(--color-rule-soft); }
.tile-name {
    min-width: 0;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tile-sub { display: block; font-size: 12px; font-weight: 500; color: var(--color-ink-muted); }
.tile-in-progress .tile-name { -webkit-line-clamp: 3; }
.logo-slot {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: inset 0 0 0 1px rgba(36, 54, 90, .08);
}
.logo-slot--empty { display: flex; align-items: center; justify-content: center; color: var(--color-taupe); }
@media (max-width: 899px) {
    .status-group { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .status-label { min-height: 0; }
    .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tile { width: auto; }
}
@media (max-width: 599px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile { height: 56px; }
    .logo-slot { width: 26px; height: 26px; }
}

/* --- Reminders and privacy: text beside a sample panel ---------------------- */
.split { display: grid; gap: 64px; align-items: center; }
.split-reminders { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); }
.split-privacy { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); }
.notifications { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.notification { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md-l); }
.app-icon {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-ink);
    color: var(--color-paper);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mark-kx-mini { width: 22px; height: 14px; }
.notification-text { flex: 1; min-width: 0; }
.notification-head { display: flex; justify-content: space-between; gap: 8px; }
.notification-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.notification-when { flex: none; font-size: 12px; line-height: 20px; color: var(--color-ink-muted); }
.notification-body { display: block; font-size: 14px; line-height: 20px; color: var(--color-ink-muted); }
.panel-heading { padding: 0 4px 14px; font-size: 15px; font-weight: 600; }
.people { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.person { padding: 18px 20px; border-radius: var(--radius-md-l); background: var(--color-surface); }
.person-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.person-name { font-size: 16px; font-weight: 600; }
.person-role { font-size: 13px; color: var(--color-ink-muted); }
.share-grid { list-style: none; margin-top: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; }
.share-row.is-off { color: var(--color-ink-muted); }
/* Illustrative switches: role="img", not focusable (spec 4, 11). */
.switch { position: relative; flex: none; display: inline-block; width: 44px; height: 26px; border-radius: 13px; background: var(--color-rule); }
.switch.is-on { background: var(--color-ink); }
.switch > span { position: absolute; top: 3px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface); box-shadow: 0 1px 2px rgba(20, 30, 55, .2); }
.switch.is-on > span { left: 22px; }
.panel-sage figcaption { margin-top: 14px; padding: 0 4px; }
@media (max-width: 1199px) {
    .split-reminders, .split-privacy { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 599px) {
    .feature-panel { padding: 16px; border-radius: var(--radius-lg-l); }
    .share-grid { grid-template-columns: minmax(0, 1fr); }
}

/* --- Log it once: the one-day record ---------------------------------------- */
.record { margin-top: 64px; }
.record-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.record-day { font-size: 17px; font-weight: 600; }
.record-count { font-size: 14px; color: var(--color-ink-muted); }
.record-rail { position: relative; height: 296px; margin-top: 20px; }
.rail-hours { position: absolute; inset: 0 0 auto; height: 16px; font-size: 12px; line-height: 16px; color: var(--color-ink-muted); font-variant-numeric: tabular-nums; }
.rail-hours span { position: absolute; transform: translateX(-50%); }
.rail-hours span:first-child { transform: none; }
.rail-hours span:last-child { transform: translateX(-100%); }
.rail-line { position: absolute; left: 2px; right: 2px; top: 30px; height: 3px; border-radius: 2px; background: var(--color-axis); }
.rail-traveller {
    position: absolute;
    top: 27px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-apricot);
    box-shadow: 0 0 0 6px rgba(238, 122, 76, .18);
    opacity: 0;
    animation: kx-travel 16s linear 1.5s infinite;
}
.record-entries { list-style: none; }
.record-entries li { position: absolute; top: 25px; left: var(--at); width: 200px; }
.entry-dot { display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--color-ink); background: var(--color-paper); }
.entry-dot.is-accent { border: 0; background: var(--color-apricot); box-shadow: 0 0 0 5px var(--color-wave-1); }
.entry-card { margin: 20px 0 0 -12px; padding: 20px 20px 18px; height: 216px; border-radius: var(--radius-md-l); }
.entry-time { font-size: 28px; line-height: 1; letter-spacing: -0.02em; font-weight: 500; font-variant-numeric: tabular-nums; }
.entry-kind { margin-top: 12px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--color-ink-muted); }
.entry-kind.is-accent { color: var(--color-apricot-text); }
.entry-what { margin-top: 4px; font-size: 17px; line-height: 1.4; font-weight: 500; }
.entry-meta { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--color-ink-muted); }
.record figcaption { margin-top: 8px; font-size: 14px; }
/* Below the full width the rail becomes a vertical list (spec 4). */
@media (max-width: 1199px) {
    .record-rail { height: auto; margin-top: 24px; }
    .rail-hours, .rail-line, .rail-traveller { display: none; }
    .record-entries { position: relative; display: grid; gap: 14px; padding-left: 28px; }
    .record-entries::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--color-axis); }
    .record-entries li { position: relative; top: auto; left: auto; width: auto; }
    .entry-dot { position: absolute; left: -28px; top: 22px; }
    .entry-card { margin: 0; height: auto; }
}

/* --- Two ways into one record ----------------------------------------------- */
.ways-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.way { padding: 48px 40px 36px; display: flex; flex-direction: column; }
.way-head { display: flex; align-items: center; gap: 14px; }
.way h3 { font-size: clamp(44px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.04em; font-weight: 500; }
.way-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; animation: kx-breathe 5s ease-in-out infinite; }
.way-dot-dose { background: var(--color-apricot); box-shadow: 0 0 0 6px var(--color-wave-1); }
.way-dot-course { background: var(--color-ink); box-shadow: 0 0 0 6px rgba(36, 54, 90, .1); animation-delay: 2.5s; }
.way-tagline { margin-top: 28px; font-size: clamp(20px, 1.7vw, 24px); line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; }
.way-body { margin-top: 8px; max-width: 440px; font-size: 17px; line-height: 1.6; color: var(--color-ink-muted); }
.way-figure { margin-top: 32px; }
.way-figure figcaption { margin-top: 10px; line-height: 1.4; }
.way-link { margin-top: auto; padding-top: 24px; align-self: flex-start; }
.inset { background: var(--color-surface-soft); border-radius: 22px; padding: 8px; }
.inset + .inset { margin-top: 12px; }
.inset-peach { background: var(--color-peach-panel); padding: 20px 22px; }
.inset-head { padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; font-weight: 600; }
.inset-count { font-size: 13px; font-weight: 400; color: var(--color-ink-muted); }
.day-rows, .questions { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.day-row {
    min-height: 52px;
    padding: 0 14px;
    border-radius: 14px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    font-size: 16px;
}
.day-time { font-size: 15px; font-variant-numeric: tabular-nums; }
.day-row.is-done { color: var(--color-ink-muted); }
.day-row.is-next { min-height: 68px; padding: 0 10px 0 14px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 1px 2px rgba(36, 54, 90, .06), 0 8px 20px -12px rgba(36, 54, 90, .18); font-weight: 600; }
.day-note { display: block; font-size: 13px; font-weight: 400; color: var(--color-ink-muted); }
.day-state { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--color-ink-muted); }
.sample-btn { pointer-events: none; }
.sample-btn:hover { transform: none; }
.tick { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--color-ink); color: var(--color-paper); display: flex; align-items: center; justify-content: center; }
.ring { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--color-ink); }
.question { display: flex; gap: 14px; align-items: flex-start; min-height: 44px; padding: 10px 14px; font-size: 15px; line-height: 1.5; }
.question .tick, .question .ring { margin-top: 1px; }
.question.is-asked { color: var(--color-ink-muted); }
.appt-label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--color-apricot-text); }
.appt-when { margin-top: 8px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.appt-time { font-size: 32px; line-height: 1; letter-spacing: -0.03em; font-weight: 500; font-variant-numeric: tabular-nums; }
.appt-date { font-size: 20px; line-height: 1.3; font-weight: 500; }
.appt-who { margin-top: 10px; font-size: 16px; line-height: 1.5; font-weight: 500; }
.appt-where { font-size: 15px; line-height: 1.5; color: var(--color-ink-muted); }
.disclaimer { margin-top: 36px; max-width: 760px; font-size: 15px; line-height: 1.6; color: var(--color-ink-muted); }
@media (max-width: 899px) { .ways-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) {
    .way { padding: 32px 20px 28px; }
    .day-row { grid-template-columns: 48px minmax(0, 1fr); }
    .day-row > :last-child { grid-column: 2; }
    .day-row.is-next { padding: 10px 14px; }
}

/* --- Placeholder pages (Pricing) -------------------------------------------- */
.placeholder { padding-top: 72px; }
.placeholder .btn-row { margin-top: 32px; }

/* --- The live clock's controls (PR 3) ----------------------------------------
   Hidden until clock.js has the engine data; the [hidden] rule wins over the
   display set here. */
[hidden] { display: none !important; }
.clock-row { display: flex; align-items: center; gap: 14px; }
.clock-row label { flex: none; font-size: 14px; font-weight: 600; }
.clock-row input[type="range"] { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--color-apricot); cursor: pointer; }
.clock-row-split {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--color-rule-face);
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.clock-row + .clock-legend, .clock-row-split + .clock-legend { margin-top: 12px; }
.play-btn {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--color-ink);
    color: var(--color-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.play-btn svg { fill: currentColor; }
.play-btn .icon-pause, .play-btn.is-playing .icon-play { display: none; }
.play-btn.is-playing .icon-pause { display: block; }
.now-short { display: none; }
.med-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.med-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-chip);
    color: var(--color-ink-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .3s, color .3s;
}
.med-chip[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-chip); opacity: .5; }
.med-chip[aria-pressed="true"] .chip-dot { box-shadow: 0 0 0 2px var(--color-ink); opacity: 1; }
.eve { display: flex; align-items: center; gap: 6px; }
.eve-label { margin-right: 4px; font-size: 14px; font-weight: 500; }
.eve-time { min-width: 52px; text-align: center; font-size: 16px; font-weight: 600; }
.round-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--color-chip);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
@media (max-width: 599px) {
    .clock-controls { padding: 16px; }
    /* Hidden from sight, not from the accessibility tree: display:none
       left the slider with no name on a phone (Lighthouse, #1543 PR 8). */
    .clock-row label {
        position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
        overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
    }
    .now-long { display: none; }
    .now-short { display: inline; }
    .clock-row-split { flex-direction: column; align-items: flex-start; }
}

/* The header follows the sky on the home page (spec 4, Nav "on-sky"). The
   Start free pill inverts with it, as drawn: ink on a light sky, light on a
   dark one. Buttons elsewhere keep their own fills. */
.page-home .site-header .btn-ink { background: var(--hero-ink, var(--color-ink)); color: var(--hero-sky, var(--color-paper)); transition: background-color 1.4s ease, color 1.4s ease; }
.page-home .site-header { transition: background-color 1.4s ease, color 1.4s ease; }
.sky-dark .readout-rows .swatch-ink { box-shadow: 0 0 0 1.5px var(--color-on-night); }
/* Only what sits ON the sky: the controls card stays white, so its rings
   stay the apricot text colour. */
.sky-dark .hero-ctas a:focus-visible,
.sky-dark .site-header a:focus-visible,
.sky-dark .site-header summary:focus-visible { outline-color: var(--color-on-night); }
/* The menu sheet is a white card even on a dark sky (#1543 review). */
.sky-dark .site-header .menu-sheet a:focus-visible { outline-color: var(--color-apricot-text); }

/* --- Integrations (/integrations, spec 13) ---------------------------------- */
.int-page { padding-top: 72px; }
.page-h1 { font-size: clamp(44px, 5vw, 72px); }
.int-filters { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.int-grid {
    list-style: none;
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.int-card {
    padding: 20px;
    border-radius: var(--radius-md-l);
    background: var(--color-surface);
    box-shadow: var(--shadow-tile);
    display: grid;
    gap: 12px;
    align-content: start;
}
.int-card.tile-planned { background: var(--color-surface-soft); box-shadow: inset 0 0 0 1px var(--color-rule-soft); }
.int-head { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.int-head .logo-slot { width: 40px; height: 40px; }
.int-name { font-size: 17px; line-height: 1.25; font-weight: 600; }
.status-pill {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: var(--color-chip);
    font-size: 13px;
    font-weight: 500;
}
.status-pill .status-dot { width: 8px; height: 8px; }
.int-brings { font-size: 15px; line-height: 1.5; color: var(--color-ink-muted); }
.int-brings-label { font-weight: 600; color: var(--color-ink); }
.other-ways { margin-top: 20px; }
.logo-contain { object-fit: contain; padding: 3px; }
.logo-slot:not(.logo-contain) { object-fit: cover; }
@media (max-width: 1023px) { .int-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .int-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- Dose and Course (Round 6 artboards, PR 4) ------------------------------ */
.page-hero-r6 { padding-top: 72px; }
.r6-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 48px; align-items: center; }
.page-hero-r6 h1 { font-size: clamp(50px, 5.6vw, 80px); line-height: 1.04; }
.page-hero-r6 .hero-lead { max-width: 520px; font-size: clamp(17px, 1.4vw, 20px); margin-top: 32px; }
.screen { display: block; width: 100%; max-width: 390px; height: auto; border-radius: var(--radius-lg-l); box-shadow: var(--shadow-raised); background: var(--color-surface-soft); }
.screens { position: relative; height: 760px; }
.screens .screen-back { position: absolute; left: 0; top: 60px; width: 312px; opacity: .95; }
.screens .screen-front { position: absolute; right: 0; top: 0; width: 340px; }
.screens figcaption { position: absolute; left: 0; bottom: 0; }
.curve-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 680px); gap: 64px; align-items: center; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 80px; align-items: center; }
.feature.is-image-first .feature-grid { grid-template-columns: 420px minmax(0, 1fr); }
.feature-image .screen { margin-inline: auto; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }
.pair-title { font-size: clamp(32px, 2.8vw, 40px); line-height: 1.1; }
.pair-body { margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--color-ink-muted); }
.pair + .disclaimer { margin-top: 64px; }
.wheel-card { padding: 28px 40px 24px; border-radius: var(--radius-lg-l); }
.wheel-card .inset-head { padding: 0; }
.wheel { margin-top: 8px; display: flex; justify-content: center; }
.cycle-wheel { width: 100%; max-width: 440px; height: auto; }
.wheel-card figcaption { margin-top: 8px; }
.appt-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.appt-grid figcaption { grid-column: 1 / -1; }
.appt-card { padding: 28px; border-radius: var(--radius-lg-l); }
.appt-since { margin-top: 16px; font-size: 14px; color: var(--color-ink-muted); }
.inset-head.flush { padding: 0; }
.questions.ruled { margin-top: 12px; gap: 0; }
.questions.ruled .question { padding: 10px 0; min-height: 0; border-top: 1px solid var(--color-rule-face); }
.team { list-style: none; margin-top: 12px; }
.team li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-rule-face); font-size: 15px; }
.team-name { font-weight: 500; }
.team-role { color: var(--color-ink-muted); text-align: right; }
.steps { list-style: none; margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { padding: 28px; border-radius: var(--radius-lg); background: var(--color-surface); }
.step-n { font-size: 15px; font-weight: 600; color: var(--color-apricot-text); }
.step-title { margin-top: 8px; font-size: 22px; line-height: 1.3; font-weight: 500; }
.step-body { margin-top: 8px; font-size: 16px; line-height: 1.6; color: var(--color-ink-muted); }
.journey { margin-top: 48px; }
.journey-scroll { border-radius: var(--radius-lg-l); box-shadow: var(--shadow-raised); overflow: hidden; }
.journey-img { display: block; width: 100%; height: auto; }
.journey figcaption { margin-top: 12px; }

@media (max-width: 1199px) {
    .curve-grid { grid-template-columns: minmax(0, 1fr); }
    .feature-grid, .feature.is-image-first .feature-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
    .feature.is-image-first .feature-grid { grid-template-columns: 340px minmax(0, 1fr); }
}
@media (max-width: 899px) {
    .r6-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .screens { height: 620px; max-width: 520px; }
    .screens .screen-back { width: 250px; }
    .screens .screen-front { width: 280px; }
    /* Phone (spec Dose 7): each row stacks, the screen under its text, 300px. */
    .feature-grid, .feature.is-image-first .feature-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .feature.is-image-first .feature-image { order: 2; }
    .feature .screen { max-width: 300px; }
    .pair, .appt-grid, .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    /* The journey map scrolls sideways in its labelled region (spec 1). */
    .journey-scroll { overflow-x: auto; }
    .journey-img { width: 768px; max-width: none; }
}
@media (max-width: 599px) {
    .screens { height: 520px; }
    .screens .screen-back { width: 200px; top: 40px; }
    .screens .screen-front { width: 230px; }
    .wheel-card { padding: 20px; }
}

/* Review fixes (PR 4) */
.inset-count { white-space: nowrap; }
.course-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; }
.questions.ruled .question.is-asked { color: var(--color-ink-muted); }
.phone-only { display: none; }
@media (max-width: 899px) {
    .course-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .phone-only { display: inline; }
}

/* --- Carried-over pages --------------------------------------------------
   The Round 2 sheet's rules for the pages whose bodies Round 6 does not
   redesign (yet): Security, Contact, 404, the Docs hub and article, and the
   Dose and Course bodies until PR 4 replaces them. Copied as they were; they
   read the Round 2 token NAMES, which tokens.css points at Tide values, so
   these pages sit in the Round 6 palette without being rewritten.
   Removed from it: fonts, tokens, reset, focus, layout, buttons, lockup,
   header, footer, and the Round 2 home's hero and promises (no page uses
   them any more). Round 6 overrides for these pages are at the end. */

/* --- Type ---------------------------------------------------------------- */
.h2 {
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    text-wrap: balance;
    max-width: 20ch;
}
.h3 {
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.lead {
    font-size: clamp(18px, 1.6vw, 20px);
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 58ch;
}
.section-head { display: grid; gap: var(--s-16); margin-bottom: var(--s-40); }
@media (min-width: 960px) { .section-head { margin-bottom: var(--s-56); } }
.label {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--ink-soft);
}
.mono, .num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.caption {
    margin-top: var(--s-12);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--ink-soft);
}

/* --- Panels and the chart ------------------------------------------------ */
.panel {
    background: var(--paper);
    border: 1px solid var(--line);
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-12);
    flex-wrap: wrap;
    padding: var(--s-16) var(--s-24) 0;
}
.panel-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.panel-meta { font-size: 13px; line-height: 1.4; color: var(--ink-soft); font-weight: 500; }
.panel-body { padding: var(--s-12) var(--s-24) var(--s-24); }
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 var(--s-8);
    border: 1px solid var(--ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
}

.chart { width: 100%; height: auto; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart text {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--ink-soft);
}
.chart .curve-past { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.chart .curve-next { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linejoin: round; }
.chart .curve-area { fill: var(--recessed); stroke: none; }
.chart .curve-2 { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-dasharray: 8 4; }
.chart .curve-3 { fill: none; stroke: var(--ink-faint); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.chart .now-line { stroke: var(--ink); stroke-width: 1.5; }
.chart .now-label { fill: var(--ink); font-weight: 500; }
.chart .dose-mark { fill: var(--ink); }
.chart .event-mark { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }

.chart-key {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-8) var(--s-24);
    margin-top: var(--s-12);
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-soft);
}
.key { display: inline-flex; align-items: center; gap: var(--s-8); }
.key::before { content: ""; width: 20px; height: 0; border-top: 2.5px solid var(--ink); }
.key.is-next::before { border-top: 1.5px dashed var(--ink); }
.key.is-2::before { border-top: 2px dashed var(--ink-soft); }
.key.is-3::before { border-top: 2px dotted var(--ink-faint); }

/* The day's entries under the hero curve. */
.entries { list-style: none; border-top: 1px solid var(--line); margin-top: var(--s-16); }
.entries li {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: var(--s-12);
    padding: var(--s-12) 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.4;
}
.entries li:last-child { border-bottom: 0; padding-bottom: 0; }
.entries .num { color: var(--ink-soft); font-size: 14px; padding-top: 1px; }
.page-carried .entry-what { font-weight: 500; }
.entry-src { font-size: 13px; color: var(--ink-soft); }

/* --- Two ways in: the product halves -------------------------------------
   Full bleed. Dose on paper, Course on ink; on a wide screen the Course half
   sits 64px lower, caught mid-slide. */
.halves { display: grid; }
@media (min-width: 1120px) {
    .halves { grid-template-columns: 1fr 1fr; align-items: start; }
    .half-course { margin-top: 64px; }
}
.half {
    display: flex;
    flex-direction: column;
    gap: var(--s-8);
    padding: 56px var(--s-16);
}
@media (min-width: 720px) { .half { padding: 64px var(--s-40); } }
@media (min-width: 1120px) {
    .half { min-height: 780px; }
    .half-dose { padding: 64px 64px 56px max(var(--s-40), calc((100vw - 1200px) / 2)); }
    .half-course { padding: 64px max(var(--s-40), calc((100vw - 1200px) / 2)) 56px 64px; }
}
.half-dose { background: var(--paper); border-block: 1px solid var(--line); }
.half-course { background: var(--ink); color: var(--bone); }
.half-name {
    font-size: clamp(88px, 12vw, 160px);
    line-height: 0.82;
    letter-spacing: -0.06em;
}
.half-line { margin-top: var(--s-24); font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.half-body { max-width: 46ch; color: var(--ink-soft); }
.half-course .half-body { color: var(--ash); }
.half figure { margin-top: auto; padding-top: var(--s-40); }
.half-course .caption { color: var(--ash); }

/* A compound's record, with a gap shown as a gap. */
.facts { border-top: 1px solid var(--ink); }
.facts div {
    display: flex;
    justify-content: space-between;
    gap: var(--s-16);
    padding: var(--s-12) 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.4;
}
.facts dt { color: var(--ink-soft); }
.facts dd { font-weight: 500; text-align: right; }
.facts .is-gap { font-family: var(--font-body); font-weight: 600; }
.facts-note {
    margin-top: var(--s-16);
    padding: var(--s-12) var(--s-16);
    background: var(--recessed);
    font-size: 15px;
    line-height: 1.5;
}

/* Course's "before your visit" list, on ink. */
.visit { border: 1px solid var(--line-dark); }
.visit-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s-16);
    padding: var(--s-16) var(--s-24);
    border-bottom: 1px solid var(--line-dark);
}
.visit-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.visit-sub, .visit-count { font-size: 14px; line-height: 1.5; color: var(--ash); }
.visit-count { white-space: nowrap; font-size: 13px; font-weight: 500; }
.visit ul { list-style: none; }
.visit li {
    display: flex;
    gap: var(--s-12);
    align-items: flex-start;
    padding: var(--s-12) var(--s-24);
    border-top: 1px solid var(--line-dark);
    font-size: 16px;
    line-height: 1.5;
}
.visit li:first-child { border-top: 0; }
.visit .box {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 1.5px solid var(--bone);
}
.visit .is-done { color: var(--ash); }
.visit .is-done .box { background: var(--bone); position: relative; }
.visit .is-done .box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid var(--ink);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Link rows: docs teaser, related articles, contact addresses ---------- */
.rows { list-style: none; border-top: 1px solid var(--ink); }
.rows > li { border-bottom: 1px solid var(--line); }
.row-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: var(--s-4) var(--s-24);
    align-items: center;
    padding: var(--s-24) 0;
    text-decoration: none;
    min-height: var(--control-h);
}
@media (min-width: 720px) { .row-link { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 24px; } }
.row-title { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.row-desc { color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.row-link svg { width: 20px; height: 20px; color: var(--accent-text); transition: transform 150ms ease-out; grid-row: 1 / span 2; grid-column: 2; }
@media (min-width: 720px) { .row-link svg { grid-row: auto; grid-column: auto; } }
.row-link:hover .row-title { text-decoration: underline; text-underline-offset: 5px; }
.row-link:hover svg { transform: translateX(3px); }

/* Rows that are text, not links (security, contact). */
.row-item {
    display: grid;
    gap: var(--s-8) var(--s-40);
    padding: var(--s-24) 0;
}
@media (min-width: 720px) { .row-item { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
.row-item p { color: var(--ink-soft); max-width: 62ch; }
.row-item a { color: var(--accent-text); text-underline-offset: 3px; }
.row-item a:hover { color: var(--ink); }

/* --- Closing band --------------------------------------------------------- */
.closing { border-top: 1px solid var(--line); }
.closing-inner { display: grid; gap: var(--s-24); justify-items: start; }
.closing .h2 { max-width: 16ch; }

/* --- Product and utility pages ------------------------------------------- */
.page-hero { padding-block: var(--s-56) 72px; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .page-hero { padding-block: 96px 112px; } }
.page-hero-grid { display: grid; gap: var(--s-40); align-items: start; }
@media (min-width: 1120px) { .page-hero-grid.has-figure { grid-template-columns: minmax(0, 1fr) 520px; gap: 64px; } }
.page-title {
    font-size: clamp(44px, 7vw, 88px);
    line-height: 1;
    letter-spacing: -0.045em;
    max-width: 14ch;
    text-wrap: balance;
}
.page-title.is-small { font-size: clamp(40px, 5.6vw, 72px); max-width: 16ch; }
.page-hero .lead { margin-top: var(--s-24); }
.page-hero .btn-group { margin-top: var(--s-32); }
.page-kicker { margin-bottom: var(--s-16); }
.page-hero .lead a { color: var(--accent-text); text-underline-offset: 3px; }

/* A grouped two-column list: the group label on the left, entries right. */
.groups { display: grid; gap: var(--s-40); }
@media (min-width: 960px) { .groups { grid-template-columns: 1fr 1fr; gap: 64px; } }
.group-label { padding-bottom: var(--s-12); border-bottom: 2px solid var(--ink); }
.group dl > div { padding: var(--s-24) 0; border-bottom: 1px solid var(--line); display: grid; gap: var(--s-8); }
.group dt { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.group dd { color: var(--ink-soft); max-width: 52ch; }

/* The catalogue figure. */
.stat-band { display: grid; gap: var(--s-24) 64px; align-items: end; }
@media (min-width: 960px) { .stat-band { grid-template-columns: auto minmax(0, 1fr); } }
.stat {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: clamp(64px, 10vw, 128px);
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-weight: 500;
}
.stat-text { font-size: clamp(20px, 2vw, 26px); line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; max-width: 34ch; }
.stat-text span { color: var(--ink-soft); }

/* The one-record band: a real timeline row style. */
.timeline { list-style: none; border-top: 1px solid var(--ink); }
.timeline li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: var(--s-4) var(--s-16);
    padding: var(--s-16) 0;
    border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .timeline li { grid-template-columns: 88px minmax(0, 1fr) 160px; align-items: baseline; } }
.timeline .num { color: var(--ink-soft); }
.timeline .tl-what { font-weight: 500; }
.timeline .tl-from { display: block; font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.timeline .tl-src { grid-column: 2; font-size: 14px; color: var(--ink-soft); }
@media (min-width: 720px) { .timeline .tl-src { grid-column: 3; text-align: right; } }
/* Scoped to the carried pages: unscoped, it overrode Home's .split-* grids. */
.page-carried .split { display: grid; gap: var(--s-40); }
@media (min-width: 960px) { .page-carried .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; } }

/* A statement that must not be missed: the recessed wash, full width. */
.notice {
    background: var(--recessed);
    padding: var(--s-32) var(--s-24);
    display: grid;
    gap: var(--s-16);
}
@media (min-width: 720px) { .notice { padding: var(--s-56) 64px; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-40); } }
.notice h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.025em; }
.notice p { font-size: 18px; line-height: 1.55; max-width: 60ch; }
.notice p + p { margin-top: var(--s-12); }
.notice-cell { display: grid; gap: var(--s-12); align-content: start; }
.notice .arrow-link { color: var(--ink); }

/* Course's overview slice. */
.overview { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ov-card { background: var(--paper); padding: var(--s-16) var(--s-24); display: grid; gap: var(--s-8); }
.ov-label { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-soft); }
.ov-appt { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-16); align-items: start; }
.ov-date { border: 1px solid var(--ink); text-align: center; padding: var(--s-8) 0; line-height: 1.1; }
.ov-date .num { display: block; font-size: 28px; font-weight: 500; }
.ov-date span { font-size: 13px; }
.ov-when { font-weight: 600; }
.ov-list { list-style: none; }
.ov-list li { padding: var(--s-8) 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.ov-list li:first-child { border-top: 0; }
.scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2px; }
.scale span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-soft);
}
.scale-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); }

/* --- Docs ------------------------------------------------------------------ */
.docs { display: grid; gap: var(--s-40); padding-block: var(--s-40) 96px; }
@media (min-width: 960px) { .docs { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-top: var(--s-56); } }
@media (min-width: 1200px) { .docs.has-toc { grid-template-columns: 220px minmax(0, 1fr) 200px; } }
.docs-nav { font-size: 15px; }
.docs-nav-label { font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--ink-soft); margin-top: var(--s-24); }
.docs-nav-label:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin-top: var(--s-4); }
.docs-nav a {
    display: flex;
    align-items: center;
    min-height: var(--control-h);
    padding-left: var(--s-12);
    border-left: 2px solid var(--line);
    text-decoration: none;
    line-height: 1.3;
}
.docs-nav a:hover { border-left-color: var(--ink-soft); }
.docs-nav a[aria-current="page"] { border-left-color: var(--ink); font-weight: 600; }
@media (min-width: 960px) { .docs-nav-inner { position: sticky; top: var(--s-24); } }
/* On a phone the article comes first; the docs nav follows it. */
@media (max-width: 959px) { .docs-nav { order: 2; border-top: 1px solid var(--line); padding-top: var(--s-24); } }

.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-8); font-size: 14px; color: var(--ink-soft); list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-8); color: var(--line-strong); }
.crumbs a { color: var(--accent-text); text-underline-offset: 3px; display: inline-flex; min-height: var(--control-h); align-items: center; }
.crumbs li { display: inline-flex; align-items: center; }
.docs-title { font-size: clamp(38px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.035em; max-width: 18ch; text-wrap: balance; }
.docs-updated { margin-top: var(--s-16); }
.docs-lead { margin-top: var(--s-16); }

.prose { max-width: 66ch; }
.prose h2 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-top: var(--s-56);
    padding-top: var(--s-16);
    border-top: 2px solid var(--ink);
    scroll-margin-top: var(--s-24);
}
.prose h3 { font-size: 19px; line-height: 1.35; margin-top: var(--s-24); }
.prose p { margin-top: var(--s-16); }
.prose ul { margin-top: var(--s-16); padding-left: 1.2em; }
.prose li + li { margin-top: var(--s-8); }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--recessed); padding: 0 4px; }
.prose dl { margin-top: var(--s-16); border-top: 1px solid var(--line); }
.prose dl > div { padding: var(--s-16) 0; border-bottom: 1px solid var(--line); }
.prose dt { font-weight: 600; }
.prose dd { margin-top: var(--s-4); color: var(--ink-soft); }
.prose figure { margin-top: var(--s-32); }
.prose .panel { max-width: 640px; }

.toc { font-size: 14px; }
.toc h2 { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.toc ul { list-style: none; margin-top: var(--s-8); border-left: 1px solid var(--line); }
.toc a { display: flex; align-items: center; min-height: var(--control-h); padding-left: var(--s-12); text-decoration: none; color: var(--ink-soft); line-height: 1.3; }
.toc a:hover { color: var(--ink); }
@media (max-width: 1199px) { .toc { display: none; } }
@media (min-width: 1200px) { .toc-inner { position: sticky; top: var(--s-24); } }

.docs-group + .docs-group { margin-top: var(--s-56); }
.docs-group h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: var(--s-16); }
.pager { display: flex; justify-content: space-between; gap: var(--s-16); margin-top: var(--s-56); padding-top: var(--s-24); border-top: 1px solid var(--line); flex-wrap: wrap; }

}
.section.is-flush-bottom { padding-bottom: 0; }
.tl-date { margin-bottom: var(--s-12); }
.after-groups { margin-top: var(--s-32); }
.cat-split { margin-top: var(--s-56); align-items: start; }
.stack-top-lg { margin-top: var(--s-40); }
/* A caption under a panel's body, still inside the panel. */
.panel > .panel-cap { margin: 0; padding: 0 var(--s-24) var(--s-24); }
/* Chart labels stay readable when the chart is scaled down on a phone. */
@media (max-width: 719px) { .chart text { font-size: 16px; } }

/* --- Round 6 overrides for the carried-over pages ----------------------------
   Their markup is unchanged; these put its buttons, panels and spacing on the
   Tide rules (pills, radius by hierarchy, the Round 6 section rhythm). */
.page-carried .section { padding-bottom: 32px; }
.page-carried main { padding-bottom: 96px; }
.btn-primary, .btn-primary:hover { background: var(--color-apricot); color: var(--color-on-apricot); min-height: 52px; }
.btn-secondary, .btn-secondary:hover { background: var(--color-surface); color: var(--color-ink); font-weight: 500; min-height: 52px; }
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }
.page-carried .panel,
.page-carried .overview,
.page-carried .notice {
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.page-carried .panel { box-shadow: var(--shadow-card); border: 0; }
.page-carried .closing { border-top: 0; }
.page-carried .rows .row-link,
.page-carried .rows .row-item { border-radius: var(--radius-md); }

/* Generated by build.mjs from site.json home.how: the one-day rail. */
.rail-hours .at-0 { left: 0.00%; }
.rail-hours .at-1 { left: 16.67%; }
.rail-hours .at-2 { left: 33.33%; }
.rail-hours .at-3 { left: 50.00%; }
.rail-hours .at-4 { left: 66.67%; }
.rail-hours .at-5 { left: 83.33%; }
.rail-hours .at-6 { left: 100.00%; }
.record-entries .at-0 { --at: 0.00%; }
.record-entries .at-1 { --at: 20.83%; }
.record-entries .at-2 { --at: 50.00%; }
.record-entries .at-3 { --at: 68.75%; }
