/* BumbleBeam UI components: the pool's styles.css (the reference look, shared with the explorer)
   with every accent literal replaced by var(--accent) / rgba(var(--accent-rgb), a), so it follows the
   chain. Needs tokens.css and base.css first. What only one site needs stays in that site's CSS
   (beam/pool/web/styles.css, beam/explorer/web/explorer.css). Showcase: ui/showcase/index.html. */

/* ---- header ---- */
.top { padding: 0 var(--page-padding-x); }
.top-row {
  max-width: var(--page-width); margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 24px;
}

/* One header for the pool and the explorer (it has no Start mining). Two rows, on the content's
   width: the logo, the search between, Start mining at the right end; under them BEAM's price,
   starting under the B of BumbleBeam, and the menu at the right end. */
.top-row {
  height: auto; padding: 14px 0 2px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search cta" "price nav nav";
  align-items: center; column-gap: clamp(16px, 4vw, 56px); row-gap: 4px;
}
.top-row:not(:has(.cta-top)) { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand search" "price nav"; }
.top-row .brand { grid-area: brand; }
.top-row .search { grid-area: search; }
.top-row .cta-top { grid-area: cta; display: inline-flex; font: 700 13px var(--font-sans); text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; padding: 8px 14px; }

/* the logo is 42px and 11px from the word */
/* right under the word, not centred on the menu's taller row */
.top-row .price-chip { grid-area: price; justify-self: start; align-self: start; margin: -6px 0 0 53px; }
.top-row .main-nav { grid-area: nav; justify-self: end; margin-left: 0; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a.nav-cta { display: none; }

/* phones: the logo and Start mining, then the price and the search, then the menu across */
@media (max-width: 820px) {
  .top-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand brand cta" "price search search" "nav nav nav"; column-gap: 10px; row-gap: 10px; padding-top: 12px; }
  .top-row:not(:has(.cta-top)) { grid-template-areas: "brand brand brand" "price search search" "nav nav nav"; }
  .top-row .cta-top { justify-self: end; padding: 6px 10px; font-size: 11px; }
  .top-row .price-chip { margin: 0; align-self: center; }
  /* no keyboard to press / on a phone: the room goes to the placeholder */
.search kbd { display: none; }
  .search { gap: 6px; padding: 0 8px 0 10px; }
  .top-row .price-chip { padding: 5px 8px; }
  .top-row .main-nav { justify-self: stretch; justify-content: space-between; }
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); }
.brand b { font-weight: 700; background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { width: 42px; height: 42px; overflow: visible; }

/* Logo animation, in the Beam Explorer's manner (soft opacity pulses, 1.5 s), plus the bee: wings
   flutter, the body bobs, the light trail streams. Everything stops under prefers-reduced-motion. */
.logo .hex { filter: drop-shadow(0 0 0 rgba(var(--accent-rgb), 0)); animation: logo-glow 3s ease-in-out infinite; }
.logo .bee { animation: logo-bob 3s ease-in-out infinite; }
.logo .wing { transform-box: fill-box; transform-origin: 50% 100%; animation: logo-flutter .22s ease-in-out infinite alternate; }
.logo .wr { animation-delay: -.11s; }
.logo .trail path { animation: logo-trail 1.5s ease-in-out infinite; }
.logo .trail .t2 { animation-delay: -.5s; }
.logo .eye { animation: logo-blink 4s steps(1) infinite; }
@keyframes logo-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(var(--accent-rgb), 0)); } 50% { filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .55)); } }
@keyframes logo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.9px); } }
@keyframes logo-flutter { from { transform: rotate(-9deg) scaleY(.92); } to { transform: rotate(9deg) scaleY(1.05); } }
@keyframes logo-trail { 0%, 100% { stroke-opacity: .25; transform: translateX(1.2px); } 50% { stroke-opacity: .85; transform: translateX(-1px); } }
@keyframes logo-blink { 0%, 93%, 100% { opacity: 1; } 95%, 98% { opacity: 0; } }
.brand:hover .logo .wing { animation-duration: .14s; }
@media (prefers-reduced-motion: reduce) {
  .logo .hex, .logo .bee, .logo .wing, .logo .trail path, .logo .eye { animation: none; }
  .logo .trail path { stroke-opacity: .6; }
}
.search {
  flex: 0 1 380px; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 8px 0 12px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
}
.search:focus-within { border-color: rgba(var(--accent-rgb), 0.5); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: 13px var(--font-sans); }
.search input::placeholder { color: var(--muted); }
.search kbd { font: 10px var(--font-mono); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 2px 5px; }
.main-nav { margin-left: auto; display: flex; gap: 6px; }
.main-nav a {
  color: var(--text-dim); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 8px 12px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
/* opt-in: quiet tabs, a second row under the main ones (a page's own choice: a network, a direction): smaller, the
   chosen one underlined as the main tabs are; an .end button sits at the right (a swap ⇄) */
.subtabs { display: flex; align-items: flex-end; gap: 22px; border-bottom: 1px solid var(--border-dim); }
.subtabs button { padding: 4px 0 7px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  font: 700 11px var(--font-mono); letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.subtabs button:hover { color: var(--text); }
.subtabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.subtabs button.end { margin-left: auto; padding-left: 6px; padding-right: 2px; font-size: 14px; letter-spacing: 0; border-bottom-color: transparent; }
.subtabs button.end:hover { color: var(--accent); }

/* "Start mining" sits in the menu as a button, not a tab */
.main-nav a.nav-cta {
  margin-left: 6px; align-self: center; padding: 7px 12px; border: 1px solid rgba(var(--accent-rgb), 0.6); border-radius: 6px;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.06);
}
.main-nav a.nav-cta:hover { background: var(--accent-dim); color: var(--accent); }
.price-chip {
  flex: none; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); cursor: default;
  font: 700 11px var(--font-mono); letter-spacing: 0.04em; color: var(--muted); white-space: nowrap;
  cursor: help;
}

