/*
  render-the-garden-dark.css — "The Garden Dark" (SKIN-G09) Render layer
  token map aligned to BU-CORE-UIUX-001 §4.1, 2026-07-03
  ===========================================================================
  Fires when data-theme="the-garden-dark". ARENA/GAMIFIED category
  (student-facing only per BUP-UI-THEME-001 Rule 2). Phase 2 target.

  SOURCING CLASS: [AUTHORED PROPOSAL -- pending owner approval; no source
  values existed]. BUP-UI-SKIN-002 SKIN-G09 (lines 100-104) describes this
  skin only in prose: "deep purple or deep navy backgrounds with pink and
  lavender accents and glow effects... dramatic, elegant, glowing... the
  color is pinker/more violet rather than deep amethyst" -- an EXPLICIT,
  documented instruction to stay warm-pink-violet rather than ViralDecay's
  cool deep amethyst #8B5CF6 (catalog line 96, 103). The accent hue below is
  chosen warmer/pinker than #8B5CF6 specifically to honor that documented
  distinction, not to invent an arbitrary purple.

  Contrast check (WCAG AA, BUP-UI-SKIN-001 L-9): text-primary #f7ecf5 on
  canvas #150a1a = ~16.8:1. text-secondary #d1a8cc on canvas = ~9.8:1 --
  passes 4.5:1 minimum.
  ===========================================================================
*/

:root[data-theme="the-garden-dark"] {
  --theme-bg-canvas: #150a1a;
  --theme-bg-surface: rgba(255, 230, 250, 0.05);
  --theme-bg-frosted: var(--theme-bg-surface); /* alias — dialect has no distinct frosted-fill token; §4.1 requires this name, value derived from bg-surface */
  --theme-bg-card: rgba(255, 230, 250, 0.08);
  --theme-x-bg-sunken: #150a1a;
  --theme-border-inactive: rgba(255, 230, 250, 0.14);
  --theme-border-active: #d456b0;

  --theme-text-main: #f7ecf5;
  --theme-x-text-secondary: #d1a8cc;
  --theme-text-muted: #a081a0;
  --theme-x-text-inverse: #150a1a;
  --theme-x-text-disabled: #5c4a58;

  --theme-accent-primary: #d456b0;
  --theme-accent-secondary: var(--theme-accent-primary); /* alias — no distinct secondary accent hue exists in sources; §4.1 requires this name */
  --theme-x-accent-hover: #ec7ecb;
  --theme-x-accent-active: #ab3f8c;
  --theme-x-accent-disabled: rgba(212, 86, 176, 0.4);
  --theme-x-accent-text: #150a1a;
  --theme-x-focus-ring: #ec7ecb;

  --theme-state-healthy: #4dbb8a;
  --theme-state-warning: #d9a23a;
  --theme-state-error: #ff6b8a;
  --theme-x-state-info: #b07ed8;

  --theme-x-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --theme-x-elevation-2: 0 15px 35px rgba(0, 0, 0, 0.35);
  --theme-x-elevation-3: 0 0 24px rgba(212, 86, 176, 0.5);
  --theme-accent-glow: 0 0 24px rgba(212, 86, 176, 0.5); /* derived — same glow value as --theme-x-elevation-3 (measured/authored glow shadow); §4.1 requires this name */
  --theme-accent-glow-secondary: 0 0 24px rgba(212, 86, 176, 0.5); /* derived — no distinct secondary glow exists in sources; aliased to primary glow value */
  --theme-x-glass-tint: rgba(255, 230, 250, 0.05);
  --theme-backdrop-blur: 22px;

  --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;
}

/* Structural selector list mirrors render-greyscale-skeleton.css / render-fight-night.css
   1:1 (R-S7-10 / D-S07-FW-01: structure never forks per skin — value-only skin). */
:root[data-theme="the-garden-dark"] body {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-main);
}

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

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

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

:root[data-theme="the-garden-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="the-garden-dark"] .bu-rail {
  background-color: rgba(21, 10, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--theme-border-inactive);
  color: var(--theme-text-main);
}

:root[data-theme="the-garden-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="the-garden-dark"] .bu-soffit a {
  color: var(--theme-text-muted);
}

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

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

:root[data-theme="the-garden-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="the-garden-dark"] .bu-control {
  background-color: var(--theme-bg-surface);
  border-color: var(--theme-border-active);
  color: var(--theme-text-main);
}

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

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

:root[data-theme="the-garden-dark"] .bu-btn {
  background-color: rgba(255, 230, 250, 0.1);
  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="the-garden-dark"] .bu-btn:hover {
  background-color: rgba(255, 230, 250, 0.17);
  border-top-color: var(--theme-x-accent-hover);
  border-bottom-color: var(--theme-x-accent-hover);
}

:root[data-theme="the-garden-dark"] .bu-btn:disabled {
  background-color: rgba(255, 230, 250, 0.04);
  border-top-color: var(--theme-x-accent-disabled);
  border-bottom-color: var(--theme-x-accent-disabled);
  color: var(--theme-x-text-disabled);
}

