/* ============================================================================
   PULSE PRIMITIVES — the surface, type and control primitives the PUBLIC SITE
   is built from. Loaded by /index.html only; the tool's equivalents live in
   theme.css. Both consume tokens.css and neither redefines a token.

   This file used to carry its own dark-only palette, which is why the homepage
   had no light mode: the primitives were written against colour names (--void,
   --glow, --edge) that have no light-mode answer. They are role names now, so
   every rule below paints correctly in both modes without a single mode-aware
   selector. Adding a mode here would be the bug, not the feature.

   Meant to be adopted verbatim by other properties (memory-manager first), so
   nothing page-specific belongs in here. Page CSS consumes these primitives; it
   never redefines them.

   The rule that makes the theme read as expensive rather than loud: --accent is
   light, not paint. It appears in box-shadow and in hairline borders. It is
   almost never a fill, and never a large one.
   ============================================================================ */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----------------------------------------------------------------------------
   The room — a lit backdrop built from gradients rather than an image, so it
   costs nothing and scales to any viewport. Apply to a fixed, -1 z-index layer.
   -------------------------------------------------------------------------- */

.room-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: var(--room-layers);
}

/* ----------------------------------------------------------------------------
   Surface primitives.
   -------------------------------------------------------------------------- */

.glass {
  background: linear-gradient(150deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: var(--shadow-lift), inset 0 1px 0 var(--glass-inset);
}

/* The lit top edge that sells the pane as physical. Requires positioned parent. */
.glass-sheen::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 22%;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(180deg, var(--sheen), transparent);
  pointer-events: none;
}

/* ----------------------------------------------------------------------------
   Type primitives.
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-tech);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
}

.label {
  font-family: var(--font-tech);
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-mid);
}

.numeral {
  font-family: var(--font-mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

/* ----------------------------------------------------------------------------
   Controls.
   -------------------------------------------------------------------------- */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--dur) var(--ease),
              box-shadow    var(--dur) var(--ease),
              color         var(--dur) var(--ease),
              transform     var(--dur) var(--ease);
}

.icon-btn:hover:not(:disabled),
.icon-btn:focus-visible {
  border-color: var(--line-hot);
  box-shadow: 0 0 16px var(--accent-glow);
  color: var(--accent);
}

.icon-btn:disabled { opacity: 0.3; cursor: default; }

/* One visible focus treatment everywhere on this property, keyboard-only. The
   tool uses a ring instead, which is why this is here and not in tokens.css. */
:focus-visible {
  outline: 1px solid var(--line-hot);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------------------
   Status dots — the only place the semantic colours are allowed to be fills.
   -------------------------------------------------------------------------- */

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--neutral);
}

.dot.green { background: var(--ok);   box-shadow: 0 0 9px var(--ok); }
.dot.amber { background: var(--warn); box-shadow: 0 0 9px var(--warn); }
.dot.red   { background: var(--bad);  box-shadow: 0 0 9px var(--bad); }
