/* base.css — reset, tokens, typography, ambient gradients (suite-shared vocabulary).
 *
 * DARK ONLY (REQ-SENTIA-073, T-051). The Selarys suite has ONE palette: every sibling
 * app carries this same token block on :root — no toggle, no theme attribute on the
 * root element, no light fork behind a colour-scheme media query, and no stored
 * preference. Sentia's light theme was the only one in the org and is
 * superseded by the operator ruling of 2026-08-12 — per-app theming forks a platform
 * decision. The capability returns only with a platform-wide light/dark programme.
 *
 * The core token values are the suite's, not Sentia's (freshest reference:
 * Spectral/public/css/base.css). Sentia's own vocabulary — the tokens that carry
 * MEANING in this app, `--measured` and `--simulated` — is kept and MAPPED onto the
 * suite palette, because an app whose deliverable is a measurement must be able to say
 * "this figure was collected" and "this figure was generated" in colour, and those two
 * must never be confusable (audience-integrity.md).
 *
 * No webfont is loaded: the artifact is self-contained and the server's CSP is strict
 * (`default-src 'self'`), so the suite's Outfit/Inter are named first and the platform
 * stack carries the render when they are not installed.
 */

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

:root {
    color-scheme: dark;

    /* Surfaces — the suite's three depths, plus Sentia's raised surface. */
    --void:      #06070d;
    --deep:      #0e1018;
    --surface:   #161a24;
    --surface-2: #1c2130;

    /* Signal — the suite's Aurora triad, its warning, and its error. */
    --cyan:    #00c8ff;
    --violet:  #7850ff;
    --mint:    #00ffb4;
    --warning: #ffaa30;
    --error:   #ff4466;

    /* Sentia's meaning-carrying tokens, mapped onto the suite palette.
       MEASURED is the mint the suite already reads as "real"; SIMULATED is a violet,
       never a green and never a success colour (audience-integrity.md §Fidelity). */
    --accent:    var(--cyan);
    --accent-2:  var(--violet);
    --measured:  var(--mint);
    --simulated: #a78bff;

    /* Type */
    --text:       #e0e8f0;
    --text-muted: #6a7a8a;
    --text-dim:   #3a4a5a;

    /* Lines + light */
    --border:        rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-focus:  rgba(0, 200, 255, 0.25);
    --focus:         rgba(0, 200, 255, 0.45);
    --card-shadow:   0 10px 30px rgba(0, 0, 0, 0.35);

    --font-display: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                    Roboto, Helvetica, Arial, sans-serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --radius: 10px;
    --radius-sm: 6px;
}

body {
    background: var(--void);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* The ambient wash — the family's signature. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0, 180, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(120, 80, 255, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(0, 255, 180, 0.015) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* The suite chrome refines this in app-shell.css (`#header.app-header`); this is the
   shared base every app's header starts from. */
#header {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--deep);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1;
    position: relative;
}

h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 0.95rem; }

p { color: var(--text-muted); }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

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

button {
    font-family: var(--font-ui);
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text);
}

input, select, textarea {
    font-family: var(--font-ui);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--border-focus); }

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

/* Motion is a preference, not a decoration. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
