.topbar { position: sticky; top: 0; z-index: 4; }
.view-nav { display: flex; gap: 6px; align-self: stretch; align-items: center; }
.view-nav button { background: transparent; border: 1px solid transparent; border-radius: 7px; color: #d3dfe4; font-size: 13px; font-weight: 600; padding: 8px 13px; white-space: nowrap; }
.view-nav button:hover { background: #ffffff16; }
.view-nav button[aria-current] { background: #254a59; border-color: #355d69; color: #fff; }
.view-nav button:focus-visible { outline-color: #91d8c4; }
.ranking th:nth-child(3), .ranking td:nth-child(3) { text-align: right; }
.ranking th:last-child { width: 108px; }
.watch-add { min-height: 27px; padding-block: 3px; }
.research-view { padding-bottom: 12px; }

.strategy-run { text-align: right; }
.strategy-overview { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(245px, 1fr); gap: 16px; }
.strategy-rules, .model-brief, .factor-panel, .watch-sidebar, .disclosure-panel, .reader { padding: 20px; }
.rule-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.rule-steps > div { border-radius: 9px; background: #f3f7f7; border: 1px solid #e4ecee; padding: 11px; }
.rule-steps span { display: block; color: var(--teal); font-size: 11px; font-weight: 700; }
.rule-steps strong { display: block; margin: 3px 0; font-size: 15px; }
.rule-steps p { color: var(--muted); font-size: 11px; }
.rule-details { margin: 11px 0 0; }
.rule-details div { display: grid; grid-template-columns: minmax(85px, auto) 1fr; gap: 9px; align-items: baseline; border-bottom: 1px solid #edf2f3; padding: 6px 0; font-size: 12px; }
.rule-details div:last-child { border-bottom: 0; }
.rule-details dt { color: var(--muted); }
.rule-details dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.model-brief .rule-details div { grid-template-columns: minmax(72px, auto) 1fr; }
.factor-panel { margin: 16px 0 24px; }
.factor-actions { align-items: center; flex-wrap: wrap; }
.factor-actions input[type="search"] { width: 156px; }
.factor-actions .check { margin: 0; white-space: nowrap; }
.factor-actions .check input { width: 14px; min-height: 14px; height: 14px; padding: 0; }
.factor-table { max-height: 490px; }
.factor-table th:first-child { width: 99px; }
.factor-table th:nth-child(3), .factor-table td:nth-child(3) { text-align: right; }
.factor-table th:nth-child(n+3) { width: 86px; white-space: nowrap; }
.factor-table td:nth-child(2) { font-weight: 400; }
.factor-table code { display: block; font: 11px/1.5 var(--number); color: var(--muted); overflow-wrap: anywhere; }
.factor-name { font-family: var(--number); font-weight: 700; }
.factor-family { display: block; color: var(--muted); font-size: 10px; padding-top: 2px; }
.factor-gain { color: var(--teal); font-weight: 650; }

.disclosure-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 16px; margin-bottom: 24px; }
.security-search { display: flex; gap: 6px; margin: 12px 0; }
.security-search input, .disclosure-period select, .reader-page input { min-height: 34px; border: 1px solid #d8e2e6; border-radius: 7px; background: #fff; color: var(--ink); padding: 6px 8px; font-size: 12px; }
.security-search input { min-width: 0; width: 100%; }
.watch-rows, .security-matches { display: grid; gap: 6px; }
.security-matches:not(:empty) { padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.watch-row { display: flex; align-items: center; gap: 6px; min-width: 0; border: 1px solid #e4ebed; border-radius: 8px; background: #f8fafb; }
.watch-row.current { border-color: #a7cbc5; background: #edf7f5; }
.watch-row .pick { flex: 1; min-width: 0; border: 0; color: var(--ink); padding: 7px 9px; background: transparent; text-align: left; }
.security-name, .security-symbol { display: block; overflow-wrap: anywhere; }
.security-name { font-weight: 650; }
.security-symbol { color: var(--muted); font-size: 11px; }
.watch-row .remove { margin-right: 4px; min-height: 27px; background: transparent; color: var(--muted); border: 0; border-radius: 5px; font-size: 16px; line-height: 1; }
.watch-row .remove:hover { background: #fff; color: #aa3c37; }
.security-matches .button { width: 100%; text-align: left; white-space: normal; }
.disclosure-main { min-width: 0; }
.disclosure-controls, .pagination { display: flex; align-items: center; gap: 8px; }
.disclosure-controls { justify-content: space-between; margin: 16px 0 9px; }
.disclosure-period { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.disclosure-custom, .disclosure-custom label { display: flex; align-items: center; gap: 8px; }
.disclosure-custom { flex-wrap: wrap; margin: 9px 0 12px; color: var(--muted); font-size: 12px; }
.disclosure-custom input { min-height: 34px; border: 1px solid #d8e2e6; border-radius: 7px; background: #fff; color: var(--ink); padding: 6px 8px; }
.disclosure-status { margin-bottom: 8px; }
.disclosure-rows:not(:empty) { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 470px; }
.disclosure-row { width: 100%; display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 0; border-bottom: 1px solid #eaf0f1; background: #fff; color: var(--ink); text-align: left; }
.disclosure-row:last-child { border-bottom: 0; }
.disclosure-row:hover, .disclosure-row[aria-current] { background: #edf7f5; }
.disclosure-row:focus-visible { outline-offset: -3px; }
.disclosure-date { font-size: 11px; color: var(--muted); padding-top: 2px; }
.disclosure-title { font-size: 13px; font-weight: 570; overflow-wrap: anywhere; }
.disclosure-badge { min-width: 28px; padding: 2px 4px; border-radius: 4px; background: #edf2f3; color: #415e68; font-size: 10px; text-align: center; }
.pagination { margin-top: 10px; }
.pagination > span { margin: 0 auto 0 0; }
.reader { margin-top: 16px; scroll-margin-top: 74px; }
.reader h2 { overflow-wrap: anywhere; }
.reader-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.reader-page { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.reader-page input { width: 62px; }
.reader-page .button { min-width: 32px; font-size: 14px; }
.document-text { max-height: 550px; padding: 13px; margin: 10px 0 0; border: 1px solid #e4ebed; background: #f7faf9; color: var(--ink); font: 13px/1.7 Inter, "PingFang SC", sans-serif; user-select: text; }

@media (max-width: 850px) {
  .view-nav { gap: 1px; }
  .view-nav button { padding-inline: 8px; }
  .brand-divider, .brand-divider + span { display: none; }
  .disclosure-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 10px; }
  .watch-sidebar, .disclosure-panel, .reader, .factor-panel { padding: 15px; }
}
@media (max-width: 740px) {
  .strategy-overview { grid-template-columns: 1fr; gap: 10px; }
  .disclosure-layout { grid-template-columns: 1fr; }
  .watch-rows { grid-template-columns: 1fr 1fr; }
}
