* {
  box-sizing: border-box;
}

:root {
  --bg: #050507;
  --surface: rgba(20, 20, 27, 0.82);
  --surface-strong: #111117;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f7f4ee;
  --muted: #aaa6b3;
  --accent: #b8a6ff;
  --accent-strong: #8d6cff;
  --success: #87d6a5;
  --warning: #e7c77a;
  --danger: #dd8c8c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(92, 66, 160, 0.18), transparent 38%),
    radial-gradient(circle at 15% 75%, rgba(53, 74, 121, 0.12), transparent 30%),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.6) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(190, 177, 255, 0.5) 0 1px, transparent 1.5px);
  background-position: 0 0, 43px 71px;
  background-size: 120px 120px, 170px 170px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.app-shell {
  position: relative;
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.55), transparent 17%),
    #08080b;
  box-shadow: 0 0 18px rgba(161, 136, 255, 0.35);
}

.icon-button,
.back-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.25rem;
}

.screen {
  display: none;
  min-height: calc(100vh - 112px);
  animation: screenIn 0.45s ease both;
}

.screen.active {
  display: grid;
  place-items: center;
}

.hero,
.loading-content {
  width: min(100%, 650px);
  text-align: center;
}

.eyebrow,
.step-label,
.result-category {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.orb-wrap {
  position: relative;
  display: grid;
  width: 270px;
  height: 270px;
  margin: 4px auto 28px;
  place-items: center;
}

.orb-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(120, 90, 220, 0.24);
  filter: blur(55px);
  animation: breathe 4s ease-in-out infinite;
}

.orb {
  position: relative;
  display: grid;
  width: 210px;
  height: 210px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 24%, rgba(255, 255, 255, 0.2), transparent 13%),
    radial-gradient(circle at 40% 38%, #252532, #09090d 55%, #000 78%);
  box-shadow:
    inset -24px -30px 45px rgba(0, 0, 0, 0.82),
    inset 14px 10px 28px rgba(255, 255, 255, 0.04),
    0 32px 70px rgba(0, 0, 0, 0.7);
  animation: float 5s ease-in-out infinite;
}

.orb::after {
  position: absolute;
  right: 15%;
  bottom: 5%;
  width: 52%;
  height: 14%;
  content: "";
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  filter: blur(13px);
}

.orb-highlight {
  position: absolute;
  top: 23px;
  left: 42px;
  width: 76px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(12px);
  transform: rotate(-22deg);
}

.orb-window,
.mini-orb,
.result-orb {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, #33313f, #0b0b10 62%, #000);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.orb-window {
  position: relative;
  z-index: 2;
  width: 78px;
  height: 78px;
}

.orb-window span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #e9e5dd;
  color: #111117;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
}

h1 {
  max-width: 700px;
  margin: 0 auto 18px;
  font-size: clamp(2.25rem, 7vw, 4.8rem);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.35rem);
}

.hero-copy,
.panel-copy,
.result-message,
.loading-detail {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 560px;
  margin: 0 auto 30px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(135deg, #a38cff, #6e4fd8);
  box-shadow: 0 14px 34px rgba(92, 63, 190, 0.3);
}

.secondary-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.primary-button:hover,
.secondary-button:hover,
.category-card:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active,
.category-card:active {
  transform: translateY(0);
}

.full-width {
  width: 100%;
}

.disclaimer {
  max-width: 430px;
  margin: 22px auto 0;
  color: #777480;
  font-size: 0.76rem;
  line-height: 1.5;
}

.panel,
.result-card {
  width: min(100%, 610px);
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.wide-panel {
  width: min(100%, 820px);
}

.back-button {
  margin: 0 0 32px;
  padding: 0;
}

form {
  margin-top: 30px;
}

label {
  display: block;
  margin-bottom: 9px;
  color: #d8d4df;
  font-size: 0.88rem;
  font-weight: 600;
}

input[type="date"] {
  width: 100%;
  min-height: 56px;
  margin-bottom: 8px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

input[type="date"]:focus {
  border-color: rgba(184, 166, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(142, 110, 255, 0.12);
}

.error-message {
  min-height: 22px;
  margin: 0 0 16px;
  color: var(--danger);
  font-size: 0.82rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.category-card:hover {
  border-color: rgba(184, 166, 255, 0.45);
  background: rgba(184, 166, 255, 0.075);
}

.category-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: rgba(184, 166, 255, 0.1);
  font-size: 1.35rem;
}

.category-card strong {
  display: block;
  margin-bottom: 3px;
}

.category-card small {
  color: var(--muted);
  line-height: 1.35;
}

.loading-content {
  padding: 32px;
}

.mini-orb {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  animation:
    float 3s ease-in-out infinite,
    pulseGlow 2.2s ease-in-out infinite;
}

.mini-orb span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #ece8df;
  color: #0b0b0e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.progress-track,
.score-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track {
  max-width: 430px;
  margin: 28px auto 18px;
}

.progress-bar,
.score-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7052dc, #c2b2ff);
  transition: width 0.45s ease;
}

.result-card {
  width: min(100%, 680px);
}

.result-orb {
  width: 130px;
  height: 130px;
  margin: 0 auto 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.55),
    0 0 45px rgba(127, 91, 225, 0.16);
}

.result-orb span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.9rem;
  font-weight: 700;
}

.result-category,
.result-card h2 {
  text-align: center;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 12px;
  color: var(--muted);
}

.score-row strong {
  color: var(--text);
}

.result-message {
  margin: 26px 0;
  font-size: 1.02rem;
}

.factor-list {
  display: grid;
  gap: 10px;
}

.factor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.factor-name {
  color: var(--muted);
  font-size: 0.88rem;
}

.factor-value {
  font-weight: 700;
}

.validity {
  margin: 22px 0 0;
  color: #7f7b88;
  font-size: 0.78rem;
  text-align: center;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(132, 99, 225, 0.1);
  }
  50% {
    box-shadow: 0 0 55px rgba(132, 99, 225, 0.32);
  }
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 14px;
  }

  .topbar {
    height: 62px;
  }

  .screen {
    min-height: calc(100vh - 86px);
  }

  .orb-wrap {
    width: 230px;
    height: 230px;
  }

  .orb {
    width: 185px;
    height: 185px;
  }

  .panel,
  .result-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .category-grid,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 74px;
  }

  .hero-copy {
    font-size: 0.94rem;
  }
}

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

.astro-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(184, 166, 255, 0.045);
  color: #8f8a98;
  font-size: 0.76rem;
  line-height: 1.55;
}


.why-button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  padding: 0 18px;
  border: 1px solid rgba(184, 166, 255, 0.28);
  border-radius: 16px;
  background: rgba(184, 166, 255, 0.07);
  color: #dcd4ff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.why-button:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 166, 255, 0.52);
  background: rgba(184, 166, 255, 0.11);
}

.why-panel {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(7, 7, 11, 0.58);
}

.why-panel[hidden] {
  display: none;
}

.why-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.why-header h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.why-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
}

.influence-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.influence-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.influence-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
}

.influence-item.positive .influence-icon {
  background: rgba(135, 214, 165, 0.12);
  color: var(--success);
}

.influence-item.negative .influence-icon {
  background: rgba(221, 140, 140, 0.12);
  color: var(--danger);
}

.influence-item.neutral .influence-icon {
  background: rgba(231, 199, 122, 0.1);
  color: var(--warning);
}

.influence-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.influence-copy small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.influence-score {
  min-width: 42px;
  text-align: right;
  font-weight: 800;
}

.influence-score.positive {
  color: var(--success);
}

.influence-score.negative {
  color: var(--danger);
}

.influence-score.neutral {
  color: var(--warning);
}

.formula-card {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(184, 166, 255, 0.13);
  border-radius: 15px;
  background: rgba(184, 166, 255, 0.04);
}

.formula-card span,
.formula-card strong {
  display: block;
}

.formula-card span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.formula-card strong {
  font-size: 0.88rem;
}

