/* Kortix tokens for opensourceclaudecowork.com — "The Operator's Handbook".
   Same token names as the kit's generated tokens.css, retuned for this site's own palette
   (spec: data/briefs/opensourceclaudecowork.com-design-spec.md). This is the ONLY file with
   colour literals. Light is the default; dark follows prefers-color-scheme, or
   [data-theme="dark"] forces it. The site accent is the inline :root override in the head
   (--kortix-base / --ring), which wins over the values here. */

:root {
  color-scheme: light;
  --background: #ffffff;
  --pane: #ffffff;
  --surface: #fafbfd;
  --foreground: #16181d;
  --foreground-strong: #16181d;
  --foreground-weak: #565b66;
  --card: #f4f6f9;
  --card-foreground: #16181d;
  --popover: #ffffff;
  --popover-foreground: #16181d;
  --primary: #16181d;
  --primary-foreground: #ffffff;
  --secondary: #e9edf3;
  --secondary-foreground: #16181d;
  --muted: #e9edf3;
  --muted-foreground: #565b66;
  --accent: #f4f6f9;
  --accent-foreground: #16181d;
  --destructive: #e7000b;
  --destructive-foreground: #fafafa;
  --border: #dfe3ea;
  --input: #e4e8ee;
  --ring: #1e3a8a;
  --hover: rgb(22 24 29 / 0.05);
  --active: rgb(22 24 29 / 0.08);
  --kortix-base: #1e3a8a;
  --kortix-green: #199338;
  --kortix-red: #f14b4c;
  --kortix-orange: #d18b19;
  --kortix-yellow: #cca300;
  --kortix-blue: #2b91f7;
  --kortix-purple: #ab80d6;
  --terminal-surface: #101218;
  --terminal-caption: #181b24;
  --terminal-row: rgb(230 233 239 / 0.14);
  --terminal-ink: #e6e9ef;
  --terminal-strong: #f4f6f9;
  --terminal-cap: #9aa5b5;
  --terminal-flag: #b9c2d0;
  --ok-row: rgb(25 147 56 / 0.16);
  --no-row: rgb(241 75 76 / 0.16);
  --font-sans-system: ui-sans-serif, -apple-system, 'Segoe UI', 'Helvetica Neue', 'Noto Sans', sans-serif;
  --font-mono-system: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --tracking-tight: -0.025em;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-relaxed: 1.625;
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: 1rem;
  --spacing: 0.23rem;
  --text-xs: 0.8125rem;
  --text-xs-line-height: calc(1 / 0.8125);
  --text-sm: 0.875rem;
  --text-sm-line-height: calc(1.25 / 0.875);
  --text-base: 1rem;
  --text-base-line-height: calc(1.5 / 1);
  --text-lg: 1.125rem;
  --text-lg-line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;
  --text-xl-line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;
  --text-2xl-line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem;
  --text-3xl-line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem;
  --text-4xl-line-height: calc(2.5 / 2.25);
  --text-5xl: 3rem;
  --text-5xl-line-height: 1;
  --text-6xl: 3.75rem;
  --text-6xl-line-height: 1;
  --duration-fast: 100ms;
  --duration-normal: 150ms;
  --duration-moderate: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
  --ease-default: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-xs: 0 1px 2px 0 rgb(16 18 24 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(16 18 24 / 0.08), 0 1px 2px -1px rgb(16 18 24 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(16 18 24 / 0.08), 0 2px 4px -2px rgb(16 18 24 / 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0c0e14;
  --pane: #0c0e14;
  --surface: #111318;
  --foreground: #e8eaf0;
  --foreground-strong: #f4f5f8;
  --foreground-weak: #9aa1ae;
  --card: #161920;
  --card-foreground: #e8eaf0;
  --popover: #171a21;
  --popover-foreground: #e8eaf0;
  --primary: #e8eaf0;
  --primary-foreground: #101218;
  --secondary: #1e222a;
  --secondary-foreground: #e8eaf0;
  --muted: #1e222a;
  --muted-foreground: #9aa1ae;
  --accent: #161920;
  --accent-foreground: #e8eaf0;
  --destructive: #ff6467;
  --destructive-foreground: #fafafa;
  --border: #262b34;
  --input: #1e222a;
  --hover: rgb(232 234 240 / 0.07);
  --active: rgb(232 234 240 / 0.11);
  --terminal-border: rgb(230 233 239 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #0c0e14;
    --pane: #0c0e14;
    --surface: #111318;
    --foreground: #e8eaf0;
    --foreground-strong: #f4f5f8;
    --foreground-weak: #9aa1ae;
    --card: #161920;
    --card-foreground: #e8eaf0;
    --popover: #171a21;
    --popover-foreground: #e8eaf0;
    --primary: #e8eaf0;
    --primary-foreground: #101218;
    --secondary: #1e222a;
    --secondary-foreground: #e8eaf0;
    --muted: #1e222a;
    --muted-foreground: #9aa1ae;
    --accent: #161920;
    --accent-foreground: #e8eaf0;
    --destructive: #ff6467;
    --destructive-foreground: #fafafa;
    --border: #262b34;
    --input: #1e222a;
    --hover: rgb(232 234 240 / 0.07);
    --active: rgb(232 234 240 / 0.11);
    --terminal-border: rgb(230 233 239 / 0.12);
  }
}

/* Site additions (not in the kit). */
:root {
  /* Caption ink on the page ground (figure captions, product labels, the sign-off strip,
     the footer date line). It is --foreground-weak: 6.8:1 on white, 6.6:1 on --surface.
     --terminal-cap stays inside the dark plates only, where it reads 7.5:1 on the ink. */
  --caption-ink: var(--foreground-weak);
  /* The accent as a glyph or link on the page ground. Dark: mixed toward the ink. */
  --kortix-base-ink: var(--kortix-base);
  /* The filled thumb-tab and check squares. */
  --tab-bg: var(--kortix-base-ink);
  --tab-ink: #ffffff;
  /* Solid CTA surfaces. */
  --cta-bg: var(--kortix-base-ink);
  --cta-ink: #ffffff;
  /* The accent at rest on hairlines and rules. */
  --rule-accent: var(--kortix-base-ink);
  --transparent: transparent;
  --mask-solid: #000;
  /* Large framed previews (the marketing column allows shadow-2xl on large previews). */
  --shadow-frame: 0 24px 48px -20px rgb(16 18 24 / 0.28);
  --shadow-card: 0 8px 24px -12px rgb(16 18 24 / 0.16);
}
:root[data-theme="dark"] {
  --kortix-base-ink: color-mix(in oklab, var(--kortix-base) 55%, #ffffff);
  --tab-ink: #101218;
  --cta-ink: #101218;
  --shadow-frame: 0 24px 48px -20px rgb(0 0 0 / 0.7);
  --shadow-card: 0 8px 24px -12px rgb(0 0 0 / 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --kortix-base-ink: color-mix(in oklab, var(--kortix-base) 55%, #ffffff);
    --tab-ink: #101218;
    --cta-ink: #101218;
    --shadow-frame: 0 24px 48px -20px rgb(0 0 0 / 0.7);
    --shadow-card: 0 8px 24px -12px rgb(0 0 0 / 0.6);
  }
}
