/* ============================================================================
   Stortingsradar — Tidende design tokens
   Direction A · Institutional parliamentary
   ============================================================================
   Color system intentionally narrow: navy ink on warm parchment paper, brass
   gold as signature (hairlines and accents — never as fill). Sits adjacent to
   the Laki Design System, with Source Serif 4 swapped in for Cormorant where
   editorial density matters.
   ============================================================================ */

:root {
  /* ─── Ink (parliamentary navy) ─── */
  --ti-ink:          #14253D;  /* primary text, masthead, primary button bg */
  --ti-ink-2:        #1E3A5F;  /* links, secondary surfaces, sidebar */
  --ti-ink-3:        #2C4870;  /* tertiary navy, hover states on ink */
  --ti-fg:           #0F1A2C;  /* body text on paper (slightly deeper than ink) */
  --ti-fg-muted:     #5A6373;  /* secondary text, captions, dateline */
  --ti-fg-subtle:    #8A92A0;  /* placeholder, disabled, helper text */

  /* ─── Paper ─── */
  --ti-paper:        #F4F1E8;  /* default background — warm parchment, never white */
  --ti-paper-deep:   #EAE3D2;  /* zebra stripes, hover surface, secondary card bg */

  /* ─── Gold (signature accent) ─── */
  --ti-gold:         #B89456;  /* hairlines, eyebrow text, signature ornament */
  --ti-gold-deep:    #8E6E3A;  /* hover on gold, dimmed gold text */
  --ti-gold-light:   #D9BD7E;  /* on-dark gold accents */
  --ti-gold-wash:    #F0E5C7;  /* very light gold tint for callout backgrounds */

  /* ─── Hairlines ─── */
  --ti-rule:         #1E3A5F;                 /* full-strength rule (use sparingly) */
  --ti-rule-soft:    rgba(20, 37, 61, 0.14);  /* default 1px hairline */
  --ti-rule-faint:   rgba(20, 37, 61, 0.06);  /* very subtle separators */

  /* ─── Semantic colors (muted, never SaaS-bright) ─── */
  --ti-success:      #2E6F4B;
  --ti-success-bg:   #DDE9DF;
  --ti-warning:      #A6792A;
  --ti-warning-bg:   #F5E9C9;
  --ti-danger:       #8B2E27;
  --ti-danger-bg:    #F2DCD7;
  --ti-info:         #2C5C8A;
  --ti-info-bg:      #DCE6F1;

  /* ─── Typography ─── */
  --ti-font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ti-font-serif:   "Source Serif 4", Georgia, "Times New Roman", serif;
  --ti-font-sans:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --ti-font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* Type scale — display (Source Serif 4) */
  --ti-fs-display:   64px;    /* hero · 64/64 · 500 · -0.02em */
  --ti-fs-h1:        40px;    /* h1   · 40/44 · 500 · -0.015em */
  --ti-fs-h2:        28px;    /* h2   · 28/34 · 500 · -0.01em */
  --ti-fs-h3:        20px;    /* h3   · 20/26 · 500 (often italic for editorial) */
  --ti-fs-lede:      19px;    /* italic lede · 19/28 · 300 · italic */

  /* Type scale — UI (IBM Plex Sans) */
  --ti-fs-body:      14px;    /* body · 14/22 · 400 */
  --ti-fs-ui:        13px;    /* UI labels and buttons · 13 · 500 */
  --ti-fs-small:     12px;    /* small text · 12/18 · 400 */
  --ti-fs-eyebrow:   10.5px;  /* eyebrow · 10.5 · 600 · 0.18em uppercase */
  --ti-fs-mono:      11px;    /* mono · 11 · 500 (saksnr, datoer, kildehenvisning) */

  --ti-tracking-eyebrow: 0.18em;
  --ti-tracking-caps:    0.08em;
  --ti-tracking-tight:   -0.012em;
  --ti-tracking-display: -0.02em;

  /* ─── Spacing — base 4 ─── */
  --ti-space-1: 4px;
  --ti-space-2: 8px;
  --ti-space-3: 12px;
  --ti-space-4: 16px;
  --ti-space-5: 24px;
  --ti-space-6: 32px;
  --ti-space-7: 48px;
  --ti-space-8: 64px;
  --ti-space-9: 96px;

  /* ─── Corner radii — squared by default ─── */
  --ti-radius-0: 0px;        /* default — buttons, inputs, cards */
  --ti-radius-1: 2px;        /* exceptional pills and chips */
  --ti-radius-2: 4px;        /* avoid; only for embedded media */

  /* ─── Motion ─── */
  --ti-dur-quick:    160ms;
  --ti-dur-standard: 240ms;
  --ti-dur-slow:     440ms;
  --ti-ease:         cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ─── Elevation ─── */
  /* Tidende is flat by default. Shadows reserved for floating UI only. */
  --ti-shadow-1: 0 2px 4px rgba(20, 37, 61, 0.06);
  --ti-shadow-2: 0 8px 16px rgba(20, 37, 61, 0.10);
}

/* ─── Stortinget political party color reference ─── */
/* For chips, vote-distribution bars, faction markers. Hairline borders only —
   not as fills. Source: each party's house colour in current usage. */
:root {
  --ti-party-ap:  #C71F36;  /* Arbeiderpartiet */
  --ti-party-h:   #0065F1;  /* Høyre */
  --ti-party-sp:  #1A8051;  /* Senterpartiet */
  --ti-party-frp: #293D7A;  /* Fremskrittspartiet */
  --ti-party-sv:  #B81C2E;  /* Sosialistisk Venstreparti */
  --ti-party-v:   #006B4A;  /* Venstre */
  --ti-party-mdg: #5A8C2A;  /* Miljøpartiet De Grønne */
  --ti-party-krf: #F0A41B;  /* Kristelig Folkeparti */
  --ti-party-r:   #7C0E11;  /* Rødt */
}

/* Vote semantic — for "Ja / Nei / Avst." */
:root {
  --ti-vote-ja:   var(--ti-success);
  --ti-vote-nei:  var(--ti-danger);
  --ti-vote-avst: var(--ti-warning);
}
