.daily-review { margin-bottom: 20px; }
.daily-review ul { margin: 0; padding-left: 20px; color: var(--text); line-height: 1.8; }
.daily-review li + li { margin-top: 6px; }
.daily-review .business-brief { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.daily-review .business-brief li { margin: 0; }
.business-brief .business-summary { grid-column: 1 / -1; }
.business-brief strong { font-size: 12px; font-weight: 550; }
.business-brief p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #191a1d;
  --surface: #141518;
  --line: #303136;
  --text: #e8e6df;
  --muted: #aaa8a6;
  --dim: #808188;
  --amber: #ffae4f;
  --green: #8bcf9a;
  --red: #e7877d;
  --blue: #8abed6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); }
body::before { position: fixed; z-index: -1; inset: 0; background: linear-gradient(#ffffff04 1px, transparent 1px) 0 0 / 100% 6px; content: ""; pointer-events: none; }
a { color: inherit; }
.shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.topbar { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.brand, .topbar-right, .live-state { display: inline-flex; align-items: center; }
.brand { gap: 9px; font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-decoration: none; }
.brand-mark { width: 9px; height: 9px; margin-right: 3px; background: var(--amber); transform: skew(-16deg); box-shadow: 5px 0 #ffae4f40; }
.brand-muted { color: var(--muted); font-weight: 400; }
.topbar-right { gap: 20px; color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.research-tag { color: var(--amber); letter-spacing: .12em; }
.live-state { gap: 8px; }
.live-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.live-state i.ok { background: var(--green); box-shadow: 0 0 9px #8bcf9a66; }
.live-state i.error { background: var(--red); }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 0 28px; }
.eyebrow, .module-index, .block-label { color: var(--amber); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.eyebrow { margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 42px); font-weight: 560; letter-spacing: -.055em; }
.intro p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.refresh { min-height: 36px; padding: 0 13px; border: 1px solid #4b4c52; background: transparent; color: var(--text); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; white-space: nowrap; }
.refresh:hover { border-color: var(--amber); color: var(--amber); }
.refresh:disabled { opacity: .55; cursor: wait; }
.refresh span { margin-right: 6px; color: var(--amber); font-size: 16px; }
.panel { border: 1px solid var(--line); background: var(--panel); }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.module { min-width: 0; padding: 21px 23px; }
.wide-module { margin-top: 12px; }
.module-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h2 { margin: 7px 0 0; font-size: 20px; font-weight: 540; letter-spacing: -.035em; }
.state-pill { padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.state-pill.ok { border-color: #385440; color: var(--green); }
.state-pill.warn { border-color: #66502f; color: var(--amber); }
.state-pill.error { border-color: #633a36; color: var(--red); }
.stat-grid { display: grid; gap: 8px; }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid > div { min-width: 0; padding: 11px; border: 1px solid var(--line); background: var(--surface); }
.stat-grid span, .stock-summary span { display: block; color: var(--muted); font-size: 10px; }
.stat-grid strong { display: block; overflow: hidden; margin-top: 8px; font: 500 15px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.module-note { margin: 14px 0 0; color: var(--dim); font-size: 10px; line-height: 1.6; }
.progress-row { margin-top: 17px; }
.progress-row > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.progress-row > div:first-child span { color: var(--muted); }
.progress-row strong { font: 500 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.progress-track { height: 4px; margin: 10px 0 8px; background: #333439; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .2s ease; }
.progress-row small { color: var(--dim); font-size: 10px; }
.progress-row + .stat-grid { margin-top: 12px; }
.ingest-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.strategy-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.strategy-stats > div { min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.strategy-stats small, .strategy-stats span { display: block; color: var(--muted); font-size: 10px; }
.strategy-stats strong { display: block; margin: 8px 0 5px; font: 500 23px ui-monospace, SFMono-Regular, Menlo, monospace; }
.strategy-stats span { color: var(--dim); }
.strategy-liquidity { margin-top: 14px; }
.strategy-liquidity table { min-width: 430px; }
.block-label { color: var(--muted); letter-spacing: .07em; }
.verdict { display: block; margin-top: 18px; font-size: 18px; font-weight: 530; letter-spacing: -.02em; }
.verdict.negative { color: var(--red); }
.verdict.positive { color: var(--green); }
.race-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 25px 0 8px; }
.race-heading .verdict { margin: 8px 0 0; }
.race-heading > span { color: var(--dim); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
.race-table-wrap { margin-top: 12px; }
.table-hint { display: none; }
.race-table { min-width: 1200px; }
.race-table th:last-child, .race-table td:last-child { text-align: left; min-width: 175px; color: var(--muted); }
.race-table th:not(:first-child), .race-table td:not(:first-child) { text-align: right; }
.race-table td { padding-top: 13px; padding-bottom: 13px; }
.race-table td:first-child strong { display: block; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 520; }
.race-table td:first-child small { display: block; margin-top: 4px; color: var(--dim); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.race-table .baseline-row { background: #23312666; }
.race-table .negative { color: var(--red); }
.race-table .positive { color: var(--green); }
.strategy-rules { margin-top: 10px; }
.strategy-control { margin-top: 16px; }
.control-state { margin: 12px 0; color: var(--muted); font-size: 12px; }
.control-state strong { color: var(--text); }
.control-state span { margin-left: 12px; color: var(--dim); font-size: 10px; }
.control-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.control-actions label { color: var(--muted); font-size: 11px; }
.control-actions input { width: 76px; height: 34px; padding: 0 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.control-actions button { min-height: 34px; padding: 0 11px; border: 1px solid #4b4c52; background: transparent; color: var(--text); cursor: pointer; }
.control-actions button:hover { border-color: var(--amber); color: var(--amber); }
.control-actions button:disabled { opacity: .5; cursor: default; }
.rules-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 8px 0 3px; }
.rules-list p { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.6; }
.rules-list strong { color: var(--text); font-weight: 520; }
.stock-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); align-items: end; gap: 18px; padding: 3px 0 20px; }
.compact-stock-summary { grid-template-columns: auto 1fr; }
.compact-stock-summary #stock-as-of { grid-column: auto; text-align: right; }
.stock-table { min-width: 960px; table-layout: fixed; }
.stock-table th:first-child { width: 34%; }
.stock-table th:nth-child(2) { width: 6%; }
.stock-table th:nth-child(3), .stock-table th:nth-child(4), .stock-table th:nth-child(5) { width: 12%; }
.stock-table th:nth-child(6) { width: 24%; }
.stock-table th, .stock-table td { padding-left: 5px; padding-right: 5px; white-space: nowrap; }
.stock-table th:not(:first-child), .stock-table td:not(:first-child) { text-align: right; }
.stock-table td:first-child { white-space: nowrap; }
.stock-table th:last-child, .stock-table td:last-child { text-align: left; padding-left: 16px; }
.stock-summary #stock-as-of { grid-column: 1 / -1; }
.stock-summary strong { display: block; margin-top: 8px; font: 500 25px ui-monospace, SFMono-Regular, Menlo, monospace; }
.stock-summary p { margin: 0 0 4px; color: var(--dim); font-size: 11px; }
.stock-summary > div > span:last-child:not(:first-child) { margin-top: 5px; }
.stock-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 20px; margin: 0 0 16px; padding: 13px 14px; border: 1px solid var(--line); background: #121416; }
.stock-rules > strong { grid-column: 1 / -1; color: var(--text); font-size: 12px; font-weight: 550; }
.stock-rules p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.stock-rules p b { color: var(--amber); font-weight: 500; }
.stock-rules .module-note { grid-column: 1 / -1; margin-top: 2px; color: var(--dim); }
.stock-price-time { color: var(--dim); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.7; white-space: pre-line; }
.stock-unlock { color: var(--amber); }
details { border-top: 1px solid var(--line); }
summary { padding: 14px 0 4px; color: var(--muted); font-size: 11px; cursor: pointer; }
summary span { margin-left: 8px; color: var(--dim); }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 11px; }
th { color: var(--dim); font-weight: 400; }
td:first-child { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td:not(:first-child) { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty { color: var(--dim); text-align: center; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 20px 0 26px; color: var(--dim); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 760px) {
  .daily-review .business-brief { grid-template-columns: 1fr; gap: 16px; }
  .shell { width: min(100% - 26px, 1080px); }
  .topbar-right { gap: 10px; }
  .intro { padding: 25px 0; }
  .overview-grid { grid-template-columns: 1fr; }
  .strategy-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-list { grid-template-columns: 1fr; }
  .race-heading { align-items: start; flex-direction: column; gap: 7px; }
  .race-heading > span { text-align: left; }
  .table-hint { display: block; margin: 10px 0 0; color: var(--dim); font-size: 11px; }
  .overview-grid { gap: 10px; }
  .wide-module { margin-top: 10px; }
  .module { padding: 17px 15px; }
  .stock-summary { grid-template-columns: 1fr 1fr; gap: 16px; }
  .stock-summary p { grid-column: 1 / -1; text-align: left; }
  .stock-rules { grid-template-columns: 1fr; gap: 7px; padding: 12px; }
  .footer { flex-direction: column; }
}
@media (max-width: 390px) {
  .stat-grid.three { grid-template-columns: 1fr 1fr; }
  .stat-grid.three > div:last-child { grid-column: 1 / -1; }
  .research-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.followup-subtitle { margin: 25px 0 8px; font-size: 15px; font-weight: 600; }
/* Six modules: summaries first, evidence and individual orders expandable. */
.daily-review { margin-bottom: 12px; }
.comparison-table { min-width: 740px; }
.comparison-table th:not(:first-child), .comparison-table td:not(:first-child) { text-align: right; }
.baseline-row { background: #23312666; }
.capability-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.capability-state { display: inline-block; padding: 3px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; white-space: nowrap; }
.capability-state.ok { color: var(--green); border-color: #385440; }
.capability-state.warn { color: var(--amber); border-color: #66502f; }
.capability-table { min-width: 2000px; table-layout: fixed; }
.capability-table th:first-child { position: sticky; left: 0; z-index: 1; width: 72px; background: var(--panel); }
.capability-table tbody th { color: var(--text); font-weight: 500; line-height: 1.7; }
.capability-table th, .capability-table td { vertical-align: top; padding: 10px; }
.capability-table td:not(:first-child) { font-family: inherit; }
.capability-table details { border: 0; }
.capability-table summary { margin: 0; cursor: pointer; }
.capability-table td p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.capability-table tr:last-child th, .capability-table tr:last-child td { border-bottom: 0; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.stock-table { min-width: 930px; table-layout: auto; }
.stock-table th:first-child { width: 32%; }
.stock-table th:nth-child(3), .stock-table th:nth-child(4), .stock-table th:nth-child(5), .stock-table th:nth-child(6) { width: auto; }
.stock-table td:first-child { white-space: normal; overflow: visible; }
.stock-table td:nth-child(5) { text-align: left; }
.stock-table details { border: 0; }
.stock-table summary { padding: 0; color: var(--text); line-height: 1.6; }
.position-detail { margin: 10px 0 0; font-size: 10px; color: var(--muted); line-height: 1.8; white-space: normal; }
.stock-summary strong { font-size: clamp(19px, 2.4vw, 25px); }
.stat-grid strong { font-size: 13px; }
.module-note { color: var(--muted); font-size: 11px; }

#infra-used { white-space: normal; overflow: visible; line-height: 1.5; }

.task-table { min-width: 1160px; }
.task-detail { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 230px; }
.task-table td:nth-child(6), .task-table td:nth-child(7) { min-width: 180px; }
.task-warning { color: #efb86c; }
.task-normal { color: #7bc9a5; }

.stock-table summary { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.stock-table summary::before { content: "▸"; flex: 0 0 auto; color: var(--muted); }
.stock-table details[open] > summary::before { content: "▾"; }
.item-icon { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,.035); }

/* Keep column headings and row names visible while browsing wide/long tables. */
.table-wrap {
  overflow: auto;
  max-height: min(60vh, 480px);
  isolation: isolate;
  scrollbar-gutter: stable;
}
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
}
.table-wrap tbody tr > :first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
}
.table-wrap thead th:first-child { left: 0; z-index: 4; }
.stock-table th:first-child { width: 260px; }
.stock-table summary span { margin-left: 0; overflow-wrap: anywhere; }
.table-wrap:focus-visible { outline: 1px solid var(--blue); outline-offset: 3px; }
@media (max-width: 760px) {
  .table-wrap { max-height: min(60vh, 420px); }
  .stock-table th:first-child { width: 190px; }
  .stock-table summary { gap: 6px; }
  .stock-table summary span { max-width: 115px; }
  .stock-table .item-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .task-table th:first-child, .task-table td:first-child { min-width: 130px; max-width: 150px; }
}
@media (max-width: 760px) {
  .table-wrap th:first-child, .table-wrap td:first-child {
    width: 180px;
    max-width: 180px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .table-wrap .capability-table th:first-child { width: 72px; }
}
