:root {
  /* Type families and weights */
  --font-display: "El Messiri", Georgia, serif;
  --font-body: "Inter", sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Type scale: 1.250 at narrow widths, derived from a 1rem root */
  --font-size-caption: 0.8rem;
  --font-size-body: 1rem;
  --font-size-lead: 1.25rem;
  --font-size-title: 1.5625rem;
  --font-size-section: 1.953125rem;
  --font-size-feature: 2.44140625rem;
  --font-size-display: 3.0517578125rem;
  --line-height-display: 1.1;
  --line-height-heading: 1.2;
  --line-height-body: 1.6;
  --line-height-label: 1.4;
  --letter-spacing-display: -0.03125rem;
  --letter-spacing-body: 0;
  --letter-spacing-label: 0.125rem;

  /* Surfaces */
  --surface-base: #fbf8f3; /* --text-primary: 18.23:1 */
  --surface-elevated: #ffffff; /* --text-primary: 19.03:1 */
  --surface-sunken: #f6eedd; /* --text-primary: 16.48:1 */

  /* Text */
  --text-primary: #101010; /* on base: 16.48:1; on elevated: 19.03:1 */
  --text-secondary: #101010; /* on base: 16.48:1; hierarchy uses weight and measure */
  --text-muted: #6e6e6e; /* on elevated only: 5.10:1 */
  --text-inverse: #ffffff; /* on accent: 8.60:1; on technical field: 19.03:1 */

  /* Primary action: only the consultation-action component consumes these */
  --accent-primary: #0f4c9b; /* cream text: 7.20:1; against base: 7.20:1 */
  --accent-primary-hover: #101010; /* cream text: 16.48:1 */
  --accent-primary-active: #101010; /* cream text: 16.48:1 */
  --accent-subtle: #f6eedd; /* black text: 16.48:1; inherited solid, not a tint */

  /* Borders and focus */
  --border-subtle: #6e6e6e; /* against base: 4.42:1; against elevated: 5.10:1 */
  --border-strong: #101010; /* against base: 16.48:1; against elevated: 19.03:1 */
  --border-focus: #101010; /* against base: 16.48:1; elevated: 19.03:1; yellow: 10.47:1 */

  /* Feedback; icons and labels remain the non-colour signal */
  --feedback-error-text: #101010; /* on error surface: 19.03:1 */
  --feedback-error-marker: #d62b1e; /* on base: 4.31:1; on elevated: 4.97:1; graphical use */
  --feedback-error-surface: #ffffff; /* black text: 19.03:1 */
  --feedback-success-text: #101010; /* on success surface: 19.03:1 */
  --feedback-success-marker: #101010; /* on elevated: 19.03:1 */
  --feedback-success-surface: #ffffff; /* black text: 19.03:1 */
  --feedback-warning-text: #101010; /* on warning surface: 10.47:1 */
  --feedback-warning-surface: #f2b705; /* black text: 10.47:1 */
  --feedback-offline-text: #101010; /* on offline surface: 19.03:1 */
  --feedback-offline-surface: #ffffff; /* black text: 19.03:1 */

  /* Direction fields and the single signature element */
  --field-personal: #ffd66b; /* black text: 13.13:1 */
  --field-technical: #59c6e8; /* black text: 10.14:1 */
  --decorative-system: #d62b1e; /* on base: 4.31:1; graphical accent only */
  --signature-rule: #101010; /* against base: 16.48:1 */
  --signature-node: #0f4c9b; /* against base: 7.20:1 */

  /* Spacing: inherited base-8 sequence; large steps remain multiples of 64 */
  --space-0: 0;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 8rem;
  --space-8: 12rem;

  /* Layout */
  --layout-max: 80rem;
  --measure-reading: 64ch;
  --page-gutter: var(--space-3);
  --grid-gutter: var(--space-2);
  --grid-columns: 4;
  --section-gap: var(--space-6);
  --component-padding: var(--space-3);
  --ratio-portrait: 4 / 5;
  --ratio-project: 16 / 10;
  --ratio-proof: 1 / 1;

  /* Sharp radius identity */
  --radius-container: 2rem;
  --radius-control: 999px;
  --radius-nested: 1rem;

  /* Quiet elevation for the editorial card system */
  --elevation-flat-shadow: none;
  --elevation-raised-shadow: 0 1.5rem 3rem rgb(16 16 16 / 8%);
  --elevation-overlay-shadow: 0 1rem 2rem rgb(16 16 16 / 12%);
  --border-width-hairline: 1px;
  --border-width-strong: 2px;
  --focus-width: 3px;
  --focus-offset: 3px;

  /* Targets and icons */
  --target-min: 2.75rem;
  --icon-size-small: var(--font-size-body);
  --icon-size-medium: var(--font-size-lead);
  --icon-size-large: var(--font-size-title);
  --icon-stroke: 2px;
  --signature-node-size: var(--font-size-lead);

  /* Calm, direct motion */
  --motion-micro-duration: 180ms;
  --motion-layout-duration: 0ms;
  --motion-page-duration: 0ms;
  --motion-easing: ease;
}

/* Medium and wide type scale: 1.333, derived from the same 1rem root */
@media (min-width: 35rem) {
  :root {
    --font-size-caption: 0.75018755rem;
    --font-size-body: 1rem;
    --font-size-lead: 1.333rem;
    --font-size-title: 1.776889rem;
    --font-size-section: 2.368593rem;
    --font-size-feature: 3.157334rem;
    --font-size-display: 4.208726rem;
    --page-gutter: var(--space-4);
    --grid-gutter: var(--space-3);
    --grid-columns: 8;
    --component-padding: var(--space-4);
  }
}

@media (min-width: 56.25rem) {
  :root {
    --grid-gutter: var(--space-4);
    --grid-columns: 12;
    --section-gap: var(--space-7);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-micro-duration: 0ms;
    --motion-layout-duration: 0ms;
    --motion-page-duration: 0ms;
  }
}
