/*
  render-amethyst-dark.css — the Amethyst Dark Render layer
  token map aligned to BU-CORE-UIUX-001 §4.1, 2026-07-03
  ===========================================================================
  Fires when data-theme="amethyst-dark" on the document root.

  © BeltUp LLC. All rights reserved. This render file is part of the BU
  Framework, a proprietary design system owned by BeltUp LLC — shared
  framework skin, first implemented in the ViralDecay product line.
  Contact: admin@beltup.net

  AUTHORITY: owner ruling R-S8-04 (docs\rulings\BU-RULINGS-CAPTURE_2026-07-03_S8.md
  lines 52-71). The prior absolute amethyst firewall (BUP-UI-THEME-001) is
  REFINED, not repealed: Fight Night + Cobalt Dark remain the untouchable
  flagship skins and per-surface defaults; Amethyst Dark/Light join the suite
  as an ADDITIONAL OPTION only — palette values, BU Framework shared skin.
  BRANDING BAN REMAINS ABSOLUTE (R-S8-04 item 3): no "ViralDecay"/"VD" in any
  user-visible string, label, or skin display name anywhere in this file or
  its consumers. Source-citation comments naming VD file paths are permitted
  under provenance law — that is what the citations below are.

  SOURCING CLASS: MEASURED-FROM-SHARED-FRAMEWORK.
  Every value below is extracted from the live ViralDecay render, the BU
  Framework's own amethyst implementation (read-only source; palette
  extraction only, per task scope):
    N:\Source\BeltUpLLC\ViralDecay\ViralDecay.Ui\wwwroot\app.css
  corroborated against the same product's admin surface stylesheet:
    N:\Source\BeltUpLLC\ViralDecay\ViralDecay.Ui\wwwroot\css\admin-stub.css
  app.css's own header (lines 1-10) identifies itself as "BU Framework —
  Amethyst Dark Render" — i.e. this IS the shared framework's amethyst
  render, not a VD-exclusive artifact; extraction is provenance-tracing the
  BU Framework token values back to their first (and, until this file,
  only) implementation.

  Token law (D-S07-NS-02 / D-S07-TOKEN-01/-02): --theme-* prefix only; no
  --bu-, no --vd-, no raw hex outside this Render file. Token NAMES match
  render-cobalt-dark.css's canonical §4.1 dialect (this file is structured
  as its direct sibling — same selector list, values only differ) so the
  switcher only ever changes the data-theme attribute, never markup or
  classes (D-S07-FW-01: structure never forks per skin).
  ===========================================================================
*/

