/*
  render-the-academy.css — "The Academy" (SKIN-G02) Render layer
  token map aligned to BU-CORE-UIUX-001 §4.1, 2026-07-03
  ===========================================================================
  Fires when data-theme="the-academy". ARENA/GAMIFIED category (student-
  facing only per BUP-UI-THEME-001 Rule 2) -- catalog lists it under Arena
  skins (BUP-UI-SKIN-002 summary table) despite the light/executive-adjacent
  feel of its prose description.

  SOURCING CLASS: [AUTHORED PROPOSAL -- pending owner approval; no source
  values existed]. BUP-UI-SKIN-002 SKIN-G02 (lines 55-59) describes this
  skin only in prose: "Clean lines. White or near-white base with royal
  blue or cobalt accents... premium city studio, boutique, professional,
  aspirational... light, crisp, modern." No hex values exist anywhere. This
  file is authored as a LIGHT canvas variant using the same royal-blue/
  cobalt accent family the catalog names, distinguished from Cobalt Light by
  warmer near-white canvas and softer, more rounded glass treatment (per the
  "boutique studio" character description vs. Cobalt Light's "executive"
  register).

  Contrast check (WCAG AA, BUP-UI-SKIN-001 L-9): text-primary #14213d on
  canvas #fbfbfd = ~15.8:1. text-secondary #48566e on canvas = ~7.2:1 —
  passes 4.5:1 minimum.
  ===========================================================================
*/

:root[data-theme="the-academy"] {
  --theme-bg-canvas: #fbfbfd;
  --theme-bg-surface: rgba(20, 33, 61, 0.04);
  --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(20, 33, 61, 0.07);
  --theme-x-bg-sunken: #fbfbfd;
  --theme-border-inactive: rgba(20, 33, 61, 0.1);
  --theme-border-active: #2952cc;

  --theme-text-main: #14213d;
  --theme-x-text-secondary: #48566e;
  --theme-text-muted: #6b7690;
  --theme-x-text-inverse: #fbfbfd;
  --theme-x-text-disabled: #9aa3b5;

  --theme-accent-primary: #2952cc;
  --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: #3f6bea;
  --theme-x-accent-active: #1f409e;
  --theme-x-accent-disabled: rgba(41, 82, 204, 0.35);
  --theme-x-accent-text: #ffffff;
  --theme-x-focus-ring: #2952cc;

  --theme-state-healthy: #1f8a5f;
  --theme-state-warning: #b9862c;
  --theme-state-error: #c23b3b;
  --theme-x-state-info: #2952cc;

  --theme-x-elevation-1: 0 1px 2px rgba(20, 33, 61, 0.06);
  --theme-x-elevation-2: 0 12px 28px rgba(20, 33, 61, 0.1);
  --theme-x-elevation-3: 0 0 20px rgba(41, 82, 204, 0.35);
  --theme-accent-glow: 0 0 20px rgba(41, 82, 204, 0.35); /* 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(41, 82, 204, 0.35); /* derived — no distinct secondary glow exists in sources; aliased to primary glow value */
  --theme-x-glass-tint: rgba(20, 33, 61, 0.04);
  --theme-backdrop-blur: 16px;

  --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-academy"] body {
  background-color: var(--theme-bg-canvas);
  color: var(--theme-text-main);
}

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

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

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

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

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

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

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

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

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

:root[data-theme="the-academy"] .bu-btn {
  background-color: rgba(20, 33, 61, 0.05);
  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-academy"] .bu-btn:hover {
  background-color: rgba(20, 33, 61, 0.09);
  border-top-color: var(--theme-x-accent-hover);
  border-bottom-color: var(--theme-x-accent-hover);
}

:root[data-theme="the-academy"] .bu-btn:disabled {
  background-color: rgba(20, 33, 61, 0.02);
  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-academy"] .bu-btn-secondary {
  background-color: transparent;
  border-color: var(--theme-border-active);
  color: var(--theme-text-main);
}

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

:root[data-theme="the-academy"] .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-academy"] .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-academy"] .bu-footer {
  border-top: 2px solid var(--theme-border-inactive);
  background-color: var(--theme-bg-surface);
}

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

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

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

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

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

/* ==== #234 CONSTRUCTION FAMILY BEGIN ==== (SYSTEM WINDOW, family 4 of 8) ====
   Skin "the-academy" belongs to the SYSTEM WINDOW 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-academy"] {
  --fam-edge: #2952cc;
  --fam-hi: #3f6bea;
  --fam-hov: #1f409e;
  --fam-fill: #2952cc;
  --fam-ink: #ffffff;
  --fam-deep: #dfe6fa;
  --fam-focus: #2952cc;
  --fam-glow: color-mix(in srgb, #2952cc 55%, transparent);
  --theme-text-muted: #5a6379; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --theme-state-healthy: #19704d; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --theme-state-warning: #805c1e; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
  --theme-state-error: #b23636; /* AA repair (>= 4.7:1 on canvas, surface and card), hue kept semantic */
}

