/* TEAR design tokens, shared by the site pages and the report page.
   The look of the A2 reports: warm paper, ink, Iowan Old Style and Avenir Next.
   One quiet accent, a deep blue-violet; gradients only as tonal shades of it. */
:root {
  /* night: dark sections, the app bar */
  --night-0: #111114;
  --night-1: #16161a;
  --night-2: #1e1e23;
  --night-3: #28282e;
  --night-line: rgba(255, 255, 255, .10);
  --night-ink: #f3f1eb;
  --night-ink-2: #cfccc3;
  --night-muted: #8d8a81;

  /* paper: reading sections, with a faint lavender cast */
  --paper: #f3f1eb;
  --paper-2: #ece9e1;
  --card: #fbfaf6;
  --line: #e4e0d6;
  --line-2: #d6d1c5;
  --ink: #16161a;
  --ink-2: #3b3a40;
  --muted: #76736b;

  /* colour by job */
  --violet: #2a78d6;          /* primary: chances, links, focus (the A2 blue; the name stays for the pages that use it) */
  --violet-d: #1f5fae;
  --violet-l: #e5effa;
  --magenta: #5a96e0;
  --pink: #8ab4ea;
  --cyan: #3a8f8a;            /* second data colour */
  --cyan-d: #2c736f;
  --coral: #eb6834;           /* risk, falls, misses (the A2 orange) */
  --coral-d: #c9521f;
  --gold: #f5d77a;            /* marker, "not yet checked" */
  --green: #3f9a6b;

  --grad: linear-gradient(120deg, #1f5fae 0%, #2a78d6 100%);
  --grad-soft: linear-gradient(120deg, rgba(42, 120, 214, .07), rgba(42, 120, 214, .02));
  --grad-cool: linear-gradient(120deg, #3a8f8a 0%, #2a78d6 100%);
  --grad-night: linear-gradient(180deg, #1a1a1f 0%, #16161a 100%);
  --grad-paper: radial-gradient(120% 70% at 50% 0%, #f8f6f1 0%, #f3f1eb 60%);
  /* a whisper of a map under the paper: contour lines (paper-map.svg) on a fine coordinate grid; screen only */
  --paper-map: url("/assets/paper-map.svg") 50% 50% / cover no-repeat,
    linear-gradient(rgba(22, 22, 26, .026) 1px, transparent 1px) -1px -1px / 200px 200px,
    linear-gradient(90deg, rgba(22, 22, 26, .026) 1px, transparent 1px) -1px -1px / 200px 200px,
    linear-gradient(rgba(22, 22, 26, .014) 1px, transparent 1px) -1px -1px / 40px 40px,
    linear-gradient(90deg, rgba(22, 22, 26, .014) 1px, transparent 1px) -1px -1px / 40px 40px;

  /* glass */
  --glass-bg: rgba(255, 255, 255, .05);
  --glass-bg-strong: rgba(255, 255, 255, .08);
  --glass-line: rgba(255, 255, 255, .10);
  --glass-blur: 14px;
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 18px 48px -30px rgba(0, 0, 0, .55);
  --paper-glass-bg: rgba(251, 250, 246, .74);
  --paper-glass-line: rgba(22, 22, 26, .08);
  --shadow-1: 0 1px 2px rgba(22, 22, 26, .05), 0 8px 24px -16px rgba(22, 22, 26, .18);
  --shadow-2: 0 2px 6px rgba(22, 22, 26, .04), 0 24px 60px -36px rgba(22, 22, 26, .30);

  /* type */
  --display: "Iowan Old Style", "New York", ui-serif, "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", -apple-system, system-ui, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: Menlo, ui-monospace, "SF Mono", Consolas, monospace;
  --fs-xs: 12px;  --fs-s: 14px;  --fs-m: 16px;  --fs-l: 19px;
  --fs-xl: 24px;  --fs-2xl: 32px; --fs-3xl: 44px; --fs-4xl: 60px;
  --lh-tight: 1.08; --lh-head: 1.18; --lh-body: 1.55;
  --track-label: .14em;

  /* shape and space */
  --r-s: 8px; --r-m: 14px; --r-l: 22px; --r-xl: 30px; --r-pill: 999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* building blocks */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-l);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  backdrop-filter: blur(var(--glass-blur)) saturate(120%);
}
.glass-paper {
  background: var(--paper-glass-bg);
  border: 1px solid var(--paper-glass-line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.night { background: var(--night-1); background-image: var(--grad-night); color: var(--night-ink); }
.label { font: 500 var(--fs-xs)/1.3 var(--mono); letter-spacing: var(--track-label); text-transform: uppercase; }
@media print { .glass, .glass-paper { -webkit-backdrop-filter: none; backdrop-filter: none; } }
