/* ───────────────────────────────────────────────────────────
   Elevation design system
   Light, warm neutrals by default; dark hero; amber is the brand
   accent and always means "floor" or "primary action".
   ─────────────────────────────────────────────────────────── */
:root {
  --bg: #f7f5f1;
  --card: #ffffff;
  --card-2: #f1eee8;
  --line: #e8e3da;
  --line-2: #dbd4c8;
  --ink: #15120d;
  --ink-2: #3f3a32;
  --dim: #6f685d;
  --faint: #a0988b;
  --brand: #ffb547;
  --brand-ink: #15120d;
  --brand-deep: #a35c00;
  --brand-soft: #fff3de;
  --up: #2f8a2f;
  --down: #d23f31;
  --hero: #100d09;
  --shadow: 0 1px 2px rgba(21, 18, 13, 0.04), 0 4px 16px rgba(21, 18, 13, 0.04);
  --shadow-lg: 0 12px 40px rgba(21, 18, 13, 0.12);
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0a07; --card: #15120d; --card-2: #1d1914; --line: #2a251d; --line-2: #373027;
  --ink: #f5f1ea; --ink-2: #dbd4c8; --dim: #a89f91; --faint: #766e62;
  --brand-deep: #ffb547; --brand-soft: rgba(255, 181, 71, 0.1); --up: #7bd36b; --down: #ff6b5c;
  --hero: #15120d; --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; border-radius: 6px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--faint); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.accent, .lime { color: var(--brand-deep); }
.up { color: var(--up); }
.down, .red { color: var(--down); }
.r { text-align: right; }
.nw { white-space: nowrap; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.lead { color: var(--dim); font-size: 15px; max-width: 60ch; margin: 8px 0 0; }
section { padding: 20px 0; }

/* motion: only after the browser is painting frames (see index.html) */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.anim .enter { animation: rise 520ms var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.anim .page { animation: fadein 260ms var(--ease) both; }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── nav ─────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-top { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo .word { font-weight: 650; font-size: 18px; letter-spacing: -0.035em; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { white-space: nowrap; padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--dim); transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.nav-links a.active { color: var(--ink); background: var(--card-2); }
@media (hover: hover) { .nav-links a:hover { color: var(--ink); } }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; width: 240px; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--faint); transition: border-color 150ms var(--ease); }
.search:focus-within { border-color: var(--line-2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--dim); cursor: pointer; transition: transform 150ms var(--ease), color 150ms var(--ease); }
.icon-btn:active { transform: scale(0.95); }
@media (hover: hover) { .icon-btn:hover { color: var(--ink); } }
@media (max-width: 900px) { .search { display: none; } .nav-top { gap: 14px; } }
@media (max-width: 860px) { .nav-right .icon-btn { display: none; } }
@media (max-width: 560px) { .logo .word { display: none; } .nav-links a { padding: 7px 8px; } .nav-top { gap: 10px; } .acct .btn .mono { display: none; } }

/* ── buttons ─────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 550; white-space: nowrap; cursor: pointer; user-select: none; transition: transform 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease), opacity 150ms var(--ease); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
@media (hover: hover) { .btn:hover:not(:disabled) { border-color: var(--faint); } }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (hover: hover) { .btn.primary:hover:not(:disabled), .btn.brand:hover:not(:disabled) { opacity: 0.88; } }
.btn.ghost-dark { background: transparent; color: #f5f1ea; border-color: rgba(255,255,255,.18); }
.btn.danger { color: var(--down); }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }

/* ── surfaces ────────────────────────────────────── */
.card, .panel, .tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.panel { padding: 20px; }
.panel + .panel { margin-top: 12px; }
.tile { padding: 16px; border-radius: 14px; }
.tile.hl { background: var(--brand-soft); border-color: transparent; }
.tile p { margin: 4px 0 0; color: var(--dim); }
.empty { padding: 48px 20px; text-align: center; color: var(--dim); background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--card-2); color: var(--dim); white-space: nowrap; }
.badge.accent, .badge.floor { background: var(--brand-soft); color: var(--brand-deep); }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--card-2); color: var(--dim); }
.chip.floor { background: var(--brand-soft); color: var(--brand-deep); }
.addr { font-family: var(--mono); font-size: 12px; color: var(--faint); cursor: pointer; }
@media (hover: hover) { .addr:hover { color: var(--dim); } }
.timg { flex: none; display: block; object-fit: cover; background: var(--card-2); }

