/* Flight Deck design tokens ("avionics bay", spec section 2). Owner: stream A.
   Loaded before style.css. Two materials only: glass (displays) and hardware (panels). */

:root {
  /* ---- Glass (display) colours: fixed meaning, never decorative ---- */
  --g-bg:      #04070A; /* display background */
  --g-bg2:     #0A0F14; /* raised glass (modal, drawer, CDU screen) */
  --g-line:    #1E2A36; /* hairlines, table rules */
  --g-white:   #F2F5F7; /* titles, scales, labels */
  --g-dim:     #8794A1; /* secondary text (>= 6:1 on --g-bg) */
  --g-green:   #2EE66B; /* normal / active / memo */
  --g-amber:   #FFB000; /* caution, abnormal-not-urgent */
  --g-red:     #FF4136; /* warning, limit exceeded */
  --g-cyan:    #35D6FF; /* selectable, units, advisory, "action to do" */
  --g-magenta: #F25CF2; /* targets / commanded values */
  --g-off:     #27313B; /* unlit legend / unpowered text (contrast-exempt) */

  /* ---- Annunciator lamp colours (hardware); lit = text-shadow: 0 0 6px currentColor ---- */
  --lamp-green: #3DF07A;
  --lamp-amber: #FFB020;
  --lamp-red:   #FF4D3D;
  --lamp-blue:  #59D0FF;
  --lamp-white: #FFFFFF;
  --lamp-off:   #2D343B; /* unlit legends */
  --lamp-glow:  0 0 6px currentColor;

  /* ---- Guard ---- */
  --guard-red: #C0392B;

  /* ---- Radii ---- */
  --r-hw:    4px; /* hardware max */
  --r-glass: 2px; /* glass */

  /* ---- Typography ---- */
  --sans: 'B612', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'B612 Mono', ui-monospace, Menlo, Consolas, monospace;
  /* scale: size / line-height */
  --fs-legend: 10px;  --lh-legend: 1.2;   /* minimum anywhere */
  --fs-label: 11px;   --lh-label: 1.3;
  --fs-body-sm: 12px; --lh-body-sm: 1.45;
  --fs-body: 13px;    --lh-body: 1.5;
  --fs-value: 15px;   --lh-value: 1.3;
  --fs-value-lg: 18px; --lh-value-lg: 1.2;
  --fs-title: 24px;   --lh-title: 1.15;
  --fs-wordmark: 40px; --lh-wordmark: 1.05; /* 28px on mobile */
  --track-legend: .08em; /* legends and tabs, uppercase */
  --track-tag: .2em;     /* section tags */

  /* ---- Display brightness (BRT, 0.6 - 1.0) ---- */
  --brt: 1;

  /* ---- Hardware defaults (Airbus) for anything outside #sim ---- */
  --plate: #5E7482; --plate-lo: #4C606D; --plate-ink: #F4F7F9;
  --bezel: #1A1F24; --knob: #22272D; --disp-value: var(--g-green);
}

@media (max-width: 600px) {
  :root { --fs-wordmark: 28px; }
}

/* ---- Hardware tokens per family (ui.js sets #sim.className = ac.fam) ---- */
#sim.fam-airbus {
  --plate: #5E7482; --plate-lo: #4C606D; --plate-ink: #F4F7F9;
  --bezel: #1A1F24; --knob: #22272D; --disp-value: var(--g-green);
}
#sim.fam-boeing { /* 747-400 */
  --plate: #6F6558; --plate-lo: #5C5347; --plate-ink: #F3EFE8;
  --bezel: #1F1C18; --knob: #D8D5CE; /* light caps */ --disp-value: var(--g-white);
}
#sim.fam-b787 {
  --plate: #55585D; --plate-lo: #44474C; --plate-ink: #F1F2F3;
  --bezel: #17191C; --knob: #2A2D31; --disp-value: var(--g-white);
}
#sim.fam-fighter {
  --plate: #2E3136; --plate-lo: #212428; --plate-ink: #E8EAEC;
  --bezel: #101113; --knob: #15171A; --disp-value: #7CFF6B; /* DDI green, mono */
}
