/* PF Global design tokens, from the MRP design system (uk-political-mrp @
   design-system/components-testv4, 33b1046): tokens.css then tokens-proposed.css. Token names are
   unchanged; values are held to the PF Global Brand Guidelines palette, so every token resolves to
   a brand colour (tools/check_brand_colours.py). Off-brand MRP values (black, photo teal, copper
   dark, hover sands, ember, flame, party, status and candidate colours) are mapped to the nearest
   brand colour; this tool uses none of the party, status or candidate tokens.
   The .otf @font-face rules in tokens.css are dropped: global.css declares the woff2 cut. */

/*
 * PF Global Web Design System: design tokens (DRAFT, not for production)
 * Generated from Figma file "PF Global Design System" (kt13uu5JzpTKzllq7mGnaW), 7 October 2026.
 * Figma is the source of truth. Do not edit values here: change Figma, then regenerate.
 *
 * Layers (Material 3 / Figma SDS pattern):
 *   1. Primitives   --pf-<family>-<step>        raw values. Do not use directly in components.
 *   2. Color        --pf-color-*                semantic. Light on :root, Deep Teal on [data-theme="teal"].
 *   3. Data viz     --pf-dataviz-*              charts only. Charts sit on chart-surface (Light sand since 23 Oct 2026; white 7 to 23 Oct); no dark charts.
 *   4. Dimension    --pf-space-*, radius, borders, breakpoints
 *   5. Layout       --pf-layout-*               mobile first; desktop from 1100px.
 *   6. Typography   --pf-font-*, --pf-type-<style>-*
 *   7. Motion       --pf-duration-*, --pf-easing-*
 *
 * Values marked PROPOSED or REVIEW are open decisions (see handover brief).
 */

/* Fonts: Beausite Classic is licensed. Keep the files inside the licence terms.
   Clear reports weight 350 internally; global.css declares it as 400 on purpose. */

