/* AppCaddy shared design tokens — single source of truth for type, color, spacing, radius. */
/* Link this file FIRST (before the page's own stylesheet) in every HTML surface. */
/* v2. Fonts are self-hosted in ./fonts so no surface calls a third-party CDN. */
/* These are variable fonts: one woff2 per family and subset spans the weight range. */
/* latin and latin-ext only; other scripts fall back through the stacks below. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/DMSans-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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/DMSans-LatinExt.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSans-Italic-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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSans-Italic-LatinExt.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-LatinExt.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/Syne-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;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/Syne-LatinExt.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Primitive palette (light) */
  --ac-canvas: #F4F5F4;
  --ac-ink: #141414;
  --ac-accent: #3D7575;
  --ac-accent-hover: #2C5858;
  --ac-accent-tint: #EAF1F1;
  --ac-muted: #5E5E5E;
  --ac-border: #E0E2E0;
  --ac-code-bg: #EDEDEF;
  --ac-up: #3A7A4A;
  --ac-down: #9B3A3A;
  --ac-info: #3060A0;
  --ac-warning: #A07A20;

  /* Semantic */
  --ac-bg: var(--ac-canvas);
  --ac-fg: var(--ac-ink);
  --ac-surface: #FFFFFF;
  --ac-surface-2: var(--ac-canvas);

  /* Type */
  --ac-font-display: "Syne", "DM Sans", -apple-system, sans-serif;
  --ac-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --ac-font-code: "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

  /* Spacing scale (4px base) */
  --ac-space-1: 4px;
  --ac-space-2: 8px;
  --ac-space-3: 12px;
  --ac-space-4: 16px;
  --ac-space-6: 24px;
  --ac-space-8: 32px;
  --ac-space-12: 48px;
  --ac-space-16: 64px;

  /* Radius */
  --ac-radius-card: 6px;
  --ac-radius-button: 6px;
  --ac-radius-tag: 4px;
  --ac-radius-input: 4px;

  /* Motion */
  --ac-transition: 160ms ease-out;
}

/* Dark — forced via [data-theme="dark"] on <html> or <body> */
[data-theme="dark"] {
  --ac-canvas: #141414;
  --ac-ink: #EBEBEB;
  --ac-accent: #5FA8A8;
  --ac-accent-hover: #6FB8B8;
  --ac-accent-tint: #1A2E2E;
  --ac-muted: #9E9E9E;
  --ac-border: #252525;
  --ac-code-bg: #1E1E1E;
  --ac-up: #5FA877;
  --ac-down: #C46A6A;
  --ac-surface: #1E1E1E;
  --ac-surface-2: #191919;
}

/* Dark — automatic when the user has not explicitly forced a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --ac-canvas: #141414;
    --ac-ink: #EBEBEB;
    --ac-accent: #5FA8A8;
    --ac-accent-hover: #6FB8B8;
    --ac-accent-tint: #1A2E2E;
    --ac-muted: #9E9E9E;
    --ac-border: #252525;
    --ac-code-bg: #1E1E1E;
    --ac-up: #5FA877;
    --ac-down: #C46A6A;
    --ac-surface: #1E1E1E;
    --ac-surface-2: #191919;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --ac-transition: 100ms ease-out; }
}
