/* /market - Phase 18 (#9) rewrite. Markup + behaviour: Views/Market/Index.cshtml.
   Everything is scoped under .mk-page; shared primitives reused: .dv-delta, .bubble-pct,
   .tf-coin/.tf-flag, .skeleton, .tf-tick-up/down, _FearGreedGauge. */
.mk-page { position: relative; isolation: isolate; color: var(--ds-text); padding: clamp(1rem, 2.6vw, 2rem) 0 3rem; }
.mk-page::before { content: ""; position: absolute; inset: 0 0 auto; height: 460px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 260px at 85% 0%, hsl(199 89% 55% / .14), transparent 70%), radial-gradient(520px 240px at 10% 10%, hsl(45 95% 55% / .10), transparent 70%); }
.mk-page [hidden] { display: none !important; }
.mk-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk-wrap { display: flex; flex-direction: column; gap: 1.25rem; }

/* ---------- hero ---------- */
.mk-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.mk-hero__text { display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: .5rem 0; }
.mk-hero__title { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.mk-hero__sub { margin: 0; max-width: 56ch; color: var(--ds-text-2); font-size: .95rem; line-height: 1.9; }
.mk-hero__cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.mk-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border-radius: var(--ds-r-md); font-weight: 600; font-size: .9rem; text-decoration: none;
  color: var(--ds-text); background: var(--ds-surface-1); border: 1px solid var(--ds-line); box-shadow: var(--ds-shadow-1); transition: var(--ds-t-hover); }
.mk-btn svg { width: 18px; height: 18px; flex: none; }
.mk-btn { white-space: nowrap; }
.mk-btn:hover { transform: translateY(var(--ds-lift-1)); border-color: hsl(199 89% 48% / .45); }
.mk-btn--pri { color: #fff; border-color: transparent; background: linear-gradient(135deg, hsl(199 89% 46%), hsl(217 88% 56%)); box-shadow: 0 10px 22px -10px hsl(199 89% 48% / .8); }
.mk-btn--pri:hover { color: #fff; box-shadow: 0 14px 26px -10px hsl(199 89% 48% / .9); }

.mk-live { align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: var(--ds-r-pill); font-size: .75rem; font-weight: 600;
  background: var(--ds-surface-2); color: var(--ds-text-2); border: 1px solid var(--ds-line); font-variant-numeric: tabular-nums; }
.mk-live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-text-3); position: relative; }
.mk-live[data-state="on"] { color: var(--ds-up-ink); background: hsl(152 60% 45% / .1); border-color: hsl(152 60% 45% / .25); }
.mk-live[data-state="on"] .mk-live__dot { background: hsl(152 65% 42%); }
.mk-live[data-state="on"] .mk-live__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid hsl(152 65% 42% / .5); animation: mk-ping 1.6s ease-out infinite; }
.mk-live[data-state="stale"] { color: hsl(35 90% 40%); background: hsl(40 95% 55% / .12); border-color: hsl(40 95% 55% / .3); }
.mk-live[data-state="stale"] .mk-live__dot { background: hsl(38 92% 50%); }
.mk-live[data-state="off"] { color: var(--ds-down-ink); }
.mk-live[data-state="off"] .mk-live__dot { background: var(--ds-down-ink); }
@keyframes mk-ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* breadth card */
.mk-breadth { background: var(--ds-surface-1); border: 1px solid var(--ds-line); border-radius: var(--ds-r-xl); padding: 1.1rem 1.2rem; box-shadow: var(--ds-shadow-1); display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.mk-breadth__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.mk-breadth__title { font-weight: 700; font-size: 1rem; }
.mk-breadth__meta { font-size: .75rem; color: var(--ds-text-2); font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; }
.mk-breadth__bar { display: flex; height: 10px; border-radius: var(--ds-r-pill); overflow: hidden; background: var(--ds-surface-2); gap: 2px; }
.mk-breadth__bar i { display: block; height: 100%; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.mk-breadth__bar .is-up { background: hsl(152 60% 42%); }
.mk-breadth__bar .is-flat { background: hsl(220 10% 70% / .55); }
.mk-breadth__bar .is-down { background: hsl(0 72% 56%); }
.mk-breadth__legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .75rem; color: var(--ds-text-2); font-weight: 700; }
.mk-breadth__legend span { display: inline-flex; align-items: center; gap: .3rem; }
.mk-breadth__legend span::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.mk-breadth__legend .is-up::before { background: hsl(152 60% 42%); }
.mk-breadth__legend .is-flat::before { background: hsl(220 10% 70%); }
.mk-breadth__legend .is-down::before { background: hsl(0 72% 56%); }
.mk-breadth__legend b { color: var(--ds-text); font-weight: 700; }
.mk-movers { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .15rem; }
.mk-movers__h { font-size: .72rem; font-weight: 700; margin-bottom: .35rem; }
.mk-movers__h.is-up { color: var(--ds-up-ink); }
.mk-movers__h.is-down { color: var(--ds-down-ink); }
.mk-movers__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.mk-movers__list a { display: flex; align-items: center; gap: .45rem; padding: .35rem .5rem; border-radius: var(--ds-r-sm); text-decoration: none; color: var(--ds-text); font-size: .8rem; font-weight: 600; transition: background .15s; min-width: 0; }
.mk-movers__list a:hover { background: var(--ds-surface-2); }
.mk-movers__list .mk-mv-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-movers__list .tf-coin { width: 20px; height: 20px; }
.mk-movers__list .mk-ic-idx { font-size: 6.5px; }
.mk-movers__none { font-size: .75rem; color: var(--ds-text-3); padding: .35rem .5rem; }
.mk-skel { height: 30px; border-radius: var(--ds-r-sm); background: var(--ds-surface-2); animation: mk-breathe 1.4s ease-in-out infinite; }
@keyframes mk-breathe { 50% { opacity: .5; } }

/* ---------- key rates ---------- */
.mk-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.mk-kpi { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; border-radius: var(--ds-r-lg); text-decoration: none; color: var(--ds-text);
  background: var(--ds-surface-1); border: 1px solid var(--ds-line); box-shadow: var(--ds-shadow-1); overflow: hidden; transition: transform .15s, border-color .15s; }
.mk-kpi::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--ds-line); }
.mk-kpi.is-up::after { background: hsl(152 60% 42%); }
.mk-kpi.is-down::after { background: hsl(0 72% 56%); }
.mk-kpi:hover { transform: translateY(-2px); border-color: hsl(199 89% 48% / .4); }
.mk-kpi__n { font-size: .75rem; font-weight: 600; color: var(--ds-text-2); }
.mk-kpi__p { font-size: clamp(1rem, 2.2vw, 1.3rem); font-weight: 650; font-variant-numeric: tabular-nums; direction: ltr; text-align: end; white-space: nowrap; }
.mk-kpi__c { min-height: 1.3em; display: flex; justify-content: flex-end; }

