/* Techius Fabric 1.2.0. Semantic tokens; application overrides need no specificity escalation.
   :root is the default boundary; data-fabric-theme starts an independent local boundary.
   --_tf-* values are private implementation details. */
:where(:root, [data-fabric-theme]) {
  --_tf-light-canvas: #f6faf9;
  --_tf-light-surface: #ffffff;
  --_tf-light-surface-soft: #edf5f3;
  --_tf-light-surface-elevated: #ffffff;
  --_tf-light-primary: #0f766e;
  --_tf-light-primary-hover: #115e59;
  --_tf-light-primary-active: #134e4a;
  --_tf-light-primary-soft: #e9f6f3;
  --_tf-light-on-primary: #ffffff;
  --_tf-light-text: #17212b;
  --_tf-light-text-muted: #475569;
  --_tf-light-text-subtle: #526372;
  --_tf-light-text-inverse: #ffffff;
  --_tf-light-border: #dce3e9;
  --_tf-light-border-strong: #889aa8;
  --_tf-light-border-control: #687d8c;
  --_tf-light-success-text: #166534;
  --_tf-light-success-soft: #edf9f0;
  --_tf-light-success-border: #278346;
  --_tf-light-info-text: #075985;
  --_tf-light-info-soft: #f0f9ff;
  --_tf-light-info-border: #0284c7;
  --_tf-light-on-danger: #ffffff;
  --_tf-light-danger: #b42338;
  --_tf-light-danger-soft: #fff0f1;
  --_tf-light-danger-border: #c75a6d;
  --_tf-light-warning-text: #865017;
  --_tf-light-warning-soft: #fff4df;
  --_tf-light-warning-border: #b07c38;
  --_tf-light-disabled: #e2e8f0;
  --_tf-light-on-disabled: #64748b;
  --_tf-dark-canvas: #101b1d;
  --_tf-dark-surface: #19292c;
  --_tf-dark-surface-soft: #213438;
  --_tf-dark-surface-elevated: #24383c;
  --_tf-dark-primary: #5eead4;
  --_tf-dark-primary-hover: #99f6e4;
  --_tf-dark-primary-active: #2dd4bf;
  --_tf-dark-primary-soft: #173d38;
  --_tf-dark-on-primary: #102522;
  --_tf-dark-text: #e7edf5;
  --_tf-dark-text-muted: #bac6d6;
  --_tf-dark-text-subtle: #a3b3c6;
  --_tf-dark-text-inverse: #17212b;
  --_tf-dark-border: #334155;
  --_tf-dark-border-strong: #64748b;
  --_tf-dark-border-control: #8294ab;
  --_tf-dark-success-text: #a0e8b3;
  --_tf-dark-success-soft: #193c2a;
  --_tf-dark-success-border: #63bc7d;
  --_tf-dark-info-text: #bae6fd;
  --_tf-dark-info-soft: #172f42;
  --_tf-dark-info-border: #38bdf8;
  --_tf-dark-on-danger: #141b20;
  --_tf-dark-danger: #ffafbc;
  --_tf-dark-danger-soft: #40252e;
  --_tf-dark-danger-border: #c17f8e;
  --_tf-dark-warning-text: #e6c181;
  --_tf-dark-warning-soft: #342d20;
  --_tf-dark-warning-border: #a68b55;
  --_tf-dark-disabled: #364152;
  --_tf-dark-on-disabled: #9baabd;
  color-scheme: light;
  --techius-color-canvas: var(--_tf-light-canvas);
  --techius-color-surface: var(--_tf-light-surface);
  --techius-color-surface-soft: var(--_tf-light-surface-soft);
  --techius-color-surface-elevated: var(--_tf-light-surface-elevated);
  --techius-color-primary: var(--_tf-light-primary);
  --techius-color-primary-hover: var(--_tf-light-primary-hover);
  --techius-color-primary-active: var(--_tf-light-primary-active);
  --techius-color-primary-soft: var(--_tf-light-primary-soft);
  --techius-color-on-primary: var(--_tf-light-on-primary);
  --techius-color-text: var(--_tf-light-text);
  --techius-color-text-muted: var(--_tf-light-text-muted);
  --techius-color-text-subtle: var(--_tf-light-text-subtle);
  --techius-color-text-inverse: var(--_tf-light-text-inverse);
  --techius-color-border: var(--_tf-light-border);
  --techius-color-border-strong: var(--_tf-light-border-strong);
  --techius-color-border-control: var(--_tf-light-border-control);
  --techius-color-success-text: var(--_tf-light-success-text);
  --techius-color-success-soft: var(--_tf-light-success-soft);
  --techius-color-success-border: var(--_tf-light-success-border);
  --techius-color-info-text: var(--_tf-light-info-text);
  --techius-color-info-soft: var(--_tf-light-info-soft);
  --techius-color-info-border: var(--_tf-light-info-border);
  --techius-color-on-danger: var(--_tf-light-on-danger);
  --techius-color-danger: var(--_tf-light-danger);
  --techius-color-danger-soft: var(--_tf-light-danger-soft);
  --techius-color-danger-border: var(--_tf-light-danger-border);
  --techius-color-warning-text: var(--_tf-light-warning-text);
  --techius-color-warning-soft: var(--_tf-light-warning-soft);
  --techius-color-warning-border: var(--_tf-light-warning-border);
  --techius-color-disabled: var(--_tf-light-disabled);
  --techius-color-on-disabled: var(--_tf-light-on-disabled);
  --techius-color-surface-muted: var(--techius-color-surface-soft);
  --techius-color-focus: var(--techius-color-primary);
  --techius-color-selection: var(--techius-color-primary-soft);
  --techius-color-on-selection: var(--techius-color-primary);
  --techius-color-interactive-hover: var(--techius-color-surface-soft);
  --techius-color-interactive-active: var(--techius-color-primary-soft);
  --techius-color-carbon: #141b20;
  --techius-color-carbon-border: #34444b;
  --techius-shadow-surface: 0 4px 24px #141b2005, 0 1px 3px #141b2005;
  --techius-shadow-overlay: 0 8px 24px #0002;
}

