/* boas.dev — Amber Protocol (Light Mode) Design Tokens
 * Amber phosphor on cream vellum — never white.
 * L4-5 cannot execute in amber mode.
 * Generated from boas-dev.json v1.0.0
 */

:root[data-mode="amber"],
.boas-amber {
  /* ─── Core Palette ─── */
  --c-bg: #f5f0e8;
  --c-bg-raised: #ede8dc;
  --c-primary: #b45309;
  --c-primary-glow: rgba(180, 83, 9, 0.2);
  --c-text-primary: #1a1a1a;
  --c-text-secondary: #5a5040;
  --c-text-muted: #9a9080;
  --c-border: rgba(0, 0, 0, 0.08);
  --c-border-active: rgba(180, 83, 9, 0.25);

  /* ─── Status Palette ─── */
  --c-warning: #92400e;
  --c-danger: #b91c1c;
  --c-info: #1e40af;
  --c-accent: #0e7490;

  /* ─── Peak accent — deep warm ink (replaces phosphor #39FF14 in amber) ─── */
  --c-primary-hot: #7c2d12;

  /* ─── Intensity baselines — defaults at L1 (no signal) ───
     Mirrors dark.css :root baseline. Intensity overrides below
     set per-level values; these ensure non-intensified amber
     elements resolve tokens via cascade without falling back. */
  --glow-opacity: 0;
  --scanline-opacity: 0;
  --noise-opacity: 0;

  /* ─── Amber overrides ─── */
  --caret-color: #b45309;
  --glass-bg: rgba(237, 232, 220, 0.9);
  --glass-border: 1px solid rgba(180, 83, 9, 0.15);

  /* ─── Amber glow (warm shadow, not phosphor) ─── */
  --glow-shadow: 0 2px 8px rgba(180, 83, 9, 0.2);

  /* ─── Paper grain ─── */
  --grain-opacity: 0;
  --grain-blend: multiply;
  --grain-sprite: url("./boas-filters.svg#grain-amber");

  /* ─── Elevation — radiographic warm paper shadows ─── */
  --elev-0: none;
  --elev-1: 0 1px 2px rgba(120, 70, 20, 0.08), 0 1px 3px rgba(120, 70, 20, 0.04);
  --elev-2: 0 2px 6px rgba(120, 70, 20, 0.12), 0 4px 12px rgba(120, 70, 20, 0.06);
  --elev-3: 0 4px 12px rgba(120, 70, 20, 0.16), 0 8px 24px rgba(120, 70, 20, 0.08);

  /* ─── Tempo ─── */
  /* SUPERSEDED 2026-04-27 — operator directive: no functional variations
     between dark and amber. All motion durations match dark. Aesthetic
     re-imagination pending; tokens kept for cascade compatibility. */
  --tempo-scale: 1;
  --t-fast: 120ms;
  --t-med: 240ms;
  --t-slow: 480ms;
  --stagger-initial: 400ms;        /* parity with dark default */
  --loop-interval-scale: 1;

  /* ─── Interaction ─── */
  --focus-ring: 2px solid var(--c-primary);
  --focus-ring-offset: 2px;
  --focus-glow: 0 0 8px rgba(180, 83, 9, 0.4);
  --disabled-opacity: 0.45;

  /* ─── Viz ladder ─── */
  --viz-1: var(--c-primary);
  --viz-2: var(--c-accent);
  --viz-3: #d97706;
  --viz-4: #f59e0b;
  --viz-max-series: 4;

  /* ─── Vignette L-scaling ─── */
  --vignette-opacity: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Signal Level Overrides — Amber
   Only L1-3 are valid in amber mode.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.boas-amber [data-intensity="1"],
:root[data-mode="amber"] [data-intensity="1"] {
  --glow-opacity: 0;
  --scanline-opacity: 0;
  --noise-opacity: 0;
  --glow-shadow: none;
}

.boas-amber [data-intensity="2"],
:root[data-mode="amber"] [data-intensity="2"] {
  --glow-opacity: 0.15;
  --scanline-opacity: 0;
  --noise-opacity: 0.01;
  --glow-shadow: 0 1px 4px rgba(180, 83, 9, 0.15);
  --grain-opacity: 0.04;
  --vignette-opacity: 0.06;
}

.boas-amber [data-intensity="3"],
:root[data-mode="amber"] [data-intensity="3"] {
  --glow-opacity: 0.25;
  --scanline-opacity: 0;
  --noise-opacity: 0.02;
  --glow-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
  --grain-opacity: 0.08;
  --vignette-opacity: 0.10;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Amber Texture Substitutions
   Paper grain replaces scanlines.
   Warm shadows replace phosphor glow.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.boas-amber .boas-scanlines::before,
:root[data-mode="amber"] .boas-scanlines::before {
  /* Paper grain texture instead of scanlines */
  background: none;
  opacity: 0;
}

.boas-amber .boas-glow,
:root[data-mode="amber"] .boas-glow {
  text-shadow: var(--glow-shadow, none);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Amber Text Density — REMOVED 2026-04-27
   Operator directive: no functional variations between dark and amber.
   Body density rule was paper-conceit-rooted and caused geometry drift
   (e.g. <summary> height drift +5.36px in dual-mode-showcase verify).
   Density choices are per-component, not mode-driven.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* .boas-density-prose retained as inert no-op for backward-compat with
   any consuming artifact that references the class. */
:root[data-mode="amber"] .boas-density-prose {
  /* intentionally empty — prose density opt-in is no-op post-supersession */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Amber UI-Controls Density Carve-Out
   constellation-apollo-027 — Option D (universal control reset).
   Density rule above inherits into UI controls via cascade and drifts
   geometry between modes (toggle bug 2026-04-26: 32.84px dark → 41.59px
   amber on identical markup). Controls must be geometry-stable across
   modes — color carries feedback, not size.

   Selector enumerates interactive surfaces that should NOT inherit prose
   density. Single-line label assumed. Multi-line edge cases opt back in
   via .boas-density-prose.

   Resets line-height only. Letter-spacing intentionally NOT reset:
   `--tracking-label: 0.08em` is already defined fleet-wide in
   boas-vars-dark.css:28; resetting amber controls to it would override
   per-control local letter-spacing rules (e.g. .mode-toggle button's
   explicit .14em) and drift width between modes — opposite-direction
   bug. Body density's letter-spacing (0.005em) inheritance into controls
   is sub-pixel and not a geometry failure.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root[data-mode="amber"] :is(
  button,
  [role="button"],
  .chip,
  .badge,
  .pill,
  input,
  select,
  textarea
) {
  line-height: 1;
}

/* Note: <summary> intentionally excluded. Summary content is prose-density
   disclosure label; geometry-stability is governed by per-element rules in
   section-patterns.md, not the control carve-out. */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Amber Grain Mechanic — hook for .boas-grain wrappers
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root[data-mode="amber"] .boas-grain {
  position: relative;
}

:root[data-mode="amber"] .boas-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain-sprite);
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Amber Vignette — warm paper edge with L-scaling
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root[data-mode="amber"] .boas-vignette::after {
  background: radial-gradient(
    ellipse at center,
    transparent 65%,
    rgba(180, 83, 9, var(--vignette-opacity)) 100%
  );
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Composition Ceiling — degradation selector
   Primitives marked overflow render static in amber.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root[data-mode="amber"] .amber-degrade-motion,
:root[data-mode="amber"] [data-viz-overflow="true"] {
  animation: none !important;
  animation-play-state: paused !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Glitch Aesthetic — Amber Register
   Codified 2026-04-25 — see library/design/boas-dev/glitch-aesthetic.md

   Translation principle:
     phosphor (emissive) -> print (reflective).
   Scanlines and emissive glow have NO paper analogue and are
   structurally suppressed. Channel split becomes CMYK plate
   misregistration (warm-yellow + cool-cyan, <=1px). Hot accent
   becomes deep warm ink. Vignette becomes warm hotspot
   (no edge-darkening - cream paper does not vignette dark).

   Tokens parity with boas-vars-dark.css. Same names, amber values.
   Tier ladder composition deferred.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root[data-mode="amber"] {
  /* Scanlines - STRUCTURALLY SUPPRESSED (no paper analogue) */
  --glitch-scanline-color:    transparent;
  --glitch-scanline-opacity:  0;
  --glitch-scanline-period:   2px;

  /* Hex grid - letterpress watermark, warm ochre */
  --glitch-hex-stroke:        rgba(180, 83, 9, 0.03);
  --glitch-hex-tile-w:        60px;
  --glitch-hex-tile-h:        52px;

  /* Channel split - CMYK plate misregistration (NOT RGB) */
  --glitch-chroma-offset:     1px;
  --glitch-chroma-l-color:    rgba(212, 150, 40, 0.10);
  --glitch-chroma-r-color:    rgba(40, 90, 120, 0.08);

  /* Phosphor glow stack - STRUCTURALLY SUPPRESSED (no emissive in amber)
     Use --elev-2 / --elev-3 for emphasis depth (radiographic, first-offset 0). */
  --glitch-glow-sm:           none;
  --glitch-glow-md:           none;
  --glitch-glow-lg:           none;

  /* Hot accent - deep warm ink (replaces #39FF14 saturated peak) */
  --glitch-hot-accent:        #7c2d12;

  /* Vignette / hotspot - warm hotspot only, no edge-darkening */
  --glitch-hotspot-color:     rgba(255, 250, 240, 0.04);
  --glitch-vignette-edge:     rgba(180, 83, 9, 0.06);

  /* Emissive panel chrome - REPLACED by --elev-* radiographic shadow */
  --glitch-panel-chrome:      var(--elev-2);
}

/* .boas-chroma helpers inherit from boas-vars-dark.css; the token overrides
   above re-color the ::before / ::after pseudos and shrink offset.
   .boas-scanlines::after stays in DOM but renders transparent (opacity 0). */