:root[data-theme="amethyst-dark"] {
  /* --- Surfaces -----------------------------------------------------------
     Canvas: app.css:50 (--theme-bg-canvas: #000000).
     Surface (header/footer/structural bars): app.css:51 (--theme-bg-surface: #0d0614).
     Frosted panel fill: app.css:52 (--theme-bg-frosted: linear-gradient(135deg,
     rgba(13,6,20,0.8) 0%, rgba(53,21,107,0.15) 100%)).
     Card / deeper surface: app.css:53 (--theme-bg-card: #070310).
     Border-inactive: app.css:68 (#3c225c), corroborated admin-stub.css:36,119,195.
     Border-active: app.css:69 (#a855f7), corroborated admin-stub.css:32 hover state. */
  --theme-bg-canvas: #000000;
  --theme-bg-surface: #0d0614;
  --theme-bg-frosted: linear-gradient(135deg, rgba(13, 6, 20, 0.8) 0%, rgba(53, 21, 107, 0.15) 100%);
  --theme-bg-card: #070310;
  --theme-x-bg-sunken: #000000;
  --theme-border-inactive: #3c225c;
  --theme-border-active: #a855f7;

  /* --- Text roles -----------------------------------------------------------
     Main: app.css:64 (--theme-text-main: #F3F0F7).
     Muted: app.css:65 (--theme-text-muted: #B0A0C4 — app.css's own comment notes
     "4.8:1 — passes WCAG AA (was #9486A8 3.2:1, fixed this session)").
     Secondary/dim tones corroborated from admin-stub.css: #c9b8e8 (line 10, card
     body text), #8a6db0 (line 105, dim link/metric text), #6b3fa0 (line 27, link/
     secondary accent), #5a4080 (line 56, muted meta/dim text). --theme-x-text-
     secondary uses admin-stub.css's #c9b8e8 (line 10) as the mid-step between
     --theme-text-main and --theme-text-muted, matching the three-ink hierarchy
     pattern used by render-cobalt-dark.css's #ffffff/#aaaaaa/#888888 triplet. */
  --theme-text-main: #f3f0f7;
  --theme-x-text-secondary: #c9b8e8;
  --theme-text-muted: #b0a0c4;
  --theme-x-text-inverse: #000000;
  --theme-x-text-disabled: #5a4080;

  /* --- Interactive states -----------------------------------------------
     Accent (amethyst): app.css:56 (--theme-accent-primary: #A855F7),
     corroborated admin-stub.css:53 (#a855f7, .adm-title).
     Secondary accent: app.css:57 (--theme-accent-secondary: #e67e22 — labeled
     "orange — FUEL ONLY, never subscriptions" in the source; carried here as
     the dialect's required secondary-accent token, not applied to
     subscription/brand surfaces per the source's own restriction).
     Glow: app.css:59 (rgba(168,85,247,0.22)).
     Secondary glow: app.css:60 (rgba(230,126,34,0.22)).
     Hover tone: admin-stub.css:203-204 (.adm-card:hover border #6b3fa0,
     background rgba(168,85,247,0.05)) — #6b3fa0 used as the hover-state hex,
     a genuinely distinct measured value from the flat accent-primary. */
  --theme-accent-primary: #a855f7;
  --theme-accent-secondary: #e67e22;
  --theme-x-accent-hover: #6b3fa0;
  --theme-x-accent-active: #a855f7;
  --theme-x-accent-disabled: rgba(168, 85, 247, 0.4);
  --theme-x-accent-text: #ffffff;
  --theme-x-focus-ring: #a855f7;

  /* --- Feedback colors ----------------------------------------------------
     Healthy: app.css:72 (#00ff66). Warning: app.css:73 (#D97706). Error:
     app.css:74 (#F25660). All three corroborated in admin-stub.css's
     .adm-status modifiers (lines 156-158: is-live #00ff66, is-scaffold
     #D97706, is-locked #5a4080). */
  --theme-state-healthy: #00ff66;
  --theme-state-warning: #d97706;
  --theme-state-error: #f25660;
  --theme-x-state-info: #a855f7;

  /* --- Elevation / glass effects ------------------------------------------
     Panel shadow: app.css:402 (.bu-panel box-shadow: 0 0 15px
     var(--theme-accent-glow), inset 0 0 6px rgba(168,85,247,0.08)).
     Hover panel shadow: app.css:408 (0 0 25px accent-glow, inset 0 0 8px
     rgba(168,85,247,0.08)).
     Blur: app.css:77 (--theme-backdrop-blur: blur(16px)) — canonical value,
     also the exact value the VD scaffold files (render-amethyst-dark.css /
     -light.css on the VD side) hard-code as "MUST stay non-empty and equal
     to the value in app.css." Page-scrim blur: app.css:82
     (blur(10px) saturate(0.65)). */
  --theme-x-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --theme-x-elevation-2: 0 0 15px rgba(168, 85, 247, 0.22);
  --theme-x-elevation-3: 0 0 25px rgba(168, 85, 247, 0.22);
  --theme-accent-glow: 0 0 15px rgba(168, 85, 247, 0.22);
  --theme-accent-glow-secondary: 0 0 15px rgba(230, 126, 34, 0.22);
  --theme-x-glass-tint: rgba(168, 85, 247, 0.05);
  --theme-backdrop-blur: 16px;
  --theme-x-page-scrim-blur: blur(10px) saturate(0.65);

  /* --- Spacing / typography scale -----------------------------------------
     Font family: app.css:15-23 self-hosts 'JetBrains Mono' / 'Roboto
     Condensed' / 'Inter' (vendor-neutral, no CDN — four-pillars audit
     2026-07-02 per app.css:12-14's own comment). Per D-S07-NS-02 the Render
     layer expresses type CHOICE via the structural font variable, not a raw
     @font-face here — same approach as render-cobalt-dark.css, since no
     font-loading mechanism is documented for this BeltUp Online app's asset
     pipeline; flagged, not wired, to avoid inventing a font-loading strategy
     not present in any BeltUp Online source file. */
  --theme-x-font-family-base: var(--structure-font-family);
  --theme-x-font-size-sm: 0.875rem;
  --theme-x-font-size-base: 1rem;
  --theme-x-font-size-lg: 1.25rem;
  --theme-x-font-size-xl: 1.75rem;
  --theme-x-line-height-base: 1.5;
  --theme-x-space-unit: 0.5rem;
}

