  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; background: #f5f6f8; color: #1c2330; padding: 16px; scroll-behavior: smooth; }
  .wrap { max-width: 1120px; margin: 0 auto; }
  header.top h1 { font-size: 22px; font-weight: 600; }
  header.top .sub { font-size: 18px; font-weight: 600; color: #5a6472; margin-top: 6px; }
  nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; font-size: 13px; }
  nav a { color: #2b5fd9; text-decoration: none; background: #e9eefb; padding: 5px 12px; border-radius: 6px; }
  nav a:hover { background: #dbe5fa; }
  .part { margin-top: 26px; }
  .part .pt { font-size: 18px; font-weight: 600; }
  .part .sub { font-size: 13px; color: #5a6472; margin-top: 4px; }
  .status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; color: #5a6472; }
  .status .tag { background: #e8ebf0; border-radius: 4px; padding: 2px 8px; }
  .status .tag.err { background: #fdeceb; color: #b0342c; }
  .status .tag.ok { background: #e7f5ee; color: #0c7a4d; }
  .status .tag.live { background: #e7f5ee; color: #0c7a4d; }
  .status .tag.warn { background: #fff4e0; color: #9a5b00; }
  button { font-size: 12px; padding: 4px 10px; border: 1px solid #c9cfd8; border-radius: 4px; background: #fff; color: #1c2330; cursor: pointer; }
  button:hover { background: #eef1f5; }
  .chart-wrap { background: #fff; border: 1px solid #e3e6ec; border-radius: 8px; padding: 8px; margin-bottom: 14px; }
  .cum-pick { padding: 2px 4px 8px; }
  .cum-pick select { font-size: 12px; padding: 4px 8px; border: 1px solid #c9cfd8; border-radius: 4px; background: #fff; color: #1c2330; cursor: pointer; }
  .chart { width: 100%; height: 420px; }
  #chart { height: 380px; }
  #chartAmt, #chartNf, #chartDAmt, #chartDNf { height: 420px; }
  #chartTypCase, #chartTypNorm { height: 340px; }
  #chartCum { height: 380px; }
  /* 区间框选求和：按住左键或右键从左向右拖出选区 */
  .brush-band { position: absolute; display: none; pointer-events: none; z-index: 4;
                background: rgba(240, 180, 41, 0.16);
                border-left: 1px solid #b07a1a; border-right: 1px solid #b07a1a; }
  .brush-tip { position: absolute; display: none; pointer-events: none; z-index: 6;
               transform: translateX(-50%); white-space: nowrap;
               background: rgba(255, 255, 255, 0.96); border: 1px solid #e0c48a;
               border-radius: 4px; padding: 3px 9px; font-size: 12px; color: #8a5a00;
               box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15); }
  .table-wrap { background: #fff; border: 1px solid #e3e6ec; border-radius: 8px; padding: 12px 14px; margin-top: 14px; }
  .table-wrap h2 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
  .tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 12px; }
  th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eef0f4; white-space: nowrap; }
  th { color: #5a6472; font-weight: 500; }
  td.num, th.num { text-align: right; }
  .up { color: #d93630; }
  .down { color: #0aa06e; }
  .pct-cell { border-radius: 3px; color: #1c2330; font-weight: 500; }
  .amt-cell { position: relative; text-align: right; }
  .amt-bg { position: absolute; top: 2px; bottom: 2px; left: 0; background: #fde9d9; z-index: 0; }
  .amt-val { position: relative; z-index: 1; }
  footer { font-size: 12px; color: #7a8494; line-height: 1.8; margin-top: 10px; }
  @media (max-width: 640px) { .chart, #chart, #chartAmt, #chartNf, #chartDAmt, #chartDNf, #chartTypCase, #chartTypNorm, #chartCum { height: 260px; } .part .pt { font-size: 16px; } }

/* 顶部两个看板的切换条（2026-11-12） */
.sitebar{position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid #e6eaf0;}
.sitebar-in{max-width:1240px;margin:0 auto;padding:0 20px;display:flex;gap:28px;height:46px;
            align-items:center;overflow-x:auto;overflow-y:hidden;white-space:nowrap;
            scrollbar-width:none;-webkit-overflow-scrolling:touch;}
.sitebar-in::-webkit-scrollbar{display:none;}
.sitebar-in>a{flex:0 0 auto;}
.sitebar a{font-size:13.5px;color:#5b6a7a;text-decoration:none;height:46px;line-height:46px;
           border-bottom:2px solid transparent;transition:color .15s,border-color .15s;}
.sitebar a:hover{color:#c7362f;}
.sitebar a.on{color:#1f2d3d;font-weight:600;border-bottom-color:#d93630;}
/* 上证综指看板：淡橙胶囊，和"当前页"的红色下划线区分开 */
.sitebar a.hl{height:26px;line-height:26px;padding:0 12px;background:rgba(233,85,3,.09);
  color:#E95503;font-weight:600;border-radius:999px;border-bottom:none;}
.sitebar a.hl:hover{background:rgba(233,85,3,.15);color:#E95503;}
.sitebar a.hl.on{background:rgba(233,85,3,.14);color:#c94a02;border-bottom-color:transparent;}
@media (max-width:640px){.sitebar-in{gap:18px;padding:0 14px;}.sitebar a{font-size:13px;}}

/* 第四部分：指数选择控件（2026-11-13） */
.selwrap{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#4b5b6c;margin-right:8px;}
.selwrap select{height:30px;padding:0 10px;font-size:13px;font-family:inherit;color:#1f2d3d;
  background:#fff;border:1px solid #d7dfe8;border-radius:6px;outline:none;cursor:pointer;}
.selwrap select:focus{border-color:#d93630;box-shadow:0 0 0 3px rgba(217,54,48,.10);}

/* 图2 基准线勾选框（2026-11-13） */
.cum-pick .chk{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:#4b5b6c;
  margin-left:12px;cursor:pointer;user-select:none;}
.cum-pick .chk input{width:13px;height:13px;accent-color:#d93630;cursor:pointer;}

/* 单只 ETF 日内走势迷你柱图（2026-11-18） */
th.mini,td.mini{width:104px;text-align:center;padding-left:6px;padding-right:6px;}
td.mini svg.spark{display:block;margin:0 auto;}


/* 单只ETF表格列宽（2026-11-18 重排）
   桌面：固定比例，名称不再吃掉半张表、成交额不再挤成一条缝
   手机：保留全部 6 列、可横向滑动；名称+成交额+走势 三列合计正好 = 一屏宽，
        滑到该位置时三列完整呈现（其余列滑出去看） */
.etf-tbl { width: 100%; table-layout: fixed; }
.etf-tbl th:nth-child(1) { width: 8%; }   /* 代码 */
.etf-tbl th:nth-child(2) { width: 25%; }  /* 名称 */
.etf-tbl th:nth-child(3) { width: 13%; }  /* 成交额 */
.etf-tbl th:nth-child(4) { width: 26%; }  /* 日内走势 */
.etf-tbl th:nth-child(5) { width: 13%; }  /* 占比 */
.etf-tbl th:nth-child(6) { width: 15%; }  /* 涨跌幅 */
.etf-tbl td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.etf-tbl td.mini svg.spark { width: 100%; height: 22px; }

@media (max-width: 700px) {
  .etf-tbl { min-width: 528px; }          /* 6 列合计，约 1.6 屏 */
  .etf-tbl th, .etf-tbl td { padding: 7px 5px; font-size: 12px; }
  .etf-tbl th:nth-child(1) { width: 64px; }
  .etf-tbl th:nth-child(2) { width: 120px; }
  .etf-tbl th:nth-child(3) { width: 84px; }   /* 名称+成交额+走势 = 328px = 一屏 */
  .etf-tbl th:nth-child(4) { width: 124px; }
  .etf-tbl th:nth-child(5) { width: 64px; }
  .etf-tbl th:nth-child(6) { width: 72px; }
  .etf-tbl td.mini svg.spark { height: 20px; }
}
