:root {
  --ink: #0c0b10;
  --ink-2: #14121b;
  --ink-3: #1d1a27;
  --line: #2b2738;
  --paper: #f1ecdf;
  --paper-ink: #1a1720;
  --text: #ece8f4;
  --muted: #8f89a3;
  --sol-purple: #9945ff;
  --sol-green: #14f195;
  --warn: #ffb547;
  --bad: #ff5c7a;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --r: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(153, 69, 255, 0.18), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(20, 241, 149, 0.08), transparent 60%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* ticker */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--ink-2); font: 500 12px/30px var(--mono); color: var(--muted); }
.ticker-track { display: inline-flex; gap: 48px; white-space: nowrap; padding-left: 100%; animation: tick 40s linear infinite; }
.ticker-track b { color: var(--sol-green); font-weight: 500; }
@keyframes tick { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 16px; } }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 48px); background: rgba(12, 11, 16, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font: 700 17px var(--mono); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { color: var(--sol-green); }
.brand-dim { color: var(--muted); font-weight: 400; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.net-pill { font: 500 11px var(--mono); color: var(--sol-green); border: 1px solid rgba(20, 241, 149, 0.35); padding: 4px 10px; border-radius: 99px; }

/* buttons */
.btn { font: 600 14px var(--sans); border-radius: 10px; padding: 11px 18px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s, background .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-primary { background: var(--sol-green); color: #04140d; }
.btn-primary:hover { background: #4bffb3; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-wallet { background: linear-gradient(90deg, var(--sol-purple), #6b3cff); color: #fff; font-family: var(--mono); font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* hero */
main > section { padding: 0 clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 56px; align-items: center; padding-top: 72px !important; padding-bottom: 88px !important; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sol-green); margin: 0 0 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(44px, 6.4vw, 88px); line-height: .98; letter-spacing: -0.02em; }
.hero h1 em { color: var(--sol-green); }
.lede { color: #c5bfd6; font-size: 18px; max-width: 560px; margin: 26px 0 32px; }
.lede strong { color: var(--text); background: linear-gradient(transparent 62%, rgba(153, 69, 255, .45) 62%); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* pay stub */
.stub { position: relative; background: var(--paper); color: var(--paper-ink); font-family: var(--mono); font-size: 13px; padding: 22px 22px 34px; border-radius: 4px; transform: rotate(1.4deg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .05); }
.stub-head { display: flex; justify-content: space-between; font-weight: 700; letter-spacing: .14em; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 2px solid var(--paper-ink); }
.stub-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(26, 23, 32, .25); }
.stub-row b { font-weight: 700; white-space: nowrap; }
.stub-rule { height: 10px; }
.stub-row.big { font-size: 17px; border: 0; }
.stub-row.big b { color: #6a1fd6; }
.stub-foot { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 11px; color: #6c6677; }
.stub-foot code { background: rgba(26, 23, 32, .07); padding: 2px 6px; border-radius: 3px; }
.stub-perf { position: absolute; left: 0; right: 0; bottom: -8px; height: 16px; background: radial-gradient(circle at 8px 0, transparent 7px, var(--paper) 7.5px) 0 0 / 16px 16px repeat-x; }

/* sections */
.section-title { font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.01em; margin-bottom: 28px; }
.section-title span { font: 500 13px var(--mono); color: var(--sol-purple); vertical-align: super; margin-right: 10px; }
.how, .board, .ledger, .calc { padding-top: 56px !important; padding-bottom: 56px !important; border-top: 1px solid var(--line); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; counter-reset: s; }
.steps li { background: var(--ink-2); padding: 26px 22px; counter-increment: s; }
.steps li::before { content: "0" counter(s); font: 700 12px var(--mono); color: var(--sol-green); display: block; margin-bottom: 18px; }
.steps h3 { font: 600 17px var(--sans); margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

/* board */
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.board-head .section-title { margin-bottom: 0; }
.board-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 12px var(--mono); background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.chip.active { color: var(--ink); background: var(--text); border-color: var(--text); }
.rule-note { font: 12px var(--mono); color: var(--muted); margin: 16px 0 24px; }
.rule-note b { color: var(--text); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.paid { opacity: .78; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 5px; }
.tag.clip { background: rgba(255, 92, 122, .14); color: #ff8aa0; }
.tag.art { background: rgba(153, 69, 255, .18); color: #c39bff; }
.tag.tool { background: rgba(20, 241, 149, .12); color: var(--sol-green); }
.reward { font: 700 18px var(--mono); }
.reward small { font-size: 11px; color: var(--muted); font-weight: 400; }
.card h3 { font: 600 17px var(--sans); }
.card .brief { color: var(--muted); font-size: 14px; margin: -6px 0 0; }
.status { font: 500 11px var(--mono); color: var(--muted); }
.status.open::before { content: "● "; color: var(--sol-green); }
.status.paid::before { content: "✓ "; color: var(--sol-green); }

.subs { display: flex; flex-direction: column; gap: 8px; }
.sub { border: 1px solid var(--line); background: var(--ink-3); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.sub.accepted { border-color: rgba(20, 241, 149, .5); }
.sub-head { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; }
.sub-head a { color: #c39bff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.sub-note { color: var(--muted); margin: 4px 0 8px; }
.vote { display: flex; align-items: center; gap: 8px; }
.vote button { font: 600 12px var(--mono); border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.vote button:hover:not(:disabled) { border-color: var(--sol-green); }
.vote button:disabled { opacity: .4; cursor: not-allowed; }
.meter { flex: 1; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--sol-purple), var(--sol-green)); transition: width .3s; }
.meter-lbl { font: 11px var(--mono); color: var(--muted); min-width: 44px; text-align: right; }
.paid-line { font: 12px var(--mono); color: var(--sol-green); }
.empty { color: var(--muted); font: 12px var(--mono); }

/* ledger */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font: 13px var(--mono); min-width: 560px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td.in { color: var(--sol-green); }
td.out { color: #ff8aa0; }
td.tx { color: var(--muted); }
.ledger-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* calc */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.calc-inputs { display: flex; flex-direction: column; gap: 22px; }
.calc-inputs label { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.calc-inputs input { grid-column: 1 / -1; accent-color: var(--sol-green); width: 100%; }
.calc-inputs output { font: 600 14px var(--mono); color: var(--text); grid-row: 1; grid-column: 2; }
.calc-out { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.calc-out > div:not(.bar) { display: flex; justify-content: space-between; align-items: baseline; }
.calc-out span { color: var(--muted); font-size: 14px; }
.calc-out b { font: 700 22px var(--mono); }
.bar { height: 12px; background: rgba(153, 69, 255, .35); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sol-green); transition: width .25s; }
.fine { font-size: 12px; color: var(--muted); margin: 0; }
.fine b, .calc-out .fine b { color: var(--text); font: 600 12px var(--mono); }

.foot { border-top: 1px solid var(--line); padding: 28px clamp(16px, 4vw, 48px); color: var(--muted); font: 12px var(--mono); text-align: center; }
.foot p { margin: 0 0 14px; }
.socials { display: flex; justify-content: center; gap: 12px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); transition: color .2s, border-color .2s; }
.socials a:hover { color: var(--sol-green); border-color: var(--sol-green); }

/* dialogs */
dialog { background: var(--ink-2); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 26px; width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 4, 8, .7); backdrop-filter: blur(3px); }
dialog h3 { font-family: var(--serif); font-size: 30px; margin-bottom: 16px; }
dialog form { display: flex; flex-direction: column; gap: 14px; }
dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
dialog input, dialog select, dialog textarea { font: 14px var(--sans); background: var(--ink); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
dialog input:focus, dialog select:focus, dialog textarea:focus { outline: 2px solid var(--sol-purple); outline-offset: -1px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--text); color: var(--ink); font: 600 13px var(--mono); padding: 11px 18px; border-radius: 10px; transition: .25s; z-index: 50; width: max-content; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 44px !important; }
  .stub { transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .net-pill { display: none; }
  .lede { font-size: 16px; }
}
