/* Bindscript - foundation tokens.
   Dark-first. Radius 0. Colour only ever carries meaning.
   The fonts are in this package (fonts/, OFL). The app runs beside a sim,
   often offline, so it must not fetch its typeface from a font service.
   The font URLs are relative, so a bundler copies the faces with the CSS. */

@font-face{font-family:"B612";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/b612-400.woff2) format("woff2")}
@font-face{font-family:"B612";font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/b612-700.woff2) format("woff2")}
@font-face{font-family:"B612 Mono";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/b612mono-400.woff2) format("woff2")}
@font-face{font-family:"B612 Mono";font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/b612mono-700.woff2) format("woff2")}

:root{
/* ── Type families ───────────────────────────────────────── */
--bs-font-ui:"B612",system-ui,sans-serif;                 /* names, headings, prose */
--bs-font-mono:"B612 Mono",ui-monospace,monospace;        /* targets, values, codes, units, labels */

/* ── Type scale ──────────────────────────────────────────── */
--bs-text-label:9.5px;      /* SectionLabel - mono, uppercase, .2em */
--bs-text-micro:10px;       /* meta / notes - mono */
--bs-text-code:10.5px;      /* raw targets: K:AXIS_AILERONS_SET */
--bs-text-ui:12.5px;        /* controls, Field text */
--bs-text-body:13.5px;      /* row names - ui 700 */
--bs-text-value:15px;       /* in-row live values - mono */
--bs-text-title:16px;       /* overlay/surface heading - ui 700. Every modal, sheet
                               and action-sheet heading, so no call site re-decides. */
--bs-text-hero:19px;        /* page titles */
--bs-text-lead:26px;        /* screen subject */
--bs-text-display:40px;     /* single glanceable live value */
--bs-track-label:.2em;
--bs-track-code:.02em;
--bs-track-display:-.015em;
--bs-leading-tight:1.05;
--bs-leading-body:1.5;
/* B612 ships 400 and 700 only - there is no medium. Emphasis is 700 or mono, never 500. */
--bs-weight-regular:400;
--bs-weight-bold:700;

/* ── Colour · surfaces ──────────────────────────────────── */
--bs-field:#05070a;         /* Page canvas. Carries the blueprint grid. */
--bs-surface:#080b10;       /* Opaque panels. Sit ON the field; grid never shows through. */
--bs-surface-raised:#0d141c; /* selected / active row wash */
/* Hover is its own step above raised: selected and hovered must not
   share a value, or an active row cannot respond to the pointer. */
--bs-surface-hover:#111a24;
/* The vehicle pane's hologram is tuned against this navy, so the token
   follows the render rather than the other way round. */
--bs-diagram:#0b1220;       /* 3D vehicle pane, response-curve plot */

/* ── Colour · lines ─────────────────────────────────────── */
--bs-border:#1c2836;        /* panel + frame + control border, always 1px */
--bs-divider:#131c28;       /* in-panel row divider */
--bs-track:#22303e;         /* axis track, meter wells */
--bs-tick:#2a3746;          /* scale ticks, row leader ticks */

/* ── Colour · text ──────────────────────────────────────── */
--bs-text:#e8eef2;          /* primary */
--bs-text-data:#eef3f6;      /* live numerics - the brightest thing on screen */
--bs-text-label-fg:#707f8c;  /* SectionLabel. Holds 4.5:1 on every surface incl. the washes. */
--bs-text-dim:#6a7b88;       /* raw targets, meta, units, reference codes. Holds 4.5:1 on every surface. */
--bs-text-mid:#9fb0bd;       /* secondary control labels */

/* ── Colour · state (ECAM discipline) ───────────────────── */
--bs-normal:#2fd45f;        /* green   - nominal */
--bs-attention:#ffb020;     /* amber   - needs attention / degraded */
/* in_progress is a state, not a flavour of attention: flatten it onto
   amber and a checklist row disagrees with its own 3D part. The value
   is the shader's, measured against the additive render. */
--bs-in-progress:#ffd166;   /* yellow  - sweep under way */
--bs-failure:#ff3b30;       /* red     - failed / unclaimed */
--bs-failure-line:#8a2b26;  /* destructive control border */
--bs-failure-fg:#ff6a60;    /* destructive control label */
/* Never use state colour for emphasis, branding or hierarchy.
   Every state pair is ALSO shape-coded (see status marks). */

/* ── Colour · interactive ───────────────────────────────── */
--bs-accent:#35c6e8;        /* cyan - interactive + informational. NEVER a state. */
--bs-accent-wash:rgba(53,198,232,.09);
--bs-neutral-wash:rgba(159,176,189,.07);
--bs-failure-wash:rgba(255,106,96,.09);
--bs-scrim:rgba(5,7,10,.72); /* Modal backdrop - the only overlay in the system */

/* ── Space (4px base) ───────────────────────────────────── */
--bs-space-1:4px;--bs-space-2:8px;--bs-space-3:12px;--bs-space-4:16px;
--bs-space-5:20px;--bs-space-6:24px;--bs-space-8:32px;
--bs-pad-panel:18px 20px;   /* panel interior */
--bs-pad-control:9px 14px;  /* Button, Select, Field */
--bs-gap-panel:16px;        /* between panels, and between panels and the field edge */
--bs-row-min:34px;          /* density floor: rows stay ≥34px so mid-flight targets stay hittable */

/* ── Radii ──────────────────────────────────────────────── */
--bs-radius:0;              /* Zero. Everywhere. No exceptions - not buttons, not
                               inputs, not modals, not the scrollbar thumb. The
                               square corner is the strongest single carrier of
                               the direction; one rounded control breaks it. */

/* ── Borders & elevation ────────────────────────────────── */
--bs-border-width:1px;      /* every border in the system */
--bs-mark-stroke:1.5px;     /* outlined status mark */
/* Every icon stroke, held at this width in SCREEN pixels at every icon
   size (non-scaling-stroke, .bs-icon in index.css). Follows the status
   mark so an action and a state carry the same weight in one row;
   give it its own value to break that. THE ONLY PLACE ICON WEIGHT IS
   DECLARED. */
--bs-icon-stroke:var(--bs-mark-stroke);
--bs-elevation:none;        /* no shadows, no fills, no blur. Depth is drawn, not lit.
                               Layering reads through the field grid + opaque panels. */

/* ── Blueprint grid ─────────────────────────────────────── */
--bs-grid-size:22px;        /* page field */
--bs-grid-color:rgba(53,198,232,.055);
--bs-grid-diagram-size:11px;/* diagram surfaces only */
--bs-grid-diagram-color:rgba(53,198,232,.10);
/* RULE: the field grid is texture behind opaque panels - never under text.
   The denser grid is reserved for diagram surfaces (vehicle pane, curve
   editor) where lines under content read as graph paper, not decoration. */

/* ── Motion ───────────────────────────────────────────────
   One curve for the whole system. Durations are not browsable tokens - they
   live in the three utilities below, which are the only places motion is
   declared: control 120ms, panel 160ms, live geometry 45ms linear. */
--bs-ease:cubic-bezier(.2,0,.4,1);
}

