/* sbb.money v2, "The Vault": the monkey's colours (night purple, gold, and sky blue for safety notes), shared by every
   page. No web fonts: the site's security policy allows none, so headings use the system's rounded face where there
   is one (Apple's) and the normal system face elsewhere. */
:root {
  --bg: #1B1240; --bg-deep: #130C30; --card: #2A1D63; --line: #3B2C80; --edge: #7A4BD8;
  --text: #F4F4F4; --muted: #CFC8EA; --soft: #B3AAD8;
  --accent: #D4AF37; --accent-hi: #F0CF5A; --accent-ink: #1B1240;
  --sky: #7FC4D9; --sky-ink: #1A1A1A; --bad: #FF9A90; --spot: #FAFAFA;
  --gold: linear-gradient(180deg, #F2D46A, #D4AF37);
  --glass: linear-gradient(180deg, rgba(48, 33, 112, .8), rgba(34, 23, 84, .8));
  --round: ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header: 68px;
  /* Two corner sizes (controls and inner panels, cards) and one border colour, pills round. */
  --radius: 12px; --radius-card: 20px;
  --border: rgba(122, 75, 216, .35); --border-hi: rgba(122, 75, 216, .75);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg-deep); scroll-padding-top: calc(var(--header) + 12px); }
body { position: relative; margin: 0; min-height: 100vh; color: var(--text); font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; isolation: isolate; overflow-x: clip; }
/* Behind everything: a purple glow from the top, a gold one where the monkey stands, and a faint dot grid. */
body::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(1000px 520px at 50% -80px, rgba(122, 75, 216, .42), transparent 70%), var(--bg); }
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 24px; }
p { margin: 0 0 12px; }
ul { padding-left: 20px; }
a { color: var(--accent); }
a:hover { color: var(--accent-hi); }
h1 { font: 800 clamp(38px, 5.6vw, 68px)/1.02 var(--round); letter-spacing: -2px; margin: 18px 0 16px; text-wrap: balance; }
h2 { font: 800 clamp(26px, 3vw, 36px)/1.1 var(--round); letter-spacing: -.8px; margin: 0 0 12px; }
.gold { color: var(--accent-hi); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); word-break: break-all; }
.error { color: var(--bad); }
.muted { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 13.5px; }
.good { color: var(--accent-ink); background: var(--gold); border-radius: var(--radius); padding: 8px 12px; font-weight: 700; }
.show-sm { display: none; }
textarea:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- header and footer ---- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(19, 12, 48, .72); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid rgba(122, 75, 216, .22); }
.top-inner { max-width: 1180px; height: var(--header); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 12px; }
.home { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.home:hover { color: var(--text); }
.home img { width: 40px; height: 40px; border-radius: 10px; image-rendering: pixelated; display: block; box-shadow: 0 0 0 2px var(--accent); }
.brand { font: 800 21px/1 var(--round); letter-spacing: -.4px; }
.brand b { font-weight: inherit; color: var(--accent); }
.links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; transition: color .15s, background-color .15s, border-color .15s; }
.nav:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav[aria-current='page'] { color: var(--accent); }
.nav.x { color: var(--text); border: 1px solid var(--border-hi); margin-left: 6px; }
.nav.x:hover { color: var(--accent); border-color: var(--accent); background: transparent; }
.foot { margin-top: 96px; border-top: 1px solid rgba(122, 75, 216, .25); background: rgba(19, 12, 48, .55); }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 28px 20px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; color: var(--soft); font-size: 13.5px; }
.foot-inner nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.foot-inner nav a { color: var(--muted); font-weight: 600; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.foot-inner nav a:hover { color: var(--accent); }
.foot-inner p { flex-basis: 100%; margin: 0; }

/* ---- buttons ---- */
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; min-height: 48px; font: 800 16px var(--round); border: 0; border-radius: var(--radius); background: var(--gold); color: var(--accent-ink); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .12s, box-shadow .15s, filter .15s, background-color .15s, border-color .15s, color .15s; }
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: default; transform: none; filter: none; }
button.small { padding: 9px 14px; min-height: 44px; font-size: 14px; }
label.confirm { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; font-weight: 600; cursor: pointer; }
label.confirm input { width: 20px; height: 20px; flex: none; accent-color: var(--accent, #f5c84c); }
button.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--border-hi); box-shadow: none; }
button.ghost:hover { color: var(--accent); border-color: var(--accent); filter: none; box-shadow: none; }
.cta { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: var(--radius); background: var(--gold); color: var(--accent-ink); font: 800 16px var(--round); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: filter .15s, box-shadow .15s; }
.cta:hover { color: var(--accent-ink); filter: brightness(1.06); }
.cta::after, .more::after, .stat-link::after { content: '→'; transition: transform .15s; }
.cta:hover::after, .more:hover::after, .stat-link:hover::after { transform: translateX(3px); }
.more, .stat-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.more { min-height: 44px; }