/* the value has a fixed room that holds "loading…" and the price alike, so the chip keeps one width while
   it loads; the text sits in the middle of it. The chip's left edge is fixed under the brand word. */
.price-chip b { display: inline-block; width: 8.5ch; text-align: center; white-space: nowrap; color: var(--accent); letter-spacing: 0.02em; }
/* the footer's status pill tells more in its tip. Its text has a fixed room (each site sets --status-room to
   its longest usual text, "connecting…" fits), so the pill keeps one width while it connects; the text starts
   by the dot, where the loaded text starts too */
.foot .pill-status { cursor: help; }
.foot .pill-status > span { display: inline-block; min-width: var(--status-room, 21ch); text-align: left; }
.cta-top.active { background: rgba(var(--accent-rgb), 0.15); }
.main-nav a.nav-cta.active { background: rgba(var(--accent-rgb), 0.15); border-bottom-color: rgba(var(--accent-rgb), 0.6); }
.demo-banner {
  box-sizing: border-box; width: calc(100% - 2 * var(--page-padding-x));
  max-width: var(--page-width); margin: 14px auto 0; padding: 10px 14px;
  font-size: 12px; color: var(--text-dim);
  border: 1px solid rgba(var(--yellow-rgb), 0.35); background: rgba(var(--yellow-rgb), 0.07); border-radius: 6px;
}
.demo-banner b { color: var(--color-yellow); }
.top, .demo-banner, .foot { flex: none; }
.foot { width: 100%; }

/* fixed heights, so titles and panels sit at the same place whether or not a button is beside them */
.page-head { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; min-height: 34px; }
.page-title { font: 700 13px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }
.panel {
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-dim); border-radius: 8px;
  padding: 16px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; min-height: 24px; }
.panel-title { font: 700 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.panel-meta { margin-left: auto; font: 11px var(--font-mono); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.panel-meta b { color: var(--text); font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 700 12px var(--font-mono); color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06); border: 1px solid rgba(var(--accent-rgb), 0.6); border-radius: 6px; padding: 8px 14px;
}
.btn:hover { background: var(--accent-dim); text-decoration: none; }
.btn.ghost { color: var(--text-dim); border-color: var(--border); background: transparent; }
.btn.small { padding: 4px 8px; font-size: 11px; }


/* stat tiles */
/* columns of one width, the widest tile's content (--tile-w, measured by sizeTiles in app.js):
   a row takes as many as fit, a tile on the next row keeps the width, no tile breaks its words */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-w, 200px), 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.tiles.measuring { display: block; }