/* Applies the token set to the page. Structural rules remain in the Primer;
   these rules mirror render-cobalt-dark.css's selector list 1:1 so Amethyst
   Dark reuses the identical structural surface (D-S07-FW-01). */
:root[data-theme="amethyst-dark"] body {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] a {
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] h1,
:root[data-theme="amethyst-dark"] h2,
:root[data-theme="amethyst-dark"] h3,
:root[data-theme="amethyst-dark"] h4,
:root[data-theme="amethyst-dark"] h5,
:root[data-theme="amethyst-dark"] h6 {
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] p,
:root[data-theme="amethyst-dark"] li {
  color: var(--theme-x-text-secondary);
}

:root[data-theme="amethyst-dark"] .bu-panel {
  background-color: var(--theme-bg-surface);
  border: 1px solid var(--theme-border-inactive);
  border-top: 2px solid var(--theme-border-active);
  border-bottom: 2px solid var(--theme-border-active);
  box-shadow: var(--theme-x-elevation-2);
  backdrop-filter: blur(var(--theme-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--theme-backdrop-blur));
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] .bu-rail {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--theme-border-inactive);
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] .bu-soffit {
  border-top: 1px solid var(--theme-border-inactive);
  color: var(--theme-text-muted);
  font-size: var(--structure-text-sm, 0.875rem);
}

:root[data-theme="amethyst-dark"] .bu-soffit a {
  color: var(--theme-text-muted);
}

:root[data-theme="amethyst-dark"] .bu-soffit a:hover {
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] .bu-brick {
  color: var(--theme-x-text-secondary);
}

:root[data-theme="amethyst-dark"] .bu-badge-tag {
  background-color: var(--theme-bg-card);
  border: 1px solid var(--theme-border-active);
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] .bu-control {
  background-color: var(--theme-bg-surface);
  border-color: var(--theme-border-active);
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] .bu-control:hover {
  background-color: var(--theme-x-accent-hover);
  color: var(--theme-x-text-inverse);
}

:root[data-theme="amethyst-dark"] .bu-control:focus-visible {
  outline: 2px solid var(--theme-x-focus-ring);
  outline-offset: 2px;
}

/* --- Buttons -----------------------------------------------------------
   Primary button fill: app.css:532-533 (.bu-btn--primary background-color:
   var(--theme-accent-primary)) — a solid accent fill, distinct from Cobalt
   Dark's translucent glass-recipe button; this is the source's own measured
   button treatment, not an invented divergence.
   Hover: app.css:551-553 (opacity 0.9, box-shadow 0 0 15px accent-glow). */
:root[data-theme="amethyst-dark"] .bu-btn {
  background-color: var(--theme-accent-primary);
  border-top: 2px solid var(--theme-border-active);
  border-bottom: 2px solid var(--theme-border-active);
  border-left-color: transparent;
  border-right-color: transparent;
  color: var(--theme-x-accent-text);
}

:root[data-theme="amethyst-dark"] .bu-btn:hover {
  background-color: var(--theme-x-accent-hover);
  border-top-color: var(--theme-x-accent-hover);
  border-bottom-color: var(--theme-x-accent-hover);
}