/* ---- loading ---- */
.spinner, .loading::before, .recover-panel p.muted::before { content: ''; width: 1em; height: 1em; flex: none; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: turn .7s linear infinite; }
.loading, .recover-panel p.muted { display: flex; align-items: center; gap: 10px; }
.skeleton { border-radius: var(--radius-card); background: linear-gradient(100deg, var(--card) 30%, var(--line) 50%, var(--card) 70%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skeleton.banner { height: 150px; margin: 14px 0; }
.skeleton.block { height: 200px; margin-top: 16px; }
/* Stand-ins for figures still loading, about their size. */
.skeleton.bar-big { height: 42px; width: min(250px, 100%); border-radius: 10px; }
.skeleton.bar-small { height: 14px; width: min(150px, 70%); margin-top: 12px; border-radius: 7px; }
.skeleton.bar-amount { height: 22px; width: 96px; margin-left: auto; border-radius: 7px; }
.stat-a .skeleton, .stat-b .skeleton { margin-left: auto; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---- the landing hero: the monkey in the middle, its figures either side, the search box under it ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px) minmax(0, 1fr); grid-template-areas: 'copy copy copy' 'search search search' 'a stage c' 'b stage d'; column-gap: 40px; padding: 44px 0 12px; }
.hero-copy { grid-area: copy; text-align: center; max-width: 880px; margin: 0 auto 4px; }
.lede { color: var(--muted); font-size: 19px; max-width: 620px; margin: 0 auto; text-wrap: pretty; }

.coverage { display: contents; }
.coverage > p { grid-area: a; align-self: end; justify-self: end; }
.stat { position: relative; padding: 14px 0; }
.stat-a { grid-area: a; align-self: end; }
.stat-b { grid-area: b; align-self: start; }
.stat-c { grid-area: c; align-self: end; }
.stat-d { grid-area: d; align-self: start; }
.stat-a, .stat-b { text-align: right; }
.stat-value { font: 800 clamp(30px, 3.3vw, 46px)/1.05 var(--round); letter-spacing: -1.4px; }
.stat-gold .stat-value { color: var(--accent-hi); }
.stat-label { color: var(--muted); font-size: 14.5px; line-height: 1.45; margin-top: 6px; max-width: 260px; }
.stat-a .stat-label, .stat-b .stat-label { margin-left: auto; }
.stat-link { margin-top: 8px; font-size: 14.5px; }

/* The monkey floats in front of a round vault door, head above its rim, with gold coins floating round him. */
.stage { grid-area: stage; position: relative; width: 100%; max-width: 440px; aspect-ratio: 44 / 46; margin: 36px auto 0; }
.vault { position: absolute; left: 7%; right: 7%; bottom: 8%; aspect-ratio: 1; border-radius: 50%; border: 10px solid transparent; background: radial-gradient(circle at 50% 36%, #3D2C8E 0%, #2A1D63 46%, #1C1250 74%) padding-box, var(--gold) border-box; box-shadow: 0 0 0 1px rgba(255, 241, 176, .25), 0 0 0 18px rgba(212, 175, 55, .06), 0 0 0 19px rgba(212, 175, 55, .2), 0 0 120px 24px rgba(212, 175, 55, .2), inset 0 0 70px rgba(10, 5, 30, .65); }
.vault::before { content: ''; position: absolute; inset: 7%; border-radius: 50%; background: repeating-conic-gradient(rgba(240, 207, 90, .6) 0 .7deg, transparent .7deg 6deg); -webkit-mask: radial-gradient(closest-side, transparent 88%, #000 89%); mask: radial-gradient(closest-side, transparent 88%, #000 89%); animation: turn 90s linear infinite; }
.vault::after { content: ''; position: absolute; inset: 21%; border-radius: 50%; border: 2px dashed rgba(212, 175, 55, .3); animation: turn 140s linear infinite reverse; }
.bolt { position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF4C2, #D4AF37 45%, #7D5E14); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.ape { position: absolute; left: 50%; bottom: 3%; z-index: 2; height: 95%; width: auto; transform: translateX(-50%); filter: drop-shadow(0 22px 26px rgba(5, 2, 20, .55)); animation: bob 6s ease-in-out infinite; }
.floor { position: absolute; left: 50%; bottom: 1.5%; z-index: 1; width: 48%; height: 6%; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(5, 2, 20, .75), transparent); animation: floor 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -10px); } }
@keyframes floor { 50% { transform: translateX(-50%) scale(.85); opacity: .7; } }
.coin { position: absolute; z-index: 1; width: var(--s, 40px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 900 calc(var(--s, 40px) * .5)/1 var(--round); color: #7D5E14; background: radial-gradient(circle at 35% 30%, #FFF2B8, #E9C452 40%, #B38A26); box-shadow: inset 0 0 0 3px rgba(255, 241, 176, .55), inset 0 -3px 6px rgba(120, 85, 10, .5), 0 10px 20px rgba(5, 2, 20, .45); animation: float 7s ease-in-out infinite; }
.coin.front { z-index: 3; }
/* The Solana mark, in the coin's own colour. */
.coin.sol::before { content: ''; width: 52%; aspect-ratio: 397.7 / 311.7; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 397.7 311.7'%3E%3Cpath d='M64.6 237.9c2.4-2.4 5.7-3.8 9.2-3.8h317.4c5.8 0 8.7 7 4.6 11.1l-62.7 62.7c-2.4 2.4-5.7 3.8-9.2 3.8H6.5c-5.8 0-8.7-7-4.6-11.1l62.7-62.7z'/%3E%3Cpath d='M64.6 3.8C67.1 1.4 70.4 0 73.8 0h317.4c5.8 0 8.7 7 4.6 11.1l-62.7 62.7c-2.4 2.4-5.7 3.8-9.2 3.8H6.5c-5.8 0-8.7-7-4.6-11.1L64.6 3.8z'/%3E%3Cpath d='M333.1 120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8 0-8.7 7-4.6 11.1l62.7 62.7c2.4 2.4 5.7 3.8 9.2 3.8h317.4c5.8 0 8.7-7 4.6-11.1l-62.7-62.7z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 397.7 311.7'%3E%3Cpath d='M64.6 237.9c2.4-2.4 5.7-3.8 9.2-3.8h317.4c5.8 0 8.7 7 4.6 11.1l-62.7 62.7c-2.4 2.4-5.7 3.8-9.2 3.8H6.5c-5.8 0-8.7-7-4.6-11.1l62.7-62.7z'/%3E%3Cpath d='M64.6 3.8C67.1 1.4 70.4 0 73.8 0h317.4c5.8 0 8.7 7 4.6 11.1l-62.7 62.7c-2.4 2.4-5.7 3.8-9.2 3.8H6.5c-5.8 0-8.7-7-4.6-11.1L64.6 3.8z'/%3E%3Cpath d='M333.1 120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8 0-8.7 7-4.6 11.1l62.7 62.7c2.4 2.4 5.7 3.8 9.2 3.8h317.4c5.8 0 8.7-7 4.6-11.1l-62.7-62.7z'/%3E%3C/svg%3E") center / contain no-repeat; }
@keyframes float { 50% { transform: translateY(-14px) rotate(10deg); } }
.spark { position: absolute; z-index: 1; color: var(--accent-hi); font-size: var(--s, 16px); line-height: 1; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }

/* ---- search box ---- */
.hero-search { grid-area: search; width: 100%; max-width: 780px; margin: 30px auto 0; }
form { position: relative; padding: 8px; border-radius: var(--radius-card); background: var(--glass); border: 1px solid var(--border-hi); box-shadow: 0 16px 40px rgba(6, 3, 22, .45); transition: border-color .15s, box-shadow .15s; }
form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 175, 55, .16), 0 16px 40px rgba(6, 3, 22, .45); }
textarea { display: block; width: 100%; resize: none; line-height: 1.5; min-height: 76px; padding: 12px 14px; font: 15px var(--mono); border: 0; border-radius: var(--radius); background: transparent; color: var(--text); }
textarea::placeholder { color: #A99FD6; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
textarea:focus-visible { outline: none; }
.form-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.form-row .tools { display: flex; gap: 8px; }
/* The box's buttons all one height, so they sit evenly on its bottom edge. */
.form-row button { height: 46px; min-height: 0; padding-block: 0; }
.form-row button.small { padding: 0 18px; font-size: 15px; }
.form-row button[type='submit'] { margin-left: auto; min-width: 160px; }
#go::after { content: '→'; font-size: 18px; transition: transform .15s; }
#go:hover::after { transform: translateX(3px); }
#go.busy::after { content: none; }
#go .spinner { display: none; }
#go.busy .spinner { display: inline-block; }
.status { margin: 12px 0 0; font-size: 14px; font-weight: 600; text-align: center; }
.status:empty { display: none; }
.status.ok { color: var(--accent); }
.status.warn { color: var(--sky); }
.status.error { color: var(--bad); }
.hint { color: var(--soft); font-size: 14px; margin-top: 12px; text-align: center; }
@media (hover: none) { .keys { display: none; } }
/* A recovery phrase in the box: typed, it gets a warning and blurs; pasted, it never gets in (see app.js). */
textarea.masked { color: transparent; text-shadow: 0 0 9px rgba(244, 244, 244, .75); caret-color: var(--text); }
.phrase-warning { margin-top: 12px; background: var(--card); border: 2px solid var(--bad); border-radius: var(--radius); padding: 14px 16px; }
.phrase-warning strong { display: block; margin-bottom: 6px; color: var(--bad); font-size: 17px; }
.phrase-warning p { color: var(--muted); font-size: 14px; }
dialog.phrase-dialog { width: calc(100% - 32px); max-width: 520px; max-height: calc(100% - 32px); overflow: auto; background: var(--card); color: var(--text); border: 2px solid var(--bad); border-radius: var(--radius-card); padding: 24px; }
dialog.phrase-dialog::backdrop { background: rgba(10, 6, 30, .8); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.phrase-dialog h2 { margin: 0 0 12px; color: var(--bad); font-size: 23px; line-height: 1.2; }
.phrase-dialog ol { padding-left: 22px; margin: 0 0 14px; }
.phrase-dialog li { margin: 6px 0; }
.phrase-dialog button { width: 100%; margin-top: 6px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* Landing-only sections step aside after a search; search-only ones (results heading, safety line) take their place.
   The hero folds into one row: a small monkey beside the search box. On a phone the monkey steps aside too. */
.searched .landing-only, .search-only { display: none; }
.searched .search-only { display: block; }
.searched .results-head.search-only { display: flex; }
.searched .hero { grid-template-columns: 170px minmax(0, 1fr); grid-template-areas: 'stage search'; column-gap: 28px; align-items: center; padding-top: 24px; }
.searched .stage { max-width: 170px; margin: 0 auto; }
.searched .hero-search { max-width: none; margin: 0; }
.searched .vault { border-width: 5px; }
.searched .coin, .searched .spark { display: none; }
.searched .bolt { width: 8px; height: 8px; margin: -4px; }

/* ---- landing sections ---- */
.section { margin-top: 72px; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.about ul { margin: 0; padding-left: 20px; color: var(--muted); }
.about li { margin: 8px 0; }
.rule, .tracker { border-radius: var(--radius-card); padding: 30px; color: var(--muted); }
.rule p, .tracker p { margin: 0 0 10px; }
.rule p:last-child, .tracker p:last-child { margin-bottom: 0; }
.rule { background: linear-gradient(140deg, rgba(127, 196, 217, .2), rgba(127, 196, 217, .05) 60%), var(--bg); border: 1px solid rgba(127, 196, 217, .5); }
.rule h2, .tracker h2 { font-size: clamp(24px, 2.3vw, 30px); }
.rule h2 { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px; color: var(--sky); }
.rule h2 svg { margin-top: .1em; }
.rule p:last-child { color: var(--text); font-weight: 600; }
.tracker { background: var(--glass); border: 1px solid var(--border); }
.tracker h2 { color: var(--text); }
.more-q { margin: 14px 0 0; color: var(--muted); }

/* ---- results ---- */
.results-area { scroll-margin-top: calc(var(--header) + 12px); }
/* At least a screen tall once there are results, so the page can always scroll their top up to the top of the
   screen, and a short result (or the loading placeholders) never pulls the page up from under the reader. */
.searched .results-area { min-height: 100vh; min-height: 100svh; }
.results-head { align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 0; }
.results-head h2 { margin: 0; font-size: 30px; min-width: 0; }
.results-head button { flex: none; }
.results-head h2:focus { outline: none; }
.search-safety { margin: 14px 0 0; padding: 12px 16px 12px 46px; position: relative; background: rgba(127, 196, 217, .1); border: 1px solid rgba(127, 196, 217, .45); color: var(--muted); border-radius: var(--radius); font-size: 14px; }
.search-safety strong { color: var(--text); }
.search-safety svg { position: absolute; left: 16px; top: 14px; color: var(--sky); }
#result { margin-top: 18px; }
.addr-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; width: fit-content; max-width: 100%; margin-bottom: 16px; padding: 6px 8px 6px 16px; border-radius: var(--radius); background: rgba(42, 29, 99, .6); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.addr-line .mono { color: var(--text); font-size: 15px; }
.addr-line a { font-weight: 700; text-decoration: none; padding-right: 8px; }
/* The total: gold, with the monkey in sunglasses beside it. */
.found { position: relative; overflow: hidden; margin-bottom: 18px; padding: 26px 210px 26px 28px; border-radius: var(--radius-card); background: var(--gold); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.found::after { content: ''; position: absolute; right: 30px; top: 26px; width: 140px; height: 140px; border-radius: 50%; background: var(--spot) url('img/monkey-cool.webp') center / cover; box-shadow: 0 0 0 5px rgba(27, 18, 64, .9), 0 14px 30px rgba(27, 18, 64, .3); transform: rotate(6deg); }
.found > * { position: relative; }
.found .big { font: 800 clamp(40px, 6vw, 64px)/1.05 var(--round); letter-spacing: -2px; margin: 4px 0; }
.found .note { color: var(--accent-ink); opacity: .82; margin-top: 8px; font-size: 14px; }
.found.compact { padding: 16px 18px; border-radius: var(--radius-card); box-shadow: none; }
.found.compact::after { content: none; }
.found.compact .big { font-size: 30px; letter-spacing: -.8px; }
.jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
button.jump { min-height: 40px; padding: 6px 14px; font: 700 14px system-ui, sans-serif; background: rgba(27, 18, 64, .1); color: var(--accent-ink); border: 1px solid rgba(27, 18, 64, .3); border-radius: 999px; box-shadow: none; }
button.jump:hover { background: rgba(27, 18, 64, .2); filter: none; box-shadow: none; }
.card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px; }
.card.protocol { position: relative; margin-top: 16px; scroll-margin-top: calc(var(--header) + 12px); transition: border-color .15s; }
.card.protocol:hover { border-color: var(--border-hi); }
.protocol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.protocol-head h3 { margin: 0; font: 800 22px/1.25 var(--round); letter-spacing: -.3px; color: var(--accent); }
.protocol-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.protocol-amount { text-align: right; flex: none; }
.protocol-amount strong { display: block; font: 800 28px/1.1 var(--round); letter-spacing: -.6px; }
.protocol-amount span { color: var(--muted); font-size: 13px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--sky); background: rgba(127, 196, 217, .12); box-shadow: inset 0 0 0 1px rgba(127, 196, 217, .45); }
.tag.tag-hidden { color: var(--accent-ink); background: var(--gold); }
.tag.tag-elsewhere { color: var(--muted); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--edge); }
.tag.tag-partly { color: var(--accent); background: rgba(212, 175, 55, .1); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .55); }
.tag.tag-quiet { color: var(--soft); background: none; box-shadow: inset 0 0 0 1px var(--line); }
.group-head { margin: 36px 0 6px; padding-top: 22px; border-top: 1px solid var(--line); }
.group-head h3 { margin: 0 0 4px; font: 800 19px var(--round); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid rgba(59, 44, 128, .9); vertical-align: top; }
th { padding-bottom: 8px; border-top: 0; color: var(--soft); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
th.num, td.num { text-align: right; white-space: nowrap; }
td.num:last-child { font-weight: 700; }
tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.how { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: rgba(19, 12, 48, .5); border: 1px solid rgba(59, 44, 128, .9); font-size: 14px; }
.how strong { color: var(--accent); }
.how-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.how-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border: 1px solid rgba(122, 75, 216, .8); border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; transition: border-color .15s, background-color .15s; }
.how-links a:hover { border-color: var(--accent); background: rgba(212, 175, 55, .08); }
.empty { color: var(--text); font-weight: 700; font-size: 17px; }
.empty-card { display: flex; align-items: center; gap: 20px; }
.empty-card img { width: 84px; height: 84px; flex: none; border-radius: 50%; background: var(--spot); object-fit: cover; box-shadow: 0 0 0 4px var(--accent); }
.empty-card p:last-child { margin-bottom: 0; }
.live-line { margin: 16px 4px 0; }

/* One-step withdrawal, and the wallet steps recover.js draws inside its panel. */
.recover { margin-top: 16px; padding: 18px; border-radius: var(--radius); font-size: 14px; background: linear-gradient(135deg, rgba(212, 175, 55, .12), rgba(212, 175, 55, .04)); border: 1px solid rgba(212, 175, 55, .5); }
.recover p { margin-bottom: 12px; }
.recover-panel:empty { display: none; }
.recover-panel > :last-child { margin-bottom: 0; }
.recover-panel ol { list-style: none; counter-reset: step; padding: 0; margin: 0 0 12px; }
.recover-panel ol li { counter-increment: step; position: relative; padding: 9px 0 9px 38px; border-top: 1px solid var(--line); }
.recover-panel ol li::before { content: counter(step); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--accent-ink); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.recover-panel ul { list-style: none; padding: 0; margin: 0 0 10px; }
.recover-panel ul:empty { display: none; }
.recover-panel ul li { position: relative; padding-left: 26px; margin: 6px 0; }
.recover-panel ul li::before { content: '✓'; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.wallets { display: flex; gap: 10px; flex-wrap: wrap; }

/* Several wallets at once: one row each, those with money first and open. */
details.address { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--glass); }
details.address[open] { border-color: var(--border-hi); }
details.address > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 18px; cursor: pointer; font-weight: 700; border-radius: var(--radius-card); }
details.address > summary::-webkit-details-marker { display: none; }
details.address > summary::before { content: ''; width: 8px; height: 8px; flex: none; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; }
details.address[open] > summary::before { transform: rotate(45deg); }
details.address > summary:hover { background: rgba(255, 255, 255, .03); }
.sum-amount { margin-left: auto; color: var(--accent); text-align: right; font: 800 17px var(--round); }
.sum-amount.none { color: var(--muted); font: 400 15px system-ui, sans-serif; }
details.address .address-body { padding: 0 18px 18px; }
details.address .address-body .card { border: 0; padding: 0; background: transparent; }
details.address .address-body .card.protocol { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); border-radius: 0; }

.card.friends { margin-top: 24px; border-color: rgba(212, 175, 55, .7); }
.card.friends h2 { margin: 0 0 8px; font-size: 26px; }
.friend-list { list-style: none; padding: 0; margin: 12px 0; }
.friend-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.friend-info { flex: 1 1 260px; min-width: 0; }
.friend-info a { font-weight: 600; }
.friend-actions { display: flex; gap: 8px; }
.friend-list .funded { color: var(--accent); }

/* ---- FAQ ---- */
.page-narrow { max-width: 860px; }
.page-narrow .page-hero { grid-template-columns: minmax(0, 1fr) 220px; padding-bottom: 28px; }
.page-narrow .page-hero .stage { max-width: 220px; }
/* Each question a closed card; its coin's + turns into an x when open. */
.qa { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-card); margin-bottom: 12px; transition: border-color .15s, box-shadow .15s; }
.qa:hover { border-color: var(--border-hi); }
.qa[open] { border-color: rgba(212, 175, 55, .6); }
.qa > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px 18px 26px; cursor: pointer; border-radius: var(--radius-card); }
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary h2 { margin: 0; font-size: 20px; letter-spacing: -.3px; color: var(--text); transition: color .15s; }
.qa > summary:hover h2, .qa[open] > summary h2 { color: var(--accent); }
.qa > summary::after, .src-group > summary::after { content: '+'; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 900 24px/1 var(--round); color: #7D5E14; background: var(--gold); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 4px 14px rgba(212, 175, 55, .3); transition: transform .2s; }
.qa[open] > summary::after, .src-group[open] > summary::after { transform: rotate(45deg); }
.qa-body { padding: 0 26px 22px; }
.qa p { margin: 0 0 10px; color: var(--muted); font-size: 17px; }
.qa p:last-child { margin-bottom: 0; }
@supports (interpolate-size: allow-keywords) {
  .qa { interpolate-size: allow-keywords; }
  .qa::details-content { block-size: 0; overflow: hidden; transition: block-size .25s ease, content-visibility .25s allow-discrete; }
  .qa[open]::details-content { block-size: auto; }
}

/* ---- sources page ---- */
.page-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 48px; padding: 40px 0 8px; }
.page-hero h1 { margin-top: 18px; }
.page-hero .lede { margin: 0 0 24px; }
.page-hero .stage { grid-area: auto; max-width: 300px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.src-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.tile { padding: 20px 22px; border-radius: var(--radius-card); background: var(--glass); border: 1px solid var(--border); }
.tile .stat-value { font-size: clamp(26px, 2.6vw, 34px); }
.tile .stat-label { max-width: none; }
.checked-line { margin: 14px 2px 0; color: var(--soft); font-size: 14px; }
.src-controls { position: sticky; top: var(--header); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; padding: 14px 0 16px; background: linear-gradient(180deg, var(--bg) 78%, rgba(27, 18, 64, 0)); }
.filter-input { flex: 1 1 220px; height: 46px; padding: 0 16px 0 44px; line-height: normal; -webkit-appearance: none; appearance: none; border-radius: var(--radius); border: 1px solid var(--border-hi); background: rgba(42, 29, 99, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23B3AAD8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M12.5 12.5 17 17'/%3E%3C/svg%3E") 15px center no-repeat; color: var(--text); font: 15px system-ui, sans-serif; }
.filter-input::placeholder { color: #A99FD6; }
.filter-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 175, 55, .16); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
button.pill { min-height: 40px; padding: 6px 14px; border-radius: 999px; font: 700 14px system-ui, sans-serif; background: rgba(42, 29, 99, .85); color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
button.pill:hover { color: var(--text); border-color: var(--edge); filter: none; box-shadow: none; }
button.pill[aria-pressed='true'] { background: var(--gold); color: var(--accent-ink); border-color: transparent; }
.pill .n { margin-left: 4px; font-weight: 600; opacity: .7; }
/* Its own arrow, set in from the right edge like the text is from the left. */
.sort { height: 40px; padding: 0 38px 0 14px; border-radius: var(--radius); border: 1px solid var(--line); -webkit-appearance: none; appearance: none; cursor: pointer; background: rgba(42, 29, 99, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23CFC8EA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") right 14px center no-repeat; color: var(--text); font: 600 14px system-ui, sans-serif; }
.sort:hover { border-color: var(--edge); }
.src-count-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.src-count { margin: 0 2px; color: var(--soft); font-size: 14px; }
/* Each group a bar, closed until opened: its name, how many sources and what they hold, and the coin toggle. */
#src-list { margin-top: 20px; }
.src-group { margin-top: 12px; }
.src-group > summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 16px 20px 16px 24px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--glass); cursor: pointer; transition: border-color .15s; }
.src-group > summary::-webkit-details-marker { display: none; }
.src-group > summary:hover { border-color: var(--border-hi); }
.src-group[open] > summary { border-color: rgba(212, 175, 55, .6); margin-bottom: 14px; }
.src-group-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.src-group-title h2 { margin: 0; font-size: 22px; letter-spacing: -.3px; }
.src-group-title span { margin-left: auto; color: var(--soft); font-size: 14px; white-space: nowrap; }
.src-group > summary:hover h2, .src-group[open] > summary h2 { color: var(--accent); }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.src-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius-card); background: var(--glass); border: 1px solid var(--border); scroll-margin-top: calc(var(--header) + 150px); transition: transform .15s, border-color .15s, box-shadow .15s; }
.src-card:hover { border-color: rgba(212, 175, 55, .55); }
.src-card.picked { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 175, 55, .2); }
.src-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.src-card h3 { margin: 0; font: 800 18px/1.3 var(--round); }
.src-amount { flex: none; text-align: right; }
.src-amount strong { display: block; font: 800 20px/1.15 var(--round); color: var(--accent); }
.src-amount span { color: var(--soft); font-size: 12.5px; }
.src-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.src-card .what { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.src-card:has(details[open]) .what { display: block; }
.src-card details { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.src-card summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 36px; cursor: pointer; color: var(--accent); font-weight: 700; font-size: 14px; }
.src-card summary::-webkit-details-marker { display: none; }
.src-card summary::after { content: '+'; font-size: 20px; line-height: 1; }
.src-card details[open] summary::after { content: '−'; }
.src-card details p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.src-empty { padding: 48px 20px; text-align: center; color: var(--muted); }

/* ---- the game (/game; the front page's monkey links to it, mouse and touch only) ---- */
.ape-link { cursor: pointer; }
/* The whole vault, monkey and all, is the link. */
.ape-link::after { content: ''; position: absolute; inset: 0; z-index: 4; border-radius: 50%; }
.ape-link .ape { transition: filter .2s; }
.ape-link:hover .ape { filter: drop-shadow(0 22px 26px rgba(5, 2, 20, .55)) brightness(1.08); }
.searched .ape-link { pointer-events: none; }
/* The page is the game: the header (and its 1px border), then the board as big as fits under it, nothing else and no
   scrolling. */
body.game-only { height: 100svh; overflow: hidden; }
.game-page { height: calc(100svh - var(--header) - 1px); max-width: none; padding: 10px; display: grid; place-items: center; text-align: center; }
.game-board { position: relative; width: min(100%, calc((100svh - var(--header) - 21px) * 576 / 818)); touch-action: none; }
.game-board canvas { display: block; width: 100%; height: auto; aspect-ratio: 576 / 818; border: 1px solid var(--border-hi); border-radius: var(--radius-card); background: var(--bg-deep); }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px; border-radius: var(--radius-card); background: rgba(19, 12, 48, .82); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.game-overlay h1 { margin: 0 0 8px; font-size: clamp(28px, 4.2vw, 40px); }
.game-overlay p { max-width: 400px; color: var(--muted); }
.game-overlay .game-sub { color: var(--text); font-size: 17px; }
#overlay-help { font-size: 14.5px; }
.game-overlay button { min-width: 180px; margin: 10px 0 14px; }
/* How to move: keys on a computer, a swipe on a touch screen (one with no mouse). */
.game-keys { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--soft); font-size: 14px; }
.keys-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .keys-board { display: none; }
  .keys-touch { display: flex; }
}
.keycaps { display: grid; grid-template-columns: repeat(3, 28px); grid-template-areas: '. up .' 'left down right'; gap: 3px; }
.keycaps kbd { display: grid; place-items: center; height: 26px; border-radius: 6px; font: 800 12.5px var(--round); color: var(--text); background: linear-gradient(180deg, #3D2D86, #2A1D63); border: 1px solid var(--border-hi); border-bottom-width: 3px; }
.keycaps .k-up { grid-area: up; }
.keycaps .k-left { grid-area: left; }
.keycaps .k-down { grid-area: down; }
.keycaps .k-right { grid-area: right; }
.keys-or { color: var(--soft); }
/* A finger tip sliding up, right, down and left in turn over a faint four-way arrow. */
.swipe { position: relative; width: 48px; height: 48px; flex: none; color: rgba(207, 200, 234, .35); }
.swipe svg { display: block; }
.swipe i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 0 5px rgba(240, 207, 90, .22); animation: swipe 4s ease-in-out infinite; }
@keyframes swipe {
  0%, 25%, 50%, 75%, 100% { transform: none; opacity: 0; }
  4%, 29%, 54%, 79% { transform: none; opacity: 1; }
  20% { transform: translateY(-17px); opacity: 0; }
  45% { transform: translateX(17px); opacity: 0; }
  70% { transform: translateY(17px); opacity: 0; }
  95% { transform: translateX(-17px); opacity: 0; }
}
/* Above the start and end panels too, so the sound can be turned off at any time. */
.game-mute { position: absolute; z-index: 2; top: 1.2%; right: 1.6%; width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 999px; background: rgba(19, 12, 48, .7); color: var(--muted); border: 1px solid var(--border-hi); box-shadow: none; }
.game-mute:hover { color: var(--accent); border-color: var(--accent); filter: none; box-shadow: none; }
.game-mute .off, .game-mute[aria-pressed='true'] .on { display: none; }
.game-mute[aria-pressed='true'] .off { display: block; }

/* ---- smaller screens ---- */
/* A laptop screen: a smaller headline and vault, so the monkey still fits under the search box without scrolling. */
@media (min-width: 981px) and (max-height: 960px) {
  .hero { padding-top: 26px; }
  .hero h1 { font-size: 54px; margin: 6px 0 10px; }
  .stage { max-width: 340px; margin-top: 22px; }
  .hero-search { margin-top: 22px; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: 'copy copy' 'search search' 'stage stage' 'a c' 'b d'; column-gap: 16px; }
  .stage { max-width: 380px; margin-top: 28px; }
  .stat { margin-top: 18px; padding: 18px 20px; border-radius: var(--radius-card); background: var(--glass); border: 1px solid var(--border); }
  .stat-a, .stat-b, .stat-c, .stat-d { align-self: stretch; }
  .stat-a, .stat-b { text-align: left; }
  .stat-a .stat-label, .stat-b .stat-label, .stat-a .skeleton, .stat-b .skeleton { margin-left: 0; }
  .coverage > p { justify-self: start; }
  .duo { grid-template-columns: 1fr; }
  .page-hero { grid-template-columns: 1fr; gap: 8px; }
  .page-hero .stage { max-width: 260px; grid-row: 1; }
  .src-controls { position: static; }
  .src-stats { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .searched .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'search'; padding-top: 16px; }
  .searched .stage { display: none; }
}
@media (max-width: 640px) {
  .x-lead { display: none; }
  .found { padding: 22px 20px; }
  .found::after { width: 76px; height: 76px; right: 16px; top: 16px; box-shadow: 0 0 0 4px rgba(27, 18, 64, .9); }
  .found > div:first-child { padding-right: 84px; }
}
@media (max-width: 560px) {
  :root { --header: 60px; }
  .top-inner { padding: 0 14px; gap: 8px; }
  .brand { font-size: 19px; }
  .nav { padding: 8px 10px; }
  .x-handle { display: none; }
  main { padding: 0 14px 24px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .hero { padding-top: 24px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'search' 'stage' 'a' 'b' 'c' 'd'; }
  .stat { margin-top: 12px; }
  .lede { font-size: 17px; }
  .form-row button[type='submit'] { min-width: 0; flex: 1; }
  .results-head h2 { font-size: 24px; }
  .section { margin-top: 72px; }
  .protocol-head h3 { font-size: 20px; }
  .protocol-amount strong { font-size: 22px; }
  .recover button:not(.small) { width: 100%; }
  .src-stats { gap: 10px; }
  .tile { padding: 14px; }
  .tile .stat-value { font-size: 22px; letter-spacing: -.6px; }
  .src-grid { grid-template-columns: 1fr; }
  .src-group > summary { padding: 14px 16px 14px 18px; }
  .src-group-title h2 { font-size: 19px; }
  .src-group-title span { margin-left: 0; }
  /* Tables turn into one block per position: name across the top, the two amounts side by side under it. */
  table.rows thead { display: none; }
  table.rows, table.rows tbody, table.rows td { display: block; }
  table.rows tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  table.rows td { border: 0; padding: 0; }
  table.rows td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.rows td:first-child .note { font-weight: 400; }
  table.rows td.num { white-space: normal; text-align: left; }
  table.rows td.num:last-child { text-align: right; }
  table.rows td.num::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  tbody tr:hover td { background: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .qa::details-content { transition: none !important; }
  .swipe i { animation: none !important; }
  .spinner, .loading::before, .recover-panel p.muted::before { animation: turn 1.5s linear infinite !important; }
  .skeleton { animation: none !important; }
}

/* The thank-you line above How this works. */
.shoutout { padding-top: 0; padding-bottom: 0; }
.shoutout p { margin: 0 auto; max-width: 640px; text-align: center; font-weight: 700; color: var(--accent-hi); }
.shoutout a { text-decoration: underline; }