/* Palette identity includes quiet surfaces as well as accents. Status colors stay invariant. */
:where(:root[data-palette='indigo'], [data-fabric-theme][data-palette='indigo']) {
  --_tf-light-canvas: #f7f8fc;
  --_tf-light-surface: #ffffff;
  --_tf-light-surface-soft: #f0f1f9;
  --_tf-light-surface-elevated: #ffffff;
  --_tf-light-primary: #4338ca;
  --_tf-light-primary-hover: #3730a3;
  --_tf-light-primary-active: #312e81;
  --_tf-light-primary-soft: #eeedfd;
  --_tf-light-on-primary: #ffffff;
  --_tf-dark-canvas: #141724;
  --_tf-dark-surface: #1d2335;
  --_tf-dark-surface-soft: #272e43;
  --_tf-dark-surface-elevated: #2d354b;
  --_tf-dark-primary: #a5b4fc;
  --_tf-dark-primary-hover: #c7d2fe;
  --_tf-dark-primary-active: #818cf8;
  --_tf-dark-primary-soft: #2c3157;
  --_tf-dark-on-primary: #151b35;
}
:where(:root[data-palette='violet'], [data-fabric-theme][data-palette='violet']) {
  --_tf-light-canvas: #faf8fc;
  --_tf-light-surface: #ffffff;
  --_tf-light-surface-soft: #f4f0fa;
  --_tf-light-surface-elevated: #ffffff;
  --_tf-light-primary: #6d28d9;
  --_tf-light-primary-hover: #5b21b6;
  --_tf-light-primary-active: #4c1d95;
  --_tf-light-primary-soft: #f2ecfd;
  --_tf-light-on-primary: #ffffff;
  --_tf-dark-canvas: #1b1625;
  --_tf-dark-surface: #282135;
  --_tf-dark-surface-soft: #332b43;
  --_tf-dark-surface-elevated: #3a304b;
  --_tf-dark-primary: #c4b5fd;
  --_tf-dark-primary-hover: #ddd6fe;
  --_tf-dark-primary-active: #a78bfa;
  --_tf-dark-primary-soft: #3a2857;
  --_tf-dark-on-primary: #20162f;
}
:where(:root[data-palette='slate'], [data-fabric-theme][data-palette='slate']) {
  --_tf-light-canvas: #f5f7fa;
  --_tf-light-surface: #ffffff;
  --_tf-light-surface-soft: #edf2f7;
  --_tf-light-surface-elevated: #ffffff;
  --_tf-light-primary: #0e7490;
  --_tf-light-primary-hover: #155e75;
  --_tf-light-primary-active: #164e63;
  --_tf-light-primary-soft: #e9f5f9;
  --_tf-light-on-primary: #ffffff;
  --_tf-dark-canvas: #0f172a;
  --_tf-dark-surface: #1b263b;
  --_tf-dark-surface-soft: #253249;
  --_tf-dark-surface-elevated: #2c3b53;
  --_tf-dark-primary: #67e8f9;
  --_tf-dark-primary-hover: #a5f3fc;
  --_tf-dark-primary-active: #22d3ee;
  --_tf-dark-primary-soft: #153b48;
  --_tf-dark-on-primary: #0f2430;
}
:where(:root[data-palette='amber'], [data-fabric-theme][data-palette='amber']) {
  --_tf-light-canvas: #fbf9f6;
  --_tf-light-surface: #ffffff;
  --_tf-light-surface-soft: #f5f1eb;
  --_tf-light-surface-elevated: #ffffff;
  --_tf-light-primary: #ad4e08;
  --_tf-light-primary-hover: #92400e;
  --_tf-light-primary-active: #78350f;
  --_tf-light-primary-soft: #fbf0df;
  --_tf-light-on-primary: #ffffff;
  --_tf-dark-canvas: #201a16;
  --_tf-dark-surface: #2b241e;
  --_tf-dark-surface-soft: #372e25;
  --_tf-dark-surface-elevated: #40352b;
  --_tf-dark-primary: #fcd34d;
  --_tf-dark-primary-hover: #fde68a;
  --_tf-dark-primary-active: #fbbf24;
  --_tf-dark-primary-soft: #44351c;
  --_tf-dark-on-primary: #2a1e0e;
}

