/* ============================================================
   LCS — Spacing, grid & radius tokens
   The canvas is grid-driven (20pt). UI chrome uses Apple's
   standard paddings and continuous-corner radii.
   Values taken from Geometry.swift (CircuitLayout) and the
   SwiftUI views.
   ============================================================ */

:root {
  /* ---- Canvas grid (world space, points) ---- */
  --grid: 20px;                 /* CircuitLayout.gridSpacing */
  --grid-half: 10px;
  --lead-length: 20px;          /* stub lead before a port */
  --port-radius: 4.5px;         /* drawn port dot */
  --port-touch: 28px;           /* tap target radius */
  --gate-w: 80px;               /* gateBodySize.width */
  --gate-h: 60px;               /* gateBodySize.height */
  --tile-size: 40px;            /* source / output / clock / rail */
  --block-w: 120px;             /* flip-flops, chips */
  --wire-width: 2.5px;
  --stroke-outline: 2px;        /* gate body stroke */

  /* ---- Spacing scale (UI chrome) ---- */
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-9: 18px;
  --space-12: 24px;
  --space-16: 32px;

  /* ---- Corner radii (all .continuous / squircle in the app) ---- */
  --radius-tool: 14px;          /* palette tool button */
  --radius-bar: 20px;           /* the tool-palette bar */
  --radius-tile: 12px;          /* source / clock tile */
  --radius-card: 10px;          /* grouped list card / source path */
  --radius-sheet: 38px;         /* iOS sheet corner */
  --radius-capsule: 999px;      /* top-bar capsules, segmented control */
  --radius-chip: 6px;           /* chip body */
  --radius-ff: 3px;             /* flip-flop body */

  /* ---- Control metrics ---- */
  --toolbtn-w: 58px;
  --toolbtn-h: 50px;
  --barbtn-size: 40px;
  --hit-min: 44px;              /* minimum touch target */
}