.formula-card p {
  margin: 9px 0 0;
  color: #817d89;
  font-size: 0.75rem;
  line-height: 1.55;
}

@media (max-width: 520px) {
  .influence-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .influence-score {
    grid-column: 2;
    text-align: left;
  }
}


.space-weather-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.space-weather-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  font-size: 0.86rem;
  font-weight: 700;
}

.live-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(135, 214, 165, 0.10);
  color: var(--success);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.live-badge.fallback {
  background: rgba(231, 199, 122, 0.10);
  color: var(--warning);
}

.space-weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.space-weather-item {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
}

.space-weather-item small,
.space-weather-item span,
.space-weather-panel > p {
  color: var(--muted);
}

.space-weather-item small,
.space-weather-item strong,
.space-weather-item span {
  display: block;
}

.space-weather-item small {
  margin-bottom: 5px;
  font-size: 0.7rem;
}

.space-weather-item strong {
  margin-bottom: 3px;
  font-size: 1.35rem;
}

.space-weather-item span {
  font-size: 0.72rem;
}

.space-weather-panel > p {
  margin: 11px 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

@media (max-width: 460px) {
  .space-weather-grid {
    grid-template-columns: 1fr;
  }
}


.optional-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.optional-label {
  margin-left: 5px;
  color: #777480;
  font-size: 0.68rem;
  font-weight: 500;
}

.city-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.city-search-row input {
  margin-bottom: 0;
}

.city-search-button {
  min-width: 82px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(184, 166, 255, 0.07);
  color: #dcd4ff;
  font-weight: 700;
  cursor: pointer;
}

.city-search-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.city-results {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
}

.city-result-button {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.city-result-button:hover {
  border-color: rgba(184, 166, 255, 0.42);
}

.city-result-button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.birth-context {
  min-height: 18px;
  margin: 10px 0 0;
  color: #8f8a98;
  font-size: 0.76rem;
  line-height: 1.5;
}

.osm-credit {
  margin: 12px 0 0;
  color: #66636e;
  font-size: 0.65rem;
  text-align: center;
}

.birth-profile-panel {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(184, 166, 255, 0.13);
  border-radius: 15px;
  background: rgba(184, 166, 255, 0.035);
}

.birth-profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(231, 199, 122, 0.10);
  color: var(--warning);
  font-size: 0.68rem;
}

.profile-badge.precise {
  background: rgba(135, 214, 165, 0.10);
  color: var(--success);
}

.birth-profile-panel p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

@media (min-width: 620px) {
  .optional-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}


.natal-profile-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(184, 166, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(122, 92, 222, 0.09), transparent 38%),
    rgba(255, 255, 255, 0.025);
}

.natal-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.natal-profile-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.natal-profile-date {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.natal-planets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.natal-planet {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255,255,255,0.022);
}

.planet-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(184,166,255,0.08);
  color: #d9d0ff;
  font-size: 1.05rem;
  font-weight: 700;
}

.natal-planet strong,
.natal-planet small {
  display: block;
}

.natal-planet strong {
  font-size: 0.82rem;
}

.natal-planet small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.transits-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.transits-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.transits-title-row small {
  color: var(--muted);
  font-weight: 500;
}

.transit-list {
  display: grid;
  gap: 9px;
}

.transit-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}

.transit-tone {
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: var(--warning);
}

.transit-item.positive .transit-tone {
  background: var(--success);
}

.transit-item.negative .transit-tone {
  background: var(--danger);
}

.transit-copy strong,
.transit-copy small {
  display: block;
}

.transit-copy strong {
  font-size: 0.8rem;
}

.transit-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.transit-strength {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

@media (min-width: 680px) {
  .natal-planets-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


.forecast-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,0.025);
}

.forecast-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.forecast-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.forecast-tabs {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

.forecast-tab {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.forecast-tab.active {
  background: rgba(184,166,255,0.12);
  color: #ddd5ff;
}

.forecast-summary {
  margin: 16px 0 12px;
  padding: 13px 14px;
  border: 1px solid rgba(184,166,255,0.13);
  border-radius: 14px;
  background: rgba(184,166,255,0.04);
  color: #d9d5e2;
  line-height: 1.5;
  font-size: 0.83rem;
}

.forecast-list {
  display: grid;
  gap: 9px;
}

.forecast-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.forecast-time strong,
.forecast-time small {
  display: block;
}

.forecast-time strong {
  font-size: 0.82rem;
}

.forecast-time small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.forecast-score {
  display: flex;
  align-items: center;
  gap: 9px;
}

.forecast-score strong {
  min-width: 30px;
  text-align: right;
  font-size: 0.95rem;
}

.forecast-mini-track {
  width: 72px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.forecast-mini-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7052dc, #c2b2ff);
}

.forecast-note {
  margin: 12px 0 0;
  color: #777480;
  font-size: 0.68rem;
  line-height: 1.5;
}

@media (max-width: 540px) {
  .forecast-heading {
    display: grid;
  }

  .forecast-tabs {
    justify-self: start;
  }

  .forecast-mini-track {
    width: 54px;
  }
}


.runtime-error {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 999;
  width: min(calc(100% - 32px), 560px);
  padding: 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(221, 140, 140, 0.35);
  border-radius: 16px;
  background: rgba(20, 11, 14, 0.96);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

.runtime-error[hidden] {
  display: none;
}

.runtime-error strong,
.runtime-error span {
  display: block;
}

.runtime-error strong {
  color: #f0b1b1;
}

.runtime-error span {
  margin-top: 6px;
  color: #c7bdc5;
  font-size: .82rem;
  line-height: 1.45;
}

.runtime-error button {
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: white;
  cursor: pointer;
}


/* ============================================================
   Sphere v9 — MVP polish
   ============================================================ */

:root {
  --ease-sphere: cubic-bezier(.22,.9,.26,1);
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(117, 82, 223, 0.19), transparent 36%),
    radial-gradient(circle at 85% 60%, rgba(70, 58, 115, 0.08), transparent 30%),
    #050507;
}

.screen.active {
  animation: sphereScreenIn .55s var(--ease-sphere) both;
}

@keyframes sphereScreenIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.992);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.orb {
  animation: sphereFloat 5.5s ease-in-out infinite;
}

.orb::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 40deg,
      transparent 0deg,
      rgba(183, 166, 255, .14) 45deg,
      transparent 100deg,
      transparent 260deg,
      rgba(255,255,255,.07) 320deg,
      transparent 360deg
    );
  filter: blur(3px);
  animation: sphereHalo 11s linear infinite;
  pointer-events: none;
}

@keyframes sphereFloat {
  0%,100% { transform: translateY(0) rotate(-1deg) scale(1); }
  50% { transform: translateY(-12px) rotate(1deg) scale(1.015); }
}

@keyframes sphereHalo {
  to { transform: rotate(360deg); }
}

.primary-button {
  position: relative;
  overflow: hidden;
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255,255,255,.22) 45%,
    transparent 70%
  );
  transform: translateX(-130%);
  transition: transform .65s var(--ease-sphere);
}

.primary-button:hover::after {
  transform: translateX(130%);
}

/* onboarding */

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4,4,7,.86);
  backdrop-filter: blur(18px);
}

.onboarding-overlay[hidden] {
  display: none;
}

.onboarding-card {
  width: min(100%, 540px);
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(135,102,244,.14), transparent 42%),
    rgba(16,16,22,.96);
  box-shadow: 0 35px 100px rgba(0,0,0,.65);
}

.onboarding-step {
  display: none;
  min-height: 310px;
  align-content: center;
  text-align: center;
  animation: onboardingIn .4s var(--ease-sphere) both;
}

.onboarding-step.active {
  display: grid;
}

.onboarding-step h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.1rem);
}

.onboarding-step p:not(.eyebrow) {
  max-width: 430px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.65;
}

.onboarding-orb {
  display: grid;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #353542, #09090d 65%, #000);
  box-shadow: 0 25px 55px rgba(0,0,0,.5), 0 0 45px rgba(125,90,225,.15);
}

