:root {
  color-scheme: dark;
  --bg: #061009;
  --panel: #0b1910;
  --border: #294d35;
  --text: #ddf2e1;
  --muted: #a8bfae;
  --mint: #a1f3ae;
  --red: #ffc2a6;
  --amber: #efda9e;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--mono); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 20; background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,.035) 3px, rgba(0,0,0,.035) 4px); }
a { color: var(--mint); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.page-shell { max-width: 1240px; margin: auto; padding: 0 32px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.wordmark { display: flex; align-items: center; gap: 15px; color: var(--text); text-decoration: none; }
h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.04em; line-height: 1.3; }
.ascii-mark { color: var(--mint); font-size: 24px; text-shadow: 0 0 12px #a1f3ae22; }
.header-scope { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.header-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; }
.mode-badge { color: var(--mint); border: 1px solid var(--border); padding: 3px 8px; white-space: nowrap; }
.mode-badge.sample { color: var(--amber); }
.read-only-label { color: var(--muted); white-space: nowrap; }
.run-strip { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.status-line { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; }
.status-dot.running { background: var(--mint); }
.status-dot.degraded { background: var(--amber); }
.section-nav { display: flex; gap: 24px; border-bottom: 1px dashed var(--border); margin-top: 10px; }
.section-nav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); font-size: 14px; text-decoration: none; }
.section-nav a:hover { color: var(--mint); }
main > section { margin-top: 30px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
h2 { font-size: 20px; line-height: 1.35; font-weight: 600; margin: 0; letter-spacing: -.03em; }
h3 { font-size: 17px; line-height: 1.5; font-weight: 600; margin: 0; }
.count-label, .section-caption, .tiny-label { color: var(--muted); font-size: 12px; font-weight: 400; }
.muted, .metric-note, .metric-label { color: var(--muted); }
.small { font-size: 12px; }
.report-notice { margin: 18px 0; padding: 12px 16px; border-left: 2px solid var(--amber); background: #efda9e08; font-size: 14px; color: var(--amber); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card { display: flex; flex-direction: column; min-width: 0; padding: 17px 18px; border: 1px solid var(--border); background: var(--panel); }
.metric-primary { border-color: #71a87d; }
.metric-label { font-size: 13px; }
.metric-value { font-size: clamp(25px, 2.7vw, 36px); line-height: 1.3; margin: 8px 0; font-weight: 500; letter-spacing: normal; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-primary .metric-value { color: var(--mint); }
.metric-note { font-size: 12px; line-height: 1.65; }
.positive { color: var(--mint) !important; }
.negative { color: var(--red) !important; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--border); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 20px; padding: 18px 20px 0; flex-wrap: wrap; }
.panel-heading p { margin: 4px 0 0; }
.performance-panel { margin-top: 14px; }
.experiment-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 24px; padding: 18px 0 4px; }
.experiment-facts > div { display: flex; flex-direction: column; gap: 5px; }
.experiment-facts strong { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-layout { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 12px; margin: 22px 20px 12px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 4px 0; font-variant-numeric: tabular-nums; }
.equity-chart { height: 180px; min-width: 0; }
.equity-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 6; }
.chart-line { stroke: var(--mint); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-empty { display: flex; align-items: center; min-height: 100%; color: var(--muted); font-size: 14px; }
.chart-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin: 0 20px 0 120px; font-size: 12px; color: var(--muted); }
.panel-footnote { color: var(--muted); font-size: 12px; margin: 14px 20px 18px; }
.valuation-note { font-size: 12px; line-height: 1.7; color: var(--amber); margin: 12px 0 0; max-width: 95ch; }
.section-intro { color: var(--muted); font-size: 13px; margin: -6px 0 16px; }
.position-list { display: grid; gap: 12px; }
.position-card { border: 1px solid var(--border); padding: 20px; background: var(--panel); }
.position-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.position-top h3 { max-width: 74ch; }
.outcome-badge { color: var(--mint); white-space: nowrap; font-size: 12px; padding: 3px 8px; border: 1px solid var(--border); }
.position-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 20px 0 12px; }
.position-stats > div { display: grid; gap: 4px; min-width: 0; }
.position-stats dt { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.position-stats dd { font-size: 23px; margin: 0; line-height: 1.4; letter-spacing: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.valuation-warning { color: var(--amber); font-size: 12px; margin: 10px 0; }
.position-details { font-size: 13px; border-top: 1px dashed var(--border); margin-top: 16px; }
.position-details summary { min-height: 44px; display: flex; align-items: center; }
.position-details p { margin: 10px 0; }
.disclosure { border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); margin-top: 20px; scroll-margin-top: 20px; }
.disclosure + .disclosure { margin-top: 0; border-top: 0; }
summary { cursor: pointer; color: var(--mint); }
.disclosure > summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 18px; min-height: 58px; padding: 12px 0; font-size: 14px; list-style: none; }
summary::-webkit-details-marker { display: none; }
.disclosure > summary::after, .decision-analysis > summary::after, .position-details > summary::after { content: "[+]"; color: var(--muted); margin-left: auto; }
.disclosure[open] > summary::after, .decision-analysis[open] > summary::after, .position-details[open] > summary::after { content: "[−]"; }
.disclosure-body { padding: 0 0 20px; }
.disclosure-body > .small { margin: 0 0 18px; }
.hypothesis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hypothesis-card { padding: 18px; border: 1px solid var(--border); background: var(--panel); min-width: 0; }
.hypothesis-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hypothesis-outcome { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.decision { font-size: 12px; border: 1px solid var(--border); padding: 3px 7px; white-space: nowrap; }
.decision.buy { color: var(--mint); }
.decision.sell { color: var(--red); }
.decision.wait, .decision.hold { color: var(--muted); }
.decision-summary p { font-size: 14px; line-height: 1.75; margin: 16px 0; max-width: 72ch; }
.trade-basis { display: block; width: fit-content; border: 1px dashed var(--border); color: var(--amber); padding: 3px 6px; font-size: 12px; margin: 10px 0; }
.hypothesis-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 13px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.hypothesis-stat span { display: block; font-size: 12px; color: var(--muted); }
.hypothesis-stat strong { display: block; font-size: 14px; font-weight: 500; margin-top: 4px; }
.decision-analysis { font-size: 13px; }
.decision-analysis summary { display: flex; align-items: center; min-height: 44px; padding: 8px 0; list-style: none; }
.thesis-copy, .decision-reason, .invalidation { font-size: 13px; line-height: 1.8; margin: 12px 0; overflow-wrap: anywhere; }
.thesis-updated { display: block; font-size: 12px; color: var(--muted); margin-top: 12px; }
.evidence-list { display: grid; gap: 12px; margin: 14px 0; }
.evidence-item { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; }
.evidence-item a { overflow-wrap: anywhere; }
.evidence-stance, .evidence-date { font-size: 12px; color: var(--muted); }
.market-code { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.empty-state { grid-column: 1 / -1; padding: 22px; border: 1px dashed var(--border); }
.empty-state h3 { font-size: 16px; }
.empty-state p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.empty-state .last-review { margin-top: 14px; color: var(--amber); font-size: 12px; }
.journal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.journal-list { padding: 6px 20px 16px; }
.journal-empty { color: var(--muted); font-size: 14px; padding: 16px 0; }
.journal-row { padding: 18px 0; border-bottom: 1px dashed var(--border); }
.journal-row:last-child { border: 0; }
.journal-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.journal-title { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.journal-pnl { font-size: 19px; font-variant-numeric: tabular-nums; }
.journal-value, .journal-meta { color: var(--muted); font-size: 12px; margin: 8px 0; overflow-wrap: anywhere; }
.journal-reason { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 8px 0; }
.detail-metrics, .system-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; padding: 18px 0; }
.detail-metrics > div, .system-strip > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 12px; }
.detail-metrics strong { font-size: 20px; font-weight: 500; }
.detail-metrics small, .system-strip span { color: var(--muted); font-size: 12px; }
.system-strip { border-top: 1px dashed var(--border); }
.system-strip strong { font-size: 13px; font-weight: 400; }
.raw-data-link { display: inline-block; padding: 12px 0; font-size: 13px; }
.research-summary, .participation-panel, #allocation-summary { padding: 18px; }
.research-current-status, .research-eyebrow, .research-latest-counts, .research-latest-top > span { font-size: 12px; color: var(--muted); }
.research-latest-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.research-eyebrow { display: block; margin-bottom: 4px; }
.research-latest-preview, .research-latest-reason { font-size: 14px; line-height: 1.8; }
.research-activity, .research-analysis { margin-top: 16px; font-size: 13px; }
.research-activity > summary, .research-analysis > summary { min-height: 44px; padding: 8px 0; }
.daily-research, .research-pilot { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 16px 0; }
.daily-research > div, .research-pilot > div { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.daily-research h3, .research-pilot span { font-size: 12px; color: var(--muted); }
.daily-research strong, .research-pilot strong { font-weight: 500; font-size: 13px; }
.research-status-reason { white-space: pre-line; font-size: 13px; overflow-wrap: anywhere; }
.participation-heading { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.participation-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 16px; }
.participation-metrics > div { display: flex; flex-direction: column; font-size: 13px; }
.participation-status { grid-column: 1 / -1; }
.participation-note, .participation-metrics p, #allocation-summary p, .omission-note { font-size: 12px; line-height: 1.8; color: var(--muted); }
#allocation-summary { margin-top: 14px; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0 32px; color: var(--muted); font-size: 12px; }
@media (max-width: 800px) {
  .page-shell { padding: 0 18px; }
  .site-header { gap: 12px; padding: 20px 0; align-items: flex-start; }
  .header-meta { align-items: flex-end; flex-direction: column; gap: 5px; }
  h1 { font-size: 20px; }
  .wordmark { gap: 10px; }
  .ascii-mark { font-size: 19px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-value { font-size: 29px; }
  .metric-card { padding: 15px; }
  .hypothesis-grid, .journal-grid { grid-template-columns: 1fr; }
  .position-top { flex-direction: column; gap: 10px; }
  .position-stats { gap: 12px; }
  .position-stats dd { font-size: 21px; }
  .section-caption { font-size: 12px; }
  .daily-research, .research-pilot, .detail-metrics, .system-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .position-stats { grid-template-columns: minmax(0, 1fr); }
  .position-stats > div { grid-template-columns: minmax(0, 1fr) max-content; align-items: baseline; gap: 16px; }
  .position-stats dd { text-align: right; }
}
@media (max-width: 480px) {
  .header-scope { max-width: 24ch; }
  .section-nav { gap: 16px; }
  .section-nav a { font-size: 12px; }
  h2 { font-size: 18px; }
  .metric-label { font-size: 12px; }
  .metric-value { font-size: clamp(18px, 5.6vw, 25px); white-space: nowrap; overflow-wrap: normal; }
  .chart-layout { grid-template-columns: 72px minmax(0,1fr); margin: 20px 14px 10px; gap: 8px; }
  .chart-scale { font-size: 10px; }
  .chart-footer { margin: 0 14px; font-size: 10px; }
  .equity-chart { height: 155px; }
  .panel-heading { padding: 16px 14px 0; }
  .panel-footnote { margin: 12px 14px 16px; }
  .position-card { padding: 16px; }
  .position-stats dt { font-size: 12px; }
  .position-stats dd { font-size: 21px; }
  .disclosure > summary { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (prefers-contrast: more), (forced-colors: active) { body::before { display: none; } }
