:root {
  color-scheme: dark;
  /* Navy-tinted dark, matching the FreeDex logo's cool side */
  --bg: oklch(0.145 0.014 262);
  --surface: oklch(0.18 0.016 260);
  --surface-2: oklch(0.205 0.018 260);
  --surface-head: oklch(0.225 0.02 260);
  --bg-input: oklch(0.18 0.016 260);
  --line: oklch(0.8 0.03 250 / 0.11);
  --line-strong: oklch(0.8 0.03 250 / 0.18);
  --line-accent: oklch(0.8 0.11 162 / 0.32);
  --text: oklch(0.95 0.008 255);
  --text-muted: oklch(0.73 0.022 255);
  --text-dim: oklch(0.59 0.022 255);
  /* FreeDex mint and blue, softened */
  --accent: oklch(0.8 0.11 162);
  --accent-2: oklch(0.75 0.085 232);
  --accent-hover: oklch(0.85 0.1 162);
  --accent-soft: oklch(0.8 0.11 162 / 0.1);
  --accent-ink: oklch(0.2 0.035 175);
  --brand-grad: linear-gradient(120deg, oklch(0.82 0.11 162), oklch(0.76 0.085 232));
  --danger: oklch(0.7 0.16 25);
  --danger-soft: oklch(0.7 0.16 25 / 0.1);
  --warn: oklch(0.82 0.12 80);
  /* Shape */
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: oklch(0.8 0.11 162 / 0.15);
  touch-action: manipulation;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* Faded brand light and a faint screener grid near the top of the page */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(60% 45% at 10% -8%, oklch(0.75 0.085 232 / 0.15), transparent 70%),
    radial-gradient(42% 38% at 96% 2%, oklch(0.8 0.11 162 / 0.1), transparent 70%),
    radial-gradient(55% 40% at 50% 115%, oklch(0.8 0.11 162 / 0.05), transparent 70%);
}
body::after {
  background-image:
    linear-gradient(oklch(0.8 0.03 250 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.8 0.03 250 / 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000, transparent 75%);
}

a { color: inherit; }
img { max-width: 100%; }
code { font-family: var(--font-mono); font-size: 0.9em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; scroll-margin-top: 80px; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-xs);
  font-weight: 600;
  z-index: 50;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
@media (min-width: 720px) { .wrap { padding-left: 24px; padding-right: 24px; } }

/* Small uppercase label used across panels, tiles and headers */
.label,
.panel-head h2,
.panel-head .title,
.stat span,
.tile span,
.tp-stats span,
.wallet-label {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: oklch(0.145 0.014 262 / 0.8);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 0 transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.8 0.11 162 / 0.35) 30%, oklch(0.75 0.085 232 / 0.35) 70%, transparent);
  pointer-events: none;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { width: 26px; height: 26px; }
.brand .sub {
  margin-left: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font: 500 12px var(--font-body);
  letter-spacing: 0;
}
.header-actions { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: color 120ms ease, background-color 120ms ease;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface-head); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 600 14.5px/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn:active:not([disabled]) { transform: scale(0.98); }
.btn[disabled] { cursor: not-allowed; opacity: 0.55; }
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--brand-grad);
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px oklch(0.8 0.11 162 / 0.22), 0 6px 20px -8px oklch(0.8 0.11 162 / 0.5);
  transition: box-shadow 200ms ease, filter 160ms ease, transform 120ms ease;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, oklch(1 0 0 / 0.32) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease);
  pointer-events: none;
}
.btn-primary:hover:not([disabled]) {
  filter: brightness(1.05);
  box-shadow: 0 0 0 1px oklch(0.8 0.11 162 / 0.35), 0 10px 28px -8px oklch(0.78 0.1 200 / 0.6);
}
.btn-primary:hover:not([disabled])::after { transform: translateX(120%); }
.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not([disabled]) { background: var(--surface-2); border-color: var(--line-accent); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn .arrow { transition: transform 160ms var(--ease); }
.btn:hover .arrow { transform: translateX(2px); }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  margin-left: -10px;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  color: var(--accent);
  font: 500 14px var(--font-body);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.btn-link:hover { background: var(--accent-soft); }

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  color: var(--accent);
  transition: background-color 120ms ease;
}
.icon-link:hover { background: var(--surface-2); }
.icon-link svg { width: 17px; height: 17px; }