.tiles.measuring > .tile { display: inline-block; width: max-content; }
.tile { min-width: 0; background: var(--surface); border: 1px solid var(--border-dim); border-radius: 8px; padding: 14px 16px; }
.tile .k { font: 700 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tile .v { font: 700 22px var(--font-mono); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* a value too long for its tile wraps instead of being cut off with an ellipsis */
.tile .v, .tile .v .amt { white-space: normal; text-overflow: clip; }
.tile .s { font: 11px var(--font-mono); color: var(--muted); margin-top: 4px; white-space: nowrap; }
.tile .v.accent { color: var(--accent); }


/* tables */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
th {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--border-dim); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.num { text-align: right; }

/* badges and short values centred in their columns: Mode, Effort, Reward */
.mid { text-align: center; }
.dim { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.name { color: var(--accent); font-weight: 700; }
.sub { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.dot.off { background: var(--muted2); box-shadow: none; }
.bar { height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; margin-top: 6px; width: 100%; max-width: 300px; }
.bar > i { display: block; height: 100%; border-radius: 2px; background: var(--color-yellow); }
.bar.accent > i { background: var(--accent); }
.badge { display: inline-block; font: 700 10px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; }
.badge.ok { color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }
.badge.pending { color: var(--color-yellow); background: rgba(var(--yellow-rgb), 0.1); }
.badge.bad { color: var(--color-red); background: rgba(var(--red-rgb), 0.12); }
.badge.solo { color: var(--color-purple); background: rgba(var(--purple-rgb), 0.12); }
.badge.info { color: var(--color-blue); background: rgba(11, 204, 247, 0.12); }      /* opt-in: a neutral state (the wallet's maturing coins) */

/* a block our pool found: its height as a badge, in the explorer and the pool's network page */
.badge.ours-h { font-size: 11px; letter-spacing: 0.02em; line-height: 1.2; padding: 1px 6px; margin: -2px 0 -2px -6px; text-decoration: none; }
.badge.ours-h:hover { background: rgba(var(--accent-rgb), 0.2); }
.spark { width: 90px; height: 22px; flex: none; }


/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 9.5px var(--font-sans); fill: rgba(255, 255, 255, 0.6); }
.chart text.pill-text { font: 700 9.5px var(--font-mono); fill: var(--bg); }
.chart .grid { stroke: rgba(255, 255, 255, 0.06); }
.chart .now { stroke: var(--accent); stroke-opacity: 0.75; stroke-dasharray: 2 3; }
.chart text.peak-text { font: 700 9.5px var(--font-mono); fill: var(--muted); }
.legend { display: flex; gap: 16px; font: 11px var(--font-mono); color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid2 > .panel { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }


/* small pieces */
.hint { margin: -4px 0 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.more { display: flex; justify-content: center; padding: 14px 0 2px; }
.more[hidden] { display: none; }
.note { margin-top: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; border-radius: 6px; border: 1px solid var(--border); color: var(--text-dim); }
.note.warn { border-color: rgba(var(--yellow-rgb), 0.35); background: rgba(var(--yellow-rgb), 0.07); }
.note.ok { border-color: rgba(var(--accent-rgb), 0.3); background: rgba(var(--accent-rgb), 0.06); }
.step .row { margin-top: 10px; }


/* connect page */
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { position: relative; padding-left: 40px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 700 12px var(--font-mono); color: var(--bg); background: var(--gradient-accent);
}
.step h3 { margin: 3px 0 8px; font-size: 14px; }
.step p { margin: 0 0 8px; color: var(--text-dim); line-height: 1.5; }
.code {
  position: relative; display: flex; align-items: flex-start; gap: 8px;
  background: var(--surface3); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px;
  font: 12px var(--font-mono); color: var(--text-dim); overflow-x: auto;
}
.code pre { margin: 0; flex: 1; white-space: pre; }
.code .btn { flex: none; }

/* phones: commands wrap instead of hiding behind a sideways scroll, copy goes under them */
@media (max-width: 480px) {
  .code { flex-wrap: wrap; justify-content: flex-end; }
  .code pre { flex-basis: 100%; white-space: pre-wrap; }
}

/* thumb-sized range switch on touch screens */
@media (pointer: coarse) {
  .seg.range button { padding: 8px 12px; }
}
.seg { display: inline-flex; gap: 4px; }
.seg button, .pill {
  font: 700 11px var(--font-mono); letter-spacing: 0.02em; padding: 5px 10px; cursor: pointer;
  color: var(--text-dim); background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px;
}
.seg button:hover, .pill:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.seg button.on, .pill.on { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.15); }
.pill { cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; font: 700 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input {
  height: 36px; padding: 0 10px; color: var(--text); font: 13px var(--font-mono); text-transform: none; letter-spacing: 0;
  background: var(--field-fill); border: 1px solid var(--border); border-radius: 6px; color-scheme: dark;
}
.field input:focus { border-color: rgba(var(--accent-rgb), 0.5); outline: none; }

/* the card list (a listbox in place of a native select): one opaque fill for the button and the
   open list, so that, opened, they read as one shape: the button's bottom corners square, the
   list's round */
.dd { position: relative; min-width: 190px; }
.dd-btn {
  width: 100%; height: 36px; padding: 0 30px 0 10px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); font: 13px var(--font-mono); text-transform: none; letter-spacing: 0;
  background: var(--field-fill);
  border: 1px solid var(--border); border-radius: 6px;
}
.dd-btn:focus-visible { outline: none; border-color: rgba(var(--accent-rgb), 0.5); }
.dd.open .dd-btn {
  border-color: rgba(var(--accent-rgb), 0.5); border-bottom-color: transparent; border-radius: 6px 6px 0 0;
}
.dd-list {
  position: absolute; left: 0; right: 0; top: calc(100% - 1px); z-index: 30; margin: 0; padding: 2px 0 6px; list-style: none;
  max-height: 300px; overflow-y: auto; color-scheme: dark;
  background: var(--field-fill); border: 1px solid rgba(var(--accent-rgb), 0.5); border-top: 0; border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  /* the shadow only below and beside: above, it fell on the button and drew a seam */
  clip-path: inset(0 -40px -40px -40px);
}
.dd-list [role="option"] { padding: 7px 10px 7px 20px; font: 13px var(--font-mono); text-transform: none; letter-spacing: 0; color: var(--text-dim); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }      /* a name longer than the list: cut with …, not mid-letter */

/* a compact list for table filters in a panel head */
.dd-list [role="option"][aria-disabled="true"] { color: var(--muted); opacity: 0.6; cursor: default; }
.dd.compact { min-width: 130px; }
.dd.compact .dd-btn { height: 28px; font-size: 12px; }
.dd.compact .dd-list [role="option"] { padding: 6px 10px 6px 14px; font-size: 12px; }

/* sortable table heads: the active one shows its direction */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable[data-dir]:not([data-dir=""])::after { content: " " attr(data-dir); color: var(--accent); }
.dd-list [role="option"].active { background: rgba(var(--accent-rgb), 0.12); color: var(--text); }
.dd-list [role="option"][aria-selected="true"] { color: var(--accent); }
/* opt-in: a thin line between groups of a list ({ sep: true } in BB.dropdown) */
.dd-list .dd-sep { height: 1px; margin: 4px 10px; background: var(--border); list-style: none; }

/* scrolling boxes (wide tables, code, the card list): a thin accent bar, no track, no arrows */
.dd-list::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .code pre::-webkit-scrollbar, .doc-obj::-webkit-scrollbar { width: 4px; height: 4px; }
.dd-list::-webkit-scrollbar-track, .dd-list::-webkit-scrollbar-corner,
.table-wrap::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-corner,
.code pre::-webkit-scrollbar-track, .code pre::-webkit-scrollbar-corner,
.doc-obj::-webkit-scrollbar-track, .doc-obj::-webkit-scrollbar-corner { background: transparent; }
.dd-list::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .code pre::-webkit-scrollbar-thumb, .doc-obj::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.45); border-radius: 2px; }
.table-wrap::-webkit-scrollbar-thumb:hover, .code pre::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.7); }
.dd-list::-webkit-scrollbar-button, .table-wrap::-webkit-scrollbar-button, .code pre::-webkit-scrollbar-button, .doc-obj::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports (-moz-appearance: none) {
  .dd-list, .table-wrap, .code pre, .doc-obj { scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb), 0.45) transparent; }
}
.dd-group { padding: 8px 10px 3px; font: 700 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.empty { color: var(--muted); font: 12px var(--font-mono); padding: 24px 0; text-align: center; }
.err { color: var(--color-red); }

/* the 404 page (pool and explorer): the empty honeycomb cell and the bee, 404.svg */
.nf { padding: 28px 16px 30px; }
.nf-art { display: block; width: min(420px, 100%); height: auto; margin: 0 auto 18px; }
.foot {
  max-width: var(--page-width); margin: 0 auto; padding: 2px var(--page-padding-x) 30px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; justify-content: center;
  font: 700 11px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); text-decoration: none; }