/* ── hero ────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; margin-top: 24px; padding: 40px; border-radius: 24px; background: var(--hero); color: #f5f1ea; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero::before { content: ""; position: absolute; inset: auto -10% -60% 30%; height: 140%; background: radial-gradient(closest-side, rgba(255, 181, 71, 0.16), transparent); pointer-events: none; }
.hero h1 { position: relative; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -0.035em; margin: 16px 0 14px; }
.hero h1 em { color: var(--brand); }
.hero p { position: relative; color: #a7a99f; font-size: 16px; margin: 0 0 24px; max-width: 52ch; }
.hero-tags { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.htag { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 500; color: #d9dad3; background: rgba(255,255,255,.07); }
.htag.brand { background: var(--brand); color: var(--brand-ink); }
.live { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: live 2s infinite; }
@keyframes live { 50% { opacity: 0.35; } }
.hero-cta { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); }
.hero-stats > div { padding: 18px; background: rgba(17,19,16,.92); }
.hero-stats span { display: block; font-size: 12px; color: #8e9087; }
.hero-stats b { display: block; margin-top: 4px; font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -0.03em; color: #f6f7f1; }
.hero-stats b.brand { color: var(--brand); }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 26px; } }

/* ── trending ────────────────────────────────────── */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { display: flex; align-items: center; gap: 9px; }
.sec-head h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-deep); }
.arrows { display: flex; gap: 6px; }
.arrows button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--dim); transition: transform 150ms var(--ease); }
.arrows button:active { transform: scale(0.94); }
.trend { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px 2px 10px; }
.trend::-webkit-scrollbar { display: none; }
.tcard { position: relative; flex: none; width: 184px; padding: 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-snap-align: start; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
@media (hover: hover) { .tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.tcard .timg { width: 100%; aspect-ratio: 1; height: auto; border-radius: 12px; }
.rank { position: absolute; top: 16px; left: 16px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--hero); color: var(--brand); }
.tcard-name { margin-top: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-name small { color: var(--faint); font-weight: 500; font-size: 12px; margin-left: 4px; }
.tcard-num { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; font-family: var(--mono); font-size: 13px; }
.tcard-num b { font-weight: 600; }
.tcard-floor { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--brand-deep); font-family: var(--mono); }

/* ── table ───────────────────────────────────────── */
.toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pills button { height: 32px; padding: 0 13px; border-radius: 99px; border: 0; background: transparent; font-size: 13px; font-weight: 500; color: var(--dim); cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.pills button.on { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .pills button:not(.on):hover { color: var(--ink); } }
.table { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.trow { display: grid; grid-template-columns: minmax(0, 2.2fr) 90px 130px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); transition: background-color 120ms var(--ease); }
.trow.head { border-top: 0; padding-top: 12px; padding-bottom: 10px; font-size: 12px; color: var(--faint); background: var(--card-2); }
a.trow { cursor: pointer; }
@media (hover: hover) { a.trow:hover { background: var(--card-2); } }
.tok { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tok .timg { width: 40px; height: 40px; border-radius: 11px; }
.tok-name { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.tok-name span.n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-name small { color: var(--faint); font-weight: 500; }
.pair { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.pair i { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #8b93ff, #4f57d8); }
.cell { text-align: right; font-family: var(--mono); font-size: 14px; }
.cell b { font-weight: 600; }
.cell small { display: block; font-size: 12px; }
@media (max-width: 760px) {
  .trow { grid-template-columns: minmax(0, 1fr) auto auto; padding: 12px 14px; }
  .trow .c-pair, .trow .c-graph { display: none; }
}

/* ── token page ──────────────────────────────────── */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 22px 0 14px; color: var(--dim); font-size: 13px; font-weight: 500; }
.thead { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.thead .timg { width: 64px; height: 64px; border-radius: 16px; }
.thead h1 { font-size: 28px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.thead h1 small { font-size: 16px; color: var(--faint); font-weight: 500; }
.thead .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--dim); }
.thead .mc { margin-left: auto; text-align: right; }
.thead .mc span { font-size: 12px; color: var(--faint); }
.thead .mc b { display: block; font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.token-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; padding-bottom: 24px; }
.token-grid > *, .create > * { min-width: 0; }
.token-grid .side { position: sticky; top: 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (max-width: 920px) { .token-grid { grid-template-columns: minmax(0, 1fr); } .token-grid .side { position: static; } .thead .mc { display: none; } }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.price-row .p { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.price-row .ch { font-family: var(--mono); font-size: 13px; margin-top: 6px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--card-2); }
.seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; font-size: 12px; font-weight: 600; color: var(--dim); cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg.full { display: flex; width: 100%; margin-bottom: 14px; }
.seg.full button { flex: 1; height: 36px; font-size: 14px; }
.seg.full button.on.buy { background: var(--brand); color: var(--brand-ink); }
.seg.full button.on.sell { background: var(--down); color: #fff; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-foot { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--faint); }
.chart-foot b { color: var(--ink-2); font-family: var(--mono); font-weight: 500; }
.statrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 12px; }
.statrow > div { padding: 14px 16px; border-left: 1px solid var(--line); }
.statrow > div:first-child { border-left: 0; }
.statrow span { display: block; font-size: 12px; color: var(--faint); }
.statrow b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 16px; font-weight: 600; }
@media (max-width: 760px) { .statrow { grid-template-columns: repeat(3, 1fr); } .statrow > div:nth-child(4) { border-left: 0; } .statrow > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kv span { display: block; font-size: 12px; color: var(--faint); }
@media (max-width: 760px) { .kv { grid-template-columns: 1fr 1fr; } }
.tabs-line { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabs-line button { position: relative; height: 40px; border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--faint); cursor: pointer; }
.tabs-line button.on { color: var(--ink); }
.tabs-line button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.ltable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ltable th { text-align: left; font-weight: 500; font-size: 12px; color: var(--faint); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.ltable td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.ltable tr:last-child td { border-bottom: 0; }
.ltable .side-buy { color: var(--up); font-family: var(--sans); font-weight: 600; }
.ltable .side-sell { color: var(--down); font-family: var(--sans); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.feature h3 { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--dim); font-size: 13px; }
.feature .v { font-family: var(--mono); font-size: 13px; color: var(--ink-2); font-weight: 500; }
.floorbox { background: var(--hero); color: #f5f1ea; border: 0; }
.floorbox .k { color: #8e9087; font-size: 12px; }
.floorbox .big { font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--brand); letter-spacing: -0.02em; }
.floorbox p { color: #a7a99f; font-size: 13px; margin: 6px 0 14px; }
.floorbox .input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #f5f1ea; }
.floorbox .row .k { color: #8e9087; }
.floorbox .btn { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* ── forms ───────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field > label .faint { font-weight: 400; }
.input { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.input input, .input select, .input textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 0; font-size: 15px; resize: vertical; }
.input select option { background: var(--card); }
.input .unit { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.input.big input { font-family: var(--mono); font-size: 22px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; transition: border-color 150ms var(--ease); }
.check:has(input:checked) { border-color: var(--ink); }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.hint { margin: 2px 0 0; font-size: 12px; color: var(--faint); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { flex: 1; height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--card-2); font-size: 12px; font-weight: 500; color: var(--dim); cursor: pointer; transition: transform 150ms var(--ease); }
.chips button:active { transform: scale(0.96); }
.slider { width: 100%; accent-color: var(--ink); }
details.adv { margin-bottom: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
details.adv summary { cursor: pointer; font-size: 13px; color: var(--dim); font-weight: 500; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; }
.row .k { color: var(--dim); }
.row .v { font-family: var(--mono); text-align: right; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .sw { position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); transition: background-color 200ms var(--ease); flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 220ms var(--ease); }
.toggle input:checked + .sw { background: var(--ink); }
.toggle input:checked + .sw::after { transform: translateX(16px); }
.split { display: flex; height: 24px; gap: 2px; border-radius: 7px; overflow: hidden; }
.split > div { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #15120d; white-space: nowrap; overflow: hidden; }
.tabs-sm { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs-sm button { height: 30px; padding: 0 12px; border-radius: 99px; border: 0; background: transparent; font-size: 13px; color: var(--dim); cursor: pointer; }
.tabs-sm button.on { background: var(--ink); color: var(--bg); }

/* create wizard */
.create { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; padding-bottom: 40px; }
@media (max-width: 920px) { .create { grid-template-columns: minmax(0, 1fr); } .preview { position: static !important; } }
.page-title { font-size: clamp(34px, 4vw, 44px); letter-spacing: -0.035em; }
.page-title em { color: var(--brand-deep); }
.wsteps { display: flex; gap: 18px; margin-bottom: 18px; font-size: 13px; font-weight: 500; color: var(--faint); }
.wsteps span { display: inline-flex; align-items: center; gap: 8px; }
.wsteps i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--card-2); color: var(--dim); }
.wsteps .on { color: var(--ink); }
.wsteps .on i { background: var(--ink); color: var(--bg); }
.wsteps .done i { background: var(--brand); color: var(--brand-ink); }
.upload { display: flex; align-items: center; gap: 14px; }
.upload .drop { width: 84px; height: 84px; border-radius: 16px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--faint); font-size: 26px; cursor: pointer; overflow: hidden; background: var(--card-2); transition: border-color 150ms var(--ease); }
@media (hover: hover) { .upload .drop:hover { border-color: var(--ink); } }
.upload .drop img { width: 100%; height: 100%; object-fit: cover; }
.preview { position: sticky; top: 84px; }
.preview .pv-top { display: flex; gap: 12px; align-items: center; }
.preview .timg { width: 56px; height: 56px; border-radius: 14px; }
.feegrid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 14px; font-size: 13px; }
.feegrid .h { color: var(--faint); font-size: 12px; }
.feegrid .num { text-align: right; }

/* how / claim */
.how { display: grid; gap: 24px; margin-top: 24px; }
.how-step { display: grid; grid-template-columns: 52px 1fr; gap: 8px; }
.how-step p { margin: 6px 0 0; color: var(--dim); max-width: 64ch; }
.how-n { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1; color: var(--brand-deep); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.ttable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ttable td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ttable tr:last-child td { border-bottom: 0; }
.steps { display: grid; gap: 10px; margin-bottom: 16px; }
.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }

/* overlays */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--dim); word-break: break-word; animation: toast-in 320ms var(--ease) both; }
.toast b { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; }
.toast.ok b::before, .toast.err b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.toast.err b::before { background: var(--down); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 11, 9, 0.45); animation: fadein 180ms var(--ease) both; }
.modal { width: min(400px, 100%); padding: 20px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-lg); animation: toast-in 240ms var(--ease) both; }
.modal h3 { font-size: 17px; margin-bottom: 14px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; width: 100%; margin-bottom: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; transition: transform 150ms var(--ease), border-color 150ms var(--ease); }
.wallet-opt:active { transform: scale(0.98); }
@media (hover: hover) { .wallet-opt:hover { border-color: var(--faint); } }
.wallet-opt small { display: block; font-size: 12px; color: var(--faint); }
.wallet-opt img, .wallet-opt .wicon { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.wallet-opt .wicon { display: grid; place-items: center; background: var(--card-2); font-size: 15px; }
.acct { position: relative; }
.acct .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 210px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: toast-in 180ms var(--ease) both; }
.acct .menu a, .acct .menu button { display: block; width: 100%; padding: 9px 12px; border-radius: 9px; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .acct .menu a:hover, .acct .menu button:hover { background: var(--card-2); } }
.owed { font-family: var(--mono, "Geist Mono", monospace); font-weight: 600; }
.mine-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 10px; }
.mine-row .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .mine-row { grid-template-columns: auto minmax(0,1fr); } .mine-row .acts { grid-column: 1 / -1; justify-content: stretch; } .mine-row .acts .btn { flex: 1; } }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 18px 0 22px; }
.stat-row .tile b { display: block; font-size: 22px; margin-top: 4px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .stat-row > :last-child { grid-column: 1 / -1; } }
.spinner { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* footer */
footer { margin-top: 48px; padding: 40px 0 32px; border-top: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--dim); }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 24px; margin-bottom: 28px; }
.foot-cols h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.foot-cols a { display: block; padding: 3px 0; }
@media (hover: hover) { .foot-cols a:hover { color: var(--ink); } }
.foot-brand p { margin: 10px 0 0; max-width: 34ch; }
.foot-note { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); line-height: 1.6; }
.foot-note select { margin-left: 8px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); font-size: 12px; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-cols > :first-child { grid-column: 1 / -1; } }

/* ── hero: live ratchet + mini stats ─────────────── */
.hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero-copy { position: relative; }
.hero-visual { position: relative; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); padding: 8px 8px 4px; }
.rl { display: block; width: 100%; height: auto; }
.rl .rl-area { display: none; }
.rl-pop { opacity: 0; }
.rl.clicked .rl-pop { animation: rl-pop 1100ms var(--ease) forwards; }
.rl.clicked .rl-floor { animation: rl-flash 700ms var(--ease); }
@keyframes rl-pop { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes rl-flash { 0% { stroke-width: 6; filter: drop-shadow(0 0 8px #ffb547); } 100% { stroke-width: 3.2; filter: none; } }
.hero-mini { position: relative; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 28px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }
.hero-mini span { display: block; font-size: 12px; color: #8e9087; }
.hero-mini b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: #f6f7f1; }
.hero-mini b.brand { color: var(--brand); }
@media (max-width: 600px) { .hero-mini { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ── how it works (home) ─────────────────────────── */
.link { font-size: 13px; font-weight: 500; color: var(--dim); }
.howgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .howgrid { grid-template-columns: minmax(0, 1fr); } }
.howcard { position: relative; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.howcard h3 { margin: 4px 0 6px; font-size: 16px; }
.howcard p { margin: 0; color: var(--dim); font-size: 14px; }
.hn { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--brand-deep); line-height: 1; margin-top: 10px; }
.ill { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--hero); }
.ill-note { fill: #8e9087; font: 11px var(--mono); }
.ill-vault { fill: rgba(255,181,71,.12); stroke: #ffb547; stroke-width: 1.5; }
.ill-vlabel { fill: #ffb547; font: 600 10px var(--mono); letter-spacing: .06em; }
.ill-coin { fill: #ffb547; animation: coin 1.35s cubic-bezier(.5,0,.75,0) infinite; }
@keyframes coin { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateY(62px); opacity: 1; } 100% { transform: translateY(66px); opacity: 0; } }
.ill-step { fill: rgba(255,181,71,.08); animation: step 2.5s steps(1) infinite; }
@keyframes step { 0%, 19% { fill: rgba(255,181,71,.35); } 20%, 100% { fill: rgba(255,181,71,.08); } }
.ill-stair { fill: none; stroke: #ffb547; stroke-width: 2.5; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 2.5s var(--ease) infinite; }
@keyframes draw { 0% { stroke-dashoffset: 260; } 60%, 100% { stroke-dashoffset: 0; } }
.ill-price { fill: none; stroke: #f5f1ea; stroke-opacity: .7; stroke-width: 2; stroke-dasharray: 260; animation: draw 3s var(--ease) infinite; }
.ill-floorline { stroke: #ffb547; stroke-width: 2; stroke-dasharray: 5 4; }
.ill-dot { fill: #ffb547; animation: dot 3s var(--ease) infinite; }
@keyframes dot { 0%, 55% { opacity: 0; } 70%, 100% { opacity: 1; } }

/* ── v6 home: Ratchet's own layout ───────────────── */
.band { position: relative; overflow: hidden; background: var(--hero); color: #f5f1ea; padding: 56px 0 0; }
.band::before { content: ""; position: absolute; right: -10%; top: -30%; width: 70%; height: 140%; background: radial-gradient(closest-side, rgba(255,181,71,.13), transparent); pointer-events: none; }
.band-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
@media (max-width: 920px) { .band-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } .band { padding-top: 32px; } }
.band h1 { font-size: clamp(36px, 4.8vw, 60px); line-height: 1.02; letter-spacing: -0.04em; margin: 16px 0; color: #fff; }
.band h1 em { color: var(--brand); }
.band p { color: #a7a99f; font-size: 16px; max-width: 48ch; margin: 0 0 26px; }
.eyebrow-dark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.band-visual { position: relative; }
.ticker-stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 44px; border-top: 1px solid rgba(255,255,255,.08); }
.ticker-stats > div { padding: 20px 0; }
.ticker-stats > div + div { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.08); }
.ticker-stats b { display: block; font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -0.03em; color: #fff; }
.ticker-stats b.brand { color: var(--brand); }
.ticker-stats span { font-size: 13px; color: #8e9087; }
@media (max-width: 700px) { .ticker-stats { grid-template-columns: 1fr 1fr; } .ticker-stats > div:nth-child(3) { padding-left: 0; border-left: 0; } .ticker-stats > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); } }

.head2 { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 16px; }
.head2 h2 { font-size: 26px; letter-spacing: -0.03em; }
.kicker { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-deep); }
.views { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.views button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 550; color: var(--dim); cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.views button.on { background: var(--brand); color: var(--brand-ink); }

.podium { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 860px) { .podium { grid-template-columns: minmax(0, 1fr); } }
.pod-1 { display: flex; gap: 20px; align-items: center; padding: 22px; border-radius: 20px; background: var(--hero); color: #f5f1ea; transition: transform 200ms var(--ease); }
@media (hover: hover) { .pod-1:hover { transform: translateY(-2px); } }
.pod-body { min-width: 0; }
.pod-rank { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.pod-name { margin-top: 6px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-name small { font-size: 14px; font-weight: 500; color: #8e9087; }
.pod-up { margin-top: 4px; font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.pod-up .up { color: var(--brand); }
.pod-up > span:last-child { display: block; font-size: 13px; color: #8e9087; font-weight: 500; letter-spacing: 0; margin-top: 2px; }
.pod-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: #8e9087; }
.pod-meta b { color: #f5f1ea; font-family: var(--mono); font-weight: 500; margin-left: 4px; }
.pod-rest { display: grid; gap: 8px; }
.pod-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: border-color 150ms var(--ease); }
@media (hover: hover) { .pod-row:hover { border-color: var(--brand-deep); } }
.pod-n { width: 20px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--brand-deep); }
.pod-rname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-rup { font-family: var(--mono); font-weight: 600; }

.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tc { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 200ms var(--ease), border-color 200ms var(--ease); }
@media (hover: hover) { .tc:hover { transform: translateY(-2px); border-color: var(--brand-deep); } }
.tc-top { display: flex; align-items: center; gap: 12px; }
.tc-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-sym { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.tc-chg { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.tc-chart svg { width: 100%; height: 44px; }
.tc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.tc-foot span { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.tc-foot b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.tc-floor { text-align: right; }
.tc-floor b { color: var(--brand-deep); }
.tc-floor b::before { content: "▲ "; font-size: 11px; }

.first { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; border-radius: 20px; background: var(--card); border: 1px dashed var(--line-2); }
.first h3 { font-size: 22px; letter-spacing: -0.02em; margin: 2px 0 8px; }
.first p { margin: 0 0 18px; color: var(--dim); max-width: 46ch; }
@media (max-width: 700px) { .first { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .nav-top { gap: 8px; } .nav-links a { padding: 6px 7px; font-size: 13px; } .nav-right .btn { padding-left: 12px; padding-right: 12px; } }
@media (max-width: 360px) { .nav-links a[href="#/"] { display: none; } }