.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Panels ---------- */
.card {
  background:
    radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), oklch(0.8 0.11 162 / 0.08), transparent 45%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 200ms ease;
}
.card:hover { border-color: var(--line-strong); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head .title { margin: 0; color: var(--text); }
.panel-head .meta { color: var(--text-muted); font-size: 13px; }

/* ---------- Page head (DEX marketplace style) ---------- */
.page-head { padding: 28px 0 0; }
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-dim);
}
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; opacity: 0.6; }
.crumbs a { text-decoration: none; transition: color 120ms ease; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { margin-right: 4px; vertical-align: -2px; }
.crumbs [aria-current] { color: var(--text-muted); }
.page-head h1 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page-head p { margin: 10px 0 0; max-width: 60ch; color: var(--text-muted); text-wrap: pretty; }

main { flex: 1; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 15px var(--font-display); text-decoration: none; }
.footer-brand img { width: 22px; height: 22px; }
.footer-brand small { color: var(--text-dim); font: 400 13px var(--font-body); }
.site-footer nav { display: flex; align-items: center; gap: 4px; }

/* ---------- Product page ---------- */
.hero-panel {
  margin-top: 24px;
  padding: 36px 32px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 90% at 100% 0%, oklch(0.75 0.085 232 / 0.09), transparent 60%) padding-box,
    radial-gradient(50% 80% at 0% 100%, oklch(0.8 0.11 162 / 0.06), transparent 60%) padding-box,
    linear-gradient(135deg, var(--surface) 0%, var(--surface) 50%, var(--bg) 100%) padding-box,
    linear-gradient(135deg, oklch(0.8 0.11 162 / 0.38), oklch(0.8 0.03 250 / 0.1) 35%, oklch(0.8 0.03 250 / 0.08) 65%, oklch(0.75 0.085 232 / 0.32)) border-box;
}
.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 5px oklch(0.8 0.11 162 / 0); } }
.product-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hl {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { margin: 0 0 24px; max-width: 54ch; color: var(--text-muted); font-size: 16px; text-wrap: pretty; }
.lede strong { color: var(--text); font-weight: 600; }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.price-row.center { justify-content: center; }
.price-tag { display: inline-flex; align-items: baseline; gap: 8px; margin-left: 6px; }
.price-old { color: var(--text-dim); text-decoration: line-through; font-variant-numeric: tabular-nums; font-size: 14px; }
.price-new { font: 600 24px/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Stat tiles, as on a screener's summary row */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.tile {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(0.18 0.016 260 / 0.6);
  min-width: 0;
  transition: transform 220ms var(--ease), border-color 200ms ease, background-color 200ms ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-strong); background-color: oklch(0.2 0.018 260 / 0.7); }
