/*
  Orbit design tokens. Figtree is self-hosted (public/fonts): no request to
  Google Fonts, so no visitor IP is sent to a third party.
*/

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Light theme ────────────────────────────────────────── */
:root,
[data-theme="light"] {
  --bg:      #f7f1e8;
  --surface: #fff;
  --row:     #f6eee3;
  --paper:   #fffdf9;
  --ink:     #2b2119;
  --ink2:    #4a3c31;
  --muted:   #5e5045;
  --line:    #dedad5;
  --peach:   #fbe6d6;
  --rose:    #f3dcdc;
  --butter:  #f8eec9;
  --accent:  #e8a67a;
  --on-tint: #2b2119;
  --on-ink:  #fdf9f3;
  --good:    #24613b;
  --good-bg: #dcebd8;
  --bad:     #9a2f25;
  --bad-bg:  #f5d6d1;
  --bar:     #e2d9f3;
  --bar-hi:  #8b76c6;
  --primary:    var(--ink);
  --on-primary: var(--on-ink);
  --card-shadow: 0 0 0 1px #e6e2dd, 0 1px 2px rgba(60, 40, 20, .04);
  --float: 0 20px 40px -20px rgba(60, 40, 20, .35), 0 0 0 1px #dedad5;
}

/* ── Dark theme ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:      #141416;
  --surface: #1f1f22;
  --row:     #28282c;
  --paper:   #1a1a1d;
  --ink:     #f4f2ee;
  --ink2:    #d4d2cd;
  --muted:   #a9a7a2;
  --line:    #35353a;
  --accent:  #f8b98a;
  --on-tint: #33281f;
  --on-ink:  #33281f;
  --good:    #b7e4c4;
  --good-bg: rgba(183, 228, 196, .12);
  --bad:     #f5b0a6;
  --bad-bg:  rgba(245, 176, 166, .13);
  --bar:     #a99bd2;
  --bar-hi:  #e6defa;
  --primary:    #d4c7f5;
  --on-primary: #211a33;
  --card-shadow: none;
  --float: 0 24px 48px -18px rgba(0, 0, 0, .6), 0 0 0 1px #35353a;
}

/* ── Older names, still used by the admin page ──────────── */
:root,
[data-theme] {
  --text:     var(--ink);
  --text2:    var(--ink2);
  --surface2: var(--row);
  --border:   var(--line);
  --border2:  var(--line);
  --green:    var(--good);
  --green-bg: var(--good-bg);
  --red:      var(--bad);
  --red-bg:   var(--bad-bg);
  --accent-lt:     var(--row);
  --accent-border: var(--line);

  --font-body: 'Figtree', system-ui, sans-serif;
}
