/**
 * R Health — design tokens.
 *
 * The one place this theme writes raw design values. Everything else —
 * sections.css, site.css, editor.css — only reads tokens.
 *
 * Two layers:
 *   1. Vendo Kit → Design System (--vk-*): the palette, fonts, type and
 *      spacing scales, radii and containers. Edit those in WP Admin, not here.
 *   2. This file (--rh-*, --r-health-*): the steps and measures the Figma
 *      uses that the kit has no slot for, named like the Figma variables
 *      (--rh-space-40 ↔ Figma "rh-space-40"). Steps the kit already has
 *      point at the kit token, so there is still one value per step.
 *
 * Figma colour variable → token used in the theme
 *   rh-color-navy   #17324d → --vk-color-ink / --vk-color-body / --vk-color-on-brand
 *   rh-color-blue   #245a96 → --vk-color-dark / --vk-color-footer-bg
 *   rh-color-cyan   #1ebbf0 → --vk-color-brand
 *   rh-color-orange #f28a32 → --vk-color-button-bg
 *   rh-color-paper  #f7f7f9 → --vk-color-bg
 *   rh-color-ice    #f2f8fd → --vk-color-surface
 *   rh-color-white  #ffffff → --vk-color-on-dark / --vk-color-on-accent
 *   rh-color-line   #dcebf8 → --r-health-line (derived from accent + surface)
 *   rh-color-muted  #52697e → --vk-color-muted (kit value is #5c6e80 — see QA note)
 *   rh-radius-pill  999     → --vk-radius-button
 * Figma text styles "R-Health / Display, H1–H4, Lead, Body, Button,
 * Navigation, Small, Label" → --r-health-display … --r-health-small below,
 * with their leading and tracking in --rh-leading-* / --rh-tracking-*.
 */

