/* /coins and /asics: AsicProfit's own layout, theme tokens from app.css (same look as the dictionary) */
.db [hidden] { display: none !important; }
.db { padding-top: 28px; padding-bottom: 48px; }
.db-kicker { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--primary)); margin: 0 0 6px; }
.db-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: end; }
.db-hero .lead { max-width: 640px; margin-bottom: 0; }
.db-search input { width: 100%; height: 48px; padding: 0 16px; font-size: 16px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 10px; background: hsl(var(--background)); color: inherit; }
.db-search input:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 0; border-color: transparent; }

.db-bar { position: sticky; top: 64px; z-index: 5; margin: 22px 0 6px; padding: 12px 0 10px; background: hsl(var(--background)); border-bottom: 1px solid var(--gray-200);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.db-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.db-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gray-200); background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.db-chips button b { font-weight: 500; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.db-chips button[aria-pressed="true"] { background: hsl(var(--foreground)); color: hsl(var(--background)); border-color: hsl(var(--foreground)); }
.db-chips button[aria-pressed="true"] b { color: inherit; opacity: .7; }
.db-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.db-selects select { height: 36px; padding: 0 10px; border: 1px solid var(--gray-200); border-radius: 8px; background: hsl(var(--background)); color: inherit; font: inherit; font-size: 13px; max-width: 100%; }
.db-count { min-height: 1.4em; margin: 6px 0; }

/* coin tiles */
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.db-tile { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: 12px; background: hsl(var(--background));
  color: inherit; text-decoration: none; scroll-margin-top: 150px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.db-tile:hover, .db-tile:focus-visible { border-color: hsl(var(--primary) / .55); box-shadow: 0 4px 14px rgb(0 0 0 / .06); transform: translateY(-1px); }
.db-tile-top { display: flex; align-items: center; gap: 10px; }
.db-tile-top img, .db-noicon { flex: none; width: 32px; height: 32px; border-radius: 50%; }
.db-noicon { display: grid; place-items: center; background: var(--gray-100); font-size: 11px; font-weight: 700; color: hsl(var(--muted-foreground)); }
.db-tile-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.db-tile-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-tile-name small { font-size: 12px; color: hsl(var(--muted-foreground)); }
.db-tile-price { margin-left: auto; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-tile-desc { font-size: 13px; line-height: 1.5; color: hsl(var(--muted-foreground)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.db-tile-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; font-size: 12px; }
.db-algo { padding: 2px 8px; border-radius: 999px; background: var(--gray-100); color: var(--gray-700); font-weight: 600; }
.db-n { color: hsl(var(--primary)); font-weight: 600; }
.db-n.none { color: hsl(var(--muted-foreground)); font-weight: 500; }

/* asic table: the whole row opens the pop-up */
.db-table tbody tr[data-card] { cursor: pointer; }
.db-table tbody tr[data-card]:hover td { background: var(--gray-50); }
.db-table tbody tr[data-card]:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: -2px; }
.db-table td.model img { vertical-align: -4px; margin-right: 8px; border-radius: 4px; }
.db-more { display: flex; justify-content: center; margin-top: 16px; }

/* pop-up */
dialog.db-pop { width: min(640px, calc(100vw - 32px)); max-height: min(88dvh, 900px); padding: 22px 24px 24px; border: 1px solid var(--gray-200); border-radius: 16px;
  background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 24px 60px rgb(0 0 0 / .25); overflow: auto; }
dialog.db-pop::backdrop { background: rgb(0 0 0 / .4); }
dialog.db-pop .x { position: sticky; top: 0; float: right; z-index: 1; width: 34px; height: 34px; border-radius: 9999px; border: 1px solid var(--gray-200); background: hsl(var(--background)); font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.db-loading { padding: 30px 0; text-align: center; }
.dbc-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.dbc-head > img { flex: none; border-radius: 50%; }
.dbc-head .dbc-pic { border-radius: 10px; object-fit: contain; background: var(--gray-50); }
.dbc-head h2 { margin: 0; font-size: 21px; line-height: 1.25; }
.dbc-head h2 small { font-size: 14px; font-weight: 500; color: hsl(var(--muted-foreground)); }
.dbc-head p { margin: 4px 0 0; }
.dbc-head .badge { margin-left: 6px; }
.dbc-desc { margin: 16px 0 0; line-height: 1.6; }
.dbc .notice { margin: 12px 0 0; }
.dbc h3 { font-size: 15px; margin: 20px 0 8px; }
.dbc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 16px; border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; background: var(--gray-200); }
.dbc-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: hsl(var(--background)); min-width: 0; }
.dbc-stats > div > span { font-size: 12px; color: hsl(var(--muted-foreground)); }
.dbc-stats b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dbc-specs { margin-top: 0; }
.dbc-specs b { font-size: 14px; font-weight: 500; }
.dbc-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.dbc-t th { text-align: left; font-size: 12px; font-weight: 500; color: hsl(var(--muted-foreground)); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--gray-200); }
.dbc-t td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--gray-100); }
.dbc-t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 14px; padding-right: 0; }
.dbc-t a { color: inherit; font-weight: 500; }
.dbc-t a:hover { color: hsl(var(--primary)); }
@media (max-width: 640px) { .dbc-t .hide-m { display: none; } .dbc-t .num { padding-left: 10px; } }   /* phones: the GPU/CPU algorithm table drops its power column */
.dbc-coins { display: flex; flex-wrap: wrap; gap: 6px; }
.dbc-coins .chip img { border-radius: 50%; }
.dbc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

@media (max-width: 760px) {
  .db-hero { grid-template-columns: 1fr; gap: 14px; }
  .db-bar { top: 56px; }
  dialog.db-pop { padding: 18px 16px 20px; }
  .dbc-head .dbc-pic { width: 84px; height: 63px; }
}
@media (max-width: 340px) { .dbc-stats { grid-template-columns: 1fr; } }
.db-tile.off .db-tile-name b { color: hsl(var(--muted-foreground)); }
.db-mcap { margin-left: auto; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* phones: two coins a row, no description in the card (it's in the pop-up) */
@media (max-width: 640px) {
  .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .db-tile { padding: 10px; gap: 6px; }
  .db-tile-desc { display: none; }
  .db-tile-top { flex-wrap: wrap; gap: 6px; }
  .db-tile-top img, .db-noicon { width: 24px; height: 24px; }
  .db-tile-name b { font-size: 14px; }
  .db-tile-price { margin-left: 0; width: 100%; font-size: 13px; }
  .db-tile-foot { gap: 4px; font-size: 11px; }
  .db-mcap { margin-left: 0; }
  .db-hero { gap: 10px; }
  .db-hero .lead { font-size: 14px; }
}

/* more ASIC filters (17 Oct): coin, cooling, launch year, sort, "sold on AsicProfit", reset */
.db-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.db-checks .check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
@media (max-width: 640px) {
  .db-bar:has(#asort) { position: static; }   /* six filters would cover the screen if they stayed pinned */
  .db-bar:has(#asort) .db-selects { display: grid; grid-template-columns: 1fr 1fr; }
  .db-bar:has(#asort) .db-selects select { width: 100%; min-width: 0; }
}
