/* Guided design tokens (docs/references/guided/DESIGN.md). Every guided player,
   sheet and card takes its type, spacing, shape, shadows and colours from here,
   so a value changes in one place. The other guided stylesheets use these names
   and no raw colours, font sizes, radii or shadows (guided_tokens_test.mjs).
   Motion lives in guided_motion.css. */
:root {
  /* Type. Larger text adds 2px to every size (below). */
  --guided-font: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --guided-size-label: 12px;    /* pills and artwork labels; nothing is smaller */
  --guided-size-caption: 13px;  /* captions and small print */
  --guided-size-small: 14px;    /* cue, comfort and safety lines, secondary text */
  --guided-size-body: 16px;     /* body text, buttons, choices, settings headings */
  --guided-size-count: 18px;    /* counts and section headings */
  --guided-size-title: 20px;    /* sheet and player titles */
  --guided-size-card: 21px;     /* card titles, results, the inline phase heading */
  --guided-size-phase: 24px;    /* the phase heading */
  /* Now playing's type scale (DESIGN.md, Redesign proposal; the now-playing layout system, 4): these
     three with Body, Small and Caption above are the only sizes its screens use. */
  --guided-size-now-display: 34px; /* the practice's phase word; the result's headline, one size throughout */
  --guided-size-now-title: 26px;   /* the Welcome's title; the first-time lesson's caption */
  --guided-size-now-heading: 22px; /* a check-in question; "All set"; a Welcome section */
  --guided-size-pair: 56px;        /* the result's before → after (the owner's decision of 2026-11-04) */
  --guided-size-pair-card: 44px;   /* the same on Today's card */
  --guided-icon-pair: 28px;        /* the arrow between them */
  --guided-icon-pair-card: 24px;   /* the same on Today's card */
  --guided-tracking: -.4px;     /* titles and headings */
  --guided-tracking-tight: -1px;   /* now playing's Display and Title */

  /* Space */
  --guided-pad-x: 18px;
  --guided-gap-layout: 12px;
  --guided-gap-main: 10px;
  --guided-gap-footer: 10px;
  --guided-sheet-gap: 16px;
  /* Now playing's spacing scale (the layout system, 1): 8 between related lines, 16 between blocks in a
     group, 24 between groups; 20px gutters. */
  --guided-space-1: 4px;
  --guided-space-2: 8px;
  --guided-space-3: 12px;
  --guided-space-4: 16px;
  --guided-space-5: 24px;
  --guided-space-6: 32px;
  /* Now playing's spacing (DESIGN.md, the now-playing layout system, 1 and its Spacing table): one margin,
     the same on every screen, sheet and card, and one vertical step for each relationship, on the 4px
     grid. A rule names the relationship, never the number. */
  --guided-margin: 20px;          /* the leading and trailing margin */
  --guided-gutter: var(--guided-margin);
  --guided-gap-line: 4px;         /* a line and its own detail line */
  --guided-gap-heading: 8px;      /* a heading and the lines under it */
  --guided-gap-row: 8px;          /* items in one group */
  --guided-gap-block: 16px;       /* blocks in one section */
  --guided-gap-section: 24px;     /* sections */
  --guided-gap-action: 32px;      /* before the screen's primary action, when content sits above it */
  --guided-sheet-handle-gap: 8px; /* a sheet's grab handle → its header row */
  --guided-sheet-header-gap: 16px; /* a header row → the first content, on every sheet and screen */
  /* The last action → the bottom edge, safe area included: the sheets' own clearance on the web, and
     full screen's. */
  --guided-bottom-inset: calc(var(--guided-gap-section) + env(safe-area-inset-bottom, 0px));
  /* Line heights, one per kind of line (the layout system, 4). */
  --guided-leading-display: 1.15; /* Display and Title */
  --guided-leading-heading: 1.25; /* Heading */
  --guided-leading-label: 1.3;    /* one-line labels: Body in Rows and buttons, Caption headings and chips */
  --guided-leading-small: 1.4;    /* Small lines: facts, helpers, notes, cues, the safety line */
  --guided-leading-body: 1.45;    /* Body paragraphs */

  /* Shape */
  --guided-radius-xs: 4px;        /* checkboxes */
  --guided-radius-sm: 10px;       /* number fields, segments */
  --guided-radius-row: 16px;      /* now playing: a Row */
  --guided-radius-segment: 14px;  /* now playing: a segmented control's option, the app's button corners (.gs-button, choice chips, tabs) */
  --guided-radius: 14px;          /* buttons (every text button, the Done pill, choices, steppers), menus, notices: the app's .gs-button corners */
  --guided-radius-primary: 18px;  /* the play bar */
  --guided-radius-card: 20px;     /* panels inside a player */
  --guided-radius-surface: 28px;  /* the player card */
  --guided-radius-routine-card: calc(var(--guided-radius) + var(--guided-margin) + 1px); /* the routine card: its button's corners, the body's margin and its 1px border, so the two curves are concentric */
  --guided-radius-pill: 999px;    /* tracks, switches, dots and label chips only; a button is never a pill */

  /* Size */
  --guided-touch: 44px;
  --guided-touch-lg: 48px;
  --guided-primary-h: 52px;
  --guided-icon: 22px;
  --guided-icon-row: 20px;
  --guided-play: 76px;        /* now playing: the round play and pause */
  --guided-play-icon: 30px;
  --guided-track: 4px;        /* now playing: the scrubber and the lesson's line */
  --guided-start: 64px;       /* now playing: the Welcome's round Start */
  --guided-start-icon: 26px;
  --guided-tile: 104px;       /* now playing: a More like this tile on the Welcome */
  --guided-header-h: 56px;    /* now playing: the header row */
  --guided-row-h: 56px;       /* now playing: a Row, at least */
  --guided-chevron: 16px;     /* now playing: a Row's chevron */
  --guided-field-welcome: 300px; /* now playing: the art field on the Welcome, about */
  --guided-field-result: 220px;  /* now playing: the art field on the result before it grows into free space, up to the Welcome's */
  --guided-field-min: 72px;      /* now playing: the result's art field on the shortest screens, at least */
  --guided-field-sheet: 140px;   /* now playing: the small art field in a sheet (About's cards, Replay instructions) */
  --guided-thumb: 44px;          /* now playing: a Row's art at its start (Change exercise) */
  --guided-field-card: 280px;    /* the routine card's art field, at most (guided_routine_card.css); done, the result's */
  --guided-play-card: 64px;      /* now playing on Today's card (the layout system, 14): the round play and pause */
  --guided-play-card-icon: 26px;
  --guided-art-card: 240px;      /* now playing on Today's card: the live art (mascot and rhythm), at least */
  --guided-side-inset: 2px;      /* now playing: Alternate nostril's side capsule, around its filled side (the layout system, 24) */
  --guided-scene-wide: calc(360 / 322); /* now playing: the nostril scene's width for its height, fitted to its field (29) */

  /* Controls */
  --guided-knob: #fff;  /* a switch's knob, in both themes, as on iOS */

  /* Card art: a soft field behind each routine's still (the card prototype, guided/_card). */
  --guided-card-art-breathing: #e7eee8;
  --guided-card-art-pelvic: #f5ebe3;

  /* Progress (plans/007): Before is quiet, Now carries the colour; both are labelled, so colour is never
     the only cue. Checked with the dataviz validator against the card in both themes. */
  --guided-progress-before: #8f9189;
  --guided-progress-now: #0d6a54;
  --guided-progress-ask: #e3efe9; /* How's it going?, a soft field of Now's colour */

  /* Shadow */
  --guided-shadow-pop: 0 8px 24px rgb(0 0 0 / .13);
  --guided-shadow-thumb: 0 1px 5px rgb(0 0 0 / .13);

  /* Anatomy: one palette for every drawing. Lines reach 3:1 on the card. */
  --guided-floor: #d9603f;
  --guided-floor-band: #77b8a6;
  --guided-floor-band-line: #285b50;
  --guided-floor-rest: #264d46;
  --guided-floor-highlight: #fff2dc;
  --guided-diaphragm: #3f7f93;
  --guided-muscle-soft: #528b78;
  --guided-air-in: #548f86;
  --guided-air-out: #b78061;
  --guided-target: #c4572e;
  --guided-inside-wall: #8a6a55;
  --guided-inside-cavity: #f3d9c4;
  /* Gut-focused hypnosis's contours (plans/051): the film's brown, 3.7:1 on the light card and 4.6:1 on the dark. */
  --guided-hypnosis-contour: #b4774e;

  /* The painted body (push & release, Pelvic floor 101). */
  --paint-interior-light: #ffe5c6;
  --paint-belly: #55786a;
  --paint-tissue: #c1787d;
  --paint-tissue-light: #e4aaa4;
  --paint-tissue-shadow: #975563;
  --paint-passage: #c38a84;
  --paint-passage-shadow: #7e575b;

  /* The share card preview matches the image it shares. */
  --guided-share-paper: #fffaf7;
  --guided-share-skeleton: #f1e5df;
  --guided-share-spinner: #dfc9c1;
  --guided-share-spinner-head: #c7323a;
}