:root {
  /* 1. Primitives */
  --pf-base-white: #FFFFFF;
  --pf-base-black: #063747;          /* brand: no black; Deep Teal */
  --pf-teal-100: #063747;
  --pf-teal-80: #386069;
  --pf-teal-60: #6A898B;
  --pf-teal-40: #9CB0B1;
  --pf-teal-20: #CDD7D7;
  --pf-teal-photo: #063747;          /* MRP #0E4A5A; Deep Teal */
  --pf-copper-100: #BB7233;
  --pf-copper-80: #C98E5C;
  --pf-copper-60: #D6AA85;
  --pf-copper-40: #E4C5A6;
  --pf-copper-20: #F1E3D6;
  --pf-copper-dark: #BB7233;         /* MRP #A95F24; Copper */
  --pf-sand-warm-grey: #A6A19B;
  --pf-sand-stone: #D6D1CB;
  --pf-sand-sand: #EAE7E5;
  --pf-sand-light-sand: #F9F8F7;
  --pf-sand-hover: #EAE7E5;          /* MRP #F7F5F4; Sand, so a hover shows on light sand */
  --pf-sand-hover-strong: #EAE7E5;   /* MRP #F3F1F0; Sand */
  --pf-green-sage: #467F61;
  --pf-green-light-sage: #99B9A8;
  --pf-orange-insight: #FF4400;
  --pf-orange-ember: #FF4400;        /* MRP #FF4A12; Insight Orange */
  --pf-orange-flame: #FF4400;        /* MRP #FF7A45; Insight Orange */
  --pf-alpha-teal-35: rgb(6 55 71 / 0.35);
  --pf-alpha-sand-40: rgb(234 231 229 / 0.4);
  --pf-alpha-white-35: rgb(255 255 255 / 0.35);
  /* Party colours are not brand colours; unused here, so they resolve to brand stand-ins. */
  --pf-party-conservative: #6A898B;
  --pf-party-labour: #BB7233;
  --pf-party-lib-dem: #D6AA85;
  --pf-party-green: #467F61;
  --pf-party-reform: #9CB0B1;
  --pf-party-plaid: #386069;
  --pf-party-snp: #F1E3D6;
  --pf-party-other: #A6A19B;

  /* 2. Color: Light (default) */
  --pf-color-surface-default: var(--pf-sand-light-sand); /* Light sand across the tool since 23 Oct 2026 (was white) */
  --pf-color-surface-warm: var(--pf-sand-sand);
  --pf-color-surface-subtle: var(--pf-sand-light-sand);
  --pf-color-surface-inverse: var(--pf-teal-100);
  --pf-color-surface-photo: var(--pf-teal-photo);
  --pf-color-surface-hover: var(--pf-sand-hover);
  --pf-color-surface-hover-strong: var(--pf-sand-hover-strong);
  --pf-color-surface-mist: var(--pf-alpha-sand-40);
  --pf-color-text-primary: var(--pf-teal-100);
  --pf-color-text-secondary: var(--pf-teal-80); /* PROPOSED */
  --pf-color-text-inverse: var(--pf-base-white);
  --pf-color-text-label: var(--pf-copper-100);
  --pf-color-text-label-small: var(--pf-copper-dark);
  --pf-color-text-highlight: var(--pf-orange-insight);
  --pf-color-text-link-hover: var(--pf-orange-ember); /* REVIEW: 3.4:1 on white */
  --pf-color-border-rule: var(--pf-teal-100);
  --pf-color-border-soft: var(--pf-alpha-teal-35);
  --pf-color-border-focus: var(--pf-teal-100); /* Deep Teal since 8 Oct 2026 (was Flame, 2.6:1 on white) */
  --pf-color-action-primary-default: var(--pf-teal-100); /* PROPOSED */
  --pf-color-action-primary-hover: var(--pf-orange-insight); /* REVIEW: white text on orange is 3.5:1 */
  --pf-color-action-primary-text: var(--pf-base-white);
  --pf-color-icon-primary: var(--pf-teal-100);
  --pf-color-icon-accent: var(--pf-copper-100);

  /* 3. Data viz (single mode) */
  --pf-dataviz-chart-surface: var(--pf-sand-light-sand);
  --pf-dataviz-chart-text: var(--pf-teal-100);
  --pf-dataviz-chart-label-on-dark: var(--pf-base-white);
  --pf-dataviz-chart-label-on-light: var(--pf-teal-100);
  --pf-dataviz-chart-gridline: var(--pf-sand-stone);
  --pf-dataviz-chart-baseline: var(--pf-sand-warm-grey);
  --pf-dataviz-category-01: var(--pf-teal-100);
  --pf-dataviz-category-02: var(--pf-copper-60);
  --pf-dataviz-category-03: var(--pf-teal-60);
  --pf-dataviz-category-04: var(--pf-sand-warm-grey);
  --pf-dataviz-category-05: var(--pf-sand-stone);
  --pf-dataviz-category-06: var(--pf-green-light-sage);
  --pf-dataviz-category-07: var(--pf-green-sage);
  --pf-dataviz-category-08: var(--pf-copper-100);
  --pf-dataviz-category-09: var(--pf-teal-80);
  --pf-dataviz-category-10: var(--pf-teal-40);
  --pf-dataviz-category-11: var(--pf-copper-40);
  --pf-dataviz-emphasis-focus: var(--pf-orange-insight);
  --pf-dataviz-emphasis-context-high-ink: var(--pf-teal-100);
  --pf-dataviz-emphasis-context-low-ink: var(--pf-copper-60);
  --pf-dataviz-emphasis-faded: var(--pf-teal-40);
  --pf-dataviz-emphasis-faded-line: var(--pf-sand-stone);
  --pf-dataviz-emphasis-neutral: var(--pf-sand-warm-grey);
  --pf-dataviz-agreement-strongly-disagree: var(--pf-copper-100);
  --pf-dataviz-agreement-tend-to-disagree: var(--pf-copper-60);
  --pf-dataviz-agreement-neither: var(--pf-sand-sand);
  --pf-dataviz-agreement-tend-to-agree: var(--pf-green-light-sage);
  --pf-dataviz-agreement-strongly-agree: var(--pf-green-sage);
  --pf-dataviz-agreement-dont-know: var(--pf-sand-stone);
  --pf-dataviz-sequential-teal-1: var(--pf-teal-20);
  --pf-dataviz-sequential-teal-2: var(--pf-teal-40);
  --pf-dataviz-sequential-teal-3: var(--pf-teal-60);
  --pf-dataviz-sequential-teal-4: var(--pf-teal-80);
  --pf-dataviz-sequential-teal-5: var(--pf-teal-100);
  --pf-dataviz-sequential-copper-1: var(--pf-copper-20);
  --pf-dataviz-sequential-copper-2: var(--pf-copper-40);
  --pf-dataviz-sequential-copper-3: var(--pf-copper-60);
  --pf-dataviz-sequential-copper-4: var(--pf-copper-80);
  --pf-dataviz-sequential-copper-5: var(--pf-copper-100);
  --pf-dataviz-party-conservative: var(--pf-party-conservative);
  --pf-dataviz-party-labour: var(--pf-party-labour);
  --pf-dataviz-party-lib-dem: var(--pf-party-lib-dem);
  --pf-dataviz-party-green: var(--pf-party-green);
  --pf-dataviz-party-reform: var(--pf-party-reform);
  --pf-dataviz-party-plaid: var(--pf-party-plaid);
  --pf-dataviz-party-snp: var(--pf-party-snp);
  --pf-dataviz-party-other: var(--pf-party-other);

  /* 4. Dimension */
  --pf-space-0: 0;
  --pf-space-025: 2px;
  --pf-space-050: 4px;
  --pf-space-100: 8px;
  --pf-space-150: 12px;
  --pf-space-200: 16px;
  --pf-space-250: 20px;
  --pf-space-300: 24px;
  --pf-space-400: 32px;
  --pf-space-500: 40px;
  --pf-space-600: 48px;
  --pf-space-700: 56px;
  --pf-space-800: 64px;
  --pf-space-900: 72px;
  --pf-space-1200: 96px;
  --pf-space-1500: 120px;
  --pf-radius-none: 0;
  --pf-radius-pill: 9999px;
  --pf-border-width-rule: 1px;
  --pf-border-width-focus: 2px;
  --pf-focus-offset: 3px;
  --pf-size-cross-marker: 15px;
  /* Breakpoints: CSS cannot use custom properties in media queries. Reference values: sm 640px (grids two-up), md 700px (team grid four-up), lg 1100px (wide layout). */
  --pf-breakpoint-sm: 640px;
  --pf-breakpoint-md: 700px;
  --pf-breakpoint-lg: 1100px;

  /* 5. Layout: mobile values (desktop overrides below) */
  --pf-layout-gutter: var(--pf-space-300);
  --pf-layout-section-gap: var(--pf-space-900); /* mobile value to confirm */
  --pf-layout-footer-gap: var(--pf-space-1500); /* mobile value to confirm */
  --pf-layout-header-height: 64px;
  --pf-layout-max-width: 1440px;

  /* 6. Typography (sizes are desktop maximums; responsive minimums to confirm) */
  --pf-font-family-brand: "Beausite Classic";
  --pf-font-family-fallback: "Arial Nova", Arial, sans-serif;
  --pf-font-stack: var(--pf-font-family-brand), var(--pf-font-family-fallback);
  --pf-font-weight-clear: 400;
  --pf-font-weight-medium: 500;
  --pf-font-weight-semibold: 600;
  --pf-type-display-hero-size: 112px;
  --pf-type-display-hero-line-height: 1.02;
  --pf-type-display-hero-letter-spacing: -0.03em;
  --pf-type-display-hero-weight: var(--pf-font-weight-medium);
  --pf-type-heading-2-size: 48px;
  --pf-type-heading-2-line-height: 1.05;
  --pf-type-heading-2-letter-spacing: -0.02em;
  --pf-type-heading-2-weight: var(--pf-font-weight-medium);
  --pf-type-heading-3-size: 44px;
  --pf-type-heading-3-line-height: 1.05;
  --pf-type-heading-3-letter-spacing: -0.02em;
  --pf-type-heading-3-weight: var(--pf-font-weight-medium);
  --pf-type-heading-3-small-size: 30px;
  --pf-type-heading-3-small-line-height: 1.15;
  --pf-type-heading-3-small-letter-spacing: -0.015em;
  --pf-type-heading-3-small-weight: var(--pf-font-weight-medium);
  --pf-type-nav-large-size: 26px;
  --pf-type-nav-large-line-height: 1.1;
  --pf-type-nav-large-letter-spacing: -0.015em;
  --pf-type-nav-large-weight: var(--pf-font-weight-medium);
  --pf-type-lede-size: 24px;
  --pf-type-lede-line-height: 1.5;
  --pf-type-lede-letter-spacing: 0em;
  --pf-type-lede-weight: var(--pf-font-weight-clear);
  --pf-type-body-size: 17px;
  --pf-type-body-line-height: 1.55;
  --pf-type-body-letter-spacing: 0em;
  --pf-type-body-weight: var(--pf-font-weight-clear);
  --pf-type-small-size: 15px;
  --pf-type-small-line-height: 1.5;
  --pf-type-small-letter-spacing: 0em;
  --pf-type-small-weight: var(--pf-font-weight-clear);
  --pf-type-date-size: 13px;
  --pf-type-date-line-height: 1.2;
  --pf-type-date-letter-spacing: 0.06em;
  --pf-type-date-weight: var(--pf-font-weight-clear);
  --pf-type-eyebrow-size: 12px;
  --pf-type-eyebrow-line-height: 1.5;
  --pf-type-eyebrow-letter-spacing: 0.06em;
  --pf-type-eyebrow-weight: var(--pf-font-weight-semibold);

  /* 7. Motion */
  --pf-duration-fast: 0.15s;
  --pf-duration-base: 0.25s;
  --pf-easing-standard: cubic-bezier(0.25, 0.1, 0.25, 1);
  --pf-distance-arrow-nudge: 4px;
}