.onboarding-orb span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #ece8df;
  color: #111117;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.onboarding-symbols {
  margin: 0 0 24px;
  color: #b8a6ff;
  font-size: 2.4rem;
  letter-spacing: .2em;
}

.onboarding-score {
  display: grid;
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  place-items: center;
  border: 1px solid rgba(184,166,255,.25);
  border-radius: 50%;
  background: rgba(184,166,255,.07);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 8px 0 22px;
}

.onboarding-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transition: .25s ease;
}

.onboarding-dots span.active {
  width: 22px;
  background: var(--accent);
}

.onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

@keyframes onboardingIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* richer loading */

.loading-content {
  position: relative;
}

.loading-particles {
  position: absolute;
  inset: -80px -30px;
  pointer-events: none;
}

.loading-particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(184,166,255,.55);
  box-shadow: 0 0 12px rgba(184,166,255,.35);
  animation: particleDrift 4s ease-in-out infinite;
}

.loading-particles i:nth-child(1){left:10%;top:30%;animation-delay:-.8s}
.loading-particles i:nth-child(2){left:25%;top:8%;animation-delay:-2.1s}
.loading-particles i:nth-child(3){left:74%;top:14%;animation-delay:-1.4s}
.loading-particles i:nth-child(4){left:88%;top:47%;animation-delay:-2.8s}
.loading-particles i:nth-child(5){left:16%;top:77%;animation-delay:-3.2s}
.loading-particles i:nth-child(6){left:78%;top:83%;animation-delay:-.3s}

@keyframes particleDrift {
  0%,100% { transform: translateY(0) scale(.8); opacity: .25; }
  50% { transform: translateY(-14px) scale(1.3); opacity: .85; }
}

/* result polish */

.result-card {
  overflow: hidden;
}

.result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -8px 0 24px;
}

.result-chip {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: .7rem;
}

.result-chip strong {
  color: #ddd8e5;
}

.result-orb {
  transition: transform .35s var(--ease-sphere), box-shadow .35s ease;
}

.result-card:hover .result-orb {
  transform: translateY(-3px);
  box-shadow:
    0 28px 65px rgba(0,0,0,.6),
    0 0 55px rgba(127,91,225,.2);
}

.category-card {
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "→";
  position: absolute;
  right: 16px;
  opacity: 0;
  transform: translateX(-6px);
  color: var(--accent);
  transition: .2s ease;
}

.category-card:hover::after {
  opacity: .8;
  transform: none;
}

@media (max-width: 640px) {
  .onboarding-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .onboarding-step {
    min-height: 285px;
  }

  .onboarding-actions {
    grid-template-columns: 1fr;
  }

  .onboarding-actions .secondary-button {
    order: 2;
  }

  .result-card {
    padding-bottom: 30px;
  }
}


/* ============================================================
   Sphere v10 — history
   ============================================================ */

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

.history-panel {
  align-self: start;
  margin-top: 32px;
}

.history-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.history-title-row h2 {
  margin-bottom: 8px;
}

.history-clear-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(221, 140, 140, .18);
  border-radius: 999px;
  background: rgba(221, 140, 140, .05);
  color: #c99898;
  font-size: .7rem;
  cursor: pointer;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 16px;
}

.history-stat {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}

.history-stat small,
.history-stat strong {
  display: block;
}

.history-stat small {
  color: var(--muted);
  font-size: .68rem;
}

.history-stat strong {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.history-filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 0 -2px 16px;
  padding: 2px 2px 5px;
  scrollbar-width: none;
}

.history-filter-row::-webkit-scrollbar {
  display: none;
}

.history-filter {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: .7rem;
  cursor: pointer;
}

.history-filter.active {
  border-color: rgba(184,166,255,.28);
  background: rgba(184,166,255,.09);
  color: #ddd5ff;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.022);
}

.history-score {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(184,166,255,.18);
  border-radius: 50%;
  background: rgba(184,166,255,.055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.history-copy strong,
.history-copy small {
  display: block;
}

.history-copy strong {
  font-size: .82rem;
}

.history-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.history-trend {
  min-width: 48px;
  text-align: right;
  font-size: .72rem;
  font-weight: 800;
}

.history-trend.up {
  color: var(--success);
}

.history-trend.down {
  color: var(--danger);
}

.history-trend.flat {
  color: var(--muted);
}

.history-empty {
  padding: 48px 16px;
  text-align: center;
}

.history-empty[hidden] {
  display: none;
}

.history-empty-orb {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #353542, #08080c 65%, #000);
  color: #ece8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.history-empty strong {
  display: block;
}

.history-empty p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 600px) {
  .history-title-row {
    display: grid;
  }

  .history-clear-button {
    justify-self: start;
  }

  .history-stats {
    grid-template-columns: 1fr 1fr;
  }

  .history-stat:last-child {
    grid-column: 1 / -1;
  }

  .history-item {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .history-score {
    width: 50px;
    height: 50px;
  }

  .history-trend {
    grid-column: 2;
    text-align: left;
  }
}


/* ============================================================
   Sphere v11 — Living Result
   ============================================================ */

.living-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 12px;
}

.living-summary-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.living-summary-card small,
.living-summary-card strong,
.living-summary-card span {
  display: block;
}

.living-summary-card small {
  color: var(--muted);
  font-size: .67rem;
}

.living-summary-card strong {
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.living-summary-card span {
  margin-top: 4px;
  color: #817d89;
  font-size: .67rem;
  line-height: 1.4;
}

.moment-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0 22px;
}

.comparison-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(184,166,255,.035);
}

.comparison-card span,
.comparison-card strong,
.comparison-card small {
  display: block;
}

.comparison-card span {
  color: var(--muted);
  font-size: .68rem;
}

.comparison-card strong {
  margin-top: 3px;
  font-size: 1.4rem;
}

.comparison-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .68rem;
}

.comparison-arrow {
  color: var(--accent);
  opacity: .7;
}

.signal-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 22px;
}

.step-label.caution {
  color: var(--warning);
}

.signal-story-column {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
}

.signal-story-list {
  display: grid;
  gap: 8px;
}

.signal-story-item {
  display: grid;
  grid-template-columns: 8px minmax(0,1fr);
  gap: 9px;
  align-items: start;
  color: #d6d0dc;
  font-size: .76rem;
  line-height: 1.45;
}

.signal-story-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
}

.signal-story-dot.positive {
  background: var(--success);
  box-shadow: 0 0 9px rgba(135,214,165,.35);
}

.signal-story-dot.caution {
  background: var(--warning);
  box-shadow: 0 0 9px rgba(231,199,122,.3);
}

.day-curve-card {
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(184,166,255,.06), transparent 45%),
    rgba(255,255,255,.02);
}

.day-curve-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.day-curve-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

#curveBestBadge {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(135,214,165,.09);
  color: var(--success);
  font-size: .68rem;
  font-weight: 700;
}

.day-curve {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 6px;
  height: 118px;
  margin-top: 18px;
  padding: 0 2px;
}

.day-curve-bar {
  position: relative;
  min-height: 12px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(
    to top,
    rgba(112,82,220,.5),
    rgba(194,178,255,.95)
  );
  box-shadow: 0 0 14px rgba(151,126,238,.08);
  transition: transform .2s ease;
}

.day-curve-bar.best {
  box-shadow: 0 0 18px rgba(135,214,165,.23);
}

.day-curve-bar:hover {
  transform: translateY(-3px);
}

.day-curve-bar::after {
  content: attr(data-score);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  color: #aaa6b3;
  font-size: .61rem;
}

.day-curve-labels {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 8px;
  color: #716d79;
  font-size: .58rem;
  text-align: center;
}

@media (max-width: 640px) {
  .living-result-summary {
    grid-template-columns: 1fr;
  }

  .signal-story {
    grid-template-columns: 1fr;
  }

  .day-curve {
    gap: 4px;
  }

  .day-curve-bar::after {
    font-size: .56rem;
  }
}


/* Sphere v12 — category-specific guidance */

