/*
 * ST8 geometry and typography with the owner-requested light/dark direction:
 * neutral black and white surfaces and refined orange action colours.
 *
 * Source: ST8-v1.0.1-review_package.zip (approved 2026-09-08),
 * data/tokens.json SHA-256 2b9b14597a8ad487f6d1ea425b2c8229674f0345d662e520dfa607cca7754d76.
 * Role names follow tokens.json with "." replaced by "-".
 *
 * The original ST8 roles remain available. These implementation colour values
 * supersede their former values; geometry retains approved ST8 settings.
 *
 * Geometry is in CSS px as given by tokens.json ("design px"). Type sizes
 * interpolate between the 390 and 1440 references (S8-A06); line-height
 * 1.35 is the ratio used by every role except the P01 hero.
 * IBM Plex Sans (variable wght) and Plex Mono 400 are the Fontsource 5.3.0
 * subsets of the Google Fonts release (OFL, assets/fonts/OFL.txt). The
 * browser downloads only the ranges a page uses (TBD-075).
 */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-cyrillic-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  /* Surfaces */
  --ti28-surface-page: #F7F7F7;
  --ti28-surface-panel: #FFFFFF;
  --ti28-surface-accent-soft: #F2F2F2;
  --ti28-surface-inverse: #111111;
  --ti28-surface-inverse-hover: #303030;
  --ti28-surface-media: #FFFFFF;
  --ti28-surface-selected: #111111;

  /* Text */
  --ti28-text-primary: #111111;
  --ti28-text-secondary: #595959;
  --ti28-text-inverse: #F5F5F5;
  --ti28-text-inverse-secondary: #C2C2C2;
  --ti28-inverse-hover-surface: #F5F5F5;
  --ti28-inverse-hover-text: #111111;

  /* Action and link */
  --ti28-action-primary: #FF6A1F;
  --ti28-action-hover: #FF5A1F;
  --ti28-action-foreground: #111111;
  --ti28-link-light: #111111;

  /* Borders */
  --ti28-border-decorative: #D0D0D0;
  --ti28-border-control: #767676;
  --ti28-border-inverse: #595959;

  /* Focus */
  --ti28-focus-light: #111111;
  --ti28-focus-dark: #FF6A1F;

  /* Feedback; success is for a confirmed event only */
  --ti28-error-text: #AC2922;
  --ti28-error-surface: #FCEDEB;
  --ti28-warning-text: #85520C;
  --ti28-warning-surface: #FFF1D9;
  --ti28-success-text: #23603F;
  --ti28-success-surface: #E7F2EC;
  --ti28-disabled-text: #595959;
  --ti28-disabled-surface: #E5E5E5;

  /* Geometry */
  --ti28-radius-control: 6px;
  --ti28-radius-panel: 6px;
  --ti28-border-control-width: 2px;
  --ti28-border-decorative-width: 1px;
  --ti28-focus-stroke: 2px;
  --ti28-focus-gap: 2px;
  --ti28-button-min-height: 48px;
  --ti28-field-min-height: 52px;
  --ti28-target-min: 44px;
  --ti28-icon-size: 24px;

  /* Proposed roles approved with ST8 (S8-A01) */
  --ti28-action-pressed: #FF5A1F;
  --ti28-selection-surface: #EEEEEE;
  --ti28-link-dark: #FF6A1F;

  /* Spacing scale and layout (S8-A05, S8-A06) */
  --ti28-space-1: 4px;
  --ti28-space-2: 8px;
  --ti28-space-3: 12px;
  --ti28-space-4: 16px;
  --ti28-space-5: 24px;
  --ti28-space-6: 32px;
  --ti28-space-7: 48px;
  --ti28-space-8: 64px;
  --ti28-space-9: 80px;
  --ti28-container-max: 1200px;
  --ti28-gutter: 16px;
  --ti28-gap: 12px;
  --ti28-panel-padding: 16px;
  --ti28-checkbox-size: 24px;
  --ti28-dialog-max: 640px;

  /* Typography (S8-A04); size = clamp(mobile, 390→1440, desktop) */
  --ti28-line-height: 1.35;
  --ti28-text-body: 16px;
  --ti28-text-caption: 14px;
  --ti28-text-technical: 17px;
  --ti28-text-h-product: clamp(30px, calc(30px + 12 * (100vw - 390px) / 1050), 42px);
  --ti28-text-h-page: clamp(32px, calc(32px + 12 * (100vw - 390px) / 1050), 44px);
  --ti28-text-h-section: clamp(24px, calc(24px + 4 * (100vw - 390px) / 1050), 28px);
  --ti28-text-h-card: 20px;
  --ti28-text-price: clamp(28px, calc(28px + 4 * (100vw - 390px) / 1050), 32px);

  /* Font families; rendering fidelity not verified */
  --ti28-font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ti28-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", "Liberation Mono", monospace;
}

:root[data-ti28-theme="dark"] {
  color-scheme: dark;
  --ti28-surface-page: #111111;
  --ti28-surface-panel: #1D1D1D;
  --ti28-surface-accent-soft: #292929;
  --ti28-surface-selected: #404040;
  --ti28-text-primary: #F5F5F5;
  --ti28-text-secondary: #C2C2C2;
  --ti28-action-primary: #FF6A1F;
  --ti28-action-hover: #FF5A1F;
  --ti28-action-pressed: #FF5A1F;
  --ti28-action-foreground: #111111;
  --ti28-link-light: #FF6A1F;
  --ti28-link-dark: #FF6A1F;
  --ti28-border-decorative: #404040;
  --ti28-border-control: #777777;
  --ti28-focus-light: #FF6A1F;
  --ti28-error-text: #FF8982;
  --ti28-error-surface: #402220;
  --ti28-warning-text: #F5BA6A;
  --ti28-warning-surface: #3E301D;
  --ti28-success-text: #8BD4A7;
  --ti28-success-surface: #21372B;
  --ti28-disabled-text: #B5B5B5;
  --ti28-disabled-surface: #333333;
  --ti28-selection-surface: #353535;
}

/* From 1024: wider gutters, gaps and panel padding (S8-A06). */
@media (min-width: 1024px) {
  :root {
    --ti28-gutter: 24px;
    --ti28-gap: 24px;
    --ti28-panel-padding: 24px;
  }
}