/* ── Page field ───────────────────────────────────────────
   Apply to Page. background-position:-1px -1px pins the first line inside the
   box so it isn't clipped to a half pixel. Keep grid sizes whole pixels and
   never place the field inside a transform/scale or fractional-offset parent:
   on non-integer DPR the 1px lines alias into visible banding. If a container
   must scale, drop the grid rather than scale it. */
.bs-field{background-color:var(--bs-field);background-image:linear-gradient(var(--bs-grid-color) 1px,transparent 1px),linear-gradient(90deg,var(--bs-grid-color) 1px,transparent 1px);background-size:var(--bs-grid-size) var(--bs-grid-size);background-position:-1px -1px}
.bs-diagram{background-color:var(--bs-diagram);background-image:linear-gradient(var(--bs-grid-diagram-color) 1px,transparent 1px),linear-gradient(90deg,var(--bs-grid-diagram-color) 1px,transparent 1px);background-size:var(--bs-grid-diagram-size) var(--bs-grid-diagram-size);background-position:-1px -1px}

/* ── Numerics ─────────────────────────────────────────────
   All values are tabular. B612 Mono gives the period a full monospace advance,
   which at display sizes reads as a word space ("+38. 2"), so the decimal point
   gets its own narrow centred box. Emit numbers as
   <span class="bs-num"><i>+38</i><span class="bs-pt">.</span><i>2</i></span>. */
.bs-num{font-family:var(--bs-font-mono);font-variant-numeric:tabular-nums;font-style:normal}
.bs-num i{font-style:normal}
.bs-pt{display:inline-block;width:.34em;text-align:center;letter-spacing:0}

/* ── Live data motion ─────────────────────────────────────
   Numerals never transition - a lagging number is a lying number. Text snaps
   on each frame. Only axis GEOMETRY is smoothed, and only via transform, so a
   22/s feed reads as continuous travel without layout cost. */
.bs-control-motion{transition:background 120ms var(--bs-ease),border-color 120ms var(--bs-ease),color 120ms var(--bs-ease)}
.bs-panel-motion{transition:opacity 160ms var(--bs-ease),transform 160ms var(--bs-ease)}
.bs-live-geometry{transition:transform 45ms linear;will-change:transform}
/* A switch thumb travels; it does not change colour into place. Control
   motion's own duration, on the one property that class does not carry. */
.bs-switch-thumb{transition:transform 120ms var(--bs-ease),background 120ms var(--bs-ease)}
.bs-live-value{transition:none}

/* Failure onset flashes twice, then holds steady - attention once, never a
   heartbeat in peripheral vision. Nothing else in the system pulses, ever. */
@keyframes bs-alert{0%,100%{opacity:1}50%{opacity:.25}}
.bs-alert-onset{animation:bs-alert 500ms steps(1,end) 2}

@media (prefers-reduced-motion:reduce){
.bs-control-motion,.bs-panel-motion,.bs-live-geometry,.bs-switch-thumb{transition-duration:0ms}
.bs-alert-onset{animation:none}
/* Live values keep updating - they are data, not decoration. */
}
