/* ============================================================
   PermitSignal — base tokens
   Art direction: construction data terminal.
   Industrial ink surfaces, concrete neutrals, one signal-orange accent.
   ============================================================ */

:root {
  /* type scale */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.4rem + 4.2vw, 4.25rem);

  /* spacing (4px base) */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --font-display: 'Archivo', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1240px;
}

/* ---------- dark (default) ---------- */
:root, [data-theme='dark'] {
  --bg: #0F0E0D;
  --surface: #171614;
  --surface-2: #1c1b19;
  --surface-3: #24221f;
  --divider: #262320;
  --border: #2f2c28;
  --border-strong: #423e39;

  --text: #eceae5;
  --text-muted: #a9a29a;
  --text-faint: #938c84;
  --text-inverse: #0F0E0D;

  --accent: #ff6b1a;
  --accent-text: #ff6b1a;
  --accent-solid: #ff6b1a;
  --accent-solid-ink: #0F0E0D;
  --accent-hover: #ff8340;
  --accent-dim: rgba(255, 107, 26, 0.14);
  --accent-line: rgba(255, 107, 26, 0.32);

  --data-1: #ff6b1a;
  --data-2: #5ec8c0;
  --data-3: #8d857b;

  --grid-line: rgba(255, 255, 255, 0.032);
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 32px -12px rgba(0,0,0,.7);
}

/* ---------- light (blueprint / concrete) ---------- */
[data-theme='light'] {
  --bg: #f2f1ed;
  --surface: #fafaf8;
  --surface-2: #f6f5f2;
  --surface-3: #eceae5;
  --divider: #e0ddd7;
  --border: #d3cfc8;
  --border-strong: #b9b4ac;

  --text: #16150F;
  --text-muted: #625d57;
  --text-faint: #66615b;
  --text-inverse: #fafaf8;

  --accent: #d64f00;
  --accent-text: #a83e00;
  --accent-solid: #b84400;
  --accent-solid-ink: #ffffff;
  --accent-hover: #b04100;
  --accent-dim: rgba(214, 79, 0, 0.09);
  --accent-line: rgba(214, 79, 0, 0.26);

  --data-1: #d64f00;
  --data-2: #12796f;
  --data-3: #6e6963;

  --grid-line: rgba(22, 25, 28, 0.045);
  --shadow: 0 1px 2px rgba(22,25,28,.06), 0 12px 28px -14px rgba(22,25,28,.18);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
input { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: -0.024em;
  font-weight: 700;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--accent); color: var(--text-inverse); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* BRAND-GEN:BEGIN -- generated by brand/gen_brand.py from brand/brand.json */
/* DO NOT EDIT BY HAND. Edit brand/brand.json and rerun brand/gen_brand.py. */
/* Appended last on purpose: equal specificity, later wins, so this block
   is the authority and the hand-written :root blocks above are inert. */
:root, [data-theme='dark'] {
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
:root, [data-theme='dark'] {
  --bg: #0F0E0D;
  --surface: #171614;
  --surface-2: #1c1b19;
  --surface-3: #24221f;
  --divider: #262320;
  --border: #2f2c28;
  --border-strong: #423e39;
  --text: #eceae5;
  --text-muted: #a9a29a;
  --text-faint: #938c84;
  --text-inverse: #0F0E0D;
  --accent: #ff6b1a;
  --accent-text: #ff6b1a;
  --accent-solid: #ff6b1a;
  --accent-solid-ink: #0F0E0D;
  --accent-hover: #ff6b1a;
  --accent-dim: rgba(255, 107, 26, 0.1);
  --accent-line: rgba(255, 107, 26, 0.28);
  --pill-rank-bg: #1c1b19;
  --pill-rank-fg: #ffffff;
  --pill-match-bg: #e2efe0;
  --pill-match-fg: #2b6424;
  --pill-cure-bg: #f4e9d0;
  --pill-cure-fg: #6d5010;
  --pill-claimed-bg: #dceee2;
  --pill-claimed-fg: #1c6238;
  --pill-late-bg: #fdeaea;
  --pill-late-fg: #a11b1b;
  --pill-soon-bg: #fdf3e0;
  --pill-soon-fg: #7a5200;
  --pill-far-bg: #e9f5ee;
  --pill-far-fg: #1c6b3f;
  --pill-flat-bg: #eceae5;
  --pill-flat-fg: #4a4741;
  --penalty-bg: #fdecea;
  --penalty-rule: #c0392b;
  --penalty-fg: #a3241a;
  --phone-bg: #fdf2ea;
  --phone-border: #f0cdb4;
  --leverage-bg: #fdf6e8;
  --leverage-border: #ecdcb8;
  --warn-fg: #a3241a;
  --script-bg: #171614;
  --script-fg: #f4f2ee;
  --script-label: #ff8340;
  --script-note: #a9a29a;
}
[data-theme='light'] {
  --bg: #f2f1ed;
  --surface: #fafaf8;
  --surface-2: #f6f5f2;
  --surface-3: #eceae5;
  --divider: #e0ddd7;
  --border: #d3cfc8;
  --border-strong: #b9b4ac;
  --text: #16150F;
  --text-muted: #625d57;
  --text-faint: #66615b;
  --text-inverse: #fafaf8;
  --accent: #d64f00;
  --accent-text: #a83e00;
  --accent-solid: #b84400;
  --accent-solid-ink: #ffffff;
  --accent-hover: #b04100;
  --accent-dim: rgba(214, 79, 0, 0.1);
  --accent-line: rgba(214, 79, 0, 0.28);
  --pill-rank-bg: #1c1b19;
  --pill-rank-fg: #ffffff;
  --pill-match-bg: #e2efe0;
  --pill-match-fg: #2b6424;
  --pill-cure-bg: #f4e9d0;
  --pill-cure-fg: #6d5010;
  --pill-claimed-bg: #dceee2;
  --pill-claimed-fg: #1c6238;
  --pill-late-bg: #fdeaea;
  --pill-late-fg: #a11b1b;
  --pill-soon-bg: #fdf3e0;
  --pill-soon-fg: #7a5200;
  --pill-far-bg: #e9f5ee;
  --pill-far-fg: #1c6b3f;
  --pill-flat-bg: #eceae5;
  --pill-flat-fg: #4a4741;
  --penalty-bg: #fdecea;
  --penalty-rule: #c0392b;
  --penalty-fg: #a3241a;
  --phone-bg: #fdf2ea;
  --phone-border: #f0cdb4;
  --leverage-bg: #fdf6e8;
  --leverage-border: #ecdcb8;
  --warn-fg: #a3241a;
  --script-bg: #171614;
  --script-fg: #f4f2ee;
  --script-label: #ff8340;
  --script-note: #a9a29a;
}
/* BRAND-GEN:END */