/* ---------- toolbar ---------- */
.mk-bar { position: sticky; top: calc(var(--header-h, 64px) + .5rem); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .55rem; border-radius: var(--ds-r-lg); background: color-mix(in srgb, var(--ds-surface-1) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--ds-line); box-shadow: var(--ds-shadow-2); }
html.tf-lite .mk-bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--ds-surface-1); }
.mk-tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.mk-tabs::-webkit-scrollbar { display: none; }
.mk-tab { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; min-height: 38px; border-radius: var(--ds-r-md); border: 0; background: transparent; color: var(--ds-text-2); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.mk-tab:hover { color: var(--ds-text); background: var(--ds-surface-2); }
.mk-tab.is-on { color: #fff; background: linear-gradient(135deg, hsl(199 89% 46%), hsl(217 88% 56%)); box-shadow: 0 6px 14px -8px hsl(199 89% 48% / .9); }
.mk-tab__n:empty { display: none; }
.mk-tab__n { font-size: .68rem; padding: .05rem .4rem; border-radius: var(--ds-r-pill); background: hsl(0 0% 50% / .14); }
.mk-tab.is-on .mk-tab__n { background: hsl(0 0% 100% / .25); }
.mk-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.mk-search { display: flex; align-items: center; gap: .4rem; padding: 0 .75rem; min-height: 38px; border-radius: var(--ds-r-md); background: var(--ds-bg); border: 1px solid var(--ds-line); transition: border-color .15s, box-shadow .15s; }
.mk-search:focus-within { border-color: hsl(199 89% 48%); box-shadow: 0 0 0 3px hsl(199 89% 48% / .15); }
.mk-search svg { width: 16px; height: 16px; color: var(--ds-text-3); flex: none; }
.mk-search input { border: 0; outline: 0; background: transparent; color: var(--ds-text); font: inherit; font-size: .85rem; width: 15rem; max-width: 100%; min-height: 36px; }
.mk-search input::placeholder { color: var(--ds-text-3); }
.mk-sort { display: inline-flex; padding: 3px; border-radius: var(--ds-r-md); background: var(--ds-surface-2); }
.mk-sort__b { border: 0; background: transparent; color: var(--ds-text-2); font: inherit; font-size: .78rem; font-weight: 600; padding: .35rem .7rem; min-height: 32px; border-radius: var(--ds-r-sm); cursor: pointer; }
.mk-sort__b.is-on { background: var(--ds-surface-1); color: var(--ds-text); box-shadow: var(--ds-shadow-1); }
.mk-empty-q { margin: 0; text-align: center; padding: 1.5rem; border-radius: var(--ds-r-lg); border: 1px dashed var(--ds-line); color: var(--ds-text-2); font-weight: 700; font-size: .9rem; }
.mk-empty-q button { border: 0; background: none; color: var(--ds-primary-ink, hsl(199 89% 42%)); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ---------- sections ---------- */
.mk-sec { background: var(--ds-surface-1); border: 1px solid var(--ds-line); border-radius: var(--ds-r-xl); padding: clamp(.9rem, 2.2vw, 1.4rem); box-shadow: var(--ds-shadow-1); scroll-margin-top: 140px; }
.mk-sec__head { display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mk-sec__title { margin: 0; display: flex; align-items: center; gap: .55rem; font-size: 1.08rem; font-weight: 700; }
.mk-sec__title small { font-size: .7rem; font-weight: 600; color: var(--ds-text-3); padding: .1rem .45rem; border-radius: var(--ds-r-pill); background: var(--ds-surface-2); }
.mk-sec__ic { width: 10px; height: 22px; border-radius: 4px; flex: none; }
.mk-sec__ic.is-gold { background: linear-gradient(180deg, hsl(45 95% 55%), hsl(32 90% 50%)); }
.mk-sec__ic.is-crypto { background: linear-gradient(180deg, hsl(262 83% 66%), hsl(222 83% 60%)); }
.mk-sec__ic.is-fx { background: linear-gradient(180deg, hsl(199 89% 52%), hsl(170 70% 42%)); }
.mk-sec__ic.is-fg { background: linear-gradient(180deg, hsl(152 60% 45%), hsl(0 72% 56%)); }
.mk-sec__hint { margin: 0; font-size: .75rem; color: var(--ds-text-3); font-weight: 700; }

/* domestic cards */
.mk-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.mk-card { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: .85rem .9rem; border-radius: var(--ds-r-lg); background: var(--ds-bg); border: 1px solid var(--ds-line); min-width: 0; }
/* item 33: lift, shadow and timing come from the shared tile family (unify.css §29); the card keeps only its gold edge. */
.mk-card:hover { border-color: hsl(45 90% 50% / .55); }
.mk-card--skel { min-height: 118px; background: var(--ds-surface-2); border-color: transparent; }
.mk-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mk-card__link:focus-visible { outline: 2px solid hsl(199 89% 48%); outline-offset: 2px; }
.mk-card__top { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.mk-card__top .tf-coin { width: 30px; height: 30px; }
.mk-card__names { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.mk-card__names b { font-size: .8rem; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-card__names span { font-size: .68rem; color: var(--ds-text-3); font-weight: 700; }
.mk-card__price { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 650; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-card__price span { border-radius: var(--ds-r-xs); padding: 0 .15rem; }
.mk-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.mk-card__unit { font-size: .68rem; color: var(--ds-text-3); font-weight: 600; }
.mk-card .mk-chartbtn { position: relative; z-index: 2; }

/* chart button */
.mk-chartbtn { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--ds-r-sm); color: var(--ds-text-3); background: transparent; border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s; }
.mk-chartbtn svg { width: 16px; height: 16px; }
.mk-chartbtn:hover, .mk-chartbtn:focus-visible { color: hsl(199 89% 44%); background: hsl(199 89% 48% / .1); border-color: hsl(199 89% 48% / .3); outline: none; }

/* watchlist star */
.mk-star svg, .mk-tab__star { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mk-tab__star { width: 14px; height: 14px; flex: none; }
.mk-tab--fav { display: inline-flex; align-items: center; gap: .3rem; }
.mk-star.is-on { color: hsl(45 93% 47%); }
.mk-star.is-on svg { fill: currentColor; }
.mk-star:hover, .mk-star:focus-visible { color: hsl(45 93% 44%); background: hsl(45 93% 47% / .12); border-color: hsl(45 93% 47% / .35); }
.mk-star:active svg { transform: scale(.85); }
.mk-star svg { transition: transform .15s; }
.mk-card__acts, .mk-acts { display: inline-flex; align-items: center; gap: .15rem; position: relative; z-index: 2; }
.mk-empty-fav { display: grid; justify-items: center; gap: .35rem; margin: 0; text-align: center; padding: 1.5rem; border-radius: var(--ds-r-lg); border: 1px dashed var(--ds-line); color: var(--ds-text-2); font-size: .85rem; }
.mk-empty-fav b { font-weight: 700; color: var(--ds-text); font-size: .95rem; }
.mk-empty-fav[hidden] { display: none; }

/* tables */
.mk-tablewrap { overflow-x: auto; margin: 0 -.25rem; }
.mk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.mk-table thead th { position: sticky; top: 0; font-size: .72rem; font-weight: 600; color: var(--ds-text-3); text-align: start; padding: .55rem .75rem; border-bottom: 1px solid var(--ds-line); white-space: nowrap; }
.mk-table th.mk-num, .mk-table td.mk-num { text-align: end; }
.mk-table tbody td { padding: .55rem .75rem; border-bottom: 1px solid color-mix(in srgb, var(--ds-line) 60%, transparent); vertical-align: middle; }
.mk-table tbody tr:last-child td { border-bottom: 0; }
.mk-table tbody tr[data-sym] { transition: background .15s; }
.mk-table tbody tr[data-sym]:hover { background: hsl(199 89% 48% / .05); }
.mk-td-name a { display: inline-flex; align-items: center; gap: .6rem; color: var(--ds-text); text-decoration: none; min-height: 40px; }
.mk-td-name a:hover b { color: hsl(199 89% 44%); }
.mk-td-name .tf-coin { width: 28px; height: 28px; }
.mk-nm { display: flex; flex-direction: column; line-height: 1.3; }
.mk-nm b { font-weight: 700; white-space: nowrap; transition: color .15s; }
.mk-nm small { font-size: .68rem; font-weight: 700; color: var(--ds-text-3); text-align: start; }
.mk-td-price { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-td-price span { border-radius: var(--ds-r-xs); padding: 0 .2rem; }
.mk-chg { display: inline-flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.mk-cbar { display: block; width: 64px; height: 3px; border-radius: 3px; background: var(--ds-surface-2); overflow: hidden; direction: rtl; }
.mk-cbar > i { display: block; height: 100%; border-radius: inherit; background: var(--ds-text-3); transition: width .5s; }
.mk-cbar.is-up > i { background: hsl(152 60% 42%); }
.mk-cbar.is-down > i { background: hsl(0 72% 56%); }
.mk-col-toman { color: var(--ds-text-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-col-toman small, .mk-bub__amt small { font-size: .7em; color: var(--ds-text-3); }
.mk-table .mk-col-act { width: 1%; text-align: end; padding-inline-start: 0; }
.mk-ic-idx { display: inline-grid !important; place-items: center; font-size: 8.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(222 40% 28%), hsl(222 30% 18%)); letter-spacing: .02em; }
.mk-flags { display: inline-flex !important; align-items: center; direction: ltr; width: 30px; flex: none; }
.mk-flags .tf-flag { width: 19px; height: 19px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--ds-surface-1); }
.mk-flags .tf-flag + .tf-flag { margin-inline-start: -8px; }
.mk-movers .mk-flags { width: 24px; }
.mk-movers .mk-flags .tf-flag { width: 15px; height: 15px; }
.mk-movers .mk-flags .tf-flag + .tf-flag { margin-inline-start: -6px; }

/* gauges */
.mk-gauges { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem; background: none; border: 0; box-shadow: none; padding: 0; }
.mk-gcard { background: var(--ds-surface-1); border: 1px solid var(--ds-line); border-radius: var(--ds-r-xl); padding: clamp(.9rem, 2.2vw, 1.4rem); box-shadow: var(--ds-shadow-1); display: flex; flex-direction: column; min-width: 0; }
.mk-gcard__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.mk-gcard__tag { font-size: .68rem; font-weight: 600; color: var(--ds-text-3); padding: .15rem .55rem; border-radius: var(--ds-r-pill); background: var(--ds-surface-2); }
.mk-gcard__foot { margin: auto 0 0; padding-top: .75rem; font-size: .72rem; line-height: 1.8; color: var(--ds-text-3); }
.mk-bub { display: flex; flex-direction: column; gap: .5rem; }
.mk-bub__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem .75rem; padding: .6rem .75rem; border-radius: var(--ds-r-lg); background: var(--ds-bg); border: 1px solid var(--ds-line); }
.mk-bub__l { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.mk-bub__l span { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.mk-bub__l b { font-size: .85rem; font-weight: 700; }
.mk-bub__l small { font-size: .68rem; color: var(--ds-text-3); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-bub__r { display: inline-flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; }
.mk-bub__amt { font-size: .85rem; font-weight: 700; white-space: nowrap; }
.mk-bub__bar { grid-column: 1 / -1; display: block; height: 4px; border-radius: 4px; background: var(--ds-surface-2); overflow: hidden; }
.mk-bub__bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ds-text-3); transition: width .5s; }
.mk-bub__bar.is-calm > i { background: hsl(152 50% 45%); }
.mk-bub__bar.is-elevated > i { background: hsl(38 92% 50%); }
.mk-bub__bar.is-extreme > i { background: hsl(16 90% 52%); }
.mk-bub__bar.is-discount > i { background: hsl(199 89% 48%); }
.mk-unavail { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; padding: 1.25rem .5rem; }
.mk-unavail b { font-size: .9rem; font-weight: 700; }
.mk-unavail span { font-size: .78rem; color: var(--ds-text-2); max-width: 46ch; line-height: 1.8; }

.mk-seo { margin-top: 1rem; }

/* ---------- dark ---------- */
html.dark-theme .mk-breadth, html.dark-theme .mk-kpi, html.dark-theme .mk-sec, html.dark-theme .mk-gcard { background: hsl(222 30% 9%); border-color: hsl(0 0% 100% / .07); }
html.dark-theme .mk-card, html.dark-theme .mk-bub__row, html.dark-theme .mk-search { background: hsl(224 32% 6%); border-color: hsl(0 0% 100% / .08); }
html.dark-theme .mk-bar { background: hsl(222 30% 9% / .88); border-color: hsl(0 0% 100% / .08); }
html.dark-theme .mk-sort__b.is-on { background: hsl(222 24% 16%); }
html.dark-theme .mk-live[data-state="stale"] { color: hsl(40 95% 65%); }
html.dark-theme .mk-table tbody tr[data-sym]:hover { background: hsl(199 89% 48% / .08); }

/* ---------- responsive ---------- */
/* ---------- 24h mini charts (filled by the page script from api/public/quotes/spark-day) ---------- */
.mk-spark { display: block; height: 30px; min-width: 0; }
.mk-spark:empty { visibility: hidden; }
.mk-spark__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mk-spark__line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.mk-spark__area { fill: currentColor; opacity: .12; stroke: none; }
.mk-spark__svg.is-up { color: var(--ds-up-ink); }
.mk-spark__svg.is-down { color: var(--ds-down-ink); }
.mk-spark__svg.is-flat { color: var(--ds-text-3); }
.mk-card .mk-spark { height: 34px; margin-block: -.15rem .1rem; }
.mk-table .mk-col-spark { width: 112px; padding-inline: .5rem; }
.mk-table th.mk-col-spark { font-weight: 700; text-align: center; white-space: nowrap; }
.mk-table td.mk-col-spark .mk-spark { width: 96px; height: 28px; margin-inline: auto; }
@media (max-width: 900px) { .mk-table .mk-col-spark { display: none; } }
@media (prefers-reduced-motion: no-preference) { .mk-spark__svg { animation: mk-spark-in .5s ease both; } }
@keyframes mk-spark-in { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0); } }

@media (max-width: 1100px) { .mk-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .mk-hero { grid-template-columns: 1fr; }
  .mk-gauges { grid-template-columns: 1fr; }
  .mk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mk-hero__title { font-size: 1.75rem; }
  .mk-hero__sub { font-size: .85rem; }
  .mk-hero__cta .mk-btn { flex: 1; justify-content: center; }
  .mk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .mk-card { padding: .7rem; }
  .mk-card__top .tf-coin { width: 26px; height: 26px; }
  .mk-card .mk-chartbtn:not(.mk-star) { display: none; }
  .mk-bar { top: calc(var(--header-h, 56px) + .25rem); padding: .4rem; gap: .4rem; }
  .mk-tools { width: 100%; flex-wrap: nowrap; }
  .mk-search { flex: 1; min-width: 0; }
  .mk-search input { width: 100%; }
  .mk-sort__b { padding: .3rem .5rem; }
  .mk-col-toman { display: none; }
  .mk-table thead th, .mk-table tbody td { padding: .5rem .4rem; }
  .mk-td-name .tf-coin { width: 24px; height: 24px; }
  .mk-nm b { font-size: .82rem; }
  .mk-cbar { width: 48px; }
  .mk-chartbtn { width: 30px; height: 30px; }
  .mk-sec__hint { display: none; }
  .mk-bub__row { padding: .55rem .6rem; }
  .mk-bub__l .tf-coin { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-live__dot::after, .mk-skel { animation: none !important; }
  .mk-card, .mk-kpi, .mk-btn { transition: none; }
}

/* p32 (8.21): one type scale on /market — headings 700, names 600–700, prices 650 (tabular), labels/units 600, body 400.
   The page used 900/1000 for almost everything, which read as "too big and too bold" on desktop. */
/* item 27: the lighter heading scale stays scoped to /market on desktop only (the one place it was asked for). */
@media (min-width: 1024px) {
  .mk-page { --ds-fw-black: 760; --font-weight-black: 780; }
  .mk-page :is(.t-display, .t-h1) { font-weight: 800; }
  .mk-page :is(.t-h2, .dv-price, .stat-figure) { font-weight: 750; }
}
@media (min-width: 1024px) { .mk-card__price { font-size: 1.1rem; } .mk-kpi__p { font-size: 1.22rem; } .mk-hero__title { font-size: clamp(1.8rem, 3.2vw, 2.4rem); } }

/* p34 (7.4) market heatmap */
.mk-heat { --mk-heat-flat: hsl(215 16% 50% / .16); margin-top: 1rem; padding: 1rem; border-radius: var(--ds-r-lg); background: hsl(var(--card)); border: 1px solid hsl(var(--border)); }
.mk-heat__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.mk-heat__title { font-size: 1rem; font-weight: 800; margin: 0; }
.mk-heat__legend { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; color: hsl(var(--muted-foreground)); direction: ltr; }
.mk-heat__legend i { width: 90px; height: 8px; border-radius: var(--ds-r-pill); background: linear-gradient(90deg, hsl(357 72% 52%), hsl(215 16% 50% / .25), hsl(152 62% 38%)); }
.mk-heat__groups { display: grid; gap: .9rem; }
.mk-heat__gt { font-size: .75rem; font-weight: 700; color: hsl(var(--muted-foreground)); margin-bottom: .4rem; }
.mk-heat__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: 62px; gap: 4px; }
.mk-heat__t { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 4px 6px; border-radius: var(--ds-r-sm);
  text-decoration: none; color: hsl(var(--foreground)); text-align: center; overflow: hidden; transition: background-color .4s, transform .15s, box-shadow .15s; }
.mk-heat__t.is-lead { grid-column: span 2; grid-row: span 2; }
.mk-heat__t.is-lead .mk-heat__n { font-size: .95rem; }
.mk-heat__t.is-lead .mk-heat__c { font-size: 1.05rem; }
.mk-heat__t.is-strong { color: #fff; }
.mk-heat__t:hover, .mk-heat__t:focus-visible { transform: scale(1.03); box-shadow: 0 0 0 2px hsl(var(--primary) / .6); z-index: 1; }
.mk-heat__n { font-size: .74rem; font-weight: 700; line-height: 1.4; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-heat__c { font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mk-heat__skel { height: 140px; border-radius: var(--ds-r-md); background: linear-gradient(90deg, hsl(var(--muted) / .5), hsl(var(--muted) / .9), hsl(var(--muted) / .5)); background-size: 200% 100%; animation: mkHeatSk 1.4s linear infinite; }
@keyframes mkHeatSk { to { background-position: -200% 0; } }
html.dark-theme .mk-heat { background: hsl(222 30% 9%); border-color: hsl(0 0% 100% / .07); }
@media (max-width: 640px) { .mk-heat__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 56px; } .mk-heat__legend i { width: 60px; } }
@media (prefers-reduced-motion: reduce) { .mk-heat__t, .mk-heat__skel { transition: none; animation: none; } }
