/* Legal AI (fictional office) - design tokens v2 "lit console, lit paper" (2026-11-09). Source of truth for engineering wave 2.
   Model: the system is dark glass; the legal document is the only bright thing and it is the light source.
   Rules: logical properties only; status is never colour alone (shape + Hebrew word + colour); light means the system decided
   something about the document, so an unchecked thing is literally unlit. Day theme = same tokens, [data-theme=day]. */
@font-face{font-family:"Heebo";src:url("fonts/heebo-var-hebrew-latin.woff2") format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Frank Ruhl Libre";src:url("fonts/frankruhllibre-var-hebrew-latin.woff2") format("woff2");font-weight:300 900;font-display:swap}

:root{
  color-scheme:dark;
  /* L0 field: crushed blue-black, cool */
  --field-0:#04070B; --field-1:#08101A; --field-2:#0C1622;
  /* L1 panel: glass, hairline, lit top edge only (key light = overhead) */
  --panel:#0D1621; --panel-2:#101C2A; --panel-3:#15243A;
  --hair:rgba(150,190,215,.17); --hair-2:rgba(150,190,215,.09);
  --edge-light:rgba(225,242,255,.13);            /* the one inner light, top edge */
  --control-edge:rgba(160,200,225,.46);          /* inputs, buttons, segments: >=3:1 on panel */
  --focus:#9BDCFF;
  /* console text (contrast on --panel): 15.6 / 9.4 / 6.4 */
  --tx:#ECF4F9; --tx-2:#B4C5D1; --tx-3:#8DA2B1;
  /* accent: lit sky glass. Primary action, focus ring, current step. Dark text on it (9:1). */
  --accent:#5BC0EB; --accent-2:#2E9BCB; --accent-ink:#031A26; --accent-text:#BDE6F6; --accent-bg:rgba(91,192,235,.12);

  /* status family: hue + silhouette + word. Console values; .paper re-declares the deep values below. */
  --checked:#46E0A4;  --checked-bg:rgba(70,224,164,.12);  --checked-glow:rgba(70,224,164,.42);
  --unchecked:#F5BC4E;--unchecked-bg:rgba(245,188,78,.10);                                   /* never glows */
  --blocked:#FF7466;  --blocked-bg:rgba(255,116,102,.13); --blocked-glow:rgba(255,95,80,.50);
  --stale:#C99BFF;    --stale-bg:rgba(201,155,255,.12);                                      /* never glows */
  --standin:#A3A2FF;  --standin-bg:rgba(163,162,255,.13);
  --ins:#46E0A4; --ins-bg:rgba(70,224,164,.16); --del:#FF8A7E; --del-bg:rgba(255,116,102,.16);
  --hit:rgba(91,192,235,.22); --hit-edge:#5BC0EB;
  --warn-ink:#FFD58A; --blocked-ink:#FFC2BA;

  /* L2 sheet: the legal document. Lifted paper. It is the light source. */
  --paper:#FCF8EC; --paper-2:#F4EEDD; --paper-rule:#D9D2BF; --paper-rule-2:#E9E3D2;
  --ink:#17202B; --ink-2:#4A5463; --ink-3:#5B6472;
  --spill:rgba(255,236,190,.42);              /* paper light on the field; turns green when sealed */
  --spill-gate:rgba(255,95,80,.22); --spill-seal:rgba(70,224,164,.26);
  /* the sheet's own spill: hairline edge + near halo + far warm pool. Raised v3 so "the document is the light" reads at a glance. */
  --spill-edge:rgba(255,236,190,.46); --spill-halo:rgba(255,236,190,.30); --spill-pool:rgba(255,214,140,.36);
  --spill-sheet:0 0 0 1px var(--spill-edge),0 0 48px 6px var(--spill-halo),0 34px 90px -18px var(--spill-pool);
  --spill-doc-sm:0 0 0 1px var(--spill-edge),0 0 22px 0 var(--spill-halo);
  --spill-sheet-sm:0 0 0 1px var(--spill-edge),0 0 22px 0 var(--spill-halo);   /* 390 glow budget: no far pool, short halo */

  /* atmosphere (body field) */
  --atm-key:rgba(70,130,190,.20); --atm-corner:rgba(91,192,235,.09); --atm-top:rgba(91,192,235,.10); --atm-dots:rgba(190,225,245,.05);
  --shadow-deep:#000; --edge-sheet:rgba(225,242,255,.22);
  --seal-edge:rgba(70,224,164,.5); --seal-ring:rgba(70,224,164,.22);
  --white:#fff; --scan:rgba(91,192,235,.38);

  /* primary button: lit sky glass */
  --btn-hi:rgba(255,255,255,.4); --btn-ring:rgba(155,220,255,.6); --btn-glow:rgba(91,192,235,.45);

  /* the blocked gate: the one radiating element */
  --gate-bg:linear-gradient(90deg,rgba(255,95,80,.26),rgba(42,13,15,.94) 70%);
  --gate-ring:rgba(255,116,102,.5); --gate-glow:rgba(255,95,80,.45); --gate-halo:rgba(255,95,80,.22); --gate-wash:rgba(255,95,80,.30);
  --gate-ink:#FFC2BA; --gate-ink-2:#FFC2BA;
  --gate-inner:rgba(255,95,80,.35);                                /* red inner wash on the compare sheet it lights */
  --gate-shadow:var(--lit),0 0 0 1px var(--gate-ring),0 0 28px var(--gate-glow),0 0 90px 10px var(--gate-halo);

  /* command bar + overlays */
  --scrim:rgba(3,6,10,.72); --cmd-sheen:rgba(255,255,255,.04); --cmd-shadow:rgba(0,0,0,.9);
  --nav-bg:rgba(8,14,24,.97); --grp:#8FA3B8;
  --ans-edge:rgba(255,236,190,.35); --ans-src-edge:#9FB4C0;

  /* source pill on paper (contradiction sides, command answer) */
  --src-paper-bg:#E8F1FA; --src-paper-edge:#7FA6C9; --src-paper-ink:#1F4E79;
  --print-ink:#000; --print-bg:#fff;

  /* type: Frank Ruhl Libre = what is read as a document; Heebo = what is operated; mono = ids and hashes */
  --ui:"Heebo","Assistant","Segoe UI","Arial Hebrew",Arial,sans-serif;
  --doc:"Frank Ruhl Libre","David Libre","David","Times New Roman",serif;
  --mono:ui-monospace,"Cascadia Mono","SFMono-Regular",Menlo,Consolas,monospace;
  --fs-0:14px; --fs-1:15px; --fs-2:16px; --fs-3:18px; --fs-4:22px; --fs-5:32px; --lh:1.55;

  /* space: 4px base */
  --s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:24px;--s6:32px;--s7:48px;
  --r:8px; --r-sm:5px; --r-sheet:3px;

  /* light, not shadow: depth is a lit top edge plus a darker body. The only outer glow is light spilling from the sheet or a decision. */
  --lit:inset 0 1px 0 var(--edge-light);
  --lit-strong:inset 0 1px 0 rgba(235,248,255,.20);

  /* motion: transform/opacity only; 140-220ms for state, 900-2400ms for ambient. Reduced motion = static lit state. */
  --t-fast:140ms; --t-med:220ms; --t-slow:560ms; --ease:cubic-bezier(.2,.7,.2,1);

  --tap:44px; --tap-primary:52px; --banner-h:32px; --top-h:60px;
}
/* On paper the status colours flip to their deep AA values (the same component, two surfaces). */
.paper,.docp,.quote,.cmp,.contra .side{
  --checked:#1B5C55;--checked-bg:#DDEDEA;--unchecked:#8A5A00;--unchecked-bg:#FBEFCF;--blocked:#8E2B25;--blocked-bg:#F6E1DE;
  --stale:#6A3E78;--stale-bg:#EFE4F3;--standin:#43427F;--standin-bg:#E9E8F5;
  --ins:#1B5C55;--ins-bg:#DDEDEA;--del:#8E2B25;--del-bg:#F6E1DE;--hit:#DDE7F3;--hit-edge:#5F7FA8;
}

/* DAY theme: same tokens, lit-paper on a pale field. Rendered only to compare (see design-language.md decision). */
[data-theme=day]{
  color-scheme:light;
  --field-0:#E4EAEF; --field-1:#EEF2F5; --field-2:#F6F8FA;
  --panel:#FFFFFF; --panel-2:#F3F6F8; --panel-3:#E6EDF2;
  --hair:rgba(40,70,95,.20); --hair-2:rgba(40,70,95,.10); --edge-light:rgba(255,255,255,.9);
  --control-edge:#7C8E9B; --focus:#0B6FB8;
  --tx:#14202B; --tx-2:#46576A; --tx-3:#566676;
  --accent:#17485C; --accent-2:#0F3444; --accent-ink:#FFFFFF; --accent-text:#0F3444; --accent-bg:#E1ECEF;
  --checked:#1B5C55;--checked-bg:#DDEDEA;--checked-glow:rgba(27,92,85,.28);
  --unchecked:#8A5A00;--unchecked-bg:#FBEFCF;--blocked:#8E2B25;--blocked-bg:#F6E1DE;--blocked-glow:rgba(142,43,37,.30);
  --stale:#6A3E78;--stale-bg:#EFE4F3;--standin:#43427F;--standin-bg:#E9E8F5;
  --ins:#1B5C55;--ins-bg:#DDEDEA;--del:#8E2B25;--del-bg:#F6E1DE;--hit:#DDE7F3;--hit-edge:#5F7FA8;
  --warn-ink:#5E3E00;--blocked-ink:#6B1F1A;
  --spill:rgba(255,226,160,.35);--spill-gate:rgba(255,95,80,.22);--spill-seal:rgba(40,170,130,.22);
  --spill-edge:rgba(160,120,40,.5); --spill-halo:rgba(255,226,160,.30); --spill-pool:rgba(230,180,90,.26);
  --atm-key:rgba(70,130,190,.07); --atm-corner:rgba(91,192,235,.05); --atm-top:rgba(91,192,235,.05); --atm-dots:rgba(40,70,95,.06);
  --shadow-deep:rgba(20,40,60,.35); --edge-sheet:rgba(255,255,255,.9);
  --seal-edge:rgba(27,92,85,.55); --seal-ring:rgba(27,92,85,.22);
  --white:#fff; --scan:rgba(23,72,92,.22);
  --btn-hi:rgba(255,255,255,.35); --btn-ring:rgba(23,72,92,.45); --btn-glow:rgba(23,72,92,.22);
  --gate-bg:#FDECEA; --gate-ring:rgba(192,57,43,.45); --gate-glow:rgba(192,57,43,.0); --gate-halo:rgba(192,57,43,.0); --gate-wash:rgba(192,57,43,.14);
  --gate-inner:rgba(192,57,43,.18);
  --gate-shadow:0 0 0 1px var(--gate-ring),0 10px 36px -10px rgba(192,57,43,.30);
  --gate-ink:#7A1F14; --gate-ink-2:#8A2B20;
  --scrim:rgba(20,32,43,.45); --cmd-sheen:rgba(255,255,255,.0); --cmd-shadow:rgba(20,40,60,.35);
  --nav-bg:rgba(255,255,255,.97); --grp:#566676;
  --ans-edge:rgba(160,120,40,.35); --ans-src-edge:#9FB4C0;
  --print-ink:#000; --print-bg:#fff;
}
@media (prefers-reduced-motion:reduce){:root{--t-fast:0ms;--t-med:0ms;--t-slow:0ms}}