:root[data-theme="amethyst-dark"] .bu-btn:disabled {
  background-color: rgba(168, 85, 247, 0.15);
  border-top-color: var(--theme-x-accent-disabled);
  border-bottom-color: var(--theme-x-accent-disabled);
  color: var(--theme-x-text-disabled);
}

/* Ghost/secondary button: app.css:564-586 (.bu-btn--ghost — transparent
   fill, 1px solid border-inactive; hover border-color accent-primary,
   background rgba(168,85,247,0.1), box-shadow 0 0 15px rgba(168,85,247,0.2)). */
:root[data-theme="amethyst-dark"] .bu-btn-secondary {
  background-color: transparent;
  border-color: var(--theme-border-active);
  color: var(--theme-text-main);
}

:root[data-theme="amethyst-dark"] .bu-btn-secondary:hover {
  background-color: rgba(168, 85, 247, 0.1);
  border-color: var(--theme-x-accent-hover);
  color: var(--theme-text-main);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

/* PG-035 demo skin switcher active-selection state (D-S07-SKIN-02 switcher UI). */
:root[data-theme="amethyst-dark"] .bu-btn-secondary.is-active {
  background-color: var(--theme-accent-primary);
  border-color: var(--theme-accent-primary);
  color: var(--theme-x-accent-text);
}

:root[data-theme="amethyst-dark"] .bu-btn:focus-visible,
:root[data-theme="amethyst-dark"] .bu-btn-secondary:focus-visible {
  outline: 2px solid var(--theme-x-focus-ring);
  outline-offset: 2px;
}

:root[data-theme="amethyst-dark"] .bu-gate {
  background-color: var(--theme-x-glass-tint);
  backdrop-filter: blur(var(--theme-backdrop-blur));
}

/* Brand lockup accent: the "UP" half of BELT|UP carries the accent hue, the
   rest inherits .bu-nav-brand's text colour. Uniform across every skin per
   D-S07-SKIN-02 (no partial-skin fallthrough) — added 2026-08-21 when an audit
   found this styled in only 2 of 20 skins. Uses the standard accent token, NOT
   the lighter hover tone. */
:root[data-theme="amethyst-dark"] .bu-nav-brand span {
  color: var(--theme-accent-primary);
}

/* ==== #234 CONSTRUCTION FAMILY BEGIN ==== (SENTRY RAILS, family 1 of 8) ====
   Skin "amethyst-dark" belongs to the SENTRY RAILS construction family. Colour variants of one
   family share this construction and differ only in the variables above. */
/* family variables: derived from this skin's own palette; contrast pairs verified >= 4.5:1 (fill/ink), >= 3:1 (edge, focus) against the canvas */
:root[data-theme="amethyst-dark"] {
  --fam-edge: #a855f7;
  --fam-hi: #e9d5ff;
  --fam-hov: #e9d5ff;
  --fam-fill: #a855f7;
  --fam-ink: #000000;
  --fam-deep: #4c1d95;
  --fam-focus: #e9d5ff;
  --fam-glow: color-mix(in srgb, #a855f7 55%, transparent);
}

/* ===========================================================================
   CONSTRUCTION FAMILY 1 of 8 — SENTRY RAILS  [#234 / R-0823-01 / R-0823-02]
   Reference: panel-theme-kit.html ("SENTRY floating panel"): etched glass held
   between two segmented light rails, corner ticks, faint circuit etching.
   Frame strategy: rails DETACHED from the pane (outside it, with a dark gap),
   cut into segments of unequal length; four corner ticks; no box border.
   Light source: the rails emit (drop-shadow glow); the pane only catches it.
   Palette discipline: one cool accent on near-black, depth tone for the rail
   foot. Type: light weight, wide tracking, labels as outlined tabs.
   [PILLAR-1: Gestalt closure + figure/ground -- the rails read as a frame
   without enclosing the text, keeping the reading area free of lines.]
   =========================================================================== */
:root[data-theme="amethyst-dark"] body {
  overflow-x: clip;
  background-image:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--fam-deep) 55%, transparent) 0%, transparent 58%),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--fam-edge) 7%, transparent) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--fam-edge) 7%, transparent) 0 1px, transparent 1px 72px);
  background-repeat: no-repeat, repeat, repeat;
}
:root[data-theme="amethyst-dark"] .bu-panel {
  border: 0;
  border-radius: 0;
  isolation: isolate;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: var(--theme-bg-canvas);
  background-image:
    linear-gradient(var(--fam-edge), var(--fam-edge)), linear-gradient(var(--fam-edge), var(--fam-edge)),
    linear-gradient(var(--fam-edge), var(--fam-edge)), linear-gradient(var(--fam-edge), var(--fam-edge)),
    linear-gradient(var(--fam-edge), var(--fam-edge)), linear-gradient(var(--fam-edge), var(--fam-edge)),
    linear-gradient(var(--fam-edge), var(--fam-edge)), linear-gradient(var(--fam-edge), var(--fam-edge)),
    linear-gradient(115deg, transparent 48%, color-mix(in srgb, var(--fam-edge) 14%, transparent) 48.4%, transparent 49%),
    linear-gradient(-72deg, transparent 62%, color-mix(in srgb, var(--fam-edge) 14%, transparent) 62.3%, transparent 63%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 60%),
    linear-gradient(var(--theme-bg-surface), var(--theme-bg-surface));
  background-repeat: no-repeat;
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom, 0 0, 0 0, 0 0, 0 0;
  background-size: 20px 1px, 1px 20px, 20px 1px, 1px 20px, 20px 1px, 1px 20px, 20px 1px, 1px 20px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--fam-edge) 22%, transparent),
    inset 0 0 60px -26px var(--fam-edge),
    0 30px 70px -44px #000;
}
:root[data-theme="amethyst-dark"] .bu-panel:not(.bu-drawer):not(.bu-slideout-content):not(.bu-report-widget-panel) { margin-block: 6px; }
:root[data-theme="amethyst-dark"] .bu-panel::before,
:root[data-theme="amethyst-dark"] .bu-panel::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  height: 5px;
  pointer-events: none;
  /* four segments of unequal length, each its own gradient layer. (A mask would clip the
     drop-shadow bloom, because filter runs before mask, so the segments are drawn directly.) */
  background-image:
    linear-gradient(180deg, var(--fam-hi), var(--fam-edge) 45%, var(--fam-deep)),
    linear-gradient(180deg, var(--fam-hi), var(--fam-edge) 45%, var(--fam-deep)),
    linear-gradient(180deg, var(--fam-hi), var(--fam-edge) 45%, var(--fam-deep)),
    linear-gradient(180deg, var(--fam-hi), var(--fam-edge) 45%, var(--fam-deep));
  background-repeat: no-repeat;
  background-size: 52% 100%, 7.5% 100%, 2.5% 100%, 31% 100%;
  background-position: 0% 0, 58.92% 0, 65.64% 0, 100% 0;
  filter: drop-shadow(0 0 7px var(--fam-glow));
}
:root[data-theme="amethyst-dark"] .bu-panel::before { top: -10px; }
:root[data-theme="amethyst-dark"] .bu-panel::after { bottom: -10px; transform: scale(-1, -1); }