/* ===========================================================================
   CONSTRUCTION FAMILY 4 of 8 — SYSTEM WINDOW  [#234 / R-0823-01 / R-0823-02]
   Reference: six-terminals.html 01 "System Window -- anime minimalist".
   Frame strategy: ONE hairline frame, a ruled header strip under a centred
   small-caps title, and a short title notch on the top edge; nothing else.
   Light source: none to speak of -- a faint soft halo only (restraint).
   Palette discipline: the skin's own ink + one accent; flat surfaces.
   Type: light weight, centred headings, system voice (~0.34em tracking, small
   uppercase) reserved for the header strip label.
   [PILLAR-1: Hick's law -- the quietest family: the fewest drawn parts, so
   decisions are made on content; Nielsen heuristic 8 aesthetic/minimalist.]
   =========================================================================== */
:root[data-theme="the-academy"] body {
  background-image: radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--fam-deep) 70%, transparent), transparent 60%);
  background-repeat: no-repeat;
}
:root[data-theme="the-academy"] .bu-panel {
  border: 1px solid var(--fam-edge);
  border-radius: 0;
  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));
  box-shadow: 0 0 24px -6px color-mix(in srgb, var(--fam-edge) 30%, transparent), inset 0 0 40px -18px color-mix(in srgb, var(--fam-edge) 25%, transparent);
}
:root[data-theme="the-academy"] .bu-panel::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 44px;
  height: 3px;
  margin-left: -22px;
  pointer-events: none;
  background: var(--fam-edge);
}
:root[data-theme="the-academy"] .bu-panel::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 44px;
  height: 1px;
  margin-left: -22px;
  pointer-events: none;
  background: var(--fam-hi);
}
/* the ruled header strip: the Primer's first-child slot */
:root[data-theme="the-academy"] .bu-panel > .bu-reveal:first-child {
  border-bottom: 1px solid color-mix(in srgb, var(--fam-edge) 45%, transparent);
  padding-bottom: 0.6rem;
  text-align: center;
}
:root[data-theme="the-academy"] .bu-panel h2, :root[data-theme="the-academy"] .bu-panel h3, :root[data-theme="the-academy"] .bu-panel-title, :root[data-theme="the-academy"] .bu-panel-headline { text-align: center; font-weight: 300; letter-spacing: 0.06em; overflow-wrap: break-word; }
:root[data-theme="the-academy"] .bu-panel-sublabel, :root[data-theme="the-academy"] .bu-badge-tag, :root[data-theme="the-academy"] .bu-metric-label, :root[data-theme="the-academy"] .bu-panel-footnote {
  font-family: "Jost", var(--structure-font-family);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: var(--structure-text-xs, 0.75rem);
  font-weight: 400;
}
:root[data-theme="the-academy"] .bu-badge-tag { background: transparent; border: 1px solid var(--fam-edge); border-radius: 0; padding: 0.3rem 0.7rem; }
:root[data-theme="the-academy"] .bu-rail { border-bottom: 1px solid var(--fam-edge); }
:root[data-theme="the-academy"] .bu-nav-links a { letter-spacing: 0.08em; }
:root[data-theme="the-academy"] .bu-nav-links a:hover, :root[data-theme="the-academy"] .bu-nav-links a.active { color: var(--fam-edge); border-bottom: 1px solid var(--fam-edge); text-decoration: none; }
:root[data-theme="the-academy"] .bu-btn {
  background: var(--fam-fill);
  border: 1px solid var(--fam-fill);
  border-radius: 0;
  color: var(--fam-ink);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: none;
}
:root[data-theme="the-academy"] .bu-btn:hover { background: transparent; border-color: var(--fam-edge); color: var(--fam-edge); box-shadow: none; }
:root[data-theme="the-academy"] .bu-btn-secondary {
  background: transparent;
  border: 1px solid var(--fam-edge);
  border-radius: 0;
  color: var(--theme-text-main);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
:root[data-theme="the-academy"] .bu-btn-secondary:hover { background: var(--fam-fill); border-color: var(--fam-fill); color: var(--fam-ink); }
:root[data-theme="the-academy"] .bu-btn-secondary.is-active { background: var(--fam-fill); border-color: var(--fam-fill); color: var(--fam-ink); }
:root[data-theme="the-academy"] .bu-control, :root[data-theme="the-academy"] .bu-field input[type="text"], :root[data-theme="the-academy"] .bu-field input[type="email"], :root[data-theme="the-academy"] .bu-field input[type="tel"],
:root[data-theme="the-academy"] .bu-field input[type="password"], :root[data-theme="the-academy"] .bu-field input[type="number"], :root[data-theme="the-academy"] .bu-field select, :root[data-theme="the-academy"] .bu-field textarea,
:root[data-theme="the-academy"] input.bu-input, :root[data-theme="the-academy"] select.bu-input, :root[data-theme="the-academy"] textarea.bu-input {
  background: var(--theme-bg-canvas);
  border: 1px solid var(--fam-edge);
  border-radius: 0;
  color: var(--theme-text-main);
}
:root[data-theme="the-academy"] .bu-control:hover, :root[data-theme="the-academy"] .bu-field input:hover, :root[data-theme="the-academy"] .bu-field select:hover, :root[data-theme="the-academy"] .bu-field textarea:hover { background: var(--theme-bg-canvas); color: var(--theme-text-main); box-shadow: 0 0 0 1px var(--fam-edge); }
:root[data-theme="the-academy"] .bu-table th, :root[data-theme="the-academy"] .bu-table td { border-bottom: 1px solid color-mix(in srgb, var(--fam-edge) 35%, transparent); }
:root[data-theme="the-academy"] .bu-table th { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 400; }

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

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