:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d8dde5;
  --line-soft: #edf0f4;
  --text: #172033;
  --muted: #687386;
  --blue: #1f6fb2;
  --orange: #d86c20;
  --red: #cc3d4b;
  --green: #2f9e55;
  --shadow: 0 18px 42px rgba(27, 39, 57, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: auto;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
}

.sidebar {
  background: #111827;
  color: #e7ebf3;
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f07b28;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.brand p {
  margin: 4px 0 0;
  color: #9aa4b6;
  font-size: 12px;
}

.code-form {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.code-form label,
.fund-list-head {
  color: #aeb7c7;
  font-size: 12px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}

.search-row input {
  min-width: 0;
  height: 36px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0b1220;
  color: #fff;
  padding: 0 10px;
  outline: none;
}

.search-row button,
.range-tools button {
  border: 0;
  border-radius: 6px;
  background: #f07b28;
  color: #fff;
  cursor: pointer;
  font-weight: 650;
}

.search-row button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.code-form.syncing input {
  opacity: 0.72;
}

.fund-list-head {
  display: flex;
  justify-content: space-between;
  padding: 0 2px 8px;
}

.fund-list {
  display: grid;
  gap: 7px;
  max-height: calc(100vh - 178px);
  overflow: auto;
  padding-right: 2px;
}

.fund-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #e7ebf3;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.fund-item:hover,
.fund-item.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.11);
}

.fund-item.dragging {
  opacity: 0.48;
}

.fund-item.drop-target {
  border-color: rgba(240, 123, 40, 0.65);
  background: rgba(240, 123, 40, 0.12);
}

.fund-copy {
  min-width: 0;
}

.fund-item strong {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
  font-size: 15px;
}

.fund-item .fund-code {
  flex: 0 0 auto;
  display: inline;
  margin-top: 0;
  color: #e7ebf3;
}

.fund-item .fund-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 540;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fund-item span {
  display: block;
  margin-top: 3px;
  color: #9aa4b6;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fund-actions {
  display: flex;
  gap: 2px;
  align-items: center;
  opacity: 0;
  transition: opacity 120ms ease;
}

.fund-item:hover .fund-actions,
.fund-item.pinned .fund-actions,
.fund-item.active .fund-actions {
  opacity: 1;
}

.fund-pin {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7f8da3;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}

.fund-pin:hover,
.fund-item.pinned .fund-pin {
  color: #f07b28;
  background: rgba(240, 123, 40, 0.12);
}

.fund-drag {
  display: inline-grid !important;
  place-items: center;
  width: 18px;
  height: 20px;
  margin-top: 0 !important;
  color: #667085 !important;
  cursor: grab;
  font-size: 11px !important;
  letter-spacing: 0;
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100vh;
  padding: 12px 16px;
  gap: 10px;
  overflow: hidden;
}

.workspace.strategy-workspace {
  grid-template-rows: auto minmax(0, 1fr);
}

.workspace.strategy-workspace .chart-panel {
  grid-template-rows: minmax(0, 1fr);
}

.workspace.strategy-workspace .chart-head {
  display: none;
}

.topbar,
.metrics,
.chart-panel,
.statusbar {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 8px;
}

.code-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

#activeCode {
  font-size: 22px;
  font-weight: 760;
  letter-spacing: 0;
}

#activeName {
  color: var(--muted);
  font-size: 14px;
}

.data-range {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.segmented button {
  height: 32px;
  min-width: 64px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  color: #fff;
  background: #172033;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.date-picker {
  position: relative;
  display: grid;
  grid-template-columns: minmax(132px, 1fr) 30px;
  width: 198px;
}

#dateSelect {
  height: 32px;
  min-width: 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: #fff;
  color: var(--text);
  padding: 0 8px;
  outline: none;
}

#dateSelect:focus,
.date-picker.open #dateSelect {
  border-color: rgba(31, 111, 178, 0.55);
}

.date-menu-button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.date-menu-button:hover,
.date-picker.open .date-menu-button {
  color: var(--text);
  border-color: rgba(31, 111, 178, 0.55);
}

