:root {
  --bg: #0a0d12;
  --panel: #10141b;
  --panel-2: #151a23;
  --border: #1f2631;
  --text: #e8ecf2;
  --muted: #8a94a6;
  --accent: #65b7d2;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: inherit; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px; background: rgba(10, 13, 18, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar nav { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar nav a, .topbar nav .nav-toggle { color: var(--muted); text-decoration: none; font-size: 15px; }
.topbar nav .nav-toggle { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; cursor: pointer; }
.topbar nav a:hover, .topbar nav .nav-toggle:hover { color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.brand.small { font-size: 14px; color: var(--muted); }

main { max-width: 980px; margin: 0 auto; padding: 0 20px; }

.hero { text-align: center; padding: 64px 0 20px; }
.eyebrow { color: var(--accent); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 6vw, 62px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.02em; }
.lede { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 28px; }

.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 16px; border-radius: 8px; font: inherit; cursor: pointer; }
.tab.active { background: var(--text); color: #0a0d12; font-weight: 600; }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 8px 8px 18px; max-width: 720px; margin: 0 auto;
}
.search:focus-within { border-color: #2c3645; }
.search-icon { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; align-self: center; }
.search input, .search textarea {
  flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; padding: 10px 0; resize: vertical;
}
.search textarea { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.search button {
  background: var(--text); color: #0a0d12; border: 0; border-radius: 10px; padding: 11px 22px;
  font: inherit; font-weight: 600; cursor: pointer; align-self: flex-start;
}
.search button:disabled { opacity: .6; cursor: progress; }
.fineprint { color: #6b7587; font-size: 14px; max-width: 620px; margin: 14px auto 20px; }
.dex-btn {
  display: block; width: fit-content; margin: 0 auto 40px; background: var(--text); color: #0a0d12;
  border: 2px solid var(--accent); border-radius: 10px; padding: 13px 34px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 0 rgba(101, 183, 210, .35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.dex-btn:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 4px 0 rgba(101, 183, 210, .35); }
.dex-btn:active { transform: translateY(1px); box-shadow: none; }
.dex-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wallet-modal { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 0; width: min(496px, calc(100% - 32px)); height: min(742px, calc(100dvh - 32px)); max-height: none; padding: 10px 0 14px; overflow: hidden; color: #f4f4f5; background: #1f1f21; border: 1px solid #38383b; border-radius: 24px; box-shadow: 0 24px 90px rgb(0 0 0 / 55%); }
.wallet-modal:not([open]) { display: none; }
.wallet-modal::backdrop { background: rgb(0 0 0 / 74%); backdrop-filter: blur(4px); }
.wallet-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px 10px; }
.wallet-modal h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.wallet-modal-title-row { display: flex; align-items: center; gap: 10px; }
.wallet-demo-badge { padding: 3px 6px; color: #c4c4c9; background: #333337; border-radius: 4px; font-size: 10px; font-weight: 700; }
.wallet-modal-close { flex: none; width: 32px; height: 32px; color: #f4f4f5; background: transparent; border: 0; border-radius: 6px; font-size: 25px; line-height: 1; cursor: pointer; }
.wallet-modal-close:hover { background: #303033; }
.wallet-options { min-height: 0; display: block; overflow-y: auto; padding: 4px 10px 8px; scrollbar-color: #5b5b60 transparent; }
.wallet-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; color: #f1f1f2; background: transparent; border: 0; border-radius: 10px; font: inherit; text-align: left; cursor: pointer; }
.wallet-option:hover:not(:disabled), .wallet-option:focus-visible { background: #303033; outline: none; }
.wallet-option:disabled { color: #aaa; cursor: progress; opacity: .62; }
.wallet-option-icon { display: grid; flex: none; width: 42px; height: 42px; place-items: center; overflow: hidden; background-color: var(--wallet-color, #29292c); border-radius: 11px; }
.wallet-option-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.wallet-option-fallback { display: grid; width: 32px; height: 32px; place-items: center; color: #eee; background: #36363a; border-radius: 8px; font-weight: 700; }
.wallet-option-name { font-size: 15px; font-weight: 600; }
.wallet-search { display: flex; align-items: center; gap: 12px; min-height: 72px; margin: 0 12px; padding: 10px 14px; background: #29292c; border: 1px solid #303034; border-radius: 18px; }
.wallet-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #a3a3a9; stroke-width: 1.8; }
.wallet-search input { min-width: 0; flex: 1; color: #f4f4f5; background: transparent; border: 0; outline: none; font: inherit; }
.wallet-search input::placeholder { color: #b3b3b9; }
.wallet-search input::-webkit-search-cancel-button { cursor: pointer; }
.wallet-search span { padding: 4px 7px; color: #c5c5ca; background: #333337; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.wallet-modal-status { margin: 8px 14px 0; color: #b8b8be; font-size: 13px; }
.wallet-modal-status a { color: #f4f4f5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.review-page main { min-height: calc(100vh - 190px); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }
.back-link svg, .review-return-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.review-section { max-width: 680px; margin: 0 auto; padding: 76px 0 24px; }
.review-section h1 { font-size: 44px; }
.review-section .lede { margin: 0 0 30px; }
.review-form { display: grid; gap: 10px; }
.review-form label { font-weight: 600; }
.review-connect-required { color: var(--muted); }
.review-connect-required a { color: var(--accent); }
.review-form textarea {
  width: 100%; min-height: 220px; padding: 14px; resize: vertical;
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; font: inherit; line-height: 1.55;
}
.review-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.review-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.review-privacy { color: var(--muted); font-size: 14px; margin: 8px 0; }
.review-submit { justify-self: start; background: var(--accent); color: #071210; border: 0; border-radius: 6px; padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; }
.review-submit:hover { filter: brightness(1.08); }
.review-submit:focus-visible, .back-link:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.review-status { margin: 4px 0 0; color: var(--red); font-size: 14px; }
.review-submit:disabled { opacity: .7; cursor: progress; }
.review-submitting { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgb(5 8 12 / 78%); backdrop-filter: blur(7px); }
.review-submitting[hidden] { display: none; }
.review-submitting-panel { width: min(390px, 100%); padding: 34px 26px; text-align: center; background: #111a23; border: 1px solid #2b3a46; border-radius: 12px; box-shadow: 0 24px 70px rgb(0 0 0 / 42%); animation: review-success-in .22s ease-out; }
.review-submitting-panel .eyebrow { margin: 18px 0 7px; }
.review-submitting-panel h2 { margin: 0; font-size: 24px; }
.review-submitting-panel p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.review-submitting-spinner { display: block; width: 36px; height: 36px; margin: 0 auto; border: 3px solid #34444f; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.review-success { max-width: 620px; margin: 18px auto 0; padding: 34px; background: linear-gradient(145deg, #121b24, #10141b 68%); border: 1px solid #293744; border-radius: 12px; box-shadow: 0 20px 55px rgb(0 0 0 / 22%); animation: review-success-in .3s ease-out; }
.review-success[hidden] { display: none; }
.review-success-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 24px; color: #0b171d; background: var(--accent); border-radius: 50%; }
.review-success-mark svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.review-success .eyebrow { margin-bottom: 8px; }
.review-success h2 { margin: 0; font-size: 34px; line-height: 1.2; }
.review-success-copy { max-width: 490px; margin: 12px 0 0; color: var(--muted); }
.review-success-wallet { margin: 16px 0 0; color: #b3c1cd; font-size: 13px; }
.review-success-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.review-success-actions a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.review-success-actions a:hover { transform: translateY(-1px); }
.review-support-link { color: #061712; background: #43c98b; }
.review-support-link:hover { background: #65d9a2; }
.review-support-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.review-return-link { color: var(--text); background: #1a232d; border: 1px solid #344351; }
.review-return-link svg { flex: none; }
.review-return-link:hover { background: #232f3b; border-color: #536878; }
.review-countdown { margin-top: 26px; padding-top: 15px; color: #8492a0; border-top: 1px solid #293440; font-size: 12px; }
.review-countdown-track { display: block; height: 3px; margin-top: 12px; overflow: hidden; background: #26323c; border-radius: 3px; }
.review-countdown-track span { display: block; width: 100%; height: 100%; background: var(--accent); border-radius: inherit; transform-origin: left center; transition: transform 1s linear; }
@keyframes review-success-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; }
.stat { padding: 22px 20px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .num { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .num.bump { animation: bump .6s ease; }
@keyframes bump { 40% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(101, 183, 210, .6)); } }
.stat { transition: background .2s; }
.stat:hover { background: linear-gradient(180deg, rgba(101, 183, 210, .06), transparent); }
.stats-head { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.stat .label { font-weight: 600; margin-bottom: 4px; }
.stat .sub { color: var(--muted); font-size: 14px; }

.section { padding: 56px 0 8px; }
.section h2 { font-size: 28px; margin: 0 0 8px; }
.muted { color: var(--muted); }

.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; border: 1px solid var(--border); color: var(--muted); }
.badge.auto { color: var(--accent); border-color: rgba(101, 183, 210, .35); }
.badge.claimable { color: var(--green); border-color: rgba(52, 211, 153, .4); }
.badge.pending { color: var(--amber); border-color: rgba(251, 191, 36, .4); }
.badge.blocked { color: var(--red); border-color: rgba(248, 113, 113, .4); }

.accordion details { border-top: 1px solid var(--border); }
.accordion details:last-child { border-bottom: 1px solid var(--border); }
.accordion summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 4px; display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-75%) rotate(45deg); transition: transform .15s;
}
.accordion details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.accordion summary strong { font-size: 17px; }
.accordion summary .muted { font-size: 14px; }
.accordion .body { padding: 0 4px 18px; }
.accordion ol { margin: 8px 0; padding-left: 20px; }
.tokens { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { font-size: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }

pre { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; overflow-x: auto; font-size: 14px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.dots { padding-left: 18px; color: var(--muted); }
.dots li { margin-bottom: 10px; }
.dots li::marker { color: var(--accent); }
.dots strong { color: var(--text); }

/* Results */
.results { padding: 36px 0 0; }
.result { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.result-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.result-head .addr { font-family: ui-monospace, Consolas, monospace; word-break: break-all; font-size: 14px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.total { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.total .v { font-size: 22px; font-weight: 700; }
.total.claimable .v { color: var(--green); }
.total.pending .v { color: var(--amber); }
.total.blocked .v { color: var(--red); }
.finding { border-top: 1px solid var(--border); padding: 16px 0 4px; }
.finding-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.finding h3 { margin: 6px 0 4px; font-size: 17px; }
.amount { font-size: 20px; font-weight: 700; }
.amount .usd { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.finding ul.items { margin: 6px 0; padding-left: 18px; color: var(--muted); font-size: 14px; font-family: ui-monospace, Consolas, monospace; }
.finding ol { margin: 6px 0 10px; padding-left: 20px; }
.empty { color: var(--muted); padding: 10px 0 0; }
.warn { color: var(--amber); font-size: 14px; margin-top: 10px; }
.error { color: var(--red); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.review-loading { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgb(5 8 12 / 76%); backdrop-filter: blur(8px); color: var(--text); text-align: center; animation: loading-fade-in .2s ease-out; }
.review-loading[hidden] { display: none; }
.review-loading-panel { width: min(440px, 100%); padding: 36px 34px 26px; background: #111820; border: 1px solid #293440; border-radius: 14px; box-shadow: 0 28px 90px rgb(0 0 0 / 48%); animation: loading-panel-in .28s cubic-bezier(.2,.8,.2,1); }
.review-loading-mark { position: relative; display: grid; width: 68px; height: 68px; place-items: center; margin: 0 auto 10px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 18px; box-shadow: 0 0 0 6px rgb(255 255 255 / 4%); }
.review-loading-logo, .review-loading-fallback { position: relative; z-index: 1; width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.review-loading-fallback { display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / 24%); font-size: 23px; font-weight: 700; }
.review-loading .spinner { position: absolute; z-index: 2; inset: 4px; width: 58px; height: 58px; margin: 0; border-color: rgb(255 255 255 / 30%); border-top-color: var(--accent); }
.review-loading-error-icon { position: relative; display: grid; width: 30px; height: 30px; place-items: center; margin: 0 auto 18px; color: #fff; background: #ef4444; border: 3px solid #111820; border-radius: 50%; font-size: 18px; font-weight: 800; box-shadow: 0 0 0 4px rgb(239 68 68 / 16%); }
.review-loading-eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.review-loading-panel h2 { margin: 0; font-size: 23px; line-height: 1.3; }
.review-loading-detail { max-width: 350px; margin: 12px auto 0; color: #a2adba; font-size: 14px; font-weight: 400; line-height: 1.6; }
.review-loading-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; margin-top: 24px; padding: 0 18px; color: #071210; background: var(--accent); border: 0; border-radius: 7px; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.review-loading-action:hover { background: #8bcce0; transform: translateY(-1px); }
.review-loading-action:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.review-loading-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.review-loading-note { margin: 22px 0 0; padding-top: 14px; color: #7d8997; border-top: 1px solid #27323c; font-size: 12px; }
.review-loading-note span { padding: 0 5px; color: #53616e; }
@keyframes loading-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes loading-panel-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.footer { max-width: 980px; margin: 64px auto 0; padding: 22px 20px 40px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .two-col, .totals { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 8px; }
  .review-section { padding-top: 48px; }
  .review-section h1 { font-size: 38px; }
  .review-success { padding: 26px 20px; }
  .review-success h2 { font-size: 30px; }
}
