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

  SOURCING CLASS: [AUTHORED PROPOSAL -- pending owner approval; no source
  values existed]. BUP-UI-SKIN-002 SKIN-G07 (lines 86-91) describes this
  skin only in prose: "Bright, cheerful, welcoming... yellows, oranges,
  bright greens... light, happy, energetic, safe, approachable... the
  antithesis of Fight Night." No hex values exist. This file authors a
  warm-orange accent on a soft cream canvas -- deliberately the lightest,
  warmest skin in the suite per the catalog's explicit design principle
  ("NOT the dark arena aesthetic").

  Contrast check (WCAG AA, BUP-UI-SKIN-001 L-9): text-primary #2b2013 on
  canvas #fff8ec = ~14.6:1. text-secondary #6b5638 on canvas = ~6.5:1 --
  passes 4.5:1 minimum.
  ===========================================================================
*/

:root[data-theme="the-playground"] {
  --theme-bg-canvas: #fff8ec;
  --theme-bg-surface: rgba(255, 140, 40, 0.06);
  --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, 140, 40, 0.1);
  --theme-x-bg-sunken: #fff8ec;
  --theme-border-inactive: rgba(255, 140, 40, 0.2);
  --theme-border-active: #ff8c28;

  --theme-text-main: #2b2013;
  --theme-x-text-secondary: #6b5638;
  --theme-text-muted: #8c795c;
  --theme-x-text-inverse: #fff8ec;
  --theme-x-text-disabled: #bdae94;

  --theme-accent-primary: #ff8c28;
  --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: #ffa64d;
  --theme-x-accent-active: #e06f10;
  --theme-x-accent-disabled: rgba(255, 140, 40, 0.35);
  --theme-x-accent-text: #2b2013;
  --theme-x-focus-ring: #ff8c28;

  --theme-state-healthy: #4dbb5f;
  --theme-state-warning: #ffca3a;
  --theme-state-error: #ff5c5c;
  --theme-x-state-info: #4d9fff;

  --theme-x-elevation-1: 0 1px 3px rgba(43, 32, 19, 0.08);
  --theme-x-elevation-2: 0 8px 20px rgba(43, 32, 19, 0.1);
  --theme-x-elevation-3: 0 0 20px rgba(255, 140, 40, 0.4);
  --theme-accent-glow: 0 0 20px rgba(255, 140, 40, 0.4); /* derived — same glow value as --theme-x-elevation-3 (measured/authored glow shadow); §4.1 requires this name */
  --theme-accent-glow-secondary: 0 0 20px rgba(255, 140, 40, 0.4); /* derived — no distinct secondary glow exists in sources; aliased to primary glow value */
  --theme-x-glass-tint: rgba(255, 140, 40, 0.06);
  --theme-backdrop-blur: 12px;

  --theme-x-font-family-base: var(--structure-font-family);
  --theme-x-font-size-sm: 0.9375rem;
  --theme-x-font-size-base: 1.0625rem;
  --theme-x-font-size-lg: 1.375rem;
  --theme-x-font-size-xl: 1.875rem;
  --theme-x-line-height-base: 1.6;
  --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-playground"] body {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-main);
}

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

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

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

:root[data-theme="the-playground"] .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-playground"] .bu-rail {
  background-color: rgba(255, 248, 236, 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-playground"] .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-playground"] .bu-soffit a {
  color: var(--theme-text-muted);
}

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

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

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

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

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

:root[data-theme="the-playground"] .bu-btn {
  background-color: rgba(255, 140, 40, 0.16);
  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-playground"] .bu-btn:hover {
  background-color: rgba(255, 140, 40, 0.26);
  border-top-color: var(--theme-x-accent-hover);
  border-bottom-color: var(--theme-x-accent-hover);
}

:root[data-theme="the-playground"] .bu-btn:disabled {
  background-color: rgba(255, 140, 40, 0.05);
  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-playground"] .bu-btn-secondary {
  background-color: transparent;
  border-color: var(--theme-border-active);
  color: var(--theme-text-main);
}

:root[data-theme="the-playground"] .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-playground"] .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-playground"] .bu-btn:focus-visible,
:root[data-theme="the-playground"] .bu-btn-secondary:focus-visible {
  outline: 2px solid var(--theme-x-focus-ring);
  outline-offset: 2px;
}

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