.category-guidance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 24px;
}

.guidance-block {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(135,214,165,.035);
}

.guidance-block.caution {
  background: rgba(231,199,122,.035);
}

.guidance-block small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.guidance-block p {
  margin: 0;
  color: #d4cfda;
  font-size: .77rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .category-guidance {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Sphere v13 — PWA
   ============================================================ */

.install-app-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(184,166,255,.22);
  border-radius: 999px;
  background: rgba(184,166,255,.075);
  color: #dcd4ff;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}

.install-app-button[hidden] {
  display: none;
}

.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(3,3,6,.72);
  backdrop-filter: blur(12px);
}

.install-sheet[hidden] {
  display: none;
}

.install-sheet-card {
  position: relative;
  width: min(100%, 500px);
  padding: 28px 22px 22px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(17,17,23,.98);
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
}

.install-sheet-card h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.install-sheet-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  font-size: .86rem;
}

.install-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  cursor: pointer;
}

.install-sheet-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 18px;
  background: radial-gradient(circle at 35% 25%, #373746, #09090d 65%, #000);
  color: #ece8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.connection-status {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 2400;
  transform: translateX(-50%);
  padding: 6px 10px;
  border: 1px solid rgba(231,199,122,.2);
  border-radius: 999px;
  background: rgba(24,20,12,.94);
  color: var(--warning);
  font-size: .68rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.connection-status[hidden] {
  display: none;
}

@media (display-mode: standalone) {
  .install-app-button {
    display: none !important;
  }

  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@supports (padding: max(0px)) {
  .app-shell {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
}


/* ============================================================
   Sphere v14 — production/info pages
   ============================================================ */

.site-footer {
  position: relative;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 12px 20px 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #66636f;
  font-size: .68rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: #85808e;
  text-decoration: none;
}

.site-footer a:hover {
  color: #c7bddf;
}

.info-page {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 42px 20px 72px;
}

.info-page-header {
  margin-bottom: 34px;
}

.info-page-header a {
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
}

.info-page-header h1 {
  margin-top: 30px;
  font-size: clamp(2.5rem, 8vw, 4.8rem);
}

.info-page-header p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

.info-section {
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.022);
}

.info-section h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.info-section h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
}

.info-section p,
.info-section li {
  color: #aaa6b3;
  line-height: 1.7;
  font-size: .86rem;
}

.info-section ul {
  padding-left: 20px;
}

.info-callout {
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px solid rgba(184,166,255,.14);
  border-radius: 14px;
  background: rgba(184,166,255,.04);
  color: #bbb4ca;
  font-size: .8rem;
  line-height: 1.6;
}

.info-updated {
  margin-top: 32px;
  color: #6d6974;
  font-size: .68rem;
}

@media (max-width: 640px) {
  .site-footer {
    display: grid;
  }
}


/* ============================================================
   Sphere v18 — Engine Lab
   ============================================================ */

.developer-lab-trigger {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2200;
  min-width: 52px;
  height: 38px;
  border: 1px solid rgba(184,166,255,.3);
  border-radius: 999px;
  background: rgba(14,12,24,.94);
  color: #c9baff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(0,0,0,.4);
}

.developer-lab-trigger[hidden] {
  display: none;
}

.developer-lab {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 2300;
  width: min(100%, 720px);
  overflow-y: auto;
  padding: 18px;
  border-left: 1px solid rgba(184,166,255,.16);
  background: rgba(7,7,11,.985);
  box-shadow: -30px 0 80px rgba(0,0,0,.55);
}

.developer-lab[hidden] {
  display: none;
}

.developer-lab-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 18px;
  background: linear-gradient(to bottom, rgba(7,7,11,1) 70%, rgba(7,7,11,0));
}

.developer-lab-header h2 {
  margin: 0;
  font-size: 1.7rem;
}

.developer-lab-actions {
  display: flex;
  gap: 8px;
}

.developer-lab-actions button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: #c7c1ce;
  cursor: pointer;
}

#closeDeveloperLab {
  width: 36px;
  padding: 0;
  font-size: 1.1rem;
}

.developer-lab-body {
  display: grid;
  gap: 12px;
  padding-bottom: 40px;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.lab-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.022);
}

.lab-wide {
  width: 100%;
}

.lab-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lab-card-header > span {
  color: var(--muted);
  font-size: .68rem;
}

.lab-kv,
.lab-health-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
  font-size: .72rem;
}

.lab-kv:last-child,
.lab-health-row:last-child {
  border-bottom: 0;
}

.lab-kv span,
.lab-health-row span {
  color: var(--muted);
}

.lab-kv strong,
.lab-health-row strong {
  text-align: right;
  font-weight: 700;
}

.lab-health-row strong.ok {
  color: var(--success);
}

.lab-health-row strong.warn {
  color: var(--warning);
}

.lab-health-row strong.bad {
  color: var(--danger);
}

.lab-aspect-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.lab-aspect-row {
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}

.lab-aspect-row strong,
.lab-aspect-row span,
.lab-aspect-row small {
  display: block;
}

.lab-aspect-row strong {
  font-size: .76rem;
}

.lab-aspect-row span {
  margin-top: 3px;
  color: #beb6ca;
  font-size: .7rem;
}

.lab-aspect-row small {
  margin-top: 4px;
  color: #797581;
  font-size: .65rem;
}

.lab-factor-list {
  display: grid;
}

.lab-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.lab-compare > div {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}

.lab-compare small,
.lab-compare strong,
.lab-compare span {
  display: block;
}

.lab-compare small {
  color: var(--muted);
}

.lab-compare strong {
  margin: 5px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.lab-compare span {
  color: #817d89;
  font-size: .68rem;
}

.lab-empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

.lab-empty-state strong,
.lab-empty-state span {
  display: block;
}

.lab-empty-state strong {
  color: #d3cddb;
}

.lab-empty-state span {
  margin-top: 6px;
  font-size: .75rem;
}

@media (max-width: 620px) {
  .lab-grid {
    grid-template-columns: 1fr;
  }

  .lab-compare {
    grid-template-columns: 1fr;
  }
}


/* Sphere v19 — Personal Resonance v2 shadow */

.lab-resonance-stats {
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0,1fr));
}

.lab-mini-stat {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}

.lab-mini-stat small,
.lab-mini-stat strong {
  display: block;
}

.lab-mini-stat small {
  color: var(--muted);
  font-size: .65rem;
}

.lab-mini-stat strong {
  margin-top: 4px;
  font-size: 1rem;
}

.lab-impact-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.lab-impact-row {
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 12px;
  background: rgba(255,255,255,.014);
}

.lab-impact-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.lab-impact-heading strong {
  font-size: .75rem;
}

.lab-impact-heading span {
  font-size: .7rem;
  font-weight: 800;
}

.lab-impact-heading .positive {
  color: var(--success);
}

.lab-impact-heading .negative {
  color: var(--danger);
}

.lab-impact-row small {
  display: block;
  margin-top: 4px;
  color: #77727e;
  font-size: .64rem;
}

.lab-impact-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

.lab-impact-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.lab-impact-track i.positive {
  background: var(--success);
}

.lab-impact-track i.negative {
  background: var(--danger);
}

@media (max-width: 620px) {
  .lab-resonance-stats {
    grid-template-columns: 1fr 1fr;
  }
}


/* Sphere v20 — Resonance Clusters */

.lab-cluster-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
}

.lab-cluster-summary > div {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.016);
}

.lab-cluster-summary small,
.lab-cluster-summary strong {
  display: block;
}

.lab-cluster-summary small {
  color: var(--muted);
  font-size: .64rem;
}

.lab-cluster-summary strong {
  margin-top: 4px;
  font-size: .82rem;
}

.lab-cluster-list {
  display: grid;
  gap: 9px;
}

.lab-cluster-row {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 13px;
  background: rgba(255,255,255,.015);
  overflow: hidden;
}

.lab-cluster-row summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.lab-cluster-row summary::-webkit-details-marker {
  display: none;
}