.date-menu-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.date-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 12;
  width: 218px;
  max-height: 278px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(20, 31, 48, 0.16);
}

.date-option {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0 8px;
  text-align: left;
}

.date-option:hover,
.date-option.active {
  background: #eef5fb;
}

.date-option.selected {
  color: var(--blue);
  font-weight: 720;
}

.date-option small {
  color: var(--muted);
  font-size: 11px;
}

.date-menu-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
}

.metrics > div {
  min-width: 0;
  padding: 8px 12px;
  background: #fff;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.metrics strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 8px;
  overflow: hidden;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.chart-title {
  font-size: 15px;
  font-weight: 720;
}

.legend {
  position: relative;
  display: flex;
  gap: 8px;
}

.legend-item {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0 10px;
}

.legend-item::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 7px;
  vertical-align: middle;
  background: currentColor;
}

.legend-item.blue.active {
  color: var(--blue);
  border-color: rgba(31, 111, 178, 0.35);
}

.legend-item.orange.active {
  color: var(--orange);
  border-color: rgba(216, 108, 32, 0.35);
}

.legend-item.green.active {
  color: #0f6b4f;
  border-color: rgba(15, 107, 79, 0.35);
}

.chart-strategy-legend {
  position: relative;
}

.chart-strategy-panel {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 5;
  width: min(420px, calc(100vw - 32px));
  max-height: 330px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.chart-strategy-head {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: #0f6b4f;
  font-size: 12px;
  font-weight: 760;
}

.chart-strategy-list {
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

.chart-strategy-option {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 8px 9px;
  text-align: left;
}

.chart-strategy-option:hover,
.chart-strategy-option.active {
  background: #eef5fb;
}

.chart-strategy-option strong {
  color: #0f6b4f;
  font-size: 12px;
}

.chart-strategy-option span,
.chart-strategy-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chart-strategy-empty {
  padding: 8px 9px;
}

.chart-area {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(260px, 1fr) 92px;
  background: #fff;
}

.chart-area.table-mode {
  display: block;
  overflow: hidden;
}

.chart-area.strategy-mode {
  display: block;
  overflow: hidden;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-area.crosshair-on canvas {
  cursor: crosshair;
}

#volumeCanvas {
  border-top: 1px solid var(--line);
}

.table-view {
  height: 100%;
  overflow: auto;
}

.table-view table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table-view th,
.table-view td {
  height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

.table-view th:first-child,
.table-view td:first-child,
.table-view th:nth-child(2),
.table-view td:nth-child(2) {
  text-align: left;
}

.table-view th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 680;
}

.table-view tr:hover td {
  background: #f8fafc;
}

.strategy-view {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: auto;
  background: #fff;
  --strategy-detail-height: min(360px, 46vh);
  --strategy-upper-height: min(320px, 42vh);
  --strategy-topic-list-width: 240px;
}

.strategy-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(160px, 0.82fr) minmax(340px, 1.55fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.strategy-head strong {
  display: block;
  font-size: 15px;
}

.strategy-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-head button {
  height: 30px;
  border: 1px solid rgba(240, 123, 40, 0.38);
  border-radius: 6px;
  background: #fff7ed;
  color: #c7651d;
  cursor: pointer;
  font-weight: 680;
  padding: 0 12px;
}

.strategy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.strategy-actions #compareStrategy {
  border-color: rgba(44, 116, 179, 0.28);
  background: #f4f8fb;
  color: #2c74b3;
}

.strategy-actions #bestStrategy {
  border-color: rgba(15, 107, 79, 0.28);
  background: #f2fbf7;
  color: #0f6b4f;
}

.strategy-actions .strategy-overlap-toggle {
  border-color: rgba(44, 116, 179, 0.28);
  background: #f4f8fb;
  color: #2c74b3;
}

.strategy-actions .strategy-overlap-toggle.active {
  border-color: rgba(240, 123, 40, 0.36);
  background: #fff7ed;
  color: #c7651d;
}

.strategy-head .strategy-help-link {
  border-color: transparent;
  background: transparent;
  color: #0f6b4f;
  padding: 0 4px;
  font-weight: 760;
}

.strategy-head .strategy-help-link:hover {
  text-decoration: underline;
}

.strategy-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.72fr) minmax(0, 0.5fr) minmax(0, 0.72fr) minmax(0, 0.66fr) minmax(0, 0.86fr) minmax(0, 0.82fr) minmax(0, 0.82fr);
  gap: 6px;
  align-items: end;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.strategy-editor label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.strategy-editor input,