html[data-text-scale="larger"] {
  --guided-size-label: 14px;
  --guided-size-caption: 15px;
  --guided-size-small: 16px;
  --guided-size-body: 18px;
  --guided-size-count: 20px;
  --guided-size-title: 22px;
  --guided-size-card: 23px;
  --guided-size-phase: 26px;
  --guided-size-now-display: 36px;
  --guided-size-now-title: 28px;
  --guided-size-now-heading: 24px;
  --guided-size-pair: 58px;
  --guided-size-pair-card: 46px;
}

:root.dark {
  --guided-card-art-breathing: #283029;
  --guided-progress-before: #7a756f;
  --guided-progress-now: #26a888;
  --guided-progress-ask: #233a34;
  --guided-card-art-pelvic: #332a25;
  --guided-shadow-pop: 0 8px 24px rgb(0 0 0 / .4);
  --guided-shadow-thumb: 0 1px 5px rgb(0 0 0 / .5);
  --guided-floor: #ff8a6e;
  --guided-floor-band: #3f7d6d;
  --guided-floor-band-line: #6fb5a2;
  --guided-floor-rest: #4f8f80;
  --guided-floor-highlight: #4a4535;
  --guided-diaphragm: #8fc3d2;
  --guided-muscle-soft: #80c0ab;
  --guided-air-in: #8cc5b9;
  --guided-air-out: #d6a58a;
  --guided-target: #ee8a62;
  --guided-inside-wall: #c9a78f;
  --guided-inside-cavity: #4a3a30;
  --guided-hypnosis-contour: #b4774e;
}