.lab-cluster-title strong,
.lab-cluster-title small {
  display: block;
}

.lab-cluster-title strong {
  font-size: .77rem;
}

.lab-cluster-title small {
  margin-top: 3px;
  color: #77727e;
  font-size: .63rem;
}

.lab-cluster-score {
  font-size: .82rem;
  font-weight: 800;
}

.lab-cluster-score.positive,
.lab-cluster-member strong.positive {
  color: var(--success);
}

.lab-cluster-score.negative,
.lab-cluster-member strong.negative {
  color: var(--danger);
}

.lab-cluster-score.neutral {
  color: var(--muted);
}

.lab-cluster-description {
  margin: 0;
  padding: 0 12px 10px;
  color: #85808d;
  font-size: .66rem;
  line-height: 1.45;
}

.lab-cluster-track {
  position: relative;
  height: 7px;
  margin: 0 12px 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

.lab-cluster-track .center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.22);
}

.lab-cluster-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  display: block;
}

.lab-cluster-track i.positive {
  background: var(--success);
}

.lab-cluster-track i.negative {
  background: var(--danger);
}

.lab-cluster-track i.neutral {
  background: #7c7784;
}

.lab-cluster-members {
  display: grid;
  padding: 0 12px 12px;
}

.lab-cluster-member {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,.045);
  font-size: .68rem;
}

.lab-cluster-member > span {
  color: #c4bdcb;
}

.lab-cluster-member small {
  display: block;
  margin-top: 2px;
  color: #6f6a76;
  font-size: .61rem;
}

.lab-cluster-member strong {
  flex: 0 0 auto;
  font-size: .67rem;
}

@media (max-width: 620px) {
  .lab-cluster-summary {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Sphere v21.1 — UI lifecycle / BFCache safety
   Hidden transient layers must never intercept pointer input.
   ============================================================ */

.onboarding-overlay[hidden],
.install-sheet[hidden],
.developer-lab[hidden],
.runtime-error[hidden],
.connection-status[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.onboarding-overlay:not([hidden]),
.install-sheet:not([hidden]),
.developer-lab:not([hidden]),
.runtime-error:not([hidden]) {
  pointer-events: auto;
  visibility: visible;
}

.app-shell,
.screen.active {
  pointer-events: auto;
}

.site-footer {
  pointer-events: auto;
}


/* ============================================================
   Sphere v22 — Confidence Preview v2
   ============================================================ */

.lab-confidence-hero {
  display: grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: 16px;
  align-items: center;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.016);
}

.lab-confidence-hero small,
.lab-confidence-hero strong,
.lab-confidence-hero span {
  display: block;
}

.lab-confidence-hero small {
  color: var(--muted);
  font-size: .64rem;
}

.lab-confidence-hero strong {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.lab-confidence-hero span {
  color: #a99bbd;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.lab-confidence-hero p {
  margin: 0;
  color: #827d89;
  font-size: .68rem;
  line-height: 1.5;
}

.lab-confidence-components {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.lab-confidence-component {
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 12px;
  background: rgba(255,255,255,.012);
}

.lab-confidence-component > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .72rem;
}

.lab-confidence-component > div:first-child span {
  color: #c6bfcd;
}

.lab-confidence-component > div:first-child strong {
  font-size: .72rem;
}

.lab-confidence-component small {
  display: block;
  margin-top: 3px;
  color: #716c78;
  font-size: .61rem;
}

.lab-confidence-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

.lab-confidence-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #b39bf8;
}

.lab-confidence-missing {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 11px;
}

.lab-confidence-missing small,
.lab-confidence-missing span {
  display: block;
}

.lab-confidence-missing small {
  color: #726d79;
  font-size: .61rem;
}

.lab-confidence-missing span {
  margin-top: 4px;
  color: #9e97a5;
  font-size: .65rem;
}

@media (max-width: 620px) {
  .lab-confidence-hero {
    grid-template-columns: 1fr;
  }
}


/* Sphere v23 — Temporal Stability */
.lab-stability-stats {
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0,1fr));
}
.lab-stability-chart {
  display:grid;
  grid-template-columns:repeat(9,minmax(0,1fr));
  gap:6px;
  align-items:end;
  height:190px;
  margin-top:15px;
  padding:14px 10px 8px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:14px;
  background:rgba(255,255,255,.012);
}
.lab-stability-point {
  display:grid;
  grid-template-rows:1fr auto auto;
  gap:4px;
  height:100%;
  min-width:0;
  text-align:center;
}
.lab-stability-column {
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  min-height:100px;
  overflow:hidden;
  border-radius:7px;
  background:rgba(255,255,255,.035);
}
.lab-stability-column::after {
  content:"";
  position:absolute;
  left:0; right:0; top:50%;
  height:1px;
  background:rgba(255,255,255,.08);
}
.lab-stability-column i {
  display:block;
  width:58%;
  min-height:3px;
  border-radius:5px 5px 2px 2px;
  background:#a990f2;
}
.lab-stability-point small { color:#8e8895; font-size:.57rem; }
.lab-stability-point span {
  overflow:hidden;
  color:#66616c;
  font-size:.54rem;
  text-overflow:ellipsis;
}
@media (max-width:620px) {
  .lab-stability-stats { grid-template-columns:1fr 1fr; }
  .lab-stability-chart { gap:3px; height:165px; padding-inline:5px; }
  .lab-stability-point span { display:none; }
}


/* ============================================================
   Sphere v24 — Temporal Momentum v2
   ============================================================ */

.lab-momentum-stats {
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0,1fr));
}

.lab-momentum-flow {
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 14px;
  background: rgba(255,255,255,.012);
}

.lab-momentum-flow > div:first-child,
.lab-momentum-flow > div:last-child {
  text-align: center;
}

.lab-momentum-flow small,
.lab-momentum-flow strong {
  display: block;
}

.lab-momentum-flow small {
  color: #817b88;
  font-size: .62rem;
  letter-spacing: .06em;
}

.lab-momentum-flow strong {
  margin-top: 4px;
  font-size: 1rem;
}

.lab-momentum-arrow {
  text-align: center;
}

