/* Kernel Systems Academy — KSA Terminal Design Tokens (ksa-tokens.css) */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Mono";
  src: url("fonts/NotoSansMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Mono";
  src: url("fonts/NotoSansMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-prose: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-sans: var(--font-prose);
  --font-mono: 'Noto Sans Mono', 'DejaVu Sans Mono', ui-monospace, monospace;
  --term-bg: #16181D;
  --term-bar: #23262E;
  --term-edge: #0B0C0F;
  --term-fg: #E6E8EC;
  --term-dim: #9AA2AF;
  --term-grid: #6A7180;
  --term-hl: #2A2F3A;
  --term-bright: #FFFFFF;
  --term-title: #C9CED6;
  --term-control: #353A45;
  --term-hover: #2F333D;
  --term-badge-bg: #8AB4FF;
  --term-badge-fg: #0B1220;
  --ansi-black: #9AA2AF;
  --ansi-red: #F47A7A;
  --ansi-green: #8AE234;
  --ansi-yellow: #FCE94F;
  --ansi-blue: #729FCF;
  --ansi-magenta: #E58FE5;
  --ansi-cyan: #5FD7FF;
  --ansi-white: #E6E8EC;
  --ansi-purple: #C397D8;
  --ansi-br-black: #9AA2AF;
  --ansi-br-red: #FF9E98;
  --ansi-br-green: #B5F27A;
  --ansi-br-yellow: #FFF59A;
  --ansi-br-blue: #A6C8F2;
  --ansi-br-magenta: #F5B8F5;
  --ansi-br-cyan: #A2E9FF;
  --ansi-br-white: #FFFFFF;
  --radius-window: 10px;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-tag: 4px;
  --topbar-h: 52px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --prose-size: 18px;
  --prose-leading: 1.7;
  --prose-measure: 32em;
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F3F1EC;
  --text: #1C1F24;
  --text-2: #454C59;
  --text-3: #5F6775;
  --border: #D9D3C7;
  --border-strong: #848A95;
  --accent: #1F5BC4;
  --accent-hover: #17489C;
  --on-accent: #FFFFFF;
  --code-bg: #ECEAE4;
  --code-border: #DDD8CD;
  --prompt-user: #1F7A44;
  --prompt-path: #1F5BC4;
  --note: #1F5BC4;
  --note-bg: #E9F0FB;
  --hint: #1F7A44;
  --hint-bg: #E7F3EB;
  --warning: #9C2A8E;
  --warning-bg: #F8EAF5;
  --error: #B42318;
  --error-bg: #FCEAEA;
  --mark: #FFF0A8;
  --tip: #1F7A44;
  --tip-bg: #E7F3EB;
  --warn: #9C2A8E;
  --warn-bg: #F8EAF5;
  --danger: #B42318;
  --danger-bg: #FCEAEA;
  --syn-keyword: #8A2BB8;
  --syn-type: #0B6688;
  --syn-string: #246B2D;
  --syn-number: #9A4A06;
  --syn-comment: #5F6775;
  --syn-function: #1F5BC4;
  --syn-macro: #B3261E;
  --window-edge: var(--term-edge);
  --window-shadow: 0 1px 2px rgba(11, 12, 15, 0.10), 0 14px 34px rgba(11, 12, 15, 0.22);
  --shadow-popover: 0 8px 24px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  --tree-current-bg: var(--term-bg);
  --primary-border: var(--term-bg);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1013;
  --surface: #15181D;
  --surface-2: #1C2026;
  --text: #E6E8EC;
  --text-2: #BCC3CE;
  --text-3: #9AA2AF;
  --border: #2E333B;
  --border-strong: #6E7685;
  --accent: #8AB4FF;
  --accent-hover: #A9C7FF;
  --on-accent: #0B1220;
  --code-bg: #1C2026;
  --code-border: #2E333B;
  --prompt-user: #6FD39A;
  --prompt-path: #8AB4FF;
  --note: #8AB4FF;
  --note-bg: #172238;
  --hint: #6FD39A;
  --hint-bg: #13261C;
  --warning: #E58FE5;
  --warning-bg: #2A1529;
  --error: #FF8A80;
  --error-bg: #2E1716;
  --mark: #3E350F;
  --tip: #6FD39A;
  --tip-bg: #13261C;
  --warn: #E58FE5;
  --warn-bg: #2A1529;
  --danger: #FF8A80;
  --danger-bg: #2E1716;
  --syn-keyword: #D2A8FF;
  --syn-type: #7CCFE8;
  --syn-string: #9BD89B;
  --syn-number: #F5B97A;
  --syn-comment: #9AA2AF;
  --syn-function: #8AB4FF;
  --syn-macro: #FF9B8F;
  --window-edge: #2E333B;
  --window-shadow: none;
  --shadow-popover: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --tree-current-bg: var(--term-hl);
  --primary-border: #6E7685;
}

[data-theme="sepia"] {
  color-scheme: light;
  --bg: #F5EEDC;
  --surface: #FBF6EA;
  --surface-2: #EDE3CC;
  --text: #2E2618;
  --text-2: #4D4230;
  --text-3: #62553E;
  --border: #CDBF9F;
  --border-strong: #857659;
  --accent: #1D539C;
  --accent-hover: #16427D;
  --on-accent: #FFFFFF;
  --code-bg: #EDE3CC;
  --code-border: #CDBF9F;
  --prompt-user: #2D6A2F;
  --prompt-path: #1D539C;
  --note: #1D539C;
  --note-bg: #E6E6E0;
  --hint: #2D6A2F;
  --hint-bg: #E6EBD3;
  --warning: #8A2378;
  --warning-bg: #F1E0E8;
  --error: #A3221A;
  --error-bg: #F3DCCF;
  --mark: #F7E08A;
  --tip: #2D6A2F;
  --tip-bg: #E6EBD3;
  --warn: #8A2378;
  --warn-bg: #F1E0E8;
  --danger: #A3221A;
  --danger-bg: #F3DCCF;
  --syn-keyword: #7A2AA0;
  --syn-type: #0A5C7A;
  --syn-string: #2D6A2F;
  --syn-number: #8E4708;
  --syn-comment: #62553E;
  --syn-function: #1D539C;
  --syn-macro: #A3221A;
  --window-edge: var(--term-edge);
  --window-shadow: 0 1px 2px rgba(46, 38, 24, 0.12), 0 14px 34px rgba(46, 38, 24, 0.20);
  --shadow-popover: 0 8px 24px rgba(46, 38, 24, 0.16), 0 2px 6px rgba(46, 38, 24, 0.08);
  --tree-current-bg: var(--term-bg);
  --primary-border: var(--term-bg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0E1013;
    --surface: #15181D;
    --surface-2: #1C2026;
    --text: #E6E8EC;
    --text-2: #BCC3CE;
    --text-3: #9AA2AF;
    --border: #2E333B;
    --border-strong: #6E7685;
    --accent: #8AB4FF;
    --accent-hover: #A9C7FF;
    --on-accent: #0B1220;
    --code-bg: #1C2026;
    --code-border: #2E333B;
    --prompt-user: #6FD39A;
    --prompt-path: #8AB4FF;
    --note: #8AB4FF;
    --note-bg: #172238;
    --hint: #6FD39A;
    --hint-bg: #13261C;
    --warning: #E58FE5;
    --warning-bg: #2A1529;
    --error: #FF8A80;
    --error-bg: #2E1716;
    --mark: #3E350F;
    --tip: #6FD39A;
    --tip-bg: #13261C;
    --warn: #E58FE5;
    --warn-bg: #2A1529;
    --danger: #FF8A80;
    --danger-bg: #2E1716;
    --syn-keyword: #D2A8FF;
    --syn-type: #7CCFE8;
    --syn-string: #9BD89B;
    --syn-number: #F5B97A;
    --syn-comment: #9AA2AF;
    --syn-function: #8AB4FF;
    --syn-macro: #FF9B8F;
    --window-edge: #2E333B;
    --window-shadow: none;
    --shadow-popover: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    --tree-current-bg: var(--term-hl);
    --primary-border: #6E7685;
  }
}