/* The player's own colours follow Today and tracker controls; the fallbacks keep
   direct and legacy entries consistent. The routine card (guided_routine_card.css)
   takes them too, in Care as on Today, and so does Progress (guided_progress.css). */
:is(.gs-box-player, .gr-card, .gp-page) {
  --box-action: var(--gs-tracker-action, var(--gs-product-action, #10110f));
  --box-on-action: var(--gs-tracker-on-action, var(--gs-product-on-action, #fff));
  --box-soft: var(--gs-tracker-soft, #eeece6);
  --box-line: var(--gs-tracker-line, var(--gs-border, #dcddd7));
  /* A step or card dot not in view: reaches 3:1 on the card in light and dark (the hint text colour), where the
     line's 1.4:1 didn't (the polish review, 2026-11-06). */
  --box-dot: var(--gs-text-hint, #6f6b67);
  --box-warning: var(--gs-red, #dc2626); /* now playing: Options' End session */
  --guided-share-check: #10110f;
  --guided-share-tick: #fff;
}
.dark :is(.gs-box-player, .gr-card, .gp-page) {
  --box-action: var(--gs-tracker-action, var(--gs-product-action, #f3f4ed));
  --box-on-action: var(--gs-tracker-on-action, var(--gs-product-on-action, #191a17));
  --box-soft: var(--gs-tracker-soft, #2d2f29);
  --box-warning: var(--gs-red, #f87171);
  --guided-share-check: #f3f4ed;
  --guided-share-tick: #191a17;
}

/* One typeface for the players, their sheets and their cards, wherever they sit. */
:is(.gs-box-player, .box-sheet) { font-family: var(--guided-font); }
