:root {
  color-scheme: light;
  --bg: #f8f7ef;
  --paper: #fffef7;
  --ink: #101312;
  --muted: #60665f;
  --line: #101312;
  --green: #11b775;
  --green-2: #dfffe9;
  --lime: #c9ff48;
  --amber: #f2c14e;
  --red: #ff6b6b;
  --blue: #dcecff;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(16, 19, 18, .05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 19, 18, .05) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 62%, #eef8f0 100%);
  background-size: 28px 28px, 28px 28px, auto;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

body::before {
  content: "50 ETH CLAIM GATE // 100 ETH RESERVE PHASE // ";
  position: fixed;
  inset: auto 0 0 0;
  z-index: -1;
  border-top: 1px solid rgba(16, 19, 18, .16);
  color: rgba(16, 19, 18, .07);
  font-size: 38px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
code { color: #086b45; font: inherit; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 239, .94);
  backdrop-filter: blur(12px);
}

.brand,
.navlinks,
.button-row,
.inline-form,
.log-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  min-width: 164px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--lime);
  font-size: 11px;
}

.brand-name {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.navlinks {
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.navlinks a {
  padding: 8px 4px;
  border-bottom: 1px solid transparent;
}

.navlinks a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

button,
.button,
input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
}

button.secondary,
.button.secondary {
  background: var(--green);
  color: #06110d;
}

button.ghost,
.button.ghost {
  background: transparent;
  color: var(--ink);
}

button.small,
.button.small {
  min-height: 32px;
  padding: 5px 10px;
}

button.compact {
  min-width: 142px;
}

button:disabled {
  background: #d8ddd6;
  color: #7a8178;
  cursor: not-allowed;
}

.status-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.status-banner[data-level="ok"] .status-dot { background: var(--green); }
.status-banner[data-level="warn"] .status-dot { background: var(--amber); }
.status-banner[data-level="error"] .status-dot { background: var(--red); }

.status-dot {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  background: var(--lime);
}

.status-banner strong,
.status-banner span {
  display: block;
  overflow-wrap: anywhere;
}

.status-banner strong {
  font-size: 13px;
  text-transform: uppercase;
}

#statusDetail {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.route { display: none; }
.route.active { display: block; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(300px, 390px);
  gap: 18px;
  align-items: start;
  padding: 34px 0 20px;
}

.copy {
  display: grid;
  align-content: start;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 12px;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: none;
}

.narrow h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.whitepaper h1 {
  font-size: clamp(32px, 4.4vw, 44px);
}

h2 {
  font-size: 15px;
  text-transform: uppercase;
}

.lead {
  max-width: 68ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.button-row {
  flex-wrap: wrap;
  margin-top: 24px;
}

.mint-panel,
.redeem-panel,
.artifact,
.formula-band,
.data-table,
.log-panel {
  border: 1px solid var(--line);
  background: rgba(255, 254, 247, .86);
}

.mint-panel {
  padding: 18px;
}

.redeem-panel {
  margin-top: 18px;
  padding: 18px;
}

.panel-head,
.artifact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.panel-head strong,
.artifact-top span:first-child {
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.metric-grid div {
  min-height: 84px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.metric-grid span,
.data-table span,
.formula-band span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.metric-grid strong,
.data-table strong,
.formula-band strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.inline-form {
  flex-wrap: wrap;
  margin-top: 18px;
}

label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

input {
  width: 78px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.price-quote {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.quote-head span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.quote-head strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.price-list {
  max-height: 220px;
  overflow: auto;
}

.price-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16, 19, 18, .12);
}

.price-list div:last-child {
  border-bottom: 0;
}

.price-list span {
  color: var(--green);
  font-size: 12px;
}

.price-list strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.fineprint {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.claim-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.claim-grid div:nth-child(2) { background: var(--green-2); }
.claim-grid div:nth-child(3) { background: var(--blue); }
.claim-grid div:nth-child(4) { background: var(--lime); }

.token-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 54px;
  padding: 12px;
  background: #ffffff;
}

.token-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
}

.artifact {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(280px, 1fr);
  gap: 0;
  overflow: hidden;
}

.artifact-top {
  grid-column: 1 / -1;
  padding: 12px 14px;
  background: var(--ink);
  color: #ffffff;
}

.artifact-top span:first-child {
  color: var(--lime);
}

.sigil {
  position: relative;
  min-height: 260px;
  background:
    linear-gradient(90deg, rgba(17, 183, 117, .22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 183, 117, .22) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, var(--green-2), #ffffff 60%);
  background-size: 22px 22px, 22px 22px, auto;
}

.sigil::before,
.sigil::after,
.sigil span {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
}

.sigil::before {
  width: 150px;
  height: 150px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(201, 255, 72, .72);
}

.sigil::after {
  width: 96px;
  height: 96px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--ink);
  box-shadow: inset 0 0 0 18px var(--green);
}

.sigil span:nth-child(1) { inset: 32px auto auto 34px; width: 68px; height: 1px; background: var(--line); }
.sigil span:nth-child(2) { inset: auto 34px 32px auto; width: 68px; height: 1px; background: var(--line); }
.sigil span:nth-child(3) { inset: 34px 36px auto auto; width: 1px; height: 68px; background: var(--line); }
.sigil span:nth-child(4) { inset: auto auto 34px 36px; width: 1px; height: 68px; background: var(--line); }

.curve-readout {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  background: #ffffff;
}

.curve-readout code {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow-wrap: anywhere;
}

.formula-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
  border-left: 0;
  border-top: 0;
}

.formula-band div {
  min-height: 88px;
  padding: 16px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.formula-band div:nth-child(2) { background: var(--green-2); }
.formula-band div:nth-child(3) { background: var(--blue); }
.formula-band div:nth-child(4) { background: #ffffff; }
.formula-band div:nth-child(5) { background: var(--lime); }

.narrow,
.whitepaper {
  max-width: 900px;
  margin: 0 auto;
  padding: 58px 0 20px;
}

.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.data-table {
  margin-top: 18px;
  padding: 0;
}

.data-table h2 {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.data-table div {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid rgba(16, 19, 18, .16);
}

.data-table div:last-child {
  border-bottom: 0;
}

.data-table a {
  color: #086b45;
}

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

.paper {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.paper-head {
  padding: 38px 0 28px;
  border-bottom: 1px solid var(--line);
}

.paper-section {
  padding: 28px 0;
  border-bottom: 1px solid rgba(16, 19, 18, .2);
}

.paper-section p,
.paper-section li {
  max-width: 76ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.76;
}

.paper-section p {
  margin-top: 12px;
}

.paper-section ul,
.paper-section ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

.paper-section li + li {
  margin-top: 7px;
}

.paper-code {
  max-height: none;
  min-height: 0;
  margin-top: 14px;
  background: #ffffff;
  color: var(--ink);
}

.log-panel {
  margin-top: 18px;
  padding: 14px;
}

.log-head {
  justify-content: space-between;
}

pre {
  min-height: 128px;
  max-height: 340px;
  margin: 14px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--lime);
  white-space: pre-wrap;
}

@media (max-width: 880px) {
  .topbar,
  .hero-grid,
  .artifact,
  .formula-band,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    padding-bottom: 12px;
  }

  .navlinks {
    justify-content: flex-start;
  }

  .hero-grid,
  .narrow {
    padding-top: 38px;
  }

  .data-table div {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(30px, 12vw, 48px);
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100vw - 22px, 1120px);
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  button.compact {
    min-width: 0;
  }
}