:where(:root[data-theme='dark'], [data-fabric-theme][data-theme='dark']) {
  color-scheme: dark;
  --techius-color-canvas: var(--_tf-dark-canvas);
  --techius-color-surface: var(--_tf-dark-surface);
  --techius-color-surface-soft: var(--_tf-dark-surface-soft);
  --techius-color-surface-elevated: var(--_tf-dark-surface-elevated);
  --techius-color-primary: var(--_tf-dark-primary);
  --techius-color-primary-hover: var(--_tf-dark-primary-hover);
  --techius-color-primary-active: var(--_tf-dark-primary-active);
  --techius-color-primary-soft: var(--_tf-dark-primary-soft);
  --techius-color-on-primary: var(--_tf-dark-on-primary);
  --techius-color-text: var(--_tf-dark-text);
  --techius-color-text-muted: var(--_tf-dark-text-muted);
  --techius-color-text-subtle: var(--_tf-dark-text-subtle);
  --techius-color-text-inverse: var(--_tf-dark-text-inverse);
  --techius-color-border: var(--_tf-dark-border);
  --techius-color-border-strong: var(--_tf-dark-border-strong);
  --techius-color-border-control: var(--_tf-dark-border-control);
  --techius-color-success-text: var(--_tf-dark-success-text);
  --techius-color-success-soft: var(--_tf-dark-success-soft);
  --techius-color-success-border: var(--_tf-dark-success-border);
  --techius-color-info-text: var(--_tf-dark-info-text);
  --techius-color-info-soft: var(--_tf-dark-info-soft);
  --techius-color-info-border: var(--_tf-dark-info-border);
  --techius-color-on-danger: var(--_tf-dark-on-danger);
  --techius-color-danger: var(--_tf-dark-danger);
  --techius-color-danger-soft: var(--_tf-dark-danger-soft);
  --techius-color-danger-border: var(--_tf-dark-danger-border);
  --techius-color-warning-text: var(--_tf-dark-warning-text);
  --techius-color-warning-soft: var(--_tf-dark-warning-soft);
  --techius-color-warning-border: var(--_tf-dark-warning-border);
  --techius-color-disabled: var(--_tf-dark-disabled);
  --techius-color-on-disabled: var(--_tf-dark-on-disabled);
  --techius-shadow-surface: 0 4px 24px #00000026;
  --techius-shadow-overlay: 0 12px 32px #0006;
}
@media (prefers-color-scheme: dark) {
  :where(:root, [data-fabric-theme]):not(:where([data-theme='light'], [data-theme='dark'])) {
    color-scheme: dark;
    --techius-color-canvas: var(--_tf-dark-canvas);
    --techius-color-surface: var(--_tf-dark-surface);
    --techius-color-surface-soft: var(--_tf-dark-surface-soft);
    --techius-color-surface-elevated: var(--_tf-dark-surface-elevated);
    --techius-color-primary: var(--_tf-dark-primary);
    --techius-color-primary-hover: var(--_tf-dark-primary-hover);
    --techius-color-primary-active: var(--_tf-dark-primary-active);
    --techius-color-primary-soft: var(--_tf-dark-primary-soft);
    --techius-color-on-primary: var(--_tf-dark-on-primary);
    --techius-color-text: var(--_tf-dark-text);
    --techius-color-text-muted: var(--_tf-dark-text-muted);
    --techius-color-text-subtle: var(--_tf-dark-text-subtle);
    --techius-color-text-inverse: var(--_tf-dark-text-inverse);
    --techius-color-border: var(--_tf-dark-border);
    --techius-color-border-strong: var(--_tf-dark-border-strong);
    --techius-color-border-control: var(--_tf-dark-border-control);
    --techius-color-success-text: var(--_tf-dark-success-text);
    --techius-color-success-soft: var(--_tf-dark-success-soft);
    --techius-color-success-border: var(--_tf-dark-success-border);
    --techius-color-info-text: var(--_tf-dark-info-text);
    --techius-color-info-soft: var(--_tf-dark-info-soft);
    --techius-color-info-border: var(--_tf-dark-info-border);
    --techius-color-on-danger: var(--_tf-dark-on-danger);
    --techius-color-danger: var(--_tf-dark-danger);
    --techius-color-danger-soft: var(--_tf-dark-danger-soft);
    --techius-color-danger-border: var(--_tf-dark-danger-border);
    --techius-color-warning-text: var(--_tf-dark-warning-text);
    --techius-color-warning-soft: var(--_tf-dark-warning-soft);
    --techius-color-warning-border: var(--_tf-dark-warning-border);
    --techius-color-disabled: var(--_tf-dark-disabled);
    --techius-color-on-disabled: var(--_tf-dark-on-disabled);
    --techius-shadow-surface: 0 4px 24px #00000026;
    --techius-shadow-overlay: 0 12px 32px #0006;
  }
}