:root[data-theme="the-garden-dark"] .bu-btn-secondary {
  background-color: transparent;
  border-color: var(--theme-border-active);
  color: var(--theme-text-main);
}

:root[data-theme="the-garden-dark"] .bu-btn-secondary:hover {
  border-color: var(--theme-x-accent-hover);
  color: var(--theme-x-accent-hover);
}

/* PG-035 demo skin switcher active-selection state (D-S07-SKIN-02 switcher UI). */
:root[data-theme="the-garden-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="the-garden-dark"] .bu-btn:focus-visible,
:root[data-theme="the-garden-dark"] .bu-btn-secondary:focus-visible {
  outline: 2px solid var(--theme-x-focus-ring);
  outline-offset: 2px;
}

:root[data-theme="the-garden-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="the-garden-dark"] .bu-nav-brand span {
  color: var(--theme-accent-primary);
}

/* ==== #234 CONSTRUCTION FAMILY BEGIN ==== (SPATIAL GLASS, family 7 of 8) ====
   Skin "the-garden-dark" belongs to the SPATIAL GLASS 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="the-garden-dark"] {
  --fam-edge: #d456b0;
  --fam-hi: #ec7ecb;
  --fam-hov: #ec7ecb;
  --fam-fill: #d456b0;
  --fam-ink: #150a1a;
  --fam-deep: #5a1d4b;
  --fam-focus: #ec7ecb;
  --fam-glow: color-mix(in srgb, #d456b0 55%, transparent);
  --theme-text-muted: #a88ba8; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --fam-glass: rgba(255, 255, 255, 0.10);
  --fam-glass-line: rgba(255, 255, 255, 0.24);
  --fam-glass-chip: rgba(255, 255, 255, 0.14);
  --fam-pool-1: #5a1d4b;
  --fam-pool-2: #3a1d66;
  --fam-pool-3: #0c3b44;
  --fam-pool-4: #4a2a10;
}

/* ===========================================================================
   CONSTRUCTION FAMILY 7 of 8 — SPATIAL GLASS  [#234 / R-0823-01 / R-0823-02]
   Reference: six-terminals.html 06 "Spatial Glass -- visionOS, real AR rules".
   Frame strategy: NO drawn frame. A heavily rounded slab of real frosted
   glass: translucent fill, strong backdrop blur + saturation, a 1px specular
   edge and a top inner highlight. Depth comes from the soft drop shadow and
   from the coloured light pools the glass sits in front of (body).
   Light source: the page behind the glass (four tinted pools); the glass
   itself does not glow.
   Palette discipline: soft multi-hue pools, white-ish glass, ink stays the
   skin's own main text colour.
   Type: system sans, semibold, tight tracking, sentence case (no caps voice).
   backdrop-filter is used here WITHOUT clip-path (#228): the roundness comes
   from border-radius only.
   [PILLAR-1: Fitts + Gestalt common region -- large rounded targets; the glass
   plane is the single grouping cue.]
   =========================================================================== */
:root[data-theme="the-garden-dark"] body {
  background-image:
    radial-gradient(58% 40% at 18% 12%, var(--fam-pool-1) 0%, transparent 62%),
    radial-gradient(50% 38% at 84% 22%, var(--fam-pool-2) 0%, transparent 62%),
    radial-gradient(52% 40% at 68% 88%, var(--fam-pool-3) 0%, transparent 62%),
    radial-gradient(46% 34% at 12% 82%, var(--fam-pool-4) 0%, transparent 62%);
  background-repeat: no-repeat;
  background-attachment: scroll;
}
:root[data-theme="the-garden-dark"] .bu-panel {
  border-radius: 26px;
  border: 1px solid var(--fam-glass-line);
  background-color: var(--fam-glass);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  box-shadow: 0 26px 60px -20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  clip-path: none;
}
:root[data-theme="the-garden-dark"] .bu-panel::before, :root[data-theme="the-garden-dark"] .bu-panel::after { content: none; }
:root[data-theme="the-garden-dark"] h1, :root[data-theme="the-garden-dark"] h2, :root[data-theme="the-garden-dark"] h3 { font-weight: 600; letter-spacing: -0.01em; overflow-wrap: break-word; }
:root[data-theme="the-garden-dark"] .bu-panel-sublabel, :root[data-theme="the-garden-dark"] .bu-badge-tag, :root[data-theme="the-garden-dark"] .bu-metric-label, :root[data-theme="the-garden-dark"] .bu-panel-footnote { font-weight: 600; letter-spacing: 0.01em; }
:root[data-theme="the-garden-dark"] .bu-badge-tag { background: var(--fam-glass-chip); border: 1px solid var(--fam-glass-line); border-radius: 5px; padding: 0.25rem 0.6rem; }
:root[data-theme="the-garden-dark"] .bu-rail {
  background-color: var(--fam-glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--fam-glass-line);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.25);
}
:root[data-theme="the-garden-dark"] .bu-nav-links a:hover, :root[data-theme="the-garden-dark"] .bu-nav-links a.active { background: var(--fam-glass-chip); border-radius: 5px; color: var(--theme-text-main); text-decoration: none; }
:root[data-theme="the-garden-dark"] .bu-btn {
  background: var(--fam-fill);
  border: 1px solid var(--fam-fill);
  border-radius: 5px;
  color: var(--fam-ink);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 18px -8px rgba(0, 0, 0, 0.5);
}
:root[data-theme="the-garden-dark"] .bu-btn:hover { background: var(--fam-hov); border-color: var(--fam-hov); color: var(--fam-ink); }
:root[data-theme="the-garden-dark"] .bu-btn-secondary {
  background: var(--fam-glass-chip);
  border: 1px solid var(--fam-glass-line);
  border-radius: 5px;
  color: var(--theme-text-main);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
:root[data-theme="the-garden-dark"] .bu-btn-secondary:hover { background: var(--fam-glass-line); color: var(--theme-text-main); border-color: var(--fam-edge); }
:root[data-theme="the-garden-dark"] .bu-btn-secondary.is-active { background: var(--fam-fill); border-color: var(--fam-fill); color: var(--fam-ink); }
:root[data-theme="the-garden-dark"] .bu-control, :root[data-theme="the-garden-dark"] .bu-field input[type="text"], :root[data-theme="the-garden-dark"] .bu-field input[type="email"], :root[data-theme="the-garden-dark"] .bu-field input[type="tel"],
:root[data-theme="the-garden-dark"] .bu-field input[type="password"], :root[data-theme="the-garden-dark"] .bu-field input[type="number"], :root[data-theme="the-garden-dark"] .bu-field select, :root[data-theme="the-garden-dark"] .bu-field textarea,
:root[data-theme="the-garden-dark"] input.bu-input, :root[data-theme="the-garden-dark"] select.bu-input, :root[data-theme="the-garden-dark"] textarea.bu-input {
  background: var(--fam-glass-chip);
  border: 1px solid var(--fam-edge);
  border-radius: 5px;
  color: var(--theme-text-main);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}
:root[data-theme="the-garden-dark"] .bu-control:hover, :root[data-theme="the-garden-dark"] .bu-field input:hover, :root[data-theme="the-garden-dark"] .bu-field select:hover, :root[data-theme="the-garden-dark"] .bu-field textarea:hover { background: var(--fam-glass); color: var(--theme-text-main); border-color: var(--fam-hi); }
:root[data-theme="the-garden-dark"] .bu-table th, :root[data-theme="the-garden-dark"] .bu-table td { border-bottom: 1px solid var(--fam-glass-line); }
:root[data-theme="the-garden-dark"] .bu-table th { font-weight: 600; }

/* --- shared floors every family honours (state tokens, focus, option list) --- */
:root[data-theme="the-garden-dark"] .bu-field select option,
:root[data-theme="the-garden-dark"] select.bu-input option {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-main);
}
:root[data-theme="the-garden-dark"] .bu-btn:focus-visible,
:root[data-theme="the-garden-dark"] .bu-btn-secondary:focus-visible,
:root[data-theme="the-garden-dark"] .bu-control:focus-visible,
:root[data-theme="the-garden-dark"] .bu-field input:focus-visible,
:root[data-theme="the-garden-dark"] .bu-field select:focus-visible,
:root[data-theme="the-garden-dark"] .bu-field textarea:focus-visible,
:root[data-theme="the-garden-dark"] .bu-input:focus-visible,
:root[data-theme="the-garden-dark"] .bu-nav-links a:focus-visible,
:root[data-theme="the-garden-dark"] .bu-tab-btn:focus-visible {
  outline: 2px solid var(--fam-focus);
  outline-offset: 2px;
}
:root[data-theme="the-garden-dark"] .bu-btn:disabled,
:root[data-theme="the-garden-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="the-garden-dark"] .bu-status-dot.is-healthy { background: var(--theme-state-healthy); }
:root[data-theme="the-garden-dark"] .bu-status-dot.is-warning,
:root[data-theme="the-garden-dark"] .bu-status-dot.is-alert { background: var(--theme-state-warning); }
:root[data-theme="the-garden-dark"] .bu-status-dot.is-error { background: var(--theme-state-error); }
:root[data-theme="the-garden-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="the-garden-dark"] .bu-drawer, :root[data-theme="the-garden-dark"] .bu-slideout-content, :root[data-theme="the-garden-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="the-garden-dark"] .bu-drawer::before, :root[data-theme="the-garden-dark"] .bu-drawer::after,
:root[data-theme="the-garden-dark"] .bu-slideout-content::before, :root[data-theme="the-garden-dark"] .bu-slideout-content::after,
:root[data-theme="the-garden-dark"] .bu-report-widget-panel::before, :root[data-theme="the-garden-dark"] .bu-report-widget-panel::after { content: none; }

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