/* ASIC Board page (loaded after styles.css + calm.css): one accent, neutrals, table on desktop, cards on phones */
.hb { padding: 34px 0 60px; }
.hb-head h1 { margin: 6px 0 10px; }
.hb-head .lede { max-width: 760px; color: var(--muted); }
.hb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.hb-tile { border: 1px solid var(--line-hi); padding: 14px 16px; position: relative; }
.hb-tile::before { content: ""; position: absolute; top: -1px; left: -1px; width: 48px; height: 3px; background: var(--btc); }
.hb-tile small { display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.hb-tile b { display: block; font-family: var(--display); font-size: 20px; color: var(--text); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-tile span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.hb-controls { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, .9fr); gap: 12px; align-items: end; border: 1px solid var(--line-hi); padding: 14px 16px; }
.hb-field { display: grid; gap: 6px; min-width: 0; }
.hb-field > span { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.hb-field input[type="number"], .hb-field input[type="search"], .hb-field select { width: 100%; box-sizing: border-box; background: transparent; color: var(--text); border: 1px solid var(--line-hi); padding: 9px 10px; font: 14px var(--sans, inherit); border-radius: 0; }
.hb-field select option { color: #111; }
.hb-kwh { display: flex; align-items: center; gap: 10px; }
.hb-kwh input[type="range"] { flex: 1; accent-color: var(--btc); min-width: 0; }
.hb-kwh output { font: 600 16px var(--mono); color: var(--btc); min-width: 64px; text-align: right; }
.hb-kwh input[type="number"] { width: 84px; flex: none; }
.hb-coins { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.hb-coins button { font: 600 12px var(--mono); letter-spacing: .04em; padding: 6px 11px; background: transparent; color: var(--text); border: 1px solid var(--line-hi); cursor: pointer; }
.hb-coins button:hover { border-color: var(--btc); }
.hb-coins button[aria-pressed="true"] { background: var(--btc); border-color: var(--btc); color: #1a0d00; }
.hb-count { font-size: 13px; color: var(--dim); margin: 0 0 8px; }

.hb-tablewrap { border: 1px solid var(--line-hi); overflow-x: auto; }
.hb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hb-table th { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); text-align: right; padding: 12px 12px 10px; border-bottom: 1px solid var(--line-hi); white-space: nowrap; position: sticky; top: 0; background: var(--bg); }
.hb-table th:nth-child(-n+3) { text-align: left; }
.hb-table td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.hb-table tbody tr:hover td { background: var(--tint); }
.hb-rank { color: var(--dim); font: 500 12px var(--mono); width: 32px; }
.hb-name { min-width: 200px; }
.hb-name b { display: block; color: var(--text); font-weight: 600; }
.hb-name small, .hb-num small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.hb-coin span { font: 600 11px var(--mono); letter-spacing: .04em; border: 1px solid var(--line-hi); padding: 2px 6px; color: var(--muted); white-space: nowrap; }
.hb-num { text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.hb-profit { color: var(--text); font-weight: 700; }
.hb-table tbody tr:first-child .hb-profit { color: var(--btc); }
/* top 5: one orange outline around the whole block (drawn inside the cells: left/right on every row, top on the first, bottom on the last) */
.hb-table tr.hb-top td:first-child { box-shadow: inset 2px 0 0 var(--btc); }
.hb-table tr.hb-top td:last-child { box-shadow: inset -2px 0 0 var(--btc); }
.hb-table tr.hb-top-first td { border-top: 2px solid var(--btc); }
.hb-table tr.hb-top-last td { border-bottom: 2px solid var(--btc); }
.hb-table tr.hb-top + tr.hb-top td { border-top-color: rgba(255,148,22,.18); }
.hb-table tr.hb-top td { background: rgba(255,148,22,.035); }
.hb-table tr.hb-top .hb-num, .hb-table tr.hb-top .hb-num small, .hb-table tr.hb-top .hb-profit { color: var(--btc); }
.hb-table tr.hb-top .hb-coin span { border-color: rgba(255,148,22,.6); color: var(--btc); }
.hb-loss .hb-profit { color: #ff5a6a; }
.hb-loss td { opacity: .7; }
.hb-last { color: var(--text); }
.hb-na { color: var(--dim); font-size: 12px; }
.hb-empty { text-align: center; color: var(--dim); padding: 28px !important; }
.hb-more { display: block; margin: 16px auto 0; }
.hb-note { font-size: 12.5px; color: var(--dim); margin: 18px 0 0; max-width: 900px; line-height: 1.6; }
.hb-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid var(--line-hi); padding: 20px 22px; margin-top: 30px; }
.hb-cta h2 { margin: 0 0 4px; font-size: 22px; }
.hb-cta p { margin: 0; color: var(--muted); }
.hb-cta .btns { display: flex; gap: 10px; flex-wrap: wrap; }

html[data-theme="light"] .hb-coins button[aria-pressed="true"] { color: #fff; }
html[data-theme="light"] .hb-field select option { color: #111; }

/* medium screens: drop gross revenue + power cost (profit already includes both) */
@media (max-width: 1180px) {
  .hb-table th:nth-child(6), .hb-table td:nth-child(6), .hb-table th:nth-child(7), .hb-table td:nth-child(7) { display: none; }
}
@media (max-width: 980px) {
  .hb-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hb-controls .hb-field:first-child { grid-column: 1 / -1; }
}
/* phones: each miner becomes a card */
@media (max-width: 860px) {
  .hb-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hb-tile b { font-size: 17px; }
  .hb-controls { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .hb-tablewrap { border: 0; overflow: visible; }
  .hb-table thead { display: none; }
  .hb-table, .hb-table tbody, .hb-table tr, .hb-table td { display: block; width: auto; }
  .hb-table tr { border: 1px solid var(--line-hi); margin: 0 0 10px; padding: 12px 12px 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; position: relative; }
  .hb-table td, .hb-table td:nth-child(6), .hb-table td:nth-child(7) { display: block; border: 0; padding: 4px 0; text-align: left; }
  .hb-name { min-width: 0; }
  .hb-rank { position: absolute; top: 12px; right: 12px; }
  .hb-name { grid-column: 1 / -1; padding-right: 36px !important; }
  .hb-coin { grid-column: 1 / -1; margin-bottom: 6px; }
  .hb-num::before { content: attr(data-l); display: block; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
  .hb-profit { font-size: 16px; }
  .hb-table tr.hb-top { border-color: var(--btc); }
  .hb-table tr.hb-top td, .hb-table tr.hb-top td:first-child, .hb-table tr.hb-top td:last-child { box-shadow: none; border: 0; background: none; }
  .hb-empty { grid-column: 1 / -1; }
  .hb-cta { grid-template-columns: minmax(0, 1fr); }
}

/* rows open the miner pop-up */
.hb-table tbody tr[data-id] { cursor: pointer; }
.hb-table tbody tr[data-id]:focus-visible { outline: 2px solid var(--btc); outline-offset: -2px; }
/* miner pop-up */
.hb-md .modal-in { max-width: 760px; }
.hb-md h3 { margin: 6px 0 14px; }
.hb-md-loading { color: var(--dim); padding: 30px 0; }
.hb-md-econ { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hb-md-econ div { border: 1px solid var(--line-hi); padding: 10px 12px; min-width: 0; }
.hb-md-econ small { display: block; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.hb-md-econ b { display: block; font-size: 17px; color: var(--text); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-md-econ b i { font-style: normal; font-size: 11px; font-weight: 500; color: var(--dim); margin-left: 2px; }
.hb-md-econ small { white-space: nowrap; }
.hb-md-econ .hb-md-key { border-color: var(--btc); }
.hb-md-econ .hb-md-key b { color: var(--btc); }
.hb-md-econ .hb-md-key.neg b { color: #ff5a6a; }
.hb-md-note { font-size: 12.5px; color: var(--dim); margin: 8px 0 0; line-height: 1.55; }
.hb-md-h { margin: 22px 0 8px; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.hb-md-h span { color: var(--dim); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.hb-md-chart { position: relative; }
.hb-chart { display: block; width: 100%; height: auto; overflow: visible; }
:root { --hb-line: #d4740a; }
html[data-theme="light"] { --hb-line: #c96400; }
.hb-line { fill: none; stroke: var(--hb-line); stroke-width: 2; stroke-linejoin: round; }
.hb-area { fill: var(--hb-line); opacity: .12; }
.hb-grid { stroke: var(--line); stroke-width: 1; }
.hb-zero { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 4 4; }
.hb-axis { fill: var(--dim); font: 11px var(--mono); }
.hb-cross { stroke: var(--dim); stroke-width: 1; }
.hb-dot { fill: var(--hb-line); stroke: var(--bg); stroke-width: 2; }
.hb-hit { fill: transparent; cursor: crosshair; }
.hb-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--panel, #11141b); border: 1px solid var(--line-hi); padding: 6px 10px; font-size: 12px; color: var(--muted); pointer-events: none; white-space: nowrap; }
.hb-tip b { color: var(--text); font-size: 14px; }
.hb-md-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; }
.hb-md-spec div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hb-md-spec dt { color: var(--dim); font-size: 13px; }
.hb-md-spec dd { margin: 0; color: var(--text); font-size: 13.5px; text-align: right; }
.hb-md-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 720px) {
  .hb-md-econ { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-md-econ .hb-md-key { grid-column: 1 / -1; }
  .hb-md-spec { grid-template-columns: minmax(0, 1fr); }
}
/* the miner pop-up carries a chart and five tiles: wider than the listing pop-ups */
@media (min-width: 721px) {
  dialog.modal.hb-md { width: min(800px, calc(100vw - 32px)); max-width: none; }
}

/* #1 miner spotlight (5 Oct 2026): always dark, like a stage light, in both themes */
.hb-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; margin: 24px 0 18px; }
.hb-best { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 26px 28px 24px; cursor: pointer; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,148,22,.22) 0%, rgba(255,148,22,0) 55%), linear-gradient(135deg, #10131b 0%, #07080d 100%);
  color: #f2f4f8; border: 1px solid rgba(255,148,22,.45); box-shadow: 0 24px 50px -30px rgba(0,0,0,.7); transition: border-color .2s, transform .2s; }
.hb-best::before { content: ""; position: absolute; left: -1px; top: -1px; width: 84px; height: 4px; background: var(--btc, #ff9416); }
.hb-best:hover, .hb-best:focus-visible { border-color: #ff9416; transform: translateY(-2px); outline: none; }
.hb-best-label { display: inline-flex; align-items: center; gap: 10px; font: 600 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #ffb04a; }
.hb-best-no { padding: 4px 8px; background: #ff9416; color: #140a00; font-weight: 700; letter-spacing: .06em; }
.hb-best-main { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; }
.hb-best-id { min-width: 0; }
.hb-best-id h2 { margin: 0; font-family: var(--display); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; color: #fff; text-transform: uppercase; }
.hb-best-id p { margin: 8px 0 0; font: 13px var(--mono); color: rgba(255,255,255,.62); }
.hb-best-profit { text-align: right; }
.hb-best-profit b { display: block; font: 700 clamp(34px, 4.6vw, 54px)/1 var(--display); color: #ff9416; text-shadow: 0 0 28px rgba(255,148,22,.35); }
.hb-best-profit b.is-loss { color: #ff6b7a; text-shadow: none; }
.hb-best-profit span { display: block; margin-top: 6px; font: 12.5px var(--mono); color: rgba(255,255,255,.7); }
.hb-best-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-spec { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); min-width: 104px; }
.hb-spec small { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.hb-spec b { font: 600 15px var(--mono); color: #fff; }
.hb-best-cta { font-weight: 700; font-size: 14px; color: #ffb04a; }
.hb-best.is-empty { cursor: default; }
.hb-side { display: grid; gap: 12px; grid-template-rows: auto auto 1fr; }
.hb-next-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.hb-next-row:first-child { border-top: 0; padding-top: 2px; }
.hb-next-row:hover .hb-next-name { color: var(--btc); }
.hb-next-no { font: 600 12px var(--mono); color: var(--dim); }
.hb-next-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-next-row b { font: 600 13.5px var(--mono); color: var(--btc); }
.hb-next-row b.is-loss { color: var(--red, #d0293b); }
@media (max-width: 980px) { .hb-hero { grid-template-columns: 1fr; } .hb-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; } .hb-next { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .hb-best { padding: 20px 18px; }
  .hb-best-profit { text-align: left; }
  .hb-spec { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
  .hb-side { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .hb-best { transition: none; } }
.hb-coins button.hb-alt { border-style: dashed; }
/* note for a young, thinly traded coin (BTCB2, 10 Oct 2026) */
.hb-warn { margin: 0 0 10px; padding: 9px 12px; border-left: 3px solid var(--btc); background: color-mix(in srgb, var(--btc) 9%, transparent); font-size: 13px; line-height: 1.45; color: var(--text); }
.hb-warn::before { content: "Heads-up · "; font-weight: 700; color: var(--btc); }
