/* This page must stack inside the dashboard's horizontal tab container. */
.exh-view.tab-view.active, .exh-view.tab-view:only-child { display: block; }
.exh-view {
    --exh-teal: #34c6b1; --exh-amber: #e4b25c; --text-secondary: var(--text-muted);
    width: 100%; min-width: 0; min-height: 0; max-width: 1800px;
    margin: 0 auto; padding: 20px 24px 32px; color: var(--text-primary);
    overflow-y: auto; scrollbar-gutter: stable;
}
:root[data-theme="light"] .exh-view { --exh-teal: #087f70; --exh-amber: #8f5a00; }
.exh-view [hidden] { display: none !important; }
.exh-view :focus-visible { outline: 2px solid var(--exh-teal); outline-offset: 3px; }
.exh-view button, .exh-view select, .exh-view input {
    min-height: 40px; min-width: 0; max-width: 100%; border: 1px solid var(--control-border, var(--border));
    border-radius: 8px; padding: 8px 11px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: 13px;
}
.exh-view button, .exh-view select { cursor: pointer; }
.exh-view button:hover, .exh-actions a:hover { border-color: var(--exh-teal); }
.exh-view button:disabled { opacity: .45; cursor: default; }
.exh-view label { display: grid; gap: 5px; min-width: 0; font-size: 12px; color: var(--text-secondary); }
.exh-heading, .exh-market-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.exh-heading > div, .exh-market-heading > div { min-width: 0; }
.exh-heading h1 { font-size: 26px; letter-spacing: -.5px; margin: 4px 0; }
.exh-heading p { margin: 5px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.exh-eyebrow { font-size: 11px; line-height: 1.5; letter-spacing: .08em; color: var(--exh-teal); font-weight: 650; }
.exh-tag { display: inline-block; font-size: 10px; vertical-align: middle; margin-left: 8px; border: 1px solid var(--control-border, var(--border)); color: var(--exh-teal); padding: 4px 7px; border-radius: 5px; }
.exh-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exh-status { font-size: 12px; line-height: 1.6; color: var(--text-secondary); margin: 12px 0 18px; overflow-wrap: anywhere; }
.exh-status.error { color: var(--red, #ef5350); }
.exh-workspace { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 20px; align-items: start; min-width: 0; }
.exh-main { min-width: 0; }
.exh-markets { min-width: 0; position: sticky; top: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-secondary); }
.exh-markets > summary { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 12px 14px; cursor: pointer; list-style: none; }
.exh-markets > summary::-webkit-details-marker { display: none; }
.exh-markets > summary::after { content: '⌄'; color: var(--text-secondary); }
.exh-markets[open] > summary::after { transform: rotate(180deg); }
.exh-markets > summary > span:first-child { display: grid; gap: 2px; flex: 1; min-width: 0; }
.exh-markets > summary strong { font-size: 14px; overflow-wrap: anywhere; }
.exh-picker-hint { font-size: 12px; color: var(--text-secondary); }
.exh-market-body { padding: 0 12px 12px; }
.exh-market-filters { display: grid; gap: 10px; }
.exh-status-filter, .exh-sort-filter, .exh-filter-help { grid-column: 1 / -1; }
.exh-filter-help { margin: 0; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.exh-markets input, .exh-markets select { width: 100%; }
.exh-market-list { overflow: auto; max-height: max(120px, calc(100dvh - 590px)); min-height: 80px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.exh-market-list button { display: block; text-align: left; width: 100%; margin-bottom: 5px; padding: 10px 9px; background: transparent; border-color: transparent; }
.exh-market-list button[aria-pressed="true"] { background: color-mix(in srgb, var(--exh-teal) 9%, var(--bg-secondary)); border-color: color-mix(in srgb, var(--exh-teal) 50%, transparent); }
.exh-coin-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 8px; font-weight: 650; font-size: 13px; overflow-wrap: anywhere; }
.exh-coin-title small { font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.exh-coin-meta { display: block; font-size: 11px; line-height: 1.5; color: var(--text-secondary); margin-top: 4px; overflow-wrap: anywhere; }
.exh-coin-event time { font-variant-numeric: tabular-nums; }
.exh-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--exh-teal); margin-right: 5px; }
.exh-dot.stale { background: var(--exh-amber); }
.exh-market-heading h2 { font-size: 21px; margin: 0; overflow-wrap: anywhere; }
.exh-note { font-size: 12px; line-height: 1.6; color: var(--text-secondary); margin: 8px 0; overflow-wrap: anywhere; }
.exh-assessments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.exh-assessment { min-width: 0; padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); overflow-wrap: anywhere; }
.exh-assessment .exh-state { display: block; font-size: 20px; line-height: 1.3; font-weight: 650; margin: 6px 0; }
.exh-assessment p { font-size: 12px; line-height: 1.5; color: var(--text-secondary); margin: 5px 0; }
.exh-assessment small { display: block; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.exh-assessment.warning { border-color: color-mix(in srgb, var(--exh-amber) 60%, var(--border)); }
.exh-assessment.confirmed { border-color: var(--exh-teal); }
.exh-assessment.stale { border-style: dashed; }
.exh-chart-card { min-width: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-secondary); }
.exh-chart-toolbar { display: flex; align-items: end; gap: 10px 12px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.exh-chart-title { display: grid; gap: 4px; flex: 1 0 130px; align-self: center; min-width: 0; }
.exh-chart-title strong { font-size: 14px; }
.exh-chart-title span { font-size: 11px; color: var(--text-secondary); }
.exh-chart-toolbar label { flex: 0 1 175px; }
.exh-chart-toolbar select { width: 100%; }
.exh-price-chart { width: 100%; min-width: 0; height: 360px; }
.exh-flow-chart { width: 100%; min-width: 0; height: 220px; }
.exh-chart-readout { margin: 0; padding: 10px 14px; min-height: 42px; font-size: 12px; line-height: 1.6; color: var(--text-secondary); border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.exh-metric-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px 0; font-size: 12px; color: var(--text-secondary); }
.exh-legend-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.exh-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.exh-plots { border-top: 1px solid var(--border); padding: 4px 14px; }
.exh-plots summary, .exh-details summary { cursor: pointer; font-size: 13px; font-weight: 600; min-height: 40px; padding: 10px 0; line-height: 1.5; overflow-wrap: anywhere; }
.exh-metric-toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 4px 14px; padding: 4px 0 12px; }
.exh-metric-toggles label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 12px; color: var(--text-primary); cursor: pointer; }
.exh-metric-toggles input { width: 17px; height: 17px; min-height: 0; padding: 0; flex: none; accent-color: var(--exh-teal); }
.exh-chart-card > p.exh-note { padding: 0 14px 8px; }
.exh-details { min-width: 0; margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; padding: 3px 14px; background: var(--bg-secondary); }
.exh-details[open] { padding-bottom: 12px; }
.exh-reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; padding: 8px 0; }
.exh-reason { min-width: 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.exh-reason h3 { font-size: 14px; margin: 0 0 8px; }
.exh-evidence-row { display: flex; gap: 9px; margin: 5px 0; }
.exh-evidence-label { width: 14px; flex: none; color: var(--exh-teal); }
.exh-evidence-label.off { color: var(--text-secondary); }
.exh-method { font-size: 13px; line-height: 1.7; color: var(--text-secondary); max-width: 1000px; }
.exh-method p + p { margin-top: 10px; }
.exh-table-scroll { width: 100%; min-width: 0; max-width: 100%; max-height: 600px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.exh-view table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.exh-view th, .exh-view td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.exh-view th { color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.exh-view td.exh-wrap { white-space: normal; min-width: 170px; max-width: 420px; line-height: 1.5; overflow-wrap: anywhere; }
.exh-value { font-variant-numeric: tabular-nums; }
.exh-unavailable { color: var(--text-secondary); }
.exh-empty { padding: 20px 12px; color: var(--text-secondary); font-size: 13px; text-align: center; line-height: 1.7; grid-column: 1 / -1; }
@media (max-width: 1200px) {
    .exh-view { padding: 18px; }
    .exh-workspace { grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
    .exh-chart-title { flex-basis: 100%; }
    .exh-chart-toolbar label { flex: 1 1 170px; }
}
@media (max-width: 960px) {
    .exh-workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .exh-markets { position: static; }
    .exh-market-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .exh-market-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-height: 300px; }
    .exh-heading { align-items: start; }
    .exh-heading .exh-actions { flex: 1 1 100%; }
}
@media (max-width: 600px) {
    .exh-view { padding: 12px 10px 24px; scrollbar-gutter: auto; }
    .exh-heading h1 { font-size: 23px; }
    .exh-heading p { font-size: 12px; }
    .exh-heading .exh-eyebrow { display: none; }
    .exh-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 6px; }
    .exh-actions > * { text-align: center; justify-content: center; font-size: 12px; padding: 8px 5px; }
    .exh-view button, .exh-view select, .exh-view input { min-height: 44px; }
    .exh-view select, .exh-view input { font-size: 16px; }
    .exh-status { margin: 10px 0 12px; }
    .exh-market-body { padding: 0 10px 10px; }
    .exh-market-filters { gap: 8px; }
    .exh-market-list { grid-template-columns: minmax(0, 1fr); max-height: 260px; }
    .exh-market-heading { gap: 8px; }
    .exh-market-heading h2 { font-size: 19px; }
    .exh-market-heading .exh-note { margin: 4px 0; }
    .exh-assessments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
    .exh-assessment { padding: 10px; }
    .exh-assessment .exh-state { font-size: 18px; }
    .exh-assessment .exh-eyebrow { font-size: 10px; letter-spacing: .035em; }
    .exh-chart-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 10px; }
    .exh-chart-title { grid-column: 1 / -1; }
    .exh-chart-toolbar button { grid-column: 2; grid-row: 1; justify-self: end; padding: 8px 10px; }
    .exh-chart-toolbar:has(button) .exh-chart-title { grid-column: 1; }
    .exh-chart-toolbar label { width: 100%; }
    .exh-chart-toolbar select { font-size: 16px; }
    .exh-price-chart { height: 300px; }
    .exh-flow-chart { height: 190px; }
    .exh-chart-readout { padding: 9px 10px; font-size: 11px; }
    .exh-metric-legend { padding: 10px 10px 0; gap: 6px 12px; font-size: 11px; }
    .exh-plots { padding: 3px 10px; }
    .exh-metric-toggles { grid-template-columns: minmax(0, 1fr); }
    .exh-metric-toggles label, .exh-plots summary, .exh-details summary { min-height: 44px; }
    .exh-metric-toggles input { min-height: 0; }
    .exh-details { padding-left: 10px; padding-right: 10px; }
    .exh-table-scroll { scrollbar-gutter: auto; }
    .exh-data-table { white-space: normal; }
    .exh-data-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
    .exh-data-table tbody { display: block; }
    .exh-data-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
    .exh-view .exh-data-table td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
    .exh-data-table td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 500; color: var(--text-secondary); margin-bottom: 3px; }
    .exh-data-table td:last-child { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
    .exh-market-filters { grid-template-columns: minmax(0, 1fr); }
}
