/* CoinAlmanac design system. Original. No external fonts, no frameworks. */

:root {
  --bg: #0f1a2b;
  --bg-2: #14223a;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --line: #dde3ec;
  --ink: #16202e;
  --ink-2: #4a5568;
  --ink-3: #5f6a7a;
  --accent: #e0a020;
  --accent-ink: #7a5200;
  --accent-soft: #fff4dc;
  --up: #127545;
  --up-soft: #e6f6ee;
  --down: #c0352c;
  --down-soft: #fdeceb;
  --focus: #2f6fed;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --wrap: 1180px;
  --fs-0: 13px;
  --fs-1: 15px;
  --fs-2: 17px;
  --fs-3: 21px;
  --fs-4: 28px;
  --fs-5: 36px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans KR", "Noto Sans JP", "Nirmala UI", "Noto Sans Devanagari", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* 中文/日文/韩文习惯：红涨绿跌 */
html[data-updown="cn"] { --up: #c0352c; --up-soft: #fdeceb; --down: #127545; --down-soft: #e6f6ee; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-1);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface-2);
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}
img, svg, canvas { max-width: 100%; display: inline-block; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 .75em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
.sr, .skip { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; margin: 0; clip: auto; clip-path: none; padding: 8px 12px; background: var(--surface); color: var(--ink); z-index: 100; border-radius: var(--radius-sm); }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-0); }
.center { text-align: center; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank { width: 2.5em; color: var(--ink-3); text-align: right; }

/* ---------- Top bar ---------- */
.topbar { background: var(--bg); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.topbar__in { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; font-size: var(--fs-2); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--accent); flex: none; }
.brand--sm { color: var(--ink); font-size: var(--fs-2); margin-bottom: 8px; }

.mainnav { flex: 1; display: flex; align-items: center; }
.navtoggle { position: absolute; opacity: 0; pointer-events: none; }
.navbtn { display: none; width: 40px; height: 40px; padding: 8px; flex-direction: column; justify-content: center; gap: 5px; border-radius: var(--radius-sm); cursor: pointer; }
.navbtn span { display: block; height: 2px; background: #fff; border-radius: 2px; }
.mainnav__list { display: flex; gap: 4px; }
.mainnav__list > li { position: relative; }
.mainnav__list > li > a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: #dbe4f3; font-weight: 600; font-size: var(--fs-1); white-space: nowrap; }
.mainnav__list > li > a:hover, .mainnav__list > li:focus-within > a { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
.sub { position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); display: none; z-index: 60; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-size: var(--fs-1); }
.sub a:hover { background: var(--surface-2); text-decoration: none; }

.langsw { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.langsw__label { font-size: var(--fs-0); color: #a9b7cc; }
.langsw__sel { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm); padding: 7px 10px; min-height: 36px; }
.langsw__sel option { color: var(--ink); }

/* ---------- Breadcrumbs ---------- */
.crumbs { padding: 14px 0 0; font-size: var(--fs-0); color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }

/* ---------- Hero ---------- */
main { padding: 18px 0 40px; display: grid; gap: 18px; }
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 14px 0 4px; }
.hero--center { justify-content: center; text-align: center; }
.hero--center .hero__text { max-width: 720px; }
.h1 { font-size: clamp(24px, 3.4vw, var(--fs-5)); letter-spacing: -.3px; }
.h1--coin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lead { font-size: var(--fs-2); color: var(--ink-2); margin: 8px 0 0; max-width: 62ch; }
.hero__tools { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buttons / chips / segments ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: var(--bg); color: #fff; font-weight: 600; border: 1px solid transparent; font-size: var(--fs-1); }
.btn:hover { text-decoration: none; background: var(--bg-2); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { min-height: 34px; padding: 5px 12px; font-size: var(--fs-0); }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--fs-0); font-weight: 600; white-space: nowrap; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); text-decoration: none; }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; gap: 2px; max-width: 100%; overflow-x: auto; }
.hero .seg { background: var(--surface); }
.seg__btn { border: 0; background: transparent; padding: 6px 14px; min-height: 34px; border-radius: 999px; font-weight: 600; font-size: var(--fs-0); color: var(--ink-2); white-space: nowrap; }
.seg__btn.is-on { background: var(--bg); color: #fff; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; }
.badge--live { background: var(--up-soft); color: var(--up); }
.badge--live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.unit { font-size: var(--fs-0); color: var(--ink-3); text-align: end; max-width: 100%; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag-ef { background: #fde2e1; color: #9a2a23; } .tag-f { background: #fdeee0; color: #8a4a12; } .tag-n { background: #eef1f6; color: #3d4a5c; } .tag-g { background: #e2f3ea; color: #1b6b43; } .tag-eg { background: #d3ecdc; color: #0f5231; } .tag-none { background: var(--surface-2); color: var(--ink-3); }

/* ---------- Cards / grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.card__head > div:first-child { min-width: 0; flex: 1 1 240px; }
.card__title { font-size: var(--fs-3); }
.card__sub { margin: 4px 0 0; color: var(--ink-3); font-size: var(--fs-0); }
.card__h3 { font-size: var(--fs-1); color: var(--ink-2); margin: 16px 0 8px; font-weight: 700; }
.grid { display: grid; gap: 14px; min-width: 0; }
.grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--gauge { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.stat--live { border-color: rgba(224,160,32,.5); background: linear-gradient(180deg, #fffaf0, #fff); }
.stat--accent { background: var(--bg); color: #fff; border-color: var(--bg); }
.stat--accent .muted, .stat--accent .stat__label { color: #b6c3d8; }
.stat__label { font-size: var(--fs-0); color: var(--ink-3); font-weight: 600; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat__big { font-size: var(--fs-4); font-weight: 800; letter-spacing: -.5px; line-height: 1.15; overflow-wrap: anywhere; }
.stat__row { display: flex; align-items: baseline; gap: 8px; }
.stat__foot { margin-top: auto; }
.delta { font-weight: 700; }
.hl { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hl__k { font-size: var(--fs-0); color: var(--ink-3); min-width: 2.2em; }
.hl__v { font-weight: 700; font-size: var(--fs-2); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpis--wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpis--col { grid-template-columns: 1fr; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); min-width: 0; }
.kpi--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.kpi__k { font-size: var(--fs-0); color: var(--ink-3); }
.kpi__v { font-weight: 700; font-size: var(--fs-2); overflow-wrap: anywhere; }
.dl { display: grid; gap: 8px; }
.dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dl dt { color: var(--ink-3); font-size: var(--fs-0); }
.dl dd { margin: 0; font-weight: 700; text-align: right; }

.empty { padding: 26px 16px; text-align: center; color: var(--ink-3); background: var(--surface-2); border-radius: var(--radius-sm); font-size: var(--fs-1); }
.empty--sm { padding: 14px; }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.tbl th, .tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: var(--fs-1); vertical-align: middle; }
.tbl thead th { font-size: var(--fs-0); color: var(--ink-3); font-weight: 600; text-align: left; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.tbl thead th.num { text-align: right; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody th { text-align: left; font-weight: 700; white-space: nowrap; }
.tbl .date { white-space: nowrap; color: var(--ink-2); }
.tbl--ohlc td.num { font-family: var(--mono); font-size: 14px; }
.coin { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.coin__logo { width: 24px; height: 24px; border-radius: 50%; flex: none; object-fit: contain; }
.coin__logo--lg { width: 40px; height: 40px; }
.coin__sym { font-weight: 700; }
.coin__name { color: var(--ink-3); font-size: var(--fs-0); }
.heat { position: relative; color: var(--ink); }
.heat::before { content: ""; position: absolute; inset: 3px; border-radius: 6px; background: rgba(213, 69, 60, var(--heat, 0)); z-index: -1; }
.heat { z-index: 0; }
.tbl--heat td.heat { isolation: isolate; }
.tbl--stream .date { font-family: var(--mono); font-size: 13px; }
.tbl--stream td, .tbl--liqwin td { white-space: nowrap; }

/* ---------- Split bar / largest ---------- */
.split__bar { height: 14px; border-radius: 999px; background: var(--up); overflow: hidden; }
.split__long { display: block; height: 100%; background: var(--down); transition: width .4s; }
.split__legend { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 700; font-size: var(--fs-1); }
.largest__amt { font-size: var(--fs-4); font-weight: 800; letter-spacing: -.5px; }
.largest__meta { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 600; margin: 4px 0; }
.largest__meta .sep { color: var(--line); }

/* ---------- Years / day strip / timeline / faq / prose ---------- */
.years, .daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; }
.daystrip--wrap { flex-wrap: wrap; overflow: visible; }
.timeline { position: relative; padding-left: 18px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline__item { position: relative; display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 6px 14px; }
.timeline__item::before { content: ""; position: absolute; left: -24px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.timeline__d { color: var(--ink-3); font-size: var(--fs-0); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline__t { font-size: var(--fs-1); }
.faq { display: grid; gap: 8px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; background: var(--surface-2); }
.faq__q { padding: 12px 0; font-weight: 700; cursor: pointer; list-style: none; font-size: var(--fs-1); }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::before { content: "+"; display: inline-block; width: 1.2em; color: var(--accent-ink); font-weight: 800; }
.faq__item[open] .faq__q::before { content: "–"; }
.faq__a { padding: 0 0 14px 1.2em; color: var(--ink-2); font-size: var(--fs-1); }
.prose p { color: var(--ink-2); font-size: var(--fs-1); line-height: 1.7; }
.prose h2 { margin-bottom: 10px; }
.prose h3 { font-size: var(--fs-2); margin: 12px 0 6px; }
.pager { gap: 8px; }

/* ---------- Chart ---------- */
.chart__ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.chart__dates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chart__dates input[type="date"] { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 8px; min-height: 34px; background: var(--surface); font-size: var(--fs-0); max-width: 150px; }
.chart__dash { color: var(--ink-3); }
.chart__box { position: relative; width: 100%; min-height: 320px; }
.chart__box--sm { min-height: 220px; }
.chart__canvas { display: block; width: 100%; height: 320px; }
.chart__box--sm .chart__canvas { height: 220px; }
.chart__state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: var(--fs-1); background: var(--surface); }
.chart__state[hidden] { display: none; }
.chart__tip { position: absolute; pointer-events: none; background: var(--bg); color: #fff; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.4; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); box-shadow: var(--shadow); z-index: 2; }

/* ---------- Gauge ---------- */
.gauge-card { text-align: center; }
.gauge { position: relative; max-width: 340px; margin: 0 auto; }
.gauge__svg { width: 100%; height: auto; }
.gauge__track { fill: none; stroke: var(--surface-2); stroke-width: 18; stroke-linecap: round; }
.gauge__seg { fill: none; stroke-width: 18; }
.gauge__seg--ef { stroke: #d5453c; } .gauge__seg--f { stroke: #ee8c3a; } .gauge__seg--n { stroke: #c4cbd6; } .gauge__seg--g { stroke: #1f9d61; }
.gauge__needle { stroke: var(--bg); stroke-width: 3; stroke-linecap: round; }
.gauge__pin { fill: var(--bg); }
.gauge__val { font-size: 48px; font-weight: 800; line-height: 1; margin-top: -26px; letter-spacing: -1px; }
.gauge__zone { font-weight: 700; font-size: var(--fs-2); margin-top: 4px; }
.zone-ef .gauge__zone { color: #9a2a23; } .zone-f .gauge__zone { color: #8a4a12; } .zone-n .gauge__zone { color: #3d4a5c; } .zone-g .gauge__zone { color: #1b6b43; } .zone-eg .gauge__zone { color: #0f5231; } .zone-none .gauge__zone { color: var(--ink-3); }

/* ---------- Countdown ---------- */
.countdown-card { text-align: center; background: var(--bg); color: #fff; border-color: var(--bg); }
.countdown-card .kpi { background: rgba(255,255,255,.07); }
.countdown-card .kpi__k, .countdown-card .muted { color: #b6c3d8; }
.countdown-card .lead { color: #dbe4f3; margin: 10px auto 16px; }
.countdown-card .empty { background: rgba(255,255,255,.07); color: #dbe4f3; margin-top: 12px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin: 6px auto 8px; }
.countdown__cell { background: rgba(255,255,255,.07); border-radius: var(--radius); padding: 14px 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.countdown__n { font-size: clamp(28px, 6vw, 44px); font-weight: 800; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__u { font-size: var(--fs-0); color: #b6c3d8; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 24px; color: var(--ink-2); }
.footer__in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding: 32px 0 20px; }
.footer__about p { font-size: var(--fs-0); }
.footer__h { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .6px; color: var(--ink-3); margin-bottom: 10px; }
.footer__links { display: grid; gap: 6px; }
.footer__links a { font-size: var(--fs-1); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 0 22px; border-top: 1px solid var(--line); font-size: var(--fs-0); }

/* ---------- 404 ---------- */
.nf__code { font-size: 72px; font-weight: 900; color: var(--line); margin: 0; letter-spacing: -3px; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--stats, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__in { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .navbtn { display: flex; order: 2; margin-left: auto; }
  .mainnav { order: 3; flex-basis: 100%; }
  .mainnav__list { display: none; flex-direction: column; gap: 2px; padding: 6px 0 12px; }
  .navtoggle:checked ~ .mainnav__list { display: flex; }
  .mainnav__list > li > a { padding: 12px 10px; }
  .has-sub > a::after { display: none; }
  .sub { position: static; display: block; background: transparent; color: #dbe4f3; box-shadow: none; padding: 0 0 4px 14px; min-width: 0; }
  .sub a:hover { background: rgba(255,255,255,.08); }
  .langsw { order: 1; margin-left: auto; }
  .langsw__label { display: none; }
  .topbar__in { flex-wrap: wrap; gap: 8px 12px; padding: 8px 0; }
}
@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), 100% - 24px); }
  .grid--stats, .grid--4, .grid--2, .grid--gauge { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px 14px; }
  .stat { padding: 14px; }
  .stat__big { font-size: 24px; }
  .card__title { font-size: var(--fs-2); }
  .tbl th, .tbl td { padding: 9px 8px; font-size: 14px; }
  .tbl--ohlc td.num { font-size: 13px; }
  .timeline__item { grid-template-columns: 1fr; gap: 2px; }
  .chart__canvas, .chart__box { height: 260px; min-height: 260px; }
  .chart__box--sm, .chart__box--sm .chart__canvas { height: 200px; min-height: 200px; }
  .footer__in { grid-template-columns: 1fr; }
  .hero__tools .seg { width: 100%; justify-content: space-between; }
  .hero__tools .seg__btn { flex: 1; text-align: center; }
  .countdown { gap: 6px; }
  .countdown__cell { padding: 12px 4px; }
  .largest__amt { font-size: 24px; }
  .gauge__val { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- additions: meter, bars, heatmap block, select, 3-col grid ---------- */
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sel { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 34px; background: var(--surface); font-size: var(--fs-0); font-weight: 600; }
.chart__ctl--inline { margin: 0; gap: 8px; }
.chart__box--heat { min-height: 360px; }
.chart__box--heat .chart__canvas { height: 360px; }
.heat__meta { margin-top: 6px; }
.bars { position: relative; width: 100%; }
.bars__canvas { display: block; width: 100%; height: 160px; }
.split__bar--ls { background: var(--down); }
.split__bar--ls .split__long { background: var(--up); }
.split--mini .split__bar { height: 8px; min-width: 80px; }
.meter__track { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #e0a020 0%, #c4cbd6 50%, #2f6fed 100%); }
.meter__fill { display: none; }
.meter__pin { position: absolute; top: -5px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--surface); border: 4px solid var(--bg); box-shadow: var(--shadow); }
.meter__ends { display: flex; justify-content: space-between; margin-top: 10px; font-size: var(--fs-0); color: var(--ink-3); font-weight: 600; }
.meter { max-width: 420px; margin: 8px auto 0; }
.meter--alt .gauge__zone { color: #1b4fb8; }
.gauge-card .gauge__val { margin-top: 10px; }
.tbl--etf th, .tbl--etf td { padding: 8px 6px; font-size: 13px; }
.tbl--etf td.num { font-family: var(--mono); }
@media (max-width: 640px) {
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .chart__box--heat, .chart__box--heat .chart__canvas { height: 280px; min-height: 280px; }
  .chart__ctl--inline { width: 100%; }
}
.stack { display: grid; gap: 18px; min-width: 0; }
main > * { min-width: 0; }

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .num, [dir="rtl"] .tbl thead th.num, [dir="rtl"] .dl dd, [dir="rtl"] .rank { text-align: left; }
[dir="rtl"] .tbl thead th, [dir="rtl"] .tbl tbody th { text-align: right; }
[dir="rtl"] .num, [dir="rtl"] .coin__sym, [dir="rtl"] .stat__big, [dir="rtl"] .kpi__v, [dir="rtl"] .hl__v, [dir="rtl"] .largest__amt, [dir="rtl"] .tbl .date, [dir="rtl"] .gauge__val, [dir="rtl"] .countdown__n { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .num { display: table-cell; }
[dir="rtl"] .langsw { margin-left: 0; margin-right: auto; }
[dir="rtl"] .sub { left: auto; right: 0; }
[dir="rtl"] .has-sub > a::after { margin-left: 0; margin-right: 7px; }
[dir="rtl"] .crumbs li + li::before { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .badge--live::before { margin-right: 0; margin-left: 5px; }
[dir="rtl"] .timeline { padding-left: 0; padding-right: 18px; border-left: 0; border-right: 2px solid var(--line); }
[dir="rtl"] .timeline__item::before { left: auto; right: -24px; }
[dir="rtl"] .faq__a { padding-left: 0; padding-right: 1.2em; }
[dir="rtl"] .skip:focus { left: auto; right: 8px; }
[dir="rtl"] .meter__pin { margin-left: 0; margin-right: -12px; }
[dir="rtl"] .chart__tip { direction: ltr; }
[dir="rtl"] .split__legend { flex-direction: row-reverse; }
@media (max-width: 860px) {
  [dir="rtl"] .navbtn, [dir="rtl"] .langsw { margin-left: 0; margin-right: auto; }
  [dir="rtl"] .sub { padding: 0 14px 4px 0; }
}
