/* Data-first market workspace; inherits site tokens, typography and theme. */
.mx-page { padding: 34px 0 54px; color: var(--ink); }
.mx-page [hidden] { display: none !important; }
.mx-page button, .mx-page input, .mx-page select { font: inherit; }
.mx-page button { cursor: pointer; }
.mx-page a::after, .mx-page button::after { content: none; }
.mx-page :is(button,a,input,select,[tabindex]):focus-visible { outline: 2px solid var(--brand-text, #745400); outline-offset: 3px; }
.mx-page :is(button,a,input,select) { -webkit-tap-highlight-color: transparent; }
.mx-page h1, .mx-page h2, .mx-page p, .mx-page dl, .mx-page dd { margin: 0; }
.mx-page h1 { font-size: 28px; font-weight: 750; line-height: 1.35; letter-spacing: -.035em; }
.mx-page h2 { font-size: 17px; line-height: 1.5; font-weight: 700; letter-spacing: -.02em; }
.mx-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.mx-heading p:last-child { color: var(--ink-3); font-size: 13px; margin-top: 8px; }
.mx-page .mx-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); margin-bottom: 6px; }
.mx-currency { background: var(--paper-2); border-radius: 6px; color: var(--ink-2); font-size: 12px; font-weight: 650; padding: 6px 10px; }
.mx-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: var(--paper-2); border-radius: 10px; padding: 21px 0; }
.mx-summary > div { padding: 0 26px; border-inline-start: 1px solid var(--line); min-width: 0; }
.mx-summary > div:first-child { border-inline-start: 0; }
.mx-summary span { display: block; color: var(--ink-3); font-size: 12px; margin-bottom: 9px; }
.mx-summary strong { display: block; font-size: 24px; line-height: 1.25; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.025em; overflow-wrap: anywhere; }
.mx-page .mx-source { font-size: 11px; color: var(--ink-3); margin: 15px 0 24px; min-height: 1.5em; overflow-wrap: anywhere; }
.mx-workspace { min-width: 0; }
.mx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.mx-views { display: flex; flex-wrap: wrap; gap: 4px; }
.mx-views button, .mx-periods button { border: 0; background: transparent; color: var(--ink-3); border-radius: 5px; padding: 9px 12px; font-size: 13px; line-height: 1.4; }
.mx-views button:hover, .mx-periods button:hover { color: var(--ink); background: var(--paper-2); }
.mx-views button.is-active, .mx-periods button.is-active { color: var(--brand-text, #745400); background: var(--brand-wash, #fff7d0); font-weight: 700; }
.mx-search { display: flex; gap: 8px; align-items: center; padding: 0 6px 0 12px; border: 0; background: var(--paper-2); border-radius: 6px; min-width: 240px; width: 310px; max-width: 100%; min-height: 38px; }
.mx-search svg { flex: none; color: var(--ink-3); }
.mx-search input { min-width: 0; width: 100%; padding: 9px 0; border: 0; border-radius: 0; color: var(--ink); background: transparent; box-shadow: none; font-size: 12px; height: auto; }
.mx-search input:focus { outline: 0; box-shadow: none; }
.mx-search:focus-within { box-shadow: inset 0 -2px var(--brand-text, #745400); }
.mx-search button { flex: none; padding: 6px 8px; border: 0; background: transparent; color: var(--ink-2); font-size: 12px; font-weight: 650; border-radius: 4px; }
.mx-search button:hover { background: var(--paper-3); }
.mx-page .mx-context { color: var(--ink-3); font-size: 11px; line-height: 1.8; margin: 13px 0; }
.mx-table-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.mx-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0; }
#mx-market-table { min-width: 1340px; }
.mx-table th, .mx-table td { border: 0; border-bottom: 1px solid var(--line-2); padding: 15px 12px; text-align: end; vertical-align: middle; line-height: 1.4; }
.mx-table thead th { padding-top: 12px; padding-bottom: 12px; color: var(--ink-3); background: var(--paper-2); font-size: 11px; font-weight: 500; }
.mx-table th:first-child, .mx-table td:first-child { text-align: start; }
#mx-market-table th:nth-child(2) { text-align: start; }
.mx-table thead button { padding: 3px 0; color: inherit; background: transparent; border: 0; text-align: inherit; font-size: inherit; }
.mx-table thead button:hover { color: var(--ink); }
.mx-table th[aria-sort] button { color: var(--ink); font-weight: 650; }
.mx-sort-state { font-size: 9px; color: var(--ink-3); }
.mx-table tbody tr:hover > * { background: var(--paper-2); }
.mx-table tbody th { font-weight: 500; }
.mx-table td.mx-rank { color: var(--ink-3); width: 42px; }
.mx-table .mx-price { font-weight: 650; font-size: 13px; }
.mx-coin { display: flex; align-items: center; gap: 9px; width: max-content; max-width: 195px; color: var(--ink); text-decoration: none; }
.mx-coin:hover strong { color: var(--brand-text, #745400); }
.mx-coin > span { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.mx-coin strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.mx-coin small { color: var(--ink-3); font-size: 10px; font-weight: 500; }
.mx-fallback-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--paper-3); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.mx-coin :is(img,.coin-icon,.mkt-coin-icon) { width: 28px; height: 28px; flex: none; border-radius: 50%; }
.mx-up { color: var(--up, #18794e); }
.mx-down { color: var(--down, #cf3744); }
.mx-muted { color: var(--ink-3); }
.mx-table .mx-spark { width: 105px; text-align: center; }
.mx-spark svg { width: 90px; height: 26px; }
.mx-watch { padding: 5px 8px; font-size: 11px; color: var(--ink-3); background: transparent; border: 1px solid var(--line); border-radius: 5px; min-width: 45px; white-space: nowrap; }
.mx-watch:hover { color: var(--ink); background: var(--paper-2); }
.mx-watch[aria-pressed="true"] { border-color: transparent; color: var(--brand-text, #745400); background: var(--brand-wash, #fff7d0); }
.mx-page .mx-empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 42px 18px; line-height: 1.8; white-space: normal; }
.mx-pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 0; color: var(--ink-3); font-size: 11px; flex-wrap: wrap; }
.mx-page-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mx-page-controls :is(select,button), .mx-secondary { border: 0; border-radius: 5px; background: var(--paper-2); color: var(--ink-2); padding: 8px 10px; font-size: 11px; line-height: 1.5; }
.mx-page button:disabled { opacity: .4; cursor: default; }
.mx-page-controls button:not(:disabled):hover, .mx-secondary:hover { background: var(--paper-3); }
.mx-page .mx-footnote { font-size: 11px; line-height: 1.8; color: var(--ink-3); margin: 10px 0; }
.mx-footnote a, .mx-website { color: var(--brand-text, #745400); text-decoration: underline; text-underline-offset: 3px; }
.mx-message { padding: 11px 14px; margin: 12px 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); background: var(--paper-2); border-radius: 6px; }
.mx-message button { border: 0; background: transparent; color: var(--brand-text, #745400); text-decoration: underline; margin-inline-start: 10px; font-size: 12px; }
.mx-search-results { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0 4px; }
.mx-search-results a { display: flex; align-items: center; gap: 7px; color: var(--ink); background: var(--paper-2); font-size: 12px; padding: 8px 11px; border-radius: 5px; }
.mx-search-results small { color: var(--ink-3); }
.mx-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mx-scroll-hint { display: none; color: var(--ink-3); font-size: 10px; padding-bottom: 8px; }
.mx-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-3); margin-bottom: 28px; }
.mx-breadcrumb a { color: var(--ink-2); text-decoration: none; }
.mx-breadcrumb a:hover { text-decoration: underline; }
.mx-coin-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.mx-coin-title { display: flex; align-items: center; gap: 15px; }
.mx-coin-title h1 { margin-bottom: 2px; }
.mx-coin-title .mx-muted { font-size: 12px; }
#mx-detail-icon :is(img,.coin-icon,.mkt-coin-icon) { width: 48px; height: 48px; border-radius: 50%; }
.mx-coin-price { margin-inline-start: auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-variant-numeric: tabular-nums; }
.mx-coin-price > strong { font-size: 34px; letter-spacing: -.035em; line-height: 1.25; }
.mx-coin-price > span { font-size: 14px; font-weight: 600; }
.mx-coin-price small { color: var(--ink-3); font-size: 10px; font-weight: 400; margin-inline-start: 5px; }
.mx-detail-watch { min-height: 34px; font-size: 12px; padding: 7px 13px; }
.mx-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; padding: 6px 0 12px; border-top: 1px solid var(--line); }
.mx-metrics > div { padding: 17px 16px 12px 0; min-width: 0; }
.mx-metrics dt { color: var(--ink-3); font-size: 11px; line-height: 1.6; margin-bottom: 7px; }
.mx-metrics dd { font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mx-performance { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 12px 0; background: var(--paper-2); border-radius: 7px; gap: 0; }
.mx-performance > div { text-align: center; border-inline-start: 1px solid var(--line); }
.mx-performance > div:first-child { border: 0; }
.mx-performance dt { color: var(--ink-3); font-size: 10px; margin-bottom: 5px; }
.mx-performance dd { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mx-section-nav { display: flex; gap: 28px; border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 26px; overflow-x: auto; white-space: nowrap; }
.mx-section-nav a { text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.mx-section-nav a:hover { color: var(--brand-text, #745400); }
.mx-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 28px; align-items: start; }
.mx-detail-main, .mx-detail-aside { min-width: 0; }
.mx-panel { padding: 21px 22px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 24px; scroll-margin-top: calc(var(--header-h, 100px) + 24px); min-width: 0; }
.mx-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mx-periods { display: flex; gap: 2px; flex-wrap: wrap; }
.mx-periods button { font-size: 11px; padding: 6px 10px; }
.mx-chart { min-height: 270px; display: grid; place-items: center; }
.mx-chart > svg { width: 100%; height: auto; overflow: visible; }
.mx-chart .mx-chart-grid { stroke: var(--line-2); stroke-width: 1; }
.mx-chart .mx-chart-label { fill: var(--ink-3); font-size: 10px; font-family: inherit; }
.mx-chart .mx-chart-line { fill: none; stroke: var(--brand-text, #745400); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mx-date-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 18px; }
.mx-date-form > div { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 130px; }
.mx-date-form label { font-size: 11px; color: var(--ink-3); }
.mx-date-form input { width: 100%; border: 0; background: var(--paper-2); color: var(--ink); min-height: 38px; border-radius: 5px; padding: 8px 10px; font-size: 12px; box-shadow: none; }
.mx-primary { border: 0; border-radius: 5px; background: var(--brand, #fcd535); color: #20242b; min-height: 38px; padding: 8px 15px; font-size: 12px; font-weight: 650; }
.mx-primary:hover { background: var(--brand-hover, #f0b90b); }
.mx-history-table { min-width: 590px; }
.mx-ticker-table { min-width: 680px; }
.mx-history-table th, .mx-history-table td, .mx-ticker-table th, .mx-ticker-table td { padding: 12px 9px; font-size: 11px; }
.mx-ticker-table a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mx-ticker-table td:nth-child(2) { text-align: start; }
.mx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.mx-tags span { font-size: 10px; background: var(--paper-2); color: var(--ink-3); padding: 4px 7px; border-radius: 4px; }
.mx-page .mx-description { margin: 15px 0; font-size: 12px; line-height: 1.95; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.mx-website { font-size: 12px; }
@media (max-width: 1200px) { .mx-scroll-hint { display: block; } .mx-summary strong { font-size: 21px; } }
@media (max-width: 900px) { .mx-detail-layout { grid-template-columns: minmax(0,1fr); } .mx-detail-aside .mx-panel { margin-bottom: 18px; } .mx-description { max-height: none; } .mx-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 640px) {
    .mx-page { padding: 24px 0 32px; }
    .mx-page h1 { font-size: 23px; }
    .mx-heading { margin-bottom: 20px; gap: 12px; }
    .mx-heading p:last-child { font-size: 12px; }
    .mx-summary { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 6px 16px; gap: 0 16px; }
    .mx-summary > div { padding: 13px 0; border: 0; }
    .mx-summary > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .mx-summary span { font-size: 11px; margin-bottom: 7px; }
    .mx-summary strong { font-size: 21px; }
    .mx-page .mx-source { font-size: 10px; line-height: 1.8; margin-bottom: 18px; }
    .mx-toolbar { gap: 12px; align-items: stretch; }
    .mx-views { width: 100%; gap: 3px; }
    .mx-views button { padding: 8px 9px; font-size: 12px; }
    .mx-search { width: 100%; }
    .mx-table th, .mx-table td { padding: 14px 10px; }
    #mx-market-table th:nth-child(2), #mx-market-table td:nth-child(2) { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--paper); box-shadow: 3px 0 4px -4px var(--ink-3); }
    #mx-market-table thead th:nth-child(2) { background: var(--paper-2); }
    .mx-coin { max-width: 140px; }
    .mx-coin strong { max-width: 100px; }
    .mx-coin :is(img,.coin-icon,.mkt-coin-icon) { width: 24px; height: 24px; }
    .mx-pagination { align-items: flex-start; gap: 12px; }
    .mx-page-controls { gap: 9px; }
    .mx-page-controls label { display: none; }
    .mx-breadcrumb { margin-bottom: 22px; }
    .mx-coin-heading { gap: 16px; }
    .mx-coin-title { gap: 10px; }
    #mx-detail-icon :is(img,.coin-icon,.mkt-coin-icon) { width: 36px; height: 36px; }
    .mx-coin-price { margin-inline-start: 0; order: 3; align-items: flex-start; width: 100%; }
    .mx-coin-price > strong { font-size: 32px; }
    .mx-detail-watch { margin-inline-start: auto; }
    .mx-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mx-metrics > div { padding-top: 12px; padding-bottom: 9px; }
    .mx-metrics dd { font-size: 13px; }
    .mx-section-nav { gap: 20px; margin-bottom: 18px; }
    .mx-section-nav a { font-size: 12px; }
    .mx-panel { padding: 17px 14px; margin-bottom: 18px; }
    .mx-panel-heading { gap: 10px; }
    .mx-panel h2 { font-size: 16px; }
    .mx-chart { min-height: 180px; }
    .mx-date-form { gap: 10px; }
    .mx-date-form > div { min-width: 100px; }
    .mx-date-form button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mx-page * { scroll-behavior: auto !important; } }
