/* ============================================================
   tomeo: one set of colour tokens, light and dark (simplify plan,
   step 16; the approved mockup's mockup.css).
   Look: an approvals desk. Warm paper, ink, one lime accent, a dark
   rail (the menu) in both themes, serif headings.

   Light is the default. Dark comes from the visitor's system setting,
   or from the theme switch in the menu, which sets
   <html data-theme="light|dark"> before the page paints
   (templates/includes/theme_head.html).

   Every other style sheet reads these tokens: shell.css (the rail and
   Home), ui.css (the page parts) and neoglass.css (older pages). The
   older names (--ia-*, --text, --panel...) are kept as aliases so a
   page that uses them changes with the theme too.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..600;1,9..144,400..600&family=Inter:wght@400..800&family=JetBrains+Mono:wght@500;600&display=swap');

/* ---------- light (the default) ---------- */
:root{
  color-scheme: light;
  --bg:#f4f1e6; --surface:#fffdf5; --surface-2:#ece8d8; --surface-3:#e3dfcc;
  --ink:#171b10; --muted:#5d6252; --faint:#656a58;
  --line:#dbd6c2; --line-2:#c6c0a8; --field-line:#8f8a75;
  --accent:#a3e635; --accent-2:#bef264; --accent-ink:#17200a; --accent-text:#44700a; --accent-soft:#e6f5c2;
  --warn:#9a5405; --warn-soft:#fbecc8; --bad:#b3261e; --bad-soft:#fbe1dc; --info:#2b5f8a; --info-soft:#dcebf5;
  --hover:rgba(23,27,16,.05); --tint:rgba(23,27,16,.08);
  --shadow:0 1px 0 rgba(23,27,16,.04), 0 12px 32px -18px rgba(23,27,16,.28);
  --shadow-pop:0 20px 50px -12px rgba(23,27,16,.35);
  /* The rail (menu, phone bars) is dark in both themes, like the logo. */
  --rail:#11140c; --rail-2:#1a1e13; --rail-ink:#f1f3e6; --rail-muted:#9da38e; --rail-line:#2a2f20;
  --display:"Fraunces","Iowan Old Style","Palatino Linotype",Georgia,serif;
  --body:"Inter","Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,"Cascadia Mono",Consolas,monospace;
}

/* ---------- dark: the system setting, unless the owner chose light ---------- */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme: dark;
    --bg:#0b0d08; --surface:#13160e; --surface-2:#1a1e13; --surface-3:#222718;
    --ink:#f2f4e8; --muted:#a4a994; --faint:#858a75;
    --line:#272c1c; --line-2:#3a4029; --field-line:#5f6648;
    --accent-text:#bef264; --accent-soft:#1f2c0d;
    --warn:#f5b942; --warn-soft:#2b220d; --bad:#f58a80; --bad-soft:#2d1512; --info:#8cc4ee; --info-soft:#10202c;
    --hover:rgba(255,255,255,.05); --tint:rgba(255,255,255,.08);
    --shadow:0 1px 0 rgba(0,0,0,.4), 0 18px 40px -22px rgba(0,0,0,.8);
    --shadow-pop:0 24px 60px -12px rgba(0,0,0,.7);
    --rail:#070805; --rail-2:#11140c;
  }
}
/* ---------- dark: the owner's choice ---------- */
:root[data-theme="dark"]{
  color-scheme: dark;
  --bg:#0b0d08; --surface:#13160e; --surface-2:#1a1e13; --surface-3:#222718;
  --ink:#f2f4e8; --muted:#a4a994; --faint:#858a75;
  --line:#272c1c; --line-2:#3a4029; --field-line:#5f6648;
  --accent-text:#bef264; --accent-soft:#1f2c0d;
  --warn:#f5b942; --warn-soft:#2b220d; --bad:#f58a80; --bad-soft:#2d1512; --info:#8cc4ee; --info-soft:#10202c;
  --hover:rgba(255,255,255,.05); --tint:rgba(255,255,255,.08);
  --shadow:0 1px 0 rgba(0,0,0,.4), 0 18px 40px -22px rgba(0,0,0,.8);
  --shadow-pop:0 24px 60px -12px rgba(0,0,0,.7);
  --rail:#070805; --rail-2:#11140c;
}

/* ---------- inside the rail: the dark values, in both themes ---------- */
.ia-sidebar, .ia-topbar, .ia-tabbar{
  color-scheme: dark;
  --bg:var(--rail); --surface:var(--rail-2); --surface-2:var(--rail-2);
  --ink:var(--rail-ink); --muted:var(--rail-muted); --faint:var(--rail-muted);
  --line:var(--rail-line); --line-2:#3a4029;
  --accent-text:var(--accent); --accent-soft:rgba(163,230,53,.12);
  --hover:rgba(255,255,255,.05); --tint:rgba(255,255,255,.09);
  --shadow-pop:0 20px 50px rgba(0,0,0,.55);
}

/* ---------- the older names, read from the tokens above ----------
   Declared on the rail too, so there they read the rail's values. */
:root, .ia-sidebar, .ia-topbar, .ia-tabbar{
  /* shell.css and ui.css */
  --ia-bg:var(--bg); --ia-panel:var(--surface); --ia-panel2:var(--surface-2); --ia-rail-bg:var(--rail);
  --ia-line:var(--line); --ia-line2:var(--line-2);
  --ia-lime:var(--accent); --ia-lime2:var(--accent-2);   /* lime as a fill: buttons, counts, bars */
  --ia-lime-text:var(--accent-text);                       /* lime as text, icons and lines */
  --ia-dim:var(--accent-soft);
  --ia-ink:var(--ink); --ia-muted:var(--muted); --ia-muted2:var(--faint);
  --ia-warn:var(--warn); --ia-bad:var(--bad); --ia-ok:var(--accent-text);
  --ia-hover:var(--hover); --ia-tint:var(--tint);
  /* neoglass.css (older pages, sign-in) */
  --text:var(--ink); --panel:var(--surface); --surfaceElevated:var(--surface);
  --border:var(--line); --danger:var(--bad); --success:var(--accent-text);
  --cardShadow:var(--shadow); --font-display:var(--display);
  --primary-500:var(--accent); --primary-600:var(--accent-text); --primary-700:var(--accent-text);
}