/* --- Footer band -----------------------------------------------------------
   Ported 2026-08-21 to close a partial-skin fallthrough: this family was
   coloured in only 1 of 20 Public skins, so the footer rendered untinted and
   dividerless in every other skin (D-S07-SKIN-02). Token-for-token identical to
   render-greyscale-skeleton.css — no new values invented; each token resolves
   to this skin's own palette. */
:root[data-theme="the-playground"] .bu-footer {
  border-top: 2px solid var(--theme-border-inactive);
  background-color: var(--theme-bg-surface);
}

:root[data-theme="the-playground"] .bu-footer-heading {
  color: var(--theme-text-main);
}

:root[data-theme="the-playground"] .bu-footer-copyright {
  border-top: 1px solid var(--theme-border-inactive);
  color: var(--theme-text-muted);
}

:root[data-theme="the-playground"] .bu-footer-lab-link {
  color: var(--theme-text-muted);
}

:root[data-theme="the-playground"] .bu-link-stealth {
  color: var(--theme-text-muted);
}

:root[data-theme="the-playground"] .bu-link-stealth:hover {
  color: var(--theme-text-main);
}

/* ==== #234 CONSTRUCTION FAMILY BEGIN ==== (SOFT PAPER, family 8 of 8) ====
   Skin "the-playground" belongs to the SOFT PAPER 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-playground"] {
  --fam-edge: #c2570c;
  --fam-hi: #ff8c28;
  --fam-hov: #ff8c28;
  --fam-fill: #ff8c28;
  --fam-ink: #2b2013;
  --fam-deep: #ffe2bd;
  --fam-focus: #a84a08;
  --fam-glow: color-mix(in srgb, #c2570c 55%, transparent);
  --theme-text-muted: #74644c; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --theme-state-healthy: #30743b; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --theme-state-warning: #7d631c; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --theme-state-error: #b24040; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
}

/* ===========================================================================
   CONSTRUCTION FAMILY 8 of 8 — SOFT PAPER  [#234 / R-0823-01 / R-0823-02]
   Reference: NONE from the owner's kits -- the six terminals and SENTRY cards are
   all dark, glow-based worlds, and this family is the LIGHT, kid-safe counterpart.
   It is authored from the catalog prose (BUP-UI-SKIN-002: bright, warm, vibrant)
   and is PROPOSED for owner review, not owner-sourced.
   Frame strategy: a printed-card object -- 2px ink outline, HARD offset shadow
   in the accent (no blur), a dashed inner stitch line, and a strip of "tape"
   across the top edge.
   Light source: none (print). Depth is the offset shadow. Palette discipline:
   warm paper + ink + one bright accent; dotted-paper page.
   Type: heavy rounded-feel headings in sentence case, friendly and large.
   Interaction: buttons press INTO their shadow (translate) -- motion
   personality distinct from the glow families.
   [PILLAR-1: Fogg motivation + peak-end -- playful physical metaphors lower
   perceived effort for the youngest users; ink-on-paper keeps contrast high.]
   =========================================================================== */
