/* HealthOS design tokens, copied from thrive-healthos packages/tokens/src/tokens.css by
 * scripts/sync_healthos_tokens.py. Do not edit here: change tokens.json upstream, then run the script again.
 */

/*
 * HealthOS design tokens - GENERATED FROM tokens.json. Do not hand-edit.
 *
 * To change a value: update packages/tokens/src/tokens.json, then run
 *   pnpm --filter @healthos/tokens generate
 */

:root {
  --color-paper: #ffffff;
  --color-black: #000000;
  --color-cream: #f7f9f8;
  --color-cream-warm: #fbfaf6;
  --color-cream-deep: #f4f2ea;
  --color-butter: #f7efd1;
  --color-navy: #0a1f3a;
  --color-navy-deep: #061428;
  /* Dark layer over a photo or video so white ink reads. Navy on light, the brand's own deep blue; dark mode swaps in a neutral near-black. Pair with ink-on-media. */
  --color-scrim: #0a1f3a;
  --color-ink: #1b201e;
  --color-ink-soft: #2c3531;
  /* Teal-tinted text ink, 8.9:1 on paper. The teal marks are mid-tone and correct on a dot or a chart vertex; small text takes this instead. */
  --color-ink-teal: color-mix(in srgb, var(--color-teal-700) 62%, var(--color-ink));
  --color-gray-50: #f6f7f8;
  --color-gray-100: #eceef0;
  --color-gray-200: #d9dde0;
  --color-gray-300: #b8bfc4;
  --color-gray-400: #6d727c;
  --color-gray-500: #6a707c;
  --color-gray-600: #4f5764;
  --color-gray-700: #3a4150;
  --color-gray-800: #232a36;
  --color-gray-900: #172235;
  --color-purple-50: #eeedf8;
  --color-purple-100: #ebe3fc;
  --color-purple-200: #e2d5fb;
  --color-purple-300: #cdbaf2;
  --color-purple-400: #ac91e3;
  --color-purple-500: #9971e5;
  --color-purple-600: #4d1aad;
  --color-purple-700: #320585;
  --color-purple-800: #1e0056;
  --color-purple-900: #15003d;
  --color-teal-50: #ecf8f9;
  --color-teal-100: #d4eef0;
  --color-teal-200: #a8dde1;
  --color-teal-300: #74c4ca;
  --color-teal-400: #459fa5;
  --color-teal-500: #2a9098;
  --color-teal-600: #14818f;
  --color-teal-700: #0b6c79;
  --color-teal-800: #075560;
  --color-teal-900: #053338;
  /* Lightest facet of the Thrive leaf mark. */
  --color-teal-leaf-pale: #b7dde1;
  /* Mid facet of the Thrive leaf mark. */
  --color-teal-leaf-mid: #87cfd4;
  /* Right-arc facet of the Thrive leaf mark: teal-600, pinned so no theme recolours the logo. */
  --color-teal-leaf-core: #14818f;
  /* Bottom-left facet of the Thrive leaf mark: teal-400, pinned so no theme recolours the logo. */
  --color-teal-leaf-mass: #459fa5;
  --color-care-50: #eff3f9;
  --color-care-100: #dde5f1;
  --color-care-200: #bccbe3;
  --color-care-300: #92a9cf;
  --color-care-400: #6884b6;
  --color-care-500: #4c6aa0;
  --color-care-600: #3d5a8a;
  --color-care-700: #324b75;
  --color-care-800: #283c5f;
  --color-care-900: #1c2a42;
  --color-blue-50: #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-200: #bfdbfe;
  --color-blue-300: #93c5fd;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-blue-800: #1e40af;
  --color-blue-900: #1e3a8a;
  --color-amber-50: #fffbeb;
  --color-amber-100: #fef3c7;
  --color-amber-200: #fde68a;
  --color-amber-300: #fcd34d;
  /* Mid amber for glyphs on night surfaces: gold rather than the brown cast 600 takes on dark. */
  --color-amber-400: #fbbf24;
  --color-amber-600: #d97706;
  --color-amber-700: #b45309;
  --color-amber-800: #92400e;
  /* Warm brown accent ink: the groceries surface identity in page headers, chips, and progress fills. */
  --color-amber-ink: #8a5a2b;
  --color-rose-50: #fff1f2;
  --color-rose-100: #ffe4e6;
  --color-rose-200: #fecdd3;
  --color-rose-300: #fda4af;
  /* Mid rose for glyphs on night surfaces: 600 reads as a hot crimson alarm at this size. */
  --color-rose-400: #fb7185;
  --color-rose-600: #e11d48;
  --color-rose-700: #be123c;
  --color-rose-800: #9f1239;
  --color-orange-50: #fff7ed;
  --color-orange-100: #ffedd5;
  --color-orange-200: #fed7aa;
  --color-orange-300: #fdba74;
  --color-orange-400: #fb923c;
  --color-orange-500: #f97316;
  --color-orange-600: #ea580c;
  --color-orange-700: #c2410c;
  --color-orange-800: #9a3412;
  --color-orange-900: #7c2d12;
  --color-leaf: #4caf7d;
  --color-leaf-dark: #327b57;
  --color-leaf-soft: #e6f4ec;
  --color-mist: #e8edeb;
  --color-mist-dark: #c9d2cf;
  --color-mist-pale: #e8edeb;
  --color-hair-2: #e8edeb;
  --color-hair: #dbe0dd;
  /* Frost white. Rime highlight and the brightest facet edge. */
  --color-ice-50: #f4fcff;
  /* Hoarfrost. */
  --color-ice-100: #e2f5fd;
  /* Pale glacial. Top of the frozen flame, where light enters. */
  --color-ice-200: #c2e9f8;
  /* Ice blue. */
  --color-ice-300: #9adcf3;
  /* Glacier. */
  --color-ice-400: #6ec7e8;
  /* Deep ice. Body of the frozen flame. */
  --color-ice-500: #46abd6;
  /* Crevasse. */
  --color-ice-600: #2f8cbb;
  /* Meltwater under ice. Base of the frozen flame. */
  --color-ice-700: #236f98;
  /* Deep crevasse. */
  --color-ice-800: #175373;
  /* Shadow side of a facet, used at low alpha for depth. */
  --color-ice-900: #0d3b53;
  --color-behaviour-movement: #14818f;
  --color-behaviour-sleep: #5b6fb8;
  --color-behaviour-food: #c2882a;
  --color-behaviour-stress: #7a9477;
  --color-behaviour-connection: #b5535b;
  --color-vivid-amber: #d97706;
  --color-vivid-rose: #e11d48;
  --color-vivid-sky: #2f8cbb;
  --color-vivid-orange: #ea580c;
  --color-vivid-purple: #9971e5;
  --color-vivid-blue: #2563eb;
  --color-vivid-green: #327b57;
  --color-vivid-periwinkle: #4c6aa0;
  --color-vivid-pink: #db2777;
  --color-topology-edge: #8aa0b1;
  --color-topology-grid: #d8e3ea;
  --color-attention-routine-bg: #f3f5f7;
  --color-attention-routine-border: #d9dde0;
  --color-attention-routine-ink: #4f5764;
  --color-attention-timely-bg: #fff4e6;
  --color-attention-timely-border: #f5c98a;
  --color-attention-timely-ink: #b8530c;
  --color-attention-urgent-bg: #fef2f2;
  --color-attention-urgent-border: #fecaca;
  --color-attention-urgent-ink: #991b1b;
  /* Pressing tier gradient stop 1 (muted dark teal). */
  --color-attention-surface-1: #3d6b6e;
  /* Pressing tier gradient stop 2. */
  --color-attention-surface-2: #2f5559;
  /* Pressing tier gradient stop 3 (deepest). */
  --color-attention-surface-3: #244447;
  /* Urgent tier gradient stop 1 (crimson). */
  --color-attention-urgent-surface-1: #8a2f2f;
  --color-attention-urgent-surface-2: #6e2121;
  --color-attention-urgent-surface-3: #4a1414;
  --color-attention-routine-surface-1: #f7f9f8;
  --color-attention-routine-surface-2: #eef2f1;
  --color-attention-routine-surface-3: #e3e8e6;
  --color-ambient-sleep: #5b6fb8;
  --color-ambient-energy: #c2882a;
  --color-ambient-calm: #7a9477;
  --color-ambient-strength: #a8552c;
  --color-ambient-heart: #b5535b;
  --color-clinical-sleep: #3d5a8a;
  --color-clinical-glp1: #8a6228;
  --color-clinical-cardio: #2a5a5e;
  --color-chip-recipe: #a8552c;
  /* Recipe kind tint behind chip-recipe. */
  --color-chip-recipe-bg: #fdf3ed;
  /* Recipe CTA hover (darker rust). */
  --color-chip-recipe-hover: #8a4422;
  --color-chip-article: #6b5b8a;
  --color-chip-story: #8a5a3a;
  /* Brown/story kind tint. */
  --color-chip-story-bg: #faf3ec;
  /* Reset kind ink (plum). */
  --color-chip-reset: #6b4a8a;
  /* Reset kind tint. */
  --color-chip-reset-bg: #f5f0fa;
  /* Night ground. */
  --color-sleep-deep: #071724;
  /* Moon-orb core teal. */
  --color-sleep-core: #087483;
  /* Sleeping accent teal (rgb 131,210,216). */
  --color-sleep-accent: #83d2d8;
  /* Sleeping headline cream. */
  --color-sleep-cream: #f3f8f6;
  /* Sleeping muted text (rgb 226,238,235). */
  --color-sleep-mist: #e2eeeb;
  /* Moon highlight (rgb 196,231,228). */
  --color-sleep-glow: #c4e7e4;
  /* Warm paper-grid fill (plan media card). */
  --color-linen: #efe9d8;
  /* Warm paper-grid line (plan media card). */
  --color-sand: #dccfa8;
  --color-day-dawn: #fde9c7;
  --color-day-morning: #fbd9a3;
  --color-day-twilight: #c4b3b6;
  --color-day-dusk: #4a567a;
  --color-day-night: #1e2742;
  --color-day-midnight: #0f1428;
  /* Streak takeover scrim, deepest warm stop */
  --color-celebration-ember-deep: #1c1210;
  /* Streak takeover scrim, warm mid stop */
  --color-celebration-ember-warm: #2b1a12;
  /* Page ground and tab bar. Deepest stop, so sheets read as lifted. */
  --color-night-page: #070d14;
  /* Entry-sheet aurora base; one step above the page. */
  --color-night-sheet: #0a1018;
  /* Card and panel fill. */
  --color-night-surface: #0f1a26;
  /* Nested or selected surface above a card. */
  --color-night-surface-lifted: #17232f;
  /* Subtle divider. */
  --color-night-hair: #1d2a37;
  /* Default border. */
  --color-night-border: #2a3846;
  /* Primary text on night surfaces. */
  --color-night-text: #f2f5f8;
  /* Supporting text on night surfaces. */
  --color-night-text-secondary: #a4aebb;
  /* Hints and metadata on night surfaces. */
  --color-night-text-tertiary: #74808f;
  /* Frame canvas and empty-state ground. */
  --color-personal-reset-canvas: #0a1320;
  /* Full-screen editor ground. */
  --color-personal-reset-editor: #0a1424;
  /* Full-screen player ground. */
  --color-personal-reset-player: #050a14;
  /* Destructive text on a dark Personal Reset surface. */
  --color-personal-reset-error: #ff9b9b;
  --shadow-card: 0 1px 2px color-mix(in srgb, var(--color-navy) 4%, transparent), 0 4px 14px color-mix(in srgb, var(--color-navy) 5%, transparent);
  --shadow-card-hover: 0 1px 2px color-mix(in srgb, var(--color-navy) 5%, transparent), 0 8px 22px color-mix(in srgb, var(--color-navy) 8%, transparent);
  /* Positive/connected card state: quiet leaf ring + soft neutral lift. */
  --shadow-card-connected: 0 0 0 1px color-mix(in srgb, var(--color-leaf) 10%, transparent), 0 1px 2px color-mix(in srgb, var(--color-navy) 4%, transparent), 0 8px 22px -16px color-mix(in srgb, var(--color-leaf) 22%, transparent);
  /* Selected/active card state: teal ring + teal glow. */
  --shadow-card-active: 0 0 0 1px color-mix(in srgb, var(--color-teal-500) 35%, transparent), 0 10px 24px -14px color-mix(in srgb, var(--color-teal-700) 45%, transparent);
  --shadow-microstep: 0 1px 0 rgba(0,0,0,0.04), 0 18px 40px -24px color-mix(in srgb, var(--color-navy) 25%, transparent);
  --shadow-sheet: 0 20px 60px color-mix(in srgb, var(--color-navy) 25%, transparent);
  --shadow-focus: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-teal-400);
  /* Hero/raised card elevation, deeper than card. Used by CARD_CHROME_RAISED and FeatureCard. */
  --shadow-raised: 0 1px 2px color-mix(in srgb, var(--color-navy) 5%, transparent), 0 14px 36px -18px color-mix(in srgb, var(--color-navy) 18%, transparent);
  /* Primary button resting shadow. */
  --shadow-button: 0 1px 0 color-mix(in srgb, var(--color-navy) 6%, transparent), 0 8px 22px -10px color-mix(in srgb, var(--color-teal-700) 55%, transparent);
  /* QuietCard night-mode drop shadow. */
  --shadow-sleeping: 0 28px 90px -52px rgba(0,0,0,0.82);
  /* 4px - chips, small fields, track ends */
  --radius-sm: 0.25rem;
  /* 8px - inputs, buttons, inline controls */
  --radius-md: 0.5rem;
  /* 12px - flat cards inside a surface */
  --radius-lg: 0.75rem;
  /* 16px - raised cards, large pills */
  --radius-xl: 1rem;
  /* 24px - the outer card chrome of a surface */
  --radius-2xl: 1.5rem;
  /* 28px - plan dialogs, large modals */
  --radius-modal: 1.75rem;
  --radius-full: 9999px;
  --font-sans: "Inter Tight Variable", "Inter Variable", "Inter Tight", "Inter", "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Playfair carries titles per the connectors-design handoff; Newsreader stays as the fallback face. The self-hosted fontsource families register with a ' Variable' suffix, so those names must lead the stack. */
  --font-title: "Playfair Display Variable", "Playfair Display", "Newsreader Variable", "Newsreader", "Source Serif Pro", "Iowan Old Style", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
  /* 12px - nav and eyebrow micro-caps. The floor for functional text; below this it fails WCAG 1.4.4 reflow and the plain-language reading bar. */
  --text-2xs: 0.75rem;
  /* 12px mobile to 13px desktop. Never below 12px: that is the floor for text a member has to read. */
  --text-xs: clamp(12px, calc(12px + (13 - 12) * ((100vw - 375px) / (1600 - 375))), 13px);
  --text-sm: clamp(12px, calc(12px + (14 - 12) * ((100vw - 375px) / (1600 - 375))), 14px);
  --text-base: clamp(14px, calc(14px + (16 - 14) * ((100vw - 375px) / (1600 - 375))), 16px);
  --text-lg: clamp(16px, calc(16px + (18 - 16) * ((100vw - 375px) / (1600 - 375))), 18px);
  --text-xl: clamp(18px, calc(18px + (20 - 18) * ((100vw - 375px) / (1600 - 375))), 20px);
  --text-2xl: clamp(20px, calc(20px + (24 - 20) * ((100vw - 375px) / (1600 - 375))), 24px);
  --text-3xl: clamp(24px, calc(24px + (30 - 24) * ((100vw - 375px) / (1600 - 375))), 30px);
  --text-4xl: clamp(30px, calc(30px + (36 - 30) * ((100vw - 375px) / (1600 - 375))), 36px);
  --text-5xl: clamp(32px, calc(32px + (48 - 32) * ((100vw - 375px) / (1600 - 375))), 48px);
  --text-6xl: clamp(36px, calc(36px + (60 - 36) * ((100vw - 375px) / (1600 - 375))), 60px);
  /* Snapshot score / hero display number. Larger floor than 6xl; not a body-text size. */
  --text-display: clamp(44px, 7vw, 60px);
  /* Shared page-section header title. 26px mobile to 32px desktop, the display step of the v11 type scale. */
  --text-page-title: clamp(26px, calc(26px + (32 - 26) * ((100vw - 375px) / (1600 - 375))), 32px);
  /* 29px - two-column card section header (plan goals, progress focus areas). Fixed; sits between 2xl ceiling and 3xl floor. */
  --text-section-title: 1.8125rem;
  /* 15px - page-section header subtitle lede. The emphasis step of the v11 type scale. */
  --text-lede: 0.9375rem;
  /* Display + H1 */
  --tracking-tight: -0.018em;
  /* H2 / large */
  --tracking-heading: -0.015em;
  /* Body + UI text */
  --tracking-body: -0.005em;
  /* Mono eyebrows */
  --tracking-caps: 0.16em;
  /* Mono eyebrows, looser */
  --tracking-caps-lg: 0.18em;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-modal-in: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-modal-out: cubic-bezier(0.4, 0, 1, 1);
  --ease-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-emphasised: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasised-accel: cubic-bezier(0.3, 0, 1, 1);
  /* Canonical UI ease. Most things ride this at 200ms. */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-spring-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring-soft: cubic-bezier(0.16, 1, 0.3, 1);
  /* Snapshot state transitions and stagger reveals. */
  --ease-snap-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  /* Screen-level transitions (460-720ms). */
  --ease-screen: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-tap: cubic-bezier(0.4, 0, 0.6, 1);
  --ease-gentle: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-pressing: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --duration-slower: 480ms;
  --duration-stagger: 60ms;
  --duration-instant: 0ms;
  /* motion.tap - button press, chip toggle */
  --duration-tap: 120ms;
  /* motion.gentle - default UI panel/reveal/hover */
  --duration-gentle: 240ms;
  /* motion.considered - card and sheet enter/leave */
  --duration-considered: 420ms;
  /* motion.pressing - urgent attention surfaces */
  --duration-pressing: 160ms;
  /* motion.ambient - heartbeat pulse, breathing dots */
  --duration-ambient: 900ms;
  --color-ink-primary: #0a1f3a;
  --color-ink-body: #3a4150;
  --color-ink-secondary: #4f5764;
  --color-ink-tertiary: #6a707c;
  --color-ink-quaternary: #6d727c;
  --color-ink-muted: #6a707c;
  --color-ink-subtle: #6d727c;
  --color-ink-on-brand: #ffffff;
  /* Text and line work over photography, video and the fixed night surfaces. White in every theme, unlike on-brand. */
  --color-ink-on-media: #ffffff;
  /* Small uppercase labels above titles. Brand teal on light; a quiet grey on dark so mint is left for actions and progress. */
  --color-ink-eyebrow: #0b6c79;
  --color-ink-brand: #0b6c79;
  --color-ink-brand-light: #14818f;
  --color-ink-accent-leaf: #327b57;
  --color-surface-elevated: #ffffff;
  --color-surface-secondary: #ecf8f9;
  --color-surface-tertiary: #f6f7f8;
  --color-surface-ambient: #fbfaf6;
  --color-surface-canvas: #f4f2ea;
  --color-surface-accent-leaf: #e6f4ec;
  --color-surface-track: #e8edeb;
  --color-surface-sunken: #fbfaf6;
  --color-surface-raised: #fbfaf6;
  --color-border-hairline: color-mix(in srgb, var(--color-mist-dark) 40%, transparent);
  --color-border-subtle: color-mix(in srgb, var(--color-mist-dark) 30%, transparent);
  /* The edge of a card. A visible hairline on light; on dark the edge comes from light, so it nearly disappears. */
  --color-border-card: color-mix(in srgb, var(--color-mist-dark) 40%, transparent);
  --color-border-strong: #c9d2cf;
  --color-border-soft: #dbe0dd;
  --color-border-default: #e8edeb;
  --color-border-primary: #74c4ca;
  --color-border-secondary: #d9dde0;
  --color-border-focus: #14818f;
}

