/*
 * Procedural Press — shared theme tokens.
 *
 * Amber phosphor is the default (muted P3 amber on warm brown-black).
 * Palettes are one-line switches. A later user config can do:
 *
 *   document.documentElement.dataset.theme = 'green';  // or 'amber'
 *
 * or set <html data-theme="green">. Do not add a toggle UI here.
 *
 * Keep this block in sync with the duplicated tokens in archive-style.css
 * (Buttondown paste cannot import this file).
 */

:root,
[data-theme="amber"] {
  --bg: #16100a;
  --bg-card: #120c08;
  --bg-input: #1c140c;
  --accent: #c98620;        /* muted amber, not neon */
  --accent-mid: #a86e18;
  --accent-dim: #8a5e18;
  --accent-faint: #5a3c10;
  --text: #e8d4a8;
  --text-muted: #b89660;
  --glow: rgba(201, 134, 32, 0.16);
  --scanline-opacity: 0.035;
  --ink: #3a2410;
  --accent-bright: #e8c070;
  --wash: rgba(201, 134, 32, 0.06);
  --wash-strong: rgba(201, 134, 32, 0.12);
  --surface: rgba(22, 16, 10, 0.5);

  /* aliases so older --green* rules keep working */
  --green: var(--accent);
  --green-mid: var(--accent-mid);
  --green-dim: var(--accent-dim);
  --green-faint: var(--accent-faint);
}

[data-theme="green"] {
  --bg: #0f1b0f;
  --bg-card: #0a150a;
  --bg-input: #001a00;
  --accent: #4caf4c;        /* softened from #33ff33 */
  --accent-mid: #3d8f3d;
  --accent-dim: #2d6b2d;
  --accent-faint: #1a4a1a;
  --text: #d0e8c8;
  --text-muted: #7aaa70;
  --glow: rgba(76, 175, 76, 0.16);
  --scanline-opacity: 0.035;
  --ink: #0a4a0a;
  --accent-bright: #8fd48f;
  --wash: rgba(76, 175, 76, 0.06);
  --wash-strong: rgba(76, 175, 76, 0.12);
  --surface: rgba(0, 20, 0, 0.5);

  --green: var(--accent);
  --green-mid: var(--accent-mid);
  --green-dim: var(--accent-dim);
  --green-faint: var(--accent-faint);
}

/* Faint phosphor scanlines — almost gone; opacity from --scanline-opacity */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, var(--scanline-opacity)) 3px,
    rgba(0, 0, 0, var(--scanline-opacity)) 6px
  );
  pointer-events: none;
  z-index: 100;
}