:root,
.vk-scope,
.editor-styles-wrapper,
::backdrop {
	--r-health-color-mission-from: #90a4b9;  /* Mission statement scroll sweep — start colour (as drawn) */
	--r-health-color-mission-to: #0a2440;  /* Mission statement scroll sweep — end colour (as drawn) */
	--r-health-color-insights-tint: #ddeeff;  /* Insights band tint (as drawn) */
	--r-health-color-lightbox-backdrop: rgba(10, 24, 40, .88);  /* Gallery lightbox backdrop */

	/* Block editor sidebar chrome (editor.css) — WordPress admin greys, not site colours */
	--r-health-editor-text: #1e1e1e;
	--r-health-editor-thumb-bg: #f0f0f0;
	--r-health-editor-field-border: #949494;
	--r-health-editor-divider: #e0e0e0;

	/* Spacing scale — Figma --rh-space-*; steps the kit also has point at it */
	--rh-space-2: 2px;
	--rh-space-3: 3px;
	--rh-space-3p75: 3.75px;
	--rh-space-4: var(--vk-space-3xs);  /* Vendo Kit --vk-space-3xs */
	--rh-space-6: 6px;
	--rh-space-7: 7px;
	--rh-space-8: var(--vk-space-2xs);  /* Vendo Kit --vk-space-2xs */
	--rh-space-10: 10px;
	--rh-space-11: 11px;
	--rh-space-12: var(--vk-space-xs);  /* Vendo Kit --vk-space-xs */
	--rh-space-14: 14px;
	--rh-space-16: var(--vk-space-sm);  /* Vendo Kit --vk-space-sm */
	--rh-space-17: 17px;
	--rh-space-18: 18px;
	--rh-space-19: 19px;
	--rh-space-20: 20px;
	--rh-space-21: 21px;
	--rh-space-22: 22px;
	--rh-space-23: 23px;
	--rh-space-24: var(--vk-space-md);  /* Vendo Kit --vk-space-md */
	--rh-space-25: 25px;
	--rh-space-26: 26px;
	--rh-space-27: 27px;
	--rh-space-28: 28px;
	--rh-space-30: 30px;
	--rh-space-31: 31px;
	--rh-space-32: var(--vk-space-lg);  /* Vendo Kit --vk-space-lg */
	--rh-space-33: 33px;
	--rh-space-35: 35px;
	--rh-space-36: 36px;
	--rh-space-40: 40px;
	--rh-space-44: 44px;
	--rh-space-45: 45px;
	--rh-space-48: var(--vk-space-xl);  /* Vendo Kit --vk-space-xl */
	--rh-space-56: 56px;
	--rh-space-61: 61px;
	--rh-space-64: var(--vk-space-2xl);  /* Vendo Kit --vk-space-2xl */
	--rh-space-72: 72px;
	--rh-space-74: 74px;
	--rh-space-75: 75px;
	--rh-space-78: 78px;
	--rh-space-80: 80px;
	--rh-space-85: 85px;
	--rh-space-86: 86px;
	--rh-space-88: 88px;
	--rh-space-104: 104px;
	--rh-space-110: 110px;
	--rh-space-123: 123px;
	--rh-space-128: var(--vk-space-4xl);  /* Vendo Kit --vk-space-4xl */
	--rh-space-134: 134px;
	--rh-space-176: 176px;
	--rh-space-226: 226px;
	--rh-space-minus-0p2em: -.2em;
	--rh-space-0p4em: .4em;
	--rh-space-1p2em: 1.2em;
	--rh-space-1p25em: 1.25em;
	--rh-space-1p6em: 1.6em;
	--rh-space-1p75em: 1.75em;
	--rh-space-0p45rem: .45rem;
	--rh-space-0p5rem: .5rem;
	--rh-space-0p55rem: .55rem;
	--rh-space-1p5rem: 1.5rem;
	--rh-space-3p5rem: 3.5rem;
	--rh-space-7rem: 7rem;

	/* Radii */
	--rh-radius-round: 50%;

	/* Type scale — sizes, leading, tracking and weights the text styles use */
	--rh-leading-0p75: .75;
	--rh-leading-0p8: .8;
	--rh-leading-0p9: .9;
	--rh-leading-0p917: .917;
	--rh-leading-0p92: .92;
	--rh-leading-1: 1;
	--rh-leading-1p0294: 1.0294;
	--rh-leading-1p0417: 1.0417;
	--rh-leading-1p05: 1.05;
	--rh-leading-1p08: 1.08;
	--rh-leading-1p1: 1.1;
	--rh-leading-1p1333: 1.1333;
	--rh-leading-1p15: 1.15;
	--rh-leading-1p1667: 1.1667;
	--rh-leading-1p2: 1.2;
	--rh-leading-1p2174: 1.2174;
	--rh-leading-1p25: 1.25;
	--rh-leading-1p3: 1.3;
	--rh-leading-1p3333: 1.3333;
	--rh-leading-1p35: 1.35;
	--rh-leading-1p375: 1.375;
	--rh-leading-1p5: 1.5;
	--rh-leading-1p5385: 1.5385;
	--rh-leading-1p55: 1.55;
	--rh-leading-1p6: 1.6;
	--rh-leading-1p625: 1.625;
	--rh-leading-1p65: 1.65;
	--rh-leading-9px: 9px;
	--rh-leading-18px: 18px;
	--rh-leading-19px: 19px;
	--rh-leading-20px: 20px;
	--rh-leading-21px: 21px;
	--rh-leading-22px: 22px;
	--rh-leading-26px: 26px;
	--rh-text-11: 11px;
	--rh-text-12: 12px;
	--rh-text-13: 13px;
	--rh-text-13p5: 13.5px;
	--rh-text-14: 14px;
	--rh-text-15: 15px;
	--rh-text-17: 17px;
	--rh-text-22: 22px;
	--rh-text-32: 32px;
	--rh-text-34: 34px;
	--rh-text-0p8889em: .8889em;
	--rh-text-1p125em: 1.125em;
	--rh-text-0p9375rem: .9375rem;
	--rh-text-1p40625rem: 1.40625rem;
	--rh-text-1p5rem: 1.5rem;
	--rh-text-1p625rem: 1.625rem;
	--rh-text-1p875rem: 1.875rem;
	--rh-text-2p5rem: 2.5rem;
	--rh-tracking-minus-0p05em: -.05em;
	--rh-tracking-minus-0p04em: -.04em;
	--rh-tracking-minus-0p03em: -.03em;
	--rh-tracking-minus-0p02em: -.02em;
	--rh-tracking-minus-0p01em: -.01em;
	--rh-tracking-0p02em: .02em;
	--rh-tracking-0p04em: .04em;
	--rh-tracking-0p06em: .06em;
	--rh-tracking-0p08em: .08em;
	--rh-tracking-0p1em: .1em;
	--rh-tracking-0p12em: .12em;
	--rh-tracking-0p13em: .13em;
	--rh-tracking-0p16em: .16em;
	--rh-tracking-0p17em: .17em;
	--rh-tracking-0p5px: .5px;
	--rh-weight-300: 300;
	--rh-weight-500: 500;

	/* Component measures — column, card and media widths as drawn */
	--r-health-about-heading-max-width: 400px;
	--r-health-about-width: 641px;
	--r-health-arrow-width: 3.75rem;
	--r-health-article-intro-lede-max-width: 920px;
	--r-health-contact-media-max-width: 520px;
	--r-health-cta-lede-max-width: 32em;
	--r-health-cta-split-aside-text-max-width: 320px;
	--r-health-cta-split-text-max-width: 630px;
	--r-health-delivery-lede-max-width: 484px;
	--r-health-delivery-text-max-width: 460px;
	--r-health-explorer-tab-max-width: 168px;
	--r-health-explorer-tab-width: 48px;
	--r-health-explorer-text-max-width: 490px;
	--r-health-eyebrow-width: 1.9em;
	--r-health-faq-body-max-width: 950px;
	--r-health-faq-heading-max-width: 980px;
	--r-health-faq-marker-width: 32px;
	--r-health-footer-social-width: 2.4rem;
	--r-health-footer-value-max-width: 16em;
	--r-health-head-max-width: 46rem;
	--r-health-head-max-width-2: 42rem;
	--r-health-header-bars-width: 1.4rem;
	--r-health-header-call-width: 44px;
	--r-health-header-portal-width: 1.4em;
	--r-health-header-portal-width-2: 1.1em;
	--r-health-header-toggle-min-width: 44px;
	--r-health-hero-heading-max-width: 12em;
	--r-health-index-indicator-width: 1em;
	--r-health-index-lede-max-width: 24em;
	--r-health-insights-track-width: 358px;
	--r-health-insights-width: 689px;
	--r-health-lightbox-btn-width: 48px;
	--r-health-mission-statement-max-width: 18em;
	--r-health-mission-statement-max-width-2: 16em;
	--r-health-nav-width: .42em;
	--r-health-nav-width-2: 560px;
	--r-health-nav-width-1: 280px;
	--r-health-offer-body-max-width: 22rem;
	--r-health-offer-points-width: 5px;
	--r-health-page-hero-lede-max-width: 555px;
	--r-health-post-excerpt-max-width: 268px;
	--r-health-post-title-max-width: 290px;
	--r-health-price-note-max-width: 18em;
	--r-health-profile-photo-max-width: 320px;
	--r-health-quote-avatar-width: 38px;
	--r-health-quote-label-width: 6px;
	--r-health-sector-text-max-width: 468px;
	--r-health-sectors-grid-width: 22rem;
	--r-health-service-text-max-width: 246px;
	--r-health-services-track-width: 306px;
	--r-health-subtoggle-width: 44px;
	--r-health-svc-max-width: 640px;
	--r-health-svc-text-max-width: 650px;
	--r-health-t-body-max-width: 576px;
	--r-health-t-h1-max-width: 960px;
	--r-health-t-h2-max-width: 420px;
	--r-health-t-h2-max-width-2: 444px;
	--r-health-t-lead-max-width: 680px;
	--r-health-t-lead-max-width-2: 400px;
	--r-health-t-lead-max-width-3: 444px;
	--r-health-team-bio-max-width: 536px;
	--r-health-team-lede-max-width: 490px;
	--r-health-team-thumb-width: 168px;
	--r-health-trust-heading-max-width: 8.3em;

	/* Fluid values — clamp()/min()/max() expressions as drawn */
	--r-health-about-main-padding-top: calc(1.6em + 21px);
	--r-health-carousel-width: calc(100% - 74px + 71px);
	--r-health-lightbox-img-max-width: min(92vw, 1400px);
	--r-health-lightbox-max-width: min(92vw, 1400px);
	--r-health-prices-width: min(100%, 21.75rem);
	--r-health-services-track-width-2: min(100%, 342px);
}

