/* Endor web app (new). Every colour, font, space and radius is a token here,
   so a theme can swap them without touching the rules below. */

/* Tiril's handwriting, for her short lines only (--font-hand). */
/* Endor Hand, the brand's handwritten face for short quotes and personal
   notes: its Pen Stroke, the thin one (the brand system's
   fonts/endor-hand). It has the letters, figures, æ, ø and å, the straight
   marks and the opening “; a mark it lacks (”, « », ’, a dash) comes from
   the body face, --font-hand's fallback. */
@font-face {
  font-family: "Endor Hand";
  src: url("fonts/endor-hand-pen.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Brand book palette (Endor Brand book 2025, Visual Brand Identity › Color) */
  --brand-black: #000000;
  --brand-white: #ffffff;
  --brand-endor-white: #f7f5ef;
  --brand-light-sand: #f5ede2;
  --brand-deep-earth: #2c2620;
  --brand-forest-green: #142e24;
  --brand-forest-green-2: #426a5c;
  --brand-sun-yellow: #ffc37f;
  --brand-sun-yellow-soft: #f9d59b;
  --brand-butter: #fdecc8;
  --brand-blue: #3e6e95;
  --brand-blush: #fec5c6;
  --brand-sage-light: #d1e2c5;
  --brand-sky-light: #c3def4;
  /* The 2026 supporting colours (Brand book, Color; Foundations
     color/supporting/*). */
  --brand-clay: #bd9173;
  --brand-dune: #ded2bf;
  --brand-sage: #859f76;

  /* Colour roles. Text is the brand's black; greys are that black at an
     opacity (the book has no grey). */
  --color-bg: var(--brand-white);
  --color-surface: var(--brand-white);
  --color-surface-muted: var(--brand-endor-white);
  --color-surface-warm: var(--brand-endor-white);
  --color-surface-dark: var(--brand-deep-earth);
  --color-feature-dark: var(--brand-forest-green);
  --color-line: rgba(0, 0, 0, 0.12);
  --color-row-divider: rgba(0, 0, 0, 0.07);
  --color-line-strong: rgba(0, 0, 0, 0.2);
  --color-text: var(--brand-black);
  /* Two inks, two roles: words, badges and focus rings are black
     (--color-text); filled controls (the main pill, a pressed filter, a
     chosen choice pill) are deep earth (--color-action), its hover a step
     lighter. */
  --color-action: var(--brand-deep-earth);
  --color-action-hover: #3b3430;
  /* The mobile app's feeling tints (symptoms-config), Discover's feeling tiles. */
  --color-feel-pain: rgba(191, 170, 137, 0.3);
  --color-feel-unease: rgba(154, 191, 137, 0.3);
  --color-feel-stress: rgba(191, 137, 137, 0.3);
  --color-feel-fatigue: rgba(137, 172, 191, 0.3);
  --color-text-secondary: rgba(0, 0, 0, 0.78);
  --color-text-muted: rgba(0, 0, 0, 0.6);
  --color-text-subtle: rgba(0, 0, 0, 0.56);
  /* Tiril's side-menu line: words and wave, kept light */
  --color-hand-note: rgba(0, 0, 0, 0.24);
  --opacity-hand-line: 0.2;
  /* The page foot, shared by the footer and the side menu's line so they
     line up when the footer is at the window's bottom: the same padding and
     line height, and the wave centred on the footer's divider. */
  --foot-pad: 22px;
  --foot-line: 18px;
  --hand-wave-height: 14px;
  /* The side menu's active item and hover: a neutral grey */
  --color-nav-active: rgba(0, 0, 0, 0.05);
  --color-nav-hover: rgba(0, 0, 0, 0.035);
  --color-stats-hover: rgba(0, 0, 0, 0.05);
  /* The avatar: a cool light grey with a fine line */
  --color-avatar-bg: #e3e3e6;
  --color-avatar-text: #3f3f44;
  --color-avatar-line: #d7d7dc;
  --color-button-tonal: rgba(0, 0, 0, 0.06);
  --color-button-tonal-hover: rgba(0, 0, 0, 0.1);
  --color-text-on-dark: var(--brand-white);

  /* The wearable banner: a cool light grey and its line. */
  --color-notice-bg: #f7f7f9;
  --color-notice-line: #dddde4;
  /* System colors for form states and notices, from the Endor Assets
     Library's COLORS > System (not used yet). On white only error is dark
     enough for small text (8.5:1); information (1.9:1), success (2.3:1) and
     warning (4.4:1) go on icons, lines and fills, with the words in text
     color beside them. */
  --color-info: #4bccff;
  /* Success (a confirmation: Saved, Kept): Endor's forest green 2, green
     at a glance and 6.1:1 on white. */
  --color-success: var(--brand-forest-green-2);
  --color-warning: #d64901;
  --color-error: #971a20;
  --color-text-on-dark-muted: rgba(255, 255, 255, 0.82);
  --color-text-on-dark-subtle: rgba(255, 255, 255, 0.64);
  --color-focus: var(--brand-black);
  --color-scrim: rgba(0, 0, 0, 0.4);
  /* A neutral light grey: the book has no grey (flagged) */
  --color-neutral-grey: #f7f7f8;
  --color-topbar: var(--color-neutral-grey);
  --color-search-bg: rgba(0, 0, 0, 0.04);
  --color-search-line: rgba(0, 0, 0, 0.07);
  --color-search-focus: var(--brand-black);
  --color-logo: var(--brand-black);
  /* Light points, streak, level and worlds: the app's gold (sun-yellow-3 and -2) */
  --color-progress: var(--brand-sun-yellow);
  --color-progress-soft: var(--brand-sun-yellow-soft);
  --color-progress-text: var(--brand-deep-earth);
  --color-progress-strong: #b8792c;
  --color-placeholder: var(--brand-deep-earth);
  --color-placeholder-bg: var(--brand-butter);
  /* The wearable card's colours: cool greys the book doesn't have (flagged) */
  --color-wearable-bg: #f7f7f9;
  --color-wearable-line: #dddde4;
  --color-wearable-title: #26262c;
  --color-wearable-text: #4d4d58;
  --color-wearable-purpose: #64646d;

  /* Type. Display is the brand's Space Grotesk; body text stays Inter, as in
     the app (the book sets body in Space Grotesk; flagged). */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-hand: "Endor Hand", var(--font-sans);
  --text-hand: 15px;
  /* The Endor square between meta parts, sized by the words beside it (4px
     at 14px text). */
  --meta-square: max(3px, 0.29em);
  --label-inset: 8px;
  /* Light points: thin and clean, never a heavy figure. */
  --light-font: var(--font-sans);
  --light-weight: 300;
  --light-weight-large: 200;
  /* Text set over a picture keeps one distance from its left and bottom
     edges: tiles, and larger cards. */
  --picture-text-inset: 14px;
  --picture-text-inset-large: 20px;
  /* A picture's label ("Session", "Course"): small enough to stay a label
     beside the 28px controls. */
  --label-height: 22px;
  /* Overlays in a picture's corner (a label, the heart, the arrow) are
     concentric with it: the picture's radius minus their inset, 14 - 8 = 6. */
  --radius-overlay: calc(var(--radius) - var(--label-inset));
  /* Controls over a picture (the arrow, the heart): one square, at the
     badges' inset and with their radius, so every overlay sits concentric in
     the picture's corner, 28px on every card (the heart's hit area is 44px,
     invisible); the inset and radius never change. */
  --overlay-inset: var(--label-inset);
  --overlay-size: 28px;
  --overlay-icon: 14px;
  --overlay-size-large: 28px;
  --overlay-icon-large: 14px;
  /* Corners follow the Endor Design System:
     every surface 14px (--radius), anything nested inside one 12px, search
     fields, filters and the check-in a full pill. Buttons follow the app and
     the app: every action button is a pill (--radius-pill), every icon
     button a circle, and a choice control (a settings choice, a time slot)
     takes the nested radius. The one exception is the labels laid over a
     picture (--radius-overlay). */
  --radius-cta: var(--radius-pill);
  --radius-dot: 2px;
  --radius-legend-square: 4px;
  --radius-input: var(--radius-nested);
  --radius-input-nested: var(--radius-nested);
  --radius-search: var(--radius-pill);
  /* Expert-name links, the same everywhere */
  --expert-link-thickness: 1px;
  --expert-link-offset: 3px;
  --expert-link-line: rgba(0, 0, 0, 0.25);
  --expert-link-line-hover: currentColor;
  --expert-link-line-on-dark: rgba(255, 255, 255, 0.45);
  /* Space from a card's experts (or text) down to its chips and meta */
  --card-footer-gap: var(--space-3);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --text-xs: 12px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 24px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 43px;
  --text-feature: 56px;
  --leading-micro: 15px;
  --leading-small: 20px;
  --leading-body: 20px;
  --leading-normal: 1.5;
  --leading-h2: 32px;
  --leading-h1: 1.05;
  --leading-tight: 1.05;
  /* Caps labels: every eyebrow and the side menu's group titles, one size
     (our 11px floor) with 1.7px tracking. */
  /* Titles grow with the window between a floor and a ceiling; below 720px they are fixed (see there). */
  --title-page: clamp(34px, 1.25vw + 25px, 48px);
  --title-home: var(--title-page);
  --title-feature: clamp(40px, 2vw + 27px, 60px);
  --title-card: clamp(26px, 0.6vw + 22px, 32px);
  --title-section: clamp(20px, 0.35vw + 19px, 24px);
  /* A news card's title, and the lighter title of a box beside cards (an
     invitation or a closing note), which must not read as one of them. */
  /* A story card's title (Newsroom, Home's news): 18px, 21px from the
     desktop width up (the media query after :root). */
  --title-story: 18px;
  --title-box: clamp(20px, 0.4vw + 17px, 24px);
  --title-box-weight: var(--weight-regular);
  --text-caps: 11px;
  /* Chips: one size on every card, never under the 11px floor. */
  --chip-text: 11px;
  --chip-height: 20px;
  --chip-pad: 7px;
  --chip-radius: 6px;
  /* A control's height: fields, dropdowns, option fields, pills (44px). */
  --control-height: 44px;
  /* The scrollbar of every scrolling panel: thin, no track, ink at a low
     opacity, a little darker on hover. */
  --scrollbar-size: 6px;
  --scrollbar-thumb: color-mix(in srgb, var(--color-text) 20%, transparent);
  --scrollbar-thumb-hover: color-mix(in srgb, var(--color-text) 36%, transparent);
  /* The smallest reading text: a secondary line under a name. */
  --text-2xs: 11px;
  --text-wearable-heading: 21px;
  --text-game-title: 15px;
  --tracking-caps: 1.7px;
  --leading-caps: 15px;
  --tracking-display: -0.042em;

  /* Space (the book has no spacing scale: ours, flagged) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  /* Between Home's opening blocks (welcome, wearable, featured), then between
     every section after them: 28 and 43-44. */
  /* The page intro (eyebrow, heading, subtitle): the same space above it (from
     the top bar) and below it (to the content), and tight gaps inside so the
     three lines read as one group. */
  --page-intro-space: 48px;
  --page-intro-eyebrow-gap: var(--space-3);
  --page-intro-lede-gap: var(--space-3);
  /* The longest line a subtitle-like text runs to */
  --measure-subtitle: 640px;
  --opening-gap: 28px;
  /* The wearable card's icon sits on its title's line, so it is smaller
     than the game tiles' (which lead their card); same circle, same weight. */
  --wearable-icon-size: 32px;
  --checkin-width: 520px;
  --checkin-band-height: 64px;
  /* Home's "How are you today?", the page's one primary action: the
     tallest control on the page, at body size, with its halo doing the
     rest. */
  --checkin-pill-height: 52px;
  /* The 2.0 check-in's colors (Check-in Card in the 2.0 design system):
     peach, yellow and green; the near-white end the dark app fades to is
     left out, since it disappears on a light surface. */
  /* Over time's charts: four tones of the brand's deep earth, lightest to
     darkest (sleep stages, stress zones). */
  --chart-ink-1: color-mix(in srgb, var(--brand-deep-earth) 16%, var(--brand-white));
  --chart-ink-2: color-mix(in srgb, var(--brand-deep-earth) 40%, var(--brand-white));
  --chart-ink-3: color-mix(in srgb, var(--brand-deep-earth) 68%, var(--brand-white));
  --chart-ink-4: var(--brand-deep-earth);
  /* The app's average line is its sun yellow (tone 3); a chosen bar's
     figures take its warm fire darkened to text contrast (4.58:1). */
  --chart-average: var(--chart-tone-3);
  --chart-accent: color-mix(in srgb, var(--chart-warm-fire) 70%, var(--brand-deep-earth));
  --chart-track: color-mix(in srgb, var(--brand-deep-earth) 7%, var(--brand-white));
  /* The mobile app's own chart colours that the Brand book 2026 lacks
     (style/base.cljs :warm-fire, :earth-grey-2). */
  --chart-warm-fire: #ee763a;
  --chart-earth-grey-2: #dbd2c6;
  /* The app's chart colours exactly, in its order (insights.cljs
     `phase-color`, `stress-color`): light sand, butter yellow, sun yellow,
     warm fire. The two palest carry a hairline inside the shape in a shade
     of their own colour only just darker than the fill (the `-line`
     tokens, below): butter yellow everywhere (1.17:1 on white), light sand
     only on the grey track (1.02:1 there; on white it weighs about as much
     as the empty track and has none). Sun yellow and warm fire carry none.
     Stand-ins until the Foundations file's chart palette, which replaces
     them here. */
  --chart-tone-1: var(--brand-light-sand);
  --chart-tone-2: var(--brand-butter);
  --chart-tone-3: var(--brand-sun-yellow);
  --chart-tone-4: var(--chart-warm-fire);
  /* The pale tones' hairline: 8% deep earth in the fill (1.16:1 on its
     fill, 1.18:1 on the grey track), 1px at every density (at half a
     pixel light sand vanishes). Butter yellow carries it everywhere; light
     sand only on the grey track (a night's row, a stacked or plain bar, the
     stage bar) and in those charts' legends, where alone it is 1.02:1. */
  --chart-tone-1-line: color-mix(in srgb, var(--chart-tone-1) 92%, var(--brand-deep-earth));
  --chart-tone-2-line: color-mix(in srgb, var(--chart-tone-2) 92%, var(--brand-deep-earth));
  /* A night without phases: the app's earth grey, pale too, so with its
     own hairline (1.72:1, as the fill is already 1.5:1). */
  --chart-asleep: var(--chart-earth-grey-2);
  --chart-asleep-line: color-mix(in srgb, var(--chart-asleep) 92%, var(--brand-deep-earth));
  /* Activity behind stress: the app's plain grey, a Foundations neutral
     (3.36:1). */
  --chart-activity: color-mix(in srgb, var(--brand-black) 45%, var(--brand-white));
  /* The mobile app 2.0's five check-in colours, Demanding to Enlightened
     (twin/core.cljs light-colors): the slider's track at quarters, and an
     answer's colour by its step wherever it is shown. Their one source:
     personal.clj `answer-colors` and app.js `checkinColor` point here. */
  --color-ci-0: #e6a38e;
  --color-ci-1: #dfc982;
  --color-ci-2: #cbcf97;
  --color-ci-3: #b6d5ac;
  --color-ci-4: #fff9e9;
  --color-ci-invite: rgba(0, 0, 0, 0.14);
  --gradient-ci-track: linear-gradient(90deg, var(--color-ci-0) 0%, var(--color-ci-1) 25%, var(--color-ci-2) 50%, var(--color-ci-3) 75%, var(--color-ci-4) 100%);
  --checkin-max-height: 820px;
  --checkin-radar-size: 360px;
  /* Card padding, equal on every side, in three sizes: feature cards
     (Featured, the sleep course), cards (the worlds corner, the studio
     band) and tiles (the wearable card, the Guide and Twin tiles). */
  --pad-feature: var(--space-10);
  --pad-card: 28px;
  --tile-pad: var(--space-6);
  --tile-gap: 21px;
  /* Human coaching: an airy head, then the coaches */
  /* Game tiles: the icon is half its circle, at every size */
  --game-icon-circle: 56px;
  --game-icon-size: calc(var(--game-icon-circle) / 2);
  --coach-gap: var(--card-gap);
  --text-coach-name: var(--text-lg);
  --leading-coach-name: 1.15;
  --text-coach-button: var(--text-base);
  --coach-button-gap: var(--space-2);
  --coach-photo-space: 28px;
  --coach-line-space: var(--space-1);
  --coach-intro-space: var(--space-4);
  --coach-meet-space: var(--space-4);
  --coach-button-space: 36px;
  /* The page head (258) and a card's text and button (228, 250 when the
     intro wraps) above and below the portrait, with a little room, so a
     whole card fits the window. */
  --expert-photo-width: 300px;
  --coach-photo-max: clamp(360px, 100svh - 530px, 560px);
  /* Two coaches' cards stop here, a little under the narrowest original's
     width at the capped height (Tamina's and Laura's are about square), so
     a portrait never runs out of photo. */
  --coach-card-max: calc(var(--coach-photo-max) * 0.95);
  --coach-solo-gap: var(--space-12);
  /* The subtitle under the sleep card's large heading on Home */
  --text-subtitle-large: var(--text-md);
  /* A larger card's description (Home's featured card, the coach intros) */
  --text-card-description: var(--text-base);
  --leading-card-description: var(--leading-body);
  --section-gap: 44px;
  /* The one space between cards on every page, across and down alike. */
  --card-gap: var(--space-6);
  /* Down a grid of cards, more than across: a card ends in small text (its
     meta, its labels), and at the across gap it reads as touching the
     picture of the card under it. */
  --card-row-gap: 36px;

  /* Radius: nested elements take the outer radius minus the inset between them */
  --radius: 14px;
  --radius-round: 999px;
  --radius-pill: var(--radius-round);
  --inset-tight: 4px;
  --inset: 8px;
  --radius-nested: 12px;
  --radius-nested-tight: 10px;

  /* Layout */
  --topbar-height: 58px;
  --topbar-gap: 28px;
  --topbar-pad-end: 24px;
  --avatar-topbar: 32px;
  --sidebar-width: 240px;
  /* The page grows with the window up to 1670px (padding
     included), with its 38px gutter, 48px from 1450px windows up. The top
     menu's alignment is built from these, so it follows. */
  --content-max: 1670px;
  --gutter: 38px;
  --nav-padding: 17px;
  --nav-item-height: 48px;
  --nav-item-gap: 6px;
  --nav-item-pad-y: 13px;
  --nav-item-pad-x: 14px;
  --nav-icon-gap: 14px;
  --nav-font-size: 13px;
  --nav-font-weight: 450;
  --nav-font-weight-active: 500;
  --nav-group-gap: 36px;
  --nav-group-title-gap: 12px;

  /* Logo: its size. The lockup's clear space is one symbol width
     (31.8px at 31px tall), kept beside the logo; above and below, the 58px
     bar's edges sit inside it (13.5px), a deviation logged in the report. The
     symbol's alone is two of its squares (38.75% of its width). */
  --logo-height: 31px;
  --logo-clear-space: 32px;
  --logo-symbol-clear-space: 9px;

  /* Icons, one size per context */
  --icon-nav: 18px;
  --icon-inline: 16px;

  /* Motion: calm and short. Hover and focus, opening a list, the fade
     between pages, and the stats counting to a new value. Every one stops
     under prefers-reduced-motion. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-hover: 180ms;
  --duration-expand: 320ms;
  --duration-page: 200ms;
  --duration-count: 700ms;
  /* One calm breath (6 a minute), for light that breathes: My Twin's figure. */
  --duration-breath: 10s;
  --duration: var(--duration-hover);

  /* Theme-ready roles for what used to be written in place (DEV-2013). In a
     dark theme the ones on pictures, the QR code and the art fallbacks stay
     as they are; the rest get their dark values here. */
  --color-hover: rgba(0, 0, 0, 0.05);
  --color-on-dark-action: var(--brand-white);
  --color-on-dark-action-hover: var(--brand-endor-white);
  --color-checkin: rgba(255, 255, 255, 0.93);
  --color-hand-line: #1f1e1c;
  --color-on-picture: rgba(255, 255, 255, 0.94);
  --color-on-picture-solid: var(--brand-white);
  --color-text-on-image: var(--brand-white);
  --color-qr-bg: var(--brand-white);
  --color-twin-stage: radial-gradient(ellipse at 50% 42%, #ffffff 0%, #f4f6f8 55%, #eceff3 100%);
  --twin-ink: #5c8fbf;
  --twin-gold: #eeb466;
  --color-art-fallback-2: var(--brand-deep-earth);
  --color-art-fallback-3: var(--brand-blue);
  --gradient-checkin-halo: conic-gradient(from 40deg, var(--brand-blush), var(--brand-butter), var(--brand-sage-light), var(--brand-sky-light), var(--brand-blush));
  --shadow-overlay: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.06);
  --scrim-feature: linear-gradient(90deg, rgba(20, 46, 36, 0.92) 0%, rgba(20, 46, 36, 0.7) 45%, rgba(20, 46, 36, 0) 80%);
  --scrim-picture: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.6) 100%);
  --scrim-picture-foot: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* Jumps to a place on the same page glide there; with reduced motion they
   jump at once (the default). The target stops below the sticky top bar. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

[id] {
  scroll-margin-top: calc(var(--topbar-height) + var(--space-6));
}

/* A jump's target takes focus so the keyboard carries on from there; it is
   not a control, so it draws no focus ring. */
[data-jump-target]:focus {
  outline: none;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

/* Icons and their words, one rule: an icon inside running text sits on the
   middle of the letters (lowered from the baseline by the space under the
   x-height), and in a row of icon and words the row centres them. With no
   weight (:where), any component that places its icon itself still wins. */
:where(svg[aria-hidden="true"]) {
  flex-shrink: 0;
  vertical-align: -0.15em;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 100;
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-2);
}

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

/* ---------- Top bar ---------- */

/* The logo zone is exactly as wide as the side menu, and the menu's divider
   runs up through the bar beside it. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: var(--topbar-gap);
  padding: 0 var(--topbar-pad-end) 0 0;
  background: var(--color-topbar);
  border-bottom: 1px solid var(--color-line);
}

.topbar .topbar__menu-button {
  display: none;
}

/* Clear space: 32px on the left, one symbol width; the 58px bar leaves
   (58 - 31) / 2 = 13.5px above and below, inside the book's 31.8px (logged). */
.topbar__logo {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex-shrink: 0;
  width: var(--sidebar-width);
  padding-left: var(--logo-clear-space);
  color: var(--color-logo);
}

.topbar__logo svg {
  display: block;
  fill: var(--color-logo);
}

.topbar .logo-symbol {
  display: none;
}

.endor-mark {
  fill: var(--color-logo);
  flex-shrink: 0;
}

/* The top menu starts where the page's headings start. The main column is
   the window minus the side menu, centered at up to --content-max, with the
   gutter inside it; the bar's gap after the logo zone is taken back off.
   100% is the bar's content width, so its end padding is added back. */
.topbar__nav {
  display: flex;
  align-self: stretch;
  flex-shrink: 0;
  gap: 28px;
  margin-left: calc(
    max(0px, (100% + var(--topbar-pad-end) - var(--sidebar-width) - var(--content-max)) / 2) + var(--gutter) -
      var(--topbar-gap)
  );
}

.topbar__nav a {
  display: flex;
  align-items: center;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
}

.topbar__nav a:hover {
  color: var(--color-text);
}

.topbar__nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* The search stays after the top menu and shrinks before anything moves. */
.topbar__search {
  flex: 0 1 440px;
  min-width: 160px;
  position: relative;
}

.topbar__search input {
  width: 100%;
  height: 35px;
  padding: 0 var(--space-3) 0 36px;
  border: 1px solid var(--color-search-line);
  border-radius: var(--radius-search);
  background: var(--color-search-bg);
  font-size: var(--text-base);
}

.topbar__search input:focus {
  outline: none;
  border-color: var(--color-search-focus);
}

.topbar__search > svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-subtle);
}

.topbar .topbar__search-link {
  display: none;
}

.topbar__right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--space-3);
  margin-left: auto;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--color-hover);
}

.icon-button__dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-round);
  background: var(--color-progress);
}

/* The account area, as on Roblox: the avatar and name, the stats pill, the
   bell and the gear, each its own item. */

/* The stats: the four numbers directly on the bar, one link to progress. A
   subtle background shows only on hover and keyboard focus. */
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  white-space: nowrap;
  transition: background-color var(--duration-hover) var(--ease-out);
}

.profile-pill svg {
  color: var(--color-progress);
}

.profile-pill:hover,
.profile-pill:focus-visible {
  background: var(--color-stats-hover);
}

/* The avatar and name: no box behind them. On hover a ring follows the
   avatar's circle and the name darkens. */
.account-person {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-round);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.account-person .avatar {
  width: var(--avatar-topbar);
  height: var(--avatar-topbar);
  font-size: var(--text-base);
  color: var(--color-avatar-text);
  transition: box-shadow var(--duration) var(--ease-out);
}

summary.account-person {
  cursor: pointer;
}

.account-menu[open] .account-person {
  color: var(--color-text);
}

.account-menu[open] .account-person .avatar {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 3px var(--color-text);
}

.account-person:hover {
  color: var(--color-text);
}

.account-person:hover .avatar {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 3px var(--color-line-strong);
}

.account-person:focus-visible {
  outline: none;
}

.account-person:focus-visible .avatar {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-focus);
}

.progress-pill__part {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-avatar-line);
  background: var(--color-avatar-bg);
  color: var(--color-avatar-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar--large {
  width: 64px;
  height: 64px;
  font-size: var(--text-lg);
}

/* Settings and notifications menus */

.menu {
  position: relative;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  min-width: 240px;
  padding: var(--inset);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-overlay);
  z-index: 50;
  animation: menu-in var(--duration) var(--ease-out);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.menu__panel a,
.menu__panel button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-nested);
  background: transparent;
  text-align: left;
  font-size: var(--text-base);
  cursor: pointer;
}

.menu__panel a:hover,
.menu__panel button:hover {
  background: var(--color-surface-muted);
}

/* The account menu opens with who is signed in. */
.menu__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  min-width: 0;
}

.menu__who-name {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.menu__who-email {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.menu__divider {
  height: 1px;
  margin: var(--space-2) 0;
  background: var(--color-line);
}

/* ---------- Shell ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--nav-padding) var(--foot-pad);
  border-right: 1px solid var(--color-line);
  background: var(--color-bg);
}

.sidebar__top-nav {
  display: none;
}

.sidebar__group,
.sidebar__home,
.sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--nav-item-gap);
}

.sidebar__group-title {
  padding: var(--nav-group-gap) 14px var(--nav-group-title-gap);
  font-size: var(--text-caps);
  line-height: var(--leading-caps);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--nav-icon-gap);
  min-height: var(--nav-item-height);
  padding: var(--nav-item-pad-y) var(--nav-item-pad-x);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: var(--nav-font-size);
  font-weight: var(--nav-font-weight);
  line-height: 20px;
}

.sidebar__link:hover {
  background: var(--color-nav-hover);
  color: var(--color-text);
}

.sidebar__link[aria-current="page"] {
  background: var(--color-nav-active);
  color: var(--color-text);
  font-weight: var(--nav-font-weight-active);
}

.sidebar__link svg {
  width: var(--icon-nav);
  height: var(--icon-nav);
  color: currentColor;
  flex-shrink: 0;
}

.sidebar__link-external {
  margin-left: auto;
  display: inline-flex;
}

/* Newsroom and Store follow the groups after a divider, not pinned down. */
.sidebar__bottom {
  margin-top: var(--nav-group-gap);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
}

.scrim {
  display: none;
}

.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--page-intro-space) var(--gutter) var(--space-16);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--foot-pad) var(--gutter);
  line-height: var(--foot-line);
  border-top: 1px solid var(--color-line);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer a:hover {
  color: var(--color-text);
}

/* ---------- Page parts ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin: 0 0 var(--page-intro-space);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-caps);
  line-height: var(--leading-caps);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.page-title {
  font-size: var(--title-page);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-display);
}

.page-meta {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-subtle);
}

.page-lede {
  margin-top: var(--page-intro-lede-gap);
  max-width: var(--measure-subtitle);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.section {
  margin-top: var(--section-gap);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.section__title {
  font-size: var(--title-section);
  line-height: var(--leading-h2);
}

.section__lede {
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  max-width: 680px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.link-arrow:hover {
  color: var(--color-text);
}

.grid {
  display: grid;
  gap: var(--card-row-gap) var(--card-gap);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--card-row-gap) var(--card-gap);
}

.grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-row-gap) var(--card-gap);
}

.grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-row-gap) var(--card-gap);
}

.grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--card-row-gap) var(--card-gap);
}

/* ---------- Buttons and chips ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--control-height);
  padding: 0 17px;
  border: 1px solid var(--color-surface-dark);
  border-radius: var(--radius-pill);
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--duration) var(--ease-out), background var(--duration) var(--ease-out);
}

.button:hover {
  background: var(--color-action-hover);
}

.button:active {
  transform: scale(0.98);
}

.button--main {
  border-radius: var(--radius-cta);
}

.button--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-line-strong);
}

.button--secondary:hover {
  background: var(--color-surface-muted);
}

/* Tonal: a soft neutral fill, no line, full button height, so it can't be
   mistaken for a small white badge on a picture. */
.button--tonal {
  background: var(--color-button-tonal);
  border-color: transparent;
  color: var(--color-text);
}

.button--tonal:hover {
  background: var(--color-button-tonal-hover);
}

.button--light {
  background: var(--color-on-dark-action);
  color: var(--color-surface-dark);
  border-color: var(--color-on-dark-action);
}

.button--light:hover {
  background: var(--color-on-dark-action-hover);
}

.button--small {
  height: 34px;
  padding: 0 var(--space-3);
  gap: var(--space-2);
}

.button[disabled] {
  opacity: 0.5;
  cursor: default;
}

.text-link {
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Chips label a card; pills (.filter) choose what a page shows. A chip is
   the smaller level: small corners, no fill change, one size everywhere. */
.chip {
  display: inline-flex;
  align-items: center;
  height: var(--chip-height);
  padding: 0 var(--chip-pad);
  border: 1px solid var(--color-line);
  border-radius: var(--chip-radius);
  background: var(--color-neutral-grey);
  font-size: var(--chip-text);
  font-weight: var(--weight-regular);
  line-height: 1;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: border-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}

a.chip:hover {
  border-color: var(--color-line-strong);
  color: var(--color-text);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Equal pills across the whole row; when the longest no longer fits its
   share, each keeps its own width and the row scrolls sideways. */
.filters {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(max-content, 1fr);
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: 3px;
  margin-bottom: var(--space-8);
}

.filter {
  height: 42px;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms var(--ease-out);
  padding: 0 17px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  white-space: nowrap;
}

a.filter { display: inline-flex; align-items: center; justify-content: center; color: var(--color-text); text-decoration: none; }

.filter:hover {
  border-color: var(--color-line-strong);
}

.filter[aria-pressed="true"] {
  background: var(--color-surface-dark);
  border-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: 25px;
}

.search-field {
  width: 220px;
  height: 45px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-search);
  background: var(--color-surface);
  font-size: var(--text-sm);
}

.search-field:focus {
  outline: none;
  border-color: var(--color-search-focus);
}

.badge-placeholder {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius);
  background: var(--color-placeholder-bg);
  color: var(--color-placeholder);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

/* ---------- Cards (experience tiles) ---------- */

/* A card is an article; its title link stretches over all of it, and the
   expert names and chips sit above that as links of their own. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--color-text);
  container-type: inline-size;
}

.card__link {
  color: inherit;
}

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.card__link:focus-visible {
  outline: none;
}

.card:has(.card__link:focus-visible) {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.card .expert-link,
.card .chip {
  position: relative;
  z-index: 2;
}

.card__media {
  position: relative;
  aspect-ratio: 298 / 266;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-muted);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}

.card:hover .card__media img {
  transform: scale(1.03);
}

.card__media--square {
  aspect-ratio: 1 / 1;
}

.card__media--portrait {
  aspect-ratio: 4 / 5;
}

.card__media--story {
  aspect-ratio: 1;
}

.link-out { font-size: 1.05em; line-height: 1; }

.card__media--course {
  aspect-ratio: 218 / 150;
}

.card__media-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
}

/* The label sits 10px in from the picture's corner: radius 14 - 10. */
/* A session card with its heart: the card is the link, the heart sits over
   the picture beside it, 8px from the top and right. */
.card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  container-type: inline-size;
}

.card-wrap > .card {
  flex: 1;
}

.card__save {
  position: absolute;
  top: var(--overlay-inset);
  right: var(--overlay-inset);
  z-index: 3;
}

.card__save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--overlay-size);
  height: var(--overlay-size);
  padding: 0;
  border: 0;
  border-radius: var(--radius-overlay);
  background: var(--color-on-picture);
  color: var(--color-text-muted);
  cursor: pointer;
}

.card__save-button:hover,
.card__save-button[aria-pressed="true"] {
  color: var(--color-text);
}

.card__save-button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* The badge over a picture: the same inset from the top and the left, and
   the picture's radius minus that inset (14 - 8 = 6), so it stays round. */
.card__label {
  position: absolute;
  top: var(--label-inset);
  left: var(--label-inset);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--label-height);
  padding: 0 7px;
  border-radius: var(--radius-overlay);
  background: var(--color-on-picture);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
}

/* The enter square in the picture's bottom-right corner, at the
   badges' 8px inset (radius 14 - 8), horizontal rather than its diagonal.
   Like the heart it appears on hover and keyboard focus. */
.card__enter {
  position: absolute;
  right: var(--overlay-inset);
  bottom: var(--overlay-inset);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--overlay-size);
  height: var(--overlay-size);
  border-radius: var(--radius-overlay);
  background: var(--color-on-picture);
  color: var(--color-text);
  opacity: 0;
  transform: translateX(calc(var(--overlay-inset) * -1));
  transition: opacity var(--duration-hover) var(--ease-out), transform var(--duration-hover) var(--ease-out);
}

/* It slides in from the left by the inset as it fades in, and leaves to the
   right as it fades out (app.js adds .is-leaving on the way out). */
.card:hover .card__enter,
.card:focus-within .card__enter,
.coach-card:hover .card__enter,
.coach-card:focus-within .card__enter {
  opacity: 1;
  transform: none;
}

.card.is-leaving .card__enter,
.coach-card.is-leaving .card__enter {
  opacity: 0;
  transform: translateX(var(--overlay-inset));
}

.card__enter svg,
.card__save-button svg {
  display: block;
  width: var(--overlay-icon);
  height: var(--overlay-icon);
}

@container (min-width: 260px) {
  .card__enter,
  .card__save-button {
    --overlay-size: var(--overlay-size-large);
    --overlay-icon: var(--overlay-icon-large);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__enter,
  .card.is-leaving .card__enter,
  .coach-card.is-leaving .card__enter {
    transform: none;
  }
}

/* The heart: on hover and keyboard focus, and always
   once the session is kept. */
.card__save {
  opacity: 0;
  transition: opacity var(--duration-hover) var(--ease-out);
}

.card-wrap:hover .card__save,
.card-wrap:focus-within .card__save,
.card__save:has([aria-pressed="true"]) {
  opacity: 1;
}

/* Touch screens have no hover: on Home neither shows (the session page keeps
   its "Keep in My library"); on the lists the heart stays visible. */
@media (hover: none) {
  [data-page="home"] .card__save,
  [data-page="home"] .card__enter {
    display: none;
  }

  .card__save {
    opacity: 1;
  }
}

.card__body {
  padding: var(--space-3) 2px 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* The card's levels: title, then the expert (12px, medium, darker), then the
   description (12px, regular, muted), then the meta (12px, lighter still). */
.card__expert {
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
}

.card__meta {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.panel {
  padding: 27px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.panel--muted {
  border-color: transparent;
  background: var(--color-surface-muted);
}

.panel--warm {
  background: var(--color-surface-warm);
}

.panel--dark {
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  border-color: transparent;
}

.panel__title {
  font-size: var(--text-lg);
  line-height: var(--leading-h2);
}

.panel p + p {
  margin-top: var(--space-3);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack--loose {
  gap: var(--card-gap);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.muted {
  color: var(--color-text-muted);
}

.small {
  font-size: var(--text-sm);
}

/* ---------- Home ---------- */

/* The welcome on the left, the check-in on its right, on the lede's line. */
.home-welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}

.page-head .eyebrow,
.home-welcome .eyebrow {
  margin-bottom: var(--page-intro-eyebrow-gap);
}

.wearable-invitation {
  margin-top: 28px;
  padding: var(--space-6) 27px;
  border: 1px solid var(--color-wearable-line);
  border-radius: var(--radius);
  background: var(--color-wearable-bg);
}

.wearable-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 13px;
}

.wearable-heading h2 {
  font-family: var(--font-sans);
  font-size: var(--text-wearable-heading);
  line-height: 27px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.4px;
  color: var(--color-wearable-title);
}

.wearable-invitation > p {
  font-size: var(--text-base);
  line-height: 23.8px;
  color: var(--color-wearable-text);
}

.wearable-invitation > .wearable-purpose {
  margin-top: 9px;
  font-size: var(--text-sm);
  line-height: 20.4px;
  color: var(--color-wearable-purpose);
}

.wearable-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 17px;
  margin-top: 17px;
}

.wearable-actions .small {
  color: var(--color-wearable-purpose);
}

.featured-session {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-top: var(--opening-gap);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-warm);
}

/* Label, title and description at the top; buttons and rating at the
   bottom, as on the sleep card, so the space sits between them and the
   card's top and bottom margins stay even. */
.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--pad-feature);
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Meta items are separated by small Endor squares (see .card__meta-row). */
.featured-tags span + span::before {
  content: "";
  display: inline-block;
  width: var(--meta-square);
  height: var(--meta-square);
  margin-right: var(--space-2);
  vertical-align: middle;
  background: currentColor;
}

.featured-copy h2 {
  margin-top: var(--space-5);
  font-size: var(--title-feature);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

.featured-copy h2.is-long {
  font-size: var(--title-card);
  line-height: var(--leading-h1);
  letter-spacing: 0;
}

.featured-description {
  margin-top: var(--space-4);
  max-width: 390px;
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
  color: var(--color-text-muted);
}

.featured-author {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.featured-author a {
  color: inherit;
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.featured-media {
  position: relative;
  display: block;
  min-height: 394px;
  background: var(--color-surface-dark);
}

.featured-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discovery-section {
  margin: var(--section-gap) 0 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
}

/* Home's experts: exactly one full row at every width, the cards growing to
   fill it, as many as fit (the rest are behind "All experts"). The column
   count steps with the window; the extra cards are hidden, not just clipped,
   so they take no tab stop. */
.expert-row {
  display: grid;
  grid-template-columns: repeat(var(--expert-cols), minmax(0, 1fr));
  gap: var(--card-gap);
  --expert-cols: 8;
}

@media (max-width: 1699px) {
  .expert-row {
    --expert-cols: 7;
  }

  .expert-row > :nth-child(n + 8) {
    display: none;
  }
}

@media (max-width: 1449px) {
  .expert-row {
    --expert-cols: 6;
  }

  .expert-row > :nth-child(n + 7) {
    display: none;
  }
}

@media (max-width: 1180px) {
  .expert-row {
    --expert-cols: 5;
  }

  .expert-row > :nth-child(n + 6) {
    display: none;
  }
}

@media (max-width: 960px) {
  .expert-row {
    --expert-cols: 4;
  }

  .expert-row > :nth-child(n + 5) {
    display: none;
  }
}

@media (max-width: 720px) {
  .expert-row {
    --expert-cols: 3;
  }

  .expert-row > :nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 420px) {
  .expert-row {
    --expert-cols: 2;
  }

  .expert-row > :nth-child(n + 3) {
    display: none;
  }
}

.expert-card .card__media img {
  filter: grayscale(1);
}

.sleep-feature {
  margin-top: var(--section-gap);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
}

.sleep-feature__banner {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--color-feature-dark);
  color: var(--color-text-on-dark);
}

.sleep-feature__banner > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sleep-feature__shade {
  position: absolute;
  inset: 0;
  background: var(--scrim-feature);
}

/* Label, title and description at the top; expert, details and button at
   the bottom, so the space sits between them, not above or below. */
.sleep-feature__copy {
  position: relative;
  max-width: 635px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--pad-feature);
}

.sleep-feature__copy h2 {
  margin: 22px 0;
  font-size: var(--title-feature);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

.sleep-feature__copy .eyebrow {
  color: var(--color-text-on-dark-muted);
}

/* Each small text its own level: the course name 16 medium, the description
   14 regular, the expert's name 14 medium, the details 12 regular, the
   expert's line 12 regular and quieter still. */
.sleep-feature__name {
  font-size: var(--text-subtitle-large);
  font-weight: var(--weight-medium);
  margin-bottom: 9px;
}

.sleep-feature__description {
  max-width: 365px;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text-on-dark-muted);
}

.sleep-feature__expert {
  margin-bottom: 21px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.sleep-feature__inside {
  background: var(--color-neutral-grey);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 22px 27px;
  font-size: var(--text-sm);
}

/* "Inside the course" opens the lessons in place: two
   columns of numbered rows. app.js animates the height and centres the card. */
summary.sleep-feature__inside {
  list-style: none;
  cursor: pointer;
}

summary.sleep-feature__inside::-webkit-details-marker {
  display: none;
}

summary.sleep-feature__inside .card-link svg {
  transition: transform var(--duration-expand) var(--ease-out);
}

.sleep-lessons[open] summary.sleep-feature__inside .card-link svg {
  transform: rotate(45deg);
}

.sleep-lessons__panel {
  overflow: hidden;
}

.sleep-lessons__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 36px;
  margin: 0;
  padding: 0 27px 22px;
  list-style: none;
}

.sleep-lessons__list a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  border-top: 1px solid var(--color-line);
  font-size: var(--text-sm);
}

.sleep-lessons__number,
.sleep-lessons__minutes {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
}

.sleep-lessons__list a:hover .sleep-lessons__title,
.sleep-lessons__list a:focus-visible .sleep-lessons__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .sleep-lessons__list {
    grid-template-columns: 1fr;
  }
}

.quick-spaces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
  margin-top: var(--section-gap);
}

.quick-space {
  display: flex;
  align-items: center;
  gap: var(--tile-gap);
  padding: var(--tile-pad);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.quick-space:hover {
  border-color: var(--color-line-strong);
}

.quick-space small {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-caps);
  font-weight: var(--weight-medium);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.quick-space :is(h2, h3) {
  font-size: var(--text-lg);
  line-height: var(--leading-h2);
  margin-bottom: 5px;
}

.quick-space p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.quick-space__end {
  margin-left: auto;
  align-self: flex-start;
  color: var(--color-text-muted);
}

.game-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.game-tile:hover {
  border-color: var(--color-line-strong);
}

.game-tile__icon {
  width: var(--game-icon-circle);
  height: var(--game-icon-circle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  background: var(--color-surface-muted);
}

.game-tile__title {
  font-family: var(--font-display);
  font-size: var(--text-game-title);
  font-weight: var(--weight-medium);
}

.game-tile__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.story-card .card__title {
  font-size: var(--title-story);
  line-height: 1.25;
}

.world-corner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 490px);
  gap: 35px;
  align-items: stretch;
  margin-top: var(--section-gap);
  padding: var(--pad-card);
  border-radius: var(--radius);
  background: var(--color-surface-muted);
}

/* The same rule as the feature cards: words at the top, the button at the
   bottom, level with the pictures' foot. */
.world-corner__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
}

.world-corner h2 {
  font-size: var(--text-lg);
  line-height: var(--leading-h2);
  margin-bottom: 13px;
}

.world-corner p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 260px;
}

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

.mini-world {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: var(--picture-text-inset);
  border-radius: var(--radius);
  background: var(--color-feature-dark);
  color: var(--color-text-on-dark);
  font-size: var(--text-sm);
}

.mini-world:nth-child(2) {
  background: var(--color-art-fallback-2);
}

.mini-world:nth-child(3) {
  background: var(--color-art-fallback-3);
}

.creator-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--section-gap);
  padding: var(--pad-card);
  border-radius: var(--radius);
  background: var(--color-surface-muted);
}

.creator-callout h2 {
  font-size: var(--text-md);
  margin-bottom: var(--space-1);
}

.creator-callout p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.creator-callout .button {
  margin-left: auto;
}

.tile {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5) 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color var(--duration) var(--ease-out);
}

a.tile:hover {
  border-color: var(--color-line-strong);
}

.tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background: var(--color-surface-muted);
  flex-shrink: 0;
}

.tile__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}

.tile__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.tile__end {
  margin-left: auto;
  color: var(--color-text-muted);
}

/* ---------- Page layouts ---------- */

.layout-guide {
  display: grid;
  grid-template-columns: minmax(0, 590fr) minmax(0, 330fr);
  gap: var(--card-gap);
  align-items: start;
}

.layout-twin {
  display: grid;
  grid-template-columns: minmax(0, 408fr) minmax(0, 499fr);
  gap: var(--card-gap);
  align-items: start;
}

.layout-plan {
  display: grid;
  grid-template-columns: minmax(0, 537fr) minmax(0, 384fr);
  gap: var(--card-gap);
  align-items: start;
}

.layout-studio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
  align-items: start;
}

.coach-option {
  padding: var(--space-10);
}

.coach-option h2 {
  font-size: var(--text-lg);
  line-height: var(--leading-h2);
}

.coach-option p {
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.newsroom-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-8);
  border-radius: var(--radius);
  background: var(--color-surface-muted);
}

.newsroom-more__words { display: flex; flex-direction: column; gap: var(--space-3); }

.box-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--title-box);
  font-weight: var(--title-box-weight);
  line-height: 1.25;
}

.library-path {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: 35px;
  padding: 25px;
  border-radius: var(--radius);
  background: var(--color-surface-muted);
}

/* A page's closing note (where full stories open, where expert sessions
   play): set apart from the content above by a section's gap, so it reads
   as a note on the whole page, not a caption on the last row. */
.page-note {
  margin-top: var(--section-gap);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Expert ---------- */

.expert-card .card__media img {
  filter: grayscale(1);
}

/* The expert head: a larger portrait, the text centred beside
   it at the subtitle measure. */
.expert-hero {
  display: grid;
  grid-template-columns: var(--expert-photo-width) minmax(0, var(--measure-subtitle));
  gap: var(--space-12);
  align-items: center;
}

.expert-hero__text {
  display: flex;
  flex-direction: column;
}

.expert-hero__text .page-title {
  margin-top: var(--page-intro-eyebrow-gap);
}

.expert-hero__line {
  margin-top: var(--coach-line-space);
}

.expert-hero__topics {
  margin-top: var(--space-4);
}

.expert-hero__text .page-lede {
  margin-top: var(--space-4);
}

.expert-hero__actions {
  margin-top: var(--space-6);
}

/* An expert's Sessions and Courses, each under its own small heading. */
.expert-group + .expert-group {
  margin-top: var(--space-12);
}

.expert-group__title {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}

.expert-about {
  max-width: var(--measure-subtitle);
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
  color: var(--color-text-muted);
}

.expert-hero__photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-warm);
}

.expert-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

/* Guide and Twin open Discover above the grid, a card row's gap before it. */
.discover-reflect {
  margin-bottom: var(--space-8);
}

/* The modal for what continues in the Endor app: the
   item's name and line, then where to find it, the stores and a code. */
.app-modal {
  width: min(100% - 2 * var(--space-4), 560px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-overlay);
}

.app-modal::backdrop {
  background: var(--color-scrim);
}

.app-modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.app-modal__body {
  padding: var(--pad-card);
}

.app-modal__body .eyebrow {
  display: block;
  margin-bottom: var(--space-3);
}

.app-modal__title {
  padding-right: var(--space-10);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-h2);
}

.app-modal__line {
  margin-top: var(--space-2);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.app-modal__app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-row-divider);
}

.app-modal__heading {
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.app-modal__find {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.app-modal__qr svg {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: var(--radius-nested);
}

@media (max-width: 560px) {
  .app-modal__app {
    grid-template-columns: 1fr;
  }

  .app-modal__qr {
    display: none;
  }
}

/* Living World. Each concept (.lw--valley, .lw--garden, .lw--isles) draws
   its own landscape; the stops, the route and the traveller are shared. */
.lw {
  --lw-ink: #4a3f36;
  --lw-ink-soft: #7a6a5c;
  --lw-gold: #ffc37f;
  --lw-gold-soft: rgba(255, 195, 127, 0.45);
  --lw-plate: #fffaf2;
  --lw-locked: #b7aea4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--card-gap);
  align-items: stretch;
}
/* A frame on a world that goes on past it: the ground, woods, shore and
   roads run under the frame's edge, darkened a little toward it. At large
   widths it's held to the window's height. */
.lw-map { position: relative; align-self: start; justify-self: center; width: min(100%, calc((100svh - 150px) * 1200 / 720)); min-width: 0; aspect-ratio: 1200 / 720; overflow: hidden; border-radius: var(--radius); background: #e6d8b9; box-shadow: inset 0 0 0 1px rgba(44, 38, 32, 0.08); }
.lw-map__scroll { position: absolute; inset: 0; }
.lw-land { position: absolute; inset: 0; width: 100%; height: 100%; }
.lw-map__tools { position: absolute; top: var(--space-4); right: var(--space-4); display: flex; gap: var(--space-2); }
.lw-map__sound {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 32px; padding: 0 var(--space-3);
  border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px); font: inherit; font-size: var(--text-xs); color: var(--color-text); cursor: pointer;
}
.lw-map__sound svg { display: block; }
.lw-map__sound[aria-pressed="true"] { border-color: var(--color-text); background: var(--color-text); color: var(--color-surface); }

/* The island. A floating island in Endor's warm sand and light: water that
   fades into the page, earthy sides, a sunlit top with each world's own
   photograph worked into its ground, drawn trees, peaks and water, and the
   three little buildings. The water follows the time of day where you are
   (living-world.js sets data-time). */
.lw--island { --i-sea: #a9cde8; --i-sea-mid: #86b6da; --i-ink: #4a3f36; --i-gold: #ffc37f; }
.lw--island[data-time="dawn"] { --i-sea: #c9cfe0; --i-sea-mid: #a7b8d6; }
.lw--island[data-time="dusk"] { --i-sea: #d6bfc0; --i-sea-mid: #a8a9c4; }
.lw--island[data-time="night"] { --i-sea: #8ea6c8; --i-sea-mid: #6d86ad; }
.lw-i-sea-in { stop-color: var(--i-sea); }
.lw-i-sea-mid { stop-color: var(--i-sea-mid); }
.lw-i-waves path { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.6; stroke-linecap: round; }
.lw-i-shadow { fill: rgba(44, 38, 32, 0.2); }
.lw-i-strata { fill: none; stroke: rgba(120, 90, 60, 0.22); stroke-width: 1.2; }
.lw-i-grass-edge { fill: #e7d3b2; }
.lw-i-meadow { fill: #bfd4aa; opacity: 0.85; }
.lw-i-beach { fill: #f0e3c6; }
.lw-i-edge { pointer-events: none; }
.lw-i-roads-out .lw-road-bed { opacity: 0.8; }
.lw-i-picture { opacity: 0.95; }
.lw-i-picture--mountain { opacity: 0.5; }
.lw-i-picture--lake { opacity: 0.7; }
.lw-i-picture--clearing { opacity: 0.9; }
.lw-i-picture.is-locked { filter: url(#lw-i-grey); opacity: 0.55; }
.lw-i-paper { mix-blend-mode: multiply; }
.lw-i-clearing-glow { mix-blend-mode: screen; }
.lw-i-flower--b { fill: #fec5c6; }
.lw-i-flower--y { fill: #fdecc8; stroke: #ffc37f; stroke-width: 0.8; }
.lw-i-tree-shadow { fill: rgba(44, 38, 32, 0.16); }
.lw-i-trunk { fill: #7a5c42; }
.lw-i-bushes .lw-i-trunk { display: none; }
.lw-i-tufts path { fill: none; stroke: #8fae86; stroke-width: 1.4; stroke-linecap: round; }
.lw-i-crown-light { fill: #b9d3ad; opacity: 0.55; }
/* An image in a slot takes the same states as a drawing: grey and quiet
   while its world is closed, a soft light when its place is selected. */
.lw-slot.has-image.is-locked image { filter: url(#lw-i-grey); opacity: 0.6; }
.lw-slot.has-image.is-selected image { filter: drop-shadow(0 0 10px rgba(255, 236, 205, 0.9)); }
.lw-slot--forest.is-locked { filter: url(#lw-i-grey); opacity: 0.7; }
.lw-i-shore { fill: #fbf6ec; }
.lw-i-glint { stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.6; stroke-linecap: round; }
.lw-slot--lake.is-locked .lw-i-water { filter: url(#lw-i-grey); opacity: 0.7; }
.lw-i-peak-lit { fill: url(#lw-i-lit); }
.lw-i-peak-shade { fill: url(#lw-i-shade); }
.lw-i-snow { fill: #ffffff; }
.lw-slot--mountain.is-locked { filter: url(#lw-i-grey); opacity: 0.75; }
.lw-i-ray { stroke: rgba(255, 195, 127, 0.75); stroke-width: 1.6; stroke-linecap: round; }
.lw-slot--horizon.is-locked { opacity: 0.45; filter: url(#lw-i-grey); }
.lw-road-bed { fill: none; stroke: rgba(232, 214, 186, 0.95); stroke-width: 9; stroke-linecap: round; }
.lw-road { fill: none; stroke: #b3916a; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1 7; }
.lw-i-ground-shadow { fill: rgba(44, 38, 32, 0.18); }
.lw-i-tent-door { fill: #5a463a; }
.lw-i-edge-line { fill: none; stroke: rgba(74, 63, 54, 0.55); stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; }
.lw-i-logs { stroke: #6b4a34; stroke-width: 2.4; stroke-linecap: round; }
.lw-i-lamp-cap { fill: #5a463a; }
.lw-i-chimney { fill: #7a5442; }
.lw-i-ember { fill: #ff9f4a; }
.lw-i-post { fill: #5a463a; }
.lw-i-lamp { fill: #fff1d6; stroke: #5a463a; stroke-width: 1.2; filter: drop-shadow(0 0 5px rgba(255, 190, 110, 0.8)); }
.lw-i-flame { fill: #ffb45e; }
.lw-i-window { fill: #ffd59a; filter: drop-shadow(0 0 3px rgba(255, 190, 110, 0.9)); }
.lw-i-door { fill: #6b4a34; }
.lw-i-cloud-puffs { fill: rgba(255, 255, 255, 0.95); filter: drop-shadow(0 3px 2px rgba(120, 100, 80, 0.12)); }
.lw-i-compass circle { fill: rgba(255, 250, 242, 0.7); stroke: rgba(74, 63, 54, 0.35); stroke-width: 1; }
.lw-i-compass-n { fill: #b3916a; }
.lw-i-compass-s { fill: rgba(74, 63, 54, 0.3); }
.lw-i-compass text { font-family: var(--font-display); font-size: 12px; fill: rgba(74, 63, 54, 0.7); }
.lw-mist ellipse { fill: rgba(246, 242, 234, 0.72); }
.lw-mist[data-open="true"] { opacity: 0; }
.lw-mist.is-lifting { animation: lw-lift 3.2s var(--ease-out) 0.6s both; }
@keyframes lw-lift { from { opacity: 0.95; transform: translateY(0); } to { opacity: 0; transform: translateY(-24px); } }

/* A closed world's card, beside it on the map. */
.lw-pop {
  position: absolute; z-index: 3; width: 300px; padding: var(--space-4);
  border-radius: var(--radius); background: rgba(255, 253, 249, 0.97); box-shadow: 0 10px 30px rgba(44, 38, 32, 0.18);
  font-size: var(--text-sm); color: var(--color-text);
}
.lw-pop[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .lw-pop:not([hidden]) { animation: lw-pop-in 240ms cubic-bezier(0.34, 1.4, 0.64, 1) both; }
}
@keyframes lw-pop-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.lw-pop__close { position: absolute; top: 8px; right: 8px; display: inline-flex; padding: 6px; border: 0; border-radius: var(--radius-round); background: none; color: var(--color-text-muted); cursor: pointer; }
.lw-pop__close:hover { background: var(--color-hover); color: var(--color-text); }
.lw-pop__head { display: flex; align-items: center; gap: var(--space-3); padding-right: var(--space-6); }
.lw-pop__thumb { width: 52px; height: 52px; border-radius: var(--radius-nested-tight); object-fit: cover; filter: grayscale(1); }
.lw-pop__name { margin: 0; font-family: var(--font-display); font-size: var(--text-md); }
.lw-pop__when { display: flex; align-items: center; gap: var(--space-1); margin: 2px 0 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.lw-pop__missing { margin: var(--space-3) 0 0; font-weight: var(--weight-medium); }
.lw-pop__ways { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); }
.lw-pop__list { margin: 0; padding: 0; list-style: none; }
.lw-pop__list li { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) 0; border-top: 1px solid var(--color-row-divider); }
.lw-pop__points { font-family: var(--light-font); font-weight: var(--light-weight); color: var(--color-progress-text); }
.lw-pop__more { display: inline-block; margin-top: var(--space-3); font-size: var(--text-xs); }

/* The places: a world's light in a fine ring, and every name on a plate. */
.lw-stop { cursor: pointer; outline: none; }
.lw-stop__hit { fill: transparent; }
.lw-stop__halo { fill: url(#lw-i-glow); opacity: 0; transition: opacity 400ms var(--ease-out); }
.lw-stop__base { fill: rgba(44, 38, 32, 0.22); }
.lw-stop__ring { stroke: rgba(179, 145, 106, 0.7); stroke-width: 1; }
.lw-stop__light { fill: var(--i-gold); filter: drop-shadow(0 0 4px rgba(255, 195, 127, 0.9)); }
.lw-stop .icon-paths { fill: var(--i-ink); }
.lw-stop .icon-paths path { stroke: none; }
.lw-plate rect { fill: rgba(255, 252, 246, 0.95); stroke: rgba(179, 145, 106, 0.35); stroke-width: 1; filter: drop-shadow(0 2px 4px rgba(44, 38, 32, 0.16)); }
.lw-plate text { font-family: var(--font-display); font-size: 15px; font-weight: var(--weight-medium); fill: var(--i-ink); }
.lw-plate--place text { font-weight: var(--weight-regular); fill: rgba(74, 63, 54, 0.85); }
.lw-stop--world:not(.is-locked) .lw-stop__halo { opacity: 0.6; }
.lw-stop:hover .lw-stop__halo, .lw-stop:focus-visible .lw-stop__halo, .lw-stop.is-selected .lw-stop__halo { opacity: 1; }
.lw-stop.is-selected .lw-plate rect, .lw-stop:focus-visible .lw-plate rect { stroke: var(--i-ink); }
.lw-stop.is-locked .lw-stop__ring { stroke: rgba(74, 63, 54, 0.3); }
.lw-stop.is-locked .icon-paths { fill: rgba(74, 63, 54, 0.55); }
.lw-stop.is-locked .lw-plate text { fill: rgba(74, 63, 54, 0.55); }
.lw-ripple ellipse { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.2; rx: 6; ry: 3; }

/* The traveller: the Twin standing inside its circle, a single hairline
   round the figure as in the 2.0 app, with a faint light just outside it.
   It's a link to My Twin; the figure itself takes no pointer, so it can't
   be turned or zoomed here. */
.lw-traveller { position: absolute; top: 0; left: 0; width: 0; height: 0; will-change: transform; color: inherit; }
/* The Twin and its bubble are one body: `--lift` (living-world.js) raises
   both while it travels, and a slow float keeps both afloat when it stands.
   Only its shadow stays on the ground, smaller and fainter the higher it
   goes. */
.lw-traveller__shadow {
  position: absolute; left: -26px; top: -9px; width: 52px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 60, 50, 0.28), transparent);
  transform: scale(calc(1 - var(--rise, 0) * 0.45));
  opacity: calc(1 - var(--rise, 0) * 0.7);
}
.lw-traveller__body { position: absolute; inset: 0; transform: translateY(calc(var(--lift, 0px) * -1)); }
@media (prefers-reduced-motion: no-preference) {
  .lw-traveller__body { animation: lw-float 4.6s ease-in-out infinite alternate; }
}
@keyframes lw-float { from { translate: 0 1px; } to { translate: 0 -3px; } }
/* The Twin's bubble: read first, quietly. A light bluish air inside, like
   the haze over the photographed land, and a thin semi-opaque white edge
   softened by a little light just inside and outside it. */
.lw-traveller__circle {
  position: absolute; left: -40px; top: -86px; width: 80px; height: 80px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.18), inset 0 0 8px rgba(255, 255, 255, 0.16);
  background: radial-gradient(closest-side, rgba(176, 204, 228, 0.24), rgba(176, 204, 228, 0.2) 80%, rgba(196, 218, 236, 0.3));
  transition: border-color var(--duration-hover) var(--ease-out), box-shadow var(--duration-hover) var(--ease-out);
}
.lw-traveller:hover .lw-traveller__circle, .lw-traveller:focus-visible .lw-traveller__circle {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.28), inset 0 0 10px rgba(255, 255, 255, 0.22);
}
.lw-traveller:focus-visible { outline: none; }
/* The map's Twin: the real Twin's figure in semi-opaque white lines, the
   outline at one pixel and the network finer, no glow and no fill, centred
   in its bubble with room to the edge. */
.lw-traveller__twin { position: absolute; left: -12px; top: -77px; display: block; width: 24px; max-width: none; height: 62px; opacity: 0.92; filter: drop-shadow(0 0 1.5px rgba(40, 60, 80, 0.35)); }
.lw-stop.is-here .lw-stop__ring, .lw-stop.is-here .lw-stop__light { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .lw-mist:not([data-open="true"]) { animation: lw-drift 26s ease-in-out infinite alternate; }
  .lw-stop--world:not(.is-locked) .lw-stop__light { animation: lw-breathe 4.5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
  .lw-i-cloud { animation: lw-cloud 70s ease-in-out infinite alternate; }
  .lw-i-cloud:nth-child(2) { animation-duration: 90s; animation-delay: -30s; }
  .lw-i-cloud:nth-child(3) { animation-duration: 80s; animation-delay: -50s; }
  .lw-i-waves path { animation: lw-wave 6s ease-in-out infinite alternate; }
  .lw-i-waves path:nth-child(even) { animation-delay: -3s; }
  .lw-i-flame, .lw-i-ember { animation: lw-flicker 2.6s ease-in-out infinite alternate; }
  .lw-ripple ellipse { animation: lw-ripple 2.2s var(--ease-out) var(--ripple-delay, 0s) both; }
}
@keyframes lw-drift { from { transform: translateX(-14px); } to { transform: translateX(16px); } }
@keyframes lw-breathe { from { transform: scale(0.85); opacity: 0.85; } to { transform: scale(1.15); opacity: 1; } }
@keyframes lw-cloud { from { translate: -40px 0; } to { translate: 60px 0; } }
@keyframes lw-wave { from { translate: -6px 0; opacity: 0.4; } to { translate: 6px 0; opacity: 0.95; } }
@keyframes lw-flicker { from { opacity: 0.75; } to { opacity: 1; } }
@keyframes lw-ripple { from { rx: 6px; ry: 3px; opacity: 0.9; } to { rx: 60px; ry: 22px; opacity: 0; } }

/* The panel: picture, words, then what to do, as a list so nothing crowds */
.lw-panel { display: flex; flex-direction: column; height: 0; min-height: 100%; overflow: hidden auto; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.lw-panel__place { display: flex; flex: 1; flex-direction: column; }
.lw-panel__place[hidden] { display: none; }
.lw-panel__picture { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lw-panel__place.is-locked .lw-panel__picture { filter: grayscale(0.7); opacity: 0.8; }
.lw-panel__body { display: flex; flex: 1; flex-direction: column; padding: var(--space-5) var(--space-5) var(--space-5); }
.lw-panel__name { margin: var(--space-2) 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: 1.2; }
.lw-panel__name:focus { outline: none; }
.lw-panel__line { margin: 0; font-size: var(--text-sm); line-height: var(--leading-body); color: var(--color-text-muted); text-wrap: pretty; }
.lw-panel__invitation { margin: var(--space-4) 0; padding: var(--space-3) 0; border-top: 1px solid var(--color-row-divider); border-bottom: 1px solid var(--color-row-divider); }
.lw-panel__invitation span { font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-subtle); }
.lw-panel__invitation p { margin: var(--space-1) 0 0; font-family: var(--font-display); font-size: var(--text-md); line-height: var(--leading-normal); text-wrap: pretty; }
.lw-panel__actions { display: flex; flex-direction: column; gap: var(--space-3); margin-top: auto; }
.lw-panel__actions > .button { justify-content: center; }
.lw-panel__more { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-row-divider); }
.lw-panel__more li { border-bottom: 1px solid var(--color-row-divider); }
.lw-panel__more .lw-listen, .lw-panel__link {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 40px; padding: 0;
  border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text); text-decoration: none; cursor: pointer;
}
.lw-panel__link { justify-content: space-between; }
.lw-panel__link svg { color: var(--color-text-subtle); }
.lw-listen { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text); cursor: pointer; }
.lw-listen span { display: inline-flex; }
.lw-listen:disabled { cursor: progress; }
.lw-listen__text { white-space: nowrap; transition: opacity 180ms var(--ease-out); }
/* Listen, loading and pause share one icon box and cross-fade, so the
   button never jumps between states. */
.lw-listen__icon { position: relative; width: 16px; height: 16px; flex: none; }
.lw-listen__glyph { position: absolute; inset: 0; align-items: center; justify-content: center; opacity: 0; transform: scale(0.7); transition: opacity 200ms var(--ease-out), transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.lw-listen:not([data-state]) .lw-listen__glyph--play,
.lw-listen[data-state="idle"] .lw-listen__glyph--play,
.lw-listen[data-state="playing"] .lw-listen__glyph--stop,
.lw-listen[data-state="loading"] .lw-listen__glyph--loading { opacity: 1; transform: none; }
.lw-listen__ring { width: 13px; height: 13px; border: 1.5px solid var(--color-line-strong); border-top-color: var(--color-text); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .lw-listen[data-state="loading"] .lw-listen__ring { animation: lw-spin 0.9s linear infinite; }
}
@keyframes lw-spin { to { transform: rotate(360deg); } }
.lw-listen:hover [data-listen-text], .lw-panel__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.lw-listen.is-playing { font-weight: var(--weight-medium); }
.lw-locked { display: flex; gap: var(--space-3); margin: var(--space-4) 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-nested); background: var(--color-neutral-grey); }
.lw-locked__icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-round); background: var(--color-surface); color: var(--color-text-muted); }
.lw-locked__title { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.lw-locked__text { margin: 2px 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-body); }
.lw-locked .text-link { font-size: var(--text-sm); }
.lw-title-soft { color: var(--color-text-subtle); }

/* How worlds open */
.lw-how { margin-top: var(--space-10); }
.lw-how__intro { max-width: 62ch; margin-bottom: var(--space-6); }
.lw-how__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--card-gap); }
.lw-how__grid > * { min-width: 0; }
.lw-how__now, .lw-how__counts { padding: var(--pad-card); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.lw-how__level { display: flex; align-items: baseline; gap: var(--space-3); }
.lw-how__level-number { font-family: var(--font-display); font-size: var(--title-card); line-height: 1.1; }
.lw-how__level-light { font-size: var(--text-sm); color: var(--color-text-muted); }
.lw-how__bar { position: relative; height: 8px; margin: var(--space-4) 0 var(--space-2); overflow: hidden; border-radius: var(--radius-pill); background: var(--color-neutral-grey); }
.lw-how__bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand-butter), var(--color-progress)); transition: width 600ms var(--ease-out); }
.lw-how__next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-6); font-size: var(--text-base); }
.lw-how__when { font-size: var(--text-sm); color: var(--color-text-muted); }
.lw-how__path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.lw-how__step { display: flex; flex-direction: column; gap: var(--space-1); }
.lw-how__thumb { width: 100%; aspect-ratio: 1; margin-bottom: var(--space-1); object-fit: cover; border-radius: var(--radius-nested); filter: grayscale(1); opacity: 0.55; }
.lw-how__step.is-open .lw-how__thumb { filter: none; opacity: 1; }
.lw-how__step.is-here .lw-how__thumb { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-progress); }
.lw-how__step-name { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.lw-how__step-state { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); }
.lw-how__counts-title { margin: 0 0 var(--space-3); font-size: var(--text-base); font-weight: var(--weight-medium); }
.lw-how__counts ul { margin: 0; padding: 0; list-style: none; }
.lw-how__counts li { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-row-divider); font-size: var(--text-sm); }
.lw-how__points { color: var(--color-progress-text); font-variant-numeric: tabular-nums; }
.lw-how__foot { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--color-text-muted); }

/* From 1440px wide the map takes the content's width beside the place's
   card, which sits on its right, as tall as the map. Below that the map takes the row's full
   width and the card moves under it, compact: a small picture to the side,
   the place and its invitation, then what to do. */
@media (max-width: 1439px) {
  .lw { grid-template-columns: 1fr; }
  .lw-panel { height: auto; min-height: 0; overflow: visible; }
  .lw-panel__place { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); }
  .lw-panel__picture { height: 100%; aspect-ratio: auto; }
  .lw-panel__actions { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .lw-panel__more { flex: 1 1 220px; }
}
@media (max-width: 900px) {
  .lw-how__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lw-map { width: 100%; aspect-ratio: auto; }
  .lw-map__tools { z-index: 1; top: var(--space-3); right: var(--space-3); }
  .lw-map__scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .lw-map__scroll::-webkit-scrollbar { display: none; }
  .lw-land { position: static; display: block; width: 680px; max-width: none; height: auto; aspect-ratio: 1200 / 720; }
  .lw-panel__place { display: flex; }
  .lw-panel__picture { height: auto; aspect-ratio: 16 / 9; }
  .lw-panel__actions { flex-direction: column; align-items: stretch; }
  .lw-panel__more { flex: none; }
  .lw-how__path { grid-template-columns: 1fr; gap: var(--space-2); }
  .lw-how__step { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); }
  .lw-how__thumb { width: 44px; margin: 0; }
}

/* A game from Living World: its world's picture with the world named on
   it, then the game. A game whose world isn't open is quiet, with a lock. */
.world-game { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; transition: border-color var(--duration-hover) var(--ease-out); }
.world-game:hover { border-color: var(--color-line-strong); }
.world-game__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-surface-muted); }
.world-game__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.world-game:hover .world-game__media img { transform: scale(1.03); }
.world-game__world { position: absolute; bottom: var(--label-inset); left: var(--label-inset); display: inline-flex; align-items: center; height: var(--label-height); padding: 0 var(--space-2); border-radius: var(--radius-overlay); background: rgba(255, 255, 255, 0.92); font-size: var(--text-caps); font-weight: var(--weight-medium); color: var(--color-text); }
.world-game__lock, .world-card__lock { position: absolute; top: var(--label-inset); left: var(--label-inset); display: inline-flex; align-items: center; gap: var(--space-1); height: var(--label-height); padding: 0 var(--space-2); border-radius: var(--radius-overlay); background: rgba(44, 38, 32, 0.78); font-size: var(--text-caps); color: var(--color-text-on-dark); }
.world-card__lock { width: var(--label-height); padding: 0; justify-content: center; z-index: 2; }
.world-game__body { display: flex; flex: 1; flex-direction: column; gap: var(--space-1); padding: var(--space-4); }
.world-game__title { font-family: var(--font-display); font-size: var(--text-md); line-height: 1.3; }
.world-game__text { margin-bottom: var(--space-3); font-size: var(--text-sm); line-height: var(--leading-body); color: var(--color-text-muted); }
.world-game .card__meta-row { margin-top: auto; }
.world-game.is-locked img, .sound-card.is-locked img, .world-card.is-locked img, .mini-world.is-locked img { filter: grayscale(0.85); opacity: 0.7; }
.world-game.is-locked .world-game__title { color: var(--color-text-secondary); }
.sound-card__media { position: relative; display: block; }
.mini-world { position: relative; }
.xp-locked { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-6) 0; }
.xp-locked__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: var(--radius-round); background: var(--color-neutral-grey); color: var(--color-text-muted); }
.xp-locked__title { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: 1.25; }
.xp-locked__text { margin: 0 0 var(--space-2); max-width: 52ch; color: var(--color-text-muted); }

/* The small player that keeps a soundscape going from page to page: a pill
   that opens into the player. soundscape-sound.js animates its size. */
.mini-player {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 40;
  display: flex; flex-direction: column; overflow: hidden;
  max-width: calc(100vw - 2 * var(--space-4)); padding: var(--space-1);
  border: 1px solid var(--color-line); border-radius: 25px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); box-shadow: var(--shadow-overlay);
  --mini-move: 420ms; --mini-ease: cubic-bezier(0.32, 0.72, 0, 1);
}
/* soundscape-sound.js reads the open or closed size with every transition
   inside switched off, so it measures where the parts end, not where they
   start. */
.mini-player.is-measuring, .mini-player.is-measuring * { transition: none !important; animation: none !important; }
/* Open, the player's edge is 8px all round: the picture's corner is the
   card's less that (14 - 8 = 6), the worlds start under the picture and the
   X sits under the pause button, centre on centre. */
.mini-player[data-open="true"] { width: 344px; padding: var(--space-2); border-radius: var(--radius); }
.mini-player[hidden] { display: none; }
/* Its arrival: first a circle as tall as the pill, at its right end,
   scaling in with a small bounce; then it stretches quickly to the left
   while the parts appear from right to left, the button first and the
   picture last, so the pill is already behind the picture when it comes. */
@media (prefers-reduced-motion: no-preference) {
  .mini-player.is-entering { transform-origin: calc(100% - 25px) 50%; animation: mini-circle 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both, mini-stretch 520ms cubic-bezier(0.32, 0.72, 0, 1) 230ms both; }
  .mini-player.is-entering .mini-player__button { animation: mini-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 330ms both; }
  .mini-player.is-entering .mini-player__name { animation: mini-slide 360ms cubic-bezier(0.22, 1, 0.36, 1) 440ms both; }
  .mini-player.is-entering .mini-player__eyebrow { animation: mini-slide 360ms cubic-bezier(0.22, 1, 0.36, 1) 500ms both; }
  .mini-player.is-entering .mini-player__picture { animation: mini-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms both; }
  /* Opening: the line draws itself, the worlds come in from the right one
     after another, overlapping, and the X lands last with a soft bounce. */
  .mini-player[data-open="true"]:not(.is-closing) .mini-player__inner::before { animation: mini-line 420ms cubic-bezier(0.22, 1, 0.36, 1) 90ms backwards; }
  .mini-player[data-open="true"]:not(.is-closing) .mini-player__world { animation: mini-in 300ms cubic-bezier(0.22, 1, 0.36, 1) calc(130ms + var(--i, 0) * 45ms) backwards; }
  .mini-player[data-open="true"]:not(.is-closing) [data-mini-close] { animation: mini-bounce 520ms linear 340ms backwards; }
}
@keyframes mini-circle { from { transform: scale(0.2); } to { transform: scale(1); } }
@keyframes mini-stretch { from { clip-path: inset(0 0 0 calc(100% - 50px) round 25px); } to { clip-path: inset(0 0 0 0 round 25px); } }
@keyframes mini-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mini-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes mini-bounce {
  0% { opacity: 0; transform: scale(0.3); animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
  45% { opacity: 1; transform: scale(1.12); animation-timing-function: ease-in-out; }
  72% { transform: scale(0.96); animation-timing-function: ease-in-out; }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes mini-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes mini-slide { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.mini-player__bar { display: flex; align-items: center; gap: var(--space-2); }
.mini-player__open {
  display: flex; flex: 1 1 auto; align-items: center; gap: var(--space-3); min-width: 0; padding: 0 var(--space-2) 0 0;
  border: 0; border-radius: var(--radius-pill); background: none; font: inherit; color: var(--color-text); text-align: left; cursor: pointer;
}
.mini-player__picture { flex: none; width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-round); transition: width var(--mini-move) var(--mini-ease), height var(--mini-move) var(--mini-ease), border-radius var(--mini-move) var(--mini-ease); }
.mini-player[data-open="true"] .mini-player__picture { width: 48px; height: 48px; border-radius: calc(var(--radius) - 8px); }
.mini-player__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
/* "Soundscape" and "Paused" share one cell, so the pill is as wide as the
   longer and keeps that width when you pause; the rare "Waiting for the
   other sound" takes no width of its own and shortens to fit. */
.mini-player__eyebrow { position: relative; display: grid; min-width: 0; font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-subtle); white-space: nowrap; }
.mini-player__eyebrow > span { grid-area: 1 / 1; visibility: hidden; }
.mini-player__eyebrow > [data-say="held"] { position: absolute; inset: 0 auto 0 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mini-player__eyebrow > .is-said { visibility: visible; }
.mini-tip {
  position: fixed; z-index: 41; padding: var(--space-1) var(--space-2); border-radius: var(--radius-dot);
  background: var(--color-surface-dark); color: var(--color-text-on-dark); font-size: var(--text-xs); line-height: 1.4; white-space: nowrap;
  pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
}
.mini-tip.is-shown { opacity: 1; transform: none; }
.mini-player__name { max-width: 16ch; overflow: hidden; font-family: var(--font-display); font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; transition: font-size var(--mini-move) var(--mini-ease); }
.mini-player[data-open="true"] .mini-player__name { max-width: none; font-size: var(--text-md); }
.mini-player__button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-round); background: var(--color-text); color: var(--color-surface); cursor: pointer; }
.mini-player__button svg, .mini-player__close svg { display: block; }
.mini-player__more { display: none; }
.mini-player[data-open="true"] .mini-player__more, .mini-player.is-closing .mini-player__more { display: block; }
.mini-player__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); padding-top: 9px; }
.mini-player__inner::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--color-line); transform-origin: left center; }
.mini-player__world { position: relative; }
.mini-player__world.is-locked img { filter: grayscale(1); opacity: 0.55; }
.mini-player__lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--color-text); }
.mini-player__lock svg { display: block; }
.mini-player__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-pill);
  background: none; color: var(--color-text-muted); cursor: pointer;
}
.mini-player__close:hover { background: var(--color-neutral-grey); color: var(--color-text); }
.mini-player__open:focus-visible, .mini-player__button:focus-visible, .mini-player__close:focus-visible, .mini-player__world:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.mini-player__worlds { display: flex; gap: 6px; }
.mini-player__world { width: 30px; height: 30px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: var(--radius-round); background: none; cursor: pointer; opacity: 0.7; transition: opacity var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out); }
.mini-player__world img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-round); }
.mini-player__world:hover { opacity: 1; }
.mini-player__world[aria-pressed="true"] { border-color: var(--color-text); opacity: 1; }

/* Arranging Discover: the sections in the person's order. */

/* The one notice, drawn as Home's wearable banner was before: a light
   grey card with its line, the tiles' padding and corners. The icon is
   plain in its own column, like the side menu's icons; the title is body
   size, so it reads below the page's headings; the action sits under the
   words on the left, and "Not now", the quietest thing on it, at the end. */
.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  padding: var(--tile-pad);
  /* No line: the light grey ground alone sets a notice apart from the
     content cards around it. */
  border: 0;
  border-radius: var(--radius);
  background: var(--color-notice-bg);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
}
.notice[hidden] { display: none; }
.notice:not(:has(.notice__icon)) { grid-template-columns: minmax(0, 1fr); }
.notice--top { margin-top: var(--opening-gap); }
.notice--inline { margin-bottom: var(--space-4); }
.notice__icon { display: inline-flex; color: var(--color-text); }
.notice__icon svg { width: var(--wearable-icon-size); height: var(--wearable-icon-size); }
.notice__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
/* The title reads at the body line; beside the icon, the line's first row
   is centred on it by half their difference above and below, so a one-line
   title sits where a line as tall as the icon put it, and a wrapped one
   keeps the body's line height. */
.notice__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-body); font-weight: var(--weight-medium); color: var(--color-text); }
.notice:not(.notice--small-icon):has(.notice__icon) .notice__title { padding-block: calc((var(--wearable-icon-size) - var(--leading-body)) / 2); }
.notice__text { max-width: var(--measure-subtitle); }
/* Beside an icon, the first line is set level with it; without one, its
   letters start as far from the top as the last ones end from the bottom. */
.notice:has(.notice__icon) .notice__body > .notice__text:first-child { padding-top: 6px; }
.notice:has(.notice__icon) .notice__body > .eyebrow:first-child { padding-top: 9px; }
.notice:not(:has(.notice__icon)) .notice__body > .eyebrow:first-child { margin-top: -4px; }
.notice__text p { margin: 0; }
.notice__text p + p { margin-top: var(--space-1); text-wrap: pretty; }
.notice__wide { min-width: 0; margin-top: var(--space-3); }
.notice__actions { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-top: var(--space-4); }
.notice__do { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
/* Its letters, not its line box, sit as far from the bottom as from the
   right: a line height of 1 and the last 2px of descender space taken back. */
.notice__dismiss { margin: 0 0 -2px auto; padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); line-height: 1; color: var(--color-text-subtle); cursor: pointer; }
.notice__dismiss:hover, .notice__dismiss:focus-visible { color: var(--color-text); }
/* On a wide card the words keep their measure and both actions move to a
   column of their own at the right, side by side and centred on the words,
   so nothing is stranded at either edge. */
.notice { container-type: inline-size; }
@container (min-width: 960px) {
  .notice__body:not(:has(.notice__wide)) { display: grid; grid-template-columns: minmax(0, var(--measure-subtitle)) auto; column-gap: var(--space-10); row-gap: 0; justify-content: space-between; }
  /* The words are spaced by margins, not row gaps: the actions span every
     row the words might use, and empty rows must take no room. */
  .notice__body:not(:has(.notice__wide)) > :not(.notice__actions) { grid-column: 1; }
  .notice__body:not(:has(.notice__wide)) > :not(.notice__actions) + :not(.notice__actions) { margin-top: var(--space-2); }
  /* The title's line is as tall as the icon, which puts its letters 8px
     down; 4px more under the words evens what the eye sees above and below. */
  .notice__body:not(:has(.notice__wide)) { padding-bottom: var(--space-1); }
  /* Centred on the card, not on the words above that 4px. */
  .notice__body:not(:has(.notice__wide)) > .notice__actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; align-items: center; gap: var(--space-6); margin: 0 0 -4px; }
  .notice__body:not(:has(.notice__wide)) .notice__dismiss { margin: 0; line-height: inherit; }
}

/* Play: Tiril's experiences from the Living World, one card to play in and
   the place it belongs to beside it. */
.xp-page .back-link, .sounds-page .back-link { margin-bottom: var(--space-4); }
.xp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--card-gap); align-items: stretch; }
.xp { padding: var(--pad-card); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.xp-body, .xp-done { display: flex; flex-direction: column; gap: var(--space-5); }
.xp__head { display: flex; flex-direction: column; gap: var(--space-2); max-width: 56ch; }
.xp__intro { margin: 0; font-size: var(--text-base); line-height: var(--leading-body); color: var(--color-text-secondary); text-wrap: pretty; }
.xp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.xp-footnote { margin: 0; font-size: var(--text-xs); line-height: var(--leading-body); color: var(--color-text-muted); max-width: 60ch; }
.xp-prompt { margin: 0; text-align: center; font-family: var(--font-display); font-size: var(--text-md); line-height: var(--leading-normal); min-height: 2.6em; text-wrap: balance; }
.xp-field { display: flex; flex-direction: column; gap: var(--space-2); }
.xp-field__label { margin: 0; font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--color-text); }
.xp-field__help { margin: 0; font-size: var(--text-xs); line-height: var(--leading-body); color: var(--color-text-muted); }
.xp-field .textarea { resize: vertical; }

/* One quiet minute */
.xp-pause { position: relative; width: min(220px, 70%); aspect-ratio: 1; margin: var(--space-2) auto 0; }
.xp-pause__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.xp-pause__track, .xp-pause__progress { fill: none; stroke-width: 6; }
.xp-pause__track { stroke: var(--color-row-divider); }
.xp-pause__progress { stroke: var(--color-progress); stroke-linecap: round; stroke-dashoffset: 0; transition: stroke-dashoffset 200ms linear; }
.xp-pause__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); }
.xp-pause__clock { font-family: var(--font-display); font-size: var(--text-2xl); font-variant-numeric: tabular-nums; }
.xp-pause__label { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Breathing room */
.xp-breath { position: relative; height: 280px; }
.xp-breath__halo, .xp-breath__orb { position: absolute; top: 120px; left: 50%; border-radius: var(--radius-round); transform: translate(-50%, -50%) scale(0.72); }
.xp-breath__halo { width: 200px; height: 200px; background: var(--color-progress-soft); opacity: 0.35; }
.xp-breath__orb { width: 150px; height: 150px; background: radial-gradient(circle at 40% 35%, var(--brand-butter), var(--color-progress)); }
.xp-breath__cue { position: absolute; right: 0; bottom: 0; left: 0; margin: 0; text-align: center; font-family: var(--font-display); font-size: var(--text-md); color: var(--brand-deep-earth); }
@media (prefers-reduced-motion: no-preference) {
  .xp.is-active .xp-breath__orb, .xp.is-active .xp-breath__halo { animation: xp-breathe var(--xp-breath, 10s) var(--ease-in-out, ease-in-out) infinite; }
  .xp.is-active:not(.is-paced) .xp-breath__orb, .xp.is-active:not(.is-paced) .xp-breath__halo { animation-duration: 12s; }
}
@keyframes xp-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(0.72); } 50% { transform: translate(-50%, -50%) scale(1); } }
.xp-pace { display: flex; flex-direction: column; gap: var(--space-2); }
.xp-pace__options button.segmented__item { border: 0; background: none; font: inherit; font-size: var(--text-sm); cursor: pointer; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out); }
.xp-pace__options button.segmented__item[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-medium); box-shadow: var(--shadow-raised); }

/* A little garden */
.xp-garden__tools { display: flex; gap: var(--space-2); }
.xp-garden__tool {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 6px;
  border: 1px solid var(--color-line); border-radius: var(--radius-nested); background: var(--color-surface); color: var(--color-text); cursor: pointer;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.xp-garden__tool[aria-pressed="true"] { border-color: var(--color-text); background: var(--color-surface-muted); }
.xp-garden__tool .xp-bloom { display: block; width: 100%; height: 100%; }
.xp-garden__bed {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); max-width: 520px; padding: var(--space-3);
  border-radius: var(--radius-nested); background: var(--brand-light-sand);
}
.xp-garden__spot {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: var(--space-1);
  border: 1px dashed rgba(44, 38, 32, 0.22); border-radius: var(--radius-nested-tight); background: rgba(255, 255, 255, 0.45);
  color: var(--color-text-subtle); cursor: pointer; transition: background-color 200ms var(--ease-out);
}
.xp-garden__spot:hover { background: rgba(255, 255, 255, 0.8); }
.xp-garden__spot[data-planted]:not([data-planted=""]) { border-style: solid; border-color: transparent; background: rgba(255, 255, 255, 0.6); }
.xp-garden__spot svg { width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .xp-garden__spot > svg { animation: xp-grow 420ms var(--ease-out) both; transform-origin: 50% 90%; }
}
@keyframes xp-grow { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
.xp-bloom__stem { fill: none; stroke: var(--brand-forest-green); stroke-width: 3; opacity: 0.6; }
.xp-bloom__leaf { fill: var(--brand-sage-light); }
.xp-bloom--ink .xp-bloom__petal { fill: var(--brand-white); stroke: var(--brand-deep-earth); stroke-width: 1.2; }
.xp-bloom--ink .xp-bloom__heart { fill: var(--color-progress); }
.xp-bloom--paper .xp-bloom__petal { fill: var(--brand-blush); }
.xp-bloom--paper .xp-bloom__heart { fill: var(--brand-deep-earth); }
.xp-bloom--silver .xp-bloom__petal { fill: var(--brand-sky-light); }
.xp-bloom--silver .xp-bloom__heart { fill: var(--brand-blue); }

/* Small wonders */
.xp-field-of-lights { position: relative; height: 300px; overflow: hidden; border-radius: var(--radius-nested); background: radial-gradient(ellipse at 50% 60%, #22392f, var(--brand-forest-green)); }
.xp-field-of-lights__ring { position: absolute; top: 50%; left: 50%; width: 220px; height: 220px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-round); transform: translate(-50%, -50%); }
.xp-field-of-lights__ring--two { width: 380px; height: 380px; }
.xp-field-of-lights__caption { position: absolute; right: var(--space-4); bottom: var(--space-3); font-size: var(--text-xs); font-style: italic; color: var(--color-text-on-dark-subtle); }
.xp-light {
  position: absolute; top: var(--y); left: var(--x); display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: var(--radius-round); background: none; transform: translate(-50%, -50%); cursor: pointer;
}
.xp-light__glow { position: absolute; inset: 10px; border-radius: var(--radius-round); background: var(--color-progress); box-shadow: 0 0 18px 6px rgba(255, 195, 127, 0.45); opacity: 0.85; }
.xp-light__number { position: relative; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--brand-deep-earth); opacity: 0; transition: opacity 300ms var(--ease-out); }
.xp-light.is-found .xp-light__glow { background: var(--brand-white); box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.35); opacity: 1; }
.xp-light.is-found .xp-light__number { opacity: 1; }
.xp-light:focus-visible { outline: 2px solid var(--brand-white); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .xp-light:not(.is-found) .xp-light__glow { animation: xp-twinkle 3.2s ease-in-out var(--delay) infinite alternate; }
}
@keyframes xp-twinkle { from { opacity: 0.55; transform: scale(0.85); } to { opacity: 1; transform: scale(1.1); } }
.xp-notice { display: flex; flex-direction: column; gap: var(--space-1); min-height: 3.6em; }
.xp-notice__progress { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.xp-notice__invite { margin: 0; font-family: var(--font-display); font-size: var(--text-md); line-height: var(--leading-normal); }

/* What is here? and One brave step */
.xp-explore { display: inline-flex; align-self: flex-start; align-items: center; gap: var(--space-2); padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text); cursor: pointer; }
.xp-explore:hover { text-decoration: underline; text-underline-offset: 3px; }
.xp-next { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--color-row-divider); }
.xp-next[hidden] { display: none; }
.xp-next__title { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); }
.xp-next__title:focus { outline: none; }
.xp-values { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.xp-value {
  min-height: 36px; padding: 0 var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius-pill);
  background: var(--color-surface); font: inherit; font-size: var(--text-sm); color: var(--color-text); cursor: pointer;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.xp-value[aria-pressed="true"] { border-color: var(--color-text); background: var(--color-text); color: var(--color-surface); }

/* A kind word */
.xp-journal { display: flex; flex-direction: column; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.xp-journal__prompt { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-3); }
.xp-journal__number { padding-top: 1px; font-family: var(--font-display); font-size: var(--text-base); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }

/* After Finish */
.xp-done { align-items: flex-start; }
.xp-done[hidden] { display: none; }
.xp-done__mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-round); background: var(--color-progress-soft); color: var(--brand-deep-earth); }
.xp-done__title { margin: calc(var(--space-3) * -1) 0 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); }
.xp-done__title:focus { outline: none; }
.xp-done__text { margin: 0; font-size: var(--text-base); line-height: var(--leading-body); color: var(--color-text-secondary); max-width: 56ch; }
.xp-done__words { display: flex; flex-direction: column; gap: var(--space-2); align-self: stretch; }
.xp-done__words[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .xp-done:not([hidden]) { animation: xp-rise 360ms var(--ease-out) both; }
}
@keyframes xp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* The place it belongs to */
.xp-aside { overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.xp-aside__picture { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.xp-aside__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-5); }
.xp-aside__tagline { margin: 0; font-family: var(--font-display); font-size: var(--text-md); line-height: var(--leading-normal); text-wrap: pretty; }
.xp-aside__sound { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); align-self: stretch; padding: var(--space-3) 0; border-top: 1px solid var(--color-row-divider); border-bottom: 1px solid var(--color-row-divider); }
.xp-aside__sound-title { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-medium); }

/* Soundscapes */
.sounds-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--card-gap); }
.sound-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.sound-card__picture { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.sound-card__body { display: flex; flex: 1; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.sound-card.is-locked { cursor: pointer; }
.sound-card__needs { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; font-size: var(--text-xs); line-height: var(--leading-small); color: var(--color-text-muted); text-decoration: underline; text-decoration-color: var(--color-line-strong); text-underline-offset: 3px; }
.sound-card__needs:hover { color: var(--color-text); }
.sound-card__needs svg { flex: none; margin-top: 1px; }
/* The card a closed world's sound in the player leads to. */
.sound-card:target { border-color: var(--color-text); box-shadow: 0 0 0 3px var(--color-hover); }
.sound-card.is-playable { cursor: pointer; transition: border-color var(--duration-hover) var(--ease-out); }
.sound-card.is-playable:hover { border-color: var(--color-line-strong); }
.sound-card__eyebrow { font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-subtle); }
.sound-card__title { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); }
/* The world the sound belongs to, as a link to its place on the map. */
.sound-card__world { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: underline; text-decoration-color: var(--color-line-strong); text-underline-offset: 4px; }
.sound-card__world svg { flex: none; color: var(--color-text-muted); }
.sound-card__world:hover { text-decoration-color: currentColor; }
.sound-card__line { margin: 0; font-size: var(--text-xs); line-height: var(--leading-body); color: var(--color-text-muted); text-wrap: pretty; }
.sound-card__actions { display: flex; align-items: center; margin-top: auto; padding-top: var(--space-4); }
/* A card's picture opens its world in large (sound-stage): the whole
   picture is the button, its corner says so. */
.sound-card__open { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding: var(--space-3); border: 0; background: none; color: var(--color-text-on-dark); cursor: zoom-in; }
.sound-card__open-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px); opacity: 0.85; transition: opacity var(--duration-hover) var(--ease-out), transform var(--duration-hover) var(--ease-out); }
.sound-card__open:hover .sound-card__open-icon, .sound-card__open:focus-visible .sound-card__open-icon { opacity: 1; transform: scale(1.08); }

/* A world in large (soundscape-stage.js): its picture filling the box, its
   name and line centred over the sky, and under them, unless turned off, what
   plays: a row per layer heard, drawn in white on the canvas, on a frosted
   panel that keeps it readable over a light picture. The panel is as tall as
   its rows (--rows-h, set by the script) and scrolls past what it can hold;
   the gap under the last row is its bottom padding.
   The picture, the head, the panel and the bar stack in a column. */
.sound-stage { width: min(100% - 2 * var(--space-4), 1120px); height: min(100dvh - 2 * var(--space-4), 860px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--color-surface-dark); color: var(--color-text-on-dark); box-shadow: var(--shadow-overlay); }
.sound-stage[open] { display: flex; flex-direction: column; align-items: center; }
.sound-stage::backdrop { background: var(--color-scrim); }
.sound-stage__picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sound-stage__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.4)); background-color: rgba(0, 0, 0, 0.12); transition: background-color 300ms var(--ease-out); pointer-events: none; }
.sound-stage.is-bare .sound-stage__shade { background-color: rgba(0, 0, 0, 0); }
.sound-stage__head { position: relative; flex: none; width: 100%; padding: var(--space-12) 96px 0; text-align: center; }
.sound-stage__eyebrow { font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; opacity: 0.7; }
.sound-stage__name { margin: var(--space-3) 0 0; font-family: var(--font-display); font-size: var(--text-3xl); font-weight: var(--weight-regular); line-height: 1.05; letter-spacing: -0.01em; }
.sound-stage__line { max-width: 40ch; margin: var(--space-4) auto 0; font-size: 15px; line-height: 1.55; opacity: 0.8; text-wrap: pretty; }
.sound-stage .sound-stage__close { position: absolute; top: var(--space-4); right: var(--space-4); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: inherit; }
.sound-stage .sound-stage__close:hover { background: rgba(0, 0, 0, 0.5); }
.sound-stage__panel { position: relative; display: flex; flex: 0 1 auto; flex-direction: column; width: min(664px, 100% - 2 * var(--space-3)); min-height: 0; margin-top: var(--space-8); padding: var(--space-5) var(--space-8) var(--space-1); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; background: rgba(14, 16, 14, 0.42); -webkit-backdrop-filter: blur(22px) saturate(1.15); backdrop-filter: blur(22px) saturate(1.15); transition: opacity 300ms var(--ease-out); }
.sound-stage:is(.is-bare, .is-idle) .sound-stage__panel { opacity: 0; pointer-events: none; }
.sound-stage__label { display: flex; flex: none; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; opacity: 0.7; }
.sound-stage__label::before, .sound-stage__label::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.4; }
.sound-stage__lanes { flex: 0 1 var(--rows-h, 0px); min-height: min(var(--rows-h, 0px), 132px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; color: var(--color-text-on-dark); }
.sound-stage__lanes canvas { display: block; width: 100%; }
.sound-stage__silence { flex: none; margin: 0 0 var(--space-5); font-size: var(--text-base); text-align: center; opacity: 0.75; }
.sound-stage__bar { position: relative; flex: none; display: flex; justify-content: center; align-items: center; gap: var(--space-3); margin-top: auto; padding: var(--space-6) var(--space-6) var(--space-8); }
.sound-stage__bar :is(.lw-listen, .sound-stage__toggle) {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4) 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.45); border-radius: var(--radius-pill); background: rgba(0, 0, 0, 0.25); backdrop-filter: blur(8px);
  font: inherit; font-size: var(--text-base); font-weight: var(--weight-medium); color: inherit; cursor: pointer;
  transition: background-color var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}
.sound-stage__bar :is(.lw-listen, .sound-stage__toggle):hover { border-color: var(--color-text-on-dark); }
.sound-stage__bar .lw-listen[data-state="playing"], .sound-stage__toggle[aria-pressed="true"] { border-color: var(--color-text-on-dark); background: var(--color-text-on-dark); color: var(--color-surface-dark); }
.sound-stage__bar .lw-listen__ring { border-color: rgba(255, 255, 255, 0.4); border-top-color: var(--color-text-on-dark); }
.sound-stage__bar .lw-listen:hover [data-listen-text] { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .sound-stage[open] { animation: stage-in 320ms var(--ease-out); }
  .sound-stage[open]::backdrop { animation: stage-fade 320ms var(--ease-out); }
}
@keyframes stage-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes stage-fade { from { opacity: 0; } }
@media (max-width: 640px) {
  .sound-stage { width: 100%; height: 100dvh; border-radius: 0; }
  .sound-stage__head { padding: var(--space-12) 56px 0; }
  .sound-stage__name { font-size: var(--text-2xl); }
  .sound-stage__line { font-size: var(--text-base); }
  .sound-stage__panel { margin-top: var(--space-6); padding: var(--space-4) var(--space-5) 0; border-radius: 18px; }
  .sound-stage__bar { padding: var(--space-5) var(--space-4); }
}
/* A short box (a phone held sideways, a low window): a compact head and bar,
   so that the panel keeps room for its rows. */
@media (max-height: 640px) {
  .sound-stage__head { padding-top: var(--space-6); }
  .sound-stage__name { font-size: var(--text-2xl); }
  .sound-stage__line { margin-top: var(--space-2); }
  .sound-stage__panel { margin-top: var(--space-4); }
  .sound-stage__bar { padding: var(--space-4); }
}
@media (max-height: 480px) {
  .sound-stage__head { padding-top: var(--space-4); }
  .sound-stage__eyebrow, .sound-stage__line { display: none; }
  .sound-stage__name { margin-top: 0; font-size: var(--text-xl); }
  .sound-stage__panel { margin-top: var(--space-3); padding-top: var(--space-3); }
  .sound-stage__label { margin-bottom: var(--space-3); }
  .sound-stage__bar { padding: var(--space-3); }
}
/* On a card, Listen is a small outlined pill with its speaker, not a line
   of text: the card's one thing to do. Playing, it fills in. */
:is(.sound-card__actions, .xp-aside__sound) .lw-listen {
  min-height: 40px; padding: 0 var(--space-4) 0 14px; gap: var(--space-2);
  border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-surface);
  font-size: var(--text-base); font-weight: var(--weight-medium);
  transition: background-color var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}
:is(.sound-card__actions, .xp-aside__sound) .lw-listen:hover { border-color: var(--color-text); }
:is(.sound-card__actions, .xp-aside__sound) .lw-listen:hover [data-listen-text] { text-decoration: none; }
:is(.sound-card__actions, .xp-aside__sound) .lw-listen.is-playing,
:is(.sound-card__actions, .xp-aside__sound) .lw-listen[data-state="playing"] { border-color: var(--color-surface-dark); background: var(--color-surface-dark); color: var(--color-text-on-dark); }
:is(.sound-card__actions, .xp-aside__sound) .lw-listen[data-state="playing"] .lw-listen__ring { border-color: rgba(255, 255, 255, 0.4); border-top-color: var(--color-text-on-dark); }
:is(.sound-card__actions, .xp-aside__sound) .lw-listen:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* Below desktop width the practice and its place stack, each with room:
   the practice first and whole, the place under it after a clear gap, its
   picture beside its words while there is width for both. */
@media (max-width: 1100px) {
  .xp-layout { grid-template-columns: 1fr; gap: var(--space-10); }
  .xp { padding: var(--space-8); }
  .xp .xp-actions { justify-content: center; }
  .xp-aside { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(0, 3fr); }
  .xp-aside__body { padding: var(--space-6); }
  .xp-aside__picture { height: 100%; aspect-ratio: auto; }
  .sounds-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .xp { padding: var(--space-6) var(--space-5); }
  .xp-layout { gap: var(--space-8); }
  .xp-aside__body { padding: var(--space-5); }
  .xp-aside { grid-template-columns: 1fr; }
  .xp-aside__picture { height: auto; aspect-ratio: 16 / 9; }
  .sounds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xp-garden__bed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xp-field-of-lights { height: 260px; }
}

/* Journeys and challenges on their own pages, as the
   challenges: a large card each, a tall picture, then the words in the
   card's own padding, and what to do at its foot. */
.showcase-note {
  max-width: var(--measure-subtitle);
  margin: calc(var(--space-4) * -1) 0 var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-row-gap) var(--card-gap);
  align-items: stretch;
}

/* A large card is the small card's family, larger (DESIGN-SYSTEM.md, Card
   actions): a rounded picture, then on the page under it the title, its
   details, a short text and the action. No box around it. */
.showcase-card {
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  container-type: inline-size;
}

.showcase-card__media {
  position: relative;
  aspect-ratio: 4 / 3.6;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-muted);
}

.showcase-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}

.showcase-card:hover .showcase-card__media img {
  transform: scale(1.02);
}

.showcase-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) 2px 0;
}

.showcase-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  line-height: var(--leading-h2);
}

.showcase-card__link {
  color: inherit;
  text-decoration: none;
}

/* The whole card opens it. */
.showcase-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Two lines at most, as the other cards' descriptions. */
.showcase-card__text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
  text-wrap: pretty;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* The action follows the text closely, and lines up across a row. */
.showcase-card__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: 0;
}

.showcase-card__meta {
  /* Read with the title above it: closer than the body's gap. */
  margin-top: calc(var(--space-2) - var(--space-3));
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}


@media (max-width: 760px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
}

/* Discover's All, the app's Practice sections: picture tiles for the kinds
   of practice, soft option tiles for the shortcuts, one wide card for the
   month's feature. */
.practice-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--card-gap);
}

.practice-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: var(--picture-text-inset);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface-dark);
  color: var(--color-text-on-image);
  text-decoration: none;
}

.practice-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-expand) var(--ease-out);
}

.practice-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-picture-foot);
}

.practice-tile:hover img {
  transform: scale(1.03);
}

.practice-tile__name {
  position: relative;
  z-index: 1;
  line-height: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.practice-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
}

.practice-options--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.practice-option {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-height: 148px;
  justify-content: flex-end;
  padding: var(--tile-pad);
  border-radius: var(--radius);
  background: var(--option-tint, var(--color-surface-muted));
  color: var(--color-text);
  text-decoration: none;
  transition: filter var(--duration-hover) var(--ease-out);
}

.practice-option:hover {
  filter: brightness(0.97);
}

/* The app's own drawing for each feeling, in the text's color. */
.practice-option__icon {
  display: inline-flex;
  width: 36px;
  height: 30px;
  margin-bottom: auto;
  color: var(--color-text);
}

.practice-option__icon svg {
  width: 100%;
  height: 100%;
}

.practice-option__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--leading-h2);
}

/* The time cards: the length and its word at the top left, the count at
   the foot; the clock face on the right, its edge half the card's padding
   in. On hover it comes a touch closer and its hand moves on (app.js). */
.practice-option--time { position: relative; overflow: hidden; justify-content: flex-start; padding-right: 128px; }
.practice-option--time .practice-option__meta { margin-top: auto; }
.practice-option--time .practice-option__title, .practice-option--time .practice-option__meta { white-space: nowrap; }
/* Where three cards share a small width, the clock gives the words room. */
@media (max-width: 1180px) {
  .practice-option--time { padding-right: 100px; }
  .practice-option--time .time-dial { height: 58%; }
}
.practice-option--time .practice-option__title { font-size: var(--text-xl); }
.time-dial { position: absolute; top: 50%; right: calc(var(--tile-pad) / 2); width: auto; height: 76%; aspect-ratio: 1; transform: translateY(-50%); color: var(--color-text); pointer-events: none; transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1); }
.time-dial__face { fill: rgba(255, 255, 255, 0.55); stroke: currentColor; stroke-width: 1; opacity: 0.35; vector-effect: non-scaling-stroke; }
.time-dial__share { fill: currentColor; opacity: 0.07; transition: opacity 160ms var(--ease-out); }
.time-dial__share.is-hidden { opacity: 0; transition-duration: 120ms; }
.time-dial__hand { transform-origin: 50px 50px; }
.time-dial__hand line { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.time-dial__pin { fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .practice-option--time:hover .time-dial, .practice-option--time:focus-visible .time-dial { transform: translateY(-50%) scale(1.05); }
}

.practice-option__qualifier,
.practice-option__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.practice-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface-muted);
  color: var(--color-text);
  text-decoration: none;
}

.practice-featured__media {
  position: relative;
  min-height: 240px;
  background: var(--color-surface-dark);
}

.practice-featured__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.practice-featured__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--pad-card);
}

.practice-featured__month {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--title-card);
  font-weight: var(--weight-regular);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-display);
}

.practice-featured__list { display: flex; flex-direction: column; align-self: stretch; margin: var(--space-2) 0 var(--space-3); padding: 0; list-style: none; border-top: 1px solid var(--color-row-divider); }
.practice-featured__list li { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-row-divider); font-size: var(--text-sm); }
.practice-featured__list li span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.practice-featured__list li span + span { flex: none; white-space: nowrap; }

.practice-featured__about {
  margin: 0;
  max-width: 34ch;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text-muted);
}

.series-grid.grid--three .card__media { aspect-ratio: 16 / 10; }

/* A started journey on Plan: a square a day, as the mobile app draws it. */
.journey-days { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.journey-days__day { width: 14px; height: 14px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-dot); }
.journey-days__day.is-done { border-color: var(--color-progress); background: var(--color-progress); }
.journey-days__day.is-today { border: 2px solid var(--color-text); }

/* "Use AI in Endor": the mobile app's switch and its sheet. */
.switch { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--color-line-strong); cursor: pointer; transition: background-color 200ms var(--ease-out); }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--radius-round); background: var(--color-surface); box-shadow: var(--shadow-raised); transition: transform 200ms var(--ease-out); }
.switch.is-on { background: var(--color-text); }
.switch.is-on .switch__thumb { transform: translateX(18px); }
.switch[aria-disabled="true"] { opacity: 0.6; cursor: default; }
.switch:disabled { cursor: progress; }
.switch:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.settings-ai .settings-row { align-items: center; }
.settings-row.ai-sheet__switch { display: flex; align-items: center; justify-content: space-between; min-height: 0; margin-bottom: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-line); }
.ai-sheet__text p { margin: 0 0 var(--space-3); font-size: var(--text-base); line-height: var(--leading-body); color: var(--color-text-secondary); }
.ai-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.ai-plan__text { margin: 0; font-size: var(--text-base); }

/* Featured's page: the month's lead, larger, then all of the month. */
.featured-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  margin-bottom: var(--space-10);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.featured-lead__media { position: relative; min-height: 300px; background: var(--color-surface-dark); }
.featured-lead__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-lead__text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-3); padding: var(--pad-card); }
.featured-lead__title { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: var(--leading-h2); }
.featured-lead__expert { font-size: var(--text-sm); color: var(--color-text-muted); }
.featured-lead__about { margin: 0; max-width: 46ch; font-size: var(--text-base); line-height: var(--leading-body); color: var(--color-text-secondary); text-wrap: pretty; }
.featured-lead .button { margin-top: var(--space-2); }

@media (max-width: 720px) {
  .featured-lead { grid-template-columns: 1fr; }
  .featured-lead__media { min-height: 0; aspect-ratio: 16 / 9; }
}

/* The Browse and Types pages: three roomy cards to a row, so a page of a
   few kinds still reads full. */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
}

.browse-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--color-text);
  text-decoration: none;
}

.browse-card__media {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--space-2);
  padding: var(--picture-text-inset-large);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface-dark);
  color: var(--color-text-on-image);
}

.browse-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-expand) var(--ease-out);
}

.browse-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-picture-foot);
}

.browse-card:hover .browse-card__media img {
  transform: scale(1.03);
}

.browse-card__name {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

.browse-card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
}

.browse-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

@media (max-width: 900px) {
  .browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .practice-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .practice-options:not(.practice-options--three) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .practice-featured {
    grid-template-columns: 1fr;
  }

  .practice-options--three {
    grid-template-columns: 1fr;
  }
}

/* A filter's own tools: a search through what it
   shows, and Practice's kinds of practice. */
.filter-tools[hidden] { display: none; }

.filter-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.filter-tools__search {
  width: min(100%, 320px);
}

.filter-tools__topics[hidden] {
  display: none;
}

.filter-tools__topics {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 6px;
}

.filter--small {
  height: 34px;
  padding: 0 var(--space-4);
  font-weight: var(--weight-regular);
}

/* In a filter's grid every card's picture is the same height, whatever the
   card (course, lesson, journey), so a row lines up. */
[data-filter-view] .grid .card__media {
  aspect-ratio: 298 / 266;
}

/* "75 to explore", on the title's baseline at the right; it follows the
   filter. */
.is-beyond { display: none !important; }

.discover-more { display: flex; margin: var(--space-6) auto 0; }
.discover-more[hidden] { display: none; }

.discover-count {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Discover's "See all in Learn", under the grid when only Learn shows. */
.discover-see-all {
  margin-top: var(--space-8);
}

/* ---------- A category or label ---------- */

/* The category's cover beside its text, as the course page; a label with
   no cover is text alone at the subtitle measure. */
.topic-hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: var(--measure-subtitle);
}

.topic-hero--cover {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
}

@media (max-width: 960px) {
  .topic-hero--cover {
    grid-template-columns: 1fr;
  }
}

/* ---------- A journey ---------- */

.journey-start {
  margin-top: var(--space-3);
}

/* A chapter's days as rows: the day on the left, its sessions beside it. */
.journey-day-list { margin: 0; }
.journey-day-list,
.journey-habits {
  max-width: calc(var(--measure-subtitle) * 1.5);
  padding: 0;
  list-style: none;
}

.journey-day {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-6);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-line);
}

.journey-day__number {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.journey-day__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.journey-item__title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.journey-item__note {
  margin-top: var(--space-1);
  max-width: var(--measure-subtitle);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.journey-habit {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-line);
}

.journey-habit__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

.journey-habit__label {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.journey-habit p {
  margin-top: var(--space-1);
  max-width: var(--measure-subtitle);
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .journey-day {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* ---------- Session ---------- */

.session-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}

.session-hero__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-warm);
}

.session-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.session-hero__title {
  font-size: var(--title-card);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* 8px inset rows: thumbnail radius is 14 - 8. */
.step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--inset);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.step__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-nested);
  overflow: hidden;
  background: var(--color-surface-warm);
  flex-shrink: 0;
}

.step__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-form {
  display: inline;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  font-size: var(--text-sm);
}

.facts dt {
  color: var(--color-text-muted);
}

.facts dd {
  margin: 0;
}

/* ---------- Phone handoff ---------- */

.handoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8);
  align-items: center;
}

.handoff__qr {
  width: 220px;
  padding: var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-qr-bg);
}

.handoff__qr svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - var(--space-3));
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Lists ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.list__item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-line);
}

.list__item:first-child {
  border-top: 0;
}

a.list__item:hover {
  background: var(--color-surface-muted);
}

.list__main {
  flex: 1;
  min-width: 0;
}

.list__title {
  font-weight: var(--weight-medium);
}

.list__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.list__end {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.empty {
  padding: var(--space-10) var(--space-6);
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty :is(h2, h3) {
  font-size: var(--text-lg);
}

.empty p {
  margin: var(--space-2) auto var(--space-5);
  max-width: 440px;
  color: var(--color-text-muted);
}

/* ---------- Twin ---------- */

.light-total {
  font-family: var(--light-font);
  font-size: var(--text-3xl);
  font-weight: var(--light-weight-large);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Light points look delicate: thin, clean figures wherever
   they appear (the top bar, Progress, How worlds open, what a thing earns). */
[data-stat="light"], .progress-points, .lw-how__points, .lw-how__level-light {
  font-family: var(--light-font);
  font-weight: var(--light-weight);
  font-variant-numeric: tabular-nums;
}

.progress-pill__part[data-part="light"] svg { transition: filter 600ms var(--ease-out), color 600ms var(--ease-out); }
.progress-pill__part.is-gaining svg { color: var(--color-progress); filter: drop-shadow(0 0 4px rgba(255, 195, 127, 0.9)); }
.light-gain {
  position: absolute;
  top: 100%;
  left: 50%;
  font-family: var(--light-font);
  font-size: var(--text-sm);
  font-weight: var(--light-weight);
  color: var(--color-progress-text);
  white-space: nowrap;
  pointer-events: none;
  animation: light-gain 1.9s var(--ease-out) both;
}

/* Light on its way to the top bar (app.js `fly`): the figure in the light
   font, gold with a glow and no background, its label under it fading as
   it leaves. Above everything, never in the way of a click. */
.light-fly { position: fixed; z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 1px; pointer-events: none; transform: translate(-50%, -100%) scale(0.82); opacity: 0; will-change: transform, opacity; }
.light-fly--page { position: absolute; }
.light-fly strong { font-family: var(--light-font); font-size: 24px; font-weight: 700; line-height: 1; color: var(--color-progress); text-shadow: 0 0 14px rgba(255, 195, 127, 0.85), 0 1px 2px rgba(30, 26, 22, 0.25); white-space: nowrap; }
.light-fly span { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-progress-text); text-shadow: 0 0 8px rgba(255, 252, 246, 0.9); white-space: nowrap; opacity: var(--fly-label, 1); }

.light-gain--none {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  animation-duration: 2.4s;
}
@keyframes light-gain {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  25% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 1; transform: translate(-50%, -6px); }
  100% { opacity: 0; transform: translate(-50%, -12px); }
}

.meter {
  height: 6px;
  border-radius: var(--radius-round);
  background: var(--color-surface-muted);
  overflow: hidden;
}

/* Even at nothing it shows where it starts: a short light at the left. */
.meter__fill {
  min-width: 6px;
  height: 100%;
  border-radius: inherit;
  background: var(--color-progress);
}

/* The 2.0 twin on a light stage: twin.js redraws the shader's light as ink
   (--twin-ink) and the areas' light as gold (--twin-gold). The still figure
   shows until the GPU figure is drawing (twin.js adds is-live), and stays
   without WebGPU. */
.twin-stage {
  display: grid;
  grid-template-columns: minmax(0, 499fr) minmax(0, 408fr);
  gap: var(--card-gap);
  align-items: stretch;
  margin-bottom: var(--card-gap);
}

/* The figure's panel: "Your Twin" over the figure,
   its caption under it. The figure stands on a pale, cool light, so its
   blue lines read as light rather than ink. */
.twin-stage__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--pad-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

/* The figure stands in your current world, as in the 2.0 app: its picture,
   softly darkened toward the foot, with the figure drawn in light on it and
   the lit areas a warm white, so the light reads as light without gold.
   The controls are drawn light on the picture too. */
.twin-stage__figure {
  --twin-controls-band: 72px;
  --twin-ink: #f3f0e8;
  --twin-gold: #ffc37f;
  position: relative;
  flex: 1;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-nested);
  background:
    linear-gradient(180deg, rgba(20, 18, 16, 0.32), rgba(20, 18, 16, 0.58) 70%, rgba(20, 18, 16, 0.72)),
    var(--twin-world, none) center / cover no-repeat,
    #3a3530;
  color: #f3f0e8;
}

/* On the picture the controls have no ground of their own, even on hover:
   they brighten, and the open one is marked by a line under it. */
.twin-stage__figure .twin-control { color: rgba(243, 240, 232, 0.82); background: none; transition: color var(--duration-hover) var(--ease-out); }
.twin-stage__figure .twin-control:hover { background: none; color: #fff; }
.twin-stage__figure .twin-control.is-on { background: none; color: #fff; box-shadow: inset 0 -1.5px 0 #fff; border-radius: 0; }
.twin-stage__figure .twin-labels .twin-label__title { fill: #f3f0e8; }
.twin-stage__figure .twin-labels .twin-label__value { fill: rgba(243, 240, 232, 0.75); }
.twin-stage__figure .twin-labels .is-missing .twin-label__value { fill: rgba(243, 240, 232, 0.5); }
.twin-stage__figure .twin-labels path { stroke: rgba(243, 240, 232, 0.55); }
.twin-stage__figure .twin-labels circle { fill: #f3f0e8; }

/* Zoomed in, the figure fades out at the edges of its frame, so a body
   part never ends on a hard line. */
.twin-stage__figure.is-zoomed .twin-stage__canvas {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent), linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent), linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}

.twin-stage__caption {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* The figure is centred on the whole stage; the controls sit over its foot. */
.twin-stage__still,
.twin-stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The still has the app's dark ground baked in: on the darkened world its
   ground screens away and the figure stays light, as the app draws it. */
.twin-stage__still {
  object-fit: contain;
  mix-blend-mode: screen;
  /* Its ground is near black, not black: pressed to black it screens away
     entirely, and feathered edges leave no box. */
  filter: contrast(1.5) brightness(0.92);
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
  padding: var(--space-8) 0;
  opacity: 0.85;
  transition: opacity var(--duration-expand) var(--ease-out);
}

.twin-stage__canvas {
  opacity: 0;
  cursor: grab;
  touch-action: none;
  transition: opacity var(--duration-expand) var(--ease-out);
}

.twin-stage__canvas:active {
  cursor: grabbing;
}

/* Zoomed in, a drag moves the figure around. */
.twin-stage__figure.is-zoomed .twin-stage__canvas {
  cursor: move;
}

.twin-stage__figure.is-live .twin-stage__canvas {
  opacity: 1;
}

.twin-stage__figure.is-live .twin-stage__still {
  opacity: 0;
}

/* As the 2.0 twin lays them out: the (i) at the bottom left, play, rotate
   and zoom at the bottom right, the way back at the top left while zoomed. */
.twin-stage__controls {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-1);
  display: flex;
  gap: var(--space-1);
}

.twin-stage__info {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-1);
}

.twin-stage__reset {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
}

.twin-control.is-on {
  color: var(--color-progress-text);
  background: var(--color-hover);
}

.twin-control--zoom {
  width: auto;
  min-width: 34px;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
}

.twin-control__zoom {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

/* Rotate's dial and zoom's scale, beside the figure on its right. */
/* Rotate's dial and zoom's scale, straight on the picture as in the 2.0
   app: no box, light lines and words with a soft shadow for contrast. */
.twin-panel {
  position: absolute;
  top: 50%;
  right: var(--space-6);
  z-index: 2;
  width: 180px;
  color: #f3f0e8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  transform: translateY(-50%);
}

.twin-panel[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .twin-panel:not([hidden]) { animation: twin-panel-in 260ms var(--ease-out) both; }
}

@keyframes twin-panel-in { from { opacity: 0; transform: translate(8px, -50%); } to { opacity: 1; transform: translateY(-50%); } }

.twin-panel__caption {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  line-height: var(--leading-small);
  color: rgba(243, 240, 232, 0.8);
  text-align: center;
}

.twin-dial {
  position: relative;
  cursor: ew-resize;
  touch-action: none;
  border-radius: var(--radius-nested-tight);
}

.twin-dial:focus-visible,
.twin-scale:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.twin-dial__svg {
  display: block;
  width: 100%;
  height: auto;
}

.twin-dial__track {
  fill: none;
  stroke: rgba(243, 240, 232, 0.35);
  stroke-width: 0.9;
}

.twin-dial__arc {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
}

.twin-dial__dot {
  fill: #fff;
}

.twin-dial__angle {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.twin-scale {
  position: relative;
  height: 180px;
  margin: var(--space-2) 0 var(--space-4) var(--space-2);
  cursor: ns-resize;
  touch-action: none;
}

.twin-scale__track,
.twin-scale__fill {
  position: absolute;
  bottom: 0;
  left: 4px;
  width: 1px;
}

.twin-scale__track {
  top: 0;
  background: rgba(243, 240, 232, 0.35);
}

.twin-scale__fill {
  width: 2px;
  margin-left: -0.5px;
  background: #fff;
}

.twin-scale__tick {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(50%);
  font-size: var(--text-xs);
  color: rgba(243, 240, 232, 0.8);
}

.twin-scale__tick::before {
  content: "";
  width: 9px;
  height: 1px;
  background: rgba(243, 240, 232, 0.5);
}

.twin-scale__dot {
  position: absolute;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-round);
  background: #fff;
  transform: translateY(50%);
}

/* The zoom reads at the top right, clear of the marks; the scale's dot
   shows where it is (app.js still sets a bottom, which this sets aside). */
.twin-scale__value {
  position: absolute;
  top: -4px;
  right: 0;
  bottom: auto !important;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
}

.twin-stage__figure:not(.is-live) .twin-control:not(a) {
  display: none;
}

/* The controls sit straight on the stage, without circles: a soft round
   ground shows on hover and focus only. Each icon is centered in its own
   flex box, so the play/pause swap can't shift it. */
.twin-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-round);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--duration-hover) var(--ease-out);
}

.twin-control:hover {
  background: var(--color-hover);
}

.twin-control__icon,
.twin-control svg {
  display: block;
}

.twin-control svg {
  width: 16px;
  height: 16px;
}

.twin-control__icon {
  line-height: 0;
}

.twin-control[hidden],
.twin-control [hidden] {
  display: none;
}

.twin-control:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* As tall as the figure's panel, its five areas spread down that height
   rather than gathered at the top. */
.twin-stage__areas {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

/* "This figure is you": a warm card (Home's beige) with what the figure is
   on the left and three even steps on white tiles. The steps' icons are
   larger but muted and set in their tiles, so the five areas' icons (plain,
   in full ink, lit gold) stay the twin's own. */
.twin-first {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  padding: var(--pad-card);
  border-radius: var(--radius);
  background: var(--color-neutral-grey);
}

.twin-first__title {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-h2);
  font-weight: var(--weight-regular);
}

.twin-first__intro p {
  margin-top: var(--space-3);
  max-width: var(--measure-subtitle);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.twin-first__steps {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.twin-first__step {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-5);
  border-radius: var(--radius-nested);
  background: var(--color-surface);
}

.twin-first__icon {
  display: inline-flex;
  color: var(--color-text-muted);
}

.twin-first__subtitle {
  margin: 0 0 var(--space-1);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: var(--leading-small);
}

.twin-first__step p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.twin-first__text {
  flex: 1;
}

.twin-first__action {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-top: auto;
}

/* "Your check-ins": a day per line, how you felt on the
   right. */
.twin-checkins__list {
  margin: 0;
  padding: 0 var(--pad-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  list-style: none;
}

.twin-checkins__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.twin-checkins__item + .twin-checkins__item {
  border-top: 1px solid var(--color-row-divider);
}

.twin-checkins__date {
  color: var(--color-text-muted);
}

.twin-checkins__felt span {
  margin-right: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.twin-checkins__empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Two by two, each card as tall as the other in its row, each with an
   eyebrow, a title, its content and, where it has one, an action at its foot. */
.twin-lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--card-gap);
  margin-top: var(--section-gap);
}


@media (max-width: 900px) {
  .twin-lower { grid-template-columns: minmax(0, 1fr); }
}
.twin-lower:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }

.twin-card { height: 100%; container-type: inline-size; }
/* Four tiles need about 420px for "Light points" to stay on one line;
   narrower, they go two by two. */
@container (max-width: 420px) {
  .twin-card .progress-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twin-card .progress-tile { min-height: 96px; }
  .twin-card .progress-tile__label { min-height: 0; }
}
.twin-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.twin-card__head .eyebrow { margin: 0; }
.twin-card__foot { margin-top: auto; padding-top: var(--space-2); }

.twin-first__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.twin-first[hidden] {
  display: none;
}

@media (max-width: 1279px) {
  .twin-first {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 640px) {
  .twin-first__steps {
    grid-auto-flow: row;
  }
}

/* "Moments you chose to keep". */
.twin-moments {
  margin-top: var(--space-10);
}

.twin-moments__panel {
  display: grid;
  gap: var(--space-4);
}

.twin-moments__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.twin-moments__list:empty {
  display: none;
}

.twin-moments__item {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.twin-moments__item p {
  margin: var(--space-1) 0 0;
  white-space: pre-line;
}

.twin-moments__empty-title {
  margin: 0 0 var(--space-1);
  font-family: var(--font-display);
  font-size: 18px;
}

.twin-moments__form {
  display: grid;
  gap: var(--space-3);
}

/* An area as the 2.0 twin lists it: icon and name, then its word. Lit (an
   answer today), the icon takes the light's yellow and the word reads in
   full text color; on a light page the 2.0 gold text would be unreadable. */
/* The areas panel: how you felt on one line, then each area with its icon
   on the title's line, what lights it under the name, and its word on the
   right (gold icon and full ink once lit today). */
.twin-felt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-nested);
  background: var(--color-neutral-grey);
}

.twin-felt span {
  color: var(--color-text-muted);
}

.twin-felt strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
}

.twin-stage__rows {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: var(--space-3);
}

/* Each area takes its share of the card's height and centres in it, so the
   card is filled by the areas rather than by gaps between them. */
.twin-stage__rows .area-row {
  flex: 1;
  align-items: center;
}

.area-week {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.area-week__day {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--color-row-divider);
}

/* Neutral, as Endor's simple colors: a shared day in ink, as strong as its answer. */
.area-week__day.is-shared {
  background: rgba(44, 38, 32, calc(var(--share, 0.6) * 0.75));
}

/* The zoomed readouts, as the 2.0 twin draws them: a dot on the structure,
   a hairline out to the side, the title above it and the value below, in
   small tracked monospaced capitals. */
.twin-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.twin-labels svg { width: 100%; height: 100%; overflow: visible; }
.twin-labels text { font-family: "Space Mono", ui-monospace, monospace; font-size: var(--text-2xs); letter-spacing: 0.4px; text-transform: uppercase; }
.twin-labels .twin-label__title { fill: var(--color-text); }
.twin-labels .twin-label__value { fill: var(--color-progress-text); }
.twin-labels .is-missing .twin-label__value { fill: var(--color-text-subtle); }
.twin-labels path { fill: none; stroke: rgba(0, 0, 0, 0.42); stroke-width: 0.75; }
.twin-labels circle { fill: var(--color-progress-text); }
.twin-labels .is-missing circle { fill: var(--color-text-subtle); }

.area-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-row-divider);
}

.area-row__main {
  flex: 1;
  min-width: 0;
}

.area-row__about {
  margin-top: 2px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* The icon in a soft round ground of its own. */
.area-row__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background: var(--color-neutral-grey);
  color: var(--color-text);
}

.area-row .list__title {
  line-height: 22px;
}

.area-row__state {
  flex: none;
  line-height: 22px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: right;
}

.area-row__state strong {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.area-row.is-lit .area-row__icon {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-text);
  color: var(--color-text);
}

.area-row.is-lit .area-row__state {
  color: var(--color-text);
}

.area-row:first-child {
  border-top: 0;
}

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

.dots span {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-dot);
  background: var(--color-surface-muted);
}

.dots span.on {
  background: var(--color-text);
}

/* ---------- Guide ---------- */

.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bubble {
  max-width: 80%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-surface-muted);
  white-space: pre-wrap;
}

.bubble--user {
  align-self: flex-end;
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}

/* ---------- Forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-input);
  background: var(--color-surface);
}

.input[type="search"] {
  border-radius: var(--radius-search);
}

.panel :is(.input, .select, .textarea),
.card :is(.input, .select, .textarea) {
  border-radius: var(--radius-input-nested);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-grid .full {
  grid-column: 1 / -1;
}

[hidden] {
  display: none !important;
}

/* ---------- Progress ---------- */

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--inset-tight);
  padding: var(--inset-tight);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface-muted);
}

.segmented__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-nested-tight);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.segmented__item svg {
  color: var(--color-progress);
}

.segmented__item[aria-current="page"] {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: var(--weight-medium);
  box-shadow: var(--shadow-raised);
}

.segmented__value {
  font-variant-numeric: tabular-nums;
}

.progress-body {
  margin-top: var(--space-8);
}

.progress-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}


/* How Endor works: each term on its own line with its sentence. */
.how-terms { display: grid; margin: 0; }
.how-terms__row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--color-row-divider); }
.how-terms dt { font-weight: var(--weight-medium); }
.how-terms dd { margin: 0; color: var(--color-text-muted); }
.how-terms__note { display: block; margin-top: var(--space-1); color: var(--color-text); }
@media (max-width: 640px) { .how-terms__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); } }


/* A way to earn light, wherever it's listed, is a button that does it:
   its name, its points and a chevron, a tint and a check once done today.
   One row style for the progress page and the map. */
.light-actions { display: flex; flex-direction: column; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.light-action {
  display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: var(--space-3) var(--space-4);
  color: var(--color-text); text-decoration: none; font-size: var(--text-base);
  transition: background-color var(--duration-hover) var(--ease-out);
}
.light-action + .light-action { border-top: 1px solid var(--color-line); }
.light-action:hover, .light-action:focus-visible { background: var(--color-neutral-grey); }
.light-action:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.light-action__name { flex: 1; min-width: 0; font-weight: var(--weight-medium); }
.light-action__points { font-variant-numeric: tabular-nums; color: var(--color-text-muted); white-space: nowrap; }
.light-actions--small .light-action { min-height: var(--control-height); padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.light-actions--small .light-action__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Small lists keep the arrow and let the verb be heard, not seen, so each name keeps one line. */
.note-dialog__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-6); }
.note-dialog__actions .text-link { margin-left: auto; }
.note-dialog__kept { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--color-text); }
.note-dialog__kept[hidden] { display: none; }
.progress-points {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-subtle);
  white-space: nowrap;
}

.progress-points--done {
  color: var(--color-progress-text);
  font-weight: var(--weight-medium);
}

/* The streak tab's week spans the content's width in seven equal columns,
   as wide as the card under it, each day a tile filling its column. */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-3);
}

.week__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.week > .week__day > .week__square { width: 100%; height: 56px; }
@media (max-width: 640px) {
  .week { gap: var(--space-2); }
  .week > .week__day > .week__square { height: 40px; }
}

.week__square {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: calc(var(--radius) - 4px);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-line);
}

.week__square--lit {
  background: var(--color-progress);
  border-color: var(--color-progress);
}

.week__square--rest {
  background: var(--color-progress);
  border-color: var(--color-progress);
  opacity: 0.4;
}

.week__square--ahead {
  background: transparent;
  border-style: dashed;
}

.week__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.week-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.week-legend > span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.week-legend .week__square {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-legend-square);
}

/* Levels ahead: a path read left to right. What is left sits above the
   bar as its one line; the two ends are labelled under them, where you are
   at the start, where you are going at the end, smaller, as the bar's own
   legend. */
.levels-ahead { display: flex; flex-direction: column; gap: var(--space-6); }
.level-path { display: flex; flex-direction: column; }
.level-path__to-go { margin: 0 0 var(--space-4); font-weight: var(--weight-medium); }
.level-path__ends { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-top: var(--space-3); font-size: var(--text-sm); }
.level-path__here { color: var(--color-progress-text); font-weight: var(--weight-medium); }
.level-path__there { color: var(--color-text-muted); text-align: right; }

.levels-all > summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.progress-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

/* 8px inset tiles in a panel's grid: radius 14 - 8. */
/* The icon at the top; the number and its label at the foot, so a label
   that wraps ("Light points") never pushes its number out of line. */
.progress-tile {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  row-gap: var(--space-1);
  min-height: 112px;
  padding: var(--space-3);
  border-radius: var(--radius-nested);
  background: var(--color-surface-muted);
}

.progress-tile__icon { grid-row: 1; }
.progress-tile__value { grid-row: 3; }
.progress-tile__label { grid-row: 4; min-height: 2.6em; }

.progress-tile:hover {
  background: var(--color-neutral-grey);
  box-shadow: inset 0 0 0 1px var(--color-line);
}

.progress-tile__icon {
  color: var(--color-progress);
}

.progress-tile__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.progress-tile__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.ahead-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ahead-step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-3);
  color: var(--color-text-subtle);
}

.ahead-step--reached {
  color: var(--color-text);
}

.ahead-step__day {
  font-weight: var(--weight-medium);
}

/* ---------- Round 4: cards with footers, wrapping, worlds ---------- */

/* Titles balance their lines, paragraphs avoid a lone last word. */
h1,
h2,
h3,
h4,
.card__title,
.tile__title,
.game-tile__title,
.page-title,
.section__title {
  text-wrap: balance;
}

.page-title--home {
  font-size: var(--title-home);
}

@media (max-width: 720px) {
  :root {
    --title-page: 30px;
    --title-home: 34px;
    --title-feature: 32px;
    --title-card: 26px;
    --title-section: 20px;
  }
}

p,
.card__text,
.card__meta,
.tile__text,
.game-tile__text {
  text-wrap: pretty;
}

.page-lede,
.section__lede,
.wearable-invitation > p {
  max-width: 64ch;
}

/* Every card stacks the same way: picture, words, then its labels and meta
   at one gap under the words. */
.card {
  height: 100%;
}

.card__body {
  flex: 1;
}

.card__text {
  -webkit-line-clamp: 2;
}

/* The labels and meta follow the words at one gap on every card, rather
   than keeping to the card's foot: kept to the foot, a card with fewer
   words opened a gap between its words and its labels. (The body's own
   5px gap is part of it.) */
.card__footer {
  padding-top: calc(var(--card-footer-gap) - 5px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card__meta-row {
  --meta-sep: calc(var(--space-2) * 2 + var(--meta-square));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: var(--space-1);
  margin-left: calc(-1 * var(--meta-sep));
  clip-path: inset(-1em -1em -1em var(--meta-sep));
}

/* Between meta items, a small Endor square instead of a dot. Every item
   carries its square in the space before it; the row starts that far to the
   left and clips that strip, so the first item of each line, wrapped lines
   included, shows none. */
.card__meta-row > * {
  position: relative;
  padding-left: var(--meta-sep);
}

.card__meta-row > *::before {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--space-2);
  width: var(--meta-square);
  height: var(--meta-square);
  transform: translateY(-50%);
  background: currentColor;
}

.card__badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.card__rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Faces framed as on Human coaching: a 3:4 portrait, the face high in it. */
.card__media--directory {
  aspect-ratio: 3 / 4;
}

.card__media--directory img {
  object-position: 50% 22%;
  filter: grayscale(1);
}

.expert-card__role { display: block; margin-top: calc(var(--space-1) * -1); }

@media (max-width: 720px) {
  .grid.grid--three.experts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card__media--world.is-locked img {
  filter: grayscale(0.7);
  opacity: 0.75;
}

/* One row of experts, as many as fit; the rest are behind "All experts". */
.sleep-feature__expert {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--color-text-on-dark);
}

/* The expert's portrait framed on the face: the photos are upper-body
   portraits, so the circle takes their top third. */
.sleep-feature__expert img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  object-fit: cover;
  object-position: 50% 18%;
  filter: grayscale(1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.sleep-feature__expert small {
  display: block;
  margin-top: 3px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-on-dark-subtle);
}

.sleep-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--space-3);
  margin-bottom: 22px;
  font-size: var(--text-xs);
  color: var(--color-text-on-dark-muted);
}

.sleep-feature__meta span + span::before {
  content: "";
  display: inline-block;
  width: var(--meta-square);
  height: var(--meta-square);
  margin-right: var(--space-3);
  vertical-align: middle;
  background: currentColor;
}

/* The Guide and Twin cards: the same build, so their lines match. */
.quick-spaces {
  align-items: stretch;
}

.quick-space__visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 90px;
  flex-shrink: 0;
}

.quick-space__twin {
  height: 90px;
  width: auto;
  border-radius: calc(var(--radius) - 4px);
}

/* One line each while the two cards are wide enough; below that the titles
   wrap rather than push the page sideways. */
.quick-space > div {
  min-width: 0;
  max-width: var(--measure-subtitle);
}

@media (min-width: 1181px) {
  .quick-space :is(h2, h3) {
    white-space: nowrap;
  }
}

.game-tile {
  height: 100%;
}

.game-tile__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The kind and where it plays, at the tile's foot like every card's meta, at
   the brand's 12px, the smallest size not under our 11px floor. */
.game-tile__labels {
  margin-top: auto;
  padding-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.mini-world {
  overflow: hidden;
  justify-content: flex-end;
  background: var(--color-surface-dark);
}

.mini-world img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-world::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-picture-foot);
}

.mini-world__name {
  position: relative;
  z-index: 1;
  line-height: 1;
  font-weight: var(--weight-medium);
}

/* Worlds page: a strip of five portrait cards */
.world-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}

.world-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 176 / 260;
  padding: var(--picture-text-inset-large);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-dark);
  color: var(--color-text-on-image);
}

.world-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}

.world-card:hover img {
  transform: scale(1.03);
}

.world-card__shade {
  position: absolute;
  inset: 0;
  background: var(--scrim-picture);
}

.world-card__number,
.world-card__copy {
  position: relative;
  z-index: 1;
}

.world-card__number {
  font-size: var(--text-caps);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.world-card__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.world-card__copy small {
  font-size: var(--text-xs);
  opacity: 0.88;
}

.world-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.15;
  font-weight: var(--weight-medium);
  text-wrap: balance;
}

.world-card__status {
  font-size: var(--text-xs);
  opacity: 0.88;
}

.world-card__enter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
}

/* ---------- Round 5 ---------- */

/* The line at the foot of the side menu. It sits under
   Newsroom and Store and steps aside when the window is too short for it. */
.sidebar__bottom {
  margin-top: var(--nav-group-gap);
}

/* Tiril's line, pinned to the foot of the side menu with only the menu's
   own padding below it. Her wave spans exactly the words' width (the menu's
   padding plus the line's own), its stroke 1px (non-scaling, in the file),
   20px above the words; both kept pale. */
.sidebar__note {
  margin-top: auto;
  padding: var(--space-6) 14px 0;
  color: var(--color-hand-note);
}

/* The pen stroke above the note (layout's `note-line`). */
.note-line {
  display: block;
  width: 100%;
  height: 14px;
  margin: 0 0 calc(var(--foot-pad) - 7px);
  color: var(--color-hand-line);
  opacity: calc(var(--opacity-hand-line) * 0.85);
  overflow: visible;
}

/* One line always (at --text-hand it takes 172 of the menu's 177px), so
   the line above it stays level with the page footer's top line. */
.handwritten {
  font-family: var(--font-hand);
  font-size: var(--text-hand);
  line-height: var(--foot-line);
  white-space: nowrap;
}

@media (max-height: 880px) {
  .sidebar__note {
    display: none;
  }
}

@keyframes checkin-aura {
  0%,
  100% {
    opacity: 0.32;
    transform: scale(0.98);
  }

  50% {
    opacity: 0.52;
    transform: scale(1.02);
  }
}

/* The check-in: a white pill with a soft pastel halo
   breathing behind it. */
.checkin-pill {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--checkin-pill-height);
  padding: 0 var(--space-5) 0 var(--space-6);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-checkin);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  letter-spacing: 0.005em;
  color: var(--color-text);
  white-space: nowrap;
}

.checkin-pill svg {
  width: 16px;
  height: 16px;
}

.checkin-pill::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: calc(var(--radius) + 12px);
  background: var(--gradient-checkin-halo);
  filter: blur(15px);
  opacity: 0.3;
  animation: checkin-aura 7.5s ease-in-out infinite;
}

.checkin-pill:hover {
  border-color: var(--color-line-strong);
}

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

/* "Connect your wearable" as a light setup card, secondary to the check-in:
   the Guide and Twin tiles' padding, line and corners, no fill. The icon sits
   in the game tiles' soft circle; the title is body size, so it reads below
   the page's headings. The button sits under the text, on the left, so it
   never lines up with the check-in above; "Not now" goes to the far end. */
.wearable-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  margin-top: var(--opening-gap);
  padding: var(--tile-pad);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
}

.wearable-card[hidden] {
  display: none;
}

/* The icon in its own column, drawn plain like the side menu's icons. */
.wearable-card__icon {
  display: inline-flex;
  color: var(--color-text);
}

.wearable-card__icon svg {
  width: var(--wearable-icon-size);
  height: var(--wearable-icon-size);
}

.wearable-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.wearable-card__text {
  max-width: var(--measure-subtitle);
}

.wearable-card__text p {
  margin: 0;
}

.wearable-card__text p + p {
  margin-top: var(--space-1);
  text-wrap: pretty;
}

.wearable-card__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--wearable-icon-size);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.wearable-card__actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

/* "Not now": the quietest thing on the card. */
.wearable-card__dismiss {
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  cursor: pointer;
}

.wearable-card__dismiss:hover,
.wearable-card__dismiss:focus-visible {
  color: var(--color-text);
}

/* Two-sentence section descriptions: each sentence is an inline block, so
   both share a line when they fit, the second moves down whole when they
   don't, and a sentence wider than the line still wraps inside itself. */
.lede-part {
  display: inline-block;
  max-width: 100%;
}

/* Topic chips: a neutral grey, the brand's 12px, 10px at
   the sides (between round 7's 7 and round 8's 12). */
/* A long featured title set as a multi-line heading. */
.featured-copy h2.is-long {
  line-height: 1.15;
}

.featured-rating {
  margin-top: var(--space-4);
}

/* The twin figure, whole: a grey body with light lines. */
.quick-space__twin {
  width: auto;
  height: 90px;
  object-fit: contain;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1180px) {
  .grid--five {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .course-grid,
  .grid--four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .world-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-session,
  .session-hero,
  .world-corner,
  .layout-guide,
  .layout-twin,
  .twin-stage,
  .layout-plan,
  .layout-studio {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 260px;
    order: -1;
  }

  .grid--three,
  .grid--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  /* Beside the menu button, the symbol alone, with its two-square clear space */
  .topbar .logo-lockup {
    display: none;
  }

  .topbar .logo-symbol {
    display: block;
  }

  :root {
    --gutter: var(--space-4);
  }

  .topbar {
    gap: var(--space-3);
    padding: 0 var(--space-3);
  }

  .topbar__logo {
    width: auto;
    padding: 0 var(--logo-symbol-clear-space);
    border-right: 0;
  }

  .topbar .topbar__menu-button {
    display: inline-flex;
  }

  .topbar__nav {
    display: none;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    height: auto;
    width: min(300px, 86vw);
    z-index: 35;
    transform: translateX(-100%);
    transition: transform 240ms var(--ease-out);
  }

  body.menu-open .sidebar {
    transform: none;
  }

  body.menu-open .scrim {
    display: block;
    position: fixed;
    inset: var(--topbar-height) 0 0 0;
    z-index: 30;
    background: var(--color-scrim);
  }

  .sidebar__top-nav {
    display: flex;
    flex-direction: column;
    gap: var(--nav-item-gap);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-line);
  }

  .main {
    padding-top: var(--space-6);
  }

  .page-title {
    line-height: var(--leading-h2);
  }

  .featured-copy,
  .sleep-feature__copy {
    padding: var(--space-6);
  }

  .expert-hero,
  .handoff,
  .quick-spaces {
    grid-template-columns: 1fr;
  }

  .expert-hero__photo {
    max-width: 240px;
  }

  .grid--three,
  .grid--four,
  .grid--five,
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .world-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-space :is(h2, h3) {
    white-space: normal;
  }

  .topbar__search {
    display: none;
  }

  .topbar .topbar__search-link {
    display: inline-flex;
    margin-left: auto;
  }

  .topbar__right {
    margin-left: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .mini-worlds {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: var(--space-1);
  }

  .topbar__right {
    gap: 0;
  }

  .grid--three,
  .grid--four,
  .grid--five,
  .course-grid {
    grid-template-columns: 1fr;
  }
}

/* As the bar narrows the search shrinks first, then the stats but the light
   points hide. The avatar always stays. */
@media (min-width: 1450px) {
  :root {
    --gutter: 48px;
  }
}


/* The step comes where the search would otherwise go below its 160px. */
@media (max-width: 1000px) {
  .progress-pill__more {
    display: none;
  }
}

@media (max-width: 520px) {

  .segmented__item span:not(.segmented__value) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Settings ---------- */

/* Groups as in the app's settings: a title, then one card of rows with a
   line between them. */
.settings {
  max-width: 760px;
}

.settings-group {
  margin-top: var(--space-10);
}

.settings-group__title {
  margin-bottom: var(--space-3);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.settings-group__body {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.settings-group__body > * + * {
  border-top: 1px solid var(--color-line);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-3) var(--space-5);
}

.settings-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-row__label {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.settings-row__value {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.settings-row__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.settings-row__link:hover {
  color: var(--color-text);
}

.settings-note {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.settings-language {
  padding: var(--space-4) var(--space-5);
}

.settings-language fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.option-fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* A choice as a pill: our own round mark, so no browser margin pushes it
   off center; the pill is a touch tighter on the mark's side, where the
   round shape already reads as space. */
.option-field {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-4) 0 var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-nested);
  font-size: var(--text-base);
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--duration-hover) var(--ease-out);
}

.option-field:hover {
  border-color: var(--color-line-strong);
}

.option-field:has(input:checked) {
  border-color: var(--color-text);
}

.option-field:has(input:focus-visible) {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.option-field input {
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--color-text-subtle);
  border-radius: var(--radius-round);
  cursor: pointer;
}

.option-field input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: var(--color-text);
  transform: scale(0);
  transition: transform var(--duration-hover) var(--ease-out);
}

.option-field input:checked {
  border-color: var(--color-text);
}

.option-field input:checked::before {
  transform: scale(1);
}

.option-field input:focus-visible {
  outline: none;
}

.settings-language__note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.settings-language__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.settings-language__foot[hidden] {
  display: none;
}

/* Saving, saved, not saved: quiet, beside the choices, and gone a moment
   after it saved. */
.settings-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 40px;
  margin-left: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: opacity var(--duration-expand) var(--ease-out);
}

.settings-status[data-kind="saved"] {
  color: var(--color-text);
}

.settings-status[data-kind="failed"] {
  color: var(--color-error);
}

.settings-status[data-kind="gone"] {
  opacity: 0;
}

.settings-signout {
  margin-top: var(--space-10);
}

/* ---------- Motion ---------- */

/* Hover and focus: colours, fills, lines and rings ease in, never jump. */
:where(a, button, summary, input, select, textarea, .card, .chip, .tile, .game-tile, .quick-space) {
  transition-property: color, background-color, border-color, box-shadow, text-decoration-color, opacity;
  transition-duration: var(--duration-hover);
  transition-timing-function: var(--ease-out);
}

/* Expert names are links of their own wherever they appear: a thin underline
   at rest, offset and lighter than the text, darker on hover and focus. All from the --expert-link tokens. */
.expert-link,
.featured-author a,
.sleep-feature__expert-name {
  text-decoration: underline;
  text-decoration-thickness: var(--expert-link-thickness);
  text-underline-offset: var(--expert-link-offset);
  text-decoration-color: var(--expert-link-line);
  transition: text-decoration-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}

.expert-link:hover,
.expert-link:focus-visible,
.featured-author a:hover,
.featured-author a:focus-visible,
.sleep-feature__expert:hover .sleep-feature__expert-name,
.sleep-feature__expert:focus-visible .sleep-feature__expert-name {
  color: var(--color-text);
  text-decoration-color: var(--expert-link-line-hover);
}

.sleep-feature__expert-name {
  text-decoration-color: var(--expert-link-line-on-dark);
}

/* Between pages of the new app, a short cross-fade of the page itself; the
   top bar and the side menu stay still. Browsers without cross-document view
   transitions simply navigate. */
@view-transition {
  navigation: auto;
}

.topbar {
  view-transition-name: topbar;
}

.sidebar {
  view-transition-name: sidebar;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--duration-page);
  animation-timing-function: var(--ease-in-out);
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* The segmented control's indicator is one element moving between parts:
   on Progress each part is its own page, so the move is the page
   transition's, and the indicator slides rather than reappearing. */
.segmented__item { position: relative; }
.segmented__item > :not(.segmented__indicator) { position: relative; }
.segmented__item[aria-current="page"] { background: none; box-shadow: none; }
.segmented__indicator {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-nested-tight);
  background: var(--color-surface);
  box-shadow: var(--shadow-raised);
  view-transition-name: segmented-indicator;
}

::view-transition-group(segmented-indicator) {
  animation-duration: 320ms;
  animation-timing-function: var(--ease-out);
}

/* Gentle opening and closing, and panels that arrive rather than appear. */
@media (prefers-reduced-motion: no-preference) {
  :root { interpolate-size: allow-keywords; }

  details:not([data-expand])::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 280ms var(--ease-out), content-visibility 280ms allow-discrete;
  }

  details:not([data-expand])[open]::details-content { block-size: auto; }

  .checkin-step:not([hidden]),
  .lw-panel__place:not([hidden]),
  [data-filter-view]:not([hidden]) .grid,
  [data-all-view]:not([hidden]) {
    animation: panel-in 260ms var(--ease-out) both;
  }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Choices (development builds only) ---------- */

.choices__stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.choices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.choice {
  margin: 0;
}

.choice__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.choice__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-nested);
  background: var(--color-text);
  color: var(--color-text-on-dark);
  font-weight: var(--weight-medium);
}

.choice__current {
  padding: 2px var(--space-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-nested);
  font-size: var(--text-xs);
}

.choice__note {
  font-style: italic;
}


/* ---------- Card footer row ---------- */

/* Chips on the left, the length (and rating) on the right, on one line. The
   chips that don't fit fold into "+N" (app.js); without script they clip. */
.card__foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}

.chip-row--fit {
  flex: 1;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.chip-row--fit .chip[hidden] {
  display: none;
}

/* At most two chips on a card, and no fallback, before app.js measures;
   once it has (data-chip-fitted), the ones it leaves unhidden show. */
.chip-row--fit:not([data-chip-fitted]) .chip:is(:nth-child(n + 3), [data-chip-fallback]) {
  display: none;
}

a.chip:hover,
a.chip:focus-visible {
  border-color: var(--color-line-strong);
  color: var(--color-text);
}

.card__foot-row .card__meta-row {
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin-left: auto;
  clip-path: none;
}

/* Pushed to the end of the row, so it doesn't start at the clipped edge:
   its first item drops the space and square it would carry. */
.card__foot-row .card__meta-row > :first-child {
  padding-left: 0;
}

.card__foot-row .card__meta-row > :first-child::before {
  display: none;
}

/* Meta alone, without labels, starts the row and may wrap. */
.card__foot-row:not(:has(.chip-row)) .card__meta-row {
  flex-shrink: 1;
  flex-wrap: wrap;
  margin-left: 0;
}

/* Home's courses: exactly one full row at every width (as many cards as the
   grid has columns), never a ragged second row; "All courses" leads on. */
@media (max-width: 1180px) {
  .course-grid--one-row > :nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 960px) {
  .course-grid--one-row > :nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 420px) {
  .course-grid--one-row > :nth-child(n + 2) {
    display: none;
  }
}

/* ---------- Coaching ---------- */

/* The coaches are the page: photo-led cards, up to four across (two on
   narrower screens, one on phones). Three or four share the row; two keep
   their cards to --coach-card-max, side by side from the left; a lone coach
   gets a horizontal card. Every portrait is in black and white, so they
   read as one set. */
.coach-row {
  --coach-cols: 4;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc((100% - (var(--coach-cols) - 1) * var(--coach-gap)) / var(--coach-cols)), 1fr));
  gap: var(--coach-gap);
}

.coach-card {
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

/* A 3:4 box, no taller than --coach-photo-max; past that a wider card shows
   a wider crop. The photo is set to the box's height and centred on the face
   (--face-x, from the markup), so the eye line and the face's size stay the
   same at every width. */
.coach-card__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: var(--coach-photo-max);
  display: block;
  margin-bottom: var(--coach-photo-space);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-muted);
}

.coach-card__photo img {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  max-width: none;
  transform: translateX(calc(var(--face-x, 0.5) * -100%));
  filter: grayscale(1);
}

.coach-card__text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.coach-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-bottom: var(--coach-button-space);
}

.coach-card__name {
  font-family: var(--font-display);
  font-size: var(--text-coach-name);
  line-height: var(--leading-coach-name);
  font-weight: var(--weight-medium);
}

.coach-card__line {
  margin-top: var(--coach-line-space);
}

/* The intro is set like a larger card's description on Home, clearly above
   the small meta line. */
.coach-card__intro {
  margin-top: var(--coach-intro-space);
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
  color: var(--color-text-muted);
}

.coach-card__meet {
  align-self: flex-start;
  margin-top: var(--coach-meet-space);
  font-size: var(--text-sm);
}

button.coach-card__meet {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* "Book a call" spans the card, the same width in all four. */
.coach-card__actions .button {
  width: 100%;
  justify-content: center;
  gap: var(--coach-button-gap);
  font-size: var(--text-coach-button);
  font-weight: var(--weight-medium);
}

@media (max-width: 1180px) {
  .coach-row {
    --coach-cols: 2;
  }
}

@media (max-width: 720px) {
  .coach-row {
    --coach-cols: 1;
  }
}

@media (min-width: 721px) {
  .coach-row:has(> .coach-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, var(--coach-card-max)));
  }

  /* A lone coach: the portrait at its capped size on the left, the text and
     a hugging "Book a call" centred beside it. */
  .coach-row:has(> .coach-card:only-child) .coach-card {
    flex-direction: row;
    align-items: center;
    gap: var(--coach-solo-gap);
  }

  .coach-row:has(> .coach-card:only-child) .coach-card__photo {
    flex: none;
    width: calc(var(--coach-photo-max) * 3 / 4);
    margin-bottom: 0;
  }

  .coach-row:has(> .coach-card:only-child) .coach-card__text {
    flex: 0 1 var(--measure-subtitle);
  }

  .coach-row:has(> .coach-card:only-child) .coach-card__body {
    flex: none;
  }

  .coach-row:has(> .coach-card:only-child) .coach-card__actions .button {
    width: auto;
  }
}

/* ---------- The check-in dialog ---------- */

/* The check-in, in the design system's colors, type and corners: a 520px sheet with a bar
   naming it, then one column with her spacing. The AI sheet (personal.clj)
   shares the shell. */
.checkin-dialog {
  width: min(var(--checkin-width), calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-overlay);
}
.checkin-dialog::backdrop { background: rgba(0, 0, 0, 0.32); }
.checkin-dialog__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
}
.checkin-dialog__title { font-family: var(--font-display); font-size: var(--text-md); }
.checkin-close {
  position: absolute;
  top: 50%;
  left: var(--space-5);
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border-radius: var(--radius-nested);
  background: var(--color-neutral-grey);
}
.checkin-dialog__body { padding: 28px var(--space-8); }
.checkin-step { display: block; }
.checkin-step[hidden] { display: none; }
.checkin-eyebrow { margin: 0 0 var(--space-5); }
.checkin-step__title {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--weight-regular);
  line-height: 1.18;
  letter-spacing: -0.02em;
  outline: none;
}
.checkin-lede { margin: -10px 0 var(--space-6); font-size: var(--text-base); line-height: 1.6; color: var(--color-text-muted); }

/* How are you: the answer in words over the slider, the slider in its band. */
.checkin-feel { margin: 30px 0 13px; }
.checkin-feel__word {
  min-height: 30px;
  margin: 0 0 15px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.3;
  color: var(--color-text-secondary);
}
.checkin-range {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-neutral-grey);
}
.checkin-slider, .checkin-part input {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.checkin-slider::-webkit-slider-runnable-track, .checkin-part input::-webkit-slider-runnable-track { height: 4px; border-radius: 3px; background: var(--gradient-ci-track); }
.checkin-slider::-moz-range-track, .checkin-part input::-moz-range-track { height: 4px; border-radius: 3px; background: var(--gradient-ci-track); }
.checkin-slider::-webkit-slider-thumb, .checkin-part input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow var(--duration-hover) var(--ease-out);
}
.checkin-slider::-moz-range-thumb, .checkin-part input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}
.checkin-slider:active::-webkit-slider-thumb, .checkin-part input:active::-webkit-slider-thumb { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0.06); }
.checkin-slider:focus-visible, .checkin-part input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 8px; border-radius: 4px; }

.checkin-quickrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); margin-bottom: 25px; }
.checkin-hint { margin: 0; font-size: var(--text-2xs); line-height: 1.6; color: var(--color-text-muted); }
.checkin-hint__keys { display: block; }
.checkin-hint__keys[hidden] { display: none; }
.checkin-dialog .text-link { font-size: 13px; text-underline-offset: 4px; }
.checkin-deeper { flex: none; min-height: 40px; padding: 0; border: 0; background: none; cursor: pointer; }

/* Your intention, once you've answered: a card with its icon on a dark round. */
.checkin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 25px 0;
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-neutral-grey);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--duration-hover) var(--ease-out), background-color var(--duration-hover) var(--ease-out);
}
.checkin-card:hover, .checkin-method:hover { border-color: var(--color-line-strong); background: var(--color-surface); }
.checkin-card__icon, .checkin-method__icon {
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}
.checkin-card__icon { width: 50px; height: 50px; }
.checkin-card__text { flex: 1; min-width: 0; }
.checkin-card__text strong, .checkin-card__text small { display: block; font-weight: var(--weight-regular); overflow-wrap: anywhere; }
.checkin-card__text strong { margin-bottom: 5px; font-size: 15px; }
.checkin-card__text small { font-size: var(--text-xs); line-height: 1.4; color: var(--color-text-muted); }
.checkin-arrow { display: inline-flex; flex: none; color: var(--color-text-muted); }

/* Then let Endor measure: the mobile app's two readings, side by side. */
.checkin-methods { margin: 27px 0 22px; }
.checkin-methods h3 { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: var(--text-wearable-heading); font-weight: var(--weight-regular); line-height: 1.3; }
.checkin-label { margin: 0 0 13px; font-size: var(--text-2xs); line-height: 1.6; color: var(--color-text-muted); }
.checkin-method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.checkin-method {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-neutral-grey);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--duration-hover) var(--ease-out), background-color var(--duration-hover) var(--ease-out);
}
.checkin-method__icon { width: 64px; height: 64px; margin-bottom: 10px; }
.checkin-method strong { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); line-height: 1.3; }
.checkin-method small { font-size: var(--text-xs); line-height: 1.5; color: var(--color-text-muted); }

.checkin-history {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 17px 0;
  border-top: 1px solid var(--color-line);
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--color-text);
  text-decoration: none;
}
.checkin-history:hover .checkin-arrow { color: var(--color-text); }
.checkin-note { margin: 18px 0 0; font-size: var(--text-2xs); line-height: 1.7; color: var(--color-text-muted); }

/* What to do, in a footer that stays at the foot of the sheet: the main
   action full width, then Back on the left and the quiet other way (Skip,
   Nothing specific, Edit my answers) on the right, a full row below it. */
.checkin-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); margin-top: 30px; }
.checkin-actions[hidden] { display: none; }
.checkin-step .checkin-actions {
  position: sticky; bottom: 0; z-index: 1;
  margin: 30px calc(var(--space-8) * -1) -28px; padding: var(--space-4) var(--space-8) var(--space-5);
  border-top: 1px solid var(--color-line); background: var(--color-surface);
}
.checkin-actions > .checkin-primary-action { order: -1; flex: 1 0 100%; }
.checkin-actions > .checkin-back { order: 1; margin-right: auto; }
.checkin-actions > .text-link:not(.checkin-back) { order: 2; margin-left: auto; }
.checkin-actions > .text-link:only-of-type:not(.checkin-back) { margin-right: auto; }
.checkin-back { display: inline-flex; align-items: center; gap: var(--space-1); }
/* How are you keeps Done in the page's flow, under the history. */
.checkin-step[data-ci-step="feel"] .checkin-actions { position: static; margin: var(--space-2) 0 0; padding: 0; border: 0; flex-direction: column; align-items: flex-start; }
.checkin-primary-action { width: 100%; min-height: 52px; justify-content: center; }
.checkin-actions > .text-link { min-height: 40px; padding: 0; border: 0; background: none; cursor: pointer; }
.checkin-error { margin: 0 0 var(--space-4); font-size: var(--text-sm); color: var(--color-error); }
.checkin-error[hidden] { display: none; }

.checkin-remove { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.checkin-remove[hidden], .checkin-remove__confirm[hidden], .checkin-remove .text-link[hidden] { display: none; }
.checkin-remove .text-link { padding: 0; border: 0; background: none; color: var(--color-text-muted); cursor: pointer; }
.checkin-remove__confirm { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); }
.checkin-remove .checkin-remove__yes { color: var(--color-error); }

/* Go deeper: the radar, then its sliders under a quiet line. */
.checkin-radar-wrap { position: relative; width: 100%; max-width: var(--checkin-radar-size); margin: 18px auto var(--space-3); }
.checkin-radar { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; }
.checkin-radar__ring { fill: none; stroke: var(--color-line); stroke-width: 1; }
.checkin-radar__spoke { stroke: var(--color-line-strong); stroke-width: 1; }
.checkin-radar__shape { fill: rgba(0, 0, 0, 0.05); stroke: var(--color-text-secondary); stroke-width: 1.2; transition: opacity 200ms var(--ease-out); }
.checkin-radar__point { fill: var(--color-line-strong); stroke: var(--color-surface); stroke-width: 1; cursor: grab; }
.checkin-radar__point.is-shared { fill: var(--color-text); }
.checkin-radar__point.is-active { cursor: grabbing; }
.checkin-radar-labels { position: absolute; inset: 0; pointer-events: none; }
.checkin-radar__label { position: absolute; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); font-size: var(--text-xs); line-height: 16px; white-space: nowrap; }
.checkin-radar__word { font-size: var(--text-2xs); color: var(--color-text-muted); }

.checkin-sliders { padding-top: 15px; border-top: 1px solid var(--color-line); font-size: var(--text-sm); color: var(--color-text-muted); }
.checkin-sliders summary { min-height: 30px; line-height: 1.5; cursor: pointer; }
.checkin-parts { display: grid; gap: 18px; padding: 13px 0; }
.checkin-part label { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--color-text); }
.checkin-part strong { font-weight: var(--weight-medium); }
.checkin-part output { color: var(--color-text-muted); }

/* The heart reading and the wearable: what they are, and that they happen in the mobile app. */
.checkin-tabs { display: flex; gap: var(--space-1); margin: 0 0 22px; padding: var(--space-1); border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: var(--color-neutral-grey); }
.checkin-tabs button { width: 50%; min-height: 38px; border: 0; border-radius: var(--radius-pill); background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.checkin-tabs button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); }
.checkin-orb { display: grid; place-items: center; width: 150px; height: 150px; margin: 26px auto var(--space-6); border: 1px solid var(--color-line); border-radius: 50%; background: radial-gradient(var(--color-neutral-grey), transparent 65%); }
.checkin-orb [hidden] { display: none; }
.checkin-orb__line { margin: 0; }
.checkin-box { margin: var(--space-5) 0; padding: 19px; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-neutral-grey); }
.checkin-box strong { font-size: var(--text-base); font-weight: var(--weight-medium); }
.checkin-box p { margin: 10px 0; font-size: var(--text-xs); line-height: 1.7; color: var(--color-text-muted); }

/* A few words, and the intention's own word. */
.checkin-field {
  width: 100%;
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-input);
  background: var(--color-neutral-grey);
  font: inherit;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
}
.checkin-field:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.checkin-textarea { min-height: 150px; resize: vertical; }
.checkin-or { margin: var(--space-6) 0 14px; font-size: var(--text-sm); text-align: center; color: var(--color-text-muted); }
.checkin-chips { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.checkin-chip { min-height: 47px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: var(--color-neutral-grey); font: inherit; font-size: var(--text-base); color: var(--color-text-secondary); cursor: pointer; }
.checkin-chip[aria-pressed="true"] { border-color: var(--color-text); background: var(--color-surface); color: var(--color-text); }

/* Your experience, in your words. */
.checkin-overall { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: var(--space-5) 0; padding: var(--space-4) 0; border-bottom: 1px solid var(--color-line); font-size: var(--text-base); }
.checkin-overall[hidden] { display: none; }
.checkin-overall span { color: var(--color-text-muted); }
.checkin-overall strong { font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-regular); }
.checkin-review__row[hidden] { display: none; }
.checkin-dialog button:focus-visible, .checkin-dialog summary:focus-visible, .checkin-dialog a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

/* The AI sheet shares the shell: Save and Not now side by side. */
.ai-sheet .checkin-actions { flex-direction: row; justify-content: flex-start; gap: var(--space-5); margin-top: var(--space-4); }

@media (max-width: 520px) {
  .checkin-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .checkin-dialog__body { padding: var(--space-6); }
  .checkin-step .checkin-actions { margin: 30px calc(var(--space-6) * -1) calc(var(--space-6) * -1); padding: var(--space-4) var(--space-6) var(--space-5); }
  .checkin-method { padding: var(--space-4); }
  .checkin-method__icon { width: 58px; height: 58px; }
  .checkin-method strong { font-size: 15px; }
  .checkin-quickrow { gap: var(--space-3); }
  .checkin-hint { font-size: var(--text-2xs); }
}

/* ---------- A coach's page and booking ---------- */

/* Back to the list the page belongs to, small and quiet above the head. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

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

/* The portrait at the lone coach card's size, the text beside it. */
.coach-hero {
  display: flex;
  align-items: center;
  gap: var(--coach-solo-gap);
}

.coach-hero .coach-card__photo {
  flex: none;
  width: calc(var(--coach-photo-max) * 3 / 4);
  margin-bottom: 0;
}

.coach-hero__text {
  display: flex;
  flex-direction: column;
  max-width: var(--measure-subtitle);
}

.coach-hero__text .page-title {
  margin-top: var(--page-intro-eyebrow-gap);
}

.coach-hero__line {
  margin-top: var(--coach-line-space);
}

.coach-hero__text .page-lede {
  margin-top: var(--coach-intro-space);
}

.coach-hero__facts {
  margin-top: var(--coach-intro-space);
  font-size: var(--text-base);
}

.coach-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
  margin: var(--coach-button-space) 0 var(--space-3);
}

.coach-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
  max-width: calc(var(--measure-subtitle) * 2);
}

.coach-columns__title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.coach-columns__text,
.coach-about {
  margin-top: var(--space-2);
  max-width: var(--measure-subtitle);
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
  color: var(--color-text-muted);
}

/* Each "before" beside its "after", separated by a hairline. */
.before-after {
  max-width: calc(var(--measure-subtitle) * 2);
  padding: 0;
  list-style: none;
}

.before-after__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-line);
}

.before-after__row p {
  margin-top: var(--space-1);
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
}

.before-after__row > div:first-child p {
  color: var(--color-text-muted);
}

.booking-panel {
  max-width: var(--measure-subtitle);
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.booking-form__actions {
  margin-top: var(--space-2);
}

.faq {
  max-width: var(--measure-subtitle);
}

.faq__item {
  border-top: 1px solid var(--color-line);
}

.faq__item summary {
  padding: var(--space-4) 0;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.faq__item p {
  padding-bottom: var(--space-4);
  font-size: var(--text-card-description);
  line-height: var(--leading-card-description);
  color: var(--color-text-muted);
}

/* The times: one column per day, as many as fit. */
.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--card-gap);
  margin-top: var(--space-4);
}

.times-day__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.times-day__weekday {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.times-day__slots {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.times-slot {
  display: block;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-nested);
  font-size: var(--text-base);
  text-align: center;
}

.times-slot:hover {
  background: var(--color-surface-muted);
}

.times-note {
  margin-top: var(--section-gap);
  max-width: var(--measure-subtitle);
}

@media (max-width: 720px) {
  .coach-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .coach-hero .coach-card__photo {
    width: 100%;
  }

  .coach-columns,
  .before-after__row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

.game-tile__icon svg {
  width: var(--game-icon-size);
  height: var(--game-icon-size);
}

/* The worlds corner on wide windows: text and worlds share the width evenly,
   so the three worlds grow (keeping their shape) instead of leaving a gap
   beside short text. */
@media (min-width: 1450px) {
  .world-corner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .mini-world {
    aspect-ratio: 157 / 190;
  }
}

/* On a dark ground or over a picture, a link keeps its light color when
   hovered or focused; only its underline or arrow says so. Buttons and
   chips there (and the round play) carry their own colors. A new dark
   surface joins this list. */
:is(.panel--dark, .sleep-feature__banner, .mini-world, .bubble--user) a:not(.button, .chip, .round-play):is(:hover, :focus-visible),
:is(.panel--dark, .sleep-feature__banner, .mini-world, .bubble--user) a:not(.button, .chip, .round-play):is(:hover, :focus-visible) :not(small, small *) {
  color: var(--color-text-on-dark);
}

/* On the Twin's picture, focus rings are light so they show. */
.twin-stage__figure .twin-control:focus-visible,
.twin-stage__figure .twin-dial:focus-visible,
.twin-stage__figure .twin-scale:focus-visible {
  outline-color: #fff;
}

/* On a phone the space between cards steps down with the screen; it stays
   one value, across and down. */
@media (max-width: 600px) {
}

/* ---------- My Twin, as a picture of you over time ---------- */

/* An answer anywhere on My Twin is shown in the colour it was given in:
   personal.clj samples the check-in slider's track at its value (--step). */

/* "Your Twin": the world you stand in behind the whole card, darkened
   toward the foot, with every word on it light. */
.twin-stage__panel {
  position: relative;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(180deg, rgba(20, 18, 16, 0.5), rgba(20, 18, 16, 0.38) 26%, rgba(20, 18, 16, 0.5) 70%, rgba(20, 18, 16, 0.78)),
    var(--twin-world, none) center / cover no-repeat,
    #3a3530;
  color: #f3f0e8;
}
.twin-stage__panel .eyebrow { color: rgba(243, 240, 232, 0.78); }
.twin-stage__panel .panel__title { color: #f3f0e8; }
.twin-stage__panel .twin-stage__caption { color: rgba(243, 240, 232, 0.72); }
.twin-stage__figure { background: none; border-radius: 0; min-height: 500px; }
.twin-stage__figure .twin-control:focus-visible { outline: 2px solid #f3f0e8; outline-offset: 2px; }

/* The five areas: plain icons in ink, no grounds, all on one grid so the
   names, lines and states line up; today's answer as a dot in its colour. */
.twin-stage__rows .area-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: center; padding: var(--space-3) 0; }
.area-row__icon, .area-row.is-lit .area-row__icon { width: 28px; height: 28px; border-radius: 0; background: none; box-shadow: none; color: var(--color-text-muted); align-self: start; margin-top: 1px; }
.area-row.is-lit .area-row__icon { color: var(--color-text); }
.area-row__state { align-self: start; }
.area-state { display: inline-flex; align-items: center; gap: var(--space-2); }
.area-state__dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--step, var(--color-line)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.area-state.is-past { color: var(--color-text-muted); }
.area-state.is-past .area-state__dot { opacity: 0.55; }
.area-week { align-items: center; }
.area-week__day.is-shared { background: var(--step); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.area-week__day:last-child { outline: 1px solid var(--color-line-strong); outline-offset: 1px; }
.area-week__label { margin-right: var(--space-1); font-size: var(--text-2xs); color: var(--color-text-subtle); white-space: nowrap; }
/* How you felt: both words on one centre line in their grey box. */
.twin-felt { align-items: center; }
.twin-felt strong { line-height: 1; }

/* The last 14 days. */
.twin-time { margin-top: var(--section-gap); }
.twin-time__felt { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: center; gap: var(--space-6); margin-bottom: var(--card-gap); }
.twin-time__label h3 { margin: 0 0 var(--space-1); font-size: var(--text-base); font-weight: var(--weight-medium); }
.twin-time__label p { margin: 0; }
.felt-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.felt-strip__day { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.felt-strip__square { width: 100%; aspect-ratio: 1; max-width: 36px; border-radius: 6px; background: var(--color-neutral-grey); box-shadow: inset 0 0 0 1px var(--color-line); }
.felt-strip__day.is-shared .felt-strip__square { background: var(--step); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.felt-strip__letter { font-size: var(--text-2xs); color: var(--color-text-subtle); text-transform: uppercase; }
.felt-strip__day:last-child .felt-strip__letter { color: var(--color-text); font-weight: var(--weight-medium); }

.reading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--card-gap); }
.reading { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--pad-card); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.reading__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.reading__name { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.reading__when { font-size: var(--text-xs); color: var(--color-text-subtle); white-space: nowrap; }
.reading__value { display: flex; align-items: baseline; gap: var(--space-1); margin: var(--space-1) 0 0; }
.reading__value strong { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.1; font-variant-numeric: tabular-nums; }
.reading__value span { font-size: var(--text-sm); color: var(--color-text-muted); }
.reading-spark { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); align-items: stretch; gap: 3px; height: 40px; margin-top: var(--space-2); }
.reading-spark__track { position: relative; justify-self: center; width: min(100%, 6px); height: 100%; background: var(--chart-track); }
.reading-spark__bar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--h, 0) * 100%); min-height: 2px; background: var(--chart-ink-3); }
.reading-spark__bar.is-latest { background: var(--chart-ink-4); }
.reading__usual { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.twin-time__empty { margin: 0; }
.twin-time__foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-5); }
.twin-again { font-size: var(--text-sm); color: var(--color-text-muted); }
.twin-moments__line { display: block; font-size: var(--text-base); color: var(--color-text-muted); }
.twin-time__foot p { margin: 0; }
.twin-time__foot .button { margin-top: var(--space-4); }

/* Progress: room inside each tile, the icon beside its number, and air
   between the tiles and the bar. */
.twin-card .progress-tiles { gap: var(--space-3); }
.progress-tile { grid-template-rows: auto auto; grid-template-columns: auto 1fr; align-content: space-between; column-gap: var(--space-2); row-gap: var(--space-3); min-height: 104px; padding: var(--space-4); background: var(--color-neutral-grey); }
.progress-tile__icon { grid-row: 1; grid-column: 1 / -1; }
.progress-tile__value { grid-row: 2; grid-column: 1; font-size: var(--text-2xl); }
.progress-tile__label { grid-row: 3; grid-column: 1 / -1; min-height: 0; }
.twin-card .meter { margin-top: var(--space-4); }
@container (max-width: 420px) {
  .twin-card .progress-tile { min-height: 96px; }
}

/* What your Twin learns: a rail of steps, those reached filled, the next
   marked with a soft halo, as the app's rail. */
.ahead-rail { position: relative; display: flex; flex-direction: column; gap: var(--space-4); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.ahead-rail::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 5px; width: 1px; background: var(--color-line); }
.ahead-rail__step { position: relative; display: grid; grid-template-columns: 12px 5.5rem minmax(0, 1fr); align-items: baseline; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-subtle); }
.ahead-rail__mark { position: relative; top: 1px; width: 11px; height: 11px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-dot); background: var(--color-surface); }
.ahead-rail__day { font-weight: var(--weight-medium); }
.ahead-rail__step.is-reached { color: var(--color-text); }
.ahead-rail__step.is-reached .ahead-rail__mark { border-color: var(--color-progress); background: var(--color-progress); }
.ahead-rail__step.is-next { color: var(--color-text); }
.ahead-rail__step.is-next .ahead-rail__mark { border-color: var(--color-progress); box-shadow: 0 0 0 4px rgba(238, 180, 102, 0.22); }

/* The one line on privacy, where the page ends. */
.twin-privacy { display: flex; align-items: flex-start; gap: var(--space-2); max-width: 64ch; margin: var(--section-gap) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.twin-privacy svg { flex: none; margin-top: 3px; }

@media (max-width: 720px) {
  .twin-time__felt { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .felt-strip { gap: var(--space-1); }
}

/* The Twin's controls: one slim rail of frosted glass on the figure's right
   edge, centred on it, as controls sit on a map: zoom in, the zoom, zoom
   out; turn left, turn right; play or pause. Light on the picture. */
.twin-rail {
  position: absolute; top: 50%; right: var(--space-3); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-1);
  border: 1px solid rgba(243, 240, 232, 0.2); border-radius: var(--radius-pill);
  background: rgba(20, 18, 16, 0.32); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: translateY(-50%);
}
.twin-rail__button {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: rgba(243, 240, 232, 0.86); cursor: pointer;
  transition: background-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}
.twin-rail__button svg { display: block; }
.twin-rail__button:hover { background: rgba(243, 240, 232, 0.14); color: #fff; }
.twin-rail__button:disabled { opacity: 0.35; cursor: default; background: none; }
.twin-rail__button:focus-visible { outline: 2px solid #f3f0e8; outline-offset: 1px; }
.twin-rail__value { min-width: 28px; font-family: "Space Mono", ui-monospace, monospace; font-size: var(--text-2xs); line-height: 16px; text-align: center; color: rgba(243, 240, 232, 0.86); }
.twin-rail__rule { width: 16px; height: 1px; margin: var(--space-1) 0; background: rgba(243, 240, 232, 0.24); }
.twin-rail [data-twin-icon][hidden] { display: none; }

/* What your Twin learns fills its card beside Progress: the rail takes the
   height left and spreads its five steps over it, each with room to read. */
.twin-lower > .twin-card { display: flex; flex-direction: column; }
.twin-lower .ahead-rail { flex: 1; justify-content: space-between; gap: var(--space-5); margin: var(--space-4) 0 var(--space-4); }
.twin-lower .ahead-rail__step { font-size: var(--text-base); line-height: 1.4; }
.twin-lower .ahead-rail::before { top: 10px; bottom: 10px; }
.twin-lower .ahead-rail__mark { top: 2px; }
.twin-lower .twin-card > .small.muted:last-child { margin-top: auto; }
.twin-rail__rule:has(+ [hidden]) { display: none; }

/* The check-in's footer on one row: Back on the left, then the quiet other
   way (Skip, Nothing specific, Edit my answers) beside the main button on
   the right. */
.checkin-step .checkin-actions { flex-wrap: nowrap; justify-content: flex-end; gap: var(--space-5); }
.checkin-step .checkin-actions > .checkin-back { order: 0; margin-right: auto; }
.checkin-step .checkin-actions > .text-link:not(.checkin-back) { order: 1; margin: 0; }
.checkin-step .checkin-actions > .checkin-primary-action { order: 2; flex: 0 0 auto; width: auto; min-width: 120px; min-height: var(--control-height); padding: 0 var(--space-6); }
.checkin-step .checkin-actions > .text-link:only-of-type:not(.checkin-back) { margin-right: 0; }
@media (max-width: 400px) {
  .checkin-step .checkin-actions { gap: var(--space-3); }
  .checkin-step .checkin-actions > .checkin-primary-action { min-width: 0; padding: 0 var(--space-5); }
}

/* Under the map (below 1440px), the place's card keeps its rounded
   corners round its picture, and a wide card sets its words and what to do
   side by side: the picture, then the place and its invitation, then the
   actions, each column filled. */
@media (max-width: 1439px) {
  .lw-panel { overflow: hidden; container-type: inline-size; }
  .lw-panel__picture { min-height: 100%; object-fit: cover; }
}
@container (min-width: 520px) {
  .lw-panel__body {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
    column-gap: var(--space-6); align-content: start; padding: var(--space-6);
  }
  .lw-panel__body > :not(.lw-panel__actions) { grid-column: 1; }
  .lw-panel__body > .lw-panel__actions { grid-column: 2; grid-row: 1 / -1; align-self: start; flex-direction: column; align-items: stretch; margin: 0; padding-top: 0; border-top: 0; }
  .lw-panel__body > .lw-panel__actions .lw-panel__more { flex: none; }
}

/* The Soundscapes cards: listening is the point of the page, so Listen is
   the card's full-width main button (dark, as a main action), outlined
   once it plays and turns to Pause. A closed world's card has its lock line
   in the same box, at the same height, quiet. */
.sound-card__actions { align-items: stretch; }
.sound-card__actions > * { flex: 1; }
.sound-card__actions .lw-listen,
.sound-card__actions .sound-card__needs {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  width: 100%; min-height: var(--control-height); padding: 0 var(--space-4); border-radius: var(--radius-pill);
  font-size: var(--text-base); line-height: 1.2; text-align: center;
}
.sound-card__actions .lw-listen { border: 1px solid var(--color-surface-dark); background: var(--color-surface-dark); color: var(--color-text-on-dark); font-weight: var(--weight-medium); }
.sound-card__actions .lw-listen:hover { border-color: var(--color-text); background: var(--color-text); }
.sound-card__actions .lw-listen .lw-listen__ring { border-color: rgba(255, 255, 255, 0.4); border-top-color: var(--color-text-on-dark); }
.sound-card__actions .lw-listen.is-playing,
.sound-card__actions .lw-listen[data-state="playing"] { border-color: var(--color-line-strong); background: var(--color-surface); color: var(--color-text); }
.sound-card__actions .lw-listen[data-state="playing"] .lw-listen__ring { border-color: var(--color-line-strong); border-top-color: var(--color-text); }
.sound-card__actions .lw-listen__text { overflow: hidden; text-overflow: ellipsis; }
.sound-card__actions .sound-card__needs { border: 1px solid var(--color-line); background: var(--color-neutral-grey); font-size: var(--text-xs); color: var(--color-text-muted); }
.sound-card__actions .sound-card__needs svg { margin: 0; }
.sound-card__actions .sound-card__needs span { text-decoration: none; text-wrap: balance; }
.sound-card__actions .sound-card__needs:hover { color: var(--color-text); border-color: var(--color-line-strong); }
.sound-card__actions .sound-card__needs { gap: 6px; padding: 0 var(--space-3); }

/* The pill in the corner it was left in (soundscape-sound.js); while it is
   carried it shows it, and takes no part in the page's scrolling. */
.mini-player { touch-action: none; }
.mini-player[data-corner^="t"] { top: calc(var(--topbar-height) + var(--space-5)); bottom: auto; }
.mini-player[data-corner$="l"] { left: var(--space-5); right: auto; }
.mini-player.is-dragging { cursor: grabbing; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16); }
.mini-player.is-dragging * { cursor: grabbing; }
.sound-card__actions a.sound-card__needs { text-decoration: none; }


/* The photographic map (living_world.clj, photo-map). A closed world's look
   lies over the photograph while it is closed; once open it is hidden, and
   fades out when the world has opened since the last visit. The roads are
   only the Twin's route: the footpaths are in the photograph. */
.lw-closed { transition: opacity 600ms var(--ease-out); }
.lw-closed[data-open="true"] { opacity: 0; }
.lw-closed.is-lifting { animation: lw-unveil 3.2s var(--ease-out) 0.6s both; }
@keyframes lw-unveil { from { opacity: 1; } to { opacity: 0; } }
.lw-roads--route .lw-road { stroke: none; }

/* My Twin's controls on the card's bottom row, light on the picture with no
   ground of their own: the (i) at the left, zoom, turn and play at the
   right, all on one line. */
.twin-rail {
  top: auto; right: var(--space-3); bottom: var(--space-3); flex-direction: row; gap: var(--space-1);
  padding: 0; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none;
}
.twin-rail__rule { width: 1px; height: 16px; margin: 0 var(--space-2); }
.twin-rail__button { width: 34px; height: 34px; }
.twin-rail__value { min-width: 24px; }
.twin-stage__figure .twin-stage__info { left: var(--space-3); bottom: var(--space-3); width: 34px; height: 34px; }

/* The check-in's icons on light rounds (white, a hairline), as elsewhere on
   the site: solid black is kept for a screen's main action. */
.checkin-card__icon, .checkin-method__icon { border: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-text); }
.checkin-card:hover .checkin-card__icon, .checkin-method:hover .checkin-method__icon { border-color: var(--color-line-strong); }
/* What answering brings on the first screen (your intention, then Done
   once it's kept): app.js grows the dialog and brings each in. */
[data-ci-answered] .checkin-card { margin: 0 0 25px; }
/* The footer: even room above and below, a clear space before the main
   button, and Back as a plain quiet word with its arrow. */
.checkin-step .checkin-actions { padding: var(--space-4) var(--space-8); gap: var(--space-6); }
.checkin-step .checkin-actions > .checkin-back { gap: 6px; text-decoration: none; color: var(--color-text-muted); }
.checkin-step .checkin-actions > .checkin-back:hover { color: var(--color-text); }
@media (max-width: 520px) {
  .checkin-step .checkin-actions { padding: var(--space-4) var(--space-6); gap: var(--space-4); }
}
/* What a heart reading is: its icon in ink on a light round, as on the
   first screen, with one thin ring breathing slowly out from it. */
.checkin-orb { width: 120px; height: 120px; border: 0; background: none; }
.checkin-orb > span { display: grid; place-items: center; width: 100%; height: 100%; }
.checkin-reading { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border: 1px solid var(--color-line); border-radius: 50%; background: var(--color-neutral-grey); color: var(--color-text); }
.checkin-reading::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--color-line-strong); border-radius: 50%; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .checkin-reading::after { animation: ci-reading 4.8s cubic-bezier(0.33, 1, 0.68, 1) infinite; }
}
@keyframes ci-reading { 0% { opacity: 0.8; transform: scale(1); } 60%, 100% { opacity: 0; transform: scale(1.22); } }

/* How the other soundscapes open: a card under them, its words and links on
   the left and today's ways to earn light, each a button, on the right. */
.sounds-open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); margin-top: var(--card-gap); padding: var(--pad-card); }
.sounds-open__words { display: flex; flex-direction: column; gap: var(--space-3); }
.sounds-open__words .panel__title { margin: 0; }
.sounds-open__words p { margin: 0; max-width: 52ch; }
.sounds-open__where { font-size: var(--text-sm); }
.sounds-open__links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin-top: auto; padding-top: var(--space-2); }
.sounds-open__actions { display: flex; flex-direction: column; gap: var(--space-3); }
.sounds-open__subtitle { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text-muted); }
@media (max-width: 760px) {
  .sounds-open { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}

/* How progress works says how it works; the tab above holds the detail.
   One card of three rows (light points, levels, streak) in the same three
   columns: the figure under its eyebrow, a bar or this week's squares with
   a caption, then what it means, so the figures, bars and words line up.
   The worlds follow as picture cards. */
.how-grid { display: grid; gap: var(--card-gap); }
.how-card { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--pad-card); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.how-card__head { display: flex; align-items: center; gap: var(--space-2); }
.how-card__head .eyebrow { margin: 0; }
.how-card__icon { display: inline-flex; color: var(--color-progress-text); }
.how-card__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-regular); line-height: 1.2; }
.how-worlds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.how-worlds__world a { display: flex; flex-direction: column; gap: var(--space-1); color: inherit; text-decoration: none; }
.how-worlds__picture { position: relative; display: block; overflow: hidden; border-radius: var(--radius-nested); }
.how-worlds__picture img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 400ms var(--ease-out); }
.how-worlds__world:not(.is-open) .how-worlds__picture img { filter: grayscale(0.85); opacity: 0.6; }
.how-worlds__world.is-here .how-worlds__picture { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3.5px var(--color-progress); }
.how-worlds__lock { position: absolute; top: var(--space-2); left: var(--space-2); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--color-text); }
.how-worlds__world a:hover img { transform: scale(1.03); }
.how-worlds__name { margin-top: var(--space-1); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.how-worlds__level { font-size: var(--text-xs); color: var(--color-text-subtle); }
.how-worlds__world.is-here .how-worlds__level { color: var(--color-progress-text); }
.how-card--rows { gap: 0; padding-top: 0; padding-bottom: 0; container-type: inline-size; }
.how-row { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: var(--space-6); padding: var(--space-6) 0; }
.how-row + .how-row { border-top: 1px solid var(--color-row-divider); }
.how-row__lead { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.how-row__eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-progress-text); }
.how-row__eyebrow .eyebrow { margin: 0; }
.how-row__figure { display: flex; align-items: baseline; gap: var(--space-2); margin: 0; }
.how-row__figure strong { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: var(--weight-regular); line-height: 1; font-variant-numeric: tabular-nums; }
.how-row__figure span { font-size: var(--text-sm); line-height: 1.3; color: var(--color-text-muted); }
.how-row__middle { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.how-row__caption { font-size: var(--text-xs); line-height: 1.5; color: var(--color-text-muted); text-wrap: balance; }
.how-row__text { min-width: 0; }
.how-row__text p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-body); color: var(--color-text-muted); }
.how-row__text .link-arrow { margin-top: var(--space-2); }
.how-week { display: flex; gap: var(--space-1); }
.how-week .week__square { flex: 1; width: auto; height: 10px; border-radius: 3px; }
@container (max-width: 560px) {
  .how-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
}

/* My Twin's bottom row on the card's padding, like the title above it: the
   (i) and the controls at the figure's edges, their icons in line with the
   card's text. The figure is drawn in the space above that row, so it is a
   little smaller, centred between the title and the controls, and never
   under a control. */
.twin-stage__figure { --twin-row: 44px; --twin-room: var(--space-5); }
.twin-stage__figure .twin-stage__still { inset: 0 0 auto 0; height: calc(100% - var(--twin-row)); }
.twin-stage__figure .twin-stage__canvas { inset: 0; height: 100%; }
/* The buttons' 9px inner room hangs past the figure on the sides and at the
   foot, so their icons meet the card's padding on every edge; the figure no
   longer clips, so a hovered button's round shows whole. */
.twin-stage__figure { overflow: visible; }
.twin-rail { right: -9px; bottom: -9px; }
.twin-stage__figure .twin-stage__info { position: absolute; left: -9px; bottom: -9px; }
.twin-stage__figure .twin-rail .twin-stage__reset { position: static; }
.twin-stage__reset[hidden], .twin-stage__reset[hidden] + .twin-rail__rule--reset { display: none; }

/* The check-in slider, as the mobile app 2.0 draws it (twin/ui/check_in.cljs
   feel-row): a 4px track in the five Light colours and an 18px solid light
   knob (the app's cream) that keeps a 10px dot in the answer's colour once
   chosen (app.js sets --ci-dot), and grows to 24px with a faint round
   behind it while held. On the light dialog the knob has a hairline and a
   soft shadow to stand on the band, and a hairline keeps the track's pale
   end visible. */
.checkin-slider::-webkit-slider-runnable-track, .checkin-part input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(60, 45, 30, 0.1); }
.checkin-slider::-moz-range-track, .checkin-part input::-moz-range-track { height: 4px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(60, 45, 30, 0.1); }
.checkin-slider::-webkit-slider-thumb, .checkin-part input::-webkit-slider-thumb {
  width: 18px; height: 18px; margin-top: -7px; border: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--ci-dot, var(--ci-knob)) 0 5px, var(--ci-knob) 5.5px);
  box-shadow: var(--ci-knob-edge);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.checkin-slider::-moz-range-thumb, .checkin-part input::-moz-range-thumb {
  width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--ci-dot, var(--ci-knob)) 0 5px, var(--ci-knob) 5.5px);
  box-shadow: var(--ci-knob-edge);
}
.checkin-slider:active::-webkit-slider-thumb, .checkin-part input:active::-webkit-slider-thumb { transform: scale(1.333); box-shadow: var(--ci-knob-edge), 0 0 0 6px rgba(30, 26, 22, 0.07); }
.checkin-slider:active::-moz-range-thumb, .checkin-part input:active::-moz-range-thumb { transform: scale(1.333); box-shadow: var(--ci-knob-edge), 0 0 0 6px rgba(30, 26, 22, 0.07); }
.checkin-dialog { --ci-knob: #fdfbf6; --ci-knob-edge: 0 0 0 1px rgba(44, 38, 32, 0.16), 0 1px 4px rgba(44, 38, 32, 0.22); }
/* The app's invitation to check in (DS Motion, Invite to check in), until
   the slider is touched: a 3s rest, then every 3s the knob swells to 1.25
   and settles while a glow grows from it to 3.5 times its size and fades. */
@media (prefers-reduced-motion: no-preference) {
  .checkin-slider.is-inviting::-webkit-slider-thumb { animation: ci-invite 3s 3s infinite; }
  .checkin-slider.is-inviting::-moz-range-thumb { animation: ci-invite 3s 3s infinite; }
}
@keyframes ci-invite {
  0% { transform: scale(1); box-shadow: var(--ci-knob-edge), 0 0 0 0 rgba(44, 38, 32, 0.22); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  10% { transform: scale(1.25); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  30% { transform: scale(1); }
  40%, 100% { transform: scale(1); box-shadow: var(--ci-knob-edge), 0 0 0 22px rgba(44, 38, 32, 0); }
}

/* Under the slider, the helper line and Go deeper on one baseline: the
   line smaller and paler, so the action reads first. The keyboard note is
   read to screen readers only. */
.checkin-quickrow { align-items: baseline; }
.checkin-hint { font-size: var(--text-xs); color: var(--color-text-subtle); }
.checkin-deeper { min-height: 0; padding: var(--space-2) 0; }

/* Today's row in Check-in history can remove today's check-in: a quiet
   Remove at the row's end; asked, the confirmation takes a line of its own
   under the date, ending at the row's right edge. */
.twin-checkins__item { flex-wrap: wrap; }
.twin-checkins__date { flex: 1; }
.twin-checkins__remove { justify-content: flex-end; }
.twin-checkins__remove:has(.checkin-remove__confirm:not([hidden])), .twin-checkins__remove:has(.checkin-remove__error:not([hidden])) { flex-basis: 100%; }
.checkin-remove__error { color: var(--color-error); }
.checkin-remove__error[hidden] { display: none; }
.twin-checkins__remove .checkin-remove__confirm { justify-content: flex-end; text-align: right; }

/* The worlds tab: your world across the full width, its picture wide,
   the other four two by two under it, so five never leave one alone. */
.progress-worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: var(--card-gap); }
.progress-worlds > .is-here { grid-column: 1 / -1; }
.progress-worlds > .is-here .card__media { aspect-ratio: 16 / 7; }
@media (max-width: 560px) {
  .progress-worlds { grid-template-columns: minmax(0, 1fr); }
  .progress-worlds > .is-here .card__media { aspect-ratio: 298 / 266; }
}
/* On a narrow card the five worlds sit two by two under the first, which
   takes the row, rather than leaving the last one alone. */
@media (max-width: 600px) {
  .how-worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-worlds > :first-child { grid-column: 1 / -1; }
  .how-worlds > :first-child .how-worlds__picture img { aspect-ratio: 16 / 7; }
}

/* The header's stats fold as the mobile app 2.0's header pill does
   (twin/ui/check_in.cljs, pill-fold): the light points alone, the other
   three beside them when open (app.js measures their width into
   --pill-more-w). Opening, the pill grows first (320ms) and the three then
   scale and fade in where they sit, one after another, so nothing slides
   in; folding, they scale and fade out first and the pill then narrows. It
   sits in a slot as wide as it is open (app.js sets --pill-open-w), so the
   search field never moves or narrows. */
.stats-slot { display: flex; justify-content: flex-end; }
@media (min-width: 1001px) { .stats-slot { min-width: var(--pill-open-w, auto); } }
.profile-pill { gap: 0; }
.progress-pill__more {
  display: inline-flex; gap: var(--space-3);
  overflow: hidden; width: var(--pill-more-w, auto);
  transition: width 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.progress-pill__more > .progress-pill__part {
  flex-shrink: 0;
  transition: opacity 240ms ease-out var(--pill-in, 0ms), transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--pill-in, 0ms);
}
.progress-pill__more > .progress-pill__part:first-child { margin-left: var(--space-3); }
.progress-pill__more > [data-part="streak"] { --pill-in: 170ms; --pill-out: 80ms; }
.progress-pill__more > [data-part="level"] { --pill-in: 220ms; --pill-out: 40ms; }
.progress-pill__more > [data-part="worlds"] { --pill-in: 270ms; --pill-out: 0ms; }
.profile-pill.is-folded .progress-pill__more {
  width: 0;
  transition: width 360ms cubic-bezier(0.65, 0, 0.35, 1) 150ms;
}
.profile-pill.is-folded .progress-pill__more > .progress-pill__part {
  opacity: 0; transform: scale(0.6);
  transition: opacity 140ms ease-in var(--pill-out, 0ms), transform 160ms ease-in var(--pill-out, 0ms);
}
.profile-pill.is-still .progress-pill__more,
.profile-pill.is-still .progress-pill__more > .progress-pill__part { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .progress-pill__more, .progress-pill__more > .progress-pill__part { transition: none; }
}
/* A new streak day, level or world opens the pill with it in gold: its
   figure in a deeper gold that reads on the light bar, its icon glowing. */
.progress-pill__part.is-gold [data-stat] { color: var(--color-progress-strong); }
.progress-pill__part.is-gold svg { filter: drop-shadow(0 0 4px rgba(255, 195, 127, 0.9)); }
/* The intro (a visit's first page, or a reload): the pill is open at once,
   and its four appear in place one after another, overlapping (app.js sets
   each one's delay), each icon zooming in with a bounce that overshoots and
   settles, and its figure fading in as app.js counts it up, shortly after. */
@media (prefers-reduced-motion: no-preference) {
  .profile-pill.is-intro .progress-pill__part svg { animation: pill-icon-in var(--pill-icon-ms, 620ms) both; animation-delay: var(--pill-delay, 0ms); }
  .profile-pill.is-intro .progress-pill__part [data-stat] { animation: pill-figure-in 320ms ease-out both; animation-delay: var(--pill-figure-delay, 0ms); }
  /* Light landing, as the app's pill-land: a quick 1.08 bounce that springs
     back, and a gold glow fading over 400ms. */
  .profile-pill.is-landing { animation: pill-land 570ms both; }
}
@keyframes pill-icon-in {
  0% { opacity: 0; transform: scale(0.2); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  45% { opacity: 1; transform: scale(1.32); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  68% { transform: scale(0.88); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  85% { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pill-figure-in { from { opacity: 0; } }
@keyframes pill-land {
  0% { transform: scale(1); box-shadow: 0 0 12px 2px rgba(255, 195, 127, 0.4); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  21% { transform: scale(1.08); }
  45% { transform: scale(0.985); }
  70% { box-shadow: 0 0 12px 2px rgba(255, 195, 127, 0); transform: scale(1.01); }
  100% { transform: scale(1); box-shadow: 0 0 12px 2px rgba(255, 195, 127, 0); }
}

/* On the progress page the stats it opens from show as current. */
.profile-pill[aria-current="page"] { background: var(--color-stats-hover); }

/* Progress: the four parts as tiles. The name at the top left, the figure
   large under it with its line, the label small and pale so the figure reads
   first; the icon, plain gold and 32px, at the top right across from the
   label, clear of the figure, so the figure and its line keep the tile's
   whole width. The one shown is white with an
   ink hairline; the others rest on the page's grey and brighten on hover.
   Two by two on a phone. */
.progress-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.progress-tab {
  position: relative; display: block; min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-line); border-radius: var(--radius);
  background: var(--color-neutral-grey); color: var(--color-text); text-decoration: none;
  transition: border-color var(--duration-hover) var(--ease-out), background-color var(--duration-hover) var(--ease-out);
}
.progress-tab:hover { border-color: var(--color-line-strong); background: var(--color-surface); }
.progress-tab[aria-current="page"] { border-color: var(--color-text); background: var(--color-surface); }
.progress-tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.progress-tab__words { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.progress-tab__name { font-size: var(--text-caps); line-height: var(--leading-caps); font-weight: var(--weight-medium); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-subtle); }
.progress-tab__value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1; font-variant-numeric: tabular-nums; }
.progress-tab__line { padding-right: 36px; font-size: var(--text-sm); line-height: 1.4; color: var(--color-text-muted); }
.progress-tab__icon { position: absolute; right: var(--space-4); bottom: var(--space-4); display: block; line-height: 0; color: var(--color-progress); }
.progress-tab__icon svg { width: 28px; height: 28px; }
@media (max-width: 600px) {
  .progress-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.progress-body { margin-top: var(--space-10); }
.progress-head { gap: var(--space-1); margin-bottom: var(--space-6); }
.progress-head .section__title { margin: 0; }
.progress-head p { margin: 0; }

/* How progress works: a section of the page between two hairlines, closed
   until asked for. Its summary is a bar across the page, the title with a
   line under it on the left and a caret in a round on the right, turning as
   it opens; open, the cards sit on the page under it, no box round them. */
.how { margin-top: var(--space-12); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.how[open] { padding-bottom: var(--space-8); }
.how__summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) 0; cursor: pointer; list-style: none; }
.how__summary::-webkit-details-marker { display: none; }
.how__summary-words { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.how__title { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; color: var(--color-text); }
.how__subtitle { font-size: var(--text-sm); color: var(--color-text-muted); }
.how__chevron { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--color-line); border-radius: 50%; background: var(--color-surface); color: var(--color-text); transition: transform var(--duration-expand) var(--ease-out), border-color var(--duration-hover) var(--ease-out); }
.how__summary:hover .how__chevron { border-color: var(--color-line-strong); }
.how[open] .how__chevron { transform: rotate(180deg); }
.how__summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-nested); }
.how__intro { margin: 0 0 var(--space-5); max-width: 60ch; }
/* A text link beside a step's main button is as tall as it, its words
   centred on the button's. */
.checkin-step .checkin-actions > a.text-link { display: inline-flex; align-items: center; min-height: var(--control-height); }

/* Open on hover, each of the header's stats names itself in a small dark
   tooltip under it, after a short pause. */
.progress-pill__part { position: relative; }
.stat-tip {
  position: fixed; top: 0; left: 0; z-index: 60;
  padding: 5px 9px; border-radius: 6px; background: var(--color-surface-dark); color: var(--color-text-on-dark);
  font-size: var(--text-xs); line-height: 1.3; white-space: nowrap;
  opacity: 0; transform: translateY(-3px); pointer-events: none;
  transition: opacity 120ms ease-out, transform 160ms var(--ease-out);
}
.stat-tip.is-shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .stat-tip { transition: none; } }
.progress-pill__more { overflow: visible; overflow-x: clip; }

/* The kept step: a check in a light round over its title, then the Twin as
   the next step, and Done alone in the footer. */
.checkin-kept-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: var(--space-2) 0 var(--space-5); border: 1px solid var(--color-line); border-radius: 50%; background: var(--color-neutral-grey); color: var(--color-text); }
.checkin-card--next { margin-top: var(--space-2); text-decoration: none; }

/* A step on a session's page starts the session there when it can play. */
.step[data-play-step] { cursor: pointer; border-radius: var(--radius-nested); transition: background-color var(--duration-hover) var(--ease-out); }
.step[data-play-step]:hover { background: var(--color-neutral-grey); }
.step[data-play-step]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* A live event, at the top of Notifications as the current web app's bell
   shows it: its status (a pulsing dot when live), title, host and the way
   in. */
.live-card { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-6); padding: var(--pad-card); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; transition: border-color var(--duration-hover) var(--ease-out); }
.live-card:hover { border-color: var(--color-line-strong); }
.live-card__status { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.live-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-error); }
@media (prefers-reduced-motion: no-preference) { .live-card__dot { animation: live-dot 1.4s ease-in-out infinite; } }
@keyframes live-dot { 50% { opacity: 0.35; } }
.live-card__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-regular); }
.live-card__host { font-size: var(--text-sm); color: var(--color-text-muted); }
.live-card__go { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); font-size: var(--text-sm); }

/* Arranging Discover's All in place (app.js `setupArrange`). Arrange sits
   beside the page's title, quiet. Arranging, each section folds to one row
   on the page: a handle, its name, three small pictures of what it holds,
   whether it is hidden, then show or hide and its arrows; the row lifts as
   it is dragged. A bar over the rows holds the hint, Done and the reset. */
.arrange-start[hidden] { display: none; }
.arrange-row { display: none; }
.practice.is-arranging { display: flex; flex-direction: column; gap: var(--space-2); }
.practice.is-arranging > .practice-band > :not(.arrange-row) { display: none; }
.practice.is-arranging .arrange-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--space-3);
  min-height: 68px; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
  border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface);
  cursor: grab; touch-action: none; user-select: none;
  transition: box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.practice.is-arranging .arrange-row:hover { border-color: var(--color-line-strong); }
.practice-band.is-moving .arrange-row { border-color: var(--color-line-strong); box-shadow: 0 14px 32px rgba(30, 26, 22, 0.14); transform: scale(1.012); }
.practice.is-dragging, .practice.is-dragging * { cursor: grabbing; }
.practice-band.is-moving { position: relative; z-index: 2; }
.arrange-row__handle { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-nested); background: none; color: var(--color-text-subtle); cursor: grab; }
.arrange-row__handle:focus-visible, .arrange-row__toggle:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.arrange-row__name { min-width: 0; overflow: hidden; font-size: var(--text-base); font-weight: var(--weight-medium); white-space: nowrap; text-overflow: ellipsis; }
.arrange-row__preview { display: flex; gap: var(--space-1); }
.arrange-row__preview img { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.arrange-row__state { font-size: var(--text-xs); color: var(--color-text-subtle); }
.arrange-row__tools { display: flex; align-items: center; gap: var(--space-1); }
.arrange-row__toggle { min-height: 32px; padding: 0 var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: none; color: var(--color-text-muted); font: inherit; font-size: var(--text-xs); cursor: pointer; }
.arrange-row__toggle:hover { border-color: var(--color-line-strong); color: var(--color-text); }
.arrange-row__move { width: 32px; height: 32px; }
.practice-band.is-off .arrange-row { background: var(--color-neutral-grey); }
.practice-band.is-off .arrange-row__name, .practice-band.is-off .arrange-row__preview { opacity: 0.5; }
@media (max-width: 600px) {
  .practice.is-arranging .arrange-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .arrange-row__preview, .arrange-row__state { display: none; }
}
.arrange-row__drawing { display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 8px; background: var(--color-neutral-grey); }
.arrange-row__drawing svg { position: static; width: 32px; height: 32px; transform: none; }
/* A box's icon (the Phosphor icon that says what the box is about): plain,
   in the text's color, its own size. */
.creator-callout__icon { display: inline-flex; flex: none; color: var(--color-text); }
.newsroom-more > svg { display: block; flex: none; color: var(--color-text); }

/* The session player (session-player.js), after the current web app's
   player, calmer: the step's picture fills the screen; the controls are
   light words and icons on a soft shade at the top and the foot, with one
   progress line of a segment per step, and they fade out after a few still
   seconds (the pointer too), back on any movement, tap or key. The break
   before a step, the pause and the other moments are light words over the
   softened picture, without boxes; the summary is a light page in the web
   app's own style. */
.player {
  --p-ink: #fbf8f2; --p-muted: rgba(251, 248, 242, 0.74); --p-line: rgba(251, 248, 242, 0.3);
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0;
  border: 0; background: #1d1915; color: var(--p-ink); overflow: hidden;
}
.player::backdrop { background: #1d1915; }
.player[open] { display: block; animation: player-open 600ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes player-open { from { opacity: 0; } }
@keyframes player-stage-open { from { transform: scale(1.04); filter: brightness(0.6); } }
.player[open]::backdrop { animation: player-open 600ms ease-out both; }
@media (prefers-reduced-motion: reduce) { .player[open], .player[open] .player__stage, .player[open]::backdrop { animation: none; } }
/* Leaving a page for a session's player: it dims to the player's dark. */
html.is-leaving-to-player, html.is-leaving-to-player body { background: #1d1915; transition: background-color 420ms ease; }
html.is-leaving-to-player body > * { opacity: 0; transition: opacity 400ms cubic-bezier(0.4, 0, 0.6, 1); }
/* Opened to play: the page waits dark behind the player that is coming. */
html.is-opening-player, html.is-opening-player body { background: #1d1915; }
html.is-opening-player body > :not(dialog) { opacity: 0; }
.player:focus { outline: none; }
html:has(dialog.player[open]) { overflow: hidden; }
.player__stage { position: absolute; inset: 0; transition: filter 500ms var(--ease-out), transform 600ms var(--ease-out); }
.player__video, .player__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.player__preview { opacity: 0; transition: opacity 500ms var(--ease-out); }
.player__ambient { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; filter: blur(40px) brightness(0.62) saturate(1.1); transform: scale(1.25); transition: opacity 600ms var(--ease-out); }
.player.is-fitted .player__ambient { opacity: 1; }
.player.is-fitted .player__video, .player.is-fitted .player__preview { object-fit: contain; object-position: center; }
.player.is-previewing .player__preview { opacity: 1; }
.player.is-veiled .player__stage, .player.is-break .player__stage { filter: blur(14px) brightness(0.72) saturate(0.9); transform: scale(1.04); }
.player.is-idle { cursor: none; }
.player__chrome { position: absolute; left: 0; right: 0; z-index: 2; display: flex; padding: var(--space-6) var(--space-8); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.player__chrome--top { top: 0; align-items: center; gap: var(--space-4); padding-bottom: var(--space-16); background: linear-gradient(rgba(20, 17, 14, 0.42), rgba(20, 17, 14, 0)); }
.player__chrome--bottom { bottom: 0; flex-direction: column; gap: var(--space-5); padding-top: var(--space-16); background: linear-gradient(rgba(20, 17, 14, 0), rgba(20, 17, 14, 0.5)); }
.player.is-idle .player__chrome, .player.is-veiled .player__chrome, .player.is-break .player__chrome--bottom { opacity: 0; pointer-events: none; }
.player.is-idle .player__chrome--top { transform: translateY(-6px); }
.player.is-idle .player__chrome--bottom { transform: translateY(6px); }
.player__heading-block { min-width: 0; }
.player__title { margin: 0; overflow: hidden; font-size: var(--text-base); white-space: nowrap; text-overflow: ellipsis; }
.player__count { margin: 2px 0 0; font-size: var(--text-xs); color: var(--p-muted); font-variant-numeric: tabular-nums; }
.player__round { display: inline-grid; place-items: center; flex: none; width: var(--control-height); height: var(--control-height); padding: 0; border: 0; border-radius: 50%; background: rgba(251, 248, 242, 0.14); color: var(--p-ink); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background-color var(--duration-hover) var(--ease-out), opacity var(--duration-hover) var(--ease-out); }
.player__round:hover { background: rgba(251, 248, 242, 0.26); }
.player__round:disabled { opacity: 0.35; cursor: default; background: rgba(251, 248, 242, 0.14); }
.player__round--main { width: 60px; height: 60px; background: var(--p-ink); color: #1d1915; }
.player__round--main:hover { background: #fff; }
.player__round:focus-visible, .player__pill:focus-visible, .player__quiet:focus-visible, .player__line:focus-visible { outline: 2px solid var(--p-ink); outline-offset: 3px; }
.player__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-6); }
.player__step-name { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: 1.2; text-wrap: balance; }
.player__controls { display: flex; align-items: center; gap: var(--space-4); }
.player__time { margin: 0; justify-self: end; font-family: var(--font-display); font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.player__line { display: flex; gap: var(--space-1); height: 16px; align-items: center; cursor: pointer; }
.player__segment { position: relative; flex-basis: 0; height: 3px; overflow: hidden; border-radius: 2px; background: var(--p-line); transition: height 160ms var(--ease-out); }
.player__line:hover .player__segment { height: 5px; }
.player__segment-fill { position: absolute; inset: 0; background: var(--p-ink); transform: scaleX(0); transform-origin: left; transition: transform 250ms linear; }
.player__overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: var(--space-8) var(--space-6); }
.player__overlay[hidden] { display: none; }
.player__message { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); max-width: 520px; text-align: center; animation: player-message-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes player-message-in { from { opacity: 0; transform: translateY(8px); } }
.player__eyebrow { margin: 0; font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-muted); }
.player__big { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.15; text-wrap: balance; text-shadow: 0 1px 18px rgba(20, 17, 14, 0.35); }
.player__small { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--p-muted); }
.player__ring { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin-top: var(--space-2); }
.player__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.player__ring circle { fill: none; stroke-width: 2; }
.player__ring-track { stroke: var(--p-line); }
.player__ring-fill { stroke: var(--p-ink); stroke-linecap: round; transition: stroke-dashoffset 1000ms linear; }
.player__ring strong { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; }
.player__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); }
.player__pill { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; margin-top: var(--space-2); padding: 0 var(--space-6); border: 1px solid var(--p-ink); border-radius: var(--radius-pill); background: var(--p-ink); color: #1d1915; font: inherit; font-weight: var(--weight-medium); cursor: pointer; transition: background-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out); }
.player__actions .player__pill { margin-top: 0; }
.player__pill:hover { background: #fff; }
.player__pill--outline { background: transparent; color: var(--p-ink); border-color: var(--p-line); }
.player__pill--outline:hover { background: rgba(251, 248, 242, 0.12); border-color: var(--p-ink); }
.player__quiet { margin-top: var(--space-3); padding: var(--space-2); border: 0; background: none; color: var(--p-muted); font: inherit; font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.player__quiet:hover { color: var(--p-ink); }
/* The summary: a light page, as the rest of the web app. */
.player__summary { position: absolute; inset: 0; z-index: 4; overflow-y: auto; background: var(--color-bg); color: var(--color-text); --ci-knob: #fdfbf6; --ci-knob-edge: 0 0 0 1px rgba(44, 38, 32, 0.16), 0 1px 4px rgba(44, 38, 32, 0.22); animation: player-message-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.player__summary[hidden] { display: none; }
.player__summary-close { position: absolute; top: var(--space-5); right: var(--space-5); }
.player__summary-inner { display: flex; flex-direction: column; gap: var(--space-4); width: min(520px, calc(100% - 32px)); margin: 0 auto; padding: max(var(--space-12), 8vh) 0 var(--space-12); }
.player__summary-picture img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.player__summary-eyebrow { margin-top: var(--space-2); }
.player__summary-title { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.15; text-wrap: balance; }
.player__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--space-2) 0 var(--space-4); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.player__fact { padding: var(--space-4) 0; }
.player__fact + .player__fact { padding-left: var(--space-4); border-left: 1px solid var(--color-line); }
.player__fact dt { font-size: var(--text-xs); color: var(--color-text-subtle); }
.player__fact dd { margin: var(--space-1) 0 0; font-size: var(--text-base); font-variant-numeric: tabular-nums; }
.player__end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); }
.player__done { min-width: 160px; justify-content: center; }
/* The end of a session (DESIGN-SYSTEM.md, Completion): first a small
   celebration, the gold check settling onto the session's picture, Session
   complete, its title and the light it earned; then, only if wanted, How
   was it? in its place. */
.player__celebrate, .player__reflect { display: flex; flex-direction: column; gap: var(--space-4); }
.player__celebrate[hidden], .player__reflect[hidden] { display: none; }
.player__summary-picture { position: relative; }
.player__summary-mark { position: absolute; left: 50%; bottom: 0; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 4px solid var(--color-bg); border-radius: 50%; background: var(--color-progress-soft); color: var(--color-progress-strong); transform: translate(-50%, 50%); }
.player__summary-picture[hidden] + .player__summary-eyebrow { margin-top: 0; }
.player__celebrate .player__summary-eyebrow { margin-top: var(--space-8); text-align: center; }
.player__celebrate .player__summary-title { text-align: center; }
.player__summary-light { margin: 0; text-align: center; font-size: var(--text-md); }
.player__summary-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.player__summary-reflect { align-self: center; padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.player__reflect { animation: player-message-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@media (prefers-reduced-motion: no-preference) {
  .player.is-summary .player__summary-mark { animation: summary-mark 620ms cubic-bezier(0.34, 1.56, 0.64, 1) 180ms both; }
  .player.is-summary .player__summary-mark svg { animation: summary-check 360ms var(--ease-out) 520ms both; }
}
@keyframes summary-mark { from { opacity: 0; transform: translate(-50%, 50%) scale(0.4); } }
@keyframes summary-check { from { opacity: 0; transform: scale(0.5); } }
@media (max-width: 760px) {
  .player__chrome { padding: var(--space-4) var(--space-5); }
  .player__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name time" "controls controls"; gap: var(--space-4); }
  .player__step-name { grid-area: name; font-size: var(--text-lg); }
  .player__time { grid-area: time; font-size: var(--text-lg); }
  .player__controls { grid-area: controls; justify-self: center; }
  .player__big { font-size: var(--text-xl); }
}
@media (prefers-reduced-motion: reduce) {
  .player__stage, .player__chrome, .player__message, .player__summary, .player__segment-fill, .player__ring-fill { transition: none; animation: none; }
}
.progress-pill__more { position: relative; }

/* The review, as the mobile app 2.0's check-in summary: centred, the five
   areas' shape large in the middle with each area named around it (its
   name, then its word with a square in its answer's colour), how you felt
   under it, your intention as a quote in the display face, and your words
   in a soft card. The two small lines close it, centred. */
.ci-sum { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); margin-top: var(--space-6); padding: var(--space-8) var(--space-6) var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); text-align: center; }
.ci-sum [hidden] { display: none; }
.ci-sum__hero { width: 100%; }
.ci-sum__radar { max-width: 300px; margin: var(--space-2) auto; }
.ci-sum__label { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translate(-50%, -50%); white-space: nowrap; }
.ci-sum__label-name { font-size: var(--text-xs); color: var(--color-text-muted); }
.ci-sum__label-word { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: var(--text-sm); color: var(--color-text); }
.ci-sum__label-word::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ci-dot, var(--color-line-strong)); box-shadow: inset 0 0 0 1px rgba(29, 25, 21, 0.34); }
.checkin-review__radar .checkin-radar { display: block; width: 100%; margin: 0; }
.checkin-review__dot { width: 12px; height: 12px; border-radius: 2px; background: var(--color-line-strong); box-shadow: inset 0 0 0 1px rgba(29, 25, 21, 0.34); }
.ci-sum__felt { display: inline-flex; align-items: center; gap: var(--space-3); margin: 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.3; }
.ci-sum__quote { max-width: 32ch; margin: 0; font-family: var(--font-display); font-size: var(--text-md); line-height: 1.4; color: var(--color-text-muted); }
.ci-sum__quote strong { font-weight: var(--weight-regular); color: var(--color-text); }
.ci-sum__card { width: 100%; margin: 0; padding: var(--space-5); border-radius: var(--radius-nested); background: var(--color-neutral-grey); text-align: left; }
.ci-sum__card figcaption { margin-bottom: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.ci-sum__note { margin: 0; font-family: var(--font-display); font-size: var(--text-base); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ci-sum__foot { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); margin-top: var(--space-6); font-size: var(--text-xs); line-height: 1.6; color: var(--color-text-muted); text-align: center; }
.ci-sum__foot p, .ci-sum__foot .checkin-note { margin: 0; font-size: inherit; line-height: inherit; }
@media (max-width: 520px) {
  .ci-sum { padding: var(--space-6) var(--space-4) var(--space-4); }
  .ci-sum__radar { max-width: 240px; }
  .ci-sum__label-word { font-size: var(--text-xs); }
}
/* Kept: a centred moment. The check sits in a soft round of your answer's
   colour, the title and its line under it, then your Twin as the next
   step, and Done. */
.checkin-step[data-ci-step="kept"] { text-align: center; }
.checkin-step[data-ci-step="kept"] .checkin-kept-mark { width: 64px; height: 64px; margin: var(--space-4) auto var(--space-5); border: 0; background: var(--ci-kept, var(--color-neutral-grey)); box-shadow: 0 0 0 8px color-mix(in srgb, var(--ci-kept, var(--color-neutral-grey)) 35%, transparent); }
.checkin-step[data-ci-step="kept"] .checkin-lede { max-width: 34ch; margin-left: auto; margin-right: auto; }
.checkin-step[data-ci-step="kept"] .checkin-card--next { margin-top: var(--space-6); text-align: left; }
.checkin-step[data-ci-step="kept"] .checkin-actions { justify-content: center; }

/* A way to earn light: the row is the action, its name, its points in a
   column of their own and a chevron. Done today, it rests on the page's
   grey with a filled check and "Done today" beside the name. */
.light-action__points { min-width: 3.2em; text-align: right; }
.light-action__go { display: inline-flex; color: var(--color-text-subtle); transition: color var(--duration-hover) var(--ease-out), transform var(--duration-hover) var(--ease-out); }
.light-action:hover .light-action__go, .light-action:focus-visible .light-action__go { color: var(--color-text); transform: translateX(2px); }
.light-action.is-done { background: var(--color-neutral-grey); }
.light-action.is-done .light-action__name { color: var(--color-text-muted); }
.light-action__state { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text); white-space: nowrap; }
.light-action__check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--color-progress); color: var(--color-progress-text); }
.light-actions--small .light-action__state { font-size: var(--text-xs); }
/* An expert's card: the name, then their role in ink and medium weight,
   then the description, quieter, a step below; the labels at the card's
   foot as on every card. */
.expert-card--large .expert-card__role, .expert-card--large .expert-card__role .card__meta { font-weight: var(--weight-medium); color: var(--color-text); }
.expert-card--large .card__text { margin-top: var(--space-1); }

/* Arrange: a quiet control beside Discover's title, icon and word in the
   muted text, so the pills above stay the page's controls; arranging, the
   same control reads Close. A line over the rows says how, with the usual
   order beside it while the order isn't the usual one. Once a change is
   made, a bar under the rows keeps to the bottom of the window: Undo on the
   left, Done on the right. No box: only the page's own background, so the
   rows passing under it don't show through. */
.arrange-start { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 0 var(--space-1); border: 0; background: none; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer; transition: color var(--duration-hover) var(--ease-out); }
.arrange-start:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 4px; }
.arrange-start[aria-pressed="true"] { color: var(--color-text); }
.arrange-start:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-nested); }
.arrange-top { margin-bottom: var(--space-5); }
.arrange-top__hint { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.arrange-top__reset { margin-left: var(--space-2); padding: 0; border: 0; background: none; color: var(--color-text); font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.arrange-top__reset[hidden] { display: none; }
.arrange-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4);
  padding: var(--space-4) 0;
  background: var(--color-bg);
}
.arrange-bar[hidden], .arrange-bar [hidden] { display: none; }
.arrange-bar__undo { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height); padding: 0; border: 0; background: none; color: var(--color-text); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.arrange-bar__undo:hover span { text-decoration: underline; text-underline-offset: 4px; }
.arrange-bar__status { flex: 1; margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); text-align: right; }
.arrange-bar__done { min-height: var(--control-height); }

/* A live event. Watching: the stream first and wide, its words under it,
   the chat beside it on a wide screen (as the current web app and every
   live service lay it out) and under it on a narrow one; the chat keeps to
   the window's height and scrolls inside. Waiting and after: the picture
   and the words, calm, with the count down in large figures. */
.live { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-6); align-items: start; }
.live--alone { grid-template-columns: minmax(0, 1fr); }
.live-stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #1d1915; }
.live-stage__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #1d1915; }
.live-stage.is-quiet .live-stage__video { opacity: 0; }
.live-stage__message { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: var(--space-6); color: #fbf8f2; font-size: var(--text-base); text-align: center; }
.live-stage__message[hidden] { display: none; }
.live-stage__sound { position: absolute; top: var(--space-4); left: var(--space-4); display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: rgba(251, 248, 242, 0.92); color: var(--color-text); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.live-stage__sound[hidden] { display: none; }
.live-about { padding-top: var(--space-5); }
.live-about__status { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-caps); letter-spacing: var(--tracking-caps); line-height: var(--leading-caps); text-transform: uppercase; color: var(--color-text-muted); }
.live-about__title { margin: var(--space-2) 0 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: var(--leading-h2); }
.live-about__host { margin: var(--space-2) 0 0; color: var(--color-text-muted); }
.live-about__text { max-width: 64ch; margin-top: var(--space-4); color: var(--color-text-muted); }
.live-about__text > :first-child { margin-top: 0; }
.live-about__text a { color: var(--color-text); }

.live-chat { position: sticky; top: calc(var(--header-height, 64px) + var(--space-4)); display: flex; flex-direction: column; height: min(640px, calc(100vh - 120px)); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.live-chat__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-line); }
.live-chat__title { margin: 0; font-size: var(--text-base); font-weight: var(--weight-medium); }
.live-chat__viewers { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); }
.live-chat__viewers[hidden] { display: none; }
.live-chat__status { margin: 0; padding: var(--space-2) var(--space-5); background: var(--color-neutral-grey); font-size: var(--text-xs); color: var(--color-text-muted); }
.live-chat__status[hidden] { display: none; }
.live-chat__messages { flex: 1; min-height: 0; margin: 0; padding: var(--space-3) 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.live-chat__empty { padding: var(--space-6) var(--space-5); font-size: var(--text-sm); color: var(--color-text-subtle); text-align: center; }
.live-msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--space-3); padding: var(--space-2) var(--space-5) 0; }
.live-msg.is-follow { padding-top: 2px; }
.live-msg.is-follow .live-msg__face, .live-msg.is-follow .live-msg__head { display: none; }
.live-msg.is-follow .live-msg__text { grid-column: 2; }
.live-msg__face { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: var(--color-neutral-grey); color: var(--color-text-muted); font-size: 11px; font-weight: var(--weight-medium); }
.live-msg__face img { width: 100%; height: 100%; object-fit: cover; }
.live-msg__head { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.live-msg__head strong { overflow: hidden; font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; text-overflow: ellipsis; }
.live-msg__head time { flex: none; font-size: var(--text-xs); color: var(--color-text-subtle); }
.live-msg__text { margin: 0; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.live-chat__new { align-self: center; margin: calc(var(--space-10) * -1) 0 var(--space-3); padding: var(--space-1) var(--space-3); border: 0; border-radius: var(--radius-pill); background: var(--color-surface-dark); color: var(--color-text-on-dark); font: inherit; font-size: var(--text-xs); cursor: pointer; z-index: 1; }
.live-chat__new[hidden] { display: none; }
.live-chat__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-2); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border-top: 1px solid var(--color-line); }
.live-chat__input { min-height: 40px; max-height: 120px; padding: 9px var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-nested); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-sm); line-height: 1.4; resize: none; }
.live-chat__input:focus { outline: none; border-color: var(--color-line-strong); }
.live-chat__send { width: 40px; height: 40px; }
.live-chat__send:disabled { opacity: 0.4; cursor: default; }
.live-chat__note { grid-column: 1 / -1; margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.live-chat__note[hidden] { display: none; }
@media (max-width: 1100px) {
  .live { grid-template-columns: minmax(0, 1fr); }
  .live-chat { position: static; height: 480px; }
}

.live-wait { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-10); align-items: center; max-width: 1080px; }
.live-wait:not(:has(.live-wait__picture)) { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.live-wait__picture { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.live-wait__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.live-wait__text .page-title, .live-wait__text .page-lede { margin: 0; }
.live-wait__text .live-about__text { margin-top: 0; }
.live-wait__count { margin: var(--space-2) 0 0; font-family: var(--font-display); font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .live-wait { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } }

/* A book: the cover on the left at its own shape, what it is beside it,
   Read the one main action, then the description and the author. */
.book { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: var(--space-10); align-items: start; max-width: 1040px; margin-top: var(--space-4); }
.book__cover { overflow: hidden; aspect-ratio: 3 / 4; border-radius: var(--radius); background: var(--color-neutral-grey); box-shadow: 0 1px 0 var(--color-line); }
.book__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.book__blank { display: grid; place-items: center; height: 100%; padding: var(--space-6); font-family: var(--font-display); font-size: var(--text-lg); text-align: center; color: var(--color-text-muted); }
.book__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.book__text .page-title { margin: 0; }
.book__author { margin: calc(var(--space-2) * -1) 0 var(--space-2); color: var(--color-text-muted); }
.book__about { max-width: 64ch; margin-top: var(--space-4); color: var(--color-text-muted); }
.book__about > :first-child { margin-top: 0; }
.book__writer { display: flex; gap: var(--space-4); align-items: flex-start; width: 100%; max-width: 64ch; margin-top: var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--color-line); }
.book__writer-photo { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.book__writer > div { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.book__writer-name { font-weight: var(--weight-medium); }
.book__writer-bio { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
@media (max-width: 720px) {
  .book { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .book__cover { width: min(220px, 60%); }
}

/* Suggestions under a search box while typing: a light panel the width of
   the box (at least 360px), a small picture and the name with what it is,
   the current one tinted; the last row opens all the results. */
.has-suggest { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; z-index: 70; width: max(100%, 360px); max-width: calc(100vw - 32px); max-height: min(440px, 70vh); margin: 0; padding: var(--space-2); overflow-y: auto; list-style: none; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); box-shadow: 0 12px 32px rgba(30, 26, 22, 0.1); }
.suggest[hidden] { display: none; }
.suggest__item, .suggest__all { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-nested); color: var(--color-text); text-decoration: none; }
.suggest [aria-selected="true"] > a, .suggest a:hover { background: var(--color-neutral-grey); }
.suggest__picture { flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 8px; background: var(--color-neutral-grey); }
.suggest__picture.is-round { border-radius: 50%; }
.suggest__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.suggest__picture.is-round img { filter: grayscale(1); }
.suggest__text { display: flex; flex-direction: column; min-width: 0; }
.suggest__title { overflow: hidden; font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; }
.suggest__meta { overflow: hidden; font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; text-overflow: ellipsis; }
.suggest__foot { position: sticky; bottom: calc(var(--space-2) * -1); margin: var(--space-2) 0 calc(var(--space-2) * -1); padding: var(--space-2) 0; border-top: 1px solid var(--color-line); background: var(--color-surface); }
.suggest__all { justify-content: space-between; min-height: var(--control-height); padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.suggest__all svg { flex: none; color: var(--color-text-subtle); transition: transform var(--duration-hover) var(--ease-out); }
.suggest [aria-selected="true"] > .suggest__all svg, .suggest__all:hover svg { color: var(--color-text); transform: translateX(2px); }

/* Collective coherence, for internal people: one row over the Toolbox, as
   Home's two tiles are drawn, saying it is for the team. */
.team-tile { display: flex; align-items: center; gap: var(--tile-gap); margin-bottom: var(--card-gap); padding: var(--tile-pad); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; transition: border-color var(--duration-hover) var(--ease-out); }
.team-tile:hover { border-color: var(--color-line-strong); }
.team-tile__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--radius-nested); background: var(--color-neutral-grey); }
.team-tile__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.team-tile__text small { font-size: var(--text-caps); letter-spacing: var(--tracking-caps); line-height: var(--leading-caps); text-transform: uppercase; color: var(--color-text-muted); }
.team-tile__text strong { font-weight: var(--weight-medium); }
.team-tile__text span { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Your Guide, in three zones. Your conversations: a soft grey panel down
   the side. The conversation: a framed panel the height of the window,
   its header naming it beside the Guide's icon, the messages scrolling
   inside it, the note that the Guide is AI at their top (the standard
   notice). The place you write: the panel's foot, behind a hairline. Your
   words sit on the right in a soft grey bubble; the Guide's are plain text,
   a reply written to you; the sessions it suggests follow as cards. */
.guide { --guide-h: calc(100vh - var(--topbar-height) - var(--space-16)); display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--card-gap); align-items: stretch; height: var(--guide-h); min-height: 520px; }
.guide__side { display: flex; flex-direction: column; gap: var(--space-3); min-height: 0; padding: var(--space-4); overflow-y: auto; border-radius: var(--radius); background: var(--color-neutral-grey); }
.guide__new { justify-content: center; width: 100%; background: var(--color-surface); }
.guide__side-title { margin: var(--space-3) 0 0; padding: 0 var(--space-3); font-size: var(--text-caps); line-height: var(--leading-caps); letter-spacing: var(--tracking-caps); font-weight: var(--weight-regular); text-transform: uppercase; color: var(--color-text-muted); }
.guide__list { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.guide__convo { display: block; overflow: hidden; padding: 10px var(--space-3); border-radius: var(--radius-nested); color: var(--color-text); font-size: var(--text-sm); text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.guide__convo:hover { background: rgba(29, 25, 21, 0.05); }
.guide__convo[aria-current] { background: var(--color-surface); font-weight: var(--weight-medium); box-shadow: 0 0 0 1px var(--color-line); }
.guide__none { margin: 0; padding: 0 var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.guide__panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.guide__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--color-line); }
.guide__mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--color-neutral-grey); }
.guide__title { margin: 0; overflow: hidden; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); white-space: nowrap; text-overflow: ellipsis; }
.guide__messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-6); overscroll-behavior: contain; }
.guide__messages > * { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
.guide__notice.notice { margin: 0 auto; }
.guide__hello { margin-top: auto; margin-bottom: auto; padding: var(--space-4) 0; }
.guide__hello-title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-regular); line-height: var(--leading-h2); }
.guide__hello-lede { max-width: 56ch; margin: var(--space-2) 0 0; color: var(--color-text-muted); }
.guide__prompts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.guide__prompt { max-width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius-nested); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer; transition: border-color var(--duration-hover) var(--ease-out), background var(--duration-hover) var(--ease-out); }
.guide__prompt:hover { border-color: var(--color-line-strong); background: var(--color-neutral-grey); }
.guide-msg { display: flex; flex-direction: column; gap: var(--space-3); }
.guide-msg--user { align-items: flex-end; }
.guide-msg--user .guide-msg__body { max-width: 80%; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--color-neutral-grey); white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-msg--assistant .guide-msg__body { font-size: var(--text-base); line-height: 1.65; overflow-wrap: anywhere; }
.guide-msg__body > :first-child { margin-top: 0; }
.guide-msg__body > :last-child { margin-bottom: 0; }
.guide-msg__body p { margin: 0 0 var(--space-3); }
.guide-msg__body ul, .guide-msg__body ol { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.guide-msg__body li + li { margin-top: var(--space-1); }
.guide-msg__body a { color: var(--color-text); }
.guide-msg__sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.guide-session { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border: 1px solid var(--color-line); border-radius: var(--radius); color: var(--color-text); text-decoration: none; transition: border-color var(--duration-hover) var(--ease-out); }
.guide-session:hover { border-color: var(--color-line-strong); }
.guide-session__picture { flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: var(--radius-nested); background: var(--color-neutral-grey); }
.guide-session__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide-session__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guide-session__text strong { overflow: hidden; font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; text-overflow: ellipsis; }
.guide-session__text span { font-size: var(--text-xs); color: var(--color-text-muted); }
.guide-thinking { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.guide-thinking__dots { display: inline-flex; gap: var(--space-1); }
.guide-thinking__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-subtle); }
@media (prefers-reduced-motion: no-preference) {
  .guide-thinking__dots i { animation: guide-breathe 1.4s ease-in-out infinite; }
  .guide-thinking__dots i:nth-child(2) { animation-delay: 0.2s; }
  .guide-thinking__dots i:nth-child(3) { animation-delay: 0.4s; }
}
@keyframes guide-breathe { 0%, 100% { opacity: 0.3; transform: scale(0.85); } 50% { opacity: 1; transform: none; } }
.guide-thinking__stop { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); cursor: pointer; }
.guide-problem { font-size: var(--text-sm); color: var(--color-text-muted); }
.guide-problem button { padding: 0; border: 0; background: none; font: inherit; color: var(--color-text); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.guide__write { padding: var(--space-4) var(--space-6) var(--space-5); border-top: 1px solid var(--color-line); }
.guide__write > * { max-width: 720px; margin: 0 auto; }
.guide__composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-2); }
.guide__input { min-height: 48px; max-height: 200px; padding: 13px var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-base); line-height: 1.4; resize: none; }
.guide__input:focus { outline: none; border-color: var(--color-line-strong); }
.guide__send { width: 48px; height: 48px; }
.guide__send:disabled { opacity: 0.4; cursor: default; }
.guide__ai-off { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.guide__ai-off p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.guide__ai-off strong { color: var(--color-text); font-weight: var(--weight-medium); }
.guide-badge, .quick-space__visual--guide { color: var(--color-text); }
@media (max-width: 860px) {
  .guide { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .guide__panel { height: calc(100svh - var(--topbar-height) - var(--space-8)); min-height: 480px; }
  .guide__side { order: 2; max-height: none; }
  .guide__head, .guide__messages, .guide__write { padding-left: var(--space-4); padding-right: var(--space-4); }
  .guide__ai-off { flex-direction: column; align-items: flex-start; }
}

/* A session whose video is gone from the CDN says so where Start would be. */
.session-unavailable { display: flex; gap: var(--space-2); align-items: flex-start; margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
[data-ci-step="summary"] > .checkin-eyebrow, [data-ci-step="summary"] > .checkin-step__title, [data-ci-step="summary"] > .checkin-lede { display: block; text-align: center; }

/* A short note led by an icon: the icon centred on the first line of the
   words, however many lines follow. */
.icon-note { display: flex; gap: var(--space-2); align-items: flex-start; margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }
.icon-note > svg { margin-top: calc((1.5em - var(--space-4)) / 2); }

/* Text on cards: one style per role, on every card type (DESIGN-SYSTEM.md,
   "Text on cards"). A text link on a card is the standard text link: the
   web app's small arrow link, muted, regular, ink on hover; it is never the
   card's main action. */
.card__expert, .featured-author, .sleep-feature__expert small { font-weight: var(--weight-regular); }
.card-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: var(--weight-regular); color: var(--color-text-muted);
  white-space: nowrap;
  transition: color var(--duration-hover) var(--ease-out);
}
.card-link:hover, .card-link:focus-visible, a:hover .card-link, a:focus-visible .card-link { color: var(--color-text); }
.practice-featured__month, .featured-lead__title { font-weight: var(--weight-medium); }
.featured-lead__about { color: var(--color-text-muted); }
.featured-tags span { color: var(--color-text-subtle); }

/* An expert's name in the Experts directory: the box title, the largest
   standard title that keeps every name on one line in three columns at
   desktop widths (it grows with the window, 22px at 1224px to 24px at
   1920px); below 1180px, the card title (16px), so no name breaks. */
.expert-card--large .card__title { font-size: var(--title-box); line-height: 1.25; }
@media (max-width: 1179px) { .expert-card--large .card__title { font-size: var(--text-md); line-height: 1.3; } }

/* The Guide's list: each conversation a row with room around it; on hover
   or keyboard focus a small "…" at its end opens a menu under it with
   Delete, which asks first, in the same menu. */
.guide__item { position: relative; }
.guide__item .guide__convo { padding-right: var(--space-10); }
.guide__more { position: absolute; top: 50%; right: var(--space-1); display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-nested); background: none; color: var(--color-text-muted); cursor: pointer; opacity: 0; transform: translateY(-50%); transition: opacity var(--duration-hover) var(--ease-out), background var(--duration-hover) var(--ease-out); }
.guide__item:hover .guide__more, .guide__item:focus-within .guide__more, .guide__item.is-open .guide__more { opacity: 1; }
.guide__more:hover, .guide__item.is-open .guide__more { background: rgba(29, 25, 21, 0.06); color: var(--color-text); }
.guide__more:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.guide__menu { position: absolute; top: calc(100% + var(--space-1)); left: 0; right: 0; z-index: 10; padding: var(--space-2); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); box-shadow: 0 12px 32px rgba(30, 26, 22, 0.1); }
.guide__menu[hidden], .guide__menu [hidden] { display: none; }
.guide__menu-item { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-nested); background: none; color: var(--color-error); font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer; }
.guide__menu-item:hover, .guide__menu-item:focus-visible { background: var(--color-neutral-grey); outline: none; }
.guide__menu p { margin: var(--space-2) var(--space-2) var(--space-4); font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text); }
.guide__menu .guide__confirm-actions { padding: 0 var(--space-2) var(--space-2); }
.guide__confirm-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); }
.guide__confirm-actions .text-link { padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); cursor: pointer; }
.guide__confirm-yes { background: var(--color-error); border-color: var(--color-error); color: #fff; }

/* On a desktop the Guide fills the window with the page's footer under it:
   the content column is at least the window's height, the main area takes
   what the footer leaves, and the Guide takes all of it (never under
   480px); the conversation scrolls inside its panel. */
@media (min-width: 861px) {
  body:has(.guide) .content { min-height: calc(100vh - var(--topbar-height)); }
  body:has(.guide) .main { display: flex; flex-direction: column; padding-bottom: var(--space-8); }
  body:has(.guide) .guide { flex: 1 1 0; height: auto; min-height: 480px; }
}
.notice--small-icon .notice__icon svg { width: auto; height: auto; }
/* A small icon sits in a box the height of the title's line, centred, so it
   is level with the title. */
.notice--small-icon .notice__icon { height: var(--wearable-icon-size); align-items: center; }

/* Cards in a row end level: the footer (labels and length) keeps to the
   card's foot, and what is above it keeps one shape, so the gap over the
   footer stays small: a title of at most two lines, broken into balanced
   lines (no short first line), one line for the person, two for the
   description. */
.card__footer { margin-top: auto; }
.card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; }
.card__expert { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* The intention image, inside the check-in only: the picture, drawn tiny
   and stretched so it reads as a soft blur, under a light veil on the
   dialog's ground (the bar and the actions frosted over it); sharp at the
   top of the summary card. */
/* The artwork comes in gently: it arrives under a fully white veil, which
   thins to its 82% over 900ms (the veil is a registered number, so it can
   ease). */
@property --ci-veil { syntax: "<number>"; inherits: false; initial-value: 1; }
.checkin-dialog.has-art { --ci-veil: 1; background: linear-gradient(rgba(255, 255, 255, var(--ci-veil)), rgba(255, 255, 255, var(--ci-veil))), var(--ci-art) center / cover no-repeat, var(--color-surface); transition: --ci-veil 900ms var(--ease-out); }
.checkin-dialog.has-art.is-art-in { --ci-veil: 0.82; }
@media (prefers-reduced-motion: reduce) { .checkin-dialog.has-art { transition: none; } }
.checkin-dialog.has-art .checkin-dialog__bar,
.checkin-dialog.has-art .checkin-step .checkin-actions { background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.ci-sum__art { display: block; width: calc(100% + 2 * var(--space-6)); max-width: none; aspect-ratio: 16 / 9; margin: calc(var(--space-8) * -1) calc(var(--space-6) * -1) 0; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.ci-sum__art[hidden] { display: none; }
@media (max-width: 520px) { .ci-sum__art { width: calc(100% + 2 * var(--space-4)); margin: calc(var(--space-6) * -1) calc(var(--space-4) * -1) 0; } }

/* The recommended session, first in the summary: the session as a row
   card (its picture, title, who and how long, why), then Another
   suggestion and Undo as quiet actions under it. */
.ci-suggest { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3); width: 100%; text-align: left; }
.ci-suggest[hidden] { display: none; }
.ci-suggest__card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-nested); background: var(--color-surface); color: var(--color-text); text-decoration: none; transition: border-color var(--duration-hover) var(--ease-out); }
.ci-suggest__card:hover { border-color: var(--color-line-strong); }
.ci-suggest__picture { width: 72px; height: 72px; overflow: hidden; border-radius: var(--radius-nested); background: var(--color-neutral-grey); }
.ci-suggest__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ci-suggest__picture img:not([src]) { visibility: hidden; }
.ci-suggest__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ci-suggest__text strong { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); }
.ci-suggest__meta { font-size: var(--text-xs); color: var(--color-text-subtle); }
.ci-suggest__why { margin-top: var(--space-1); font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-suggest__go { color: var(--color-text-subtle); }
.ci-suggest__actions { display: flex; justify-content: flex-end; gap: var(--space-5); }
.ci-suggest__action { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0; border: 0; background: none; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.ci-suggest__action:hover { color: var(--color-text); }
.ci-suggest__action[hidden] { display: none; }
.ci-suggest__actions:not(:has(> :not([hidden]))) { display: none; }
[data-ci-step="kept"] .ci-suggest { margin: var(--space-6) 0 var(--space-4); }
.home-suggest { margin-top: var(--opening-gap); }

/* The place's card, compact under the map: a 200px picture column, less
   padding, the invitation's lines closer. Beside the map (1440px and up) its
   picture is a shorter band so the card fits the map's height. */
@media (min-width: 641px) and (max-width: 1439px) {
  .lw-panel__place { grid-template-columns: 200px minmax(0, 1fr); }
  .lw-panel__body { padding: var(--space-5); }
  .lw-panel__name { margin: var(--space-1) 0; font-size: var(--text-lg); }
  .lw-panel__invitation { margin: var(--space-3) 0 0; padding: var(--space-2) 0 0; border-bottom: 0; }
  .lw-panel__invitation p { font-size: var(--text-base); }
}
@container (min-width: 520px) {
  .lw-panel__body { padding: var(--space-5) var(--space-6); row-gap: 0; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .lw-panel__place { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (min-width: 1440px) {
  .lw-panel__picture { aspect-ratio: 3 / 1; }
  .lw-panel__body { padding: var(--space-4) var(--space-5); }
  .lw-panel__name { margin: var(--space-1) 0; font-size: var(--text-lg); }
  .lw-panel__invitation { margin: var(--space-3) 0; padding: var(--space-2) 0; }
  .lw-panel__invitation p { font-size: var(--text-base); }
  .lw-panel__actions { gap: var(--space-2); }
}
/* Where the map beside it is short (1440 to 1599px), the card leaves out
   its picture, which the map already shows, so all it offers fits. */
@media (min-width: 1440px) and (max-width: 1599px) {
  .lw-panel__picture { display: none; }
}

/* The course card on Home: the expert's role line clear of "With …" and its
   underline; open, the lessons on the same grey as the strip that opens
   them, with lines only between rows (none above the first) and, after the
   last, the strip's own padding. */
.sleep-feature__expert small { margin-top: var(--space-2); }
.sleep-lessons[open] { background: var(--color-neutral-grey); }
.sleep-lessons__list { padding: 0 27px 9px; }
.sleep-lessons__list a { min-height: 56px; }
.sleep-lessons__list li:nth-child(-n+2) a { border-top: 0; }
@media (max-width: 720px) {
  .sleep-lessons__list li:nth-child(2) a { border-top: 1px solid var(--color-line); }
}

/* The design system's dropdown (ui/dropdown). Our caret on the right, with
   room kept for it so the words never run under it; the words stay on one
   line and end in an ellipsis rather than clip. Open, its list is a panel
   (14px corners, the overlay shadow, 4px in), its options 10px corners, grey
   on hover and keyboard focus, the chosen one medium with a check. Without
   app.js the native select shows, with the same caret. */
.dropdown { position: relative; }
.dropdown .select {
  appearance: none; -webkit-appearance: none;
  display: flex; align-items: center;
  padding-right: calc(var(--space-3) + var(--space-4) + var(--space-3));
  color: var(--color-text); font-size: var(--text-base); line-height: 1.4; text-align: left;
  cursor: pointer;
}
.dropdown.is-enhanced .dropdown__native { display: none; }
.dropdown__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown__chevron {
  position: absolute; top: 0; right: var(--space-3); height: var(--control-height);
  display: flex; align-items: center;
  color: var(--color-text-muted); pointer-events: none;
  transition: transform var(--duration) var(--ease-out);
}
.dropdown.is-open .dropdown__chevron { transform: rotate(180deg); }
.dropdown .select:hover { border-color: var(--color-text-muted); }
.dropdown .select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.dropdown.is-open .select { border-color: var(--color-text); }
.dropdown__list {
  position: absolute; left: 0; right: 0; top: calc(100% + var(--space-1)); z-index: 50;
  max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: var(--space-1); list-style: none;
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--radius); box-shadow: var(--shadow-overlay);
  animation: menu-in var(--duration) var(--ease-out);
}
.dropdown.opens-up .dropdown__list { top: auto; bottom: calc(100% + var(--space-1)); }
.dropdown__option {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 40px; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-nested-tight);
  font-size: var(--text-base); line-height: 1.35; color: var(--color-text); cursor: pointer;
}
.dropdown__option.is-active { background: var(--color-surface-muted); }
.dropdown__option[aria-selected="true"] { font-weight: var(--weight-medium); }
.dropdown__check { flex-shrink: 0; visibility: hidden; }
.dropdown__option[aria-selected="true"] .dropdown__check { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .dropdown__list { animation: none; }
  .dropdown__chevron { transition: none; }
}

/* Living World from 1440px: the map fills its column, so map and card take
   the content's full width. */
@media (min-width: 1440px) {
  .lw-map { width: 100%; justify-self: stretch; }
}
/* The place card's actions are one group in every layout: full-width
   buttons of one height, stacked, the main one dark and the others
   outlined, with no divider lines between them. */
.lw-panel__actions,
.lw-panel__body > .lw-panel__actions { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--space-2); }
.lw-panel__actions > .button { width: 100%; }
.lw-panel__more,
.lw-panel__body > .lw-panel__actions .lw-panel__more { display: flex; flex-direction: column; flex: none; gap: var(--space-2); border-top: 0; }
.lw-panel__more li { border-bottom: 0; }
.lw-panel__more .lw-listen, .lw-panel__more .lw-panel__link {
  justify-content: center; gap: var(--space-3); height: var(--control-height); min-height: var(--control-height); padding: 0 17px;
  border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-surface);
  font-weight: var(--weight-medium);
  transition: background-color var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out);
}
.lw-panel__more .lw-panel__link svg { color: currentColor; }
.lw-panel__more .lw-listen:hover, .lw-panel__more .lw-panel__link:hover { border-color: var(--color-text); text-decoration: none; }
.lw-panel__more .lw-listen:hover [data-listen-text] { text-decoration: none; }
.lw-panel__more .lw-listen[data-state="playing"] { border-color: var(--color-surface-dark); background: var(--color-surface-dark); color: var(--color-text-on-dark); }
.lw-panel__more .lw-listen[data-state="playing"] .lw-listen__ring { border-color: rgba(255, 255, 255, 0.4); border-top-color: var(--color-text-on-dark); }
.lw-panel__more :is(.lw-listen, .lw-panel__link):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* On a phone the card stacks: the picture a 16:9 band over the words, not
   stretched to the card's height. */
@media (max-width: 640px) {
  .lw-panel__place { flex-direction: column; }
  .lw-panel__picture { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
}

/* Sharing a check-in as an image: the summary card's quiet last line opens
   a dialog with the image's live preview beside (or above, when narrow)
   the parts to put on it, what the image holds and doesn't, then Share and
   Download. */
.ci-sum__share {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) 0; border: 0; background: none;
  font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer;
  transition: color var(--duration-hover) var(--ease-out);
}
.ci-sum__share:hover { color: var(--color-text); }
.ci-sum__share:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
.ci-share {
  width: min(760px, calc(100% - 28px)); max-width: none; max-height: calc(100dvh - 28px);
  margin: auto; padding: 0; overflow-y: auto; overscroll-behavior: contain;
  border: 0; border-radius: var(--radius); background: var(--color-surface); color: var(--color-text);
  box-shadow: var(--shadow-overlay);
}
.ci-share::backdrop { background: rgba(0, 0, 0, 0.32); }
.ci-share__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-6); border-bottom: 1px solid var(--color-line); }
.ci-share__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-medium); }
.ci-share__body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--space-8); align-items: start; padding: var(--space-6); }
.ci-share__preview canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius-nested); background: #202027; }
.ci-share__side { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.ci-share__parts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.ci-share__parts legend { width: 100%; margin-bottom: var(--space-3); padding: 0; }
.ci-share__part {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4) 0 var(--space-3);
  border: 1px solid var(--color-line); border-radius: var(--radius-nested); font-size: var(--text-base); line-height: 1; cursor: pointer;
  transition: border-color var(--duration-hover) var(--ease-out);
}
.ci-share__part:hover { border-color: var(--color-line-strong); }
.ci-share__part:has(input:checked) { border-color: var(--color-text); }
.ci-share__part:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.ci-share__part:has(input:disabled) { cursor: default; }
.ci-share__part:has(input:disabled:not(:checked)) { opacity: 0.45; }
.ci-share__part input {
  appearance: none; display: grid; place-content: center; flex: none; width: 16px; height: 16px; margin: 0;
  border: 1.5px solid var(--color-text-subtle); border-radius: 4px; cursor: inherit;
}
.ci-share__part input:checked { border-color: var(--color-text); background: var(--color-text); }
.ci-share__part input:checked::before { content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid var(--color-surface); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ci-share__note { max-width: 46ch; }
.ci-share__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 640px) {
  .ci-share__body { grid-template-columns: 1fr; gap: var(--space-5); padding: var(--space-5) var(--space-4); }
  .ci-share__preview { width: min(280px, 100%); margin: 0 auto; }
  .ci-share__bar { padding-left: var(--space-4); }
  .ci-share__actions > .button { flex: 1 1 auto; }
}

/* Over time (/data): a page per signal, as the mobile app's insights. The
   five signals as tabs, then Day, Week, Month, Year and the period with its
   arrows, then a card per chart: its title, its figures, the chart. Charts
   are ink on the page's white, the night's stages four tones of ink, stress
   zones four, how you feel in the check-in's five colours. */
.data-page .back-link { margin-bottom: var(--space-4); }
.data-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-5); }
.data-tab {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4);
  border: 1px solid var(--color-line); border-radius: var(--radius-pill); color: var(--color-text); font-size: var(--text-sm); text-decoration: none;
  transition: border-color var(--duration-hover) var(--ease-out);
}
.data-tab:hover { border-color: var(--color-line-strong); }
.data-tab[aria-current="page"] { border-color: var(--color-surface-dark); background: var(--color-surface-dark); color: var(--color-text-on-dark); }
.data-tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.data-period { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-6); }
.data-views { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: min(100%, 360px); }
.data-views .segmented__item { color: var(--color-text-muted); text-decoration: none; }
.data-nav { display: flex; align-items: center; gap: var(--space-2); }
.data-nav__label { min-width: 140px; text-align: center; font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.data-nav .is-disabled { opacity: 0.35; pointer-events: none; }
.data-cards { display: flex; flex-direction: column; gap: var(--card-gap); }
.data-card { padding: var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.data-card__title { margin: 0 0 var(--space-4); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); }
.data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--card-gap); }
.data-grid .data-card { padding: var(--space-5); }
.data-stats { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); margin-bottom: var(--space-5); }
.data-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.data-stat__value { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-medium); line-height: 1.2; font-variant-numeric: tabular-nums; }
.data-stat__label { font-size: var(--text-sm); color: var(--color-text-muted); }
.data-stat__line { font-size: var(--text-xs); color: var(--color-text-subtle); }
.data-empty { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.data-empty svg { flex: none; }
.data-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: var(--space-4) 0 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--color-text-muted); }
.data-legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.data-legend strong { color: var(--color-text); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.data-swatch { width: 10px; height: 10px; border-radius: 2px; }

/* The overview: one row per signal, its latest figure on the right. */
.data-links { display: flex; flex-direction: column; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; margin-bottom: var(--space-4); }
.data-link {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 16px; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); color: var(--color-text); text-decoration: none;
  transition: background-color var(--duration-hover) var(--ease-out);
}
.data-link + .data-link { border-top: 1px solid var(--color-row-divider); }
.data-link:hover { background: var(--color-neutral-grey); }
.data-link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.data-link__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-round); background: var(--color-neutral-grey); }
.data-link__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.data-link__value { font-variant-numeric: tabular-nums; text-align: right; }
.data-link > svg { color: var(--color-text-subtle); }
@media (max-width: 640px) {
  .data-link { grid-template-columns: 40px minmax(0, 1fr) 16px; }
  .data-link__value { grid-column: 2; grid-row: 2; text-align: left; font-size: var(--text-sm); }
  .data-link > svg { grid-column: 3; grid-row: 1 / 3; }
  .data-card { padding: var(--space-5) var(--space-4); }
  .data-nav__label { min-width: 0; flex: 1; }
  .data-nav { width: 100%; justify-content: space-between; }
  .data-views { width: 100%; }
  .data-views--placeholder { display: none; }
}

/* A chart, as the app's bar chart (ui/components/barchart): bars of one
   width, each standing on a full-height track, no scale; the average as a
   1px line across; the labels under, placed as the app places them. A bar
   takes half its slot (its hour, day, reading or month), about what the
   app's bars take of theirs on a phone, so a phone keeps the app's bars
   and a wide card gets thicker ones; never under --space-1 (the app's
   4px) nor over --space-8. */
.chart { --bar-share: 0.5; --bar-min: var(--space-1); --bar-max: var(--space-8); margin: 0; }
.chart__plot { position: relative; height: 90px; }
.chart__cols { display: flex; justify-content: space-between; height: 100%; }
.chart__col { flex: 1 1 0; display: flex; justify-content: center; height: 100%; min-width: 0; cursor: pointer; }
.chart.is-empty .chart__col { cursor: default; }
.chart__track { position: relative; width: min(100%, clamp(var(--bar-min), calc(var(--bar-share) * 100%), var(--bar-max))); height: 100%; background: var(--chart-track); overflow: hidden; transition: opacity var(--duration-hover) var(--ease-out); }
.chart__bar { position: absolute; left: 0; right: 0; background: var(--chart-ink-4); }
.chart__bar--quiet { background: var(--chart-ink-3); }
.chart__stack { position: absolute; left: 0; right: 0; display: flex; flex-direction: column; }
.chart__seg { display: block; min-height: 1px; }
.chart__avg { position: absolute; left: 0; right: 0; height: 1px; background: var(--chart-average); pointer-events: none; }
.chart--midline .chart__avg { background: var(--color-line-strong); }
.chart.has-selection .chart__col:not(.is-selected) .chart__track { opacity: 0.25; }
.chart__axis { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.chart__axis--edges { position: relative; height: 1.5em; }
.chart__label { white-space: nowrap; }
.chart__label--start { position: absolute; left: 0; color: var(--color-text); }
.chart__label--end { position: absolute; right: 0; color: var(--color-text); }
/* A time axis reads from its ends: the first and last labels in ink, those
   between quieter but still text, --color-text-subtle, #707070 on white,
   4.9:1. */
.chart__label--mid { position: absolute; transform: translateX(-50%); color: var(--color-text-subtle); }
.chart__axis--spread { display: flex; justify-content: space-between; }
.chart__axis--spread .chart__label { flex: 1 1 0; min-width: 0; text-align: center; }
.chart__inset { margin: 0 8.333%; }
/* The night, as the app's last-night card: a row per phase. */
.chart__rows { display: flex; flex-direction: column; gap: 2px; }
.chart__row { position: relative; height: 20px; background: var(--chart-track); }
.chart__row--tall { height: 55px; }
.phase-wake, .phase-unknown, .zone-recovery { background: var(--chart-tone-1); }
.phase-rem, .zone-engaged { background: var(--chart-tone-2); --chart-line: var(--chart-tone-2-line); }
:is(.chart__track, .chart__row, .data-stages__track) :is(.phase-wake, .phase-unknown, .zone-recovery), :is(.data-legend, .data-stages) .data-swatch:is(.phase-wake, .zone-recovery) { --chart-line: var(--chart-tone-1-line); box-shadow: inset 0 0 0 1px var(--chart-line); }
.phase-light, .zone-elevated { background: var(--chart-tone-3); }
.phase-deep, .zone-high { background: var(--chart-tone-4); }
.phase-asleep { background: var(--chart-asleep); --chart-line: var(--chart-asleep-line); }
/* The palest tones' hairline, an inset shadow so it stays inside the shape
   and changes no size. Where two shapes touch only one of them draws the
   shared edge: in a stacked bar each draws its top and sides and only the
   lowest its bottom; in a night's row a stretch that follows straight on
   from one of the same phase leaves out its left. */
:is(.phase-rem, .zone-engaged, .phase-asleep) { box-shadow: inset 0 0 0 1px var(--chart-line); }
.chart__stack > :is(.zone-engaged, .phase-rem, .phase-asleep, .phase-wake, .phase-unknown, .zone-recovery) { box-shadow: inset 1px 0 var(--chart-line), inset -1px 0 var(--chart-line), inset 0 1px var(--chart-line); }
.chart__stack > :is(.zone-engaged, .phase-rem, .phase-asleep, .phase-wake, .phase-unknown, .zone-recovery):last-child { box-shadow: inset 0 0 0 1px var(--chart-line); }
/* A very short stretch of the night, a minute awake, still shows. */
.chart__row > .chart__seg { position: absolute; top: 0; bottom: 0; min-width: var(--space-1); }
.chart__row > .chart__seg.is-joined { box-shadow: inset -1px 0 var(--chart-line), inset 0 1px var(--chart-line), inset 0 -1px var(--chart-line); }

/* My Twin's sheets (an area, a signal), as the mobile app 2.0's: a panel
   from the right, or from below on a phone. A row's name is its button, and
   the button reaches over the whole row. */
.row-open { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.row-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row-open:focus-visible { outline: none; }
.row-open:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.area-row, .reading { position: relative; }
/* An area row's hover is a soft highlight of its own, rounded and reaching
   12px past the row's words on each side and 4px into the row's own padding above and below, so
   nothing touches its edge; a reading, a card with a line, darkens its line
   as the other cards do. */
.area-row { isolation: isolate; }
.area-row::before {
  content: ""; position: absolute; z-index: -1; inset: 4px calc(-1 * var(--space-3));
  border-radius: var(--radius-nested); background: var(--color-neutral-grey);
  opacity: 0; transition: opacity var(--duration-hover) var(--ease-out);
}
.area-row:has(.row-open):hover::before { opacity: 1; }
.area-row .row-open::after { inset: 4px calc(-1 * var(--space-3)); border-radius: var(--radius-nested); }
.reading { transition: border-color var(--duration-hover) var(--ease-out); }
.reading:has(.row-open):hover { border-color: var(--color-line-strong); }
.reading .row-open::after { border-radius: var(--radius); }
.twin-sheet {
  position: fixed; inset: 0 0 0 auto; width: min(440px, 100%); max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain;
  border: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--color-surface); color: var(--color-text);
  box-shadow: var(--shadow-overlay);
}
.twin-sheet::backdrop { background: rgba(0, 0, 0, 0.32); }
.twin-sheet__bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: var(--space-3); background: var(--color-surface); }
.twin-sheet__body { display: flex; flex-direction: column; gap: var(--space-6); padding: 0 var(--space-6) var(--space-8); }
.twin-sheet__head { display: flex; flex-direction: column; gap: var(--space-2); }
.twin-sheet__title { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-medium); line-height: 1.2; }
.twin-sheet__line { margin: 0; color: var(--color-text-muted); }
.twin-sheet__parts { display: flex; flex-direction: column; gap: var(--space-6); }
.twin-sheet__part { display: flex; flex-direction: column; gap: var(--space-3); }
.twin-sheet__part p { margin: 0; }
.twin-sheet__card { padding: var(--space-5); border: 1px solid var(--color-line); border-radius: var(--radius); }
.twin-sheet__subhead { margin: 0; font-size: var(--text-base); font-weight: var(--weight-medium); }
.twin-sheet__days { margin: 0; padding: 0 var(--space-5); list-style: none; border: 1px solid var(--color-line); border-radius: var(--radius); }
.twin-sheet__days li { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: var(--space-3) 0; }
.twin-sheet__days li + li { border-top: 1px solid var(--color-row-divider); }
.twin-sheet__date { font-size: var(--text-sm); color: var(--color-text-muted); }
.twin-sheet__actions { display: flex; flex-direction: column; gap: var(--space-3); }
.twin-sheet__actions > .button { width: 100%; justify-content: center; white-space: normal; height: auto; min-height: var(--control-height); padding-top: var(--space-2); padding-bottom: var(--space-2); text-align: center; }
@media (max-width: 640px) {
  .twin-sheet { inset: auto 0 0 0; width: 100%; height: auto; max-height: 88dvh; border-radius: var(--radius) var(--radius) 0 0; }
  .twin-sheet__body { padding: 0 var(--space-4) var(--space-6); }
}
.twin-sheet[open] { display: flex; flex-direction: column; }
.twin-sheet__body { flex: 1 0 auto; }
.twin-sheet__title:focus { outline: none; }

/* Plan's History: days newest first, each a heading over its rows, the time
   in a fixed column so every row's words start on one edge. */
.history { display: flex; flex-direction: column; gap: var(--space-8); }
.history-day__title { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); }
.history-day__items { margin: 0; padding: 0 var(--space-5); list-style: none; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.history-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4) 0; }
.history-item + .history-item { border-top: 1px solid var(--color-row-divider); }
.history-item__time { font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.history-item__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-item__kind { font-size: var(--text-xs); color: var(--color-text-subtle); line-height: 1.5; }
.history-item__title { font-weight: var(--weight-medium); color: var(--color-text); }
a.history-item__title { text-decoration: none; }
a.history-item__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.history-item__line { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.history-squares { display: flex; gap: var(--space-1); margin-top: var(--space-1); }
.history-squares i { width: 12px; height: 12px; border-radius: 2px; background: var(--step); box-shadow: inset 0 0 0 1px var(--color-line); }
.history-more { margin: var(--space-6) 0 0; }
.plan-started { margin: 0 0 var(--space-6); color: var(--color-text); }
@media (max-width: 640px) {
  .history-day__items { padding: 0 var(--space-4); }
  .history-item { grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-3); }
}
/* A journey's start: the button, then a quiet line on the run it replaces,
   or why it can't start yet. */
.journey-start__go { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.journey-start__note { margin: 0; }
/* A page's "With …" line: the person's style (DESIGN-SYSTEM.md, Person). */
.with-line { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-regular); color: var(--color-text-muted); }
/* On a phone a section's head stacks: its title and line take the width,
   its link (See all …) under them, so the words aren't squeezed beside it. */
@media (max-width: 640px) {
  .section__head { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
}

/* The Guide: where you write is a soft grey band under the conversation,
   its field white with a firmer line, so the chat reads as one at first
   sight; the list of conversations has room between its items. */
.guide__write { background: var(--color-neutral-grey); border-top-color: var(--color-row-divider); }
.guide__input { border-color: var(--color-line-strong); transition: border-color var(--duration-hover) var(--ease-out); }
.guide__input:hover { border-color: var(--color-text-subtle); }
.guide__list { gap: var(--space-2); }
.guide__convo { padding: var(--space-3) var(--space-3); }
/* Data interpretation offered in the conversation: a quiet card under the
   Guide's answer, what it means, then Turn on and ask again, or Not now. */
.guide-data { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.guide-data strong { font-weight: var(--weight-medium); }
.guide-data p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-secondary); }
.guide-data p.guide-data__more { color: var(--color-text-muted); }
.guide-data__state { color: var(--color-text); }
.guide-data__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-1); }
.guide-data__actions .text-link { padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.guide-data__actions .text-link:hover { color: var(--color-text); }
.guide__input:focus { border-color: var(--color-text); }

/* A journey's page, more inviting: each day's number set in the display
   face, each session with its picture beside it, and each small habit with
   its icon in a soft round. The cards' words keep the card text rules. */
.journey-day { grid-template-columns: 88px minmax(0, 1fr); padding: var(--space-5) 0; border-top-color: var(--color-row-divider); }
.journey-day__number { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--color-text); line-height: 1.3; padding-top: 2px; }
.journey-day__items { gap: var(--space-4); }
.journey-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.journey-item__picture { display: grid; place-items: center; width: 72px; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-nested); background: var(--color-neutral-grey); color: var(--color-text-subtle); }
.journey-item__picture img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.journey-item:hover .journey-item__picture img { transform: scale(1.04); }
.journey-item__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.journey-item__title { color: var(--color-text); text-decoration: none; }
.journey-item__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.journey-item__title::after { content: ""; }
.journey-item__note { margin: var(--space-1) 0 0; }
.journey-habit { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-4); align-items: start; border-top-color: var(--color-row-divider); }
.journey-habit__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-round); background: var(--color-neutral-grey); color: var(--color-text); }
.journey-habit__words { min-width: 0; padding-top: 2px; }
.journey-habit__day { flex: none; font-size: var(--text-xs); color: var(--color-text-subtle); white-space: nowrap; }
@media (max-width: 720px) {
  .journey-day { gap: var(--space-3); }
  .journey-item { grid-template-columns: 60px minmax(0, 1fr); gap: var(--space-3); }
  .journey-item__picture { width: 60px; }
}
@media (prefers-reduced-motion: reduce) { .journey-item__picture img { transition: none; } }
/* Journey and challenge cards: the description larger than the rest, as a
   large card's (14px), the meta the quietest, the text link muted. */
.showcase-card__text { font-size: var(--text-card-description); line-height: var(--leading-card-description); }
.showcase-card__meta { color: var(--color-text-subtle); }

/* Challenges, a little larger than journeys:
   a taller picture, more room inside, and Explore challenge as the card's
   one button at its foot. */
.showcase-card .card-action { align-self: flex-start; margin-top: 0; }
/* This part of the day's small thing to try: one quiet filled band over the
   challenges, its words and Done beside them. */
.small-thing { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--space-4) var(--space-5); align-items: start; margin: 0 0 var(--section-gap); padding: var(--space-6); border-radius: var(--radius); background: var(--color-surface-muted); }
.small-thing__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-round); background: var(--color-surface); color: var(--color-text); }
.small-thing__words { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.small-thing__words p { margin: 0; }
.small-thing__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-medium); line-height: var(--leading-h2); }
.small-thing__text { max-width: 56ch; font-size: var(--text-base); color: var(--color-text-secondary); }
.small-thing__action { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); align-self: center; }
.small-thing__done { color: var(--color-text); }
@media (max-width: 640px) {
  .small-thing { grid-template-columns: 40px minmax(0, 1fr); padding: var(--space-5) var(--space-4); }
  .small-thing__action { grid-column: 1 / -1; align-items: flex-start; }
}
/* A challenge's invitations: numbered, each its title and words, one under
   the other, at a reading width. */
/* A title and its "With …" line read as one: 8px apart, whatever the
   stack's gap around them. */
.title-group { display: flex; flex-direction: column; gap: var(--space-2); }
/* A new picture as the answers move crossfades over the one showing: the
   tint in app.js, frame by frame; the summary's sharp picture on a copy laid
   over the old, fading in over 600ms. */
.ci-sum { position: relative; }
.ci-sum__art--next { position: absolute; z-index: 1; margin: 0; opacity: 0; transition: opacity 600ms var(--ease-out); pointer-events: none; }
.ci-sum__art--next.is-in { opacity: 1; }
/* The three challenges fill the row in three columns at every
   width, never two with one left alone; on a phone, one under
   the other. */
.data-views .segmented__item[aria-current="page"] { color: var(--color-text); font-weight: var(--weight-medium); }
/* Each label is its own layer in the page transition, above the sliding
   pill, and shows its new state at once: crossfaded inside the page, the
   label of the newly picked view blended its regular and medium glyphs. */
.data-views .segmented__item > span:not(.segmented__indicator) { z-index: 1; }
::view-transition-old(*.segmented-label) { display: none; }
::view-transition-new(*.segmented-label) { animation: none; }
.data-views--placeholder { visibility: hidden; }
/* Privacy & security's Data sharing, under its own small heading, as the
   mobile app groups it; a locked switch reads as unavailable. */
.settings-subhead { margin: 0; padding: var(--space-5) var(--space-5) var(--space-1); font-size: var(--text-caps); font-weight: var(--weight-regular); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-muted); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }
/* The top of Home (DESIGN-SYSTEM.md, Home's day), one column at every
   width: the welcome with the check-in on its right, Recommended across the
   page, then the person's day. */
.home-top { display: flex; flex-direction: column; gap: var(--space-8); }
.home-top__day { display: flex; flex-direction: column; min-width: 0; }
.home-top__rec { min-width: 0; }
.home-top__rec .home-suggest { margin-top: 0; gap: var(--space-4); }
.home-top__rec .ci-suggest__card { grid-template-columns: 112px minmax(0, 1fr) auto; gap: var(--space-5); padding: var(--space-4); }
.home-top__rec .ci-suggest__picture { width: 112px; height: 112px; }
.home-top__rec .ci-suggest__text strong { font-size: var(--text-lg); }
.home-top__rec .ci-suggest__why { margin-top: var(--space-2); }
.home-top__day .day-feature .sleep-feature__banner { min-height: clamp(320px, 26vw, 440px); }
.home-top .notice--inline { margin: 0; }
.plan-today--quiet .journey-hero__title { font-size: var(--text-xl); }
.journey-today { border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.journey-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(300px, 24vw, 420px); padding: var(--space-5); background: var(--color-neutral-grey); color: #fff; isolation: isolate; }
.journey-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.journey-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 14, 12, 0) 0%, rgba(7, 14, 12, 0) 35%, rgba(7, 14, 12, 0.82) 100%); }
.journey-hero__pill { position: absolute; top: var(--space-4); left: var(--space-4); display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-text); }
.journey-hero__text { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding-right: 76px; }
.journey-hero__day { font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: rgba(255, 255, 255, 0.9); }
.journey-hero__bar { display: block; width: 80px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.journey-hero__bar span { display: block; height: 100%; background: var(--color-progress); }
.journey-hero__meta { margin-top: var(--space-1); font-size: var(--text-sm); color: rgba(255, 255, 255, 0.85); }
.journey-hero__title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-medium); line-height: 1.15; color: #fff; text-decoration: none; text-wrap: balance; }
.journey-hero__title::after { content: ""; position: absolute; inset: 0; }
.journey-hero__title:focus-visible { outline: none; }
.journey-hero:has(.journey-hero__title:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: -4px; }
.journey-hero__play { position: absolute; right: var(--space-5); bottom: var(--space-5); z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding-left: 3px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color var(--duration-hover) var(--ease-out), transform var(--duration-hover) var(--ease-out); }
a.journey-hero__play:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.04); }
.journey-hero__play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.journey-hero__play--quiet { padding-left: 0; }
@media (max-width: 640px) { .journey-hero { min-height: 280px; padding: var(--space-4); } .journey-hero__title { font-size: var(--text-xl); } .journey-hero__play { right: var(--space-4); bottom: var(--space-4); width: 48px; height: 48px; } }
.habit-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-4); border-top: 1px solid var(--color-line); }
.panel .habit-row { padding: var(--space-4) 0 0; }
.habit-row__words { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.habit-row__label { font-size: var(--text-md); color: var(--color-text); }
.habit-row__error { flex-basis: 100%; margin: 0; }
.habit-row[hidden] { display: none; }
/* A sideways row (ui/hscroll): no native scrollbar; an edge with more
   beyond it fades, and a round button there moves the row along. */
.hscroll { position: relative; margin-bottom: var(--space-8); --fade-start: 0px; --fade-end: 0px; }
.hscroll > :first-child { margin-bottom: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%); }
.hscroll > :first-child::-webkit-scrollbar { display: none; }
.hscroll.can-prev { --fade-start: 48px; }
.hscroll.can-next { --fade-end: 48px; }
.hscroll__button { position: absolute; top: 50%; translate: 0 -50%; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--color-line); border-radius: 50%; background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-raised); cursor: pointer; transition: opacity 200ms var(--ease-out); }
.hscroll__button[hidden] { display: none; }
.hscroll__button--prev { left: 0; }
.hscroll__button--next { right: 0; }
.hscroll__button:focus-visible { outline: 2px solid var(--color-focus, var(--color-text)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .hscroll > :first-child { scroll-behavior: auto; } }

/* Learn's ebook: a large card, its cover beside what it is, who wrote it
   and one button to its page (DESIGN-SYSTEM.md, Card actions). */
.book-feature { position: relative; display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: var(--space-6); align-items: center; padding: var(--space-5); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.book-feature__cover { display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-nested); overflow: hidden; background: var(--color-surface-muted); }
.book-feature__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-feature__words { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); max-width: 560px; }
.book-feature__title { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-medium); text-wrap: balance; }
.book-feature__title a { color: inherit; text-decoration: none; }
.book-feature__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.book-feature__author { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.book-feature__text { margin: 0; color: var(--color-text-muted); text-wrap: pretty; }
.book-feature .card-action { margin-top: var(--space-3); }
.book-feature:hover .book-feature__title a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .book-feature { grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); } .book-feature__text { display: none; } }
.search-field[hidden] { display: none; }
.checkin-box .app-modal__app { margin-top: var(--space-4); padding-top: var(--space-4); gap: var(--space-4); }
.checkin-box .app-modal__find { margin: 0 0 var(--space-3); }
.checkin-box .app-modal__qr svg { width: 96px; height: 96px; }
/* The two stores' official badges (ui/store-badges): 40px tall, unaltered,
   with a quarter of their height clear around them, as both guidelines ask. */
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--space-3); }
.store-badge { display: inline-flex; border-radius: 7px; }
.store-badge img { display: block; height: 40px; width: auto; }
.store-badge:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
/* Learn's Welcome to Endor (views/library.clj, tour-card): the mobile app's
   tour, its name beside three chapters, each a portrait still that plays
   its video in a dialog. */
.tour-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-6); align-items: center; padding: var(--space-6); margin-bottom: var(--section-gap, var(--space-10)); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.tour-card__words { display: flex; flex-direction: column; gap: var(--space-2); }
.tour-card__title { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-medium); line-height: 1.15; text-wrap: balance; }
.tour-card__chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap); margin: 0; padding: 0; list-style: none; }
.tour-chapter { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tour-chapter__media { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; margin-bottom: var(--space-2); border-radius: var(--radius-nested); overflow: hidden; background: var(--color-surface-muted); }
.tour-chapter__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.tour-chapter__play { position: absolute; left: var(--space-3); bottom: var(--space-3); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--color-text); box-shadow: var(--shadow-raised); }
.tour-chapter__title { font-weight: var(--weight-medium); color: var(--color-text); }
.tour-chapter:hover .tour-chapter__media img { transform: scale(1.03); }
.tour-chapter:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-nested); }
.tour-player { width: min(92vw, 420px); padding: 0; border: 0; border-radius: var(--radius); background: #000; overflow: hidden; }
.tour-player::backdrop { background: rgba(0, 0, 0, 0.6); }
.tour-player video { display: block; width: 100%; max-height: 86vh; aspect-ratio: 9 / 16; background: #000; }
.tour-player__close { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1; background: rgba(255, 255, 255, 0.92); }
@media (max-width: 760px) {
  .tour-card { grid-template-columns: 1fr; padding: var(--space-5); }
  .tour-card__chapters { gap: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) { .tour-chapter__media img { transition: none; } }
/* Google's Norwegian badge comes with a clear band above and below its
   black badge; drawn at 52px its badge is 40px, and the band overlaps the
   row's space rather than adding to it. */
.store-badge img.store-badge__banded { height: 52px; margin: -6px 0; }

/* Guided breathing (views/guided.clj): one large, calm stage on the app's
   own background with the breathing circle at its centre and the rate
   under it; the timer and the voice as two quiet rows below; the practice
   on the same stage, so nothing moves when it starts; then the summary. */
.gb { max-width: 760px; }
.gb-step { display: flex; flex-direction: column; gap: var(--space-6); }
.gb-step[hidden] { display: none; }
.gb-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); min-height: 560px; padding: var(--space-12) var(--space-6) var(--space-10); border-radius: var(--radius); background: var(--color-surface-muted) url("images/guided-breathing.avif") center / cover no-repeat; text-align: center; overflow: hidden; }
.gb-stage::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.22); pointer-events: none; }
.gb-stage > * { position: relative; }
.gb-circle { --gb-half: 5s; position: relative; width: 240px; height: 240px; flex: none; }
.gb-circle--live { width: 300px; height: 300px; }
.gb-circle__ring, .gb-circle__min, .gb-circle__orb { position: absolute; inset: 0; border-radius: 50%; }
.gb-circle__ring { border: 1.5px solid rgba(255, 255, 255, 0.75); }
.gb-circle__min { inset: 32%; border: 1px dashed rgba(255, 255, 255, 0.7); }
.gb-circle__orb { background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.95), rgba(255, 249, 233, 0.78) 62%, rgba(255, 249, 233, 0.55)); box-shadow: 0 10px 40px rgba(46, 35, 66, 0.18); transform: scale(0.36); }
.gb-circle--preview .gb-circle__orb { animation: gb-breathe calc(var(--gb-half) * 2) cubic-bezier(0.37, 0, 0.63, 1) infinite; }
.gb-circle--live .gb-circle__orb { transition: transform var(--gb-half) cubic-bezier(0.37, 0, 0.63, 1); }
.gb-circle--live.is-in .gb-circle__orb { transform: scale(1); }
@keyframes gb-breathe { 0%, 100% { transform: scale(0.36); } 50% { transform: scale(1); } }
.gb-rate { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); width: min(100%, 360px); }
.gb-rate__label { color: var(--color-text); opacity: 0.8; }
.gb-rate__value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; color: var(--color-text); }
.gb-slider { width: 100%; margin: var(--space-2) 0; accent-color: var(--color-text); cursor: pointer; }
.gb-resonant { margin: 0; font-size: var(--text-sm); color: var(--color-text); opacity: 0.85; text-wrap: balance; }
.gb-settings { display: flex; flex-direction: column; border-top: 1px solid var(--color-line); }
.gb-setting { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-1); border-bottom: 1px solid var(--color-line); }
.gb-setting__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); cursor: pointer; }
.gb-setting__name { font-weight: var(--weight-medium); color: var(--color-text); }
.gb-switch { appearance: none; position: relative; flex: none; width: 44px; height: 26px; margin: 0; border-radius: var(--radius-pill); background: var(--color-line); cursor: pointer; transition: background-color 200ms var(--ease-out); }
.gb-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 200ms var(--ease-out); }
.gb-switch:checked { background: var(--color-text); }
.gb-switch:checked::after { transform: translateX(18px); }
.gb-switch:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.gp-stepper { display: inline-flex; align-items: center; gap: var(--space-3); }
.gp-stepper[hidden] { display: none; }
.gp-stepper output { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); }
.gb-start { display: flex; justify-content: center; }
.gp-leave { position: absolute; top: var(--space-4); left: var(--space-4); display: inline-flex; align-items: center; gap: var(--space-1); padding: 6px var(--space-3); border: 0; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.86); color: var(--color-text); font: inherit; font-size: var(--text-sm); text-decoration: none; cursor: pointer; }
.gp-leave:hover { background: var(--color-surface); }
.gb-cue { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-text); }
.gb-clock { margin: 0; font-variant-numeric: tabular-nums; color: var(--color-text); opacity: 0.8; }
.gb-finish { margin-top: var(--space-2); }
.gb-summary { align-items: stretch; padding: var(--space-8) var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.gb-summary__title { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-medium); }
.gb-summary__took { margin: 0; color: var(--color-text-muted); }
.gb-summary__ask { margin: var(--space-2) 0 0; font-size: var(--text-md); font-weight: var(--weight-medium); }
/* Guided breathing's end, in the session end's family: the gold check
   settling in, Nicely done, how long, and a quiet offer to reflect. */
.gb-celebrate { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-4) 0 var(--space-2); text-align: center; }
.gb-celebrate__mark { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: var(--space-3); border-radius: 50%; background: var(--color-progress-soft); color: var(--color-progress-strong); }
.gb-celebrate__title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.15; outline: none; }
.gb-celebrate__took { margin: 0; color: var(--color-text-muted); }
.gb-celebrate__reflect { margin-top: var(--space-3); padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.gb-celebrate__reflect[hidden], .gb-reflection[hidden] { display: none; }
.gb-reflection { display: flex; flex-direction: column; gap: var(--space-4); animation: player-message-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.gb-summary .gb-actions { justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .gb-summary:not([hidden]) .gb-celebrate__mark { animation: gb-mark 620ms cubic-bezier(0.34, 1.56, 0.64, 1) 120ms both; }
  .gb-summary:not([hidden]) .gb-celebrate__mark svg { animation: summary-check 360ms var(--ease-out) 460ms both; }
}
@keyframes gb-mark { from { opacity: 0; transform: scale(0.4); } }
.gp-reflect { display: flex; flex-direction: column; gap: var(--space-2); }
@media (prefers-reduced-motion: reduce) { .gb-circle--preview .gb-circle__orb { animation: none; transform: scale(0.68); } }
@media (max-width: 640px) {
  .gb-stage { min-height: 480px; padding: calc(var(--space-8) + var(--space-10)) var(--space-4) var(--space-8); gap: var(--space-5); }
  .gb-circle { width: 200px; height: 200px; }
  .gb-circle--live { width: 240px; height: 240px; }
  .gb-summary { padding: var(--space-6) var(--space-4); }
}

/* A large card's one action (ui/card-action): the page it opens, in bold,
   with an arrow, the card around it still the link (DESIGN-SYSTEM.md, Card
   actions). */
.card-action { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text); text-decoration: none; white-space: nowrap; }
.card-action svg { transition: transform var(--duration-hover) var(--ease-out); }
a.card-action:hover, .showcase-card:hover .card-action, .book-feature:hover .card-action { text-decoration: underline; text-underline-offset: 3px; }
a.card-action:hover svg[data-icon="arrow-right"], .showcase-card:hover .card-action svg[data-icon="arrow-right"], .book-feature:hover .card-action svg[data-icon="arrow-right"] { transform: translateX(3px); }
.card-action--light { color: #fff; }
@media (prefers-reduced-motion: reduce) { .card-action svg { transition: none; } }

/* A completion moment (ui/completion, DESIGN-SYSTEM.md, Completion): a gold
   check, what was done, a line, and the light earned once the server has
   counted it, in gold; what comes next follows as the flow's actions. */
.completion { display: flex; align-items: flex-start; gap: var(--space-3); margin: var(--space-2) 0 var(--space-4); text-align: left; }
.completion__mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-progress-soft); color: var(--color-progress-strong); }
.completion__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.completion__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-medium); color: var(--color-text); }
.completion__text { margin: 0; color: var(--color-text-muted); }
.completion__light { margin: var(--space-1) 0 0; font-weight: var(--weight-semibold); color: var(--color-progress-strong); }
.completion__light[hidden] { display: none; }
.checkin-dialog .completion__light, .player .completion__light { margin-top: var(--space-2); }
@media (prefers-reduced-motion: no-preference) {
  .completion__light:not([hidden]) { animation: completion-light 520ms var(--ease-out) both; }
  @keyframes completion-light { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* The check-in's progress (checkin/progress-row): each part done, open, or
   in the mobile app, under the dialog's title. */
/* The check-in's progress (checkin/progress-row): five thin bars, one per
   part, each with its name under it, set apart from the header. A bar
   fills gold once its part is done; the heart reading's is dashed, as it
   happens in the mobile app. Nothing here is a control, so nothing looks
   like one. On a phone the names give way and only the bars stay. */
/* The check-in's progress (checkin/progress-row). While answering, only a
   thin gold line under the header, filling as parts are answered. On the
   review, what today's check-in holds, as a quiet list: done, still open
   (an offer), or in the mobile app. Nothing in it is a control. */
.checkin-dialog__bar { position: sticky; }
.checkin-dialog__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--ci-done, 0) * 100%); background: var(--color-progress); transition: width 600ms var(--ease-out); }
.ci-progress { display: flex; flex-direction: column; margin: var(--space-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--color-line); font-size: var(--text-sm); color: var(--color-text-muted); cursor: default; }
.ci-progress__part { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-line); }
.ci-progress__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; color: var(--color-text-subtle); }
.ci-progress__icon > span { display: none; }
.ci-progress__icon::before { content: ""; width: 10px; height: 1.5px; background: currentColor; }
.ci-progress__part[data-state="done"] { color: var(--color-text); }
.ci-progress__part[data-state="done"] .ci-progress__icon { color: var(--color-progress-strong); }
.ci-progress__part[data-state="done"] .ci-progress__icon::before, .ci-progress__part[data-state="app"] .ci-progress__icon::before { display: none; }
.ci-progress__part[data-state="done"] .ci-progress__done, .ci-progress__part[data-state="app"] .ci-progress__app { display: inline-flex; }
.ci-progress__name { flex: 1; }
.ci-progress__part .visually-hidden { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: nowrap; font-size: var(--text-xs); color: var(--color-text-subtle); }

/* Plan's Coming up, day by day (personal/plan-days). */
.plan-days { display: flex; flex-direction: column; gap: var(--space-8); }
.plan-day { display: flex; flex-direction: column; gap: var(--space-3); }
.plan-days .list__item { gap: var(--space-5); padding: var(--space-5); }
.plan-days .step__thumb { width: 56px; height: 56px; }
/* Pictures in a list keep a very light edge, so a pale picture still
   reads as a picture against the white row. Drawn as an outline inside the
   box, over the image. */
.step__thumb, .journey-item__picture, .ci-suggest__picture { outline: 1px solid rgba(30, 26, 22, 0.08); outline-offset: -1px; }
/* Plan's two ways (DESIGN-SYSTEM.md, Plan's two ways): the mobile app 2.0's
   Daily plan and 21-day Journey, the one in use marked, the other offered
   with its one action. */
.plan-ways__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.plan-way { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--space-4); padding: var(--space-5); transition: background-color var(--duration-hover) var(--ease-out); }
.plan-way + .plan-way { border-top: 1px solid var(--color-line); }
.plan-way.is-chosen { background: var(--color-progress-soft-bg, rgba(255, 195, 127, 0.09)); }
.plan-way.is-chosen::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--color-progress); }
.plan-way.is-chosen .plan-way__icon { display: inline-flex; color: var(--color-text-muted); padding-top: 1px; }
.plan-way.is-chosen .plan-way__icon { color: var(--color-progress-strong); }
.plan-way__words { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.plan-way__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); }
.plan-way__title { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); line-height: 1.3; }
.plan-way__current { font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-progress-strong); }
.plan-way p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); text-wrap: pretty; }
.plan-way.is-chosen p { color: var(--color-text); }
.plan-way__actions { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-6); margin-top: var(--space-3); }
.plan-ways .section__lede { margin: var(--space-2) 0 0; color: var(--color-text-muted); }
.plan-ways--first .plan-way { padding: var(--space-6); }

.plan-way .text-link.plan-leave-link { padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
/* The goals step for a Daily plan. */
.goal-list { display: flex; flex-direction: column; margin: var(--space-5) 0 var(--space-2); border-top: 1px solid var(--color-line); }
.goal { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-line); cursor: pointer; }
.goal input { position: absolute; opacity: 0; pointer-events: none; }
.goal__box { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--color-line-strong); border-radius: 6px; color: transparent; transition: background-color var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out); }
.goal input:checked + .goal__box { border-color: var(--color-text); background: var(--color-text); color: var(--color-surface); }
.goal input:focus-visible + .goal__box { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.plan-goals .checkin-actions { flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
button.card-action { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
/* Journey mode: the journey's card larger at the top of Plan, its days
   under it, and Leave the Journey quiet at their foot. */
.journey-today--plan .journey-hero { min-height: clamp(320px, 30vw, 460px); }
.plan-leave .checkin-dialog__body { gap: var(--space-4); }
.plan-day__date { margin: 0; font-size: var(--text-caps); font-weight: var(--weight-regular); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-muted); }

/* Guided breathing: the voice on its stage, and the end's two actions. */
.gb-voice-toggle { position: absolute; top: var(--space-4); right: var(--space-4); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.86); color: var(--color-text); cursor: pointer; }
.gb-voice-toggle:hover { background: var(--color-surface); }
.gb-voice-toggle:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.gb-voice-toggle [hidden] { display: none; }
.gb-voice-toggle > span { display: inline-flex; }
.gb-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* The Clearing's experiences, one thing at a time: once begun, the intro
   and the choices step aside and only the practice stays. */
/* An experience's panel keeps one height through its states, so nothing
   jumps: the practice and its end share one cell, the one not showing
   only made invisible; once begun, the intro and its choices fade out in
   place rather than leaving. */
.xp { display: grid; }
.xp > [data-xp-play], .xp > .xp-done { grid-area: 1 / 1; min-width: 0; }
/* Against the global [hidden] rule, which is !important: these two keep
   their room while hidden, and stay out of reach (visibility). */
.xp > .xp-done[hidden] { display: flex !important; visibility: hidden; }
.xp > [data-xp-play][hidden] { display: block !important; visibility: hidden; }
.xp > .xp-done { align-self: center; }
.xp__head, .xp-pace, .xp-field__help[data-xp-help] { transition: opacity 500ms var(--ease-out), visibility 0s linear 0s; }
.xp.is-begun .xp__head, .xp.is-begun .xp-pace, .xp.is-begun .xp-field__help[data-xp-help] { opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease-out), visibility 0s linear 500ms; }

/* Sign in: a picture of the Clearing beside a quiet panel, and the two
   providers' own buttons, the same size and weight. Apple's is its black
   button with the logo in white; Google's is its white button with a
   #747775 edge, the four-color G and #1F1F1F text, in Roboto where the
   reader has it. Below 900px the picture becomes a band above the panel. */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(720px, calc(100dvh - 140px)); margin-top: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.auth__picture { position: relative; min-height: 220px; isolation: isolate; }
.auth__picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: var(--space-12) var(--space-8); }
.auth__inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); width: min(360px, 100%); }
.auth__title { margin: var(--space-4) 0 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.15; letter-spacing: var(--tracking-display); }
.auth__text { margin: 0 0 var(--space-4); color: var(--color-text-muted); text-wrap: pretty; }
.auth__buttons { display: flex; flex-direction: column; gap: var(--space-3); align-self: stretch; }
.auth-button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 var(--space-5); border-radius: 24px; font-size: var(--text-md); font-weight: var(--weight-medium); line-height: 1; text-decoration: none; letter-spacing: 0; transition: background-color var(--duration-hover) var(--ease-out); }
.auth-button__logo { flex: none; }
.auth-button--apple { border: 1px solid #000; background: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; }
.auth-button--apple:hover { background: #1c1c1e; }
.auth-button--apple .auth-button__logo { margin-top: -3px; }
.auth-button--google { border: 1px solid #747775; background: #fff; color: #1f1f1f; font-family: Roboto, "Helvetica Neue", Arial, sans-serif; }
.auth-button--google:hover { background: var(--color-surface-muted); }
.auth-button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.auth__note { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-text-subtle); }
.auth__email { display: flex; flex-direction: column; gap: var(--space-3); align-self: stretch; margin-top: var(--space-2); }
.auth__email input[type="email"], .auth__email input[name="code"] { height: 48px; padding: 0 var(--space-4); border: 1px solid var(--color-line-strong); border-radius: 24px; font: inherit; background: var(--color-surface); color: var(--color-text); }
.auth__email input[name="code"] { letter-spacing: 0.3em; text-align: center; }
.auth__email .auth__text { margin: 0; }
.auth__error { margin: 0; font-size: var(--text-sm); color: var(--color-error); }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth__picture { min-height: 200px; }
  .auth__panel { padding: var(--space-8) var(--space-6) var(--space-10); }
}

/* Home's offer of a plan, with neither a Daily plan nor a Journey: its
   question, then two equal doors. */
.plan-offer { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.plan-offer__title { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); }
.plan-offer__doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.plan-offer__door { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-nested); background: var(--color-neutral-grey); color: var(--color-text); text-decoration: none; transition: background-color var(--duration-hover) var(--ease-out); }
.plan-offer__door:hover { background: var(--color-surface-muted); }
.plan-offer__door:hover .card-action { text-decoration: underline; text-underline-offset: 3px; }
.plan-offer__icon { display: inline-flex; margin-bottom: var(--space-2); color: var(--color-progress-strong); }
.plan-offer__name { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); }
.plan-offer__text { flex: 1; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); text-wrap: pretty; }
.plan-offer__door .card-action { margin-top: var(--space-2); }
@media (max-width: 640px) { .plan-offer { padding: var(--space-5); } .plan-offer__doors { grid-template-columns: minmax(0, 1fr); } }
.plan-ways--first .section__head { flex-direction: column; align-items: flex-start; }

/* A plan chosen: the plan in use on one calm row, Change at its end; the
   two ways open under it. */
/* The daily plan on its way. */
.plan-making { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-5); border: 1px dashed var(--color-line-strong); border-radius: var(--radius); }
.plan-making p { margin: var(--space-1) 0 0; }
.plan-making__dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--color-progress); }
@media (prefers-reduced-motion: no-preference) { .plan-making__dot { animation: plan-breathe 2.4s ease-in-out infinite; } }
@keyframes plan-breathe { 50% { opacity: 0.35; transform: scale(0.8); } }

/* Side by side, the practice and its place are one height: the place's
   picture takes what the words leave. Its end is short, with one clear step. */
@media (min-width: 1101px) {
  .xp-aside { display: flex; flex-direction: column; }
  .xp-aside__picture { flex: 1; min-height: 160px; height: auto; aspect-ratio: auto; }
}
/* An experience's end, as the other completions: centered, the gold check
   with room under it, the title, one line, the light, then one clear step
   with its quiet alternative beside it. */
.xp-done { align-items: center; gap: 0; padding: var(--space-8) var(--space-4); text-align: center; }
.xp-done__mark { width: 56px; height: 56px; margin-bottom: var(--space-5); border-radius: 50%; background: var(--color-progress-soft); color: var(--color-progress-strong); }
.xp-done__title { margin: 0; font-size: var(--text-2xl); line-height: 1.2; text-wrap: balance; }
.xp-done__text { margin: var(--space-3) 0 0; color: var(--color-text-muted); text-wrap: pretty; }
.xp-done .completion__light { margin-top: var(--space-3); }
.xp-done__words { margin-top: var(--space-5); text-align: left; }
.xp-done .xp-actions { flex-direction: column; justify-content: center; align-items: center; gap: var(--space-4); margin-top: var(--space-6); }
.xp-done .xp-actions .button { min-width: 180px; }
@media (prefers-reduced-motion: no-preference) {
  .xp-done:not([hidden]) .xp-done__mark { animation: gb-mark 620ms cubic-bezier(0.34, 1.56, 0.64, 1) 120ms both; }
}
.xp-quiet { padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.xp-quiet[hidden] { display: none; }
/* My Twin's invitation to add a wearable: room above it, after the days'
   strip, as much as below it, before the next section. */
.twin-time .notice--inline { margin: var(--space-8) 0 var(--space-2); }

/* Notifications, as the mobile app 2.0 lists them (ui/notification-list):
   a header per day, each a card with its category's tag, a round dot while
   unread and its time on the right, then its title and words in full. The
   envelope's unread mark is the app 2.0's gold square. */
.icon-button__mark { position: absolute; top: 8px; right: 7px; width: 8px; height: 8px; border-radius: 2px; background: var(--color-progress); }
.notif-list { display: flex; flex-direction: column; }
.notif-day { margin: var(--space-6) 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); color: var(--color-text); }
.notif-day:first-child { margin-top: 0; }
.notif { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.notif + .notif { margin-top: var(--space-3); }
.notif__top { display: flex; align-items: center; gap: var(--space-2); }
.notif__tag { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--color-neutral-grey); font-size: var(--text-xs); line-height: 15px; color: var(--color-text-muted); }
.notif__spacer { flex: 1; }
.notif__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-text); }
.notif__time { font-family: var(--font-display); font-size: 13px; color: var(--color-text-subtle); white-space: nowrap; }
.notif__main { display: flex; gap: var(--space-3); }
.notif__picture { flex: none; width: 56px; height: 56px; border-radius: var(--radius-nested-tight); object-fit: cover; }
.notif__words { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.notif__title, .notif__body { margin: 0; font-family: var(--font-display); font-size: var(--text-md); line-height: 1.32; }
.notif__title { color: var(--color-text); }
.notif__body { color: var(--color-text-muted); }
.notif-empty { padding: var(--space-6) 0; }
.notif-empty p { margin: 0; font-family: var(--font-display); font-size: var(--text-md); }
.notif-empty__body { margin-top: var(--space-1) !important; color: var(--color-text-muted); }
/* The panel under the envelope: the latest, scrolling, and See all. */
.bell { position: relative; }
.bell-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; display: flex; flex-direction: column; width: min(400px, calc(100vw - 24px)); padding: var(--space-4) 0 var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-bg); box-shadow: 0 12px 32px rgba(30, 26, 22, 0.14); }
.bell-panel[hidden] { display: none; }
.bell-panel__scroll { max-height: min(520px, calc(100dvh - 160px)); overflow-y: auto; padding: 0 var(--space-4); }
.bell-panel .notif-empty { padding: var(--space-4) var(--space-2); }
.bell-panel__all { align-self: flex-start; margin: var(--space-4) var(--space-5) 0; }

/* Home after today's check-in: a quiet way back in. Signed out: the
   invitation in the day's place. */
.checkin-again { font-size: var(--text-sm); color: var(--color-text-muted); }
/* An option not in use opens as a whole, its row the button. */
.plan-way[data-plan-way] { cursor: pointer; }
.plan-way[data-plan-way]:hover { background: var(--color-surface-muted); }
.plan-way .plan-leave-link { margin-left: auto; }

/* The session's picture over the stage until its video is playing, then a
   slow crossfade into it. */
.player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; pointer-events: none; opacity: 1; transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1); }
.player.is-rolling .player__poster { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .player__poster { transition: none; } }

/* The still figure's lights, when the drawn figure can't show (no WebGPU):
   the app's gold, soft, screened over the figure, gone once it is live. */
.twin-still-lights { position: absolute; pointer-events: none; mix-blend-mode: screen; transition: opacity var(--duration-expand) var(--ease-out); }
.twin-stage__figure.is-live .twin-still-lights { opacity: 0; }
.twin-still-light { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 240, 194, 0.85), rgba(255, 240, 194, 0.3) 50%, rgba(255, 240, 194, 0) 100%); }
.twin-still-light--energetic { background: radial-gradient(closest-side, rgba(255, 240, 194, 0) 55%, rgba(255, 240, 194, 0.22) 80%, rgba(255, 240, 194, 0) 100%); }
/* A world not open yet reads as locked wherever it shows: its picture
   without color and faded, so it never looks like an open one. */
:root { --world-locked-filter: grayscale(1) contrast(0.9); --world-locked-opacity: 0.4; }
.world-game.is-locked img, .sound-card.is-locked img, .world-card.is-locked img, .mini-world.is-locked img,
.card__media--world.is-locked img, .lw-panel__place.is-locked .lw-panel__picture, .mini-player__world.is-locked img,
.lw-how__thumb, .how-worlds__world:not(.is-open) .how-worlds__picture img { filter: var(--world-locked-filter); opacity: var(--world-locked-opacity); }
.lw-how__step.is-open .lw-how__thumb { filter: none; opacity: 1; }

/* Discover under Worlds: the filter's own head names the worlds, so their
   group drops its heading; the count shows only with a search field. */
html[data-discover-filter="worlds"] .discover-group--worlds .section__head { display: none; }
html[data-discover-filter="worlds"] .discover-group--worlds .section { margin-top: 0; }
.discover-count[hidden] { display: none; }

/* A signed-out Sign in inside a card keeps its room from the words above
   it and what follows. */
.lw-how__signed-out { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-6); }
.lw-how__signed-out .lw-how__next { margin: 0; }
/* A locked world card's lock sits top right, clear of its number. */
.world-card .world-card__lock { left: auto; right: var(--label-inset); }

/* Behind Begin and the other quiet moments, the softened picture only
   breathes, very slowly (12s), never blinks; still under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .player.is-veiled .player__stage { animation: player-breathe 12s ease-in-out infinite alternate; }
}
@keyframes player-breathe { from { filter: blur(14px) brightness(0.68) saturate(0.9); } to { filter: blur(14px) brightness(0.76) saturate(0.9); } }
/* The place's card keeps one height whichever place is chosen: every place
   shares one cell, the ones not shown only made invisible (against the
   global [hidden] rule). Under the map it has room: its picture, the place
   and its invitation, and what to do in a column of its own. */
.lw-panel { display: grid; }
.lw-panel > .lw-panel__place { grid-area: 1 / 1; min-width: 0; }
.lw-panel > .lw-panel__place[hidden] { display: flex !important; visibility: hidden; }
@media (min-width: 641px) and (max-width: 1439px) {
  .lw-panel > .lw-panel__place[hidden] { display: grid !important; }
  .lw-panel__place { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .lw-panel__place { grid-template-columns: 180px minmax(0, 1fr); }
}
@container (min-width: 560px) {
  .lw-panel__body { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); column-gap: var(--space-8); padding: var(--space-6) var(--space-8) var(--space-6) var(--space-6); }
}
/* In the envelope's small panel the words take the site's text sizes, the
   body at most three lines (the full page keeps the app's). */
.bell-panel .notif-day { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.bell-panel .notif-day:first-child { margin-top: 0; }
.bell-panel .notif { gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.bell-panel .notif + .notif { margin-top: var(--space-2); }
.bell-panel .notif__title, .bell-panel .notif__body { font-family: var(--font-sans); font-size: var(--text-sm); line-height: var(--leading-small); }
.bell-panel .notif__title { font-weight: var(--weight-medium); }
.bell-panel .notif__body { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bell-panel .notif__time { font-family: var(--font-sans); font-size: var(--text-xs); }
.bell-panel .notif__picture { width: 44px; height: 44px; }


/* Plan's side: History as content, in the site's panel. */
.plan-history { display: flex; flex-direction: column; gap: var(--space-3); }
.plan-history__items { margin: 0; padding: 0; list-style: none; }
.plan-history__day { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-caps); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-subtle); }
.plan-history__day:first-child { margin-top: 0; }
.plan-history .history-item { padding: var(--space-2) 0; }
/* The ways to plan in their sheet; the chosen one in the site's soft tint,
   with no strong edge. */
.plan-change .checkin-dialog__body { display: flex; flex-direction: column; gap: var(--space-4); }
.plan-way.is-chosen::before { display: none; }

/* The session's intro (session-player.js): its title over its picture,
   the picture easing back a little as the title comes in, then the whole
   scene easing further back and fading into the player. Hidden outside
   it; never under reduced motion. */
.player__intro { position: absolute; inset: 0; z-index: 6; display: none; place-items: center; overflow: hidden; background: #1d1915; }
.player.is-intro .player__intro, .player.is-intro-waiting .player__intro { display: grid; }
.player.is-intro-waiting .player__intro > * { opacity: 0; }
.player__intro-picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: brightness(0.62); }
.player__intro-title { position: relative; margin: 0; padding: 0 var(--space-6); max-width: 22ch; font-family: var(--font-display); font-size: clamp(var(--text-2xl), 5vw, 64px); font-weight: var(--weight-regular); line-height: 1.1; text-align: center; color: #fbf8f2; text-wrap: balance; }
@media (prefers-reduced-motion: no-preference) {
  .player.is-intro .player__intro-picture { animation: intro-picture 2600ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .player.is-intro .player__intro-title { animation: intro-title 1100ms cubic-bezier(0.22, 1, 0.36, 1) 250ms both; }
  .player.is-intro-out .player__intro { animation: intro-out 900ms cubic-bezier(0.4, 0, 0.2, 1) both; }
}
@keyframes intro-picture { from { opacity: 0; transform: scale(1.1); } 25% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@keyframes intro-title { from { opacity: 0; transform: translateY(10px); } }
@keyframes intro-out { to { opacity: 0; } }

/* The person's day as a large card (journey/day-feature), the course card's
   own parts: in Home's top it fills its column; its day and bar above the
   title, its details and actions at the foot; Today's habit in the grey
   band, the label close over its words, Mark as done a clear small action. */
.day-card .day-feature { margin-top: 0; display: flex; flex-direction: column; }
.home-top__day .day-card { display: flex; flex-direction: column; flex: 1; }
.home-top__day .day-feature { flex: 1; }
.day-feature .sleep-feature__banner { flex: 1; min-height: clamp(360px, 30vw, 480px); }
.day-feature .sleep-feature__copy { max-width: 560px; }
.day-feature__day { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.day-feature__title { color: inherit; text-decoration: none; }
.day-feature__title:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.day-feature__bottom { display: flex; flex-direction: column; gap: var(--space-4); }
.day-feature__bottom .sleep-feature__meta { margin: 0; }
.day-feature__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); }
.habit-row.sleep-feature__inside { border-top: 0; gap: var(--space-4) var(--space-6); padding: var(--space-6) var(--space-8); }
.habit-row.sleep-feature__inside .habit-row__words { gap: var(--space-1); }
.habit-row.sleep-feature__inside .eyebrow { margin: 0; }
.habit-row.sleep-feature__inside .habit-row__label { font-size: var(--text-base); }


/* Change, in Plan's head: a quiet text action. */
.plan-change-link { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
.plan-change-link:hover { color: var(--color-text); }
/* The ways in the sheet: one height each; an option not in use underlines
   its action on hover, as a link does. */
.plan-change .plan-ways__list { display: grid; grid-auto-rows: 1fr; }
.plan-way[data-plan-way]:hover .card-action { text-decoration: underline; text-underline-offset: 3px; }
/* History on Plan's side: what it was and when on one line, its title
   under, its words under that; days apart. */
.plan-history .history-item { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: 2px; padding: var(--space-3) 0; }
.plan-history .history-item__main { display: contents; }
.plan-history .history-item__kind { grid-column: 1; grid-row: 1; }
.plan-history .history-item__time { grid-column: 2; grid-row: 1; font-size: var(--text-xs); line-height: 1.5; color: var(--color-text-subtle); }
.plan-history .history-item__main > :not(.history-item__kind) { grid-column: 1 / -1; }
.plan-history .history-item__line { -webkit-line-clamp: 2; }
.plan-history__day + .history-item { border-top: 0; }
.plan-history__items > .plan-history__day:not(:first-child) { margin-top: var(--space-5); }
/* An experience's card: its words centered, the practice in the middle,
   and what to do aligned at the foot over a hairline; a little taller, and
   its place's card beside it as tall. */
.xp { min-height: 600px; }
.xp > [data-xp-play] { display: flex; flex-direction: column; }
.xp-body { flex: 1; text-align: center; }
.xp-body .xp__head { align-items: center; margin: 0 auto; }
.xp-body .xp__intro, .xp-body .xp-field__help { margin-left: auto; margin-right: auto; }
.xp-body > .xp-actions { justify-content: center; margin-top: auto; padding-top: var(--space-5); border-top: 1px solid var(--color-row-divider); }
@media (max-width: 720px) { .xp { min-height: 0; } }
/* Beside the map (1440px and up) the place's card is as tall as the map:
   its picture takes the height its words and actions leave, so no gap opens
   between them; even room round the words; the actions 8px apart, right
   under the invitation. */
@media (min-width: 1440px) {
  .lw-panel__place { display: flex; flex-direction: column; }
  .lw-panel > .lw-panel__place { height: 100%; min-height: 0; }
  .lw-panel__picture { display: block; flex: 1 1 0; min-height: 0; height: auto; aspect-ratio: auto; object-fit: cover; }
  .lw-panel__body { flex: none; padding: var(--space-6); }
  .lw-panel__invitation { margin: var(--space-4) 0 var(--space-5); padding: var(--space-3) 0; }
  .lw-panel__actions { margin-top: 0; gap: var(--space-2); }
}


/* A weekly report's picture, as the app: a dimmed field with its chart. */
.notif__picture--report { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6f5b4a, #2e2721); color: rgba(255, 255, 255, 0.6); }

/* A world card's words by importance, as on the other large cards: its
   number a quiet eyebrow, its name the title, its line a description, where
   you stand quiet details, then the way in. A world not open yet is plainly
   different: a pale card with dark words, its picture faded right back. */
.world-card__number { opacity: 0.75; }
.world-card__name { font-size: var(--text-xl); font-weight: var(--weight-regular); }
.world-card__copy small { font-size: var(--text-sm); opacity: 0.9; margin-bottom: var(--space-2); }
.world-card__status { opacity: 0.75; }
.world-card__enter { font-weight: var(--weight-semibold); }
.world-card.is-locked { background: var(--color-neutral-grey); color: var(--color-text); }
.world-card.is-locked img { filter: grayscale(1); opacity: 0.18; }
.world-card.is-locked .world-card__shade { display: none; }
.world-card.is-locked:hover img { transform: none; }
.world-card.is-locked .world-card__name { color: var(--color-text-secondary); }

/* A row of sessions that stays one row (More with an expert): as many as
   the grid has columns at that width, never a second, ragged row. */
@media (max-width: 1180px) { .grid--one-row > :nth-child(n + 5) { display: none; } }
@media (max-width: 1080px) { .grid--one-row > :nth-child(n + 4) { display: none; } }
@media (max-width: 720px) { .grid--one-row > :nth-child(n + 3) { display: none; } }
@media (max-width: 420px) { .grid--one-row > :nth-child(n + 3) { display: none; } }

/* Plan's journey card: today's session under its own label at the foot. */
.day-feature__today { display: flex; flex-direction: column; gap: var(--space-1); }
.day-feature__today .eyebrow { margin: 0; color: var(--color-text-on-dark-muted); }
.day-feature__session { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; }
/* A journey's page, while it runs: the line and its quiet way to Plan. */
.journey-start__here { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); margin: var(--space-2) 0; }
@media (max-width: 640px) { .habit-row.sleep-feature__inside { padding: var(--space-5) var(--space-6); } }

/* The ways in the sheet, symmetric: each its words, then its actions in a
   foot under a hairline; the running journey's name in the title font. */
.plan-way__words { height: 100%; }
.plan-way__text { font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); text-wrap: pretty; }
.plan-way .plan-way__actions { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--color-row-divider); }
.plan-way__words > .plan-way__text { margin-bottom: var(--space-4); }
.plan-way__journey { display: flex; flex-direction: column; gap: 2px; }
.plan-way__name { font-family: var(--font-display); font-size: var(--text-md); color: var(--color-text); }
.plan-way__day { font-size: var(--text-xs); color: var(--color-text-subtle); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
/* An experience's head, with room: its eyebrow, then its invitation in the
   title font, centered at a reading measure, well clear of the card's top
   and of the practice under it. Finish waits until the practice begins. */
.xp { padding-top: var(--space-10); }
.xp-body .xp__head { gap: var(--space-3); max-width: 44ch; padding-bottom: var(--space-4); }
.xp-body .xp__head .eyebrow { margin: 0; }
.xp-body .xp__intro { font-family: var(--font-display); font-size: var(--text-md); line-height: 1.45; color: var(--color-text); text-wrap: balance; }
.xp:not(.is-begun) [data-xp-finish].button--secondary { display: none; }
@media (max-width: 720px) { .xp { padding-top: var(--space-8); } }
/* Under the map: the picture only where it has room (1280 to 1439px);
   narrower, the card is its words and actions alone, side by side while
   the card is wide, stacked under 640px; the actions 12px apart. */
@media (max-width: 1279px) {
  .lw-panel .lw-panel__picture { display: none; }
  .lw-panel__place, .lw-panel > .lw-panel__place[hidden] { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1439px) {
  .lw-panel__actions, .lw-panel__body > .lw-panel__actions, .lw-panel__more, .lw-panel__body > .lw-panel__actions .lw-panel__more { gap: var(--space-3); }
}
@container (max-width: 639px) {
  .lw-panel__body { display: flex; flex-direction: column; }
  .lw-panel__body > .lw-panel__actions { margin-top: var(--space-5); }
}

/* A card's start, as the mobile app draws it: a round play button, light
   on a picture. Buttons with an icon keep a sensible width. */
.round-play { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; padding-left: 3px; border-radius: 50%; background: var(--color-on-dark-action); color: var(--color-surface-dark); transition: background-color var(--duration-hover) var(--ease-out), transform var(--duration-hover) var(--ease-out); }
.round-play:hover { background: var(--color-on-dark-action-hover); transform: scale(1.04); }
.round-play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.button:has(svg):not(.button--small) { min-width: 132px; }

/* Home's Recommended session, in the family of "A corner of the
   universe": the same tinted ground, padding and radius; its words on the
   left (the name, the title, who and how long, a line or two of what it is,
   the recommender's reason, then Start session at the foot), the picture
   on the right, as tall as the words. */
.home-rec { display: flex; flex-direction: column; gap: var(--space-3); }
.home-rec__card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 35px; align-items: stretch; padding: var(--pad-card); border-radius: var(--radius); background: var(--color-surface-muted); }
.home-rec__words { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.home-rec__picture { grid-column: 2; grid-row: 1; display: block; min-height: 200px; overflow: hidden; border-radius: var(--radius-nested); background: var(--color-neutral-grey); }
.home-rec__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-rec__picture img:not([src]) { visibility: hidden; }
.home-rec__label { margin: 0 0 var(--space-1); }
.home-rec__title { font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.15; color: var(--color-text); text-decoration: none; text-wrap: balance; }
.home-rec__title:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.home-rec__meta { font-size: var(--text-xs); color: var(--color-text-subtle); }
.home-rec__about { margin: var(--space-2) 0 0; max-width: 56ch; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-rec__why { margin: 0; max-width: 56ch; font-size: var(--text-xs); line-height: var(--leading-small); color: var(--color-text-subtle); font-style: italic; }
.home-rec__about[hidden], .home-rec__why[hidden] { display: none; }
.home-rec__start { margin-top: auto; padding-top: var(--space-5); }
@media (max-width: 760px) {
  .home-rec__card { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .home-rec__picture { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 9; min-height: 0; }
  .home-rec__words { grid-row: 2; }
}
/* The day card's head reads as one group: the day close over the title,
   the line (the journey, or on Plan its chapter) close under it. */
.day-feature .sleep-feature__copy h2 { margin: var(--space-3) 0 var(--space-2); }
.day-feature .sleep-feature__description { margin: 0; }
.day-feature .day-feature__day { margin-top: var(--space-2); }
/* The Change sheet, one rhythm: each icon on its title's line in a 24px
   box, the title and Current on one baseline, its words under, then its
   foot; the running journey's name in the body's medium weight, its day
   quieter beside it. */
.plan-change .plan-way { grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--space-4); padding: var(--space-5) var(--space-6); }
.plan-change .plan-way__icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; }
.plan-change .plan-way__head { align-items: center; min-height: 24px; }
.plan-change .plan-way__title { line-height: 24px; }
.plan-change .plan-way__words { gap: var(--space-2); }
.plan-change .plan-way__journey { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); }
.plan-change .plan-way__name { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.plan-change .plan-way__day { font-size: var(--text-sm); letter-spacing: 0; text-transform: none; color: var(--color-text-muted); }
.plan-change .plan-way__day::before { content: "· "; }
.plan-change .plan-way__current { font-size: var(--text-caps); }

/* A session's picture: square beside its words on desktop widths, as tall
   as they start; landscape only on very wide screens. It fades in on its
   calm ground. */
@media (min-width: 1101px) {
  .session-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .session-hero__media { aspect-ratio: 1; }
}
@media (min-width: 1700px) {
  .session-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .session-hero__media { aspect-ratio: 4 / 3; }
}
.session-hero__media img { transition: opacity 600ms var(--ease-out); }
.session-hero__media img.is-fading { opacity: 0; }

/* The practice's world, beside it: its name and what it is, then its sound
   and the map, each with room. The practice's words at a comfortable
   width. */
.xp-aside__head { display: flex; flex-direction: column; gap: var(--space-2); }
.xp-aside__head .eyebrow { margin: 0; }
.xp-aside__name { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: 1.2; }
.xp-aside__line { margin: 0; font-size: var(--text-sm); line-height: var(--leading-body); color: var(--color-text-muted); text-wrap: pretty; }
.xp-aside__body { gap: var(--space-5); padding: var(--space-6); }
.xp-aside__sound { gap: var(--space-3); padding: var(--space-5) 0; }
.xp-aside__sound .xp-field__help { margin: 0; }
.xp-body .xp__head { max-width: 62ch; }

/* Living World's place card: its picture only where it can be a proper
   size (beside the map from 1600px); under the map, its words and actions
   alone, the card sized to its place with even room top and bottom. */
@media (max-width: 1599px) { .lw-panel .lw-panel__picture { display: none; } }
@media (max-width: 1439px) {
  .lw-panel { display: block; }
  .lw-panel > .lw-panel__place[hidden] { display: none !important; }
  .lw-panel__place { display: block; }
  .lw-panel__body { padding: var(--space-6); }
}
@media (min-width: 1600px) { .lw-panel__picture { min-height: 180px; } }
@media (min-width: 1440px) { .lw-panel__body > .lw-panel__actions { margin-top: var(--space-5); } }

/* The day card (journey/day-feature): the words' side tinted from the
   card's own picture (a blurred, darkened copy fading out to the right),
   the label a pill in the corner, the round play in the bottom right, and
   See the journey quietly at the words' foot. */
.day-feature .sleep-feature__banner { overflow: hidden; }
.day-feature__tint { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(40px) saturate(1.2) brightness(0.5); transform: scale(1.3); -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 35%, transparent 75%); mask-image: linear-gradient(90deg, #000 0%, #000 35%, transparent 75%); }
.day-feature__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 10, 8, 0.45) 0%, rgba(12, 10, 8, 0.2) 45%, rgba(12, 10, 8, 0) 70%), linear-gradient(0deg, rgba(12, 10, 8, 0.35) 0%, rgba(12, 10, 8, 0) 40%); }
.day-feature__pill { position: absolute; top: var(--space-5); left: var(--space-5); z-index: 2; display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-text); }
.day-feature:has(.day-feature__pill) .sleep-feature__copy { padding-top: calc(var(--space-5) + var(--label-height) + var(--space-6)); }
.day-feature__play { position: absolute; right: var(--pad-feature, 40px); bottom: var(--pad-feature, 40px); z-index: 2; }
.day-feature .round-play { width: 64px; height: 64px; }
.day-feature__bottom { gap: var(--space-3); padding-right: 96px; }
.day-feature__today .day-feature__session { color: inherit; text-decoration: none; }
.day-feature__today .day-feature__session:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.day-feature__actions { margin-top: var(--space-3); }
@media (max-width: 640px) { .day-feature__play { right: var(--space-5); bottom: var(--space-5); } .day-feature .round-play { width: 56px; height: 56px; } }
/* Under the map with room for it (900 to 1439px): the place's picture as a
   proper column on the left, as tall as the card; narrower, words and
   actions alone. */
@media (min-width: 900px) and (max-width: 1439px) {
  .lw-panel__place { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
  .lw-panel .lw-panel__picture { display: block; width: 100%; height: 100%; min-height: 220px; aspect-ratio: auto; object-fit: cover; }
}

/* Sign in's buttons: calmer, a clear 16px apart. */
.auth__title { margin-top: 0; }
.auth__buttons { gap: var(--space-4); margin-top: var(--space-2); }
.auth-button { height: var(--control-height); font-size: 15px; }
.auth__note { margin-top: var(--space-4); }
/* The picture takes the words' height, never sets it. */
.home-rec__picture { position: relative; min-height: 220px; }
.home-rec__picture img { position: absolute; inset: 0; }
/* Descriptions on Home's tinted feature cards read at one size, the course
   card's (14px), on Recommended as on A corner of the universe. */
.home-rec__about { font-size: var(--text-base); line-height: var(--leading-body); }
/* The round play keeps its dark icon on hover, on a slightly warmer white. */
.round-play:hover, .round-play:focus-visible, .day-feature .round-play:hover { color: var(--color-surface-dark); background: var(--color-on-dark-action-hover); }
/* Living World's card without its picture: the words at the top, the
   actions at the foot of the card, whatever its height. */
@media (max-width: 899px), (min-width: 1440px) and (max-width: 1599px) {
  .lw-panel__place { display: flex !important; flex-direction: column; height: 100%; }
  .lw-panel > .lw-panel__place[hidden] { display: none !important; }
  .lw-panel__body { display: flex !important; flex: 1; flex-direction: column; }
  .lw-panel__body > .lw-panel__actions { margin-top: auto; padding-top: var(--space-5); }
}
@media (min-width: 1440px) and (max-width: 1599px) {
  .lw-panel > .lw-panel__place[hidden] { display: flex !important; visibility: hidden; }
}

/* The day card's label in the course card's eyebrow style, its bar under. */
.day-feature__day .eyebrow { margin: 0; color: var(--color-text-on-dark-muted); }
/* Living World's card without its picture (beside the map, 1440 to
   1599px): its words and actions together, centered in the card's height. */
@media (min-width: 1440px) and (max-width: 1599px) {
  .lw-panel__body { justify-content: center; }
  .lw-panel__body > .lw-panel__actions { margin-top: var(--space-6); padding-top: 0; }
}
/* The day card's label and its bar read as one: the bar as wide as the
   label above it. */
.day-feature__day { display: inline-flex; flex-direction: column; align-items: stretch; align-self: flex-start; width: max-content; max-width: 100%; }
.day-feature__day .journey-hero__bar { width: 100%; }
/* Short texts on cards wrap into balanced lines, never one word left
   alone on the last. */
.lw-panel__line, .xp-aside__line, .card__text, .showcase-card__text, .ci-suggest__why, .home-rec__about, .home-rec__why,
.world-card__copy small, .sleep-feature__description, .world-corner p, .notice__text p, .plan-way__text, .featured-description,
.journey-item__note, .creator-callout p, .sound-card__line, .world-game__text { text-wrap: pretty; }
.lw-panel__line, .xp-aside__line, .world-card__copy small { text-wrap: balance; }
/* The Forest's picture sits higher than the other four (its floor and the
   light between the trunks meet above their horizon): framed from its top
   and drawn larger, its horizon comes down to theirs, with the independent
   `scale` (so a card's own hover zoom still adds to it). The picture is
   clipped back to its own box (the inset is 1 - 1/1.65 of the height below
   and half that of the width each side), so it never spills over its
   card's words, whether or not its frame clips; a thumbnail that is its own
   box crops instead. */
img[src*="/world-forest."] { scale: 1.65; transform-origin: 50% 0; clip-path: inset(0 19.7% 39.4% 19.7%); }
img.lw-how__thumb[src*="/world-forest."] { scale: none; clip-path: none; object-view-box: inset(0 0 40% 0); }

/* Home's new course, first in its top: the featured cards' warm ground and
   radius, its words on the left (New on Endor, the title, a line, with whom
   and how many lessons, the way in), the expert's portrait on the right,
   compact so what follows stays in view. */
.new-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); min-height: 240px; border-radius: var(--radius); overflow: hidden; background: var(--color-surface-warm); }
.new-feature__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-8) var(--pad-feature); }

.new-feature__title { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.15; text-wrap: balance; }
.new-feature__title a { color: inherit; text-decoration: none; }
.new-feature__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.new-feature__line { margin: var(--space-1) 0 0; max-width: 52ch; font-size: var(--text-base); line-height: var(--leading-body); color: var(--color-text-muted); text-wrap: pretty; }
.new-feature__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: var(--space-1) 0 var(--space-3); font-size: var(--text-xs); color: var(--color-text-subtle); }
.new-feature__meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--color-line-strong); text-underline-offset: 3px; }
.new-feature__meta > span + span::before { content: ""; display: inline-block; width: var(--meta-square); height: var(--meta-square); margin-right: var(--space-3); vertical-align: middle; background: currentColor; }
.new-feature__media { position: relative; display: block; }
.new-feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
@media (max-width: 640px) {
  .new-feature { grid-template-columns: minmax(0, 1fr) 120px; min-height: 0; }
  .new-feature__copy { padding: var(--space-6) var(--space-5); }
  .new-feature__title { font-size: var(--text-xl); }
}

.home-top__pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.home-top__pair:empty { display: none; }
@media (min-width: 1200px) {
  .home-top__pair:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .home-top__pair:has(> :nth-child(2)) .new-feature { min-height: 0; }
  .home-top__pair:has(> :nth-child(2)) .new-feature__copy { padding: var(--space-6) var(--space-6); }
  .home-top__pair:has(> :nth-child(2)) .home-rec__card { grid-template-columns: minmax(0, 1fr) 34%; gap: var(--space-5); padding: var(--space-6); height: 100%; }
  .home-top__pair:has(> :nth-child(2)) .home-rec, .home-top__pair:has(> :nth-child(2)) .home-top__rec { height: 100%; }
  .home-top__pair:has(> :nth-child(2)) .home-rec__picture { min-height: 0; }
  .home-top__pair:has(> :nth-child(2)) .home-rec__title, .home-top__pair:has(> :nth-child(2)) .new-feature__title { font-size: var(--text-xl); }
}

/* After a session, as the mobile app: "How was it?" a small, quiet caption
   over the card, and "How do you feel now?" the one question, in the title
   size with its score. */
/* Grace's card: the way in at its foot; the portrait framed on her face in
   every layout; with whom and how many lessons on their own lines when the
   card is narrow, never a dot starting a line. */
.new-feature__copy .card-action { margin-top: auto; padding-top: var(--space-3); }
.new-feature__media img { object-position: 50% 38%; }
.home-top__pair:has(> :nth-child(2)) .new-feature__meta { flex-direction: column; gap: 2px; }
.home-top__pair:has(> :nth-child(2)) .new-feature__meta > span + span::before { display: none; }
@media (max-width: 640px) {
  .new-feature__meta { flex-direction: column; gap: 2px; }
  .new-feature__meta > span + span::before { display: none; }
}

/* New (DESIGN-SYSTEM.md, New): a small ink pill leading a card's label,
   in the site's ink and surface, never gold. */
.new-label { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-1); }
.new-label .eyebrow { margin: 0; }
.new-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--color-surface-dark); color: var(--color-text-on-dark); font-size: var(--text-caps); font-weight: var(--weight-medium); letter-spacing: var(--tracking-caps); text-transform: uppercase; line-height: 1; }

/* "How do you feel now?", one slider at every end (sessions, lessons,
   Guided breathing), as the mobile app's summary draws it
   (session/ui/summary.cljs `reflections`): a plain line, an 18px round
   thumb, the line filled to it, both quiet grey until touched, then ink. */
.feel-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; --feel-on: var(--color-text); }
.feel-slider.is-edited { --feel-on: var(--color-text); }
.feel-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--feel-on) 0 var(--fill, 50%), var(--color-line) var(--fill, 50%) 100%); }
.feel-slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--color-line); }
.feel-slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--feel-on); }
.feel-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border: 0; border-radius: 50%; background: var(--feel-on); }
.feel-slider::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--feel-on); }
.feel-slider:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: 4px; }

/* Soundscapes: as many cards per row as fit at 232px or more (5 on a wide
   desktop, then 4, 3, 2, 1 as the window narrows), so a world's name and
   its pill stay on one line, the place's icon right after the name. */
.sounds-grid { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)) !important; }
.sound-card__title, .sound-card__world { white-space: nowrap; }
.sound-card__world { align-self: flex-start; max-width: 100%; }
.sound-card__actions .sound-card__needs, .sound-card__actions .sound-card__needs span { white-space: nowrap; text-wrap: nowrap; }

/* Grace's card and Recommended, one pair (DESIGN-SYSTEM.md, Home's day),
   side by side and stacked alike: the same padding, the words on the
   left, one picture column on the right inside the padding, rounded, the
   picture filling the card's height, the actions on one line at the foot. */
.new-feature, .home-rec__card { --pair-pic: clamp(180px, 20vw, 260px); display: grid; grid-template-columns: minmax(0, 1fr) var(--pair-pic); gap: 35px; align-items: stretch; min-height: 0; padding: var(--pad-card); border-radius: var(--radius); overflow: hidden; }
.new-feature__copy { padding: 0; }
.new-feature__media, .home-rec__picture { position: relative; display: block; grid-column: 2; grid-row: 1; width: 100%; height: auto; min-height: 220px; aspect-ratio: auto; align-self: stretch; overflow: hidden; border-radius: var(--radius-nested); }
.new-feature__media img, .home-rec__picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-rec__words { grid-column: 1; grid-row: 1; }
@media (min-width: 1200px) {
  .home-top__pair:has(> :nth-child(2)) .new-feature, .home-top__pair:has(> :nth-child(2)) .home-rec__card { --pair-pic: clamp(150px, 12vw, 210px); grid-template-columns: minmax(0, 1fr) var(--pair-pic); gap: var(--space-5); padding: var(--space-6); height: 100%; }
  .home-top__pair:has(> :nth-child(2)) .new-feature__copy { padding: 0; }
}
@media (max-width: 760px) {
  .new-feature, .home-rec__card { --pair-pic: 112px; grid-template-columns: minmax(0, 1fr) var(--pair-pic); gap: var(--space-4); padding: var(--space-5); }
  .new-feature__media, .home-rec__picture { grid-column: 2; grid-row: 1; min-height: 140px; aspect-ratio: auto; }
  .home-rec__words { grid-row: 1; }
}
/* Grace's card alone (no Recommended beside it), from 761px: the portrait
   large and full-bleed on the right, as the Featured card. */
@media (min-width: 761px) {
  .home-top__pair:not(:has(> :nth-child(2))) .new-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 0; padding: 0; min-height: 360px; }
  .home-top__pair:not(:has(> :nth-child(2))) .new-feature__copy { padding: var(--pad-feature); }
  .home-top__pair:not(:has(> :nth-child(2))) .new-feature__media { border-radius: 0; }
}
/* Notes at an end: its own part, clear of the slider's anchors above it,
   in the text colour. */

/* The end of every practice, one block (`ui/feel-notes`): the question in
   the headings' font with its score, the slider and its three anchors,
   then Notes, a smaller heading in the same font, its field under it. */
.feel-notes { display: flex; flex-direction: column; }
.feel-notes__feel { display: flex; flex-direction: column; gap: var(--space-3); }
.feel-notes__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.feel-notes__ask { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-regular); color: var(--color-text); }
.feel-notes__score { font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.feel-notes__ends { display: grid; grid-template-columns: repeat(3, 1fr); font-size: var(--text-xs); color: var(--color-text-subtle); }
.feel-notes__ends span:nth-child(2) { text-align: center; }
.feel-notes__ends span:nth-child(3) { text-align: right; }
.feel-notes__label { display: block; margin: var(--space-6) 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); color: var(--color-text); }
.feel-notes__field { width: 100%; margin: 0; }

/* The sound's player stepping away for a session: a short fade and shrink
   toward its button (none under reduced motion, where it simply goes). */
@media (prefers-reduced-motion: no-preference) {
  .mini-player.is-leaving { transform-origin: calc(100% - 25px) 50%; animation: mini-leave 240ms cubic-bezier(0.4, 0, 1, 1) both; pointer-events: none; }
  @keyframes mini-leave { to { opacity: 0; transform: scale(0.85); } }
}
.empty > .card-action { margin-top: var(--space-4); }

/* ---------- Phones (DESIGN-SYSTEM.md, Phones) ----------
   Below 641px: the app's tab bar at the foot, cards two to a row and sized
   for a hand, panels that fit the screen. Desktop is untouched. */
@media (max-width: 960px) {
  /* The tab bar, as the mobile app 2.0's: five places, filled icons, the
     label under each, the ones not open at half strength. */
  :root { --tab-bar-height: 0px; }
  .mini-player { right: var(--space-3); bottom: var(--space-3); }
  .mini-player[data-corner$="l"] { left: var(--space-3); }

  /* The header: the menu and the symbol on the left, search, light, the
     bell and you on the right; every control one 44px rounded square, one
     hover and one focus ring. */
  .topbar { gap: var(--space-1); padding: 0 var(--space-3); }
  .topbar__logo { padding: 0 var(--space-2); align-self: center; height: var(--control-height); border-radius: var(--radius-pill); }
  .topbar__right { gap: var(--space-1); }
  .topbar .icon-button, .topbar .topbar__menu-button, .topbar .topbar__search-link { width: var(--control-height); height: var(--control-height); border-radius: 50%; }
  .topbar .profile-pill { height: var(--control-height); padding: 0 var(--space-3); border-radius: var(--radius-pill); }
  .topbar .account-person { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height); height: var(--control-height); border-radius: 50%; transition: background-color var(--duration-hover) var(--ease-out); }
  .topbar .account-person .avatar { width: 32px; height: 32px; box-shadow: none; }
  .topbar .icon-button:hover, .topbar .profile-pill:hover, .topbar .account-person:hover, .topbar__logo:hover, .topbar [aria-expanded="true"] { background: var(--color-hover); }
  .topbar .account-person:hover .avatar, .topbar .account-person:focus-visible .avatar { box-shadow: none; }
  .topbar .icon-button:focus-visible, .topbar .profile-pill:focus-visible, .topbar .account-person:focus-visible, .topbar__logo:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; box-shadow: none; }

  /* The menu and the bell's panel over a scrim that covers the page and the
     tab bar; a tap on it closes them. */
  body.menu-open .scrim, body.bell-open .scrim { display: block; position: fixed; inset: var(--topbar-height) 0 0 0; z-index: 30; background: var(--color-scrim); }
  .bell-panel { position: fixed; top: calc(var(--topbar-height) + 8px); left: 12px; right: 12px; width: auto; max-width: 480px; margin-left: auto; max-height: calc(100dvh - var(--topbar-height) - 24px); overflow-y: auto; }
}
@media (max-width: 640px) {


  /* Cards two to a row, their words a size down. */
  .grid--two, .grid--three, .grid--four, .grid--five, .grid--wide, .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__title { font-size: var(--text-base); line-height: 1.3; }
  .card__body { gap: var(--space-1); }
  .card__media { aspect-ratio: 1 / 1; }
  .card .tag, .card__media .badge, .card__kind { font-size: 11px; }
}

/* Tap targets on touch screens, phones and tablets: at least 44px. */
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) {
  .icon-button, .button, .chip, .filter-chip, .sidebar__link, .topbar__menu-button { min-height: var(--control-height); }
  .icon-button, .topbar__menu-button { min-width: var(--control-height); }
  a.card-action, button.card-action { position: relative; }
  a.card-action::before, button.card-action::before { content: ""; position: absolute; inset: -14px -4px; }
}
@media (max-width: 640px) {
  /* The bar keeps its light points only; the other three are on Progress. */
  .topbar .progress-pill__part:not([data-part="light"]) { display: none; }
  .topbar .profile-pill { flex: none; }
  /* The worlds' corner: the three worlds side by side, small. */
  .mini-worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .mini-world { aspect-ratio: 3 / 4; min-height: 0; height: auto; }
}
/* A card's small chips keep their look; their tap area grows instead. */
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) {
  .card .chip, .chip-row .chip { min-height: 0; position: relative; }
  .card .chip::after, .chip-row .chip::after { content: ""; position: absolute; inset: -14px -2px; }
  /* Small links and controls keep their look; an invisible area around
     each makes it at least 44px to the touch. */
  .expert-link, .text-link, .link-arrow, .day-feature__title, .footer a { position: relative; }
  .expert-link::before, .text-link::before, .link-arrow::before, .day-feature__title::before, .footer a::before,
  .card__save-button::before, .notice__dismiss::before, .hscroll__button::before, .twin-rail__button::before, .profile-pill::before { content: ""; position: absolute; inset: -14px -4px; }
  .notice__dismiss, .twin-rail__button, .profile-pill { position: relative; }
  .filter, .settings-row__link, .arrange-start { min-height: var(--control-height); }
}
@media (max-width: 640px) {
  /* Newsroom's last tile spans the row, so its words fit. */
  .newsroom-more { grid-column: 1 / -1; min-width: 0; }
  .newsroom-more .card-link { white-space: normal; }
  /* Soundscapes: a wide picture over the words, so a world fits in view. */
  .sound-card__picture { aspect-ratio: 16 / 9; }
}

/* Full rows (DESIGN-SYSTEM.md): one desktop row of as many columns as cards;
   two columns on tablets and phones, an odd last card left out, or, for
   text tiles, taking the row. */
.grid--full { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid--full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--full-drop > :nth-child(odd):last-child { display: none; }
  .grid--full-span > :nth-child(odd):last-child { grid-column: 1 / -1; }
}

/* Two ways on a large card (DESIGN-SYSTEM.md): over the foot a line naming
   what play starts, the way to everything on the left of the foot, the
   round play in the bottom right corner; as the journey card. */
.course-feature__foot { display: flex; flex-direction: column; gap: var(--space-3); margin-top: auto; padding-top: var(--space-4); padding-right: 96px; }
.course-feature__foot .day-feature__actions { margin-top: 0; }
.course-feature .sleep-feature__banner { position: relative; }
.course-feature .round-play { width: 64px; height: 64px; }
.new-feature { position: relative; }
.new-feature .course-feature__foot { padding-right: 0; }
.new-feature .day-feature__today .eyebrow { color: var(--color-text-subtle); }
.new-feature .day-feature__session { font-size: var(--text-md); color: var(--color-text); }
/* Inside the course: number and picture at the row's top, the title the
   whole width, who and how long under it. */
.lesson-row { align-items: flex-start; }
.lesson-row__number { flex: none; width: 24px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.lesson-row .list__main { min-width: 0; flex: 1; }

/* Plan on phones: Coming up or History, a two-part switch at the top. */
.plan-switch { display: none; }
@media (max-width: 640px) {
  .layout-plan { display: flex; flex-direction: column; gap: var(--space-6); }
  .plan-switch { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-pill); background: var(--color-neutral-grey); }
  .plan-switch button { min-height: 40px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; transition: background-color var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out); }
  .plan-switch button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 3px rgba(30, 26, 22, 0.12); }
  .plan-switch button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
  .plan-side { display: contents; }
  [data-plan-view="coming"] .plan-history { display: none; }
  [data-plan-view="history"] .plan-main, [data-plan-view="history"] .plan-side > :not(.plan-history) { display: none; }
}
/* The ebook: its cover the card's full height, to the card's edge. */
.book-feature { padding: 0; gap: 0; align-items: stretch; overflow: hidden; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); }
.book-feature__cover { aspect-ratio: auto; height: 100%; min-height: 240px; border-radius: 0; }
.book-feature__words { align-self: center; padding: var(--pad-card); }
@media (max-width: 640px) {
  .book-feature { grid-template-columns: 120px minmax(0, 1fr); }
  .book-feature__cover { min-height: 0; }
  .book-feature__words { padding: var(--space-5); }
  .book-feature__title { font-size: var(--text-lg); }
}

/* Filters inside a section (DESIGN-SYSTEM.md, Filters): quieter and smaller
   than a page's own filters, the same wherever a section has them; grey
   until chosen, the chosen one white on a firm line. */
.filter.filter--small { height: 32px; padding: 0 var(--space-3); border-color: transparent; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.filter.filter--small:hover { border-color: transparent; color: var(--color-text); }
.filter.filter--small[aria-pressed="true"] { border-color: var(--color-line-strong); background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-medium); }
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) {
  .filter.filter--small { min-height: 0; position: relative; }
  .filter.filter--small::after { content: ""; position: absolute; inset: -6px -2px; }
}
/* My Twin on phones: the Twin, the last check-in and the way to check in
   in the first screen; the rest after. */
@media (max-width: 640px) {
  [data-page="twin"] .page-head .page-lede { display: none; }
  .twin-stage__panel { min-height: 0; }
}

/* One spacing rule (DESIGN-SYSTEM.md, Spacing): sections apart by
   --section-gap on every page, cards that belong together by --card-gap,
   a page's head and its first block by the head's own gap. */
.home-top { gap: var(--card-gap); }
.notice--top { margin-top: var(--card-gap); }
@media (max-width: 640px) {
  /* Home's greeting and How are you today?: room between them. */
  .home-welcome { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
}
/* Inside cards, room between the parts: an expert's role under the name,
   a journey's way in under its words, a tile's title on its own lines. */
.expert-card__role { margin-top: 2px; }
.expert-card .card__body { gap: var(--space-1); }
.showcase-card .card-action { margin-top: var(--space-2); }
.quick-space :is(h2, h3) { line-height: 1.2; text-wrap: balance; margin-bottom: var(--space-2); }
@media (max-width: 640px) {
  .quick-space :is(h2, h3) { font-size: var(--text-lg); }
  /* A section's description runs on, no forced break between its sentences. */
  .lede-part { display: inline; }
}
@media (max-width: 640px) {
  .plan-switch { align-self: stretch; background: var(--color-surface-muted); }
}
@media (max-width: 640px) { .layout-plan { align-items: stretch; } .layout-plan .plan-history { align-self: stretch; width: auto; } }
/* The tab bar's marks: outline icons in ink, the one open full strength
   with its label in medium and a short ink bar over it; the others muted. */
@media (max-width: 960px) {
}
/* Day, Week, Month, Year keep their words on phones (the 520px rule is for
   segmented controls with icons). */
@media (max-width: 520px) { .data-views .segmented__item > span:not(.segmented__indicator) { display: inline; } }
/* The data pages' topics, as filters inside a section (DESIGN-SYSTEM.md). */
.data-tab { height: 32px; min-height: 0; padding: 0 var(--space-3); gap: 6px; border-color: transparent; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.data-tab:hover { border-color: transparent; color: var(--color-text); }
.data-tab[aria-current="page"] { border-color: var(--color-line-strong); background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-medium); }
.data-tab[aria-current="page"] svg { color: var(--color-text); }
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) {
  .data-tab { position: relative; min-height: 0; }
  .data-tab::after { content: ""; position: absolute; inset: -6px -2px; }
}
/* Discover's filter row: the pills scroll, Arrange stays at the end, only
   for All. */
.filter-row { display: flex; align-items: center; gap: var(--space-2); }
.filter-row > .hscroll { flex: 1; min-width: 0; }
.filter-row .arrange-start--icon { flex: none; width: 42px; height: 42px; padding: 0; border: 1px solid var(--color-line); border-radius: 50%; color: var(--color-text); }
.filter-row .arrange-start--icon:hover { border-color: var(--color-line-strong); background: var(--color-hover); text-decoration: none; }
.filter-row .arrange-start--icon[aria-pressed="true"] { border-color: var(--color-surface-dark); background: var(--color-surface-dark); color: var(--color-text-on-dark); }
.filter-row .arrange-start--icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filter-row:has(~ [data-all-view][hidden]) .arrange-start--icon { display: none; }
@media (max-width: 960px) { .filter-row .arrange-start--icon { width: var(--control-height); height: var(--control-height); } }

/* A course card's Next line: small, two lines at most. */
.course-next { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; max-width: 46ch; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); }
.course-next__label { font-weight: var(--weight-medium); }
.course-next__title { color: var(--color-text); text-decoration: none; }
.course-next__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.course-feature .course-next { color: var(--color-text-on-dark-muted); }
.course-feature .course-next__title { color: var(--color-text-on-dark); }
.course-feature__foot { gap: var(--space-4); }

/* The new course's play: the card's bottom right corner, after the words
   (over the picture's corner where the picture runs to that corner). */
.new-feature__media { position: relative; }
.new-feature__picture, .new-feature__picture img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.new-feature__picture img { object-fit: cover; object-position: 50% 30%; }
.new-feature__play { position: absolute; z-index: 2; right: calc(var(--pad-card) + var(--space-4)); bottom: calc(var(--pad-card) + var(--space-4)); }
@media (min-width: 1200px) { .home-top__pair:has(> :nth-child(2)) .new-feature__play { right: calc(var(--space-6) + var(--space-3)); bottom: calc(var(--space-6) + var(--space-3)); } }
.new-feature__play .round-play { width: 56px; height: 56px; }
@media (min-width: 761px) {
  .home-top__pair:not(:has(> :nth-child(2))) .new-feature__play { right: var(--pad-feature, 40px); bottom: var(--pad-feature, 40px); }
  .home-top__pair:not(:has(> :nth-child(2))) .new-feature__play .round-play { width: 64px; height: 64px; }
}
/* Phones: the picture on top, the full width, the face in frame; the words
   under it. Recommended, its pair, the same. */
@media (max-width: 760px) {
  .new-feature, .home-rec__card { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .new-feature__media, .home-rec__picture { grid-column: 1; grid-row: 1; width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 3; border-radius: 0; }
  .new-feature__copy, .home-rec__words { grid-column: 1; grid-row: 2; padding: var(--space-5); }
  .home-rec__picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .new-feature__play { right: var(--space-5); bottom: var(--space-5); }
  .course-feature__foot, .new-feature .course-feature__foot { padding-right: 72px; }
}
/* Inside the course: the number close to its picture, the words the room. */
.lesson-row { gap: var(--space-3); padding: var(--space-4); }
.lesson-row__number { width: 20px; text-align: right; color: var(--color-text-subtle); }
.lesson-row .step__thumb { flex: none; margin-right: var(--space-1); }
.lesson-row .list__title { line-height: 1.35; }
.lesson-row .list__meta { margin-top: var(--space-1); }
@media (max-width: 640px) {
  .lesson-row { gap: var(--space-2); padding: var(--space-3) var(--space-4); }
  .lesson-row .step__thumb { width: 44px; height: 44px; }
  .lesson-row .list__title { font-size: var(--text-base); }
}
/* History's types (Lesson, Session, Check-ins, Intention...) as small labels. */
.history-item__kind { display: inline-flex; align-items: center; justify-self: start; align-self: start; width: fit-content; height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--color-surface-muted); font-size: 11px; line-height: 1; color: var(--color-text-muted); white-space: nowrap; }
.history-item__kind + .history-item__title, .history-item__kind + .history-item__line { margin-top: 6px; }
.plan-history .history-item__time { align-self: center; }
/* Experts' head: the search filled, with its glass, the count at the row's
   end; the subjects on their own row under it; rows of experts apart. */
.filterbar { display: grid; grid-template-columns: minmax(0, 360px) auto; justify-content: space-between; align-items: center; gap: var(--space-4) var(--space-5); margin-bottom: var(--space-8); }
.filterbar .filter-tools__topics { grid-column: 1 / -1; }
.filterbar .search-field { width: 100%; height: var(--control-height); padding: 0 var(--space-4) 0 var(--space-10); border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--color-surface-muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' width='18' height='18' fill='%236b6660'%3E%3Cpath d='M229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72 72.08 72.08 0 0 1-72-72'/%3E%3C/svg%3E") no-repeat 14px 50%; font-size: var(--text-base); }
.filterbar .search-field:focus { border-color: var(--color-line-strong); background-color: var(--color-surface); }
.filterbar .search-field[hidden] + .discover-count { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .filterbar { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: var(--space-6); }
}
@media (max-width: 640px) { .twin-stage__figure { min-height: 440px; } }
/* The five areas: the week's squares stay square, the state on the name's
   line. */
.area-week__day { flex: none; width: 10px; height: 10px; }
.area-week__label { flex: none; }
.twin-stage__rows .area-row .list__title { line-height: 22px; }
.area-row__state { display: flex; align-items: center; min-height: 22px; line-height: 22px; font-size: var(--text-sm); }
.area-row__icon, .area-row.is-lit .area-row__icon { display: flex; align-items: center; justify-content: center; height: 22px; margin-top: 0; }
/* Discover's lists: rows apart by the card-row gap, each card's words two
   lines at most and its session count at the card's foot, so a row lines up. */
.browse-grid { gap: var(--card-row-gap) var(--card-gap); }
.browse-card { gap: 6px; }
.browse-card__media { margin-bottom: 6px; }
.browse-card__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.browse-card__meta { margin-top: auto; padding-top: 2px; }
@media (max-width: 640px) { .browse-card__name { font-size: var(--text-lg); } }
/* The check-in kept: a block of its own under the answer, the completion
   then Done, with room around it. */
.checkin-kept > div { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-5); border-radius: var(--radius); background: var(--color-surface-muted); }
.checkin-kept .completion { margin: 0; align-items: center; }
.checkin-kept .checkin-actions { margin: 0; }
.checkin-kept .checkin-actions .button { width: 100%; justify-content: center; }
.checkin-kept .checkin-actions { position: static; padding: 0; border: 0; background: none; box-shadow: none; }
.checkin-kept { margin-bottom: var(--space-4); }
/* The day card's foot: the way on 12px under its details, the play on the
   card's own padding, so its edge meets the words' edge. */
.day-feature__bottom .day-feature__actions { margin-top: 0; }
@media (max-width: 960px) {
  .day-feature__play { right: var(--space-6); bottom: var(--space-6); }
}
/* Living World's How worlds open: its head to its cards as every section's. */
.lw-how__grid { margin-top: 0; }
.lw-how { display: flex; flex-direction: column; gap: var(--space-4); }
.lw-how__intro { margin: 0; }
@media (max-width: 520px) { .data-views .segmented__item > span.segmented__indicator { display: block; } }
@media (max-width: 640px) { .browse-grid .browse-card__name { font-size: var(--text-md); line-height: 1.25; } }
/* The filter row keeps the pills' space under it, so Arrange sits level
   with the pills. */
.filter-row { align-items: flex-start; margin-bottom: var(--space-8); }
.filter-row > .hscroll { margin-bottom: 0; }
/* How you're feeling on phones: the tiles a size down, as the cards. */
@media (max-width: 640px) {
  .practice-option { min-height: 0; padding: var(--space-4); gap: var(--space-2); }
  .practice-option__title { font-size: var(--text-md); }
  .practice-option__icon svg { width: 22px; height: 22px; }
}

/* ---------- Spacing (DESIGN-SYSTEM.md, Spacing) ----------
   Three steps, nearest first: --gap-inside within a group (a label, its
   title, its text, its actions; a section's head and its cards), --card-gap
   (and --card-row-gap, rows of captioned cards) between cards, --section-gap
   between sections. The page spaces its own blocks with --section-gap, so no
   block's margin adds to it; a back link sits --gap-inside over its title. */
:root { --gap-inside: var(--space-4); --card-framed-gap: var(--space-6); }
.main > div { display: flex; flex-direction: column; gap: var(--section-gap); }
.main > div > * { margin-top: 0; margin-bottom: 0; }
.main > div > .back-link { margin-bottom: calc(var(--gap-inside) - var(--section-gap)); }
.section__head { margin-bottom: var(--gap-inside); }
/* Groups that sit side by side on a desktop are sections apart once they
   stack. */
@media (max-width: 960px) {
  .twin-stage, .twin-lower, .lw, .lw-how__grid, .layout-plan, .plan-side { gap: var(--section-gap); row-gap: var(--section-gap); }
  .plan-side > * { margin-top: 0; margin-bottom: 0; }
}
/* Home's greeting is its page head: the first card a section away. */
.home-top__intro { margin-bottom: calc(var(--section-gap) - var(--card-gap)); }
/* Discover's All: its bands a section apart, no band's own margin added. */
.practice { display: flex; flex-direction: column; gap: var(--section-gap); }
.practice-band > .section, .practice-band > * { margin-top: 0; }
.practice-band { display: flex; flex-direction: column; gap: var(--section-gap); }
.practice-band[hidden] { display: none; }
/* Experts' search, as the header's: a neutral field, a hairline, the glass. */
.filterbar .search-field { border-color: var(--color-search-line); background-color: var(--color-search-bg); }
.filterbar .search-field:focus { border-color: var(--color-search-focus); background-color: var(--color-search-bg); }
/* A name's role lines, tight under it. */
.expert-card__role, .expert-card__role .card__meta { line-height: 1.35; }
.expert-card__role .card__meta-row { row-gap: 0; }
/* My Twin on phones: the Twin's card fills the screen between the bar and
   the tab bar, the page's gutter above, below and at the sides. */
@media (max-width: 640px) {
  .twin-stage__panel { height: calc(100svh - var(--topbar-height) - var(--tab-bar-height) - env(safe-area-inset-bottom) - 2 * var(--gutter)); min-height: 420px; }
  .twin-stage__panel .twin-stage__figure { min-height: 0; flex: 1; }
}
/* Journeys: the way in close under the words, well inside the card gap. */
.showcase-card .card-action { margin-top: calc(var(--space-2) - var(--space-3)); }
/* Inside a card, on the inside step: the parts of a card never further
   apart than cards are. */
.new-feature__meta { margin-bottom: 0; }
.new-feature .course-feature__foot, .course-feature__foot { padding-top: var(--gap-inside); gap: var(--gap-inside); }
.notice__actions { margin-top: var(--gap-inside); }
.book-feature .card-action { margin-top: 0; }
.book-feature__words { gap: var(--space-2); }
.expert-card .card__text, .expert-card--large .card__text { margin-top: 0; }
.panel.journey-run { gap: var(--gap-inside); }
.panel.journey-run > * { margin: 0; }
@media (max-width: 760px) { .sounds-open { gap: var(--gap-inside); } }
.experts-grid .expert-card .card__text, .expert-row .expert-card .card__text { margin-top: 0; }
.panel .eyebrow + .panel__title { margin-top: 0; }
.sounds-open .sounds-open__where { margin-top: 0; }
.new-feature .course-feature__foot { padding-top: var(--space-1); }
.notice__actions { margin-top: var(--space-1); }
/* A part that follows another in the same group: the inside step. */
.follow { margin-top: var(--gap-inside); }
/* Plan's main column: the day's cards a card gap apart, Coming up a
   section after them. */
.plan-main { gap: var(--card-gap); }
.plan-main > * { margin-top: 0; margin-bottom: 0; }
.plan-main > section.stack ~ #plan-coming { margin-top: calc(var(--section-gap) - var(--card-gap)); }
/* Plan's side: History and Bring it into your day a card gap apart, the
   closing note with them on the inside step. */
.plan-side { gap: var(--card-gap); }
.plan-side > * { margin-top: 0; margin-bottom: 0; }
.plan-side > .plan-change-note { margin-top: calc(var(--gap-inside) - var(--card-gap)); }
@media (max-width: 640px) { .plan-side > .plan-change-note { margin-top: calc(var(--gap-inside) - var(--section-gap)); } }
/* A data page: its topics and its period switch are one set of controls. */

/* ---------- Visible spacing fixes ---------- */
/* A page head inside a wrapper (Discover's filter heads) carries no margin
   of its own: the page's section gap is the only space under it. */
.page-head:last-child { margin-bottom: 0; }
/* Empty rows take no space. */
.twin-time__foot:empty, .section__aside:empty, .notice__actions:empty { display: none; }
/* How your days have been: its chart and the wearable card a card gap apart. */
.twin-time { display: flex; flex-direction: column; gap: var(--card-gap); }
.twin-time > * { margin: 0; }
.twin-time > .section__head { margin-bottom: calc(var(--gap-inside) - var(--card-gap)); }
/* Picture cards one to a row (Journeys, Soundscapes' worlds, Discover's
   journeys and challenges): a gap clearly larger than a tight grid's. */
/* Plan on phones: the switch a card gap over what it shows; Coming up's
   heading, which the switch already names, left out. */
@media (max-width: 640px) {
  .layout-plan > .plan-switch { margin-bottom: calc(var(--space-6) - var(--section-gap)); }
  #plan-coming > .section__head { display: none; }
}
/* Plan's sheets on phones: the page's margin on both sides, centred. */
@media (max-width: 640px) {
  .checkin-dialog[data-plan-dialog] { width: calc(100% - 2 * var(--gutter)); max-height: calc(100dvh - 2 * var(--gutter)); margin: auto; inset: 0; }
}
/* The data pages: the period switch belongs to the cards it sets. */
.data-page > .data-period { margin-bottom: calc(var(--card-framed-gap) - var(--section-gap)); }
section.twin-time > .notice.notice--inline { margin: 0; }
/* The data pages' day arrows keep 44px to the touch without pushing the
   cards down: the row is as tall as its words. */
/* Filters inside a section and the period switch: one neutral surface, the
   search field's, never the warm muted one; the switch without a border. */
.data-tab, .filter.filter--small { background: var(--color-search-bg); }
.data-tab:hover, .filter.filter--small:hover { background: rgba(0, 0, 0, 0.07); }
.data-tab[aria-current="page"], .filter.filter--small[aria-pressed="true"] { background: var(--color-surface); border-color: var(--color-line-strong); }
.data-views { border: 0; background: var(--color-search-bg); }
.data-page > .data-tabs { margin-bottom: calc(var(--card-row-gap) - var(--section-gap)); }
/* The new course's card: its parts on the inside step, the card's padding
   a step wider on phones. */
.new-feature .course-feature__foot { padding-top: calc(var(--gap-inside) - var(--space-2)); gap: var(--gap-inside); }
.new-feature__line { margin-top: var(--space-1); }
.new-feature__meta { margin-top: var(--space-1); }
@media (max-width: 760px) { .new-feature__copy { padding: var(--space-6); } .new-feature__play { right: var(--space-6); bottom: var(--space-6); } }
.home-top__day > *, .home-top__day .sleep-feature, .day-card > .sleep-feature { margin-top: 0; margin-bottom: 0; }
/* After today's check-in: a quiet status line, a tap from checking in
   again (Home, My Twin, How you feel). */
.checkin-status { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 0; font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
.checkin-status svg { flex: none; color: var(--color-text); }
.checkin-status:hover { color: var(--color-text); }
.checkin-status:hover span { text-decoration: underline; text-underline-offset: 3px; }
.checkin-status:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) { .checkin-status { position: relative; min-height: 0; } .checkin-status::after { content: ""; position: absolute; inset: -12px -4px; } }

/* Rows of cards: without a visible edge (a picture and words under it) the
   card-row gap; framed cards (a fill or a border) the smaller framed gap. */
.showcase-grid { row-gap: var(--card-row-gap); }
.sounds-grid, .grid--full-span, .practice-options, .coach-row, .data-cards { row-gap: var(--card-framed-gap); }
/* A data page's period: the switch and its date row together, the cards
   after a clear gap. */
@media (max-width: 640px) { .data-period { row-gap: var(--gap-inside); } }
/* A section's way to everything on the title's row, at its right, on every
   width; the description under them. */
@media (max-width: 960px) {
  .section__head:has(> div > .section__title:first-child) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-4); row-gap: var(--space-1); }
  .section__head:has(> div > .section__title:first-child) > div { display: contents; }
  .section__head:has(> div > .section__title:first-child) .section__title { grid-column: 1; grid-row: 1; }
  .section__head:has(> div > .section__title:first-child) .section__lede { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .section__head:has(> div > .section__title:first-child) > :not(div) { grid-column: 2; grid-row: 1; justify-self: end; }
}

/* ======================================================================
   Components (DESIGN-SYSTEM.md, Components). Phone values set at 390px;
   desktop keeps its own.
   ====================================================================== */
@media (max-width: 640px) {
  /* The phone set of spacing tokens, the one place they change: sections
     48px apart, card rows 28px, cards side by side 16px, framed cards and
     a group's parts 12px. */
  :root { --gutter: 18px; --section-gap: 48px; --card-gap: 16px; --card-row-gap: 28px; --card-framed-gap: 12px; --gap-inside: 12px; }

  /* Page header: eyebrow 11px tracked, title 33px at 1.12, subtitle 14px. */
  .page-title, .page-title--home { font-size: 33px; line-height: 1.12; }
  .page-head .page-lede, .home-welcome .page-lede { margin-top: var(--space-2); font-size: var(--text-base); line-height: 1.5; }

  /* Section header: the title 22px at 1.25; its "see all" 11px grey on the
     title's first line, at the right; the description 12px under them. */
  .section__head, .section__head:has(> div > .section__title:first-child) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: var(--space-3); row-gap: 6px; margin-bottom: 15px; }
  .section__head > div { display: contents; }
  .section__head .section__title { grid-column: 1; grid-row: 1; margin: 0; font-size: 22px; line-height: 1.25; }
  .section__head .eyebrow { grid-column: 1 / -1; }
  .section__head .section__lede { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: var(--text-sm); line-height: 1.6; }
  .section__head > .link-arrow { grid-column: 2; grid-row: 1; justify-self: end; margin-top: 7px; }
  /* See all's text, shared with the page actions Arrange and Change. */
  .section__head > .link-arrow, .page-head .link-arrow { font-size: 11px; line-height: 14px; color: var(--color-text-subtle); }
  .section__head > .link-arrow svg { width: 12px; height: 12px; }

  /* Picture card: 16px title at 1.3, 12px under the picture. */
  .card__title { font-size: var(--text-md); line-height: 1.3; }
  .card__body { padding-top: var(--space-3); gap: var(--space-1); }
}

/* Carousel: a row that swipes on phones and tablets, the next card at the
   edge, no scrollbar; one row of four on a desktop. */
.carousel { display: grid; gap: var(--card-row-gap) var(--card-gap); }
@media (max-width: 960px) {
  .carousel { grid-auto-flow: column; grid-auto-columns: min(185px, 47%); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel > * { scroll-snap-align: start; min-width: 0; }
  .carousel.experts-carousel { grid-auto-columns: min(165px, 43%); }
  .carousel.worlds-carousel { grid-auto-columns: min(220px, 62%); }
}
@media (min-width: 641px) and (max-width: 960px) { .carousel { grid-auto-columns: min(220px, 30%); } }
@media (min-width: 961px) {
  .carousel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .carousel > :nth-child(n + 5) { display: none; }
}

/* Compact list row: a 64px picture, the title 15px at 1.3, a 12px meta
   line, an optional two-line text; hairlines between rows. */
.list-rows { display: grid; }
.list-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-4); align-items: start; padding: var(--space-3) 0; border-top: 1px solid var(--color-row-divider); color: var(--color-text); text-decoration: none; }
.list-rows > .list-row:first-child { border-top: 0; padding-top: 0; }
.list-row__picture { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; overflow: hidden; border-radius: var(--radius-nested); background: var(--color-surface-muted); color: var(--color-text-muted); }
.list-row__picture img { width: 100%; height: 100%; object-fit: cover; }
.list-row__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; padding-top: 2px; }
.list-row__title { font-family: var(--font-display); font-size: 15px; font-weight: var(--weight-medium); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-row__meta { display: flex; flex-wrap: wrap; gap: 2px var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.list-row__meta > span + span::before { content: ""; display: inline-block; width: var(--meta-square, 3px); height: var(--meta-square, 3px); margin: 0 var(--space-2) 0 0; vertical-align: middle; background: currentColor; opacity: 0.6; }
.list-row__text { font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-row:hover .list-row__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.list-row--large { grid-template-columns: 112px minmax(0, 1fr); }
.list-row--large .list-row__picture { width: 112px; height: 84px; }
.list-row--large .list-row__title { font-size: var(--text-md); }
@media (min-width: 961px) {
  .list-rows--two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--card-gap); }
  .list-rows--two > .list-row:nth-child(2) { border-top: 0; padding-top: 0; }
  .list-row--large { grid-template-columns: 160px minmax(0, 1fr); }
  .list-row--large .list-row__picture { width: 160px; height: 120px; }
}

/* Small tiles in a grid (games, the Toolbox, how you're feeling): the same
   gap across and down. */
.tiles-grid, .grid--full-span, .practice-options { gap: var(--card-framed-gap); }
@media (min-width: 961px) { .tiles-grid, .grid--full-span, .practice-options { gap: var(--card-gap); } }
/* How much time you have: three doors, one under another on phones. */
@media (max-width: 640px) { .practice-options--three { grid-template-columns: minmax(0, 1fr); } }

/* World card: the picture, the name; a closed world its level and the light
   points to go. */
.world-tile { color: var(--color-text); text-decoration: none; }
.world-tile .sound-card__body { gap: var(--space-1); }
.world-tile .sound-card__title { font-size: var(--text-md); }
.world-tile__to-go { font-size: var(--text-sm); color: var(--color-text-muted); }
.world-tile .sound-card__picture { aspect-ratio: 4 / 3; }

/* Sheets and modals, the check-in's included: the page margin on every side
   on phones. */
@media (max-width: 640px) {
  dialog.checkin-dialog, .checkin-dialog[data-plan-dialog] { width: calc(100% - 2 * var(--gutter)); max-width: none; max-height: calc(100dvh - 2 * var(--gutter)); margin: auto; inset: 0; }
}

/* The round play: its triangle centred to the eye. */
.round-play { padding-left: 0; }
.round-play svg { transform: translateX(1px); }

/* Phones: the header, menu and logo on the left, light points,
   the bell and you on the right, the search the full width under them. */
@media (max-width: 640px) {
  :root { --topbar-height: 112px; }
  .topbar { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-rows: var(--control-height) 40px; column-gap: var(--space-1); row-gap: var(--space-2); height: var(--topbar-height); padding: var(--space-2) var(--space-4) var(--space-3); }
  .topbar .topbar__menu-button { grid-column: 1; grid-row: 1; margin-left: -4px; }
  .topbar__logo { grid-column: 2; grid-row: 1; width: auto; padding: 0 var(--space-1); }
  .topbar .logo-lockup { display: block; height: 26px; width: auto; }
  .topbar .logo-symbol { display: none; }
  .topbar__right { grid-column: 4; grid-row: 1; }
  .topbar__search { display: flex !important; grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; margin: 0; }
  .topbar__search input { height: 40px; border-radius: 8px; font-size: var(--text-md); }
  .topbar .topbar__search-link { display: none !important; }
  .topbar__nav { display: none; }
}
@media (min-width: 961px) {
  .carousel.worlds-carousel { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .carousel.worlds-carousel > :nth-child(5) { display: flex; }
}

/* ---------- Phone round 2 ---------- */
@media (max-width: 640px) {
  /* Header: fixed; the top row stays, the search row moves up with the page
     search icon brings it back. */
  body { padding-top: var(--topbar-height); }
  .topbar__search input { border-radius: var(--radius-search); }

  /* The menu and the bell's panel cover the search row too, with the scrim. */
  .sidebar { top: 60px; z-index: 45; }
  body.menu-open .scrim { inset: 60px 0 0 0; z-index: 44; }
  body.bell-open .scrim { inset: 60px 0 0 0; }
  body.bell-open .topbar { overflow: visible; }
  body.bell-open .topbar::after { content: ""; position: absolute; left: 0; right: 0; top: 60px; bottom: 0; background: var(--color-scrim); z-index: 1; }
  .bell-panel { top: 68px; z-index: 50; }

  /* Menu: Home first, then Discover, Learn and Create, then the rest. */
  .sidebar { display: flex; flex-direction: column; }
  .sidebar__home { order: -1; }

  /* Section heads keep the title and its link; descriptions go. */
  .section__head .section__lede { display: none; }


  /* Home's top: the greeting a section over the first card; the new course
     and the day are two sections. */
  .home-top { gap: var(--section-gap); }
  .home-top__intro { margin-bottom: 0; }
  .home-welcome { gap: var(--space-4); }

  /* A course for you: a smaller title and details; lessons only. */
  .course-feature .sleep-feature__copy h2 { font-size: 26px; line-height: 1.15; }
  .course-feature .sleep-feature__description, .course-feature .sleep-feature__expert, .course-feature .sleep-feature__meta { font-size: var(--text-sm); }
  .course-feature .sleep-feature__extra { display: none; }

  /* Carousels: the same peek of the next card everywhere; experts taller. */
  .carousel, .carousel.experts-carousel, .carousel.worlds-carousel { grid-auto-columns: calc((100% - var(--card-gap) - 36px) / 2); }
  .experts-carousel .card__media { aspect-ratio: 4 / 5; }

  /* Picture card text and meta, one step apart. */
  .card__text { font-size: 13px; line-height: 1.45; }
  .card__meta, .card__meta-row { font-size: 11px; }
  .browse-card__text { font-size: 13px; line-height: 1.45; }
  .browse-card__meta { font-size: 11px; color: var(--color-text-subtle); }

  /* How you're feeling: shorter tiles. */
  .practice-option { padding: var(--space-3) var(--space-4); gap: 2px; }
  .practice-option__icon { height: 22px; }

  /* Journeys: details close under the title, the way in clear of the
     description, cards further apart. */
  .showcase-grid { row-gap: var(--space-10); }
  .showcase-card .showcase-card__meta { margin-top: -8px; }
  .showcase-card .card-action { margin-top: var(--space-1); }

  /* Data pages: the controls together, then the cards a section away, the
     cards apart. */
  .data-page > .data-tabs { margin-bottom: calc(var(--space-5) - var(--section-gap)); }
  .data-page > .data-period { margin-bottom: 0; }
  .data-cards { gap: var(--space-5); row-gap: var(--space-5); }

  /* Experts: the subjects as a dropdown, no count. */
  .filterbar .discover-count { display: none; }
  .filterbar { grid-template-columns: minmax(0, 1fr); }
  .filterbar .filter-tools__topics { display: none; }
  .experts-select { grid-column: 1 / -1; }
}
@media (min-width: 641px) { .experts-select { display: none; } }

@media (min-width: 641px) and (max-width: 960px) {
  .carousel, .carousel.experts-carousel, .carousel.worlds-carousel { grid-auto-columns: calc((100% - 2 * var(--card-gap) - 48px) / 3); }
}

/* Learn's course rows: text aligned with the picture's top, the picture as
   tall as the words; meta quieter than the description; topic badges. */
.list-row--large { align-items: start; }
.list-row--large .list-row__picture, .list-row--large .list-row__picture { width: 112px; height: 112px; }
.list-row--large .list-row__text { -webkit-line-clamp: 2; }
.list-row__body { padding-top: 0; }
.list-row__title { margin-top: -3px; }
.list-row__meta { color: var(--color-text-subtle); }
.list-row--large .list-row__text { font-size: 13px; line-height: 1.45; color: var(--color-text-muted); }
.list-row__badges { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: 2px; }

/* Discover's Arrange: a quiet link in the head, its sheet. */
.arrange-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); background: none; border: 0; padding: 0; cursor: pointer; }
.arrange-link:hover { color: var(--color-text); }
.arrange-list { display: grid; margin: var(--space-4) 0 0; padding: 0; list-style: none; border: 1px solid var(--color-line); border-radius: var(--radius); }
.arrange-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4); border-top: 1px solid var(--color-row-divider); }
.arrange-item:first-child { border-top: 0; }
.arrange-item__name { font-size: var(--text-base); }
.arrange-item.is-off .arrange-item__name { color: var(--color-text-subtle); text-decoration: line-through; }
.arrange-item__moves { display: inline-flex; gap: 2px; }
.arrange-item__toggle { font-size: var(--text-sm); }
.arrange-sheet__status:empty { display: none; }
.arrange-sheet__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-5); }

/* Check-in kept: the check at the title's top, the light close. */
.checkin-kept .completion { align-items: flex-start; }
.checkin-kept .completion__words { gap: 2px; }
.checkin-kept .completion__light { margin: 2px 0 0; }
.checkin-kept .completion__mark { margin-top: 0; }
.checkin-kept .completion__title { line-height: 36px; }

button.text-link, .arrange-item__toggle, [data-arrange-reset] { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.arrange-item__toggle, [data-arrange-reset] { font-size: var(--text-sm); color: var(--color-text-muted); }
@media (min-width: 961px) { .list-row--large .list-row__picture { width: 160px; height: 120px; } }

/* Sheets and the check-in window, centred: the page's own spacing (which
   zeroes its blocks' margins) never reaches an open dialog. */
dialog.checkin-dialog:modal, dialog.note-dialog:modal, dialog.sound-stage:modal { margin: auto; }

/* The session player's close works at every moment: its top bar sits over
   the intro card and the countdown's overlay, and stays while they show. */
.player__chrome--top { z-index: 8; }
.player.is-veiled .player__chrome--top { opacity: 1; pointer-events: none; }
.player.is-veiled .player__chrome--top .player__heading-block { visibility: hidden; }
.player__chrome--top [data-p-close] { pointer-events: auto; }
.player.is-intro .player__chrome--top, .player.is-intro-waiting .player__chrome--top { background: none; }
.player.is-intro .player__chrome--top .player__heading-block, .player.is-intro-waiting .player__chrome--top .player__heading-block { visibility: hidden; }

/* Add to plan: the button and its sheet. */
.plan-add__icon { display: inline-flex; }
.plan-add .plan-add__icon--pinned, .plan-add.is-pinned .plan-add__icon--add { display: none; }
.plan-add.is-pinned .plan-add__icon--pinned { display: inline-flex; }
.plan-sheet__form { display: flex; flex-direction: column; gap: var(--space-4); }
.plan-sheet__session { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); }
.plan-sheet__when { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.plan-sheet__field { display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); color: var(--color-text-muted); }
.plan-sheet__field input { width: 100%; }
.plan-sheet__repeat { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--control-height); font-size: var(--text-base); }
.plan-sheet__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; border: 0; }
.plan-sheet__days[hidden] { display: none; }
.plan-sheet__day { position: relative; }
.plan-sheet__day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.plan-sheet__day span { display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); font-size: var(--text-sm); color: var(--color-text-muted); }
.plan-sheet__day input:checked + span { border-color: var(--color-surface-dark); background: var(--color-surface-dark); color: var(--color-text-on-dark); }
.plan-sheet__day input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.plan-sheet__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-2); }
.plan-sheet__actions .button { margin-left: auto; }
.plan-sheet__remove { color: var(--color-text-muted); }
.history-item .plan-add { margin-top: var(--space-2); }
.plan-sheet__repeat input.switch { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 13px; background: var(--color-line-strong); cursor: pointer; transition: background-color 200ms var(--ease-out); }
.plan-sheet__repeat input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 200ms var(--ease-out); }
.plan-sheet__repeat input.switch:checked { background: var(--color-surface-dark); }
.plan-sheet__repeat input.switch:checked::after { transform: translateX(18px); }
.plan-sheet__repeat input.switch:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.history-item .plan-add { justify-self: start; align-self: start; width: auto; }

/* ---------- Round A ---------- */
/* Page header with an action (a check-in, Arrange), as Home's welcome: on a
   desktop the action at the right of the title, on its baseline; on phones
   on its own row under the title and its line. The eyebrow stays right over
   the title. */
.page-head:has(> :nth-child(2)), .home-welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-5); row-gap: 0; align-items: baseline; }
.page-head:has(> :nth-child(2)) > div:first-child, .home-welcome > div:first-child { display: contents; }
.page-head:has(> :nth-child(2)) > div:first-child > *, .home-welcome > div:first-child > * { grid-column: 1 / -1; }
.page-head:has(> :nth-child(2)) > div:first-child > .eyebrow, .home-welcome > div:first-child > .eyebrow { grid-row: 1; }
.page-head:has(> :nth-child(2)) > div:first-child > .page-title, .home-welcome > div:first-child > .page-title { grid-column: 1; grid-row: 2; }
.page-head:has(> :nth-child(2)) > :nth-child(2), .home-welcome > :nth-child(2) { grid-column: 2; grid-row: 2; align-self: baseline; justify-self: end; margin: 0; }
@media (max-width: 640px) {
  .page-head:has(> :nth-child(2)), .home-welcome { grid-template-columns: minmax(0, 1fr); }
  .page-head:has(> :nth-child(2)) > div:first-child > .page-title, .home-welcome > div:first-child > .page-title { grid-column: 1; }
  .page-head:has(> :nth-child(2)) > :nth-child(2), .home-welcome > :nth-child(2) { grid-column: 1; grid-row: 10; justify-self: start; margin-top: var(--space-4); }
  /* Arrange: an icon at the right of the title's row. */
  .page-head:has(.arrange-link) { grid-template-columns: minmax(0, 1fr) auto; }
  .page-head:has(.arrange-link) > :nth-child(2) { grid-column: 2; grid-row: 2; align-self: center; margin: 0; }
  .arrange-link { width: var(--control-height); height: var(--control-height); justify-content: center; border-radius: 50%; color: var(--color-text); }
  .arrange-link:hover { background: var(--color-hover); }
  .arrange-link .arrange-link__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.arrange-link { font-size: var(--text-sm); }

@media (max-width: 640px) {
  /* The search row slides up under the top row's band, no fade. */
  .topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60px; background: var(--color-topbar); z-index: 1; pointer-events: none; }
  .topbar .topbar__menu-button, .topbar__logo, .topbar__right, .topbar .topbar__search-link { position: relative; z-index: 2; }
  .topbar__search { z-index: 0; }
  .topbar__search input, .topbar__search input::placeholder { font-size: var(--text-md); }

  /* The account menu opens over the page, with the scrim. */
  .topbar:has(details[open]) { overflow: visible; }
  .topbar details.menu[open] .menu__panel { position: fixed; top: 68px; right: 12px; left: auto; z-index: 50; max-height: calc(100dvh - 80px); overflow-y: auto; }
  body:has(.topbar details[open]) .scrim { display: block; position: fixed; inset: 60px 0 0 0; z-index: 30; background: var(--color-scrim); }
  .topbar:has(details[open])::after { content: ""; position: absolute; left: 0; right: 0; top: 60px; bottom: 0; background: var(--color-scrim); z-index: 3; }

  /* How you feel: one gap between every card. */
  .data-grid { gap: var(--space-5); }

  /* The menu's rows, 44px. */
  .sidebar__link { min-height: var(--control-height); padding-top: 0; padding-bottom: 0; }
  .sidebar__top-nav, .sidebar__group, .sidebar__home { gap: 2px; }
}
.page-head:has(> :nth-child(2)) > div:first-child > .page-meta, .home-welcome > div:first-child > .page-meta { grid-row: 3; }
.page-head:has(> :nth-child(2)) > div:first-child > .page-lede, .home-welcome > div:first-child > .page-lede { grid-row: 4; }
@media (max-width: 640px) { .topbar__right { z-index: 4; } }
@media (max-width: 640px) { .data-page .page-head .page-lede { display: block; } }

/* ---------- Phone header, three variants (?header=a, b, c) ----------
   One calm top row in all three: 44px tap areas, 20px icons, equal 4px
   gaps, light points a compact pill, all centred on one 60px line. */
@media (max-width: 640px) {
  .topbar { grid-template-columns: auto auto auto minmax(0, 1fr) auto; grid-template-rows: var(--control-height) 40px; align-items: center; column-gap: var(--space-1); padding: var(--space-2) var(--space-3) var(--space-3); }
  .topbar .topbar__menu-button { grid-column: 1; margin-left: 0; }
  .topbar__logo { grid-column: 2; padding: 0 var(--space-1); height: var(--control-height); display: flex; align-items: center; }
  .topbar .logo-lockup { height: 24px; }
  .topbar__right { grid-column: 5; grid-row: 1; display: flex; align-items: center; gap: var(--space-1); }
  .topbar__right > *, .topbar__right .stats-slot { display: flex; align-items: center; }
  .topbar .icon-button, .topbar .topbar__menu-button, .topbar .topbar__search-link, .topbar .account-person { width: var(--control-height); height: var(--control-height); min-width: var(--control-height); padding: 0; justify-content: center; border-radius: 50%; }
  .topbar .icon-button svg, .topbar .topbar__menu-button svg { width: 20px; height: 20px; }
  .topbar .account-person .avatar { width: 28px; height: 28px; font-size: 13px; }
  .topbar .profile-pill { height: 32px; padding: 0 10px; gap: var(--space-1); border-radius: var(--radius-pill); background: var(--color-search-bg); font-size: 13px; }
  .topbar .profile-pill svg { width: 14px; height: 14px; }
  .topbar__search { grid-column: 1 / -1; grid-row: 2; }

  /* a and b: the field stays put; the header's bottom edge rises over it. */
  .topbar__search { transform: none !important; }
  .topbar::before { display: none; }
  .topbar .topbar__search-link { display: none !important; }

  /* b: a Search pill beside the logo once the field is covered. */

  /* c: no field; the icon always, the menu's first row, a full-screen sheet. */
  .search-sheet { padding: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; background: var(--color-bg); }
  .search-sheet[open] { display: block; }
  .search-sheet::backdrop { background: var(--color-bg); }
  .search-sheet__form { position: relative; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-line); }
  .search-sheet__form > svg { position: absolute; left: 26px; color: var(--color-text-muted); pointer-events: none; }
  .search-sheet__form input { flex: 1; height: var(--control-height); padding: 0 var(--space-3) 0 var(--space-10); border: 1px solid var(--color-search-line); border-radius: var(--radius-search); background: var(--color-search-bg); font-size: var(--text-md); }

  /* The account menu: 12px from the header and the screen's edge. */
  .topbar details.menu[open] .menu__panel { top: 72px; right: 12px; }
}

/* Page actions (Checked in today, Check in, How are you today?, Arrange
   this page, Change): at the right of the description's last line, on its
   baseline, on every width; when they don't fit beside it, their own row
   under it, still at the right. */
.page-head:has(> :nth-child(2)), .home-welcome { display: flex; flex-wrap: wrap; align-items: last baseline; column-gap: var(--space-5); row-gap: 0; }
.page-head:has(> :nth-child(2)) > div:first-child > *, .home-welcome > div:first-child > * { flex: 0 0 100%; }
.page-head:has(> :nth-child(2)) > div:first-child > .page-lede, .home-welcome > div:first-child > .page-lede { flex: 1 1 auto; min-width: 0; }
.page-head:has(> :nth-child(2)):not(:has(.page-lede)) > div:first-child > .page-title { flex: 1 1 auto; }
.page-head:has(> :nth-child(2)) > :nth-child(2), .home-welcome > :nth-child(2) { flex: none; margin: var(--space-2) 0 0 auto; }
@media (max-width: 640px) {
  .page-head:has(> :nth-child(2)) > :nth-child(2), .home-welcome > :nth-child(2) { margin: var(--space-3) 0 0 auto; }
  .page-head:has(.arrange-link) > :nth-child(2) { margin-top: var(--space-2); }
  .arrange-link { width: auto; height: auto; justify-content: flex-start; color: var(--color-text-muted); }
  .arrange-link:hover { background: none; color: var(--color-text); }
  .arrange-link .arrange-link__text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }
}
.arrange-link { font-size: var(--text-sm); }
.arrange-link svg { width: 16px; height: 16px; }
@media (max-width: 640px) {
  /* b: once the pill shows, the logo's symbol alone, so the row fits. */
}
@media (max-width: 640px) { .home-welcome, .page-head:has(> :nth-child(2)) { flex-direction: row; align-items: last baseline; gap: 0 var(--space-5); } }

/* ---------- Final round ---------- */
.sidebar__search, .checkin-status__short { display: none; }
@media (max-width: 640px) {
  /* Phone header: menu, logo, light points, notifications, you; one calm
     row, still. Search lives at the top of Discover and Learn, and as the
     menu's first row. */
  :root { --topbar-height: 60px; }
  .topbar { height: 60px; grid-template-rows: var(--control-height); padding: var(--space-2) var(--space-3); overflow: visible; }
  .topbar__search, .topbar .topbar__search-link { display: none !important; }

  /* Checked in, short, so it stays on the line. */
  .checkin-status__long { display: none; }
  .checkin-status__short { display: inline; }

  /* Arrange and Change: the icon alone, named for screen readers. */
  .page-action--icon { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height); height: var(--control-height); margin: 0; border-radius: 50%; }
  .page-action--icon .page-action__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page-action--icon svg { width: 20px; height: 20px; }
  .page-head:has(.page-action--icon) > :nth-child(2) { margin-top: 0; }
  /* My Twin hides its line on phones: its action sits beside the title. */
  .main[data-page="twin"]:not(:has(.data-page)) .page-head:has(> :nth-child(2)) > div:first-child > .page-title { flex: 1 1 auto; }
}

/* Page actions on a desktop: the small quiet link size, as See all. */

/* The session's heart: a round icon button, named in a tooltip. */
.favorite-icon { width: var(--control-height); height: var(--control-height); min-width: var(--control-height); padding: 0; justify-content: center; border-radius: 50%; }
.favorite-icon[aria-pressed="true"] { color: var(--color-text); }

/* Page actions, one rule on every width: at the right, on the baseline of
   the header's last line (the description, else the title), the words
   taking the rest of the line. */
.page-head:has(> :nth-child(2)), .home-welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-5); row-gap: 0; align-items: start; }
.page-head:has(> :nth-child(2)) > div:first-child > *, .home-welcome > div:first-child > * { grid-column: 1 / -1; }
.page-head:has(> :nth-child(2)) > div:first-child > .eyebrow, .home-welcome > div:first-child > .eyebrow { grid-row: 1; }
.page-head:has(> :nth-child(2)) > div:first-child > .page-title, .home-welcome > div:first-child > .page-title { grid-row: 2; }
.page-head:has(> :nth-child(2)) > div:first-child > .page-meta { grid-row: 3; }
.page-head:has(> :nth-child(2)) > div:first-child > .page-lede, .home-welcome > div:first-child > .page-lede { grid-row: 4; grid-column: 1; }
.page-head:has(> :nth-child(2)) > :nth-child(2), .home-welcome > :nth-child(2) { grid-column: 2; grid-row: 4; align-self: last baseline; justify-self: end; margin: 0; }
.page-head:has(> :nth-child(2)):not(:has(.page-lede)) > div:first-child > .page-title { grid-column: 1; }
.page-head:has(> :nth-child(2)):not(:has(.page-lede)) > :nth-child(2) { grid-row: 2; }
@media (max-width: 640px) {
  .page-head:has(> :nth-child(2)), .home-welcome { column-gap: var(--space-3); }
  /* My Twin hides its line on phones: the action goes on the title's. */
  .main[data-page="twin"]:not(:has(.data-page)) .page-head:has(> :nth-child(2)) > div:first-child > .page-title { grid-column: 1; }
  .main[data-page="twin"]:not(:has(.data-page)) .page-head:has(> :nth-child(2)) > :nth-child(2) { grid-row: 2; }
}
.button.favorite-icon, .favorite-form .button.favorite-icon { width: var(--control-height); min-width: var(--control-height); height: var(--control-height); padding: 0; flex: none; border-radius: 50%; }
.session-hero .cluster:has(.favorite-icon) { flex-wrap: wrap; gap: var(--space-2); }
.session-hero .cluster:has(.favorite-icon) .favorite-form { display: flex; flex: none; width: auto; }

/* Phone-only and wider-only versions of a section's body (Home): phones a
   compact list, wider screens the picture cards. */
@media (min-width: 641px) { .phone-only { display: none !important; } }
@media (max-width: 640px) {
  .wide-only { display: none !important; }
}
@media (max-width: 640px) {
  /* Home's worlds block on phones: the three worlds side by side, each
     name on one line. */
  .world-corner { padding: var(--space-5); }
  .world-corner .mini-worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .world-corner .mini-world { aspect-ratio: 3 / 4; min-height: 0; height: auto; padding: 10px; }
  .world-corner .mini-world__name { font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Home's carousels on wider screens: the grid Home had, four across (two
   on a tablet), the first four. */
@media (min-width: 641px) {
  .carousel.carousel--wide-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; }
  .carousel.carousel--wide-grid > :nth-child(n + 5) { display: none; }
}
@media (min-width: 641px) and (max-width: 960px) {
  .carousel.carousel--wide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .games-grid { gap: var(--card-framed-gap); }
  .games-grid > :nth-child(n + 5) { display: none; }
  .games-grid > :nth-child(-n + 4) { grid-column: auto; }
}

/* ---------- Round A2 ---------- */
/* The page actions Arrange and Change: See all's text on wider screens too. */
.page-head .link-arrow { font-size: var(--text-sm); }
@media (max-width: 640px) {
  .page-head .link-arrow { font-size: 11px; }
}

/* Section heads on phones: the link on the baseline of the title's last
   line. */
@media (max-width: 640px) {
  .section__head .section__title, .section__head > .link-arrow { align-self: last baseline; }
  .section__head > .link-arrow { margin-top: 0; }
}

/* The session page: tags above the title, then the description, the
   buttons 24px below it, then the details. */
.session-hero .session-actions { margin-top: calc(var(--space-6) - var(--card-gap)); }


/* No results, the same everywhere. */
.no-results { padding: var(--space-8) var(--space-5); text-align: center; }
.no-results .no-results__title { font-size: var(--text-lg); }
.no-results .no-results__text { margin: var(--space-2) auto var(--space-4); }
.no-results__clear { justify-content: center; }
.suggest .suggest__empty .no-results { border: 0; padding: var(--space-6) var(--space-4); }

/* Search full screen (phones): a top bar with Close, the field, then a
   hint or the results grouped by kind. */
@media (max-width: 640px) {
  .search-sheet { overflow-y: auto; }
  .search-sheet__bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: var(--space-2) var(--space-3) var(--space-2) var(--gutter); background: var(--color-bg); border-bottom: 1px solid var(--color-line); }
  .search-sheet__title { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); }
  .search-sheet__form { padding: var(--gap-inside) var(--gutter) 0; border-bottom: 0; }
  .search-sheet__form > svg { left: calc(var(--gutter) + 14px); }
  .search-sheet__hint { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
  .search-sheet__all { margin-top: var(--gap-inside); }
}
@media (max-width: 640px) {
  /* The phone header stays at the top of the screen; the body's padding
     keeps the page clear of it. */
  .topbar { position: fixed; top: 0; left: 0; right: 0; }
}

/* Page actions on the baseline of the header's last line: the description
   (else the title) takes part in the alignment too. */
.page-head:has(> :nth-child(2)) > div:first-child > .page-lede, .home-welcome > div:first-child > .page-lede,
.page-head:has(> :nth-child(2)):not(:has(.page-lede)) > div:first-child > .page-title { align-self: last baseline; }
@media (max-width: 640px) {
  .main[data-page="twin"]:not(:has(.data-page)) .page-head:has(> :nth-child(2)) > div:first-child > .page-title { align-self: last baseline; }
  /* An icon alone: its foot on that baseline (an inline box whose one
     line is the icon), 44px to tap. */
  .page-action--icon { display: inline-block; box-sizing: border-box; width: var(--control-height); height: var(--control-height); padding: var(--space-3); text-align: center; }
  .page-action--icon svg { display: inline-block; vertical-align: baseline; }
}
/* Checked in: its words give it its baseline, the check centered on them. */
.checkin-status { align-items: baseline; }
.checkin-status svg { align-self: center; }
@media (max-width: 640px) {
  /* See all's baseline is its words, not the arrow after them. */
  .section__head > .link-arrow { display: inline-block; }
  /* middle: the arrow's centre on the middle of the words' lowercase
     letters, whatever their size. */
  .section__head > .link-arrow svg { margin-left: var(--space-2); vertical-align: middle; }
}

/* ---------- Round A3 ---------- */
/* Home's news on phones: the picture cards, one under another. */
@media (max-width: 640px) {
  .news-grid.grid--full { grid-template-columns: minmax(0, 1fr); }
}

/* The menu's search on phones: shaped as the search field it opens. */
@media (max-width: 640px) {
}

/* Page actions that are buttons (Arrange, Change): a plain text link as
   See all, no box. */
.page-head button.link-arrow { padding: 0; border: 0; border-radius: 0; background: none; font-family: inherit; font-weight: inherit; cursor: pointer; }
@media (max-width: 640px) {
  .page-head button.page-action--icon { padding: var(--space-3); }
}

/* Search results grouped by kind: search full screen and the search page. */
.search-group + .search-group { margin-top: var(--section-gap); }
.search-group__title { margin: 0 0 var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-medium); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.list-row__picture.is-round { border-radius: 50%; }

@media (max-width: 640px) {
  .search-sheet__body { padding: var(--card-row-gap) var(--gutter) var(--search-block-gap); }
  [data-search-hint] .search-group { margin-top: var(--card-row-gap); }
  [data-search-hint] .search-group + .search-group { margin-top: var(--search-block-gap); }
  /* The field: the standard focus ring, for the keyboard only; our own
     clear button in place of the browser's. */
  .search-sheet__form input:focus { outline: none; }
  html.is-keyboard .search-sheet__form input:focus { outline: 2px solid var(--color-focus); outline-offset: 2px; }
  .search-sheet__form input { padding-right: var(--space-12); }
  .search-sheet__form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
  .search-sheet__clear { position: absolute; right: calc(var(--gutter) + 2px); bottom: 0; width: var(--control-height); height: var(--control-height); color: var(--color-text-muted); }
  .search-sheet__clear[hidden] { display: none; }
}

/* No results under the header's field: compact. */
.no-results--compact { padding: var(--space-4); }
.no-results--compact .no-results__title { font-size: var(--text-md); }
.no-results--compact .no-results__text { margin: var(--space-1) auto var(--space-3); font-size: var(--text-sm); }
.suggest .suggest__empty { border: 0; }
.suggest .suggest__empty .no-results--compact { padding: var(--space-4); }

/* ---------- Round A4 ---------- */
/* Home's news: three cards with wide pictures (293 by 178),
   one row on tablets too, one under another on phones. */
.story-card .card__media--story { aspect-ratio: 293 / 178; height: auto; }
.news-grid.grid--full > * { grid-column: auto; }
@media (min-width: 641px) and (max-width: 960px) {
  .news-grid.grid--full { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  /* The menu: its groups' gap between the search field and Home. */

  /* Search full screen. */
  .search-sheet__form { padding-top: var(--space-6); }
  .search-sheet .search-group__title { margin-bottom: var(--space-3); }
  .search-sheet .list-row { align-items: center; }
  .search-sheet .list-row__body { padding-top: 0; }
  .search-sheet .list-row__title { margin-top: 0; }
  .search-sheet .practice-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The search page: each group under a section title, so the groups read
   as such on a wide page. */
.search-group--page .search-group__title { margin: 0 0 var(--gap-inside); font-family: var(--font-display); font-size: var(--title-section); font-weight: var(--weight-medium); line-height: var(--leading-h2); letter-spacing: normal; text-transform: none; color: var(--color-text); }
@media (max-width: 640px) {
  .search-group--page .search-group__title { font-size: 22px; line-height: 1.25; }
}
@media (max-width: 960px) { .news-grid.grid--full-span > :nth-child(odd):last-child { grid-column: auto; } }

/* ---------- Round A5 ---------- */
/* The Arrange sheet: a handle to drag each row by; the handle alone takes
   the touch, so the list still scrolls. */
.arrange-item { padding-left: var(--space-2); }
.arrange-item__handle { width: var(--control-height); height: var(--control-height); margin: -6px 0; color: var(--color-text-muted); cursor: grab; touch-action: none; }
.arrange-item.is-dragging { position: relative; z-index: 1; background: var(--color-bg); box-shadow: var(--shadow-overlay); border-radius: var(--radius-nested); }
.arrange-item.is-dragging .arrange-item__handle { cursor: grabbing; }
[data-arrange-list].is-dragging { user-select: none; }

/* Home's news on phones: a card row's gap between the stacked cards. */
@media (max-width: 640px) {
  .news-grid.grid--full { row-gap: var(--card-row-gap); }
}

/* The search page: a card row's gap from a group's last result to the next
   group's title (the row's own bottom padding taken out). */
.search-groups { display: flex; flex-direction: column; gap: calc(var(--card-row-gap) - var(--space-3)); }
.search-groups > .search-group + .search-group { margin-top: 0; }

/* Compact list rows, everywhere: the text centered on the picture. */
.list-row { align-items: center; }
.list-row__body { padding-top: 0; }
.list-row__title { margin-top: 0; }

/* Search full screen before typing: the Types two by two, the lengths
   three across, as small cards. */
@media (max-width: 640px) {
  .search-sheet .search-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-sheet .search-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  /* The lengths' small cards: the clock above the length, not over it. */
  .search-sheet .search-times .practice-option--time { padding-right: var(--tile-pad); }
  .search-sheet .search-times .time-dial { position: static; height: 28px; margin-bottom: var(--space-2); transform: none; }
  .search-sheet .search-times .practice-option__title { font-size: var(--text-lg); }
}
.search-sheet .search-times .time-dial { align-self: flex-start; }

/* ---------- Round A6 ---------- */
@media (max-width: 640px) {
  /* Search full screen's results: a section's gap under the field, a card
     row's gap from a group's last result to the next label (the row's
     bottom padding taken out). */
  .search-sheet [data-search-results]:not(:empty) { margin-top: calc(var(--search-block-gap) - var(--card-row-gap)); }
  .search-sheet [data-search-results] .search-group + .search-group { margin-top: calc(var(--card-row-gap) - var(--space-3)); }
}

/* ---------- Round A7 ---------- */
/* Home's news titles. */
.story-card .card__title { font-size: 23px; font-weight: var(--weight-medium); line-height: 1.25; }
@media (max-width: 960px) { .story-card .card__title { font-size: 21px; } }
@media (max-width: 720px) { .story-card .card__title { font-size: 25px; } }
@media (max-width: 640px) {
  /* Learn: a card row's gap from the search field to the page's header. */
  /* A section ending in a list: its last row ends at its picture, so the
     section's gap is what shows before the next title. */
  .section .list-rows > .list-row:last-child { padding-bottom: 0; }
}
.list-row__badges .chip { min-height: 0; height: var(--chip-height); }
@media (max-width: 640px) {
  /* An icon-only page action keeps its 44px to tap, its padding under the
     icon overlapping the gap below rather than adding to it. */
  .page-head button.page-action--icon { margin-bottom: -12px; }
}

/* ---------- Round A9 ---------- */
/* Two more steps on phones: a page's header to its first content
   (--page-head-gap, closer than sections), and the blocks of search full
   screen (--search-block-gap). Wider screens keep the section gap. */
:root { --page-head-gap: var(--section-gap); --search-block-gap: var(--section-gap); }
@media (max-width: 640px) {
  :root { --page-head-gap: 32px; --search-block-gap: 36px; }

  /* The page's top: 32px from the app's header to the eyebrow; a page that
     starts with its search field keeps 24px above it. */
  .main { padding-top: var(--space-8); }

  /* The header to the first content. */
  /* (The first thing shown: past a closed dialog, Discover's other filters'
     heads and Home's empty pair.) */
  .main > div > .page-head + :not(dialog),
  .main > div > .page-head + dialog + *,
  .main > div > [data-filter-head] ~ :is([data-all-view], [data-filter-view]),
  .home-top > .home-top__intro + .home-top__pair:not(:empty),
  .home-top > .home-top__intro + .home-top__pair:empty + * { margin-top: calc(var(--page-head-gap) - var(--section-gap)); }

  /* Discover: 20px from the search field to the filters, a card row's gap
     from the filters to the eyebrow. */
  .main > div > .filter-row + [data-filter-head] { margin-top: calc(var(--card-row-gap) - var(--section-gap)); }

}
/* Challenges: the note under the description, in its words. */
.page-head .page-lede.page-lede--note { margin-top: var(--space-3); }

/* ---------- Round A10 ---------- */
/* The search page's form: its gap below on wider screens as before. */
.main > div > .search-form { margin-bottom: var(--space-8); }
@media (max-width: 640px) {
  /* The search page on phones: the keyboard's search key submits, so no
     button; the field and the groups are search's own blocks apart (a
     group's last row keeps its padding under the picture, taken out). */
  .search-form .button { display: none; }
  .main > div > .search-form { margin-bottom: 0; }
  .main > div > .search-form + * { margin-top: calc(var(--search-block-gap) - var(--section-gap)); }
  .search-groups { gap: calc(var(--search-block-gap) - var(--space-3)); }

  /* Every page description in the same words' style, a detail page's hero
     included. */
  .page-lede { line-height: 1.5; }
}

/* ======================================================================
   Round B: one system for buttons, controls and tags (DESIGN-SYSTEM.md,
   Controls). Neutral grey for every control's fill, hover and selected
   state (the warm white stays for pictures' grounds and panels); every
   button a pill, every icon button a circle, every tag a pill; focus
   rings for the keyboard only; one shape for sheets and dialogs.
   ====================================================================== */
:root {
  --color-control: var(--color-neutral-grey);
  --color-control-hover: rgba(0, 0, 0, 0.05);
  --color-control-selected: rgba(0, 0, 0, 0.07);
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
}

/* Hovers and resting fills of controls: neutral. */
.menu__panel button:hover, a.list__item:hover, .times-slot:hover, .auth-button--google:hover,
.plan-offer__door:hover, .plan-way[data-plan-way]:hover, .button--secondary:hover { background: var(--color-control-hover); }
.segmented, .plan-switch, .data-tab, .filter.filter--small, .filterbar .search-field { background: var(--color-control); }
@media (max-width: 640px) { .plan-switch { background: var(--color-control); } }

/* Selected: ink text on the control's selected grey, a check where it
   fits. */
.xp-garden__tool[aria-pressed="true"] { background: var(--color-control-selected); color: var(--color-text); }
.plan-way.is-chosen { background: var(--color-control); }
.plan-way.is-chosen::before { content: none; }
.plan-way.is-chosen .plan-way__icon { color: var(--color-text); }
.plan-way__current { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-text); font-weight: var(--weight-medium); }
.plan-way__current::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--check-mask) center / contain no-repeat; mask: var(--check-mask) center / contain no-repeat; }

/* One button family: primary, secondary and text; actions are pills. */
.button, a.button, button.button, .times-slot, .auth-button { border-radius: var(--radius-pill); }
/* Icon buttons are circles. */
.icon-button, .card__save-button, .hscroll__button, .twin-rail__button, .favorite-icon { border-radius: 50%; }

/* Tags: one pill; grey on white, white on pictures. */
.badge-tag, .card__chip { border-radius: var(--radius-pill); }
.history-item__kind { background: var(--color-control); border: 1px solid var(--color-line); color: var(--color-text-muted); }

/* Focus rings for the keyboard only (app.js marks the page after a Tab). */
html:not(.is-keyboard) :focus-visible { outline: none; }
html:not(.is-keyboard) .account-person:focus-visible .avatar { box-shadow: none; }

/* Sheets and dialogs: one shape. A bar with the close circle and a 16px
   title, a body padded 24px (28 by 32px on wider screens), headings in the
   body 24px, the actions in one row: a text action left, the main one
   right. */
.checkin-close, .app-modal__close, .twin-sheet__bar .icon-button, .search-sheet__bar .icon-button { width: 40px; height: 40px; min-width: 40px; border: 0; border-radius: 50%; background: transparent; }
.checkin-close:hover, .app-modal__close:hover, .twin-sheet__bar .icon-button:hover, .search-sheet__bar .icon-button:hover { background: var(--color-control-hover); }
@media (max-width: 640px) { .checkin-close, .app-modal__close, .twin-sheet__bar .icon-button, .search-sheet__bar .icon-button { width: var(--control-height); height: var(--control-height); min-width: var(--control-height); } }
.checkin-dialog__title, .search-sheet__title { font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--weight-medium); }
.app-modal__title, .twin-sheet__title, .plan-sheet__session { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-medium); line-height: 1.25; }
.arrange-sheet__actions, .plan-sheet__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-6); }

/* Add to plan's weekdays: toggles, not buttons. Off: a ring; on: the
   selected grey, ink and a heavier ring. */
.plan-sheet__day span { background: var(--color-surface); color: var(--color-text-muted); border: 1px solid var(--color-line); }
.plan-sheet__day input:checked + span { background: var(--color-control-selected); color: var(--color-text); border: 1.5px solid var(--color-text); font-weight: var(--weight-medium); }

/* Round B: the big course card (Home's A course for you): a bigger title on phones, the expert's name and role centered
   on the avatar, the grey foot with Inside the course and See all N
   lessons by the +, and a floor for the picture so the words never look
   squeezed on phones. */
.sleep-feature__expert { align-items: center; }
.sleep-feature__inside .card-link { display: inline-flex; align-items: center; gap: var(--space-2); }
@media (max-width: 640px) {
  .course-feature .sleep-feature__copy h2 { font-size: var(--text-2xl); line-height: 1.15; }
  .course-feature .sleep-feature__banner { min-height: 420px; }
}

/* Round B: the news card, one component (Home and the Newsroom): more room
   under the picture and under the title, and Read the story a real link. */
.story-card .card__body { padding-top: var(--space-4); }
.story-card .card__title + .card__text, .story-card .card__text { margin-top: var(--space-2); }
.story-card .card-link { color: var(--color-text); font-weight: var(--weight-medium); }

/* Round B: Home's journeys, three larger cards on tablets and desktops;
   phones keep the carousel. */
@media (min-width: 641px) {
  .carousel.carousel--wide-grid.journeys-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carousel.carousel--wide-grid.journeys-home > :nth-child(n + 4) { display: none; }
}

/* Round B: Home's worlds block on desktops: the title on the title line
   height (1.25), and more room between the three pictures. */
@media (min-width: 961px) {
  .world-corner h2 { line-height: 1.25; }
  .world-corner .mini-worlds { gap: var(--space-4); }
}

/* Round B: Plan's History. On phones the switch already says History, so
   the panel's own title is for screen readers only; every item reads type
   (a grey tag) and time on one line, then the title, then its details,
   with room between items. */
@media (max-width: 640px) {
  .layout-plan:has(.plan-switch) .plan-history > .panel__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.plan-history .history-item { row-gap: 6px; padding: var(--space-4) 0; }
.plan-history .history-item__title { font-size: var(--text-md); line-height: 1.35; }
.plan-history .history-item__line { font-size: var(--text-sm); color: var(--color-text-muted); }
.plan-history__day { margin: var(--space-6) 0 0; }
.plan-history__day:first-child { margin-top: 0; }

/* Round B: search. */
/* No results, everywhere: a grey search icon over the words; then
   Discover's ways in (not in the header's small dropdown). */
.no-results__icon { display: flex; justify-content: center; margin-bottom: var(--space-3); color: var(--color-text-subtle); }
.no-results__ways { margin-top: var(--section-gap); text-align: left; }
.no-results__ways .search-group + .search-group { margin-top: var(--section-gap); }
.no-results--compact .no-results__ways, .suggest .no-results__ways { display: none; }
@media (max-width: 640px) {
  .search-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-times .practice-option--time { padding-right: var(--tile-pad); }
  .search-times .time-dial { position: static; height: 28px; margin-bottom: var(--space-2); transform: none; align-self: flex-start; }
  .search-times .practice-option__title { font-size: var(--text-lg); }
}
/* The search page on tablets and desktops: the title, the field under it
   at the header's own spacing, the results a page head's gap below. */
@media (min-width: 641px) {
  .main > div > .page-head + .search-form { margin-top: calc(var(--space-6) - var(--section-gap)); }
  .main > div > .search-form { margin-bottom: 0; }
}
/* Phones: result groups a section's gap apart, on the page and in search
   full screen (the last row's padding under its picture taken out). */
@media (max-width: 640px) {
  .search-groups { gap: calc(var(--section-gap) - var(--space-3)); }
  .search-sheet [data-search-results] .search-group + .search-group { margin-top: calc(var(--section-gap) - var(--space-3)); }
}

/* Round B: a coach's page, What you get in a call: four short lines, each
   with a simple icon; four across on desktops, two on tablets, a list on
   phones. */
.coach-gets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--card-gap); margin: 0; padding: 0; list-style: none; }
.coach-gets__item { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--color-line); border-radius: var(--radius); }
.coach-gets__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-control); color: var(--color-text); }
.coach-gets__item p { margin: 0; font-size: var(--text-base); line-height: var(--leading-small); color: var(--color-text); text-wrap: pretty; }
@media (max-width: 960px) { .coach-gets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .coach-gets { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .coach-gets__item { flex-direction: row; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; border: 0; border-radius: 0; border-top: 1px solid var(--color-row-divider); }
  .coach-gets__item:first-child { border-top: 0; padding-top: 0; }
}


/* Round B proposals on Home (each behind its switch in views/home.clj). */
/* 11b: nothing planned today, as one quiet row. */
.free-day { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius); background: var(--color-control); }
.free-day__icon { display: inline-flex; color: var(--color-text-muted); }
.free-day__text { flex: 1; font-size: var(--text-base); color: var(--color-text); }

/* Round C: the Guide. The page's own container is the Guide's grid (the
   page spacing rule would make it a column): the conversations on the
   left, the chat on the right; on phones and small tablets the list opens
   over the page from the chat's header. */
.main > div.guide { display: grid; gap: var(--card-gap); }
.guide__history-open, .guide__history-close { display: none; }
.guide__human { margin-top: auto; padding: var(--space-3) var(--space-3) 0; }
@media (max-width: 860px) {
  .main > div.guide { grid-template-columns: minmax(0, 1fr); }
  .guide__history-open { display: inline-flex; margin-left: calc(-1 * var(--space-2)); }
  .guide__side { display: none; }
  .guide.is-history-open .guide__side { display: flex; position: fixed; inset: var(--topbar-height) 0 0 0; z-index: 46; max-height: none; padding: var(--space-4) var(--gutter) var(--space-8); border-radius: 0; background: var(--color-bg); overflow-y: auto; }
  .guide.is-history-open .guide__history-close { display: inline-flex; align-self: flex-end; }
}

/* Round C: after a session, What now: the next step or two, as quiet rows
   under the end's actions. */
.player-next { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--color-line); }
.player-next__title-head { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--weight-medium); }
.player-next__item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; color: var(--color-text); text-decoration: none; }
.player-next__item + .player-next__item { border-top: 1px solid var(--color-row-divider); }
.player-next__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-control); flex: none; }
.player-next__words { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.player-next__label { font-size: var(--text-xs); color: var(--color-text-muted); }
.player-next__title { font-size: var(--text-base); font-weight: var(--weight-medium); }
.player-next__item:hover .player-next__title { text-decoration: underline; text-underline-offset: 3px; }

/* Round C: Plan's own planned sessions: Edit beside the row (the plan
   sheet changes or removes it). */
.plan-row { display: flex; align-items: center; gap: var(--space-2); }
.plan-row > .list__item { flex: 1; min-width: 0; }
.plan-row__edit { flex: none; color: var(--color-text-muted); }
.plan-row__edit:hover { color: var(--color-text); background: var(--color-control-hover); }
.plan-sheet__confirm { margin-top: var(--space-4); }
.plan-sheet__confirm-title { margin: 0 0 var(--space-1); font-weight: var(--weight-medium); }
.plan-sheet__confirm[hidden], [data-plan-actions][hidden] { display: none; }

/* Round C: the new course card at the top of Home, less text: no
   lesson count; the expert's name larger, the picture larger. */
.new-feature { grid-template-columns: minmax(0, 1fr) minmax(260px, 44%); min-height: 280px; }
.new-feature__with { font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--color-text); }
@media (max-width: 640px) {
  .new-feature { grid-template-columns: minmax(0, 1fr) 150px; }
}

/* Round C: the large cards' main action, one look (ui/main-action-style):
   the round play on the picture, or a dark pill with its words and a play
   icon at the card's foot, a small text link beside it only where one is
   needed. */
.card-pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.card-pill { gap: var(--space-2); }
.day-feature .card-pill, .sleep-feature .card-pill { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.day-feature .card-pill-row .link-arrow, .sleep-feature .card-pill-row .link-arrow { color: var(--color-text-on-dark-muted); }
.home-rec__picture { position: relative; }
.home-rec__play { position: absolute; right: var(--space-3); bottom: var(--space-3); }
.home-rec__play .round-play { width: 48px; height: 48px; }

/* Round D: a course's progress, as the mobile app's course page: the line,
   a 4px bar under it; finished lessons with a check in place of their
   number. */
.course-progress { display: flex; flex-direction: column; gap: var(--space-2); }
.course-progress__line { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.course-progress__bar { display: block; height: 4px; border-radius: var(--radius-pill); background: var(--color-control-selected); overflow: hidden; }
.course-progress__bar > span { display: block; height: 100%; background: var(--color-text); border-radius: inherit; }
.lesson-row__done { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-text); color: var(--color-surface); }
.lesson-row.is-done .list__title { color: var(--color-text-muted); }

/* Round D: the quick check-in with less text: no title (it stays for
   screen readers), the slider's words under it as the hint, and Kept for
   today with Done on one quiet line. */
.checkin-step[data-ci-step="feel"] .checkin-feel__word:empty { min-height: 0; margin: 0; }
.checkin-kept > div { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-4); }
.checkin-kept .completion { align-items: center; gap: var(--space-3); }
.checkin-kept .completion__mark { width: 28px; height: 28px; }
.checkin-kept .completion__mark svg { width: 14px; height: 14px; }
.checkin-kept .completion__title { font-size: var(--text-sm); line-height: 1.4; }
.checkin-kept .completion__light { font-size: var(--text-2xs); }
.checkin-kept .checkin-actions .button { width: auto; min-height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }

/* Round D: the big Home cards as posters, no descriptions; the new course
   card with a larger portrait and its expert's name larger. */
@media (min-width: 861px) {
  .new-feature { grid-template-columns: minmax(0, 1fr) minmax(300px, 52%); min-height: 340px; }
}
.new-feature__with { font-size: 20px; line-height: 1.3; }
@media (max-width: 860px) {
  .new-feature { grid-template-columns: minmax(0, 1fr) 180px; }
  .new-feature__with { font-size: 18px; }
}

/* Round D: the terms, in the sign-in page's frame. */
.terms { display: flex; flex-direction: column; gap: var(--space-5); }
.terms__updates { margin: 0; }
.terms__agree { width: 100%; justify-content: center; }

/* Round D: the subscription pages, in the web app's cards. */
.sub-page { max-width: 760px; }
.sub-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.sub-card__title { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.2; font-weight: var(--weight-regular); }
.sub-card__status { margin: 0; color: var(--color-text-secondary); }
.sub-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.sub-card__cancel { margin-left: auto; }
.sub-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.sub-plan__display { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-medium); }
.sub-period { display: flex; gap: var(--space-2); }
.sub-stops { display: flex; flex-direction: column; gap: var(--space-3); margin: var(--space-2) 0; padding: 0; list-style: none; }
.sub-stops li { display: flex; flex-direction: column; gap: 2px; padding-left: var(--space-4); border-left: 2px solid var(--color-line); }
@media (max-width: 860px) {
  .sub-card { padding: var(--space-5); }
  .sub-card__cancel { margin-left: 0; }
}

/* Round E fixes: the plans and the step before payment in the web app's
   own light design, in /join/plan's order: the headline over a picture, the
   Annual or Monthly switch, the plan cards, the trial as a vertical line of
   square markers, the well-being guarantee, one main button. Ink and
   neutrals only, no accent colour. */
.paywall { display: flex; flex-direction: column; gap: var(--space-6); max-width: 640px; margin: 0 auto; }
.paywall__headline { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.paywall__picture { width: 100%; aspect-ratio: 16 / 7; margin-bottom: var(--space-4); border-radius: var(--radius); overflow: hidden; background: var(--color-surface-muted); }
.paywall__picture img { width: 100%; height: 100%; object-fit: cover; }
.paywall__kicker { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.paywall__display { margin: 0; font-family: var(--font-display); font-size: 44px; line-height: 1.1; font-weight: var(--weight-regular); letter-spacing: var(--tracking-display); }
.paywall__then { margin: 0; color: var(--color-text-secondary); }
.paywall__saving { margin-top: var(--space-1); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--color-surface-muted); font-size: var(--text-sm); color: var(--color-text); }
.paywall__toggle { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-pill); background: var(--color-surface-muted); }
.paywall__period { display: grid; place-items: center; min-height: 40px; border-radius: var(--radius-pill); color: var(--color-text-secondary); text-decoration: none; font-weight: var(--weight-medium, 500); }
.paywall__period[aria-current] { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.paywall__plans { display: flex; flex-direction: column; gap: var(--space-3); }
.paywall__plan { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; }
.paywall__plan:hover { border-color: var(--color-text-subtle); }
.paywall__plan.is-selected { border: 1.5px solid var(--color-text); padding: calc(var(--space-5) - 0.5px); }
.paywall__plan-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.paywall__plan-name { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 20px; font-weight: var(--weight-medium, 500); }
.paywall__badge { padding: 3px var(--space-2); border-radius: var(--radius-pill); background: var(--color-text); color: var(--color-surface); font-size: 10px; font-weight: var(--weight-semibold); letter-spacing: 0.08em; }
.paywall__plan-price { color: var(--color-text-secondary); font-size: var(--text-base); white-space: nowrap; }
.paywall__plan.is-selected .paywall__plan-price { color: var(--color-text); font-weight: var(--weight-medium, 500); }
.paywall__plan-about { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.5; }
.paywall__timeline { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius); background: var(--color-surface-muted); }
.paywall__stops { display: flex; flex-direction: column; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.paywall__stops li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-left: 28px; font-size: var(--text-sm); color: var(--color-text-secondary); }
.paywall__stops li strong { color: var(--color-text); font-weight: var(--weight-medium, 500); font-size: var(--text-base); }
.paywall__marker { position: absolute; top: 5px; left: 0; width: 10px; height: 10px; background: var(--color-surface); border: 1.5px solid var(--color-text); }
.paywall__stops li:first-child .paywall__marker { background: var(--color-text); }
.paywall__stops li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 5px; bottom: calc(-1 * var(--space-5) + 2px); width: 1px; background: var(--color-text-subtle); }
.paywall__guarantee { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-4) var(--space-5); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-align: left; cursor: pointer; font: inherit; }
.paywall__guarantee:hover { border-color: var(--color-text-subtle); }
.paywall__box { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--color-text); border-radius: 4px; color: transparent; }
.paywall__guarantee.is-added .paywall__box { background: var(--color-text); color: var(--color-surface); }
.paywall__guarantee-words { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); color: var(--color-text-muted); }
.paywall__guarantee-words strong { font-size: var(--text-base); font-weight: var(--weight-medium, 500); color: var(--color-text); }
.paywall__guarantee .paywall__when-on, .paywall__guarantee.is-added .paywall__when-off { display: none; }
.paywall__guarantee.is-added .paywall__when-on { display: inline; }
.paywall__account { margin: 0; color: var(--color-text-secondary); }
.paywall__foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.paywall__note { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.guarantee-sheet__body { display: flex; flex-direction: column; gap: var(--space-3); }
.guarantee-sheet__optional { align-self: flex-start; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--color-surface-muted); font-size: 10px; letter-spacing: 0.1em; color: var(--color-text-muted); }
.guarantee-sheet__title { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: var(--weight-regular); }
.guarantee-sheet__terms { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); padding: var(--space-5); border-radius: var(--radius); background: var(--color-surface-muted); }
.guarantee-sheet__terms ul { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.guarantee-sheet__terms li { position: relative; padding-left: 18px; font-size: var(--text-sm); }
.guarantee-sheet__terms li::before { content: ""; position: absolute; top: 7px; left: 0; width: 6px; height: 6px; background: var(--color-text); }
.guarantee-sheet__optin { display: flex; align-items: flex-start; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-line); font-size: var(--text-sm); }
.guarantee-sheet__optin input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--color-text); }
@media (max-width: 860px) {
  .paywall { gap: var(--space-5); }
  .paywall__display { font-size: 36px; }
}

/* Round E: what changed in the terms, and the two documents. */
.terms__when { margin: 0; font-size: var(--text-sm); color: var(--color-text-secondary); }
.terms__docs { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }

/* Round E: the Guide's free-tier reply, the mobile app's two ways on. */
.guide-free__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* Round E: the quick check-in's Kept for today on its own tinted line, Done
   at the right of the dialog's foot bar, as the other dialogs close. */
.checkin-kept .completion { padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--color-surface-muted); align-items: center; }
.checkin-step[data-ci-step="feel"] .checkin-actions--end { position: sticky; bottom: 0; z-index: 1; flex-direction: row; justify-content: flex-end; align-items: center; margin: var(--space-6) calc(var(--space-8) * -1) -28px; padding: var(--space-4) var(--space-8) var(--space-5); border-top: 1px solid var(--color-line); background: var(--color-surface); }
.checkin-step[data-ci-step="feel"] .checkin-actions--end[hidden] { display: none; }
@media (max-width: 860px) {
  .checkin-step[data-ci-step="feel"] .checkin-actions--end { margin-left: calc(var(--space-5) * -1); margin-right: calc(var(--space-5) * -1); padding-left: var(--space-5); padding-right: var(--space-5); }
}

/* Round E: the large Home cards as posters. The picture fills the card, a
   soft shade at its foot carries the small eyebrow, the title and the pill;
   nothing else. One look for Featured for you, A course for you and the new
   course, on every screen. */
.poster { position: relative; display: flex; align-items: flex-end; min-height: 420px; padding: 0; border-radius: var(--radius); overflow: hidden; background: #1f1a17; color: #fff; isolation: isolate; }
.poster__media { position: absolute; inset: 0; z-index: -2; }
.poster__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.poster:hover .poster__media img { transform: scale(1.02); }
.poster__media picture { display: contents; }
.poster__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.35) 62%, rgba(0,0,0,0.72) 100%); pointer-events: none; }
.poster__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); width: 100%; padding: 28px; }
.poster__eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.poster__title { margin: 0; max-width: 18ch; font-family: var(--font-display); font-size: 40px; line-height: 1.1; font-weight: var(--weight-regular); }
.poster__title a { color: inherit; text-decoration: none; }
.poster__action { margin-top: var(--space-2); }
.poster .card-pill { background: #fff; color: #000; border-color: #fff; }
.poster .round-play { position: static; }
.home-top__pair .poster { min-height: 100%; }
@media (max-width: 860px) {
  .poster { min-height: 0; aspect-ratio: 4 / 5; }
  .poster__copy { padding: var(--space-5); }
  .poster__title { font-size: 30px; }
}
.checkin-kept > .completion { justify-content: flex-start; gap: var(--space-3); }

/* Round E fixes: the terms as one clean column, a sheet's paddings: the
   title and its lines, the two documents as link rows between hairlines,
   the email updates as one row, the button, the small print. */
.terms { display: flex; flex-direction: column; gap: var(--space-6); width: min(400px, 100%); }
.terms__head { display: flex; flex-direction: column; gap: var(--space-2); }
.terms__title { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 1.15; letter-spacing: var(--tracking-display); }
.terms__lede { margin: var(--space-1) 0 0; color: var(--color-text-secondary); }
.terms__when { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.terms__docs { display: flex; flex-direction: column; border-top: 1px solid var(--color-line); }
.terms__doc { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; border-bottom: 1px solid var(--color-line); color: var(--color-text); text-decoration: none; }
.terms__doc:hover .terms__doc-label { text-decoration: underline; text-underline-offset: 3px; }
.terms__doc-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-surface-muted); }
.terms__doc-label { flex: 1; font-weight: var(--weight-medium, 500); }
.terms__updates { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.terms__foot { display: flex; flex-direction: column; gap: var(--space-3); }
.terms__agree { width: 100%; justify-content: center; min-height: 52px; }
.terms__small { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-subtle); }
@media (max-width: 860px) {
  .terms { gap: var(--space-5); }
  .terms__title { font-size: 28px; }
}

/* Round E fixes: Recommended as a Featured for you: the words
   on the left, the picture filling the right half to the card's edges, no
   margin around it; on phones the picture on top, edge to edge. */
.home-top .home-rec .home-rec__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; height: auto; }
.home-top .home-rec .home-rec__words { grid-column: 1; grid-row: 1; align-self: center; padding: var(--space-6); }
.home-top .home-rec .home-rec__picture { grid-column: 2; grid-row: 1; width: 100%; min-height: 280px; aspect-ratio: auto; border-radius: 0; }
@media (max-width: 600px) {
  .home-top .home-rec .home-rec__card { grid-template-columns: minmax(0, 1fr); }
  .home-top .home-rec .home-rec__picture { grid-column: 1; grid-row: 1; min-height: 0; aspect-ratio: 16 / 9; }
  .home-top .home-rec .home-rec__words { grid-row: 2; padding: var(--space-5); }
}

/* Round E fixes: the new course card with its portrait toward the right and
   the words on a dark gradient at the left, so no text sits on the face. */
.poster--new { background: #15110f; }
.poster--new .poster__media { left: 34%; }
.poster--new .poster__media img { object-position: 60% 25%; }
.poster--new .poster__shade { background: linear-gradient(90deg, #15110f 0%, #15110f 34%, rgba(21,17,15,0.75) 48%, rgba(21,17,15,0) 70%); }
.poster--new .poster__copy { width: 58%; align-self: stretch; justify-content: flex-end; }
@media (max-width: 860px) {
  .poster--new .poster__media { left: 30%; }
  .poster--new .poster__shade { background: linear-gradient(90deg, #15110f 0%, #15110f 30%, rgba(21,17,15,0.8) 46%, rgba(21,17,15,0) 72%), linear-gradient(0deg, rgba(21,17,15,0.6) 0%, rgba(21,17,15,0) 40%); }
  .poster--new .poster__copy { width: 64%; }
}

/* Round E fixes: the end of a session. More room between How do you feel
   now? and Notes; in a course, Next lesson as the main button with Done as
   the secondary; elsewhere Up next, in Notes' type, with two plain rows. */
.feel-notes__label { margin-top: var(--space-8); }
.player__end-actions.has-next-lesson { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3); }
.player-next__head { margin: var(--space-8) 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); color: var(--color-text); }
.player-next__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 48px; border-top: 1px solid var(--color-line); color: var(--color-text); text-decoration: none; }
.player-next__item:last-child { border-bottom: 1px solid var(--color-line); }
.player-next__item .player-next__title { font-size: var(--text-base); }
.home-top__pair .poster--new { min-height: 340px; }
@media (max-width: 860px) {
  .home-top__pair .poster--new { min-height: 0; }
  .poster--new .poster__media { left: 0; bottom: 34%; }
  .poster--new .poster__media img { object-position: 50% 20%; }
  .poster--new .poster__shade { background: linear-gradient(0deg, #15110f 0%, #15110f 34%, rgba(21,17,15,0.7) 44%, rgba(21,17,15,0) 62%); }
  .poster--new .poster__copy { width: 100%; }
}

/* Round E fixes, second pass. */
/* The end of a lesson: one close, at the right; Next lesson and Done at
   their own width, apart. */
.player__end-actions.has-next-lesson { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.player__end-actions.has-next-lesson .button { width: auto; flex: 0 0 auto; padding-left: var(--space-6); padding-right: var(--space-6); }
/* The terms: neutral grey icon circles, and room around the button. */
.terms__doc-icon { background: var(--color-neutral-grey); }
.terms__foot { gap: var(--space-4); margin-top: var(--space-3); padding-bottom: var(--space-4); }
.terms__agree { margin: var(--space-2) 0; }
/* Home's large cards on wide screens: at least 350px, the words at the
   top, the button at the foot, inside the card's paddings. */
@media (min-width: 861px) {
  .poster { min-height: 350px; align-items: stretch; }
  .home-top__pair .poster, .home-top__pair .poster--new { min-height: 350px; }
  .poster__copy { justify-content: flex-start; }
  .poster__action { margin-top: auto; padding-top: var(--space-4); }
  .poster--course .poster__shade { background: linear-gradient(180deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.2) 45%, rgba(0,0,0,0) 62%, rgba(0,0,0,0.35) 100%); }
  .poster--new .poster__copy { justify-content: flex-start; }
  .home-top .home-rec .home-rec__card { min-height: 350px; }
  .home-top .home-rec .home-rec__words { align-self: stretch; justify-content: flex-start; }
  .home-top .home-rec .home-rec__start { margin-top: auto; padding-top: var(--space-4); }
}

/* Human coaching: each coach in a framed card (the design system's card:
   hairline, radius, the card padding), the portrait inside it, the words,
   then one action row: Book a call as the primary button at its own size,
   About <name> beside it. */
.coaching .coach-row { gap: var(--space-5); }
.coaching .coach-card { padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.coaching .coach-card__photo { border-radius: var(--radius-nested, 12px); margin-bottom: var(--space-5); }
.coaching .coach-card__text { padding: 0 var(--space-2) var(--space-2); }
.coaching .coach-card__body { padding-bottom: var(--space-5); }
.coaching .coach-card__intro { margin-top: var(--space-3); }
.coaching .coach-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.coaching .coach-card__actions .button { width: auto; font-size: var(--text-base); }
.coaching .coach-card__meet { margin-top: 0; }
@media (min-width: 721px) {
  .coaching .coach-row:has(> .coach-card:only-child) .coach-card__actions .button { width: auto; }
}

/* The terms as the mobile app's screens: centred, the title and its one
   line, the switch, the button with its arrow, the agreement. */
.terms { align-items: stretch; text-align: center; }
.terms__head { align-items: center; }
.terms__updates { text-align: left; padding: var(--space-3) 0; border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.terms__agree { gap: var(--space-2); }
.terms__small { text-align: center; }

/* The quick check-in, centred, with the same room above and below its
   content: the question, the slider, the line under it, then what was kept. */
.checkin-dialog__body:has(> .checkin-step[data-ci-step="feel"]:not([hidden])) { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.checkin-step[data-ci-step="feel"] { text-align: center; }
.checkin-step[data-ci-step="feel"] .checkin-feel__word { margin: 0 0 var(--space-4); }
.checkin-step[data-ci-step="feel"] .checkin-quickrow { justify-content: center; margin-bottom: 0; }
.checkin-step[data-ci-step="feel"] .checkin-hint { margin-top: var(--space-3); text-align: center; }
.checkin-step[data-ci-step="feel"] .checkin-kept { margin: var(--space-5) 0 0; }
.checkin-step[data-ci-step="feel"] .checkin-kept > .completion { justify-content: center; }
.checkin-step[data-ci-step="feel"] .checkin-actions--end { margin-bottom: calc(var(--space-6) * -1); }

/* Home's large cards: the whole card opens its session or course (the
   title's link covers it; the button sits above). The new course card's
   badge in the cards' own pill style, the expert on their own line with
   the lessons small beside. On very wide screens the cards grow in height
   too. */
.poster__link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.poster__action, .poster__badge { position: relative; z-index: 1; }
.poster__badge { align-self: flex-start; border-color: transparent; }
.poster__byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); margin: 0; }
.poster__expert { font-size: 18px; font-weight: var(--weight-medium); color: #fff; }
.poster__count { font-size: var(--text-xs); color: rgba(255,255,255,0.75); }
.home-rec__card { position: relative; }
.home-rec__title::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.home-rec__start, .home-rec__play { position: relative; z-index: 1; }
@media (min-width: 1600px) {
  .poster, .home-top__pair .poster, .home-top__pair .poster--new, .home-top .home-rec .home-rec__card { min-height: clamp(350px, 24vw, 460px); }
}

/* The end of a session keeps the one close at the top left, as during the
   session and in the check-in: the bar's title and shade go, the button
   stays, drawn for the light end screen. The end screen's own close goes. */
.player__summary-close { display: none; }
.player.is-summary .player__chrome--top { background: none; pointer-events: none; }
.player.is-summary .player__chrome--top .player__heading-block { visibility: hidden; }
.player.is-summary .player__chrome--top [data-p-close] { pointer-events: auto; background: var(--color-surface); color: var(--color-text); box-shadow: 0 0 0 1px var(--color-line); }
/* More room between How do you feel now? and Notes. */
.player__summary .feel-notes__label { margin-top: var(--space-10); }
.coaching .coach-card__actions { justify-content: space-between; align-items: center; }
.coaching .coach-card__actions .coach-card__meet { align-self: center; }

/* The quick check-in balanced: the same room above and below its content
   (the dialog's padding only), the line under the slider gone once the
   answer is kept, Done centred in the foot bar. */
.checkin-step[data-ci-step="feel"] .checkin-feel { margin-top: 0; }
.checkin-step[data-ci-step="feel"] .checkin-hint:has([data-ci-hint-main]:empty) { display: none; }
.checkin-step[data-ci-step="feel"] .checkin-actions--end { justify-content: center; margin-top: var(--space-6); }

/* The plans, more open: one rhythm of space from top to bottom, the trial
   as three steps side by side on wide screens (stacked on phones), and the
   main button as wide as the column. */
.paywall { gap: var(--space-8); }
.paywall__headline { gap: var(--space-3); }
.paywall__picture { margin-bottom: var(--space-5); }
.paywall__plans { gap: var(--space-4); }
.paywall__timeline { padding: var(--space-6); gap: var(--space-5); }
.paywall__foot { align-items: stretch; gap: var(--space-4); }
.paywall__foot .button { width: 100%; justify-content: center; min-height: 56px; font-size: var(--text-md, 18px); }
.paywall__note { text-align: center; }
@media (min-width: 861px) {
  .paywall__stops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
  .paywall__stops li { padding: 26px 0 0; }
  .paywall__marker { top: 0; left: 0; }
  .paywall__stops li:not(:last-child)::after { top: 5px; left: 18px; right: calc(-1 * var(--space-5) + 4px); bottom: auto; width: auto; height: 1px; }
}
@media (max-width: 860px) {
  .paywall { gap: var(--space-6); }
}

/* Home's two large cards alike: the same badge (uppercase, spaced, in a
   pill that stands out: ink on the light card, white on the dark one), the
   same title size, growing on large screens; the badge and title at the
   top, the details under the title with room, the button at the foot. */
.home-badge { display: inline-flex; align-items: center; align-self: flex-start; height: 26px; padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--color-text); color: var(--color-surface); font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: 0.12em; text-transform: uppercase; }
.poster .home-badge { background: #fff; color: #000; }
.poster__title, .home-top .home-rec .home-rec__title { font-family: var(--font-display); font-size: clamp(30px, 2.6vw, 52px); line-height: 1.08; font-weight: var(--weight-regular); letter-spacing: var(--tracking-display); }
.home-top .home-rec .home-rec__title { color: var(--color-text); text-decoration: none; margin-top: var(--space-4); }
.poster__title { margin-top: var(--space-4); }
.poster__byline { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-4); }
.poster__byline p { margin: 0; }
.poster__expert { font-size: clamp(var(--text-md), 1.25vw, 22px); font-weight: var(--weight-medium); color: #fff; }
.poster__count { font-size: var(--text-sm); color: rgba(255,255,255,0.75); }
.home-top .home-rec .home-rec__meta { margin-top: var(--space-3); font-size: clamp(15px, 1.05vw, 18px); color: var(--color-text-secondary); font-weight: var(--weight-medium); }
.home-top .home-rec .home-rec__about { margin-top: var(--space-4); font-size: clamp(15px, 1vw, 17px); -webkit-line-clamp: 2; }
.home-top .home-rec .home-rec__words { padding: var(--space-8) var(--space-6); gap: 0; }
@media (min-width: 861px) {
  .poster__copy { padding: var(--space-8); }
}
@media (max-width: 860px) {
  .home-top .home-rec .home-rec__words { padding: var(--space-6) var(--space-5); }
}

/* More like this: three cards in one row, the picture on top, the title,
   the expert, the length; the column's own width. The player keeps the end
   screen's light behind it, so no dark band shows past its foot. */
.player-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.player-more__card { display: flex; flex-direction: column; gap: var(--space-1); color: var(--color-text); text-decoration: none; }
.player-more__picture { display: block; aspect-ratio: 4 / 3; margin-bottom: var(--space-2); border-radius: var(--radius-nested, 12px); overflow: hidden; background: var(--color-surface-muted); }
.player-more__picture img { width: 100%; height: 100%; object-fit: cover; }
.player-more__title { font-weight: var(--weight-medium); line-height: 1.3; }
.player-more__card:hover .player-more__title { text-decoration: underline; text-underline-offset: 3px; }
.player-more__meta { font-size: var(--text-sm); color: var(--color-text-muted); }
@media (max-width: 600px) {
  .player-more { gap: var(--space-3); }
  .player-more__title { font-size: var(--text-sm); }
  .player-more__meta { font-size: var(--text-xs); }
}
.player.is-summary { background: var(--color-bg); }
.player__summary { overscroll-behavior: contain; }

/* A lesson's page: its course's lessons, this one marked. */
.part-of__where { margin: 0 0 var(--space-4); }
.part-of .lesson-row.is-current { background: var(--color-surface-muted); }
.part-of .lesson-row.is-current .list__title { font-weight: var(--weight-medium); }

/* Human coaching: the portrait to the card's top, left and right edges, as
   Home's cards; the words and the action row inside the card's padding. */
.coaching .coach-card { padding: 0; overflow: hidden; }
.coaching .coach-card__photo { border-radius: 0; margin-bottom: var(--space-5); max-height: none; }
.coaching .coach-card__text { padding: 0 var(--space-6) var(--space-6); }

/* Buttons keep a sensible width whatever their label (Done, Skip). */
.button { min-width: 120px; }
.button--small { min-width: 96px; }

/* The plans: the offer beside its price on wide screens (stacked on
   phones); the trial's line across the whole box; the controls (the
   Annual/Monthly switch, the saving) on the neutral grey, as the design
   system sets controls, the panels on the warm white. */
.paywall__offer { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; }
.paywall__offer-main, .paywall__offer-price { display: flex; flex-direction: column; gap: var(--space-2); }
.paywall__offer-price { align-items: flex-start; }
@media (min-width: 861px) {
  .paywall__offer { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--space-6); }
  .paywall__offer-price { align-items: flex-end; text-align: right; padding-bottom: 6px; }
}
.paywall__toggle, .paywall__saving { background: var(--color-control); }
.paywall__period[aria-current] { background: var(--color-surface); }
@media (min-width: 861px) {
  .paywall__stops { position: relative; }
  .paywall__stops::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 1px; background: var(--color-text-subtle); }
  .paywall__stops li:not(:last-child)::after { display: none; }
  .paywall__marker { z-index: 1; }
}
.part-of .lesson-row.is-current { background: var(--color-control-selected); }

/* The quick check-in with a little more air, the same above and below. */
.checkin-dialog__body:has(> .checkin-step[data-ci-step="feel"]:not([hidden])) { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.checkin-step[data-ci-step="feel"] .checkin-feel__word { margin-bottom: var(--space-5); }
.checkin-step[data-ci-step="feel"] .checkin-hint { margin-top: var(--space-4); }
.checkin-step[data-ci-step="feel"] .checkin-kept { margin-top: var(--space-6); }
.checkin-step[data-ci-step="feel"] .checkin-actions--end { margin-bottom: calc(var(--space-8) * -1); }

/* Lesson rows: the mark or number, the picture and the words centred on one line. */
.lesson-row { align-items: center; }
.lesson-row .lesson-row__number, .lesson-row .lesson-row__done { align-self: center; }

/* The end of a session: room under More like this. */
.player-next { padding-bottom: var(--space-16); }

/* Human coaching: lower portraits, close to square, still to the edges. */
.coaching .coach-card__photo { aspect-ratio: 6 / 5; }

/* Our terms have changed: its links at the line's own size. */
.terms__lede .text-link { font-size: inherit; }

/* Home's large cards: the new course's title the larger, Recommended's
   smaller but clearly read; With <name> close under the title; the new
   course's portrait further right, clear of the words. */
.poster__title { font-size: clamp(34px, 2.9vw, 58px); }
.home-top .home-rec .home-rec__title { font-size: clamp(24px, 1.8vw, 34px); line-height: 1.15; }
.poster__byline { margin-top: var(--space-2); }
.home-top .home-rec .home-rec__meta { margin-top: var(--space-2); }
.home-top .home-rec .home-rec__label { margin: 0; }
@media (min-width: 861px) {
  .poster--new .poster__media { left: 44%; }
  .poster--new .poster__shade { background: linear-gradient(90deg, #15110f 0%, #15110f 44%, rgba(21,17,15,0.7) 56%, rgba(21,17,15,0) 74%); }
  .poster--new .poster__copy { width: 52%; }
}

/* A course's own top: the picture across the column with the title over
   it, then its line, words, progress and the way on. A lesson's page keeps
   two columns, with where it sits above its title. */
.course-hero { position: relative; display: flex; align-items: flex-end; min-height: 360px; border-radius: var(--radius); overflow: hidden; background: #1f1a17; color: #fff; isolation: isolate; }
.course-hero__picture { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.course-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.65) 100%); }
.course-hero__words { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-8); }
.course-hero__words .eyebrow { color: rgba(255,255,255,0.85); }
.course-hero__title { margin: 0; font-family: var(--font-display); font-size: clamp(36px, 3.2vw, 60px); line-height: 1.08; font-weight: var(--weight-regular); letter-spacing: var(--tracking-display); }
.course-hero__below { display: flex; flex-direction: column; gap: var(--space-4); max-width: 720px; margin: var(--space-6) 0 var(--space-10); }
.course-hero__meta { margin: 0; }
.course-hero__text { margin: 0; }
.lesson-of { margin: 0 0 var(--space-2); }
.lesson-of a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .course-hero { min-height: 280px; }
  .course-hero__words { padding: var(--space-5); }
}
.coaching .coach-card__photo img { position: absolute; inset: 0; left: 0; width: 100%; height: 100%; max-width: none; transform: none; object-fit: cover; object-position: calc(var(--face-x, 0.5) * 100%) 25%; }

/* Plans: the offer as one block, read top down; the trial's squares at the
   start, middle and end of one line, each step's words aligned to its
   square. */
.paywall__offer, .paywall .paywall__offer { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.paywall__offer .paywall__saving { margin-top: var(--space-2); }
@media (min-width: 861px) {
  .paywall__stops li { padding-top: 26px; }
  .paywall__stops li:nth-child(2) { text-align: center; align-items: center; }
  .paywall__stops li:nth-child(2) .paywall__marker { left: 50%; transform: translateX(-50%); }
  .paywall__stops li:nth-child(3) { text-align: right; align-items: flex-end; }
  .paywall__stops li:nth-child(3) .paywall__marker { left: auto; right: 0; }
}

/* The quick check-in, kept: no box; the check, Kept for today and the
   light points centred under the slider, the check on the words' line. */
.checkin-step[data-ci-step="feel"] .checkin-kept > .completion { flex-direction: column; align-items: center; gap: var(--space-2); padding: 0; background: none; border-radius: 0; text-align: center; }
.checkin-step[data-ci-step="feel"] .checkin-kept .completion__mark { width: 36px; height: 36px; margin: 0; }
.checkin-step[data-ci-step="feel"] .checkin-kept .completion__mark svg { width: 18px; height: 18px; }
.checkin-step[data-ci-step="feel"] .checkin-kept .completion__words { align-items: center; gap: 2px; }
.checkin-step[data-ci-step="feel"] .checkin-kept .completion__title { font-size: var(--text-base); line-height: 1.4; font-weight: var(--weight-medium); }
.checkin-step[data-ci-step="feel"] .checkin-kept .completion__light { margin: 0; font-size: var(--text-sm); }

/* Home's large cards: a smaller badge; Recommended's words under its title
   smaller, up to three lines of description while the card is narrow;
   "With" lighter than the name; one gap from title to byline on all three
   cards; the other suggestion inside the card, beside its button. */
.home-badge { height: 22px; padding: 0 10px; font-size: 11px; letter-spacing: 0.1em; }
.byline__with { font-weight: var(--weight-regular); opacity: 0.72; }
.byline__name { font-weight: var(--weight-medium); }
.poster__byline, .home-top .home-rec .home-rec__meta { margin-top: var(--space-3); }
.home-top .home-rec .home-rec__meta { font-size: var(--text-sm); }
.home-top .home-rec .home-rec__about { font-size: var(--text-sm); line-height: 1.5; }
.home-top .home-rec .home-rec__card { container-type: inline-size; }
@container (max-width: 760px) {
  .home-top .home-rec .home-rec__about { -webkit-line-clamp: 3; }
}
.home-rec__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: auto; padding-top: var(--space-4); position: relative; z-index: 1; }
.home-rec__foot .ci-suggest__actions { display: flex; gap: var(--space-3); margin: 0; }
.home-rec__foot .ci-suggest__actions:not(:has(> :not([hidden]))) { display: none; }

/* A lesson's page: the picture as tall as its words, nothing above the
   eyebrow; the lessons' numbers centred as the checks are. */
.session-hero { align-items: stretch; }
.session-hero__media { align-self: stretch; }
.session-hero__media img { height: 100%; object-fit: cover; }
.lesson-row .lesson-row__number { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; text-align: center; }

/* A course's page: room under the banner. */
.course-hero__below { gap: var(--space-5); margin-top: var(--space-8); margin-bottom: var(--space-12); }

/* The terms: one flow; smaller screens lighter. */
.terms__foot { gap: var(--space-4); }
.terms__foot .terms__small { margin: 0; }
@media (max-width: 860px) {
  .auth .auth__picture { max-height: 180px; }
  .terms { gap: var(--space-5); }
}

/* The Guide's ask for health data, as the mobile app's: a switch for each
   consent, Allow, Not now, and where to change it later. */
.guide-data { display: flex; flex-direction: column; gap: var(--space-4); }
.guide-data__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--color-line); }
.guide-data__words { display: flex; flex-direction: column; gap: 2px; }
.guide-data__words p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.guide-data__row .switch:disabled { opacity: 0.45; }
.guide-data__actions { display: flex; align-items: center; gap: var(--space-4); }
.guide-data__settings { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.guide-data__settings .text-link { font-size: inherit; }
/* A lesson's picture as tall as its words column, no taller. */
@media (min-width: 861px) {
  .session-hero__media { position: relative; aspect-ratio: auto; min-height: 320px; }
  .session-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}

.part-of__end { margin: var(--space-8) 0; }

/* Home's large cards. The title and its byline are one group: the byline
   8px under the title (closer than anything else on the card), so the eye
   takes them together; the next thing (the description, or the button) is
   at least twice as far. Recommended: title, byline (14px, the name in
   medium) and description (16px, muted) each a distinct step. The other
   suggestion sits on the picture's bottom right corner. */
.poster__title { margin-bottom: 0; }
.poster__byline, .home-top .home-rec .home-rec__meta { margin-top: var(--space-2); }
.home-top .home-rec .home-rec__title { line-height: 1.12; }
.home-top .home-rec .home-rec__meta { font-size: var(--text-base); color: var(--color-text-secondary); }
.home-top .home-rec .home-rec__about { margin-top: var(--space-5); font-size: var(--text-md); line-height: 1.5; color: var(--color-text-muted); }
.home-top .home-rec .home-rec__picture { position: relative; }
.home-rec__picture .ci-suggest__actions { position: absolute; right: var(--space-4); bottom: var(--space-4); z-index: 2; display: flex; gap: var(--space-2); margin: 0; }
.home-rec__picture .ci-suggest__actions:not(:has(> :not([hidden]))) { display: none; }
.home-rec__picture .ci-suggest__action { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-pill); background: rgba(255,255,255,0.92); color: var(--color-text); font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; backdrop-filter: blur(6px); }
.home-rec__picture .ci-suggest__action:hover { background: #fff; }

/* The terms: balanced lines, no single word alone on a last line. */
.terms__title, .terms__lede, .terms__small, .terms__updates span { text-wrap: balance; }

/* The plans' headline: the offer written over the picture, on its shade. */
.paywall__headline--over { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }
.paywall__headline--over .paywall__picture { margin: 0; aspect-ratio: 16 / 8; border-radius: 0; }
.paywall__over-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,0.65) 100%); }
.paywall__headline--over .paywall__offer { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-6); color: #fff; }
.paywall__headline--over .paywall__display, .paywall__headline--over .paywall__then { color: #fff; }
.paywall__headline--over .paywall__saving { background: rgba(255,255,255,0.92); color: var(--color-text); }

/* How your trial works, as a schedule: a row per day between hairlines,
   its square on one line down the left (today's filled), the day in the
   display type, then the step's ideas one per line; the day above them on
   phones. */
.paywall .paywall__timeline { gap: var(--space-2); padding: var(--space-6) var(--space-6) var(--space-3); }
.paywall .paywall__timeline .paywall__stops { position: relative; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
.paywall .paywall__timeline .paywall__stops::before { content: ""; display: block; position: absolute; top: 30px; bottom: 30px; left: 5px; right: auto; width: 1px; height: auto; background: var(--color-text-subtle); }
.paywall .paywall__timeline .paywall__stops li { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: var(--space-5); align-items: baseline; padding: var(--space-4) 0 var(--space-4) 30px; text-align: left; }
.paywall .paywall__timeline .paywall__stops li + li { border-top: 1px solid var(--color-line); }
.paywall .paywall__timeline .paywall__stops li::after { display: none; }
.paywall .paywall__timeline .paywall__marker { position: absolute; top: calc(var(--space-4) + 8px); left: 0; right: auto; transform: none; z-index: 1; width: 11px; height: 11px; }
.paywall__step-day { font-family: var(--font-display); font-size: 20px; line-height: 1.25; font-weight: var(--weight-regular); color: var(--color-text); }
.paywall__step-lines { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 15px; line-height: 1.5; color: var(--color-text-secondary); }
@media (max-width: 600px) {
  .paywall .paywall__timeline .paywall__stops li { grid-template-columns: 1fr; row-gap: var(--space-1); }
  .paywall__headline--over .paywall__picture { aspect-ratio: 4 / 3.4; }
  .paywall__headline--over .paywall__offer { padding: var(--space-5); }
}

/* Home's Recommended: byline and description scale down with the title,
   always clearly below it; the other suggestion a small, quiet chip. */
.home-top .home-rec .home-rec__meta { font-size: clamp(13px, 0.95vw, var(--text-base)); }
.home-top .home-rec .home-rec__about { font-size: clamp(var(--text-base), 1.05vw, var(--text-md)); }
@media (max-width: 860px) {
  .home-top .home-rec .home-rec__title { font-size: 24px; }
  .home-top .home-rec .home-rec__meta { font-size: 13px; }
  .home-top .home-rec .home-rec__about { font-size: var(--text-base); margin-top: var(--space-3); }
}
.home-rec__picture .ci-suggest__actions { right: var(--space-3); bottom: var(--space-3); gap: var(--space-1); }
.home-rec__picture .ci-suggest__action { height: 26px; padding: 0 9px; gap: var(--space-1); background: rgba(0,0,0,0.35); color: rgba(255,255,255,0.92); font-size: 12px; font-weight: var(--weight-regular); backdrop-filter: blur(4px); }
.home-rec__picture .ci-suggest__action svg { width: 12px; height: 12px; }
.home-rec__picture .ci-suggest__action:hover { background: rgba(0,0,0,0.5); color: #fff; }

/* The terms: each document's name kept on one line. */
.terms__small a { white-space: nowrap; }

/* The Guide with AI off: a tapped prompt points to the ask at the foot. */
@keyframes guide-calling { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 40% { box-shadow: inset 0 0 0 2px var(--color-text); } }
.guide__ai-off.is-calling { animation: guide-calling 900ms var(--ease-out, ease-out) 1; }

/* The Use AI in Endor? sheet with room, its buttons in the foot bar as the
   other dialogs have them. */
.ai-sheet .checkin-dialog__body { display: flex; flex-direction: column; gap: var(--space-5); padding-top: var(--space-6); padding-bottom: 0; }
.ai-sheet .ai-sheet__text { display: flex; flex-direction: column; gap: var(--space-3); }
.ai-sheet .ai-sheet__text p { margin: 0; }
.ai-sheet .checkin-step__title { margin: 0; }
.ai-sheet .checkin-actions { position: sticky; bottom: 0; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; margin: var(--space-2) calc(var(--space-8) * -1) 0; padding: var(--space-4) var(--space-8) var(--space-5); border-top: 1px solid var(--color-line); background: var(--color-surface); }
@media (max-width: 860px) {
  .ai-sheet .checkin-actions { margin-left: calc(var(--space-6) * -1); margin-right: calc(var(--space-6) * -1); padding-left: var(--space-6); padding-right: var(--space-6); }
}
.paywall .paywall__timeline .paywall__stops li .paywall__marker { left: 0; right: auto; transform: none; }
.paywall .paywall__timeline .paywall__stops li .paywall__step-day { font-family: var(--font-display); font-size: 20px; line-height: 1.25; font-weight: var(--weight-regular); }
.paywall .paywall__timeline .paywall__stops li .paywall__step-lines { margin: 0; align-items: flex-start; text-align: left; }
.paywall .paywall__timeline .paywall__stops::before { display: none; }
.paywall .paywall__timeline .paywall__stops li:not(:last-child)::after { content: ""; display: block; position: absolute; left: 5px; right: auto; top: calc(var(--space-4) + 19px); bottom: calc(-1 * (var(--space-4) + 8px)); width: 1px; height: auto; background: var(--color-text-subtle); }
.paywall .paywall__timeline .paywall__step-line { text-wrap: balance; }
@media (min-width: 601px) and (max-width: 860px) { .poster { aspect-ratio: 16 / 11; } }

/* Home: Recommended one step quieter than the new course beside it, a
   narrower column and smaller type, at the row's full height. */
@media (min-width: 861px) {
  .home-top__pair:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; }
  .home-top__pair > .home-top__rec, .home-top__pair > .home-top__rec .home-rec { height: 100%; }
  .home-top__pair:has(> :nth-child(2)) .home-rec__card { height: 100%; }
  .home-top .home-rec .home-rec__words { padding: var(--space-6) var(--space-5); }
}
.home-top .home-rec .home-rec__title { font-size: clamp(21px, 1.5vw, 28px); }
.home-top .home-rec .home-rec__meta { font-size: 13px; }
.home-top .home-rec .home-rec__about { margin-top: var(--space-3); font-size: var(--text-base); line-height: 1.5; }
@media (max-width: 860px) {
  .home-top .home-rec .home-rec__picture { aspect-ratio: 2 / 1; }
  .home-top .home-rec .home-rec__title { font-size: 21px; }
  .home-top .home-rec .home-rec__about { font-size: 13px; -webkit-line-clamp: 2; }
}

/* The new course on phones and tablets: the portrait at the right, as on
   wide screens, so a 4:5 headshot keeps the whole head instead of a strip
   across the eyes; the card shorter. */
@media (max-width: 860px) {
  .poster--new, .home-top__pair .poster--new { aspect-ratio: auto; min-height: 340px; align-items: stretch; }
  .poster--new .poster__media { left: 56%; bottom: 0; }
  .poster--new .poster__media img { object-position: 50% 15%; }
  .poster--new .poster__shade { background: linear-gradient(90deg, #15110f 0%, #15110f 56%, rgba(21,17,15,0.55) 64%, rgba(21,17,15,0) 78%); }
  .poster--new .poster__copy { width: 60%; justify-content: flex-end; }
}
@media (max-width: 600px) {
  .poster--new, .home-top__pair .poster--new { min-height: 300px; }
  .poster--new .poster__media { left: 42%; }
  .poster--new .poster__shade { background: linear-gradient(90deg, #15110f 0%, #15110f 42%, rgba(21,17,15,0.6) 54%, rgba(21,17,15,0) 72%); }
  .poster--new .poster__copy { width: 66%; }
  .poster--new .poster__title { font-size: 26px; }
}

/* Plans, How your trial works: the days in the body face, lighter; each
   step on one line, so every row is the same height; the line down the
   squares alone, no hairlines across it. */
.paywall .paywall__timeline .paywall__stops li + li { border-top: 0; }
.paywall .paywall__timeline .paywall__stops li { grid-template-columns: 120px minmax(0, 1fr); padding: var(--space-3) 0 var(--space-3) 30px; }
.paywall .paywall__timeline .paywall__stops li .paywall__step-day { font-family: var(--font-body); font-size: 15px; line-height: 22px; font-weight: var(--weight-medium); color: var(--color-text); letter-spacing: 0; }
.paywall .paywall__timeline .paywall__stops li .paywall__step-lines { font-size: 15px; line-height: 22px; }
.paywall .paywall__timeline .paywall__step-line { white-space: nowrap; text-wrap: nowrap; }
.paywall .paywall__timeline .paywall__marker,
.paywall .paywall__timeline .paywall__stops li .paywall__marker { top: calc(var(--space-3) + 5.5px); }
.paywall .paywall__timeline .paywall__stops li:not(:last-child)::after { top: calc(var(--space-3) + 16.5px); bottom: calc(-1 * (var(--space-3) + 5.5px)); }
@media (max-width: 600px) {
  .paywall .paywall__timeline .paywall__stops li { grid-template-columns: 1fr; row-gap: 2px; }
  .paywall .paywall__timeline .paywall__stops li .paywall__step-lines { font-size: var(--text-base); line-height: 20px; }
  .paywall .paywall__timeline .paywall__step-line { white-space: normal; text-wrap: balance; }
}
@media (max-width: 600px) {
  .paywall .paywall__timeline { padding-left: var(--space-5); padding-right: var(--space-4); }
  .paywall .paywall__timeline .paywall__stops li { padding-left: var(--space-6); }
}

/* A lesson's Up next: a quiet Start at the row's end, beside the row's own
   link to the lesson. */
.part-of__row { display: flex; align-items: center; gap: var(--space-4); }
.part-of__row > .lesson-row { flex: 1 1 auto; min-width: 0; }
.part-of__start { flex: 0 0 auto; }

/* The terms' agreement line: By continuing you agree to our on a line of
   its own, the documents on the second, wherever the second fits whole
   (about 380px at this size); narrower, it runs on as one sentence. */
.terms__foot { container-type: inline-size; }
@container (min-width: 400px) {
  .terms__lead { display: block; }
}

/* One footer for every modal's buttons, the check-in's: a bar at the foot,
   a hairline above it, kept in view while the sheet scrolls; the main
   action at the right, the other actions as text links to its left, a
   step back, reset or remove alone at the far left. */
.ai-sheet .checkin-actions,
.guarantee-sheet .checkin-actions,
.plan-leave .checkin-actions,
.plan-goals .checkin-actions,
.plan-sheet .plan-sheet__actions,
.arrange-sheet .arrange-sheet__actions,
.note-dialog .note-dialog__actions {
  position: sticky; bottom: 0; z-index: 1;
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center;
  gap: var(--space-2) var(--space-6);
  margin: var(--space-6) calc(var(--space-8) * -1) -28px;
  padding: var(--space-4) var(--space-8) var(--space-5);
  border-top: 1px solid var(--color-line); background: var(--color-surface);
}
.ai-sheet .checkin-actions[hidden], .plan-sheet .plan-sheet__actions[hidden], .note-dialog .note-dialog__actions[hidden] { display: none; }
:is(.ai-sheet, .guarantee-sheet, .plan-leave, .plan-goals) .checkin-actions > .button--main,
.plan-sheet .plan-sheet__actions > .button--main,
.arrange-sheet .arrange-sheet__actions > .button--main,
.note-dialog .note-dialog__actions > .button--main {
  order: 2; flex: 0 0 auto; width: auto; min-width: 148px; min-height: 48px; margin: 0; padding: 0 var(--space-6); justify-content: center;
}
:is(.ai-sheet, .guarantee-sheet, .plan-leave, .plan-goals) .checkin-actions > .text-link,
.plan-sheet .plan-sheet__actions > .text-link,
.arrange-sheet .arrange-sheet__actions > .text-link,
.note-dialog .note-dialog__actions > .text-link {
  order: 1; display: inline-flex; align-items: center; min-height: 48px; margin: 0;
}
.plan-sheet .plan-sheet__actions > .plan-sheet__remove,
.arrange-sheet .arrange-sheet__actions > [data-arrange-reset] { order: 0; margin-right: auto; }
.ai-sheet .checkin-dialog__body { padding-bottom: 28px; }
@media (max-width: 520px) {
  .ai-sheet .checkin-actions,
  .guarantee-sheet .checkin-actions,
  .plan-leave .checkin-actions,
  .plan-goals .checkin-actions,
  .plan-sheet .plan-sheet__actions,
  .arrange-sheet .arrange-sheet__actions,
  .note-dialog .note-dialog__actions {
    gap: var(--space-2) var(--space-4);
    margin: var(--space-5) calc(var(--space-6) * -1) calc(var(--space-6) * -1);
    padding: var(--space-4) var(--space-6) var(--space-5);
  }
  .ai-sheet .checkin-dialog__body { padding-bottom: var(--space-6); }
  :is(.ai-sheet, .guarantee-sheet, .plan-leave, .plan-goals) .checkin-actions > .button--main,
  .plan-sheet .plan-sheet__actions > .button--main,
  .arrange-sheet .arrange-sheet__actions > .button--main,
  .note-dialog .note-dialog__actions > .button--main { min-width: 0; padding: 0 var(--space-5); }
}
@media (max-width: 600px) {
  .part-of__row { gap: var(--space-3); }
  .part-of__start { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .part-of__start .part-of__start-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* The new course on phones and tablets: its words at the top, the button
   at the foot, as on wide screens. */
@media (max-width: 860px) {
  .poster--new .poster__copy { justify-content: flex-start; }
  .poster--new .poster__action { margin-top: auto; padding-top: var(--space-4); }
}
/* Up next's Start, inside the card's inner spacing like the row's own
   content on the left. */
.part-of__row { padding-right: var(--space-4); }
.part-of__row > .lesson-row { padding-right: 0; }

/* Home's large cards side by side: equal halves with the same inner
   padding; the difference is in the content. Titles at
   (the course card 56px on desktops, 43px on tablets, 32px on phones),
   Recommended one step below it, descriptions well under both. */
@media (min-width: 861px) {
  .home-top__pair:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .home-top__pair:has(> :nth-child(2)) .poster__copy,
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__words { padding: var(--space-8); }
}
.poster--new .poster__title { font-size: clamp(40px, 3.6vw, 56px); line-height: 1.06; }
.home-top .home-rec .home-rec__title { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.1; }
.home-top .home-rec .home-rec__about { font-size: 15px; line-height: 1.5; }
@media (max-width: 860px) {
  .poster--new .poster__title { font-size: var(--text-3xl); }
  .home-top .home-rec .home-rec__title { font-size: var(--text-2xl); }
}
@media (max-width: 600px) {
  .poster--new .poster__title { font-size: var(--text-2xl); }
  .home-top .home-rec .home-rec__title { font-size: 26px; }
  .home-top .home-rec .home-rec__about { font-size: var(--text-base); }
}

/* Side by side from 1024px; narrower, the two cards stack as on tablets.
   From 1280px Recommended keeps its picture beside the words. */
@media (min-width: 861px) and (max-width: 1023px) {
  .home-top__pair:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1280px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__card { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

/* Another suggestion and Undo on Recommended's picture: small, on one line,
   8px apart; Undo a round icon chip (its name in the tooltip and for screen
   readers), so both fit the narrowest picture. While it looks, the chip
   says Finding another... with a turning ring in place of its icon. */
.home-rec__picture .ci-suggest__actions { flex-wrap: nowrap; gap: var(--space-2); }
.home-rec__picture .ci-suggest__action { white-space: nowrap; flex: 0 0 auto; }
.home-rec__picture .ci-suggest__action--undo { width: 26px; padding: 0; justify-content: center; }
.home-rec__picture .ci-suggest__action--undo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ci-suggest__action.is-busy { cursor: progress; }
.ci-suggest__action.is-busy svg { visibility: hidden; position: relative; }
.ci-suggest__action.is-busy::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-right: -14px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: suggest-turn 0.8s linear infinite; }
.ci-suggest__action:disabled { opacity: 1; }
@keyframes suggest-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ci-suggest__action.is-busy::before { animation-duration: 2.4s; } }
@media (min-width: 1280px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__card { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }
}

/* The check-in in a page head (How are you today? on Home, Check in on My
   Twin): on wide screens it spans the title and the line under it and sits
   on their bottom edge; on phones it takes its own line under them, so
   neither is squeezed. The small text actions keep the baseline. */
@media (min-width: 641px) {
  .main[data-page] .page-head:has(> :nth-child(2)) > :nth-child(2):is(.checkin-pill, .button, :has(> .checkin-pill, > .button)),
  .main[data-page] .home-welcome > :nth-child(2):is(.checkin-pill, .button, :has(> .checkin-pill, > .button)) { grid-row: 2 / 5; align-self: end; }
}
@media (max-width: 640px) {
  .main[data-page] .page-head:has(> :nth-child(2)) > :nth-child(2):is(.checkin-pill, .button, :has(> .checkin-pill, > .button)),
  .main[data-page] .home-welcome > :nth-child(2):is(.checkin-pill, .button, :has(> .checkin-pill, > .button)) { grid-row: 5; grid-column: 1 / -1; justify-self: start; align-self: start; margin-top: var(--space-4); }
  .main[data-page] .page-head:has(> :nth-child(2) :is(.checkin-pill, .button)) > div:first-child > :is(.page-title, .page-lede),
  .main[data-page] .page-head:has(> :nth-child(2):is(.checkin-pill, .button)) > div:first-child > :is(.page-title, .page-lede),
  .main[data-page] .home-welcome:has(> :nth-child(2):is(.checkin-pill, .button)) > div:first-child > :is(.page-title, .page-lede) { grid-column: 1 / -1; }
}

/* Up next: the whole row reacts as one, Start included; a 64px picture
   (the compact row's) and a title of two lines at most, so the words never
   run past the picture. */
.part-of__row { transition: background-color 120ms ease-out; }
.part-of__row:hover { background: var(--color-control-hover); }
.part-of__row > a.lesson-row:hover { background: transparent; }
.part-of__row .part-of__start { background: transparent; }
.part-of__row:hover .part-of__start { border-color: var(--color-line-strong); }
.part-of .lesson-row .step__thumb { width: 64px; height: 64px; }
.part-of .lesson-row .list__title { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.part-of .lesson-row .list__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Recommended keeps one height whatever the session: its title (two lines
   at most), byline (one) and description (three at most) sit in a block
   with room for their longest, the spare room under them, above Start.
   The sizes are set per width as --rec-t and --rec-a; beside the new
   course the description is 13px, well under both titles. */
.home-top .home-rec { --rec-t: 26px; --rec-a: 14px; }
@media (min-width: 601px) { .home-top .home-rec { --rec-t: 32px; --rec-a: 15px; } }
@media (min-width: 861px) {
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec { --rec-t: clamp(34px, 3vw, 48px); --rec-a: 16px; }
}
@media (min-width: 1024px) { .home-top__pair:has(> :nth-child(2)) .home-rec { --rec-t: 28px; --rec-a: 13px; } }
@media (min-width: 1280px) { .home-top__pair:has(> :nth-child(2)) .home-rec { --rec-t: clamp(30px, 2.6vw, 40px); } }
.home-top .home-rec .home-rec__text { display: flex; flex-direction: column; align-items: flex-start; min-height: calc(2 * 1.1 * var(--rec-t) + var(--space-2) + 20px + var(--space-3) + 3 * 1.5 * var(--rec-a)); }
.home-top .home-rec .home-rec__title { margin-top: 0; font-size: var(--rec-t); line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-top .home-rec .home-rec__meta { display: block; max-width: 100%; margin-top: var(--space-2); font-size: 13px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-top .home-rec .home-rec__about { margin-top: var(--space-3); font-size: var(--rec-a); line-height: 1.5; -webkit-line-clamp: 3; }
.home-top .home-rec .home-rec__label + .home-rec__text { margin-top: var(--space-3); }

/* 1024 to 1279px, side by side: Recommended's picture on top, its words
   under it, so the words keep the card's width. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__picture { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 9; min-height: 0; height: auto; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__words { grid-column: 1; grid-row: 2; padding: var(--space-6) var(--space-6) var(--space-6); }
}

/* Recommended alone, the same card as beside the new course at the full
   width: the words in a column of about 5/12 with larger type, the picture
   filling the rest, Start right under the words. */
@media (min-width: 861px) {
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec__card { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 0; }
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec__picture { min-height: 320px; }
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec__words { padding: var(--space-8) var(--space-8) var(--space-8) clamp(var(--space-8), 3vw, var(--space-12)); }
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec__about { max-width: 44ch; }
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec__foot { margin-top: auto; padding-top: var(--space-6); }
}

/* Up next's Start stays white when the row is hovered. */
.part-of__row .part-of__start, .part-of__row:hover .part-of__start { background: var(--color-surface, #fff); }

/* Recommended's title and With line in the new course card's type at every
   width and in every layout (side by side, picture on top, alone): the
   title 32px on phones, 43px on tablets, clamp(40px, 3.6vw, 56px) wider, at
   1.06; the With line clamp(17px, 1.25vw, 22px) at 1.5, the name medium.
   The description 14px. The block keeps room for the longest of each. */
.home-top .home-rec,
.home-top__pair:not(:has(> :nth-child(2))) .home-rec,
.home-top__pair:has(> :nth-child(2)) .home-rec { --rec-t: 32px; --rec-a: 14px; --rec-m: clamp(17px, 1.25vw, 22px); }
@media (min-width: 601px) {
  .home-top .home-rec,
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec,
  .home-top__pair:has(> :nth-child(2)) .home-rec { --rec-t: 43px; }
}
@media (min-width: 861px) {
  .home-top .home-rec,
  .home-top__pair:not(:has(> :nth-child(2))) .home-rec,
  .home-top__pair:has(> :nth-child(2)) .home-rec { --rec-t: clamp(40px, 3.6vw, 56px); }
}
.home-top .home-rec .home-rec__title { line-height: 1.06; }
.home-top .home-rec .home-rec__meta { font-size: var(--rec-m); line-height: 1.5; font-weight: var(--weight-medium); }
.home-top .home-rec .home-rec__meta .byline__with { font-weight: var(--weight-regular); }
.home-top .home-rec .home-rec__about { font-size: var(--text-base); }
.home-top .home-rec .home-rec__text { min-height: calc(2 * 1.06 * var(--rec-t) + var(--space-2) + 1.5 * var(--rec-m) + var(--space-3) + 3 * 1.5 * 14px); }

/* Another suggestion and Undo on Start's row (1024 to 1279px, app.js
   placeSuggestActions): at the row's right, quiet outlined chips on the
   card's beige; icons alone where the row is too narrow for their words. */
.home-rec__foot { align-self: stretch; flex-wrap: nowrap; container-type: inline-size; }
.home-rec__foot .ci-suggest__actions { display: flex; flex-wrap: nowrap; gap: var(--space-2); margin: 0 0 0 auto; }
.home-rec__foot .ci-suggest__actions:not(:has(> :not([hidden]))) { display: none; }
.home-rec__foot .ci-suggest__action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: transparent; color: var(--color-text); font-size: 13px; font-weight: var(--weight-regular); white-space: nowrap; cursor: pointer; }
.home-rec__foot .ci-suggest__action:hover { border-color: var(--color-line-strong); }
.home-rec__foot .ci-suggest__action svg { width: 14px; height: 14px; }
.home-rec__foot .ci-suggest__action--undo { width: 32px; padding: 0; }
.home-rec__foot .ci-suggest__action--undo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@container (max-width: 339px) {
  .home-rec__foot .ci-suggest__action { width: 32px; padding: 0; }
  .home-rec__foot .ci-suggest__action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Home's big cards as one family: every poster title (the new course, A
   course for you) and Recommended's in the medium weight, A
   course for you at the new course's sizes; Recommended's With line 15px,
   under the new course's (there the expert is part of what's promoted). */
.poster__title, .home-top .home-rec .home-rec__title { font-weight: var(--weight-medium); }
.poster--course .poster__title { font-size: clamp(40px, 3.6vw, 56px); line-height: 1.06; }
@media (max-width: 860px) { .poster--course .poster__title { font-size: var(--text-3xl); } }
@media (max-width: 600px) { .poster--course .poster__title { font-size: var(--text-2xl); } }
.home-top .home-rec,
.home-top__pair:not(:has(> :nth-child(2))) .home-rec,
.home-top__pair:has(> :nth-child(2)) .home-rec { --rec-m: 15px; }

/* 1024 to 1279px: Another suggestion and Undo on Start's row as the same
   small chips as on the picture, at the right, their bottom on Start's. */
.home-rec__foot { align-items: flex-end; }
.home-rec__foot .ci-suggest__actions { align-self: flex-end; gap: var(--space-1); }
.home-rec__foot .ci-suggest__action { height: 26px; padding: 0 9px; gap: var(--space-1); border: 0; background: rgba(0,0,0,0.35); color: rgba(255,255,255,0.92); font-size: 12px; font-weight: var(--weight-regular); backdrop-filter: blur(4px); }
.home-rec__foot .ci-suggest__action:hover { border: 0; background: rgba(0,0,0,0.5); color: #fff; }
.home-rec__foot .ci-suggest__action svg { width: 12px; height: 12px; }
.home-rec__foot .ci-suggest__action--undo { width: 26px; padding: 0; }
@container (max-width: 339px) {
  .home-rec__foot .ci-suggest__action { width: 26px; padding: 0; }
}

/* 1024 to 1279px, on the card's light ground: Another suggestion and Undo
   as small quiet text links (icon and words, no pill, no ground) at the
   foot's right, their bottom on Start's; icons alone where the row is too
   narrow for the words (their names in the tooltip). On the picture they
   stay chips. */
.home-rec__foot .ci-suggest__actions { gap: var(--space-4); }
.home-rec__foot .ci-suggest__action,
.home-rec__foot .ci-suggest__action--undo { width: auto; height: auto; min-height: 20px; padding: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; color: var(--color-text-subtle); font-size: 12px; line-height: 20px; gap: var(--space-1); }
.home-rec__foot .ci-suggest__action:hover { background: none; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
.home-rec__foot .ci-suggest__action svg { width: 13px; height: 13px; }
.home-rec__foot .ci-suggest__action--undo span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
@container (max-width: 339px) {
  .home-rec__foot .ci-suggest__action, .home-rec__foot .ci-suggest__action--undo { width: 20px; justify-content: center; }
  .home-rec__foot .ci-suggest__action span, .home-rec__foot .ci-suggest__action--undo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Another suggestion and Undo live on Start's row in every layout (text
   links, their bottom on Start's). Words while they fit: Another
   suggestion alone keeps them down to a 290px row, with Undo beside it
   both turn to icons below 340px (names in the tooltip). */
@container (max-width: 339px) {
  .home-rec__foot .ci-suggest__action, .home-rec__foot .ci-suggest__action--undo { width: auto; }
  .home-rec__foot .ci-suggest__action span, .home-rec__foot .ci-suggest__action--undo span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .home-rec__foot .ci-suggest__actions:has(> .ci-suggest__action--undo:not([hidden])) .ci-suggest__action { width: 20px; justify-content: center; }
  .home-rec__foot .ci-suggest__actions:has(> .ci-suggest__action--undo:not([hidden])) .ci-suggest__action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@container (max-width: 289px) {
  .home-rec__foot .ci-suggest__action { width: 20px; justify-content: center; }
  .home-rec__foot .ci-suggest__action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Recommended on phones, shorter: a lower picture, the description two
   lines at most with room kept for two; the card still one height. */
@media (max-width: 600px) {
  .home-top .home-rec .home-rec__picture { aspect-ratio: 5 / 2; }
  .home-top .home-rec .home-rec__words { padding: var(--space-5); }
  .home-top .home-rec .home-rec__about { -webkit-line-clamp: 2; }
  .home-top .home-rec .home-rec__text { min-height: calc(2 * 1.06 * var(--rec-t) + var(--space-2) + 1.5 * var(--rec-m) + var(--space-3) + 2 * 1.5 * 14px); }
  .home-top .home-rec .home-rec__foot { padding-top: var(--space-4); }
}

/* Another suggestion on Start's row, in either form: while it looks, its
   arrows turn; when nothing came back, the note shows as words beside the
   icon for a moment (two short lines where the row is narrow). */
.home-rec .home-rec__foot .ci-suggest__actions .ci-suggest__action.is-busy::before { display: none; }
.home-rec .home-rec__foot .ci-suggest__actions .ci-suggest__action.is-busy svg { visibility: visible; animation: suggest-turn 0.9s linear infinite; }
.home-rec .home-rec__foot .ci-suggest__actions .ci-suggest__action.is-note { width: auto; max-width: 10em; justify-content: flex-end; text-align: right; cursor: default; }
.home-rec .home-rec__foot .ci-suggest__actions .ci-suggest__action.is-note span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; line-height: 16px; }
.home-rec .home-rec__foot .ci-suggest__actions .ci-suggest__action.is-note:hover { text-decoration: none; color: var(--color-text-subtle); }
@media (prefers-reduced-motion: reduce) { .home-rec .home-rec__foot .ci-suggest__actions .ci-suggest__action.is-busy svg { animation-duration: 2.4s; } }

/* A course for you: on wide screens nearer the new course's height; on
   phones and tablets its words at the top under a shade from the top, the
   button at the foot, as the new course. */
@media (min-width: 861px) {
  /* Never wider than 5:2: alone on a wide screen it grew to 3.4:1, a band
     too thin for any picture, a close-up face above all. */
  .poster--course { min-height: clamp(380px, 28vw, 460px); aspect-ratio: 5 / 2; }
}
@media (max-width: 860px) {
  .poster--course { align-items: stretch; }
  .poster--course .poster__copy { justify-content: flex-start; }
  .poster--course .poster__action { margin-top: auto; padding-top: var(--space-4); }
  .poster--course .poster__shade { background: linear-gradient(180deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.3) 100%); }
}

/* The three big cards: 20px from the eyebrow (or the New pill) to the
   title, on all of them at every width. */
.poster--new .poster__title, .poster--course .poster__title { margin-top: var(--space-2); }
.home-top .home-rec .home-rec__label + .home-rec__text { margin-top: var(--space-5); }

/* Recommended's words stay inside their column at every width: the block
   takes the column's width (a long word can no longer widen it and push
   the lines under the picture); the title steps down a size when its
   longest word is wider than the column (app.js fitRecTitle); the With line
   wraps, two lines at most, and keeps room for two. */
.home-top .home-rec .home-rec__words { min-width: 0; }
.home-top .home-rec .home-rec__text { align-items: stretch; width: 100%; min-width: 0; min-height: calc(2 * 1.06 * var(--rec-t) + var(--space-2) + 2 * 1.5 * var(--rec-m) + var(--space-3) + 3 * 1.5 * 14px); }
.home-top .home-rec .home-rec__title, .home-top .home-rec .home-rec__about { max-width: 100%; }
.home-top .home-rec .home-rec__meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; text-overflow: clip; }
.home-top .home-rec .home-rec__foot { min-width: 0; }
.home-top .home-rec .home-rec__foot > a { flex: 0 0 auto; }
.home-top .home-rec .home-rec__foot .ci-suggest__actions { flex: 0 0 auto; }

/* Phones: each big card at least square; the new course and A course for
   you the same height; Recommended shows more of its picture. */
@media (max-width: 600px) {
  .poster--new, .home-top__pair .poster--new, .poster--course { aspect-ratio: 1 / 1; min-height: 0; }
  .home-top .home-rec .home-rec__picture { aspect-ratio: 16 / 9; }
  .home-top .home-rec .home-rec__text { min-height: calc(2 * 1.06 * var(--rec-t) + var(--space-2) + 2 * 1.5 * var(--rec-m) + var(--space-3) + 2 * 1.5 * 14px); }
  .home-top .home-rec .home-rec__card { min-height: 354px; }
}
/* From 1280px, side by side: the words three fifths of Recommended, so Start
   and both links fit the row at its narrowest. */
@media (min-width: 1280px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__card { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

/* Side by side with Recommended's picture on top (1024 to 1279px): both
   cards shorter, a lower picture, the description two lines at most with
   room kept for two; the height still holds when the session changes. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__picture { aspect-ratio: 21 / 9; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__words { padding: var(--space-5) var(--space-6) var(--space-6); }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__about { -webkit-line-clamp: 2; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__text { min-height: calc(2 * 1.06 * var(--rec-t) + var(--space-2) + 2 * 1.5 * var(--rec-m) + var(--space-3) + 2 * 1.5 * 14px); }
}

/* Stacked (below 1024px) and on phones: Recommended's minimum is the new
   course card's (340px on tablets, 350px from 861px, square on phones), and
   it grows only when its words need the room; no room kept for the longest
   session, so a swap may change its height a little. */
@media (max-width: 1023px) {
  .home-top .home-rec .home-rec__text { min-height: 0; }
  .home-top .home-rec .home-rec__card { min-height: 350px; height: auto; }
}
@media (max-width: 860px) {
  .home-top .home-rec .home-rec__card { min-height: 340px; }
}
@media (max-width: 600px) {
  .home-top .home-rec .home-rec__text { min-height: 0; }
  .home-top .home-rec .home-rec__card { min-height: 0; aspect-ratio: 1 / 1; }
}

/* Notes fields, everywhere: one field, the design system's input (white,
   a hairline, --radius-input, the nested radius inside a card); the
   example in it plainly a placeholder, italic and lighter. */
textarea.checkin-field[data-note-example], textarea.textarea[data-note-example] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-line-strong);
  background: var(--color-surface);
  font: inherit;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
}
textarea[data-note-example]::placeholder { font-style: italic; color: var(--color-text-subtle); opacity: 0.75; }

/* My Twin's Your notes: room around the card's parts, 16px between the
   line, the field and Keep, and Keep at the field's right edge, as the
   field's own action and as every sheet's main action sits. */
.twin-moments__panel { padding: var(--space-6); }
.twin-moments__list:not(:empty) { margin-bottom: var(--space-5); }
.twin-moments__form { display: flex; flex-direction: column; gap: var(--space-4); }
.twin-moments__form .twin-moments__line { margin: 0; }
.twin-moments__form .checkin-error { margin: 0; }
.twin-moments__form > .cluster { justify-content: flex-end; margin: 0; }
@media (max-width: 600px) { .twin-moments__panel { padding: var(--space-5); } }

/* A course for you: the main action and See all N lessons side by side;
   under the poster, Inside the course as its grey foot, opening the
   lessons in place. */
.poster--course .poster__action { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.course-for-you { display: flex; flex-direction: column; }
.course-for-you > .poster--course { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.course-for-you > .sleep-lessons { overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); background: var(--color-neutral-grey); }
@media (max-width: 600px) {
  .course-for-you .sleep-feature__inside { padding: var(--space-4) var(--space-5); }
  .course-for-you .sleep-lessons__list { padding: 0 var(--space-5) var(--space-4); }
}

/* 1024 to 1279px, side by side with Recommended's picture on top: the row's
   height is Recommended's (the new course stretches to it), set by its
   picture and the room kept for its words. Lower: the picture 3:1, and room
   for one With line (the column fits any name on one at this width). */
@media (min-width: 1024px) and (max-width: 1279px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__picture { aspect-ratio: 3 / 1; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__text { min-height: calc(2 * 1.06 * var(--rec-t) + var(--space-2) + 1.5 * var(--rec-m) + var(--space-3) + 2 * 1.5 * 14px); }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__meta { -webkit-line-clamp: 1; }
}

/* From 860px down, the big cards keep the padding they have above it, and
   A course for you keeps in line with the new course: 340px on tablets
   (square on phones, as before). */
@media (max-width: 860px) {
  .poster--new .poster__copy, .poster--course .poster__copy, .home-top .home-rec .home-rec__words { padding: var(--space-8); }
  .poster--course { aspect-ratio: auto; min-height: 340px; }
}
@media (max-width: 600px) {
  .poster--course { aspect-ratio: 1 / 1; min-height: 0; }
  /* Recommended on phones shows more of its picture. */
  .home-top .home-rec .home-rec__picture { aspect-ratio: 4 / 3; }
}

/* A course for you's foot: a hairline at its top, so it reads as part of
   the card; See all N lessons on the right, just before the +. */
.course-for-you > .sleep-lessons { border-top: 1px solid var(--color-line); }
.sleep-feature__inside-end { display: inline-flex; align-items: center; gap: var(--space-4); }
.sleep-feature__inside-end a.card-link { color: var(--color-text-muted); }
.sleep-feature__inside-end a.card-link:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }

/* Phones: Recommended at least square through a minimum height (its width,
   the page less its 18px margins) rather than a fixed square, which pressed
   its picture into a strip; the picture keeps 4:3 and the card grows with
   it. The big cards' padding a step smaller on phones. */
@media (max-width: 600px) {
  .home-top .home-rec .home-rec__card { aspect-ratio: auto; min-height: calc(100vw - 36px); grid-template-rows: auto auto; }
  .home-top .home-rec .home-rec__picture { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
  .poster--new .poster__copy, .poster--course .poster__copy, .home-top .home-rec .home-rec__words { padding: var(--space-6); }
}

/* A course for you's foot: a hairline on its left, right and bottom,
   following the card's bottom corners, none at its top (the picture is
   right above); open, it runs around the list too. */
.course-for-you > .sleep-lessons { border: 1px solid var(--color-line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }

/* Phones: Recommended's picture 3:2, between the strip and 4:3. */
@media (max-width: 600px) {
  .home-top .home-rec .home-rec__picture { aspect-ratio: 3 / 2; }
}

/* 1024 to 1279px, side by side, picture on top: the card keeps its height
   (a 3:1 picture over room for the longest words), and the picture takes
   whatever the words leave, so no free space waits above Start; the words
   and Start stay at the foot. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .home-top__pair:has(> :nth-child(2)) .home-top__rec { container-type: inline-size; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__card {
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: calc(100cqw / 3 + var(--space-5) + 15px + var(--space-5) + 2 * 1.06 * var(--rec-t) + var(--space-2) + 1.5 * var(--rec-m) + var(--space-3) + 2 * 1.5 * 14px + var(--space-4) + var(--control-height) + var(--space-6));
  }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__picture { aspect-ratio: auto; height: 100%; min-height: 0; }
  .home-top__pair:has(> :nth-child(2)) .home-top__rec .home-rec__text { min-height: 0; }
}

/* Home's big cards: a very faint hairline around each whole card, drawn
   over its edge (so it never moves the layout), following its corners, so
   a light picture never melts into the page. A course for you: one line
   around the poster and its foot (and the open list), in place of the
   foot's own. */
.poster, .home-top .home-rec .home-rec__card, .course-for-you { position: relative; }
.poster::after, .home-top .home-rec .home-rec__card::after, .course-for-you::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border: 1px solid rgba(21, 17, 15, 0.08); border-radius: var(--radius); pointer-events: none;
}
.course-for-you > .poster--course::after { content: none; }
.course-for-you > .sleep-lessons { border: 0; }

/* The big course cards' titles: room for 24 characters a line, the new
   course's words over 60% of the card on wide screens; a title still too
   long steps down a size (app.js fitTitle). */
.poster--new .poster__title, .poster--course .poster__title { max-width: 24ch; }
@media (min-width: 861px) {
  .poster--new .poster__copy, .home-top__pair .poster--new .poster__copy { width: 60%; }
  /* Beside Recommended the card is half as wide: the words take 66%, over
     the photo's faded edge, so a long title keeps a larger size. */
  .home-top__pair:has(> :nth-child(2)) .poster--new .poster__copy { width: 66%; }
}

/* The quick check-in's note under Kept for today. */
.ci-kept-note { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; margin-top: var(--space-5); text-align: left; }
.ci-kept-note__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); }
.ci-kept-note__foot p { margin: 0; margin-right: auto; }

/* Experts: the search field with the inputs' measure (42px, the icon's
   room and a 12px end), the count on the grid's right edge, and from
   1280px four columns with slightly shorter portraits. */
.filterbar:has(#experts-search) .search-field { height: 42px; padding: 0 var(--space-3) 0 36px; background-position: 12px 50%; }
.filterbar:has(#experts-search) .discover-count { justify-self: end; text-align: right; margin-left: auto; }
@media (min-width: 1280px) {
  .grid.grid--three.experts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .experts-grid .card__media { aspect-ratio: 5 / 6; }
}

/* A started course's progress on Learn's cards and rows: a thin bar and
   3 of 14 done, small and quiet. */
.mini-progress { display: flex; align-items: center; gap: var(--space-2); width: 100%; margin-top: var(--space-2); }
.mini-progress__bar { position: relative; flex: 1 1 auto; max-width: 120px; height: 3px; border-radius: 2px; background: var(--color-line); overflow: hidden; }
.mini-progress__bar > span { position: absolute; inset: 0 auto 0 0; background: var(--color-text); border-radius: 2px; }
.mini-progress__text { font-size: var(--text-xs); color: var(--color-text-subtle); white-space: nowrap; }

/* Learn: a started course's progress on its picture, at the bottom left,
   over a soft shade: a thin bar and 3 of 14 done in white. The row under
   the words stays the cards' own (tags, lessons). */
.card__media, .list-row__picture { position: relative; }
.card__media .mini-progress, .list-row__picture .mini-progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; width: auto; margin: 0;
  padding: var(--space-6) var(--space-3) var(--space-2);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.card__media .mini-progress__bar, .list-row__picture .mini-progress__bar { max-width: 72px; background: rgba(255,255,255,0.35); }
.card__media .mini-progress__bar > span, .list-row__picture .mini-progress__bar > span { background: #fff; }
.card__media .mini-progress__text, .list-row__picture .mini-progress__text { color: #fff; font-size: 11px; }
.list-row__picture .mini-progress { padding: var(--space-4) var(--space-2) var(--space-1); flex-direction: column; align-items: flex-start; gap: 2px; }
.list-row__picture .mini-progress__bar { width: 100%; }

/* The quick check-in's note: the notes fields' text size, shown at once. */
.checkin-dialog .ci-kept-note { animation: none; }

/* Experts' search, as the header's: 35px, the search line and ground, its
   radius, and the magnifier 12px in. */
.filterbar:has(#experts-search) .search-field {
  height: 35px; padding: 0 var(--space-3) 0 36px; border: 1px solid var(--color-search-line); border-radius: var(--radius-search);
  background: var(--color-search-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' width='16' height='16' fill='%238a847d'%3E%3Cpath d='M229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72 72.08 72.08 0 0 1-72-72'/%3E%3C/svg%3E") no-repeat 12px 50%;
  font-size: var(--text-base);
}
.filterbar:has(#experts-search) .search-field:focus { outline: none; border-color: var(--color-search-focus); }

/* The quick check-in's note: under a hairline across the modal's content
   width (inside its padding), the field's words a step smaller than the
   other notes fields, to suit the sheet. */
.checkin-dialog .ci-kept-note { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--color-line); }
.checkin-dialog .ci-kept-note[hidden] { display: none; }

/* Learn: on the picture, 3 of 14 done above the bar, the bar across the
   picture inside its padding. */
.card__media .mini-progress, .list-row__picture .mini-progress { flex-direction: column; align-items: stretch; gap: 6px; }
.card__media .mini-progress__bar, .list-row__picture .mini-progress__bar { order: 2; width: 100%; max-width: none; flex: 0 0 auto; }
.card__media .mini-progress__text, .list-row__picture .mini-progress__text { order: 1; }

/* The quick check-in: Kept for today's room is made with the note, then it
   fades in there, so the note never moves. */
.checkin-kept.is-waiting { opacity: 0; }
.checkin-kept { transition: opacity 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { .checkin-kept { transition: none; } }

/* Learn: the progress on the picture a touch higher, the bar thinner, its
   words a little smaller. */
.card__media .mini-progress, .list-row__picture .mini-progress { padding-bottom: var(--space-3); gap: 5px; }
.card__media .mini-progress__bar, .list-row__picture .mini-progress__bar { height: 2px; }
.card__media .mini-progress__text, .list-row__picture .mini-progress__text { font-size: 10px; letter-spacing: 0.01em; }

/* Phones: every notes field 16px, so Safari on iPhone doesn't zoom the
   page when one is focused. */
@media (max-width: 600px) {
  textarea[data-note-example], .checkin-dialog .ci-kept-note textarea[data-note-example] { font-size: var(--text-md); }
}

/* Learn: the progress on a card's picture ends before the corner arrow
   (32px, 8px in, .card__enter), 12px clear of it, hovered or not. */
.card__media .mini-progress { padding-right: calc(var(--space-2) + var(--space-8) + var(--space-3)); }

/* Learn: the corner arrow above the progress's shade, as on any card; the
   bar about half the picture's width, left under its words. */
.card__media .card__enter, .card:has(.mini-progress) .card__enter { z-index: 2; }
.card__media .mini-progress__bar { align-self: flex-start; width: 50%; }

/* Learn: under the progress bar the same room as on its left, on the cards
   (12px) and on the phone rows' small pictures (8px). */
/* 14px under a 2px bar reads the same as the 12px on its left. */
.card__media .mini-progress { padding-left: var(--space-3); padding-bottom: 14px; }
.list-row__picture .mini-progress { padding-left: var(--space-2); padding-right: var(--space-2); padding-bottom: var(--space-2); }

/* The heart as the round icon button everywhere, signed out too (a link):
   the buttons' minimum width never reaches it. */
a.button.favorite-icon, button.button.favorite-icon, .session-actions .button.favorite-icon { width: var(--control-height); min-width: var(--control-height); max-width: var(--control-height); height: var(--control-height); padding: 0; flex: 0 0 var(--control-height); justify-content: center; border-radius: 50%; }

/* The player's line: a 48px tall area to press or drag (reaching 16px past
   it above and below, so the layout keeps its place), the bar inside it
   still thin and a little thicker while hovered or dragged. */
.player__line { position: relative; height: 48px; margin: -16px 0; touch-action: none; z-index: 2; }
.player__line:is(:hover, :active) .player__segment { height: 6px; }

/* What's inside: a step with no picture of its own nor the session's gets a
   soft glow instead of an empty square. */
.step__thumb--glow { background: radial-gradient(circle at 35% 35%, rgba(255, 214, 170, 0.95), rgba(222, 170, 196, 0.55) 55%, rgba(170, 196, 222, 0.35) 100%); }

/* Lesson lists: a lesson not done has its number in an outlined circle,
   the done one's filled circle with a check its pair (neither the web nor
   the mobile app keeps how far into a lesson someone got on the server, so
   no partial ring). */
.lesson-row .lesson-row__number, .lesson-row .lesson-row__done { box-sizing: border-box; flex: none; width: 24px; height: 24px; padding: 0; border-radius: 50%; }
.lesson-row .lesson-row__number { border: 1px solid var(--color-line-strong); font-size: var(--text-2xs); line-height: 1; color: var(--color-text-muted); }
.lesson-row .lesson-row__done { border: 1px solid var(--color-text); }
.lesson-row .lesson-row__done svg { width: 11px; height: 11px; }
.lesson-row.is-current .lesson-row__number { border-color: var(--color-text); color: var(--color-text); }

/* ==========================================================================
   The button system (DESIGN-SYSTEM.md, Buttons, links, tags and badges).
   One look, one size set, one hover and one focus per kind; this layer
   comes last so older one-off hovers don't add a sixth way to react.
   ========================================================================== */

/* Focus, everything pressable: one 2px ring. */
html body :is(.button, .card-pill, .round-play, .icon-button, .favorite-icon, .card__enter, .link-arrow, .card-action, .text-link, .card-link, .filter):focus-visible {
  outline: 2px solid var(--color-focus); outline-offset: 2px;
}

/* Main pill: filled ink, white words, 44px (36px small); hover a little
   lighter, nothing moves. Never a secondary pill, though it may carry
   button--main for its size: :is() takes its strongest selector's weight, so
   matching one there would outweigh every secondary rule. */
html body :is(.button.button--main:not(.button--secondary), .button:not(.button--secondary):not(.button--tonal):not(.button--light):not(.favorite-icon), .card-pill) {
  border-radius: var(--radius-pill); transform: none; transition: background-color 160ms ease-out, border-color 160ms ease-out;
}
html body :is(.button.button--main:not(.button--secondary), .button:not(.button--secondary):not(.button--tonal):not(.button--light):not(.favorite-icon), .card-pill):hover {
  background: var(--color-action-hover); border-color: var(--color-action-hover); transform: none;
}
/* The light main pill on a dark picture: white, ink words (its hover, the
   warm Endor white, is in the Hovers layer). */
html body :is(.poster, .day-feature, .sleep-feature__banner) .card-pill,
html body :is(.poster, .day-feature, .sleep-feature__banner) .button--main { background: #fff; border-color: #fff; color: #000; }

/* Secondary pill: outlined, no ground; hover the soft grey ground. */
/* A secondary pill is white with its line and ink words on any ground (the
   grey of a notice included), never see-through; its hover is the soft
   grey the 5% control hover gives on white, opaque. */
html body .button.button--secondary:not(.button--main):not(.favorite-icon) {
  border-radius: var(--radius-pill); background: var(--color-surface); border-color: var(--color-line-strong); color: var(--color-text); transform: none;
}
html body .button.button--secondary:not(.button--main):not(.favorite-icon):hover { background: color-mix(in srgb, var(--color-surface), var(--brand-black) 5%); border-color: var(--color-line-strong); transform: none; }

/* Text link, with or without its arrow: muted words, ink and underlined on
   hover; the arrow stays put. */
html body :is(a.link-arrow, a.card-action, a.text-link, button.text-link, a.card-link):hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html body :is(.link-arrow, .card-action, .card-link) svg { transform: none !important; transition: none; }

/* Round icon button: 44px (36px small), round; hover the soft grey ground
   (full white over a picture); never scaled. */
/* No transform here: a close button is centered with translateY, and
   resetting it on hover made it jump out from under the pointer. */
html body :is(.icon-button, .favorite-icon):hover { background: var(--color-control-hover); }
html body :is(.round-play, .card__enter):hover { transform: none; }

/* Clickable card: one reaction everywhere, the picture 2% closer; its title
   stays as it is. Only a card with no picture underlines its title, having
   nothing else to move. No shadow, ground or color change. */
html body :is(.card, .poster, .home-rec__card, .coach-card, .showcase-card, .book-feature, .list-row):hover :is(.card__title, .poster__title, .poster__title a, .home-rec__title, .list-row__title, .coach-card__name, .showcase-card__title) { text-decoration: none; }
html body :is(.card, .poster, .home-rec__card, .coach-card, .showcase-card, .book-feature, .list-row):hover :is(.card__media img, .poster__media img, .home-rec__picture img, .coach-card__photo img) { transform: scale(1.02); }

/* Only buttons are fully round. Tags, labels and badges have small
   corners, so none of them reads as something to press.

   Tag: a topic (Breathwork, Calming), a link to its page: quiet ink words on
   a grey ground clear enough to read, 6px corners, no border; hover darkens
   the ground and the words. Inside a row that is a link as a whole it is the same
   tag, unlinked. */
html body .chip { height: var(--chip-height); padding: 0 var(--chip-pad); border: 0; border-radius: 6px; background: rgba(0, 0, 0, 0.07); color: rgba(0, 0, 0, 0.74); font-size: var(--chip-text); font-weight: var(--weight-regular); text-decoration: none; transition: color 160ms ease-out, background-color 160ms ease-out; }
html body a.chip { cursor: pointer; }
html body a.chip:hover, html body a.chip:focus-visible { background: rgba(0, 0, 0, 0.14); color: var(--color-text); text-decoration: none; }
html body a.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
html body :is(.panel--dark, .poster, .day-feature) .chip { background: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.9); }
html body :is(.panel--dark, .poster, .day-feature) a.chip:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }

/* Information (what kind of thing it is, how long: Session · 4 min,
   Check-in): plain words, no box, never interactive. A box would read as
   something to press. Over a picture the kind keeps a near-white ground,
   the one place plain words could not be read. */
html body :is(.label, .history-item__kind, .notif__tag, .card__badge) { display: inline; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-regular); letter-spacing: 0; line-height: 1.5; text-transform: none; }
html body .card__label { display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 7px; border: 0; border-radius: 4px; background: var(--color-on-picture); color: #000; font-size: 11px; font-weight: var(--weight-medium); letter-spacing: 0.01em; line-height: 1; }

/* The ui-system page shows information above its tags. */
.session-labels__facts { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }

/* Badge: a state (New course, New, Best value): small capitals on a solid
   ink ground, 4px corners; white on a dark picture. Never interactive. */
html body :is(.home-badge, .new-pill, .paywall__badge) { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-2); border: 0; border-radius: 4px; background: var(--color-text); color: var(--color-surface); font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: 0.1em; text-transform: uppercase; line-height: 1; }
html body .poster .home-badge { background: #fff; color: #000; }

/* Eyebrow: small capitals with no ground at all; never interactive. */
html body .eyebrow { background: none; border: 0; }

/* My Twin's How you felt: information, not a tile, so nothing about it
   looks pressable: a line under a hairline, no ground, no box. */
html body .twin-felt { padding: var(--space-4) 0 0; border-radius: 0; background: none; border-top: 1px solid var(--color-line); }
html body .list-row__picture { overflow: hidden; }
html body .list-row__picture img { transition: transform 300ms var(--ease-out); }
html body .list-row:hover .list-row__picture img { transform: scale(1.04); }

/* Back links ("← Discover", "← All experts"): one rule on every page, the
   link on its own line and 32px (24px on phones) to whatever comes under
   it: the page column's own gap (--section-gap) taken back. */
html body .back-link { display: flex; width: max-content; max-width: 100%; margin-top: 0; margin-bottom: 0 !important; }
html body .back-link + * { margin-top: calc(var(--space-8) - var(--section-gap)) !important; }
@media (max-width: 640px) { html body .back-link + * { margin-top: calc(var(--space-6) - var(--section-gap)) !important; } }

/* An expert's page: the bio reads with air between its lines, and Explore
   with <name> stands clear of what is under it. */
html body .expert-hero__text .page-lede, html body .expert-about { line-height: 1.65; }
html body .section.expert-explore > .section__head.section__head { margin-bottom: var(--space-8); }
@media (max-width: 640px) { html body .section.expert-explore > .section__head.section__head { margin-bottom: var(--space-6); } }

/* Lesson rows: the circle stands as far from the picture as the picture
   from the title. */
html body .lesson-row :is(.lesson-row__number, .lesson-row__done) { margin-right: var(--space-1); }

/* Session cards: the footer (tags, length) keeps to the card's foot, so a
   row's footers line up, and stands at least 16px (as it reads) under the
   title and expert. */
html body .card .card__footer { margin-top: auto; padding-top: var(--space-3); }

/* Grids of cards: one row gap, 36px (28px on phones). */
html body :is(.grid, .course-grid):has(.card) { row-gap: var(--card-row-gap); }

/* The Endor square between a meta line's parts: Tommy Wood ▪ 4 min. */
.meta-sep { display: inline-block; width: var(--meta-square); height: var(--meta-square); margin: 0 0.25em; vertical-align: middle; background: currentColor; }

/* Up next: Start stays white while the row is hovered; only hovering the
   button itself gives it the soft grey. */
html body .part-of__row .button.button--secondary.part-of__start { background: var(--color-surface, #fff); }
html body .part-of__row .button.button--secondary.part-of__start:hover { background: #f0f0f0; }

/* My Twin, in the button system. An area row opens its sheet: an arrow at
   its end says so, and on hover the name underlines and the arrow darkens,
   as a text link does; no grey patch with edges of its own. A reading (the
   Sleep card and the other signals) is a clickable card without a picture:
   its outline darkens and its name underlines. */
html body .twin-stage__rows .area-row { grid-template-columns: 28px minmax(0, 1fr) auto 16px; }
html body .area-row::before { display: none; }
html body .area-row__go { display: flex; align-items: center; height: 22px; color: var(--color-text-subtle); transition: color var(--duration-hover) var(--ease-out); }
html body .area-row:has(.row-open):hover .area-row__go { color: var(--color-text); }
html body .area-row:has(.row-open):hover .row-open { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html body .area-row .row-open::after { inset: 0; border-radius: 0; }
html body .reading:has(.row-open):hover { border-color: var(--color-line-strong); }
html body .reading:has(.row-open):hover .reading__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* My Twin's five areas, evened out: 16px from each hairline to the row's
   words on both sides, 4px from an area's name to its line and 10px to
   its week; How you felt sits on the same 16px, and the last row ends on
   the panel's own padding rather than adding its own under it. */
html body .twin-stage__areas .twin-felt { padding: var(--space-4) 0; margin-bottom: 0; }
html body .twin-stage__rows { margin-top: 0; }
html body .twin-stage__rows .area-row { padding: var(--space-4) 0; }
html body .twin-stage__rows .area-row:first-child { border-top: 1px solid var(--color-line); }
html body .twin-stage__rows .area-row:last-child { padding-bottom: 0; }
html body .twin-stage__rows .area-row__about { margin-top: var(--space-1); }
html body .twin-stage__rows .area-week { margin-top: 10px; }

/* The quick check-in, kept: the in-depth check-in offered under a hairline,
   what it holds in one line, then its main pill; Done beside the bar. */
.checkin-offer { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--color-line); }
.checkin-offer__text { margin: 0; font-size: var(--text-sm); line-height: 1.55; color: var(--color-text-muted); }
@media (max-width: 640px) { .checkin-offer .button { width: 100%; } }

/* The intention's quote on the summary, when the model wrote one. */
.ci-sum__intention-quote { margin: calc(-1 * var(--space-2)) auto 0; max-width: 34ch; font-size: var(--text-sm); font-style: italic; line-height: 1.55; text-align: center; color: var(--color-text-muted); }

/* ==========================================================================
   The check-in modal, every step, in the button system: one button height
   (44px, 36px small), one notes text size (15px, 16px on phones so Safari
   doesn't zoom), heads aligned to the left like every other step, and even
   spacing: 24px between blocks, 8px from a label to its field.
   ========================================================================== */
html body .checkin-dialog .button { height: var(--control-height); min-height: var(--control-height); padding: 0 var(--space-5); }
html body .checkin-dialog .button.button--small { height: 36px; min-height: 36px; padding: 0 14px; }
html body .checkin-dialog .checkin-textarea { min-height: 112px; }
@media (max-width: 640px) {
  html body .checkin-dialog .checkin-textarea, html body .checkin-dialog .checkin-textarea::placeholder { font-size: var(--text-md); }
}
html body .checkin-dialog .feel-notes__label { display: block; margin: 0 0 var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); }

/* The quick step: the kept mark, then the note 24px under a hairline; at its
   foot Done and the in-depth check-in side by side at the right, as every
   step ends (Back or a quiet link at the left, the action at the right). */
html body .checkin-dialog .ci-kept-note { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--color-line); }
html body .checkin-dialog .checkin-kept { padding-bottom: 0; border-bottom: 0; }
html body .checkin-dialog .checkin-actions--end { justify-content: flex-end; gap: var(--space-3); }
html body .checkin-dialog .checkin-actions > .button { flex: 0 0 auto; width: auto; }

/* The intention's words to choose from: what is chosen stays chosen, so
   they are filters (small pills that wrap), not buttons. */
html body .checkin-dialog .checkin-or { margin: var(--space-6) 0 var(--space-3); text-align: left; }
html body .checkin-dialog .checkin-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
html body .checkin-dialog .checkin-chip { min-height: 0; height: 36px; padding: 0 var(--space-4); border: 1px solid transparent; background: var(--color-control); font-size: var(--text-sm); color: var(--color-text); cursor: pointer; }
html body .checkin-dialog .checkin-chip:hover { background: var(--color-control-hover); }
html body .checkin-dialog .checkin-chip[aria-pressed="true"] { border-color: var(--color-action); background: var(--color-action); color: var(--color-surface); }
html body .checkin-dialog .checkin-chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* The summary and the end read like every other step: the head at the left,
   the action at the right; the end's mark sits over its title at the left. */
html body .checkin-step[data-ci-step="summary"] > .checkin-eyebrow,
html body .checkin-step[data-ci-step="summary"] > .checkin-step__title,
html body .checkin-step[data-ci-step="summary"] > h2,
html body .checkin-step[data-ci-step="summary"] > .checkin-lede { text-align: left; margin-left: 0; margin-right: 0; }
html body .checkin-step[data-ci-step="kept"] { text-align: left; }
html body .checkin-step[data-ci-step="kept"] .checkin-kept-mark { width: 52px; height: 52px; margin: var(--space-2) 0 var(--space-5); }
html body .checkin-step[data-ci-step="kept"] .checkin-actions { justify-content: flex-end; }
html body [data-ci-step="kept"] .ci-suggest { margin: var(--space-6) 0 0; }
html body .checkin-step[data-ci-step="kept"] .checkin-card--next { margin-top: var(--space-4); }

/* On phones the quick step's two actions stack, the in-depth check-in on
   top, each the row's width: side by side they would not fit. */
@media (max-width: 640px) {
  html body .checkin-dialog .checkin-actions--end { flex-direction: column-reverse; align-items: stretch; }
  html body .checkin-dialog .checkin-actions--end > .button { width: 100%; }
}

/* The note's editor on the summary: its label and Done read like the quick
   step's field, at the left with Done at the right. */
html body .ci-sum__note-editor { display: flex; flex-direction: column; gap: var(--space-2); text-align: left; }
html body .ci-sum__note-editor .feel-notes__label { margin: 0; }
html body .ci-sum__note-editor [data-ci-note-done] { align-self: flex-end; }
html body .ci-sum__note-add { align-self: center; display: inline-flex; align-items: center; gap: 6px; }
html body .ci-sum__note-edit { margin-top: var(--space-2); }

/* The suggestion at the end: its words get the lines they need (up to
   four), and the picture keeps to their height's top. */
html body [data-ci-step="kept"] .ci-suggest__why { -webkit-line-clamp: 4; }
html body [data-ci-step="kept"] .ci-suggest__picture { width: 64px; height: 64px; align-self: start; }

/* My Twin's Your notes: the field first, its guide line above it and its
   button 16px under it at the right, the panel's padding all round; the
   notes kept below a hairline, each with its date in a column of its own
   (above it on phones), one hairline between them. The field's words are
   the check-in's notes size. */
html body .twin-moments__panel { display: flex; flex-direction: column; padding: 28px; }
html body .twin-moments__form { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
html body .twin-moments__line { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }
html body .twin-moments__form textarea { min-height: 112px; }
html body .twin-moments__actions { display: flex; justify-content: flex-end; margin-top: var(--space-2); }
html body .twin-moments__actions .button { height: var(--control-height); }
html body .twin-moments__list { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--color-line); }
html body .twin-moments__list:empty { display: none; }
html body .twin-moments__item { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: var(--space-4); align-items: baseline; padding: var(--space-4) 0; border-top: 0; border-bottom: 1px solid var(--color-line); }
html body .twin-moments__item:last-child { padding-bottom: 0; border-bottom: 0; }
html body .twin-moments__item .eyebrow { margin: 0; }
html body .twin-moments__item p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--color-text); }
@media (max-width: 640px) {
  html body .twin-moments__panel { padding: var(--space-5); }
  html body .twin-moments__form textarea, html body .twin-moments__form textarea::placeholder { font-size: var(--text-md); }
  html body .twin-moments__item { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-1); }
  html body .twin-moments__actions .button { width: 100%; }
}

/* The five areas, aligned: the state's dot and word in a column of their
   own, so the dots line up from row to row; the arrow on the name's line. */
html body .twin-stage__rows .area-row { grid-template-columns: 28px minmax(0, 1fr) 88px 16px; }
html body .twin-stage__rows .area-row__state { justify-content: flex-start; align-self: start; }
html body .twin-stage__rows .area-row__go { align-self: start; }

/* ==========================================================================
   Modals and the check-in (DESIGN-SYSTEM.md, 24 Nov evening). This layer
   comes last; it replaces the check-in rules above it where they meet.
   ========================================================================== */

/* Modal footers, every modal: links that step back or away at the left,
   the one main pill at the right (a second real way on as a secondary pill
   just left of it); one action alone at the right. On phones the main pill
   takes the width, the links centered under it. */
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) {
  display: flex; flex-direction: row !important; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: var(--space-6);
}
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > :is(.text-link, .link-arrow) { order: 1 !important; flex: 0 0 auto; margin: 0; }
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button { order: 3 !important; flex: 0 0 auto; width: auto; margin: 0; }
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button--secondary { order: 2 !important; }
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions):has(> .button--secondary:not([hidden])) > .button--secondary { margin-left: auto !important; }
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions):not(:has(> .button--secondary:not([hidden]))) > .button:not(.button--secondary) { margin-left: auto !important; }
@media (max-width: 640px) {
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) { flex-direction: column !important; align-items: stretch; gap: var(--space-3); }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button { order: 0 !important; width: 100%; margin: 0 !important; }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button--secondary { order: 1 !important; }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > :is(.text-link, .link-arrow) { order: 2 !important; align-self: center; justify-content: center; min-height: 36px; }
}

/* Fields: every text field and textarea white with the hairline, in pages
   and modals; focus darkens the line. Grey stays for controls only. */
html body :is(input:not([type]), input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="tel"], input[type="url"], input[type="password"], textarea, .checkin-field, .textarea) {
  background-color: var(--color-surface, #fff);
  border: 1px solid var(--color-line-strong);
}
html body :is(input:not([type]), input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="tel"], input[type="url"], input[type="password"], textarea, .checkin-field, .textarea):focus { border-color: var(--color-text); outline: none; }
html body :is(input:not([type]), input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="tel"], input[type="url"], input[type="password"], textarea, .checkin-field, .textarea):focus-visible { box-shadow: 0 0 0 1px var(--color-text); }

/* A field's label: the display face at the medium size, 12px above it. */
html body .checkin-dialog .feel-notes__label { display: block; margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); color: var(--color-text); }

/* The steps: title, its question, then the step's content 24px under. */
html body .checkin-dialog .checkin-step__title { margin: 0; }
html body .checkin-dialog .checkin-step > .checkin-lede { margin: var(--space-2) 0 var(--space-6); text-align: left; }

/* The intention: the six words as the main choices, a grid of grey choice
   pills; your own word under them, a white field with its label. */
html body .checkin-dialog .checkin-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
html body .checkin-dialog .checkin-chip { width: 100%; height: var(--control-height); padding: 0 var(--space-3); border-radius: var(--radius-pill); justify-content: center; text-align: center; }
html body .checkin-dialog .checkin-own-word { margin-top: 28px; }
@media (max-width: 640px) { html body .checkin-dialog .checkin-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The summary: the picture with the five areas' shape in one card, Share
   under it at the right, then the rows: a part's name, its answer, Change. */
html body .ci-sum { display: flex; flex-direction: column; text-align: left; }
html body .ci-sum__visual { overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface, #fff); }
html body .ci-sum__visual .ci-sum__art { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; margin: 0; border-radius: 0; }
html body .ci-sum__visual .ci-sum__hero { padding: var(--space-4) var(--space-4) var(--space-2); }
html body .ci-sum__share { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; margin: var(--space-3) 0 0; }
html body .ci-sum__rows { margin: var(--space-4) 0 0; padding: 0; border-top: 1px solid var(--color-line); }
html body .ci-sum__row { display: grid; grid-template-columns: 136px minmax(0, 1fr) auto; column-gap: var(--space-4); align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--color-line); }
html body .ci-sum__name { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
html body .ci-sum__value { margin: 0; min-width: 0; font-size: var(--text-base); line-height: 1.5; color: var(--color-text); }
html body .ci-sum__answer { display: block; overflow-wrap: anywhere; }
html body .ci-sum__answer.is-empty { color: var(--color-text-subtle); }
html body .ci-sum__row[data-ci-sum-part="note"] .ci-sum__answer:not(.is-empty) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html body .ci-sum__quote-line { display: block; margin-top: var(--space-1); font-size: var(--text-sm); font-style: italic; color: var(--color-text-muted); }
html body .ci-sum__change { justify-self: end; font-size: var(--text-sm); }
html body .ci-sum__note-editor { display: flex; flex-direction: column; gap: var(--space-2); }
html body .ci-sum__note-editor [data-ci-note-done] { align-self: flex-end; }
@media (max-width: 640px) {
  html body .ci-sum__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name change" "value value"; row-gap: var(--space-1); }
  html body .ci-sum__name { grid-area: name; }
  html body .ci-sum__change { grid-area: change; }
  html body .ci-sum__value { grid-area: value; }
}

/* The end: the felt moment centered (the check in the answer's color, the
   title, the light), then what may come next at the left under a hairline:
   the suggestion, and See your Twin as a link; Done at the right. */
html body .checkin-step[data-ci-step="kept"] { text-align: left; }
html body .ci-kept__moment { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-2) 0 var(--space-1); }
html body .checkin-step[data-ci-step="kept"] .ci-kept__moment .checkin-kept-mark { width: 64px; height: 64px; margin: 0 0 var(--space-4); }
html body .ci-kept__moment .checkin-step__title { margin: 0; text-align: center; }
html body .ci-kept__moment .light-line { margin-top: var(--space-2); justify-content: center; }
html body .ci-kept__next { display: flex; flex-direction: column; gap: var(--space-4); margin-top: 28px; padding-top: var(--space-6); border-top: 1px solid var(--color-line); }
html body [data-ci-step="kept"] .ci-suggest { margin: 0; }
html body .checkin-dialog .ci-suggest__eyebrow { margin-bottom: var(--space-3); font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); letter-spacing: 0; text-transform: none; color: var(--color-text); }
html body .ci-kept__twin { align-self: flex-start; }
html body .checkin-step[data-ci-step="kept"] .checkin-actions { justify-content: flex-start; }

/* The quick step's waiting parts: already in their room, only fading in. */
html body .checkin-dialog [data-ci-kept-actions] { transition: opacity 240ms ease-out; }
html body .checkin-dialog [data-ci-kept-actions].is-waiting { opacity: 0; pointer-events: none; }

/* My Twin's five areas: How you felt in the rows' grid, its word in the
   areas' word column with the same dot; every word and arrow centered on
   its row, so the column reads as one straight line. */
html body .twin-stage__areas .twin-felt { display: grid; grid-template-columns: 28px minmax(0, 1fr) 96px 16px; column-gap: var(--space-3); align-items: center; }
html body .twin-felt__label { grid-column: 1 / 3; color: var(--color-text-muted); }
html body .twin-felt__state { grid-column: 3; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
html body .twin-felt__state strong { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: 22px; }
html body .twin-stage__rows .area-row { grid-template-columns: 28px minmax(0, 1fr) 96px 16px; align-items: center; }
html body .twin-stage__rows .area-row__icon { align-self: start; }
html body .twin-stage__rows .area-row__state { align-self: center; justify-content: flex-start; }
html body .twin-stage__rows .area-row__go { align-self: center; height: auto; }

/* My Twin's Your notes: a card to write in (the label, the white field, the
   guide line at the left and Keep my note at the right under it), then
   Earlier notes: each note with its day as a small calendar leaf. */
html body .twin-moments__panel { display: flex; flex-direction: column; padding: 28px; }
html body .twin-moments__form { display: flex; flex-direction: column; gap: 0; }
html body .twin-moments__label { display: block; margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); color: var(--color-text); }
html body .twin-moments__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); margin-top: var(--space-4); }
html body .twin-moments__actions .twin-moments__line { margin: 0; max-width: 46ch; font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-muted); }
html body .twin-moments__actions .button { flex: 0 0 auto; height: var(--control-height); }
html body .twin-moments__earlier { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--color-line); }
html body .twin-moments__earlier[hidden] { display: none; }
html body .twin-moments__heading { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); }
html body .twin-moments__list { margin: 0; padding: 0; list-style: none; border: 0; }
html body .twin-moments__item { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: var(--space-4); align-items: start; padding: var(--space-4) 0; border-bottom: 1px solid var(--color-line); }
html body .twin-moments__item:last-child { padding-bottom: 0; border-bottom: 0; }
html body .twin-moments__date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 52px; border: 1px solid var(--color-line); border-radius: 10px; line-height: 1; }
html body .twin-moments__date strong { font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-regular); }
html body .twin-moments__date span { margin-top: var(--space-1); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
html body .twin-moments__body { min-width: 0; padding-top: 2px; }
html body .twin-moments__text { margin: 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
html body .twin-moments__area { display: block; margin-top: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); }
@media (max-width: 640px) {
  html body .twin-moments__panel { padding: var(--space-5); }
  html body .twin-moments__actions { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  html body .twin-moments__actions .button { width: 100%; }
}

/* One notes size in every check-in field (the example-note fields had
   their own), and the summary framed once: the picture's card only. */
html body .checkin-dialog .ci-sum { align-items: stretch; gap: 0; margin-top: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }

/* A modal's footer stays readable while the content scrolls under it: a
   solid white bar, never see-through to the words beneath. */
html body .checkin-dialog .checkin-step .checkin-actions, html body .checkin-dialog.has-art .checkin-step .checkin-actions { background: var(--color-surface, #fff); }

/* ==========================================================================
   The check-in after the mobile app 2.0 (24 Nov, night).
   ========================================================================== */

/* One body and one footer on every step: the body 28px by 32px (24px on
   phones); the footer a solid bar with a hairline above, reaching the
   dialog's edges, 16px above and below its buttons and the body's side
   padding at the sides. */
html:root body .checkin-dialog { --ci-px: 32px; --ci-pb: 28px; }
@media (max-width: 640px) { html:root body .checkin-dialog { --ci-px: 24px; --ci-pb: 24px; } }
html:root body .checkin-dialog .checkin-dialog__body.checkin-dialog__body { padding: var(--ci-pb) var(--ci-px); }
html:root body .checkin-dialog .checkin-step > .checkin-actions,
html:root body .checkin-dialog .checkin-step[data-ci-step="feel"] > .checkin-actions--end {
  position: sticky; bottom: 0; z-index: 2;
  margin: 28px calc(-1 * var(--ci-px)) calc(-1 * var(--ci-pb));
  padding: var(--space-4) var(--ci-px);
  border-top: 1px solid var(--color-line); background: var(--color-surface, #fff);
}

/* Notes fields: one size everywhere, 14px (16px on phones, so Safari
   doesn't zoom), in the check-in and in My Twin's Your notes. */
html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea) { font-size: var(--text-base); line-height: 1.55; }
html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea)::placeholder { font-size: var(--text-base); }
@media (max-width: 640px) {
  html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea),
  html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea)::placeholder { font-size: var(--text-md); }
}

/* The summary, after the app's check-in summary: the Endor State as the
   hero, its picture softly behind a light wash (the app draws it dark; the
   web's light style keeps the words ink), the intention's quote centered
   in the display face, the five areas' shape under it; then How you feel
   and Your intention as two tiles, and the note as its own card. */
html body .checkin-dialog .ci-sum { gap: var(--space-3); }
html body .ci-sum__hero { position: relative; overflow: hidden; border-radius: var(--radius); background: linear-gradient(160deg, #f4efe9 0%, #efeaf2 100%); text-align: center; isolation: isolate; }
html body .ci-sum__hero-art { position: absolute; z-index: -2; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(28px) saturate(1.15); }
html body .ci-sum__hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: rgba(255, 255, 255, 0.58); }
html body .ci-sum__hero-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-8) var(--space-5) var(--space-5); }
html body .ci-sum__hero-quote { max-width: 28ch; margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: 20px; line-height: 1.2; color: var(--color-text); text-wrap: balance; }
html body .ci-sum__hero-shape { width: 100%; }
html body .ci-sum__hero .checkin-radar-wrap { max-width: 300px; margin: 0 auto; }
html body .ci-sum__hero-change { margin-top: var(--space-1); font-size: var(--text-sm); }
html body .ci-sum__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: 0; }
html body .ci-sum__notes { margin: 0; }
html body :is(.ci-sum__tiles, .ci-sum__notes) .ci-sum__row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius-nested, 12px); background: var(--color-surface, #fff); grid-template-columns: none; }
html body :is(.ci-sum__tiles, .ci-sum__notes) .ci-sum__name { font-size: var(--text-xs); letter-spacing: 0.01em; color: var(--color-text-muted); }
html body .ci-sum__tiles .ci-sum__value { font-family: var(--font-display); font-size: 20px; line-height: 1.2; }
html body .ci-sum__notes .ci-sum__value { width: 100%; font-size: var(--text-base); line-height: 1.55; }
html body :is(.ci-sum__tiles, .ci-sum__notes) .ci-sum__change { justify-self: auto; margin-top: auto; padding-top: var(--space-1); font-size: var(--text-sm); }
html body .ci-sum__notes .ci-sum__note-editor { width: 100%; }

/* The end, after the app's Endor State share card: the kept check-in drawn
   as its image, centered, "A moment, kept." and the light under it, Share
   as a small secondary pill; then, under a hairline, what may come next. */
html body .ci-kept__moment { gap: 0; padding-top: var(--space-1); }
html body .ci-kept__card { display: block; width: 184px; height: auto; aspect-ratio: 4 / 5; margin: 0 auto var(--space-5); border-radius: 16px; box-shadow: 0 10px 30px rgba(21, 17, 15, 0.14); }
html body .ci-kept__card[hidden] { display: none; }
html body .ci-kept__moment .checkin-step__title { font-size: 26px; }
html body .ci-kept__share { margin-top: var(--space-4); }
html body .ci-kept__share[hidden] { display: none; }

/* My Twin's five areas: each row's state (dot and word) on the title line,
   at the right; the description under the title; the last seven days under
   that, the arrow at the right end of that line. How you felt's word ends
   on the same right edge. Air between the lines. */
html body .twin-stage__rows .area-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-areas: "icon title state" ". about about" ". week go";
  column-gap: var(--space-3); row-gap: 6px; align-items: center;
}
html body .twin-stage__rows .area-row__main { display: contents; }
html body .twin-stage__rows .area-row__icon { grid-area: icon; align-self: center; }
html body .twin-stage__rows .area-row .list__title { grid-area: title; }
html body .twin-stage__rows .area-row__about { grid-area: about; margin: 0; }
html body .twin-stage__rows .area-week { grid-area: week; margin: var(--space-1) 0 0; }
html body .twin-stage__rows .area-row__state { grid-area: state; justify-self: end; justify-content: flex-end; align-self: center; }
html body .twin-stage__rows .area-row__go { grid-area: go; justify-self: end; align-self: center; margin-top: var(--space-1); }
html body .twin-stage__areas .twin-felt { grid-template-columns: minmax(0, 1fr) auto; }
html body .twin-felt__label { grid-column: 1; }
html body .twin-felt__state { grid-column: 2; justify-self: end; }
/* The hero's picture keeps its colour: less wash, a little more life. */
html body .ci-sum__hero-art { filter: blur(26px) saturate(1.45) brightness(1.08); }
html body .ci-sum__hero::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.34) 45%, rgba(255, 255, 255, 0.5) 100%); }

/* My Twin's five areas: the last seven days as small, quiet squares, so
   the state's dot stays each row's colour; on a row's hover its arrow
   moves a little to the right. */
html body .twin-stage__rows .area-week { gap: 3px; align-items: center; }
html body .twin-stage__rows .area-week__day { width: 7px; height: 7px; border-radius: 1.5px; }
html body .twin-stage__rows .area-week__day.is-shared { opacity: 0.55; }
html body .twin-stage__rows .area-week__day:last-child { outline: 1px solid var(--color-line); outline-offset: 1px; }
html body .twin-stage__rows .area-row__go { transition: transform 200ms var(--ease-out), color var(--duration-hover) var(--ease-out); }
html body .twin-stage__rows .area-row:has(.row-open):hover .area-row__go { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { html body .twin-stage__rows .area-row__go { transition: color var(--duration-hover) var(--ease-out); } }

/* My Twin's Your notes: the notes in the body face at 14px; the two
   headings clearly above them, the display face at 20px. */
html body .twin-moments__item p.twin-moments__text { font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.55; }
html body :is(.twin-moments__label, .twin-moments__heading) { font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-regular); line-height: 1.25; }
html body .twin-moments__heading { margin-bottom: var(--space-3); }

/* My Twin: each state's mark is the Endor square, 12px and solid, the
   row's main mark; the week's squares 8px and quieter under it. */
html body :is(.twin-stage__areas, .twin-sheet__days) .area-state__dot { width: 12px; height: 12px; border-radius: 2px; }
html body .twin-stage__rows .area-week__day { width: 8px; height: 8px; border-radius: 1.5px; }

/* Your notes: 24px from the field to Keep my note. */
html body .twin-moments__actions { margin-top: var(--space-6); }

/* The summary back to its list (rows with their answer and Change); the
   end back to the check, the title and the light, centered as a whole,
   Done centered too (the one exception to the footer rule: a centered
   completion screen). The suggestion card tighter, its heading like the
   steps' headings inside a step (Notes, Or write your own word: the display
   face at the medium size), at most two lines of words. */
html body .checkin-step[data-ci-step="kept"] { text-align: center; }
html body .checkin-step[data-ci-step="kept"] .ci-kept__moment .checkin-kept-mark { width: 64px; height: 64px; margin: var(--space-2) 0 var(--space-4); }
html body .ci-kept__moment .checkin-step__title { font-size: 28px; }
html body .ci-kept__share { margin-top: var(--space-5); }
html body .ci-kept__next { margin-top: 28px; padding-top: var(--space-6); text-align: left; }
html body .checkin-dialog .ci-suggest__eyebrow { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--color-text); }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card { grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--space-3); padding: 10px var(--space-3) 10px 10px; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { width: 56px; height: 56px; align-self: center; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__why { -webkit-line-clamp: 2; }
html:root body dialog .checkin-step[data-ci-step="kept"] .checkin-actions > .button { margin-left: auto !important; margin-right: auto !important; }

/* My Twin's Your notes: 16px from the field to the guide line and Keep. */
html body .twin-moments__actions { margin-top: var(--space-4); }

/* The summary's rows (DESIGN-SYSTEM.md, Inside the check-in): a check at
   the left once the part holds an answer (an empty ring while it holds
   none), the part's name small over its answer, the answer in ink at the
   body size so it reads first, and Change (or Add) quiet at the right. */
html:root body .ci-sum__rows { margin: var(--space-4) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--color-line); }
html:root body .ci-sum__rows .ci-sum__row {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto;
  grid-template-areas: "mark name change" "mark value change";
  column-gap: var(--space-3); row-gap: 2px; align-items: center;
  padding: var(--space-3) 0; border-bottom: 1px solid var(--color-line);
}
html:root body .ci-sum__rows .ci-sum__mark { grid-area: mark; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--color-line-strong); border-radius: 50%; color: transparent; }
html:root body .ci-sum__rows .ci-sum__row.is-given .ci-sum__mark { border-color: var(--color-text); background: var(--color-text); color: var(--color-surface, #fff); }
html:root body .ci-sum__rows .ci-sum__name { grid-area: name; margin: 0; font-size: var(--text-xs); line-height: 1.4; color: var(--color-text-muted); }
html:root body .ci-sum__rows .ci-sum__value { grid-area: value; margin: 0; font-size: var(--text-base); line-height: 1.45; color: var(--color-text); }
html:root body .ci-sum__rows .ci-sum__answer.is-empty { color: var(--color-text-subtle); }
html:root body .ci-sum__rows .ci-sum__change { grid-area: change; align-self: center; font-size: 13px; color: var(--color-text-subtle); text-decoration: none; }
html:root body .ci-sum__rows .ci-sum__change:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
html:root body .ci-sum__rows .ci-sum__note-editor { margin-top: var(--space-2); }

/* The hero with nothing else to hold: how you feel, large, its square in
   the answer's color, over a soft tint of that color; never an empty box. */
html body .ci-sum__hero:has(.ci-sum__hero-art[hidden]) { background: color-mix(in srgb, var(--ci-kept, #e9e3db) 26%, #fff); }
html body .ci-sum__hero-feel { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin: var(--space-2) 0; font-family: var(--font-display); font-size: 28px; line-height: 1.2; color: var(--color-text); }
html body .ci-sum__hero-feel[hidden] { display: none; }
html body .ci-sum__hero-square { width: 16px; height: 16px; flex: none; border-radius: 3px; }

/* The end's recommendation: its heading 8px over the card; the card as a
   compact row (DESIGN-SYSTEM.md, Compact list row): 12px padding all round,
   a 64px picture aligned with the top of the words, 16px between them. */
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest { gap: 0; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__eyebrow { margin: 0 0 var(--space-2); }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: start; gap: var(--space-4); padding: var(--space-3); }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { width: 64px; height: 64px; align-self: start; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text { padding-top: 0; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card > :last-child:not(.ci-suggest__text):not(.ci-suggest__picture) { align-self: center; }

/* Your notes on the spacing scale: the card's padding 24px (20px on
   phones); the label 12px over its field (a field's label), the field
   16px over the guide line and Keep my note (--gap-inside); 24px from that
   row to the hairline and from the hairline to Earlier notes
   (--card-framed-gap); the heading 12px over the list; the notes as
   compact rows, 12px padding with hairlines between, the last ending on
   the card's padding. */
html:root body .twin-moments__panel { padding: var(--space-6); }
html:root body .twin-moments__earlier { margin-top: var(--space-6); padding-top: var(--space-6); padding-bottom: 0; }
html:root body .twin-moments__heading { margin: 0 0 var(--space-3); }
html:root body .twin-moments__list, html:root body .twin-moments__list li { margin: 0; }
html:root body .twin-moments__item { padding: var(--space-3) 0; }
html:root body .twin-moments__item:first-child { padding-top: 0; }
html:root body .twin-moments__item:last-child { padding-bottom: 0; border-bottom: 0; }
html:root body .twin-moments__body, html:root body .twin-moments__text { margin: 0; }
@media (max-width: 640px) { html:root body .twin-moments__panel { padding: var(--space-5); } }
html:root body .twin-moments__panel { gap: 0; }
html:root body .twin-moments__list { display: block; gap: 0; }

/* ==========================================================================
   25 Nov round: the final screen's recommendation, the summary on phones,
   one notes label, phone footers.
   ========================================================================== */

/* A section heading sits --gap-inside over its content (DESIGN-SYSTEM.md,
   Spacing: "a section's head and its cards"), here too. */
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__eyebrow { margin: 0 0 var(--gap-inside); }

/* The recommendation card: 16px all round, the picture 64px with its top on
   the top of the title's capitals, not its line box: Space Grotesk at 16px
   on a 24px line puts them 6px under the line's top (measured); 16px
   between picture and words. */
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card { padding: var(--space-4); gap: var(--space-4); }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { margin-top: 6px; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__actions { margin-top: var(--gap-inside); }
/* On a narrow phone the card stacks its words: the picture beside the title
   and its meta line, the description under both across the card's width. */
@media (max-width: 480px) {
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card {
    grid-template-columns: 64px minmax(0, 1fr) 16px;
    grid-template-areas: "pic title go" "pic meta go" "why why why";
    column-gap: var(--space-4); row-gap: var(--space-1); align-items: start;
  }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text { display: contents; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { grid-area: pic; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text strong { grid-area: title; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__meta { grid-area: meta; align-self: start; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__why { grid-area: why; margin-top: var(--space-3); }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__go { grid-area: go; align-self: center; }
}

/* The summary's hero with only how you feel: the words optically centered
   both ways, trimmed to their capitals and baseline so their box is their
   ink, equal room above and below. */
html body .ci-sum__hero:has(.ci-sum__hero-feel:not([hidden])) .ci-sum__hero-inner { padding: var(--space-8) var(--space-5); }
html body .ci-sum__hero-feel { margin: 0; line-height: 1; text-box: trim-both cap alphabetic; }
html body .ci-sum__hero-feel > span:last-child { text-box: trim-both cap alphabetic; }

/* The summary's hero on phones: compact, so the rows start in the first
   view; the shape smaller and its labels clear of the card's edges. */
@media (max-width: 640px) {
  html body .ci-sum__hero-inner { padding: var(--space-5) 28px var(--space-3); }
  html body .ci-sum__hero-quote { font-size: 17px; margin-bottom: var(--space-1); }
  html body .ci-sum__hero .checkin-radar-wrap { max-width: 200px; }
}

/* One label for every notes field (ui/note-label): the display face at
   20px, 12px over the field; on phones the field's 16px text on a tighter
   line. */
html:root body .note-label { display: block; margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-regular); line-height: 1.25; color: var(--color-text); }
@media (max-width: 640px) {
  html:root body :is(.checkin-dialog .checkin-textarea, .twin-moments__form textarea) { line-height: 1.45; }
}

/* Modal footers on phones: one row when they fit (the text link at the
   left, the main pill filling the rest); when the pill's label can't sit
   beside the link, the pill takes its own line above it, full width. */
@media (max-width: 640px) {
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) {
    flex-direction: row !important; flex-wrap: wrap-reverse; align-items: center; justify-content: center; column-gap: var(--space-5); row-gap: var(--space-2);
  }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button { order: 2 !important; flex: 1 0 auto; width: auto; max-width: 100%; margin: 0 !important; }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button--secondary { order: 1 !important; }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > :is(.text-link, .link-arrow) { order: 0 !important; align-self: center; flex: 0 0 auto; min-height: var(--control-height); }
}
@media (max-width: 640px) { html body .ci-sum__hero-quote { margin-bottom: var(--space-3); } }
@media (max-width: 480px) {
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card {
    grid-template-areas: "pic title go" "pic meta go" "pic . go" "why why why";
    grid-template-rows: auto auto 1fr auto;
  }
}

/* ==========================================================================
   25 Nov, second round.
   ========================================================================== */

/* Headed blocks (ui/block-heading): one small heading over one block (a
   field, a card, a list), the display face at 20px, at the block's left,
   --gap-inside over it. Notes, Or write your own word, Recommended for you,
   A note for today, Earlier notes. */
html:root body .block-heading { display: block; margin: 0 0 var(--gap-inside); font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-regular); line-height: 1.25; letter-spacing: 0; text-transform: none; text-align: left; color: var(--color-text); }
html:root body .checkin-dialog .checkin-own-word, html:root body .checkin-dialog label.block-heading[for="ci-word"] { margin-top: 28px; }

/* The recommendation card: equal padding all round (16px), the picture on
   it; the words moved up instead, so the title's capitals (6px under its
   line's top) meet the picture's top. */
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { margin-top: 0; }
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text { margin-top: -6px; }

/* On phones, after the mobile app's compact suggested card
   (home/ui/home.cljs suggested-session-card): a top row, the picture with
   the title and its meta line centered beside it and the arrow at the
   row's right end; under a hairline inset by the padding, the description;
   16px padding everywhere, no empty rows. */
@media (max-width: 480px) {
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card {
    grid-template-columns: 56px minmax(0, 1fr) 16px;
    grid-template-rows: 1fr auto auto 1fr auto;
    grid-template-areas: "pic . go" "pic title go" "pic meta go" "pic . go" "why why why";
    column-gap: var(--space-4); row-gap: 0; align-items: center; padding: var(--space-4);
  }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text { display: contents; margin: 0; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { grid-area: pic; width: 56px; height: 56px; align-self: center; margin: 0; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text strong { grid-area: title; line-height: 1.3; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__meta { grid-area: meta; margin-top: var(--space-1); }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__go { grid-area: go; align-self: center; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__why { grid-area: why; margin: var(--space-4) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--color-line); }
}

/* The recommendation without the model (AI not on) has no reason under it,
   so its line and divider go. */
html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__why:empty { display: none; }

/* The modal's picture: behind the steps that shape it (the five areas, the
   intention) as a soft tint; on the summary, where the picture lives in its
   card, and on the end, it fades slowly back to white. */
html body .checkin-dialog.has-art.is-art-in:has(> .checkin-dialog__body > :is([data-ci-step="summary"], [data-ci-step="kept"]):not([hidden])) { --ci-veil: 1; transition: --ci-veil 1400ms var(--ease-out); }

/* Notes fields on phones: 16px so Safari doesn't zoom on focus, the same in
   the check-in and on My Twin; it reads like body text: regular weight, a
   1.4 line, the example in the subtle grey, three lines showing. */
@media (max-width: 640px) {
  html:root body :is(.checkin-dialog .checkin-textarea, .twin-moments__form textarea) { font-size: var(--text-md); line-height: 1.4; min-height: calc(3 * 1.4em + 24px); font-weight: var(--weight-regular); }
  html:root body :is(.checkin-dialog .checkin-textarea, .twin-moments__form textarea)::placeholder { font-size: var(--text-md); color: var(--color-text-subtle); }
}

/* Modal footers on phones: a pill as wide as its label (at least 120px),
   beside the link when it fits; the full line only when it wraps onto its
   own (app.js marks the footer .is-stacked). Done alone on the end keeps
   its own width, centered. */
@media (max-width: 640px) {
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button { flex: 0 0 auto; min-width: 120px; margin-left: auto !important; }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions).is-stacked > .button { flex: 1 0 100%; width: 100%; }
  html:root body dialog .checkin-step[data-ci-step="kept"] .checkin-actions > .button { margin-left: auto !important; margin-right: auto !important; }
}
@media (max-width: 640px) {
  html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea) { font-size: var(--text-md); line-height: 1.4; }
}

/* ==========================================================================
   25 Nov, third round.
   ========================================================================== */

/* Notes fields on phones, one shared rule for every notes field (they all
   carry ui/note-field-attrs, so textarea[data-note-example]): the text set
   at 16px so Safari doesn't zoom on focus, the field scaled to 87.5% so it
   reads at the 14px of body text. Laid out 1/0.875 as wide and the space
   the scale frees taken back under it; its parent clips the unscaled
   width. A fixed height of three lines (it scrolls inside): a resize handle
   is no use on a touch screen and would break the taken-back space. */
@media (max-width: 640px) {
  html:root body textarea[data-note-example] {
    --note-h: calc(3 * 1.4em + 24px);
    font-size: var(--text-md); line-height: 1.4;
    width: calc(100% / 0.875); max-width: none;
    height: var(--note-h); min-height: 0; resize: none;
    transform: scale(0.875); transform-origin: top left;
    margin-bottom: calc(var(--note-h) * -0.125);
  }
  html:root body textarea[data-note-example]::placeholder { font-size: var(--text-md); }
  html:root body :has(> textarea[data-note-example]) { overflow-x: clip; }
}

/* The quick step's note: no gap of its own between its label and field
   (the headed block's gap is the one), the error 8px under the field. */
html:root body .checkin-dialog .ci-kept-note { gap: 0; }
html:root body .checkin-dialog .ci-kept-note [data-kept-note-error] { margin-top: var(--space-2); }

/* The end's next block shows only with something in it: the
   recommendation, or its loading card while it is on its way; never a
   hairline over an empty area. */
html:root body .ci-kept__next:not(:has(> .ci-suggest:not([hidden]))):not(:has(> .ci-suggest-skeleton:not([hidden]))) { display: none; }
html:root body .ci-kept__next:has(> .ci-suggest-skeleton:not([hidden])) > .ci-suggest { display: none; }
html body .ci-suggest-skeleton { display: flex; flex-direction: column; }
html body .ci-suggest-skeleton[hidden] { display: none; }
html body .ci-suggest-skeleton__heading { display: block; width: 46%; height: 20px; margin-bottom: var(--gap-inside); border-radius: 6px; background: var(--color-control, #f1efec); }
html body .ci-suggest-skeleton__card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius-nested); background: var(--color-surface, #fff); }
html body .ci-suggest-skeleton__picture { width: 64px; height: 64px; border-radius: var(--radius-nested); background: var(--color-control, #f1efec); }
html body .ci-suggest-skeleton__lines { display: flex; flex-direction: column; gap: var(--space-2); padding-top: 2px; }
html body .ci-suggest-skeleton__lines > span { display: block; height: 12px; border-radius: 4px; background: var(--color-control, #f1efec); }
html body .ci-suggest-skeleton__lines > span:nth-child(1) { width: 60%; height: 14px; }
html body .ci-suggest-skeleton__lines > span:nth-child(2) { width: 24%; }
html body .ci-suggest-skeleton__lines > span:nth-child(3) { width: 88%; }
@media (prefers-reduced-motion: no-preference) {
  html body .ci-suggest-skeleton:not([hidden]) :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span) { animation: ci-skeleton 1.6s ease-in-out infinite alternate; }
}
@keyframes ci-skeleton { from { opacity: 1; } to { opacity: 0.55; } }
@media (max-width: 480px) {
  html body .ci-suggest-skeleton__card { grid-template-columns: 56px minmax(0, 1fr); }
  html body .ci-suggest-skeleton__picture { width: 56px; height: 56px; }
}

/* The summary's note row with its field open: the check stays on the
   row's label line, as on every row; Done --gap-inside under the field. */
html:root body .ci-sum__rows .ci-sum__mark { align-self: start; margin-top: 10px; }
html:root body .ci-sum__rows .ci-sum__note-editor { gap: var(--gap-inside); margin-top: var(--space-2); }

/* The share dialog on the check-in modal's patterns: its header (close at
   the left, the title centered), the preview and the side as two balanced
   columns on a desktop (the note at the side's foot, level with the
   preview's bottom), On the image as a headed block over a list of
   choices (a checkbox and its words on a row, hairlines between; never
   pills), and the footer bar: Download image, and Share at the right. */
html:root body .ci-share { width: min(720px, calc(100% - 28px)); display: flex; flex-direction: column; }
html:root body .ci-share__bar { justify-content: center; padding: 0 var(--space-16); border-bottom: 1px solid var(--color-line); }
html:root body .ci-share__title { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-regular); }
html:root body .ci-share__body { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: var(--space-8); align-items: stretch; padding: 28px var(--space-8); }
html:root body .ci-share__side { display: flex; flex-direction: column; gap: 0; min-width: 0; }
html:root body .ci-share__parts { display: block; margin: 0; padding: 0; border: 0; min-width: 0; }
html:root body .ci-share__legend { float: left; width: 100%; padding: 0; }
html:root body .ci-share__choices { clear: both; display: flex; flex-direction: column; border-top: 1px solid var(--color-line); }
html:root body .ci-share__choice { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 0; border-bottom: 1px solid var(--color-line); font-size: var(--text-base); color: var(--color-text); cursor: pointer; }
html:root body .ci-share__choice:has(input:disabled) { cursor: default; }
html:root body .ci-share__choice:has(input:disabled:not(:checked)) { color: var(--color-text-subtle); }
html:root body .ci-share__check { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--color-line-strong); border-radius: 5px; background: var(--color-surface, #fff); cursor: inherit; }
html:root body .ci-share__check:checked { border-color: var(--color-text); background: var(--color-text); }
html:root body .ci-share__check:checked::before { content: ""; width: 9px; height: 5px; margin-top: -2px; border: solid var(--color-surface, #fff); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
html:root body .ci-share__check:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
html:root body .ci-share__note { max-width: none; margin: auto 0 0; padding-top: var(--gap-inside); font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .ci-share__actions { position: sticky; bottom: 0; margin: 0; padding: var(--space-4) var(--space-8); border-top: 1px solid var(--color-line); background: var(--color-surface, #fff); }
@media (max-width: 640px) {
  html:root body .ci-share__body { grid-template-columns: 1fr; gap: var(--space-6); padding: var(--space-6); }
  html:root body .ci-share__preview { width: min(240px, 100%); margin: 0 auto; }
  html:root body .ci-share__note { margin-top: 0; }
  html:root body .ci-share__actions { padding: var(--space-4) var(--space-6); }
}
/* The phone card's top row is the picture's height: the title keeps to one
   line (the session's page has it whole), so 16px sits above the row and
   16px between it and the hairline, the card's padding. */
@media (max-width: 480px) {
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }
}
/* The phone card's top row, plainly: two rows beside the picture (title,
   meta) meeting in the middle of its height, no flexible rows. */
@media (max-width: 480px) {
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__card {
    grid-template-rows: auto auto auto;
    grid-template-areas: "pic title go" "pic meta go" "why why why";
    align-content: start;
  }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__picture { grid-row: 1 / 3; align-self: center; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__text strong { align-self: end; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__meta { align-self: start; }
  html body .checkin-dialog [data-ci-step="kept"] .ci-suggest__go { grid-row: 1 / 3; }
}
/* Each summary row's check sits on its label's line (the label 12px on a
   1.4 line), the same whether the row holds an answer or an open field. */
html:root body .ci-sum__rows .ci-sum__mark { align-self: start; margin-top: calc((var(--space-3) * 1.4 - var(--space-5)) / 2); }
html body :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span) { background: rgba(21, 17, 15, 0.07); }

/* ==========================================================================
   25 Nov, fourth round.
   ========================================================================== */

/* The share step, inside the check-in modal: its title, then the preview
   and the side as two columns on a desktop, the preview 200px so the side
   has room for its words on one line ("On the image", "Your five areas"),
   both ending level; one column on phones. The body's own padding is the
   modal's. */
html:root body [data-ci-step="share"] .ci-share__body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-6); align-items: stretch; padding: 0; }
html:root body [data-ci-step="share"] .ci-share__preview canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius-nested); background: #202027; }
html:root body [data-ci-step="share"] .ci-share__choice { white-space: nowrap; }
html:root body [data-ci-step="share"] .ci-share__legend { white-space: nowrap; }
@media (max-width: 640px) {
  html:root body [data-ci-step="share"] .ci-share__body { grid-template-columns: 1fr; gap: var(--space-6); }
  html:root body [data-ci-step="share"] .ci-share__preview { width: min(220px, 100%); margin: 0 auto; }
}

/* The summary's rows: dividers only between rows (the hero above and the
   footer below already separate the list); 16px in each row; the check
   centered on the row's label and answer, and on the label's line only
   while the note's field is open, 14px under the divider. */
html:root body .ci-sum__rows { border-top: 0; }
html:root body .ci-sum__rows .ci-sum__row { padding: var(--space-4) 0; }
html:root body .ci-sum__rows .ci-sum__row:last-child { border-bottom: 0; padding-bottom: 0; }
html:root body .ci-sum__rows .ci-sum__mark { align-self: center; margin-top: 0; }
html:root body .ci-sum__rows .ci-sum__row:has([data-ci-note-editor]:not([hidden])) .ci-sum__mark { align-self: start; margin-top: calc((var(--space-3) * 1.4 - var(--space-5)) / 2); }
/* The share step: its title 24px over its content (it has no question
   under it), and the modal's ground white like the end it comes from. */
html:root body [data-ci-step="share"] > .checkin-step__title { margin: 0 0 var(--space-6); }
html body .checkin-dialog.has-art.is-art-in:has(> .checkin-dialog__body > [data-ci-step="share"]:not([hidden])) { --ci-veil: 1; transition: --ci-veil 1400ms var(--ease-out); }

/* ==========================================================================
   25 Nov, fifth round.
   ========================================================================== */

/* The share step breathes: on a desktop the modal widens to 760px for it,
   the preview 300px wide (it reads well), the list beside it keeping its
   words on one line; on phones one column, the preview 280px. */
@media (min-width: 641px) {
  html:root body .checkin-dialog:has(> .checkin-dialog__body > [data-ci-step="share"]:not([hidden])) { width: min(760px, calc(100% - 28px)); }
}
html:root body [data-ci-step="share"] .ci-share__body { grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-8); }
@media (max-width: 640px) {
  html:root body [data-ci-step="share"] .ci-share__body { grid-template-columns: 1fr; gap: var(--space-6); }
  html:root body [data-ci-step="share"] .ci-share__preview { width: min(280px, 100%); }
}

/* The loading card: calm, but plainly breathing, so it reads as
   "something is coming": its grey a little deeper, fading to 40% and back
   every 1.2s; still under reduced motion. */
html body :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span) { background: rgba(21, 17, 15, 0.1); }
@media (prefers-reduced-motion: no-preference) {
  html body .ci-suggest-skeleton:not([hidden]) :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span) { animation: ci-skeleton-breathe 1.2s ease-in-out infinite alternate; }
}
@keyframes ci-skeleton-breathe { from { opacity: 1; } to { opacity: 0.4; } }

/* The summary's quote keeps its room from the start: three lines of it,
   the words centered in them, so the intention word and the model's quote
   that replaces it (fading in place) take the same space; nothing moves. */
html body .ci-sum__hero-quote { display: flex; align-items: center; justify-content: center; min-height: calc(3 * 1.2em); margin-bottom: var(--space-1); overflow: hidden; }
html body .ci-sum__hero-quote[hidden] { display: none; }

/* The summary's radar, laid out by app.js (layoutSumRadar): the box takes
   the hero's width and the height of what it holds; the labels sit outside
   the ring on their axes, the side ones aligned away from the shape. */
html:root body .ci-sum__hero .ci-sum__radar { position: relative; width: 100%; max-width: none; margin: var(--space-2) 0 0; }
html:root body .ci-sum__radar .checkin-review__radar, html:root body .ci-sum__radar .checkin-radar-labels { position: static; }
html:root body .ci-sum__radar .ci-sum__label { position: absolute; transform: none; align-items: center; text-align: center; }
html:root body .ci-sum__radar .ci-sum__label.is-left { align-items: flex-start; text-align: left; }
html:root body .ci-sum__radar .ci-sum__label.is-right { align-items: flex-end; text-align: right; }
/* The quote's room: four lines across the card's width (a quote longer
   than that ends in an ellipsis rather than moving the modal). */
html body .ci-sum__hero-quote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; max-width: none; width: 100%; min-height: calc(4 * 1.2em); padding: 0; text-align: center; }
html body .ci-sum__hero-quote[hidden] { display: none; }
/* Centered in its room: the words in the middle of the four lines kept for
   them, however many they take (a longer quote is clipped at four). */
html body .ci-sum__hero-quote { display: flex; align-items: center; justify-content: center; -webkit-line-clamp: unset; height: calc(4 * 1.2em); min-height: 0; overflow: hidden; }
html body .ci-sum__hero-quote[hidden] { display: none; }
/* The room is fixed in pixels (four lines of the full size); a quote that
   needs more steps its text down until it fits (app.js fitQuote). */
html body .ci-sum__hero-quote { height: 96px; }
@media (max-width: 640px) { html body .ci-sum__hero-quote { height: 82px; } }

/* ==========================================================================
   25 Nov, sixth round.
   ========================================================================== */

/* The quick step's "How are you?" is its step title: the step titles'
   type (the display face at 28px), centered as the step is. */
html:root body .checkin-step[data-ci-step="feel"] .checkin-feel__word { font-family: var(--font-display); font-size: 28px; font-weight: var(--weight-regular); line-height: 1.18; letter-spacing: -0.02em; color: var(--color-text); }

/* The summary's radar is the five areas step's radar: the same box (up to
   --checkin-radar-size, its labels inside it), the same labels placed by
   the same code (app.js placeRadarLabel), name over word, centered on the
   axis. Only the colors adapt to the picture behind: the word in ink. */
html:root body .ci-sum__hero .ci-sum__radar { position: relative; width: 100%; max-width: var(--checkin-radar-size); height: auto; margin: var(--space-3) auto var(--space-1); }
html:root body .ci-sum__radar .checkin-review__radar { position: static; }
html:root body .ci-sum__radar .checkin-review__radar svg { position: static; display: block; width: 100%; height: auto; }
html:root body .ci-sum__radar .checkin-radar-labels { position: absolute; inset: 0; }
html:root body .ci-sum__radar .ci-sum__label { position: absolute; transform: translate(-50%, -50%); align-items: center; text-align: center; gap: 0; font-size: var(--text-xs); line-height: 16px; color: var(--color-text-muted); }
html:root body .ci-sum__radar .ci-sum__label-word { display: block; font-family: inherit; font-size: var(--text-2xs); color: var(--color-text); }
html:root body .ci-sum__radar .ci-sum__label-word::before { display: none; }

/* The summary card's room: the quote keeps what a usual quote needs, three
   lines (72px; 61px on phones), and the radar the rest; a longer quote
   steps its text down to fit. On phones the card's sides narrow to 12px so
   the radar has the width the five areas step gives it. */
html body .ci-sum__hero-quote { height: 72px; }
@media (max-width: 640px) {
  html body .ci-sum__hero-quote { height: 61px; }
  html body .ci-sum__hero-inner { padding: var(--space-5) var(--space-3) var(--space-3); }
}

/* The loading card, after the mobile app's (recommended_card.cljs
   shimmer): grey blocks with a soft band of light sweeping across each,
   a pass every 1.2s on a cubic ease-in-out; still under reduced motion. */
html body :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span) { position: relative; overflow: hidden; background: rgba(21, 17, 15, 0.08); animation: none; opacity: 1; }
html body .ci-suggest-skeleton__lines > span { height: 10px; border-radius: 5px; }
html body .ci-suggest-skeleton__lines > span:nth-child(1) { height: 12px; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) {
  html body .ci-suggest-skeleton:not([hidden]) :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span)::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%); animation: ci-shimmer 1.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  }
}
@keyframes ci-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* The share step on phones: the preview takes the modal's width; the
   footer stays one row: Back, Download image as a round icon button, and
   Share as the main pill (Download is the main pill, with its words, where
   the browser can't share). */
@media (max-width: 640px) {
  html:root body [data-ci-step="share"] .ci-share__preview { width: 100%; }
  html:root body [data-ci-step="share"] .checkin-actions:has([data-ci-share-go]:not([hidden])) [data-ci-share-download] { width: var(--control-height); min-width: var(--control-height); height: var(--control-height); padding: 0; justify-content: center; border-radius: 50%; flex: 0 0 var(--control-height); }
  html:root body [data-ci-step="share"] .checkin-actions:has([data-ci-share-go]:not([hidden])) .ci-share__download-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html:root body [data-ci-step="share"] .checkin-actions:has([data-ci-share-go]:not([hidden])) [data-ci-share-go] { margin-left: 0 !important; }
}
/* On phones the summary's radar leaves 28px on each side for its labels,
   which stand beyond the ring by their own width (app.js placeRadarLabel). */
@media (max-width: 640px) { html:root body .ci-sum__hero .ci-sum__radar { max-width: calc(100% - 56px); } }
/* On phones the five areas radar leaves 20px on each side, so its labels
   stand within the step's content edges. */
@media (max-width: 640px) { html:root body [data-ci-step="areas"] .checkin-radar-wrap { max-width: calc(100% - 40px); } }
/* On the web's light ground the sweeping light is warm, Endor's gold (as
   light earned is), over a slightly deeper grey, so the pass reads clearly. */
html body :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span) { background: rgba(21, 17, 15, 0.09); }
@media (prefers-reduced-motion: no-preference) {
  html body .ci-suggest-skeleton:not([hidden]) :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span)::after {
    background: linear-gradient(90deg, rgba(255, 214, 166, 0) 0%, rgba(255, 214, 166, 0.85) 45%, rgba(255, 244, 228, 0.95) 50%, rgba(255, 214, 166, 0.85) 55%, rgba(255, 214, 166, 0) 100%);
  }
}

/* The loading card's light: neutral and soft, a lighter band over the grey,
   a slower pass (1.8s), calm loading rather than a highlight. */
@media (prefers-reduced-motion: no-preference) {
  html body .ci-suggest-skeleton:not([hidden]) :is(.ci-suggest-skeleton__heading, .ci-suggest-skeleton__picture, .ci-suggest-skeleton__lines > span)::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    animation-duration: 1.8s;
  }
}

/* ==========================================================================
   Hovers, one per kind (DESIGN-SYSTEM.md, Hovers). A hover makes the element
   clearer, never harder to read, and the same kind reacts the same way on
   every page; the kinds differ from each other on purpose.
   ========================================================================== */

/* The light main pill on a dark picture stays light: a warm off-white, the
   same as the round play button. The main pill's own rule outranked it and
   turned it to ink, almost invisible on the dark picture. */
html:root body :is(.poster, .day-feature, .sleep-feature__banner) :is(.card-pill, .button--main):hover {
  background: var(--brand-endor-white) !important; border-color: var(--brand-endor-white) !important; color: #000 !important;
}

/* Text links: muted words, ink and underlined on hover, whatever they are
   called in the code; on a dark picture they stay white and underline. A
   link inside a sentence is underlined already, so its line thickens. */
html:root body :is(.link-arrow, a.card-action, .text-link, a.card-link, .notice__dismiss, a.settings-row__link, a.back-link, a.checkin-status, a.guide__human, .site-footer a, footer a):hover {
  color: var(--color-text); text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
html:root body :is(.poster, .day-feature, .sleep-feature__banner, .panel--dark) :is(a.card-action, a.link-arrow, .text-link, a.card-link):hover,
html:root body a.card-action--light:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html:root body .text-link:not(:is(p, li) > .text-link) { text-decoration: none; }
html:root body :is(p, li) > a:not([class]):hover,
html:root body :is(p, li) > a.text-link:hover,
html:root body a.expert-link:hover { color: var(--color-text); text-decoration: underline !important; text-decoration-thickness: 2px !important; }

/* Round icon buttons: only the ground changes. On a light page the soft
   grey ground (over cards it stays solid, so nothing shows through); over a
   picture the near-white ground goes fully white and the icon to ink; on a
   dark ground a light veil. Never a color-only change, never scaled. */
html:root body .hscroll__button:hover { background: linear-gradient(var(--color-control-hover), var(--color-control-hover)), var(--color-surface); }
html:root body .card__save-button:hover { background: #fff; color: var(--color-text); }
html:root body .round-play:hover { background: var(--brand-endor-white); transform: none; }

/* Clickable cards with a picture: the picture 2% closer, on every card,
   tiles and list rows included (they moved 3% and 4%). */
html:root body :is(.browse-card, .practice-tile, .list-row, .book-feature):hover img,
html:root body a.book-feature__cover:hover img { transform: scale(1.02); }
html:root body .book-feature__cover img { transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Cards without a picture: the title underlines, having nothing else to
   move; a line around the card darkens with it. No card fills on hover. */
html:root body :is(a.game-tile, a.practice-option, a.newsroom-more):hover :is(.game-tile__title, .box-title, .practice-option__title, h3) { text-decoration: none; }
html:root body button.guide__prompt:hover { background: var(--color-surface); border-color: var(--color-line-strong); }

/* Rows in a list: the soft grey highlight (Hover on rows), light points'
   ways to earn included, which reacted to nothing. */
html:root body a.light-action:hover { background-image: linear-gradient(var(--color-hover), var(--color-hover)); }

/* A disclosure ("How progress works", a question in the FAQ, the
   check-in's sliders, Progress's levels): its title underlines as a text
   link does on hover (3px under, 1px), the row itself stays still. */
html:root body summary.how__summary:hover .how__title,
html:root body summary:not([class]):hover,
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Home's large course cards (A course for you, New course alone) stop
   growing at 460px tall from 861px, where New course already stopped, so
   the title keeps its weight on a wide screen. A course for you's picture
   keeps its 5:2 subject crop (narrower bands cut a close-up face): it stops
   widening with the card, sits at the right and fades into the card's dark
   ground under the words. */
@media (min-width: 861px) {
  html:root body .poster--course, html:root body .poster--new { max-height: 460px; }
}
/* Below 1480px the card is never wider than 5:2, so the picture covers it
   whole (a 5:2 box narrower than the card left a dark band under it). */
@media (min-width: 1480px) {
  html:root body .poster--course .poster__media { inset: 0 0 0 auto; width: auto; aspect-ratio: 5 / 2; }
  html:root body .poster--course .poster__media { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%); mask-image: linear-gradient(90deg, transparent 0, #000 22%); }
}

/* Discover's Featured card says what it is on its picture, as every card
   with a picture does (the mobile app's card writes Featured this month on
   it). */
html:root body .practice-featured__media .card__label { z-index: 1; }

/* A card's facts (a course's lessons, a session's length) keep the right
   end of its footer whether or not it has topic tags, so they sit in the
   same place on every card of a row. */
html:root body .card__foot-row:not(:has(.chip-row)) .card__meta-row { flex-shrink: 0; flex-wrap: nowrap; margin-left: auto; }

/* Home's top signed in: the mobile app's greeting as the page title, the
   check-in on its row. */
/* The greeting has no line under it, so the check-in (or Checked in today)
   takes the title's own row, centered on it; on phones it goes under it. */
html:root body .home-welcome--greeting > div:first-child > .page-title { grid-column: 1; grid-row: 2; }
html:root body .main[data-page] .home-welcome--greeting > :nth-child(2) { grid-column: 2 !important; grid-row: 2 !important; align-self: center !important; justify-self: end !important; margin: 0 !important; }
@media (max-width: 640px) {
  html:root body .home-welcome--greeting > div:first-child > .page-title { grid-column: 1 / -1; }
  html:root body .main[data-page] .home-welcome--greeting > :nth-child(2) { grid-column: 1 / -1 !important; grid-row: 3 !important; justify-self: start !important; margin-top: var(--space-4) !important; }
}

/* ==========================================================================
   The audit's fixes, 25 Nov (DESIGN-SYSTEM.md, Consistency, 25 Nov).
   ========================================================================== */

/* Newsroom's headlines are read in full: they wrap, never clamped (a clamp
   after a headline's own period read as "...."). Two columns on phones
   need a smaller headline. */
html:root body .story-card .card__title { display: block; -webkit-line-clamp: unset; overflow: visible; text-overflow: clip; }
@media (max-width: 720px) { html:root body .story-card .card__title { font-size: 19px; line-height: 1.25; } }

/* On a phone there is nothing to scan: the hand-off and the app modal offer
   Open Endor (the link the code holds) instead of the code. Off a phone
   the code stays and the button doesn't show. */
html:root body :is(.handoff__open, .app-modal__open) { display: none; }
@media (max-width: 720px) {
  html:root body .handoff__open, html:root body .app-modal__open { display: inline-flex; align-self: flex-start; margin: var(--space-2) 0 var(--space-3); }
  html:root body :is(.handoff__qr, .handoff__scan, .app-modal__qr) { display: none; }
}

/* The 404 page is a page: its title and line as every page head, then
   Back to Home as a secondary pill as wide as its words. */
html:root body .not-found .page-head { margin-bottom: 0; }
html:root body .not-found__action { margin-top: var(--space-6); }

/* Small pills: 36px everywhere, phones included (they were 34px, and 44px
   on phones under the touch rule). */
html:root body .button.button--small { height: 36px; min-height: 36px; }

/* An expert's role line: one line with the Endor square, muted, the same on
   every card and page; what doesn't fit ends in an ellipsis rather than
   wrapping and dropping its square. */
html:root body :is(.expert-card, .expert-card--large, .coach-card) :is(.card__meta-row, .coach-card__line .card__meta-row) { flex-wrap: nowrap; min-width: 0; overflow: hidden; }
html:root body :is(.expert-card, .coach-card) .card__meta-row > .card__meta { white-space: nowrap; }
html:root body :is(.expert-card, .coach-card) .card__meta-row > .card__meta:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html:root body :is(.expert-card__role, .expert-card__role .card__meta, .coach-card__line .card__meta) { color: var(--color-text-muted); font-weight: var(--weight-regular); }

/* Page titles: one size, a course's included (it was 46px beside 43px). */
html:root body .course-hero__title { font-size: var(--title-page); }
@media (max-width: 640px) { html:root body .course-hero__title { font-size: 33px; } }

/* Search: the ways in line up with the page column, before typing and
   after nothing is found alike; a time tile's minutes keep clear of its
   edge on phones. */
html:root body .search-form ~ .no-results { padding-left: 0; padding-right: 0; }
@media (max-width: 640px) {
  html:root body .practice-options--three .practice-option--time .practice-option__title { font-size: 20px; }
}

/* A tile's name never breaks at its hyphen ("Pre-performance", a
   non-breaking hyphen in the view); a long name gets a smaller size on the
   phone's two-column tiles instead. */
@media (max-width: 640px) { html:root body .browse-card__name { font-size: var(--text-md); } }

/* An expert's portrait runs full width on phones, as a coach's does. */
@media (max-width: 720px) { html:root body .expert-hero__photo { max-width: none; aspect-ratio: 1 / 1; } html:root body .expert-hero__photo img { object-position: 50% 25%; } }

/* A notice's actions line up on their middles: Not now with its pill. */
html:root body .notice__actions { align-items: center; }
html:root body .notice__dismiss { margin-bottom: 0; }

/* Card titles break where they run out of room (pretty), not into two even
   halves (balance made "Tip of / nose meditation"). */
html:root body :is(.card__title, .card h2, .card h3, .list-row__title) { text-wrap: pretty; }

/* Quiet links are muted until hovered, as See all is; a link inside a
   sentence stays underlined in ink, and on dark grounds they stay light. */
html:root body .text-link:not(:is(p, li) > .text-link):not(:is(.poster, .panel--dark, .day-feature) .text-link) { color: var(--color-text-muted); }

/* Book a call is a main pill like every other: the same 12px words on
   /coaching as on a coach's page (a one-off 14px made it look larger). */
html:root body .coaching .coach-card__actions .button { font-size: var(--text-xs); }

/* ==========================================================================
   26 Nov round (DESIGN-SYSTEM.md, 26 Nov).
   ========================================================================== */

/* Empty states are a quiet card with the hairline, never a dashed box. */
html:root body .empty { border: 1px solid var(--color-line); }

/* A trailing arrow moves 3px its own way when its pill or link is hovered,
   as My Twin's area arrow does, so a hover over a dark picture is seen;
   any other icon (a lead icon, Share's, Download's) stays still. The arrow
   out (↗) moves up and out. */
html:root body :is(.button, .card-pill, .link-arrow, .card-action, .card-link) > svg:not(.icon-lead),
html:root body .card-link .link-out { display: inline-block; transition: transform 200ms var(--ease-out) !important; }
html:root body :is(.button, .card-pill, .link-arrow, .card-action, .card-link):not(:is(.favorite-icon, .icon-button, .round-play)):hover > svg:is([data-icon="arrow-right"], [data-icon="caret-right"]):not(.icon-lead) { transform: translateX(3px) !important; }
html:root body .card-link:hover .link-out { transform: translate(2px, -2px) !important; }
@media (prefers-reduced-motion: reduce) {
  html:root body :is(.button, .card-pill, .link-arrow, .card-action, .card-link):hover > svg:not(.icon-lead),
  html:root body .card-link:hover .link-out { transform: none !important; }
}

/* The corner arrow on a card is only the arrow, white, in the heart's own
   box so the two share one vertical axis. A very soft, wide darkening of
   the corner comes and goes with it (its ::before, clipped by the
   picture), there only so the arrow reads on a light picture. */
html:root body .card__enter { background: none; color: #fff; width: var(--overlay-size); height: var(--overlay-size); padding: 0; border-radius: 0; filter: none; overflow: visible; isolation: isolate; }
html:root body .card__enter svg { position: relative; width: 20px; height: 20px; }
html:root body .card__enter::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 200px; height: 200px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0)); pointer-events: none; }

/* A card footer's left holds its topics or, with none, what it belongs to
   in plain words (a lesson's course), one line; the length keeps the right. */
html:root body .card__foot-info { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--text-xs); color: var(--color-text-muted); }

/* New course alone, wide screens: its portrait at the right in a 4:3 frame,
   fading into the card's dark ground under the words, rather than a band
   cut through the face. */
@media (min-width: 861px) {
  html:root body .home-top__pair:not(:has(> :nth-child(2))) .poster--new .poster__media { inset: 0 0 0 auto; left: auto; bottom: 0; width: auto; aspect-ratio: 4 / 3; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
  html:root body .home-top__pair:not(:has(> :nth-child(2))) .poster--new .poster__media img { object-position: 50% 25%; }
}

/* Newsroom on phones: one story a row, its picture full width. */
@media (max-width: 640px) {
  html:root body .grid:has(> .story-card) { grid-template-columns: minmax(0, 1fr); }
  html:root body .story-card .card__title { font-size: 22px; }
}

/* The 404 page: its title and line, the search, then three ways on as
   Home's Guide and Twin tiles (an icon, the name and one line each). */
html:root body .not-found { display: block; }
html:root body .not-found > * { margin-top: 0; margin-bottom: 0; }
html:root body .not-found__ways { margin-top: var(--space-10) !important; }
html:root body .quick-spaces--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { html:root body .quick-spaces--three { grid-template-columns: minmax(0, 1fr); } }

/* Profile: Sign out a group's gap (24px) under the note, at the pills'
   minimum width. */
html:root body .profile__sign-out { margin-top: var(--space-6); }
html:root body .profile__sign-out .button { min-width: 120px; }

/* Progress's tiles fill their row with however many parts there are: three
   with Living World off (no worlds), four with it on. On phones Progress's
   tabs keep two columns, the third tile taking the second row whole. */
html:root body :is(.progress-tabs, .progress-tiles):not(:has(> :nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  html:root body .progress-tabs:not(:has(> :nth-child(4))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:root body .progress-tabs:not(:has(> :nth-child(4))) > :nth-child(3) { grid-column: 1 / -1; }
}

/* Newsroom: stories get room on the spacing scale, 40px between rows and
   24px between columns (32px between stories stacked on phones); the
   stories' links read as every section's See all (muted, regular, ink and
   underlined on hover); Keep your curiosity open is a section title. */
html:root body .grid:has(> .story-card) { row-gap: var(--space-10); column-gap: var(--space-6); }
@media (max-width: 640px) { html:root body .grid:has(> .story-card) { row-gap: var(--space-8); } }
html:root body :is(.story-card, .newsroom-more) .card-link { font-weight: var(--weight-regular); color: var(--color-text-muted); }
html:root body a:is(.story-card, .newsroom-more):hover .card-link,
html:root body .story-card:hover .card-link { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html:root body .newsroom-more .box-title { font-size: var(--title-section); line-height: var(--leading-h2); }

/* The dev-only course banners page: Home's banners stacked, 32px apart. */
.dev-banners .home-top, .dev-banners .poster--course { margin: 0 0 var(--space-8); }

/* Navigation cards (ui/nav-card: Home's Guide and Twin, Discover's Reflect,
   the 404 page's ways on): the arrow in the top right corner, inset by the
   card's padding; on hover it moves 3px forward and the card's ground and
   line darken a little. The name never underlines. */
html:root body .nav-card { position: relative; padding-right: calc(var(--tile-pad) + var(--space-6)); transition: background-color var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out); }
html:root body .nav-card .quick-space__end { position: absolute; top: var(--tile-pad); right: var(--tile-pad); margin: 0; display: flex; color: var(--color-text-muted); transition: transform 200ms var(--ease-out), color var(--duration-hover) var(--ease-out); }

html:root body .nav-card:hover .quick-space__end { transform: translateX(3px); color: var(--color-text); }
html:root body .nav-card:hover :is(h2, h3) { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { html:root body .nav-card:hover .quick-space__end { transform: none; } }
html:root body .nav-card__icon { display: flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, 0.04); color: var(--color-text); }

/* Settings' About you rows open in place: the row (label, value, Change at
   the right) is the summary; the form under it holds the fields, then
   Cancel at the left and Save at the right, as every modal footer. */
html:root body .settings-edit { display: block; padding: 0; }
html:root body .settings-edit__summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: var(--space-3) var(--space-5); cursor: pointer; list-style: none; }
html:root body .settings-edit__summary::-webkit-details-marker { display: none; }
html:root body .settings-edit__end { display: inline-flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
html:root body .settings-edit__change { font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .settings-edit__summary:hover .settings-edit__change { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

html:root body .settings-edit__form { padding: 0 var(--space-5) var(--space-5); }
html:root body .settings-edit__fields { display: grid; gap: var(--space-4); }
html:root body .settings-field { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
html:root body .settings-field > span, html:root body .settings-field > legend { font-size: var(--text-sm); color: var(--color-text-muted); padding: 0; }
html:root body .settings-field .input { max-width: 360px; }
html:root body .settings-field-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
html:root body .settings-field--inline { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .settings-field--inline .input { width: auto; }
html:root body .settings-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2) var(--space-4); }
html:root body .settings-check { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
html:root body .settings-edit__form .checkin-error { margin-top: var(--space-3); }
html:root body .settings-edit__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-5); }

/* An About you row's Saved sits on the row's middle, just before Change,
   without the preference status's own height and margin. */
html:root body .settings-edit__end { align-self: center; }
html:root body .settings-edit .settings-status { min-height: 0; margin: 0; line-height: 1; }
html:root body .settings-edit .settings-status:empty { display: none; }

/* ==========================================================================
   One version, 29 Nov (DESIGN-SYSTEM.md, One version). Where two rules
   disagreed, the one kept, set once.
   ========================================================================== */

/* Filled controls in the action ink. */
html:root body :is(.button.button--main:not(.button--secondary), .card-pill):not(:is(.poster, .day-feature, .sleep-feature__banner) *) { background: var(--color-action); border-color: var(--color-action); }
html:root body .filter[aria-pressed="true"] { background: var(--color-action); border-color: var(--color-action); color: var(--color-surface); }

/* Round icon buttons: 44px, or 32px small on a picture or a carousel's
   edge; always a circle. (The round play on a picture is the card's main
   action and keeps its 56px and 64px.) */
html:root body :is(.icon-button, .checkin-close, .app-modal__close, .twin-sheet__bar .icon-button, .search-sheet__bar .icon-button) { width: var(--control-height); height: var(--control-height); min-width: var(--control-height); border-radius: 50%; }
html:root body .hscroll__button { width: 32px; height: 32px; }

/* A text link is 12px wherever it stands alone (inside a sentence it takes
   the sentence's size). */
html:root body :is(.text-link, .notice__dismiss):not(:is(p, li) > *) { font-size: var(--text-sm); }

/* Cards on phones: the description 12px, as everywhere; the meta 11px. */
@media (max-width: 640px) { html:root body .card .card__text { font-size: var(--text-sm); } }

/* Expert portraits are 4:5 at every width, Discover and Experts alike. */
html:root body .card__media--directory { aspect-ratio: 4 / 5; height: auto; }

/* Cards without a picture (navigation cards, Discover's tiles, Newsroom's
   last card) react one way: the line darkens and the ground takes a 3%
   shade, which works on white and on a tinted tile alike. */
html:root body :is(a.game-tile, a.practice-option, a.newsroom-more, a.nav-card, a.guide-session):hover { border-color: var(--color-line-strong); box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.03); }

/* Notes fields: 14px text at 1.5, everywhere (16px scaled to 87.5% on
   phones, the shared rule below). */
html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea, textarea[data-note-example]) { font-size: var(--text-base); line-height: 1.5; }
html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea, textarea[data-note-example])::placeholder { font-size: var(--text-base); }
@media (max-width: 640px) {
  html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea, textarea[data-note-example]),
  html:root body :is(.checkin-dialog .checkin-textarea, .checkin-dialog textarea[data-note-example], .twin-moments__form textarea, textarea[data-note-example])::placeholder { font-size: var(--text-md); line-height: 1.5; }
}

/* No results: the empty state's padding, without its box (it stands in
   the page, under the search). */
html:root body .no-results { padding: var(--space-10) var(--space-6); border: 0; }
html:root body .search-form ~ .no-results { padding-left: 0; padding-right: 0; }

/* ==========================================================================
   30 Nov (DESIGN-SYSTEM.md, 30 Nov).
   ========================================================================== */

/* A course for you is as wide as its column wherever it sits (its 5:2
   shape and 380px minimum height made it 950px wide in a 708px column). */
html:root body .poster--course { width: 100%; max-width: 100%; min-width: 0; }

/* Every card and list picture has the light edge: a 1px line at 8% ink
   drawn over the picture (so it stays on while the picture moves), so a
   pale picture never melts into the page. A label on a picture has a
   quiet edge of its own. */
html:root body :is(.card__media, .list-row__picture, .lesson-row .step__thumb, .browse-card__media, .practice-tile__media, .suggest__picture, .book-feature__cover, .search-sheet .list-row__picture) { position: relative; }
html:root body :is(.card__media, .list-row__picture, .suggest__picture, .book-feature__cover)::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(30, 26, 22, 0.08); pointer-events: none; }
html:root body :is(.card__label, .card__enter) { z-index: 2; }
html:root body .card__label { box-shadow: 0 0 0 1px rgba(30, 26, 22, 0.1); }

/* Text fields show one focus indicator: their line in ink, drawn inside the
   box (never the outline the pressable kinds use, which a card's clip can
   cut). */
html:root body :is(input:not([type]), input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], textarea, .input, .checkin-field, .textarea):focus-visible { outline: none; border-color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-text); }

/* A course card's picture keeps its 218:150 shape on phones; the phone rule
   that makes card pictures square is for sessions. */
@media (max-width: 640px) { html:root body .card__media.card__media--course { aspect-ratio: 218 / 150; } }

/* On a picture or a dark ground the focus ring is white with a dark halo,
   so it shows on any ground. */
html:root body :is(.poster, .day-feature, .sleep-feature__banner, .panel--dark, .card__media, .home-rec__picture) :is(a, button):focus-visible,
html:root body .round-play:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.55); }

/* My Twin, 1 Dec. Your check-ins: the day's answer as an area's state, the
   square in its color and the word. Earlier notes: a note shorter than its
   date leaf sits on the leaf's middle; a longer one starts at the top. */
html:root body .twin-checkins__felt { display: inline-flex; align-items: center; gap: var(--space-2); }
html:root body .twin-checkins__felt .area-state__dot { width: 12px; height: 12px; border-radius: 2px; }
html:root body .twin-moments__body { display: flex; flex-direction: column; justify-content: center; min-height: 52px; }

/* A group label over its cards (search's ways in, before typing and when
   nothing is found, and the search sheet) sits a section heading's gap
   over them, --gap-inside (16px, 12px on phones). */
html:root body .search-group__title { margin-bottom: var(--gap-inside); }

/* One global search: the top bar's field from tablets up, on every page
   (on /search it is the page's search); on phones the menu's search row.
   /search keeps its own field on phones only, where the top bar has none. */
@media (min-width: 641px) { html:root body .search-form--phone { display: none !important; } }

/* A confirmation never looks pressable: Saved and Kept are the success tone
   (the check and the word in forest green), never the muted link style
   beside them (Settings' rows and preferences, the note's Kept). */
html:root body :is(.settings-edit__saved, .settings-status[data-kind="saved"], .note-dialog__kept) { color: var(--color-success); }

/* A notice's two actions stay together: on a wide card at the right of the
   words; narrower, under the words at their left edge, the pill then Not
   now right after it, never at opposite edges. */
html:root body .notice__actions { justify-content: flex-start; gap: var(--space-5); }
/* A notice with no actions of its own has only its dismiss: the empty
   action box would hold the row's gap and push it in from the words. */
html:root body .notice__do:empty { display: none; }
html:root body .notice__dismiss { margin: 0; }
@container (min-width: 960px) {
  html:root body .notice__body:not(:has(.notice__wide)) > .notice__actions { gap: var(--space-6); }
}

/* A state on the right reads word then square, so the squares form one
   column (the five areas, How you felt, Your check-ins, an area's days); an
   earlier answer puts its date first, muted, before the word. */
html:root body .area-state__date { color: var(--color-text-subtle); }
/* Today's Remove sits before the answer, at the row's right side with it. */
html:root body .twin-checkins__item .twin-checkins__remove { margin-left: auto; }
html:root body .twin-checkins__item .twin-checkins__remove + .twin-checkins__felt { margin-left: 0; }

/* The person's own words (a note shown back: My Twin's Earlier notes, the
   check-in summary's note): a thin warm bar at the left, like a quote, the
   words in ink at reading size; no quote marks, no italics (italics belong
   to an empty field's example). */
:root { --color-own-words: var(--brand-sun-yellow-soft); }
html:root body :is(.twin-moments__text, .ci-sum__row[data-ci-sum-part="note"] .ci-sum__answer:not(:empty):not(.is-empty)) { padding-left: var(--space-3); border-left: 3px solid var(--color-own-words); font-size: var(--text-base); font-style: normal; color: var(--color-text); }

/* Phones: search is the top bar's icon button (opening search full screen),
   and the logo is the mark alone so the bar has room for it. */
@media (max-width: 640px) {
  html:root body .topbar .topbar__search-link { display: inline-flex !important; }
  html:root body .topbar .logo-lockup { display: none !important; }
  html:root body .topbar .logo-symbol { display: block !important; width: 28px; height: 28px; padding: 0; }
}

/* A chosen state is never filled dark: the main pill is the only filled dark
   element, so a chosen filter, choice, tab or day reads "chosen", never
   "press me". White, ink words, a fine ink outline, no check (a check is
   for multi-select, the checkboxes), so a pill keeps its width when chosen;
   unchosen filters keep their grey ground. Checkboxes and switches keep their checked look. */
:root { --color-chosen-bg: var(--color-surface); --color-chosen-line: var(--color-text); }
html:root body :is(
  .filter[aria-pressed="true"], .checkin-chip[aria-pressed="true"], .xp-value[aria-pressed="true"],
  .lw-map__sound[aria-pressed="true"], .xp-garden__tool[aria-pressed="true"], .mini-player__world[aria-pressed="true"],
  .data-tab[aria-current="page"], .progress-tab[aria-current="page"], .profile-pill[aria-current="page"],
  .checkin-tabs button[aria-pressed="true"], .plan-switch button[aria-pressed="true"], .segmented__item[aria-pressed="true"], .segmented__item[aria-current="page"],
  .filter-row .arrange-start--icon[aria-pressed="true"], .option-field:has(input:checked),
  .goal input:checked + .goal__box, .plan-sheet__day input:checked + span, .paywall__plan.is-selected
),
html:root body :is(.filter[aria-pressed="true"], .checkin-chip[aria-pressed="true"], .data-tab[aria-current="page"], .progress-tab[aria-current="page"], .option-field:has(input:checked)):hover,
html:root body .checkin-dialog .checkin-chip[aria-pressed="true"] {
  background: var(--color-chosen-bg); color: var(--color-text); border-color: var(--color-chosen-line); box-shadow: none;
}
html:root body :is(.data-tab[aria-current="page"], .filter-row .arrange-start--icon[aria-pressed="true"]) svg { color: var(--color-text); }
html:root body .plan-way.is-chosen { background: var(--color-chosen-bg); }
/* Unchosen filters sit on the grey ground, Discover's as Experts', so the
   chosen one's white and ink outline stand out. */
html:root body .filter:not([aria-pressed="true"]) { background: var(--color-neutral-grey); border-color: transparent; }
html:root body .filter:not([aria-pressed="true"]):hover { background: var(--color-control-selected); }

/* Labels in a picture's corner ("Session", "Course", "Featured", a world's
   name or lock) are concentric with it, as the heart and the arrow are. */
html:root body :is(.card__label, .world-game__world, .world-game__lock, .world-card__lock) { border-radius: var(--radius-overlay); }

/* "Keep your curiosity open." is a card's title, at the story cards' size. */
html:root body .newsroom-more .box-title { font-size: 23px; font-weight: var(--weight-medium); line-height: 1.25; }
@media (max-width: 960px) { html:root body .newsroom-more .box-title { font-size: 21px; } }
@media (max-width: 640px) { html:root body .newsroom-more .box-title { font-size: 22px; } }

/* A heart answers a hover by its icon growing a little (10%; 15% over a
   picture, kept or not); the button itself never scales. No motion under
   reduced motion. */
html:root body :is(.card__save-button, .favorite-icon) { transform: none; }
html:root body :is(.card__save-button, .favorite-icon) svg { transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1); }
html:root body .favorite-icon:hover svg { transform: scale(1.15); }
html:root body .card__save-button:is(:hover, :not([aria-pressed="true"]):hover) svg { transform: scale(1.15); }
@media (prefers-reduced-motion: reduce) {
  html:root body :is(.card__save-button, .favorite-icon) svg { transition: none; }
  html:root body :is(.card__save-button, .favorite-icon):is(:hover, :not([aria-pressed="true"]):hover) svg { transform: none; }
}

/* A card action differs from the words above it only by its ink and its
   arrow: regular weight. */
html:root body :is(.card-action, .world-card__enter) { font-weight: var(--weight-regular); }

/* The heart over a picture: drawn at 28px, pressed anywhere in a 44px
   square around it. */
html:root body .card__save-button::before { content: ""; position: absolute; inset: calc((var(--overlay-size) - var(--control-height)) / 2); }

/* "Keep your curiosity open.": its icon, title, line and link one group,
   centered in the card's height. The icon is 40px in the regular weight, its
   stroke (2.5px) about as thick as the title's letters. The title in the
   display face's regular weight and own spacing, clearly larger than the
   stories', small enough that "curiosity open." keeps one line from about
   1200px windows, and growing with the card; the line a small step above
   theirs. */
html:root body .newsroom-more { container-type: inline-size; justify-content: center; gap: var(--space-5); padding: clamp(var(--space-8), 8%, var(--space-12)); }
html:root body .newsroom-more > svg { width: 40px; height: 40px; }
html:root body .newsroom-more .box-title { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: clamp(28px, 8cqi + 6px, 44px); line-height: 1.12; }
html:root body .newsroom-more .newsroom-more__words > p { font-size: 13px; line-height: 1.55; }
html:root body .newsroom-more .card-action { margin-top: var(--space-3); }

/* A section head reads as one group by proximity: the line sits close under
   its title, the head farther from what follows (--gap-inside). */
html:root body .section__head .section__lede { margin-top: 2px; }
@media (max-width: 640px) { html:root body .section__head { row-gap: 0; } }

/* A card's words in three levels: the byline close under the title (the
   body's 4px), the description a step further (8px); a news card's
   description 8px under its title. The footer's details (4 min, 11 lessons)
   at the tags' size, one line of details. */
html:root body .card__expert + .card__text { margin-top: var(--space-1); }
html:root body .story-card .card__title + .card__text, html:root body .story-card .card__text { margin-top: var(--space-1); }
html:root body .card__footer .card__meta { font-size: var(--chip-text); }

/* A challenge is laid out as a course page (library/course-page): the cover,
   the details and description under it, then its invitations as the course's
   list, rows the content column's width, each with the lesson's number
   circle, its title, and its words under it. Not links, so no hover. One calm
   line closes the page. */
html:root body .challenge-steps { margin: 0; padding: 0; list-style: none; }
html:root body .challenge-step { align-items: flex-start; }
html:root body .challenge-step .list__title { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); line-height: 1.4; }
html:root body .challenge-step__text { margin: var(--space-1) 0 0; max-width: 64ch; font-size: var(--text-base); line-height: var(--leading-body); color: var(--color-text-muted); }
html:root body .challenge-closing { max-width: 64ch; margin: var(--gap-inside) 0 0; font-size: var(--text-sm); line-height: var(--leading-small); color: var(--color-text-muted); }

/* Newsroom's card keeps its 1280px size on every width: the title the
   largest at which "curiosity open." keeps one line there (32px), the icon
   44px in the light weight, its stroke (2.1px) just under the letters'. */
html:root body .newsroom-more .box-title { font-size: var(--text-2xl); }
html:root body .newsroom-more > svg { width: 44px; height: 44px; }

/* One numbered circle (ui/step-number) for every numbered row: 24px, a fine
   line; done, a check on ink. In a text-only row it is centered on the first
   line of the row's title, whose line height the row names (--step-title-lh). */
html:root body .step-number { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: flex-start; width: 24px; height: 24px; margin-top: calc((var(--step-title-lh, var(--space-5)) - var(--space-6)) / 2); border: 1px solid var(--color-line-strong); border-radius: 50%; font-size: var(--text-2xs); line-height: 1; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
html:root body .step-number.is-done { border-color: var(--color-text); background: var(--color-text); color: var(--color-surface); }
html:root body .step-number.is-done svg { width: 11px; height: 11px; }
html:root body .challenge-step { align-items: flex-start; --step-title-lh: 20px; }
html:root body .challenge-step .list__title { line-height: var(--step-title-lh); }
/* In a row with a picture (a course's lessons) the circle and the picture
   are centered on the row instead. */
html:root body .lesson-row { align-items: center; }
html:root body .lesson-row .step-number { align-self: center; margin-top: 0; }
html:root body .lesson-row .step-number { margin-right: var(--space-1); }
html:root body .challenge-closing p { margin: 0; }

/* Newsroom: "Keep your curiosity open." stays on two lines at every width;
   news titles take the story title step (--title-story, 18px to 21px). */
html:root body .newsroom-more .box-title { max-width: 8em; }
html:root body .story-card .card__title { font-size: var(--title-story); line-height: 1.25; }

/* Three-across galleries are one card kind (news, challenges, journeys): the
   title on the story step (18px, 21px on desktops), the description on the
   news cards' step (12px at 20px) 8px under it, the action 16px under that. */
html:root body .showcase-card__body { gap: var(--space-2); }
html:root body .showcase-card__title { font-size: var(--title-story); line-height: 1.25; }
html:root body .showcase-card__text { font-size: var(--text-sm); line-height: var(--leading-small); }
html:root body .showcase-card__foot { padding-top: var(--space-2); }
html:root body .showcase-card__foot .card-action { margin: 0; }

/* A challenge's invitations are the page's content: each title in the
   display face on the subtitle step (16px), its words on the body step
   (14px at 20px), 8px under it; each box padded 20px on every side. */
html:root body .challenge-step { padding: var(--space-5); --step-title-lh: 22px; }
html:root body .challenge-step .list__title { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); line-height: var(--step-title-lh); }
html:root body .challenge-step__text { margin-top: var(--space-2); font-size: var(--text-base); line-height: var(--leading-body); }

/* A card's first chip never leaves: shortened with an ellipsis when it
   doesn't fit beside the card's length (app.js setupChipFit). */
html:root body .chip-row--fit { min-width: 0; }
html:root body .chip.is-shortened { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 20px; }

@media (min-width: 961px) { :root { --title-story: 21px; } }

/* A dropdown's option under the pointer or the keyboard takes the grey hover
   ground; the chosen one is marked by its check (a white panel shows no
   outline), the one place a single choice carries a check. */
html:root body .dropdown__option.is-active { background: var(--color-control-hover); }
html:root body .dropdown__option[aria-selected="true"] { background: none; }
html:root body .dropdown__option.is-active[aria-selected="true"] { background: var(--color-control-hover); }

/* An expert card's roles follow the tag rule: the first always whole (it
   wraps when it alone is too long), a second only when it fits whole beside
   it, never cut (app.js setupRoleFit). */
html:root body :is(.expert-card, .expert-card--large) .card__meta-row > .card__meta:last-child { overflow: visible; text-overflow: clip; }
html:root body :is(.expert-card, .expert-card--large) .card__meta-row.is-alone > .card__meta { white-space: normal; }

/* Learn's ebook in the large Recommended card (home/recommended): its picture
   fills its part edge to edge, cropped around its subject (Cloudinary's
   subject crop, as Home's large course card's wide picture) and centered;
   on phones a 220px band on top (the large card pictures' floor), the words
   under it. */
html:root body .book-rec .home-rec__picture img { object-fit: cover; object-position: 50% 50%; }
@media (max-width: 640px) {
  html:root body .book-rec .home-rec__picture { height: 220px; min-height: 0; aspect-ratio: auto; }
}
html:root body :is(.expert-card, .expert-card--large) .card__meta-row > * { flex: none; }
html:root body :is(.expert-card, .expert-card--large) .card__meta-row.is-alone > :first-child { flex: 0 1 auto; min-width: 0; }
html:root body :is(.expert-card, .expert-card--large) .card__meta-row > [hidden] { display: none !important; }
/* An open row holding an open dropdown lets the list out of its box (the
   opening animation clips the box) and sits above its neighbors, so a list
   that opens upward is never cut off or painted under the row above. */
html:root body details[open]:has(.dropdown.is-open)::details-content { overflow: visible; }
html:root body details[open]:has(.dropdown.is-open) { position: relative; z-index: 3; }
/* The ebook's words centered beside its cover: no room kept for a longer
   suggestion (the Recommended card keeps it, since its words change). */
html:root body .book-rec .home-rec__text { min-height: 0; }
html:root body .book-rec .home-rec__words { justify-content: center; }
html:root body .book-rec .home-rec__foot { margin-top: 0; padding-top: var(--space-6); }

/* A dropdown's list never scrolls sideways: it is at least the field's width
   and grows to fit its widest option, with room kept for the scrollbar; the
   check has its own column, so it never covers the value. Its scrollbar is
   thin, in the line's grey. */
html:root body .dropdown__list { right: auto; min-width: 100%; width: max-content; max-width: min(320px, calc(100vw - 32px)); overflow-x: hidden; scrollbar-gutter: auto; scrollbar-width: thin; scrollbar-color: var(--color-line-strong) transparent; }
html:root body .dropdown__option { display: grid; grid-template-columns: minmax(max-content, 1fr) 16px; gap: var(--space-3); }

/* Fields, one family (DESIGN-SYSTEM.md, Fields): every text field, search
   field, dropdown, time and date field and notes field is white with a thin
   line (--color-line), 44px tall when it is one line, its words 14px in ink
   and its example in the subtle grey; hover darkens the line, keyboard focus
   draws the focus ring. Corners are the nested radius; a search field alone
   keeps the pill, by convention. A dark line is never a field's resting look:
   that reads as chosen. */
html:root body :is(input.input, input.search-field, .topbar__search input, #search-sheet-q, .dropdown__button, textarea.textarea, textarea.checkin-field, .guide__input, .live-chat__input) {
  box-sizing: border-box; border: 1px solid var(--color-line); border-radius: var(--radius-input);
  background: var(--color-surface); color: var(--color-text); box-shadow: none;
}
html:root body :is(input.input, input.search-field, .topbar__search input, #search-sheet-q, .dropdown__button) { height: var(--control-height); min-height: var(--control-height); font-size: var(--text-base); }
html:root body :is(textarea.textarea, textarea.checkin-field, .guide__input, .live-chat__input) { min-height: var(--control-height); }
html:root body :is(input[type="search"], input.search-field, .topbar__search input, #search-sheet-q) { border-radius: var(--radius-search); }
html:root body :is(input.input, input.search-field, .topbar__search input, #search-sheet-q, textarea.textarea, textarea.checkin-field, .guide__input, .live-chat__input)::placeholder { color: var(--color-text-subtle); opacity: 1; }
html:root body :is(input.input, input.search-field, .topbar__search input, #search-sheet-q, .dropdown__button, textarea.textarea, textarea.checkin-field, .guide__input, .live-chat__input):hover { border-color: var(--color-line-strong); }
/* A field in focus: its line in ink and a little thicker (a second pixel
   drawn inside it, so nothing moves and no parent crops it), no halo, no
   outer ring; the 2px ring stays for buttons, links, cards and other
   controls. */
html:root body :is(input.input, input.search-field, .topbar__search input, #search-sheet-q, .dropdown__button, textarea.textarea, textarea.checkin-field, .guide__input, .live-chat__input):is(:focus, :focus-visible) { outline: none; border-color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-text); }
html:root body .filterbar:has(#experts-search) .search-field { height: var(--control-height); background-color: var(--color-surface); border: 1px solid var(--color-line); }
html:root body .filterbar:has(#experts-search) .search-field:hover { border-color: var(--color-line-strong); }
html:root body .filterbar:has(#experts-search) .search-field:is(:focus, :focus-visible) { outline: none; border-color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-text); }

/* Fields: one label-to-field gap, 8px (--space-2), for every field. A
   fieldset's legend doesn't take its grid's gap, so it carries it. */
html:root body .settings-field { gap: var(--space-2); }
html:root body .settings-field > legend { margin-bottom: var(--space-2); }

/* The top bar's search is the one exception to the field family: a tool
   used only when needed, so it stays quiet in the bar. A 40px pill
   (--space-10) on a subtle grey with no line at rest, a darker grey on
   hover, and on focus white with the field's ink line. */
html:root body .topbar .topbar__search input#topbar-search { height: var(--space-10); min-height: var(--space-10); border-color: transparent; background: var(--color-hover); }
html:root body .topbar .topbar__search input#topbar-search:hover { border-color: transparent; background: var(--color-control-selected); }
html:root body .topbar .topbar__search input#topbar-search:is(:focus, :focus-visible) { outline: none; border-color: var(--color-text); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-text); }

/* Learn's ebook picture always fills its part of the card (cover), the
   card's full height beside the words; 2:1 is only its minimum (a padding
   of half its width holds it). Phones keep the 220px band. */
@media (min-width: 641px) {
  html:root body .book-rec .home-rec__picture { height: auto; min-height: 0; aspect-ratio: auto; max-height: none; align-self: stretch; }
  html:root body .book-rec .home-rec__picture::before { content: ""; display: block; padding-top: 50%; }
}

/* Every Settings row, expandable or not, is padded 16px top and bottom
   (--space-4) and 20px at the sides (--space-5): the words' line height adds
   to the top and bottom, so this reads even. Closed and open alike, so the
   title and Change/Cancel never move. Inside an open row one 24px rhythm
   (--space-6): the description to the first field group (the summary's 16px
   and 8px more), between groups, and the last field to Save, which sits under
   the fields at their left edge, 24px over the row's foot; a label stays 8px
   over its field. */
html:root body .settings-row:not(.settings-edit):not(.ai-sheet__switch) { min-height: 0; padding: var(--space-4) var(--space-5); }
html:root body .settings-edit__summary { padding: var(--space-4) var(--space-5); min-height: 0; }
/* Save is a solid pill with no line-height space around it, so an open row
   keeps 24px under it (--space-6), where the title's 16px reads larger. */
html:root body .settings-edit__form { padding: calc(var(--space-6) - var(--space-4)) var(--space-5) var(--space-6); }
html:root body .settings-edit__fields { gap: var(--space-6); }
html:root body .settings-edit__actions { margin-top: var(--space-6); justify-content: flex-start; }

/* An open row's Change reads Cancel, in the same spot (closing the row drops
   what was typed); the whole top of the row is its 44px-plus hit area. */
html:root body .settings-edit__change-open { display: none; }
html:root body .settings-edit[open] .settings-edit__change-closed { display: none; }
html:root body .settings-edit[open] .settings-edit__change-open { display: inline; }
html:root body .settings-edit[open] .settings-edit__change { visibility: visible; }

/* Choice pills inside an open row start 24px under its description, as
   every field group does (they carry no margin of their own there). */
html:root body .settings-edit__fields .option-fields { margin-top: 0; }

/* One choice pill, two marks: a circle for one choice (radio), a square with
   a check for several (checkbox), drawn in our inks. */
html:root body .option-field--multi input { border-radius: 3px; }
html:root body .option-field--multi input::before { width: 10px; height: 10px; border-radius: 0; background: var(--color-surface); -webkit-mask: var(--check-mask) center / contain no-repeat; mask: var(--check-mask) center / contain no-repeat; }
html:root body .option-field--multi input:checked { background: var(--color-text); border-color: var(--color-text); }

/* The guarantee's opt-in, in the same square mark. */
html:root body .guarantee-sheet__optin input { appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center; flex: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1.5px solid var(--color-text-subtle); border-radius: 3px; background: var(--color-surface); cursor: pointer; }
html:root body .guarantee-sheet__optin input::before { content: ""; width: 10px; height: 10px; background: var(--color-surface); -webkit-mask: var(--check-mask) center / contain no-repeat; mask: var(--check-mask) center / contain no-repeat; transform: scale(0); transition: transform var(--duration-hover) var(--ease-out); }
html:root body .guarantee-sheet__optin input:checked { background: var(--color-text); border-color: var(--color-text); }
html:root body .guarantee-sheet__optin input:checked::before { transform: scale(1); }
html:root body .guarantee-sheet__optin input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* The guarantee sheet: "How it works" with room, its items 12px apart at a
   20px line; the opt-in a clearer step below it; the opt-in's square on its
   words' first line (an 18px mark centered in a 20px line). */
html:root body .guarantee-sheet__terms { gap: var(--space-4); }
html:root body .guarantee-sheet__terms ul { gap: var(--space-3); }
html:root body .guarantee-sheet__terms li { line-height: var(--leading-small); }
html:root body .guarantee-sheet__terms li::before { top: calc((var(--leading-small) - 6px) / 2); }
html:root body .guarantee-sheet__optin { align-items: flex-start; margin-top: var(--space-2); padding-top: var(--space-4); line-height: var(--leading-small); }
html:root body .guarantee-sheet__optin input { margin-top: calc((var(--leading-small) - 18px) / 2); }

/* A pill's trailing icon (play, arrow) is sized and weighted to its words:
   1em, the label's own size, and a stroke the label's weight. Phosphor's
   regular icons are filled outlines; an 8-unit stroke in their colour (on
   their 256 grid) brings the line to the bold weight, about 1.1px at 12px,
   as a medium label's stem. A leading icon (Sign out, a lesson row's Start)
   takes the same size and stroke, and never nudges on hover. */
html:root body :is(.button, .card-pill, .checkin-pill):not(:is(.favorite-icon, .icon-button, .round-play)) > svg { width: 1em; height: 1em; flex: none; stroke: currentColor; stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; overflow: visible; }

/* A secondary pill is always the secondary look, whatever size class it
   carries: "button--main" also sizes a pill (the player's Done, Again and
   Add to plan carry both), and the main pill's dark ground must never meet
   the secondary's ink words. */
html:root body .button.button--secondary.button--main { background: var(--color-surface); border-color: var(--color-line-strong); color: var(--color-text); }
html:root body .button.button--secondary.button--main:hover { background: var(--color-control-hover); border-color: var(--color-line-strong); color: var(--color-text); }

/* A disabled button stays readable: a quiet grey ground and muted words, at
   full opacity (fading the whole pill to half took its words below 4.5:1),
   whatever variant it is, busy (Saving…) too and under the pointer;
   important, since a disabled pill must never take a hover or a variant's
   ground. */
html:root body :is(.button, .card-pill):is([disabled], [aria-disabled="true"], [aria-busy="true"]), html:root body :is(.button, .card-pill):is([disabled], [aria-disabled="true"], [aria-busy="true"]):hover { opacity: 1 !important; background: var(--color-neutral-grey) !important; border-color: var(--color-line) !important; color: var(--color-text-muted) !important; cursor: default; }

/* The confirmation dialog (ui/confirm-dialog): the modals' title step, a
   muted line under it, and the modals' one footer (hairline, kept in view),
   its two pills side by side, the one that keeps things as they are to the
   left of the one that acts, padded evenly by the gap between them; on
   phones the two share the width, and the dialog keeps the page gutter. */
html:root body .confirm-dialog { width: min(480px, calc(100% - 2 * var(--gutter))); }
html:root body .confirm-dialog .checkin-dialog__body { display: flex; flex-direction: column; gap: var(--space-2); }
html:root body .confirm-dialog .confirm-dialog__text { margin: 0; }
html:root body .confirm-dialog .checkin-error { margin: var(--space-2) 0 0; }
html:root body .confirm-dialog .checkin-actions {
  position: sticky; bottom: 0; z-index: 1;
  display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: var(--space-6);
  margin: var(--space-6) calc(var(--space-8) * -1) -28px;
  padding: var(--space-6) var(--space-8);
  border-top: 1px solid var(--color-line); background: var(--color-surface);
}
html:root body .confirm-dialog .checkin-actions > .button { flex: 0 0 auto; width: auto; min-width: 120px; min-height: var(--control-height); margin: 0; padding: 0 var(--space-6); justify-content: center; }
@media (max-width: 520px) {
  html:root body .confirm-dialog .checkin-actions { margin: var(--space-5) calc(var(--space-6) * -1) calc(var(--space-6) * -1); padding: var(--space-5) var(--space-6); gap: var(--space-5); }
  html:root body .confirm-dialog .checkin-actions > .button { flex: 1 1 0; min-width: 0; padding: 0 var(--space-4); }
}

/* Up next: "Up next" as a small label over the box, and in the box the
   next lesson's own Inside the course row (number, picture, title over who
   and how long) with its pill at the end (a short verb: Continue, Start
   lesson). On phones the pill goes full width under the row's text. On the
   course page the progress bar and the box take the content's full width,
   as the hero and the lesson list do; the description keeps its reading
   width. On a lesson's complete screen the same box, Next lesson as
   its pill, centered at most 560px wide, and Done centered under it as the
   secondary pill; on phones Done full width. */
html:root body .course-hero__below { max-width: none; }
html:root body .course-hero__below > :is(.course-hero__meta, .course-hero__text) { max-width: 720px; }
html:root body .up-next { display: flex; flex-direction: column; gap: var(--space-2); }
html:root body .up-next__label { margin: 0; }
html:root body .up-next-row { margin: 0; }
html:root body .up-next-row__action { flex: none; margin-left: auto; }
@media (max-width: 640px) {
  html:root body .up-next-row__item { flex-wrap: wrap; }
  html:root body .up-next-row__item .list__main { flex: 1 1 0; }
  html:root body .up-next-row__action { flex: 1 1 100%; margin: var(--space-2) 0 0; }
  html:root body .up-next-row__action .button { width: 100%; justify-content: center; }
}
html:root body .player__up-next { width: min(560px, 100%); margin: var(--space-6) auto 0; text-align: left; }
html:root body .player__end-actions.has-next-lesson { flex-direction: row; justify-content: center; align-items: center; }
html:root body .player__end-actions.has-next-lesson .button { width: auto; flex: 0 0 auto; }
@media (max-width: 640px) {
  html:root body .player__end-actions.has-next-lesson { flex-direction: column; align-items: stretch; }
  html:root body .player__end-actions.has-next-lesson .button { width: 100%; }
}

/* Every lesson row (Inside the course, Up next, a lesson's complete screen,
   the session page's course list): the picture and the text start at the
   top, and the text centers itself, so a text shorter than the picture sits
   centered beside it and a taller one runs down from the picture's top,
   never above and below it. The number circle is centered on the picture
   whatever its size (--lesson-thumb). Every row has the same padding on
   all four sides, at every width (--space-4). */
html:root body .lesson-row { --lesson-thumb: 48px; align-items: flex-start; padding: var(--space-4); }
html:root body .part-of__row > .lesson-row { padding-right: 0; }
@media (max-width: 640px) {
  /* Every lesson row keeps its picture size at every width (48px; a lesson
     page's course list 64px). */
  html:root body .lesson-row .step__thumb { width: var(--lesson-thumb); height: var(--lesson-thumb); }
}
html:root body .part-of .lesson-row { --lesson-thumb: 64px; }
html:root body .lesson-row .step__thumb { align-self: flex-start; }
html:root body .lesson-row .step-number { align-self: flex-start; margin-top: calc((var(--lesson-thumb) - var(--space-6)) / 2); }
html:root body .lesson-row .list__main { align-self: center; }
html:root body .lesson-row .up-next-row__action { align-self: center; }

/* Focus rings are for the keyboard only (app.js marks the page after a Tab,
   html.is-keyboard): a pressable focused by a click, or by a script after
   one (the player's Done when a session ends), shows none. */
html:root:not(.is-keyboard) body :is(.button, .card-pill, .round-play, .icon-button, .favorite-icon, .card__enter, .link-arrow, .card-action, .text-link, .card-link, .filter, a.chip, .checkin-chip):focus-visible { outline: none; box-shadow: none; }

/* Home's Twin card: its figure is drawn on white; multiplied, the white takes
   the card's own ground at rest and on hover, so no box shows behind it. */
html:root body .quick-space__twin { mix-blend-mode: multiply; border-radius: 0; }

/* Home's Recommended, brought by a check-in, arrives as an expand (app.js):
   its row opens from its old height to its new one while it fades in, both
   over --duration-expand with --ease-out, so nothing below jumps; when it
   changes What's new's shape (the two sharing a row), the row fades out and
   opens back whole. Under reduced motion it is simply there. */

/* Discover's tools above a filter's list (its search field) keep their gap
   only when something in them shows: a short list (Challenges, Coaching)
   starts the heading's gap under its heading, as the others do. */
html:root body .filter-tools:not(:has(> :not([hidden], .visually-hidden))) { margin-bottom: 0; }

/* Tap targets (DESIGN-SYSTEM.md, Tap targets): on phones every target is at
   least --control-height (44px) in each direction. A target that must stay
   small to the eye (a tag, a back link, a text action, a switch) keeps its
   look and gets an invisible area centered on it; rows and pills that can
   grow, grow. Desktop is unchanged. */
@media (max-width: 640px) {
  html:root body :is(a.chip, .back-link, .checkin-status, .ci-suggest__action, .switch, .part-of__start, .topbar__logo) { position: relative; }
  html:root body :is(a.chip, .back-link, .checkin-status, .ci-suggest__action, .switch, .part-of__start, .topbar__logo)::after,
  html:root body :is(.notice__dismiss, .link-arrow, .expert-link, .text-link, .day-feature__title, .footer a, .card__save-button, .twin-rail__button, .profile-pill)::before {
    content: ""; position: absolute; inset: auto; left: 50%; top: 50%;
    width: max(100%, var(--control-height)); height: max(100%, var(--control-height));
    transform: translate(-50%, -50%);
  }
  /* A row of tags hides the ones that don't fit across, and lets their tap
     areas reach above and below. */
  html:root body :is(.chip-row--fit, .card__expert) { overflow-x: clip; overflow-y: visible; }
  /* A card's expert name sits 5px under the card's title and above its tags:
     its area fills that room (4px up, 16px down) and covers neither. */
  html:root body .card .expert-link::before { top: calc(var(--space-1) * -1); bottom: calc(var(--space-4) * -1); left: 0; right: 0; width: auto; height: auto; transform: none; }
  html:root body .account-menu :is(a, button) { min-height: var(--control-height); }
  html:root body :is(.notice__actions, .settings-edit__actions) .button--small { height: var(--control-height); min-height: var(--control-height); }
  /* A row that scrolls sideways is swiped on a phone: its arrows (Discover's
     filters) sat over the row's own targets, so they go. */
  html:root body .hscroll__button { display: none; }
}

/* Disclosure (DESIGN-SYSTEM.md, Disclosure): every expandable list (a coach's
   FAQ, the check-in's sliders, Progress's levels) is a native details whose
   summary is the whole row, at least --control-height, with our Phosphor
   caret at its right end, turning when open; the answer starts where the
   question does. The opening and closing are the details' own (above), none
   under reduced motion. */
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: var(--control-height); list-style: none; cursor: pointer;
  transition: color var(--duration-hover) var(--ease-out);
}
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary::-webkit-details-marker { display: none; }
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary::after {
  content: ""; flex: none; width: 16px; height: 16px;
  background: var(--color-text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--duration-expand) var(--ease-out), background-color var(--duration-hover) var(--ease-out);
}
html:root body :is(.faq__item, .checkin-sliders, .levels-all)[open] > summary::after { transform: rotate(180deg); }
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary:hover { color: var(--color-text); }
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary:hover::after { background: var(--color-text); }
html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-nested-tight); }
html:root:not(.is-keyboard) body :is(.faq__item, .checkin-sliders, .levels-all) > summary:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  html:root body :is(.faq__item, .checkin-sliders, .levels-all) > summary::after { transition: none; }
}

/* One quiet scrollbar for every scrolling panel (DESIGN-SYSTEM.md,
   Scrollbars): the side menu, modals and sheets, My Twin's sheets, the
   dropdown list, the Guide's conversations and messages, live chat, the bell
   panel, the phone menu and search sheet, the session complete screen.
   Unweighted (:where), so the rows that hide their scrollbar keep it hidden;
   the page's own scrollbar stays the browser's. Browsers with
   ::-webkit-scrollbar draw it 6px; Firefox takes the thin standard one. */
@supports selector(::-webkit-scrollbar) {
  /* In every scrolling panel the thumb (--scrollbar-size) sits --space-1 in
     from the edge, a transparent border around it, and its track stops
     --space-2 short of each end, clear of a rounded corner, so it reads as
     part of the panel and never touches its edge. */
  /* A panel that names its right padding as --scrollbar-room gives that
     room to the scrollbar, the thumb centred in it: as far from the panel's
     edge as from the content (the panel's own rules below). */
  :where(body *)::-webkit-scrollbar { width: var(--scrollbar-room, calc(var(--scrollbar-size) + 2 * var(--space-1))); height: calc(var(--scrollbar-size) + 2 * var(--space-1)); }
  :where(body *)::-webkit-scrollbar-track, :where(body *)::-webkit-scrollbar-corner { background: transparent; }
  :where(body *)::-webkit-scrollbar-track { margin: var(--space-2); }
  :where(body *)::-webkit-scrollbar-thumb { border: var(--space-1) solid transparent; border-inline-width: calc((var(--scrollbar-room, calc(var(--scrollbar-size) + 2 * var(--space-1))) - var(--scrollbar-size)) / 2); border-radius: var(--radius-round); background: var(--scrollbar-thumb); background-clip: padding-box; }
  :where(body *)::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
  /* A standard scrollbar setting would take over from the drawn one. */
  html:root body .dropdown__list { scrollbar-width: auto; scrollbar-color: auto; }
}
@supports not selector(::-webkit-scrollbar) {
  :where(body *) { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
}

/* The Guide's conversations: the panel holds still and only the list
   scrolls, so New conversation, the title and the way to a coach keep their
   size however long the list grows. */
html:root body .guide__side { overflow: hidden; }
html:root body .guide__side > :not(.guide__list) { flex-shrink: 0; }
/* Two hairlines, always shown, inside the panel's padding: under the
   list's label and above the way to a coach. The list's scroll area runs
   from one line to the other, with the panel's gap (--space-3) inside it as
   padding, so the conversations scroll up to each line and are cut there,
   and at rest the first and last sit --space-3 from the lines. */
html:root body .guide__side { --side-pad-x: var(--space-4); }
html:root body .guide.is-history-open .guide__side { --side-pad-x: var(--gutter); }
html:root body .guide__side-title { padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-line); }
html:root body :is(.guide__list, .guide__none) { flex: 1 1 auto; min-height: 0; margin-top: calc(var(--space-3) * -1); padding-block: var(--space-4); }
/* The list reaches into the panel's right padding, its scrollbar kept in a
   stable gutter there, so the rows hold the button's and the dividers' edges
   whether or not it scrolls, and the bar never touches them. */
html:root body .guide__list { overflow-y: auto; margin-right: calc(var(--side-pad-x) * -1); padding-right: calc(var(--side-pad-x) - var(--scrollbar-size) - 2 * var(--space-1)); scrollbar-gutter: stable; }
@supports not selector(::-webkit-scrollbar) {
  html:root body .guide__list { padding-right: calc(var(--side-pad-x) - var(--scrollbar-size)); }
}
html:root body .guide__human { margin-top: calc(var(--space-3) * -1); padding-top: var(--space-4); border-top: 1px solid var(--color-line); }

/* The rows run the panel's full inner width; the current one's line is
   drawn inside it, so the list's edge never cuts it. A hovered row takes the
   controls' neutral grey. */
html:root body .guide__convo[aria-current] { box-shadow: inset 0 0 0 1px var(--color-line); }
html:root body .guide__convo:hover { background: var(--color-control-hover); }
html:root body .guide__convo:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }

/* On phones the Guide's card ends the side gap above the window's bottom,
   clear of the home bar; it is sized to the small viewport, so an open
   keyboard doesn't resize it. The title takes the header's room: the Guide's
   mark is left out, the app's logo being right above it. */
@media (max-width: 640px) {
  html:root body .guide__panel { height: calc(100svh - var(--topbar-height) - var(--space-8) - var(--gutter) - env(safe-area-inset-bottom)); }
  html:root body .guide__mark { display: none; }
}

/* A conversation's "…" menu: the account menu's look, compact, anchored to
   its button and floating above everything (guide.js places it), so the
   scrolling list never clips it. Delete keeps the danger color and asks
   first. */
html:root body .guide__menu {
  position: fixed; top: 0; left: 0; right: auto; z-index: 50;
  width: max-content; max-width: min(280px, calc(100vw - 2 * var(--gutter)));
  padding: 0; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius-nested);
  background: var(--color-surface); box-shadow: var(--shadow-raised);
  animation: menu-in var(--duration) var(--ease-out);
}
/* The item fills the menu edge to edge, in the rows' size; only its words
   and icon are in the danger color. */
html:root body .guide__menu-item { gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: 0; background: none; font-size: var(--text-sm); }
html:root body .guide__menu-item:hover { background: var(--color-control-hover); }
html:root body .guide__menu-item:focus-visible { background: var(--color-control-hover); outline: 2px solid var(--color-focus); outline-offset: -2px; }
@media (max-width: 640px) { html:root body .guide__menu-item { min-height: var(--control-height); } }
html:root body .guide__menu [data-guide-menu-ask] { padding: var(--space-3); }
html:root body .guide__menu p { margin: 0 0 var(--space-3); font-size: var(--text-sm); }
html:root body .guide__menu .guide__confirm-actions { padding: 0; }
html:root:not(.is-keyboard) body .guide__menu-item:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { html:root body .guide__menu { animation: none; } }

/* What the Guide offers to click shows its hover: the suggestions take the
   controls' (chip) hover; every one of them, and the session cards, the
   keyboard-only focus ring. */
html:root body button.guide__prompt:hover { background: var(--color-control-hover); border-color: var(--color-line-strong); }
html:root body :is(a.guide-session, button.guide__prompt):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
html:root:not(.is-keyboard) body :is(a.guide-session, button.guide__prompt):focus-visible { outline: none; }

/* A sheet that slides in from the side at full height meets the window's
   edges, so it has square corners; on phones it comes from below, with the
   bottom sheet's rounded top. */
html:root body .side-sheet { border-radius: 0; }
@media (max-width: 640px) {
  html:root body .side-sheet { border-radius: var(--radius) var(--radius) 0 0; }
}

/* My Twin's sheets: the close button floats in the corner instead of a bar
   of its own, so the eyebrow starts at the sheet's padding and nothing
   empty sits above it; the title keeps clear of the button. */
html:root body .twin-sheet__bar { height: 0; padding: 0; overflow: visible; background: none; }
html:root body .twin-sheet__bar .icon-button { margin: var(--space-3) var(--space-3) 0 0; background: var(--color-surface); }
html:root body .twin-sheet__body { padding-top: var(--space-6); }
html:root body .twin-sheet__head { padding-right: var(--control-height); }

/* An area's days read as the rows the sheet opened from: the date at the
   left, the state at the right, its word then the Endor square (12px, 2px
   corners), at the rows' size. Today is first and in ink, its word medium;
   the past days are quieter, as past states are in the panel. */
html:root body .twin-sheet__days li { grid-template-columns: minmax(0, 1fr) auto; min-height: var(--control-height); padding-block: var(--space-2); }
html:root body .twin-sheet__date { font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .twin-sheet__days .area-state { justify-content: flex-end; font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .twin-sheet__days li.is-today :is(.twin-sheet__date, .area-state) { color: var(--color-text); }
html:root body .twin-sheet__days li.is-today .area-state > span { font-weight: var(--weight-medium); }

/* Dialog motion (app.js setupDialogMotion plays the exit before closing).
   A side sheet slides in fully from its edge, from the right on a desktop
   and from below on a phone, its backdrop fading in step; it leaves the way
   it came, a little faster. Under reduced motion, a short fade only. */
@keyframes dialog-fade-in { from { opacity: 0; } }
@keyframes dialog-fade-out { to { opacity: 0; } }
@keyframes side-sheet-in { from { transform: translateX(100%); } }
@keyframes side-sheet-out { to { transform: translateX(100%); } }
@keyframes bottom-sheet-in { from { transform: translateY(100%); } }
@keyframes bottom-sheet-out { to { transform: translateY(100%); } }
html:root body dialog.side-sheet[open] { animation: side-sheet-in var(--duration-expand) var(--ease-out); }
html:root body dialog.side-sheet[open]::backdrop { animation: dialog-fade-in var(--duration-expand) var(--ease-out); }
html:root body dialog.side-sheet.is-closing { animation: side-sheet-out var(--duration-page) var(--ease-in-out) forwards; }
html:root body dialog.side-sheet.is-closing::backdrop { animation: dialog-fade-out var(--duration-page) var(--ease-in-out) forwards; }
@media (max-width: 640px) {
  html:root body dialog.side-sheet[open] { animation-name: bottom-sheet-in; }
  html:root body dialog.side-sheet.is-closing { animation-name: bottom-sheet-out; }
}
/* !important: the global reduced-motion rule stops every animation with it,
   and the short fade is the one kept. */
@media (prefers-reduced-motion: reduce) {
  html:root body dialog.side-sheet[open], html:root body dialog.side-sheet[open]::backdrop { animation: dialog-fade-in var(--duration-hover) var(--ease-out) !important; }
  html:root body dialog.side-sheet.is-closing, html:root body dialog.side-sheet.is-closing::backdrop { animation: dialog-fade-out var(--duration-hover) var(--ease-out) forwards !important; }
}

/* Every other dialog moves by its kind, through the same exit mechanism.
   A centred modal (the check-in and its dialogs, the plan and arrange
   sheets, the AI and guarantee sheets, confirmations, the app modal, the
   tour player, the search sheet on a desktop) fades in with a small rise
   and fades out with a small fall, a little faster; its backdrop in step. */
@keyframes modal-in { from { opacity: 0; transform: translateY(var(--space-2)); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(var(--space-1)); } }
html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet)[open] { animation: modal-in var(--duration-expand) var(--ease-out); }
html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet)[open]::backdrop { animation: dialog-fade-in var(--duration-expand) var(--ease-out); }
html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet).is-closing { animation: modal-out var(--duration-page) var(--ease-in-out) forwards; }
html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet).is-closing::backdrop { animation: dialog-fade-out var(--duration-page) var(--ease-in-out) forwards; }
/* On a phone the search sheet fills the screen: it only fades. */
@media (max-width: 640px) {
  html:root body dialog.search-sheet[open] { animation-name: dialog-fade-in; }
  html:root body dialog.search-sheet.is-closing { animation-name: dialog-fade-out; }
}
@media (prefers-reduced-motion: reduce) {
  html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet)[open],
  html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet)[open]::backdrop { animation: dialog-fade-in var(--duration-hover) var(--ease-out) !important; }
  html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet).is-closing,
  html:root body dialog:is(.checkin-dialog, .app-modal, .tour-player, .search-sheet).is-closing::backdrop { animation: dialog-fade-out var(--duration-hover) var(--ease-out) forwards !important; }
}

/* The side panels that are not dialogs, on narrow screens: the menu, and
   the Guide's conversations on phones, slide in from the left over
   --duration-expand and back out a little faster; the menu's scrim fades
   in step (it stays laid out while closed, invisible and not clickable). */
@media (max-width: 960px) {
  html:root body .sidebar { transition: transform var(--duration-page) var(--ease-in-out); }
  html:root body.menu-open .sidebar { transition: transform var(--duration-expand) var(--ease-out); }
  html:root body .scrim { display: block; position: fixed; inset: var(--topbar-height) 0 0 0; z-index: 30; background: var(--color-scrim); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--duration-page) var(--ease-in-out), visibility 0s linear var(--duration-page); }
  html:root body:is(.menu-open, .bell-open) .scrim, html:root body:has(.topbar details[open]) .scrim { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--duration-expand) var(--ease-out), visibility 0s; }
}
@media (max-width: 640px) {
  html:root body .scrim { inset: var(--topbar-height) 0 0 0; }
  html:root body.menu-open .scrim { z-index: 44; }
}
@media (max-width: 860px) {
  html:root body .guide__side { display: flex; position: fixed; inset: var(--topbar-height) 0 0 0; z-index: 46; max-height: none; padding: var(--space-4) var(--gutter) var(--space-8); border-radius: 0; background: var(--color-bg); transform: translateX(-100%); visibility: hidden; transition: transform var(--duration-page) var(--ease-in-out), visibility 0s linear var(--duration-page); }
  html:root body .guide.is-history-open .guide__side { transform: none; visibility: visible; transition: transform var(--duration-expand) var(--ease-out), visibility 0s; }
}
/* Under reduced motion they only fade (!important: the global rule stops
   every transition). */
@media (prefers-reduced-motion: reduce) and (max-width: 960px) {
  html:root body .sidebar { transform: none; opacity: 0; visibility: hidden; transition: opacity var(--duration-hover) var(--ease-out), visibility 0s linear var(--duration-hover) !important; }
  html:root body.menu-open .sidebar { opacity: 1; visibility: visible; transition: opacity var(--duration-hover) var(--ease-out), visibility 0s !important; }
  html:root body .scrim { transition: opacity var(--duration-hover) var(--ease-out), visibility 0s linear var(--duration-hover) !important; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 860px) {
  html:root body .guide__side { transform: none; opacity: 0; transition: opacity var(--duration-hover) var(--ease-out), visibility 0s linear var(--duration-hover) !important; }
  html:root body .guide.is-history-open .guide__side { opacity: 1; transition: opacity var(--duration-hover) var(--ease-out), visibility 0s !important; }
}

/* A small notice (the 20px icon, the Guide's "Your Guide uses AI"): the
   title's line is the body's (--leading-body), and the icon's box with it,
   so the icon stays centred on the title without a 32px line adding air
   under it. Stacked, the title and its words read as one group (--space-1
   between them) and the actions sit clearly apart (--space-4 above them). */
html:root body .notice--small-icon .notice__title { line-height: var(--leading-body); }
html:root body .notice--small-icon .notice__icon { height: var(--leading-body); }
@container (max-width: 959.98px) {
  html:root body .notice--small-icon .notice__body { row-gap: var(--space-1); }
  html:root body .notice--small-icon .notice__actions { margin-top: var(--space-3); }
}

/* Settings' times (settings.clj time-field): the label as the other fields'
   labels; the browser's time field until app.js picks the dropdown on wider
   screens, the dropdown in the same width as the time field it replaces. */
html:root body .time-field > label { font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .time-field__menu { display: none; }
html:root body .time-field.is-menu .time-field__menu { display: block; }
html:root body .time-field.is-menu .time-field__native { display: none; }

/* The check-in once today has one: Remove today's check-in alone at the far
   left (a removal, DESIGN-SYSTEM.md Modal footers), Check-in history at the
   right; both text links, 44px to the touch on phones. */
html:root body dialog .checkin-actions.checkin-today { justify-content: space-between; }
@media (max-width: 640px) {
  html:root body .checkin-today .checkin-remove > .text-link { display: inline-flex; align-items: center; min-height: var(--control-height); }
}

/* My Twin's figure card while Worlds is hidden: no world picture, a dark
   neutral ground (the deep earth, deepening toward the foot) under the same
   shade, so the figure's light and the white words and controls read as
   before; the card's frame and corners unchanged. */
html:root body .twin-stage__panel {
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(20, 18, 16, 0.5), rgba(20, 18, 16, 0.38) 26%, rgba(20, 18, 16, 0.5) 70%, rgba(20, 18, 16, 0.78)),
    radial-gradient(120% 80% at 50% 38%, color-mix(in srgb, var(--color-surface-dark), var(--color-text-on-dark) 8%), var(--color-surface-dark) 60%, color-mix(in srgb, var(--color-surface-dark), var(--brand-black) 45%));
}
/* The light behind the figure breathes: one calm breath (--duration-breath),
   a little brighter and wider on the in-breath, never more than a glow; only
   this light moves. Under the card's words and controls (isolation, z -1);
   still under reduced motion. */
html:root body .twin-stage__panel::before {
  content: ""; position: absolute; z-index: -1; inset: 14% 8% 10%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-text-on-dark) 13%, transparent), color-mix(in srgb, var(--color-text-on-dark) 4%, transparent) 60%, transparent);
  opacity: 0.6; transform: scale(0.95);
  animation: twin-breath var(--duration-breath) var(--ease-in-out) infinite;
}
@keyframes twin-breath { 50% { opacity: 1; transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) {
  html:root body .twin-stage__panel::before { animation: none; opacity: 0.8; transform: none; }
}

/* The check-in's summary hero, as the mobile app 2.0's check-in summary and
   the share image draw it: the five areas' picture clear, under the share
   image's own shade (a light wash, deeper at the top and the foot), the
   quote, the shape and its labels in light inks. Without a picture it keeps
   its light ground and ink. */
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) .ci-sum__hero-art { inset: 0; width: 100%; height: 100%; filter: none; }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden]))::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.55) 100%),
    rgba(0, 0, 0, 0.2);
}
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) :is(.ci-sum__hero-quote, .ci-sum__hero-feel) { color: var(--color-text-on-dark); }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) .checkin-radar__ring { stroke: color-mix(in srgb, var(--color-text-on-dark) 22%, transparent); }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) .checkin-radar__spoke { stroke: color-mix(in srgb, var(--color-text-on-dark) 22%, transparent); }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) .checkin-radar__shape { fill: color-mix(in srgb, var(--color-text-on-dark) 24%, transparent); stroke: color-mix(in srgb, var(--color-text-on-dark) 90%, transparent); }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) .checkin-radar__label { color: var(--color-text-on-dark); }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) .checkin-radar__word { color: var(--color-text-on-dark-muted); }
html:root body .ci-sum__hero:has(.ci-sum__hero-art:not([hidden])) :is(.ci-sum__hero-change, .ci-sum__hero-change a, .ci-sum__hero .text-link) { color: var(--color-text-on-dark-muted); }

/* Rate this session (session-player.js), as the mobile app 2.0's summary:
   a quiet question over three round buttons (dislike, like, love), the one
   given filled in ink, as a pressed control is. */
html:root body .player__rate { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); margin: var(--space-2) 0 var(--space-6); }
html:root body .player__rate[hidden] { display: none; }
html:root body .player__rate-title { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .player__rate-options { display: flex; gap: var(--space-3); }
html:root body .player__rate-option { border: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-text); }
html:root body .player__rate-option:hover { border-color: var(--color-line-strong); background: var(--color-control-hover); }
html:root body .player__rate-option[aria-pressed="true"] { border-color: var(--color-text); background: var(--color-text); color: var(--color-surface); }

/* Every state square, large or small (My Twin's sheets, the areas panel,
   How you felt, the week squares), carries the same discreet inner edge
   (--color-line): a dark square looks unchanged, the lightest (Strong,
   near white) keeps an edge on white. */
html:root body :is(.area-state__dot, .area-week__day) { box-shadow: inset 0 0 0 1px var(--color-line); }

/* A sheet's line under its title breaks evenly (no word alone on its last
   line), within the sheet's own measure; the title, short, is balanced. */
html:root body .twin-sheet__line { text-wrap: pretty; }
html:root body .twin-sheet__title { text-wrap: balance; }

/* The check-in's today footer gives way while a new answer's kept footer
   shows (it comes back when the check-in opens again). */
html:root body .checkin-dialog:has([data-ci-kept-actions]:not([hidden])) [data-ci-today-actions] { display: none; }

/* A row that scrolls sideways scrolls only sideways (the cards' rows, the
   hscroll tracks, Discover's filters, Living World's map). An axis left to
   scroll on its own would follow the invisible 44px tap areas that reach
   past the cards (a chip's at a card's foot, 12px below the row), so the
   row hides its vertical overflow and makes room for those areas inside
   itself with --space-3 above and below, given back by an equal negative
   margin: nothing moves and every tap area stays whole. The filters and the
   map keep their own spacing; nothing reaches past them. */
html:root body :is(.carousel, .hscroll > :first-child, .filters, .lw-map__scroll) { overflow-y: hidden; }
html:root body :is(.carousel, .hscroll > :first-child:not(.filters)) { padding-block: var(--space-3); margin-block: calc(var(--space-3) * -1); }

/* Scrolling panels give their right padding to the scrollbar (the shared
   scrollbar rule centres the thumb in it): the gutter is always kept, so
   the content sits where the padding put it, scrolling or not, and never
   moves when the scrollbar comes. Where scrollbars aren't drawn (Firefox),
   the padding stays. */
@supports selector(::-webkit-scrollbar) {
  html:root body .guide__messages { --scrollbar-room: var(--space-6); scrollbar-gutter: stable; padding-right: 0; }
  html:root body .twin-sheet { --scrollbar-room: var(--space-6); scrollbar-gutter: stable; }
  html:root body .twin-sheet__body { padding-right: 0; }
  /* The close button stays in the sheet's corner, over the gutter; the
     thumb starts below it. */
  html:root body .twin-sheet__bar { margin-right: calc(var(--scrollbar-room) * -1); }
  html:root body .twin-sheet::-webkit-scrollbar-track { margin-top: calc(var(--space-3) + var(--control-height)); }
  html:root body .bell-panel__scroll { --scrollbar-room: var(--space-4); scrollbar-gutter: stable; padding-right: 0; }
  html:root body .guide__list { --scrollbar-room: var(--side-pad-x); padding-right: 0; }
}
@supports selector(::-webkit-scrollbar) {
  @media (max-width: 860px) { html:root body .guide__messages { --scrollbar-room: var(--space-4); } }
  @media (max-width: 640px) { html:root body .twin-sheet { --scrollbar-room: var(--space-4); } }
}

/* The Guide's conversations button, where it shows (860px and narrower):
   the title alone at the left (ending in an ellipsis before it reaches the
   link), Conversations with its icon at the right as a text link (the text
   links' size, --text-sm, and their 14px icon; in ink, the links' hover),
   its 44px tap area invisible on phones (the shared phone rule for text
   links). */
@media (max-width: 860px) {
  html:root body .guide__head .guide__title { flex: 1 1 auto; min-width: 0; order: 1; }
  html:root body .guide__head .guide__mark { order: 0; }
  html:root body .text-link.guide__history-open { order: 2; flex: none; display: inline-flex; align-items: center; gap: var(--space-2); margin-left: 0; padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); white-space: nowrap; cursor: pointer; }
  /* In ink, at rest and on hover: the standalone text links' muted colour
     (app.css, html:root body .text-link:not(…)) is outranked here only. */
  html:root body .guide__panel .guide__head .text-link.guide__history-open.guide__history-open { color: var(--color-text); }
}

/* Removing today's check-in from inside the check-in: the footer row turns
   into the question, never a modal over the modal. The question in the
   modal's title face at the body size, its cost muted under it, then Keep it
   (Secondary) and Remove (Main) at the right, per the modal footer rule; the
   row grows to fit, the content above stays and scrolls. */
html:root body dialog .checkin-actions.checkin-today.is-asking { display: block; }
html:root body .checkin-today.is-asking > :not(.checkin-remove),
html:root body .checkin-today.is-asking .checkin-remove > [data-ci-remove] { display: none; }
html:root body .checkin-today__ask[hidden] { display: none; }
html:root body .checkin-today__ask { display: flex; flex-direction: column; gap: var(--space-2); text-align: center; }
html:root body .checkin-today__question { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--color-text); }
/* The question's line trimmed to its capitals, so they start the footer's
   padding (--space-4) under its top, as the pills end the same padding
   above its bottom. */
html:root body .checkin-today__question { text-box: trim-both cap alphabetic; }
html:root body .checkin-today__cost { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .checkin-today__ask .checkin-error { margin: 0; }
html:root body .checkin-today__actions { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-3); }
html:root body .checkin-today__actions > .button { min-height: var(--control-height); }
@media (max-width: 640px) {
  html:root body .checkin-today__actions > .button { flex: 1 1 0; justify-content: center; }
}

/* The shared confirmation dialog is centred (its title and text), so its
   two pills are too, as a centred dialog's actions are (the check-in's
   Done). */
html:root body .confirm-dialog .checkin-actions { justify-content: center; }
/* Its title, its line and its error line centred too, the same wherever
   it opens (My Twin's Remove, Plan's Leave the Journey). */
html:root body .confirm-dialog :is(.checkin-step__title, .confirm-dialog__text, .checkin-error) { text-align: center; }
/* !important: the modal footer rule pushes its first pill to the right
   with an !important margin, which a centred dialog undoes. */
html:root body dialog.confirm-dialog.checkin-dialog .checkin-actions.checkin-actions > .button.button { margin-left: 0 !important; }
html:root body .checkin-today.is-asking .checkin-remove { display: block; width: 100%; }

/* The check-in's footer has one padding in every state (the two links, the
   question with its pills, a new answer's Not now and pill): the modal
   footer's, --space-6 (--space-5 on phones), measured to what is seen. The
   links' words are trimmed to their capitals and baseline and keep no
   minimum height (their 44px tap areas stay, invisible, on phones); the
   arrow's 14px icon (ui/arrow-link) gives back what it is taller than the
   capitals, so it adds no height. Inside the question, smaller gaps keep it
   one group: --space-2 from the question to its line, --space-4 from the
   line to the pills. */
html:root body .checkin-dialog .checkin-step[data-ci-step] > .checkin-actions:is(.checkin-today, [data-ci-kept-actions]) { padding-block: var(--space-6); }
@media (max-width: 640px) {
  html:root body .checkin-dialog .checkin-step[data-ci-step] > .checkin-actions:is(.checkin-today, [data-ci-kept-actions]) { padding-block: var(--space-5); }
}
html:root body dialog .checkin-actions:is(.checkin-today, [data-ci-kept-actions]) :is(.text-link, .link-arrow) { min-height: 0; line-height: 1cap; text-box: trim-both cap alphabetic; }
/* (a button's words aren't trimmed, so the line itself is the capitals'
   height: for Inter, whose ascent less its descent is its cap height, the
   capitals then fill it exactly.) The remove link's wrapper keeps no line
   of its own. */
html:root body .checkin-today > .checkin-remove { display: flex; align-items: center; }
html:root body dialog .checkin-actions:is(.checkin-today, [data-ci-kept-actions]) .link-arrow > svg { margin-block: calc((1cap - 14px) / 2); }
html:root body .checkin-today__ask { gap: 0; }
html:root body .checkin-today__cost { margin-top: var(--space-3); text-box: trim-both cap alphabetic; }
html:root body .checkin-today__ask .checkin-error { margin-top: var(--space-2); }
html:root body .checkin-today__actions { margin-top: var(--space-4); }
/* The two links stay one row at every width (they fit at 360): stacked,
   their invisible 44px tap areas would overlap now that each is only as
   tall as its capitals. (!important: the phones' footer rule stacks with it.) */
html:root body dialog .checkin-actions.checkin-today:not(.is-asking) { flex-direction: row !important; flex-wrap: nowrap; align-items: center; }
html:root body dialog .checkin-actions.checkin-today :is([data-ci-remove], .link-arrow) { white-space: nowrap; }
@media (max-width: 640px) {
  html:root body dialog .checkin-actions.checkin-today:not(.is-asking) { column-gap: var(--space-4); }
}

/* A footer stacked on phones (a pill on its own line over its text link,
   app.js .is-stacked) keeps the two 44px tap areas fully apart and still one
   group: --space-5 from the pill to the link's capitals (the link's words
   trimmed and its box no taller than them, its tap area invisible). Half a
   44px area reaches 17.5px past 9px of words, so 20px leaves them apart. */
@media (max-width: 640px) {
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions).is-stacked { row-gap: var(--space-5); }
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions).is-stacked > :is(.text-link, .link-arrow) { min-height: 0; line-height: 1cap; text-box: trim-both cap alphabetic; }
}

/* Modal footers, one padding for every modal: --space-6 (--space-5 on
   phones) from the hairline to a pill's edge or the words' capitals, and
   from the last pill edge or baseline to the bottom. Text links add no
   height (their words trimmed to the capitals; their tap areas stay,
   invisible). The quick step's inline actions and the end's centered Done
   are no footers. */
html:root body dialog { --modal-foot-pad: var(--space-6); }
@media (max-width: 640px) { html:root body dialog { --modal-foot-pad: var(--space-5); } }
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions):not(.checkin-step[data-ci-step="feel"] > .checkin-actions:not(.checkin-actions--end), .checkin-kept .checkin-actions) {
  padding-block: var(--modal-foot-pad);
}
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions):not(.checkin-step[data-ci-step="feel"] > .checkin-actions:not(.checkin-actions--end), .checkin-kept .checkin-actions) > :is(.text-link, .link-arrow) {
  min-height: 0; line-height: 1cap; text-box: trim-both cap alphabetic;
}
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > :is(.text-link, .link-arrow) > svg { margin-block: calc((1cap - 14px) / 2); }
/* A footer's pills are the one pill size, 44px, at least 120px wide (an
   older block gave the sheets 48px and 148px). */
html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button { min-height: var(--control-height); height: var(--control-height); }
@media (min-width: 641px) {
  html:root body dialog :is(.checkin-actions, .note-dialog__actions, .arrange-sheet__actions, .plan-sheet__actions, .ci-share__actions) > .button { min-width: 120px; }
}

/* Plan while a journey runs, as the mobile app 2.0's (personal.clj
   `journey-today`): today's step a panel, its picture (64px, the lesson
   thumb's corners and ground) beside Today, the session and its details,
   the round play at the end; under a hairline its alternatives as small
   secondary pills, or the swap line with Undo. The day's rules around it
   are quiet rows: the time, the icon, the words. */
html:root body .plan-step { display: flex; flex-direction: column; gap: var(--space-4); }
html:root body .plan-step__row { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
html:root body .plan-step__thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: var(--radius-nested); overflow: hidden; background: var(--color-surface-warm); outline: 1px solid var(--color-line); outline-offset: -1px; }
html:root body .plan-step__thumb img { width: 100%; height: 100%; object-fit: cover; }
html:root body .plan-step__words { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 auto; min-width: 0; }
html:root body .plan-step__title { font-weight: var(--weight-medium); color: var(--color-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root body a.plan-step__title:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html:root body .plan-step__meta { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .plan-step__play { flex: none; }
html:root body .plan-step__play { border: 1px solid var(--color-line); }
html:root body .plan-step__swap { padding-top: var(--space-4); border-top: 1px solid var(--color-line); }
html:root body .plan-step__alts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
html:root body .plan-step__line { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .plan-step__line .text-link { padding: 0; border: 0; background: none; font: inherit; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html:root body .plan-step__swap .checkin-error { margin: var(--space-2) 0 0; }
html:root body .plan-rhythm { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0 var(--space-1); list-style: none; }
html:root body .plan-rhythm__row { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-base); color: var(--color-text-muted); }
html:root body .plan-rhythm__time { flex: none; min-width: 3em; font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-text-subtle); }
html:root body .plan-rhythm__icon { display: inline-flex; flex: none; color: var(--color-text-subtle); }
html:root body .plan-today { gap: var(--space-4); }

/* A first Daily plan's goals (the app's first goals step): each goal its
   icon, its words and a quieter line under them, the check at the left. */
html:root body .goal--first { align-items: center; }
html:root body .goal__icon { display: inline-flex; flex: none; color: var(--color-text-muted); }
html:root body .goal__words { display: flex; flex-direction: column; gap: 2px; }
html:root body .goal__text { font-size: var(--text-sm); color: var(--color-text-muted); }

/* My Twin's notes of their own: Edit and Delete in a "…" at the note's
   right, the Guide's conversation menu (its button, shown on hover or
   focus, always on phones with a 44px tap area; its floating menu, Edit in
   ink, Delete in the danger color). A check-in's words say where they come
   from instead, quietly. Edited in place, the field (the notes field) with
   Cancel at the left and Save at the right (the in-place edit rule); See
   all under the list. */
html:root body .twin-moments__note-actions { grid-column: 2; grid-row: 1; align-self: start; }
html:root body .twin-moments__note-actions[hidden] { display: none; }
html:root body .twin-moments__item .guide__more.twin-moments__more { position: relative; top: auto; right: auto; transform: none; }
html:root body .twin-moments__item:is(:hover, :focus-within, .is-open) .twin-moments__more { opacity: 1; }
html:root body .twin-moments__item.is-open .twin-moments__more { background: var(--color-control-hover); color: var(--color-text); }
html:root body .twin-moments__menu .twin-moments__menu-edit { color: var(--color-text); }
html:root body .twin-moments__source { display: block; }
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) {
  html:root body .twin-moments__item .twin-moments__more { opacity: 1; }
  html:root body .twin-moments__more::before { content: ""; position: absolute; inset: calc((var(--control-height) - 30px) / -2); }
}
html:root body .twin-moments__edit { display: flex; flex-direction: column; gap: var(--space-3); }
html:root body .twin-moments__edit-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
html:root body .twin-moments__edit-foot .text-link { padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
html:root body .twin-moments__edit .checkin-error { margin: 0; }
html:root body .twin-moments__all { margin-top: var(--space-4); padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-sm); cursor: pointer; }
@media (max-width: 640px) {
  html:root body .twin-moments__edit-foot .button--small { height: var(--control-height); min-height: var(--control-height); }
}

/* My Twin's notes, one row as one system: the date leaf, then the note's
   body, a grid of the words (and under them their label) and a column for
   the "…", kept on every row so every note wraps at the same edge. The
   "…" sits beside the first line, centred on it (the line is the text's
   size at its leading), as actions on a multi-line item do; a note shorter
   than its leaf still sits on the leaf's middle, the "…" with its first
   line. The label (From your check-in, or the area) starts where the words
   do, past the own-words bar, and sits --space-2 under the last line, as
   seen (its words trimmed to their capitals). */
html:root body { --own-words-inset: calc(3px + var(--space-3)); --note-line: calc(var(--text-base) * 1.55); }
html:root body .twin-moments__body { display: grid; grid-template-columns: minmax(0, 1fr) 30px; column-gap: var(--space-2); align-content: center; padding-top: 0; }
html:root body .twin-moments__content { grid-column: 1; grid-row: 1; min-width: 0; }
html:root body .twin-moments__note-actions { margin-block: calc((var(--note-line) - 30px) / 2); }
html:root body .twin-moments__item p.twin-moments__text { line-height: var(--note-line); }
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) {
  margin-top: var(--space-2);
  padding-left: var(--own-words-inset);
  font-size: var(--text-xs); line-height: 1cap; text-box: trim-both cap alphabetic; color: var(--color-text-muted);
}

/* My Twin's notes: the words and their label are one block, the note, and
   the own-words bar runs beside the whole block, as a quote's bar runs
   beside its attribution. The block is measured by what is seen: its first
   line from its capitals, its last line to its baseline (the label's too).
   It sits on the date leaf by the leaf's own measure: --space-3 inside its
   top and bottom, where the leaf's day number has its capitals, so a block
   shorter than the leaf is centred on it as the leaf's words are, and a
   longer one starts level with the day number. The label sits --space-2
   under the words. The "…" is centred on the first line's capitals. While
   a note is edited, the bar steps aside for the field. */
html:root body .twin-moments__body { box-sizing: border-box; min-height: 52px; padding-block: var(--space-3); align-content: safe center; }
html:root body .twin-moments__content { padding-left: var(--space-3); border-left: 3px solid var(--color-own-words); }
/* (Repeated class: the shared own-words rule above outranks a plain one.) */
html:root body .twin-moments__item .twin-moments__content > p.twin-moments__text.twin-moments__text.twin-moments__text.twin-moments__text { padding-left: 0; border-left: 0; text-box: trim-both cap alphabetic; }
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) { padding-left: 0; margin-top: var(--space-2); }
html:root body .twin-moments__content:has(.twin-moments__edit) { padding-left: 0; border-left-color: transparent; }
html:root body .twin-moments__note-actions { font-size: var(--text-base); margin-block: calc((1cap - 30px) / 2); }

/* My Twin's notes, the bar and the label (27 Nov): the own-words bar marks
   the person's words alone, as tall as their lines of text: drawn beside
   the words (still measured from the first line's capitals to the last
   baseline, so the block keeps its place on the date leaf), it reaches
   half a line's leading above and below them, so a one-line note's bar is
   one line tall and every note's bar weighs the same. The label (From your
   check-in, the area) is outside the bar, under the words, at their left
   edge, --space-2 below them as seen. */
html:root body .twin-moments__content { padding-left: 0; border-left: 0; }
html:root body .twin-moments__item .twin-moments__content > p.twin-moments__text.twin-moments__text.twin-moments__text.twin-moments__text { position: relative; padding-left: var(--own-words-inset); }
html:root body .twin-moments__item .twin-moments__content > p.twin-moments__text::before {
  content: ""; position: absolute; left: 0; width: 3px;
  top: calc((1cap - 1lh) / 2); bottom: calc((1cap - 1lh) / 2);
  background: var(--color-own-words);
}
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) { padding-left: var(--own-words-inset); }
/* Editing: the label waits until the edit is saved or cancelled, the field
   starts level with the date leaf's top, and Cancel is a small Secondary
   pill right beside Save, both at the right, as the confirmation's two
   pills sit together (the one that keeps things as they are on the left). */
html:root body .twin-moments__body:has(.twin-moments__edit) { padding-block: 0; align-content: start; }
html:root body .twin-moments__content:has(.twin-moments__edit) :is(.twin-moments__source, .twin-moments__area) { display: none; }
html:root body .twin-moments__edit-foot { justify-content: flex-end; gap: var(--space-6); }
@media (max-width: 640px) { html:root body .twin-moments__edit-foot { gap: var(--space-5); } }

/* The Guide's conversations on phones and touch tablets: each "…" always
   shown, its 44px tap area invisible around the 30px button, the notes'
   rule. (Hover never happens on touch, so it never showed.) */
@media (max-width: 640px), (pointer: coarse) and (max-width: 1180px) {
  html:root body .guide__item .guide__more { opacity: 1; }
  html:root body .guide__more::before { content: ""; position: absolute; inset: calc((var(--control-height) - 30px) / -2); }
}

/* A note's label is its metadata, a mention about it, not one more line of
   it: the check-in's icon (the smiley, as the data page's How you feel) or
   the area's, 14px in the label's colour, --space-2 from the words, as the
   small icons beside quiet lines (My Twin's privacy line); the words at the
   Meta size (--chip-text) in the subtlest grey, their capitals centred on
   the icon. --space-3 under the note's last baseline to the icon's ring
   (the 14px icon draws its circle 32/256 of its size in from its box).
   Still outside the bar, at the words' left edge, hidden while editing. */
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) {
  display: flex; align-items: center; gap: var(--space-2);
  margin-top: calc(var(--space-3) - 14px * 32 / 256);
  font-size: var(--chip-text); line-height: normal; text-box: none; color: var(--color-text-subtle);
}
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) > svg { flex: none; }
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) > span { line-height: 1cap; text-box: trim-both cap alphabetic; }

/* A note's label: its words in the note's column, at the words' left
   edge. The bar's width is one value (--own-words-bar), for the bar and
   the words' indent. The label's line keeps its 14px, so its words stay
   where they are, 12px under the note's words. */
html:root body { --own-words-bar: 3px; --own-words-inset: calc(var(--own-words-bar) + var(--space-3)); }
html:root body .twin-moments__item .twin-moments__content > p.twin-moments__text::before { width: var(--own-words-bar); }
html:root body .twin-moments__content :is(.twin-moments__source, .twin-moments__area) { gap: 0; min-height: 14px; padding-left: var(--own-words-inset); }

/* A poster's words (its badge or eyebrow, the fitted title, the byline, the
   count, the action) keep their own sizes whatever the title's length:
   none of them shrinks to make room. The square card (aspect-ratio, its
   picture clipped) grows instead when a long title at the fit's floor
   needs more than the square, so nothing is squashed or cut off. Before,
   the badge, the one item with a set height, gave way to 11px. */
html:root body :is(.poster__copy, .home-rec__words) > * { flex-shrink: 0; }
/* On phones, where the course cards are squares: a long title at the fit's
   floor can need more than the square, so the square is the card's least
   height and it grows to its words instead of cutting off the pill. (A grid
   item's aspect ratio holds its row at the square whatever its content, so
   the square comes from an empty flex item whose padding is the card's
   width.) */
@media (max-width: 600px) {
  html:root body :is(.poster--new, .poster--course) { aspect-ratio: auto; }
  html:root body :is(.poster--new, .poster--course)::before { content: ""; flex: none; width: 0; padding-top: 100%; }
}

/* Keep in My library on the session complete screen: the session page's
   round heart (`.favorite-icon`), last among the closing actions, after
   Practice again (or Done, in a lesson), the row's gap from it, as the
   session page ends its actions with it; never stretched when the actions
   stack. */
html:root body .player__end-actions .player__fav { flex: none; align-self: center; width: var(--control-height); max-width: var(--control-height); }
html:root body .player__end-actions.has-next-lesson .player__fav { width: var(--control-height); }

/* Outlines by role on the session complete screen. The close is window
   chrome: the round icon button's hairline (--color-line), the soft grey
   ground on hover, as every modal's close. The heart and the three ratings
   are actions about the session, as Practice again: the Secondary pill's
   outline (--color-line-strong) and its hover fill (--color-control-hover),
   staying round; a chosen rating keeps its ink. (The session page's heart
   is already a Secondary pill made round.) */
html:root body .player.is-summary .player__chrome--top [data-p-close]:hover { background: var(--color-control-hover); }
html:root body .player__rate-option { border-color: var(--color-line-strong); }
html:root body .player__rate-option:not([aria-pressed="true"]):hover { border-color: var(--color-line-strong); background: var(--color-control-hover); }

/* /search with nothing found: the page keeps its question; under it, at
   the content's left edge, what was searched and one muted line; the ways
   in follow at the section gap (.no-results__ways). */
html:root body .search-none__title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-medium); }
html:root body .search-none__text { margin: var(--space-2) 0 0; color: var(--color-text-muted); }
/* A playable step is a button holding the row (a list item can't be one):
   the row's look, the button's own font, ground and alignment taken off. */
html:root body button.step { width: 100%; margin: 0; background: none; font: inherit; color: inherit; text-align: left; }
html:root body .step .list__main > span { display: block; }

/* Over time's cards, as the app's (insights.cljs `card`, `header`,
   `stats-row`): the title at the left and the period at the right; the
   main figure with its name, a second figure right-aligned with its name;
   while a bar is chosen both show that bar, in the accent. */
html:root body .data-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
html:root body .data-card__head .data-card__title { margin: 0; }
html:root body .data-card__period { flex: none; font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
html:root body .data-stats { flex-wrap: nowrap; justify-content: space-between; gap: var(--space-4); }
html:root body .data-stat--end { align-items: flex-end; text-align: right; }
html:root body .data-card.is-choosing .data-stat__value { color: var(--chart-accent); }
html:root body .data-card > .data-empty { margin-bottom: var(--space-5); }
html:root body .data-legend { gap: var(--space-2) var(--space-5); }
html:root body .data-legend .data-swatch { border-radius: 0; }
html:root body .chart__col.is-selected .chart__bar:not(.chart__bar--activity), html:root body .chart__col.is-selected .chart__seg { background: var(--chart-average); box-shadow: none; }

/* The app's sleep stages: a row per phase, its time, its share, and the
   share as a bar at the right. */
html:root body .data-stages { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
html:root body .data-stages li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3.5em minmax(64px, 32%); align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
html:root body .data-stages .data-swatch { border-radius: 0; }
html:root body .data-stages__time { font-variant-numeric: tabular-nums; }
html:root body .data-stages__share { color: var(--color-text-muted); text-align: right; font-variant-numeric: tabular-nums; }
html:root body .data-stages__track { display: flex; justify-content: flex-end; height: 8px; background: var(--chart-track); }
html:root body .data-stages__bar { height: 100%; }

/* The app's day squares (check-ins, sessions), filling the card's width as
   the app's do. A square is the width over its row's days, each with a gap
   of 0.4 of a square (8 to 20, --space-2 to --space-5), so square and gap
   grow together; held between --space-5 (the app's 20px) and --space-10.
   The whole month takes one row with its days under it once a square of
   at least 20px fits (31 days: 31 * 20 + 30 * 8 = 860px), else two, three
   or four even rows, the fewest that keep 20px (440px, 300px). */
html:root body .day-squares { container-type: inline-size; }
html:root body .day-squares__grid,
html:root body .day-squares__axis {
  --cols: var(--days);
  --sq: clamp(var(--space-5), calc(100cqi / (var(--cols) * 1.4 - 0.4)), var(--space-10));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--sq));
  justify-content: space-between;
  column-gap: calc(var(--sq) * 0.4);
}
html:root body .day-squares__grid { row-gap: calc(var(--sq) * 0.4); margin: 0; padding: 0; list-style: none; }
/* Sessions: a day with a session filled with the quieter bar ink
   (`--chart-ink-3`, 5.25:1 on white), an empty day a quiet outline (the
   state squares' hairline, no fill). Check-ins (`--check-ins`) are drawn
   exactly as My Twin's How you felt strip draws its days (`.felt-strip`):
   a day with a check-in in its colour for the value (`--step`,
   `personal/slider-color`) with a light hairline, a day without one the
   neutral grey with the line's hairline. A day's picture stays as it is. */
html:root body .day-squares__day { width: var(--sq); height: var(--sq); overflow: hidden; background: none; box-shadow: inset 0 0 0 1px var(--color-line); }
html:root body .day-squares__day.is-done:not(.has-picture) { background: var(--chart-ink-3); box-shadow: none; }
html:root body .day-squares--check-ins .day-squares__day { background: var(--color-neutral-grey); box-shadow: inset 0 0 0 1px var(--color-line); }
html:root body .day-squares--check-ins .day-squares__day.is-done.has-value:not(.has-picture) { background: var(--step); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
html:root body .day-squares__day.has-picture { box-shadow: none; }
html:root body .day-squares__day img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A grid of colours alone (a month gone by, Sessions) says what its squares
   mean in the data pages' legend under it, drawn as the squares are: for
   check-ins My Twin's five colours from the first word to the last (Heavy
   to Very good) and its empty grey, for sessions the filled square and the
   outline. */
html:root body .data-swatch.day-swatch { background: none; box-shadow: inset 0 0 0 1px var(--color-line); }
html:root body .data-swatch.day-swatch.is-done { background: var(--chart-ink-3); box-shadow: none; }
html:root body .day-legend--check-ins .data-swatch.day-swatch { background: var(--color-neutral-grey); box-shadow: inset 0 0 0 1px var(--color-line); }
html:root body .day-legend--check-ins .data-swatch.day-swatch.is-done.has-value { background: var(--step); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
html:root body .day-scale { display: inline-flex; gap: 2px; }
/* A square tells its date and state in the tooltip (app.js
   `setupTooltips`); with the keyboard it takes the focus ring, the grid one
   stop for Tab and the arrow keys moving through its days. */
html:root body .day-squares__day:focus-visible { outline-offset: 2px; }
html:root body .day-squares__axis { margin-top: var(--space-2); }
html:root body .day-squares__axis .chart__label { justify-self: center; white-space: nowrap; }
html:root body .day-squares__axis .chart__label:not(:first-child, :last-child) { color: var(--color-text-subtle); }
@container (max-width: 859.98px) {
  html:root body .day-squares__grid { --cols: var(--days-2); }
  html:root body .day-squares__axis { display: none; }
}
@container (max-width: 439.98px) { html:root body .day-squares__grid { --cols: var(--days-3); } }
@container (max-width: 299.98px) { html:root body .day-squares__grid { --cols: var(--days-4); } }

/* The app's Endor says: a quiet caption over the text, on whatever surface
   it sits on; in a card, under a hairline. */
/* The Endor symbol hangs in its own column at the left, 14px and 8px
   from the words; the caption and the text start together in the next
   column, the text wrapping under the caption, never under the symbol.
   The symbol is centred on the caption's capitals and takes only their
   height (its margins), so the gap from caption to text is the caption's. */
html:root body .endor-says { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: var(--space-2); row-gap: var(--space-3); align-items: start; }
html:root body .endor-says__title { display: contents; font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .endor-says__title > span { grid-column: 2; margin: 0; }
html:root body .endor-says__mark { grid-column: 1; align-self: center; width: 14px; height: 14px; margin-block: calc((1cap - 14px) / 2); color: var(--color-text); }
/* Endor says' words are running text, so the body face at the body tokens
   (Inter, --text-base, --leading-body), as the closing sentence; its
   caption and the Endor symbol stay as they are. */
html:root body .endor-says__text { grid-column: 2; margin: 0; font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-regular); line-height: var(--leading-body); text-wrap: pretty; }
html:root body .data-card__foot { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-line); }

/* HRV's sources, as the app's chips: the web's in-section filters. */
html:root body .data-sources { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
html:root body .data-sources .filter { text-decoration: none; }
html:root body .data-sources .filter[aria-current="true"] { background: var(--color-chosen-bg); color: var(--color-text); border-color: var(--color-chosen-line); }

/* The app's period row: Day, Week, Month, Year at the left, the date pill
   at the right, which opens the picker under it. */
html:root body .data-period { flex-wrap: nowrap; }
html:root body .data-picker { position: relative; flex: none; }
html:root body .data-pill { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-height); padding: 0 var(--space-4); border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-surface); font: inherit; font-size: var(--text-sm); color: var(--color-text); cursor: pointer; white-space: nowrap; transition: background-color var(--duration-hover) var(--ease-out); }
html:root body .data-pill:hover, html:root body .data-pill[aria-expanded="true"] { background: var(--color-control-hover); }
html:root body .data-picker__panel { position: absolute; z-index: 40; top: calc(100% + var(--space-2)); right: 0; width: 320px; padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-overlay); }
html:root body .data-picker__panel[hidden] { display: none; }
html:root body .picker-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); font-weight: var(--weight-medium); }
html:root body .picker-head__title { flex: 1; text-align: center; }
html:root body .picker-shortcuts { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
html:root body .picker-shortcuts a { flex: 1; }
html:root body .picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
html:root body .picker-grid--months { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
html:root body .picker-weekday { padding: var(--space-1) 0; font-size: var(--text-xs); color: var(--color-text-muted); text-align: center; }
html:root body .picker-item { position: relative; display: grid; place-items: center; min-height: 40px; border-radius: var(--radius-nested-tight); color: var(--color-text); font-size: var(--text-sm); text-decoration: none; font-variant-numeric: tabular-nums; transition: background-color var(--duration-hover) var(--ease-out); }
html:root body a.picker-item:hover { background: var(--color-control-hover); }
html:root body .picker-item.is-chosen { background: var(--color-chosen-bg); box-shadow: inset 0 0 0 1px var(--color-chosen-line); font-weight: var(--weight-medium); }
html:root body .picker-item.is-off { color: var(--color-text-subtle); opacity: 0.45; }
html:root body .picker-item.has-data::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; background: var(--color-text); }
html:root body .picker-list { display: flex; flex-direction: column; gap: 2px; }
html:root body .picker-list .picker-item { justify-items: start; padding: 0 var(--space-3); }
@media (max-width: 640px) {
  html:root body .data-period { flex-wrap: wrap; }
  html:root body .data-picker { width: 100%; }
  html:root body .data-pill { width: 100%; justify-content: center; }
  html:root body .data-picker__panel { left: 0; right: 0; width: auto; }
}
html:root body .data-card > .data-stats:last-child { margin-bottom: 0; }
/* Activity behind the stress marks: plain grey, as the app's. */
html:root body .chart__bar--activity { background: var(--chart-activity); }

/* A card's head, as the app's `header`: its period, then its (i) or, on the
   overview, the way into its page, at the right. */
html:root body .data-card__meta { display: flex; flex: none; align-items: center; gap: var(--space-2); }
html:root body .data-card__icon { width: 32px; height: 32px; margin: calc(var(--space-2) * -1) calc(var(--space-2) * -1) calc(var(--space-2) * -1) 0; color: var(--color-text-muted); }
html:root body .data-card__icon:hover { color: var(--color-text); }
@media (max-width: 640px) {
  html:root body .data-card__icon { width: var(--control-height); height: var(--control-height); margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) calc(var(--space-3) * -1) 0; }
}
/* The app's stats row: its figures in equal columns. */
html:root body .data-stats--3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
html:root body .data-stats--1 .data-stat__label { max-width: 36em; }
/* Stress variability, as the app's bar: the day's variability to 30, the
   mark at 10 between low and good. */
html:root body .data-hbar { position: relative; height: 32px; background: var(--chart-track); }
html:root body .data-hbar__fill { position: absolute; inset: 0 auto 0 0; background: var(--chart-ink-4); }
html:root body .data-hbar__mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--chart-average); }
/* The (i) sheet, as the app's metric explainer: a paragraph's heading as
   a small label above it, bullets hanging. */
html:root body .info-sheet { display: flex; flex-direction: column; gap: var(--section-gap); }
html:root body .info-sheet__part { display: flex; flex-direction: column; gap: var(--space-2); }
html:root body .info-sheet__part p { margin: 0; }
html:root body .info-sheet__heading { margin: 0; font-family: var(--font-sans); font-size: var(--text-caps); font-weight: var(--weight-medium); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-muted); }
html:root body .info-sheet__bullet { position: relative; padding-left: 18px; }
html:root body .info-sheet__bullet::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 5px; height: 5px; background: var(--color-text); }
html:root body .data-card > .data-stats:has(+ dialog:last-child) { margin-bottom: 0; }
/* An overview card opens its page, as the web's navigation cards: one link
   over the whole card, the arrow in its top right corner moving on hover,
   the card's ground and line darkening a little. */
html:root body .data-card--link { position: relative; transition: background-color var(--duration-hover) var(--ease-out), border-color var(--duration-hover) var(--ease-out); }
html:root body .data-card--link:hover { background: var(--color-neutral-grey); border-color: var(--color-line-strong); }
html:root body .data-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
html:root body .data-card__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
html:root body .data-card__enter { display: flex; color: var(--color-text-muted); transition: transform var(--duration-hover) var(--ease-out), color var(--duration-hover) var(--ease-out); }
html:root body .data-card--link:hover .data-card__enter { transform: translateX(3px); color: var(--color-text); }

/* The weekly report, as the mobile app's screen: the week's animal as the
   hero, then the app's cards in the data pages' card, the rings, the sky
   wheel and the quote. Colors are the chart tokens. */
html:root body .wr-hero { position: relative; margin-bottom: 0; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; max-height: calc(100svh - var(--topbar-height)); background: var(--color-surface-muted); }
html:root body .weekly-report > .wr-hero { margin-bottom: calc(var(--card-framed-gap) - var(--section-gap)); }
html:root body .wr-hero__picture { display: block; width: 100%; height: 100%; object-fit: cover; }
html:root body .wr-hero::after { content: ""; position: absolute; inset: 0; background: var(--scrim-picture-foot); pointer-events: none; }
html:root body .wr-hero__words { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-10) var(--space-10) var(--space-8); color: var(--color-text-on-image); text-align: center; }
html:root body .wr-hero__name { margin: 0; text-wrap: balance; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-medium); line-height: var(--leading-h2); }
html:root body .wr-hero__headline { margin: 0; text-wrap: balance; max-width: 40em; font-size: var(--text-md); line-height: var(--leading-body); }
@media (max-width: 640px) {
  html:root body .wr-hero { aspect-ratio: 4 / 5; }
  html:root body .wr-hero__words { padding: var(--space-8) var(--space-5) var(--space-6); }
}

/* The week's squares, by the month's day-squares rule: a square is the
   width over the seven days with a gap of 0.4 of a square, between
   --space-5 and --space-10, each over its letter; 32px of room from the
   figures above and to the hairline below. */
html:root body .wr-week-box { container-type: inline-size; }
html:root body .wr-week { --sq: clamp(var(--space-5), calc(100cqi / 9.4), var(--space-10)); display: grid; grid-template-columns: repeat(7, var(--sq)); justify-content: space-between; column-gap: calc(var(--sq) * 0.4); margin: 0; padding: 0; list-style: none; }
html:root body .wr-week__day { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
html:root body .wr-week__square { width: var(--sq); height: var(--sq); background: var(--color-neutral-grey); box-shadow: inset 0 0 0 1px var(--color-line); }
html:root body .wr-week__letter { font-size: var(--text-xs); color: var(--color-text-subtle); }
/* Drawn as the data pages' check-in squares, as My Twin's How you felt
   strip draws its days: the day's colour with a light hairline, an empty
   day the neutral grey with the line's hairline; a day the report marks
   without a value filled with the quieter bar ink. The week is one stop for Tab, a day's square taking
   the focus ring. */
html:root body .wr-week__square.is-done { background: var(--chart-ink-3); box-shadow: none; }
html:root body .wr-week__square.has-value { background: var(--step); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
html:root body .wr-week__square:focus-visible { outline-offset: 2px; }
html:root body .wr-week-box > .data-legend { margin-top: var(--card-block-gap); }


html:root body .wr-registered { margin-left: 2px; font-size: 0.6em; color: var(--color-text-muted); }
html:root body .wr-radar { display: block; width: min(100%, var(--wr-radar, 400px)); height: auto; margin: 0 auto; overflow: visible; }
html:root body .wr-radar__ring, html:root body .wr-radar__spoke { fill: none; stroke: var(--color-line); stroke-width: 1; }
html:root body .wr-radar__shape { fill: color-mix(in srgb, var(--chart-tone-3) 45%, transparent); stroke: var(--chart-accent); stroke-width: 1.5; stroke-linejoin: round; }
html:root body .wr-radar__point { fill: var(--chart-accent); }
html:root body .wr-radar__label { fill: var(--color-text-muted); font-size: var(--text-sm); }
html:root body .wr-ring__track { fill: none; stroke: var(--chart-track); }
html:root body .wr-ring__label { fill: var(--color-text); font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-medium); }
html:root body .wr-legend { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); max-width: 240px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
html:root body .wr-legend li { display: flex; align-items: center; gap: var(--space-2); }
html:root body .wr-legend .data-swatch { flex: none; border-radius: 0; }
html:root body .wr-legend__name { flex: 1; }
html:root body .wr-legend__value { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

html:root body .wr-astronomy { margin: var(--space-4) 0 0; font-family: var(--font-display); font-size: var(--title-section); font-weight: var(--weight-medium); line-height: var(--leading-h2); }
html:root body .wr-sign-value { display: flex; align-items: center; gap: var(--space-2); }
html:root body .wr-sign { width: 0.7em; height: 0.7em; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
html:root body .wr-sky__track { fill: none; stroke: var(--chart-track); }
html:root body .wr-sky__glyph { fill: none; stroke: var(--color-text-muted); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
html:root body .wr-sky__glyph.is-lit { stroke: var(--color-text); }
html:root body .wr-sky__cut { stroke: var(--color-surface); stroke-width: 1; }
html:root body .wr-sky__path { fill: none; stroke-width: 4; stroke-linecap: round; opacity: 0.7; }
html:root body .wr-sky__path--sun { stroke: var(--chart-tone-3); }
html:root body .wr-sky__path--moon { stroke: var(--chart-ink-2); }
html:root body .wr-sky__sun { fill: var(--chart-tone-3); }
html:root body .wr-sky__moon { fill: var(--chart-ink-2); }
html:root body .wr-sky__season { fill: var(--color-text); font-size: 11px; }
html:root body .wr-sky__moon-dark { fill: var(--chart-track); }
html:root body .wr-sky__moon-lit { fill: var(--chart-ink-2); }

/* The end of the report: the closing line, then the quote, centred, with
   no card of its own, as the app's. */
/* The closing, as the app's quote footer: the closing sentence, plain and a
   size smaller (--text-base), 16px above the quote, which leads; the quote
   and its author 8px apart; the block set apart from the cards by twice
   their gap. */
html:root body .wr-quote { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); margin: var(--space-12) auto 0; max-width: 36em; padding: 0 var(--space-6); text-align: center; }
html:root body .wr-quote__line { margin: 0 0 var(--space-2); font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-body); text-wrap: balance; }
/* The quote and its author in the handwritten face (--font-hand, the
   brand's face for short quotes and personal notes), the closing sentence
   in the body face, so the two read apart. */
html:root body .wr-quote__text { margin: 0; font-family: var(--font-hand); font-size: var(--text-lg); font-style: normal; line-height: var(--leading-normal); text-wrap: balance; }
html:root body .wr-quote__author { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--color-text-muted); }

html:root body .wr-share { display: flex; flex-direction: column; gap: var(--space-5); }
html:root body .wr-share .ci-share__preview canvas { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: var(--radius-nested); }
html:root body .wr-share__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* The way into the newest weekly report, on My Twin and Your data: its
   animal (or a chart), its two lines, the corner arrow; the whole row is
   the link. */
html:root body .wr-entry { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--card-framed-gap); padding: var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); color: inherit; text-decoration: none; }
html:root body .wr-entry:hover { border-color: var(--color-line-strong); }
html:root body .wr-entry__picture { flex: none; display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; background: var(--color-surface-muted); color: var(--color-text-muted); }
html:root body .wr-entry__picture img { width: 100%; height: 100%; object-fit: cover; }
html:root body .wr-entry__words { flex: 1; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
html:root body .wr-entry__title { font-weight: var(--weight-medium); }
html:root body .wr-entry__line { font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .wr-entry__enter { flex: none; color: var(--color-text-muted); }
/* The weekly report row, first on the overview, then a card gap to the
   date pill and its cards (24px; 20px on a phone, as the cards there). */
html:root body .data-page > .wr-entry { margin-bottom: calc(var(--card-framed-gap) - var(--section-gap)); }
@media (max-width: 640px) { html:root body .data-page > .wr-entry { margin-bottom: calc(var(--space-5) - var(--section-gap)); } }
html:root body .twin-time > .wr-entry { margin-bottom: 0; }

/* The report on a wide screen: a pair of cards of a kind (HRV and resting
   heart rate, stress and sleep, the sky and the sunlight) side by side once
   the report is 880px wide, where each column keeps 428px: room for the
   300px sky wheel inside the card's padding, and for a ring over its
   legend. The hero, Check-ins, the Endor State and Steps keep the row. */
html:root body .wr-cards { container: wr-cards / inline-size; }
html:root body .wr-pair { display: grid; gap: var(--card-gap); }


/* A week without a saved report: a quiet card, left-aligned as the page,
   its title, when reports arrive, and the way to the newest one. */
html:root body .wr-not-ready { display: flex; flex-direction: column; align-items: flex-start; padding: var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
html:root body .wr-not-ready__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-medium); line-height: var(--leading-h2); }
html:root body .wr-not-ready__line { margin: var(--space-2) 0 0; color: var(--color-text-muted); text-wrap: pretty; }
html:root body .wr-not-ready > .button { margin-top: var(--space-5); }

/* Each report card in its own box, so its padding follows its width on our
   spacing steps: 24px, 32px from 640px, 40px from 960px. A big card keeps
   room at its edges in proportion; a phone keeps the data cards' own. */
html:root body .wr-box { display: flex; flex-direction: column; container: wr-card / inline-size; }
html:root body .wr-box > .data-card { flex: 1; }
html:root body .wr-box > :is(.data-card, .endor-says) { --wr-pad: var(--space-6); }
@media (max-width: 640px) { html:root body .wr-box > :is(.data-card, .endor-says) { --wr-pad: var(--space-5); } }
@container wr-card (min-width: 640px) { html:root body .wr-box > :is(.data-card, .endor-says) { --wr-pad: var(--space-8); padding: var(--wr-pad); } }
@container wr-card (min-width: 960px) { html:root body .wr-box > :is(.data-card, .endor-says) { --wr-pad: var(--space-10); padding: var(--wr-pad); } }


/* Endor says standing between cards: Endor's own word on the week, as a
   callout card. The warm white ground the DS keeps for callouts and no
   hairline, so it reads apart from the white data cards; the cards' corner
   and padding, so it lines up with them; the Endor symbol by its caption;
   its words one step above body text (16px, the body's 14px), in the
   display face. */
html:root body :is(.data-cards, .wr-box) > .endor-says { padding: var(--wr-pad, var(--space-6)); border-radius: var(--radius); background: var(--color-surface-warm); }
@media (max-width: 640px) { html:root body :is(.data-cards, .wr-box) > .endor-says { padding: var(--space-5) var(--space-4); } }

/* A card's spacing scale, one for every card (the report's and the data
   pages'), from the spacing tokens. Gaps are what's seen: a card's text is
   trimmed to its letters (capitals on top, the baseline below), so each
   step is the gap the eye measures.
   - padding: edge to the title's letters, and the last ink to the edge
     (24px; 20px on a phone; the report's 32 and 40px with the card's width)
   - head: 16px under the title's line, a figure and its name 2px apart
     on their own lines (the data pages' values, kept)
   - axis: a chart to its day letters, a legend's rows, Endor says' caption
     to its words, 12px
   - stack: one figure to the next stacked under it, 24px
   - block: figures to a chart, circle or grid, a circle to its legend, 24px
   - section: either side of the hairline over Endor says, the padding */
html:root body .data-card {
  --card-pad: var(--space-6);
  --card-head-gap: var(--space-4);
  --card-axis-gap: var(--space-3);
  --card-stack-gap: var(--space-6);
  --card-block-gap: var(--space-6);
}
@media (max-width: 640px) { html:root body .data-card { --card-pad: var(--space-5); } }
html:root body .wr-box > .data-card { --card-pad: var(--wr-pad); }
html:root body .data-card :is(.chart__label, .wr-legend li > span, .data-legend li > span:last-child, .wr-week__letter, .endor-says__title > span, .endor-says__text, .data-empty) { text-box: trim-both cap alphabetic; }
/* The title's top is cut to its capitals (the padding above it is the gap
   seen); under it, the title, its figures and their names keep their own
   lines, as the data pages always had them: 16px under the title's line,
   2px between a figure and its name. Figures that end a card are cut to
   their baseline, so the padding under them is the gap seen. */
html:root body .data-card .data-card__title { text-box: trim-start cap alphabetic; }
html:root body .data-card > .data-stats:last-child :is(.data-stat__value, .data-stat__label):last-child { text-box: trim-end cap alphabetic; }
/* The title starts at the card's padding; its period and (i) are centred
   on its line without moving it. Under it the head keeps the height
   the data pages always had (their period and (i), on the title's
   baseline, reached 1px below the title's line, 6px with both a period
   and an (i) on a wide screen), so the gap to the figures is unchanged. */
html:root body .data-card__head { position: relative; margin-bottom: var(--card-head-gap); }
html:root body .data-card__head > .data-card__meta { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
html:root body .data-card__head:has(.data-card__meta > *) { margin-bottom: calc(var(--card-head-gap) + 1px); }
html:root body .data-card__head:has(.data-card__period):has(.data-card__icon) { margin-bottom: calc(var(--card-head-gap) + 2px); }
@media (min-width: 641px) { html:root body .data-card__head:has(.data-card__period):has(.data-card__icon) { margin-bottom: calc(var(--card-head-gap) + 6px); } }
html:root body .data-card .data-stats { margin-bottom: var(--card-block-gap); }
html:root body .data-card .chart__axis { margin-top: var(--card-axis-gap); line-height: 1; }
html:root body .data-card .chart__axis--edges { height: 1cap; }
html:root body .data-card .chart__axis--edges .chart__label { top: 0; }
html:root body .data-card .data-legend { margin-top: var(--card-block-gap); row-gap: var(--card-axis-gap); }
html:root body .data-card .wr-legend { gap: var(--card-axis-gap); }
html:root body .data-card > .data-card__foot { margin-top: var(--card-pad); padding-top: var(--card-pad); }
html:root body .data-card .endor-says { row-gap: var(--card-axis-gap); }
html:root body :is(.data-cards, .wr-box) > .endor-says :is(.endor-says__title > span, .endor-says__text) { text-box: trim-both cap alphabetic; }

/* A report card (weekly_report.clj `card`): its main part, the title in its
   corner over the group of figures and drawing, and its Endor says as the
   footer at the bottom, under its hairline. Every circle is one size,
   280px (as wide as fits a phone's card, near the app's 300px wheel). */
html:root body .wr-cards { --wr-circle: min(100%, 280px); }
html:root body .wr-card { display: flex; flex-direction: column; }
html:root body .wr-card__main { flex: 1; display: flex; flex-direction: column; }
html:root body .wr-card__group { flex: 1; display: flex; flex-direction: column; }
html:root body .wr-visual-body { display: flex; flex-direction: column; align-items: stretch; gap: var(--card-block-gap); }
html:root body .wr-visual-body > .data-stats { margin: 0; }
html:root body .wr-visual { display: flex; justify-content: center; }
html:root body .wr-visual > svg, html:root body .wr-visual-body > .wr-ring { display: block; width: var(--wr-circle); height: auto; }
html:root body .wr-visual-body > .wr-ring { align-self: center; }
html:root body .wr-visual-body > .wr-legend { align-self: center; width: var(--wr-circle); max-width: none; }
/* Figures on top and a circle under them: the circle centred in the room
   between the figures and the bottom, the card's padding above it at least. */
html:root body .wr-visual-body:has(> .data-stats) { flex: 1; gap: 0; }
html:root body .wr-visual-body > .data-stats .data-stat__label { text-box: trim-end cap alphabetic; }
html:root body .wr-visual-body:has(> .data-stats) > .wr-visual { flex: 1; align-items: center; padding-top: var(--card-pad); }

/* Centred: the title in its corner over the group, the group centred in the
   main part's height, 32px above and below it keeping it clear of the
   title. The Endor State always; every card in a pair of two columns; a
   card with a circle 640px wide or more, its figures (or legend) and circle
   then one group, 48px apart. */
html:root body .wr-centred-card > .wr-card__main { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
html:root body .wr-centred-card > .wr-card__main > .data-card__head { grid-area: 1 / 1; align-self: start; margin: 0; }
html:root body .wr-centred-card > .wr-card__main > .wr-card__group { grid-area: 1 / 1; align-self: center; padding-block: var(--space-8); }
@container wr-card (min-width: 640px) {
  html:root body .wr-visual-card > .wr-card__main { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
  html:root body .wr-visual-card > .wr-card__main > .data-card__head { grid-area: 1 / 1; align-self: start; margin: 0; }
  html:root body .wr-visual-card > .wr-card__main > .wr-card__group { grid-area: 1 / 1; align-self: center; padding-block: var(--space-8); }
  html:root body .wr-visual-body { flex-direction: row; justify-content: center; align-items: center; gap: var(--space-12); }
  html:root body .wr-visual-body:has(> .data-stats) { gap: var(--space-12); }
  html:root body .wr-visual-body:has(> .data-stats) > .wr-visual { flex: none; padding-top: 0; }
  html:root body .wr-visual-body > .data-stats { flex: none; flex-direction: column; flex-wrap: nowrap; gap: var(--card-stack-gap); }
  html:root body .wr-visual-body > .data-stats .data-stat--end { align-items: flex-start; text-align: left; }
  html:root body .wr-visual-body > .data-stats .data-stat--end .wr-sign-value { flex-direction: row-reverse; }
  html:root body .wr-visual-body > .wr-legend { flex: none; width: 240px; }
}

/* Pairs: two columns once the report is 880px wide (each column then at
   least 428px, room for the 300px sky wheel and a ring over its legend).
   The two cards share the pair's rows (subgrid): their main parts one row,
   their footers the next, so the two hairlines sit on one line whatever
   their words. A card without Endor says takes both rows, its group
   centred in its whole inner height. A card with a drawing of a fixed
   size, alone, keeps the left column and leaves the right one empty; a
   card whose chart stretches takes the row. */
html:root body .wr-pair { display: grid; gap: var(--card-gap); }
@container wr-cards (min-width: 880px) {
  html:root body .wr-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) auto; row-gap: 0; }
  html:root body .wr-pair > .wr-box { grid-row: span 2; display: grid; grid-template-rows: subgrid; }
  html:root body .wr-pair > .wr-box > .data-card { grid-row: span 2; display: grid; grid-template-rows: subgrid; }
  html:root body .wr-pair .wr-card > .wr-card__main { grid-row: 1; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
  html:root body .wr-pair .wr-card > .data-card__foot { grid-row: 2; }
  html:root body .wr-pair .wr-card:not(:has(> .data-card__foot)) > .wr-card__main { grid-row: 1 / -1; }
  html:root body .wr-pair .wr-card > .wr-card__main > .data-card__head { grid-area: 1 / 1; align-self: start; margin: 0; }
  html:root body .wr-pair .wr-card > .wr-card__main > .wr-card__group { grid-area: 1 / 1; align-self: center; padding-block: var(--space-8); flex: none; }
  html:root body .wr-pair--solo > .wr-box { grid-column: 1; }
}

/* Sky and Sunlight in a pair, when the circle fits between their two
   figures with the card gap on each side (app.js measures it, for both
   cards of the pair): the title and the figures in their corners, the
   circle centred in the main part's whole height. */
html:root body .wr-pair .wr-card.is-around > .wr-card__main { display: grid; grid-template: auto auto minmax(0, 1fr) / minmax(0, 1fr); }
html:root body .wr-pair .wr-card.is-around > .wr-card__main > .data-card__head { grid-area: 1 / 1; margin: 0 0 var(--card-head-gap); }
html:root body .wr-pair .wr-card.is-around :is(.wr-card__group, .wr-visual-body) { display: contents; }
html:root body .wr-pair .wr-card.is-around .wr-visual-body > .data-stats { grid-area: 2 / 1; align-self: start; }
html:root body .wr-pair .wr-card.is-around .wr-visual { grid-area: 1 / 1 / 4 / 2; align-self: center; justify-self: center; padding: 0; }
/* A size container can't pass its rows on (subgrid), so in a pair of two
   columns the card's box is a plain box; its padding follows the report's
   width instead, at the same card widths: 32px from a 640px card (a
   1304px report), 40px from a 960px card (1944px). */
@container wr-cards (min-width: 880px) {
  html:root body .wr-pair > .wr-box { container-type: normal; }
}
@container wr-cards (min-width: 1304px) {
  html:root body .wr-pair > .wr-box > .data-card { --wr-pad: var(--space-8); padding: var(--wr-pad); }
}
@container wr-cards (min-width: 1944px) {
  html:root body .wr-pair > .wr-box > .data-card { --wr-pad: var(--space-10); padding: var(--wr-pad); }
}
/* Figures over a circle in a pair, when the circle doesn't fit between
   them: the title, the figures, then the circle centred in the room left
   down to the bottom, as on a narrow card. */
@container wr-cards (min-width: 880px) {
  html:root body .wr-pair .wr-visual-card:has(.wr-visual-body > .data-stats):not(.is-around) > .wr-card__main { display: flex; flex-direction: column; }
  html:root body .wr-pair .wr-visual-card:has(.wr-visual-body > .data-stats):not(.is-around) > .wr-card__main > .data-card__head { margin: 0 0 var(--card-head-gap); }
  html:root body .wr-pair .wr-visual-card:has(.wr-visual-body > .data-stats):not(.is-around) > .wr-card__main > .wr-card__group { flex: 1; padding-block: 0; align-self: stretch; }
}

/* A card with figures and a drawing, in a pair (Check-ins, HRV, Resting
   HR; Sky and Sunlight have their own): the figures under the title
   (--card-head-gap), then the drawing with its legend or source chips, as
   one group, centred in what is left down to the footer's hairline: two
   spacers share what is left equally, the one below never under the
   --space-8 a pair card always kept there, so with a partner of the same
   height nothing moves. The pair keeps the two hairlines on one line. */
@container wr-cards (min-width: 880px) {
  html:root body .wr-pair .wr-card:not(.wr-visual-card, .wr-centred-card, .wr-no-data, .wr-checkins-empty):has(> .wr-card__main > .wr-card__group > .data-stats) > .wr-card__main { display: flex; flex-direction: column; }
  html:root body .wr-pair .wr-card:not(.wr-visual-card, .wr-centred-card, .wr-no-data, .wr-checkins-empty):has(> .wr-card__main > .wr-card__group > .data-stats) > .wr-card__main > .data-card__head { margin: 0 0 var(--card-head-gap); }
  html:root body .wr-pair .wr-card:not(.wr-visual-card, .wr-centred-card, .wr-no-data, .wr-checkins-empty):has(> .wr-card__main > .wr-card__group > .data-stats) > .wr-card__main > .wr-card__group { flex: 1; display: flex; flex-direction: column; padding-block: 0; align-self: stretch; }
  html:root body .wr-pair .wr-card:not(.wr-visual-card, .wr-centred-card, .wr-no-data, .wr-checkins-empty) > .wr-card__main > .wr-card__group > .data-stats { order: -2; }
  html:root body .wr-pair .wr-card:not(.wr-visual-card, .wr-centred-card, .wr-no-data, .wr-checkins-empty):has(> .wr-card__main > .wr-card__group > .data-stats) > .wr-card__main > .wr-card__group::before { content: ""; order: -1; flex: 1 1 0; }
  html:root body .wr-pair .wr-card:not(.wr-visual-card, .wr-centred-card, .wr-no-data, .wr-checkins-empty):has(> .wr-card__main > .wr-card__group > .data-stats) > .wr-card__main > .wr-card__group::after { content: ""; flex: 1 1 0; min-height: var(--space-8); }
}

/* The hero is at most the window's height under the top bar, its picture
   cropped to that (object-fit: cover), never shrunk. Under its words, as
   the app's `details-scroll-hint`: Scroll down for details and a 12px caret
   8px under it, Space Grotesk 13px at a 1.32 line in white at 60%, its
   line 24px under the headline's (32px seen, from the headline's baseline
   to the hint's capitals, about twice the 17px from the name to the
   headline), its caret at the hero's bottom padding; a button to the first
   card, its hit area 12px wider on every side, as the app's hit slop.
   Shown until the first data card's title is in the window (app.js); hidden,
   the words sit at the bottom padding as before. */
html:root body .wr-hero { --wr-hint-size: 13px; }
html:root body .wr-hero__more { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); margin: calc(var(--space-6) - var(--space-2) - var(--space-3)) calc(-1 * var(--space-3)) calc(-1 * var(--space-3)); padding: var(--space-3); border: 0; border-radius: var(--radius); background: none; color: color-mix(in srgb, var(--color-text-on-image) 60%, transparent); font-family: var(--font-display); font-size: var(--wr-hint-size); line-height: 1.32; cursor: pointer; }
html:root body .wr-hero__more:hover { color: var(--color-text-on-image); }
html:root body .wr-hero__more > svg { display: block; flex: none; }
html:root body .wr-hero__more[hidden] { display: none; }
.app-modal [data-app-modal-eyebrow][hidden] { display: none; }

/* The wearable notice in the report stands in the cards' column like a
   card: the column's gap around it, none of its own. */
html:root body :is(.wr-cards, .data-cards) > .notice { margin: 0; }

/* The notice's spacing and wide layout (on top of its rules above). Its
   title and words are one group: the title keeps the 6px above that
   centres it on the icon but gives up the 6px under it, and 4px
   (--space-1) stands between the title's 20px line and the words', about
   14px from the title's baseline to the words' capitals: between the
   10px where the two lines met (cramped) and the 22px of its own column
   (loose). The actions stand clearly apart, 20px (--space-5) from the
   words' line, about 26px seen, near twice the other. From a 640px notice
   (not 960) the actions sit at the right, centred on the words, so a
   smaller desktop keeps the wide arrangement; narrower, the icon keeps its
   column and the words and the button (at its own width) start on the
   words' edge. */
html:root body .notice:not(.notice--small-icon):has(.notice__icon) .notice__title { padding-bottom: 0; }
html:root body .notice .notice__body > .notice__title + .notice__text { margin-top: calc(var(--space-1) - var(--space-2)); }
html:root body .notice .notice__body > .notice__actions { margin-top: calc(var(--space-5) - var(--space-2)); }
/* Side by side, the words (one to three lines) balance: never a short last
   line. Stacked, they wrap `pretty`, keeping the column's full width (on a
   phone balance shortens the lines and leaves the right side empty) with
   no word alone on the last line. */
html:root body .notice .notice__text p { text-wrap: pretty; }
@container (min-width: 640px) {
  html:root body .notice .notice__body:not(:has(.notice__wide)) { display: grid; grid-template-columns: minmax(0, var(--measure-subtitle)) auto; column-gap: var(--space-10); row-gap: 0; justify-content: space-between; padding-bottom: var(--space-1); }
  html:root body .notice .notice__body:not(:has(.notice__wide)) > :not(.notice__actions) { grid-column: 1; }
  html:root body .notice .notice__body:not(:has(.notice__wide)) > :not(.notice__actions) + :not(.notice__actions) { margin-top: var(--space-2); }
  html:root body .notice .notice__body:not(:has(.notice__wide)) > .notice__title + .notice__text { margin-top: var(--space-1); }
  html:root body .notice .notice__body:not(:has(.notice__wide)) .notice__text p { text-wrap: balance; }
  html:root body .notice .notice__body:not(:has(.notice__wide)) > .notice__actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; align-items: center; gap: var(--space-6); margin: 0 0 -4px; }
  html:root body .notice .notice__body:not(:has(.notice__wide)) .notice__dismiss { margin: 0; line-height: inherit; }
}

/* Energy, as the app's cards: the reserve as a bar (55px, as the app's)
   from the start of the day, its waking reserve marked; the reserve through
   the day as a sun-yellow line over the day's stress; two figures read
   across under a chart (Sleep charge 34 %, Wake up 80 %). */
html:root body .data-hbar--energy { height: 55px; }
html:root body .data-hbar--energy .data-hbar__mark { width: 2px; background: var(--chart-ink-4); }
html:root body .chart__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
html:root body .chart__line polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
html:root body .chart__line--energy polyline { stroke: var(--chart-tone-3); }
html:root body .data-swatch--energy { background: var(--chart-tone-3); }
html:root body .data-pair { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-top: var(--card-axis-gap); font-size: var(--text-sm); color: var(--color-text-muted); }
html:root body .data-pair strong { color: var(--color-text); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }

/* The Sleep day on a wide page, as one grid: the cards that only hold
   figures (HRV, Breath, Skin temperature) side by side in three columns,
   every other card across them, in the app's order. From a 1040px list a
   column is 331px, room for a title, its period and (i) on one line and
   two figures; narrower, the cards stack as on phones. Additional sleep
   insights' three figures take the same columns: its gap is the cards' gap
   plus a card's padding and border on either side, so each figure starts
   where a card's content does. The three heads keep the gap of one with an
   (i), so their figures share a line. */
html:root body :has(> .data-cards > .data-card--figure) { container-type: inline-size; }
@container (min-width: 1040px) {
  html:root body .data-cards:has(> .data-card--figure) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--card-gap); }
  html:root body .data-cards:has(> .data-card--figure) > * { grid-column: 1 / -1; }
  html:root body .data-cards:has(> .data-card--figure) > .data-card--figure { grid-column: auto; }
  html:root body .data-card--columns > .data-stats--3 { column-gap: calc(var(--card-gap) + 2 * var(--card-pad) + 2px); }
  html:root body .data-cards > .data-card--figure > .data-card__head { margin-bottom: calc(var(--card-head-gap) + 6px); }
}

/* A chart's bars by keyboard (app.js `setupChartSelect`): the focused bar's
   column ringed as the day squares are. */
html:root body .chart__col:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-dot); }

/* A notification that opens a place (the app's tap): the whole card is the
   link, as the web's navigation cards; on hover its border darkens and its
   title underlines. */
html:root body .notif--link { position: relative; }
html:root body .notif__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
html:root body .notif__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* The envelope's gold square sits on the envelope's top-right corner,
   overlapping it a little (the glyph's corner is 16px down and 14px in
   from the 44px button's corner), with a ring in the bar's colour, or the
   hover's, so it reads as attached. */
html:root body .bell .icon-button__mark { top: var(--space-3); right: var(--space-2); width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--color-topbar); }
html:root body .bell .icon-button:is(:hover, [aria-expanded="true"]) .icon-button__mark { box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-topbar), var(--brand-black) 5%); }

/* The envelope's panel: its title fixed at the top and See all at the
   bottom, each parted from the list by the hairline (--color-line); only
   the list scrolls, with the page's side padding and room before the
   scrollbar. In it, notifications are rows parted by the rows' hairline
   (--color-row-divider), not cards; the page keeps its cards. A day is a
   group heading, in the eyebrow's type (caps, tracked, medium) and ink;
   the category and the time are quiet meta, told apart: the category
   medium in the muted grey before the title, the time regular in the
   subtle grey with even figures. */
html:root body .bell-panel { padding: 0; overflow: hidden; }
html:root body .bell-panel__head { flex: none; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-line); }
html:root body .bell-panel__title { margin: 0; font-size: var(--text-base); line-height: var(--leading-small); font-weight: var(--weight-medium); color: var(--color-text); }
html:root body .bell-panel__scroll { --list-end: var(--space-5); flex: 1 1 auto; min-height: 0; padding: 0 0 var(--space-2); scrollbar-width: none; }
/* With the thumb showing, the list's right edge moves in by the thumb and
   its inset, so the content keeps from the thumb what it keeps from the
   panel's left edge. */
html:root body .bell-panel__scroll.has-thumb { --list-end: calc(var(--space-5) + var(--space-1) + var(--scrollbar-size)); }
html:root body .bell-panel__scroll::-webkit-scrollbar { display: none; }
html:root body .bell-panel__all { flex: none; align-self: stretch; margin: 0; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-line); }
html:root body .notif-day { font-family: var(--font-sans); font-size: var(--text-caps); line-height: var(--leading-caps); font-weight: var(--weight-medium); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text); }
html:root body .bell-panel .notif-day { position: relative; margin: 0; padding: var(--space-5) var(--list-end) var(--space-2) var(--space-5); }
html:root body .bell-panel .notif-day:first-child { padding-top: var(--space-4); }
html:root body .bell-panel .notif { position: relative; gap: var(--space-2); margin: 0; padding: var(--space-3) var(--list-end) var(--space-3) var(--space-5); border: 0; border-radius: 0; background: none; }
html:root body .bell-panel :is(.notif + .notif, .notif + .notif-day)::before { content: ""; position: absolute; top: 0; left: var(--space-5); right: var(--list-end); border-top: 1px solid var(--color-row-divider); }
html:root body .notif__tag { font-weight: var(--weight-medium); color: var(--color-text-muted); }
html:root body .notif__time { font-family: var(--font-sans); font-size: var(--text-xs); color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
@supports selector(::-webkit-scrollbar) {
  html:root body .bell-panel__scroll { padding-right: 0; scrollbar-gutter: auto; }
}

/* The panel's list, as notification lists go: every row spans the panel
   edge to edge, its hover ground square, between the hairlines; words,
   hairlines, headings, the title and See all all keep the one inner
   padding, --space-5, so they start and end together. Every two
   notifications are parted by the rows' hairline, also over the next
   day's heading. The native scrollbar would take room from the list, so
   it is hidden and the design system's thumb (--scrollbar-size, the
   thumb colours) is drawn over the panel's edge, --space-1 in (app.js
   `overlayScrollbar`); wheel, touch and keys scroll as ever. */
html:root body .bell-panel .overlay-thumb { position: absolute; top: 0; right: var(--space-1); z-index: 2; width: var(--scrollbar-size); border-radius: var(--radius-pill); background: var(--scrollbar-thumb); touch-action: none; transition: background-color var(--duration-hover) var(--ease-out); }
html:root body .bell-panel .overlay-thumb:hover, html:root body .bell-panel .overlay-thumb.is-dragging { background: var(--scrollbar-thumb-hover); }
html:root body .bell-panel .overlay-thumb[hidden] { display: none; }

/* A notification that opens a place leads on: the design system's
   trailing arrow (↗ for a web address), always shown, and on a pointer
   that hovers, a quiet ground (the control hover) and the arrow's 3px
   step; one that only reads has neither, and no pointer. The page's cards
   and the panel's rows alike. */
html:root body .notif__words { flex: 1 1 auto; }
html:root body .notif__arrow { flex: none; align-self: center; display: inline-flex; color: var(--color-text-muted); transition: transform 200ms var(--ease-out); }
html:root body .notif:not(.notif--link) { cursor: default; }
@media (hover: hover) {
  html:root body .notif--link:hover { background: var(--color-control-hover); }
  html:root body .notif--link:hover .notif__arrow:not(.link-out) { transform: translateX(3px); }
  html:root body .notif--link:hover .notif__arrow.link-out { transform: translate(2px, -2px); }
}
@media (prefers-reduced-motion: reduce) { html:root body .notif__arrow { transition: none; } }

/* The page's categories, one choice of a few: the data pages' segmented
   control, its parts buttons, equal and as wide as the longest label (at
   least the data pages' 90px), the chosen one raised as theirs. */
html:root body .notif-filters { grid-auto-columns: minmax(90px, 1fr); width: max-content; max-width: none; }
@media (max-width: 640px) { html:root body .notif-filters { width: 100%; grid-auto-columns: minmax(max-content, 1fr); } }
html:root body .notif-filters button.segmented__item { border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; }
html:root body .notif-filters button.segmented__item[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-medium); box-shadow: var(--shadow-raised); }

/* The page's categories have the data pages' proportions: the track's
   own 4px around the parts, not the scroll row's room for shadows. */
html:root body .hscroll > .segmented.notif-filters:first-child { padding: var(--inset-tight); margin-block: 0; }

/* A notification's words as the brand book sets them, the panel and the
   page alike: its title in the display face (Space Grotesk, --text-md,
   medium, ink), its text in the body face (Inter, --text-base, regular,
   --color-text-muted), so size, weight and colour all tell them apart. */
html:root body .notif__title { font-family: var(--font-display); font-size: var(--text-md); line-height: var(--leading-body); font-weight: var(--weight-medium); color: var(--color-text); }
html:root body .notif__body { font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-body); font-weight: var(--weight-regular); color: var(--color-text-muted); }

/* A weekly report card's own line under its drawing (Check-ins with none
   this week) and its action, at the card's foot at the button's own size,
   as a card places its action. */
html:root body .wr-card__line { margin: var(--space-4) 0 0; font-size: var(--text-sm); line-height: var(--leading-body); color: var(--color-text-muted); }
html:root body .wr-card__action { display: flex; align-self: flex-start; margin-top: var(--space-3); }

/* An empty card follows the card rule: its title in its corner, what it
   has centred in the space under it (as much room above as below, at least
   --space-8), and centred across too, so it reads as meant: N/A over its
   line; Check-ins' empty week over its line and Check in. */
html:root body .wr-card:is(.wr-no-data, .wr-checkins-empty) > .wr-card__main > .wr-card__group { justify-content: center; padding-block: var(--space-4) var(--space-8); }
@container wr-cards (min-width: 880px) {
  html:root body .wr-pair .wr-card:is(.wr-no-data, .wr-checkins-empty) > .wr-card__main { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); }
  html:root body .wr-pair .wr-card:is(.wr-no-data, .wr-checkins-empty) > .wr-card__main > .wr-card__group { grid-area: 2 / 1; align-self: center; padding-block: var(--space-8); }
}
html:root body .wr-card.wr-no-data .data-stats { justify-content: center; margin-bottom: 0; text-align: center; }
html:root body .wr-card.wr-no-data .data-stat { align-items: center; }
html:root body .wr-checkins-empty .wr-card__line { text-align: center; }
html:root body .wr-checkins-empty .wr-card__action { align-self: center; }
