/* Reset, type primitives, motion keyframes, accessibility fallbacks. */

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--stage);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The page itself never scrolls — only the list and the inspector body do. */
.app-root {
  height: 100dvh;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
}

button { cursor: pointer; }

/* Wins over the `display: flex` the chassis panels set on themselves. */
[hidden] { display: none !important; }

button:disabled { cursor: default; }

svg { display: block; }

/* --- typography primitives ------------------------------------------------ */

.d {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.m {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Mono labels are single-line by contract. */
.m--clip {
  overflow: hidden;
  text-overflow: ellipsis;
}

.eyebrow {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bone45);
  white-space: nowrap;
}

.clip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule {
  height: 1px;
  background: rgba(237, 235, 230, 0.1);
}

.spacer { flex: 1; }

.over-content { text-shadow: 0 1px 10px rgba(8, 9, 11, 0.9); }
.over-content-lg { text-shadow: 0 4px 26px rgba(8, 9, 11, 0.7); }

/* --- dots ---------------------------------------------------------------- */

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tint, var(--bone));
  box-shadow: 0 0 8px var(--tint, var(--bone));
  flex-shrink: 0;
}

.dot--breathe { animation: sp-breathe var(--breathe-dur) ease-in-out infinite; }
.dot--slow { animation: sp-breathe 3.4s ease-in-out infinite; }

/* --- motion -------------------------------------------------------------- */

@keyframes sp-breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.95; }
}

@keyframes sp-sheen {
  0% { transform: translateX(-140%) skewX(-18deg); }
  55%, 100% { transform: translateX(240%) skewX(-18deg); }
}

@keyframes sp-pulse {
  0% { transform: scale(0.4); opacity: 0.85; }
  100% { transform: scale(1); opacity: 0; }
}

@keyframes sp-prepend {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: none; }
}

/* --- focus --------------------------------------------------------------- */

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--standby);
  outline-offset: 2px;
  border-radius: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- reduced transparency: glass becomes the opaque chassis --------------- */

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .glass--panel,
  .glass--chip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--shell) !important;
  }

  .glass::before,
  .glass--panel::before,
  .glass--chip::before { display: none; }
}
