/* ==========================================================================
   BambuHub tokens (Umbau Phase A, 17.10.2026; Quelle: Komponenten-Bibliothek
   Drafts/design-richtungen/komponenten/tokens.css, Werte unveraendert).
   Neu gegenueber der Bibliothek: Schriften selbst gehostet (assets/fonts/, SIL OFL 1.1,
   gebaut von umbau/werkzeug/build_fonts.py), der Google-Fonts-Link der Muster entfaellt.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* surfaces */
  --desk: #141312;                        /* table surface between the sheets, page background */
  --sheet: #1e1d1b;                       /* one drawing sheet */
  --plate: #2b2925;                       /* the one decisive box of a page (buy box, alert) */

  /* lines */
  --line: #958e82;                        /* drawn lines, list marks, Harvey balls */
  --frame: rgba(149, 142, 130, .72);      /* corner marks of figures, floating panels (menus) */
  --edge: rgba(149, 142, 130, .40);       /* edge of every sheet, header line */
  --rule: rgba(149, 142, 130, .30);       /* lines under table heads and between groups */
  --rule-2: rgba(149, 142, 130, .16);     /* faint: FAQ rows, title block cells */
  --zone: rgba(143, 137, 126, .72);       /* zone numbers and letters, 10 px */
  --zone-tick: rgba(149, 142, 130, .14);  /* ticks between zones, outer trim line */
  --field: rgba(149, 142, 130, .75);      /* border of form fields, 3.5:1 on --sheet */
  --btn-line: rgba(183, 176, 164, .55);   /* outline of the secondary button, 3.3:1 on --sheet */

  /* ink */
  --ink: #ece7dd;                         /* headings, values, body on plate */
  --ink-2: #b7b0a4;                       /* body copy, captions */
  --ink-3: #8f897e;                       /* meta lines, fine print; never on --plate */
  --plate-ink-3: #b7b0a4;
  --on-ink: #141312;                      /* text on an ink-filled area */
  --ink-hover: #ffffff;                   /* primary button on hover */
  --hl: #d8d1c4;                          /* light lines inside drawings */

  /* signal colours: each has one job */
  --pla: #f4c14a;                         /* PLA yellow: measured values and printed objects, max 3 per 900 px */
  --accent: #3b82f6;                      /* focus ring */
  --accent-soft: rgba(59, 130, 246, .09); /* hover ground of menu rows */
  --link: #6ea6ff;                        /* link on hover */
  /* deliberate exception to the one-accent rule (Fix-Runde 3): the AMS desiccant figure is a colour guide, so only
     its beads carry their real colours (articles/ams-desiccant, Fig. 1); same values on light ground */
  --bead-dry: #e8893a;                    /* orange beads: dry, still working */
  --bead-wet: #6a3a86;                    /* dark purple beads: saturated */
  --link-line: rgba(59, 130, 246, .55);   /* link underline at rest */
  --err: #e5866f;                         /* form errors only */
  --stamp: #a3362b;                       /* the stamp on the hanging tag, nowhere else */

  /* type */
  --sans: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, Consolas, monospace;   /* measured values and prices only */
  --code: ui-monospace, 'SFMono-Regular', Consolas, monospace; /* G-code, settings strings, embed code */
  --fs-body: 1.0625rem;                   /* 17 px, 18 px from 1800 */
  --fs-small: .9375rem;                   /* 15 px: list copy, table cells */
  --fs-caption: .875rem;                  /* 14 px: figure captions */
  --fs-meta: .8125rem;                    /* 13 px: meta line, fine print */
  --fs-label: .6875rem;                   /* 11 px: title block labels */
  --fs-zone: .625rem;                     /* 10 px: zone numbers */
  --fs-h1: clamp(2.125rem, 1.35rem + 2.35vw, 4.75rem);       /* full sheet */
  --fs-h1-read: clamp(2rem, 1.25rem + 2.1vw, 3.75rem);       /* light sheet */
  --fs-h2: clamp(1.35rem, 1.1rem + .7vw, 2rem);
  --fs-h2-read: clamp(1.45rem, 1.15rem + .75vw, 2.0625rem);
  --lh: 1.55;
  --lh-read: 1.62;

  /* spacing (Muster 5, Hierarchie-Runde) */
  --gs: 16px;                             /* desk gap between sheets: 16 / 24 / 32 / 40 */
  --sec: 32px;                            /* vertical padding of a sheet: 32 / 44 / 56 / 72 */
  --pad: 16px;                            /* horizontal padding of a sheet: 16 / 24 / 40 / 56 */
  --col: 48px;                            /* gap between columns inside a sheet: 48 / 48 / 64 / 80 */
  --trim: 18px;                           /* outer trim line around the set, from 1180 */
  --set-w: 2400px;                        /* widest drawing set */
  --nav-h: 61px;                          /* header height incl. its line, 69 from 1180 */
  --r: 2px;                               /* the one radius: buttons, fields */
  --t: .15s;                              /* the one transition time */
}

