/* 10Scan LiveScan: tokens, reset, typography (docs/DESIGN.md). Dark only in Phase 1. */

/* Local fallback with Inter's metrics so the swap to Inter (display=swap) does not shift layout. */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial'), local('Helvetica');
    ascent-override: 90.2%;
    descent-override: 22.48%;
    line-gap-override: 0%;
    size-adjust: 107.4%;
}

:root {
    color-scheme: dark;

    /* surfaces */
    --bg: #0B0D10;
    --bg-raised: #12151A;
    --bg-card: #1A1D23;
    --bg-inset: #0F1115;
    --border: #2A2F38;
    --border-strong: #3A414D;

    /* brand */
    --brand: #13EF95;
    --brand-dim: #0FBF78;
    --brand-ink: #062A1C;
    --accent: #149AFB;
    --gradient: linear-gradient(90deg, #149AFB, #13EF95);

    /* text */
    --text: #F2F4F7;
    --text-secondary: #B6BDC9;
    --text-muted: #8B94A3;
    --text-link: #5DB8FF;

    /* semantic */
    --ok: #2FE39C;
    --ok-bg: #0F2A20;
    --warn: #FFC94D;
    --warn-bg: #2E2410;
    --danger: #FF6B6B;
    --danger-bg: #331616;
    --info: #5DB8FF;
    --info-bg: #0F2233;

    /* NFIQ 2 bands */
    --nfiq-excellent: #2FE39C;
    --nfiq-good: #7BE495;
    --nfiq-fair: #FFC94D;
    --nfiq-poor: #FF9F43;
    --nfiq-bad: #FF6B6B;

    --font-sans: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-pill: 999px;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .35);
    --focus: 0 0 0 3px rgba(19, 239, 149, .45);
    --container-max: 1200px;
    --section-px: 20px;
    --touch: 48px;

    /* type scale */
    --fs-12: 0.75rem;
    --fs-14: 0.875rem;
    --fs-16: 1rem;
    --fs-18: 1.125rem;
    --fs-20: 1.25rem;
    --fs-24: 1.5rem;
    --fs-30: 1.875rem;
    --fs-38: 2.375rem;
    --fs-48: 3rem;

    /* spacing scale */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-12: 48px;
    --sp-16: 64px;
}

@media (min-width: 768px) {
    :root {
        --section-px: 32px;
    }
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-16);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Operators stand at arm's length: 18 px inside /app (DESIGN.md, typography). */
body.app {
    font-size: var(--fs-18);
}

img,
svg {
    display: inline-block;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 var(--sp-3);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

h1 {
    font-size: var(--fs-38);
}

h2 {
    font-size: var(--fs-30);
}

h3 {
    font-size: var(--fs-20);
}

h4,
.h4 {
    font-size: var(--fs-18);
}

@media (min-width: 768px) {
    h1 {
        font-size: var(--fs-48);
    }
}

p {
    margin: 0 0 var(--sp-4);
    max-width: 70ch;
}

ul,
ol {
    margin: 0 0 var(--sp-4);
    padding-left: 1.25em;
}

a {
    color: var(--text-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Links inside running text are told apart by more than colour (WCAG 1.4.1). */
p a:not(.btn),
dd a:not(.btn),
.need-card a,
.faq-item a,
.content-page li a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    text-decoration-color: rgba(93, 184, 255, .55);
}

code,
.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.95em;
}

strong {
    font-weight: 600;
}

address {
    font-style: normal;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
    border-radius: var(--radius-sm);
}

/* FocusOnNavigate moves focus to the page heading; the ring belongs on controls, not on text. */
h1[tabindex="-1"]:focus-visible {
    box-shadow: none;
}

/* Anchored sections stop below the sticky public header. */
[id] {
    scroll-margin-top: 88px;
}

::selection {
    background: rgba(19, 239, 149, .35);
}

.eyebrow {
    margin: 0 0 var(--sp-2);
    font-size: var(--fs-14);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}

.lead {
    font-size: var(--fs-18);
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .lead {
        font-size: var(--fs-20);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
