/* tokens.css: the one place where colours, type sizes, radii and heights are defined (DESIGN.md §3, §0.1).
   Values are those of redizajn/v2/v2.html. Light is the default; dark is the same keys redefined twice:
   under prefers-color-scheme for users who did not force a theme, and under data-theme="dark" for a forced
   theme (the inline script in layout.php sets data-theme from ?theme=dark|light).
   Load order (layout.php): fonts/golos.css, fonts/plex.css, tokens.css, legacy.css, ui.css, then the page.
   No other file may declare :root. The marker words stay inside comments on purpose. */

/* ===== TOKENS (light, default) ===== */
:root{
  color-scheme:light;
  --bg:#f4f2f4; --s1:#ffffff; --s2:#faf8fa; --s3:#f0ecf0;
  --t1:#1b151c; --t2:#574e5c; --t3:#6f6675; --t-inv:#ffffff;
  --line:#e4dee5; --line-2:#efeaf0; --line-strong:#cdc4cf;
  --acc:#86204e; --acc-fill:#86204e; --on-acc:#ffffff; --acc-soft:#f8e9f0; --acc-line:#e7bfd2;
  --ink:#1b151c; --on-ink:#ffffff; --on-ink-2:#cdc4cf;
  --ok:#1f6f45; --ok-soft:#e1f3e8; --warn:#8a5300; --warn-soft:#fbeed7; --err:#b42a1e; --err-soft:#fbe5e2;
  --focus:#86204e;
  --shadow-pop:0 8px 24px rgba(27,21,28,.14),0 1px 2px rgba(27,21,28,.08);   /* floating layers only */
  --scrim:rgba(27,21,28,.55);
  --sans:"Golos Text","IBM Plex Sans","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --r-1:4px; --r-2:6px; --r-3:8px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-12:48px;
  --fs-0:12px; --fs-1:13px; --fs-2:15px; --fs-3:16px; --fs-4:20px; --fs-5:24px; --fs-6:28px;
  --fs-cell:14px; --fs-in:16px;
  --row:42px; --ctl:36px; --inp:38px;
  --nav:224px;
  --chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23574e5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
/* ===== TOKENS (dark): identical block under both selectors ===== */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  color-scheme:dark;
  --bg:#100d12; --s1:#1d171f; --s2:#251e28; --s3:#2f2732;
  --t1:#ede8ee; --t2:#aaa1ad; --t3:#9a909f; --t-inv:#1b151c;
  --line:#332b37; --line-2:#2b242e; --line-strong:#463d4b;
  --acc:#e08fd0; --acc-fill:#b23a74; --on-acc:#ffffff; --acc-soft:#3a2a38; --acc-line:#5e3f56;
  --ink:#ede8ee; --on-ink:#1b151c; --on-ink-2:#574e5c;
  --ok:#6fd19a; --ok-soft:#16301f; --warn:#f0b55e; --warn-soft:#3a2a0c; --err:#ff9a78; --err-soft:#3f1a16;
  --focus:#e08fd0;
  --shadow-pop:0 8px 24px rgba(0,0,0,.5),0 1px 2px rgba(0,0,0,.4);
  --scrim:rgba(0,0,0,.6);
  --chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa1ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#100d12; --s1:#1d171f; --s2:#251e28; --s3:#2f2732;
  --t1:#ede8ee; --t2:#aaa1ad; --t3:#9a909f; --t-inv:#1b151c;
  --line:#332b37; --line-2:#2b242e; --line-strong:#463d4b;
  --acc:#e08fd0; --acc-fill:#b23a74; --on-acc:#ffffff; --acc-soft:#3a2a38; --acc-line:#5e3f56;
  --ink:#ede8ee; --on-ink:#1b151c; --on-ink-2:#574e5c;
  --ok:#6fd19a; --ok-soft:#16301f; --warn:#f0b55e; --warn-soft:#3a2a0c; --err:#ff9a78; --err-soft:#3f1a16;
  --focus:#e08fd0;
  --shadow-pop:0 8px 24px rgba(0,0,0,.5),0 1px 2px rgba(0,0,0,.4);
  --scrim:rgba(0,0,0,.6);
  --chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa1ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
/* ===== /TOKENS ===== */

/* ===== LEGACY ALIASES (DESIGN.md §13): every variable name the old style.css, baza.css and the page
   <style> blocks ever used, mapped onto the tokens above, so all un-migrated pages recolour in one deploy.
   Both themes follow automatically because the right-hand side is a token. Delete with legacy.css (F9). */
:root{
  /* accent */
  --accent:var(--acc); --accent-hover:var(--acc); --brand:var(--acc); --brand-soft:var(--acc-soft);
  /* surfaces */
  --panel:var(--s1); --panel-2:var(--s2); --panel-3:var(--s3); --card-bg:var(--s2);   /* --card-bg was used on six pages and never defined */
  /* text */
  --text:var(--t1); --text-strong:var(--t1); --muted:var(--t2); --text-soft:var(--t3); --border:var(--line);
  /* semantic: the old names --ok / --warn / --err keep their meaning (text colour); the fills get the soft tokens */
  --ok-bg:var(--ok-soft); --ok-text:var(--ok); --warn-bg:var(--warn-soft); --warn-c:var(--warn);
  --err-bg:var(--err-soft); --err-text:var(--err); --err-line:color-mix(in srgb,var(--err) 35%,transparent); --err-c:var(--err); --ok-c:var(--ok);   /* a red line (.kk-greska, .eb-err), never the plum --acc-line (DESIGN §3: accent is not a status colour) */
  --info:var(--t2); --info-bg:var(--s2); --info-soft:var(--s2); --info-line:var(--line);
  /* shadows and radii: static surfaces are flat now; only floating layers keep a shadow */
  --shadow:none; --shadow-sm:none; --shadow-md:var(--shadow-pop); --radius:var(--r-3); --radius-sm:var(--r-2);
}
