/* Shared visual system. Route styles load before this file. */
:root {
    --bg: #101318;
    --panel: #171b22;
    --panel-2: #20252e;
    --line: #343b46;
    --text: #f4f4f1;
    --muted: #b3bac5;
    --faint: #a4aebb;
    --accent: #f4a05a;
    --brand: #f4a05a;
    --control-line: #758194;
    --accent-soft: #302319;
    --up: #56d5a1;
    --down: #ff8696;
    --warn: #f2bd76;
    --radius: 10px;
    --site-header-height: 112px;
    color-scheme: dark;
    background: var(--bg);
    font-size: 15px;
    line-height: 1.5;
}
body {
    --bg: #101318;
    --panel: #171b22;
    --panel-2: #20252e;
    --line: #343b46;
    --text: #f4f4f1;
    --muted: #b3bac5;
    --faint: #a4aebb;
    --accent: #f4a05a;
    --brand: #f4a05a;
    --control-line: #758194;
    --accent-soft: #302319;
    --up: #56d5a1;
    --down: #ff8696;
    --warn: #f2bd76;
    --radius: 10px;
    min-width: 0;
    color: var(--text);
    background: var(--bg);
    font: 15px/1.55 Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
:root[data-theme='light'],
:root[data-theme='light'] body,
body[data-theme='light'] {
    --bg: #f6f5f2;
    --panel: #ffffff;
    --panel-2: #efeeea;
    --line: #d8d7d1;
    --text: #20252c;
    --muted: #5d6470;
    --faint: #5d6470;
    --accent: #a54816;
    --brand: #f4a05a;
    --control-line: #797c81;
    --accent-soft: #f9ece1;
    --up: #087748;
    --down: #b52842;
    --warn: #865311;
    color-scheme: light;
}
body.colorblind { --up: #8fc5ff; --down: #f7ba63; }
:root[data-theme='light'] body.colorblind { --up: #195fb0; --down: #8d5100; }
body :is(input, select, textarea, button) { font-family: inherit; }
body :is(input, select, textarea) {
    border-color: var(--control-line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--text);
    accent-color: var(--accent);
}
body :is(input, select, textarea)::placeholder { color: var(--muted); opacity: 1; }
body :is(button, input, select, textarea, summary, a) { -webkit-tap-highlight-color: transparent; }
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
body :is(a, button, summary):active { color: var(--accent); }
body :is(.primary-link, .tool-calculate, .tracking-workspace button[type=submit], .research-filters button) {
    border-color: var(--brand);
    background: var(--brand);
    color: #201710;
    font-weight: 700;
}
body :is(.primary-link, .tool-calculate, .research-filters button):hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}
body :is(button, a)[aria-disabled=true], body button:disabled { cursor: not-allowed; }
.shell { width: min(100%, 1648px); padding: 24px 28px 32px; }
.resource-shell { max-width: 1320px; padding: 32px 28px 56px; }
.shell:not(.route-terminal):not(.route-coin) { padding-top: 28px; }
.resource-body .tools-page { padding: 0; }
.shell .page-intro, .resource-shell .page-intro, .catalogue-intro {
    height: auto;
    align-items: end;
    gap: 16px 28px;
    margin: 0 0 24px;
    padding: 0;
}
.shell .page-intro h1, .resource-shell .page-intro h1, .catalogue-intro h1,
.learn-hub .learn-intro h1, .research-identity h1 {
    margin: 0;
    font-size: clamp(28px, 2.8vw, 38px);
    font-weight: 720;
    line-height: 1.15;
    letter-spacing: -.035em;
}
.shell .page-intro .lede, .resource-shell .page-intro .lede,
.catalogue-intro p, .learn-hub .learn-intro p {
    display: block;
    margin: 9px 0 0;
    max-width: 75ch;
    font-size: 15px;
    line-height: 1.65;
    color: var(--muted);
}
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .025em; font-weight: 550; }
.workspace-actions, .tool-workflow-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-actions { margin-block: 0 20px; }
.workspace-actions a, .tool-workflow-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--control-line);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--panel);
    text-decoration: none;
}
.workspace-actions a:first-child { background: var(--accent-soft); border-color: var(--accent); }
.tool-workflow-nav { padding-block: 8px 20px; }
.tool-workflow-nav a:hover, .workspace-actions a:hover { color: var(--accent); border-color: var(--accent); }

