/* ==========================================================
   base.css
   Design tokens (CSS variables), reset, and base typography.
   Change colors/spacing here — other stylesheets only
   reference these variables.
   ========================================================== */

:root {
    /* Surfaces — deep slate/navy foundation */
    --bg: #0a0e14;
    --panel: #10151d;
    --panel-2: #161c26;
    --panel-translucent: rgba(16, 21, 29, 0.72);
    --border: #232b38;
    --border-subtle: #1a212c;

    /* Text */
    --text: #e8ebf1;
    --muted: #8b94a5;
    --faint: #5d6678;

    /* Signals — purple primary accent */
    --accent: #8b5cf6;
    --accent-strong: #a78bfa;
    --accent-soft: rgba(139, 92, 246, 0.14);
    --accent-contrast: #ffffff;
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);

    /* Shape & spacing */
    --radius: 10px;
    --radius-sm: 7px;
    --radius-pill: 999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    /* Type */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Roboto Mono", monospace;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.5rem;
    --text-stat: 2rem;

    /* Controls */
    --touch-target: 44px;
    --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
    --transition: 150ms ease;
    --elevation-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    /* Faint ambient glow behind the app — decorative only. */
    background-image: radial-gradient(1100px 480px at 70% -10%, rgba(139, 92, 246, 0.07), transparent 70%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, p {
    margin: 0;
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

code,
.mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* Hide visually but keep available to scripts */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
