/* ============================================================
   ATLAS — application base
   Blazor WASM boot/error chrome + the empty content-region
   placeholder, tokenized to the Atlas substrate. The token system
   lives in tokens.css; the chrome layout in chrome.css. Surface
   view styles (Landing, Bundles, …) land with their surfaces.
   ============================================================ */

/* ---------- Button toggled state (primitive variant) ----------
   Lifted from the design handoff's app.css .btn--active rule. The
   verbatim tokens.css carries .btn / .btn--primary / .btn--ghost /
   .btn--icon; the toggled cyan-tint state lives here because it is
   not in the design's tokens.css. Consumed by the Button primitive's
   is-active variant (spec §9; the triage filter uses it next cycle). */
.btn--active {
  color: var(--cyan-ink);
  border-color: var(--cyan-dim);
  background: var(--cyan-tint);
}

/* FocusOnNavigate (App.razor) moves focus to the page <h1> on every navigation for
   screen-reader users; it sets tabindex="-1" on the target. That programmatic focus
   shouldn't paint a visible ring — the heading isn't a keyboard-tabbable control.
   Interactive controls keep their keyboard focus ring (they are not tabindex=-1). */
[tabindex="-1"]:focus { outline: none; }

/* ---------- Empty content-region placeholder ----------
   Home (and NotFound) render this until the operational surfaces land.
   Honest, quiet, no fabricated operator data. */
.atlas-placeholder {
  padding: 48px 32px;
  max-width: 640px;
}
.atlas-placeholder h1 {
  margin: 0 0 12px;
  font-size: var(--t-h3);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg-1);
}
.atlas-placeholder p {
  margin: 0 0 6px;
  font-size: var(--t-body);
  color: var(--fg-3);
  line-height: 1.5;
}
.atlas-placeholder p.mono {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--fg-4);
  letter-spacing: 0.02em;
}

/* ---------- Blazor boot progress ---------- */
.loading-progress {
  position: relative;
  display: block;
  width: 7rem;
  height: 7rem;
  margin: 22vh auto 1rem auto;
}
.loading-progress circle {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 0.4rem;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}
.loading-progress circle:last-child {
  stroke: var(--cyan);
  stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
  transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
  position: absolute;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  color: var(--fg-3);
  inset: calc(22vh + 3.25rem) 0 auto 0;
}
.loading-progress-text:after {
  content: var(--blazor-load-percentage-text, "Loading");
}

/* ---------- Blazor unhandled-error bar ---------- */
#blazor-error-ui {
  background: var(--bg-tint-red);
  border-top: 1px solid color-mix(in oklab, var(--red) 40%, var(--line));
  color: var(--fg-1);
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.4);
  display: none;
  left: 0;
  padding: 0.8rem 1.4rem 0.8rem 1.4rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  font-size: var(--t-body);
}
#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.9rem;
  top: 0.6rem;
  color: var(--fg-3);
}
#blazor-error-ui .reload {
  color: var(--cyan);
}
