/* EKPA CRM design tokens. Values change here only; every other stylesheet references
   these names, and docs/design/styleguide.html carries a generated copy (tools/sync_styleguide.py).
   Muted text and the primary gradient meet AA contrast in both themes (REQ-NFR-070).
   Two breakpoints, written by hand in each @media since a custom property cannot name one:
   1180 px, where a two-column layout goes to one and the money table's text wraps;
   900 px, the tablet, where the sidebar goes, the page padding narrows and two-column forms and lists stack.
   Captures check 1440, 1280, 1181, 1180, 1024, 901, 900 and 820 px (M12e, 2 November 2026). */
:root{
  color-scheme:light;
  --bg:#f3f4f9;
  /* the two brands (codebase/logos/palette, the kit of 7 October 2026): Learn Inn blue, orange, ink; Master red,
     gold, ink. primary dresses the primary button, on-primary its text; accent marks focus, selection and the bars;
     accent-text the links; highlight is the kit's own accent, for the active navigation item and the badges, never
     text on white; fg and bg dress the unit tag and chip. canvas to border tint the frame, the text and the surfaces in
     the light theme. In Master red has one job, danger, removal and errors, so the kit's red is identity only: the mark,
     the wordmark, the footer and the root page (identity). Its primary is the kit's ink, the kit's gold in the dark
     theme, and its accent and links are deep golds drawn from the kit's gold. A recorded departure from the kit, whose
     palette.md names red for Master's primary buttons (decision D50 of 31 October 2026, REQ-NFR-062) */
  --li-primary:#2a3990; --li-primary-2:#3748a8; --li-on-primary:#fff; --li-accent:#2a3990; --li-on-accent:#fff; --li-accent-text:#2a3990; --li-soft:#eef0f8; --li-ring:rgba(42,57,144,.2);
  --li-highlight:#fbb040; --li-on-highlight:#1c2250; --li-fg:#2a3990; --li-bg:#eef0f8; --li-grad-bar:linear-gradient(90deg,#7a88d6,#2a3990);
  --li-canvas:#f7f8fc; --li-text:#1c2250; --li-text-2:#474d6e; --li-text-3:#5e6480; --li-surface-2:#f7f8fc; --li-surface-3:#eff1f7; --li-surface-4:#e3e6f0; --li-border:rgba(28,34,80,.08); --li-border-2:rgba(28,34,80,.14);
  --li-glow:radial-gradient(1100px 520px at 12% -10%, rgba(42,57,144,.10), transparent 62%),
            radial-gradient(800px 420px at 100% 0%, rgba(251,176,64,.10), transparent 60%);
  --pm-primary:#21201e; --pm-primary-2:#3a3733; --pm-on-primary:#fff; --pm-identity:#c12d33; --pm-accent:#8a6a2b; --pm-on-accent:#fff; --pm-accent-text:#75581f; --pm-link-line:underline; --pm-soft:#f3ecdd; --pm-ring:rgba(138,106,43,.22);
  --pm-highlight:#d5b270; --pm-on-highlight:#21201e; --pm-fg:#21201e; --pm-bg:#f3ecdd; --pm-grad-bar:linear-gradient(90deg,#d5b270,#8a6a2b);
  --pm-canvas:#faf8f3; --pm-text:#21201e; --pm-text-2:#4d4943; --pm-text-3:#6b6760; --pm-surface-2:#faf8f3; --pm-surface-3:#f4f0e7; --pm-surface-4:#e9e3d6; --pm-border:rgba(60,45,20,.09); --pm-border-2:rgba(60,45,20,.16);
  --pm-glow:radial-gradient(1100px 520px at 12% -10%, rgba(213,178,112,.10), transparent 62%),
            radial-gradient(800px 420px at 100% 0%, rgba(213,178,112,.14), transparent 60%);
  /* the root that names both applications wears both kits: Learn Inn's blue from the left, Master's red and gold
     from the right, and a short rule in Learn Inn's blue and Master's red under its heading: the red's identity use */
  --duo-glow:radial-gradient(1000px 560px at 8% -10%, rgba(42,57,144,.14), transparent 62%),
             radial-gradient(900px 520px at 100% 0%, rgba(179,33,39,.08), transparent 60%),
             radial-gradient(700px 420px at 92% 100%, rgba(213,178,112,.14), transparent 60%);
  --duo-rule:linear-gradient(90deg,var(--li-accent) 0 50%,var(--pm-identity) 50% 100%);
  --bg-glow:radial-gradient(1100px 520px at 12% -10%, rgba(91,98,227,.12), transparent 62%),
            radial-gradient(800px 420px at 100% 0%, rgba(59,130,246,.07), transparent 60%);
  --surface:#ffffff; --surface-2:#f8fafc; --surface-3:#f1f3f8; --surface-4:#e8ebf2;
  --border:rgba(15,23,42,.07); --border-2:rgba(15,23,42,.12);
  --text:#0f172a; --text-2:#4b5567; --text-3:#5f6a7f;
  --accent:#5b62e3; --accent-2:#4b52d6; --accent-soft:#eef0fd; --accent-text:#4348c4; --on-accent:#fff; --on-primary:#fff;
  --highlight:#5b62e3; --on-highlight:#fff;
  --ring:rgba(91,98,227,.25);
  --grad-primary:linear-gradient(180deg,#5d64e4 0%,#5158d9 100%);
  --grad-primary-hover:linear-gradient(180deg,#666de8 0%,#5a61e0 100%);
  --grad-bar:linear-gradient(90deg,#8b91f3,#5b62e3);

  /* the semantic scales below in both themes, --surface-2, the blue of --bg-glow and the shadows' base: Tailwind CSS
     v3.4 palette values, MIT, Copyright (c) Tailwind Labs, Inc., each the nearest to the value it replaced (decision D54
     of 2 November 2026, 18-DEPENDENCIES.md). The accent family is the project's own; the avatars are Tailwind's too */
  --blue-bg:#eff6ff; --blue-fg:#2563eb; --blue-dot:#3b82f6;
  --green-bg:#ecfdf5; --green-fg:#047857; --green-dot:#10b981;
  --amber-bg:#fffbeb; --amber-fg:#b45309; --amber-dot:#f59e0b;
  --red-bg:#fef2f2; --red-fg:#b91c1c; --red-dot:#ef4444; --danger:#b91c1c; --danger-hover:#991b1b; --on-danger:#fff;
  --violet-bg:#f5f3ff; --violet-fg:#6d28d9; --violet-dot:#8b5cf6;
  --teal-bg:#f0fdfa; --teal-fg:#0f766e; --teal-dot:#14b8a6;
  --grey-bg:#f1f5f9; --grey-fg:#334155; --grey-dot:#94a3b8;

  --av-1:linear-gradient(135deg,#c7d2fe,#818cf8); --av-1-fg:#1e1b4b;
  --av-2:linear-gradient(135deg,#fbcfe8,#f472b6); --av-2-fg:#500724;
  --av-3:linear-gradient(135deg,#99f6e4,#2dd4bf); --av-3-fg:#042f2e;
  --av-4:linear-gradient(135deg,#fde68a,#fbbf24); --av-4-fg:#451a03;
  --av-5:linear-gradient(135deg,#bae6fd,#38bdf8); --av-5-fg:#082f49;

  --shadow-xs:0 1px 2px rgba(17,24,39,.05);
  --shadow-sm:0 1px 3px rgba(17,24,39,.08), 0 1px 2px rgba(17,24,39,.04);
  --shadow-md:0 6px 14px -4px rgba(17,24,39,.10), 0 2px 4px -2px rgba(17,24,39,.05);
  --shadow-lg:0 16px 32px -8px rgba(17,24,39,.16), 0 4px 8px -4px rgba(17,24,39,.06);
  --shadow-xl:0 28px 60px -12px rgba(17,24,39,.28);

  --font:"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono:ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --t-fast:120ms; --t:180ms; --t-slow:260ms; --ease:cubic-bezier(.2,.8,.2,1);

  /* Type, space, widths, radii and the frame (M12e phase 4, 2 November 2026): one token per role,
     and a screen never names a size of its own */
  /* Type: seven sizes. Roles alias them so that each can move alone */
  --fs-caps:11px;     /* short capitals: table heads, nav sections, tags, counts */
  --fs-meta:12px;     /* secondary lines, help, chips, times */
  --fs-label:12px;    /* a form field's label */
  --fs-body:13px;     /* the reading size of the interface */
  --fs-table:13px;    /* table text */
  --fs-control:13px;  /* what is typed in a field */
  --fs-btn:13px;      /* a button, at every height */
  --fs-section:14px;  /* a card's or section's heading */
  --fs-title:16px;    /* a dialog's title, a programme's name */
  --fs-page:20px;     /* the page title, one per page */
  --fs-num-lg:20px;   /* amounts in a strip */
  --fs-num-xl:26px;   /* the figure of a tile */
  --lh-tight:1.2;     /* titles, figures */
  --lh-ui:1.4;        /* the interface, 18 px on 13 */
  --lh-body:1.5;      /* running text that wraps: notes, mail, help on an entrance */
  --ls-title:-.01em; --ls-num:-.02em; --ls-caps:.04em;
  /* Space: a 4 px scale, with 2 and 6 as half steps inside controls and chips only */
  --sp-05:2px; --sp-1:4px; --sp-15:6px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-6:24px; --sp-8:32px; --sp-10:40px;
  /* Space by role */
  --frame-gap:8px;    /* around the pane */
  --page-x:24px; --page-top:16px; --page-bottom:24px;
  --section-gap:16px; /* between cards of a page */
  --card-x:16px; --card-y:12px;
  --form-gap:12px;    /* between fields, both ways */
  --cell-x:12px; --cell-y:4px;
  --row-h:40px; --row-h-head:32px; --row-h-compact:32px;
  --ctl-h:32px; --ctl-h-sm:28px; --ctl-h-xs:24px; --ctl-h-lg:40px; --ctl-h-tab:36px; --ctl-x:12px;
  --chip-h:22px; --chip-h-xs:20px;
  --kv-key:128px; --srow-key:340px; --tile-min:136px;
  /* Widths by role: one family for table cells, the rest one per component */
  --cell-wrap-narrow:120px; /* a wrapping text cell of a list under 1180 */
  --cell-wrap-min:160px;    /* any wrapping cell, a link cell included */
  --cell-name-min:200px;    /* a frozen name, a name or title cell */
  --col-name:240px;         /* the widest a name or link cell grows in a frozen sheet; a preference column's least */
  --cell-wide:280px; --cell-wide-max:360px; /* a task title, a ranking decision, a document's name */
  --cell-max:320px;         /* a list value stops here with an ellipsis; whole on the card and in the export */
  --list-min:240px; --freeze-check:36px; --kcol-min:216px;
  --search-w:360px; --search-min:160px; --walk-next-max:280px;
  --tl-when:112px; --tl-when-sm:76px; --log-side:156px; --log-measure:760px; --act-w-sm:128px;
  --toast-w:400px; --pop-w:432px; --field-min:220px; --ctl-date-min:136px;
  --mark:7px; --icon-sm:14px; --icon:16px;
  --input-action-room:104px;
  /* Radii */
  --r-sm:4px; --r:6px; --r-md:8px; --r-lg:10px; --r-xl:14px; --pill:999px; --round:50%;
  /* The frame */
  --sidebar:216px; --topbar:48px;
  /* What had no token: the hover border, the invalid halo, the plate under a QR code, the scrim; the focus halo
     and the loading bar's glow follow the brand, so they are set with it below */
  --border-3:rgba(15,23,42,.2);
  --focus-invalid:0 0 0 3px rgba(239,68,68,.15);
  --nav-hover:rgba(255,255,255,.65); --overlay-hover:rgba(0,0,0,.08); --avatar-rim:rgba(255,255,255,.35); --backdrop:rgba(15,23,42,.45); --plate:#fff;
  --mark-hollow:inset 0 0 0 1.5px var(--grey-dot);
}
@media (max-width:1180px){:root{--walk-next-max:220px}}
@media (max-width:900px){:root{--page-x:16px}}
[data-theme="dark"]{
  color-scheme:dark;
  --border-3:rgba(255,255,255,.2);
  --nav-hover:var(--surface-2); --overlay-hover:rgba(255,255,255,.1); --avatar-rim:rgba(255,255,255,.2); --backdrop:rgba(0,0,0,.6);
  --bg:#0b0e16;
  --li-primary:#3546a8; --li-primary-2:#4152b6; --li-on-primary:#fff; --li-accent:#8e9cf0; --li-on-accent:#141a3d; --li-accent-text:#aab5f7; --li-soft:rgba(142,156,240,.16); --li-ring:rgba(142,156,240,.35);
  --li-highlight:#fbb040; --li-on-highlight:#1c2250; --li-fg:#c3caf8; --li-bg:rgba(142,156,240,.16); --li-grad-bar:linear-gradient(90deg,#5f6fd0,#a3aef5);
  --li-glow:radial-gradient(1100px 520px at 12% -10%, rgba(53,70,168,.30), transparent 62%),
            radial-gradient(800px 420px at 100% 0%, rgba(251,176,64,.06), transparent 60%);
  --pm-primary:#d5b270; --pm-primary-2:#e6cd9c; --pm-on-primary:#21201e; --pm-accent:#d5b270; --pm-on-accent:#21201e; --pm-accent-text:#dcbd82; --pm-link-line:none; --pm-soft:rgba(213,178,112,.14); --pm-ring:rgba(213,178,112,.4);
  --pm-highlight:#d5b270; --pm-on-highlight:#21201e; --pm-fg:#e6cd9c; --pm-bg:rgba(213,178,112,.16); --pm-grad-bar:linear-gradient(90deg,#8a6a2b,#d5b270);
  --pm-glow:radial-gradient(1100px 520px at 12% -10%, rgba(213,178,112,.06), transparent 62%),
            radial-gradient(800px 420px at 100% 0%, rgba(213,178,112,.08), transparent 60%);
  --duo-glow:radial-gradient(1000px 560px at 8% -10%, rgba(53,70,168,.32), transparent 62%),
             radial-gradient(900px 520px at 100% 0%, rgba(179,33,39,.18), transparent 60%),
             radial-gradient(700px 420px at 92% 100%, rgba(213,178,112,.07), transparent 60%);
  --bg-glow:radial-gradient(1100px 520px at 12% -10%, rgba(124,131,240,.18), transparent 62%),
            radial-gradient(800px 420px at 100% 0%, rgba(59,130,246,.10), transparent 60%);
  --surface:#131723; --surface-2:#181d2b; --surface-3:#1f2535; --surface-4:#28304a;
  --border:rgba(255,255,255,.07); --border-2:rgba(255,255,255,.12);
  --text:#e9ecf4; --text-2:#a4acbf; --text-3:#8b94a8;
  --accent:#7c83f0; --accent-2:#8b91f3; --accent-soft:rgba(124,131,240,.16); --accent-text:#aab0f9; --on-accent:#fff; --on-primary:#fff;
  --highlight:#7c83f0; --on-highlight:#fff;
  --ring:rgba(124,131,240,.35);
  --grad-primary:linear-gradient(180deg,#6067e6 0%,#5158d9 100%);
  --grad-primary-hover:linear-gradient(180deg,#6c73ea 0%,#5a61e0 100%);
  --grad-bar:linear-gradient(90deg,#9aa0f6,#6a71ea);

  --blue-bg:rgba(59,130,246,.16); --blue-fg:#93c5fd; --blue-dot:#60a5fa;
  --green-bg:rgba(16,185,129,.16); --green-fg:#6ee7b7; --green-dot:#34d399;
  --amber-bg:rgba(245,158,11,.16); --amber-fg:#fbbf24; --amber-dot:#f59e0b;
  --red-bg:rgba(239,68,68,.16); --red-fg:#fca5a5; --red-dot:#f87171; --danger:#dc2626; --danger-hover:#b91c1c; --on-danger:#fff;
  --violet-bg:rgba(139,92,246,.18); --violet-fg:#c4b5fd; --violet-dot:#a78bfa;
  --teal-bg:rgba(20,184,166,.16); --teal-fg:#5eead4; --teal-dot:#2dd4bf;
  --grey-bg:rgba(148,163,184,.14); --grey-fg:#cbd5e1; --grey-dot:#94a3b8;

  --av-1:linear-gradient(135deg,#4f46e5,#818cf8); --av-1-fg:#eef2ff;
  --av-2:linear-gradient(135deg,#be185d,#f472b6); --av-2-fg:#fdf2f8;
  --av-3:linear-gradient(135deg,#0f766e,#2dd4bf); --av-3-fg:#f0fdfa;
  --av-4:linear-gradient(135deg,#b45309,#fbbf24); --av-4-fg:#fffbeb;
  --av-5:linear-gradient(135deg,#0369a1,#38bdf8); --av-5-fg:#f0f9ff;

  --shadow-xs:0 1px 2px rgba(0,0,0,.35);
  --shadow-sm:0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:0 6px 14px -4px rgba(0,0,0,.5), 0 2px 4px -2px rgba(0,0,0,.4);
  --shadow-lg:0 16px 32px -8px rgba(0,0,0,.6), 0 4px 8px -4px rgba(0,0,0,.4);
  --shadow-xl:0 28px 60px -12px rgba(0,0,0,.75);
}
/* The focus halo and the loading bar's glow read the brand's ring and accent where they are set: on the root, and
   again on each block that sets its own brand, a unit's block of the dashboard (a custom property resolves where it
   is declared) */
:root,[data-brand]{--focus-ring:0 0 0 3px var(--ring); --focus-inset:inset 0 0 0 1px var(--accent), inset 0 0 0 4px var(--ring); --shadow-bar:0 0 8px var(--accent)}
