:root {
  --bg: #0b0d12;
  --bg-elevated: rgba(18, 24, 36, 0.88);
  --bg-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f1e8;
  --muted: #b9b2a1;
  --gold: #d0a76e;
  --gold-strong: #f3c47e;
  --mint: #7ad3b2;
  --danger: #f57b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(122, 211, 178, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(208, 167, 110, 0.16), transparent 28%),
    linear-gradient(180deg, #10141d 0%, #090b11 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(122, 211, 178, 0.65), rgba(208, 167, 110, 0.8));
  color: #09111a;
  font-weight: 800;
}

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

.nav-links a,
.ghost-button,
.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.ghost-button:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: rgba(208, 167, 110, 0.45);
}

.button {
  background: linear-gradient(135deg, rgba(208, 167, 110, 0.9), rgba(243, 196, 126, 0.95));
  color: #10141d;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 48px 0 36px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.panel,
.code-panel,
.stat {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.card,
.panel,
.code-panel {
  border-radius: 28px;
}

.hero-copy {
  padding: 36px;
}

.eyebrow {
  color: var(--gold-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  margin-bottom: 20px;
}

.hero h1,
.page-title,
.section-title {
  font-family: var(--display);
  line-height: 0.96;
  margin: 0;
}

.hero h1 {
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  max-width: 11ch;
}

.page-title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 58ch;
}

.hero-actions,
.stack {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-panel {
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-kicker {
  color: var(--mint);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.metric {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.metric:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.metric strong,
.stat strong {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1;
}

.section {
  padding: 28px 0 44px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-note {
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.panel,
.code-panel {
  padding: 26px;
}

.card h3,
.panel h3,
.code-panel h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.card p,
.panel p,
.list li,
.hint,
.helper {
  color: var(--muted);
  line-height: 1.7;
}

.list {
  padding-left: 18px;
  margin: 10px 0 0;
}

.tag-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tag {
  padding: 8px 12px;
  border: 1px solid rgba(122, 211, 178, 0.24);
  border-radius: 999px;
  color: var(--mint);
  font-size: 0.85rem;
}

.code-panel pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--line);
  color: #f6ebcd;
  font-size: 0.95rem;
}

#copy-install-status {
  min-height: 3.4rem;
}

.callout {
  border-radius: 22px;
  padding: 22px;
  background: rgba(122, 211, 178, 0.08);
  border: 1px solid rgba(122, 211, 178, 0.18);
}

.shard-diagram {
  display: grid;
  gap: 16px;
}

.waveform {
  min-height: 88px;
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.wave-bar {
  display: block;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(243, 196, 126, 0.95), rgba(122, 211, 178, 0.72));
}

.wave-bar.short {
  height: 22px;
}

.wave-bar.medium {
  height: 46px;
}

.wave-bar.tall {
  height: 62px;
}

.shard-strip,
.worker-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.shard-block,
.worker-node,
.anti-cell {
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  text-align: center;
}

.shard-a {
  background: rgba(243, 196, 126, 0.14);
  border-color: rgba(243, 196, 126, 0.32);
}

.shard-b {
  background: rgba(122, 211, 178, 0.14);
  border-color: rgba(122, 211, 178, 0.3);
}

.shard-c {
  background: rgba(105, 176, 255, 0.14);
  border-color: rgba(105, 176, 255, 0.34);
}

.shard-d {
  background: rgba(245, 123, 123, 0.14);
  border-color: rgba(245, 123, 123, 0.3);
}

.shard-arrows {
  width: 100%;
  height: 84px;
}

.shard-arrows path {
  fill: none;
  stroke: rgba(243, 196, 126, 0.7);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
}

.anti-correlation {
  display: grid;
  gap: 10px;
}

.anti-header,
.anti-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.anti-header {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-table {
  display: grid;
  gap: 1px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.comparison-table.double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparison-table.comparison-quad {
  grid-template-columns: 1.05fr repeat(3, minmax(0, 1fr));
}

.comparison-head,
.comparison-label,
.comparison-cell {
  padding: 16px 18px;
  background: rgba(10, 14, 22, 0.96);
  line-height: 1.6;
}

.comparison-head,
.comparison-label {
  font-weight: 700;
}

.comparison-head {
  color: var(--gold-strong);
}

.comparison-label {
  color: var(--text);
}

.comparison-cell {
  color: var(--muted);
}

.faq-stack {
  display: grid;
  gap: 14px;
}

.faq-item {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 26px;
  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--gold-strong);
  font-size: 1.25rem;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 0 26px 22px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-shell {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: start;
  margin-top: 24px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(208, 167, 110, 0.34);
  outline-offset: 2px;
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.status-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.status-banner.error {
  border-color: rgba(245, 123, 123, 0.35);
  color: #ffd6d6;
  background: rgba(245, 123, 123, 0.08);
}

.status-banner.success {
  border-color: rgba(122, 211, 178, 0.35);
  color: #dffbf2;
  background: rgba(122, 211, 178, 0.08);
}

.manager-grid {
  display: grid;
  gap: 18px;
}

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

.earn-grid {
  align-items: start;
}

.calculator-panel {
  display: grid;
  gap: 22px;
}

.range-caption {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.range-caption strong {
  justify-self: center;
  color: var(--text);
  font-size: 0.98rem;
}

.calculator-output {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.calculator-total {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.92;
  margin: 4px 0 16px;
}

.calculator-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

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

.realtime-row,
.trust-step {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.realtime-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
}

.realtime-row strong {
  font-size: 1rem;
}

.realtime-row span {
  color: var(--muted);
}

.realtime-row.active {
  border-color: rgba(122, 211, 178, 0.32);
  background: rgba(122, 211, 178, 0.08);
}

.trust-ladder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.trust-step {
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.trust-step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--mint), var(--gold-strong));
}

.trust-rank {
  color: var(--gold-strong);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  margin-bottom: 20px;
}

.stat {
  border-radius: 24px;
  padding: 22px;
}

.stat span {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

.tableish {
  display: grid;
  gap: 12px;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.table-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.muted {
  color: var(--muted);
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.footer {
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 920px) {
  .hero,
  .grid-3,
  .grid-2,
  .auth-grid,
  .stats-grid,
  .comparison-table.double,
  .comparison-table.comparison-quad,
  .shard-strip,
  .trust-ladder,
  .worker-row,
  .calculator-comparison {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .anti-header,
  .anti-row {
    grid-template-columns: 56px 1fr;
  }

  .range-caption {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