.foot .dim { font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--muted2); }
.pill-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px;
  font: 700 11px var(--font-mono); letter-spacing: 0.02em; text-transform: none;
  color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.12);
}
.pill-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.pill-status.demo { color: var(--color-yellow); border-color: rgba(var(--yellow-rgb), 0.5); background: rgba(var(--yellow-rgb), 0.1); }
.pill-status.demo i { background: var(--color-yellow); box-shadow: 0 0 6px var(--color-yellow); }
.pill-status.off { color: var(--color-red); border-color: rgba(var(--red-rgb), 0.5); background: rgba(var(--red-rgb), 0.1); }
.pill-status.off i { background: var(--color-red); box-shadow: 0 0 6px var(--color-red); }

/* the project's social accounts (<bb-socials>, bb.js): a row of small icons, grey until hover, then the network's own
   colour (--c on the link) */
.socials { display: inline-flex; align-items: center; gap: 4px; }
.socials a { display: block; line-height: 0; padding: 5px; border-radius: 8px; color: var(--muted); transition: color .2s, transform .2s; }
.socials a:hover, .socials a:focus-visible { color: var(--c, var(--text)); transform: scale(1.15); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .socials a { transition: none; } }

/* the last line: the copyright, what the pool is, its licence and source */
.foot .foot-copy { flex-basis: 100%; margin: 4px 0 0; text-align: center; font: 400 11px var(--font-mono); letter-spacing: 0.02em; text-transform: none; color: var(--muted2); }
/* the copyright line in parts (3BMiner's way): <span class="fp">…</span><span class="fd d1"> · </span><span class="fp">…</span>
   <span class="fd d2"> · </span><span class="fp">…</span>. A part never breaks inside; on a tablet the last part goes to
   its own line, on a phone every part does, and the dots between them go */
