:root {
  color-scheme: light;
  --canvas: #eef1ec;
  --paper: #fcfdf9;
  --ink: #192922;
  --muted: #51645a;
  --line: #d6dfd7;
  --soft: #edf3ec;
  --nav: #132620;
  --nav-line: #344b41;
  --nav-text: #c2d2c8;
  --lime: #d6fa9b;
  --positive: #176b4d;
  --negative: #a9344a;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Instrument Serif", Georgia, serif;
  --rail: 216px;
  --radius: 13px;
  --gutter: clamp(20px, 3.15vw, 54px);
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h2, h3 { font-weight: 600; }
:focus-visible { outline: 2px solid #2a7958; outline-offset: 3px; }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.muted { color: var(--muted); }
.numeric, .value { font-variant-numeric: tabular-nums; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 10;
  inset: 10px auto auto 10px;
  padding: 12px 16px;
  background: var(--paper);
}
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-header {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  padding: 29px 16px 21px;
  background: var(--nav);
  color: var(--nav-text);
  overflow-y: auto;
}
.app-header :focus-visible, .lead-story :focus-visible { outline-color: var(--lime); }
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: #f3f8ef;
  text-decoration: none;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -.05em;
}
.brand small { display: block; margin-top: 5px; color: var(--nav-text); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.brand-mark {
  width: 37px;
  height: 37px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 10px;
  border-radius: 10px;
  background: var(--lime);
}
.brand-mark i { width: 3px; height: 8px; border-radius: 1px; background: var(--nav); }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 17px; }
.app-header nav { display: grid; gap: 5px; margin: 44px 0 24px; }
.app-header nav a, .header-tools button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 12px;
  border-radius: 7px;
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 500;
}
.app-header nav a:hover, .header-tools button:hover { background: #203a30; color: white; }
.app-header nav a.active { background: #2b4638; color: var(--lime); box-shadow: inset 2px 0 var(--lime); }
#universe-nav-count { margin-left: auto; font: .75rem var(--mono); color: #b7cbbd; }
.header-tools { display: grid; gap: 4px; margin-top: auto; border-top: 1px solid var(--nav-line); padding-top: 11px; }
.icon-button { background: transparent; border: 0; }
.header-tools button { padding-inline: 8px; }
.header-tools kbd { margin-left: auto; border: 1px solid #577165; padding: 1px 5px; border-radius: 4px; font: .75rem var(--mono); }

main {
  width: calc(100% - var(--rail));
  max-width: 1760px;
  margin-left: var(--rail);
  padding: 32px var(--gutter) 24px;
}
.workspace-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 23px; }
.workspace-header h1 {
  font: 400 clamp(3rem, 5.25vw, 5.4rem)/.93 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.data-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 11px; color: var(--muted); font-size: .875rem; }
.data-meta > span:not(:first-child, :empty) { padding-left: 12px; border-left: 1px solid #aebfb1; }
#asof-top { font-weight: 600; color: var(--ink); }
#last-checked:empty { display: none; }
.workspace-tools, .segmented, .mini-tabs { display: flex; align-items: center; }
.workspace-tools { gap: 8px; flex: none; }
.segmented, .mini-tabs { padding: 3px; gap: 2px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; }
.segmented { background: #e3eae2; }
.segmented button, .mini-tabs button { border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: .8125rem; }
.segmented button { padding: 8px 11px; min-height: 34px; }
.segmented button.selected { background: var(--nav); color: #f5fbf3; }
.mini-tabs button { padding: 5px 8px; min-height: 28px; }
.mini-tabs button.selected { background: var(--paper); color: #244b39; box-shadow: 0 1px 3px #173d2220; }
.segmented button:hover:not(.selected), .mini-tabs button:hover:not(.selected) { color: var(--ink); background: #dce8dd; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  background: var(--paper);
  border: 1px solid #bacabd;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover { background: #e4f0e5; border-color: #8aaf98; }
.spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.benchmark-tape { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 30px; }
.benchmark-item {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 6px 12px;
  min-width: 0;
  min-height: 70px;
  text-align: left;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.benchmark-item:hover { border-color: #8da795; background: #f5f9f2; }
.benchmark-name, .benchmark-symbol, .benchmark-return small { display: block; }
.benchmark-name { font-size: .8125rem; font-weight: 600; }
.benchmark-symbol, .benchmark-return small { color: var(--muted); font-size: .6875rem; margin-top: 3px; }
.benchmark-symbol, .benchmark-return { font-family: var(--mono); }
.benchmark-return { font-size: .9375rem; font-weight: 500; }
.benchmark-return small { font-family: var(--sans); font-weight: 400; }
.loading-text, .chart-empty { color: var(--muted); padding: 16px; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.section-heading h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.035em; }
.lead-section-heading { margin-top: 0; }
.section-note, .panel-meta { color: var(--muted); font-size: .8125rem; }
.signal-workspace { display: grid; grid-template-columns: minmax(205px, .31fr) minmax(0, 1fr); gap: 12px; }
.lead-signals { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.lead-signal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 5px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  text-align: left;
}
.lead-signal:hover { background: #f2f7ef; border-color: #8da795; }
.lead-signal.active { background: #e0f0d3; border-color: #7e9f74; box-shadow: inset 3px 0 #42764e; }
.lead-signal-top, .lead-signal-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.lead-signal-top, .lead-signal-reason { color: #4e6454; font-size: .6875rem; }
.lead-signal-top > span:first-child { font-weight: 600; }
.lead-signal-title { font-weight: 600; font-size: .875rem; line-height: 1.22; }
.lead-signal-bottom { font: .8125rem var(--mono); color: #3c5e46; }
.lead-signal-bottom strong { font-size: 1.2rem; font-weight: 500; letter-spacing: -.035em; color: var(--ink); }
.lead-signal-bottom small { margin-left: 3px; font-size: .75rem; }

.lead-story {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 17px;
  padding: clamp(16px, 2.3vw, 33px);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 100% 0%, #2c473e 0, #18342b 50%, #142b24 100%);
  color: #eff8ec;
}
.lead-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 15px; }
.lead-eyebrow { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; color: #c5d7ca; font-size: .8125rem; }
#lead-period { font: .75rem var(--mono); color: var(--lime); }
.lead-story h2 { font: 400 clamp(2rem, 3.6vw, 3.65rem)/.98 var(--display); letter-spacing: -.022em; text-wrap: balance; }
.lead-metric { text-align: right; }
.lead-metric strong { display: block; font: 400 clamp(1.8rem, 3.5vw, 3.55rem)/1 var(--mono); letter-spacing: -.085em; color: var(--lime); }
.lead-metric > span { display: block; margin-top: 5px; color: #ccdecf; font-size: .8125rem; }
.lead-legs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px 17px; padding-top: 4px; }
.lead-leg { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: .8125rem; }
.lead-leg-label { color: #d4e6d8; }
.lead-leg-label small, .lead-leg > small { color: #c4d9cb; font-size: .75rem; }
.lead-leg strong { font: 500 .875rem var(--mono); }
.lead-leg .legend-dot { margin-right: 4px; }
.lead-bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lead-score { color: var(--lime); font: .8125rem var(--mono); }
.lead-score span { margin-left: 7px; color: #c5d7ca; font: .8125rem var(--sans); }
.lead-link { min-height: 33px; padding: 3px 10px; border: 1px solid #6d8a7c; border-radius: 6px; color: #eff8ec; background: transparent; font-size: .8125rem; }
.lead-link:hover { background: #37574a; }
.lead-visual { min-width: 0; padding-top: 13px; border-top: 1px solid #476254; }
.lead-chart-heading, .lead-chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #c5d7ca; font-size: .8125rem; }
.lead-chart-foot { margin-top: 4px; }
.lead-story .mini-tabs { background: #1a362d; border-color: #466254; }
.lead-story .mini-tabs button { color: #d3e4d8; }
.lead-story .mini-tabs button:hover, .lead-story .mini-tabs button.selected { color: var(--lime); background: #365548; box-shadow: none; }
.lead-story .line-chart { padding: 0; }
.lead-story .line-chart svg { max-height: 265px; }
.lead-story .chart-legend { color: #dbeadd; }
.lead-story .chart-legend button:hover { background: #365548; }
.lead-explanation { margin-top: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); font-size: .875rem; }
.lead-explanation summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.lead-explanation p { margin: 8px 0 0; max-width: 95ch; line-height: 1.5; }

.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.stat { padding: 10px 14px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat-label, .stat-value { display: block; }
.stat-label { font-size: .8125rem; color: var(--muted); }
.stat-value { margin-top: 3px; font: 500 1.125rem var(--mono); }
.stat-value small { margin-left: 5px; font: .75rem var(--sans); color: var(--muted); }

.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 16px 17px 9px; }
.panel-header h2, .panel-header h3 { font-size: 1rem; line-height: 1.3; }
.panel-header > div:first-child .panel-meta { display: block; margin-top: 3px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(245px, 1fr); gap: 12px; }
.line-chart { min-width: 0; padding: 2px 12px 12px; }
.line-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 2px 6px; margin: 3px 0 4px; color: var(--muted); }
.chart-legend button { border: 0; padding: 4px 5px; border-radius: 4px; background: transparent; font-size: .75rem; }
.chart-legend button:hover { background: var(--soft); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chart-legend .legend-dot { margin-right: 5px; }
.legend-off { text-decoration: line-through; opacity: .65; }
.movers-labels, .mover-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 53px; gap: 8px; align-items: center; padding: 8px 15px; text-align: left; }
.movers-labels { color: var(--muted); font-size: .75rem; }
.movers-labels > span:nth-child(n + 2) { text-align: right; }
.mover-row { width: 100%; min-height: 41px; border: 0; border-top: 1px solid #e6ebe5; background: transparent; }
.mover-row:hover, .bar-row:hover, .strategy-row:hover, tr[data-record]:hover { background: #edf4eb; }
.mover-identity { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.mover-symbol { flex: none; font: 500 .8125rem var(--mono); }
.mover-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .75rem; }
.mover-return { text-align: right; font: 500 .8125rem var(--mono); }
.sigma { white-space: nowrap; width: max-content; justify-self: end; border-radius: 4px; padding: 3px 5px; background: var(--soft); color: #345649; font: .75rem var(--mono); }
.sigma.elevated { background: #f5ecce; color: #6e5014; }
.panel-bottom-link, .text-link, .text-button, .detail-source a, .private-ref a { color: #235f45; font-weight: 500; text-underline-offset: 3px; }
.panel-bottom-link { display: block; padding: 10px 15px; border-top: 1px solid var(--line); font-size: .875rem; }
.text-link, .text-button { font-size: .875rem; }
.text-button { padding: 3px 0; background: none; border: 0; text-align: left; text-decoration: underline; }
.text-button:hover, .text-link:hover, .panel-bottom-link:hover { color: #16392b; }

.focus-grid, .currency-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.focus-card, .currency-card { display: flex; flex-direction: column; }
.focus-card-header { display: flex; justify-content: space-between; align-items: start; gap: 8px; padding: 15px 15px 6px; }
.focus-card h3 { font-size: 1rem; }
.chart-title-button { border: 0; background: transparent; padding: 0; text-align: left; font-weight: inherit; }
.chart-title-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.focus-metric { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding: 0 15px 6px; }
.focus-metric strong { font: 500 1.55rem var(--mono); letter-spacing: -.06em; }
.focus-metric span, .focus-footer { color: var(--muted); font-size: .75rem; }
.focus-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 9px 15px; }
.sector-ribbon { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.sector-tile, .heat-cell { border: 1px solid var(--line); border-radius: 7px; text-align: left; }
.sector-tile { min-width: 0; padding: 9px; background: var(--paper); }
.sector-tile:hover, .heat-cell:hover { border-color: #779887; }
.sector-tile > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .75rem; }
.sector-tile strong { display: block; margin: 4px 0; font: 500 .875rem var(--mono); }
.sector-tile small { color: var(--muted); font-size: .6875rem; }

.market-grid, .pair-grid, .strategy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.market-grid + .market-grid { margin-top: 12px; }
.bar-chart { padding: 4px 11px 11px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 1.1fr) minmax(45px, 1fr) 59px; align-items: center; gap: 7px; width: 100%; padding: 6px; border: 0; border-radius: 5px; background: transparent; text-align: left; }
.bar-name { font-size: .875rem; }
.bar-name small { display: block; font: .6875rem var(--mono); color: var(--muted); }
.bar-track { display: block; height: 7px; position: relative; background: var(--soft); border-radius: 2px; }
.bar-track::before { content: ""; position: absolute; inset: 0 auto 0 50%; width: 1px; background: #8fa79b; }
.bar-fill { display: block; position: absolute; inset-block: 0; border-radius: 2px; }
.bar-value { text-align: right; font: .8125rem var(--mono); }
.heatmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); padding: 5px 12px 12px; gap: 5px; }
.heat-cell { padding: 6px; color: var(--ink); }
.heat-name, .heat-value, .heat-symbol { display: block; }
.heat-name { font-size: .75rem; }
.heat-symbol { margin-top: 1px; color: var(--muted); font: .6875rem var(--mono); }
.heat-value { margin-top: 4px; font: 500 .8125rem var(--mono); }
.heat-key { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.heat-key i { width: 45px; height: 5px; background: linear-gradient(90deg,#d9909a,#eef1ec,#76ac9c); border-radius: 2px; }
.pair-panel .focus-metric { padding-top: 4px; }
.risk-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 7px; margin-bottom: 12px; }
.risk-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.risk-item-label { font-size: .8125rem; font-weight: 600; }
.risk-item-value { margin: 5px 0; font: 500 1rem var(--mono); }
.risk-item-value small, .risk-item-foot { color: var(--muted); font: .75rem var(--sans); }
.risk-item-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; }
.context-note { color: var(--muted); margin-top: 12px; font-size: .875rem; line-height: 1.5; }

.strategy-topline, .currency-topline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 12px; color: var(--muted); font-size: .875rem; }
.strategy-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.strategy-filters button { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); min-height: 36px; padding: 4px 9px; font-size: .8125rem; }
.strategy-filters button:hover { border-color: #779887; }
.strategy-filters button.selected { background: var(--nav); color: #f5fbf3; }
.strategy-columns, .strategy-row { display: grid; grid-template-columns: minmax(90px, 1fr) repeat(3, minmax(46px, auto)); align-items: center; gap: 7px; padding: 8px 11px; }
.strategy-columns { color: var(--muted); font-size: .75rem; }
.strategy-row { width: 100%; min-height: 56px; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; }
.strategy-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.strategy-columns > span:not(:first-child), .strategy-row > span:not(:first-child) { text-align: right; font-family: var(--mono); white-space: nowrap; }
.strategy-row > span:not(:first-child) { font-size: .8125rem; }
.strategy-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; min-width: 0; font-size: .8125rem; }
.strategy-identity b { font: 500 .8125rem var(--mono); }
.strategy-identity > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strategy-identity small { width: 100%; color: var(--muted); font-size: .75rem; }
.currency-comparison { margin-bottom: 12px; }
.currency-comparison .line-chart svg { max-height: 435px; }
.currency-symbol { color: var(--muted); font: .75rem var(--mono); }
.currency-return { display: grid; text-align: right; }
.currency-return strong { font: 500 1.25rem var(--mono); }
.currency-return > span { font-size: .75rem; color: var(--muted); }
.currency-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 6px 12px; }
.currency-periods > div { min-width: 0; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 7px 5px; text-align: center; }
.currency-periods > div.selected { border-color: #8eac97; background: #e4f0e1; }
.currency-periods dt, .currency-note { font-size: .8125rem; color: var(--muted); }
.currency-periods dd { margin: 3px 0 0; font: 500 .875rem var(--mono); }
.currency-note { padding: 7px 12px 12px; line-height: 1.5; }
.currency-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; margin-top: auto; border-top: 1px solid var(--line); padding: 8px 12px; align-items: center; font-size: .75rem; color: var(--muted); }

.table-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; }
.search-field { display: flex; flex: 1 1 215px; align-items: center; gap: 7px; min-height: 42px; padding: 0 9px; border: 1px solid #bacabd; border-radius: 7px; }
.search-field input { width: 100%; min-width: 0; border: 0; background: transparent; }
.search-field:focus-within { outline: 2px solid #2a7958; outline-offset: 2px; }
.search-field input:focus-visible { outline: 0; }
select { appearance: none; min-height: 42px; max-width: 100%; padding: 4px 28px 4px 8px; border: 1px solid #bacabd; border-radius: 7px; background: linear-gradient(45deg, transparent 51%, #486653 51%) calc(100% - 12px) 52% / 5px 5px no-repeat, linear-gradient(135deg, #486653 51%, transparent 51%) calc(100% - 7px) 52% / 5px 5px no-repeat, var(--paper); font-size: .875rem; }
.table-caption, .table-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 13px; color: var(--muted); font-size: .8125rem; }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; min-width: 730px; border-collapse: collapse; text-align: left; font-size: .875rem; }
th, td { padding: 8px; }
th { background: var(--soft); color: var(--muted); font-weight: 500; white-space: nowrap; }
th button { border: 0; background: transparent; padding: 0; }
th button:hover { text-decoration: underline; }
th button span { font-size: .75rem; }
td { border-bottom: 1px solid var(--line); }
th.numeric, td.numeric { text-align: right; }
td.numeric, .date-cell { white-space: nowrap; font: .8125rem var(--mono); }
tr[data-record] { cursor: pointer; }
tr[data-record]:focus-visible { outline-offset: -2px; }
.star-col { width: 33px; text-align: center; }
.star-button { color: var(--muted); border: 0; background: none; }
.star-button.starred { color: #815916; }
.ticker-cell { min-width: 155px; }
.ticker-badge { font: 600 .8125rem var(--mono); }
.instrument-name, .instrument-name small { display: block; }
.instrument-name small, .category-cell { color: var(--muted); font-size: .75rem; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; background: #26805a; }
.status-dot.stale { background: #ad742b; }
.detail-link { background: none; border: 0; color: var(--muted); }
.empty-cell { padding: 20px; text-align: center; color: var(--muted); }
.reference-section { margin-top: 12px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 12px; }
.reference-section summary { cursor: pointer; font-weight: 600; }
.reference-section summary span { color: var(--muted); font-size: .75rem; }
.private-references { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 7px; margin-top: 10px; }
.private-ref { display: grid; align-content: start; gap: 3px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font-size: .875rem; }
.private-ref small { color: var(--muted); font-size: .75rem; }

.refresh-status, .status-message { margin: 0 0 14px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .875rem; }
.status-message.error { border-color: #dab2b9; color: var(--negative); }
.refresh-status-row { display: flex; align-items: center; gap: 9px; }
#refresh-summary { flex: 1; }
#refresh-counter { white-space: nowrap; font: .75rem var(--mono); color: var(--muted); }
#refresh-progress { display: block; margin-top: 7px; width: 100%; height: 5px; accent-color: #42764e; }
#refresh-details { margin-top: 5px; color: var(--muted); font-size: .8125rem; }
#refresh-details summary { cursor: pointer; }
#refresh-detail-text { white-space: pre-line; max-height: 140px; overflow-y: auto; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
footer > span:first-child { color: var(--ink); font-weight: 600; }

dialog { width: min(710px, calc(100% - 22px)); max-height: calc(100% - 22px); padding: clamp(14px, 3vw, 25px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #10241caa; }
.dialog-close { position: absolute; right: 9px; top: 9px; width: 34px; height: 34px; border-radius: 5px; font-size: 1.45rem; }
.dialog-close:hover { background: var(--soft); }
.detail-heading { padding-right: 28px; }
.detail-heading h2, .method-dialog h2 { font: 400 2.25rem/1.05 var(--display); }
.detail-subtitle, .detail-source, .method-status { margin-top: 7px; color: var(--muted); font-size: .875rem; }
.detail-returns, .detail-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.detail-returns > div, .detail-meta > div { padding: 8px; background: var(--soft); border-radius: 6px; overflow-wrap: anywhere; }
.detail-returns label, .detail-meta label { display: block; margin-bottom: 4px; color: var(--muted); font-size: .75rem; }
.detail-returns strong { font: 500 1rem var(--mono); }
.detail-meta { font-size: .8125rem; }
.detail-notes, .method-list { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.detail-notes summary { cursor: pointer; color: var(--ink); }
.detail-notes p { margin-top: 6px; }
.method-list > div { display: grid; grid-template-columns: minmax(80px, 1fr) 3fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.method-list dt { color: var(--ink); font-weight: 600; }
.method-list dd { margin: 0; }
.chart-tooltip { z-index: 15; position: fixed; pointer-events: none; min-width: 125px; padding: 8px; border: 1px solid var(--nav-line); border-radius: 6px; background: var(--nav); color: #eff8ec; font-size: .75rem; }
.chart-tooltip > strong { display: block; padding-bottom: 3px; }
.tip-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tip-line .legend-dot { margin-right: 4px; }
.tip-line b { font: .75rem var(--mono); }

@media (max-width: 1200px) {
  :root { --rail: 180px; }
  .app-header { padding-inline: 12px; }
  .header-tools button { font-size: .8125rem; gap: 6px; }
  .signal-workspace { grid-template-columns: minmax(174px, .33fr) minmax(0, 1fr); }
  .benchmark-return { font-size: .875rem; }
  .lead-signal { padding-inline: 9px; }
}
@media (max-width: 950px) {
  :root { --rail: 0px; }
  .app-header { position: sticky; top: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 9px var(--gutter) 0; overflow: visible; }
  .brand { padding: 0; font-size: 19px; }
  .brand small { margin-top: 3px; }
  .brand-mark { width: 33px; height: 33px; padding-bottom: 8px; }
  .app-header nav { grid-area: 2 / 1 / 3 / -1; grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; gap: 2px; margin: 7px calc(-1 * var(--gutter)) 0; padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: thin; scrollbar-color: #4e6c5c transparent; }
  .app-header nav a { min-height: 39px; padding-inline: 10px; border-radius: 5px 5px 0 0; }
  .app-header nav a.active { box-shadow: inset 0 -2px var(--lime); }
  .header-tools { display: flex; border: 0; padding: 0; margin: 0; }
  .header-tools button { min-height: 38px; padding: 0 9px; }
  .header-tools button span, .header-tools kbd { display: none; }
  main { padding-top: 24px; }
}
@media (max-width: 650px) {
  :root { --gutter: 13px; }
  .workspace-header { align-items: start; flex-direction: column; gap: 11px; margin-bottom: 13px; }
  .workspace-header h1 { font-size: 3.15rem; }
  .data-meta { margin-top: 7px; font-size: .8125rem; }
  .benchmark-tape { grid-auto-flow: column; grid-auto-columns: minmax(128px, 38%); grid-template-columns: none; gap: 5px; overflow-x: auto; margin-bottom: 19px; padding-bottom: 4px; scrollbar-width: thin; }
  .benchmark-item { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 82px; padding: 8px; }
  .signal-workspace { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lead-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .lead-signal { min-height: 90px; padding: 7px 8px; }
  .lead-story { gap: 11px; padding: 14px; }
  .lead-copy { gap: 6px 8px; }
  .lead-story h2 { font-size: clamp(1.95rem, 7.5vw, 3rem); }
  .lead-metric strong { font-size: clamp(1.7rem, 6vw, 2.4rem); }
  .lead-chart-heading, .lead-chart-foot { font-size: .75rem; }
  .lead-story .mini-tabs button { padding-inline: 5px; }
  .overview-grid, .focus-grid, .market-grid, .pair-grid, .strategy-grid, .currency-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .table-toolbar { gap: 6px; }
  .table-toolbar .search-field { flex-basis: 100%; }
}
@media (max-width: 360px) {
  #universe-nav-count { display: none; }
  .lead-signal-top { flex-wrap: wrap; gap: 0 3px; }
  .lead-leg-label small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .spinning { animation: none; }
}
