@charset "UTF-8";
/* Design tokens: the only file that holds colour literals (tools/check-static.js). Light theme only — the site has
   no dark theme (docs/design.md §8.2); print uses the same values. Canvas, SVG and WebGL code read these custom
   properties with getComputedStyle (js/lib/tokens.js), so there is a single source of truth for every colour,
   including the materials of the 3D scenes.
   Look: silicon-wafer slate blue with a copper accent (copper interconnect). Text colours are >= 4.5:1 on their
   backgrounds; curve and outline colours >= 3:1 on white. */
:root {
  color-scheme: light;

  --c-bg: #ffffff;
  --c-panel: #f6f8fa;
  --c-panel-strong: #edf1f5;
  --c-text: #1d232b;
  --c-text-muted: #525a64;
  --c-text-soft: #36404c;
  --c-border: #d0d7de;
  --c-border-strong: #a9b4bf;
  --c-grid: #dde3e9;
  --c-link: #2c5d94;
  --c-focus: #2c6fb5;

  /* Page look: faint grid, slate-blue / copper / grey glows behind the page, slate-to-copper site name. Decorative only:
     no text relies on the glows; the name colours are >= 4.5:1 on white and on the glow tint. */
  --c-brand: #3b5b84;
  --c-brand-from: #2d4a70;
  --c-brand-to: #4a6f9c;
  --c-name: #22354f;
  --c-name-from: #1a2a40;
  --c-name-mid: #33507a;
  --c-name-to: #9a4f17;
  --c-page-grid: rgb(29 35 43 / 0.045);
  --c-glow-1: rgb(92 136 196 / 0.14);
  --c-glow-2: rgb(196 120 52 / 0.10);
  --c-glow-3: rgb(120 146 168 / 0.08);
  --c-header-glass: rgb(255 255 255 / 0.8);
  --grid-step: 28px;
  --c-sheen: rgb(255 255 255 / 0.7);
  --c-sheen-soft: rgb(255 255 255 / 0.6);
  --c-sheen-clear: rgb(255 255 255 / 0);
  --c-edge-base: #ffffff;
  --c-shadow-xs: rgb(29 35 43 / 0.04);
  --c-shadow-sm: rgb(29 35 43 / 0.08);
  --c-shadow-md: rgb(29 35 43 / 0.12);
  --c-shadow-lg: rgb(29 35 43 / 0.16);
  --c-shadow-xl: rgb(29 35 43 / 0.18);
  --c-label-glass: rgb(255 255 255 / 0.88);
  --c-label-glass-strong: rgb(255 255 255 / 0.92);

  --c-badge-bg: #edf1f5;
  --c-badge-fg: #525a64;
  --c-pill-bg: #f6f8fa;
  --c-pill-bg-hover: #e2e8ee;
  --c-pill-border: #c6cfd8;
  --c-backdrop: rgb(29 35 43 / 0.4);
  --c-field-bg: #ffffff;
  --c-placeholder: #737a83;

  /* Model accuracy levels (docs/design.md §2.1): computed / approximate / schematic badges and legend marks. */
  --c-lvl-calc-bg: #24507e;
  --c-lvl-calc-fg: #ffffff;
  --c-lvl-approx-bg: #fbefdc;
  --c-lvl-approx-fg: #7a4206;
  --c-lvl-approx-border: #d9a866;
  --c-lvl-schem-bg: #eef1f4;
  --c-lvl-schem-fg: #4e5761;
  --c-lvl-schem-border: #b8c1ca;


  /* App frame: the stage behind the 3D scene (soft light gradient), frosted panels over it, segmented controls. */
  --c-stage-from: #f7f9fc;
  --c-stage-mid: #e9eef5;
  --c-stage-to: #dce4ee;
  --c-stage-glow: rgb(196 120 52 / 0.08);
  --c-glass: rgb(255 255 255 / 0.84);
  --c-glass-strong: rgb(255 255 255 / 0.94);
  --c-glass-border: rgb(29 35 43 / 0.12);
  --c-grip: rgb(29 35 43 / 0.22);
  --c-veil-core: rgb(250 252 255 / 0.78);
  --c-veil-edge: rgb(226 233 242 / 0.9);
  --c-stage-vignette: rgb(40 56 80 / 0.10);
  --c-stage-spot: rgb(255 255 255 / 0.75);
  --c-grip-on: #3b5b84;
  --c-topbar: rgb(255 255 255 / 0.9);
  --c-seg-bg: #e8edf2;
  --c-seg-hover: #dbe2e9;
  --c-seg-on-bg: #ffffff;
  --c-seg-on-fg: #1d232b;
  --c-accent: #9a4f17; /* copper */
  --c-accent-soft: #f6e9dd;
  --c-track: #d3dbe3;
  --c-track-fill: #3b5b84;
  --c-thumb: #ffffff;
  --c-thumb-border: #3b5b84;
  --c-switch-off: #b9c3cd;
  --c-switch-on: #3b5b84;
  --c-region-off-bg: #eceff2;
  --c-region-off-fg: #4e5761;
  --c-region-sub-bg: #f8eedd;
  --c-region-sub-fg: #75440b;
  --c-region-lin-bg: #e3edf9;
  --c-region-lin-fg: #1f4c84;
  --c-region-sat-bg: #e4f2ec;
  --c-region-sat-fg: #1c5946;
  /* the same region colours as plot backgrounds (lighter, behind the curves) */
  --c-region-off-fill: rgb(150 160 170 / 0.16);
  --c-region-sub-fill: rgb(214 150 60 / 0.16);
  --c-region-lin-fill: rgb(60 120 200 / 0.13);
  --c-region-sat-fill: rgb(40 150 100 / 0.13);
  --c-curve-locus: #6b7480;

  /* 3D scene materials and lights (sRGB; js/levels/<level>/scene3d.js reads them through js/lib/tokens.js). */
  --c-scene-bg: #ffffff;
  --c-scene-edge: #3a414b;
  --c-light-sky: #ffffff;
  --c-light-ground: #b8aa90;
  --c-light-sun: #ffffff;
  --c-light-rim: #cfe0ff; /* cool rim light from behind */
  /* studio environment (image-based light and reflections) and floor */
  --c-env-top: #d3dce8;
  --c-env-horizon: #a2adbb;
  --c-env-bottom: #4f4a42;
  --c-floor-grid: #7f93ad;
  --c-glow-hole: #ff6a4d;
  --c-glow-electron: #4f86ff;
  --c-pick: #c46a1c;
  --c-mat-sti: #d9e3ea;
  --c-mat-spacer: #b9c6d3;
  --c-mat-metal: #b8774a;
  --c-mat-si-p: #c9b99a; /* p-type silicon */
  --c-mat-si-n: #7ea7d4; /* n+ silicon */
  --c-mat-si-nbody: #a9c3a0; /* n-type body (pMOS) */
  --c-mat-si-pplus: #e2a1a6; /* p+ silicon (pMOS source / drain) */
  --c-mat-poly-p: #9a8f99; /* p+ polysilicon gate */
  --c-mat-oxide: #e6edf2;
  --c-mat-poly: #8b8f99;
  --c-mat-depletion: #e6a578;
  --c-mat-sheet-off: #d6cdbb;
  --c-mat-electron: #1f4fd1;
  --c-mat-hole: #c2412d;
  --c-mat-probe: #0b6b4f;
  --c-mat-si-fin: #d8cfbf; /* lightly doped silicon fin */
  --c-mat-highk: #e9d38a; /* HfO₂ high-k */
  --c-mat-metal-gate: #7f8b9c; /* TiN / W replacement metal gate */
  --c-mat-si-pwell: #d9c49a; /* p-well (triple well) */
  --c-mat-si-dnw: #7fa98c; /* deep n-well */
  --c-mat-tungsten: #9aa2ab; /* tungsten contact plugs */
  --c-net-lo: #9aaec6; /* wiring coloured by its voltage: 0 V … */
  --c-net-hi: #e3a13a; /* … V_DD */
  /* process flow: materials of the steps and the effects that animate them */
  --c-mat-si-nldd: #a9c4e2; /* lightly doped n (LDD) */
  --c-mat-si-pldd: #efc4c6; /* lightly doped p (LDD) */
  --c-mat-resist: #c9668c; /* photoresist */
  --c-mat-resist-exposed: #f0bfd2; /* exposed photoresist (soluble) */
  --c-mat-nickel: #b4b9c0;
  --c-mat-silicide: #5f6672; /* NiSi */
  --c-mat-ild: #c5d8e6; /* deposited oxide (ILD) */
  --c-mat-imd: #d6cfe8; /* low-k dielectric (IMD) */
  --c-fx-ion-n: #2f6bff;
  --c-fx-ion-p: #ff5236;
  --c-fx-uv: #8a5cff;
  --c-fx-plasma: #c25cff;
  --c-fx-heat: #ff7428;
  --c-fx-flash: #ffe7a8;
  --c-fx-glass: #cfe7f3;
  --c-fx-chrome: #3a3f47;
  --c-fx-pad: #4b525c;
  --c-fx-slurry: #eef2f5;
  --c-fx-liquid: #7fbde6;
  --c-fx-shine: #fff6dc;

  /* 2D plots */
  --c-plot-bg: #ffffff;
  --c-axis: #525a64;
  --c-band-ec: #1f5fae; /* conduction band */
  --c-band-ev: #b5481b; /* valence band */
  --c-band-ei: #6b7480; /* intrinsic level (dashed) */
  --c-band-ef: #0b7a55; /* Fermi level */
  --c-curve-1: #1f5fae;
  --c-curve-2: #b5481b;
  --c-curve-3: #0b7a55;
  --c-marker: #c2412d;
  --c-curve-fam: #a3afbb;
  /* gate structures on the FinFET scaling plots */
  --c-cfg-planar: #8a5a2b;
  --c-cfg-double: #6b7480;
  --c-cfg-fin: #1f5fae;
  --c-cfg-gaa: #0b7a55;
  --c-curve-planar: #8a5a2b;
  --c-bar-planar: #c9b99a;
  --c-bar-walls: #1f5fae;
  --c-bar-tops: #8fb3e3;
  --c-fill-depletion: rgb(230 165 120 / 0.28);
  --c-fill-inversion: rgb(31 79 209 / 0.18);
  --c-fill-accumulation: rgb(194 65 45 / 0.18);

  /* Font stacks: the author's shared definitions (Latin fonts first, then the language's CJK fonts). System fonts
     only: no font files, no external requests. */
  --font-en: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-zh-hans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, "PingFang SC", "微软雅黑", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-ja: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, "Meiryo UI", "メイリオ", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans CJK JP", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Formulas, Latin text and numbers everywhere (all languages, plots, read-outs, 3D labels): one Latin face, with
     tabular figures where numbers line up. */
  --font-latin: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  /* Compact scale */
  --fs-base: 15px;
  --lh-base: 1.5;
  --lh-cjk: 1.65;
  --space-1: 3px;
  --space-2: 6px;
  --space-3: 9px;
  --space-4: 12px;
  --space-5: 18px;
  --space-6: 24px;
  --space-7: 36px;

  --radius: 6px;
  --header-h: 44px;
  --control-h: 32px;
  --pill-h: 28px;
  --gutter: 16px;
  --maxw-page: 1200px;
  --maxw-text: 1100px;
  --page-pad-wide: 18px;
  --transition: 0.15s ease;
}