.tile.accent {
  border-color: transparent;
  background:
    linear-gradient(oklch(0.18 0.016 260 / 0.92), oklch(0.18 0.016 260 / 0.92)) padding-box,
    linear-gradient(135deg, oklch(0.8 0.11 162 / 0.5), oklch(0.75 0.085 232 / 0.35)) border-box;
}
.tile.accent b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile span svg { color: var(--text-dim); flex: none; }
.tile.accent span svg { color: var(--accent); }
.tile b { display: block; margin-top: 6px; font: 600 24px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Token panel mock: echoes DEX Screener's token info sidebar */
.token-panel { position: relative; padding: 12px; background: var(--bg); box-shadow: 0 30px 60px -32px oklch(0.75 0.085 232 / 0.45), 0 0 0 1px oklch(0.8 0.03 250 / 0.04); }
.tp-banner {
  position: relative;
  aspect-ratio: 3 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 130%, oklch(0.8 0.11 162 / 0.45), transparent 55%),
    radial-gradient(circle at 90% -30%, oklch(0.7 0.09 232 / 0.4), transparent 55%),
    var(--surface-2);
}
.tp-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(oklch(1 0 0 / 0.04) 1px, transparent 1px), linear-gradient(90deg, oklch(1 0 0 / 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
.tp-head { display: flex; align-items: flex-end; gap: 12px; margin-top: -22px; padding: 0 12px; position: relative; }
.tp-icon {
  width: 56px; height: 56px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius);
  border: 3px solid var(--bg);
  background: var(--brand-grad);
  color: var(--accent-ink);
  font: 700 20px var(--font-display);
}
.tp-name { padding-bottom: 2px; min-width: 0; }
.tp-name strong { display: block; font: 600 16px/1.2 var(--font-display); }
.tp-name span { font: 400 12.5px var(--font-mono); color: var(--text-dim); }
.tp-chain {
  margin-left: auto; margin-bottom: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 12px; color: var(--text-muted);
}
.tp-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.tp-links span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.tp-links svg { width: 13px; height: 13px; }
.tp-desc { display: grid; gap: 7px; margin-top: 14px; }
.tp-desc i { display: block; height: 7px; border-radius: 4px; background: var(--surface-2); }
.tp-desc i:nth-child(1) { width: 94%; }
.tp-desc i:nth-child(2) { width: 81%; }
.tp-desc i:nth-child(3) { width: 58%; }
.tp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.tp-stats div { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tp-stats span { font-size: 10.5px; }
.tp-stats b { display: block; margin-top: 2px; font: 500 13.5px var(--font-mono); font-variant-numeric: tabular-nums; }
.tp-badge {
  position: absolute; top: 20px; right: 20px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-xs);
  background: oklch(0.145 0.014 262 / 0.85);
  color: var(--accent);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}

.section { margin-top: 24px; }

/* Divided grid inside a panel (no cards-in-cards) */
.cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells > * { padding: 22px 20px; border-top: 1px solid var(--line); }
.cells > :nth-child(-n+2) { border-top: 0; }
.cells > :nth-child(even) { border-left: 1px solid var(--line); }
.cells.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cells.four > * { border-top: 0; border-left: 1px solid var(--line); }
.cells.four > :first-child { border-left: 0; }
.feature-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 14px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, oklch(0.8 0.11 162 / 0.16), oklch(0.75 0.085 232 / 0.12));
  color: var(--accent);
  transition: transform 220ms var(--ease);
}
.cells article:hover .feature-icon { transform: translateY(-2px) rotate(-4deg); }
.cells h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.cells p { margin: 0; color: var(--text-muted); font-size: 14px; max-width: 46ch; text-wrap: pretty; }
.steps { list-style: none; margin: 0; padding: 0; }
.step-num {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  font: 500 13px var(--font-mono);
  color: var(--text-muted);
}
.steps li:last-child .step-num { background: var(--brand-grad); border-color: transparent; color: var(--accent-ink); }

