:root {
  --bg: #030807;
  --bg-2: #06110f;
  --panel: rgba(6, 14, 13, 0.72);
  --panel-strong: rgba(8, 19, 17, 0.9);
  --ink: #e9fff4;
  --muted: #8fb7a4;
  --line: rgba(103, 255, 182, 0.18);
  --line-strong: rgba(103, 255, 182, 0.34);
  --accent: #65ffb6;
  --accent-2: #17c97c;
  --accent-soft: rgba(101, 255, 182, 0.14);
  --accent-glow: rgba(101, 255, 182, 0.28);
  --alert: #ffb765;
  --alert-soft: rgba(255, 183, 101, 0.16);
  --real: #65ffb6;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(circle at top, rgba(32, 100, 73, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(35, 145, 92, 0.14), transparent 22%),
    linear-gradient(180deg, #010302 0%, #04100d 46%, #020706 100%);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(101, 255, 182, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 255, 182, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
  z-index: 0;
}

.scene-shell {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#cyber-scene {
  width: 100%;
  height: 100%;
  display: block;
}

.scene-vignette,
.scene-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-vignette {
  background:
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(180deg, rgba(1, 3, 2, 0.12), rgba(1, 3, 2, 0.5));
}

.scene-scan {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 22%, transparent 78%, rgba(255, 255, 255, 0.02) 100%),
    repeating-linear-gradient(180deg, rgba(101, 255, 182, 0.045) 0 1px, transparent 1px 5px);
  opacity: 0.6;
  mix-blend-mode: screen;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 34px 20px 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero-copy,
.hero-rack,
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 24, 21, 0.68), rgba(5, 13, 12, 0.6)),
    rgba(8, 16, 15, 0.58);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy::before,
.hero-rack::before,
.panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.hero-copy {
  padding: 30px 30px 28px;
}

.hero-rack {
  display: grid;
  gap: 12px;
  padding: 20px;
  align-content: center;
  transform: perspective(1200px) rotateY(-7deg);
}

.rack-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(101, 255, 182, 0.13);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(101, 255, 182, 0.08), rgba(10, 18, 17, 0.48));
  box-shadow: inset 0 0 0 1px rgba(101, 255, 182, 0.03);
}

.rack-card span,
.eyebrow,
.panel-kicker,
.viz-header span,
.status-pill,
.vote-line span,
.consensus-subtitle,
label span:first-child,
.gauge-center span,
.gauge-center small {
  letter-spacing: 0.08em;
}

.rack-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.rack-card strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  color: var(--ink);
}

.eyebrow,
.panel-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.panel-header h2,
.viz-header h3,
.consensus-title,
.gauge-center strong {
  font-family: 'Orbitron', sans-serif;
}

.hero h1 {
  margin: 10px 0 0;
  font-size: clamp(2.4rem, 4.8vw, 5rem);
  line-height: 0.94;
  max-width: 12ch;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(101, 255, 182, 0.14);
}

.lede {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 60ch;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  perspective: 1600px;
}

.panel {
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.panel:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 36px rgba(101, 255, 182, 0.08);
}

.panel-form {
  padding: 24px;
  transform: rotateY(-3deg);
}

.panel-results {
  padding: 24px;
  display: grid;
  gap: 20px;
  transform: rotateY(1.6deg);
}

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

.panel-header h2 {
  margin: 6px 0 0;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.sample-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-button,
.submit-button {
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ghost-button {
  padding: 11px 14px;
  background: rgba(101, 255, 182, 0.08);
  color: var(--ink);
  border-color: rgba(101, 255, 182, 0.12);
}

.ghost-button:hover,
.submit-button:hover {
  transform: translateY(-1px);
}

.ghost-button:hover {
  background: rgba(101, 255, 182, 0.14);
  box-shadow: 0 0 18px rgba(101, 255, 182, 0.12);
}

.submit-button {
  padding: 15px 18px;
  background: linear-gradient(135deg, rgba(13, 48, 36, 0.98), rgba(32, 166, 101, 0.9));
  color: #03110b;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 28px rgba(16, 82, 53, 0.36);
}

.profile-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 10px;
}

label span:first-child {
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

input[type='text'],
input[type='number'],
textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(101, 255, 182, 0.14);
  border-radius: 8px;
  background: rgba(2, 8, 7, 0.72);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 0 0 1px rgba(101, 255, 182, 0.03);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(101, 255, 182, 0.12);
  border-color: rgba(101, 255, 182, 0.42);
  box-shadow: 0 0 0 4px rgba(101, 255, 182, 0.07);
}

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

.toggle {
  align-content: end;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 76px;
  height: 42px;
  border-radius: 999px;
  background: rgba(101, 255, 182, 0.08);
  border: 1px solid rgba(101, 255, 182, 0.18);
  padding: 4px;
}

.toggle-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d5ffe8;
  box-shadow: 0 0 18px rgba(101, 255, 182, 0.18);
  transition: transform 180ms ease;
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, rgba(10, 54, 37, 0.94), rgba(42, 173, 108, 0.9));
  box-shadow: inset 0 0 14px rgba(101, 255, 182, 0.12), 0 0 18px rgba(101, 255, 182, 0.12);
}