.foot-copy .fp { white-space: nowrap; }
@media (max-width: 820px) { .foot-copy .d2 { display: none; } .foot-copy .fp:last-child { display: block; } }
@media (max-width: 480px) { .foot-copy .d1 { display: none; } .foot-copy .fp { display: block; } }

/* links in running text and quiet links in panel heads ("All blocks"): grey, dotted underline, white on hover */
.text-link, .foot .foot-copy a { font: 400 11px var(--font-mono); letter-spacing: 0.02em; color: var(--muted); text-decoration: underline dotted rgba(255, 255, 255, 0.25); text-underline-offset: 3px; }
.text-link:hover, .foot .foot-copy a:hover { color: var(--text); text-decoration: underline dotted rgba(255, 255, 255, 0.5); }


/* donut + block times, as on the explorer's mining page */
.donut-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 20px 28px; align-items: center; }
.donut { width: 180px; height: 180px; display: block; }
.donut .total { font: 700 26px var(--font-mono); fill: var(--text); }
.donut .sub { font: 10px var(--font-mono); fill: var(--muted); letter-spacing: 0.06em; }

/* one grid for all rows, sized by content: pool, blocks and share stay next to each other */
.legend-rows { display: grid; grid-template-columns: 10px auto auto auto; justify-content: start; align-items: center; gap: 10px 14px; font: 12px var(--font-mono); }
.legend-row { display: contents; }
.legend-row i { width: 10px; height: 10px; border-radius: 2px; display: block; }
.legend-row b { color: var(--text); font-weight: 700; }
.legend-row .n { color: var(--muted); text-align: right; }
.legend-row .p { color: var(--text-dim); text-align: right; }
@media (max-width: 1080px) {
  .grid2 { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
}
@media (max-width: 560px) {
  .main-nav a { padding: 8px 8px; font-size: 12px; }
  .tile .v { font-size: 18px; }
  .panel { padding: 12px; }
  .table-wrap { margin: 0 -12px; padding: 0 12px; }
}


/* grid/flex children must be allowed to shrink below their tables' width; tables scroll inside */
.grid2 > *, .top-row > *, .panel, main, .steps > *, .stack > *, .step > *, .row > * { min-width: 0; }
.code pre { min-width: 0; overflow-x: auto; }
.main-nav { max-width: 100%; }
@media (max-width: 560px) {
  .tiles { gap: 10px; }
  /* two tiles side by side on a phone */
.tile { padding: 12px; }
  .tile .s { font-size: 10.5px; }
  .page-head .btn { padding: 6px 10px; }
  .panel-meta { margin-left: 0; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 3px; font-size: 11px; letter-spacing: 0; }
  .step .field { min-width: 0 !important; flex-basis: 100% !important; }
}


/* chart range switch in panel heads */
.seg.range button { padding: 3px 8px; font-size: 10px; }


/* API page: API.md rendered from GitHub */
.md { font-size: 13px; line-height: 1.6; color: var(--text-dim); }
.md h2, .md h3, .md h4 { color: var(--text); font: 700 12px var(--font-mono); letter-spacing: 0.04em; margin: 26px 0 10px; }
.md h2 { font-size: 15px; margin-top: 4px; }
.md h3 { font-size: 13px; padding-top: 14px; border-top: 1px solid var(--border-dim); }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 0 0 6px; }
.md b { color: var(--text); }
.md code { font: 12px var(--font-mono); color: var(--text); background: rgba(255, 255, 255, 0.06); border-radius: 4px; padding: 1px 4px; }
.md pre { margin: 0 0 14px; padding: 12px 14px; overflow-x: auto; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border-dim); border-radius: 6px; }
.md pre code { background: none; padding: 0; font-size: 11.5px; line-height: 1.55; white-space: pre; }
.md .table-wrap { margin-bottom: 14px; }
.md h3 code { font-size: inherit; color: var(--accent); background: none; padding: 0; }


