:root {
  --etf-accent: #4f46e5;
  --etf-accent-soft: #eef2ff;
  --etf-border: rgba(15, 23, 42, 0.12);
}

/* REITs 首页/栏目页：无右侧栏，主区占原中栏+右栏宽度（详情 ?code= 仍保留三栏） */
body.site-layout--etf-wide {
  --site-main-col-w: 1032px;
}


@media (max-width: 1100px) {
  body.site-layout--etf-wide {
    --site-main-col-w: 932px;
  }
}

body.site-layout--etf-home .etf-demo-note {
  display: none;
}

body.site-layout--etf-wide #etfCategoryCards {
  display: none;
}

body.site-layout--etf-detail #etfCategoryCards,
body.site-layout--etf-detail #etfFundList,
body.site-layout--etf-detail .etf-demo-note,
body.site-layout--etf-detail .page-head {
  display: none;
}

body.site-layout--etf-detail .site-main {
  padding-top: 12px;
}

.etf-detail-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.etf-detail-back {
  margin: 0;
  font-size: 0.88rem;
}

.etf-detail-back a {
  color: var(--etf-accent);
  text-decoration: none;
}

.etf-detail-back a:hover {
  text-decoration: underline;
}

.etf-chart-tech-link {
  margin: 10px 0 0;
  padding: 0 4px;
  font-size: 0.82rem;
}

.etf-chart-tech-link a {
  color: var(--etf-accent);
  text-decoration: none;
}

.etf-chart-tech-link a:hover {
  text-decoration: underline;
}

.etf-detail-data-feed .etf-index-val {
  margin: 0;
  padding-top: 0;
  border-top: none;
}

.etf-aside-holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.etf-aside-holdings-table th,
.etf-aside-holdings-table td {
  padding: 5px 2px;
  border-bottom: 1px solid var(--etf-border);
  text-align: left;
}

.etf-aside-holdings-table th.num,
.etf-aside-holdings-table td.num {
  text-align: right;
}

.etf-aside-holdings-table a {
  color: var(--etf-accent);
  text-decoration: none;
  font-weight: 600;
}

.etf-aside-holdings-table a:hover {
  text-decoration: underline;
}

