/* ONYX — black onyx + gold theme. */
:root {
  --bg: #070605;
  --bg2: #0d0b08;
  --surface: #141109;
  --surface2: #1b160d;
  --line: #2c2413;
  --line-bright: #57451c;
  --gold: #e8b34b;
  --gold2: #f5d67b;
  --gold-deep: #9a741f;
  --violet: #a855f7;
  --text: #f3ead3;
  --muted: #b3a888;
  --dim: #7d735c;
  --ok: #7dd87d;
  --bad: #e07a5f;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --bar-bg: rgba(9, 7, 4, .88);
  --glow-a: rgba(232, 179, 75, .10);
  --glow-b: rgba(168, 85, 247, .07);
  --frame-glow: rgba(232, 179, 75, .13);
  --gold-hi: #fff2c4;
  --on-gold: #1a1204;
  --btn-a: #f5d67b;
  --btn-b: #e8b34b;
  --btn-c: #9a741f;
  --on-btn: #1a1204;
  --btn-shadow: rgba(232, 179, 75, .25);
  --track: #241b0a;
  --field-bg: #0a0805;
  --log-bg: #050403;
  --focus-ring: rgba(232, 179, 75, .45);
  --tint-bg: rgba(232, 179, 75, .06);
  --toast-bg: #20180a;
  --toast-text: #f5d67b;
}
html[data-theme="violet"] {
  --bg: #0b0614;
  --bg2: #120a20;
  --surface: #180e2c;
  --surface2: #201239;
  --line: #33205a;
  --line-bright: #5b3a94;
  --violet: #c084fc;
  --text: #f0e9fb;
  --muted: #bfb1da;
  --dim: #8d7cae;
  --shadow: 0 18px 50px rgba(2, 0, 8, .6);
  --bar-bg: rgba(15, 8, 28, .88);
  --glow-a: rgba(168, 85, 247, .16);
  --glow-b: rgba(232, 179, 75, .05);
  --frame-glow: rgba(168, 85, 247, .22);
  --btn-a: #c084fc;
  --btn-b: #a855f7;
  --btn-c: #7c3aed;
  --on-btn: #f8f4ff;
  --btn-shadow: rgba(168, 85, 247, .28);
  --track: #241239;
  --field-bg: #0d0718;
  --log-bg: #08040f;
  --focus-ring: rgba(168, 85, 247, .5);
  --tint-bg: rgba(168, 85, 247, .08);
  --toast-bg: #241239;
  --toast-text: #f5d67b;
}
html[data-theme="light"] {
  --bg: #f4eee1;
  --bg2: #fbf7ec;
  --surface: #fffdf6;
  --surface2: #f7f0dd;
  --line: #ded1b4;
  --line-bright: #b39b5e;
  --gold: #a97b12;
  --gold2: #8a6410;
  --gold-deep: #7c5a0c;
  --gold-hi: #d9a41f;
  --violet: #7c3aed;
  --text: #261d0d;
  --muted: #5f543e;
  --dim: #8a7c5f;
  --ok: #2e7d32;
  --bad: #bc4630;
  --shadow: 0 18px 50px rgba(96, 74, 18, .16);
  --bar-bg: rgba(251, 247, 236, .9);
  --glow-a: rgba(232, 179, 75, .14);
  --glow-b: rgba(168, 85, 247, .05);
  --frame-glow: rgba(169, 123, 18, .18);
  --btn-a: #f0cd6e;
  --btn-b: #dfae3c;
  --btn-c: #b8860b;
  --btn-shadow: rgba(169, 123, 18, .22);
  --track: #e9dfc6;
  --field-bg: #fffdf6;
  --log-bg: #f7f0dd;
  --focus-ring: rgba(169, 123, 18, .45);
  --tint-bg: rgba(169, 123, 18, .07);
  --toast-bg: #2a2110;
  --toast-text: #f5d67b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(900px 480px at -10% 30%, var(--glow-b), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg) 340px);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 18px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 18px rgba(232, 179, 75, .35); }
.brand .sym { color: var(--gold); font-size: 12px; letter-spacing: .08em; border: 1px solid var(--line-bright); padding: 2px 7px; border-radius: 20px; margin-left: 2px; }
nav.mainnav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links { display: contents; }
.menu-btn {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 38px; height: 38px; margin-left: 6px; padding: 0; cursor: pointer;
  background: var(--surface2); color: var(--gold2); border: 1px solid var(--line-bright); border-radius: 9px;
}
.mb-line { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
nav.mainnav a {
  color: var(--muted); padding: 7px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 600;
}
nav.mainnav a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
nav.mainnav a.active { color: var(--on-gold); background: linear-gradient(180deg, var(--gold2), var(--gold)); }
.themesw { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }
.tdot {
  width: 15px; height: 15px; border-radius: 50%; padding: 0; cursor: pointer; flex: 0 0 auto;
  border: 1px solid var(--line-bright);
}
.tdot-onyx { background: #0a0805; }
.tdot-violet { background: #7c3aed; }
.tdot-light { background: #f4eee1; }
.tdot.active { outline: 2px solid var(--gold); outline-offset: 2px; }
.langbtn {
  margin-left: 8px; background: var(--surface2); color: var(--gold2); border: 1px solid var(--line-bright);
  border-radius: 9px; padding: 7px 12px; font-weight: 700; cursor: pointer; font-size: 13.5px;
}
.statuschip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line-bright); color: var(--gold2); border-radius: 20px; padding: 4px 11px;
  max-width: 100%; min-width: 0; background: var(--tint-bg);
}
.statuschip .chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.statuschip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.8s infinite; }
.statuschip.live .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- hero ---------- */
.hero { padding: 54px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.eyebrow { color: var(--gold); letter-spacing: .28em; font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; margin: 12px 0 14px; font-weight: 900; letter-spacing: .01em; }
h1 .goldtext {
  background: linear-gradient(92deg, var(--gold2) 10%, var(--gold) 45%, var(--gold-hi) 70%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: 17.5px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.stone-frame {
  position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-bright);
  box-shadow: var(--shadow), 0 0 60px var(--frame-glow);
  background: #000;
}
.stone-frame img, .stone-frame video { display: block; width: 100%; height: auto; }
.stone-frame .tag {
  position: absolute; left: 14px; bottom: 12px; background: rgba(5, 4, 2, .78); border: 1px solid var(--line-bright);
  color: var(--gold2); font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 20px;
}
.stone-frame .tag2 { left: auto; right: 14px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0; border-radius: 11px;
  padding: 12px 20px; font-size: 15px; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b) 55%, var(--btn-c));
  color: var(--on-btn); box-shadow: 0 8px 24px var(--btn-shadow);
}
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: var(--surface2); color: var(--gold2); border: 1px solid var(--line-bright); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.copied { background: linear-gradient(180deg, #a5e8a5, #7dd87d); color: #0d240d; }

/* ---------- stats band ---------- */
.statsband {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0;
}
.stat {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column;
}
.stat .k { color: var(--dim); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; min-height: calc(1.55em * 2); }
.stat .v { font-size: 25px; font-weight: 900; margin-top: 3px; color: var(--text); line-height: 1.15; min-height: 29px; display: flex; align-items: center; }
.stat .v gold, .stat .gold { color: var(--gold2); }
.stat .s { color: var(--muted); font-size: 13px; margin-top: auto; padding-top: 6px; }
#mining-unlock { font-size: 17px; }
#ck-claimable { font-size: 20px; }
#ck-grid { grid-template-columns: repeat(4, 1fr); }

/* ---------- sections & cards ---------- */
section.block { padding: 30px 0; }
h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 8px; font-weight: 900; }
h2 .goldtext { background: linear-gradient(92deg, var(--gold2), var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--muted); max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.cards.facts-cards { grid-template-columns: repeat(2, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--muted); margin: 0; font-size: 14.5px; }
.card .glyph { font-size: 26px; margin-bottom: 10px; color: var(--gold); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.two .stone-frame img { aspect-ratio: 16 / 10; object-fit: cover; }
.panel {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.panel h3 { margin-top: 0; }
.progress { height: 12px; background: var(--track); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold2)); width: 0%; transition: width .8s ease; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 21px; color: var(--gold2); }
table.facts { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.facts td, table.facts th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.facts td:first-child { color: var(--muted); width: 34%; }
table.facts.cols3 { table-layout: fixed; }
table.facts.cols3 th:nth-child(1), table.facts.cols3 td:nth-child(1) { width: 20%; }
table.facts.cols3 th:nth-child(2), table.facts.cols3 td:nth-child(2) { width: 33%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.small { font-size: 13px; color: var(--muted); }
.note { border-left: 3px solid var(--gold); padding: 10px 14px; background: var(--tint-bg); border-radius: 0 10px 10px 0; color: var(--muted); font-size: 14.5px; }
.note strong { color: var(--text); }

/* ---------- forms / checkers / miner ---------- */
.field { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; align-items: stretch; }
.field .btn { justify-content: center; }
input[type="text"], input[type="number"], select {
  background: var(--field-bg); border: 1px solid var(--line-bright); color: var(--text);
  border-radius: 10px; padding: 11px 14px; font-size: 15px; min-width: 0;
}
input[type="text"] { flex: 1 1 320px; }
input[type="number"] { flex: 1 1 160px; }
input:focus { outline: 2px solid var(--focus-ring); border-color: var(--gold); }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; margin-top: 12px; }
.kv .row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 10px 0; }
.kv .row .k { color: var(--muted); }
.kv .row .v { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.meter { font-variant-numeric: tabular-nums; }
.hashlog {
  background: var(--log-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted);
  max-height: 150px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}

/* ---------- leaderboard / market grids ---------- */
table.board { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.board th { color: var(--dim); text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line-bright); }
table.board td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.board td.num, table.board th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.board th:first-child { width: 1%; white-space: nowrap; }
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.listing-grid > p.small {
  grid-column: 1 / -1; margin: 0; text-align: center; font-size: 14.5px;
  border: 1px dashed var(--line-bright); border-radius: var(--radius);
  background: var(--tint-bg); padding: 30px 20px;
}
.listing {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.listing .art { aspect-ratio: 1 / 1; background: #000; position: relative; }
.listing .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing .body { padding: 15px 17px 17px; flex: 1; display: flex; flex-direction: column; }
.listing .price { font-size: 21px; font-weight: 900; color: var(--gold2); display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; min-height: 30px; }
.listing .usd { color: var(--muted); font-size: 13px; }
.listing .meta { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; color: var(--muted); font-size: 13px; margin: 10px 0 14px; gap: 3px; }
.listing .body .btn { margin-top: auto; align-self: flex-start; }
.chip { display: inline-block; border: 1px solid var(--line-bright); border-radius: 16px; padding: 2px 9px; font-size: 12px; color: var(--gold2); font-weight: 700; }

/* ---------- faq / whitepaper ---------- */
details.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; padding: 4px 18px; }
details.faq summary { cursor: pointer; font-weight: 800; padding: 12px 0; font-size: 16px; }
details.faq p { color: var(--muted); margin: 0 0 14px; }
.paper { max-width: 820px; }
.paper h3 { margin-top: 30px; font-size: 20px; }
.paper p, .paper li { color: var(--muted); }
.paper strong { color: var(--text); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 46px; padding: 26px 0 40px; color: var(--dim); font-size: 13.5px; }
footer .cols { display: flex; gap: 26px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg); border: 1px solid var(--gold); color: var(--toast-text); font-weight: 700;
  padding: 11px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .statsband { grid-template-columns: repeat(2, 1fr); }
  .cards, .listing-grid { grid-template-columns: 1fr; }
  .cards.facts-cards { grid-template-columns: 1fr; }
  #ck-grid { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .topbar-in { gap: 10px; flex-wrap: nowrap; }
  .brand { font-size: 17px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .brand .sym { display: none; }
  nav.mainnav { margin-left: auto; flex-wrap: nowrap; gap: 2px; }
  nav.mainnav a { padding: 6px 8px; font-size: 13.5px; }
  .statuschip { font-size: 11.5px; padding: 3px 9px; }
  .langbtn { margin-left: 6px; padding: 6px 10px; }
  .menu-btn { display: flex; }
  .nav-links { display: none; }
  .nav-links.open {
    display: block; position: fixed; z-index: 200; min-width: 210px;
    background: linear-gradient(180deg, var(--surface2), var(--surface));
    border: 1px solid var(--line-bright); border-radius: 14px; padding: 8px;
    box-shadow: var(--shadow);
  }
  .nav-links.open a {
    display: block; padding: 11px 14px; border-radius: 9px;
    color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none;
  }
  .nav-links.open a:hover { color: var(--text); background: var(--surface2); }
  .nav-links.open a.active { color: var(--on-gold); background: linear-gradient(180deg, var(--gold2), var(--gold)); }
  .themesw { margin-left: 6px; gap: 4px; }
  .tdot { width: 13px; height: 13px; }
  .stat { padding: 14px 15px; }
  .stat .v { font-size: 22px; min-height: 26px; }
  table.facts.cols3 th:nth-child(1), table.facts.cols3 td:nth-child(1) { width: 26%; }
  table.facts.cols3 th:nth-child(2), table.facts.cols3 td:nth-child(2) { width: 35%; }
  table.facts.cols3 { font-size: 13.5px; }
  table.facts.cols3 td:nth-child(1) { overflow-wrap: break-word; }
  table.facts.cols3 .mono { font-size: 12px; }
}
