/*
 * NEAP's visual world — shared by the landing page and the dashboard.
 *
 * The two surfaces do different jobs: one persuades, the other is for working. They
 * share the palette, the browser surfaces and the tabular figures; they do not share
 * density or type scale.
 */

/* Archivo as a variable file: one request covers 400 to 700, where static weights would
   have taken three. A grotesque with tight apertures and a tall x-height — it holds up at
   small interface sizes, which the system sans also did, but without ever looking like a
   decision. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/archivo-latin.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* Young Serif: a serif with blunt slab serifs and low contrast. Gloock, the didone it
   replaces, pulled the page towards fashion — high contrast and thin hairlines suit a
   magazine cover, not a treasury engine. Thick, even stems stand up better next to
   tabular figures. */
@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/youngserif-latin.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;
}

:root {
  color-scheme: light;

  /* ── Palette ──────────────────────────────────────────────────────────
     Space Indigo, Vintage Grape, Golden Pollen, Dark Cyan, Blue Slate.

     Two of the five cannot carry text on a light background: Golden Pollen falls to
     1.5:1 and Dark Cyan to 3.3:1. Rather than dropping them or distorting them, they
     get the role they are best at — surface. Golden Pollen carrying Space Indigo gives
     10.2:1, which makes it the most legible highlighter on the page. The text roles are
     held by values derived from the same family, all AA compliant. */
  --indigo: #1F2041;
  --grape: #4B3F72;
  --pollen: #FFC857;
  --cyan: #119DA4;
  --slate: #19647E;

  /* The background is not white: it is an indigo wash. A white background would have
     made the palette decorative — visible only in accents, absent from the surface that
     occupies ninety percent of the screen. Panels stay white and therefore stand out in
     relief instead of merging with the page. */
  --bg: #e4e1f1;
  --panel: #ffffff;
  --panel-2: #d5d0e8;
  --line: #cbc5e0;
  --ink: var(--indigo);

  /* Three text levels: 15.7 / 9.4 / 7.4 on a panel, and never under 4.9 on the two
     tinted backgrounds. */
  --dim: #464265;
  --faint: #575272;

  --ok: #0b6067;
  --warn: #6f4c0e;
  --bad: #8f2740;
  --accent: #175c74;
  --eur: #175c74;
  --gbp: var(--grape);
  --brl: #6f4c0e;

  /* Zone backgrounds derived from the same hues, pale enough that the marker and the
     figures stay the first thing you read. */
  --zone-low: #f4d9df;
  --zone-ok: #cfe9ec;
  --zone-high: #fbe7c2;

  --display: 'Young Serif', ui-serif, Georgia, serif;
  --sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

/* Surfaces the browser paints, which belong to no design system until you claim
   them. */
::selection { background: var(--pollen); color: var(--indigo); }
html { scrollbar-color: var(--line) var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

/* Column-aligned figures: in a financial table, digits that shift from row to row
   prevent vertical comparison, which is the only thing anyone does with them. */
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
