:root {
  --bg: #f8f8f1;
  --paper: #fffff8;
  --ink: #101214;
  --muted: #5d625c;
  --line: #171917;
  --soft-line: #d9ddd2;
  --green: #00c805;
  --green-dark: #007a1c;
  --lime: #ccff00;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(16, 18, 20, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(16, 18, 20, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 58px;
  padding: 10px clamp(14px, 4vw, 42px);
  background: rgba(248, 248, 241, 0.92);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand,
.nav-links,
.source-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 2px solid var(--line);
}

.nav-links {
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  font-size: 13px;
  font-weight: 800;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.source-strip a:hover,
.news-item:hover strong {
  color: var(--green-dark);
}

.header-connect,
.header-link,
.swap-button,
.mode-button,
.fact-line {
  border: 2px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-connect {
  min-height: 36px;
  padding: 0 14px;
  background: var(--ink);
  color: var(--paper);
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.header-link:hover {
  background: var(--lime);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 60px) clamp(14px, 4vw, 42px) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  min-height: calc(100svh - 88px);
  padding-bottom: clamp(44px, 8vw, 96px);
}

.tiny-label,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: clamp(58px, 8vw, 96px);
  line-height: 0.88;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.lede {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.pool-proof {
  max-width: 720px;
  margin-bottom: 14px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
  text-transform: uppercase;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin-bottom: 24px;
}

.market-strip div {
  min-width: 0;
  padding: 10px;
  background: var(--paper);
  border: 2px solid var(--line);
}

.market-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.hero-copy,
.swap-panel {
  min-width: 0;
}

.source-strip {
  flex-wrap: wrap;
  gap: 8px;
}

.source-strip a {
  min-height: 36px;
  padding: 8px 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.source-strip .primary-cta {
  background: var(--green);
}

.source-strip .primary-cta:hover {
  color: var(--ink);
  background: var(--lime);
}

.visual-receipt {
  max-width: 520px;
  margin: 22px 0 0;
  background: var(--paper);
  border: 2px solid var(--line);
}

.visual-receipt img {
  display: block;
  width: 100%;
  height: 126px;
  object-fit: cover;
  object-position: right center;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: multiply;
}

.visual-receipt figcaption {
  padding: 8px 10px;
  border-top: 2px solid var(--line);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.swap-panel {
  position: sticky;
  top: 82px;
  min-width: 0;
  width: 100%;
  padding: 18px;
  background: var(--paper);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 var(--ink);
}

.swap-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.swap-heading h2 {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 34px;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  background: #ecefe6;
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.status-pill.ready {
  background: var(--lime);
  color: var(--ink);
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
  border: 2px solid var(--line);
}

.mode-button {
  min-height: 44px;
  background: transparent;
  border: 0;
  color: var(--muted);
}

.mode-button + .mode-button {
  border-left: 2px solid var(--line);
}

.mode-button.active {
  background: var(--green);
  color: var(--ink);
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field > span,
.slippage-row label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 74px;
  padding: 8px 10px 8px 14px;
  background: #f2f5ee;
  border: 2px solid var(--line);
}

.amount-row input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.token-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  background: var(--paper);
  border: 2px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}

.quote-box {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--paper);
  border: 2px solid var(--line);
}

.quote-box span,
.quote-box small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.quote-box strong {
  overflow-wrap: anywhere;
  font-size: 22px;
}

.slippage-row {
  display: grid;
  grid-template-columns: 1fr 116px;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.slippage-row select {
  min-height: 42px;
  padding: 0 10px;
  background: var(--paper);
  border: 2px solid var(--line);
  color: var(--ink);
  font-weight: 900;
}

.swap-button {
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
  background: var(--green);
  color: var(--ink);
  font-size: 15px;
  text-transform: uppercase;
}

.swap-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.swap-message {
  min-height: 38px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.swap-message.error {
  color: #a01818;
}

.swap-message.success {
  color: var(--green-dark);
}

.wallet-lines {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.wallet-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.wallet-lines strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.section {
  padding: clamp(44px, 8vw, 88px) 0;
  border-top: 2px solid var(--line);
}

.section-title {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 26px;
}

.section-title span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.section-title h2 {
  max-width: 760px;
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.96;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 4vw, 44px);
  max-width: 980px;
  margin-left: 82px;
}

.two-column p,
.manifesto-card p:last-child,
.news-item p {
  color: #202520;
  line-height: 1.72;
}

.receipt-grid,
.news-list,
.facts-grid {
  display: grid;
  gap: 12px;
}

.receipt-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.receipt-grid article,
.manifesto-card,
.news-item {
  background: var(--paper);
  border: 2px solid var(--line);
}

.receipt-grid article {
  min-height: 230px;
  padding: 16px;
}

.receipt-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.receipt-grid h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.receipt-grid p {
  margin-bottom: 0;
  color: #303630;
  font-size: 14px;
  line-height: 1.65;
}

.manifesto-card {
  padding: clamp(18px, 5vw, 42px);
  box-shadow: 8px 8px 0 var(--green);
}

.manifesto-card p:last-child {
  max-width: 970px;
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 800;
}

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

.news-item {
  min-height: 260px;
  padding: 16px;
  text-decoration: none;
}

.news-item span {
  display: block;
  margin-bottom: 22px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.news-item strong {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
}

.news-item p {
  margin: 0;
  color: #333933;
  font-size: 13px;
}

.facts-grid {
  max-width: 980px;
}

.fact-line {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  background: var(--paper);
  text-align: left;
}

.fact-line:hover {
  background: var(--lime);
}

.fact-line span {
  color: var(--green-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.fact-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.footer {
  display: grid;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px clamp(14px, 4vw, 42px) 42px;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-links {
    display: none;
  }

  .header-actions {
    display: none;
  }

  .hero,
  .two-column,
  .receipt-grid,
  .news-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .swap-panel {
    position: static;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .visual-receipt {
    display: none;
  }

  .two-column {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 44px;
    line-height: 0.94;
  }

  .hero-copy,
  .swap-panel {
    width: 100%;
    max-width: 100%;
  }

  .swap-panel {
    box-shadow: none;
  }

  .lede {
    font-size: 16px;
    max-width: 32ch;
    overflow-wrap: anywhere;
  }

  .pool-proof {
    max-width: 32ch;
    font-size: 12px;
  }

  .market-strip {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .source-strip {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 0;
  }

  .source-strip a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .quote-box small,
  .swap-message {
    max-width: 31ch;
  }

  .swap-panel {
    padding: 14px;
  }

  .swap-heading h2 {
    font-size: 28px;
  }

  .amount-row input {
    font-size: 24px;
  }

  .slippage-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .section-title {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fact-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