/* copy buttons keep one width for "copy", "copied" and "failed" (monospace, 7ch), so the text
   next to them does not jump */
.btn[data-copy] { flex: none; justify-content: center; min-width: calc(7ch + 18px); }


/* the product name after the logo: "BumbleBeam Pool", "BumbleBeam Explorer" */
.word .sub-word { font-style: normal; font-weight: 400; color: var(--muted); font-size: 0.8em; margin-left: 4px; }

/* documentation tables wrap their text: no sideways scrolling on the API pages */
.md table td, .md table th { white-space: normal; overflow-wrap: break-word; }

/* code in tables breaks only where the renderer allows it (after / ? & =), never mid-word */
.md table td code { white-space: normal; overflow-wrap: normal; }

/* text with an explanation on hover: only the words, not the whole cell (tips.js moves title to data-tip) */
.tipped { text-decoration: underline dotted rgba(255, 255, 255, 0.35); text-underline-offset: 3px; cursor: help; }


/* tooltips (tips.js): the light end of the page's own gradient, the accent edge, mono text */
.bb-tip {
  position: fixed; z-index: 1000; top: 0; left: 0; max-width: min(300px, calc(100vw - 16px));
  padding: 8px 11px 8px 13px; font: 11px/1.5 var(--font-mono); color: rgba(255, 255, 255, 0.88); letter-spacing: 0.01em;
  text-transform: none; text-align: left; white-space: normal; overflow-wrap: anywhere;
  background: linear-gradient(180deg, rgba(18, 108, 150, 0.97), rgba(10, 90, 128, 0.97));
  border: 1px solid rgba(var(--accent-rgb), 0.32); border-radius: 7px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 3px 0 0 rgba(var(--accent-rgb), 0.55);
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.14s ease, transform 0.14s ease;
}
.bb-tip.below { transform: translateY(-4px); }
/* opt-in (data-tip-wide on the element): up to 360 px, line breaks kept (e.g. a label, then a whole address) */
.bb-tip.wide { max-width: min(360px, calc(100vw - 16px)); white-space: pre-line; }
.bb-tip.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .bb-tip { transition: none; }
}