:root[data-theme="amethyst-dark"] h1, :root[data-theme="amethyst-dark"] h2, :root[data-theme="amethyst-dark"] h3 { font-weight: 300; letter-spacing: 0.05em; overflow-wrap: break-word; }
:root[data-theme="amethyst-dark"] .bu-panel h2, :root[data-theme="amethyst-dark"] .bu-panel h3, :root[data-theme="amethyst-dark"] .bu-panel-title, :root[data-theme="amethyst-dark"] .bu-panel-headline {
  text-shadow: 0 0 28px color-mix(in srgb, var(--fam-edge) 40%, transparent);
}
:root[data-theme="amethyst-dark"] .bu-panel-sublabel, :root[data-theme="amethyst-dark"] .bu-badge-tag, :root[data-theme="amethyst-dark"] .bu-metric-label, :root[data-theme="amethyst-dark"] .bu-panel-footnote {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: var(--structure-text-xs, 0.75rem);
}
/* wide-tracked label tab: outlined, with a light wash running out of it */
:root[data-theme="amethyst-dark"] .bu-badge-tag, :root[data-theme="amethyst-dark"] .bu-panel-sublabel {
  border: 1px solid var(--fam-edge);
  border-radius: 0;
  padding: 0.35rem 0.8rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fam-edge) 16%, transparent), transparent);
  color: var(--fam-hi);
}
:root[data-theme="amethyst-dark"] .bu-rail {
  border-bottom: 1px solid color-mix(in srgb, var(--fam-edge) 30%, transparent);
  background-image: linear-gradient(90deg, transparent 0 8%, var(--fam-edge) 8% 38%, transparent 38% 40%, var(--fam-edge) 40% 46%, transparent 46% 100%);
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}
:root[data-theme="amethyst-dark"] .bu-nav-links a { letter-spacing: 0.12em; }
:root[data-theme="amethyst-dark"] .bu-nav-links a:hover, :root[data-theme="amethyst-dark"] .bu-nav-links a.active {
  color: var(--fam-hi);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  text-decoration-color: var(--fam-edge);
}
:root[data-theme="amethyst-dark"] .bu-btn {
  background: var(--fam-fill);
  border: 1px solid var(--fam-fill);
  border-radius: 2px;
  color: var(--fam-ink);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 2px 0 color-mix(in srgb, #fff 55%, transparent), 0 0 18px -4px var(--fam-glow);
}
:root[data-theme="amethyst-dark"] .bu-btn:hover { background: var(--fam-hov); border-color: var(--fam-hov); color: var(--fam-ink); box-shadow: inset 0 2px 0 #fff, 0 0 26px -2px var(--fam-glow); }
:root[data-theme="amethyst-dark"] .bu-btn-secondary {
  background: transparent;
  border: 1px solid var(--fam-edge);
  border-radius: 2px;
  color: var(--fam-hi);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 0 14px -6px var(--fam-edge);
}
:root[data-theme="amethyst-dark"] .bu-btn-secondary:hover { background: color-mix(in srgb, var(--fam-edge) 18%, transparent); border-color: var(--fam-hi); color: var(--fam-hi); }
:root[data-theme="amethyst-dark"] .bu-btn-secondary.is-active { background: var(--fam-fill); border-color: var(--fam-fill); color: var(--fam-ink); }
:root[data-theme="amethyst-dark"] .bu-control, :root[data-theme="amethyst-dark"] .bu-field input[type="text"], :root[data-theme="amethyst-dark"] .bu-field input[type="email"], :root[data-theme="amethyst-dark"] .bu-field input[type="tel"],
:root[data-theme="amethyst-dark"] .bu-field input[type="password"], :root[data-theme="amethyst-dark"] .bu-field input[type="number"], :root[data-theme="amethyst-dark"] .bu-field select, :root[data-theme="amethyst-dark"] .bu-field textarea,
:root[data-theme="amethyst-dark"] input.bu-input, :root[data-theme="amethyst-dark"] select.bu-input, :root[data-theme="amethyst-dark"] textarea.bu-input {
  background: color-mix(in srgb, var(--theme-bg-canvas) 70%, var(--theme-bg-card));
  border: 1px solid color-mix(in srgb, var(--fam-edge) 55%, transparent);
  border-bottom: 2px solid var(--fam-edge);
  border-radius: 2px;
  color: var(--theme-text-main);
}
:root[data-theme="amethyst-dark"] .bu-control:hover, :root[data-theme="amethyst-dark"] .bu-field input:hover, :root[data-theme="amethyst-dark"] .bu-field select:hover, :root[data-theme="amethyst-dark"] .bu-field textarea:hover { border-color: var(--fam-hi); background: color-mix(in srgb, var(--theme-bg-canvas) 70%, var(--theme-bg-card)); color: var(--theme-text-main); }
:root[data-theme="amethyst-dark"] .bu-table th, :root[data-theme="amethyst-dark"] .bu-table td { border-bottom: 1px solid color-mix(in srgb, var(--fam-edge) 22%, transparent); }
:root[data-theme="amethyst-dark"] .bu-table th { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 400; }
:root[data-theme="amethyst-dark"] .bu-progress-track {
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, var(--theme-bg-canvas) 22px 26px);
}

/* --- shared floors every family honours (state tokens, focus, option list) --- */
:root[data-theme="amethyst-dark"] .bu-field select option,
:root[data-theme="amethyst-dark"] select.bu-input option {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-main);
}
:root[data-theme="amethyst-dark"] .bu-btn:focus-visible,
:root[data-theme="amethyst-dark"] .bu-btn-secondary:focus-visible,
:root[data-theme="amethyst-dark"] .bu-control:focus-visible,
:root[data-theme="amethyst-dark"] .bu-field input:focus-visible,
:root[data-theme="amethyst-dark"] .bu-field select:focus-visible,
:root[data-theme="amethyst-dark"] .bu-field textarea:focus-visible,
:root[data-theme="amethyst-dark"] .bu-input:focus-visible,
:root[data-theme="amethyst-dark"] .bu-nav-links a:focus-visible,
:root[data-theme="amethyst-dark"] .bu-tab-btn:focus-visible {
  outline: 2px solid var(--fam-focus);
  outline-offset: 2px;
}
:root[data-theme="amethyst-dark"] .bu-btn:disabled,
:root[data-theme="amethyst-dark"] .bu-btn-secondary:disabled {
  background: transparent;
  border-color: var(--theme-x-accent-disabled);
  color: var(--theme-x-text-disabled);
  box-shadow: none;
  filter: none;
}
:root[data-theme="amethyst-dark"] .bu-status-dot.is-healthy { background: var(--theme-state-healthy); }
:root[data-theme="amethyst-dark"] .bu-status-dot.is-warning,
:root[data-theme="amethyst-dark"] .bu-status-dot.is-alert { background: var(--theme-state-warning); }
:root[data-theme="amethyst-dark"] .bu-status-dot.is-error { background: var(--theme-state-error); }
:root[data-theme="amethyst-dark"] .bu-field-error { color: var(--theme-state-error); }
/* --- overlay / scroll-container panels (Admin drawers, slide-outs, the report widget) ---
   A family frame is drawn on pseudo-elements and a plate that would scroll away with the
   content, and some panel margins would leave a closed drawer peeking in. Overlay panels
   therefore get a solid attached fill, one plain outline, no pseudo frame, no clip. */