/* 5. Layout: desktop */
@media (min-width: 1100px) {
  :root {
    --pf-layout-gutter: var(--pf-space-500);
    --pf-layout-header-height: 88px;
  }
}

/* 2. Color: Deep Teal theme. Sparingly: covers and closing pages only. Never Insight Orange on Deep Teal. */
[data-theme="teal"] {
  --pf-color-surface-default: var(--pf-teal-100);
  --pf-color-surface-warm: var(--pf-teal-100);
  --pf-color-surface-subtle: var(--pf-teal-100);
  --pf-color-surface-inverse: var(--pf-base-white);
  --pf-color-surface-hover: var(--pf-teal-80);
  --pf-color-surface-hover-strong: var(--pf-teal-80);
  --pf-color-surface-mist: var(--pf-alpha-white-35);
  --pf-color-text-primary: var(--pf-base-white);
  --pf-color-text-secondary: var(--pf-teal-20);
  --pf-color-text-inverse: var(--pf-teal-100);
  --pf-color-text-label-small: var(--pf-base-white);
  --pf-color-text-highlight: var(--pf-copper-100);
  --pf-color-text-link-hover: var(--pf-copper-60);
  --pf-color-border-rule: var(--pf-base-white);
  --pf-color-border-soft: var(--pf-alpha-white-35);
  --pf-color-border-focus: var(--pf-base-white);
  --pf-color-action-primary-default: var(--pf-base-white);
  --pf-color-action-primary-hover: var(--pf-copper-100);
  --pf-color-action-primary-text: var(--pf-teal-100);
  --pf-color-icon-primary: var(--pf-base-white);
}

