/* Signature Reference Library design tokens. Taken from the live home page (src/app/globals.css)
   so the page can move into the site as is. One file drives every card, pill and surface.
   Three tiers: primitives (the only place a colour value is written), semantic tokens (what the
   colour is for: text, surface, border, link) and the scales (spacing on 4 px steps, type on a
   modular scale). Components use the semantic tokens and the scales, never a primitive or a literal. */
@font-face { font-family: "Ranade"; src: url("/fonts/ranade-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ranade"; src: url("/fonts/ranade-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ranade"; src: url("/fonts/ranade-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bevellier"; src: url("/fonts/bevellier-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* fallback faces matched to the web fonts' metrics (measured in the browser against Arial, 10/23), so text does not move when a web font arrives */
@font-face { font-family: "Ranade Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400 500; size-adjust: 117%; ascent-override: 85.5%; descent-override: 23.9%; line-gap-override: 0%; }
@font-face { font-family: "Ranade Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 700; size-adjust: 111%; ascent-override: 90.1%; descent-override: 25.2%; line-gap-override: 0%; }
@font-face { font-family: "Bevellier Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 700; size-adjust: 73.9%; ascent-override: 129.8%; descent-override: 27%; line-gap-override: 0%; }

:root {
  /* tier 1: primitives (brand values, same as the home page) */
  --srl-c-espresso: #241A14;
  --srl-c-espresso-soft: #6E5F55;
  --srl-c-espresso-faint: #A99D94;   /* map lines and the outer ring: the live map uses its tertiary text colour */
  --srl-c-white: #FFFFFF;
  --srl-c-cream: #FFF6F1;
  --srl-c-cloud: #F7F7F8;            /* outer map boxes, sampled from the live map */
  --srl-c-blush: #FFF0F6;
  --srl-c-sand: #E8DCD4;
  --srl-c-candy: #FF9614;
  --srl-c-candy-edge: #EA7D00;
  --srl-c-sapphire: #1B6DE0;
  --srl-c-tourmaline: #D81B70;
  --srl-c-tourmaline-deep: #BC1559;  /* tourmaline darkened for the NEW tag text: 5.6:1 on its fill, and at least 4.8:1 in protanopia, deuteranopia and tritanopia simulations (the plain value measured 4.42:1) */
  --srl-c-mint: #06C177;

  /* tier 2: semantic tokens, named for what they do */
  --srl-text: var(--srl-c-espresso);
  --srl-text-muted: var(--srl-c-espresso-soft);
  --srl-text-faint: var(--srl-c-espresso-faint);
  --srl-text-on-dark: var(--srl-c-white);
  --srl-surface-page: var(--srl-c-white);        /* pure white, BEJ 2026-10-23 */
  --srl-surface: var(--srl-c-white);
  --srl-surface-tint: var(--srl-c-cream);
  --srl-surface-subtle: var(--srl-c-cloud);
  --srl-surface-new: var(--srl-c-blush);
  --srl-line: var(--srl-c-sand);
  --srl-border: color-mix(in srgb, var(--srl-text) 10%, transparent);
  --srl-border-strong: color-mix(in srgb, var(--srl-text) 16%, transparent);
  --srl-accent: var(--srl-c-candy);
  --srl-accent-edge: var(--srl-c-candy-edge);
  --srl-link: var(--srl-c-sapphire);
  --srl-focus: var(--srl-c-sapphire);
  --srl-highlight: var(--srl-c-tourmaline);
  --srl-highlight-text: var(--srl-c-tourmaline-deep);
  --srl-success: var(--srl-c-mint);
  --srl-scrim: color-mix(in srgb, var(--srl-text) 55%, transparent);
  --srl-scroll-thumb: var(--srl-text-muted);     /* 5.6:1 on the cream track, so a scrolling pane shows that it scrolls */

  /* glass pill. Liquid Glass is Apple's name for the look and Apple documents it for its own platforms only;
     the web has no such API, so this is an approximation (blur, saturation, a light fill and an edge highlight). */
  --srl-glass: color-mix(in srgb, var(--srl-c-white) 86%, transparent);
  --srl-glass-blur: 18px;
  --srl-glass-edge: color-mix(in srgb, var(--srl-c-white) 90%, transparent);

  /* shape and depth */
  --srl-radius: 12px;
  --srl-radius-sm: 8px;
  --srl-radius-lg: 20px;
  --srl-radius-pill: 999px;
  --srl-shadow-card: 0 1px 2px color-mix(in srgb, var(--srl-text) 5%, transparent), 0 4px 14px color-mix(in srgb, var(--srl-text) 6%, transparent);
  --srl-shadow-float: 0 2px 6px color-mix(in srgb, var(--srl-text) 6%, transparent), 0 18px 48px color-mix(in srgb, var(--srl-text) 12%, transparent);

  /* spacing scale: steps of 4 px, written in rem so text zoom moves them with the type */
  --srl-space-1: 0.25rem;   /* 4 */
  --srl-space-2: 0.5rem;    /* 8 */
  --srl-space-3: 0.75rem;   /* 12 */
  --srl-space-4: 1rem;      /* 16 */
  --srl-space-5: 1.25rem;   /* 20 */
  --srl-space-6: 1.5rem;    /* 24 */
  --srl-space-7: 2rem;      /* 32 */
  --srl-space-8: 3rem;      /* 48 */
  --srl-inset: 16px;        /* nothing touches a screen edge */
  --srl-gap: var(--srl-space-5);

  /* type scale: a modular scale, ratio 1.125 (major second) on a 16 px base */
  --srl-fs-xs: 0.79rem;     /* 12.6 px, captions and meta */
  --srl-fs-sm: 0.889rem;    /* 14.2 px, controls and list rows */
  --srl-fs-md: 1rem;        /* 16 px, reading text */
  --srl-fs-lg: 1.125rem;    /* 18 px, card headings */
  --srl-fs-xl: 1.266rem;    /* 20.3 px */
  --srl-fs-2xl: 1.424rem;   /* 22.8 px, view headings */
  --srl-fs-3xl: 1.602rem;   /* 25.6 px, the entry title at its largest */
  --srl-font: "Ranade", "Ranade Fallback", system-ui, sans-serif;
  --srl-font-display: "Bevellier", "Bevellier Fallback", "Ranade", "Ranade Fallback", system-ui, sans-serif;

  /* application shell (MD 19.6): pane widths. The container-query breakpoints in srl-components.css are these sums, see the comment there */
  --srl-pill-closed: 56px;       /* the peeking logo disc */
  --srl-pill-open: 280px;
  --srl-pane-gap: 16px;
  --srl-rail: 336px;             /* entry or list, medium width */
  --srl-list: 240px;             /* list pane, wide */
  --srl-entry: 330px;            /* entry pane, wide */
  --srl-rz-hit: 24px;            /* resize handle: the drag target, 24px both ways (WCAG 2.2 target size 2.5.8); a side handle is centred on the 16px gap, 4px reaching into each card */
  --srl-rz-grip: 4px;            /* the visible bar inside a handle */
  --srl-map-pane: 978px;         /* 960px stage + 8px padding + 1px border on each side */
  --srl-main-left: calc(var(--srl-inset) + env(safe-area-inset-left, 0px) + var(--srl-pill-closed) + var(--srl-space-4));
  --srl-main-mirror: calc(var(--srl-inset) + env(safe-area-inset-left, 0px) + var(--srl-pill-closed) + var(--srl-space-4));   /* the right gutter that matches the closed pill's left one, so a wide page sits in the middle */

  /* motion identity, archetype Corporate (MD 23.5): one curve in (decelerates), one curve out (accelerates),
     three durations (quick answers a press, standard moves a panel, slow lets the map grow), one stagger step */
  --srl-ease: cubic-bezier(0.2, 0, 0, 1);
  --srl-ease-exit: cubic-bezier(0.3, 0, 1, 1);
  --srl-dur-quick: 120ms;
  --srl-dur: 260ms;
  --srl-dur-slow: 360ms;
  --srl-stagger: 8ms;
}
body.pill-kept { --srl-main-left: calc(var(--srl-inset) + env(safe-area-inset-left, 0px) + var(--srl-pill-open) + var(--srl-space-4)); }

/* a browser without color-mix() still gets the same translucent colours */
@supports not (color: color-mix(in srgb, red, blue)) {
  :root {
    --srl-border: rgba(36, 26, 20, 0.10);
    --srl-border-strong: rgba(36, 26, 20, 0.16);
    --srl-scrim: rgba(36, 26, 20, 0.55);
    --srl-glass: rgba(255, 255, 255, 0.86);
    --srl-glass-edge: rgba(255, 255, 255, 0.9);
    --srl-shadow-card: 0 1px 2px rgba(36, 26, 20, 0.05), 0 4px 14px rgba(36, 26, 20, 0.06);
    --srl-shadow-float: 0 2px 6px rgba(36, 26, 20, 0.06), 0 18px 48px rgba(36, 26, 20, 0.12);
  }
}
/* more contrast on request: stronger edges, darker secondary text */
@media (prefers-contrast: more) {
  :root {
    --srl-border: color-mix(in srgb, var(--srl-text) 60%, transparent);
    --srl-border-strong: var(--srl-text);
    --srl-text-muted: #4A3E36;
    --srl-text-faint: #6E5F55;
  }
}
@media (prefers-reduced-motion: reduce) { :root { --srl-dur-quick: 0ms; --srl-dur: 0ms; --srl-dur-slow: 0ms; --srl-stagger: 0ms; } }
