:root {
  color-scheme: dark;
  --primary: #10b981;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --secondary: #d97706;
  --secondary-soft: rgba(217, 119, 6, 0.14);
  --accent-1: #34d399;
  --accent-2: #92400e;
  --warning: #ea580c;
  --bg: #090d0f;
  --bg-soft: #101518;
  --panel: #18181b;
  --panel-soft: rgba(24, 24, 27, 0.76);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f4f5;
  --text-soft: #d4d4d8;
  --muted: #a1a1aa;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), transparent 30%),
    linear-gradient(215deg, rgba(217, 119, 6, 0.12), transparent 34%),
    linear-gradient(180deg, #000 0%, #090d0f 48%, #000 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 64px;
  padding-right: max(16px, calc((100% - 1120px) / 2));
  padding-left: max(16px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  font-size: 1.18rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand span,
.eyebrow,
.section-label {
  color: var(--primary);
}

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

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

.gradient-text {
  background: linear-gradient(to right, var(--primary), var(--accent-1), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--text);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
}

.eyebrow,
.section-label,
.step-number {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 14px 0 0;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.home-title {
  display: grid;
  gap: 0.06em;
  max-width: none;
  overflow-wrap: normal;
  word-break: keep-all;
  color: var(--text);
}

.home-title span {
  display: block;
}

.home-title .gradient-text {
  width: max-content;
  max-width: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent-1), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-title h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
}

h2 {
  margin: 6px 0 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: 0;
}

p {
  line-height: 1.65;
}

.simple-statements {
  margin-top: 28px;
  display: grid;
  gap: 12px;
  color: var(--text-soft);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.simple-statements p,
.lead {
  margin: 0;
}

.lead {
  max-width: 760px;
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 1.14rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.actions.tight {
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.74rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button.primary {
  background: var(--primary);
  color: white;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button.small {
  min-height: 40px;
  padding: 0.62rem 0.85rem;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.credential-stack,
.wallet-panel,
.step-card,
.economy-card,
.about-grid article,
.band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.credential-stack {
  padding: 12px;
  display: grid;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.credential-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.credential-row span,
.step-number {
  color: var(--secondary);
}

.credential-row strong {
  font-size: 1.04rem;
}

.compact {
  padding-top: 0;
}

.band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
}

.band p {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
}

.economy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 10px;
}

.economy-card {
  padding: 24px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.11), rgba(217, 119, 6, 0.08));
}

.economy-card p:not(.section-label) {
  margin: 12px 0 0;
  color: var(--text-soft);
}

.page-title {
  padding-bottom: 28px;
}

.page-title.narrow {
  max-width: 920px;
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 20px;
}

.wallet-panel {
  position: sticky;
  top: 20px;
  padding: 22px;
}

.wallet-panel p {
  color: var(--text-soft);
}

.wallet-address,
.contract-message {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 8px;
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.86rem;
}

.wallet-address {
  background: rgba(16, 185, 129, 0.1);
}

.contract-message {
  background: rgba(217, 119, 6, 0.12);
}

.steps {
  display: grid;
  gap: 16px;
}

.step-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.step-card p:not(.section-label) {
  margin: 12px 0 0;
  color: var(--text-soft);
}

.step-card .resource-links {
  margin-top: 14px;
  font-weight: 700;
}

.resource-links a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.42);
  text-underline-offset: 0.22em;
}

.resource-links a:hover {
  color: var(--text);
}

.contract-button {
  margin-top: 20px;
}

.ready {
  background: linear-gradient(180deg, var(--primary-soft), var(--panel-soft));
}

.locked {
  background: linear-gradient(180deg, var(--secondary-soft), var(--panel-soft));
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 20px;
}

.about-grid article {
  padding: 24px;
}

.about-grid p {
  margin: 12px 0 0;
  color: var(--text-soft);
}

.whitepaper-hero h1 {
  max-width: 980px;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.paper-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.whitepaper-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding-top: 22px;
}

.paper-toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.paper-toc a {
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.paper-toc a:hover {
  color: var(--text);
}

.whitepaper-body {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.whitepaper-body section {
  scroll-margin-top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 24, 27, 0.66);
}

.whitepaper-body .paper-notice {
  background: linear-gradient(145deg, rgba(217, 119, 6, 0.13), rgba(16, 185, 129, 0.08));
}

.whitepaper-body h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
}

.whitepaper-body h3 {
  margin: 26px 0 0;
  font-size: 1.12rem;
}

.whitepaper-body p,
.whitepaper-body li {
  color: var(--text-soft);
}

.whitepaper-body p {
  margin: 12px 0 0;
}

.whitepaper-body ol,
.whitepaper-body ul {
  margin: 16px 0 0;
  padding-left: 1.35rem;
}

.whitepaper-body li + li {
  margin-top: 8px;
}

.whitepaper-body code {
  color: var(--accent-1);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

.whitepaper-body a {
  color: var(--accent-1);
  text-decoration: underline;
  text-decoration-color: rgba(52, 211, 153, 0.4);
  text-underline-offset: 0.2em;
}

.whitepaper-body blockquote {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--primary);
  background: rgba(16, 185, 129, 0.09);
}

.whitepaper-body blockquote p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.table-wrap {
  max-width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.whitepaper-body table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.whitepaper-body th,
.whitepaper-body td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.whitepaper-body th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.whitepaper-body td {
  color: var(--text-soft);
}

.paper-cta {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(217, 119, 6, 0.12));
}

.paper-cta .button {
  margin-top: 18px;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
    padding-right: max(16px, calc((100% - 1120px) / 2));
    padding-left: max(16px, calc((100% - 1120px) / 2));
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .registration-layout,
  .about-grid,
  .economy-grid,
  .whitepaper-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .wallet-panel {
    position: static;
  }

  .paper-toc {
    position: static;
  }
}

@media (max-width: 540px) {
  .section {
    width: min(100% - 24px, 1120px);
    padding: 48px 0;
  }

  .site-header,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.3rem);
  }

  .page-title h1 {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }

  .band,
  .step-card {
    grid-template-columns: 1fr;
  }

  .band {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