.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(33px);
}

.status-pill {
  margin: 0;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(101, 255, 182, 0.08);
  border: 1px solid rgba(101, 255, 182, 0.14);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.consensus-strip {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px 0 12px;
  border-top: 1px solid rgba(101, 255, 182, 0.1);
  border-bottom: 1px solid rgba(101, 255, 182, 0.1);
}

.gauge-wrap {
  display: grid;
  place-items: center;
}

.gauge {
  --score: 50;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(17, 48, 36, 0.8) 42%, transparent 43%),
    conic-gradient(var(--alert) 0 calc(var(--score) * 1%), var(--real) 0 100%);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 0 0 1px rgba(101, 255, 182, 0.12), 0 0 42px rgba(101, 255, 182, 0.12);
}

.gauge::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(101, 255, 182, 0.1);
}

.gauge::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(101, 255, 182, 0.08), transparent 48%),
    rgba(3, 10, 8, 0.95);
  box-shadow: inset 0 0 0 1px rgba(101, 255, 182, 0.08);
}

.gauge-center {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 2px;
}

.gauge-center span {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.gauge-center strong {
  font-size: 2.1rem;
  color: var(--ink);
}

.gauge-center small {
  color: var(--muted);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.consensus-copy {
  display: grid;
  gap: 12px;
}

.consensus-title {
  margin: 0;
  font-size: 1.36rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.consensus-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.vote-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.viz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.viz-panel,
.signals-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(101, 255, 182, 0.08);
  border-radius: 8px;
  background: rgba(3, 10, 8, 0.32);
}

.viz-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.viz-header h3 {
  margin: 0;
  font-size: 0.98rem;
  text-transform: uppercase;
}

.viz-header span {
  font-size: 0.66rem;
  text-transform: uppercase;
  color: var(--muted);
}

.algorithm-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
}

.bar-meta strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge.fake {
  background: var(--alert-soft);
  color: var(--alert);
  border: 1px solid rgba(255, 183, 101, 0.18);
}

.badge.real {
  background: var(--accent-soft);
  color: var(--real);
  border: 1px solid rgba(101, 255, 182, 0.18);
}

.bar-track {
  position: relative;
  height: 15px;
  border-radius: 999px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, rgba(101, 255, 182, 0.14) 0 50%, rgba(255, 183, 101, 0.16) 50% 100%);
  border: 1px solid rgba(101, 255, 182, 0.08);
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--fake) * 1%);
  background: linear-gradient(90deg, rgba(46, 226, 143, 0.82), rgba(255, 183, 101, 0.92));
  box-shadow: 0 0 24px rgba(101, 255, 182, 0.2);
}

.bar-scale,
.bar-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.spectrum-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.decision-spectrum {
  position: relative;
  min-height: 260px;
  border-radius: 8px;
  border: 1px solid rgba(101, 255, 182, 0.12);
  background:
    linear-gradient(180deg, rgba(101, 255, 182, 0.06), rgba(101, 255, 182, 0.01)),
    linear-gradient(90deg, rgba(101, 255, 182, 0.06) 0%, rgba(2, 8, 7, 0.24) 48%, rgba(255, 183, 101, 0.08) 100%);
  overflow: hidden;
}

.decision-spectrum::before,
.decision-spectrum::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.decision-spectrum::before {
  inset: 12px auto 12px 50%;
  width: 1px;
  background: rgba(101, 255, 182, 0.14);
}

.decision-spectrum::after {
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
}

.spectrum-item {
  position: absolute;
  left: calc(var(--position) * 1%);
  top: calc(var(--row) * 38px + 18px);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  z-index: 1;
}

.spectrum-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--alert) calc(var(--position) * 1%), var(--real));
  box-shadow: 0 0 0 7px rgba(4, 11, 9, 0.92), 0 0 18px rgba(101, 255, 182, 0.18);
}

.spectrum-item span {
  max-width: 128px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(4, 11, 9, 0.78);
  border: 1px solid rgba(101, 255, 182, 0.08);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}

.signal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.signal-list li {
  padding: 12px 14px;
  border: 1px solid rgba(101, 255, 182, 0.1);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(101, 255, 182, 0.08), rgba(6, 14, 13, 0.74));
  color: var(--ink);
}

.loading .submit-button {
  opacity: 0.78;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .hero,
  .workspace,
  .viz-grid,
  .consensus-strip {
    grid-template-columns: 1fr;
  }

  .hero-rack,
  .panel-form,
  .panel-results {
    transform: none;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 22px 14px 30px;
  }

  .hero-copy,
  .hero-rack,
  .panel-form,
  .panel-results {
    padding: 18px;
  }

  .split-grid,
  .panel-header,
  .sample-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .consensus-title {
    font-size: 1.05rem;
  }

  .gauge {
    width: 156px;
  }

  .decision-spectrum {
    min-height: 300px;
  }

  .spectrum-item {
    top: calc(var(--row) * 44px + 16px);
  }
}
