/* Homepage store front (store idea B, owner 1 Nov 2026; homepage.js, home-one.js): centred headline and search, category
   chips, a filter bar that stays under the header, then the miners as photo cards (rows on phones). Round shapes (owner
   2 Nov: "buttons, cards and filter options should be round"): pills for every control, 22 px card corners.
   minerprices colours only: violet for actions and prices, teal-green profit, Archivo. Muted text #4b5260 / #5c6371. */

/* ---------- hero ---------- */
.sb-hero { background: linear-gradient(180deg, #f4f1ff 0%, hsl(var(--background)) 100%); border-bottom: 1px solid hsl(var(--border)); }
.sb-hero-in { max-width: 1320px; margin: 0 auto; padding: 46px 24px 30px; text-align: center; }
.sb-facts { margin: 0 0 14px; font-size: 14.5px; color: #4b5260; }
.sb-facts b { color: hsl(var(--foreground)); font-weight: 750; }
.sb-h1 { margin: 0 auto; max-width: 21ch; font-stretch: 100%; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; color: var(--title); }
.sb-h1::before { display: none !important; }
.sb-lead { margin: 16px auto 0; max-width: 52ch; font-size: 18px; line-height: 1.5; color: #4b5260; }
.sb-search { display: flex; align-items: center; gap: 10px; max-width: 700px; height: 62px; margin: 26px auto 0; padding: 6px 6px 6px 22px; border: 1.5px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card)); }
.sb-search:focus-within { border-color: var(--brand-deep); outline: 2px solid #6544f0; outline-offset: 2px; }
.sb-search > svg { flex: none; width: 20px; height: 20px; color: #5c6371; }
.sb-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font: 400 17px var(--font); color: inherit; outline: 0; box-shadow: none; }
.sb-search input::placeholder { color: #6b7280; opacity: 1; }
.sb-go { flex: none; height: 100%; padding: 0 28px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: 750 16px var(--font); cursor: pointer; }
.sb-go:hover { background: var(--brand-deep); }
.sb-today { max-width: 780px; margin: 14px auto 0; font-size: 14.5px; color: #4b5260; text-wrap: balance; }
.sb-today > span { margin-right: 6px; font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: #5536d6; }
.sb-today a { color: hsl(var(--foreground)); font-weight: 650; text-decoration: none; }
.sb-today a:hover { text-decoration: underline; text-decoration-color: var(--brand); }
.sb-today b { color: hsl(var(--foreground)); }
.sb-today b.up { color: var(--green-700); }

/* category chips */
.sb-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.sb-cats button, .sb-cats a { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 16px 0 8px; border: 1px solid hsl(var(--border)); border-radius: 999px; background: hsl(var(--card)); color: hsl(var(--foreground)); font: 400 14.5px var(--font); text-decoration: none; cursor: pointer; }
.sb-cats button:hover, .sb-cats a:hover { border-color: var(--brand-deep); background: var(--brand-soft); color: inherit; }
.sb-cats button[aria-pressed="true"] { border-color: var(--brand-deep); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-deep); }
.sb-cats img { display: block; width: 30px; height: 30px; border-radius: 50%; }
.sb-cats .duo { display: flex; } .sb-cats .duo img + img { margin-left: -10px; }
.sb-cats .ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: #5536d6; }
.sb-cats .ico svg { width: 17px; height: 17px; }
.sb-cats b { font-weight: 700; }
.sb-cats em { font-style: normal; font-size: 13px; color: #5c6371; }
.sb-short { display: none; }

/* ---------- filter bar: stays under the sticky header while the cards scroll ---------- */
.sb-bar { position: sticky; top: 73px; z-index: 30; background: hsl(var(--background) / .96); border-bottom: 1px solid hsl(var(--border)); backdrop-filter: blur(6px); }
.sb-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; max-width: 1480px; margin: 0 auto; padding: 12px 24px; }   /* wraps where a language's sort labels are long */
.sb-dd { display: flex; gap: 8px; }
.sb-sel select, .sb-sort-s select, .sb-filters { height: 42px; padding: 0 36px 0 16px; border: 1px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card)) no-repeat right 14px center / 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c6371' stroke-width='1.6'/%3E%3C/svg%3E");
  font: 600 14.5px var(--font); color: hsl(var(--foreground)); cursor: pointer; appearance: none; -webkit-appearance: none; white-space: nowrap; }
.sb-sel select:hover, .sb-sort-s select:hover, .sb-filters:hover { border-color: var(--brand-deep); }
.sb-sel select { max-width: 150px; text-overflow: ellipsis; }   /* a select is as wide as its longest option (coin names) */
.sb-filters { display: none; align-items: center; gap: 8px; padding: 0 16px; background-image: none; }
.sb-filters svg { width: 17px; height: 17px; }
.sb-pay { display: inline-flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid hsl(var(--border)); font-size: 14.5px; color: #4b5260; white-space: nowrap; }
.sb-pay svg { width: 15px; height: 15px; color: var(--brand-deep); }
.sb-pay input { width: 100px; height: 42px; padding: 0 14px; border: 1px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card)); font: 650 15px var(--font); color: hsl(var(--foreground)); }
.sb-sort { display: flex; margin-left: auto; padding: 4px; border-radius: 999px; background: var(--gray-100); }
.sb-sort button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font: 600 14px var(--font); color: #4b5260; cursor: pointer; white-space: nowrap; }
.sb-sort button:hover { color: hsl(var(--foreground)); }
.sb-sort button[aria-pressed="true"] { background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: 0 1px 2px rgba(16,20,29,.12); }
.sb-sort-s { display: none; }

/* ---------- the miners ---------- */
.sb-sec { max-width: 1480px; margin: 0 auto; padding: 30px 24px 40px; scroll-margin-top: 140px; }
.sb-sec-h { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 18px; }
.sb-sec-h h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.sb-sec-h h2::before { display: none !important; }
.sb-sec-h > span { font-size: 14.5px; color: #5c6371; }
.sb-sec-h a { color: hsl(var(--primary)); font-weight: 600; }
.sb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.sb-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid hsl(var(--border)); border-radius: 22px; background: hsl(var(--card)); }
.sb-card[hidden] { display: none; }
.sb-card:hover { border-color: #b3a0ff; }
.sb-ph { position: relative; display: grid; place-items: center; height: 196px; margin: 8px 8px 0; border-radius: 16px; background: #f5f2ec; }
.sb-ph img { max-width: 72%; max-height: 160px; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.sb-rk { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid hsl(var(--border)); border-radius: 999px; background: hsl(var(--card)); font-size: 13.5px; font-weight: 750; color: hsl(var(--foreground)); }
.sb-card:nth-child(-n+3) .sb-rk { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.sb-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.sb-body h3 { margin: 0; font-size: 17px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; }
.sb-body h3::before { display: none !important; }
.sb-body h3 a { color: inherit; text-decoration: none; }
.sb-body h3 a:hover { text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.sb-spec { margin: 5px 0 0; font-size: 13.5px; color: #5c6371; }
.sb-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 16px; padding-top: 14px; border-top: 1px solid hsl(var(--border)); }
.sb-nums b { display: block; font-size: 17px; font-weight: 750; }
.sb-nums b.sb-profit { font-size: 22px; letter-spacing: -.02em; color: var(--green-600); }
.sb-nums b.sb-profit.neg { color: #b43832; }
.sb-nums small { font-size: 12.5px; color: #5c6371; }
.sb-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: auto; }
.sb-tag { display: inline-flex; align-items: baseline; gap: 4px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 17px; font-weight: 800; line-height: 38px; white-space: nowrap; }
.sb-tag small { font-size: 12px; font-weight: 600; }
.sb-cmp { font-size: 14px; font-weight: 650; color: hsl(var(--primary)); text-decoration: none; white-space: nowrap; }
.sb-cmp:hover { text-decoration: underline; }
.sb-empty { padding: 48px 24px; border: 1px dashed hsl(var(--border)); border-radius: 22px; text-align: center; color: #4b5260; }
.sb-empty button { border: 0; background: none; font: inherit; color: #5536d6; text-decoration: underline; cursor: pointer; }
.sb-more { margin: 26px 0 0; text-align: center; }
.sb-morebtn { display: inline-flex; align-items: center; height: 46px; padding: 0 28px; border: 1.5px solid hsl(var(--foreground)); border-radius: 999px; background: none; font: 700 15px var(--font); color: hsl(var(--foreground)); cursor: pointer; }
.sb-morebtn:hover { background: var(--ink); color: var(--ink-text); }
.sb-morebtn[hidden] { display: none; }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] .sb-hero { background: linear-gradient(180deg, #1c1733 0%, hsl(var(--background)) 100%); }
:root[data-theme="dark"] .sb-facts, :root[data-theme="dark"] .sb-lead, :root[data-theme="dark"] .sb-today, :root[data-theme="dark"] .sb-pay,
:root[data-theme="dark"] .sb-sort button, :root[data-theme="dark"] .sb-empty { color: #c3c9d4; }
:root[data-theme="dark"] .sb-cats em, :root[data-theme="dark"] .sb-sec-h > span, :root[data-theme="dark"] .sb-spec, :root[data-theme="dark"] .sb-nums small { color: #b7bfcb; }
:root[data-theme="dark"] .sb-search, :root[data-theme="dark"] .sb-sel select, :root[data-theme="dark"] .sb-sort-s select, :root[data-theme="dark"] .sb-filters,
:root[data-theme="dark"] .sb-pay input { border-color: #3a4252; }
:root[data-theme="dark"] .sb-today > span { color: var(--brand-light); }
:root[data-theme="dark"] .sb-today b.up, :root[data-theme="dark"] .sb-nums b.sb-profit { color: #4fd1a5; }
:root[data-theme="dark"] .sb-cats button:hover, :root[data-theme="dark"] .sb-cats a:hover, :root[data-theme="dark"] .sb-cats button[aria-pressed="true"] { background: #251e45; }
:root[data-theme="dark"] .sb-cats .ico { background: #251e45; color: var(--brand-light); }
:root[data-theme="dark"] .sb-ph { background: #f1eee8; }
:root[data-theme="dark"] .sb-morebtn:hover { background: var(--ink-text); color: var(--ink); }

/* ---------- narrower screens ---------- */
@media (max-width: 1240px) {
  .sb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sb-sort { display: none; } .sb-sort-s { display: block; margin-left: auto; }
}
/* tablets: coin, algorithm and brand fold behind "Filters" (home-one.js opens them as a second row) */
@media (max-width: 1000px) {
  .sb-filters { display: inline-flex; }
  .sb-dd { display: none; order: 9; flex: 1 0 100%; flex-wrap: wrap; }
  .sb-bar.open .sb-dd { display: flex; }
  .sb-bar.open .sb-filters { border-color: var(--brand-deep); background: var(--brand-soft); }
}
@media (max-width: 900px) {
  .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* phones: the miners as rows (photo | name, numbers, price), as the owner asked for AsicProfit's home on 30 Oct */
@media (max-width: 700px) {
  .sb-hero-in { padding: 28px 16px 22px; }
  .sb-facts { font-size: 13px; } .sb-x { display: none; }
  .sb-h1 { font-size: 33px; }
  .sb-lead { font-size: 16px; }
  .sb-search { height: 54px; padding-left: 14px; }
  .sb-search input { font-size: 16px; }   /* 16 px: iOS does not zoom into the field */
  .sb-go { padding: 0 16px; font-size: 15px; }
  .sb-today { font-size: 13.5px; }
  .sb-cats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 20px; }
  .sb-cats li, .sb-cats button, .sb-cats a { min-width: 0; }
  .sb-cats button, .sb-cats a { width: 100%; height: 46px; padding: 0 12px 0 7px; font-size: 13.5px; }
  .sb-cats li:last-child { grid-column: 1 / -1; }
  .sb-cats b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sb-cats em { margin-left: auto; }
  .sb-long { display: none; } .sb-short { display: inline; }
  .sb-bar-in { gap: 8px; padding: 10px 16px; }
  .sb-filters { gap: 6px; padding: 0 12px 0 10px; }
  .sb-pay { flex: none; gap: 4px; padding-left: 0; border-left: 0; }
  .sb-pay-t, .sb-pay-u > span { display: none; }
  .sb-pay svg { width: 14px; }
  .sb-pay input { width: 72px; padding: 0 8px; font-size: 14.5px; text-align: center; }
  .sb-pay-u { font-size: 13px; }
  .sb-sort-s { flex: 1 1 0; min-width: 0; } .sb-sort-s select { width: 100%; padding: 0 30px 0 12px; background-position: right 11px center; font-size: 14px; }
  .sb-dd { gap: 6px; } .sb-sel { flex: 1 1 calc(50% - 6px); min-width: 0; } .sb-sel select { width: 100%; max-width: none; }
  .sb-sec { padding: 20px 16px 32px; }
  .sb-sec-h h2 { font-size: 21px; }
  .sb-sec-h > span { font-size: 13.5px; }
  .sb-grid { grid-template-columns: 1fr; gap: 10px; }
  .sb-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
  .sb-ph { height: auto; min-height: calc(100% - 16px); margin: 8px 0 8px 8px; border-radius: 14px; }
  .sb-ph img { max-width: 80%; max-height: 82px; }
  .sb-rk { top: 6px; left: 6px; min-width: 22px; height: 22px; font-size: 12px; }
  .sb-body { padding: 12px; }
  .sb-body h3 { font-size: 15.5px; }
  .sb-spec { font-size: 12.5px; }
  .sb-nums { gap: 8px; margin: 8px 0 10px; padding-top: 8px; }
  .sb-nums b { font-size: 15px; } .sb-nums b.sb-profit { font-size: 18px; }
  .sb-tag { height: 34px; padding: 0 14px; font-size: 15.5px; line-height: 34px; }
  .sb-cmp { font-size: 13.5px; }
}
