/* Ecran Design System — design tokens + minimal reset.
   The single source of truth for color/space/type. Other stylesheets consume
   these variables and must not hardcode hex values. */

:root {
  /* Surfaces */
  --bg-primary:#faf9f7; --bg-secondary:#f3f1ed; --bg-card:#ffffff;
  --bg-glass:rgba(250,249,247,0.92); --bg-sidebar:#e4e1da;

  /* Text */
  --text-primary:#191918; --text-secondary:#4a4a48; --text-muted:#8b8b89; --text-light:#b0b0ae;

  /* Accents — terracotta is the brand color */
  --accent-primary:#c4704b; --accent-primary-light:#d4896a; --accent-primary-hover:#b35f3c;
  --accent-blue:#5b7a9e; --accent-green:#5a8a72; --accent-yellow:#b8943d;
  --accent-red:#c25e5e; --accent-purple:#8b7aab;

  /* Borders */
  --border-light:#e8e5e1; --border-medium:#d5d1cb;

  /* Shadows — very subtle */
  --shadow-sm:0 1px 2px rgba(0,0,0,.03); --shadow-md:0 2px 8px rgba(0,0,0,.05);
  --shadow-lg:0 4px 16px rgba(0,0,0,.06); --shadow-card:0 1px 3px rgba(0,0,0,.04);

  /* Radius */
  --radius-sm:6px; --radius-md:8px; --radius-lg:12px; --radius-xl:16px; --radius-full:9999px;

  /* Transitions */
  --transition-fast:150ms ease; --transition-base:200ms ease; --transition-slow:300ms ease;
  --dur:160ms; --ease:cubic-bezier(.2,.6,.2,1);

  /* Layout */
  --sidebar-width:260px; --sidebar-collapsed-width:72px; --topbar-height:60px;
  --content-max:1280px;

  /* Fonts */
  --font-serif:'Source Serif 4',Georgia,serif;
  --font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --font-mono:'JetBrains Mono','Fira Code','Consolas',monospace;

  /* Type scale */
  --text-xs:12px; --text-sm:13px; --text-base:14px; --text-lg:16px;
  --text-xl:20px; --text-2xl:26px; --text-3xl:32px;

  /* Spacing scale */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:24px; --space-6:32px; --space-7:40px; --space-8:48px;

  /* Chart aliases (read by charts.js via getComputedStyle) */
  --chart-1:var(--accent-primary); --chart-2:var(--accent-blue); --chart-3:var(--accent-green);
  --chart-4:var(--accent-purple); --chart-5:var(--accent-yellow); --chart-grid:var(--border-light);

  /* Status semantics */
  --status-ontrack:var(--accent-green); --status-atrisk:var(--accent-yellow); --status-breached:var(--accent-red);
}

/* --- Minimal reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-primary) 55%, transparent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.mono { font-family: var(--font-mono); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bg-card); color: var(--text-primary);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