.etf-aside-hold-name {
  max-width: 5.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.etf-home-back {
  margin: 0 0 12px;
  font-size: 0.88rem;
}

.etf-home-back a {
  color: var(--etf-accent);
  text-decoration: none;
}

.etf-home-back a:hover {
  text-decoration: underline;
}

.page-head-sub strong {
  color: var(--etf-accent);
}

.panel {
  background: #f8fafc;
  border: 1px solid var(--etf-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.etf-fund-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.etf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.etf-tab {
  padding: 6px 12px;
  border: 1px solid var(--etf-border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.etf-tab.is-active {
  background: var(--etf-accent-soft);
  border-color: var(--etf-accent);
  color: var(--etf-accent);
  font-weight: 600;
}

.etf-filter {
  width: 100%;
  max-width: 320px;
  padding: 8px 12px;
  border: 1px solid var(--etf-border);
  border-radius: 10px;
  flex-shrink: 0;
}

.etf-table-wrap {
  overflow-x: auto;
}

.etf-table--list {
  min-width: 800px;
}

.etf-table--list .etf-col-name {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etf-table--list .etf-col-live {
  font-weight: 600;
}

.etf-th-note {
  font-size: 0.72em;
  font-weight: 400;
  color: #888;
}

.etf-table td.num .up {
  color: var(--up, #e03e3e);
}

.etf-table td.num .down {
  color: var(--down, #059669);
}

.etf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.etf-table th,
.etf-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--etf-border);
  text-align: left;
}

.etf-table th[data-sort] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.etf-table th[data-sort]:hover {
  color: var(--etf-accent);
}

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

.etf-table a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.etf-table a:hover {
  color: var(--etf-accent);
}

.etf-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e2e8f0;
  font-size: 0.78rem;
}

.etf-premium--high {
  color: #dc2626;
  font-weight: 600;
}

.etf-premium--low {
  color: #059669;
  font-weight: 600;
}

.etf-premium--neutral {
  color: #64748b;
}

.etf-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

@media (max-width: 720px) {
  .etf-detail-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.etf-metric {
  background: #fff;
  border: 1px solid var(--etf-border);
  border-radius: 12px;
  padding: 12px;
}

.etf-metric .label {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 4px;
}

.etf-metric .value {
  font-size: 1.1rem;
  font-weight: 700;
}

.etf-demo-note {
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.82rem;
}

.etf-detail-links {
  margin-top: 12px;
  font-size: 0.88rem;
}

.etf-detail-links a {
  color: var(--etf-accent);
}

.etf-val--low {
  color: #059669;
  font-weight: 600;
}

.etf-val--high {
  color: #dc2626;
  font-weight: 600;
}

.etf-val--neutral {
  color: #64748b;
}

.etf-val em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 500;
}

.etf-index-val {
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--etf-border);
}

.etf-index-val h3,
.etf-detail h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

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

@media (max-width: 900px) {
  .etf-detail-metrics--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.etf-peers-table {
  margin-top: 10px;
}

.etf-portfolio {
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--etf-border);
}

.etf-holdings-table {
  margin-top: 10px;
}

.etf-link-tech {
  color: var(--etf-accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.etf-link-tech:hover {
  text-decoration: underline;
}

.etf-peer-current {
  background: var(--etf-accent-soft);
}

.etf-peer-current td {
  font-weight: 600;
}

.muted-inline {
  color: #64748b;
  font-size: 0.85rem;
}

.etf-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .etf-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.etf-card {
  display: block;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--etf-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.etf-card--btn {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.etf-card:hover,
.etf-card--btn:hover {
  border-color: var(--etf-accent);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.etf-card--btn.is-active {
  background: var(--etf-accent-soft);
  border-color: var(--etf-accent);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.etf-card--btn.is-active .etf-card-title {
  color: var(--etf-accent);
}

.etf-card-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.etf-card-sub {
  font-size: 0.82rem;
  color: #64748b;
}

.etf-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--etf-border);
}

.etf-pager-info {
  font-size: 0.85rem;
  color: #64748b;
}

.etf-pager-btn {
  padding: 6px 12px;
  border: 1px solid var(--etf-border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.etf-pager-btn:hover:not(:disabled) {
  border-color: var(--etf-accent);
  color: var(--etf-accent);
}

.etf-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.etf-aside-kline {
  min-height: 200px;
}

.etf-kline-stack {
  width: 100%;
}

.etf-kline-chart__pane {
  width: 100%;
  height: 200px;
}

.etf-kline-vol__pane {
  width: 100%;
  height: 56px;
  margin-top: 2px;
}

.etf-aside-kline-meta {
  margin: 8px 0 0;
  font-size: 0.78rem;
}

.etf-aside-kline-link {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.etf-aside-kline-link a {
  color: var(--etf-accent);
  text-decoration: none;
}

.etf-aside-kline-link a:hover {
  text-decoration: underline;
}

.etf-aside-peers-note {
  margin: 0 0 8px;
  font-size: 0.78rem;
}

.etf-aside-peers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.etf-aside-peers-table th,
.etf-aside-peers-table td {
  padding: 5px 2px;
  border-bottom: 1px solid var(--etf-border);
  text-align: left;
}

.etf-aside-peers-table th.num,
.etf-aside-peers-table td.num {
  text-align: right;
}

.etf-aside-peers-table a {
  color: var(--etf-accent);
  text-decoration: none;
}

.etf-aside-peers-table a:hover {
  text-decoration: underline;
}


/* 数据状态和刷新按钮 */
.etf-data-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--etf-border);
  border-radius: 10px;
  font-size: 0.85rem;
  margin-top: 14px;
}

.etf-data-fresh {
  color: #059669;
}

.etf-data-normal {
  color: #64748b;
}

.etf-data-stale {
  color: #d97706;
}

.etf-refresh-btn {
  padding: 4px 12px;
  border: 1px solid var(--etf-accent);
  border-radius: 6px;
  background: #fff;
  color: var(--etf-accent);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.etf-refresh-btn:hover:not(:disabled) {
  background: var(--etf-accent);
  color: #fff;
}

.etf-refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
