/* Candela — engineering-paper style */
:root {
  --paper: #f2f1ea;
  --paper-2: #e9e7dd;
  --card: #fbfaf5;
  --ink: #111111;
  --ink-2: #3f3e3a;
  --mute: #7d7b72;
  --line: #d6d3c6;
  --line-2: #c4c0b0;
  --blue: #1f3cff;
  --blue-2: #1430d9;
  --blue-soft: rgba(31, 60, 255, .09);
  --red: #f0432a;
  --red-soft: rgba(240, 67, 42, .1);
  --green: #12865a;
  --amber: #b97c00;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 15px/1.55 var(--sans);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(17,17,17,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,.045) 1px, transparent 1px);
  background-size: 28px 28px;
  min-height: 100vh;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); }
h1, h2, h3 { font-family: var(--cond); letter-spacing: -.01em; margin: 0; }

@keyframes blink { 50% { opacity: .25; } }
.btn-wallet { white-space: nowrap; }
.btn-wallet[aria-disabled="true"] { cursor: default; }

/* nav */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.nav { display: flex; align-items: center; gap: 24px; height: 64px; border-bottom: 1px solid var(--ink); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 20px var(--cond); letter-spacing: -.01em; }
.logo svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { text-decoration: none; font: 500 13px var(--mono); padding: 6px 10px; color: var(--ink-2); }
.nav-links a:hover { background: var(--paper-2); }
.nav-links a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.chip {
  font: 500 12px var(--mono); border: 1px solid var(--ink); padding: 6px 10px; background: var(--card); white-space: nowrap;
}
.chip i { font-style: normal; color: var(--mute); }
.burger { display: none; background: none; border: 1px solid var(--ink); width: 36px; height: 34px; cursor: pointer; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  font: 600 13px var(--mono); letter-spacing: .02em; padding: 11px 16px; border: 1px solid var(--ink); background: var(--card);
  transition: transform .08s, background .15s;
}
.btn:hover { background: var(--paper-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a2a2a; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* labels */
.eyebrow { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.tag { display: inline-block; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border: 1px solid currentColor; }
.tag-live { color: var(--blue); }
.tag-live::before { content: ''; display: inline-block; width: 6px; height: 6px; background: currentColor; border-radius: 50%; margin-right: 6px; vertical-align: 1px; animation: blink 1.2s infinite; }
.tag-closing { color: var(--red); }
.tag-upcoming { color: var(--amber); }
.tag-settled { color: var(--ink-2); }
.tag-own { color: var(--red); }
.muted { color: var(--mute); }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* cards / panels */
.panel { background: var(--card); border: 1px solid var(--ink); position: relative; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-h h3 { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.panel-b { padding: 16px; }
.corner::before, .corner::after { content: '+'; position: absolute; font: 400 14px var(--mono); color: var(--ink); line-height: 1; }
.corner::before { top: -8px; left: -5px; }
.corner::after { bottom: -8px; right: -5px; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; padding: 56px 0 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: .95; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 540px; margin: 22px 0 28px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.formula { margin-top: 28px; font: 13px var(--mono); color: var(--ink-2); border-left: 2px solid var(--blue); padding: 4px 0 4px 12px; }
.hero-card .panel-b { padding: 8px 8px 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.hero-stats > div { padding: 12px 16px; border-right: 1px solid var(--line); min-width: 0; }
.hero-stats > div:last-child { border-right: 0; }
.big { font: 600 22px var(--mono); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ticker strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--card); margin-bottom: 64px; }
.strip > div { padding: 16px 18px; border-right: 1px solid var(--line); min-width: 0; }
.strip > div:last-child { border-right: 0; }

/* sections */
.section { margin: 0 0 72px; }
.section-h { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-h h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; font-weight: 600; }
.section-h p { color: var(--ink-2); max-width: 520px; margin: 8px 0 0; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--card); }
.step { padding: 20px; border-right: 1px solid var(--line); min-width: 0; }
.step:last-child { border-right: 0; }
.step .num { font: 600 12px var(--mono); color: var(--blue); }
.step h3 { font-size: 21px; margin: 10px 0 8px; }
.step p { color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.step code { display: block; font-size: 12px; background: var(--paper); border: 1px dashed var(--line-2); padding: 8px; overflow-x: auto; white-space: nowrap; }

.cmp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-family: var(--mono); text-align: right; }
.kv .hr { grid-column: 1 / -1; border-top: 1px dashed var(--line-2); }

/* auction cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.acard { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--ink); padding: 18px; transition: transform .12s, box-shadow .12s; min-width: 0; }
.acard:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.acard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acard h3 { font-size: 24px; margin: 14px 0 2px; }
.acard .tk { font: 500 12px var(--mono); color: var(--mute); }
.acard p { color: var(--ink-2); font-size: 14px; margin: 10px 0 14px; min-height: 44px; }
.acard .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.acard .row b { display: block; font: 600 14px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard .row span { font: 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.bar { height: 4px; background: var(--paper-2); margin-top: 14px; position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--blue); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: 500 12px var(--mono); padding: 7px 12px; border: 1px solid var(--ink); background: var(--card); cursor: pointer; }
.filters button.on { background: var(--ink); color: var(--paper); }

/* auction page */
.a-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 32px 0 20px; flex-wrap: wrap; }
.a-head h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1; }
.a-head .sub { color: var(--ink-2); margin-top: 8px; max-width: 620px; }
.clock { text-align: right; }
.clock .big { font-size: 30px; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--card); margin-bottom: 20px; }
.metrics > div { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.metrics > div:last-child { border-right: 0; }
.metrics .big { font-size: 18px; }
.metrics .hl { color: var(--blue); }
.a-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.a-main, .a-side { display: grid; gap: 20px; min-width: 0; }
.a-main > *, .a-side > * { min-width: 0; }
.chart-host { width: 100%; min-width: 0; }
.chart-svg { width: 100%; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font: 11.5px var(--mono); color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }

/* svg */
.grid { stroke: var(--line); stroke-width: 1; }
.tick { font: 10.5px var(--mono); fill: var(--mute); }
.axis { font: 10.5px var(--mono); fill: var(--mute); letter-spacing: .04em; }
.lbl { font: 600 11px var(--mono); fill: var(--ink); }
.lbl-blue { fill: var(--blue); }
.lbl-red { fill: var(--red); }
.curve { fill: none; stroke: var(--blue); stroke-width: 2; }
.curve-red { fill: none; stroke: var(--red); stroke-width: 1.6; }
.curve-flat { stroke: var(--blue); stroke-width: 2.5; }
.supply { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 4; }
.reserve { stroke: var(--red); stroke-width: 1.2; stroke-dasharray: 2 4; }
.cross { stroke: var(--blue); stroke-width: 1; stroke-dasharray: 3 3; }
.area-raised { fill: var(--blue-soft); }
.area-committed { fill: rgba(17,17,17,.07); }
.clear-dot { fill: var(--blue); }
.clear-ring { fill: none; stroke: var(--blue); stroke-width: 1.2; animation: ring 2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
.user-mark { fill: var(--red); }
.bot-dot { fill: var(--red); }
.now-line { stroke: var(--red); stroke-width: 1; }
.mark-line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--paper-2); font-family: var(--mono); white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.me td { background: var(--blue-soft); }
.tbl tr.new td { animation: flash 1.2s; }
@keyframes flash { from { background: rgba(31,60,255,.18); } to { background: transparent; } }
.st { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.st-filled { color: var(--green); }
.st-partial { color: var(--amber); }
.st-outbid, .st-below { color: var(--red); }
.st-late { color: var(--red); }

/* ticket */
.ticket label { display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 0 0 6px; }
.field { display: flex; border: 1px solid var(--ink); background: #fff; margin-bottom: 14px; }
.field input, .field select { flex: 1; min-width: 0; border: 0; outline: 0; padding: 11px 12px; font: 500 15px var(--mono); background: transparent; }
.field span { padding: 11px 12px; font: 500 12px var(--mono); color: var(--mute); border-left: 1px solid var(--line); display: flex; align-items: center; }
.field:focus-within { box-shadow: 0 0 0 3px var(--blue-soft); border-color: var(--blue); }
.quick { display: flex; gap: 6px; margin: -6px 0 14px; flex-wrap: wrap; }
.quick button { font: 500 11px var(--mono); padding: 4px 8px; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; }
.quick button:hover { border-color: var(--ink); }
.estimate { background: var(--paper); border: 1px dashed var(--line-2); padding: 12px; margin-bottom: 14px; font-size: 13px; }
.estimate .kv { font-size: 13px; gap: 6px 12px; }
.note { font-size: 12.5px; color: var(--ink-2); }
.msg { font: 500 12.5px var(--mono); margin-top: 10px; min-height: 18px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.rules li { margin-bottom: 8px; font-size: 13.5px; color: var(--ink-2); }
.rules { padding-left: 18px; margin: 0; }
.result-big { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.result-big > div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.result-big > div:last-child { border-right: 0; }
.a-side .result-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-side .result-big > div:nth-child(2) { border-right: 0; }
.a-side .result-big > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.banner { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: 14px 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.banner .btn { color: var(--ink); }

/* docs */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 40px 0 80px; }
.toc { position: sticky; top: 20px; align-self: start; display: grid; gap: 2px; }
.toc a { text-decoration: none; font: 500 13px var(--mono); padding: 6px 10px; border-left: 2px solid var(--line); color: var(--ink-2); }
.toc a:hover { border-color: var(--blue); color: var(--ink); }
.prose h2 { font-size: 32px; margin: 48px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); max-width: 760px; }
.prose pre { background: var(--ink); color: #e9e7dd; padding: 16px; overflow-x: auto; font: 12.5px/1.6 var(--mono); border: 0; }
.prose pre .c { color: #8f8c80; }
.prose pre .k { color: #8ea0ff; }
.prose .callout { border-left: 3px solid var(--red); background: var(--red-soft); padding: 12px 16px; color: var(--ink); margin: 16px 0; max-width: 760px; }
.prose table.tbl td { white-space: normal; font-family: var(--sans); }
.toy input { width: 100%; border: 1px solid var(--line-2); background: #fff; padding: 6px 8px; font: 13px var(--mono); }

/* token */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tier { background: var(--card); border: 1px solid var(--ink); padding: 22px; display: flex; flex-direction: column; min-width: 0; }
.tier.feat { background: var(--ink); color: var(--paper); }
.tier.feat .muted, .tier.feat li { color: #bdbab0; }
.tier h3 { font-size: 24px; }
.tier .price { font: 600 30px var(--mono); margin: 12px 0 4px; }
.tier ul { padding-left: 18px; margin: 14px 0 0; }
.tier li { margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }
.split { display: flex; height: 38px; border: 1px solid var(--ink); margin: 14px 0 10px; }
.split > div { display: flex; align-items: center; justify-content: center; font: 600 12px var(--mono); color: #fff; min-width: 0; overflow: hidden; white-space: nowrap; }

/* create */
.create-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 72px; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); margin-bottom: 14px; }
.seg button { border: 0; border-right: 1px solid var(--line); background: #fff; padding: 9px 4px; font: 500 11.5px var(--mono); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.row2 > * { min-width: 0; }

/* footer */
footer { border-top: 1px solid var(--ink); padding: 28px 0 40px; font-size: 13px; color: var(--ink-2); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer .disc { max-width: 680px; }

/* responsive */
@media (max-width: 1080px) {
  .a-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics > div:nth-child(3) { border-right: 0; }
  .metrics > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .create-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cmp-grid { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div:nth-child(2) { border-right: 0; }
  .strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-big > div:nth-child(2) { border-right: 0; }
  .result-big > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--ink); flex-direction: column; margin: 0; padding: 8px 12px; z-index: 20; }
  .nav-links.open { display: flex; }
  .nav { position: relative; }
  .burger { display: block; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics > div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .metrics > div:nth-child(2n) { border-right: 0 !important; }
  .hero-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-stats > div:nth-child(3) { display: none; }
  .hero-stats > div:nth-child(2) { border-right: 0; }
  .nav-right .chip { display: none; }
  .clock { text-align: left; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
}