/* Highlight strip, like a pinned platform-token row */
.cta-band {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, oklch(0.8 0.11 162 / 0.07), oklch(0.75 0.085 232 / 0.05)) padding-box,
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(90deg, oklch(0.8 0.11 162 / 0.4), oklch(0.75 0.085 232 / 0.3)) border-box;
}
.cta-chip {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: var(--brand-grad);
  color: var(--accent-ink);
  font: 700 13px var(--font-display);
}
.cta-band .cta-text { flex: 1 1 280px; min-width: 0; }
.cta-band strong { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--font-display); }
.cta-band p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.tag-accent {
  padding: 1px 7px;
  border: 1px solid var(--line-accent);
  border-radius: 4px;
  color: var(--accent);
  font: 600 10.5px var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 500ms var(--ease) both; }
  .rise.d1 { animation-delay: 50ms; }
  .rise.d2 { animation-delay: 110ms; }
  .rise.d3 { animation-delay: 170ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Order form ---------- */
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  padding-top: 24px;
}
.summary { position: sticky; top: 78px; }
.summary-body { padding: 14px 16px 16px; }
.summary-preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.sp-banner { position: relative; aspect-ratio: 3 / 1; background: repeating-linear-gradient(135deg, oklch(1 0 0 / 0.025) 0 8px, transparent 8px 16px), var(--surface-2); }
.sp-banner img, .sp-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-row { display: flex; align-items: flex-end; gap: 10px; margin-top: -8px; padding: 0 12px 12px; position: relative; }
.sp-icon { position: relative; overflow: hidden; width: 44px; height: 44px; flex: none; border-radius: var(--radius-sm); border: 3px solid var(--bg); background: var(--surface-head); }
.sp-meta { min-width: 0; padding-bottom: 1px; }
.sp-meta strong { display: block; font: 600 13.5px/1.25 var(--font-display); }
.sp-meta span { display: block; font: 400 12px/1.4 var(--font-mono); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-rows { margin-top: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--text-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.summary-row strong { color: var(--text); font-weight: 500; }
.summary-row .save { color: var(--accent); }
.summary-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); align-items: baseline; }
.summary-total strong { font: 600 22px var(--font-display); letter-spacing: -0.02em; }
.progress { margin-top: 14px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.progress-track { height: 4px; border-radius: 4px; background: var(--surface-head); overflow: hidden; }
.progress-fill { height: 100%; width: 100%; background: var(--brand-grad); box-shadow: 0 0 10px oklch(0.8 0.11 162 / 0.45); transform-origin: left center; transform: scaleX(0); transition: transform 300ms var(--ease); }
.summary .btn { width: 100%; margin-top: 14px; }
.summary .fine { text-align: center; margin: 10px 0 0; }
.fine { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }

/* Each form step is a panel with a header row */
.form-section { margin-bottom: 14px; transition: border-color 200ms ease; }
.form-section[data-complete="true"] { border-color: var(--line-accent); }
.form-section > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: -0.005em;
}
.form-section[data-step] > h2::after {
  content: "Required";
  margin-left: auto;
  color: var(--text-dim);
  font: 500 12px var(--font-body);
}
.form-section[data-complete="true"] > h2::after { content: "Complete"; color: var(--accent); }
.form-section .tag { margin-left: auto; color: var(--text-dim); font: 500 12px var(--font-body); letter-spacing: 0; }
.form-section > .hint { margin: 14px 18px 0; color: var(--text-muted); font-size: 14px; text-wrap: pretty; }
.section-body { padding: 14px 18px 18px; }
.badge-num {
  position: relative;
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  font: 500 12px var(--font-mono);
  color: var(--text-muted);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.badge-num::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b2219' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
  opacity: 0;
  transition: opacity 160ms ease;
}
[data-complete="true"] .badge-num { background: var(--brand-grad); border-color: transparent; color: transparent; }
[data-complete="true"] .badge-num::after { opacity: 1; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.field .opt { color: var(--text-dim); font-weight: 400; }
.field .help { margin-top: 6px; color: var(--text-dim); font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.contact-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

input[type="text"], input[type="url"], input[type="email"], select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  color: var(--text);
  font: 15px/1.4 var(--font-body);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input[name="tokenAddress"], input[name="lockedAddress"], input[type="url"] { font-family: var(--font-mono); font-size: 14px; }
select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23a3adc2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
select option { background-color: oklch(0.18 0.016 260); color: var(--text); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.8 0.11 162 / 0.15);
}
[aria-invalid="true"] { border-color: var(--danger) !important; }
input[aria-invalid="true"]:focus-visible, textarea[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px oklch(0.7 0.16 25 / 0.18); }
.error { display: flex; gap: 6px; align-items: flex-start; margin-top: 7px; color: var(--danger); font-size: 13px; }
.error::before {
  content: ""; flex: none; width: 13px; height: 13px; margin-top: 3px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.error:empty { display: none; }
.counter { float: right; color: var(--text-dim); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.counter.near { color: var(--warn); }

.repeat-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 42px; gap: 8px; margin-bottom: 8px; }
.repeat-row.single { grid-template-columns: minmax(0, 1fr) 42px; }
.icon-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}
.icon-btn:hover { color: var(--danger); border-color: oklch(0.7 0.16 25 / 0.4); background: var(--danger-soft); }

/* Uploads */
.upload-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
.dropzone {
  position: relative;
  display: grid; place-items: center; text-align: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-dim);
  font-size: 12.5px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: oklch(0.8 0.11 162 / 0.04); }