.strategy-editor select {
  min-width: 0;
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 0 8px;
}

.strategy-editor button {
  height: 30px;
  border: 1px solid rgba(44, 116, 179, 0.25);
  border-radius: 6px;
  background: #f4f8fb;
  color: #2c74b3;
  cursor: pointer;
  font-weight: 720;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strategy-editor button:last-child {
  border-color: rgba(240, 123, 40, 0.32);
  background: #fff7ed;
  color: #c7651d;
}

@media (max-width: 760px) {
  .strategy-editor {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .strategy-editor label:first-child {
    grid-column: span 2;
  }
}

.strategy-grid {
  min-height: 0;
  display: grid;
  grid-template-rows:
    minmax(90px, var(--strategy-summary-height, 170px))
    7px
    minmax(132px, 1fr);
  gap: 0;
}

.strategy-resizer {
  position: relative;
  min-height: 7px;
  cursor: row-resize;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.strategy-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: #aeb7c7;
  transform: translateX(-50%);
}

.strategy-resizer:hover::before,
body.strategy-resizing .strategy-resizer::before {
  background: #0f6b4f;
}

.strategy-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.strategy-section:last-child {
  border-bottom: 0;
}

.section-title {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  background: #f8fafc;
}

.strategy-table-wrap {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

#strategyView .strategy-table-wrap {
  resize: both;
}

.strategy-table-wrap.compact th,
.strategy-table-wrap.compact td {
  height: 28px;
}

.strategy-table-wrap table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.strategy-table-wrap th,
.strategy-table-wrap td {
  height: 30px;
  padding: 0 9px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

.strategy-table-wrap th:first-child,
.strategy-table-wrap td:first-child,
.strategy-table-wrap th:nth-child(2),
.strategy-table-wrap td:nth-child(2) {
  text-align: left;
}

.strategy-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: var(--muted);
  font-weight: 680;
}

.strategy-table-wrap th.sortable {
  cursor: pointer;
  user-select: none;
}

.strategy-table-wrap th.sortable:hover {
  color: var(--text);
  background: #f8fafc;
}

.strategy-table-wrap th.sort-asc::after {
  content: " ↑";
  color: #0f6b4f;
}

.strategy-table-wrap th.sort-desc::after {
  content: " ↓";
  color: #0f6b4f;
}

.strategy-summary-row,
.strategy-event-row,
.strategy-best-row,
.strategy-retrace-row,
.strategy-best-event-row,
.strategy-explain-wrap tbody tr {
  cursor: pointer;
}

.strategy-summary-row:hover td,
.strategy-event-row:hover td,
.strategy-best-row:hover td,
.strategy-retrace-row:hover td,
.strategy-best-event-row:hover td,
.strategy-explain-wrap tbody tr:hover td,
.strategy-summary-row.active td,
.strategy-event-row.active td,
.strategy-best-row.active td,
.strategy-retrace-row.active td,
.strategy-best-event-row.active td,
.strategy-explain-wrap tbody tr.active td {
  background: #eef5fb;
}

.strategy-best-row.active td,
.strategy-retrace-row.active td,
.strategy-framework-tune-row.active td {
  background: #e1f3eb !important;
  box-shadow: inset 0 1px 0 rgba(15, 107, 79, 0.45), inset 0 -1px 0 rgba(15, 107, 79, 0.45);
}

.strategy-best-row.active td:first-child,
.strategy-retrace-row.active td:first-child,
.strategy-framework-tune-row.active td:first-child {
  border-left: 4px solid #0f6b4f;
}

.strategy-signal-cell {
  color: #475569;
  font-weight: 720;
}

.strategy-name-cell {
  max-width: 240px;
}

.strategy-name-cell strong {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strategy-name-cell span {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.strategy-placeholder {
  color: var(--muted);
  text-align: left !important;
}

.strategy-explain-wrap table {
  table-layout: fixed;
}

.strategy-explain-wrap th,
.strategy-explain-wrap td {
  height: auto;
  min-height: 28px;
  padding: 5px 9px;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  vertical-align: top;
}

.strategy-explain-wrap th:first-child {
  width: 22%;
}

.strategy-explain-wrap th:nth-child(2) {
  width: 11%;
}

.strategy-explain-wrap th:nth-child(3) {
  width: 25%;
}

.strategy-explain-wrap th:nth-child(4) {
  width: 20%;
}

.strategy-help-panel {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.18);
}

.strategy-help-card {
  width: min(1080px, 96%);
  max-height: min(720px, 92%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.strategy-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.strategy-help-head strong {
  color: #0f6b4f;
  font-size: 14px;
}

.strategy-help-head button {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0 10px;
}

.strategy-fund-cell {
  max-width: 172px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strategy-compare-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
}

.strategy-best-page {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.strategy-best-page .strategy-name-cell {
  max-width: 360px;
}

.strategy-best-hub {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.strategy-head-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
  gap: 6px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.strategy-hub-card,
.strategy-topic-card {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.strategy-head-tabs .strategy-hub-card {
  min-height: 34px;
  border-radius: 6px;
  padding: 5px 8px;
  text-align: center;
}

.strategy-head-tabs .strategy-hub-card strong {
  margin-bottom: 0;
  font-size: 12px;
}

.strategy-head-tabs .strategy-hub-card span {
  display: none;
}

.strategy-hub-card strong,
.strategy-topic-card strong {
  display: block;
  margin-bottom: 7px;
  color: #172033;
  font-size: 15px;
}

.strategy-hub-card span,
.strategy-topic-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.strategy-hub-card:hover,
.strategy-hub-card.active,
.strategy-topic-card:hover,
.strategy-topic-card.active {
  border-color: rgba(15, 107, 79, 0.34);
  background: #f6fbf8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.strategy-hub-card.topic:hover,
.strategy-hub-card.topic.active {
  border-color: rgba(240, 123, 40, 0.34);
  background: #fff8f1;
}

.strategy-hub-card.loading strong::after {
  content: " · 计算中";
  color: #2c74b3;
  font-size: 12px;
  font-weight: 680;
}

.strategy-best-panel,
.strategy-topic-panel,
.strategy-framework-panel,
.strategy-spectrum-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
}

.strategy-best-page.detail-open .strategy-best-panel,
.strategy-best-page.detail-open .strategy-topic-panel,
.strategy-best-page.detail-open .strategy-framework-panel,
.strategy-best-page.detail-open .strategy-spectrum-panel {
  min-height: 120px;
  flex: 0 0 var(--strategy-upper-height, min(320px, 42vh));
}

.strategy-detail-splitter {
  position: relative;
  flex: 0 0 8px;
  cursor: row-resize;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.strategy-detail-splitter.hidden {
  display: none;
}

.strategy-detail-splitter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: #aeb7c7;
  transform: translateX(-50%);
}

.strategy-detail-splitter:hover::before,
body.strategy-resizing .strategy-detail-splitter::before {
  background: #0f6b4f;
}

.strategy-framework-layout {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(166px, 0.78fr) minmax(150px, 0.95fr) minmax(150px, 0.95fr);
  overflow: auto;
}

.strategy-framework-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.strategy-framework-check {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 107, 79, 0.12);
  border-radius: 7px;
  background: #f6fbf8;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 8px;
}

.strategy-framework-check strong {
  color: #0f6b4f;
  font-size: 12px;
}

.strategy-framework-check span {
  border-radius: 999px;
  background: rgba(15, 107, 79, 0.1);
  color: #0f6b4f;
  font-weight: 760;
  padding: 1px 5px;
}

.strategy-framework-check em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-framework-modules {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  overflow: auto;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.strategy-framework-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.strategy-framework-card-head {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #f6fbf8;
}

.strategy-framework-card-head strong {
  display: block;
  color: #0f6b4f;
  font-size: 13px;
}

.strategy-framework-card-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.strategy-framework-card dl {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  line-height: 1.35;
}

.strategy-framework-card dt {
  color: #0f6b4f;
  font-weight: 760;
}

.strategy-framework-card dd {
  min-width: 0;
  margin: 0;
  color: var(--muted);
}

.strategy-framework-picks {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.strategy-framework-pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 4px 6px;
  text-align: left;
}

.strategy-framework-pick:hover {
  border-color: rgba(15, 107, 79, 0.28);
  background: #f6fbf8;
}

.strategy-framework-pick.active {
  border-color: rgba(15, 107, 79, 0.46);
  background: #e1f3eb;
  box-shadow: inset 4px 0 0 #0f6b4f;
}

.strategy-framework-pick span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-framework-pick strong {
  font-size: 11px;
}

.strategy-framework-tuning {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.strategy-framework-tuning.parameter {
  border-top: 1px solid var(--line);
}

.strategy-framework-tune-row {
  cursor: pointer;
}

.strategy-framework-tune-row:hover td {
  background: #eef5fb;
}

.strategy-framework-empty,
.strategy-muted {
  color: var(--muted);
  font-size: 12px;
}

.strategy-panel-head,
.strategy-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.strategy-panel-head strong,
.strategy-detail-head strong {
  display: block;
  color: #0f6b4f;
  font-size: 14px;
}

.strategy-panel-titleline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.execution-window-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #d9e5dd;
  border-radius: 6px;
  background: #fff;
}

.execution-window-tabs.hidden {
  display: none;
}

.strategy-panel-head .execution-window-tabs button {
  height: 22px;
  min-width: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  padding: 0 6px;
}

.strategy-panel-head .execution-window-tabs button:hover {
  color: #0f6b4f;
  background: #eef7f1;
}

.strategy-panel-head .execution-window-tabs button.active {
  color: #fff;
  background: #0f6b4f;
}

.execution-kind-filter {
  height: 26px;
  max-width: 98px;
  border: 1px solid #d9e5dd;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 720;
  padding: 0 6px;
}

.strategy-panel-head .spectrum-select {
  min-width: 104px;
  max-width: 150px;
}

.strategy-panel-head .spectrum-select.wide {
  min-width: 142px;
  max-width: 210px;
}

.execution-kind-filter.hidden {
  display: none;
}

.execution-ratio-tabs button {
  min-width: 36px;
}

.strategy-spectrum-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 0;
  overflow: hidden;
}

.strategy-spectrum-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: auto;
}

.strategy-spectrum-grid {
  min-width: 720px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
}

.strategy-spectrum-corner,
.strategy-spectrum-axis,
.strategy-spectrum-cell {
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
}

.strategy-spectrum-corner,
.strategy-spectrum-axis {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.strategy-spectrum-axis.x {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

.strategy-spectrum-axis.y {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f8fafc;
}

.strategy-spectrum-corner {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.strategy-spectrum-cell {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.strategy-spectrum-cell.single {
  min-height: 84px;
  grid-template-columns: minmax(0, 1fr);
}

.strategy-spectrum-cell.compact {
  min-height: 78px;
  grid-template-columns: minmax(0, 1fr);
}

.strategy-spectrum-empty,
.strategy-spectrum-placeholder {
  display: grid;
  place-items: center;
  color: #aeb7c7;
  font-size: 12px;
}

.strategy-spectrum-placeholder {
  min-height: 180px;
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.strategy-spectrum-chip {
  min-width: 0;
  display: grid;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  color: #172033;
  cursor: pointer;
  text-align: left;
}

.strategy-spectrum-chip.single {
  min-height: 70px;
  align-content: center;
  gap: 5px;
  padding: 8px 10px;
}

.strategy-spectrum-chip.compact {
  min-height: 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  line-height: 1.05;
}

.strategy-spectrum-chip:hover,
.strategy-spectrum-chip.active {
  border-color: rgba(15, 107, 79, 0.62);
  box-shadow: 0 0 0 2px rgba(15, 107, 79, 0.18);
}

.strategy-spectrum-chip span,
.strategy-spectrum-chip em {
  font-size: 11px;
  font-style: normal;
}

.strategy-spectrum-chip strong {
  font-size: 18px;
  line-height: 1;
}

.strategy-spectrum-chip.compact strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-spectrum-chip.compact em {
  display: none;
}

.strategy-spectrum-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 10px 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  background: #fbfcfd;
}

.strategy-spectrum-detail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: #fbfcfd;
  overflow: hidden;
}

.strategy-spectrum-help {
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
}

.strategy-spectrum-help strong {
  display: block;
  color: #0f6b4f;
  font-size: 13px;
}

.strategy-spectrum-help ol {
  margin: 7px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.48;
}

.strategy-spectrum-help li + li {
  margin-top: 3px;
}

.strategy-spectrum-detail-head {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.strategy-spectrum-detail-head strong {
  display: block;
  color: #0f6b4f;
  font-size: 13px;
}

.strategy-spectrum-detail-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.strategy-spectrum-rank-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding: 8px;
}

.strategy-spectrum-rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 7px 8px;
  text-align: left;
}

.strategy-spectrum-rank:hover,
.strategy-spectrum-rank.active {
  border-color: rgba(15, 107, 79, 0.45);
  background: #eef7f1;
}

.strategy-spectrum-rank span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-spectrum-rank strong {
  color: #172033;
  font-size: 11px;
}

.strategy-spectrum-rank em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.strategy-stability-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 88px;
  line-height: 1.05;
}

.strategy-stability-cell strong {
  color: #0f6b4f;
  font-size: 12px;
}

.strategy-stability-cell em,
.strategy-stability-cell small {
  font-style: normal;
  font-size: 10px;
  white-space: nowrap;
}

.strategy-panel-head span,
.strategy-detail-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.strategy-panel-head button,
.strategy-detail-head button {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #0f6b4f;
  cursor: pointer;
  font-weight: 720;
  padding: 0 10px;
}

.strategy-topic-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(150px, var(--strategy-topic-list-width, 240px)) 7px minmax(0, 1fr);
}

.strategy-topic-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.strategy-column-resizer {
  position: relative;
  cursor: col-resize;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.strategy-column-resizer::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 2px;
  height: 48px;
  border-radius: 999px;
  background: #aeb7c7;
  transform: translateY(-50%);
}

.strategy-column-resizer:hover::before,
body.strategy-resizing .strategy-column-resizer::before {
  background: #0f6b4f;
}

.strategy-topic-card {
  width: 100%;
}

.strategy-topic-detail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.strategy-topic-detail-headline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
}

.strategy-topic-detail-headline .section-title {
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
}

.topic-title-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
}

.strategy-topic-controls {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 8px;
  scrollbar-width: thin;
}

.topic-controls-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  white-space: nowrap;
}

.topic-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  white-space: nowrap;
}

.topic-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.topic-filter-row > span,
.topic-filter-select > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.topic-filter-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.topic-filter-pills button {
  height: 26px;
  border: 1px solid #dbe3ea;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 0 9px;
}

.topic-filter-row-factor .topic-filter-pills button {
  padding: 0 8px;
}

.topic-filter-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topic-filter-select select {
  height: 26px;
  max-width: 220px;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  padding: 0 24px 0 8px;
}

.topic-filter-pills button span {
  margin-left: 5px;
  color: #748094;
  font-weight: 650;
}

.topic-filter-pills button.active {
  border-color: rgba(15, 107, 79, 0.45);
  background: rgba(15, 107, 79, 0.09);
  color: #0f6b4f;
}

.topic-filter-pills button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.topic-heatmap-wrap {
  min-width: 100%;
  overflow: auto;
  padding: 6px;
}

.topic-heatmap-grid {
  display: grid;
  gap: 3px;
  min-width: max-content;
}

.topic-heatmap-corner,
.topic-heatmap-axis,
.topic-heatmap-cell {
  min-height: 46px;
  border: 1px solid #edf1f5;
  background: #fff;
}

.topic-heatmap-corner,
.topic-heatmap-axis {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #526070;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
}

.topic-heatmap-axis.x {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 34px;
  padding: 0 6px;
  background: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-heatmap-axis.y,
.topic-heatmap-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 96px;
  padding: 0 6px;
  background: #f8fafc;
}

.topic-heatmap-corner {
  top: 0;
  z-index: 4;
}

.topic-heatmap-cell {
  display: flex;
  min-height: 58px;
  padding: 2px;
}

.topic-heatmap-chip {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 6px;
  background: #f8fafc;
  color: #172033;
  cursor: pointer;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 1px;
  padding: 5px 6px;
  text-align: left;
}

.topic-heatmap-chip:hover,
.topic-heatmap-chip.active {
  border-color: rgba(15, 107, 79, 0.5);
  box-shadow: inset 0 0 0 1px rgba(15, 107, 79, 0.2);
}

.topic-heatmap-chip strong {
  font-size: 13px;
  font-weight: 820;
}

.topic-heatmap-chip span,
.topic-heatmap-chip em {
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-heatmap-empty {
  margin: auto;
  color: #b6bfca;
  font-size: 12px;
}

.topic-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.strategy-detail-drawer {
  height: auto;
  flex: 0 0 var(--strategy-detail-height, min(360px, 46vh));
  min-height: 180px;
  max-height: calc(100% - 130px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-top: 2px solid rgba(15, 107, 79, 0.18);
  background: #fff;
  overflow: hidden;
}

.strategy-detail-drawer .strategy-table-wrap {
  overflow: auto;
}

.strategy-best-page .strategy-name-cell strong,
.strategy-best-page .strategy-name-cell span {
  max-width: 360px;
}

.strategy-page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.strategy-page-head > div {
  flex: 1;
  min-width: 0;
}

.strategy-page-head button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #0f6b4f;
  cursor: pointer;
  font-weight: 720;
  padding: 0 10px;
}

.strategy-page-head .strategy-overlap-toggle {
  margin-left: auto;
  border-color: rgba(44, 116, 179, 0.28);
  background: #f4f8fb;
  color: #2c74b3;
}

.strategy-page-head .strategy-overlap-toggle.active {
  border-color: rgba(240, 123, 40, 0.36);
  background: #fff7ed;
  color: #c7651d;
}

.strategy-page-head strong {
  display: block;
  font-size: 14px;
}

.strategy-page-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.num-up {
  color: var(--red);
}

.num-down {
  color: var(--green);
}

.tooltip {
  position: absolute;
  z-index: 2;
  min-width: 172px;
  pointer-events: none;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(20, 31, 48, 0.14);
  padding: 9px 10px;
  color: var(--text);
  font-size: 12px;
}

.tooltip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  line-height: 1.75;
}

.hidden {
  display: none !important;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.84);
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.range-tools {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) minmax(120px, 1fr) auto 64px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.range-tools input {
  width: 100%;
  accent-color: #f07b28;
}

.range-field {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.range-field span {
  color: var(--muted);
}

.range-tools button {
  height: 28px;
}

.table-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-pager button {
  padding: 0 10px;
}

.table-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics > div:last-child {
    grid-column: span 2;
  }

  .strategy-best-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .strategy-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .strategy-head-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0;
  }

  .strategy-head-tabs .strategy-hub-card {
    min-height: 32px;
    padding: 5px 6px;
  }

  .strategy-hub-card,
  .strategy-topic-card {
    min-height: 72px;
    padding: 9px;
  }

  .strategy-hub-card strong,
  .strategy-topic-card strong {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .strategy-topic-shell {
    grid-template-columns: 1fr;
  }

  .strategy-framework-layout {
    grid-template-rows: auto minmax(220px, 0.9fr) minmax(160px, 1fr) minmax(160px, 1fr);
  }

  .strategy-framework-checks {
    grid-template-columns: 1fr;
  }

  .strategy-framework-modules {
    grid-template-columns: 1fr;
  }

  .strategy-spectrum-body {
    grid-template-columns: 1fr;
  }

  .strategy-spectrum-detail {
    max-height: 220px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .strategy-topic-list {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .strategy-detail-drawer {
    min-height: min(360px, 52vh);
  }
}
