body.has-site-nav {
  margin: 0;
  overflow-x: hidden;
}

.board-fund-page {
  --fund-ink: #17243a;
  --fund-muted: #68758a;
  --fund-border: #d9e2ec;
  --fund-border-strong: #c7d3e1;
  --fund-panel: #ffffff;
  --fund-soft: #f6f8fb;
  --fund-blue: #1c5fa8;
  --fund-blue-soft: #edf5ff;
  --fund-up: #c13c42;
  --fund-up-soft: #fff3f3;
  --fund-down: #147553;
  --fund-down-soft: #eff9f4;
  display: grid;
  gap: 14px;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  color: var(--fund-ink);
}

.board-fund-page *,
.board-fund-page *::before,
.board-fund-page *::after {
  box-sizing: border-box;
}

.board-fund-page [hidden] {
  display: none !important;
}

.fund-toolbar,
.fund-chart-panel,
.fund-table-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--fund-border);
  border-radius: 8px;
  background: var(--fund-panel);
  box-shadow: 0 8px 24px rgba(25, 43, 68, 0.06);
}

.fund-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 19px;
  border-top: 3px solid var(--fund-blue);
}

.fund-title-block {
  min-width: 0;
}

.fund-title-block h1 {
  margin: 0;
  color: #132139;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.fund-title-meta,
.fund-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 15px;
  margin-top: 6px;
  color: var(--fund-muted);
  font-size: 13px;
  line-height: 1.5;
}

.fund-title-meta span + span::before,
.fund-panel-meta span + span::before {
  content: "·";
  margin-right: 15px;
  color: #a2adbb;
}

.fund-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  min-width: 0;
}

.fund-segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(66px, 1fr));
  padding: 3px;
  border: 1px solid var(--fund-border-strong);
  border-radius: 7px;
  background: #eef2f6;
}

.fund-segment {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #536176;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.fund-segment.active {
  background: #ffffff;
  color: var(--fund-blue);
  box-shadow: 0 2px 7px rgba(25, 43, 68, 0.12);
}

.fund-segment:focus-visible,
.fund-back-button:focus-visible,
.fund-mobile-sort button:focus-visible,
.fund-mobile-legend-item:focus-visible,
.fund-board-button:focus-visible,
.fund-table th button:focus-visible {
  outline: 2px solid rgba(28, 95, 168, 0.48);
  outline-offset: 2px;
}

.fund-date-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--fund-border-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--fund-muted);
  font-size: 13px;
}

.fund-date-control select {
  min-width: 118px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fund-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.fund-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--fund-border-strong);
  border-radius: 7px;
  background: #ffffff;
  color: #536176;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fund-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8794a8;
}

.fund-status[data-status="connected"] {
  border-color: #b9ddcd;
  background: var(--fund-down-soft);
  color: #166448;
}

.fund-status[data-status="connected"] .fund-status-dot {
  background: #16825d;
  box-shadow: 0 0 0 3px rgba(22, 130, 93, 0.14);
}

.fund-status[data-status="stale"],
.fund-status[data-status="error"] {
  border-color: #ebc4c4;
  background: var(--fund-up-soft);
  color: #9d3439;
}

.fund-status[data-status="stale"] .fund-status-dot,
.fund-status[data-status="error"] .fund-status-dot {
  background: #c04444;
  box-shadow: 0 0 0 3px rgba(192, 68, 68, 0.13);
}

.fund-status[data-status="paused"],
.fund-status[data-status="closed"] {
  border-color: #ead7b7;
  background: #fff8ec;
  color: #8b6426;
}

.fund-status[data-status="paused"] .fund-status-dot,
.fund-status[data-status="closed"] .fund-status-dot {
  background: #d08b24;
}

.fund-system-message {
  padding: 11px 14px;
  border: 1px solid #ead09e;
  border-radius: 7px;
  background: #fff8e8;
  color: #805b18;
  font-size: 13px;
  line-height: 1.6;
}

.fund-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.fund-summary-item {
  position: relative;
  min-width: 0;
  padding: 13px 15px 14px;
  overflow: hidden;
  border: 1px solid var(--fund-border);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(25, 43, 68, 0.04);
}

.fund-summary-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #7d8ba0;
}

.fund-summary-item--leader::before,
.fund-summary-item--inflow::before {
  background: var(--fund-up);
}