.dropzone.drag { border-style: solid; }
.dropzone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.8 0.11 162 / 0.15); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.icon { aspect-ratio: 1 / 1; }
.dropzone.header { aspect-ratio: 3 / 1; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone:has(img)::after {
  content: "Replace";
  position: absolute; right: 8px; bottom: 8px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: oklch(0.145 0.014 262 / 0.9);
  color: var(--text);
  font-size: 12px; font-weight: 500;
  opacity: 0;
  transition: opacity 120ms ease;
}
.dropzone:has(img):hover::after { opacity: 1; }
.dz-inner { display: grid; justify-items: center; gap: 5px; pointer-events: none; }
.dz-inner svg { color: var(--text-muted); }
.dropzone strong { display: block; color: var(--text); font-weight: 500; font-size: 13.5px; }
.dropzone[aria-invalid="true"] { border-style: solid; }

/* Wallet / eligibility */
.wallet-box {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.wallet-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.wallet-id > div { min-width: 0; }
.wallet-avatar {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
}
.wallet-label { font-size: 10.5px; }
.wallet-addr { font: 400 13.5px var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: oklch(0.18 0.016 260 / 0.6); min-width: 0; }
.stat span { display: block; font-size: 10.5px; }
.stat strong { display: block; margin-top: 4px; font: 600 18px var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 600;
}
.pill-ok { color: var(--accent); border-color: var(--line-accent); background: var(--accent-soft); }
.pill-bad { color: var(--danger); border-color: oklch(0.7 0.16 25 / 0.35); background: var(--danger-soft); }
.pill-wait { color: var(--text-muted); border-color: var(--line); }
.status-msg { margin-top: 10px; color: var(--text-muted); font-size: 14px; }
.status-msg:empty { display: none; }
.status-msg a { color: var(--accent); font-weight: 500; }

.check {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 -10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.check:hover { background: var(--surface-2); color: var(--text); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; cursor: pointer; }

.form-alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid oklch(0.7 0.16 25 / 0.35);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: oklch(0.9 0.05 25);
  font-size: 14px;
}
.form-alert:empty { display: none; }

.success { max-width: 560px; margin: 32px auto 0; padding: 40px 28px; text-align: center; }
.success-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: var(--radius);
  background: var(--brand-grad);
  color: var(--accent-ink);
  box-shadow: 0 0 0 6px var(--accent-soft), 0 14px 34px -12px oklch(0.8 0.11 162 / 0.6);
}
.success h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.025em; }
.success p { max-width: 46ch; margin: 0 auto 8px; color: var(--text-muted); }
.order-id { padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--bg); color: var(--text); font-family: var(--font-mono); }
.success .actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; }

/* 404 */
.not-found { padding: 88px 0 16px; text-align: center; }
.not-found .code { font: 700 clamp(64px, 12vw, 120px)/1 var(--font-display); letter-spacing: -0.05em; color: var(--surface-head); }
.not-found h1 { margin: 10px 0 8px; font-size: 26px; }
.not-found p { margin: 0 0 24px; color: var(--text-muted); }

[hidden] { display: none !important; }

@media (max-width: 960px) {
  .order-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; order: 2; }
  .product-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells.four > * { border-left: 0; border-top: 1px solid var(--line); }
  .cells.four > :nth-child(even) { border-left: 1px solid var(--line); }
  .cells.four > :nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 640px) {
  .header-actions .nav-link { display: none; }
  .brand .sub { display: none; }
  .hero-panel { padding: 24px 18px 18px; }
  .cells, .cells.four { grid-template-columns: minmax(0, 1fr); }
  .cells > *, .cells.four > * { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .cells > :first-child, .cells.four > :first-child { border-top: 0 !important; }
  .field-row, .upload-grid, .contact-row { grid-template-columns: minmax(0, 1fr); }
  .repeat-row { grid-template-columns: minmax(0, 1fr) 42px; }
  .repeat-row > :first-child { grid-column: 1 / -1; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .dropzone.icon { max-width: 170px; }
  .tp-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-actions { width: 100%; justify-content: space-between; }
  .form-section > h2, .section-body { padding-left: 14px; padding-right: 14px; }
  .form-section > .hint { margin-left: 14px; margin-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
  .spinner { animation: spin 1.4s linear infinite !important; }
  .btn:active:not([disabled]) { transform: none; }
  .tile:hover, .cells article:hover .feature-icon { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
@media (prefers-contrast: more) {
  :root { --line: oklch(0.8 0.03 250 / 0.4); --line-strong: oklch(0.8 0.03 250 / 0.55); --text-muted: oklch(0.84 0.02 255); }
}
