/* ChainRegistry — the market map (/market, Holo 2, 2026-10-26). Tokens and the shared pieces (.instrument, .figure, .provenance, .chip,
   .section-head) come from site.css; the Field has its own public/css/field.css, because the home page shows it too. This file: the facts strip, the field's legend, the market-cap treemap and its caption, the reading notes. */

/* ---- facts: four instruments, the total cap first and widest */
.mk-facts{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));gap:16px;margin:24px 0 0}
.mk-cap .instrument-body{align-items:flex-end}
.mk-cap .figure{font-size:clamp(40px,5.4vw,80px)}
.mk-prov{gap:3px 0}
.mk-prov>span{white-space:nowrap}
.mk-prov>span+span::before{content:'·';margin:0 8px;color:var(--faint)}
.mk-bar{display:flex;align-items:stretch;height:var(--ih);min-height:0;gap:2px}
.mk-bar span{position:relative;display:block;min-width:2px;border-radius:2px}
.mk-bar b{position:absolute;left:6px;top:50%;transform:translateY(-50%);font:600 10.5px var(--mono);letter-spacing:.06em;color:var(--text);white-space:nowrap}
.mk-lead .l0{background:linear-gradient(180deg,rgba(110,243,255,.42),rgba(110,243,255,.2))}
.mk-lead .l1{background:linear-gradient(180deg,rgba(201,184,255,.36),rgba(201,184,255,.16))}
.mk-lead .l2{background:linear-gradient(180deg,rgba(255,107,241,.32),rgba(255,107,241,.14))}
.mk-lead .l1 b,.mk-lead .l2 b{display:none}
.mk-lead .rest{flex:1;background:repeating-linear-gradient(90deg,rgba(201,184,255,.1) 0 1px,transparent 1px 4px)}
@media (min-width:1300px){.mk-lead .l1 b{display:block}}
.mk-split .u{background:linear-gradient(180deg,color-mix(in oklab,var(--tone-up) 70%,transparent),color-mix(in oklab,var(--tone-up) 34%,transparent))}
.mk-split .f{background:color-mix(in oklab,var(--tone-flat) 30%,transparent)}
.mk-split .d{background:linear-gradient(180deg,color-mix(in oklab,var(--tone-down) 70%,transparent),color-mix(in oklab,var(--tone-down) 34%,transparent))}
.mk-venues ol{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px 2px;list-style:none;margin:0;padding:0;width:100%}
.mk-venues li{display:flex;flex-direction:column;align-items:center;gap:4px;font:500 10px/1 var(--mono);letter-spacing:0;color:var(--faint)}
.mk-venues li i{width:7px;height:7px;border-radius:50%;border:1px solid rgba(201,184,255,.45)}
.mk-venues li.on{color:var(--text-2)}
.mk-venues li.on i{border:0;background:var(--cyan);box-shadow:0 0 8px var(--cyan-glow)}
/* below the desktop row the cap takes the width and its figure can be big without the reserved headroom; the other three share a row */
@media (max-width:1100px){.mk-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.mk-cap{grid-column:1/-1}.mk-cap .instrument-body{min-height:0}.mk-cap .figure{font-size:clamp(52px,10vw,80px)}}
@media (max-width:760px){.mk-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.mk-facts>:last-child{grid-column:1/-1}.mk-venues ol{grid-template-columns:repeat(12,minmax(0,1fr))}}
@media (max-width:640px){.mk-facts{grid-template-columns:minmax(0,1fr);gap:12px}.mk-prov{gap:3px 14px}.mk-prov>span+span::before{content:none}}

/* ---- the field's legend */
.mk-legend{display:grid;grid-template-columns:auto auto auto auto;justify-content:space-between;gap:14px 28px;list-style:none;margin:16px 0 0;padding:0;font-size:13px;line-height:1.4;color:var(--muted)}
.mk-legend li{display:flex;align-items:center;gap:12px;min-width:0}
.mk-legend li>span:last-child{max-width:30ch}
.mk-legend b{display:block;margin-bottom:2px;font:500 10.5px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--lavender-text)}
@media (max-width:1100px){.mk-legend{grid-template-columns:repeat(2,minmax(0,1fr))}.mk-legend li>span:last-child{max-width:none}}
@media (max-width:640px){.mk-legend{grid-template-columns:minmax(0,1fr)}.mk-rings{display:none!important}} /* phones draw no rings */
.mk-legend svg{width:40px;height:30px;flex:none;overflow:visible}
.mk-legend circle{fill:none;stroke:rgba(201,184,255,.55);stroke-width:1}
.mk-legend .core{fill:var(--tone-up);stroke:none;opacity:.9}
.mk-scale{display:inline-flex;flex:none;gap:2px}
.mk-scale i{width:10px;height:10px;border-radius:50%;background:var(--tone-flat);opacity:.7}
.mk-scale [class^=u]{background:var(--tone-up)}.mk-scale [class^=d]{background:var(--tone-down)}
.mk-scale .u1,.mk-scale .d1{opacity:.4}.mk-scale .u2,.mk-scale .d2{opacity:.6}.mk-scale .u3,.mk-scale .d3{opacity:.8}.mk-scale .u4,.mk-scale .d4{opacity:1}
.mk-axes{flex:none;white-space:nowrap;font:600 14px var(--mono);color:var(--lavender-text)}