.fund-summary-item--share::before {
  background: var(--fund-blue);
}

.fund-summary-item--count::before {
  background: var(--fund-down);
}

.fund-summary-label {
  display: block;
  color: var(--fund-muted);
  font-size: 12px;
  line-height: 1.4;
}

.fund-summary-value {
  display: block;
  min-height: 28px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--fund-ink);
  font-size: 20px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-summary-value.up {
  color: var(--fund-up);
}

.fund-summary-value.down {
  color: var(--fund-down);
}

.fund-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #e1e7ef;
  background: #fafbfd;
}

.fund-panel-head > div:first-child {
  min-width: 0;
}

.fund-panel-head h2 {
  margin: 0;
  color: var(--fund-ink);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.fund-chart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.fund-search.fund-chart-search {
  width: min(260px, 24vw);
}

.fund-time-pill,
.fund-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--fund-border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: #34445b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fund-time-pill {
  color: var(--fund-blue);
  font-variant-numeric: tabular-nums;
}

.fund-back-button {
  gap: 5px;
  cursor: pointer;
  touch-action: manipulation;
}

.fund-back-button:hover {
  border-color: #8cb3df;
  background: var(--fund-blue-soft);
}

.fund-concept-notice {
  padding: 9px 16px;
  border-bottom: 1px solid #eadfbf;
  background: #fffaf0;
  color: #7c642f;
  font-size: 12px;
  line-height: 1.6;
}

.fund-chart-scroll {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
}

.fund-chart {
  width: 100%;
  min-width: 0;
  height: 640px;
}

.fund-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #718096;
  font-size: 14px;
  pointer-events: none;
}

.fund-mobile-legend {
  display: none;
}

.fund-table-panel {
  display: none;
}

.fund-table-head {
  display: none;
  justify-content: flex-end;
  padding: 10px 16px;
}

.fund-table-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
}

.fund-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 100%);
}

.fund-search-icon {
  position: absolute;
  left: 10px;
  color: #6d7b90;
  font-size: 19px;
  pointer-events: none;
}

.fund-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--fund-border-strong);
  border-radius: 7px;
  outline: 0;
  background: #ffffff;
  color: var(--fund-ink);
  font: inherit;
  font-size: 14px;
}

.fund-search input:focus {
  border-color: #6e9fe0;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.11);
}

.fund-mobile-sort {
  display: none;
}

.fund-table-scroll {
  max-height: 680px;
  overflow: auto;
  overscroll-behavior: contain;
}

.fund-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  table-layout: fixed;
}

.fund-table th,
.fund-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #e5eaf1;
  color: #25344b;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  vertical-align: middle;
}

.fund-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f3f6fa;
  color: #56647a;
  font-weight: 700;
}

.fund-table th:first-child,
.fund-table td:first-child {
  width: 30%;
}

.fund-table th.numeric,
.fund-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fund-table th button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.fund-table th.numeric button {
  width: 100%;
  text-align: right;
}

.fund-table th button[data-sort-active="true"] {
  color: var(--fund-blue);
}

.fund-table th button[data-sort-active="true"]::after {
  content: " ↓";
}

.fund-table th button[data-sort-direction="asc"]::after {
  content: " ↑";
}

.fund-board-button {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--fund-blue);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}

.fund-value-up {
  color: var(--fund-up) !important;
}

.fund-value-down {
  color: var(--fund-down) !important;
}

.fund-value-muted {
  color: #8490a3 !important;
}

.fund-table tbody tr:hover {
  background: #f7faff;
}

.fund-table-empty {
  padding: 30px !important;
  color: #718096 !important;
  text-align: center !important;
}

