* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 125, 48, 0.26), transparent 35%),
    radial-gradient(circle at 90% 18%, rgba(45, 173, 184, 0.22), transparent 28%),
    linear-gradient(160deg, #0b0f17 0%, #090c12 45%, #070a10 100%);
  padding: 28px clamp(14px, 3vw, 36px) 48px;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body.modal-open {
  overflow: hidden;
}

:root.light-theme body {
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 125, 48, 0.08), transparent 35%),
    radial-gradient(circle at 90% 18%, rgba(45, 173, 184, 0.08), transparent 28%),
    linear-gradient(160deg, #f9fbfd 0%, #f5f7fa 45%, #f0f3f7 100%);
}

.bg-orb {
  position: fixed;
  z-index: 0;
  width: min(38vw, 430px);
  height: min(38vw, 430px);
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.3;
  pointer-events: none;
}

.bg-orb-a {
  top: -12%;
  right: -6%;
  background: #d9662a;
  animation: drift-a 16s ease-in-out infinite alternate;
}

.bg-orb-b {
  bottom: -16%;
  left: -5%;
  background: #1d7688;
  animation: drift-b 18s ease-in-out infinite alternate;
}

.topbar,
main {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 18px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.8vw, 2.85rem);
  line-height: 1.1;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 122, 47, 0.14), rgba(42, 183, 191, 0.10)),
    var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  line-height: 1.1;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.meta.status-jump-enabled {
  cursor: pointer;
  user-select: none;
}

.meta.status-jump-enabled:hover {
  border-color: rgba(38, 185, 109, 0.5);
  transform: translateY(-1px);
}

.meta.status-jump-enabled:focus-visible {
  outline: 2px solid rgba(38, 185, 109, 0.65);
  outline-offset: 2px;
}

.mirror-ratio {
  gap: 6px;
}

.mirror-ratio[hidden] {
  display: none;
}

.mirror-ratio-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

#meta {
  gap: 10px;
}

.meta-icon {
  opacity: 0.9;
  filter: saturate(0.95);
}

.meta-label {
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.meta-value {
  color: var(--ink);
  font-weight: 600;
}

.meta-value--mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(229, 120, 61, 0.18);
}

.status-dot.warn {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(229, 120, 61, 0.18);
}

.status-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(32, 154, 94, 0.2);
  animation: breathe 2.5s ease-in-out infinite;
}

.status-dot.error {
  background: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.22);
  animation: none;
}

/* Dashboard utility: Back to top */
.back-to-top {
  position: fixed;
  right: clamp(12px, 2vw, 18px);
  bottom: clamp(12px, 2vw, 18px);
  z-index: 900;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, opacity 140ms ease;
  opacity: 0.92;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(255, 203, 72, 0.55);
  opacity: 1;
}

