/* PartAnatomy — design tokens (base v2, 11.10.2026)
   Fonts: IBM Plex Sans / IBM Plex Mono (SIL Open Font License), files in ./fonts
   or Google Fonts: https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap */

@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  /* brand */
  --pa-ink: #0E1726;          /* text, lines, dark buttons, logo wordmark */
  --pa-accent: #E0661B;       /* signal orange: selection, "feature in focus" */
  --pa-copper: #B8561B;       /* logo propeller; use only in logo/illustrations */
  --pa-paper: #F5F6F8;        /* page background ("drafting paper") */
  --pa-surface: #FFFFFF;      /* cards, panels */
  --pa-line: #D5DBE3;         /* borders */
  --pa-line-soft: #E6EAF0;    /* dividers, table rows */
  --pa-grid: #E6EAF0;         /* background grid lines (24–28 px) */
  --pa-text-2: #2D3748;       /* secondary text */
  --pa-text-3: #4A5568;       /* captions, labels (min contrast 4.5:1 on white) */
  --pa-link: #2457C5;
  --pa-link-hover: #163C8F;
  --pa-accent-soft: #FDF1E8;  /* selected row background */

  /* feature colors (model + legends only) */
  --pa-f-hole: #2457C5;
  --pa-f-slot: #E0661B;
  --pa-f-bend: #0F8A7A;
  --pa-f-end: #6B4FC4;
  --pa-f-thread: #B7791F;
  --pa-f-turning: #0EA5C6;    /* matches current viewer "Точение" cyan; keep if already used */
  --pa-f-unbound: #D64545;    /* "Не привязано" */
  --pa-f-warning: #E0A21B;    /* "Предупреждения" */
  --pa-f-process: #7C4DDB;    /* "Техпроцесс" */

  /* type */
  --pa-font: "IBM Plex Sans", system-ui, sans-serif;
  --pa-mono: "IBM Plex Mono", ui-monospace, monospace;
  --pa-fs-h1: 56px; --pa-fs-h2: 36px; --pa-fs-h3: 20px;
  --pa-fs-body: 16px; --pa-fs-ui: 14px; --pa-fs-small: 13px; --pa-fs-label: 11px;
  --pa-label-tracking: 0.12em; /* MONO UPPERCASE section labels */

  /* shape */
  --pa-radius: 6px; --pa-radius-lg: 8px; --pa-radius-xl: 10px;
  --pa-touch: 40px;           /* min control height; 44px on touch screens */
}

.pa-grid-bg {
  background-color: #FBFCFD;
  background-image: linear-gradient(var(--pa-grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--pa-grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pa-label { font: 400 var(--pa-fs-label)/1.2 var(--pa-mono); letter-spacing: var(--pa-label-tracking); text-transform: uppercase; color: var(--pa-text-3); }
.pa-num { font-family: var(--pa-mono); } /* dimensions, face ids, times */