.lab-momentum-arrow span {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.lab-momentum-arrow small {
  margin-top: 4px;
}

.lab-momentum-arrow.up span {
  color: var(--success);
}

.lab-momentum-arrow.down span {
  color: var(--danger);
}

.lab-momentum-arrow.flat span {
  color: #a59fad;
}

@media (max-width: 620px) {
  .lab-momentum-stats {
    grid-template-columns: 1fr 1fr;
  }

  .lab-momentum-flow {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Sphere v25 — Model Confidence v3
   ============================================================ */

.lab-model-confidence {
  border-color: rgba(181,157,255,.16);
}

.lab-model-hero {
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  gap:16px;
  align-items:center;
  margin-top:10px;
  padding:15px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:14px;
  background:rgba(255,255,255,.018);
}

.lab-model-hero small,
.lab-model-hero strong,
.lab-model-hero span {
  display:block;
}

.lab-model-hero small {
  color:var(--muted);
  font-size:.64rem;
}

.lab-model-hero > div:first-child > strong {
  margin-top:3px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:2.35rem;
}

.lab-model-hero > div:first-child > span {
  color:#b5a2ef;
  font-size:.67rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.lab-model-disclaimer {
  padding:12px 14px;
  border:1px dashed rgba(255,255,255,.09);
  border-radius:12px;
}

.lab-model-disclaimer strong {
  color:#c7c0ce;
  font-size:.7rem;
}

.lab-model-disclaimer p {
  margin:5px 0 0;
  color:#7f7985;
  font-size:.66rem;
  line-height:1.5;
}

.lab-model-components {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:12px;
}

.lab-model-component {
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:12px;
  background:rgba(255,255,255,.012);
}

.lab-model-component-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:.7rem;
}

.lab-model-component-head span {
  color:#c5becb;
}

.lab-model-component-head strong {
  font-size:.7rem;
}

.lab-model-track {
  height:5px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.045);
}

.lab-model-track i {
  display:block;
  height:100%;
  border-radius:inherit;
  background:#b29af4;
}

.lab-model-component small {
  display:block;
  margin-top:6px;
  color:#716b77;
  font-size:.59rem;
}

.lab-model-breakdown {
  margin-top:12px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:12px;
  background:rgba(255,255,255,.01);
}

.lab-model-breakdown summary {
  padding:11px 12px;
  color:#a39ca9;
  font-size:.68rem;
  cursor:pointer;
}

.lab-model-breakdown > div {
  padding:0 12px 8px;
}

.lab-model-calibration {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
  padding:10px 12px;
  border:1px dashed rgba(255,255,255,.075);
  border-radius:11px;
  font-size:.64rem;
}

.lab-model-calibration span {
  color:#77717d;
}

.lab-model-calibration strong {
  color:#a8a1ae;
}

@media (max-width:620px) {
  .lab-model-hero,
  .lab-model-components {
    grid-template-columns:1fr;
  }
}


/* ============================================================
   Sphere v26 — Fusion Engine v3
   ============================================================ */

.lab-fusion-card {
  border-color: rgba(181,157,255,.19);
}

.lab-fusion-hero {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}

.lab-fusion-hero > div {
  padding:13px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:13px;
  background:rgba(255,255,255,.015);
}

.lab-fusion-hero small,
.lab-fusion-hero strong,
.lab-fusion-hero span {
  display:block;
}

.lab-fusion-hero small {
  color:#827c88;
  font-size:.61rem;
}

.lab-fusion-hero strong {
  margin-top:4px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.7rem;
}

.lab-fusion-hero span {
  margin-top:2px;
  color:#9f97a8;
  font-size:.63rem;
}

.lab-fusion-recommendation {
  margin-top:10px;
  padding:12px 14px;
  border:1px dashed rgba(255,255,255,.08);
  border-radius:12px;
}

.lab-fusion-recommendation small,
.lab-fusion-recommendation strong {
  display:block;
}

.lab-fusion-recommendation small {
  color:#77717d;
  font-size:.6rem;
}

.lab-fusion-recommendation strong {
  margin-top:3px;
  color:#c8c0cf;
  font-size:.79rem;
}

.lab-fusion-recommendation p {
  margin:5px 0 0;
  color:#716b77;
  font-size:.61rem;
  line-height:1.45;
}

.lab-fusion-category {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  margin-top:10px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:12px;
  background:rgba(255,255,255,.01);
}

.lab-fusion-category small,
.lab-fusion-category strong {
  display:block;
}

.lab-fusion-category small {
  color:#766f7c;
  font-size:.59rem;
}

.lab-fusion-category strong {
  margin-top:3px;
  font-size:.76rem;
}

.lab-fusion-category > span {
  max-width:62%;
  color:#8d8693;
  font-size:.61rem;
  text-align:right;
}

.lab-fusion-contributions {
  display:grid;
  gap:9px;
  margin-top:10px;
}

.lab-fusion-row {
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:12px;
  background:rgba(255,255,255,.012);
}

.lab-fusion-row-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:.69rem;
}

.lab-fusion-row-head span {
  color:#c6becd;
}

.lab-fusion-row-head strong.positive {
  color:var(--success);
}

.lab-fusion-row-head strong.negative {
  color:var(--danger);
}

.lab-fusion-row-head strong.neutral {
  color:#aaa3b0;
}

.lab-fusion-row small {
  display:block;
  margin-top:3px;
  color:#716b77;
  font-size:.58rem;
}

.lab-fusion-track {
  position:relative;
  height:5px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.04);
}

.lab-fusion-track > span {
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:1px;
  background:rgba(255,255,255,.14);
}

.lab-fusion-track i {
  display:block;
  height:100%;
  border-radius:inherit;
}

.lab-fusion-track i.positive {
  margin-left:50%;
  background:var(--success);
}

.lab-fusion-track i.negative {
  margin-left:calc(50% - var(--fusion-width, 0%));
  background:var(--danger);
}

.lab-fusion-track i.neutral {
  margin-left:50%;
  background:#99929f;
}

.lab-fusion-agreement {
  display:grid;
  grid-template-columns:1fr 1fr 1.35fr;
  gap:9px;
  margin-top:10px;
}

.lab-fusion-agreement > div {
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:11px;
}

.lab-fusion-agreement small,
.lab-fusion-agreement strong {
  display:block;
}

.lab-fusion-agreement small {
  color:#716b77;
  font-size:.57rem;
}

.lab-fusion-agreement strong {
  margin-top:4px;
  color:#bdb6c3;
  font-size:.68rem;
}

@media (max-width:620px) {
  .lab-fusion-hero,
  .lab-fusion-agreement {
    grid-template-columns:1fr;
  }

  .lab-fusion-category {
    display:block;
  }

  .lab-fusion-category > span {
    display:block;
    max-width:none;
    margin-top:5px;
    text-align:left;
  }
}


/* ============================================================
   Sphere v27 — Adaptive Fusion + Cross-category coherence
   ============================================================ */

.lab-adaptive-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}

.lab-adaptive-grid > div {
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:11px;
  background:rgba(255,255,255,.01);
}

.lab-adaptive-grid small,
.lab-adaptive-grid strong,
.lab-adaptive-grid span {
  display:block;
}

.lab-adaptive-grid small {
  color:#746e7a;
  font-size:.57rem;
}

.lab-adaptive-grid strong {
  margin-top:3px;
  color:#c0b8c7;
  font-size:.78rem;
}

.lab-adaptive-grid span {
  margin-top:2px;
  color:#69636f;
  font-size:.55rem;
}

.lab-coherence-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}

.lab-coherence-summary > div {
  padding:11px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:11px;
}

.lab-coherence-summary small,
.lab-coherence-summary strong {
  display:block;
}

.lab-coherence-summary small {
  color:#746e7a;
  font-size:.57rem;
}

.lab-coherence-summary strong {
  margin-top:3px;
  font-size:.75rem;
}

.lab-coherence-list {
  display:grid;
  gap:6px;
  margin-top:10px;
}

.lab-coherence-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 110px;
  gap:10px;
  align-items:center;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.045);
  border-radius:10px;
  font-size:.63rem;
}

.lab-coherence-row span {
  color:#aaa3b0;
}

.lab-coherence-row strong {
  color:#c8c0ce;
}

.lab-coherence-row small {
  color:#6e6873;
  text-align:right;
}

.lab-coherence-row.outlier {
  border-color:rgba(245,184,91,.23);
  background:rgba(245,184,91,.025);
}

@media (max-width:620px) {
  .lab-adaptive-grid,
  .lab-coherence-summary {
    grid-template-columns:1fr;
  }

  .lab-coherence-row {
    grid-template-columns:minmax(0,1fr) auto;
  }

  .lab-coherence-row small {
    grid-column:1 / -1;
    text-align:left;
  }
}


/* ============================================================
   Sphere v28 — Explainability Engine
   ============================================================ */

.lab-explain-card {
  border-color: rgba(181,157,255,.18);
}

.lab-explain-hero {
  display:grid;
  grid-template-columns:1.2fr 1.2fr .8fr;
  gap:9px;
  margin-top:10px;
}

.lab-explain-hero > div {
  padding:12px 13px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:12px;
  background:rgba(255,255,255,.012);
}

.lab-explain-hero small,
.lab-explain-hero strong,
.lab-explain-hero span {
  display:block;
}

.lab-explain-hero small {
  color:#746e7a;
  font-size:.57rem;
}

.lab-explain-hero strong {
  margin-top:4px;
  color:#c8c0ce;
  font-size:.77rem;
}

.lab-explain-hero span {
  margin-top:4px;
  color:#77717d;
  font-size:.58rem;
}

.lab-explain-columns {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:10px;
}

.lab-explain-panel {
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:12px;
  background:rgba(255,255,255,.009);
}

.lab-explain-wide {
  margin-top:9px;
}

.lab-explain-panel-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}

