/* Tokens — functionalist system */

:root {
  /* Content */
  --cnt-primary: #1a1a1a;
  --cnt-secondary: #555555;
  --cnt-tertiary: #888888;
  --cnt-accent: #4a7c59;
  --cnt-accent-hover: #3a6347;
  --cnt-on-bold: #ffffff;

  /* Background */
  --bg-main: #ffffff;
  --bg-alternative: #f5f5f5;
  --bg-accent-soft: rgba(74, 124, 89, 0.1);
  --bg-accent-bold: #4a7c59;
  --bg-accent-bold-hover: #3a6347;
  --bg-frosted: rgba(255, 255, 255, 0.88);


  /* Border */
  --brd-main: #e5e5e5;
  --brd-alternative: #d0d0d0;
  --brd-accent: #4a7c59;

  /* Page background */
  --pagebg-main: #ffffff;
  --pagebg-alternative: #f5f5f5;

  /* Typography */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', 'Fira Code', 'Fira Mono', monospace;

  --font-size-sm: 0.8125rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.1875rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.65;

  /* Spacing — 8px grid */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --content-width: 740px;

  /* Transition */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 400ms ease;

  /* Physical surfaces */
  --raised-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --raised-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --raised-shadow-active: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --inset-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  --groove-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  --surface-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --panel-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --groove-line: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 0 rgba(255, 255, 255, 0.5);
  --stamped-text: 0 1px 0 rgba(255, 255, 255, 0.5);


  /* Cursor states */
  --cursor-fill: var(--bg-accent-soft);
  --cursor-border: var(--brd-accent);
}


/* Dark */
[data-theme="dark"] {
  --cnt-primary: #e5e5e5;
  --cnt-secondary: #999999;
  --cnt-tertiary: #666666;
  --cnt-accent: #5a9a6e;
  --cnt-accent-hover: #6db383;
  --cnt-on-bold: #111111;

  --bg-main: #181818;
  --bg-alternative: #222222;
  --bg-accent-soft: rgba(90, 154, 110, 0.1);
  --bg-accent-bold: #5a9a6e;
  --bg-accent-bold-hover: #6db383;

  --brd-main: #2a2a2a;
  --brd-alternative: #333333;
  --brd-accent: #5a9a6e;

  --pagebg-main: #111111;
  --pagebg-alternative: #181818;

  --bg-frosted: rgba(17, 17, 17, 0.88);

  --raised-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --raised-shadow-hover: 0 1px 2px rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --raised-shadow-active: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --inset-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --groove-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  --surface-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --panel-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --groove-line: 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 0 rgba(255, 255, 255, 0.03);
  --stamped-text: 0 1px 0 rgba(0, 0, 0, 0.3);
}
