/* Kandi — the Knowledge Tree: fonts, palette tokens (light and dark) and the wordmark. Shared by the landing page and
   the platform's shell and login page (served at /css/brand.css). Contrast checked to WCAG AA in both themes (README). */

@font-face {
  font-family: "Kandi Sans";
  src: url("../fonts/BricolageGrotesque-var-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kandi Mono";
  src: url("../fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kandi Mono";
  src: url("../fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f2ea;
  --surface: #fffdf7;
  --surface-2: #ebe8dd;
  --tint: #dcebe3;
  --text: #1a221f;
  --muted: #535d58;
  --border: #dcd7c9;
  --border-strong: #c7c1b1;
  --accent: #0e6b57;
  --accent-hover: #0a5544;
  --on-accent: #ffffff;
  --accent-text: #0e6b57;
  --marker: #d1561f;
  --marker-text: #a8430f;
  --read-a: #0e6b57;
  --read-b: #4a4ea0;
  --read-b-wash: #e6e6f3;
  --read-a-wash: #dcebe3;
  --header-bg: rgba(244, 242, 234, .86);
  --card-glass: rgba(255, 253, 247, .94);
  --sheet-bg: #f4f2ea;
  --shadow-frame: 0 2px 4px rgba(26, 34, 31, .05), 0 24px 60px rgba(26, 34, 31, .13);
  --shadow-sheet: 0 -24px 60px rgba(26, 34, 31, .10);

  /* the dark panels: the same in both themes */
  --code-bg: #101614;
  --code-text: #d8e4dd;
  --code-muted: #93a69c;
  --code-rule: rgba(255, 255, 255, .09);
  --code-k: #7fd6b8;
  --code-s: #e9c48a;
  --code-v: #b8bbf7;
  --code-c: #8a9e95;
  --code-f: #f2a27c;
  --code-border: rgba(127, 214, 184, .26);

  /* the scene, read by js/scene.js */
  --scene-ink: #1a221f;
  --scene-node: #2b3430;
  --scene-acc: #0e7d66;
  --scene-hub: #4a4ea0;
  --scene-issue: #d1561f;
  --scene-paper: #fffdf7;
  --scene-paper-line: #b9b3a3;
  --scene-glow: #0e9b7d;
  --scene-lit: #c2410c;
  --scene-strata: #e7e2d3, #dfd9c8, #e9e4d6, #d9d0b9, #e3ddcd, #dcd5c3, #e6e0d0;
  --scene-pattern: rgba(70, 64, 48, .28);

  --sans: "Kandi Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Kandi Mono", "Kandi Sans", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1180px;
  --r-control: 8px;
  --r-card: 12px;
  --r-frame: 14px;
  --r-panel: 18px;
  --r-band: 22px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c110f; --surface: #141b18; --surface-2: #101614; --tint: #17302a;
  --text: #e8ece7; --muted: #9aa69f; --border: #25302c; --border-strong: #34413c;
  --accent: #4cc4a0; --accent-hover: #74d9b9; --on-accent: #04201a; --accent-text: #5fd0ad;
  --marker: #f0784a; --marker-text: #f28a5e;
  --read-a: #5fd0ad; --read-b: #a9acf2; --read-b-wash: #1c1d33; --read-a-wash: #12271f;
  --header-bg: rgba(12, 17, 15, .86); --card-glass: rgba(20, 27, 24, .94); --sheet-bg: #0c110f;
  --shadow-frame: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 60px rgba(0, 0, 0, .45);
  --shadow-sheet: 0 -24px 60px rgba(0, 0, 0, .5);
  --scene-ink: #cfd8d2; --scene-node: #c2ccc6; --scene-acc: #4cc4a0; --scene-hub: #a9acf2;
  --scene-issue: #f0784a; --scene-paper: #1b2420; --scene-paper-line: #4b5852;
  --scene-glow: #6fe0bd; --scene-lit: #ff9a6b;
  --scene-strata: #121916, #141c18, #111815, #1a2019, #131a17, #161d19, #121815;
  --scene-pattern: rgba(200, 214, 205, .16);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c110f; --surface: #141b18; --surface-2: #101614; --tint: #17302a;
    --text: #e8ece7; --muted: #9aa69f; --border: #25302c; --border-strong: #34413c;
    --accent: #4cc4a0; --accent-hover: #74d9b9; --on-accent: #04201a; --accent-text: #5fd0ad;
    --marker: #f0784a; --marker-text: #f28a5e;
    --read-a: #5fd0ad; --read-b: #a9acf2; --read-b-wash: #1c1d33; --read-a-wash: #12271f;
    --header-bg: rgba(12, 17, 15, .86); --card-glass: rgba(20, 27, 24, .94); --sheet-bg: #0c110f;
    --shadow-frame: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 60px rgba(0, 0, 0, .45);
    --shadow-sheet: 0 -24px 60px rgba(0, 0, 0, .5);
    --scene-ink: #cfd8d2; --scene-node: #c2ccc6; --scene-acc: #4cc4a0; --scene-hub: #a9acf2;
    --scene-issue: #f0784a; --scene-paper: #1b2420; --scene-paper-line: #4b5852;
    --scene-glow: #6fe0bd; --scene-lit: #ff9a6b;
    --scene-strata: #121916, #141c18, #111815, #1a2019, #131a17, #161d19, #121815;
    --scene-pattern: rgba(200, 214, 205, .16);
    color-scheme: dark;
  }
}

/* the wordmark: "Kandi" with a dotless i whose dot is a graph node */
.wm { font: 700 1.5rem/1 var(--sans); letter-spacing: -.035em; font-variation-settings: "opsz" 36; }
.wm-i { position: relative; display: inline-block; }
.wm-i::after { /* the tittle is a graph node */
  content: ""; position: absolute; left: 50%; top: -.06em; width: .2em; height: .2em; margin-left: -.1em;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 .05em var(--bg);
}
.wm-sub { font: 400 .78rem/1 var(--mono); color: var(--muted); letter-spacing: .02em; padding-left: .7rem; border-left: 1px solid var(--border-strong); }
