/* MAD Bounty app — components on top of /assets/style.css tokens. No new colours except --green. */
:root {
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, .1);
  --green-line: rgba(61, 220, 151, .32);
  --gold-soft: rgba(245, 185, 66, .09);
  --gold-line: rgba(245, 185, 66, .32);
  --danger-soft: rgba(255, 92, 92, .08);
  --danger-line: rgba(255, 92, 92, .34);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --tabbar-h: 0px;
}
body { font-size: 16px; }
/* Contrast (WCAG AA), scoped to the app root so the marketing site's style.css is untouched:
   --ink-3 #7d8ca1 measured 4.24:1 on tinted panels -> #94a3b8 (>= 5:1 on every app surface);
   white on the accent is 2.9:1, so accent-filled controls use a near-black label (6.5:1) and keep the hue.
   Checked by e2e/contrast.mjs. */
#app { --ink-3: #94a3b8; --on-accent: #04101d; --accent-ink: #62b4ff; }
:where(.page) section { padding: 0; }   /* site sets big section padding; :where keeps .panel padding winning */
main:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent, #04101d); font-weight: 700; padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 10px; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.t-gold { color: var(--gold); }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
body.modal-open { overflow: hidden; }

/* ---------- header additions ---------- */
.nav { gap: 20px; }
.nav .links { margin-left: auto; }
.nav-right { display: flex; align-items: center; gap: 10px; }
@media (max-width: 640px) {
  .nav-right { margin-left: auto; gap: 8px; } .nav { height: 58px; gap: 10px; }
  .wbtn { padding: 7px 12px; }
}
@media (max-width: 640px) { .nav .links { display: none; } }
@media (max-width: 430px) { .brand { font-size: 0; gap: 0; } }
.appbar { border-top: 1px solid var(--line-soft); }
.appbar-in { display: flex; align-items: center; gap: 14px; height: 48px; }
.tabs { display: flex; gap: 4px; margin-right: auto; height: 100%; margin-left: -12px; }
.tab { display: inline-flex; align-items: center; padding: 0 12px; color: var(--ink-2); font-size: .92rem; font-weight: 500; position: relative; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.appbar-label { color: var(--ink-3); font-size: .8rem; }
@media (max-width: 640px) {
  .tabs, .appbar-label { display: none; }
  .appbar { display: none; }
}

/* segmented control (chain toggle + filters) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 999px; }
.seg button { font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-3); background: transparent; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: color .15s, background .15s; min-height: 32px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #1c2533; color: var(--ink); box-shadow: 0 0 0 1px #2e3a4b inset; }
.seg-n { font-size: .72rem; color: var(--ink-3); background: var(--bg); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.seg button.on .seg-n { color: var(--accent-ink); background: var(--accent-soft); }
.seg button:disabled { color: var(--ink-3); opacity: .6; cursor: not-allowed; }
.seg button:disabled:hover { color: var(--ink-3); }
.seg-chain button { padding: 4px 12px; font-size: .8rem; min-height: 28px; }
.seg-chain.is-test button.on { color: var(--gold); box-shadow: 0 0 0 1px var(--gold-line) inset; background: var(--gold-soft); }

.testnet-banner { background: var(--gold-soft); border-bottom: 1px solid var(--gold-line); color: var(--ink-2); font-size: .86rem; }
.testnet-banner .wrap { display: flex; align-items: center; gap: 10px; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.testnet-banner svg { color: var(--gold); flex: none; }
.testnet-banner strong { color: var(--gold); }

/* mobile bottom tab bar + mobile chain switch lives in the wallet row */
.tabbar { display: none; }
@media (max-width: 640px) {
  :root { --tabbar-h: 62px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(10, 12, 16, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: .72rem; font-weight: 600; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--accent); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- buttons ---------- */
.btn { font-family: inherit; line-height: 1.2; justify-content: center; white-space: nowrap; min-height: 42px; }
.btn-sm { min-height: 36px; }
.btn:active:not(:disabled) { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
#app .b-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
#app .b-primary:hover:not(:disabled) { background: #4da8ff; }
#app .b-primary:disabled { background: #24435f; color: #9fb6cc; opacity: 1; }
.b-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.b-ghost:hover:not(:disabled) { border-color: var(--ink-3); background: var(--bg-raise); }
.b-danger { background: transparent; border-color: var(--danger-line); color: var(--danger); }
.b-danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
.b-quiet { background: transparent; color: var(--ink-2); padding-left: 12px; padding-right: 12px; }
.b-quiet:hover { color: var(--ink); background: var(--bg-raise); }
.b-gold { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.btn-lg { padding: 14px 26px; font-size: 1rem; min-height: 50px; }
.btn-full { width: 100%; }
.btn-sub { font-weight: 500; opacity: .75; }
.btn .spin { margin-left: -2px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; flex: none; transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--ink); background: var(--bg-raise); }
.linkish { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* wallet button + menu */
.wbtn { gap: 8px; }
.wbtn-xl { display: none; }
@media (min-width: 900px) { .wbtn-xl { display: inline; } }
.jazz { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.wmenu { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; box-shadow: 0 18px 48px rgba(0,0,0,.5); z-index: 70; animation: pop .16s var(--ease); }
.popover a, .popover button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.popover a:hover, .popover button:hover { background: var(--bg-raise); color: var(--ink); text-decoration: none; }
.popover .danger { color: var(--danger); }
.pop-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- page scaffolding ---------- */
.page { padding-top: clamp(22px, 4vw, 40px); padding-bottom: 40px; min-height: 60vh; }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ptitle { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
.psub { margin-top: 6px; color: var(--ink-2); max-width: 64ch; font-size: .98rem; }
.sec-h { font-size: 1.15rem; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
.count { font-size: .75rem; background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 999px; padding: 2px 9px; letter-spacing: 0; }
.count-q { background: var(--bg-raise); color: var(--ink-3); border: 1px solid var(--line); }
footer { margin-top: 24px; }
@media (max-width: 640px) { footer { padding-bottom: 24px; } }
.foot .col a.addr { color: var(--ink-3); }

.toolbar .seg button { padding: 6px 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sort select, .field select { appearance: none; -webkit-appearance: none; }
.sort select { font: inherit; font-size: .88rem; color: var(--ink); background: var(--bg-raise) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8ca1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 34px 8px 14px; cursor: pointer; min-height: 38px; }

/* ---------- pills & chips ---------- */
.spill { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px 4px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; line-height: 1.3; }
.spill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-accent.spill { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tone-accent.spill .spill-dot { animation: pulse 2.4s infinite; }
.tone-gold.spill { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.tone-green.spill { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.tone-danger.spill { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.tone-muted.spill { color: var(--ink-3); border-color: var(--line); background: var(--bg-raise); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); background: var(--bg-raise); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; white-space: nowrap; line-height: 1.4; }
.chip svg { color: var(--ink-3); }
.chip-plain { color: var(--ink-2); }
.chip-warn { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.chip-you { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.you { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }

/* ---------- money ---------- */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--ink); }
.money-cents { color: var(--ink-2); }
.money-unit { color: var(--ink-3); font-weight: 500; font-size: .8em; }
.money-cur { color: var(--ink-3); font-weight: 600; margin-right: 1px; }
.money-lg { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
.money-lg .money-cents { font-size: .7em; color: inherit; }
.money-lg .money-cur { font-size: .7em; vertical-align: .32em; }
.money-lg .money-unit { font-size: .46em; letter-spacing: .02em; }
.money-hero { font-size: clamp(2.6rem, 8vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.money-hero .money-cents { font-size: .7em; color: inherit; letter-spacing: -0.02em; margin-left: .02em; }
.money-hero .money-cur { font-size: .5em; vertical-align: .72em; margin-right: 2px; }
.money-hero .money-unit { font-size: .3em; letter-spacing: .04em; margin-left: .3em; }
.money-sm { font-size: .95rem; }

/* ---------- countdown ---------- */
.cd { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd svg { color: var(--ink-3); }
.cd-label { color: var(--ink-3); }
.cd time { order: -1; color: var(--ink); font-weight: 600; }
.cd svg { order: -2; }
.cd-urgent time, .cd-urgent svg { color: var(--gold); }
.cd-past time { color: var(--ink-3); font-weight: 500; }
.cd-danger time, .cd-danger svg { color: var(--danger); }

/* ---------- address ---------- */
.addrx { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.addrx a { color: var(--ink); font-size: .86rem; }
.addrx a:hover { color: var(--accent); }
.addrx .icon-btn { width: 26px; height: 26px; }
.txlink { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); }
.txlink:hover { color: var(--accent); }

/* ---------- bounty cards ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.bcard { display: flex; flex-direction: column; gap: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 14px; color: var(--ink); min-height: 216px;
  transition: border-color .18s, transform .18s var(--ease), background .18s; }
.bcard:hover { text-decoration: none; border-color: #2c3746; transform: translateY(-2px); }
.bcard:hover .bc-go { color: var(--accent); transform: translateX(2px); }
.bcard:active { transform: translateY(0) scale(.995); }
.bcard.is-done { background: var(--bg-raise); }
.bcard.is-done .money { color: var(--ink-2); }
.bc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bc-id { color: var(--ink-3); font-size: .78rem; }
.bc-title { overflow-wrap: anywhere; font-size: 1.02rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.bc-reward { margin-top: -2px; }
.bc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.bc-go { color: var(--ink-3); transition: color .15s, transform .15s; display: inline-flex; }
.bcard-sk { pointer-events: none; }

/* skeleton */
.sk { display: block; background: linear-gradient(90deg, var(--bg-raise) 0%, #18202b 50%, var(--bg-raise) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.bcard-sk .sk + .sk { margin-top: -4px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty */
.empty { text-align: center; border: 1px dashed var(--line); border-radius: var(--r-lg); padding: clamp(32px, 6vw, 56px) 22px; background: var(--bg-raise); }
.empty-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 16px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.empty h3 { font-size: 1.2rem; }
.empty-body { max-width: 56ch; margin: 10px auto 0; color: var(--ink-2); font-size: .95rem; }
.empty-body p + p { margin-top: 8px; }
.empty-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.teach { list-style: none; display: grid; gap: 8px; margin: 18px auto 0; max-width: 420px; text-align: left; counter-reset: t; }
.teach li { counter-increment: t; display: flex; gap: 10px; align-items: baseline; font-size: .92rem; }
.teach li::before { content: counter(t); flex: none; font-family: var(--mono); font-size: .75rem; color: var(--accent); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); border: 1px solid var(--accent-line); }

/* notices */
.notice { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--ink-2); font-size: .9rem; line-height: 1.55; margin: 12px 0; }
.notice-ic { flex: none; color: var(--accent); margin-top: 1px; }
.notice-warn { border-color: var(--gold-line); background: var(--gold-soft); }
.notice-warn .notice-ic { color: var(--gold); }
.notice-danger { border-color: var(--danger-line); background: var(--danger-soft); }
.notice-danger .notice-ic { color: var(--danger); }
.notice-ok { border-color: var(--green-line); background: var(--green-soft); }
.notice-ok .notice-ic { color: var(--green); }

/* ---------- bounty page ---------- */
.bgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.bmain, .bside { display: grid; gap: 16px; align-content: start; min-width: 0; }
.bside-desk { display: none; }
.bside-mobile { display: block; }
@media (min-width: 960px) {
  .bgrid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .bside-desk { display: block; }
  .bside-mobile { display: none; }
}
/* desktop: the action panel + timeline stay in view; scroll inside the column if it is taller than the screen */
/* desktop: the right column holds only the action panel and stays in view while the page scrolls
   (the timeline flows in the main column so nothing is hidden behind an inner scroll) */
@media (min-width: 1024px) {
  .bside { position: sticky; top: 112px; max-height: calc(100vh - 128px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
}
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .88rem; }
.back:hover { color: var(--ink); text-decoration: none; }
.bhead { padding: 4px 0 6px; }
.bhead-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.bhead-t { overflow-wrap: anywhere; font-size: clamp(1.45rem, 3.6vw, 2.1rem); margin-top: 14px; line-height: 1.2; max-width: 30ch; }
.bhead-reward { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 18px; }
.bhead-sub { color: var(--ink-3); font-size: .95rem; }
.bhead-sub strong { color: var(--ink); }
.bhead-out { margin-top: 18px; }
.bhead-out .bhead-reward { margin-top: 2px; }
.bo-k { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-2); }
.out-accept .bo-k, .out-timeout .bo-k { color: var(--green); }
.out-burn .bo-k { color: var(--danger); }
.out-burn .money-hero { color: var(--danger); }
.out-cancelled .money-hero, .out-refund .money-hero { color: var(--ink-2); }
.bo-to { color: var(--ink-2); font-size: 1rem; display: inline-flex; align-items: center; gap: 6px; }
.bo-to .addrx a { font-size: 1rem; }
.bhead-out .bhead-sub { margin-top: 8px; }
.bhead-meta { display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

.panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 3vw, 22px); min-width: 0; }
.panel-h { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.panel-h svg { color: var(--ink-3); }
.panel-h:focus { outline: none; }

/* spec */
.spec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.verified { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); padding: 3px 10px; border-radius: 999px; cursor: help; }
.spec-sum { color: var(--ink); font-size: 1rem; margin-bottom: 4px; }
.spec-sub { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin: 18px 0 8px; }
.spec-text { white-space: pre-wrap; color: var(--ink-2); font-size: .95rem; line-height: 1.65; overflow-wrap: anywhere; }
.spec-ev { background: var(--bg-raise); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.criteria { list-style: none; display: grid; gap: 8px; }
.criteria li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .95rem; }
.crit-ic { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); margin-top: 2px; }
.criteria .chip { margin-left: auto; flex: none; align-self: flex-start; }
.hashline { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.hashline .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.hashline code { word-break: break-all; color: var(--ink-2); font-size: .8rem; }
.hash-row { display: flex; align-items: flex-start; gap: 6px; }

/* spec checker */
details.speccheck { margin-top: 12px; border: 0; background: none; padding: 0; border-radius: 0; }
details.speccheck summary { font-size: .88rem; color: var(--accent); font-weight: 600; padding: 6px 0; cursor: pointer; justify-content: flex-start; }
details.speccheck summary::after { margin-left: 4px; color: var(--accent); }
.speccheck textarea { font-size: .82rem !important; min-height: 100px; }
.sc-res { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.sc-res svg { flex: none; margin-top: 2px; }
.sc-ok { background: var(--green-soft); border: 1px solid var(--green-line); }
.sc-ok svg, .sc-ok strong { color: var(--green); }
.sc-bad { background: var(--danger-soft); border: 1px solid var(--danger-line); }
.sc-bad svg, .sc-bad strong { color: var(--danger); }
.sc-h { display: block; word-break: break-all; font-size: .74rem; color: var(--ink-3); margin-top: 4px; }

/* money box */
.mb-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.mb-in > div { background: var(--bg-raise); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-in .k { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.mb-in .money { font-size: .95rem; }

.mbox { width: 100%; border-collapse: collapse; font-size: .9rem; table-layout: fixed; }
.mbox th, .mbox td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.mbox thead th { color: var(--ink-3); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.mbox thead th:first-child { width: 40%; }
.mbox tbody th { font-weight: 600; color: var(--ink); }
.mbox tr:last-child th, .mbox tr:last-child td { border-bottom: 0; }
.mb-hint { display: block; color: var(--ink-3); font-weight: 400; font-size: .78rem; line-height: 1.4; margin-top: 2px; }
.mb-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.mb-u { color: var(--ink-3); font-size: .78em; }
.mb-t { display: block; color: var(--ink-2); font-size: .8rem; }
.mb-t-only { color: var(--ink-2); font-size: .86rem; }
.mb-pos .mb-amt { color: var(--green); }
.mb-neu .mb-amt { color: var(--ink); }
.mb-g { display: block; color: var(--ink-3); font-size: .74rem; line-height: 1.4; margin-top: 2px; }
.mb-kx { font-size: .74rem; color: var(--ink-3); }
.t-green { color: var(--green); }
.mb-foot { display: block; margin-top: 4px; font-size: .76rem; font-weight: 500; color: var(--ink-2); }
.mb-fine { margin-top: 10px; font-size: .8rem; color: var(--ink-3); }
.mb-fine strong { color: var(--ink-2); }
.mb-note { font-size: .86rem; color: var(--ink-2); margin: 0 0 10px; }
.mbox tr.mb-hit > * { background: var(--green-soft); }
.mbox tr.mb-hit > th { box-shadow: inset 3px 0 0 var(--green); }
.mbox tr.mb-hit-neg > * { background: var(--danger-soft); }
.mbox tr.mb-hit-neg > th { box-shadow: inset 3px 0 0 var(--danger); }
.mb-hit-neg .mb-tag { color: var(--danger); }
/* de-emphasised rows on a finished bounty: quieter colours, not opacity (opacity would fail contrast) */
.mbox tr.mb-dim th, .mbox tr.mb-dim .mb-amt, .mbox tr.mb-dim .mb-g, .mbox tr.mb-dim .mb-foot { color: var(--ink-3) !important; font-weight: 500; }
.mbox tr.mb-dim .mb-hint { display: none; }
@media (min-width: 561px) { .mbox tr.mb-hit > td { padding-top: 29px; } }
.mb-tag { display: flex; width: max-content; align-items: center; gap: 4px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--green); margin-bottom: 3px; }
.mbox th:first-child { padding-left: 10px; }
.mb-neg .mb-amt { color: var(--danger); }
@media (max-width: 560px) {
  .mbox, .mbox tbody { display: block; }
  .mbox thead { display: none; }
  .mbox tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line-soft); }
  .mbox tr.mb-hit { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); border-radius: 10px; }
  .mbox tr.mb-hit-neg { background: var(--danger-soft); box-shadow: inset 3px 0 0 var(--danger); }
  .mbox tr.mb-hit > *, .mbox tr.mb-hit > th { background: none; box-shadow: none; }
  .mbox tr:last-child { border-bottom: 0; }
  .mbox th, .mbox td, .mbox th:first-child { padding: 0; border: 0; }
  .mb-in { grid-template-columns: 1fr; }
  .mb-in > div { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .mb-in > div .k { margin-right: auto; }
  .mb-in > div .mb-kx { flex-basis: 100%; text-align: right; }
  .mbox tbody th { grid-column: 1 / -1; }
  .mbox td::before { content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 1px; }
}

/* parties */
.party { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); align-items: center; font-size: .9rem; }
.party:last-child { border-bottom: 0; }
.party .k { color: var(--ink-3); font-size: .84rem; }
.party .v { color: var(--ink-2); min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.vself { display: inline-flex; align-items: center; gap: 6px; }

/* timeline — every step that already happened shares one filled 'done' dot; only the outcome is coloured */
.tl { list-style: none; position: relative; }
.tl-i { position: relative; padding: 0 0 18px 26px; }
.tl-i::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px; width: 2px; background: var(--accent-line); }
.tl-i:last-child { padding-bottom: 0; }
.tl-i:last-child::before { display: none; }
.tl-next::before, .tl-i:has(+ .tl-next)::before { background: var(--line); }
.tl-dot { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--accent); }
.tone-green .tl-dot { background: var(--green); border-color: var(--green); }
.tone-danger .tl-dot { background: var(--danger); border-color: var(--danger); }
.tone-muted .tl-dot { background: var(--ink-3); border-color: var(--ink-3); }
.tl-next .tl-dot { background: var(--bg-card); border-style: dashed; border-color: var(--ink-3); }
.tl-b { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.tl-l { font-weight: 600; font-size: .92rem; }
.tone-green .tl-l { color: var(--green); }
.tone-danger .tl-l { color: var(--danger); }
.tl-next .tl-l { color: var(--ink-2); font-weight: 500; }
.tl-d { color: var(--ink-2); font-size: .85rem; line-height: 1.45; }
.tl-m { color: var(--ink-3); font-size: .78rem; font-variant-numeric: tabular-nums; }
.tl-m time:first-child { color: var(--ink-2); }
.tl-gap { color: var(--ink-3); }
.tl .txlink { color: var(--accent); font-size: .8rem; font-weight: 600; margin-top: 1px; }
.tl .txlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* action panel */
.apanel { display: grid; gap: 16px; }
.next { display: grid; gap: 3px; }
.next-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.next-h { font-size: 1.1rem; }
.next-d { font-size: .9rem; color: var(--ink-2); }
.next-out .next-k { color: var(--ink-2); }
.next-out.out-accept .next-k, .next-out.out-timeout .next-k { color: var(--green); }
.next-out.out-burn .next-k { color: var(--danger); }
.ap-similar { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.ap-similar .why { font-size: .8rem; color: var(--ink-3); margin-top: 8px; }
.ap-similar .b-ghost { border-color: var(--accent-line); color: var(--accent-ink); }
.ap-similar .b-ghost:hover:not(:disabled) { border-color: var(--accent); }
.next-dl { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.ap-primary .why { font-size: .84rem; color: var(--ink-2); margin-top: 9px; text-align: center; }
.ap-primary .why-off { color: var(--ink-3); }
.ap-group { display: grid; gap: 0; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.ap-gh { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; margin: 8px 0 2px; }
.arow { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.arow + .arow { border-top: 1px dashed var(--line-soft); }
.arow-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.arow-l { font-size: .92rem; font-weight: 600; }
.arow-w { font-size: .8rem; color: var(--ink-3); line-height: 1.4; }
.arow-off .arow-l { color: var(--ink-2); }
.arow .btn { flex: none; min-width: 62px; }
details.ap-more { border: 0; background: none; padding: 0; border-top: 1px solid var(--line-soft); border-radius: 0; }
details.ap-more[open] { border-color: var(--line-soft); }
details.ap-more summary { padding: 10px 0 4px; font-size: .86rem; color: var(--ink-2); font-weight: 600; }
.spec-text code, .criteria code { font-family: var(--mono); font-size: .86em; color: var(--ink); background: var(--bg-raise); border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 5px; }
.arow .btn-wait { font-size: .78rem; color: var(--ink-3); }

/* ---------- modal / sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(4, 6, 9, .72); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
@media (min-width: 640px) { .overlay { align-items: center; padding: 24px; } }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.5); animation: rise .24s var(--ease); }
.sheet-wide { max-width: 560px; }
@media (min-width: 640px) { .sheet { border-radius: 22px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 0 22px; }
.sheet-head h2 { font-size: 1.2rem; letter-spacing: -0.015em; }
.sheet-body { padding: 14px 22px 6px; overflow-y: auto; display: grid; gap: 14px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); margin-top: 8px; }
.sheet-foot .b-primary, .sheet-foot .b-danger { flex: 1; }
.sheet-note { margin-right: auto; align-self: center; font-size: .78rem; color: var(--ink-3); }
@media (max-width: 639px) { .sheet-note { display: none; } }
@media (min-width: 640px) { .sheet-foot .b-primary, .sheet-foot .b-danger { flex: 0 1 auto; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.cs-what { color: var(--ink-2); font-size: .95rem; }
.moves { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--bg-raise); border-radius: 12px; overflow: hidden; }
.moves th, .moves td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.moves tr:last-child th, .moves tr:last-child td { border-bottom: 0; }
.moves th { font-weight: 500; color: var(--ink-2); }
.mv-to { color: var(--ink-3); font-size: .84rem; white-space: nowrap; }
.mv-to svg { vertical-align: -2px; margin-right: 4px; }
.mv-amt { text-align: right !important; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-amt span { color: var(--ink-3); font-weight: 500; font-size: .8em; }
.mv-pos .mv-amt { color: var(--green); }
.mv-neg .mv-amt { color: var(--danger); }
.cs-facts { display: grid; gap: 6px; font-size: .86rem; }
.cs-facts > div { display: flex; justify-content: space-between; gap: 12px; }
.cs-facts dt { color: var(--ink-3); }
.cs-facts dd { color: var(--ink-2); text-align: right; }
.safety { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.safety-h { font-size: .9rem; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.safety-danger { border-color: var(--danger-line); background: var(--danger-soft); }
.safety-danger .safety-h { color: var(--danger); }
.safety ul { list-style: none; display: grid; gap: 8px; }
.sw { font-size: .85rem; color: var(--ink-2); line-height: 1.5; display: flex; gap: 8px; align-items: baseline; }
.sw-s { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; color: var(--ink-3); background: var(--bg-raise); }
.sw-danger .sw-s { color: var(--danger); background: var(--danger-soft); }
.sw-warn .sw-s { color: var(--gold); background: var(--gold-soft); }
.audit-line { font-size: .8rem; color: var(--ink-3); display: flex; gap: 7px; align-items: flex-start; line-height: 1.5; }
.audit-line svg { flex: none; margin-top: 2px; color: var(--gold); }
.audit-line strong { color: var(--ink-2); }
.audit-near { color: var(--ink-2); background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 8px 12px; }
.audit-near strong { color: var(--gold); }
.sheet > .audit-near { margin: 6px 22px 0; }
.post-why { text-align: right; color: var(--ink-3); margin-top: 6px; }
.wiz-nav-tight { margin-top: 8px; padding-top: 12px; }

/* wallet picker */
.wlist { list-style: none; display: grid; gap: 8px; }
.wopt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-raise); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; min-height: 56px; }
.wopt:hover:not(:disabled) { border-color: var(--accent-line); background: var(--bg); }
.wopt:active:not(:disabled) { transform: scale(.99); }
.wopt img { border-radius: 8px; }
.wopt-ph { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.wopt-n { flex: 1; text-align: left; }
.wopt svg:last-child { color: var(--ink-3); }
.nowallet { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 4px 0 8px; }
.nowallet .empty-ic { margin: 0; }
.deeplinks { display: grid; gap: 8px; width: 100%; }

/* toasts */
.toasts { position: fixed; z-index: 95; right: 16px; bottom: calc(16px + var(--tabbar-h)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 13px 10px 13px 14px; border-radius: 14px; background: #161c28; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.45); animation: rise .22s var(--ease); font-size: .88rem; }
.toast-ic { flex: none; color: var(--accent); margin-top: 1px; }
.toast-confirmed { border-color: var(--green-line); }
.toast-confirmed .toast-ic { color: var(--green); }
.toast-failed { border-color: var(--danger-line); }
.toast-failed .toast-ic { color: var(--danger); }
.toast-b { flex: 1; display: grid; gap: 2px; min-width: 0; }
.toast-b span { color: var(--ink-2); }
.toast-b a { font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; width: auto; bottom: calc(12px + var(--tabbar-h) + env(safe-area-inset-bottom)); } }

/* ---------- post wizard ---------- */
.stepper { list-style: none; display: flex; gap: 6px; margin-bottom: 18px; counter-reset: s; }
.st { flex: 1; }
.st button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px 0 12px; border: 0; border-bottom: 2px solid var(--line); background: none; color: var(--ink-3); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-align: left; }
.st button:disabled { cursor: default; }
.st-n { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-family: var(--mono); font-size: .76rem; border: 1px solid var(--line); background: var(--bg-raise); }
.st-now button { color: var(--ink); border-color: var(--accent); }
.st-now .st-n { color: var(--on-accent); font-weight: 700; background: var(--accent); border-color: var(--accent); }
.st-done button { color: var(--ink-2); border-color: var(--accent-line); }
.st-done .st-n { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
@media (max-width: 420px) { .st button { font-size: .8rem; gap: 6px; white-space: nowrap; } .st:not(.st-now) .st-l { display: none; } .st:not(.st-now) { flex: 0 0 auto; } .st:not(.st-now) button { padding-right: 12px; } }


.wiz { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .wiz { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; } .wiz-side { position: sticky; top: 128px; } }
@media (max-width: 959px) { .wiz-side { order: -1; } }
.wiz .panel { display: grid; gap: 4px; }
.wiz .panel > *, .wiz-main { min-width: 0; }
@media (max-width: 559px) { .wiz-nav .btn-lg { flex: 1; white-space: normal; text-align: center; padding-left: 16px; padding-right: 16px; } }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

.field { display: grid; gap: 6px; margin: 10px 0 8px; border: 0; padding: 0; min-width: 0; }
.field label:not(.vopt), .field legend, .field .lbl { font-size: .9rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; padding: 0; }
.field legend { margin-bottom: 6px; }
.opt { font-size: .72rem; font-weight: 500; color: var(--ink-3); background: var(--bg-raise); border-radius: 6px; padding: 1px 6px; }
.field input:not([type=radio]):not([type=range]), .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; line-height: 1.55; min-height: 120px; }
.field input.mono { font-family: var(--mono); font-size: .9rem; }
.field select { background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8ca1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; cursor: pointer; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #2a3442; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field ::placeholder { color: #7d8ca1; }
.has-err input, .has-err textarea { border-color: var(--danger-line) !important; }
.hint { font-size: .8rem; color: var(--ink-3); line-height: 1.45; display: flex; gap: 6px; align-items: flex-start; }
.hint svg { flex: none; margin-top: 2px; }
.err { font-size: .82rem; color: var(--danger); }
.bytes { font-size: .78rem; color: var(--ink-3); margin-top: 6px; }
.crit-row { display: flex; align-items: center; gap: 8px; }
.crit-row + .crit-row { margin-top: 6px; }
.crit-n { flex: none; width: 24px; text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }
.addc { font-size: .88rem; margin-top: 4px; justify-self: start; padding: 6px 0; }
.affix { position: relative; }
.affix input { padding-right: 64px !important; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.1rem !important; }
.affix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .82rem; font-weight: 600; pointer-events: none; }
.grid2, .grid3 { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }
.slider { margin: 0 0 8px; }
.slider input { width: 100%; accent-color: var(--accent); height: 28px; }
.slider-l { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ink-3); }
.slider-l span:nth-child(2) { color: var(--ink-2); }

.vopts { display: grid; gap: 8px; }
.vopts-2 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .vopts-2 { grid-template-columns: 1fr 1fr; } }
.vopt { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raise); cursor: pointer; transition: border-color .15s, background .15s; }
.vopt:hover { border-color: #2c3746; }
.vopt.on { border-color: var(--accent); background: var(--accent-soft); }
.vopt-warn.on { border-color: var(--danger-line); background: var(--danger-soft); }
.vopt input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.vopt-b { display: grid; gap: 2px; }
.vopt-t { font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vopt-d { font-size: .84rem; color: var(--ink-3); line-height: 1.45; }
.vopt.on .vopt-d { color: var(--ink-2); }
details.adv { border: 0; background: none; padding: 0; margin-top: 4px; border-radius: 0; }
details.adv[open] { border: 0; }
details.adv summary { padding: 10px 0; font-size: .88rem; color: var(--accent); font-weight: 600; justify-content: flex-start; }
details.adv summary::after { margin-left: 4px; color: var(--accent); }
.vcfg { margin-top: 4px; }
.vcfg:empty { display: none; }

.payout { background: linear-gradient(180deg, #121926, var(--bg-card)); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 14px; }
.payout-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.payout-hero { margin-top: -6px; }
.payout-hero .money-hero { font-size: clamp(2.2rem, 7vw, 3rem); }
.payout-l { display: grid; gap: 6px; font-size: .86rem; }
.payout-l > div { display: flex; justify-content: space-between; gap: 10px; }
.payout-l dt { color: var(--ink-3); }
.payout-l dd { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.payout-o { display: grid; gap: 1px; background: var(--line-soft); border-radius: 12px; overflow: hidden; border: 1px solid var(--line-soft); }
.po { background: var(--bg-raise); padding: 10px 12px; display: grid; gap: 2px; }
.po-k { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--ink-3); font-weight: 600; }
.po-v { font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.po-v strong { color: var(--ink); }
.po-pos .po-k { color: var(--green); }
.po-pos .po-v strong { color: var(--green); }
.po-neg .po-k { color: var(--danger); }
@media (max-width: 959px) {
  .payout { grid-template-columns: 1fr 1fr; align-items: start; padding: 16px; gap: 10px 14px; }
  .payout-k { grid-column: 1 / -1; }
  .payout-hero { grid-column: 1; margin: 0; }
  .payout-l { grid-column: 2; align-self: center; }
  .payout-l > div { flex-direction: column; gap: 0; }
  .payout-o { grid-column: 1 / -1; }
  .payout-hero .money-hero { font-size: 2.1rem; }
}

.review-title { display: grid; gap: 2px; padding: 12px 14px; background: var(--bg-raise); border-radius: 12px; border: 1px solid var(--line-soft); }
.review-title .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.describe { list-style: none; counter-reset: d; display: grid; gap: 10px; }
.describe li { counter-increment: d; display: flex; gap: 12px; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.describe li::before { content: counter(d); flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-family: var(--mono); font-size: .74rem; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-top: 1px; }
.txplan ol { list-style: none; display: grid; gap: 8px; }
.txplan li { display: flex; gap: 10px; font-size: .9rem; color: var(--ink-2); align-items: baseline; }
.txplan li strong { white-space: nowrap; }
.tp-n { flex: none; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); }

.success { max-width: 560px; margin: 20px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }
.success-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); animation: popin .4s var(--ease); }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
.share { display: flex; gap: 10px; align-items: center; width: 100%; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; text-align: left; margin-top: 8px; }
.share code { flex: 1; font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.success-a { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---------- my bounties ---------- */
.todo .sec-h { margin-top: 4px; }
.todo-l { list-style: none; display: grid; gap: 10px; }
.todo-i { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--accent-line); color: var(--ink); transition: background .15s, transform .15s var(--ease); }
.todo-i:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.todo-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.todo-t strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; min-width: 0; }
.todo-r { display: grid; justify-items: end; gap: 2px; flex: none; }
.todo-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: .84rem; font-weight: 600; }
@media (max-width: 560px) {
  .todo-i { flex-wrap: wrap; gap: 10px; }
  .todo-t { flex-basis: 100%; }
  .todo-t strong { white-space: normal; }
  .todo-r { flex-basis: 100%; grid-auto-flow: column; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line-soft); }
}
.rgroup { margin-top: 8px; }

/* ---------- help ---------- */
.hsteps { list-style: none; display: grid; gap: 10px; }
@media (min-width: 900px) { .hsteps { grid-template-columns: repeat(5, 1fr); } }
.hsteps li { display: flex; gap: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
@media (min-width: 900px) { .hsteps li { flex-direction: column; } }
.hs-n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.hsteps p { font-size: .88rem; margin-top: 3px; }
.hrisk { margin-top: 22px; }
.gloss { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.gloss > div { background: var(--bg-card); padding: 13px 16px; display: grid; gap: 2px; }
@media (min-width: 720px) { .gloss > div { grid-template-columns: 160px 1fr; gap: 16px; } }
.gloss dt { font-weight: 600; }
.gloss dd { color: var(--ink-2); font-size: .92rem; }
.hlinks { display: grid; gap: 12px; margin-top: 30px; }
@media (min-width: 720px) { .hlinks { grid-template-columns: repeat(3, 1fr); } }
.card.hl { display: flex; gap: 14px; align-items: flex-start; padding: 18px; color: var(--ink); border-radius: 16px; transition: border-color .15s; }
.card.hl:hover { text-decoration: none; border-color: var(--accent-line); }
.card.hl svg { color: var(--accent); flex: none; margin-top: 2px; }
.card.hl > span { display: grid; gap: 2px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bcard:hover, .btn:hover, .todo-i:hover { transform: none; }
}

/* compact chain toggle in the top bar on phones (the app bar is hidden there) */
.chain-m { display: none; }
@media (max-width: 640px) { .chain-m { display: inline-flex; } .chain-m .seg-chain button { padding: 3px 9px; font-size: .74rem; min-height: 26px; } }