.lab-explain-panel-head strong {
  color:#bdb6c3;
  font-size:.66rem;
}

.lab-explain-panel-head small {
  color:#68626d;
  font-size:.55rem;
}

.lab-explain-driver {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:8px 0;
  border-top:1px solid rgba(255,255,255,.035);
}

.lab-explain-driver:first-of-type {
  border-top:0;
}

.lab-explain-driver strong,
.lab-explain-driver small {
  display:block;
}

.lab-explain-driver strong {
  color:#a9a2af;
  font-size:.62rem;
  font-weight:600;
}

.lab-explain-driver small {
  margin-top:2px;
  color:#68626d;
  font-size:.54rem;
}

.lab-explain-driver > span {
  flex:none;
  font-size:.68rem;
  font-weight:700;
}

.lab-explain-context-list {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}

.lab-explain-context {
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.04);
  border-radius:10px;
}

.lab-explain-context strong,
.lab-explain-context small {
  display:block;
}

.lab-explain-context strong {
  color:#aaa3b0;
  font-size:.61rem;
}

.lab-explain-context small {
  margin-top:2px;
  color:#66606b;
  font-size:.53rem;
}

.lab-explain-context b {
  font-size:.64rem;
}

.lab-explain-temporal {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:9px;
}

.lab-explain-temporal > div {
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.045);
  border-radius:10px;
}

.lab-explain-temporal small,
.lab-explain-temporal strong {
  display:block;
}

.lab-explain-temporal small {
  color:#706a75;
  font-size:.54rem;
}

.lab-explain-temporal strong {
  margin-top:3px;
  font-size:.67rem;
}

.lab-explain-flags {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding-bottom:4px;
}

.lab-explain-flags span {
  padding:4px 7px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:999px;
  color:#8d8693;
  font-size:.54rem;
}

@media (max-width:620px) {
  .lab-explain-hero,
  .lab-explain-columns,
  .lab-explain-context-list,
  .lab-explain-temporal {
    grid-template-columns:1fr;
  }

  .lab-explain-panel-head {
    display:block;
  }

  .lab-explain-panel-head small {
    display:block;
    margin-top:2px;
  }
}


/* ============================================================
   Sphere v29 — Operational Reliability
   ============================================================ */

.lab-reliability-card {
  border-color: rgba(181,157,255,.2);
}

.lab-reliability-hero {
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:10px;
  margin-top:10px;
}

.lab-reliability-hero > div {
  padding:13px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  background:rgba(255,255,255,.013);
}

.lab-reliability-hero small,
.lab-reliability-hero strong,
.lab-reliability-hero span {
  display:block;
}

.lab-reliability-hero small {
  color:#746e7a;
  font-size:.57rem;
}

.lab-reliability-hero strong {
  margin-top:4px;
  color:#c8c0ce;
  font-size:.8rem;
}

.lab-reliability-hero > div:first-child strong {
  font-family:Georgia,"Times New Roman",serif;
  font-size:2rem;
}

.lab-reliability-hero span {
  margin-top:3px;
  color:#77717d;
  font-size:.57rem;
}

.lab-reliability-components {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}

.lab-reliability-component {
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:11px;
}

.lab-reliability-component > div:first-child {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:.64rem;
}

.lab-reliability-component span {
  color:#aca5b2;
}

.lab-reliability-component strong {
  color:#c9c1ce;
}

.lab-reliability-track {
  height:5px;
  margin-top:7px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.04);
}

.lab-reliability-track i {
  display:block;
  height:100%;
  border-radius:inherit;
  background:#b39cf2;
}

.lab-reliability-component small {
  display:block;
  margin-top:5px;
  color:#6e6873;
  font-size:.54rem;
}

.lab-reliability-limits {
  margin-top:10px;
  padding:10px 11px;
  border:1px dashed rgba(255,255,255,.07);
  border-radius:11px;
}

.lab-reliability-limits > small {
  color:#716b77;
  font-size:.56rem;
}

.lab-reliability-limits > div {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:6px;
}

.lab-reliability-limits span {
  padding:4px 7px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:999px;
  color:#8d8693;
  font-size:.54rem;
}

@media (max-width:620px) {
  .lab-reliability-hero,
  .lab-reliability-components {
    grid-template-columns:1fr;
  }
}


/* ============================================================
   Sphere v29.2 — Reliability diagnostics polish
   ============================================================ */

.lab-reliability-note {
  margin-top:9px;
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.045);
  border-radius:11px;
  background:rgba(255,255,255,.008);
}

.lab-reliability-note strong {
  display:block;
  color:#aaa3b0;
  font-size:.6rem;
}

.lab-reliability-note p {
  margin:4px 0 0;
  color:#716b77;
  font-size:.56rem;
  line-height:1.45;
}


/* ============================================================
   Sphere v30 — Validation & Promotion Readiness
   ============================================================ */

.lab-validation-card {
  border-color: rgba(181,157,255,.22);
}

.lab-validation-hero {
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr;
  gap:8px;
  margin-top:10px;
}

.lab-validation-hero > div,
.lab-validation-comparison-summary > div {
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:11px;
  background:rgba(255,255,255,.01);
}

.lab-validation-hero small,
.lab-validation-hero strong,
.lab-validation-hero span,
.lab-validation-comparison-summary small,
.lab-validation-comparison-summary strong {
  display:block;
}

.lab-validation-hero small,
.lab-validation-comparison-summary small {
  color:#746e7a;
  font-size:.56rem;
}

.lab-validation-hero strong {
  margin-top:3px;
  color:#c9c1cf;
  font-size:.82rem;
}

.lab-validation-hero span {
  margin-top:3px;
  color:#716b77;
  font-size:.55rem;
}

.lab-promotion-gates {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}

.lab-promotion-gate {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:10px;
}

.lab-promotion-gate strong,
.lab-promotion-gate small {
  display:block;
}

.lab-promotion-gate strong {
  color:#aaa3b0;
  font-size:.61rem;
}

.lab-promotion-gate small {
  margin-top:2px;
  color:#67616c;
  font-size:.53rem;
}

.lab-promotion-gate b {
  font-size:.55rem;
  letter-spacing:.06em;
}

.lab-promotion-gate.pass b { color:var(--success); }
.lab-promotion-gate.fail b { color:#b9a67c; }

.lab-validation-comparison-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:8px;
}

.lab-validation-comparison-summary strong {
  margin-top:3px;
  font-size:.7rem;
}

.lab-validation-comparison-list {
  display:grid;
  gap:5px;
}

.lab-validation-comparison-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 58px 58px 48px;
  gap:8px;
  align-items:center;
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.04);
  border-radius:9px;
  font-size:.58rem;
}