/* Theme tokens derived from the palette, and the type roles (moved from sections.css). */

/* Colours derived from the tokens, so a palette change carries through. */
.vk-scope {
	--r-health-soft: color-mix(in srgb, var(--vk-color-on-dark) 72%, var(--vk-color-dark));
	--r-health-line-dark: color-mix(in srgb, var(--vk-color-on-dark) 16%, transparent);
	--r-health-scrim: color-mix(in srgb, var(--vk-color-ink) 78%, transparent);
	/* Cards are white in the design, on the off-white page ground. on-dark is
	 * the palette's white, so a palette change still carries through. */
	--r-health-card-bg: var(--vk-color-on-dark);
	/* The pale-blue hairline between service entries on the inner pages
	 * (#dcebf8 as drawn): a tenth of the accent over the ice surface. */
	--r-health-line: color-mix(in srgb, var(--vk-color-accent) 10%, var(--vk-color-surface));
}

.vk-scope {
	--r-health-display: clamp(2.75rem, 1.921rem + 3.536vw, 4.75rem);
	--r-health-h1: clamp(2.5rem, 1.775rem + 3.094vw, 4.25rem);
	--r-health-h2: clamp(2rem, 1.586rem + 1.768vw, 3rem);
	--r-health-h3: clamp(1.5rem, 1.344rem + .663vw, 1.875rem);
	--r-health-h4: clamp(1.25rem, 1.172rem + .332vw, 1.4375rem);
	--r-health-lead: clamp(1.125rem, 1.073rem + .221vw, 1.25rem);
	--r-health-body: 1rem;
	--r-health-button: .9375rem;
	--r-health-nav: 1rem;
	--r-health-small: .8125rem;
}

/* Small print no smaller than 12px. The kit's xs step is an inverted clamp
 * that never goes above 10.77px; this overrides it on the page and in
 * every scope (the kit's own value sits on both). */
html:root,
html .vk-scope { --vk-text-xs: 12px; }

