
:root {
  --bg: #020305;
  --panel: rgba(12, 18, 29, .78);
  --panel2: rgba(255,255,255,.045);
  --line: rgba(255,255,255,.10);
  --soft: #aeb7c4;
  --muted: #7d8793;
  --gold: #f0c040;
  --gold2: #d99b1d;
  --cyan: #00d4ff;
  --green: #28d17c;
  --red: #ff5b6e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(240,192,64,.14), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(0,212,255,.16), transparent 31%),
    linear-gradient(145deg, #020305 0%, #06111b 50%, #020305 100%);
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  overflow-x: hidden;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
  pointer-events: none;
}

.gold-orb, .blue-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .18;
  pointer-events: none;
}

.gold-orb {
  left: -120px;
  top: 120px;
  background: var(--gold);
}

.blue-orb {
  right: -130px;
  top: 180px;
  background: var(--cyan);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 70px);
  background: rgba(2,3,5,.58);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), #96670e);
  color: #05070b;
  font-weight: 1000;
  box-shadow: 0 0 34px rgba(240,192,64,.20);
}

.brand strong {
  display: block;
  color: var(--gold);
  letter-spacing: .12em;
  font-size: 14px;
}

.brand span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  margin-top: 2px;
}

.nav-chip {
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,.28);
  background: rgba(0,212,255,.07);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .16em;
}

.page {
  position: relative;
  z-index: 2;
  width: min(1240px, 92vw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) 0 90px;
}

.hero {
  max-width: 980px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,.28);
  background: rgba(0,212,255,.07);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 1000;
  margin-bottom: 26px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(40,209,124,.85);
}

.hero h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 116px);
  line-height: .86;
  letter-spacing: -.08em;
  font-weight: 950;
}

.hero h1 b {
  color: var(--gold);
}

.hero p {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.72;
  max-width: 720px;
  margin: 28px 0 0;
}

.hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-stats div {
  min-width: 150px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 18px;
  padding: 16px 18px;
  backdrop-filter: blur(18px);
}

.hero-stats strong {
  display: block;
  font-size: 27px;
  letter-spacing: -.04em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
}

.research-console,
.results-section {
  margin-top: 46px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14,20,31,.76), rgba(4,8,14,.88));
  backdrop-filter: blur(26px);
  border-radius: 34px;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 44px 130px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.06);
}

.console-head,
.results-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.console-head span,
.results-header span,
.bp-label,
.intel-grid span,
.metrics-grid span {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: .18em;
  font-weight: 1000;
  text-transform: uppercase;
}

.console-head h2,
.results-header h2 {
  margin: 8px 0 0;
  font-size: 30px;
  letter-spacing: -.045em;
}

.console-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  border: 1px solid rgba(40,209,124,.25);
  background: rgba(40,209,124,.08);
  border-radius: 999px;
  padding: 9px 12px;
}

.console-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(40,209,124,.85);
}

form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

select {
  width: 100%;
  background: rgba(0,0,0,.30);
  border: 1px solid rgba(255,255,255,.12);
  color: white;
  border-radius: 16px;
  padding: 15px 14px;
  outline: none;
}

select:focus {
  border-color: rgba(240,192,64,.55);
  box-shadow: 0 0 0 4px rgba(240,192,64,.08);
}

button {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #05070b;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(240,192,64,.18);
  transition: .22s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 32px 80px rgba(240,192,64,.24);
}

button:disabled {
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}

button span {
  display: block;
  font-weight: 1000;
  font-size: 15px;
}

button small {
  display: block;
  margin-top: 3px;
  opacity: .66;
  font-weight: 900;
}

.hidden { display: none; }

.results-header p {
  color: var(--soft);
  line-height: 1.5;
  max-width: 720px;
}

.report-kpis {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.report-kpis div {
  min-width: 136px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  border-radius: 18px;
  padding: 14px;
}

.report-kpis strong {
  display: block;
  font-size: 27px;
}

.report-kpis span {
  color: var(--muted);
  font-size: 10px;
}

.blueprint-list {
  display: grid;
  gap: 22px;
}

.blueprint-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
}