/* 7. Motion: switch off for reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --pf-duration-fast: 0s;
    --pf-duration-base: 0s;
    --pf-distance-arrow-nudge: 0px;
  }
}

/* Optional text-style helpers, one class per Figma text style */
.pf-type-display-hero { font-family: var(--pf-font-stack); font-size: var(--pf-type-display-hero-size); line-height: var(--pf-type-display-hero-line-height); letter-spacing: var(--pf-type-display-hero-letter-spacing); font-weight: var(--pf-type-display-hero-weight); }
.pf-type-heading-2 { font-family: var(--pf-font-stack); font-size: var(--pf-type-heading-2-size); line-height: var(--pf-type-heading-2-line-height); letter-spacing: var(--pf-type-heading-2-letter-spacing); font-weight: var(--pf-type-heading-2-weight); }
.pf-type-heading-3 { font-family: var(--pf-font-stack); font-size: var(--pf-type-heading-3-size); line-height: var(--pf-type-heading-3-line-height); letter-spacing: var(--pf-type-heading-3-letter-spacing); font-weight: var(--pf-type-heading-3-weight); }
.pf-type-heading-3-small { font-family: var(--pf-font-stack); font-size: var(--pf-type-heading-3-small-size); line-height: var(--pf-type-heading-3-small-line-height); letter-spacing: var(--pf-type-heading-3-small-letter-spacing); font-weight: var(--pf-type-heading-3-small-weight); }
.pf-type-nav-large { font-family: var(--pf-font-stack); font-size: var(--pf-type-nav-large-size); line-height: var(--pf-type-nav-large-line-height); letter-spacing: var(--pf-type-nav-large-letter-spacing); font-weight: var(--pf-type-nav-large-weight); }
.pf-type-lede { font-family: var(--pf-font-stack); font-size: var(--pf-type-lede-size); line-height: var(--pf-type-lede-line-height); letter-spacing: var(--pf-type-lede-letter-spacing); font-weight: var(--pf-type-lede-weight); }
.pf-type-body { font-family: var(--pf-font-stack); font-size: var(--pf-type-body-size); line-height: var(--pf-type-body-line-height); letter-spacing: var(--pf-type-body-letter-spacing); font-weight: var(--pf-type-body-weight); }
.pf-type-small { font-family: var(--pf-font-stack); font-size: var(--pf-type-small-size); line-height: var(--pf-type-small-line-height); letter-spacing: var(--pf-type-small-letter-spacing); font-weight: var(--pf-type-small-weight); }
.pf-type-date { font-family: var(--pf-font-stack); font-size: var(--pf-type-date-size); line-height: var(--pf-type-date-line-height); letter-spacing: var(--pf-type-date-letter-spacing); font-weight: var(--pf-type-date-weight); }
.pf-type-eyebrow { font-family: var(--pf-font-stack); font-size: var(--pf-type-eyebrow-size); line-height: var(--pf-type-eyebrow-line-height); letter-spacing: var(--pf-type-eyebrow-letter-spacing); font-weight: var(--pf-type-eyebrow-weight); }

