/* Shared palette, type, and the two ambient layers every page sits on.
   Taken from the mockups: a darkroom blue with a grain overlay, so the
   background reads as emulsion rather than as a gradient. */

:root {
    --ink: #06121F;
    --deep: #0B2038;
    --mid: #14395F;
    --surface-2: #0E2843;
    --line: #1E4A76;
    --line-soft: rgba(27, 66, 112, .55);
    --accent: #4C9AFF;
    --accent-dim: #2E6FC4;
    --paper: #E6EEF8;
    --muted: #7E9BBC;
    --dim: #5B7695;
    --ok: #4FD1A5;
    --warn: #FFC46B;
    --bad: #FF8E6E;

    --font-display: "Bricolage Grotesque", system-ui, sans-serif;
    --font-body: "Inter Tight", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    --r: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

/* Grain. Inline SVG turbulence rather than an image request, so it costs
   nothing and cannot fail to load. */
.grain::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
    opacity: .14;
    mix-blend-mode: overlay;
}

a {
    color: var(--accent);
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* NFR-3.2 - one rule, applied everywhere, no exceptions per page. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Shared inline monospace, for reference codes and identifiers. */
.mono {
    font-family: var(--font-mono);
    font-size: .92em;
    letter-spacing: .04em;
    color: var(--paper);
}