.rank-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), #96670e);
  color: #05070b;
  font-weight: 1000;
  box-shadow: 0 20px 50px rgba(240,192,64,.18);
}

.blueprint-main {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  border-radius: 28px;
  padding: 22px;
  transition: .22s ease;
}

.blueprint-main:hover {
  transform: translateY(-3px);
  border-color: rgba(240,192,64,.24);
  box-shadow: 0 30px 90px rgba(0,0,0,.32);
}

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

.bp-head h3 {
  margin: 7px 0 0;
  font-size: 27px;
  letter-spacing: -.05em;
}

.score-pill {
  text-align: right;
  border: 1px solid rgba(40,209,124,.24);
  background: rgba(40,209,124,.08);
  color: var(--green);
  border-radius: 18px;
  padding: 10px 12px;
  min-width: 112px;
}

.score-pill strong {
  display: block;
  font-size: 18px;
}

.score-pill span {
  color: rgba(255,255,255,.72);
  font-size: 11px;
}

.curve-panel {
  margin: 18px 0;
  height: 92px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(0,212,255,.04), transparent),
    rgba(0,0,0,.20);
  border-radius: 18px;
  padding: 12px;
  color: var(--gold);
}

.curve-panel svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(240,192,64,.35));
}

.bp-logic {
  color: var(--soft);
  line-height: 1.55;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metrics-grid div,
.intel-grid div {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  border-radius: 18px;
  padding: 14px;
}

.metrics-grid strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
}

.metrics-grid small {
  color: var(--muted);
  font-size: 11px;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 12px;
}

.intel-grid p {
  color: var(--soft);
  line-height: 1.45;
  margin-bottom: 0;
}

.error-box {
  border: 1px solid rgba(255,91,110,.30);
  background: rgba(255,91,110,.10);
  color: #ff9daa;
  border-radius: 18px;
  padding: 16px;
  font-weight: 900;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(0,212,255,.16), transparent 30%),
    radial-gradient(circle at 50% 60%, rgba(240,192,64,.12), transparent 30%),
    rgba(2,3,5,.88);
  backdrop-filter: blur(18px);
}

.loading-overlay.active {
  display: grid;
}

.loading-card {
  width: min(560px, 90vw);
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(180deg, rgba(14,20,31,.88), rgba(4,8,14,.94));
  border-radius: 36px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 50px 150px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.08);
}





.loading-kicker {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: .18em;
  font-weight: 1000;
}

.loading-card h2 {
  margin: 12px 0 8px;
  font-size: 30px;
  letter-spacing: -.045em;
}

.loading-card p {
  color: var(--soft);
  line-height: 1.55;
}

.progress-shell {
  height: 12px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 22px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--cyan), var(--green));
  box-shadow: 0 0 24px rgba(240,192,64,.24);
  transition: width .32s ease;
}

.loading-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-top: 10px;
}