@media (min-width: 700px) {
  :root { --gs: 24px; --sec: 44px; --pad: 24px; }
}
@media (min-width: 1180px) {
  :root { --gs: 32px; --sec: 56px; --pad: 40px; --col: 64px; --nav-h: 69px; }
}
@media (min-width: 1800px) {
  :root { --gs: 40px; --sec: 72px; --pad: 56px; --col: 80px; --fs-body: 1.125rem; }
}

/* Light palette for the price widget and embeds on foreign (light) sites.
   Values verbatim from widget-neu/bambu-prices.html; --field, --btn-line, --err, --on-ink added. */
.theme-light,
[data-theme="light"] {
  color-scheme: light;
  --desk: #f0efed;
  --sheet: #fbfbfa;                       /* paper white */
  --plate: #f0efed;
  --line: #77726a;
  --frame: rgba(30, 29, 27, .40);
  --edge: rgba(30, 29, 27, .24);
  --rule: rgba(30, 29, 27, .15);
  --rule-2: rgba(30, 29, 27, .10);
  --zone: rgba(30, 29, 27, .50);
  --zone-tick: rgba(30, 29, 27, .10);
  --field: rgba(30, 29, 27, .55);         /* 3.8:1 on #fbfbfa */
  --btn-line: rgba(30, 29, 27, .50);
  --ink: #1e1d1b;
  --ink-2: #4b4740;
  --ink-3: #6a655d;
  --plate-ink-3: #6a655d;                 /* 5.0:1 on #f0efed, may stay */
  --on-ink: #fbfbfa;
  --ink-hover: #000000;
  --hl: #4b4740;
  --pla: #8d5f00;                         /* gold: the 90-day low on light ground */
  --hub: #c08a12;                         /* "hub" of the wordmark on light ground (logo, exempt from 1.4.3) */
  --accent: #1f5fd6;
  --accent-soft: rgba(31, 95, 214, .07);
  --link: #1f5fd6;
  --link-line: rgba(31, 95, 214, .45);
  --err: #b3402e;
}

/* ---------------------------------------------------------------------------
   Schriften, selbst gehostet (assets/fonts/). Achsen auf die genutzten Bereiche begrenzt:
   Archivo wght 400-900, wdth 75-120 %; Archivo Italic wght 400-700 bei 100 %; Martian Mono
   wght 400-600 fest bei 87,5 %. Latin Extended-A liegt in einer eigenen Datei und laedt nur,
   wenn eine Seite ein solches Zeichen zeigt. Pfade relativ zu /css/.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 75% 120%; font-display: swap;
  src: url(../assets/fonts/archivo-var.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+0192, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 75% 120%; font-display: swap;
  src: url(../assets/fonts/archivo-var-ext.woff2) format('woff2');
  unicode-range: U+0100-0130, U+0132-0151, U+0154-017F;
}
@font-face {
  font-family: 'Archivo'; font-style: italic; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url(../assets/fonts/archivo-italic-var.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+0192, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2248, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Martian Mono'; font-style: normal; font-weight: 400 600; font-stretch: 87.5%; font-display: swap;
  src: url(../assets/fonts/martianmono-w875-var.woff2) format('woff2');
  unicode-range: U+0020-007E, U+00A0-00FF, U+2009, U+2013, U+2019, U+201C-201D, U+2026, U+2190-2193, U+2212, U+20AC;
}