.lab-validation-comparison-row span { color:#a8a1ae; }
.lab-validation-comparison-row small { color:#706a75; }
.lab-validation-comparison-row strong {
  text-align:right;
  color:#c5bdca;
}

@media (max-width:620px) {
  .lab-validation-hero,
  .lab-promotion-gates,
  .lab-validation-comparison-summary {
    grid-template-columns:1fr;
  }

  .lab-validation-comparison-row {
    grid-template-columns:minmax(0,1fr) auto auto auto;
  }
}


/* ============================================================
   Sphere v31 — Outcome Validation System
   ============================================================ */

.lab-outcome-card {
  border-color:rgba(181,157,255,.23);
}

.lab-outcome-summary,
.lab-outcome-prediction {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}

.lab-outcome-prediction {
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.lab-outcome-summary > div,
.lab-outcome-prediction > div {
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:10px;
}

.lab-outcome-summary small,
.lab-outcome-summary strong,
.lab-outcome-prediction small,
.lab-outcome-prediction strong,
.lab-outcome-prediction span {
  display:block;
}

.lab-outcome-summary small,
.lab-outcome-prediction small {
  color:#746e7a;
  font-size:.55rem;
}

.lab-outcome-summary strong,
.lab-outcome-prediction strong {
  margin-top:3px;
  color:#c7bfcc;
  font-size:.72rem;
}

.lab-outcome-prediction span {
  margin-top:2px;
  color:#716b77;
  font-size:.54rem;
}

.lab-outcome-create,
.lab-outcome-locked,
.lab-outcome-pending,
.lab-outcome-review {
  margin-top:10px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:11px;
}

.lab-outcome-create {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
}

.lab-outcome-create strong,
.lab-outcome-review strong,
.lab-outcome-locked strong,
.lab-outcome-pending strong {
  display:block;
  color:#aaa3b0;
  font-size:.63rem;
}

.lab-outcome-create p,
.lab-outcome-review small,
.lab-outcome-locked span,
.lab-outcome-pending span {
  display:block;
  margin:4px 0 0;
  color:#706a75;
  font-size:.55rem;
  line-height:1.45;
}

.lab-outcome-create button,
.lab-outcome-labels button {
  border:1px solid rgba(181,157,255,.22);
  border-radius:9px;
  background:rgba(181,157,255,.07);
  color:#bdb5c5;
  padding:8px 10px;
  font:inherit;
  font-size:.58rem;
  cursor:pointer;
}

.lab-outcome-case-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}

.lab-outcome-case-head small,
.lab-outcome-case-head strong,
.lab-outcome-case-head span {
  display:block;
}

.lab-outcome-case-head small {
  color:#716b77;
  font-size:.54rem;
}

.lab-outcome-case-head strong {
  margin-top:2px;
  color:#aaa3b0;
  font-size:.65rem;
}

.lab-outcome-case-head span {
  margin-top:2px;
  color:#625c67;
  font-size:.52rem;
}

.lab-outcome-case-head b {
  color:#948c9a;
  font-size:.55rem;
}

.lab-outcome-labels {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-top:9px;
}

@media (max-width:620px) {
  .lab-outcome-summary,
  .lab-outcome-prediction,
  .lab-outcome-labels {
    grid-template-columns:1fr;
  }

  .lab-outcome-create {
    display:block;
  }

  .lab-outcome-create button {
    margin-top:9px;
  }
}


/* ============================================================
   Sphere v32 — Outcome Review UI
   ============================================================ */

.lab-outcome-review-link {
  margin-top:10px;
}

.lab-outcome-review-link a {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(181,157,255,.12);
  border-radius:10px;
  color:#a99fba;
  text-decoration:none;
  font-size:.62rem;
}

.outcome-review-shell {
  width:min(1100px,calc(100% - 32px));
  margin:0 auto;
  padding:48px 0 80px;
}

.outcome-review-header {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start;
}

.outcome-review-header h1 {
  margin:7px 0 0;
  color:#f1ede7;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2.5rem,7vw,5.2rem);
  line-height:.95;
}

.outcome-review-header > div > p:last-child {
  max-width:630px;
  margin:14px 0 0;
  color:#837b89;
  line-height:1.55;
}

.outcome-review-header > button {
  padding:10px 13px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  background:rgba(255,255,255,.02);
  color:#a99fba;
  cursor:pointer;
}

.outcome-review-stats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-top:28px;
}

.outcome-review-stats > div {
  padding:14px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:12px;
  background:rgba(255,255,255,.01);
}

.outcome-review-stats small,
.outcome-review-stats strong {
  display:block;
}

.outcome-review-stats small {
  color:#746d78;
  font-size:.62rem;
}

.outcome-review-stats strong {
  margin-top:4px;
  color:#c7bfcc;
  font-size:1.25rem;
}

.outcome-review-section {
  margin-top:18px;
  padding:18px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:15px;
  background:rgba(255,255,255,.008);
}

.outcome-review-section-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
}

.outcome-review-section-head h2 {
  margin:4px 0 0;
  color:#c8c0ce;
  font-size:1rem;
}

.outcome-review-section-head > span {
  color:#79717f;
  font-size:.65rem;
}

.outcome-review-case {
  margin-top:14px;
  padding:15px;
  border:1px solid rgba(181,157,255,.13);
  border-radius:13px;
  background:rgba(181,157,255,.025);
}

.outcome-review-case-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.outcome-review-case-head small,
.outcome-review-case-head strong,
.outcome-review-case-head span {
  display:block;
}

.outcome-review-case-head small {
  color:#756d7c;
  font-size:.57rem;
}

.outcome-review-case-head strong {
  margin-top:3px;
  color:#c8c0ce;
  font-size:.78rem;
}

.outcome-review-case-head span {
  margin-top:2px;
  color:#706875;
  font-size:.55rem;
}

.outcome-review-case-head b {
  color:#665f6c;
  font-size:.52rem;
  font-weight:500;
}

.outcome-review-prediction-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:12px;
}

.outcome-review-prediction-grid > div {
  padding:10px;
  border:1px solid rgba(255,255,255,.045);
  border-radius:10px;
}

.outcome-review-prediction-grid small,
.outcome-review-prediction-grid strong,
.outcome-review-prediction-grid span {
  display:block;
}

.outcome-review-prediction-grid small {
  color:#746d78;
  font-size:.54rem;
}

.outcome-review-prediction-grid strong {
  margin-top:3px;
  color:#bcb4c2;
  font-size:.72rem;
}

.outcome-review-prediction-grid span {
  margin-top:2px;
  color:#68616d;
  font-size:.52rem;
}

.outcome-review-question {
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.045);
}

.outcome-review-question > strong {
  color:#bcb4c2;
  font-size:.68rem;
}

.outcome-review-question > p {
  margin:5px 0 0;
  color:#716a76;
  font-size:.58rem;
}

.outcome-review-label-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-top:11px;
}

.outcome-review-label-grid button {
  min-height:72px;
  padding:9px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  background:rgba(255,255,255,.015);
  color:#9a919f;
  cursor:pointer;
}

.outcome-review-label-grid button:hover {
  border-color:rgba(181,157,255,.28);
  background:rgba(181,157,255,.05);
}

.outcome-review-label-grid span,
.outcome-review-label-grid strong {
  display:block;
}

.outcome-review-label-grid span {
  color:#8d82a0;
  font-size:.56rem;
}

.outcome-review-label-grid strong {
  margin-top:5px;
  font-size:.57rem;
  line-height:1.3;
}

.outcome-review-confirm {
  margin-top:11px;
  padding:11px;
  border:1px solid rgba(181,157,255,.13);
  border-radius:10px;
}

.outcome-review-confirm p,
.outcome-review-confirm span {
  margin:0;
  color:#817986;
  font-size:.57rem;
}

.outcome-review-confirm span {
  display:block;
  margin-top:4px;
  color:#675f6c;
}

.outcome-review-confirm > div {
  display:flex;
  gap:7px;
  margin-top:9px;
}

.outcome-review-confirm button {
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:8px;
  background:rgba(255,255,255,.02);
  color:#958c9b;
  cursor:pointer;
  font-size:.57rem;
}

.outcome-review-two-column {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.outcome-queue-list {
  display:grid;
  gap:6px;
  margin-top:12px;
}

.outcome-queue-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.04);
  border-radius:9px;
}

.outcome-queue-row strong,
.outcome-queue-row small {
  display:block;
}

.outcome-queue-row strong {
  color:#a69eaa;
  font-size:.6rem;
}

.outcome-queue-row small {
  margin-top:2px;
  color:#66606a;
  font-size:.51rem;
}

.outcome-queue-row b {
  color:#827989;
  font-size:.56rem;
  font-weight:500;
  text-align:right;
}

.outcome-review-empty {
  margin-top:12px;
  padding:14px;
  border:1px dashed rgba(255,255,255,.05);
  border-radius:10px;
  color:#69616f;
  font-size:.59rem;
}

.outcome-review-disclaimer {
  margin-top:18px;
}

@media (max-width:720px) {
  .outcome-review-header {
    display:block;
  }

  .outcome-review-header > button {
    margin-top:16px;
  }

  .outcome-review-stats,
  .outcome-review-two-column,
  .outcome-review-prediction-grid,
  .outcome-review-label-grid {
    grid-template-columns:1fr;
  }
}
