:root {
  --bg: #f6f9fd;
  --bg-2: #eef4fb;
  --surface: #ffffff;
  --line: #e3eaf3;
  --line-2: #d3dde9;
  --ink: #0e1f3a;
  --ink-2: #3f5170;
  --muted: #6f7f98;
  --green: #2f9a2a;
  --green-2: #4ec242;
  --green-soft: #e7f7e4;
  --blue: #2a63c9;
  --blue-soft: #e8f0fc;
  --orange: #c9531a;
  --sky-top: #cfe6ff;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(14, 31, 58, .04), 0 8px 24px rgba(14, 31, 58, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 520px at 50% -140px, var(--sky-top), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
code, .num { font-family: var(--mono); font-weight: 500; }
img { max-width: 100%; }

/* ---------- top bar ---------- */
.banner { background: #fff4e5; color: #7a3a10; text-align: center; font-size: .875rem; padding: 8px 16px; border-bottom: 1px solid #f3d3b3; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; justify-content: center; padding: 14px var(--gutter) 0; pointer-events: none; }
.navpill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  width: min(100%, 980px);
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(211, 221, 233, .9);
  box-shadow: 0 1px 2px rgba(14, 31, 58, .04), 0 10px 30px rgba(14, 31, 58, .08);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; font-size: 1rem; }
.brand img { width: 28px; height: 28px; }
.navlinks { display: flex; gap: 2px; margin: 0 auto; }
.navlinks a { text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--ink-2); padding: 7px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.navlinks a:hover { background: var(--bg-2); color: var(--ink); }
.navright { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.iconbtn:hover { background: var(--bg-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1b3157; transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: #b8c6d8; background: #fbfdff; }

/* ---------- layout ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0 8px; }
.section-head { margin-bottom: 28px; max-width: 720px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 8px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 24px 32px; align-items: center; padding: 64px 0 24px; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 600px; margin-top: 20px; }
.ca { display: flex; align-items: center; gap: 0; margin-top: 26px; width: max-content; max-width: 100%; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden; }
.ca-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); padding: 0 12px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; background: var(--bg-2); }
.ca code { font-size: .84rem; padding: 10px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.ca-copy, .ca-label { flex: none; }
.ca-copy { border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .82rem var(--font); padding: 10px 14px; cursor: pointer; }
.ca-copy:hover { background: var(--bg-2); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.hero-stats > div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.hero-stats > div:last-child { border-right: 0; }
.hero-stats dt { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 4px 0 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-stats > div { padding: 16px 20px; }
.hero-stats .sub { display: block; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 380px; }
.halo { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(78, 194, 66, .18), rgba(42, 99, 201, .06) 55%, transparent 72%); }
.balloon { position: relative; width: min(100%, 400px); height: auto; filter: drop-shadow(0 24px 30px rgba(14, 31, 58, .18)); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.stat-2 { grid-column: span 2; }
.k { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.k-sub { text-transform: none; letter-spacing: 0; font-weight: 500; }
.v { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit { font-size: .8rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.s { font-size: .82rem; color: var(--muted); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 8px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); margin-top: 12px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--green-2), var(--green)); transition: width .5s; }
.stat-wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 14px 20px; }
.stat-wide .k { flex: none; }
.stat-wide .v { font-size: 1rem; margin: 0; }
.stat-wide .s { margin: 0; }
.status-row { display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-2); font-size: .875rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c7d1de; margin-right: 7px; vertical-align: 1px; }
.dot-on { background: var(--green); box-shadow: 0 0 0 3px rgba(47, 154, 42, .15); }
.dot-off { background: var(--orange); box-shadow: 0 0 0 3px rgba(201, 83, 26, .15); }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); margin-top: 16px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h3 { font-size: 1.05rem; font-weight: 700; }
.panel-head p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--ink-2); }
.sw { display: inline-block; width: 14px; height: 2px; background: var(--green); vertical-align: middle; margin-right: 6px; }
.sw-anchor { background: none; border-top: 2px dashed var(--blue); height: 0; }
.sw-buy { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.chart-wrap { position: relative; }
canvas { width: 100%; display: block; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; }
.chart-empty[hidden] { display: none; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .78rem; line-height: 1.5; padding: 8px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -115%); box-shadow: var(--shadow); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .875rem; table-layout: fixed; }
.tbl th { text-align: left; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td a { color: var(--blue); text-decoration: none; font-family: var(--mono); font-size: .8rem; }
.tbl td a:hover { text-decoration: underline; }
.tbl .muted { color: var(--muted); }
.tbl .empty td { color: var(--muted); white-space: normal; }
.tbl .up { color: var(--green); }
.tbl .down { color: var(--orange); }
.tbl-buybacks th:nth-child(1) { width: 15%; }
.tbl-buybacks th:nth-child(2) { width: 15%; }
.tbl-buybacks th:nth-child(3) { width: 12%; }
.tbl-buybacks th:nth-child(4), .tbl-buybacks th:nth-child(5) { width: 14%; }
.tbl-buybacks th:nth-child(6), .tbl-buybacks th:nth-child(7) { width: 9%; }
.tbl-claims th:nth-child(1) { width: 22%; }
.tbl-claims th:nth-child(2) { width: 20%; }
.tbl-claims th:nth-child(3) { width: 24%; }
.tbl-claims th:nth-child(4) { width: 16%; }

/* ---------- rules & steps ---------- */
.rules { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.rule { padding: 20px 18px; border-right: 1px solid var(--line); min-width: 0; }
.rule:last-child { border-right: 0; }
.rule-v { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.rule-v span { font-size: 1rem; font-weight: 700; color: var(--green); margin-left: 2px; }
.rule-n { font-weight: 600; margin-top: 10px; font-size: .95rem; }
.rule-d { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step-n { font-family: var(--mono); font-size: .8rem; color: var(--green); font-weight: 600; padding-top: 4px; }
.steps h3 { font-size: 1rem; font-weight: 700; }
.steps p { font-size: .9rem; color: var(--ink-2); margin-top: 6px; }
.flow { margin-top: 16px; }
.flow-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: flow; }
.flow-row li { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 14px 16px; min-width: 0; }
.flow-row li::before { counter-increment: flow; content: counter(flow, decimal-leading-zero); font-family: var(--mono); font-size: .72rem; color: var(--green); display: block; margin-bottom: 4px; }
.flow-row b { display: block; font-size: .95rem; }
.flow-row span { display: block; font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.note { font-size: .9rem; color: var(--ink-2); margin-top: 14px; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.feature h3 { font-size: 1rem; font-weight: 700; }
.feature p { font-size: .9rem; color: var(--ink-2); margin-top: 8px; }
.hash { display: block; margin-top: 12px; font-size: .72rem; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; }

/* ---------- wallets ---------- */
.wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wallet { margin-top: 0; }
.addr { display: block; font-size: .8rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
.wstats { display: flex; gap: 28px; margin: 16px 0; }
.wstats b { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.wstats span { font-size: .75rem; color: var(--muted); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

/* ---------- faq ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); padding: 0 22px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex: none; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq p { color: var(--ink-2); font-size: .95rem; padding-bottom: 18px; }

/* ---------- footer ---------- */
footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 36px var(--gutter) 40px; display: grid; gap: 14px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer nav a { text-decoration: none; font-size: .9rem; color: var(--ink-2); }
footer nav a:hover { color: var(--ink); }
.disclaimer { font-size: .82rem; color: var(--muted); max-width: 720px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rule:nth-child(3) { border-right: 0; }
  .rule:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .steps, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .hero-copy { min-width: 0; }
  .hero-art { order: -1; min-height: 0; }
  .balloon { width: 200px; }
  .halo { width: 240px; height: 240px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > div:nth-child(2) { border-right: 0; }
  .hero-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .navlinks { display: none; }
  .wallets { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding-top: 56px; }
  .panel { padding: 18px; }
}
@media (max-width: 960px) {
  /* tables become stacked rows: no horizontal scrolling */
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { padding: 0; border: 0; white-space: normal; }
  .tbl td::before { content: attr(data-l); display: block; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .tbl td[data-l="Transaction"], .tbl td[data-l="Time"] { grid-column: span 2; }
  .tbl .empty { display: block; }
}
@media (min-width: 721px) and (max-width: 960px) {
  .tbl tr { grid-template-columns: repeat(4, 1fr); }
  .tbl td[data-l="Transaction"], .tbl td[data-l="Time"] { grid-column: span 1; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .stat-2 { grid-column: span 1; }
  .steps, .features, .flow-row { grid-template-columns: 1fr; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .rule:nth-child(2n) { border-right: 0; }
  .rule:nth-last-child(-n+2) { border-bottom: 0; }
  .rule:nth-child(3) { border-right: 1px solid var(--line); }
  .hero-actions .btn { flex: 1 1 auto; }
  .wstats { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .balloon { animation: none; } }