/* ---- the market-cap treemap: tiles placed in percent of the map, the wide layout here and the tall one on phones (both squarified on
   the server); a tile shows as much text as fits it (container queries), 2px of plate between tiles */
.mk-tiles{position:relative}
.mk-map[aria-busy=true] .tm{opacity:.55;transition:opacity var(--t-fast)}
.mk-cats{margin:0 0 12px}
.mk-cats{position:relative}
.mk-cats small{font-size:inherit;color:var(--faint);margin-left:4px}
.mk-cats .chip:hover small{color:inherit}
.chip.on small{color:inherit;opacity:.8}
/* on a phone the filters are one row that scrolls, tall enough for a thumb, fading out where more of them wait */
@media (max-width:640px){
  .mk-cats{flex-wrap:nowrap;overflow-x:auto;margin-inline:-14px;padding:3px 40px 3px 14px;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 36px),#0000)}
  .mk-cats::-webkit-scrollbar{display:none}
  .mk-cats .chip{display:inline-flex;align-items:center;flex:none;min-height:40px}
}
.mk-sum{margin:10px 0 0;justify-content:flex-end}
.tm{position:relative;height:560px;background:#06060b;border:1px solid var(--line-2);border-radius:var(--r);overflow:hidden;contain:layout paint}
.tm a{--tone:var(--tone-flat);--m:.3;position:absolute;left:calc(var(--x) * 1%);top:calc(var(--y) * 1%);width:calc(var(--w) * 1%);height:calc(var(--h) * 1%);border:1px solid #06060b;color:var(--text);overflow:hidden;container-type:size;text-decoration:none;
  background:radial-gradient(120% 90% at 0 0,color-mix(in oklab,var(--tone) calc(10% + var(--m) * 26%),transparent),transparent 70%),linear-gradient(180deg,color-mix(in oklab,var(--tone) calc(12% + var(--m) * 30%),#0b0b14),color-mix(in oklab,var(--tone) calc(6% + var(--m) * 18%),#0b0b14));
  box-shadow:inset 0 1px 0 color-mix(in oklab,var(--tone) calc(30% + var(--m) * 40%),transparent);transition:filter var(--t-fast)}
.tm [class^=u]{--tone:var(--tone-up)}.tm [class^=d]{--tone:var(--tone-down)}
.tm .u1,.tm .d1{--m:.25}.tm .u2,.tm .d2{--m:.5}.tm .u3,.tm .d3{--m:.75}.tm .u4,.tm .d4{--m:1}
.tm a:hover,.tm a.on{filter:brightness(1.3) saturate(1.15);z-index:1}
.tm a:focus-visible{outline:2px solid var(--cyan);outline-offset:-3px;z-index:2}
.tm span{display:none;position:absolute;left:7px;white-space:nowrap;font-family:var(--mono);line-height:1.1;pointer-events:none}
.tm .k{top:6px;font-size:11px;font-weight:600;letter-spacing:.05em}
.tm .c{top:21px;font-size:10.5px;color:rgba(244,244,255,.8);font-variant-numeric:tabular-nums}
@container (min-width:42px) and (min-height:22px){.tm .k{display:block}}
@container (min-width:60px) and (min-height:38px){.tm .c{display:block}}
/* a big tile reads like a label on a crate: the name large, then the ticker, the price and the day */
@container (min-width:150px) and (min-height:100px){
  .tm .n{display:block;top:auto;bottom:clamp(30px,22cqh,64px);left:12px;right:12px;font:600 clamp(16px,13cqmin,52px)/1 var(--sans);letter-spacing:-.02em;overflow:hidden;text-overflow:ellipsis}
  .tm .k{top:12px;left:12px;font-size:12px;color:rgba(244,244,255,.82)}
  .tm .k.s{display:none} /* the name below already says it (BNB, XRP) */
  .tm .p{display:block;left:12px;bottom:12px;font-size:clamp(12px,5cqmin,20px);font-weight:600;font-variant-numeric:tabular-nums}
  .tm .c{top:12px;left:auto;right:12px;font-size:clamp(11px,4cqmin,16px);font-weight:600}
}
@media (max-width:640px){
  .tm{height:540px}
  .tm a{left:calc(var(--X) * 1%);top:calc(var(--Y) * 1%);width:calc(var(--W) * 1%);height:calc(var(--H) * 1%)}
}
@media (forced-colors:active){.tm a{border-color:Canvas;background:CanvasText;color:Canvas}}

/* ---- how to read it (the hover caption over tiles and bodies is field.js's .fld-hud) */
.mk-read-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.mk-read-grid h3{font:500 10.5px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--lavender-text);margin:0 0 8px}
.mk-read-grid p{margin:0;color:var(--text-2);max-width:60ch}
@media (max-width:900px){.mk-read-grid{grid-template-columns:minmax(0,1fr);gap:18px}}