/* the chart's crosshair (chartHover in app.js), as on the DEX terminal */
.chart { touch-action: pan-y; }
.chart .cross { stroke: rgba(255, 255, 255, 0.35); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart .dot { stroke: var(--bg); stroke-width: 1.5; }
.chart .hv-pill { fill: var(--field-bg); stroke: rgba(255, 255, 255, 0.35); vector-effect: non-scaling-stroke; }
.chart text.hv-text { font: 700 9.5px var(--font-mono); fill: var(--text); }
.chart .hover { pointer-events: none; }


/* a head whose meta is one quiet link ("All blocks") keeps it at the right end on phones too */
.panel-head .panel-meta:has(> a.text-link:only-child) { margin-left: auto; }


/* a table's sideways scrollbar: away from the table's last row and the card's sides, close to the
   card's bottom (it runs in the panel's bottom padding) */
.table-wrap { padding-bottom: 6px; }
.panel > .table-wrap:last-child { margin-bottom: -10px; }
.table-wrap::-webkit-scrollbar-track { margin: 0 10px; }
@media (max-width: 560px) {
  .table-wrap::-webkit-scrollbar-track { margin: 0 8px; }
}


/* ======== additions for the sites that come next (not in the pool's set) ======== */

/* the card list's arrow, in the accent (was a turquoise SVG background) */
.dd-btn { position: relative; }
.dd-btn::after {
  content: ''; position: absolute; right: 11px; top: 50%; width: 10px; height: 6px; margin-top: -3px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center;
}
.dd.open .dd-btn::after { transform: scaleY(-1); }

/* ecosystem bar (<bb-eco>, components/bb.js): one thin line above every site's header */
.eco { padding: 0 var(--page-padding-x); border-bottom: 1px solid var(--border-dim); background: rgba(0, 0, 0, 0.15); }
.eco-row { max-width: var(--page-width); margin: 0 auto; display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; min-height: 30px; font: 700 var(--fs-xs) var(--font-mono); letter-spacing: var(--caps-spacing); text-transform: uppercase; }
.eco-row .eco-home { color: var(--muted); margin-right: auto; }
.eco-row a { color: var(--muted); padding: 7px 0; border-bottom: 2px solid transparent; }
.eco-row a:hover { color: var(--text); text-decoration: none; }
.eco-row a.here { color: var(--text); border-bottom-color: var(--accent); }
.eco-row a i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.eco-row a i.beam { background: var(--color-green); }
.eco-row a i.bitcoin { background: var(--color-orange); }
.eco-row a i.rig { background: var(--muted); }

.btn.solid { color: var(--bg); background: var(--gradient-accent); border-color: transparent; }
/* the gradient spans the border too: under the transparent 1px border it repeated from its far end, a light
   stripe down the button's left edge */
.btn.solid { background-origin: border-box; }
.btn:disabled { opacity: .45; cursor: default; }
.badge.warn { color: var(--color-yellow); background: rgba(var(--yellow-rgb), 0.1); }
.note.warn { border-color: rgba(var(--yellow-rgb), 0.35); background: rgba(var(--yellow-rgb), 0.07); }
.note.bad { border-color: rgba(var(--red-rgb), 0.35); background: rgba(var(--red-rgb), 0.07); }
/* opt-in: a list row or table row that is no good any more (expired, failed), tinted red (stronger than .note.bad: rows lie on a panel), a little
   more under the pointer or when chosen */
.li.bad, tr.bad > td { background: rgba(var(--red-rgb), 0.14); box-shadow: inset 2px 0 0 rgba(var(--red-rgb), 0.8); }
tr.bad > td:not(:first-child) { box-shadow: none; }
.li.bad:hover, .li.bad.on, tr.bad:hover > td { background: rgba(var(--red-rgb), 0.2); }
.field textarea {
  min-height: 72px; padding: 8px 10px; resize: vertical; color: var(--text); font: 13px var(--font-mono); text-transform: none; letter-spacing: 0;
  background: var(--field-fill); border: 1px solid var(--border); border-radius: 6px; color-scheme: dark;
}
.field textarea:focus { border-color: rgba(var(--accent-rgb), 0.5); outline: none; }

/* charts.js extras: a series' min-max band, the donut's hovered slice */
.chart .band { opacity: .18; }
.legend b { color: var(--text); font-weight: 700; margin-left: 6px; }
.donut path { transition: opacity .15s; }
.donut-wrap.hovering .donut path:not(.on) { opacity: .35; }

/* small shared pieces (were the explorer's): a hash or key that may break anywhere, a key-value list,
   signed amounts, no-wrap / wrap, a click-to-copy text, small print */
.hash { font-family: var(--font-mono); word-break: break-all; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font: 12px var(--font-mono); }
.kv dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; padding-top: 2px; }
.kv dd { margin: 0; min-width: 0; word-break: break-all; color: var(--text-dim); }
td .kv { font-size: 11px; gap: 2px 10px; }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.neg { color: var(--color-red); }
.amt.pos { color: var(--accent); }
.nowrap { white-space: nowrap; }
.wrap { white-space: normal; }
.copy { cursor: pointer; }
/* opt-in: a small copy button (two sheets), a green tick for 2 s once copied (the 3BMiner pattern) */
.cp { display: inline-flex; align-items: center; background: none; border: 0; padding: 0; margin: 0; color: var(--muted); cursor: pointer; line-height: 0; }
.cp:hover { color: var(--text-dim); }
.cp.done { color: #34d399; }
.cp svg { width: 12px; height: 12px; }
.copy:hover { color: var(--accent); }
.small { font-size: 10px; }
/* a calculator's results: tiles in a grid (were the pool's) */
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }


/* opt-in: a page's lead paragraph under its title (pool connect page) */
.page-lead { margin: -6px 0 18px; max-width: 820px; font-size: var(--fs-body); line-height: 1.6; color: var(--text-dim); }

/* opt-in: numbered or bulleted instructions in running text, with inline code (pool connect page) */
.howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-dim); line-height: 1.5; }
.howto li::marker { color: var(--muted); font: 700 var(--fs-m) var(--font-mono); }
.howto code, .faq code, .page-lead code {
  font: var(--fs-m) var(--font-mono); color: var(--text); padding: 1px 5px; border-radius: var(--radius-s);
  background: var(--surface3); border: 1px solid var(--border-dim); overflow-wrap: anywhere;
}

/* opt-in: questions that open in place (<details> in .faq) */
.faq details { border-top: 1px solid var(--border-dim); }
.faq details:first-child { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; list-style: none;
  font-size: var(--fs-base); font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 700 var(--fs-base) var(--font-mono); color: var(--muted); }
.faq details[open] summary::after { content: '−'; color: var(--accent); }
.faq summary:hover { color: var(--accent); }
.faq details > div { padding: 0 0 12px; font-size: var(--fs-base); line-height: 1.55; color: var(--text-dim); }
.faq details > div b { color: var(--text); }

/* opt-in: a short message in running text (a result, an error): mono, yellow, no frame (3BMiner's); .bad red */
.msg { margin: 8px 0 0; font: var(--fs-m) var(--font-mono); line-height: 1.5; color: var(--color-yellow); }
.msg.bad { color: var(--color-red); }
.msg:empty { display: none; }