:root {
  /* 16px - the vertical rhythm unit, body line height divided by 1.5. The gap between any two stacked blocks. */
  --space-unit: 1rem;
  /* 32px - twice the unit. The gap above a section heading, which is what makes the page scannable without rules. */
  --space-section: 2rem;
  --motion-meta-stagger-tight: 40ms;
  --motion-meta-hero-reveal: 320ms;
  --motion-meta-count-up: 800ms;
  --motion-meta-confirm-fade: 250ms;
  --motion-meta-confirm-reorder-delay: 400ms;
  --vt-duration: 220ms;
  --vt-ease: cubic-bezier(0.4, 0, 0.6, 1);
  /* < 600px - mobile */
  --breakpoint-compact: 0px;
  /* 600-960px - tablet portrait */
  --breakpoint-medium: 600px;
  /* 960-1280px - sidebar appears */
  --breakpoint-expanded: 960px;
  /* 1280-1600px - standard desktop */
  --breakpoint-wide: 1280px;
  /* >=1600px - large desktop, max content 1240px */
  --breakpoint-theatre: 1600px;
  /* One grade over all photography so CMS images from different shoots read as one collection. */
  --media-grade: saturate(0.94) contrast(1.03);
  --gradient-pressing: linear-gradient(165deg, var(--color-attention-surface-1) 0%, var(--color-attention-surface-2) 60%, var(--color-attention-surface-3) 100%);
  --gradient-urgent: linear-gradient(165deg, var(--color-attention-urgent-surface-1) 0%, var(--color-attention-urgent-surface-2) 55%, var(--color-attention-urgent-surface-3) 100%);
  --gradient-routine: linear-gradient(165deg, var(--color-attention-routine-surface-1) 0%, var(--color-attention-routine-surface-2) 60%, var(--color-attention-routine-surface-3) 100%);
  --gradient-microstep: linear-gradient(160deg, var(--color-paper) 0%, #f5f1e6 60%, #ece6d2 100%);
  /* Default card surface: a soft teal wash over white at the corners, derived from teal-100 so it sits in the DS teal family. Present but not overbearing. Pairs with shadow-card. */
  --gradient-card: linear-gradient(160deg, color-mix(in srgb, var(--color-teal-100) 32%, var(--color-paper)) 0%, var(--color-paper) 50%, color-mix(in srgb, var(--color-teal-100) 26%, var(--color-paper)) 100%);
  /* Positive/connected card state: a quiet leaf wash. Pairs with shadow-card-connected and a softened leaf border. */
  --gradient-card-connected: linear-gradient(160deg, color-mix(in srgb, var(--color-leaf-soft) 34%, var(--color-paper)) 0%, var(--color-paper) 52%, color-mix(in srgb, var(--color-leaf-soft) 28%, var(--color-paper)) 100%);
  /* Selected/active card state: teal-tinted. Pairs with shadow-card-active and a teal border. */
  --gradient-card-active: linear-gradient(160deg, #e7f3f0 0%, var(--color-paper) 55%, #f0f8f5 100%);
  /* QuietCard night fade: transparent at top down to solid sleep-deep. */
  --gradient-sleeping: linear-gradient(180deg, color-mix(in srgb, var(--color-sleep-deep) 20%, transparent) 0%, color-mix(in srgb, var(--color-sleep-deep) 28%, transparent) 26%, color-mix(in srgb, var(--color-sleep-deep) 62%, transparent) 58%, color-mix(in srgb, var(--color-sleep-deep) 94%, transparent) 78%, var(--color-sleep-deep) 100%);
  /* QuietCard night accent: soft teal top glow + deep base anchor. */
  --gradient-sleeping-fade: radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--color-sleep-accent) 16%, transparent) 0%, color-mix(in srgb, var(--color-sleep-accent) 6%, transparent) 24%, transparent 48%), radial-gradient(circle at 50% 86%, color-mix(in srgb, var(--color-sleep-deep) 74%, transparent) 0%, transparent 42%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  /* Raised card surface: mobile night.surface. */
  --color-paper: #1c1c1e;
  --color-cream: #121214;
  /* Page canvas: mobile night.page. */
  --color-cream-warm: #000000;
  --color-cream-deep: #121214;
  --color-butter: #3b331f;
  /* Primary ink flips to mobile night.text. */
  --color-navy: #f2f3ef;
  /* Neutral near-black on the dark ground: a navy scrim turned every photo blue on black. */
  --color-scrim: #060607;
  --color-navy-deep: #ffffff;
  --color-ink: #f2f3ef;
  --color-ink-soft: #d1d1d6;
  --color-gray-50: #242426;
  --color-gray-100: #2c2c2e;
  --color-gray-200: #38383a;
  --color-gray-300: #48484a;
  --color-gray-400: #8e8e93;
  --color-gray-500: #a1a1a7;
  --color-gray-600: #bfbfc5;
  --color-gray-700: #d1d1d6;
  --color-gray-800: #e5e5ea;
  --color-gray-900: #f2f3ef;
  --color-teal-50: #141a19;
  --color-teal-100: #18211f;
  --color-teal-200: #23302d;
  --color-teal-300: #2e6e60;
  --color-teal-400: #4fb596;
  --color-teal-500: #65caad;
  --color-teal-600: #83e3c4;
  --color-teal-700: #83e3c4;
  --color-teal-800: #a0ebd0;
  --color-teal-900: #c0f2de;
  --color-purple-50: #2e283a;
  --color-purple-100: #382f4a;
  --color-purple-200: #473962;
  --color-purple-300: #6d5e8c;
  --color-purple-400: #c0aaec;
  --color-purple-500: #cdbaf2;
  --color-purple-600: #d8c8f7;
  --color-purple-700: #e2d5fb;
  --color-purple-800: #ebe3fc;
  --color-purple-900: #eeedf8;
  --color-care-50: #232730;
  --color-care-100: #272d3b;
  --color-care-200: #2c374a;
  --color-care-300: #475673;
  --color-care-400: #819ac5;
  --color-care-500: #92a9cf;
  --color-care-600: #a7bad9;
  --color-care-700: #bccbe3;
  --color-care-800: #dde5f1;
  --color-care-900: #eff3f9;
  --color-blue-50: #202a3c;
  --color-blue-100: #23324e;
  --color-blue-200: #273f67;
  --color-blue-300: #426999;
  --color-blue-400: #7fb8fc;
  --color-blue-500: #93c5fd;
  --color-blue-600: #a9d0fe;
  --color-blue-700: #bfdbfe;
  --color-blue-800: #dbeafe;
  --color-blue-900: #eff6ff;
  --color-amber-50: #3b331f;
  --color-amber-100: #4d401f;
  --color-amber-200: #685320;
  --color-amber-300: #997721;
  --color-amber-400: #fccb3d;
  --color-amber-600: #fddd6c;
  --color-amber-700: #fde68a;
  --color-amber-800: #fef3c7;
  /* Mobile achievement gold. */
  --color-amber-ink: #f3ce7f;
  --color-rose-50: #3b282c;
  --color-rose-100: #4d2f35;
  --color-rose-200: #683941;
  --color-rose-300: #994c58;
  --color-rose-400: #fc909e;
  --color-rose-600: #feb9c1;
  --color-rose-700: #fecdd3;
  --color-rose-800: #ffe4e6;
  --color-orange-50: #3b281d;
  --color-orange-100: #4d2f1c;
  --color-orange-200: #673a1b;
  --color-orange-300: #995e2f;
  --color-orange-400: #fcaa5e;
  --color-orange-500: #fdba74;
  --color-orange-600: #fec98f;
  --color-orange-700: #fed7aa;
  --color-orange-800: #ffedd5;
  --color-orange-900: #fff7ed;
  --color-ice-50: #223038;
  --color-ice-100: #253b46;
  --color-ice-200: #2a4d5d;
  --color-ice-300: #4a7c8f;
  --color-ice-400: #88d4ef;
  --color-ice-500: #9adcf3;
  --color-ice-600: #aee3f6;
  --color-ice-700: #c2e9f8;
  --color-ice-800: #e2f5fd;
  --color-ice-900: #f4fcff;
  --color-behaviour-movement: #83e3c4;
  --color-behaviour-sleep: #beb1f2;
  --color-behaviour-food: #f3b580;
  --color-behaviour-stress: #b6d59b;
  --color-behaviour-connection: #f0aac6;
  --color-vivid-amber: #fbbf24;
  --color-vivid-rose: #fb7185;
  --color-vivid-sky: #6ec7e8;
  --color-vivid-orange: #fb923c;
  --color-vivid-purple: #ac91e3;
  --color-vivid-blue: #60a5fa;
  --color-vivid-green: #4ade80;
  --color-vivid-periwinkle: #93a8e0;
  --color-vivid-pink: #f472b6;
  --color-leaf: #6cc496;
  --color-leaf-dark: #8fd6b0;
  --color-leaf-soft: #15291f;
  --color-mist: #2c2c2e;
  --color-mist-dark: #48484a;
  --color-mist-pale: #2c2c2e;
  --color-hair-2: #2c2c2e;
  --color-hair: #38383a;
  --color-topology-edge: #6b7f8e;
  --color-topology-grid: #2a3138;
  --color-attention-routine-bg: #242426;
  --color-attention-routine-border: #38383a;
  --color-attention-routine-ink: #bfbfc5;
  --color-attention-routine-surface-1: #1c1c1e;
  --color-attention-routine-surface-2: #202022;
  --color-attention-routine-surface-3: #252527;
  --color-attention-timely-bg: #2a1d0f;
  --color-attention-timely-border: #6b4a1f;
  --color-attention-timely-ink: #f6be8a;
  --color-attention-urgent-bg: #2a1414;
  --color-attention-urgent-border: #6e2121;
  --color-attention-urgent-ink: #fca5a5;
  --color-chip-recipe: #f3b580;
  --color-chip-recipe-bg: #2a1c14;
  --color-chip-recipe-hover: #f8c9a0;
  --color-chip-article: #c3b4e8;
  --color-chip-story: #e8bc98;
  --color-chip-story-bg: #271d15;
  --color-chip-reset: #cdb3ec;
  --color-chip-reset-bg: #221a2b;
  --color-sleep-cream: #121a19;
  --color-sleep-mist: #1a2624;
  --color-sleep-glow: #22403c;
  --color-linen: #1e1c17;
  --color-sand: #4a4234;
  --color-ink-primary: #f2f3ef;
  --color-ink-body: #dcdce0;
  --color-ink-secondary: #d1d1d6;
  --color-ink-tertiary: #bfbfc5;
  --color-ink-quaternary: #a1a1a7;
  --color-ink-muted: #bfbfc5;
  --color-ink-subtle: #a1a1a7;
  /* Mobile textInverse: black on the mint fill. */
  --color-ink-on-brand: #000000;
  --color-ink-eyebrow: #a1a1a7;
  --color-ink-brand: #83e3c4;
  --color-ink-brand-light: #a0ebd0;
  --color-ink-accent-leaf: #8fd6b0;
  --color-surface-elevated: #1c1c1e;
  --color-surface-secondary: #26262a;
  --color-surface-tertiary: #242426;
  --color-surface-ambient: #000000;
  --color-surface-canvas: #121214;
  --color-surface-accent-leaf: #15291f;
  --color-surface-track: #38383a;
  --color-surface-sunken: #121214;
  --color-surface-raised: #2c2c2e;
  --color-border-hairline: color-mix(in srgb, #7c7c82 30%, transparent);
  --color-border-subtle: color-mix(in srgb, #7c7c82 22%, transparent);
  --color-border-card: color-mix(in srgb, #ffffff 6%, transparent);
  --color-border-strong: #545458;
  --color-border-soft: #38383a;
  --color-border-default: #38383a;
  --color-border-primary: #55555b;
  --color-border-secondary: #38383a;
  --color-border-focus: #83e3c4;
  --shadow-card: inset 0 1px 0 color-mix(in srgb, #ffffff 7%, transparent), 0 1px 2px color-mix(in srgb, #000000 40%, transparent), 0 8px 24px -8px color-mix(in srgb, #000000 55%, transparent);
  --shadow-card-hover: 0 1px 2px color-mix(in srgb, #000000 45%, transparent), 0 8px 22px color-mix(in srgb, #000000 40%, transparent);
  --shadow-card-connected: 0 0 0 1px color-mix(in srgb, var(--color-leaf) 18%, transparent), 0 8px 22px -16px color-mix(in srgb, #000000 50%, transparent);
  --shadow-card-active: 0 0 0 1px color-mix(in srgb, var(--color-teal-500) 40%, transparent), 0 10px 24px -14px color-mix(in srgb, #000000 60%, transparent);
  --shadow-microstep: 0 18px 40px -24px color-mix(in srgb, #000000 70%, transparent);
  --shadow-sheet: 0 20px 60px color-mix(in srgb, #000000 60%, transparent);
  --shadow-focus: 0 0 0 2px #000000, 0 0 0 4px var(--color-teal-400);
  --shadow-raised: inset 0 1px 0 color-mix(in srgb, #ffffff 9%, transparent), 0 1px 2px color-mix(in srgb, #000000 45%, transparent), 0 18px 40px -16px color-mix(in srgb, #000000 65%, transparent);
  --shadow-button: 0 8px 22px -10px color-mix(in srgb, var(--color-teal-700) 35%, transparent);
  /* Mobile body text is the native system sans. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Dark headings are Poppins, matching the mobile app. Light keeps the Playfair serif. Loaded from @fontsource/poppins in the web entry. */
  --font-title: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --media-grade: saturate(0.88) contrast(1.06) brightness(0.9);
  /* Neutral graphite: the light card mixes teal-100, which reads as a green cast on every dark card. */
  --gradient-card: linear-gradient(160deg, #232325 0%, var(--color-paper) 50%, #1a1a1c 100%);
  --gradient-microstep: linear-gradient(160deg, var(--color-paper) 0%, #202022 60%, #252527 100%);
  --gradient-card-active: linear-gradient(160deg, #102a25 0%, var(--color-paper) 55%, #13302a 100%);
}

[data-theme="dark"]:not(:root) {
  color-scheme: dark;
  /* Raised card surface: mobile night.surface. */
  --color-paper: #1c1c1e;
  --color-cream: #121214;
  /* Page canvas: mobile night.page. */
  --color-cream-warm: #000000;
  --color-cream-deep: #121214;
  --color-butter: #3b331f;
  /* Primary ink flips to mobile night.text. */
  --color-navy: #f2f3ef;
  /* Neutral near-black on the dark ground: a navy scrim turned every photo blue on black. */
  --color-scrim: #060607;
  --color-navy-deep: #ffffff;
  --color-ink: #f2f3ef;
  --color-ink-soft: #d1d1d6;
  --color-gray-50: #242426;
  --color-gray-100: #2c2c2e;
  --color-gray-200: #38383a;
  --color-gray-300: #48484a;
  --color-gray-400: #8e8e93;
  --color-gray-500: #a1a1a7;
  --color-gray-600: #bfbfc5;
  --color-gray-700: #d1d1d6;
  --color-gray-800: #e5e5ea;
  --color-gray-900: #f2f3ef;
  --color-teal-50: #141a19;
  --color-teal-100: #18211f;
  --color-teal-200: #23302d;
  --color-teal-300: #2e6e60;
  --color-teal-400: #4fb596;
  --color-teal-500: #65caad;
  --color-teal-600: #83e3c4;
  --color-teal-700: #83e3c4;
  --color-teal-800: #a0ebd0;
  --color-teal-900: #c0f2de;
  --color-purple-50: #2e283a;
  --color-purple-100: #382f4a;
  --color-purple-200: #473962;
  --color-purple-300: #6d5e8c;
  --color-purple-400: #c0aaec;
  --color-purple-500: #cdbaf2;
  --color-purple-600: #d8c8f7;
  --color-purple-700: #e2d5fb;
  --color-purple-800: #ebe3fc;
  --color-purple-900: #eeedf8;
  --color-care-50: #232730;
  --color-care-100: #272d3b;
  --color-care-200: #2c374a;
  --color-care-300: #475673;
  --color-care-400: #819ac5;
  --color-care-500: #92a9cf;
  --color-care-600: #a7bad9;
  --color-care-700: #bccbe3;
  --color-care-800: #dde5f1;
  --color-care-900: #eff3f9;
  --color-blue-50: #202a3c;
  --color-blue-100: #23324e;
  --color-blue-200: #273f67;
  --color-blue-300: #426999;
  --color-blue-400: #7fb8fc;
  --color-blue-500: #93c5fd;
  --color-blue-600: #a9d0fe;
  --color-blue-700: #bfdbfe;
  --color-blue-800: #dbeafe;
  --color-blue-900: #eff6ff;
  --color-amber-50: #3b331f;
  --color-amber-100: #4d401f;
  --color-amber-200: #685320;
  --color-amber-300: #997721;
  --color-amber-400: #fccb3d;
  --color-amber-600: #fddd6c;
  --color-amber-700: #fde68a;
  --color-amber-800: #fef3c7;
  /* Mobile achievement gold. */
  --color-amber-ink: #f3ce7f;
  --color-rose-50: #3b282c;
  --color-rose-100: #4d2f35;
  --color-rose-200: #683941;
  --color-rose-300: #994c58;
  --color-rose-400: #fc909e;
  --color-rose-600: #feb9c1;
  --color-rose-700: #fecdd3;
  --color-rose-800: #ffe4e6;
  --color-orange-50: #3b281d;
  --color-orange-100: #4d2f1c;
  --color-orange-200: #673a1b;
  --color-orange-300: #995e2f;
  --color-orange-400: #fcaa5e;
  --color-orange-500: #fdba74;
  --color-orange-600: #fec98f;
  --color-orange-700: #fed7aa;
  --color-orange-800: #ffedd5;
  --color-orange-900: #fff7ed;
  --color-ice-50: #223038;
  --color-ice-100: #253b46;
  --color-ice-200: #2a4d5d;
  --color-ice-300: #4a7c8f;
  --color-ice-400: #88d4ef;
  --color-ice-500: #9adcf3;
  --color-ice-600: #aee3f6;
  --color-ice-700: #c2e9f8;
  --color-ice-800: #e2f5fd;
  --color-ice-900: #f4fcff;
  --color-behaviour-movement: #83e3c4;
  --color-behaviour-sleep: #beb1f2;
  --color-behaviour-food: #f3b580;
  --color-behaviour-stress: #b6d59b;
  --color-behaviour-connection: #f0aac6;
  --color-vivid-amber: #fbbf24;
  --color-vivid-rose: #fb7185;
  --color-vivid-sky: #6ec7e8;
  --color-vivid-orange: #fb923c;
  --color-vivid-purple: #ac91e3;
  --color-vivid-blue: #60a5fa;
  --color-vivid-green: #4ade80;
  --color-vivid-periwinkle: #93a8e0;
  --color-vivid-pink: #f472b6;
  --color-leaf: #6cc496;
  --color-leaf-dark: #8fd6b0;
  --color-leaf-soft: #15291f;
  --color-mist: #2c2c2e;
  --color-mist-dark: #48484a;
  --color-mist-pale: #2c2c2e;
  --color-hair-2: #2c2c2e;
  --color-hair: #38383a;
  --color-topology-edge: #6b7f8e;
  --color-topology-grid: #2a3138;
  --color-attention-routine-bg: #242426;
  --color-attention-routine-border: #38383a;
  --color-attention-routine-ink: #bfbfc5;
  --color-attention-routine-surface-1: #1c1c1e;
  --color-attention-routine-surface-2: #202022;
  --color-attention-routine-surface-3: #252527;
  --color-attention-timely-bg: #2a1d0f;
  --color-attention-timely-border: #6b4a1f;
  --color-attention-timely-ink: #f6be8a;
  --color-attention-urgent-bg: #2a1414;
  --color-attention-urgent-border: #6e2121;
  --color-attention-urgent-ink: #fca5a5;
  --color-chip-recipe: #f3b580;
  --color-chip-recipe-bg: #2a1c14;
  --color-chip-recipe-hover: #f8c9a0;
  --color-chip-article: #c3b4e8;
  --color-chip-story: #e8bc98;
  --color-chip-story-bg: #271d15;
  --color-chip-reset: #cdb3ec;
  --color-chip-reset-bg: #221a2b;
  --color-sleep-cream: #121a19;
  --color-sleep-mist: #1a2624;
  --color-sleep-glow: #22403c;
  --color-linen: #1e1c17;
  --color-sand: #4a4234;
  --color-ink-primary: #f2f3ef;
  --color-ink-body: #dcdce0;
  --color-ink-secondary: #d1d1d6;
  --color-ink-tertiary: #bfbfc5;
  --color-ink-quaternary: #a1a1a7;
  --color-ink-muted: #bfbfc5;
  --color-ink-subtle: #a1a1a7;
  /* Mobile textInverse: black on the mint fill. */
  --color-ink-on-brand: #000000;
  --color-ink-eyebrow: #a1a1a7;
  --color-ink-brand: #83e3c4;
  --color-ink-brand-light: #a0ebd0;
  --color-ink-accent-leaf: #8fd6b0;
  --color-surface-elevated: #1c1c1e;
  --color-surface-secondary: #26262a;
  --color-surface-tertiary: #242426;
  --color-surface-ambient: #000000;
  --color-surface-canvas: #121214;
  --color-surface-accent-leaf: #15291f;
  --color-surface-track: #38383a;
  --color-surface-sunken: #121214;
  --color-surface-raised: #2c2c2e;
  --color-border-hairline: color-mix(in srgb, #7c7c82 30%, transparent);
  --color-border-subtle: color-mix(in srgb, #7c7c82 22%, transparent);
  --color-border-card: color-mix(in srgb, #ffffff 6%, transparent);
  --color-border-strong: #545458;
  --color-border-soft: #38383a;
  --color-border-default: #38383a;
  --color-border-primary: #55555b;
  --color-border-secondary: #38383a;
  --color-border-focus: #83e3c4;
  --shadow-card: inset 0 1px 0 color-mix(in srgb, #ffffff 7%, transparent), 0 1px 2px color-mix(in srgb, #000000 40%, transparent), 0 8px 24px -8px color-mix(in srgb, #000000 55%, transparent);
  --shadow-card-hover: 0 1px 2px color-mix(in srgb, #000000 45%, transparent), 0 8px 22px color-mix(in srgb, #000000 40%, transparent);
  --shadow-card-connected: 0 0 0 1px color-mix(in srgb, var(--color-leaf) 18%, transparent), 0 8px 22px -16px color-mix(in srgb, #000000 50%, transparent);
  --shadow-card-active: 0 0 0 1px color-mix(in srgb, var(--color-teal-500) 40%, transparent), 0 10px 24px -14px color-mix(in srgb, #000000 60%, transparent);
  --shadow-microstep: 0 18px 40px -24px color-mix(in srgb, #000000 70%, transparent);
  --shadow-sheet: 0 20px 60px color-mix(in srgb, #000000 60%, transparent);
  --shadow-focus: 0 0 0 2px #000000, 0 0 0 4px var(--color-teal-400);
  --shadow-raised: inset 0 1px 0 color-mix(in srgb, #ffffff 9%, transparent), 0 1px 2px color-mix(in srgb, #000000 45%, transparent), 0 18px 40px -16px color-mix(in srgb, #000000 65%, transparent);
  --shadow-button: 0 8px 22px -10px color-mix(in srgb, var(--color-teal-700) 35%, transparent);
  --media-grade: saturate(0.88) contrast(1.06) brightness(0.9);
  /* Neutral graphite: the light card mixes teal-100, which reads as a green cast on every dark card. */
  --gradient-card: linear-gradient(160deg, #232325 0%, var(--color-paper) 50%, #1a1a1c 100%);
  --gradient-microstep: linear-gradient(160deg, var(--color-paper) 0%, #202022 60%, #252527 100%);
  --gradient-card-active: linear-gradient(160deg, #102a25 0%, var(--color-paper) 55%, #13302a 100%);
  /* Teal-tinted text ink, 8.9:1 on paper. The teal marks are mid-tone and correct on a dot or a chart vertex; small text takes this instead. */
  --color-ink-teal: color-mix(in srgb, var(--color-teal-700) 62%, var(--color-ink));
  --gradient-pressing: linear-gradient(165deg, var(--color-attention-surface-1) 0%, var(--color-attention-surface-2) 60%, var(--color-attention-surface-3) 100%);
  --gradient-urgent: linear-gradient(165deg, var(--color-attention-urgent-surface-1) 0%, var(--color-attention-urgent-surface-2) 55%, var(--color-attention-urgent-surface-3) 100%);
  --gradient-routine: linear-gradient(165deg, var(--color-attention-routine-surface-1) 0%, var(--color-attention-routine-surface-2) 60%, var(--color-attention-routine-surface-3) 100%);
  /* Positive/connected card state: a quiet leaf wash. Pairs with shadow-card-connected and a softened leaf border. */
  --gradient-card-connected: linear-gradient(160deg, color-mix(in srgb, var(--color-leaf-soft) 34%, var(--color-paper)) 0%, var(--color-paper) 52%, color-mix(in srgb, var(--color-leaf-soft) 28%, var(--color-paper)) 100%);
  /* QuietCard night fade: transparent at top down to solid sleep-deep. */
  --gradient-sleeping: linear-gradient(180deg, color-mix(in srgb, var(--color-sleep-deep) 20%, transparent) 0%, color-mix(in srgb, var(--color-sleep-deep) 28%, transparent) 26%, color-mix(in srgb, var(--color-sleep-deep) 62%, transparent) 58%, color-mix(in srgb, var(--color-sleep-deep) 94%, transparent) 78%, var(--color-sleep-deep) 100%);
  /* QuietCard night accent: soft teal top glow + deep base anchor. */
  --gradient-sleeping-fade: radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--color-sleep-accent) 16%, transparent) 0%, color-mix(in srgb, var(--color-sleep-accent) 6%, transparent) 24%, transparent 48%), radial-gradient(circle at 50% 86%, color-mix(in srgb, var(--color-sleep-deep) 74%, transparent) 0%, transparent 42%);
}

:root[data-theme] [data-theme="light"] {
  color-scheme: light;
  --color-paper: #ffffff;
  --color-cream: #f7f9f8;
  --color-cream-warm: #fbfaf6;
  --color-cream-deep: #f4f2ea;
  --color-butter: #f7efd1;
  --color-navy: #0a1f3a;
  --color-navy-deep: #061428;
  /* Dark layer over a photo or video so white ink reads. Navy on light, the brand's own deep blue; dark mode swaps in a neutral near-black. Pair with ink-on-media. */
  --color-scrim: #0a1f3a;
  --color-ink: #1b201e;
  --color-ink-soft: #2c3531;
  /* Teal-tinted text ink, 8.9:1 on paper. The teal marks are mid-tone and correct on a dot or a chart vertex; small text takes this instead. */
  --color-ink-teal: color-mix(in srgb, var(--color-teal-700) 62%, var(--color-ink));
  --color-gray-50: #f6f7f8;
  --color-gray-100: #eceef0;
  --color-gray-200: #d9dde0;
  --color-gray-300: #b8bfc4;
  --color-gray-400: #6d727c;
  --color-gray-500: #6a707c;
  --color-gray-600: #4f5764;
  --color-gray-700: #3a4150;
  --color-gray-800: #232a36;
  --color-gray-900: #172235;
  --color-purple-50: #eeedf8;
  --color-purple-100: #ebe3fc;
  --color-purple-200: #e2d5fb;
  --color-purple-300: #cdbaf2;
  --color-purple-400: #ac91e3;
  --color-purple-500: #9971e5;
  --color-purple-600: #4d1aad;
  --color-purple-700: #320585;
  --color-purple-800: #1e0056;
  --color-purple-900: #15003d;
  --color-teal-50: #ecf8f9;
  --color-teal-100: #d4eef0;
  --color-teal-200: #a8dde1;
  --color-teal-300: #74c4ca;
  --color-teal-400: #459fa5;
  --color-teal-500: #2a9098;
  --color-teal-600: #14818f;
  --color-teal-700: #0b6c79;
  --color-teal-800: #075560;
  --color-teal-900: #053338;
  --color-care-50: #eff3f9;
  --color-care-100: #dde5f1;
  --color-care-200: #bccbe3;
  --color-care-300: #92a9cf;
  --color-care-400: #6884b6;
  --color-care-500: #4c6aa0;
  --color-care-600: #3d5a8a;
  --color-care-700: #324b75;
  --color-care-800: #283c5f;
  --color-care-900: #1c2a42;
  --color-blue-50: #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-200: #bfdbfe;
  --color-blue-300: #93c5fd;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-blue-800: #1e40af;
  --color-blue-900: #1e3a8a;
  --color-amber-50: #fffbeb;
  --color-amber-100: #fef3c7;
  --color-amber-200: #fde68a;
  --color-amber-300: #fcd34d;
  /* Mid amber for glyphs on night surfaces: gold rather than the brown cast 600 takes on dark. */
  --color-amber-400: #fbbf24;
  --color-amber-600: #d97706;
  --color-amber-700: #b45309;
  --color-amber-800: #92400e;
  /* Warm brown accent ink: the groceries surface identity in page headers, chips, and progress fills. */
  --color-amber-ink: #8a5a2b;
  --color-rose-50: #fff1f2;
  --color-rose-100: #ffe4e6;
  --color-rose-200: #fecdd3;
  --color-rose-300: #fda4af;
  /* Mid rose for glyphs on night surfaces: 600 reads as a hot crimson alarm at this size. */
  --color-rose-400: #fb7185;
  --color-rose-600: #e11d48;
  --color-rose-700: #be123c;
  --color-rose-800: #9f1239;
  --color-orange-50: #fff7ed;
  --color-orange-100: #ffedd5;
  --color-orange-200: #fed7aa;
  --color-orange-300: #fdba74;
  --color-orange-400: #fb923c;
  --color-orange-500: #f97316;
  --color-orange-600: #ea580c;
  --color-orange-700: #c2410c;
  --color-orange-800: #9a3412;
  --color-orange-900: #7c2d12;
  --color-leaf: #4caf7d;
  --color-leaf-dark: #327b57;
  --color-leaf-soft: #e6f4ec;
  --color-mist: #e8edeb;
  --color-mist-dark: #c9d2cf;
  --color-mist-pale: #e8edeb;
  --color-hair-2: #e8edeb;
  --color-hair: #dbe0dd;
  /* Frost white. Rime highlight and the brightest facet edge. */
  --color-ice-50: #f4fcff;
  /* Hoarfrost. */
  --color-ice-100: #e2f5fd;
  /* Pale glacial. Top of the frozen flame, where light enters. */
  --color-ice-200: #c2e9f8;
  /* Ice blue. */
  --color-ice-300: #9adcf3;
  /* Glacier. */
  --color-ice-400: #6ec7e8;
  /* Deep ice. Body of the frozen flame. */
  --color-ice-500: #46abd6;
  /* Crevasse. */
  --color-ice-600: #2f8cbb;
  /* Meltwater under ice. Base of the frozen flame. */
  --color-ice-700: #236f98;
  /* Deep crevasse. */
  --color-ice-800: #175373;
  /* Shadow side of a facet, used at low alpha for depth. */
  --color-ice-900: #0d3b53;
  --color-behaviour-movement: #14818f;
  --color-behaviour-sleep: #5b6fb8;
  --color-behaviour-food: #c2882a;
  --color-behaviour-stress: #7a9477;
  --color-behaviour-connection: #b5535b;
  --color-vivid-amber: #d97706;
  --color-vivid-rose: #e11d48;
  --color-vivid-sky: #2f8cbb;
  --color-vivid-orange: #ea580c;
  --color-vivid-purple: #9971e5;
  --color-vivid-blue: #2563eb;
  --color-vivid-green: #327b57;
  --color-vivid-periwinkle: #4c6aa0;
  --color-vivid-pink: #db2777;
  --color-topology-edge: #8aa0b1;
  --color-topology-grid: #d8e3ea;
  --color-attention-routine-bg: #f3f5f7;
  --color-attention-routine-border: #d9dde0;
  --color-attention-routine-ink: #4f5764;
  --color-attention-timely-bg: #fff4e6;
  --color-attention-timely-border: #f5c98a;
  --color-attention-timely-ink: #b8530c;
  --color-attention-urgent-bg: #fef2f2;
  --color-attention-urgent-border: #fecaca;
  --color-attention-urgent-ink: #991b1b;
  --color-attention-routine-surface-1: #f7f9f8;
  --color-attention-routine-surface-2: #eef2f1;
  --color-attention-routine-surface-3: #e3e8e6;
  --color-chip-recipe: #a8552c;
  /* Recipe kind tint behind chip-recipe. */
  --color-chip-recipe-bg: #fdf3ed;
  /* Recipe CTA hover (darker rust). */
  --color-chip-recipe-hover: #8a4422;
  --color-chip-article: #6b5b8a;
  --color-chip-story: #8a5a3a;
  /* Brown/story kind tint. */
  --color-chip-story-bg: #faf3ec;
  /* Reset kind ink (plum). */
  --color-chip-reset: #6b4a8a;
  /* Reset kind tint. */
  --color-chip-reset-bg: #f5f0fa;
  /* Sleeping headline cream. */
  --color-sleep-cream: #f3f8f6;
  /* Sleeping muted text (rgb 226,238,235). */
  --color-sleep-mist: #e2eeeb;
  /* Moon highlight (rgb 196,231,228). */
  --color-sleep-glow: #c4e7e4;
  /* Warm paper-grid fill (plan media card). */
  --color-linen: #efe9d8;
  /* Warm paper-grid line (plan media card). */
  --color-sand: #dccfa8;
  --shadow-card: 0 1px 2px color-mix(in srgb, var(--color-navy) 4%, transparent), 0 4px 14px color-mix(in srgb, var(--color-navy) 5%, transparent);
  --shadow-card-hover: 0 1px 2px color-mix(in srgb, var(--color-navy) 5%, transparent), 0 8px 22px color-mix(in srgb, var(--color-navy) 8%, transparent);
  /* Positive/connected card state: quiet leaf ring + soft neutral lift. */
  --shadow-card-connected: 0 0 0 1px color-mix(in srgb, var(--color-leaf) 10%, transparent), 0 1px 2px color-mix(in srgb, var(--color-navy) 4%, transparent), 0 8px 22px -16px color-mix(in srgb, var(--color-leaf) 22%, transparent);
  /* Selected/active card state: teal ring + teal glow. */
  --shadow-card-active: 0 0 0 1px color-mix(in srgb, var(--color-teal-500) 35%, transparent), 0 10px 24px -14px color-mix(in srgb, var(--color-teal-700) 45%, transparent);
  --shadow-microstep: 0 1px 0 rgba(0,0,0,0.04), 0 18px 40px -24px color-mix(in srgb, var(--color-navy) 25%, transparent);
  --shadow-sheet: 0 20px 60px color-mix(in srgb, var(--color-navy) 25%, transparent);
  --shadow-focus: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-teal-400);
  /* Hero/raised card elevation, deeper than card. Used by CARD_CHROME_RAISED and FeatureCard. */
  --shadow-raised: 0 1px 2px color-mix(in srgb, var(--color-navy) 5%, transparent), 0 14px 36px -18px color-mix(in srgb, var(--color-navy) 18%, transparent);
  /* Primary button resting shadow. */
  --shadow-button: 0 1px 0 color-mix(in srgb, var(--color-navy) 6%, transparent), 0 8px 22px -10px color-mix(in srgb, var(--color-teal-700) 55%, transparent);
  --color-ink-primary: #0a1f3a;
  --color-ink-body: #3a4150;
  --color-ink-secondary: #4f5764;
  --color-ink-tertiary: #6a707c;
  --color-ink-quaternary: #6d727c;
  --color-ink-muted: #6a707c;
  --color-ink-subtle: #6d727c;
  --color-ink-on-brand: #ffffff;
  /* Small uppercase labels above titles. Brand teal on light; a quiet grey on dark so mint is left for actions and progress. */
  --color-ink-eyebrow: #0b6c79;
  --color-ink-brand: #0b6c79;
  --color-ink-brand-light: #14818f;
  --color-ink-accent-leaf: #327b57;
  --color-surface-elevated: #ffffff;
  --color-surface-secondary: #ecf8f9;
  --color-surface-tertiary: #f6f7f8;
  --color-surface-ambient: #fbfaf6;
  --color-surface-canvas: #f4f2ea;
  --color-surface-accent-leaf: #e6f4ec;
  --color-surface-track: #e8edeb;
  --color-surface-sunken: #fbfaf6;
  --color-surface-raised: #fbfaf6;
  --color-border-hairline: color-mix(in srgb, var(--color-mist-dark) 40%, transparent);
  --color-border-subtle: color-mix(in srgb, var(--color-mist-dark) 30%, transparent);
  /* The edge of a card. A visible hairline on light; on dark the edge comes from light, so it nearly disappears. */
  --color-border-card: color-mix(in srgb, var(--color-mist-dark) 40%, transparent);
  --color-border-strong: #c9d2cf;
  --color-border-soft: #dbe0dd;
  --color-border-default: #e8edeb;
  --color-border-primary: #74c4ca;
  --color-border-secondary: #d9dde0;
  --color-border-focus: #14818f;
  /* One grade over all photography so CMS images from different shoots read as one collection. */
  --media-grade: saturate(0.94) contrast(1.03);
  --gradient-pressing: linear-gradient(165deg, var(--color-attention-surface-1) 0%, var(--color-attention-surface-2) 60%, var(--color-attention-surface-3) 100%);
  --gradient-urgent: linear-gradient(165deg, var(--color-attention-urgent-surface-1) 0%, var(--color-attention-urgent-surface-2) 55%, var(--color-attention-urgent-surface-3) 100%);
  --gradient-routine: linear-gradient(165deg, var(--color-attention-routine-surface-1) 0%, var(--color-attention-routine-surface-2) 60%, var(--color-attention-routine-surface-3) 100%);
  --gradient-microstep: linear-gradient(160deg, var(--color-paper) 0%, #f5f1e6 60%, #ece6d2 100%);
  /* Default card surface: a soft teal wash over white at the corners, derived from teal-100 so it sits in the DS teal family. Present but not overbearing. Pairs with shadow-card. */
  --gradient-card: linear-gradient(160deg, color-mix(in srgb, var(--color-teal-100) 32%, var(--color-paper)) 0%, var(--color-paper) 50%, color-mix(in srgb, var(--color-teal-100) 26%, var(--color-paper)) 100%);
  /* Positive/connected card state: a quiet leaf wash. Pairs with shadow-card-connected and a softened leaf border. */
  --gradient-card-connected: linear-gradient(160deg, color-mix(in srgb, var(--color-leaf-soft) 34%, var(--color-paper)) 0%, var(--color-paper) 52%, color-mix(in srgb, var(--color-leaf-soft) 28%, var(--color-paper)) 100%);
  /* Selected/active card state: teal-tinted. Pairs with shadow-card-active and a teal border. */
  --gradient-card-active: linear-gradient(160deg, #e7f3f0 0%, var(--color-paper) 55%, #f0f8f5 100%);
  /* QuietCard night fade: transparent at top down to solid sleep-deep. */
  --gradient-sleeping: linear-gradient(180deg, color-mix(in srgb, var(--color-sleep-deep) 20%, transparent) 0%, color-mix(in srgb, var(--color-sleep-deep) 28%, transparent) 26%, color-mix(in srgb, var(--color-sleep-deep) 62%, transparent) 58%, color-mix(in srgb, var(--color-sleep-deep) 94%, transparent) 78%, var(--color-sleep-deep) 100%);
  /* QuietCard night accent: soft teal top glow + deep base anchor. */
  --gradient-sleeping-fade: radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--color-sleep-accent) 16%, transparent) 0%, color-mix(in srgb, var(--color-sleep-accent) 6%, transparent) 24%, transparent 48%), radial-gradient(circle at 50% 86%, color-mix(in srgb, var(--color-sleep-deep) 74%, transparent) 0%, transparent 42%);
}

/* Registered so a mode swap (see :root[data-mode]) interpolates instead of
   snapping. Generated: initial-value must be a literal, and these are the
   same values :root above carries. */
@property --color-cream-warm {
  syntax: "<color>";
  inherits: true;
  initial-value: #fbfaf6;
}
@property --color-gray-400 {
  syntax: "<color>";
  inherits: true;
  initial-value: #6d727c;
}
@property --color-gray-500 {
  syntax: "<color>";
  inherits: true;
  initial-value: #6a707c;
}
@property --color-teal-50 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ecf8f9;
}
@property --color-teal-100 {
  syntax: "<color>";
  inherits: true;
  initial-value: #d4eef0;
}
@property --color-teal-200 {
  syntax: "<color>";
  inherits: true;
  initial-value: #a8dde1;
}
@property --color-teal-300 {
  syntax: "<color>";
  inherits: true;
  initial-value: #74c4ca;
}
@property --color-teal-400 {
  syntax: "<color>";
  inherits: true;
  initial-value: #459fa5;
}
@property --color-teal-500 {
  syntax: "<color>";
  inherits: true;
  initial-value: #2a9098;
}
@property --color-teal-600 {
  syntax: "<color>";
  inherits: true;
  initial-value: #14818f;
}
@property --color-teal-700 {
  syntax: "<color>";
  inherits: true;
  initial-value: #0b6c79;
}
@property --color-teal-800 {
  syntax: "<color>";
  inherits: true;
  initial-value: #075560;
}
@property --color-teal-900 {
  syntax: "<color>";
  inherits: true;
  initial-value: #053338;
}
@property --color-ink-tertiary {
  syntax: "<color>";
  inherits: true;
  initial-value: #6a707c;
}
@property --color-ink-quaternary {
  syntax: "<color>";
  inherits: true;
  initial-value: #6d727c;
}
@property --color-ink-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #6a707c;
}
@property --color-ink-subtle {
  syntax: "<color>";
  inherits: true;
  initial-value: #6d727c;
}


/* Time-of-day ambient blob colour overrides. Set
   `data-time-of-day="morning|afternoon|evening|night"` on <html> or
   <body>; the rest of the canvas treatment falls through unchanged. */
[data-time-of-day="morning"] {
  --ambient-blob-a-color: var(--color-teal-300);
  --ambient-blob-b-color: var(--color-day-dawn);
}
[data-time-of-day="afternoon"] {
  --ambient-blob-a-color: var(--color-teal-600);
  --ambient-blob-b-color: var(--color-leaf);
}
[data-time-of-day="evening"] {
  --ambient-blob-a-color: var(--color-teal-700);
  --ambient-blob-b-color: var(--color-day-twilight);
}
[data-time-of-day="night"] {
  --ambient-blob-a-color: var(--color-teal-800);
  --ambient-blob-b-color: var(--color-day-dusk);
}
