/* Baztab Market 2.12.31 — homepage market box hardening.
 * Scoped component: no global selectors, no external assets, no layout JS.
 * Goals: larger featured-style tabs, readable two-line labels, unique soft card
 * tones, stable RTL/mobile layout and zero badge/title overlap.
 */
.btm-home-market{direction:rtl;margin:14px auto 22px;padding-inline:15px;box-sizing:border-box;contain:layout style}
.btm-home-market,.btm-home-market *{box-sizing:border-box}
.btm-home-market__shell{max-width:1320px;margin-inline:auto;padding:0;background:#f7f9fc;border:1px solid #e3e8ef;border-radius:16px;overflow:hidden;box-shadow:0 10px 28px rgba(15,23,42,.045)}
.btm-home-market__head{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:54px;padding:10px 14px;border-bottom:1px solid #e5eaf1;background:#f3f6fa}
.btm-home-market__heading{display:flex;align-items:center;gap:9px;min-width:0;white-space:nowrap}
.btm-home-market__heading::before{content:"";display:block;width:3px;height:22px;flex:0 0 3px;border-radius:999px;background:#a01c22}
.btm-home-market__heading h2{margin:0;font-size:15px;line-height:1.4;font-weight:900;color:#172033}
.btm-home-market__unit{font-size:9.5px;color:#7a8494}

/* Larger section tabs — same restrained visual language as featured-title tabs. */
.btm-home-market__tabs{display:flex;align-items:stretch;gap:23px;min-width:0;padding:0 15px;border-bottom:1px solid #e5eaf1;background:#fff;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.btm-home-market__tabs::-webkit-scrollbar{display:none}
.btm-home-market__tab{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:50px;padding:11px 1px 12px;border:0;background:transparent;color:#5f6b7d;font-family:inherit;font-size:12.4px;font-weight:850;line-height:1.45;white-space:nowrap;cursor:pointer;transition:color .16s ease}
.btm-home-market__tab::after{content:"";position:absolute;right:0;left:0;bottom:-1px;height:3px;border-radius:999px 999px 0 0;background:#a01c22;transform:scaleX(0);transform-origin:center;transition:transform .18s ease}
.btm-home-market__tab:hover{color:#202939}
.btm-home-market__tab.is-active{color:#991b1f;font-weight:950}
.btm-home-market__tab.is-active::after{transform:scaleX(1)}
.btm-home-market__tab:focus-visible{outline:3px solid rgba(160,28,34,.16);outline-offset:-3px;border-radius:7px}

.btm-home-market__panels{background:#f7f9fc}
.btm-home-market__panel{position:relative}
.btm-home-market__panel[hidden]{display:none!important}
.btm-home-market__rail{display:grid;grid-template-columns:repeat(var(--btm-home-cols,6),minmax(0,1fr));gap:10px;padding:12px;background:#f7f9fc}

/* Every card gets a distinct low-saturation tone. Colors are decorative only;
 * price direction still uses semantic green/red badges independently. */
.btm-home-market__item{--btm-card-accent:#64748b;--btm-card-bg:#f8fafc;--btm-card-border:#e2e8f0;--btm-symbol-bg:#f1f5f9;--btm-symbol-fg:#334155;position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);align-items:start;gap:9px;min-width:0;min-height:116px;padding:11px;color:inherit;text-decoration:none;background:linear-gradient(180deg,var(--btm-card-bg) 0,#fff 72%);border:1px solid var(--btm-card-border);border-radius:13px;box-shadow:0 4px 12px rgba(15,23,42,.04);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;background-image:linear-gradient(90deg,var(--btm-card-accent),var(--btm-card-accent)),linear-gradient(180deg,var(--btm-card-bg) 0,#fff 72%);background-size:100% 3px,100% 100%;background-repeat:no-repeat;background-position:0 100%,0 0}
.btm-home-market__item--tone-1{--btm-card-accent:#d97706;--btm-card-bg:#fffaf0;--btm-card-border:#f5dfb5;--btm-symbol-bg:#fff3d6;--btm-symbol-fg:#a15c05}
.btm-home-market__item--tone-2{--btm-card-accent:#2563eb;--btm-card-bg:#f5f9ff;--btm-card-border:#d9e7ff;--btm-symbol-bg:#eaf2ff;--btm-symbol-fg:#1d4ed8}
.btm-home-market__item--tone-3{--btm-card-accent:#059669;--btm-card-bg:#f3fcf8;--btm-card-border:#d3f1e3;--btm-symbol-bg:#e4f8ef;--btm-symbol-fg:#047857}
.btm-home-market__item--tone-4{--btm-card-accent:#7c3aed;--btm-card-bg:#f9f6ff;--btm-card-border:#e7dcff;--btm-symbol-bg:#f0e9ff;--btm-symbol-fg:#6d28d9}
.btm-home-market__item--tone-5{--btm-card-accent:#e11d48;--btm-card-bg:#fff6f8;--btm-card-border:#f9dbe3;--btm-symbol-bg:#ffebf0;--btm-symbol-fg:#be123c}
.btm-home-market__item--tone-6{--btm-card-accent:#0891b2;--btm-card-bg:#f2fbfd;--btm-card-border:#d2eef4;--btm-symbol-bg:#e1f6fa;--btm-symbol-fg:#0e7490}
.btm-home-market__item:hover{transform:translateY(-2px);border-color:var(--btm-card-accent);box-shadow:0 9px 20px rgba(15,23,42,.075)}

.btm-home-market__symbol{grid-column:1;grid-row:1;width:35px;height:35px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 35px;border:1px solid color-mix(in srgb,var(--btm-card-accent) 22%,transparent);border-radius:10px;background:var(--btm-symbol-bg);color:var(--btm-symbol-fg);font-size:11px;font-weight:950;line-height:1;direction:ltr}
/* Graceful fallback where color-mix is unavailable. */
@supports not (color:color-mix(in srgb,red 50%,blue)){.btm-home-market__symbol{border-color:var(--btm-card-border)}}
.btm-home-market__content{grid-column:2;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;min-width:0;width:100%}
.btm-home-market__name{display:-webkit-box;width:100%;min-height:34px;overflow:hidden;color:#3f4a5a;font-size:10.8px;font-weight:900;line-height:1.55;white-space:normal;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
.btm-home-market__price-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 5px;width:100%;min-width:0}
.btm-home-market__price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#152033;font-size:13.1px;font-weight:950;line-height:1.45;font-variant-numeric:tabular-nums;unicode-bidi:plaintext}
.btm-home-market__price-unit{flex:0 0 auto;color:#7d8999;font-size:8.2px;font-weight:800;line-height:1.2}
/* Percentage badge participates in normal flow; it can never cover the title. */
.btm-home-market__change{display:inline-flex;align-items:center;justify-content:center;gap:2px;min-width:40px;min-height:21px;padding:2px 7px;border-radius:999px;white-space:nowrap;font-size:8.2px;font-weight:950;font-variant-numeric:tabular-nums}
.btm-home-market__change.up{color:#067647;background:#ecfdf3;border:1px solid #cdeedb}
.btm-home-market__change.down{color:#b42318;background:#fff1f3;border:1px solid #f7d9df}
.btm-home-market__change.flat{color:#667085;background:#f2f4f7;border:1px solid #e4e7ec}

/* Retain useful entity hints without changing each card's unique tone. */
.btm-home-market__symbol--usd,.btm-home-market__symbol--usdt{font-family:inherit}
.btm-home-market__symbol--gold,.btm-home-market__symbol--coin{font-weight:950}

.btm-home-market__group-link{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-height:36px;padding:6px 14px 9px;border-top:1px solid #e8edf3;background:#f7f9fc;color:#687386;text-decoration:none;font-size:9.4px;font-weight:850;transition:color .15s ease,background-color .15s ease}
.btm-home-market__group-link:hover{color:#a01c22;background:#fff}
.btm-home-market__empty{display:flex;align-items:center;justify-content:center;min-height:126px;padding:18px;background:#f7f9fc;color:#7c8798;font-size:10px;font-weight:750;text-align:center}

.btm-home-market__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:41px;margin:0!important;padding:6px 13px!important;border:0!important;border-top:1px solid #e5eaf1!important;background:#fff!important;color:#7c8798;font-size:9.3px;box-shadow:none!important;clear:none!important}
.btm-home-market__updated{display:inline-flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}
.btm-home-market__updated strong{color:#475467;font-weight:850}
.btm-home-market__calendar{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex:0 0 18px;color:#7c8798}
.btm-home-market__calendar svg{display:block;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.btm-home-market__enter{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:29px;padding:4px 10px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;color:#344054;text-decoration:none;font-size:9.3px;font-weight:900;white-space:nowrap;transition:background-color .15s ease,color .15s ease,border-color .15s ease}
.btm-home-market__enter:hover{background:#fff1f2;border-color:#f4c9cd;color:#a01c22}
.btm-home-market a:focus-visible,.btm-home-market button:focus-visible{outline:3px solid rgba(160,28,34,.18);outline-offset:2px}

@media(max-width:1120px){
  .btm-home-market__tabs{gap:20px;padding-inline:13px}
  .btm-home-market__tab{min-height:48px;font-size:11.7px}
  .btm-home-market__rail{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .btm-home-market__item{min-height:110px}
}

@media(max-width:760px){
  .btm-home-market{margin:10px auto 16px;padding-inline:10px;contain:layout style}
  .btm-home-market__shell{border-radius:13px;box-shadow:none}
  .btm-home-market__head{min-height:46px;padding:8px 10px;flex-direction:row;align-items:center;gap:8px}
  .btm-home-market__heading{gap:7px}.btm-home-market__heading::before{height:19px}.btm-home-market__heading h2{font-size:13.5px}.btm-home-market__unit{font-size:8.5px}
  .btm-home-market__tabs{gap:19px;padding-inline:11px;scroll-snap-type:x proximity}
  .btm-home-market__tab{min-height:46px;padding:10px 1px 11px;font-size:11px;scroll-snap-align:start}
  .btm-home-market__tab::after{height:2.5px}
  .btm-home-market__rail{display:flex;grid-template-columns:none;gap:9px;padding:10px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;scrollbar-width:none;background:#f7f9fc}
  .btm-home-market__rail::-webkit-scrollbar{display:none}
  .btm-home-market__item{flex:0 0 212px;min-height:114px;padding:11px 10px;border-radius:12px;scroll-snap-align:start;box-shadow:0 3px 10px rgba(15,23,42,.04)}
  .btm-home-market__item:hover{transform:none;box-shadow:0 3px 10px rgba(15,23,42,.04)}
  .btm-home-market__symbol{width:33px;height:33px;flex-basis:33px}
  .btm-home-market__name{min-height:36px;font-size:10.5px;line-height:1.6}
  .btm-home-market__price{font-size:12.4px}.btm-home-market__price-unit{font-size:8px}.btm-home-market__change{font-size:8px}
  .btm-home-market__group-link{min-height:33px;padding:5px 10px 7px;font-size:8.7px}
  .btm-home-market__foot{min-height:37px;padding:5px 10px!important;font-size:8.7px;gap:7px;flex-wrap:nowrap;overflow:hidden}
  .btm-home-market__updated{gap:4px;min-width:0;overflow:hidden;text-overflow:ellipsis}.btm-home-market__updated>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .btm-home-market__calendar{width:16px;height:16px;flex-basis:16px}.btm-home-market__calendar svg{width:14px;height:14px}
  .btm-home-market__enter{min-height:27px;padding:4px 8px;font-size:8.5px;flex:0 0 auto}
}

@media(max-width:380px){
  .btm-home-market{padding-inline:8px}.btm-home-market__item{flex-basis:202px}.btm-home-market__heading h2{font-size:13px}.btm-home-market__unit{display:none}.btm-home-market__foot{padding-inline:8px!important;gap:5px}.btm-home-market__updated{font-size:8px}.btm-home-market__enter{padding-inline:7px;font-size:8.2px}
}
@media(prefers-reduced-motion:reduce){.btm-home-market *{transition:none!important;scroll-behavior:auto!important}}
@media print{.btm-home-market{display:none!important}}
