/* Load AFTER either site's base stylesheet. Presentation only: navigation,
   hidden/open states, chart geometry, clocks and results belong to the host. */
#funds .fund-compare table {border-collapse:collapse;width:100%;table-layout:fixed;min-width:0;font-variant-numeric:tabular-nums}
#funds .fund-compare :is(th,td) {padding:7px 5px;text-align:right;line-height:1.4;border-bottom:1px solid var(--line);white-space:normal}
#funds .fund-compare :is(th,td):first-child {text-align:left}
#funds .fund-compare h2 {margin:0;font-size:16px}
#funds .fund-compare p {margin:3px 0 8px}
#funds .fund-compare small {display:block;font-size:11px}
#funds #funds-summary,#funds #fund-comparison {padding:12px 16px;background:var(--surface);border:1px solid var(--line)}
#funds .fund-expand {margin:8px 0;padding:0 14px;border:1px solid var(--line);border-radius:5px;background:var(--surface)}
#funds .fund-expand>summary {cursor:pointer;padding:12px 0;color:var(--accent);font-weight:600}
#funds .fund-expand[open] {padding-bottom:12px}
#funds .fund-expand label {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#funds .fund-expand select {width:auto;max-width:100%}
#funds .fund-compare thead th {background:var(--term-night);color:var(--muted)}
#funds .fund-compare tbody :is(th,td) {background:var(--surface);color:var(--ink)}
#funds .fund-compare tbody tr:hover :is(th,td) {background:#263a47}
@media(max-width:600px){#funds .fund-compare :is(td,th){font-size:13px}#funds .fund-compare th:first-child{width:24%}}
#fund-action-brief.panel {padding:14px 18px;margin:0 0 12px;border-left:3px solid var(--accent)}
#fund-action-brief.panel h2 {font-size:clamp(18px,2vw,23px);line-height:1.4;margin:5px 0 9px;color:var(--ink)}
#fund-action-brief p {margin:4px 0;line-height:1.6;color:var(--ink)}
#fund-action-brief p strong {color:var(--accent);white-space:nowrap}
:root {
  color-scheme:dark;
  --term-ink:#e1e9ee; --term-muted:#a5b8c3; --term-night:#1b303e;
  --term-cyan:#82d3d5; --term-ice:#193b45; --term-line:#32424f;
  --term-rise:#f19198; --term-fall:#77c5a1; --term-amber:#e6c185;
  --ink:var(--term-ink); --muted:var(--term-muted); --nav:#09131c;
  --canvas:#0e1721; --paper:var(--canvas); --surface:#182530; --line:var(--term-line);
  --accent:var(--term-cyan); --accent-bg:var(--term-ice); --up:var(--term-rise);
  --positive:var(--up); --down:var(--term-fall); --negative:var(--down);
  --warn:var(--term-amber); --radius:5px;
}
body {background:var(--canvas);color:var(--ink);font-family:"Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif;font-variant-numeric:tabular-nums lining-nums}
::selection {background:#b7e6e7;color:#092b35}
.sidebar {background:var(--nav);color:#edf9fa}
.sidebar .brand svg {color:#71d9da}
.sidebar nav :is(button,a){border-radius:3px;text-decoration:none}
.sidebar nav :is(button,a):hover {background:#193d48;color:white}
.sidebar nav :is(button,a)[aria-current="page"] {background:#214854;color:#fff;box-shadow:inset 3px 0 #75d9db}
.sidebar-foot {border-top:1px solid #36515b;color:#bdcfd5}
.topbar {border-bottom:1px solid #2e404d;background:#131f2a}
.topbar :is(#updated,#snapshot-time){color:var(--muted);font-variant-numeric:tabular-nums}
.page-heading,.page-head {align-items:center;gap:12px;margin-bottom:16px}
.page-heading h1,.page-head h1 {font-size:clamp(22px,2vw,29px);line-height:1.3;font-weight:700;letter-spacing:-.025em}
.page-heading p,.page-head p {color:var(--muted);font-size:13px;margin-top:4px}
.page .panel,.workspace-panel {border:1px solid var(--line);background:var(--surface);border-radius:5px;min-width:0}
.page .panel h2,.workspace-panel h2 {font-size:16px;font-weight:680;line-height:1.5}
.section-title,.section-head {row-gap:8px}
.section-title>span,.section-head>.muted,.chart-caption,.chart-note,.opinion-meta {color:var(--muted)}
.page :is(a,summary,.text-button,.author-link) {color:var(--term-cyan);text-underline-offset:.24em}
button,input,select {accent-color:var(--term-cyan)}
:is(button,input,select,summary,a,[tabindex]):focus-visible {outline:3px solid #87d7de;outline-offset:2px}
.sidebar :focus-visible,#author-sheet .sheet-head :focus-visible {outline-color:#a3f2f3}
button:disabled {cursor:not-allowed;opacity:.65}
.workspace-tabs,.segmented,.chart-controls {display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.workspace-tabs {min-width:0;margin-block:0 14px;border-bottom:1px solid var(--line);padding-bottom:5px}
.workspace-tabs :is(button,a,[role=tab]),.segmented button,.chart-controls button {
  min-height:34px;border:1px solid transparent;border-radius:3px;padding:5px 10px;
  color:var(--muted);background:transparent;font:inherit;font-size:13px;text-decoration:none;
}
.workspace-tabs :is([aria-selected=true],[aria-pressed=true],[aria-current=page],.active,.selected),
.chart-controls button.selected,.segmented button[aria-pressed=true] {
  background:var(--term-ice);border-color:#3a7580;color:#b4eaeb;font-weight:650;
}
.workspace-tabs :is(button,a):hover,.segmented button:hover,.chart-controls button:hover {background:#223541}
.workspace-panel,.page,.table-wrap,.filters>* {min-width:0}
.table-wrap {max-width:100%;overscroll-behavior-inline:contain;scrollbar-color:#516574 #17232d}
.table-wrap table {font-variant-numeric:tabular-nums;border-collapse:separate;border-spacing:0}
.table-wrap th {background:#233442;color:#c7d7df;font-weight:650;font-size:12px;line-height:1.5}
.table-wrap :is(th,td){padding:9px 10px;border-bottom:1px solid #2d3e4b;vertical-align:top}
.table-wrap tbody tr:nth-child(even)>td {background:#1b2935}
.table-wrap tbody tr:hover>td,.table-wrap tbody tr:focus-within>td {background:#263a47}
.table-wrap td small {color:var(--muted);font-size:12px}
.table-wrap .numeric {display:block;text-align:right;font-variant-numeric:tabular-nums}
.table-wrap tbody td:first-child {color:#dae8ef;font-weight:550}
.page .up {color:var(--term-rise)} .page .down {color:var(--term-fall)}

/* Low-glare workbench. Deliberately do not target exported canvas artwork. */
html,body,.workspace,.app-shell {background:var(--canvas)}
.sidebar {border-inline-end:1px solid #2b3c48}
.page :is(h1,h2,h3),#page-label {color:#eef4f6}
.page :is(.muted,.meta,small),.author-note small,.sidebar-foot p {color:var(--muted)}
button,input,select,.filters input {background:#1d2d38;border-color:#4d6270;color:var(--ink)}
button:hover:not(:disabled) {background:#2a404b;border-color:#607e87}
input::placeholder {color:#a1b0ba;opacity:1}
.table-wrap tbody tr:hover {background:#263a47}
.page tbody tr:is(:hover,:focus-within) {background:#263a47}
#author-sheet .sheet-matrix tbody tr:is(:hover,:focus-within)>:is(th,td) {background:#263a47}
.table-wrap tbody td {background:var(--surface)}
:is(.explain,.evidence,.workspace-pagination,.workspace-toolbar) {background:#182630;color:var(--ink)}
.workspace-pagination,.pagination,.workspace-toolbar {display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding:8px 12px;border:1px solid var(--line);border-radius:4px}
.workspace-pagination-form,.workspace-author-nav {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.workspace-pagination input[type=number] {width:5em}
.workspace-author-nav {margin:8px 0}
.workspace-author-nav button {border-radius:3px;font-size:13px}
.workspace-author-nav [aria-pressed=true]{background:#223f4a;border-color:#527c86;color:#cbebed}
.page .workspace-panel:not(.panel){border:0;background:transparent}
#tracking .workspace-panel:not(.panel){padding:0}
.workspace-tabs {background:#111f2b;padding:5px;border:1px solid #334957;border-radius:5px}
.workspace-tabs :is([aria-selected=true],[aria-pressed=true],[aria-current=page],.active,.selected){box-shadow:inset 0 -2px #78c8c9}
.page .tag,#author-sheet .sheet-badge {background:#263542;color:#c6d5de;border-color:#445765}
.page .tag.bullish,#author-sheet .sheet-badge.bullish {background:#3b2a32;color:#f2a1a7}
.page .tag.bearish,#author-sheet .sheet-badge.bearish {background:#203b34;color:#94d0ae}
.page .tag.range,#author-sheet .sheet-badge.range {background:#27394c;color:#b3cce7}
#author-sheet li small,#author-sheet .sheet-foot,#author-sheet .sheet-feedback:not(:empty) {color:#adc0cb}
#author-sheet .sheet-head {border-bottom:1px solid #48616d}
#author-sheet button {background:#29414c;color:#d3eded;border-color:#59757e}
#author-sheet button:hover:not(:disabled),#author-sheet button:focus-visible {background:#263d49;color:#edf7f8;border-color:#607e87}
#author-sheet .quick-author h3 {color:#e0edf0}
#author-sheet .quick-author .meta {color:var(--term-muted);font-size:12px}
#author-sheet .quick-author button {background:transparent;color:var(--accent);border:0;text-decoration:underline;text-underline-offset:3px}
.page .body-text,.note-evidence blockquote {padding:12px 14px;background:#dae2e5;color:#182b37;border-radius:2px}
/* Overview: instrument strip, then a readable author-by-author sheet. */
.page .market-strip {background:#142936;border-color:#3c5561;gap:0;overflow:hidden}
.page .market-strip>div {background:transparent;color:white;padding:12px 16px;border:0;border-inline-end:1px solid #365562}
.page .market-strip :is(small,.market-name){color:#c0d4db;font-size:12px}
.page .market-strip strong {display:block;color:white;font-weight:600;font-size:clamp(19px,1.7vw,25px);line-height:1.4}
.page .market-strip .up {color:#ffabb2}.page .market-strip .down {color:#88d7ae}
#author-sheet .sheet-head {background:var(--term-night)}
#author-sheet .sheet-head h2 {color:#fff;font-size:18px}
#author-sheet .sheet-list li {border-color:#314350}
#author-sheet .sheet-who strong {color:#dee9ef}
.readout h3,#readout h3,.advice-item h3 {font-size:14px;color:#a0ced4}
#readout p,.advice-item p {max-width:65ch}

/* Views: controls form a search rail; evidence stays subordinate to the claim. */
#views .filters {padding:12px 14px;background:#1b2c38;border:1px solid var(--line);border-radius:4px;align-items:end}
#views .filters label {color:#c6d5dd;font-size:12px;font-weight:550}
#views .filters :is(select,input){min-height:36px;background:var(--surface);color:var(--ink);border:1px solid #4b626f;border-radius:3px}
#result-count,#queue-count {font-variant-numeric:tabular-nums;color:#abccd3}
#views #opinions :is(.opinion,.observation) {padding-block:14px;border-bottom:1px solid var(--line)}
.opinion-head {gap:8px;align-items:baseline}
.opinion-summary,#views .opinion>p:not(.opinion-meta,.meta){font-size:15px;line-height:1.7;max-width:72ch;color:var(--ink)}
.opinion-fields {background:#1d303d;padding:8px 12px;border-radius:3px}
.opinion-fields dt {color:#c0d2db;font-weight:650}
.body-text,.note-evidence blockquote {line-height:1.75;overflow-wrap:anywhere}
.article-row summary,.evidence summary {padding-block:4px}

/* Tracking: comparisons remain separate from prose, counts separate from returns. */
.metrics-strip,.fund-overview-metrics {gap:1px;background:var(--line);border:1px solid var(--line);border-radius:4px;overflow:hidden}
.metrics-strip>.metric,.fund-overview-metrics>.metric {background:#1e303d;color:var(--ink);border:0;border-radius:0;padding:11px 14px}
.metric strong {font-size:clamp(17px,1.5vw,23px);font-weight:650;line-height:1.4}
.mini-bars span.complete {background:#69aeb7}
#tracking :is(.judgment-rules,.author-note details,.information-evidence[open]) {background:#1b2c38;border-radius:3px;padding:10px 12px}
#tracking .timeline-item {border-inline-start:2px solid #55808c;padding-inline-start:12px}
#tracking .progress-track {background:#2c3c47}#tracking .progress-track span {background:#69aeb7}
#tracking :is(#ledger-summary,#follow,#research) td:not(:first-child) {font-variant-numeric:tabular-nums}

/* Funds: differentiate the dated observation, the series and its readout. */
#funds-summary,#fund-summary {background:#1c3540;color:#e0eeee;border:1px solid #3a5661;border-radius:4px;padding:12px 14px}
#funds-summary .fund-headline {color:#c9e8ed;font-size:16px;font-weight:650}
.chart-box,.chart {border:1px solid #354653;background:#111c27;border-radius:4px;padding:8px}
.chart-box .chart-readout {display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:0 2px 7px}
.chart-readout strong {color:#b3dddf;font-variant-numeric:tabular-nums}
.chart-box .chart-grid,.chart svg line {stroke:#364b58;stroke-width:1;stroke-dasharray:3 4}
.chart-box .chart-line,.chart .chart-line,#market-chart svg path:not([class]) {stroke:#74cacb;stroke-width:2.3;fill:none}
.chart-marker {fill:#fff;stroke:#82d3d5;stroke-width:2}.chart-cursor {stroke:#91aeb9}
.chart-box svg text,.chart svg text {fill:#a5b8c3}
#history {scrollbar-color:#516574 #17232d}

/* Collection: channel identity, clocks, and evidence limits are distinct lanes. */
#source-list.source-summary {border:1px solid var(--line);border-radius:5px;background:var(--surface);padding:0 16px}
#source-list>.meta {margin:0;padding:9px 0;border-bottom:1px solid var(--line)}
#source-list .source-row {align-items:start;grid-template-columns:minmax(120px,.7fr) minmax(210px,1.15fr) minmax(200px,1.55fr);gap:18px;padding:13px 0}
.source-row h2 {font-size:15px;color:#d7e6ec}
.source-row>div:nth-child(2) {font-variant-numeric:tabular-nums;color:#bed0da;border-inline-start:1px solid var(--line);padding-inline-start:14px}
.source-row>div:last-child {color:var(--muted);line-height:1.6}
#channels .table-wrap td:not(:first-child){white-space:nowrap}
#channels .table-wrap tbody td:first-child {font-weight:650}
#fund-metrics :is(th,td):nth-child(2),
#event-study :is(th,td):not(:first-child),
#ledger-summary :is(th,td):not(:first-child) {text-align:right}
.workspace-panel>.workspace-heading,.workspace-section-head {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 14px;margin-bottom:12px}
.page .tag.info {color:#a2dce1;background:#203d49}
.page .tag.pending,.page .tag.conditional,.pill-note,.notice:not(.error),.status-pending {color:#ebc888;background:#383122}
.error-note,.notice.error,#notice.error {background:#3c2a30;color:#ffb6b9;border-color:#83555e}
.page .empty,.workspace-empty {background:#1b2a35;color:#b2c4cf;padding:14px;border-radius:3px}
:is(details.explain,details.archive)[open] {border-color:#4f717e}
.page :is(summary,button,a,input,select){scroll-margin-block:80px 12px}
@media(min-width:1051px){
  .page .panel:not(#author-sheet),.workspace-panel {padding:18px 20px}
  #views .filters .search-label {flex:1}
  .table-wrap th {position:sticky;top:0;z-index:1}
}
@media(max-width:800px){
  main {min-width:0}
  .page .panel:not(#author-sheet),.workspace-panel {padding:14px 12px}
  .page-heading,.page-head {align-items:flex-start;flex-wrap:wrap;gap:6px}
  .workspace-tabs {flex-wrap:nowrap;overflow-x:auto;padding:4px 4px 6px;scrollbar-width:thin}
  .workspace-tabs>* {flex:none}
  .page .market-strip {grid-template-columns:repeat(2,minmax(0,1fr))}
  .page .market-strip>div {padding:9px 11px;border-bottom:1px solid #365562}
  #views .filters {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:10px}
  #views .filters :is(h2,.search-label,label:has(input[type=search])) {grid-column:1/-1}
  #views .filters label {display:grid;gap:3px;align-content:start;width:100%}
  #views .filters :is(input,select) {width:100%;min-width:0;max-width:100%}
  .page .chart-readout strong {font-size:14px}
  #source-list .source-row {grid-template-columns:minmax(0,1fr);gap:8px}
  #source-list .source-row>div:nth-child(2){border:0;background:#1d303c;padding:7px 10px}
  #channels .table-wrap tr>:first-child {position:sticky;left:0;z-index:1;border-inline-end:1px solid var(--line);background:#1d303c}
  .topbar button,.sidebar nav :is(button,a),.workspace-tabs :is(button,a),.filters :is(select,input) {min-height:40px}
  .page .table-wrap :is(th,td){padding:8px}
}
@media(prefers-reduced-motion:reduce){
  .page,.workspace-panel,.sidebar,.workspace-tabs>* {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media(forced-colors:active){
  [aria-current=page],[aria-selected=true],[aria-pressed=true],.chart-controls .selected {outline:2px solid Highlight}
  .chart-box .chart-line,.chart .chart-line,#market-chart svg path:not([class]) {stroke:CanvasText}
  :focus-visible{outline:3px solid Highlight}
}
