/*
 * British Legal Office — design tokens
 * The single source of colour, type, spacing and measure. site.css (the
 * Institute of AI component styles, reused unchanged, D-013), brand.css (the
 * BLO look, option A "Chambers", D-011) and admin.css reference these custom
 * properties only.
 *
 * The token NAMES are the Institute's, so its components keep working; the
 * VALUES are BLO's:
 *   colour  slate #294545 and the rule #D9D9D9 from the client's Canva logo
 *           (D-005); warm ivory paper; green-cast ink. Light theme only.
 *   type    serif for headings, labels and accents; Inter for paragraphs and
 *           UI (D-012). All fonts self-hosted (D-007), SIL OFL 1.1, licences
 *           next to the files in ../fonts/.
 *
 * Contrast (WCAG 2.x), measured: ink 14.3:1 on ground; ink-soft 8.2:1;
 * ink-faint 5.3:1 on ground, 4.9:1 on surface, 4.5:1 on band; ink-muted 3.5:1 on surface (large only);
 * plate-ink 10.3:1 on plate; plate-soft 6.8:1 on plate; accent 9.5:1 on ground.
 */

/* ---------------------------------------------------------------------
   Font faces (Latin subsets as served by Google Fonts, downloaded 26 Oct 2026)
   --------------------------------------------------------------------- */