/*
 * PF Global Web Design System: PROPOSED tokens (DRAFT, under review)
 * Mirrors the Figma "Proposed (review)" collection and the proposed status
 * primitives in file kt13uu5JzpTKzllq7mGnaW, read 7 October 2026.
 * Kept apart from tokens.css until each value is promoted in Figma.
 */

:root {
  /* Status primitives (Primitives / color/status/*) */
  /* The brand has no red or green: status maps to the agreement scale (copper, sage). */
  --pf-status-red: #BB7233;
  --pf-status-red-light: #F1E3D6;
  --pf-status-red-on-dark: #D6AA85;
  --pf-status-green: #467F61;
  --pf-status-green-light: #99B9A8;
  --pf-status-green-on-dark: #99B9A8;

  /* Colour: Light */
  --pf-color-state-disabled-surface: var(--pf-sand-sand);
  --pf-color-state-disabled-text: var(--pf-teal-40);
  --pf-color-state-disabled-border: var(--pf-sand-stone);
  --pf-color-state-pressed: var(--pf-teal-80);
  --pf-color-state-selected-surface: var(--pf-teal-100);
  --pf-color-state-selected-text: var(--pf-base-white);
  --pf-color-field-surface: var(--pf-base-white);
  --pf-color-field-border: var(--pf-teal-100);
  --pf-color-status-negative-text: var(--pf-status-red);
  --pf-color-status-negative-surface: var(--pf-status-red-light);
  --pf-color-status-positive-text: var(--pf-status-green);
  --pf-color-status-positive-surface: var(--pf-status-green-light);
  --pf-color-status-warning-border: var(--pf-copper-dark);
  --pf-color-status-warning-surface: var(--pf-copper-20);
  --pf-color-status-info-surface: var(--pf-sand-sand);
  --pf-color-tooltip-surface: var(--pf-base-white);
  --pf-color-tooltip-border: var(--pf-teal-100);

  /* Component sizes */
  --pf-control-height-md: var(--pf-space-500);
  --pf-control-height-sm: var(--pf-space-400);
  --pf-control-padding-x-md: var(--pf-space-200);
  --pf-control-padding-x-sm: var(--pf-space-150);
  --pf-control-gap: var(--pf-space-100);
  --pf-control-icon-size: var(--pf-space-200);
  --pf-field-padding-x: var(--pf-space-150);
  --pf-selector-size: var(--pf-space-250);

  /* Spacing roles */
  --pf-inset-sm: var(--pf-space-150);
  --pf-inset-md: var(--pf-space-200);
  --pf-inset-lg: var(--pf-space-300);
  --pf-stack-xs: var(--pf-space-050);
  --pf-stack-sm: var(--pf-space-100);
  --pf-stack-md: var(--pf-space-200);
  --pf-stack-lg: var(--pf-space-300);
  --pf-stack-xl: var(--pf-space-500);
  --pf-inline-sm: var(--pf-space-100);
  --pf-inline-md: var(--pf-space-200);

  /* Text styles edited in Figma (Web/Eyebrow, Web/Date): tracking removed and
     Eyebrow set to title case. The Typography variables still hold the old
     letter-spacing; REVIEW: update the variables or rebind the styles. */
  --pf-type-eyebrow-letter-spacing-styled: 0em;
  --pf-type-eyebrow-case: capitalize;
  --pf-type-date-letter-spacing-styled: 0em;

  /* Diverging scales on Topical MRP (person vs person). The original
     candidate colours: Starmer and Farage follow their party colours
     (darkened so both ends read against the white middle); Burnham has his
     own so a Starmer v Burnham map is not red against red. */
  --pf-dataviz-candidate-starmer: #BB7233;
  --pf-dataviz-candidate-farage: #6A898B;
  --pf-dataviz-candidate-burnham: #386069;
  --pf-dataviz-diverging-mid: var(--pf-base-white);
}

[data-theme="teal"] {
  --pf-color-state-disabled-surface: var(--pf-teal-80);
  --pf-color-state-disabled-text: var(--pf-teal-40);
  --pf-color-state-disabled-border: var(--pf-teal-60);
  --pf-color-state-pressed: var(--pf-teal-20);
  --pf-color-state-selected-surface: var(--pf-base-white);
  --pf-color-state-selected-text: var(--pf-teal-100);
  --pf-color-field-border: var(--pf-base-white);
  --pf-color-status-negative-text: var(--pf-status-red-on-dark);
  --pf-color-status-negative-surface: var(--pf-teal-80);
  --pf-color-status-positive-text: var(--pf-status-green-on-dark);
  --pf-color-status-positive-surface: var(--pf-teal-80);
  --pf-color-status-warning-border: var(--pf-copper-60);
  --pf-color-status-warning-surface: var(--pf-teal-80);
  --pf-color-status-info-surface: var(--pf-teal-80);
}