:root[data-theme="the-playground"] body {
  background-image: radial-gradient(color-mix(in srgb, var(--fam-edge) 28%, transparent) 1.2px, transparent 1.7px);
  background-size: 22px 22px;
}
:root[data-theme="the-playground"] .bu-panel {
  border: 2px solid var(--theme-text-main);
  border-radius: 18px;
  isolation: isolate;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: var(--theme-bg-canvas);
  background-image: none;
  box-shadow: 6px 6px 0 var(--fam-edge);
}
:root[data-theme="the-playground"] .bu-panel:not(.bu-drawer):not(.bu-slideout-content):not(.bu-report-widget-panel) { margin: 4px 8px 8px 4px; }
:root[data-theme="the-playground"] .bu-panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: -1;
  pointer-events: none;
  border: 2px dashed color-mix(in srgb, var(--fam-edge) 45%, transparent);
  border-radius: 12px;
}
:root[data-theme="the-playground"] .bu-panel::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 64px;
  height: 18px;
  margin-left: -32px;
  pointer-events: none;
  transform: rotate(-3deg);
  background: color-mix(in srgb, var(--fam-edge) 55%, var(--theme-bg-canvas));
  border-radius: 3px;
}
:root[data-theme="the-playground"] h1, :root[data-theme="the-playground"] h2, :root[data-theme="the-playground"] h3 { font-weight: 800; letter-spacing: -0.005em; overflow-wrap: break-word; }
:root[data-theme="the-playground"] .bu-panel-sublabel, :root[data-theme="the-playground"] .bu-badge-tag, :root[data-theme="the-playground"] .bu-metric-label, :root[data-theme="the-playground"] .bu-panel-footnote { font-weight: 700; letter-spacing: 0.02em; }
:root[data-theme="the-playground"] .bu-badge-tag { background: color-mix(in srgb, var(--fam-edge) 22%, var(--theme-bg-canvas)); border: 2px solid var(--theme-text-main); border-radius: 5px; padding: 0.15rem 0.55rem; color: var(--theme-text-main); }
:root[data-theme="the-playground"] .bu-rail { border-bottom: 3px solid var(--theme-text-main); box-shadow: 0 3px 0 var(--fam-edge); }
:root[data-theme="the-playground"] .bu-nav-links a { font-weight: 700; }
:root[data-theme="the-playground"] .bu-nav-links a:hover, :root[data-theme="the-playground"] .bu-nav-links a.active { background: color-mix(in srgb, var(--fam-edge) 28%, var(--theme-bg-canvas)); color: var(--theme-text-main); border-radius: 5px; text-decoration: none; }
:root[data-theme="the-playground"] .bu-btn {
  background: var(--fam-fill);
  border: 2px solid var(--theme-text-main);
  border-radius: 5px;
  color: var(--fam-ink);
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--theme-text-main);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
:root[data-theme="the-playground"] .bu-btn:hover { background: var(--fam-fill); color: var(--fam-ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--theme-text-main); }
:root[data-theme="the-playground"] .bu-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--theme-text-main); }
:root[data-theme="the-playground"] .bu-btn-secondary {
  background: var(--theme-bg-canvas);
  border: 2px solid var(--theme-text-main);
  border-radius: 5px;
  color: var(--theme-text-main);
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--fam-edge);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
:root[data-theme="the-playground"] .bu-btn-secondary:hover { background: color-mix(in srgb, var(--fam-edge) 22%, var(--theme-bg-canvas)); color: var(--theme-text-main); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--fam-edge); }
:root[data-theme="the-playground"] .bu-btn-secondary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--fam-edge); }
:root[data-theme="the-playground"] .bu-btn-secondary.is-active { background: var(--fam-fill); color: var(--fam-ink); }
:root[data-theme="the-playground"] .bu-control, :root[data-theme="the-playground"] .bu-field input[type="text"], :root[data-theme="the-playground"] .bu-field input[type="email"], :root[data-theme="the-playground"] .bu-field input[type="tel"],
:root[data-theme="the-playground"] .bu-field input[type="password"], :root[data-theme="the-playground"] .bu-field input[type="number"], :root[data-theme="the-playground"] .bu-field select, :root[data-theme="the-playground"] .bu-field textarea,
:root[data-theme="the-playground"] input.bu-input, :root[data-theme="the-playground"] select.bu-input, :root[data-theme="the-playground"] textarea.bu-input {
  background: var(--theme-bg-canvas);
  border: 2px solid var(--theme-text-main);
  border-radius: 5px;
  color: var(--theme-text-main);
  box-shadow: 2px 2px 0 var(--fam-edge);
}
:root[data-theme="the-playground"] .bu-control:hover, :root[data-theme="the-playground"] .bu-field input:hover, :root[data-theme="the-playground"] .bu-field select:hover, :root[data-theme="the-playground"] .bu-field textarea:hover { background: var(--theme-bg-canvas); color: var(--theme-text-main); }
:root[data-theme="the-playground"] .bu-table th, :root[data-theme="the-playground"] .bu-table td { border-bottom: 2px dotted color-mix(in srgb, var(--theme-text-main) 40%, transparent); }
:root[data-theme="the-playground"] .bu-table th { font-weight: 800; }

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

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