/* Stercus Design — review revision 298 plus 2026-09-22 material approval.
 * Values only: opt in with an explicit data-stercus-theme="dark" or "light".
 * Selector/variable names are integration conventions, not a theme policy.
 * Core values retain revision263; icon scale retains revision296.
 * Action padding is approved in revision298; selected glyphs live in the library.
 * No font family, global semantic palette or automatic theme choice.
 * Decision provenance: references/approval-index.md.
 */
[data-stercus-theme] {
  /* type, spacing, corners, inputs. Touch/focus numerical safeguards reproduce
   * reviewed CSS; they were not separate choices of a universal sizing scale. */
  --sd-title-size: 24px;
  --sd-title-line-height: 1.2;
  --sd-section-size: 18px;
  --sd-body-size: 14px;
  --sd-meta-size: 12px;
  --sd-touch-input-size: 16px;
  --sd-record-weight: 600;
  --sd-spacing-unit: 8px;
  --sd-section-gap: 16px;
  --sd-surface-padding-compact: 12px;
  --sd-surface-padding: 16px;
  --sd-desktop-row-target: 52px;
  --sd-target-min: 44px;
  /* icon-scale A, revision296 */
  --sd-icon-meta-size: 16px;
  --sd-icon-control-size: 18px;
  --sd-icon-nav-size: 20px;
  --sd-icon-stroke: 1.6;
  /* icon-actions B, specimen2/revision298: icon-and-text actions only.
   * Gap is the supporting specimen value, not a universal spacing scale. */
  --sd-icon-action-padding-start: 12px;
  --sd-icon-action-padding-end: 16px;
  --sd-icon-action-gap: 7px;
  --sd-control-radius: 12px;
  --sd-card-radius: 16px;
  --sd-pill-radius: 999px;
  --sd-control-border-width: 1px;
  --sd-focus-outline-width: 2px;

  /* Opaque tile/dock reference paint; no geometry or motion overrides.
   * September 22 approval supersedes all previous sd-glass coefficients. */
  --sd-tile-fill: var(--sd-surface);
  --sd-tile-divider: var(--sd-divider);
  --sd-dock-rim: var(--sd-border);
  --sd-dock-ink: var(--sd-text);
  --sd-dock-active: var(--sd-action);
  --sd-dock-active-ink: var(--sd-action-ink);
  --sd-dock-separation: 0 0 0 2px var(--sd-canvas);

  /* motion-controls/menus/tooltip/content/disclosure/toast + overlay-motion. */
  --sd-motion-easing: ease-out;
  --sd-control-duration: 120ms;
  --sd-menu-duration: 160ms;
  --sd-overlay-duration: 160ms;
  --sd-tooltip-delay: 150ms;
  --sd-tooltip-duration: 160ms;
  --sd-content-duration: 160ms;
  --sd-disclosure-duration: 180ms;
  --sd-toast-enter-duration: 160ms;
  --sd-toast-exit-duration: 120ms;
}

[data-stercus-theme="dark"] {
  /* color/buttons: explicit base and green. Supporting neutrals/focus/ink are
   * an accessible engineering baseline from composition.css, not independently
   * approved mandatory dark hex defaults. See references/foundations.md. */
  --sd-canvas: #0F1729;
  --sd-surface: #1A2332;
  --sd-field: #243044;
  --sd-raised: #243044;
  --sd-text: #E8EDF5;
  --sd-muted: #A7B5C9;
  --sd-border: #718298;
  --sd-divider: #405168;
  --sd-focus: #65C47F;
  --sd-selected: #253C34;
  --sd-action: #65C47F;
  --sd-action-ink: #132B1C;
  --sd-tile-hover: #243044;
  --sd-tile-error: #F294A3;
  --sd-tile-warning: #E8C477;
  --sd-dock-fill: #243044;
  --sd-dock-shadow: 0 8px 24px #02081566;

  /* offline-workspace rev2: this banner only, not global warning tokens. */
  --sd-offline-banner-fill: #45361C;
  --sd-offline-banner-border: #E0AE4C;
  --sd-offline-banner-text: #FFE5AB;
}

[data-stercus-theme="light"] {
  /* light-final + buttons; older shortlist colors are intentionally absent. */
  --sd-canvas: #E5EBF2;
  --sd-surface: #FFFFFF;
  --sd-field: #F3F6FA;
  --sd-raised: #E4EBF2;
  --sd-text: #1B293B;
  --sd-muted: #506174;
  --sd-border: #738297;
  --sd-divider: #C3D0DD;
  --sd-focus: #1D5E91;
  --sd-selected: #E0EDF8;
  --sd-action: #167441;
  --sd-action-ink: #FFFFFF;
  --sd-tile-hover: #F3F6FA;
  --sd-tile-error: #B92F49;
  --sd-tile-warning: #946300;
  --sd-dock-fill: #FFFFFF;
  --sd-dock-shadow: 0 8px 24px #1B293B2E;
  --sd-offline-banner-fill: #FFF1CD;
  --sd-offline-banner-border: #996600;
  --sd-offline-banner-text: #674300;
}

@media (prefers-reduced-motion: reduce) {
  [data-stercus-theme] {
    --sd-control-duration: 0ms;
    --sd-menu-duration: 0ms;
    --sd-overlay-duration: 0ms;
    --sd-tooltip-delay: 0ms;
    --sd-tooltip-duration: 0ms;
    --sd-content-duration: 0ms;
    --sd-disclosure-duration: 0ms;
    --sd-toast-enter-duration: 0ms;
    --sd-toast-exit-duration: 0ms;
  }
}