:root[data-theme="amethyst-dark"] .bu-drawer, :root[data-theme="amethyst-dark"] .bu-slideout-content, :root[data-theme="amethyst-dark"] .bu-report-widget-panel {
  clip-path: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: var(--theme-bg-canvas);
  background-image: linear-gradient(var(--theme-bg-surface), var(--theme-bg-surface));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 0;
  border: 1px solid var(--fam-edge);
  box-shadow: none;
  isolation: auto;
}
:root[data-theme="amethyst-dark"] .bu-drawer::before, :root[data-theme="amethyst-dark"] .bu-drawer::after,
:root[data-theme="amethyst-dark"] .bu-slideout-content::before, :root[data-theme="amethyst-dark"] .bu-slideout-content::after,
:root[data-theme="amethyst-dark"] .bu-report-widget-panel::before, :root[data-theme="amethyst-dark"] .bu-report-widget-panel::after { content: none; }

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="amethyst-dark"] .bu-btn, :root[data-theme="amethyst-dark"] .bu-btn-secondary { transition: none; transform: none; }
}
:root[data-reduced-motion="true"][data-theme="amethyst-dark"] .bu-btn,
:root[data-reduced-motion="true"][data-theme="amethyst-dark"] .bu-btn-secondary { transition: none; transform: none; }
/* ==== #234 CONSTRUCTION FAMILY END ==== */