.terminal-lines {
  margin-top: 20px;
  display: grid;
  gap: 7px;
  text-align: left;
  color: rgba(174,183,196,.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}


.terminal-window {
  width: min(460px, 100%);
  margin: 0 auto 28px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  box-shadow:
    inset 0 0 34px rgba(0,212,255,.045),
    0 22px 70px rgba(0,0,0,.35);
  text-align: left;
}

.terminal-top {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
}

.terminal-top span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.terminal-top span:nth-child(1) { background: #ff5b6e; }
.terminal-top span:nth-child(2) { background: #f0c040; }
.terminal-top span:nth-child(3) { background: #28d17c; }

.terminal-top strong {
  margin-left: 8px;
  color: rgba(255,255,255,.55);
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 1000;
}

.terminal-body {
  height: 168px;
  overflow: hidden;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(223,230,239,.75);
}

.terminal-line {
  white-space: nowrap;
  opacity: .58;
  transform: translateY(4px);
  animation: terminalIn .25s ease forwards;
}

.terminal-line.active {
  opacity: 1;
  color: #dfe6ef;
  text-shadow: 0 0 14px rgba(0,212,255,.18);
}

.terminal-line::before {
  content: "→ ";
  color: var(--gold);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--cyan);
  margin-left: 5px;
  vertical-align: -2px;
  box-shadow: 0 0 16px rgba(0,212,255,.8);
  animation: terminalBlink .8s steps(1) infinite;
}

@keyframes terminalBlink {
  50% { opacity: 0; }
}

@keyframes terminalIn {
  to { opacity: .88; transform: translateY(0); }
}

@media (max-width: 900px) {
  .top-nav {
    height: auto;
    padding: 16px 18px;
  }

  .nav-chip {
    display: none;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 74px);
  }

  form,
  .metrics-grid,
  .intel-grid {
    grid-template-columns: 1fr;
  }

  .console-head,
  .results-header,
  .bp-head {
    flex-direction: column;
  }

  .blueprint-card {
    grid-template-columns: 1fr;
  }

  .report-kpis {
    width: 100%;
  }

  .report-kpis div {
    flex: 1;
  }
}


/* =========================================================
   V8 APPLE LUXURY QUANT LOADING
   Unified with premium landing page. Replaces terminal loader.
   ========================================================= */

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(240,192,64,.13), transparent 30%),
    radial-gradient(circle at 72% 24%, rgba(0,212,255,.15), transparent 34%),
    rgba(2,3,5,.88);
  backdrop-filter: blur(22px);
}

.loading-overlay.active {
  display: grid;
}

.apple-loading-card {
  width: min(610px, 90vw);
  padding: 54px 44px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.11);
  background:
    radial-gradient(circle at 50% 0%, rgba(0,212,255,.06), transparent 42%),
    rgba(8,13,21,.72);
  backdrop-filter: blur(30px);
  border-radius: 42px;
  box-shadow:
    0 50px 150px rgba(0,0,0,.58),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.apple-status-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(40,209,124,.22);
  background: rgba(40,209,124,.07);
  color: var(--green);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 1000;
}

.apple-status-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(40,209,124,.9);
}

.apple-loading-card h2 {
  font-size: clamp(40px, 6vw, 58px);
  line-height: .94;
  letter-spacing: -.075em;
  margin: 26px 0 18px;
}

.apple-loading-card h2 b {
  color: var(--gold);
}

.apple-loading-card p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.6;
  max-width: 510px;
  margin: 0 auto 32px;
}

.apple-progress-shell {
  height: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
}

.apple-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--cyan), var(--green));
  box-shadow: 0 0 24px rgba(240,192,64,.22);
  transition: width .32s ease;
}

.apple-loading-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  font-weight: 900;
  margin-top: 10px;
}

.apple-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  margin: 30px 0;
}

.apple-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.apple-tags span {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  border-radius: 16px;
  padding: 12px 16px;
  color: var(--soft);
  font-weight: 850;
  min-width: 82px;
}

@media (max-width: 700px) {
  .apple-loading-card {
    padding: 42px 24px;
    border-radius: 34px;
  }

  .apple-loading-card p {
    font-size: 15px;
  }

  .apple-loading-meta {
    flex-direction: column;
    align-items: center;
  }

  .apple-tags span {
    flex: 1;
  }
}


/* =========================================================
   V9 LIVE ENGINE STATUS + QUEUE CONTROL UI
   ========================================================= */

.console-status,
.apple-status-pill {
  position: relative;
}

.console-status::before {
  animation: livePulse 1.15s ease-in-out infinite;
}

.apple-status-pill span {
  animation: livePulse 1.15s ease-in-out infinite;
}

@keyframes livePulse {
  0% {
    opacity: .45;
    transform: scale(.82);
    box-shadow: 0 0 0 0 rgba(40,209,124,.55);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(40,209,124,.08), 0 0 22px rgba(40,209,124,.75);
  }
  100% {
    opacity: .45;
    transform: scale(.82);
    box-shadow: 0 0 0 0 rgba(40,209,124,0);
  }
}

#reportNote {
  color: rgba(255,255,255,.76) !important;
  font-weight: 800;
}

.data-note,
.report-note {
  color: rgba(255,255,255,.76) !important;
}