@media (max-width: 1100px) {
  .fund-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .fund-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .fund-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .board-fund-page {
    gap: 9px;
  }

  .fund-toolbar,
  .fund-chart-panel,
  .fund-table-panel {
    box-shadow: 0 4px 14px rgba(25, 43, 68, 0.05);
  }

  .fund-toolbar {
    gap: 13px;
    padding: 13px 12px 12px;
  }

  .fund-title-block h1 {
    font-size: 21px;
  }

  .fund-title-meta,
  .fund-panel-meta {
    gap: 3px 10px;
    margin-top: 4px;
    font-size: 12px;
  }

  .fund-title-meta span + span::before,
  .fund-panel-meta span + span::before {
    margin-right: 10px;
  }

  .fund-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .fund-segmented {
    grid-column: 1 / -1;
    width: 100%;
  }

  .fund-segment {
    min-height: 36px;
  }

  .fund-date-control {
    grid-column: 1;
    min-width: 0;
    min-height: 40px;
    justify-content: space-between;
  }

  .fund-date-control > span {
    white-space: nowrap;
  }

  .fund-date-control select {
    min-width: 0;
    width: 100%;
    text-align: right;
  }

  .fund-status {
    grid-column: 2;
    min-height: 40px;
    padding: 0 10px;
  }

  .fund-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .fund-summary-item {
    padding: 11px 11px 12px;
  }

  .fund-summary-label {
    font-size: 11px;
  }

  .fund-summary-value {
    min-height: 24px;
    margin-top: 4px;
    font-size: 16px;
  }

  .fund-panel-head {
    align-items: flex-start;
    padding: 12px;
  }

  .fund-panel-head h2 {
    font-size: 16px;
  }

  .fund-chart-panel > .fund-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .fund-chart-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .fund-search.fund-chart-search {
    width: 100%;
  }

  .fund-chart-actions .fund-back-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .fund-time-pill,
  .fund-back-button {
    min-height: 31px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .fund-concept-notice {
    padding: 8px 12px;
  }

  .fund-chart {
    width: 100%;
    min-width: 0;
    height: 560px;
  }

  .fund-mobile-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    border-top: 1px solid #e1e7ef;
    background: #fafbfd;
  }

  .fund-mobile-legend:empty {
    display: none;
  }

  .fund-mobile-legend-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid #dce3eb;
    border-radius: 6px;
    background: #ffffff;
    color: #3b485b;
    font: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
  }

  .fund-mobile-legend-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--legend-color);
  }

  .fund-mobile-legend-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fund-mobile-legend-item strong {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .fund-table-head {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .fund-table-tools {
    display: flex;
    justify-content: flex-end;
    width: 100%;
  }

  .fund-mobile-sort {
    display: flex;
    align-items: stretch;
    gap: 5px;
  }

  .fund-mobile-sort label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 8px;
    border: 1px solid var(--fund-border-strong);
    border-radius: 7px;
    background: #ffffff;
    color: var(--fund-muted);
    font-size: 11px;
  }

  .fund-mobile-sort select {
    max-width: 88px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fund-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
  }

  .fund-mobile-sort button {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--fund-border-strong);
    border-radius: 7px;
    background: #ffffff;
    color: var(--fund-blue);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
  }

  .fund-table-scroll {
    max-height: 72vh;
    overflow-x: hidden;
    background: #f4f7fa;
  }

  .fund-table,
  .fund-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .fund-table thead {
    display: none;
  }

  .fund-table tbody {
    padding: 8px;
  }

  .fund-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    margin: 0 0 8px;
    padding: 9px 10px 8px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(25, 43, 68, 0.035);
  }

  .fund-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .fund-table tbody tr:hover {
    background: #ffffff;
  }

  .fund-table td,
  .fund-table td:first-child {
    display: block;
    width: auto;
    padding: 7px 3px;
    border: 0;
    text-align: left;
  }

  .fund-table td.numeric {
    min-width: 0;
    color: #34445b;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
  }

  .fund-table td.numeric::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #7a8799;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
  }

  .fund-table td[data-label="当日累计"] {
    padding-left: 7px;
    border-left: 2px solid currentColor;
  }

  .fund-board-name-cell {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #edf0f4 !important;
  }

  .fund-board-button {
    font-size: 15px;
  }

  .fund-table-empty {
    grid-column: 1 / -1;
    padding: 28px 12px !important;
    text-align: center !important;
  }
}

@media (max-width: 420px) {
  .fund-date-control {
    padding: 0 8px;
  }

  .fund-date-control > span {
    display: none;
  }

  .fund-status {
    font-size: 12px;
  }

  .fund-table-tools {
    grid-template-columns: 1fr;
  }

  .fund-mobile-sort {
    justify-content: space-between;
  }

  .fund-mobile-sort label {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .fund-mobile-sort select {
    max-width: none;
  }

  .fund-chart {
    height: 540px;
  }

  .fund-mobile-legend-item {
    grid-template-columns: 7px minmax(0, 1fr);
  }

  .fund-mobile-legend-item strong {
    grid-column: 2;
  }
}