/* Navigation stays compact so the market context remains close to the top. */
.site-header { background: var(--panel); font-size: 14px; }
.site-masthead { max-width: 1648px; min-height: 66px; padding-inline: 28px; gap: 24px; }
.site-header .brand { font-size: 20px; letter-spacing: -.05em; }
.site-header .brand-mark { width: 34px; height: 34px; border-radius: 7px; color: #201710; }
.site-tagline { font-size: 13px; }
.site-header :is(button, summary), .site-search { border-color: var(--control-line); border-radius: 7px; font-size: 13px; }
.site-header .site-search { background: var(--panel-2); }
.site-controls { gap: 8px; }
.site-toolbar { max-width: 1648px; gap: 8px; padding-inline: 28px; }
.site-toolbar > a, .site-more > summary { min-height: 46px; padding: 11px 14px; font-size: 14px; border-radius: 0; }
.site-toolbar > a[aria-current] { color: var(--accent); }
.site-more nav { padding: 8px; border-radius: 0 0 10px 10px; box-shadow: 0 12px 24px #0002; }
.site-more nav a:hover, .site-mobile-menu nav a:hover { background: var(--panel-2); border-radius: 6px; }
.ticker { height: 32px; background: var(--bg); }
.ticker-track { animation: none; gap: 28px; }
.ticker { overflow-x: auto; scrollbar-width: none; }
.ticker-item { font-size: 12px; }
.live-dot, .session-dot.open { box-shadow: none; }
.site-footer { margin-top: 32px; background: var(--bg); }
.site-footer-inner { max-width: 1648px; padding: 36px 28px 44px; gap: 36px; }
.site-footer p, .site-footer nav a { color: var(--muted); font-size: 14px; }
.site-footer small { font-size: 12px; }
.site-data-sources { margin-top: 28px; padding-top: 8px; font-size: 13px; }
.site-data-sources summary { font-weight: 600; }

/* Surfaces group a task; fine row dividers carry the detail. */
.panel, .hero-metric, .tool-card, .research-article, .learn-guide-card,
.research-table, .research-facts, .stable-summary, .research-history {
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}
.panel { background: var(--panel); }
.panel-head, .panel > .panel-head {
    height: auto;
    min-height: 54px;
    padding: 12px 18px;
    background: transparent;
    border-bottom: 1px solid var(--line);
    gap: 8px;
}
.panel-head > div:first-child { flex-wrap: wrap; gap: 4px 10px; }
.panel-head h2, html[data-density=comfortable] .panel-head h2 {
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -.01em;
    font-weight: 650;
    white-space: normal;
    overflow: visible;
}
.panel-meta, html[data-density=comfortable] .panel-meta {
    font-size: 12px;
    max-width: none;
    line-height: 1.4;
}
.panel-content { padding: 18px; }
.panel-link, .text-link { font-size: 13px; line-height: 1.5; }
.panel-link { min-height: 44px; padding: 12px 18px; }
.panel-actions { flex-shrink: 0; gap: 4px; }
.panel-actions button, .panel-actions summary { min-width: 36px; min-height: 36px; padding: 6px; border-radius: 6px; }
.panel-actions button:hover, .panel-actions summary:hover { background: var(--panel-2); }
.tabs { height: auto; min-height: 50px; gap: 4px; padding: 6px 12px; overflow-x: auto; overflow-y: hidden; }
.content-grid .tabs { height: auto; }
.tabs button, .chart-tabs button { min-height: 36px; padding: 7px 9px; font-size: 12px; border-radius: 6px; }
.tabs button.active, .chart-tabs button.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.outline { min-height: 40px; padding: 8px 12px; border: 1px solid var(--control-line); border-radius: 7px; font-size: 13px; }
.state-stale .panel-content, .state-failed .panel-content { opacity: 1; }
.state-message { max-height: none; padding: 9px 18px; font-size: 12px; line-height: 1.5; }
.empty-state { padding: 24px 18px; font-size: 14px; line-height: 1.65; }
.footnote, .dataset-credit, .chart-attribution, .chart-notice { font-size: 12px; line-height: 1.65; }

/* Terminal: verdict first, four comparisons, then the working market view. */
.overview { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; margin-bottom: 16px; }
.overview > .regime { grid-column: auto; height: auto; min-height: 238px; border-color: var(--line); }
.regime .panel-content { padding: 16px 20px; }
.regime-word { margin: 0 0 8px; font-size: clamp(28px, 2.5vw, 36px); line-height: 1.1; letter-spacing: -.04em; }
.regime-lede { margin: 0 0 12px; font-size: 13px; }
.regime ul { margin-bottom: 10px; font-size: 13px; line-height: 1.75; }
.regime .text-link { min-height: 36px; padding: 5px 0; text-align: left; }
.overview .kpi-grid { grid-column: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.overview .kpi { min-height: 118px; height: auto; padding: 16px 20px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.overview .kpi:nth-child(odd) { border-right: 1px solid var(--line); }
.overview .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.kpi strong { margin: 8px 0 5px; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; letter-spacing: -.03em; }
.kpi .eyebrow, html[data-density=comfortable] .kpi .eyebrow { font-size: 12px; letter-spacing: 0; }
.kpi-note, .kpi-age { font-size: 12px; line-height: 1.45; height: auto; min-height: 0; white-space: normal; overflow: visible; }
.kpi-age { margin-top: 5px; }
.sentiment-scale { max-width: 160px; height: 7px; margin-block: 10px 5px; }
.sentiment-endpoints { max-width: 160px; font-size: 10px; }
.desktop-session { height: auto; min-height: 24px; margin: 0 0 8px; font-size: 12px; }
.content-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.content-grid > .chart-panel, .content-grid > .movers-panel, .content-grid > .news-panel { min-height: 0; height: auto; }
.content-grid > .panel > .panel-content { padding: 0; }
.content-grid .mover-list { padding: 0 12px; }
.content-grid .mover-row { height: 52px; min-height: 52px; gap: 5px; }
.mover-main b { font-size: 13px; }
.mover-row .price { font-size: 12px; }
.mover-row .mover-main > .why { font-size: 11px; line-height: 1.5; }
.chip, .chip span { font-size: 12px; }
.quote-head { gap: 10px; min-height: 82px; padding: 16px 18px 8px; }
.quote-id b { font-size: 14px; }
.quote-id span:not(.coin-icon) { font-size: 12px; }
.hero-price { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; }
.quote-sub { padding: 0 18px 14px; gap: 5px 14px; font-size: 12px; line-height: 1.5; overflow: visible; }
.chart-tabs { height: auto; min-height: 48px; gap: 3px; padding: 5px 10px; overflow-x: auto; overflow-y: hidden; }
.chart { height: 290px; margin: 12px 16px; }
.content-grid .news-list { max-height: 370px; padding-inline: 16px; }
.content-grid .news-row { min-height: 61px; height: auto; padding-block: 10px; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
.news-row time, .news-source { font-size: 11px; }
.news-row a { font-size: 13px; line-height: 1.4; }
.below-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 20px; margin-block: 0 24px; }
.secondary-grid { gap: 20px; margin-bottom: 24px; }
.table-wrap { scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }
.table-wrap table { font-size: 13px; }
.table-wrap :is(th, td) { padding: 11px 13px; }
.table-wrap th { height: auto; font-size: 12px; color: var(--muted); font-weight: 550; }
.table-wrap td { font-size: 13px; font-variant-numeric: tabular-nums; }
.asset b { font-size: 13px; }
.asset small { font-size: 11px; }
.table-wrap tbody tr { border-color: var(--line); }
.table-wrap tbody tr:last-child { border-bottom: 0; }
.table-wrap th button { min-height: 36px; }
.tape-summary strong, .hero-metric strong { font-size: 26px; letter-spacing: -.03em; }
.tape-row, .session-row, .network-card { font-size: 13px; }
.session-row strong, .event b, .network-card b, .network-card strong { font-size: 13px; }
.event small, .network-card small, .tradfi-grid b { font-size: 12px; }
.tradfi-grid { gap: 20px; padding: 18px; }
.tradfi-grid strong { font-size: 17px; }
.stats-grid { padding: 18px; gap: 22px; }
.stats-grid dt { font-size: 12px; text-transform: none; }
.stats-grid dd { font-size: 17px; }

/* Directories use full-width filters and numerical rows, not nested cards. */
.catalogue-page { max-width: 1480px; margin-inline: auto; }
.catalogue-panel .panel-head { padding: 16px 20px; }
.catalogue-panel > .panel-content { padding: 0; }
.catalogue-panel .panel-head h2 { font-size: 17px; }
.catalogue-tabs { gap: 6px; }
.catalogue-tabs a, .fee-network-tabs a { border-color: var(--control-line); border-radius: 7px; }
.catalogue-tabs a[aria-current], .catalogue-tabs a.active, .fee-network-tabs a[aria-current] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.market-catalogue .table-toolbar { padding: 16px 20px; }
.catalogue-market-form { padding-inline: 20px; }
.market-search-row { gap: 12px; max-width: 860px; }
.market-search-row button, .catalogue-search button { background: var(--panel-2); }
.market-advanced { margin-block: 8px 0; }
.market-advanced-fields { gap: 16px; padding-block: 12px 20px; }
.market-result-toolbar { padding: 10px 20px; }
.catalogue-page :is(input, select, button), .tools-catalogue :is(input, select, button) { border-radius: 7px; border-color: var(--control-line); font-size: 14px; }
.catalogue-pager { border-top-color: var(--line); padding: 12px 20px; font-size: 13px; }
.catalogue-page-links a { border-color: var(--control-line); border-radius: 7px; }
.catalogue-page-links a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.market-catalogue .market-table-flow :is(th, td) { padding: 12px 14px; }
.market-catalogue .market-table-flow th { background: var(--panel-2); }
.market-catalogue .market-table-flow .asset b { font-size: 14px; }
.market-catalogue .market-table-flow .asset small { font-size: 12px; }
.market-catalogue .real-heatmap { padding: 18px; }
.catalogue-overview { gap: 24px; }
.catalogue-search { padding: 20px; }
.catalogue-table :is(th, td), .route-defi .table-wrap :is(th, td) { padding: 13px 16px; }
.catalogue-table th { background: var(--panel-2); }
.catalogue-note { margin: 14px 20px; font-size: 13px; }
.catalogue-more { padding-inline: 20px; font-size: 14px; }
.directory-research-link { font-size: 12px; }

/* Calculators keep the editable context separate from their answer. */
.tools-page, .tools-directory { font-size: 15px; }
.tool-workbench { gap: 20px; }
.tool-panel { height: auto; overflow: visible; }
.tool-panel .panel-head { padding: 16px 20px; }
.tool-panel .panel-head h2 { font-size: 17px; }
.tool-panel .panel-content { padding: 20px; }
.tool-form { gap: 18px 16px; }
.tool-field { gap: 7px; font-size: 14px; font-weight: 550; }
.tools-page .tool-field :is(input, select, textarea) { min-height: 46px; padding: 11px 12px; border-color: var(--control-line); border-radius: 7px; font-size: 16px; }
.tools-page :is(.tool-help, .tool-field small, .tool-notes, .tool-result-state) { font-size: 13px; font-weight: 400; }
.tool-panel button { padding: 10px 15px; border-radius: 7px; border-color: var(--control-line); }
.tools-page .tool-panel button { font-size: 14px; }
.tool-form-actions { gap: 10px; margin-top: 8px; }
.tool-panel .tool-calculate, .resource-body .tool-calculate { background: var(--brand); border-color: var(--brand); color: #201710; font-weight: 700; }
.tool-values > div { padding-block: 13px; gap: 10px; }
.tool-values dt { font-size: 14px; }
.tool-values dd { font-size: 20px; letter-spacing: -.025em; }
.tool-values .tool-primary-value { padding: 20px; margin: 0 0 8px; border: 0; border-radius: 8px; background: var(--accent-soft); }
.tool-values .tool-primary-value dd, .tool-values > div:first-child dd { font-size: clamp(28px, 3vw, 36px); line-height: 1.25; }
.tool-buy, .tool-mode { padding: 16px; border-radius: 8px; }
.tool-table-scroll { border-radius: 8px; }
.tool-table-scroll caption { padding: 14px; }
.tool-table-scroll :is(th, td) { padding: 12px 14px; font-size: 13px; }
.tool-explanation { max-width: 92ch; }
.tool-usage { max-width: 92ch; }
.tool-usage h3 { margin: 24px 0 10px; font-size: 18px; line-height: 1.4; letter-spacing: -.02em; }
.tool-usage p, .tool-usage li { font-size: 14px; line-height: 1.75; }
.tool-usage ol { padding-left: 22px; }
.tool-usage li + li { margin-top: 9px; }
.tool-question { padding: 10px 0; border-top: 1px solid var(--line); }
.tool-question summary { min-height: 44px; padding: 9px 0; cursor: pointer; font-size: 15px; font-weight: 600; }
.tool-question p { margin: 6px 0 16px; color: var(--muted); }
.tool-related { margin-block: 16px 24px; }
.tool-scenarios { gap: 16px; }
.tool-scenarios > button { flex: 0 1 auto; }
.tool-catalogue-grid { gap: 20px; }
.tool-catalogue-grid > li { padding: 22px; border-radius: 10px; }
.tool-catalogue-grid h2 { font-size: 20px; letter-spacing: -.02em; }
.tool-catalogue-grid p { font-size: 14px; }
.tool-catalogue-grid .tool-category-label { font-size: 12px; }
.tool-catalogue-guides { gap: 8px 16px; padding-top: 12px; }
.tool-catalogue-actions .primary-link { background: var(--panel-2); border: 1px solid var(--control-line); color: var(--text); border-radius: 7px; font-size: 13px; }
.tool-catalogue-actions .primary-link:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* News is an editorial page with one lead and a quieter supporting column. */
.news-home { max-width: 1400px; }
.news-home .page-intro h1 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -.04em; }
.news-home-filters { padding: 18px 20px; margin-block: 22px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.news-home-filters label { font-size: 13px; gap: 7px; }
.news-home-filters :is(input, select) { border-radius: 7px; font-size: 16px; }
.news-home-filters > button { background: var(--accent-soft); border-color: var(--accent); border-radius: 7px; font-weight: 650; font-size: 14px; }
.news-secondary-filters > summary { font-size: 14px; }
.news-secondary-filters > summary span { font-size: 12px; }
.news-home-topics { gap: 6px 22px; border-bottom: 1px solid var(--line); }
.news-home-topics a { min-height: 46px; font-size: 14px; padding-inline: 0; }
.news-home-observation { margin: 14px 0 2px; font-size: 12px; }
.news-publisher-status { margin: 0 0 24px; font-size: 13px; max-width: 100%; }
.news-publisher-status > summary { color: var(--muted); min-height: 36px; font-size: 12px; }
.news-publisher-status[open] { padding: 12px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.news-latest > h2, .news-more h2 { margin-bottom: 18px; font-size: 20px; letter-spacing: -.02em; }
.news-latest-grid { gap: 0 28px; }
.home-news-meta { gap: 5px 12px; font-size: 12px; line-height: 1.5; }
.home-news-meta span:first-child { font-weight: 650; }
.home-news-story h3 { font-size: 19px; letter-spacing: -.025em; line-height: 1.35; margin: 10px 0; }
.home-news-lead { display: block; grid-row: auto; padding: 0 0 24px; border-right: 0; }
.home-news-lead h3, .home-news-text.home-news-lead h3 { font-size: clamp(25px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -.035em; max-width: 29ch; }
.home-news-lead .home-news-excerpt, .home-news-text.home-news-lead .home-news-excerpt { font-size: 16px; line-height: 1.7; }
.home-news-excerpt, .home-news-support .home-news-excerpt { font-size: 14px; line-height: 1.65; }
.home-news-image { margin-bottom: 16px; }
.home-news-image img { border-radius: 8px; }
.home-news-image figcaption { font-size: 11px; margin-top: 6px; }
.home-news-action { min-height: 44px; padding-block: 8px; font-size: 13px; }
.home-news-support { padding-block: 20px; }
.home-news-sources { font-size: 12px; }
.news-more { margin-top: 36px; max-width: 1100px; }
.news-section-heading { border-bottom: 1px solid var(--line); margin-bottom: 0; }
.news-section-heading p { font-size: 13px; }
.home-news-row { padding-block: 22px; gap: 22px; border-top: 0; border-bottom: 1px solid var(--line); }
.home-news-row h3 { font-size: 20px; line-height: 1.35; }
.home-news-row .home-news-excerpt { font-size: 14px; }
.news-home-pagination { justify-content: start; margin-block: 24px; font-size: 13px; }
.news-home-pagination a { border-radius: 7px; }

/* Research groups keep the established category bands and source metadata. */
.research-group { --research-band: var(--accent-soft); margin-bottom: 32px; }
:root[data-theme=light] .research-group { --research-band: var(--accent-soft); }
.research-group-band { border-top-width: 0; border-radius: 8px; padding: 14px 18px; }
.research-group-band h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.research-directory { gap: 16px; margin-top: 16px; }
.research-directory-row { padding: 20px; }
.research-directory-row h3 { font-size: 18px; letter-spacing: -.02em; }
.research-directory-row h3 a { text-decoration: none; }
.research-directory-row h3 a:hover { text-decoration: underline; }
.research-directory-row p { font-size: 14px; line-height: 1.65; margin-block: 8px 20px; }
.research-directory-meta { font-size: 12px; padding-top: 14px; }
.research-source, .research-notice { padding: 16px 20px; border-radius: 8px; font-size: 13px; }
.research-filters { gap: 14px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.research-filters label { font-size: 13px; gap: 7px; }
.research-filters :is(input, select, button) { border-radius: 7px; }
.research-facts { gap: 20px; padding: 22px; }
.research-facts dt { font-size: 13px; margin-bottom: 5px; }
.research-facts dd { font-size: 18px; }
.research-table :is(th, td) { padding: 13px 16px; font-size: 13px; }
.research-table th { background: var(--panel-2); }
.research-workspace .workflow-metrics { gap: 22px; }
.research-identity { gap: 20px; margin-bottom: 24px; }
.research-identity .lede { font-size: 15px; }
.research-article { padding: 28px; font-size: 16px; line-height: 1.8; }
.research-history { padding-inline: 20px; }

/* Learning: task paths precede the article catalogue, articles retain a short line. */
.resource-body .learn-hub { max-width: 1264px; }
.learn-intro { padding: 0; }
.learning-paths { margin-block: 28px 32px; padding-top: 22px; border-block: 1px solid var(--line); }
.learning-paths > h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.learning-path-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.learning-path { display: flex; flex-direction: column; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.learning-path:last-child { border-bottom: 0; }
.learning-path h2, .learning-path h3 { font-size: 18px; margin: 0; line-height: 1.4; letter-spacing: -.02em; }
.learning-path p { margin: 0; color: var(--muted); font-size: 14px; }
.learning-path :is(ul, ol) { margin: 0; padding-left: 18px; }
.learning-path a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 5px; font-size: 14px; }
.learn-search { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.learn-search label { font-size: 13px; }
.learn-search :is(input, select, button) { border-radius: 7px; }
.learn-search button { background: var(--accent-soft); border-color: var(--accent); font-size: 14px; }
.learn-topics { border-top: 0; padding-block: 0 12px; gap: 4px 12px; }
.learn-topics a { border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.learn-topics a[aria-current] { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.learn-guide-grid { gap: 22px; }
.learn-guide-card { overflow: hidden; }
.learn-guide-card .guide-card-body { padding: 22px; }
.learn-guide-card h3 { font-size: 20px; letter-spacing: -.025em; }
.learn-guide-card .guide-card-body > p { font-size: 14px; line-height: 1.7; }
.learn-guide-card .content-date, .guide-author, .reading-meta { font-size: 12px; color: var(--muted); line-height: 1.6; }
.reading-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.learn-feature-card h3 { font-size: clamp(24px, 2.4vw, 31px); line-height: 1.2; }
.learn-feature-card .guide-card-body > p { font-size: 15px; }
.learn-feature-card .guide-card-body { padding: 28px; }
.learn-feature > h2, .learn-more-guides > h2 { font-size: 21px; letter-spacing: -.02em; }
.resource-body .learn-article { max-width: 792px; }
.article-header h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
.article-summary { font-size: 18px; line-height: 1.7; }
.article-byline { font-size: 13px; }
.learn-article .article-quick { padding: 24px; border-radius: 10px; background: var(--accent-soft); border-color: var(--line); }
.article-contents { border-radius: 8px; }
.article-body { font-size: 17px; line-height: 1.85; }
.article-body h2 { font-size: 26px; line-height: 1.3; margin-top: 40px; }
.article-body h3 { font-size: 21px; line-height: 1.4; }
.article-table :is(th, td) { font-size: 14px; }
.prose { max-width: 860px; padding: 28px; font-size: 16px; line-height: 1.85; }

/* Secondary workspaces share the control and data hierarchy. */
.workflow-grid { gap: 22px; }
.workflow-panel .panel-content { padding: 20px; }
.workflow-form { gap: 16px; }
.workflow-form label { font-size: 14px; }
.workflow-form :is(input, select, textarea), .tracking-workspace :is(input, select, textarea) { padding: 10px 12px; border-color: var(--control-line); border-radius: 7px; }
.workflow-form output { background: var(--accent-soft); border-radius: 8px; padding: 18px; }
.tracking-workspace button, .tracking-workspace summary { border-radius: 7px; border-color: var(--control-line); }
.fees-page { gap: 24px; max-width: 1264px; }
.fees-page .fee-network-panel .panel-head, .fees-page .fee-network-panel .panel-content { padding: 20px; }
.fees-page .fee-comparison :is(th, td) { padding: 12px; font-size: 13px; }
.fee-readings { gap: 12px; }
.fee-readings > div { border-radius: 8px; padding: 16px; }
.fee-readings span { font-size: 12px; }
.fee-readings strong { margin-top: 4px; font-size: 26px; }
.stable-summary { padding: 24px; gap: 32px; }
.stable-summary strong { font-size: 28px; }
.modal { padding: min(12vh, 100px) 16px 24px; }
.modal-card { width: min(560px, 100%); border-radius: 12px; box-shadow: 0 18px 60px #0005; max-height: 82dvh; overflow: auto; }
.modal-head, .settings-head { padding: 16px 20px; font-size: 16px; }
.modal-head button, .settings-head button { min-width: 44px; min-height: 44px; }
.search-input { min-height: 48px; margin: 16px; width: calc(100% - 32px); font-size: 16px; }
.search-row { min-height: 56px; padding: 10px; }
.search-row strong { font-size: 14px; }
.search-row small, .search-row em { font-size: 12px; }
.settings { width: min(360px, 100%); padding-bottom: 28px; overflow-y: auto; }
.settings > label, .settings small { font-size: 13px; }
.settings select { min-height: 44px; border-color: var(--control-line); font-size: 14px; }
.settings > label { gap: 16px; }
.live-popover { border-radius: 8px; font-size: 13px; }
.number-tooltip, .toast { border-radius: 7px; font-size: 13px; }

.site-search-page { max-width: 1000px; margin-inline: auto; }
.site-search-form { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.site-search-form label { display: grid; gap: 7px; min-width: 0; font-size: 13px; font-weight: 550; }
.site-search-form :is(input, select) { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; font-size: 16px; }
.site-search-form button { min-height: 46px; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent-soft); color: var(--text); font-size: 14px; font-weight: 650; }
.search-suggestions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 24px; }
.search-suggestions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.search-result-count { margin-block: 24px 8px; font-size: 13px; color: var(--muted); }
.site-search-results { list-style: none; margin: 0; padding: 0; }
.site-search-results li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.site-search-results h2 { margin: 2px 0 6px; font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
.site-search-results h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.site-search-results h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-search-results p { max-width: 78ch; margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.search-pagination { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-block: 24px; font-size: 13px; }
.search-pagination a, .search-empty a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid var(--control-line); border-radius: 7px; }
.search-pagination span { color: var(--muted); }
.search-empty { padding: 28px 0; max-width: 70ch; }
.search-empty h2 { font-size: 24px; margin-bottom: 12px; }
.search-empty p { color: var(--muted); line-height: 1.7; }

@media (min-width: 760px) {
    .learning-path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
    .learning-path { border-bottom: 0; }
    .news-latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-news-lead { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
    .news-latest-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0 32px; }
    .home-news-lead { grid-column: 1; grid-row: 1 / 5; padding: 0 32px 0 0; border-right: 1px solid var(--line); border-bottom: 0; }
    .home-news-support { grid-column: 2; padding: 18px 0; display: flex; align-items: start; gap: 16px; }
    .home-news-support:nth-child(2) { padding-top: 0; }
    .home-news-support .home-news-image { flex: 0 0 126px; order: 2; margin: 0; }
    .home-news-support .home-news-image img { aspect-ratio: 4 / 3; }
    .home-news-support .home-news-image figcaption { font-size: 10px; }
    .home-news-support .home-news-copy { flex: 1; }
    .home-news-support h3 { font-size: 18px; margin-block: 7px; }
    .home-news-support .home-news-excerpt { display: none; }
    .home-news-support .home-news-meta { font-size: 11px; gap: 3px 8px; }
    .home-news-support .home-news-action { font-size: 12px; }
    .home-news-lead .home-news-image img { aspect-ratio: 16 / 9; }
    .tool-workbench { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }
}
@media (min-width: 1280px) {
    .overview .kpi-grid .kpi { order: 0; }
    .overview .kpi-grid .kpi-marketcap { order: 1; }
    .overview .kpi-grid .kpi-sentiment { order: 2; }
    .overview .kpi-grid .kpi-dominance { order: 3; }
    .overview .kpi-grid .kpi-liquidations { order: 4; }
}
@media (min-width: 1600px) {
    .overview { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); }
    .overview .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; }
    .overview .kpi { min-height: 150px; border-right: 1px solid var(--line); }
    .overview .kpi:nth-child(n) { border-bottom: 0; }
    .overview .kpi:last-child { border-right: 0; }
    .overview > .regime { min-height: 240px; }
    .overview .kpi-note { min-height: 35px; }
}
@media (max-width: 1279px) and (min-width: 768px) {
    .content-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .content-grid > .chart-panel { grid-column: 1; grid-row: 1; }
    .content-grid > .news-panel { grid-column: 2; grid-row: 1; }
    .content-grid > .movers-panel { grid-column: 1 / -1; grid-row: 2; min-height: 0; height: auto; }
    .content-grid > .movers-panel .mover-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
    .overview { grid-template-columns: minmax(0, .95fr) minmax(0, 1.4fr); }
    .overview .kpi { padding: 14px 16px; }
    .overview > .regime { min-height: 255px; }
    .site-toolbar { gap: 1px; }
    .site-toolbar > a, .site-more > summary { padding-inline: 11px; }
    .chart { height: 278px; }
    .quote-head { padding-inline: 14px; }
}
@media (max-width: 1050px) {
    .site-masthead { gap: 16px; }
    .site-header .brand { font-size: 18px; }
    .site-tagline { display: none; }
    .shell, .resource-shell { padding-inline: 20px; }
    .below-grid { grid-template-columns: minmax(0, 1fr); }
    .fees-page { gap: 20px; }
    .research-workspace .workflow-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    :root { --site-header-height: 66px; }
    .shell, .shell:not(.route-terminal):not(.route-coin), .resource-shell { padding: 22px 16px 36px; }
    .shell .page-intro, .resource-shell .page-intro, .catalogue-intro { display: flex; flex-wrap: wrap; margin-bottom: 20px; gap: 12px; }
    .shell .page-intro h1, .resource-shell .page-intro h1, .catalogue-intro h1 { display: block; font-size: 29px; line-height: 1.15; }
    .shell .page-intro .lede, .resource-shell .page-intro .lede, .catalogue-intro p { font-size: 14px; }
    .shell .page-intro .eyebrow { display: block; font-size: 11px; margin-bottom: 6px; }
    .workspace-actions { width: 100%; gap: 8px; }
    .workspace-actions a { flex: 1 1 auto; justify-content: center; padding: 9px 10px; font-size: 12px; }
    .overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .overview > .regime { height: auto; min-height: 0; }
    .regime .panel-content { padding: 16px; }
    .regime-word { font-size: 30px; }
    .regime-lede { display: block; font-size: 13px; }
    .regime .text-link { display: inline-flex; align-items: center; }
    .regime ul { font-size: 12px; line-height: 1.65; }
    .regime li:nth-child(n) { display: list-item; }
    .overview .kpi-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-template-rows: auto; width: 100%; height: auto; gap: 0; overflow: visible !important; }
    .overview .kpi-grid .kpi { grid-column: auto; grid-row: auto; order: 0; width: auto !important; height: auto; min-height: 140px; padding: 14px !important; }
    .kpi strong { font-size: 23px; margin-block: 7px; }
    .kpi-note, .kpi-age { font-size: 11px; line-height: 1.5; }
    .overview .kpi-age { display: block; white-space: normal; max-height: none; }
    .sentiment-scale { width: 100%; max-width: 145px; }
    .sentiment-endpoints { font-size: 9px; }
    .mobile-quotes { display: grid; height: auto; margin-block: 12px 18px; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: visible; }
    .quote-card { padding: 12px 10px; border-bottom: 0; }
    .quote-card:last-child { border-right: 0; }
    .quote-card strong { font-size: 17px; line-height: 1.5; }
    .quote-card b, .quote-card .chip { font-size: 12px; }
    .quote-card > div { height: 30px; }
    .content-grid { display: flex; flex-direction: column; gap: 20px; }
    .content-grid > .movers-panel { height: auto; min-height: 0; }
    .content-grid > .news-panel { height: auto; min-height: 0; }
    .content-grid > .chart-panel { height: auto; min-height: 0; }
    .panel, .below-grid .panel, .secondary-grid .panel { border-radius: 10px; margin: 0; }
    .panel-head, .panel > .panel-head { min-height: 54px; padding: 12px 16px; }
    .panel-head h2 { font-size: 15px; }
    .panel-meta { font-size: 11px; white-space: normal; }
    .panel-actions :is(button, summary) { min-width: 44px; min-height: 44px; }
    .panel-actions { margin-block: -8px; }
    .content-grid .mover-row { height: 54px; min-height: 54px; grid-template-columns: 30px minmax(0, 1fr) 28px; gap: 4px; }
    .mover-row .mover-main { min-width: 0; grid-template-columns: minmax(28px, 1fr) auto auto; }
    .mover-row .mover-main > .why { font-size: 11px; }
    .content-grid .news-list { display: block; max-height: none; }
    .content-grid .news-row { height: auto; min-height: 77px; padding-block: 11px; }
    .content-grid .news-row a { font-size: 14px; line-height: 1.4; min-height: 0; display: block; }
    .news-row time, .news-source { font-size: 11px; }
    .tabs { padding: 6px 10px; }
    .tabs button, .chart-tabs button { min-height: 44px; padding-inline: 9px; font-size: 12px; }
    .content-grid .tabs { height: auto; }
    .quote-head { min-height: 0; padding: 16px; }
    .quote-id { flex: 1 1 auto; width: auto; }
    .hero-price { font-size: 30px; }
    .quote-sub { padding: 0 16px 16px; font-size: 12px; }
    .chart-tabs { height: auto; }
    .chart { height: 290px; min-height: 240px; margin-inline: 12px; }
    .below-grid, .secondary-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .tradfi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-masthead { min-height: 66px; padding: 8px 16px; gap: 8px; flex-wrap: nowrap; }
    .site-header .brand { font-size: 16px; gap: 7px; }
    .site-header .brand-mark { width: 30px; height: 30px; font-size: 12px; }
    .site-header :is(button, summary), .site-header .site-search { padding: 8px 10px; font-size: 12px; }
    .site-controls { margin-left: auto; gap: 6px; }
    .site-controls > [data-site-theme] { display: none !important; }
    .site-controls > [data-open-search] { display: none; }
    .site-toolbar { display: none; }
    .site-mobile-menu { display: block; }
    .site-mobile-menu nav { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px; gap: 2px 8px; background: var(--panel); border-radius: 0 0 10px 10px; }
    .site-mobile-menu nav a { min-height: 46px; padding: 10px; font-size: 14px; }
    .site-mobile-menu nav a[aria-current] { background: var(--accent-soft); border-radius: 6px; }
    .site-mobile-menu nav button { display: flex; align-items: center; justify-content: start; padding: 10px; min-height: 46px; border: 0; background: var(--panel-2); font-size: 13px; }
    .site-footer-inner { padding: 28px 16px 32px; gap: 24px; }
    .site-footer { margin-top: 24px; }
    .site-data-sources dl { grid-template-columns: minmax(0, 1fr); }
    .catalogue-panel .panel-head { padding: 16px; }
    .market-catalogue .table-toolbar { padding: 14px; }
    .catalogue-market-form { padding-inline: 14px; }
    .market-result-toolbar { padding-inline: 14px; }
    .catalogue-pager { padding-inline: 14px; }
    .market-catalogue .market-table-flow :is(th, td) { padding: 10px 7px; font-size: 12px; }
    .market-catalogue .market-table-flow .asset b { font-size: 13px; }
    .market-catalogue .market-table-flow .asset small { font-size: 11px; }
    .market-catalogue .market-table-flow :is(th, td):nth-child(2) { min-width: 96px; }
    .market-catalogue .market-table-flow :is(th, td):first-child { width: 36px; padding-inline: 0; }
    .market-catalogue [data-market-table] .star { min-width: 36px; width: 36px; }
    .catalogue-table :is(th, td), .route-defi .table-wrap :is(th, td) { padding: 11px 12px; font-size: 13px; }
    .catalogue-search { padding: 16px; }
    .catalogue-note { margin-inline: 16px; }
    .tool-panel .panel-head, .tool-panel .panel-content { padding: 16px; }
    .tool-panel .panel-head h2 { font-size: 17px; }
    .tool-workbench { gap: 18px; }
    .tool-values .tool-primary-value { padding: 16px; }
    .tool-values dd { font-size: 21px; }
    .tool-catalogue-grid > li { padding: 20px; }
    .tool-catalogue-grid h2 { font-size: 20px; }
    .tool-form-actions button { flex: 1 1 auto; }
    .news-home .page-intro h1 { font-size: 30px; }
    .news-home-filters { padding: 16px; margin-top: 18px; grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .news-home-filters > label:first-child, .news-home-filters > button, .news-home-filters > .news-secondary-filters { grid-column: 1; grid-row: auto; }
    .news-home-filters > button { width: 100%; }
    .news-home-topics { gap: 20px; }
    .news-home-topics a { font-size: 13px; }
    .news-publisher-status { margin-bottom: 20px; }
    .news-latest-grid { grid-template-columns: minmax(0, 1fr); }
    .home-news-lead { padding: 0 0 24px; grid-column: 1; grid-row: auto; }
    .home-news-lead h3, .home-news-text.home-news-lead h3 { font-size: clamp(26px, 6.8vw, 34px); }
    .home-news-support { padding-block: 22px; }
    .home-news-support h3 { font-size: 22px; }
    .home-news-meta { font-size: 11px; }
    .home-news-row { gap: 14px; }
    .home-news-row h3 { font-size: 18px; }
    .home-news-row .home-news-image { flex: 0 0 90px; }
    .home-news-row .home-news-image img { width: 100%; aspect-ratio: 4 / 3; }
    .home-news-row .home-news-image figcaption { font-size: 10px; }
    .research-group-band { padding: 12px 16px; }
    .research-directory-row { padding: 18px; }
    .research-filters { padding: 16px; }
    .research-article { padding: 20px; }
    .research-facts { padding: 18px; gap: 18px; }
    .learn-search { padding: 16px; }
    .learning-path { padding-block: 18px; }
    .learn-guide-card .guide-card-body, .learn-feature-card .guide-card-body { padding: 20px; }
    .learn-guide-card h3 { font-size: 20px; }
    .learn-feature-card h3 { font-size: 25px; }
    .learn-article .article-quick { padding: 20px; }
    .article-header h1 { font-size: 32px; }
    .article-summary { font-size: 17px; }
    .article-body { font-size: 16px; line-height: 1.8; }
    .article-body h2 { font-size: 24px; }
    .prose { margin: 0; padding: 20px; }
    .fees-page .fee-network-panel .panel-head, .fees-page .fee-network-panel .panel-content, .workflow-panel .panel-content { padding: 16px; }
    .fees-page .fee-comparison :is(th, td) { padding: 10px 8px; font-size: 12px; }
    .tracking-workspace .tracking-scroll tr { border-radius: 8px; }
    .site-search-form { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 10px; padding: 16px; }
    .site-search-form label:first-child { grid-column: 1 / -1; }
    .site-search-results h2 { font-size: 20px; }
    .toast { bottom: 18px; }
}
@media (max-width: 389px) {
    .shell, .shell:not(.route-terminal):not(.route-coin), .resource-shell { padding-inline: 12px; }
    .site-masthead { padding-inline: 12px; gap: 6px; }
    .site-header .brand { font-size: 14px; gap: 6px; }
    .site-header .brand > span:last-child { display: inline; }
    .site-header .brand-mark { width: 27px; height: 29px; }
    .site-header .site-search { font-size: 11px; padding-inline: 8px; }
    .site-mobile-menu summary { padding-inline: 8px; font-size: 11px; }
    .overview .kpi-grid .kpi { padding: 12px !important; min-height: 148px; }
    .kpi strong { font-size: 21px; }
    .kpi .eyebrow { font-size: 11px; }
    .sentiment-endpoints { font-size: 9px; }
    .quote-card { padding: 10px 8px; }
    .quote-card strong { font-size: 15px; }
    .quote-card .star { min-width: 24px; }
    .panel-head, .panel > .panel-head { padding-inline: 14px; }
    .panel-head h2 { font-size: 14px; }
    .panel-actions { gap: 0; }
    .mover-row .price, .mover-row .chip, .mover-row .chip span { font-size: 11px; }
    .market-catalogue .market-table-flow :is(th, td):nth-child(2) { min-width: 72px; }
    .market-catalogue .market-table-flow .asset small { max-width: 72px; }
    .home-news-row { flex-direction: column; }
    .home-news-row .home-news-image { flex: none; width: 120px; }
    .home-news-story h3 { overflow-wrap: normal; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    :focus-visible { outline: 3px solid Highlight !important; }
    .overview .kpi-grid, .tool-values .tool-primary-value { border: 1px solid CanvasText; }
    .tabs button.active, .catalogue-tabs a[aria-current], .site-toolbar [aria-current] { border-bottom: 2px solid LinkText; }
}