/* Foundation dimensions inherit into scopes; existing product layouts remain authoritative. */
:where(:root) {
  --techius-header-row-height: 72px;
  --techius-header-row-height-compact: 64px;
  --techius-logo-size: 40px;
  --techius-logo-size-compact: 32px;
  --techius-layout-gutter: 32px;
  --techius-space-1: 4px;
  --techius-space-2: 8px;
  --techius-space-3: 12px;
  --techius-space-4: 16px;
  --techius-space-6: 24px;
  --techius-space-8: 32px;
  --techius-space-12: 48px;
  --techius-radius-sm: 6px;
  --techius-radius-surface: 14px;
  --techius-radius-surface-large: 18px;
  --techius-radius-control: 10px;
  --techius-control-target-size: 44px;
  --techius-focus-width: 2px;
  --techius-focus-offset: 3px;
}
@media (max-width: 960px) {
  :where(:root) { --techius-layout-gutter: 24px; }
}
@media (max-width: 640px) {
  :where(:root) { --techius-layout-gutter: 16px; }
}

/* Density is independent of palette and appearance. Only opt-in UI classes consume it. */
:where(:root) {
  --techius-compact-target-size: 36px;
  --techius-compact-padding-block: 8px;
  --techius-compact-padding-inline: 12px;
  --techius-compact-font-size: 0.75rem;
  --techius-compact-icon-size: 16px;
  --techius-compact-gap: 8px;
  --techius-type-heading-gap: var(--techius-space-3);
  --techius-type-copy-gap: var(--techius-space-2);
  --techius-type-page-title-size: 1.5rem;
  --techius-type-page-title-weight: 600;
  --techius-type-page-title-line-height: 1.3;
  --techius-type-section-title-size: 1.125rem;
  --techius-type-section-title-weight: 600;
  --techius-type-section-title-line-height: 1.4;
  --techius-type-panel-title-size: 0.9375rem;
  --techius-type-panel-title-weight: 600;
  --techius-type-panel-title-line-height: 1.4;
  --techius-type-control-label-size: 0.8125rem;
  --techius-type-control-label-weight: 600;
  --techius-type-control-label-line-height: 1.5;
  --techius-type-body-size: 0.875rem;
  --techius-type-body-weight: 400;
  --techius-type-body-line-height: 1.65;
  --techius-type-status-size: 0.75rem;
  --techius-type-status-weight: 500;
  --techius-type-status-line-height: 1.5;
  --techius-type-helper-size: 0.75rem;
  --techius-type-helper-weight: 400;
  --techius-type-helper-line-height: 1.65;
}
:where(:root, [data-fabric-density="default"], .tf-button[data-size="standard"], .tf-control[data-size="standard"], .tf-segmented[data-size="standard"]) {
  --techius-command-min-size: initial;
  --techius-command-padding-block: initial;
  --techius-command-padding-inline: initial;
  --techius-command-font-size: 0.8125rem;
  --techius-command-icon-size: 18px;
  --techius-command-gap: initial;
  --techius-command-group-gap: initial;
  --techius-control-min-size: initial;
  --techius-control-padding-block: 11px;
  --techius-control-padding-inline: 13px;
  --techius-control-font-size: 0.875rem;
  --techius-control-line-height: initial;
}
:where([data-fabric-density="compact"], .tf-button[data-size="compact"], .tf-control[data-size="compact"], .tf-segmented[data-size="compact"]) {
  --techius-command-min-size: var(--techius-compact-target-size);
  --techius-command-padding-block: var(--techius-compact-padding-block);
  --techius-command-padding-inline: var(--techius-compact-padding-inline);
  --techius-command-font-size: var(--techius-compact-font-size);
  --techius-command-icon-size: var(--techius-compact-icon-size);
  --techius-command-gap: var(--techius-compact-gap);
  --techius-command-group-gap: var(--techius-compact-gap);
  --techius-control-min-size: var(--techius-compact-target-size);
  --techius-control-padding-block: var(--techius-compact-padding-block);
  --techius-control-padding-inline: var(--techius-compact-padding-inline);
  --techius-control-font-size: var(--techius-compact-font-size);
  --techius-control-line-height: 1.5;
}
