/* Coin Board (/coins) and coin pages (/coins/<slug>), 10 Oct 2026. Loaded after asic-board.css: reuses its hb-* pieces
   (spotlight, tiles, controls, table, chart line/tooltip) and adds logos, sparklines, the coin header, chart card and stats. */

/* logos: the coin's own image, or its ticker on an orange chamfered badge when there is none */
.cb-logo { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--tint); }
.cb-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cb-logo.is-badge { border-radius: 0; background: var(--btc); color: #1a0d00; font: 700 9px var(--mono); letter-spacing: .02em;
  clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%); }
.cb-logo-lg { width: 52px; height: 52px; }
.cb-logo-lg.is-badge { font-size: 13px; }
.cb-logo-xl { width: 64px; height: 64px; }
.cb-logo-xl.is-badge { font-size: 15px; }

/* board spotlight: logo next to the coin name */
.cb-best { text-decoration: none; }
.cb-best-id { display: flex; align-items: center; gap: 16px; }
.cb-best-id .cb-logo:not(.is-badge) { background: rgba(255,255,255,.08); }
/* ticker badges keep the orange fill on any background (dark spotlight, light rows) */
.cb-logo.is-badge, .cb-best-id .cb-logo.is-badge { background: #ff9416; color: #140a00; font-weight: 800; letter-spacing: 0; }

/* board table */
.cb-table td.cb-name { min-width: 190px; }
.cb-name a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.cb-name b { display: block; color: var(--text); font-weight: 600; }
.cb-name small { display: block; font: 500 11.5px var(--mono); color: var(--dim); margin-top: 1px; }
.cb-table th:nth-child(3), .cb-table td:nth-child(3) { text-align: left; }
.cb-algo { font: 600 11px var(--mono); letter-spacing: .03em; border: 1px solid var(--line-hi); padding: 2px 6px; color: var(--muted); white-space: nowrap; }
.cb-up { color: #1f9d55; }
.cb-down { color: #e04a5a; }
html[data-theme="light"] .cb-up { color: #12804a; }
html[data-theme="light"] .cb-down { color: #c62f40; }
.cb-spark { display: block; width: 96px; height: 30px; margin-left: auto; }
.cb-spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.cb-spark.up path { stroke: #1f9d55; }
.cb-spark.down path { stroke: #e04a5a; }
.cb-best-cell b { color: var(--text); font-weight: 700; }
.cb-best-cell small { display: block; font-size: 12px; color: var(--dim); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.cb-table tbody tr[data-slug] { cursor: pointer; }
.cb-table tbody tr[data-slug]:focus-visible { outline: 2px solid var(--btc); outline-offset: -2px; }
@media (max-width: 1180px) {
  .cb-table th:nth-child(6), .cb-table td:nth-child(6), .cb-table th:nth-child(7), .cb-table td:nth-child(7) { display: table-cell; }
  .cb-table th:nth-child(3), .cb-table td:nth-child(3), .cb-table th:nth-child(10), .cb-table td:nth-child(10) { display: none; }
}
@media (max-width: 860px) {
  .cb-table td:nth-child(3), .cb-table td:nth-child(10) { display: none !important; }
  .cb-table td.cb-name { grid-column: 1 / -1; min-width: 0; padding-right: 36px !important; }
  .cb-spark { margin-left: 0; }
  .cb-best-cell small { margin-left: 0; }
}

/* ---- coin page ---- */
.cp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 12px var(--mono); color: var(--dim); margin-bottom: 18px; }
.cp-crumbs a { color: var(--dim); text-decoration: none; }
.cp-crumbs a:hover { color: var(--btc); }
.cp-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.cp-id h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; display: flex; align-items: center; gap: 14px; }
/* the ticker and the Switch coin button (16 Oct 2026): one height, one style, on one centre line */
.cp-tag, .cp-sw-btn { box-sizing: border-box; height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-hi);
  font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.cp-tag { color: var(--dim); }
.cp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.cp-chip { font: 600 11.5px var(--mono); letter-spacing: .04em; border: 1px solid var(--line-hi); padding: 3px 8px; color: var(--muted); }
.cp-live { display: inline-flex; align-items: center; gap: 7px; font: 500 12px var(--mono); color: var(--dim); }
/* no "live" dot (user, 16 Oct 2026): just the plain update time (coin-page.js) */
.cp-price { text-align: right; }
.cp-price b { display: block; font: 700 clamp(30px, 4.2vw, 48px)/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.cp-ch { display: inline-block; margin-top: 8px; font: 600 14px var(--mono); }

.cp-returns { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-hi); margin: 22px 0 16px; }
.cp-returns div { padding: 11px 14px; border-left: 1px solid var(--line); min-width: 0; }
.cp-returns div:first-child { border-left: 0; }
.cp-returns small { display: block; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cp-returns b { display: block; font: 600 16px var(--mono); margin-top: 4px; white-space: nowrap; }

.cp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.cp-card { border: 1px solid var(--line-hi); padding: 16px 18px; position: relative; min-width: 0; }
.cp-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 48px; height: 3px; background: var(--btc); }
.cp-h { margin: 0; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.cp-chart-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.cp-chart-top .cp-h { margin-right: auto; }
.cp-seg { display: inline-flex; border: 1px solid var(--line-hi); }
.cp-seg button { font: 600 11.5px var(--mono); letter-spacing: .04em; padding: 6px 10px; background: transparent; color: var(--muted); border: 0; border-left: 1px solid var(--line); cursor: pointer; }
.cp-seg button:first-child { border-left: 0; }
.cp-seg button:hover { color: var(--btc); }
.cp-seg button[aria-pressed="true"] { background: var(--btc); color: #1a0d00; }
html[data-theme="light"] .cp-seg button[aria-pressed="true"] { color: #fff; }
.cp-chart-box { position: relative; min-height: 300px; }
.cp-chart-msg { color: var(--dim); padding: 120px 0; text-align: center; margin: 0; }
.cp-chart-src { font-size: 11.5px; color: var(--dim); margin: 8px 0 0; }
.cp-dl { margin: 8px 0 18px; }
.cp-dl:last-child { margin-bottom: 0; }
.cp-dl div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cp-dl dt { color: var(--dim); font-size: 13px; }
.cp-dl dd { margin: 0; color: var(--text); font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cp-dl dd small { display: block; font-weight: 500; font-size: 11.5px; color: var(--dim); }
.cp-dl .cp-key dd { color: var(--btc); }

.cp-sec { margin-top: 34px; }
.cp-sec h2 { margin: 6px 0 12px; }
.cp-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.cp-sec-head h2 { margin-bottom: 0; }
.cp-kwh { min-width: min(420px, 100%); }
.cp-mtable th:nth-child(-n+2) { text-align: left; }
.cp-mtable th:nth-child(3) { text-align: right; }
.cp-mtable tbody tr[data-id] { cursor: pointer; }

/* quick profit check */
.cp-calc-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line-hi); }
.cp-calc-form { padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.cp-calc-form h2 { margin: 2px 0 4px; }
.cq-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cp-calc-out { padding: 20px 22px; background: radial-gradient(120% 140% at 100% 0%, rgba(255,148,22,.2) 0%, rgba(255,148,22,0) 55%), linear-gradient(135deg, #10131b 0%, #07080d 100%); color: #f2f4f8; display: grid; gap: 14px; align-content: start; }
.cq-big small { display: block; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #ffb04a; }
.cq-big b { display: block; font: 700 clamp(34px, 4vw, 48px)/1.05 var(--display); color: #ff9416; margin-top: 4px; }
.cq-big b.is-loss { color: #ff6b7a; }
.cq-big span { display: block; font: 12.5px var(--mono); color: rgba(255,255,255,.7); margin-top: 4px; }
.cq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cq-grid div { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); padding: 9px 11px; min-width: 0; }
.cq-grid small { display: block; font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.cq-grid b { display: block; font: 600 15px var(--mono); color: #fff; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cq-cta .btn-ghost, html[data-theme="light"] .cq-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.cq-cta .btn-ghost:hover { border-color: #ff9416; color: #ff9416; }

.cp-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; }
.cp-about p { color: var(--muted); line-height: 1.65; margin: 0 0 12px; }
.cp-facts { margin-top: 6px; }
.cp-faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.cp-faq details:last-child { border-bottom: 1px solid var(--line); }
.cp-faq summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary::after { content: "+"; font: 600 18px/1 var(--mono); color: var(--btc); }
.cp-faq details[open] summary::after { content: "−"; }
.cp-faq p { color: var(--muted); line-height: 1.6; margin: 10px 0 0; }

.cp-rels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cp-rel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; border: 1px solid var(--line-hi); padding: 12px 14px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.cp-rel:hover { border-color: var(--btc); transform: translateY(-1px); }
.cp-rel .cb-logo { grid-column: 1; grid-row: 1 / 3; }   /* the logo is a span too: keep it out of the price column (.cp-rel span) */
.cp-rel b { grid-column: 2; grid-row: 1; }
.cp-rel b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-rel small { grid-column: 2; font: 500 11.5px var(--mono); color: var(--dim); }
.cp-rel span { grid-column: 3; grid-row: 1; text-align: right; font: 600 14px var(--mono); }
.cp-rel em { grid-column: 3; grid-row: 2; text-align: right; font: 600 12px var(--mono); font-style: normal; }

@media (max-width: 980px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-returns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-returns div:nth-child(4) { border-left: 0; }
  .cp-returns div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .cp-calc-in, .cp-two { grid-template-columns: minmax(0, 1fr); }
  .cp-rels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cp-head { grid-template-columns: auto minmax(0, 1fr); }
  .cp-price { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 12px; }
  .cp-ch { margin-top: 0; }
  .cq-row, .cq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cq-row .hb-field:first-child { grid-column: 1 / -1; }
  .cp-rels { grid-template-columns: minmax(0, 1fr); }
  .cp-chart-box { min-height: 240px; }
  .cp-seg button { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { .cp-rel { transition: none; } }
.cb .hb-next-row, .cb .hb-next-row:hover { text-decoration: none; }

/* coin page: what the coin is (under the header) */
.cp-desc { max-width: 860px; margin: 16px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }

/* coin switcher next to the name */
.cp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cp-sw { position: relative; }
.cp-sw-btn { gap: 8px; background: transparent; color: var(--text); cursor: pointer; }
.cp-sw-btn:hover, .cp-sw-btn[aria-expanded="true"] { border-color: var(--btc); color: var(--btc); }
/* the menu chevron from styles.css (.dd-caret), turned up while open; the old CSS triangle stacked on it into a flag shape */
.cp-sw-btn[aria-expanded="true"] .dd-caret { transform: translateY(1px) rotate(225deg); }
.cp-sw-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(380px, calc(100vw - 32px)); background: var(--bg); border: 1px solid var(--line-hi); box-shadow: 0 24px 50px -20px rgba(0,0,0,.45); }
.cp-sw-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 48px; height: 3px; background: var(--btc); }
.cp-sw-panel input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line-hi); background: transparent; color: var(--text); padding: 12px 14px; font: 14px var(--sans, inherit); outline: none; }
.cp-sw-list { max-height: min(420px, 60vh); overflow-y: auto; }
.cp-sw-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 14px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.cp-sw-list a:first-child { border-top: 0; }
.cp-sw-list a:hover, .cp-sw-list a.is-act { background: var(--tint); }
.cp-sw-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--btc); }
.cp-sw-list .cb-logo { width: 24px; height: 24px; }
.cp-sw-n b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-sw-n small, .cp-sw-p small { display: block; font: 500 11px var(--mono); color: var(--dim); }
.cp-sw-p { text-align: right; font: 600 13px var(--mono); }
.cp-sw-none { margin: 0; padding: 14px; color: var(--dim); font-size: 13px; }
@media (max-width: 640px) { .cp-sw-panel { position: fixed; top: 76px; left: 16px; right: 16px; width: auto; } }
.cp-warn { margin: 14px 0 0; max-width: 860px; }

/* chart: labels can't be selected by a drag across the chart (selected SVG text kept its grey fill on the orange highlight) */
.cp-chart-box, .cp-chart-box svg { -webkit-user-select: none; user-select: none; }
.cp-chart-box .hb-axis { font-size: 12px; fill: var(--muted); }
svg text::selection { fill: #000; }

/* Coin Board: sortable column headers (click: usual order, again: flipped) */
.cb-table th.cb-sortable { cursor: pointer; user-select: none; }
.cb-table th.cb-sortable:hover, .cb-table th.cb-sortable:focus-visible { color: var(--text); outline: none; }
.cb-arrow { display: inline-block; margin-left: 5px; color: var(--dim); opacity: .45; font-family: var(--mono); }
.cb-table th[aria-sort="ascending"], .cb-table th[aria-sort="descending"] { color: var(--btc); }
.cb-table th[aria-sort="ascending"] .cb-arrow, .cb-table th[aria-sort="descending"] .cb-arrow { color: var(--btc); opacity: 1; }
/* one machine's share of a small network: its own line, never cut off */
.cb-best-cell small.cb-share { color: var(--muted); white-space: nowrap; overflow: visible; max-width: none; }
