:root {
  --paper: #F2F3EF;
  --paper-2: #E7E9E3;
  --white: #FFFFFF;
  --ink: #0F1B2D;
  --ink-2: #44506A;
  --ink-3: #6B7488;
  --line: rgba(15, 27, 45, .14);
  --board: #151A21;
  --board-line: rgba(255, 182, 39, .14);
  --board-dim: #8A8F98;
  --amber: #FFB627;
  --amber-dim: rgba(255, 182, 39, .18);
  --up: #2F9E6E;
  --down: #D2503F;

  --f-display: "Unbounded", "Onest", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-led: "Doto", ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #1D2D46; }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #FFC24D; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(242, 243, 239, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 32px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font: 700 21px/1 var(--f-display); letter-spacing: -.02em; }
.nav { display: flex; gap: 26px; margin-right: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; padding: 8px 0; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; gap: 10px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(56px, 8vw, 96px); }
.hero-head {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.hero h1 {
  font: 600 clamp(36px, 5.6vw, 72px)/1.02 var(--f-display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.lede { color: var(--ink-2); font-size: 18px; max-width: 44ch; }

.desk { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }

/* Rate board */
.board {
  background: var(--board);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 30px 60px -30px rgba(15,27,45,.55);
  display: flex; flex-direction: column;
  background-image:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.4px);
  background-size: 6px 6px;
}
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.board-title { font: 500 15px/1.2 var(--f-body); color: var(--board-dim); display: flex; gap: 10px; align-items: baseline; }
.board-clock { font: 800 22px/1 var(--f-led); color: var(--amber); letter-spacing: .04em; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); }
.seg-btn {
  border: 0; background: transparent; color: var(--board-dim);
  min-height: 36px; min-width: 56px; padding: 0 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s;
}
.seg-btn.is-on { background: var(--amber); color: var(--ink); }

.board-table { width: 100%; border-collapse: collapse; }
.board-table th {
  font: 500 13px/1 var(--f-body); color: var(--board-dim);
  text-align: left; padding: 0 8px 12px; border-bottom: 1px solid var(--board-line);
}
.board-table .num { text-align: right; }
.board-table td { padding: 0 8px; height: 58px; border-bottom: 1px solid var(--board-line); }
.board-table tbody tr:last-child td { border-bottom: 0; }
.board-table tbody tr { cursor: pointer; transition: background-color .15s; }
.board-table tbody tr:hover td { background: rgba(255,182,39,.05); }
.board-table tbody tr.is-picked td { background: rgba(255,182,39,.09); }

.asset { display: flex; align-items: center; gap: 12px; }
.asset-tick { font: 600 15px/1 var(--f-display); letter-spacing: .01em; }
.asset-name { font-size: 13px; color: var(--board-dim); }
.asset .coin { width: 30px; height: 30px; }
.led {
  font: 800 clamp(20px, 2.3vw, 28px)/1 var(--f-led);
  color: var(--amber);
  text-shadow: 0 0 12px rgba(255,182,39,.35);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.led.tick { animation: led-tick .5s steps(4) 1; }
@keyframes led-tick { 0% { opacity: .2; } 50% { opacity: 1; } 75% { opacity: .5; } 100% { opacity: 1; } }
.chg { font: 600 14px/1 var(--f-body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chg.up { color: #57C795; }
.chg.down { color: #F07A6A; }

.board-note { margin-top: auto; padding-top: 16px; font-size: 14px; color: var(--board-dim); }

/* Exchange window */
.window {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -28px rgba(15,27,45,.35);
  display: flex; flex-direction: column; gap: 14px;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--paper); border-radius: 999px; }
.tab {
  border: 0; background: transparent; min-height: 44px; border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--ink-3); cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.tab.is-on { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(15,27,45,.15); }

.field label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field-row {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
  transition: border-color .2s, background-color .2s;
}
.field-row:focus-within { border-color: var(--ink); background: var(--white); }
.field-row input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  padding: 0 16px; height: 58px;
  font: 600 22px/1 var(--f-body); font-variant-numeric: tabular-nums;
}
.field-row { position: relative; }

/* ---------- Coin icons ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.coin { width: 22px; height: 22px; flex: none; }
.coin-lg { width: 32px; height: 32px; }

/* ---------- Picker ---------- */
.picker { position: relative; display: flex; }
.picker-btn {
  display: flex; align-items: center; gap: 8px;
  height: 100%; min-width: 118px; padding: 0 14px 0 12px;
  border: 0; border-left: 1px solid var(--line); background: transparent;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background-color .15s ease;
}
.picker-btn:focus-visible { outline-offset: -3px; }
.picker-val { margin-right: auto; }
.picker-chev { width: 11px; height: 8px; color: var(--ink-3); transition: transform .2s var(--ease-out); }
.picker.is-open .picker-chev { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) {
  .picker-btn:hover { background: rgba(15,27,45,.04); }
}

.picker-list {
  position: absolute; z-index: 20; right: -1px; top: calc(100% + 8px);
  width: 300px; max-width: calc(100vw - 2 * var(--gutter));
  max-height: 340px; overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px;
  background: var(--white); border-radius: var(--r-md);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -12px rgba(15,27,45,.28), 0 4px 10px -4px rgba(15,27,45,.12);
  transform-origin: top right;
  opacity: 0; transform: translateY(-4px) scale(.96); pointer-events: none; visibility: hidden;
  transition: opacity .12s ease-out, transform .12s ease-out, visibility 0s linear .12s;
}
.picker-list:focus { outline: none; }
.picker.is-open .picker-list {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), visibility 0s;
}
.picker.is-instant .picker-list { transition: none; }

.picker-list [role="option"] {
  display: grid; grid-template-columns: 32px 1fr auto 16px; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
}
.picker-list [role="option"].is-active { background: var(--paper); }
.opt-main { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.opt-tick { font-weight: 600; font-size: 15px; }
.opt-name { font-size: 13px; color: var(--ink-3); }
.opt-meta { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt-check { width: 16px; height: 16px; color: var(--ink); opacity: 0; }
[aria-selected="true"] > .opt-check { opacity: 1; }

/* ---------- Pixel background ---------- */
.hero, .cta { position: relative; isolation: isolate; }
.pixels { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.swap {
  align-self: center; margin: -8px 0 -14px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .3s var(--ease-out), border-color .2s;
}
.swap:hover { border-color: var(--ink); }
.swap.spin { transform: rotate(180deg); }

.quote { display: grid; gap: 6px; padding: 14px 0 4px; border-top: 1px dashed var(--line); font-size: 14px; }
.quote div { display: flex; justify-content: space-between; gap: 12px; }
.quote dt { color: var(--ink-3); }
.quote dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.limits { font-size: 13px; color: var(--ink-3); }
.calc-error { font-size: 14px; color: var(--down); font-weight: 500; }
.window .btn-lg { margin-top: auto; width: 100%; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--paper-2); }
.h2 { font: 600 clamp(28px, 3.6vw, 44px)/1.08 var(--f-display); letter-spacing: -.03em; text-wrap: balance; }
.section-lede { margin-top: 16px; color: var(--ink-2); max-width: 40ch; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 44px; counter-reset: s; }
.steps li { padding: 28px 28px 8px 0; border-top: 2px solid var(--ink); position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.step-n {
  display: block; font: 800 56px/1 var(--f-led); color: var(--ink);
  margin-bottom: 18px;
}
.steps h3 { font: 600 20px/1.25 var(--f-display); letter-spacing: -.02em; margin-bottom: 10px; }
.steps p { color: var(--ink-2); max-width: 34ch; }

/* Terms */
.terms-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.spec div {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.spec div:first-child { border-top: 1px solid var(--line); }
.spec dt { color: var(--ink-3); font-weight: 500; }
.spec dd { font-weight: 600; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 22px 0; font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
              linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  transition: transform .25s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--ink-2); max-width: 64ch; }

/* CTA */
.cta { background: var(--ink); color: var(--paper); padding: clamp(48px, 7vw, 80px) 0; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.cta .h2 { max-width: 20ch; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(242,243,239,.7); padding: 0 0 32px; font-size: 15px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px;
  padding-top: 48px;
  background: linear-gradient(rgba(242,243,239,.12), rgba(242,243,239,.12)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.brand-light span { color: var(--paper); }
.brand-light img { box-shadow: 0 0 0 1px rgba(242,243,239,.18); border-radius: 8px; }
.footer-note { margin-top: 14px; max-width: 36ch; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 48px; font-size: 13px; color: rgba(242,243,239,.5);
}
.footer-bottom p:last-child { max-width: 60ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav { display: none; }
  .header-row { justify-content: space-between; }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .hero-head { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 28px; border-left: 0; }
  .steps li + li { border-top-width: 1px; border-top-color: var(--line); }
  .terms-grid, .faq-wrap { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-actions .btn-ghost { display: none; }
  .col-chg { display: none; }
  .asset-name { display: none; }
  .asset .coin { width: 30px; height: 30px; }
  .board-table td, .board-table th { padding-left: 4px; padding-right: 4px; }
  .board-top { flex-wrap: wrap; }
  .spec div { grid-template-columns: 1fr; gap: 4px; }
  .faq summary { font-size: 16px; }
  .faq details p { padding-right: 0; }
  .field-row input { font-size: 20px; }
  .led { font-size: 19px; }
  .board { padding: 18px 14px; }
  .board-table td { height: 50px; }
  .picker-btn { min-width: 104px; padding: 0 10px; }
  .opt-meta { display: none; }
  .picker-list [role="option"] { grid-template-columns: 32px 1fr 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
