/* Z5 — ZIP explorer + profile styles. Layered on the Markets design system (markets.css supplies
 * the base typography/color/topbar/footer). Mobile-first, overflow-safe (no element may widen the
 * viewport 320px→desktop). Uses var() with safe fallbacks so it inherits Markets tokens but never
 * breaks if one is missing. */
.zip-profile { max-width: 860px; margin: 0 auto; padding: 1rem 1rem 4rem; box-sizing: border-box; overflow-wrap: anywhere; }
.zip-profile * { box-sizing: border-box; max-width: 100%; }
/* profile-only breadcrumb sizing; the explorer inherits the shared flagship .crumbs (markets.css) for parity */
.zip-profile .crumbs { font-size: .82rem; color: var(--muted, #64748b); margin-bottom: .6rem; }
.zip-profile .crumbs a { color: inherit; }
.zip-id .eyebrow { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #64748b); margin: 0 0 .2rem; }
.zip-id h1 { margin: .1rem 0 .4rem; font-size: clamp(1.35rem, 4.5vw, 2rem); line-height: 1.15; }
.tier-badge { display: inline-block; font-size: .76rem; padding: .22rem .7rem; border-radius: 999px; background: var(--chip, #f1f5f9); color: var(--ink, #0f172a); }
.tier-ranked { background: #dcfce7; color: #14532d; } .tier-limited, .tier-geography-only { background: #fef3c7; color: #7c2d12; }
.rel { font-size: .9rem; color: var(--muted, #475569); background: var(--card2, #f8fafc); border-left: 3px solid var(--accent, #3b82f6); padding: .55rem .8rem; border-radius: .35rem; margin: .9rem 0; }

/* score + rank cards */
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0 .5rem; }
.zcard { border: 1px solid var(--line, #e2e8f0); border-radius: .7rem; padding: 1rem; background: var(--card, #fff); }
.score-card .score-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.score-card h3 { margin: 0; font-size: 1rem; }
.score-num { font-size: 1.9rem; font-weight: 700; color: var(--accent, #2563eb); line-height: 1; }
.score-num small { font-size: .85rem; font-weight: 500; color: var(--muted, #94a3b8); }
.score-card.rental .score-num { color: #7c3aed; }
.bar { height: 8px; background: var(--line, #e2e8f0); border-radius: 999px; overflow: hidden; margin: .5rem 0 .4rem; }
.bar i { display: block; height: 100%; background: var(--accent, #3b82f6); }
.score-card.rental .bar i { background: #8b5cf6; }
.rankline { font-size: .82rem; margin: .3rem 0; } .rankline .pctl { color: var(--muted, #64748b); }
.two-axis { margin: .3rem 0 1rem; }
.unranked { background: #fffbeb; border-color: #fde68a; margin: 1rem 0; }
.unranked h3 { margin: 0 0 .3rem; }

/* metric grid */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin: .5rem 0 1rem; }
.metric { border: 1px solid var(--line, #eef2f7); border-radius: .55rem; padding: .6rem .7rem; background: var(--card, #fff); }
.metric-v { font-size: 1.15rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-k { font-size: .74rem; color: var(--muted, #64748b); margin-top: .15rem; }
.metric-k .moe { color: #94a3b8; }

.read { margin: .3rem 0 1rem; padding-left: 1.1rem; } .read li { margin: .35rem 0; font-size: .92rem; }
.calc-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.calc-row .tcard { flex: 1 1 30%; min-width: 130px; display: flex; justify-content: space-between; padding: .6rem .8rem; border: 1px solid var(--line, #cbd5e1); border-radius: .55rem; text-decoration: none; color: inherit; }
.calc-row .tcard:hover { border-color: var(--accent, #93c5fd); }
.calc-row .tt { font-weight: 600; } .calc-row .tg { color: var(--accent, #2563eb); }
.related { margin: 2rem 0 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .7rem; }
.related-grid a { display: flex; flex-direction: column; gap: .2rem; min-height: 88px; padding: .85rem .9rem; border: 1px solid var(--line, #e2e8f0); border-radius: .7rem; background: var(--card, #fff); color: var(--accent, #2563eb); text-decoration: none; }
.related-grid a:hover { border-color: var(--accent, #2563eb); }
.related-grid a span { color: var(--muted, #64748b); font-size: .78rem; line-height: 1.45; }

details.evidence { margin: 1.2rem 0; border: 1px solid var(--line, #e2e8f0); border-radius: .6rem; padding: 0 .9rem; }
details.evidence summary { cursor: pointer; padding: .8rem 0; font-weight: 600; }
.ev-table { width: 100%; border-collapse: collapse; font-size: .84rem; margin: .3rem 0 .6rem; }
.ev-table th, .ev-table td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--line, #eef2f7); vertical-align: top; }
.ev-table th { font-weight: 600; width: 42%; }
.cls { display: inline-block; font-size: .66rem; padding: .04rem .35rem; border-radius: .3rem; background: #e2e8f0; }
.cls-survey { background: #dbeafe; } .cls-derived { background: #ede9fe; } .cls-admin { background: #fef9c3; }
.fine { font-size: .78rem; color: var(--muted, #64748b); } .limited { color: #92400e; }

/* ---- explorer: the shared Markets component system (/assets/markets-ui.css, scoped to .mkt-ui on the
   #zip-app mount) now supplies the leaderboard pills, the integrated filter/toolbar surface, active-filter
   chips, the result count, the semantic desktop table and the compare tray — identical to the flagship
   Best Balanced Markets screen. Only genuinely ZIP-specific supplements remain here: a text-left Place
   column, the non-sortable select-column header, and the polished phone cards. (The ZIP explorer keeps
   cards at phone widths; the flagship uses a horizontally-scrolling table. Light-only, matching the
   flagship — the explorer has no dark theme; the ZIP profile below keeps its own.) ---- */
#zip-app .zc-lft { text-align: left; }
#zip-app .mkt-thead th.zc-selh { cursor: default; }
/* polished phone cards (≤760px) — part of the same light system as the shared table */
.zip-cards { display: grid; gap: .7rem; grid-template-columns: 1fr; }
.zip-card2 { position: relative; border: 1px solid var(--mhair, #e6eaf1); border-radius: 12px; padding: .85rem .9rem; background: var(--msurf, #fff); box-shadow: 0 1px 2px rgba(16,40,60,.05); }
.zip-card2.sel { border-color: var(--macc, #3a52c8); box-shadow: 0 0 0 1px var(--macc, #3a52c8) inset; }
.zip-card2 .zc-cksel { position: absolute; top: .6rem; right: .6rem; }
.zip-card2 .zc-ck { width: 24px; height: 24px; cursor: pointer; accent-color: var(--macc, #3a52c8); }
.zip-card2 .zc-head { display: block; text-decoration: none; color: inherit; padding-right: 1.8rem; }
.zip-card2 .zc-head:hover { text-decoration: none; }
.zip-card2 .zc-head .z { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--mink, #141922); }
.zip-card2 .zc-head .sub { display: block; font-size: .8rem; color: var(--mmut, #586274); margin-top: .1rem; }
.zcm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .9rem; margin-top: .7rem; }
.zcm { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; border-bottom: 1px dotted var(--mhair, #e6eaf1); padding-bottom: .2rem; }
.zcm-k { color: var(--mmut, #586274); } .zcm-v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mink, #141922); }
/* Q2: mobile ZIP card headline band — Overall score, Grade chip, and canonical National/State rank */
.zip-card2 .zc-hd2 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .55rem; }
.zip-card2 .zc-ov { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--mink, #141922); }
.zip-card2 .zc-ov small { font-weight: 500; font-size: .68rem; color: var(--mmut, #586274); }
.zip-card2 .zc-rk { font-size: .8rem; color: var(--mmut, #586274); font-variant-numeric: tabular-nums; }
.zip-card2 .zc-rk b { color: var(--mink, #141922); font-weight: 700; }
.zip-card2 .zc-nr { font-style: italic; }

/* Z9-A: ZIP watchlist widget (profile) */
.zip-watch { display: inline-block; margin-left: .5rem; vertical-align: middle; min-height: 34px; }
.zw-btn { display: inline-flex; align-items: center; gap: .3rem; font: inherit; font-size: .82rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--accent, #2563eb); background: transparent; color: var(--accent, #2563eb); cursor: pointer; text-decoration: none; min-height: 34px; box-sizing: border-box; }
.zw-btn:hover { background: rgba(37,99,235,.08); }
.zw-btn.zw-saved { background: var(--accent, #2563eb); color: #fff; }
.zw-signin { border-style: dashed; }
.zw-err { font-size: .78rem; color: var(--bad, #b91c1c); margin-left: .4rem; }

/* Track E: scoped rank matrix + two-axis quadrant on ZIP profiles */
.rankmatrix, .quadrant, .changetrack { margin: 1.1rem 0; }
.rmx-tbl { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 320px; }
.rmx-tbl th, .rmx-tbl td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line, #eef2f7); vertical-align: top; }
.rmx-tbl thead th { font-weight: 600; }
.rmx-tbl td { font-variant-numeric: tabular-nums; font-weight: 600; }
.rmx-tbl td small, .rmx-tbl th small { display: block; font-weight: 400; color: var(--muted, #64748b); font-size: .72rem; margin-top: 1px; }
.rmx-tbl a { color: var(--accent, #2563eb); text-decoration: none; } .rmx-tbl a:hover { text-decoration: underline; }
.quad-wrap { position: relative; max-width: 320px; margin: .4rem 0; }
.quad-svg { width: 100%; height: auto; aspect-ratio: 1/1; border: 1px solid var(--line, #e2e8f0); border-radius: .5rem; background: var(--card2, #f8fafc); }
.quad-mid { stroke: var(--muted, #94a3b8); stroke-width: .6; stroke-dasharray: 3 2; opacity: .7; }
.quad-dot { fill: var(--accent, #2563eb); stroke: #fff; stroke-width: 1.5; }
.quad-axes { font-size: .66rem; color: var(--muted, #64748b); }
.quad-axes span { position: absolute; }
.qx-left { left: 2px; top: 50%; transform: translateY(-50%); } .qx-right { right: 2px; top: 50%; transform: translateY(-50%); }
.qy-top { top: 2px; left: 50%; transform: translateX(-50%); } .qy-bot { bottom: 2px; left: 50%; transform: translateX(-50%); }
.quad-fallback { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .3rem; }
.quad-fallback th, .quad-fallback td { text-align: left; padding: .3rem .5rem; border-bottom: 1px solid var(--line, #eef2f7); }
.quad-fallback caption { text-align: left; caption-side: top; }
@media (prefers-reduced-motion: reduce) { .quad-dot, .quad-mid { transition: none; } }
@media (max-width: 560px) {
  .score-grid { grid-template-columns: 1fr; }
}
/* Z11 — percentile meter (score cards): fill + fixed national-median tick + position dot */
.meter { position: relative; height: 10px; background: var(--line, #e2e8f0); border-radius: 999px; margin: .55rem 0 .3rem; }
.meter-fill { height: 100%; background: var(--accent, #3b82f6); border-radius: 999px; }
.score-card.rental .meter-fill { background: #8b5cf6; }
.meter-med { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 2px; transform: translateX(-50%); background: var(--muted, #64748b); border-radius: 2px; }
.meter-dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--card, #fff); border: 3px solid var(--accent, #2563eb); transform: translate(-50%, -50%); }
.score-card.rental .meter-dot { border-color: #7c3aed; }
.meter-ax { display: flex; justify-content: space-between; margin-bottom: .35rem; }

/* Z11 — government-context modules (rent burden, recently built) */
.card-context { border: 1px solid var(--line, #e2e8f0); border-radius: .7rem; padding: 1rem; background: var(--card, #fff); margin: 1rem 0; }
.card-context h2 { margin: 0 0 .3rem; font-size: 1.02rem; }
.rb-bar { display: flex; height: 16px; border-radius: 6px; overflow: hidden; margin: .5rem 0 .55rem; background: var(--line, #e2e8f0); }
.rb-seg { display: block; height: 100%; min-width: 2px; }
.rb-seg.rb-ok, .rb-legend i.rb-ok { background: #1baf7a; }
.rb-seg.rb-warn, .rb-legend i.rb-warn { background: #e0a72e; }
.rb-seg.rb-crit, .rb-legend i.rb-crit { background: #d9534f; }
.rb-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-bottom: .5rem; }
.rb-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.rb-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.yb-bar { height: 10px; background: var(--line, #e2e8f0); border-radius: 999px; overflow: hidden; margin: .4rem 0 .2rem; }
.yb-bar i { display: block; height: 100%; background: var(--accent, #3b82f6); border-radius: 999px; }

/* Z12 — nearby ZIP Codes table (shared-boundary) */
.nearby-zips .nb-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 580px; }
.nb-tbl th, .nb-tbl td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line, #eef2f7); white-space: nowrap; vertical-align: top; }
.nb-tbl tr:last-child td { border-bottom: none; }
.nb-tbl th { font-weight: 600; color: var(--muted, #64748b); font-size: .76rem; }
.nb-tbl th small, .nb-tbl td small { display: block; font-weight: 400; color: var(--muted, #94a3b8); font-size: .68rem; margin-top: 1px; }
.nb-tbl td.nb-num { text-align: right; font-variant-numeric: tabular-nums; }
.nb-tbl .nb-z a { color: var(--accent, #2563eb); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.nb-tbl .nb-z a:hover { text-decoration: underline; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Dark theme applies to the ZIP PROFILE only. The explorer's results surface is the shared,
   light-only .mkt-ui component system (parity with the flagship, which has no dark theme). */
/* Z15 — overall Rental Investor ZIP Score (profile): grade block + category meters */
.overall-card { border: 1px solid var(--line, #e2e8f0); border-radius: .8rem; padding: 1.1rem; background: var(--card, #fff); margin: 1rem 0; }
.overall-card .gradeblock { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.overall-card .ovscore b { font-size: 1.9rem; color: var(--accent, #2563eb); line-height: 1; } .overall-card .ovscore span { color: var(--muted, #64748b); font-size: .85rem; }
.overall-card .grank { font-size: .9rem; margin-top: .25rem; } .overall-card .grank .pctl { color: var(--muted, #64748b); }
.overall-card .gstand { font-size: .82rem; color: var(--muted, #64748b); margin-top: .15rem; }
.catmeters { margin: .7rem 0 .3rem; }
.catrow { display: grid; grid-template-columns: 1fr 2.2rem; align-items: center; gap: .05rem .6rem; margin: .45rem 0; }
.catlab { grid-column: 1 / -1; font-size: .82rem; font-weight: 600; }
.catlab .catgeo { font-weight: 400; font-size: .68rem; color: var(--muted, #94a3b8); text-transform: uppercase; letter-spacing: .03em; margin-left: .3rem; }
.catrow .meter { grid-column: 1; grid-row: 2; margin: .1rem 0; }
.catval { grid-column: 2; grid-row: 2; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.why-good { border-left: 3px solid #1baf7a; padding-left: .6rem; } .why-watch { border-left: 3px solid #e0a72e; padding-left: .6rem; }
.sub-h { font-size: 1.02rem; margin: 1.3rem 0 .3rem; }

/* Q3-A hero subtitle + Q3-C metric meta */
.zip-sub { margin: .15rem 0 .5rem; }
.metric-meta { margin: .1rem 0 .2rem; }

/* Q3-B dual-scope percentile card — the bars reuse the shared city .npcard/.mrow/.mtrack system
   (markets.css); only the National/State toggle header + gated-row state are ZIP-specific. */
.zip-scope-card .scope-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.zip-scope-card .scope-head h2 { margin: 0; }
.scope-toggle { display: inline-flex; gap: 2px; background: var(--chip, #f1f5f9); border: 1px solid var(--line, #e2e8f0); border-radius: 999px; padding: 3px; }
.scope-btn { appearance: none; border: 0; background: transparent; color: var(--muted, #475569); font: 600 .8rem/1 'Inter', system-ui, sans-serif; letter-spacing: .01em; padding: .5rem .9rem; min-height: 44px; border-radius: 999px; cursor: pointer; }
.scope-btn.on, .scope-btn[aria-pressed="true"] { background: var(--accent, #2563eb); color: #fff; }
.scope-btn:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.mrow.mrow-na { opacity: .62; }
.mrow.mrow-na .mn { color: var(--muted, #64748b); }
.msub-ctx { color: var(--muted, #94a3b8); text-transform: uppercase; letter-spacing: .03em; font-size: .62rem; }
.trend-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem 1.2rem; flex-wrap: wrap; margin-bottom: .8rem; }
.trend-head .eyebrow { margin-bottom: .25rem; }
.trend-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line, #e2e8f0); border-radius: 11px; background: #eef2f7; }
.trend-tab { appearance: none; border: 0; border-radius: 8px; min-height: 44px; padding: .55rem .85rem; background: transparent; color: var(--muted, #475569); font: 600 .82rem/1 'Inter', system-ui, sans-serif; cursor: pointer; }
.trend-tab.on, .trend-tab[aria-selected="true"] { background: #fff; color: var(--accent, #2563eb); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.trend-tab:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.trend-summary { margin: .4rem 0 .8rem; color: var(--muted, #586274); font-size: .82rem; line-height: 1.55; }
.trend-summary > p { margin: .6rem 0 0; }
.trend-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .8rem; }
.trend-facts span { display: flex; flex-direction: column; padding: .65rem .75rem; background: #f8fafc; border: 1px solid var(--line, #e2e8f0); border-radius: .55rem; }
.trend-facts b { color: var(--ink, #141922); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .15rem; }
.trend-unavailable { min-height: 220px; display: grid; align-content: center; text-align: center; padding: 1rem; color: var(--muted, #586274); }
.trend-unavailable b { color: var(--ink, #141922); }
.trend-unavailable p { margin: .4rem auto 0; max-width: 46ch; }
.trend-source { margin: .75rem 0 0; border: 1px solid var(--line, #e2e8f0); border-radius: .7rem; background: #fff; }
.trend-source summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; padding: .7rem .85rem; font-weight: 650; }
.trend-source > p { margin: 0 .85rem .7rem; }
.zhist-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-block: 1px solid var(--line, #e2e8f0); }
.zhist-table-scroll:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: -2px; }
.zhist-tbl { min-width: 680px; width: 100%; margin: 0; table-layout: auto; }
.zhist-tbl th, .zhist-tbl td { width: auto; min-width: 112px; white-space: nowrap; padding: .65rem .75rem; font-variant-numeric: tabular-nums; }
.zhist-tbl th:first-child { min-width: 175px; }
.zhist-tbl small { display: block; color: var(--muted, #667085); font-weight: 400; margin-top: .12rem; }
.zhist-tbl caption { text-align: left; padding: .65rem .75rem; color: var(--muted, #667085); font-size: .76rem; }
.zhist-cards { display: none; }
@media (max-width: 430px) {
  .zip-profile { padding-inline: .8rem; }
  .overall-card { padding: .9rem; }
  .overall-card .gradeblock { align-items: flex-start; gap: .65rem .9rem; }
  .overall-card .ovscore b { font-size: 1.7rem; }
  .catrow { gap: .05rem .45rem; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-width: 0; }
  .metric-v { font-size: 1rem; }
  .zip-scope-card .scope-head { align-items: flex-start; }
  .zip-scope-card .cardlede { min-height: 6em; }
  .scope-toggle { width: 100%; } .scope-btn { flex: 1; }
  .trend-tabs { width: 100%; }
  .trend-tab { flex: 1; padding-inline: .45rem; }
  .trend-facts, .related-grid { grid-template-columns: 1fr; }
  .zhist-table-scroll { display: none; }
  .zhist-cards { display: grid; gap: .7rem; padding: 0 .75rem .8rem; }
  .zhist-card { border: 1px solid var(--line, #e2e8f0); border-radius: .65rem; background: #f8fafc; overflow: hidden; }
  .zhist-card header { padding: .7rem .75rem .55rem; border-bottom: 1px solid var(--line, #e2e8f0); }
  .zhist-card h3 { margin: 0; font-size: .92rem; }
  .zhist-card header p { margin: .12rem 0 0; color: var(--muted, #667085); font-size: .75rem; }
  .zhist-card dl { margin: 0; }
  .zhist-card dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .7rem; align-items: start; padding: .65rem .75rem; border-bottom: 1px solid var(--line, #e2e8f0); }
  .zhist-card dl > div:last-child { border-bottom: 0; }
  .zhist-card dt { min-width: 0; color: var(--muted, #586274); font-size: .76rem; line-height: 1.35; }
  .zhist-card dt small { display: block; margin-top: .1rem; font: 600 .66rem/1.3 'JetBrains Mono', monospace; color: var(--muted, #667085); }
  .zhist-card dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
  .zhist-card dd span { display: block; margin-top: .12rem; color: var(--muted, #667085); font-size: .66rem; font-weight: 400; white-space: nowrap; }
}
@media (max-width: 350px) {
  .metric-grid { grid-template-columns: 1fr; }
  .zip-scope-card .cardlede { min-height: 7.5em; }
}

/* ZIP explorer paired numeric ranges. Kept here (rather than the generated shared markets UI
   stylesheet) because these fieldsets are specific to the ZIP explorer's compact index schema. */
.mkt-range-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; min-width: 230px; margin: 0; padding: 8px 9px 9px; border: 1px solid var(--mhair); border-radius: 10px; }
.mkt-range-pair legend { padding: 0 4px; color: var(--mmut); font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.mkt-range-pair .mkt-num { width: 100%; }
.mkt-adv .mkt-range-pair { flex: 1 1 230px; }
@media (max-width: 640px) {
  .mkt-tools.open .mkt-range-pair { width: 100%; min-width: 0; flex: none; }
  .mkt-tools.open .mkt-range-pair .mkt-lab { width: auto; min-width: 0; }
}
