
    :root {
      color-scheme: light;
      --bg: #f5f7fb;
      --panel: #ffffff;
      --panel-2: #f3f5f9;
      --panel-3: #ffffff;
      --panel-solid: #ffffff;
      --surface: #ffffff;
      --border: #e2e7ef;
      --line: #e2e7ef;
      --line-soft: #edf0f5;
      --line-strong: #a9b8ce;
      --text: #202b40;
      --muted: #65738a;
      --green: #087f64;
      --red: #d53645;
      --amber: #956000;
      --blue: #365bd6;
      --green-soft: #edf8f3;
      --red-soft: #fff0f1;
      --amber-soft: #fff8e8;
      --blue-soft: #eef2ff;
      --white: #ffffff;
      --radius: 10px;
      --sidebar: 216px;
    }

    * { box-sizing: border-box; }
    html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
    body {
      font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
      font-size: 14px;
      letter-spacing: 0;
      line-height: 1.45;
    }
    button, input, select { font: inherit; letter-spacing: 0; }
    button { cursor: pointer; }
    .app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
    .sidebar {
      position: sticky; top: 0; height: 100vh; padding: 22px 14px;
      border-right: 1px solid var(--line); background: var(--panel);
      display: flex; flex-direction: column; gap: 24px;
    }
    .brand { padding: 0 10px; }
    .brand strong { display: block; font-size: 22px; font-weight: 730; color: var(--text); }
    .brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
    .nav { display: grid; gap: 4px; }
    .nav button {
      width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid transparent;
      border-radius: var(--radius); background: transparent; color: var(--muted);
      display: flex; align-items: center; gap: 10px; text-align: left;
    }
    .nav button:hover { background: var(--panel); color: var(--text); }
    .nav button.active { color: var(--text); background: var(--panel-2); border-color: var(--line); }
    .nav-icon {
      width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 5px;
      display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
      flex: 0 0 auto;
    }
    .nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-variant-numeric: tabular-nums; }
    .sidebar-foot { margin-top: auto; padding: 12px 10px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line-soft); }
    .market-toolbar {
      min-height: 58px; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
      display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
    }
    .market-toolbar-title span { display: block; color: var(--blue); font-size: 12px; font-weight: 650; }
    .market-toolbar-title h2 { margin: 3px 0 0; font-size: 18px; font-weight: 680; }
    .market-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
    .market-auto { height: 40px; }
    .market-interval { display: grid; gap: 5px; }
    .market-interval span { color: var(--muted); font-size: 12px; }
    .market-interval select { width: 112px; height: 40px; }
    .market-status { min-height: 20px; margin-bottom: 14px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
    .market-status.error { color: var(--red); }
    .market-overview {
      margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
      display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--line-soft); gap: 1px;
    }
    .market-overview-item { min-width: 0; padding: 10px 14px; background: var(--bg); }
    .market-overview-item span { display: block; color: var(--muted); font-size: 12px; }
    .market-overview-item strong { display: block; margin-top: 4px; font-size: 17px; font-variant-numeric: tabular-nums; }
    .market-overview-item strong > span { display: inline; font-size: inherit; }
    .market-detail { margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); overflow: hidden; }
    .market-detail-head { min-height: 90px; padding: 17px 20px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-soft); }
    .market-detail-heading span { display: block; color: var(--muted); font-size: 12px; }
    .market-detail-heading strong { display: block; margin-top: 4px; font-size: 22px; }
    .market-detail-quote { display: flex; align-items: flex-end; gap: 18px; text-align: right; }
    .market-detail-price { font-size: 29px; font-weight: 720; font-variant-numeric: tabular-nums; }
    .market-detail-value b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
    .market-detail-value small { display: block; margin-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
    .market-chart { min-height: 300px; padding: 14px 18px 5px; }
    .market-chart svg { width: 100%; height: auto; display: block; }
    .market-detail-canvas { width: 100%; height: 280px; }
    .market-chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
    .market-chart-zero { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
    .market-chart-session { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
    .market-chart-current { stroke: var(--blue); stroke-width: 1; stroke-dasharray: 2 3; opacity: .72; vector-effect: non-scaling-stroke; }
    .market-current-pill { fill: var(--blue); }
    .market-current-text { fill: var(--text); font-size: 12px; font-weight: 700; }
    .market-chart-line { fill: none; stroke-width: 2.1; vector-effect: non-scaling-stroke; }
    .market-chart-line.positive { stroke: var(--red); }
    .market-chart-line.negative { stroke: var(--green); }
    .market-chart-line.neutral { stroke: var(--blue); }
    .market-chart-area.positive { fill: rgba(255,111,115,.07); }
    .market-chart-area.negative { fill: rgba(66,201,165,.07); }
    .market-chart-area.neutral { fill: rgba(103,169,255,.07); }
    .market-chart-dot.positive { fill: var(--red); }
    .market-chart-dot.negative { fill: var(--green); }
    .market-chart-dot.neutral { fill: var(--blue); }
    .market-axis { fill: var(--muted); font-size: 12px; }
    .market-axis-note { fill: var(--muted); font-size: 12px; }
    .market-detail-meta { padding: 9px 20px 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
    .market-list-head { margin-bottom: 8px; }
    .market-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .market-group { grid-column: 1 / -1; margin: 9px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; }
    .market-row {
      width: 100%; min-width: 0; min-height: 144px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
      background: var(--panel); color: var(--text); display: grid; grid-template-rows: auto auto 52px; gap: 9px; text-align: left;
    }
    .market-row:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .market-row.active { border-color: var(--line-strong); background: var(--blue-soft); box-shadow: inset 0 2px 0 var(--blue); }
    .market-card-head, .market-card-quote { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .market-name { min-width: 0; }
    .market-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue); font-size: 13px; }
    .market-name span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
    .market-verify { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
    .market-numbers { min-width: 0; font-variant-numeric: tabular-nums; }
    .market-numbers strong { display: block; font-size: 18px; }
    .market-numbers span { display: block; margin-top: 1px; font-size: 12px; }
    .market-pct { padding-top: 3px; text-align: right; font-size: 14px; font-weight: 680; font-variant-numeric: tabular-nums; }
    .market-spark { width: 100%; height: 52px; display: block; }
    .market-spark .zero { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
    .market-spark .line { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
    .market-spark .area { opacity: .1; }
    .market-spark.positive .area { fill: var(--red); }
    .market-spark.negative .area { fill: var(--green); }
    .market-spark.neutral .area { fill: var(--blue); }
    .market-spark.positive .line { stroke: var(--red); }
    .market-spark.negative .line { stroke: var(--green); }
    .market-spark.neutral .line { stroke: var(--blue); }
    .market-source { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
    .main { min-width: 0; }
    .topbar {
      min-height: 68px; padding: 12px 28px; border-bottom: 1px solid var(--line);
      background: var(--panel); position: sticky; top: 0; z-index: 10;
      display: flex; align-items: center; justify-content: space-between; gap: 18px;
    }
    .page-title h1 { margin: 0; font-size: 18px; font-weight: 680; }
    .page-title p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
    .session { display: flex; align-items: center; gap: 9px; color: var(--muted); white-space: nowrap; }
    .top-actions { display: flex; align-items: center; gap: 12px; }
    .top-toggle {
      min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius);
      display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px;
      background: var(--panel);
    }
    .top-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
    .top-toggle.active { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
    .cache-btn { height: 32px; padding: 0 10px; font-size: 12px; font-weight: 500; }
    .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(232,179,92,.12); }
    .dot.open { background: var(--green); box-shadow: 0 0 0 4px rgba(66,201,165,.12); }
    .content { max-width: 1540px; margin: 0 auto; padding: 24px 28px 44px; }
    .view { display: none; }
    .view.active { display: block; }
    .toolbar {
      display: flex; align-items: end; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
    }
    .field { display: grid; gap: 6px; min-width: 150px; }
    .field.grow { flex: 1 1 340px; }
    label { color: var(--muted); font-size: 12px; }
    input, select {
      height: 40px; border: 1px solid var(--line); border-radius: var(--radius);
      background: var(--panel); color: var(--text); padding: 0 12px; outline: none;
    }
    input:not([type="checkbox"]):not([type="radio"]):focus,
    select:focus {
      border-color: var(--blue);
      box-shadow: none;
    }
    .btn {
      height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius);
      background: var(--panel-2); color: var(--text); font-weight: 620;
    }
    .btn:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .btn.primary { background: var(--green); border-color: var(--green); color: var(--text); }
    .btn.primary:hover { background: var(--green); }
    .btn.secondary { background: transparent; }
    .btn.icon { width: 40px; padding: 0; display: inline-grid; place-items: center; overflow: hidden; font-size: 19px; line-height: 1; }
    .mobile-nav-more, .mobile-nav-menu { display: contents; }
    .mobile-nav-more > summary { display: none; }
    .fund-research-tabs { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
    .fund-research-tabs > span { min-width: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
    .fund-research-tabs > div { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
    .fund-research-tabs button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
    .fund-research-tabs button.active { background: var(--panel-2); color: var(--text); }
    .btn.compact { height: 32px; padding: 0 11px; font-size: 12px; }
    .btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
    .btn.ghost:hover { border-color: var(--line); color: var(--text); }
    .btn:disabled, button:disabled { cursor: not-allowed; opacity: .42; }
    .toggle-row { height: 40px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
    .toggle-row input { width: 16px; height: 16px; accent-color: var(--green); }
    .status-line { min-height: 22px; margin: -10px 0 14px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
    .status-line.error { color: var(--red); }
    .status-meta { color: var(--muted); }
    .code-queue { margin: -8px 0 18px; padding: 11px 12px; border: 1px solid var(--line-soft); background: var(--panel-3); }
    .queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
    .queue-head strong { font-size: 12px; font-weight: 650; }
    .queue-head span { color: var(--muted); font-size: 12px; }
    .queue-chips { min-height: 28px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
    .code-chip { min-height: 28px; padding: 0 4px 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); color: var(--text); display: inline-flex; align-items: center; gap: 6px; font: 12px Consolas, monospace; }
    .code-chip button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; }
    .code-chip button:hover { background: var(--red-soft); color: var(--red); }
    .queue-empty { color: var(--muted); font-size: 12px; }
    .portfolio-strip { margin-bottom: 18px; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)); gap: 1px; background: var(--line-soft); }
    .portfolio-stat { min-width: 0; min-height: 66px; padding: 11px 14px 10px; background: var(--bg); display: flex; flex-direction: column; justify-content: center; }
    .portfolio-stat span { display: block; color: var(--muted); font-size: 12px; }
    .portfolio-stat strong { display: block; margin-top: 5px; font-size: 17px; font-variant-numeric: tabular-nums; }
    .portfolio-stat small { display: block; min-height: 14px; margin-top: 2px; color: var(--muted); font-size: 12px; }
    .estimate-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 22px; align-items: start; }
    .list-pane { min-width: 0; position: sticky; top: 92px; }
    .list-pane-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
    .list-pane-head strong { font-size: 12px; }
    .list-pane-head span { color: var(--muted); font-size: 12px; }
    .fund-list { max-height: calc(100vh - 190px); overflow-y: auto; display: grid; gap: 7px; padding: 8px 2px 8px 0; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
    .fund-row { min-width: 0; position: relative; }
    .fund-item {
      min-height: 78px; padding: 12px 38px 12px 12px; border: 1px solid var(--line); border-radius: var(--radius);
      width: 100%; min-width: 0; background: var(--panel); display: grid;
      grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px;
      text-align: left; color: var(--text);
    }
    .fund-item:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .fund-item.active { border-color: var(--line-strong); background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green); }
    .fund-item .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 620; }
    .fund-item .code { color: var(--muted); font-size: 12px; }
    .fund-remove { position: absolute; right: 8px; top: 8px; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 17px; }
    .fund-remove:hover { background: var(--red-soft); color: var(--red); }
    .fund-refresh { position: absolute; right: 37px; top: 8px; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 16px; }
    .fund-refresh:hover { background: var(--panel-2); color: var(--blue); }
    .fund-position { margin-top: -1px; padding: 7px 9px 8px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: var(--panel); display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .fund-position label { min-width: 0; color: var(--muted); font-size: 12px; }
    .fund-position label span { display: block; margin-bottom: 4px; }
    .fund-position input { min-width: 0; width: 100%; height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--text); text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; outline: 0; }
    .fund-position input:focus { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(201,154,69,.13); }
    .portfolio-tools { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
    .portfolio-tools .field { min-width: 130px; }
    .portfolio-tools .btn { min-height: 34px; }
    .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .fund-row .fund-item { border-radius: var(--radius) var(--radius) 0 0; }
    .number { font-variant-numeric: tabular-nums; }
    .positive { color: var(--red) !important; }
    .negative { color: var(--green) !important; }
    .neutral { color: var(--muted) !important; }
    .detail { min-width: 0; }
    .summary-band {
      padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
      display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, .7fr)); gap: 20px;
    }
    .summary-main h2 { margin: 0 0 5px; font-size: 20px; }
    .summary-main p { margin: 0; color: var(--muted); font-size: 12px; }
    .metric .label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
    .metric .value { font-size: 27px; font-weight: 720; font-variant-numeric: tabular-nums; }
    .metric .sub { margin-top: 3px; color: var(--muted); font-size: 12px; }
    .kpi-grid { margin: 18px 0; display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; }
    .kpi {
      min-height: 90px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
    }
    .kpi .label { color: var(--muted); font-size: 12px; }
    .kpi .value { margin-top: 8px; font-size: 18px; font-weight: 660; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
    .section { margin-top: 24px; }
    .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
    .section-head h3 { margin: 0; font-size: 14px; font-weight: 680; }
    .section-head span { color: var(--muted); font-size: 12px; }
    .table-wrap { border-top: 1px solid var(--line); overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; min-width: 680px; }
    th, td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
    th { color: var(--muted); font-size: 12px; font-weight: 560; }
    td { font-variant-numeric: tabular-nums; }
    th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
    tbody tr:hover { background: rgba(255,255,255,.025); }
    .badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 8px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); margin: 2px 4px 2px 0; font-size: 12px; }
    .badge.good { color: var(--green); background: var(--green-soft); }
    .badge.bad { color: var(--red); background: var(--red-soft); }
    .parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
    .part { background: var(--panel); padding: 14px; }
    .part span { color: var(--muted); font-size: 12px; }
    .part strong { display: block; margin-top: 7px; font-size: 18px; }
    .empty { min-height: 260px; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 24px; }
    .two-col { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: 22px; }
    .chart-shell { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0 8px; }
    .chart-shell svg { width: 100%; height: auto; display: block; overflow: visible; }
    .chart-grid { stroke: var(--line); stroke-width: 1; }
    .chart-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
    .chart-area { fill: rgba(103,169,255,.08); }
    .axis-text { fill: var(--muted); font-size: 12px; }
    .metric-list { border-top: 1px solid var(--line); }
    .detail-hero { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
    .detail-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
    .detail-eyebrow { color: var(--blue); font-size: 12px; letter-spacing: .04em; }
    .detail-hero h2 { margin: 5px 0 2px; font-size: 24px; }
    .detail-hero p { margin: 0; color: var(--muted); font-size: 12px; }
    .detail-flags { max-width: 44%; min-width: 0; text-align: right; }
    .detail-kpis { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
    .detail-kpi { min-width: 0; padding: 12px 14px; background: var(--panel-3); }
    .detail-kpi span { display: block; color: var(--muted); font-size: 12px; }
    .detail-kpi strong { display: block; margin-top: 5px; font-size: 20px; font-variant-numeric: tabular-nums; }
    .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .detail-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); }
    .detail-panel h3 { margin: 0; font-size: 14px; }
    .detail-panel .section-head { margin-bottom: 12px; }
    .detail-table-wrap { min-width: 0; overflow-x: auto; }
    .detail-table { width: 100%; min-width: 0; table-layout: auto; border-collapse: collapse; font-size: 12px; }
    .detail-table th, .detail-table td { min-width: 92px; padding: 8px 6px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: normal; overflow-wrap: anywhere; }
    .detail-table th:first-child, .detail-table td:first-child { text-align: left; }
    .detail-table th { color: var(--muted); font-size: 12px; font-weight: 500; }
    .detail-table tr:last-child td { border-bottom: 0; }
    .detail-mini-chart { width: 100%; height: 190px; display: block; }
    .detail-chart-grid { stroke: var(--line); stroke-width: 1; }
    .detail-chart-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
    .detail-nav-panel { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); }
    .detail-nav-controls { display: inline-flex; gap: 4px; flex-wrap: wrap; }
    .detail-range { min-width: 48px; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--muted); font-size: 12px; }
    .detail-range:hover, .detail-range.active { border-color: var(--line-strong); background: var(--blue-soft); color: var(--text); }
    .detail-nav-chart { margin-top: 8px; min-height: 220px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
    .detail-nav-chart svg { width: 100%; height: auto; display: block; }
    .detail-nav-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
    .detail-nav-area { fill: rgba(103,169,255,.08); }
    .detail-nav-grid { stroke: var(--line); stroke-width: 1; }
    .detail-nav-axis { fill: var(--muted); font-size: 12px; }
    .detail-holdings-wrap { max-height: 500px; overflow: auto; border-top: 1px solid var(--line-soft); }
    .detail-holdings-wrap .detail-table { table-layout: auto; }
    .detail-holdings-wrap .detail-table { min-width: 860px; }
    .detail-holdings-wrap .detail-table th { white-space: nowrap; }
    .detail-holdings-summary { margin: 0 0 9px; color: var(--muted); font-size: 12px; }
    .holding-change-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
    .section-head-actions { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; }
    .section-head-actions select { min-height:30px; padding:4px 8px; border:1px solid var(--line); border-radius:4px; background:var(--panel-2); color:inherit; }
    .market-overview-highlight strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
    .market-analysis { margin-top:18px; }
    @media (max-width:900px) { .market-analysis-grid { grid-template-columns:1fr; } }
    .holding-change-group { border:1px solid var(--line-soft); padding:10px; background:var(--panel-2); min-height:80px; }
    .holding-change-group > strong { display:flex; justify-content:space-between; margin-bottom:7px; }
    .holding-change-group > div { display:flex; justify-content:space-between; gap:8px; font-size:12px; padding:3px 0; border-top:1px solid var(--line-soft); }
    .holding-change-group em { font-style:normal; font-variant-numeric:tabular-nums; }
    .transaction-panel { margin-top:14px; }
    .compact-toolbar { padding:0; border:0; background:transparent; }
    .transaction-summary { margin-top:10px; color:var(--muted); font-size:12px; }
    .transaction-preview { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--blue); background: var(--panel-2); color: var(--text); font-size: 13px; line-height: 1.6; }
    .field-error { display: none; margin-top: 4px; color: var(--red); font-size: 12px; line-height: 1.35; }
    .field-error:not(:empty) { display: block; }
    .field.has-error input, .field.has-error select { border-color: var(--red); box-shadow: 0 0 0 2px rgba(220,38,38,.1); }
    .inline-check { display: flex !important; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 12px !important; font-weight: 400 !important; }
    .inline-check input { width: 16px; min-height: 16px; margin: 0; box-shadow: none; }
    .fund-profile-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--panel-3); }
    .fund-profile-summary > div { min-width: 0; padding: 11px 14px; border-right: 1px solid var(--line); }
    .fund-profile-summary span { display: block; color: var(--muted); font-size: 12px; }
    .fund-profile-summary strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; }
    .pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0 4px; }
    .priority-issues { margin-bottom: 14px; border: 1px solid var(--line); background: var(--panel); }
    .priority-issue { display: grid; grid-template-columns: 90px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
    .priority-issue:last-child { border-bottom: 0; }
    .priority-issue > span { color: var(--amber); font-size: 12px; font-weight: 700; }
    .priority-issue strong { display: block; font-size: 13px; }
    .priority-issue small { color: var(--muted); }
    .chart-tooltip { position:absolute; z-index:3; transform:translateX(-50%); padding:6px 9px; border:1px solid var(--line); border-radius:5px; background:var(--panel); color:var(--text); font-size:12px; line-height:1.45; pointer-events:none; box-shadow:0 5px 16px rgba(0,0,0,.22); }
    @media (max-width: 900px) { .holding-change-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
    .peer-panel { grid-column: 1 / -1; }
    .peer-current { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 18px; padding: 11px 0; margin-bottom: 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
    .peer-current-main { min-width: 0; display: grid; gap: 3px; }
    .peer-current-main span, .peer-current-stat span { color: var(--muted); font-size: 12px; }
    .peer-current-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .peer-current-main small { color: var(--muted); font-size: 12px; }
    .peer-current-stat { min-width: 108px; display: grid; gap: 3px; padding-left: 18px; border-left: 1px solid var(--line-soft); }
    .peer-current-stat strong { font-size: 16px; font-variant-numeric: tabular-nums; }
    .peer-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
    .peer-board-head strong { font-size: 12px; }
    .peer-board-head span { color: var(--muted); font-size: 12px; }
    .peer-tabs { display: flex; gap: 5px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: thin; }
    .peer-tab { min-width: 64px; height: 30px; padding: 0 11px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--muted); font-size: 12px; }
    .peer-tab:hover, .peer-tab.active { border-color: var(--line-strong); background: var(--blue-soft); color: var(--text); }
    .peer-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line-soft); }
    .peer-row { min-width: 0; min-height: 88px; padding: 12px; border: 0; border-right: 1px solid var(--line-soft); background: var(--panel); color: var(--text); text-align: left; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 5px 8px; align-content: center; }
    .peer-row:last-child { border-right: 0; }
    .peer-row:hover { background: var(--panel-2); }
    .peer-rank { grid-row: 1 / 3; width: 24px; height: 24px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
    .peer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 620; }
    .peer-meta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
    .peer-return { font-size: 13px; font-weight: 680; font-variant-numeric: tabular-nums; }
    .manager-card { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
    .manager-card:last-child { border-bottom: 0; padding-bottom: 0; }
    .manager-head { display: flex; justify-content: space-between; gap: 10px; }
    .manager-head strong { font-size: 14px; }
    .manager-head span { color: var(--amber); font-size: 12px; }
    .manager-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
    .manager-scores { margin-top: 9px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
    .manager-score { padding: 6px 4px; background: var(--panel); text-align: center; }
    .manager-score span { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .manager-score strong { display: block; margin-top: 2px; font-size: 12px; }
    .detail-note { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
    .detail-empty { color: var(--muted); font-size: 12px; padding: 16px 0; }
    .metric-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
    .metric-row span { color: var(--muted); }
    .metric-row strong { font-variant-numeric: tabular-nums; }
    .help-label { min-width: 0; display: inline-flex; align-items: center; gap: 5px; }
    .help-tip {
      width: 16px; height: 16px; padding: 0; flex: 0 0 16px;
      border: 1px solid var(--line-strong); border-radius: 50%; background: transparent;
      color: var(--blue); display: inline-grid; place-items: center;
      font: 650 10px/1 Georgia, serif; vertical-align: middle;
    }
    .help-tip:hover, .help-tip:focus-visible, .help-tip[aria-expanded="true"] {
      border-color: var(--blue); background: var(--blue-soft); color: var(--blue); outline: none;
    }
    .help-popover {
      position: fixed; z-index: 100; display: none;
      width: min(330px, calc(100vw - 24px)); padding: 11px 13px;
      border: 1px solid var(--line-strong); border-radius: var(--radius);
      background: var(--panel-2); color: var(--text);
      box-shadow: 0 12px 32px rgba(0,0,0,.42);
      font-size: 12px; line-height: 1.65; text-align: left;
      pointer-events: none;
    }
    .help-popover.show { display: block; }
    .backtest-guide { margin: 0 0 20px; border: 1px solid var(--line); background: var(--panel-3); }
    .backtest-guide summary { min-height: 44px; padding: 0 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 650; list-style: none; }
    .backtest-guide summary::-webkit-details-marker { display: none; }
    .backtest-guide summary::after { content: "+"; color: var(--blue); font-size: 20px; font-weight: 400; }
    .backtest-guide[open] summary::after { content: "−"; }
    .guide-body { padding: 0 14px 16px; border-top: 1px solid var(--line-soft); }
    .guide-flow { margin: 14px 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
    .guide-step { min-height: 72px; padding: 11px; border-right: 1px solid var(--line); }
    .guide-step:last-child { border-right: 0; }
    .guide-step b { display: block; color: var(--blue); font-size: 12px; }
    .guide-step span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
    .guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
    .guide-grid p { margin: 7px 0; color: var(--muted); font-size: 12px; }
    .guide-grid strong { color: var(--text); }
    .quality-banner { margin: 16px 0; padding: 13px 15px; border-left: 3px solid var(--amber); background: var(--panel-2); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .quality-banner.good { border-left-color: var(--green); background: var(--green-soft); }
    .quality-banner.bad { border-left-color: var(--red); background: var(--red-soft); }
    .quality-banner strong { font-size: 14px; }
    .quality-banner span { color: var(--muted); font-size: 12px; text-align: right; }
    .discover-tabs { display: inline-flex; margin-bottom: 18px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); }
    .discover-tabs button { min-width: 110px; height: 34px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
    .discover-tabs button.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
    .discover-panel { display: none; }
    .discover-panel.active { display: block; }
    .discover-tools { display: flex; align-items: end; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
    .discover-tools .field.grow { flex: 1 1 360px; }
    .discover-panel .status-line { margin: 0 0 14px; }
    .result-list { margin-top: 8px; border-top: 1px solid var(--line); }
    .result-row { min-height: 62px; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(120px, auto) auto; align-items: center; gap: 14px; padding: 8px 4px; }
    .result-row .code { color: var(--blue); font-family: Consolas, monospace; }
    .result-main { min-width: 0; }
    .result-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .result-main span, .result-meta { color: var(--muted); font-size: 12px; }
    .result-meta { text-align: right; }
    .result-row button { border: 0; background: transparent; color: var(--green); padding: 7px; }
    .row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
    .row-actions strong { min-width: 72px; margin-right: 4px; text-align: right; }
    .row-actions button { min-width: 42px; border-radius: 4px; }
    .row-actions button:hover { background: var(--panel-2); }
    .row-actions .action-add { border: 1px solid var(--green); background: var(--green-soft); }
    .filter-bar { margin: 8px 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .filter-bar input { width: min(320px, 100%); height: 34px; }
    .filter-bar span { color: var(--muted); font-size: 12px; }
    [hidden]:not([hidden="until-found"]) { display: none !important; }
    .loading { position: relative; opacity: .65; }
    .loading > * { pointer-events: none; }
    .loading > [id$="-cancel"] { pointer-events: auto; position: relative; z-index: 2; opacity: 1; }
    .loading::after { content: ""; position: absolute; right: 10px; top: 10px; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .toast { position: fixed; right: 22px; bottom: 22px; max-width: 420px; padding: 12px 15px; border: 1px solid var(--red); border-radius: var(--radius); background: var(--red-soft); color: var(--red); z-index: 50; display: none; }
    .toast button { margin-left: 14px; border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
    .toolbar-disclosure { position: relative; }
    .toolbar-disclosure > summary { list-style: none; }
    .toolbar-disclosure > summary::-webkit-details-marker { display: none; }
    /* R26-W01：原来是 width:min(680px,82vw) + right:0 的宽面板，工具条换行后
       触发器在左侧，弹层整体跑到屏幕外（left=-292px，宽 680px）。改为贴近触发
       器的窄操作列表，左右边界与最大高度由 placeDisclosure() 按真实包围盒夹取。 */
    .toolbar-disclosure-content { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: auto; width: min(272px, calc(100vw - 24px)); max-height: min(60vh, 520px); display: grid; grid-template-columns: 1fr; align-content: start; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-solid, #fff); box-shadow: 0 18px 40px rgba(0,0,0,.16); overflow: auto; overscroll-behavior: contain; }
    .toolbar-disclosure-content > .btn { width: 100%; min-height: 36px; justify-content: flex-start; text-align: left; white-space: normal; }
    @media (max-width: 620px) {
      .toolbar-disclosure-content { width: calc(100vw - 24px); }
      .toolbar-disclosure-content > .btn { min-height: 44px; }
    }
    .toolbar-disclosure:not([open]) > .toolbar-disclosure-content { display: none; }
    .portfolio-tools .btn { min-height: 40px; height: auto; white-space: normal; line-height: 1.3; }
    .toast.show { display: block; }

    @media (max-width: 1240px) {
      .estimate-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
      .summary-band { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
      .summary-main { grid-column: 1 / -1; }
      .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    @media (max-width: 1060px) {
      .market-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .kpi-grid { grid-template-columns: repeat(3, 1fr); }
      .summary-band { grid-template-columns: 1.4fr repeat(2, 1fr); }
      .summary-band .metric:last-child { grid-column: 2 / 4; }
      .two-col, .discover-grid { grid-template-columns: 1fr; }
      .detail-grid { grid-template-columns: 1fr; }
      .guide-flow { grid-template-columns: 1fr 1fr; }
      .guide-step:nth-child(2) { border-right: 0; }
      .guide-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    }
    @media (max-width: 900px) {
      html, body { max-width: 100%; overflow-x: hidden; }
      .app { display: block; }
      .sidebar { position: static; width: 100%; height: auto; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); gap: 12px; }
      .brand span, .sidebar-foot { display: none; }
      .nav { display: flex; overflow-x: auto; scrollbar-width: thin; padding-bottom: 3px; }
      .nav button { width: auto; min-width: max-content; }
      .topbar { position: static; padding: 12px 16px; align-items: flex-start; flex-direction: column; gap: 7px; }
      .top-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
      .session { white-space: normal; }
      .main, .content, .view, .toolbar, .estimate-layout, .fund-list, .detail { min-width: 0; max-width: 100%; }
      .content { width: 100%; padding: 18px 16px 34px; }
      .status-line { white-space: normal; word-break: break-all; }
      .market-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
      .market-actions { justify-content: flex-start; }
      .market-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .market-list { grid-template-columns: 1fr; }
      .market-detail-head { min-height: 0; padding: 15px; flex-direction: column; gap: 12px; }
      .market-detail-quote { width: 100%; justify-content: space-between; text-align: left; }
      .market-chart { min-height: 220px; padding: 10px 10px 2px; }
      .market-detail-canvas { height: 200px; }
      .market-detail-meta { padding: 9px 15px 12px; }
      .detail-hero-head { flex-direction: column; }
      .detail-flags { max-width: 100%; text-align: left; }
      .detail-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .peer-list { grid-template-columns: 1fr 1fr; }
      .peer-row { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
      .peer-row:nth-child(even) { border-right: 0; }
      .peer-row:last-child { border-bottom: 0; }
      .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 88px 40px; width: 100%; }
      .toolbar .field { min-width: 0; width: 100%; }
      .toolbar .field.grow { grid-column: 1 / -1; }
      .toolbar input:not([type="checkbox"]), .toolbar select { min-width: 0; width: 100%; }
      .toolbar .btn { padding-left: 10px; padding-right: 10px; }
      #estimate-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
      #add-code-btn { grid-column: 1; }
      #estimate-toolbar .field:nth-child(3) { grid-column: 2 / -1; }
      #estimate-btn { grid-column: 1 / 3; }
      #refresh-btn { grid-column: 3; }
      #estimate-export { grid-column: 1; }
      #estimate-toolbar .toggle-row { grid-column: 2 / -1; }
      #estimate-toolbar .field:last-child { grid-column: 1 / -1; }
      #history-toolbar, #backtest-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
      #detail-toolbar { grid-template-columns: minmax(0, 1fr) minmax(120px, auto); }
      #detail-toolbar .field { grid-column: 1 / -1; }
      #detail-toolbar .btn { min-height: 44px; white-space: normal; }
      #detail-compare-btn { grid-column: 1 / -1; width: 100%; }
      #history-toolbar .btn.secondary, #backtest-toolbar .btn.secondary { grid-column: 1 / -1; }
      #accuracy-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
      #search-toolbar { grid-template-columns: 1fr; }
      #rank-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
      #rank-toolbar .btn { grid-column: 1 / -1; width: 100%; }
      .portfolio-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .portfolio-stat:last-child { grid-column: auto; }
      .estimate-layout { grid-template-columns: 1fr; }
      .list-pane { position: static; }
      .fund-list { max-height: 390px; }
      .fund-list { grid-template-columns: minmax(0, 1fr); }
      .fund-item .number { justify-self: end; }
      .summary-band { grid-template-columns: 1fr 1fr; }
      .summary-main { grid-column: 1 / -1; }
      .summary-band .metric:last-child { grid-column: auto; }
      .kpi-grid { grid-template-columns: repeat(2, 1fr); }
      .parts { grid-template-columns: 1fr; }
      .guide-grid { grid-template-columns: 1fr; }
      .quality-banner { align-items: flex-start; flex-direction: column; gap: 5px; }
      .quality-banner span { text-align: left; }
      .section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
      .section-head span { max-width: 100%; overflow-wrap: anywhere; }
      .metric-row { align-items: flex-start; }
      .metric-row > span, .metric-row > .help-label { flex: 1 1 auto; overflow-wrap: anywhere; }
      .metric-row > strong { flex: 0 0 auto; text-align: right; }
      .discover-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
      .discover-tools .field.grow { grid-column: 1 / -1; }
      .discover-tools .btn { width: 100%; }
      .result-row { grid-template-columns: 74px minmax(0, 1fr); padding: 7px 0; }
      .result-meta { grid-column: 2; text-align: left; }
      .result-row > .row-actions { grid-column: 2; justify-self: end; }
      .row-actions { flex-wrap: wrap; }
    }
    @media (max-width: 430px) {
      .session { font-size: 12px; }
      .summary-band { grid-template-columns: 1fr; }
      .kpi-grid { grid-template-columns: 1fr 1fr; }
      .metric .value { font-size: 23px; }
      .guide-flow { grid-template-columns: 1fr; }
      .detail-hero-head { flex-direction: column; }
      .detail-kpis { grid-template-columns: 1fr 1fr; }
      .peer-list { grid-template-columns: 1fr; }
      .peer-row, .peer-row:nth-child(even) { min-height: 70px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
      .peer-current { grid-template-columns: 1fr 1fr; gap: 10px 0; }
      .peer-current-main { grid-column: 1 / -1; padding-bottom: 8px; }
      .peer-current-stat { min-width: 0; padding-left: 0; border-left: 0; }
      .peer-current-stat + .peer-current-stat { padding-left: 12px; border-left: 1px solid var(--line-soft); }
      .peer-board-head { align-items: flex-start; flex-direction: column; gap: 3px; }
      .detail-panel { padding: 13px; overflow: hidden; }
      .detail-table-wrap { overflow-x: auto; }
      .manager-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .guide-step { border-right: 0; border-bottom: 1px solid var(--line); }
      .guide-step:last-child { border-bottom: 0; }
      .discover-tabs { display: flex; }
      .discover-tabs button { flex: 1; min-width: 0; }
      .discover-tools { grid-template-columns: 1fr; }
      .discover-tools .field.grow { grid-column: auto; }
      .market-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
      .market-auto { grid-column: 1 / -1; }
      .market-interval select { width: 100%; }
      .market-detail-quote { align-items: flex-start; flex-direction: column; gap: 5px; }
      .market-detail-value { text-align: left; }
      .market-detail-price { font-size: 25px; }
      .market-chart { min-height: 190px; }
      .market-detail-canvas { height: 168px; }
      .filter-bar { align-items: stretch; flex-direction: column; gap: 6px; }
      .filter-bar input { width: 100%; }
      .result-row { grid-template-columns: 68px minmax(0, 1fr); gap: 8px; }
      .result-row > .row-actions { grid-column: 1 / -1; width: 100%; justify-content: flex-end; }
    }

    /* Unified workstation visual system */
    html { scrollbar-color: var(--line) transparent; }
    body { background: var(--bg); font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
    ::selection { background: var(--blue-soft); color: var(--text); }
    button, input, select { transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
    button:focus-visible,
    input[type="checkbox"]:focus-visible,
    input[type="radio"]:focus-visible {
      outline: 2px solid rgba(114,175,255,.75);
      outline-offset: 2px;
    }
    input:not([type="checkbox"]):not([type="radio"]):focus-visible,
    select:focus-visible {
      outline: none;
      border-color: var(--blue);
      box-shadow: none;
    }
    .sidebar {
      padding: 26px 16px 20px; gap: 28px; border-right-color: var(--line);
      background: var(--panel); box-shadow: inset -1px 0 0 rgba(255,255,255,.015);
    }
    .brand { min-height: 42px; padding: 0 8px; display: flex; align-items: center; gap: 11px; }
    .brand-mark { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--green); border-radius: 8px; background: var(--green-soft); color: var(--green); display: grid !important; place-items: center; font-size: 18px !important; font-weight: 760; }
    .brand-copy { min-width: 0; }
    .brand strong { font-size: 20px; line-height: 1.05; }
    .brand span:not(.brand-mark) { margin-top: 6px; color: var(--muted); font-size: 12px; }
    .nav { gap: 6px; }
    .nav button { position: relative; min-height: 46px; padding: 0 12px; border-radius: 7px; font-size: 13px; }
    .nav button::before { content: ""; position: absolute; left: -1px; top: 12px; width: 2px; height: 22px; border-radius: 2px; background: transparent; }
    .nav button:hover { background: var(--panel-2); }
    .nav button.active { border-color: var(--line); background: var(--panel-2); box-shadow: 0 5px 18px rgba(0,0,0,.14); }
    .nav button.active::before { background: var(--green); }
    .nav-icon { width: 27px; height: 27px; border-color: var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--panel); }
    .nav button.active .nav-icon { border-color: var(--line-strong); background: var(--green-soft); color: var(--green); }
    .nav-count { border: 1px solid var(--green); background: var(--green-soft); }
    .sidebar-foot { padding: 14px 8px 0; border-top-color: var(--line); color: var(--muted); line-height: 1.65; }
    .topbar { min-height: 76px; padding: 13px 32px; border-bottom-color: var(--line); background: var(--panel); box-shadow: 0 8px 28px rgba(0,0,0,.15); backdrop-filter: blur(14px); }
    .page-title h1 { font-size: 20px; font-weight: 720; }
    .page-title p { margin-top: 3px; color: var(--muted); font-size: 12px; }
    .top-actions { gap: 10px; }
    .session { min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: var(--radius); background: var(--panel); font-size: 12px; }
    .top-toggle { min-height: 34px; border-color: var(--line); background: var(--panel-2); }
    .cache-btn { height: 34px; border-color: var(--line); background: var(--panel-2); }
    .content { max-width: 1600px; padding: 28px 32px 52px; }
    .view > .toolbar, .discover-tools {
      margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
      box-shadow: 0 8px 26px rgba(0,0,0,.11);
    }
    .view.active { animation: view-in .18s ease-out; }
    @keyframes view-in { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
    .field { gap: 7px; }
    label { color: var(--muted); font-size: 12px; font-weight: 560; }
    input, select { height: 42px; border-color: var(--line); background: var(--panel-2); }
    input:hover, select:hover { border-color: var(--line-strong); }
    input:not([type="checkbox"]):not([type="radio"]):focus,
    select:focus {
      border-color: var(--blue);
      background: var(--panel-2);
      box-shadow: none;
    }
    input::placeholder { color: var(--muted); }
    .btn { height: 42px; border-color: var(--line); background: var(--panel-2); }
    .btn:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .btn:active { transform: translateY(1px); }
    .btn.primary { border-color: var(--green); background: var(--green); color: var(--text); box-shadow: 0 7px 18px rgba(40,157,125,.15); }
    .btn.primary:hover { border-color: var(--green); background: var(--green); }
    .btn.secondary { background: var(--panel); }
    .btn.icon { font-size: 20px; }
    .top-actions .cache-btn { height: 34px; }
    .status-line, .market-status { margin-top: 0; color: var(--blue); }
    .code-queue { margin: 0 0 14px; padding: 13px 15px; border-color: var(--line); border-radius: var(--radius); background: var(--panel); }
    .queue-head { margin-bottom: 10px; }
    .code-chip { min-height: 30px; border-color: var(--line); background: var(--panel-2); }
    .portfolio-strip, .market-overview { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
    .portfolio-stat, .market-overview-item { background: var(--panel); }
    .estimate-layout { grid-template-columns: 304px minmax(0, 1fr); gap: 24px; }
    .list-pane { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
    .list-pane-head { min-height: 31px; }
    .fund-list { gap: 8px; padding: 10px 0 0; }
    .fund-item { min-height: 82px; border-color: var(--line); background: var(--panel-2); }
    .fund-item:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .fund-item.active { border-color: var(--line-strong); background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green), 0 8px 24px rgba(0,0,0,.13); }
    .summary-band { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 10px 32px rgba(0,0,0,.12); }
    .summary-main h2 { font-size: 22px; }
    .metric .value { font-size: 28px; }
    .kpi-grid { gap: 11px; }
    .kpi { min-height: 96px; padding: 15px; border-color: var(--line); background: var(--panel-2); }
    .kpi:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .section { margin-top: 28px; }
    .section-head { margin-bottom: 12px; }
    .section-head h3 { font-size: 15px; }
    .table-wrap, .metric-list, .result-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
    .table-wrap, .metric-list { border-top: 1px solid var(--line); }
    th, td { padding: 12px 13px; }
    th { background: var(--panel); color: var(--muted); }
    tbody tr:hover { background: var(--panel-2); }
    tbody tr:last-child td { border-bottom: 0; }
    .parts { overflow: hidden; border-color: var(--line); border-radius: var(--radius); background: var(--line); }
    .part { background: var(--panel); }
    .empty { min-height: 176px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel); color: var(--muted); }
    .chart-shell { overflow: hidden; padding: 16px 12px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
    .detail-hero { padding: 22px; border-color: var(--line); border-top: 2px solid var(--blue); background: var(--panel); box-shadow: 0 12px 34px rgba(0,0,0,.13); }
    .detail-eyebrow, .market-toolbar-title span { color: var(--blue); font-weight: 700; }
    .detail-kpis { overflow: hidden; border-color: var(--line); border-radius: 5px; background: var(--line); }
    .detail-kpi { background: var(--panel); }
    .detail-grid { gap: 16px; }
    .detail-panel, .detail-nav-panel { border-color: var(--line); background: var(--panel); box-shadow: 0 8px 26px rgba(0,0,0,.09); }
    .detail-nav-panel { padding: 18px; }
    .detail-range, .peer-tab { border-color: var(--line); background: var(--panel-2); }
    .detail-range:hover, .detail-range.active, .peer-tab:hover, .peer-tab.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
    .manager-score { border-radius: 4px; background: var(--panel-2); }
    .peer-list { overflow: hidden; border-color: var(--line); border-radius: 5px; }
    .peer-row { background: var(--panel); }
    .peer-row:hover { background: var(--panel-2); }
    .peer-rank { background: var(--blue-soft); }
    .backtest-guide { overflow: hidden; border-color: var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 26px rgba(0,0,0,.09); }
    .backtest-guide summary { min-height: 50px; padding: 0 16px; }
    .guide-body { padding: 0 16px 18px; }
    .guide-flow { overflow: hidden; border-color: var(--line); border-radius: 5px; background: var(--panel-2); }
    .guide-step { border-color: var(--line); }
    .quality-banner { border-radius: 0 var(--radius) var(--radius) 0; }
    .discover-tabs { margin-bottom: 16px; padding: 4px; border-color: var(--line); background: var(--panel); }
    .discover-tabs button { min-width: 126px; height: 38px; }
    .discover-tabs button.active { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
    .discover-panel .status-line { margin-bottom: 12px; }
    .result-list { margin-top: 0; border-top: 1px solid var(--line); }
    .result-row { min-height: 68px; padding: 9px 14px; }
    .result-row:hover { background: var(--panel-2); }
    .result-row .code { font-weight: 650; }
    .row-actions { gap: 5px; }
    .row-actions button { min-width: 36px; height: 34px; border: 1px solid transparent; color: var(--blue); }
    .row-actions button:not(.action-toggle) { padding: 0 9px; }
    .row-actions button:hover { border-color: var(--line); background: var(--panel-2); }
    .row-actions .action-toggle { width: 36px; min-width: 36px; padding: 0; border-color: var(--green); background: var(--green-soft); font-size: 17px; }
    .row-actions .action-toggle.is-added { border-color: var(--red); background: var(--red-soft); color: var(--red); }
    .row-actions .action-toggle.is-added:hover { border-color: var(--red); background: var(--red-soft); }
    .filter-bar { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
    .market-toolbar { min-height: 70px; padding: 4px 0 18px; }
    .market-toolbar-title h2 { font-size: 21px; }
    .market-detail { border-color: var(--line); background: var(--panel); box-shadow: 0 12px 34px rgba(0,0,0,.12); }
    .market-row { min-height: 150px; border-color: var(--line); background: var(--panel); }
    .market-row:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .market-row.active { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 2px 0 var(--blue), 0 9px 26px rgba(0,0,0,.12); }
    .market-group { margin-top: 13px; color: var(--muted); }
    .metric-row { padding: 14px; }
    .toast { box-shadow: 0 16px 38px rgba(0,0,0,.32); }

    .insight-strip, .discover-summary {
      overflow: hidden; margin: 0 0 16px; border: 1px solid var(--line);
      border-radius: var(--radius); background: var(--panel-3);
      display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .insight-item, .discover-stat {
      min-width: 0; min-height: 72px; padding: 12px 14px;
      border-right: 1px solid var(--line-soft); display: flex;
      flex-direction: column; justify-content: center;
    }
    .insight-item:last-child, .discover-stat:last-child { border-right: 0; }
    .insight-item span, .discover-stat span { color: var(--muted); font-size: 12px; }
    .insight-item strong, .discover-stat strong {
      overflow-wrap: anywhere; margin-top: 5px; font-size: 18px;
      font-weight: 680; font-variant-numeric: tabular-nums;
    }
    .insight-item small, .discover-stat small { margin-top: 2px; color: var(--muted); font-size: 12px; }

    .detail-overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; margin-bottom: 16px; }
    .structure-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); }
    .allocation-stack { overflow: hidden; height: 10px; margin: 18px 0 10px; border-radius: 2px; background: var(--line); display: flex; }
    .allocation-stack span { display: block; min-width: 0; height: 100%; }
    .allocation-stock { background: var(--red); }
    .allocation-bond { background: var(--amber); }
    .allocation-cash { background: var(--blue); }
    .allocation-other { background: var(--muted); }
    .allocation-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
    .allocation-legend div, .market-weight-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
    .allocation-legend i { width: 7px; height: 7px; margin-right: 6px; border-radius: 1px; display: inline-block; }
    .allocation-legend strong, .market-weight-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
    .market-weight-list { display: grid; gap: 10px; margin-top: 14px; }
    .market-weight-track { overflow: hidden; height: 5px; margin-top: 4px; border-radius: 2px; background: var(--line); }
    .market-weight-fill { height: 100%; background: var(--blue); }
    .structure-panel > .insight-strip {
      margin: 2px 0 14px; border-width: 1px 0; border-radius: 0;
      grid-template-columns: repeat(3, minmax(0, 1fr)); background: transparent;
    }

    .history-chart-panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); }
    .history-chart-panel .chart-shell { border: 0; padding: 4px 0 0; background: transparent; }
    .history-note { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
    .chart-line.return { stroke: var(--red); }
    .chart-line.drawdown { stroke: var(--green); }
    .chart-area.return { fill: rgba(240,91,98,.08); }
    .chart-area.drawdown { fill: rgba(63,193,143,.08); }
    .history-extremes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .history-extreme { padding: 13px; border: 1px solid var(--line-soft); border-radius: 5px; background: var(--panel); }
    .history-extreme span { display: block; color: var(--muted); font-size: 12px; }
    .history-extreme strong { display: block; margin-top: 5px; font-size: 18px; }
    .history-extreme small { color: var(--muted); font-size: 12px; }

    .search-result {
      min-height: 76px; margin-bottom: 8px; padding: 11px 13px;
      border: 1px solid var(--line); border-radius: var(--radius);
      background: var(--panel-3); display: grid;
      grid-template-columns: 92px minmax(0, 1fr) minmax(170px, auto) auto;
      align-items: center; gap: 14px;
    }
    .search-result:hover { border-color: var(--line-strong); background: var(--panel-2); }
    .search-type { display: inline-flex; width: max-content; margin-top: 5px; padding: 2px 6px; border-radius: 3px; background: var(--green-soft); color: var(--green); font-size: 12px; }
    .match-type { display: inline-flex; width: max-content; margin-left: 5px; padding: 2px 6px; border: 1px solid var(--amber); border-radius: 3px; color: var(--amber); font-size: 12px; }
    .trade-state { color: var(--green); font-size: 12px; }
    .trade-state.closed { color: var(--muted); }

    .rank-head, .rank-row {
      display: grid; grid-template-columns: 54px minmax(210px, 1.5fr) 88px 88px 88px 88px minmax(178px, auto);
      align-items: center; gap: 10px;
    }
    .rank-head { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--panel-2); color: var(--muted); font-size: 12px; }
    .rank-row { min-height: 70px; padding: 9px 12px; border: 1px solid var(--line); border-top: 0; background: var(--panel-3); }
    .rank-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
    .rank-row:hover { background: var(--panel-2); }
    .rank-position { color: var(--muted); font: 650 12px Consolas, monospace; }
    .rank-position.top { color: var(--amber); }
    .rank-fund { min-width: 0; }
    .rank-fund strong { display:block; white-space:normal; overflow-wrap:anywhere; font-size:13px; }
    .rank-fund span { color: var(--muted); font-size: 12px; }
    .rank-value { text-align: right; font-variant-numeric: tabular-nums; }
    .rank-value.primary { font-size: 15px; font-weight: 700; }

    .accuracy-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, .72fr); gap: 16px; margin-bottom: 18px; }
    .accuracy-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-3); }
    .accuracy-chart svg { width: 100%; height: auto; display: block; }
    .accuracy-error-line { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
    .accuracy-error-dot { fill: var(--amber); stroke: var(--panel-3); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
    .accuracy-table .fund-cell strong { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .accuracy-table .fund-cell small, .accuracy-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
    .table-wrap { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
    .accuracy-panel .table-wrap table { min-width: 560px; }
    .accuracy-table table { min-width: 720px; }
    .accuracy-status { display: inline-flex; min-width: 64px; justify-content: center; padding: 3px 7px; border: 1px solid var(--green); border-radius: 3px; color: var(--green); font-size: 12px; }
    .accuracy-status.pending { border-color: var(--amber); color: var(--amber); }
    .accuracy-method-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

    @media (max-width: 1100px) {
      .insight-strip, .discover-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .insight-item:nth-child(3), .discover-stat:nth-child(3) { border-right: 0; }
      .detail-overview-grid { grid-template-columns: 1fr; }
      .accuracy-layout { grid-template-columns: 1fr; }
      .rank-head { display: none; }
      .rank-row { grid-template-columns: 42px minmax(180px, 1fr) repeat(3, 78px) minmax(170px, auto); border-top: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
      .rank-row .rank-hide-medium { display: none; }
    }

    @media (max-width: 1240px) {
      :root { --sidebar: 220px; }
      .content { padding-left: 24px; padding-right: 24px; }
      .estimate-layout { grid-template-columns: 270px minmax(0, 1fr); }
    }
    @media (max-width: 900px) {
      .sidebar { padding: 12px 14px 10px; gap: 11px; }
      .brand { min-height: 36px; padding: 0 2px; }
      .brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 15px !important; }
      .brand strong { font-size: 18px; }
      .brand span:not(.brand-mark) { display: none; }
      .nav { gap: 3px; overflow: visible; scrollbar-width: none; -ms-overflow-style: none; }
      .nav::-webkit-scrollbar { display: none; }
      .nav button { min-height: 40px; padding: 0 6px; gap: 6px; }
      .nav button::before { display: none; }
      .nav-icon { width: 24px; height: 24px; }
      .nav > button .nav-count { display: none; }
      .nav > .nav-group { display: none; }
      .mobile-nav-more { display: block; position: relative; flex: 0 0 auto; }
      .mobile-nav-more > summary { min-height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); cursor: pointer; list-style: none; font-size: 13px; }
      .mobile-nav-more > summary::-webkit-details-marker { display: none; }
      .mobile-nav-more:has(button.active) > summary, .mobile-nav-more[open] > summary { border-color: var(--line); background: var(--panel-2); color: var(--text); }
      .mobile-nav-more:not([open]) > .mobile-nav-menu { display: none; }
      .mobile-nav-more[open] > .mobile-nav-menu { display: block; }
      .mobile-nav-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 190px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 18px 40px rgba(0,0,0,.42); }
      .mobile-nav-menu .nav-group { padding: 8px 8px 3px; }
      .mobile-nav-menu button { display: flex !important; width: 100% !important; min-height: 42px; }
      .fund-research-tabs { align-items: stretch; flex-direction: column; gap: 9px; }
      .fund-research-tabs > div { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
      .fund-research-tabs button { min-width: 0; padding: 0 6px; }
      .topbar { padding: 13px 16px; }
      .top-actions { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 8px; }
      .top-actions .session { grid-column: 1 / -1; width: 100%; }
      .content { padding: 18px 14px 38px; }
      .estimate-layout { grid-template-columns: minmax(0, 1fr); }
      .estimate-layout > *, .detail { min-width: 0; width: 100%; }
      .portfolio-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
      .portfolio-tools .field { min-width: 0; }
      .portfolio-tools .btn { width: 100%; }
      .view > .toolbar, .discover-tools { padding: 13px; }
      .list-pane { padding: 12px; }
      .summary-band { padding: 16px; }
      .detail-hero, .detail-nav-panel { padding: 15px; }
      .result-row { padding: 10px; }
      .row-actions button:not(.action-toggle) { padding: 0 8px; }
      .insight-strip, .discover-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .insight-item, .discover-stat { min-height: 64px; }
      .insight-item:nth-child(3), .discover-stat:nth-child(3) { border-right: 1px solid var(--line-soft); }
      .insight-item:nth-child(even), .discover-stat:nth-child(even) { border-right: 0; }
      .search-result { grid-template-columns: 76px minmax(0, 1fr); gap: 8px 10px; }
      .search-result .result-meta { grid-column: 2; text-align: left; }
      .search-result .row-actions { grid-column: 1 / -1; justify-self: end; }
      .rank-row { grid-template-columns: 36px minmax(0, 1fr) 78px; gap: 8px; }
      .rank-row .rank-hide-mobile { display: none; }
      .rank-row .row-actions { grid-column: 2 / -1; justify-self: end; }
      .history-extremes { grid-template-columns: 1fr; }
      .allocation-legend { grid-template-columns: 1fr 1fr; }
      .accuracy-panel { padding: 14px; }
      .structure-panel > .insight-strip { grid-template-columns: 1fr; }
      .structure-panel > .insight-strip .insight-item { border-right: 0; border-bottom: 1px solid var(--line-soft); }
      .structure-panel > .insight-strip .insight-item:last-child { border-bottom: 0; }
    }
    @media (max-width: 430px) {
      .portfolio-tools { grid-template-columns: minmax(0, 1fr); }
      #accuracy-toolbar { grid-template-columns: minmax(0, 1fr); }
      #accuracy-toolbar .field,
      #accuracy-toolbar .field.grow,
      #accuracy-toolbar .btn { grid-column: 1; width: 100%; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    }
[hidden]:not([hidden="until-found"]) { display: none !important; }
#opportunity-refresh { font-size: 16px; line-height: .8; }
.skip-link {
  position: fixed; z-index: 10000; top: 8px; left: 8px;
  padding: 10px 14px; transform: translateY(-160%);
  background: #f5f7f8; color: #111; border: 2px solid #111;
}
.skip-link:focus { transform: translateY(0); }
.nav-group {
  display: block; padding: 12px 10px 3px; color: var(--muted);
  font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.estimate-settings, .search-filter-drawer, .maintenance-panel {
  margin: 12px 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel);
}
.estimate-settings > summary, .search-filter-drawer > summary, .maintenance-panel > summary {
  cursor: pointer; list-style: none; padding: 13px 15px; color: var(--text); font-weight: 700;
}
.estimate-settings > summary::-webkit-details-marker, .search-filter-drawer > summary::-webkit-details-marker, .maintenance-panel > summary::-webkit-details-marker { display: none; }
.estimate-settings > summary::after, .search-filter-drawer > summary::after, .maintenance-panel > summary::after { content: "+"; float: right; color: var(--muted); }
.estimate-settings[open] > summary::after, .search-filter-drawer[open] > summary::after, .maintenance-panel[open] > summary::after { content: "−"; }
.estimate-settings > summary span, .search-filter-drawer > summary span { margin-left: 10px; color: var(--muted); font-size: 12px; font-weight: 400; }
.estimate-settings .portfolio-tools, .search-filter-drawer .discover-tools { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.applied-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 10px 0; color: var(--muted); font-size: 12px; }
.applied-filter-bar button { min-height: 30px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--text); cursor: pointer; }
.maintenance-panel { padding: 0 15px 15px; }
.maintenance-panel > summary { margin: 0 -15px; }
.maintenance-panel p { color: var(--muted); line-height: 1.6; }
.portfolio-target-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 10px 0; }
.portfolio-target-controls > span { color: var(--muted); font-size: 12px; padding-bottom: 10px; }
@media (max-width: 900px) {
  .nav-group { display: none; }
  .estimate-settings > summary span { display: block; margin: 4px 18px 0 0; }
  .fund-profile-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .priority-issue { grid-template-columns: 1fr; gap: 4px; }
}
