:root {
  color-scheme: dark;
  --ink: #15141f;
  --ink-soft: #242235;
  --panel: #211d27;
  --panel-light: #302b35;
  --dirt: #5b3b28;
  --dirt-dark: #35241d;
  --timber: #7b5032;
  --timber-light: #ad7548;
  --paper: #e8d8a5;
  --text: #f5ecd0;
  --dim: #c5b993;
  --gold: #f6c744;
  --silver: #c8d0d9;
  --oil: #9aa4b9;
  --green: #64c466;
  --red: #dc4f45;
  --blue: #5aa9d6;
  --shadow: 5px 5px 0 #0b0a10;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 50%, transparent 50%) 0 0 / 100% 4px,
    radial-gradient(circle at 80% 8%, rgba(123,80,50,.2), transparent 32%),
    var(--ink);
  color: var(--text);
  font: 14px/1.45 ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}
body[data-busy="true"] { cursor: progress; }
body[data-phase="open"] .launch-strip { background: #21412a; border-color: var(--green); color: #c8f1cf; }
body[data-phase="open"] .launch-strip b { color: #fff; }
body[data-phase="closed"] .launch-strip { background: #4a211d; border-color: var(--red); color: #ffd0c8; }
body[data-phase="closed"] .launch-strip b { background: var(--red); color: #fff7e7; }
[hidden] { display: none !important; }
a { color: var(--gold); }
button, input { font: inherit; }
button, .button-link {
  min-height: 44px;
  border: 3px solid #241b17;
  border-radius: 0;
  background: var(--gold);
  color: #1b1710;
  box-shadow: 3px 3px 0 #09080c;
  padding: 9px 13px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  text-decoration: none;
}
button:hover:not(:disabled), .button-link:hover { filter: brightness(1.12); }
button:active:not(:disabled), .button-link:active { transform: translate(3px,3px); box-shadow: none; }
button:disabled { cursor: not-allowed; filter: grayscale(.45); opacity: .46; }
button.ghost, .button-link.ghost { border-color: #4b4560; background: var(--ink-soft); color: var(--text); }
button.compact { min-height: 36px; padding: 6px 10px; font-size: 9px; text-transform: uppercase; }
:focus-visible { outline: 3px solid #fff8ca; outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); padding: 9px 12px; background: var(--paper); color: var(--ink); }
.skip-link:focus { transform: none; }

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(12px,3vw,28px);
  border-bottom: 4px solid #09080c;
  background: #211a18;
}
.brand { display: flex; min-width: max-content; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 3px solid #08070a; background: var(--gold); box-shadow: 3px 3px 0 var(--timber); color: #1a1510; font-size: 22px; }
.brand b { display: block; font-size: clamp(13px,2vw,18px); letter-spacing: .08em; }
.brand small { display: block; margin-top: 4px; color: var(--timber-light); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.topbar nav { display: flex; gap: 14px; margin-left: auto; }
.topbar nav a { color: var(--dim); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.topbar nav a:hover { color: var(--paper); }
.wallet-cluster { display: flex; align-items: center; gap: 9px; }
.network-pill { min-height: 36px; display: inline-flex; align-items: center; border: 2px solid #4d4135; background: #151318; padding: 6px 10px; color: var(--paper); font-size: 10px; }
.network-pill::before { content: "■"; margin-right: 7px; color: var(--green); }
body[data-chain="wrong"] .network-pill::before { color: var(--red); }

.launch-strip { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 20px; border-bottom: 3px solid var(--gold); background: #4a361e; color: #f7df9d; text-align: center; font-size: 10px; }
.launch-strip b { padding: 2px 6px; border: 2px solid #120f0b; background: var(--gold); color: #1c160e; letter-spacing: .12em; }

main { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.closed-gate {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 190px);
  grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr);
  gap: clamp(34px,7vw,92px);
  align-items: center;
  margin: 0 auto;
  padding: 76px 4vw;
}
.closed-copy h1 { margin: 0; color: var(--paper); font-size: clamp(54px,8vw,104px); line-height: .84; letter-spacing: -.075em; }
.closed-copy h1 em { color: var(--red); font-style: normal; }
.closed-copy > p { max-width: 710px; margin: 27px 0 0; color: #d2c7aa; font-size: 15px; line-height: 1.7; }
.closed-note { display: block; margin-top: 19px; color: var(--dim); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.closed-seal { border-color: var(--red); background: repeating-radial-gradient(circle, #3a211d 0 13px, #291b1a 13px 25px); }
.closed-seal strong { max-width: 90%; color: var(--red); font-size: clamp(38px,5vw,64px); letter-spacing: -.05em; }
.hero { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); gap: clamp(28px,6vw,80px); align-items: center; min-height: 530px; padding: 72px 4vw 62px; border-bottom: 3px solid #302a36; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { margin: 0; color: var(--paper); font-size: clamp(50px,8vw,100px); line-height: .82; letter-spacing: -.08em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-copy > p { max-width: 720px; margin: 26px 0 0; color: #d2c7aa; font-size: 15px; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.button-link { display: inline-flex; align-items: center; justify-content: center; }
.assay-seal { aspect-ratio: 1; display: grid; place-items: center; align-content: center; border: 6px double var(--timber-light); outline: 5px solid #0c0b10; outline-offset: 7px; background: repeating-radial-gradient(circle, #31251d 0 13px, #291f1b 13px 25px); box-shadow: 13px 13px 0 #09080c; text-align: center; transform: rotate(2deg); }
.assay-seal span { color: var(--timber-light); font-size: 9px; letter-spacing: .2em; }
.assay-seal strong { display: block; margin: 8px 0 2px; color: var(--gold); font-size: clamp(58px,8vw,92px); line-height: 1; letter-spacing: -.08em; }
.assay-seal b { color: var(--paper); font-size: 13px; letter-spacing: .08em; }
.assay-seal small { margin-top: 10px; color: var(--dim); font-size: 8px; }

section:not(.hero) { padding: 38px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-head h2, .truth-grid h2 { margin: 0; color: var(--paper); font-size: clamp(20px,3vw,28px); letter-spacing: .05em; text-transform: uppercase; }
.status-board { border-bottom: 3px solid #302a36; }
.status-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 3px solid #09080c; background: #17151b; box-shadow: var(--shadow); }
.status-grid article { min-height: 116px; padding: 17px; border-right: 2px dashed #4b4352; }
.status-grid article:last-child { border-right: 0; }
.status-grid span, .status-grid small { display: block; color: var(--dim); font-size: 8px; text-transform: uppercase; }
.status-grid b { display: block; margin: 9px 0 5px; color: var(--gold); font-size: 14px; overflow-wrap: anywhere; }
.status-grid small { text-transform: none; line-height: 1.4; }

.process { border-bottom: 3px solid #302a36; }
.process-rail { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.process-rail li { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 12px; min-height: 112px; align-items: start; padding: 17px; border: 3px solid #09080c; border-right: 0; background: var(--panel); }
.process-rail li:last-child { border-right: 3px solid #09080c; }
.process-rail li:not(:last-child)::after { position: absolute; z-index: 2; top: 42px; right: -13px; content: "▶"; color: var(--gold); text-shadow: 2px 2px #09080c; }
.process-rail i { display: grid; width: 44px; height: 44px; place-items: center; border: 3px solid #09080c; background: var(--timber); color: #1d130d; box-shadow: 3px 3px #09080c; font-size: 18px; font-style: normal; font-weight: 900; }
.process-rail b { display: block; color: var(--paper); font-size: 12px; text-transform: uppercase; }
.process-rail span { display: block; margin-top: 7px; color: var(--dim); font-size: 10px; }

.bonus-board { border-bottom: 3px solid #302a36; }
.bonus-panel { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); gap: 18px; align-items: center; padding: 22px; border: 3px solid #09080c; border-left: 9px solid var(--gold); background: linear-gradient(120deg,#33271c,#231f2c); box-shadow: var(--shadow); }
.bonus-copy > b { color: var(--gold); font-size: 15px; text-transform: uppercase; }
.bonus-copy p { max-width: 710px; margin: 8px 0; color: var(--paper); font-size: 10px; }
.bonus-copy small { color: var(--dim); font-size: 8px; }
.bonus-stats { display: grid; gap: 7px; }
.bonus-stats div { padding: 8px 10px; border: 2px dashed #5b5060; background: #19171d; }
.bonus-stats span, .bonus-stats b { display: block; }
.bonus-stats span { color: var(--dim); font-size: 8px; text-transform: uppercase; }
.bonus-stats b { margin-top: 3px; color: var(--paper); font-size: 10px; }

.desk { scroll-margin-top: 20px; }
.desk-note { color: var(--dim); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.action-status { position: sticky; z-index: 12; top: 8px; min-height: 42px; display: flex; align-items: center; margin: 0 0 16px; padding: 9px 12px; border: 3px solid #09080c; border-left: 8px solid #554e5d; background: rgba(30,27,35,.96); box-shadow: 4px 4px #09080c; color: var(--dim); font-size: 10px; }
.action-status[data-tone="working"] { border-left-color: var(--gold); color: #ffe492; }
.action-status[data-tone="complete"] { border-left-color: var(--green); color: #b5eabe; }
.action-status[data-tone="error"] { border-left-color: var(--red); color: #ffb6ae; }
.asset-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.asset-card { position: relative; overflow: hidden; border: 3px solid #09080c; background: var(--panel); box-shadow: var(--shadow); }
.asset-card::before { position: absolute; top: 0; left: 0; width: 8px; height: 100%; content: ""; background: var(--asset, var(--gold)); }
.asset-card[data-asset="1"] { --asset: var(--silver); }
.asset-card[data-asset="bonus"] { --asset: var(--green); }
.asset-head { display: flex; justify-content: space-between; gap: 10px; padding: 16px 16px 13px 22px; border-bottom: 3px solid #09080c; background: #30271f; }
.asset-head span { color: var(--dim); font-size: 8px; text-transform: uppercase; }
.asset-head h3 { margin: 3px 0 0; color: var(--asset, var(--gold)); font-size: 24px; }
.asset-token { display: grid; width: 46px; height: 46px; place-items: center; border: 3px solid #09080c; background: var(--asset, var(--gold)); box-shadow: 3px 3px #09080c; color: #19130e; font-size: 10px; font-weight: 900; }
.asset-body { padding: 16px 16px 18px 22px; }
.balance-row, .route-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 2px dashed #49414f; color: var(--dim); font-size: 9px; }
.balance-row b, .route-row b { color: var(--paper); font-size: 10px; text-align: right; }
.funding-meter { height: 14px; margin: 13px 0 6px; overflow: hidden; border: 3px solid #09080c; background: #100f14; }
.funding-meter i { display: block; width: var(--funding,0%); height: 100%; background: repeating-linear-gradient(90deg,#3c944b 0 12px,var(--green) 12px 20px); }
.funding-copy { display: flex; justify-content: space-between; color: var(--dim); font-size: 8px; }
.redeem-form { margin-top: 15px; }
.redeem-form label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--dim); font-size: 8px; text-transform: uppercase; }
.redeem-form label button { min-height: auto; border: 0; background: transparent; box-shadow: none; padding: 0; color: var(--gold); font-size: 8px; }
.amount-wrap { display: grid; grid-template-columns: minmax(0,1fr) auto; border: 3px solid #09080c; background: #141218; }
.amount-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px; color: var(--paper); }
.amount-wrap b { display: flex; align-items: center; padding: 0 10px; border-left: 2px solid #393340; color: var(--asset,var(--gold)); font-size: 9px; }
.quote-box { min-height: 54px; margin: 9px 0; padding: 9px 10px; border: 2px solid #4b4352; background: #19171d; color: var(--dim); font-size: 8px; }
.quote-box b { display: block; margin-top: 2px; color: var(--paper); font-size: 12px; }
.redeem-button { width: 100%; }
.bonus-asset-card .asset-body { display: flex; min-height: 382px; flex-direction: column; }
.bonus-redeemer-copy { margin: 16px 0; padding: 12px; border: 2px dashed #4b4352; background: #19171d; color: var(--dim); font-size: 9px; line-height: 1.6; }
.bonus-claim-button { margin-top: auto; border-color: #234d2c; background: var(--green); color: #102116; }
.asset-card.skeleton { min-height: 460px; background: linear-gradient(110deg,#211d27 30%,#2c2732 45%,#211d27 60%) 0 0 / 220% 100%; animation: shimmer 1.1s linear infinite; }

.satchel { border-top: 3px solid #302a36; }
.satchel-intro { max-width: 820px; color: var(--dim); font-size: 11px; }
.fast-route { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; margin-top: 17px; padding: 17px; border: 3px solid #09080c; border-left: 8px solid var(--gold); background: #30271f; box-shadow: var(--shadow); }
.fast-route b, .fast-route small { display: block; }
.fast-route b { color: var(--paper); font-size: 11px; }
.fast-route small { max-width: 720px; margin-top: 5px; color: var(--dim); font-size: 8px; }
.fast-route-actions { display: flex; gap: 8px; }
.fast-route-actions button { min-width: 190px; font-size: 9px; }
.fast-route-actions #redeemAllButton { border-color: #234d2c; background: var(--green); color: #102116; }
.satchel-list { display: grid; gap: 9px; margin-top: 16px; }
.miner-row { display: grid; grid-template-columns: 120px minmax(0,1fr); border: 3px solid #09080c; background: var(--panel); box-shadow: 4px 4px #09080c; }
.miner-id { display: grid; place-items: center; align-content: center; padding: 14px; border-right: 3px solid #09080c; background: #30271f; }
.miner-id span { color: var(--dim); font-size: 8px; }
.miner-id b { color: var(--gold); font-size: 17px; }
.miner-assets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.miner-asset { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 13px; border-right: 2px dashed #4b4352; }
.miner-asset:last-child { border-right: 0; }
.miner-asset span { display: block; color: var(--dim); font-size: 8px; }
.miner-asset b { display: block; margin-top: 3px; color: var(--paper); font-size: 10px; }
.miner-asset button { min-height: 36px; padding: 6px 8px; font-size: 8px; }
.empty-state { padding: 28px; border: 3px dashed #4b4352; background: #19171d; text-align: center; }
.empty-state b, .empty-state span { display: block; }
.empty-state b { color: var(--paper); text-transform: uppercase; }
.empty-state span { margin-top: 5px; color: var(--dim); font-size: 10px; }

.truth-grid { display: grid; grid-template-columns: 1fr; gap: 16px; border-top: 3px solid #302a36; }
.truth-grid article { padding: 23px; border: 3px solid #09080c; background: #20252a; box-shadow: var(--shadow); }
.truth-grid .warning-card { background: #32231d; }
.truth-grid ul { margin: 15px 0 0; padding-left: 20px; color: #d2c7aa; font-size: 10px; }
.truth-grid li + li { margin-top: 8px; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding: 22px clamp(16px,4vw,48px); border-top: 4px solid #09080c; background: #211a18; color: var(--dim); font-size: 8px; text-transform: uppercase; }

@keyframes shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

@media (max-width: 920px) {
  .topbar nav, .network-pill { display: none; }
  .wallet-cluster { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 54px 0; }
  .closed-gate { grid-template-columns: 1fr; min-height: auto; padding: 58px 0 72px; }
  .assay-seal { width: min(340px,80vw); justify-self: center; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .status-grid article:nth-child(2) { border-right: 0; }
  .status-grid article:nth-child(-n+2) { border-bottom: 2px dashed #4b4352; }
  .asset-grid { grid-template-columns: 1fr; }
  .bonus-panel { grid-template-columns: 1fr 1fr; }
  .bonus-copy { grid-column: 1 / -1; }
  .asset-card.skeleton { min-height: 260px; }
}

@media (max-width: 660px) {
  body { font-size: 12px; }
  .topbar { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand b { font-size: 11px; }
  .brand small { font-size: 7px; }
  #connectButton { min-height: 38px; padding: 6px 8px; font-size: 8px; }
  .launch-strip { align-items: flex-start; font-size: 8px; }
  main { width: min(100% - 22px,1280px); }
  .hero { padding: 44px 0; }
  .closed-gate { width: min(100% - 22px,1180px); padding: 48px 0 58px; }
  .closed-copy h1 { font-size: clamp(46px,16vw,70px); }
  .closed-copy > p { font-size: 12px; }
  .hero h1 { font-size: clamp(46px,17vw,72px); }
  .hero-copy > p { font-size: 12px; }
  .hero-actions > * { width: 100%; }
  section:not(.hero) { padding: 30px 0; }
  .section-head { align-items: flex-start; }
  .status-grid { grid-template-columns: 1fr; }
  .status-grid article { min-height: 96px; border-right: 0; border-bottom: 2px dashed #4b4352; }
  .status-grid article:last-child { border-bottom: 0; }
  .process-rail { grid-template-columns: 1fr; gap: 8px; }
  .bonus-panel { grid-template-columns: 1fr; }
  .bonus-copy { grid-column: auto; }
  #claimBonusButton { width: 100%; max-width: none; }
  .process-rail li, .process-rail li:last-child { border: 3px solid #09080c; }
  .process-rail li:not(:last-child)::after { top: auto; right: 50%; bottom: -14px; transform: rotate(90deg); }
  .miner-row { grid-template-columns: 1fr; }
  .fast-route { grid-template-columns: 1fr; }
  .fast-route-actions { display: grid; }
  .fast-route-actions button { width: 100%; min-width: 0; }
  .miner-id { display: flex; justify-content: space-between; border-right: 0; border-bottom: 3px solid #09080c; }
  .miner-assets { grid-template-columns: 1fr; }
  .miner-asset { border-right: 0; border-bottom: 2px dashed #4b4352; }
  .miner-asset:last-child { border-bottom: 0; }
  .truth-grid { grid-template-columns: 1fr; }
  footer { display: grid; }
}