/* Inter, variable 100–900: paragraphs, lists, forms, UI. The one preload. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-v20.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Playfair Display, variable 400–700, roman and italic: H2–H4, numerals. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-wght-v40.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-italic-wght-v40.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Playfair Display SC 400: H1, labels, buttons, navigation (the logo's face). */
@font-face {
  font-family: "Playfair Display SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/playfair-display-sc-latin-400-v18.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cardo Italic 400: the tagline and italic accents. */
@font-face {
  font-family: "Cardo";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cardo-latin-italic-v21.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched local fallback for Inter (from the Institute build), so the swap barely shifts layout. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");
  size-adjust: 107.28%;
  ascent-override: 90.30%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  /* Paper (page grounds) */
  --ground: #F7F5EF;      /* page background: warm ivory */
  --surface: #EFECE3;     /* alternate sections, hover rows, inputs */
  --band: #E7E3D8;        /* deeper band: explicit section bands */
  --well: var(--surface); /* inset fills (inputs, notice, form status); site.css flips it on --surface */

  /* Ink */
  --ink: #1B2626;         /* primary text, green-cast near-black */
  --ink-soft: #3F4C4B;    /* secondary text, ledes */
  --ink-faint: #5C6866;   /* labels, meta, field borders */
  --ink-muted: #727F7C;   /* large numerals and large secondary display text ONLY (>= 3.5:1 on surface) */
  --rule: #C9CEC9;        /* section and row hairlines (decorative) */
  --rule-soft: #DEDFD8;   /* lighter dividers */

  /* Brand: slate from the logo, as the link/accent colour and as the plate */
  --accent: #294545;
  --accent-ink: #FFFFFF;  /* text on a solid slate fill */

  /* Status (forms only) */
  --success: #2B5E3B;
  --error: #9B2C2C;
  --diff-add: #DCEBDD;    /* admin revision diff (admin.css) */
  --diff-del: #F3DCDC;

  /* Plate: the slate field of the logo (header, hero, CTA plate, footer) */
  --plate: #294545;
  --plate-deep: #1F3535;  /* footer, hover on slate */
  --plate-raised: #3A5858;/* raised surfaces and hover on slate */
  --plate-ink: #FFFFFF;
  --plate-soft: #C9D3D1;  /* secondary text on slate (6.8:1; 5.0:1 on plate-raised) */
  --plate-faint: #A9B8B5; /* small meta on slate (5.0:1 on plate, 6.3:1 on plate-deep) */
  --plate-rule: #D9D9D9;  /* the logo's hairline (decorative, at reduced opacity on slate) */
  --plate-accent: #D8C39A;/* focus ring on slate (6.0:1) */

  /* Flat tint over hero media so text passes contrast (no hero media yet) */
  --media-scrim: rgb(20 35 35 / 0.6);

  /* Focus ring on paper (brass, 5.3:1); slate areas switch to --plate-accent in brand.css */
  --focus: #7A6233;

  /* Type families (D-012) */
  --font-sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif-sc: "Playfair Display SC", "Playfair Display", Georgia, "Times New Roman", serif; /* H1, labels, buttons, nav */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;                         /* H2–H4, numerals */
  --font-accent: "Cardo", Georgia, "Times New Roman", serif;                                    /* italic accents only */
  --font-display: var(--font-serif);  /* Institute name: headings, display, numbers, pull quotes */
  --font-body: var(--font-sans);      /* paragraphs, UI */

  /* Fluid type scale (390px to 1280px) */
  --step--2: 0.75rem;                                    /* labels */
  --step--1: 0.875rem;                                   /* small, meta */
  --step-0: 1.0625rem;                                   /* body */
  --step-1: clamp(1.1875rem, 1.12rem + 0.3vw, 1.375rem);  /* lede, h4 */
  --step-2: clamp(1.375rem, 1.25rem + 0.55vw, 1.75rem);   /* h3 */
  --step-3: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);         /* h2 */
  --step-4: clamp(2.125rem, 1.7rem + 1.8vw, 3.25rem);     /* inner h1 */
  --step-5: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --step-stat: clamp(2rem, 1.6rem + 1.6vw, 3rem);

  /* Display scale */
  --step-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);    /* home hero h1 (small caps run wide) */
  --step-split: clamp(1.875rem, 1.4rem + 1.9vw, 3rem);    /* section h2 */
  --step-number: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);  /* roman and section numerals, in --ink-muted */
  --step-wordmark: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  --step-logo: clamp(13rem, 10rem + 9vw, 17rem);          /* header wordmark width */
  --step-logo-footer: clamp(15rem, 12rem + 8vw, 19rem);   /* footer lockup width */

  --leading-display: 1.12;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-body: 1.65;
  /* Serif display faces need no negative tracking; small caps get a little air */
  --tracking-heading: 0;
  --tracking-display: 0;
  --tracking-hero: 0.01em;
  --tracking-label: 0.08em;   /* small-caps labels (Playfair Display SC) */

  --weight-body: 400;
  --weight-display: 400;
  --weight-heading: 400;
  --weight-strong: 600;
  --weight-label: 400;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: clamp(4rem, 3rem + 4vw, 7rem);      /* section padding */
  --space-9: clamp(5rem, 3.5rem + 5vw, 9rem);    /* page headers */
  --space-10: clamp(6rem, 4rem + 7vw, 11rem);    /* hero */

  /* Measure and layout */
  --measure: 66ch;
  --measure-split: 60ch;
  --measure-narrow: 46ch;
  --wrap: 75rem;            /* narrower than the Institute's 90rem: a quieter, centred page */
  --wrap-prose: 62rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --grid-columns: 12;
  --grid-gap: var(--gutter);
  --label-col: 12rem;
  --rail-col: 12rem;
  --date-col: 9rem;

  /* Lines */
  --rule-width: 1px;
  --accent-rule-width: 1px;
  --focus-width: 3px;
  --focus-offset: 3px;
  --radius: 0;              /* square corners everywhere */
  --target-min: 2.75rem;    /* minimum interactive target (admin.css) */
  --admin-nav-col: 15rem;   /* admin.css only */
  --media-card-min: 14rem;
  --media-thumb-ratio: 4 / 3;
  --picker-width: 56rem;
  --media-thumb-size: 4.5rem;

  /* Motion (disabled entirely under prefers-reduced-motion) */
  --duration: 160ms;
  --duration-reveal: 300ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
