:root {
  --max-w: 1200px;
  --page-x: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* 系统字体栈：避免 Google Fonts 在国内超时拖慢首屏 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  --blue-deep: #1d4ed8;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --ink: #0f172a;
  --bg: #f8fafc;
  --bg-glow: radial-gradient(900px 400px at 10% -10%, rgba(37,99,235,0.07), transparent 55%),
             linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #334155;
  --muted: #64748b;
  --dim: #94a3b8;
  --up: #dc2626;
  --down: #16a34a;
  --accent: #2563eb;
  --link: #2563eb;
  --th-bg: rgba(248,250,252,0.96);
  --hover: #f1f5f9;
  --best-bg: rgba(37,99,235,0.06);
  --sticky-bg: #fff;
  --open: #059669;
  --pre: #d97706;
  --closed: #64748b;
  --open-bg: rgba(16,185,129,0.1);
  --pre-bg: rgba(245,158,11,0.12);
  --closed-bg: rgba(148,163,184,0.15);
  --warn: #d97706;
  --warn-bg: rgba(245,158,11,0.12);
  --ok: #059669;
  --ok-bg: rgba(16,185,129,0.1);
  --bad: #dc2626;
  --bad-bg: rgba(220,38,38,0.1);
  --high-bg: rgba(37,99,235,0.06);
  --chart-line: #2563eb;
  --chart-tick: #64748b;
  --brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #38bdf8 100%);
}
[data-theme="dark"] {
  --bg: #0b1120;
  --bg-glow: radial-gradient(800px 360px at 0% -20%, rgba(59,130,246,0.14), transparent 50%),
             linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
  --surface: rgba(15,23,42,0.88);
  --border: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --up: #f87171;
  --down: #4ade80;
  --accent: #60a5fa;
  --link: #93c5fd;
  --th-bg: rgba(11,17,32,0.96);
  --hover: rgba(30,41,59,0.55);
  --best-bg: rgba(96,165,250,0.1);
  --sticky-bg: #0f172a;
  --open: #34d399;
  --pre: #fbbf24;
  --closed: #94a3b8;
  --open-bg: rgba(52,211,153,0.1);
  --pre-bg: rgba(251,191,36,0.12);
  --closed-bg: rgba(100,116,139,0.15);
  --warn: #fbbf24;
  --warn-bg: rgba(251,191,36,0.12);
  --ok: #34d399;
  --ok-bg: rgba(52,211,153,0.1);
  --bad: #f87171;
  --bad-bg: rgba(248,113,113,0.12);
  --high-bg: rgba(96,165,250,0.1);
  --chart-line: #60a5fa;
  --chart-tick: #94a3b8;
  --brand-gradient: linear-gradient(135deg, #60a5fa 0%, #38bdf8 55%, #7dd3fc 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: var(--safe-top);
}
.table-mode-bar {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 8px;
}
#panel-constituents .table-mode-bar { display: flex; }
@media (min-width: 641px) {
  #panel-constituents .table-mode-bar [data-table-mode-toggle] { display: none; }
}
.table-mode-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 36px;
}
.table-mode-btn:hover { color: var(--text); border-color: var(--accent); }
.table-mode-btn[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 14px var(--page-x);
  min-height: 72px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}
.brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  max-width: min(100%, 560px);
}
.brand-mark-btn {
  grid-row: 1 / -1;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; padding: 0; margin: 0;
  cursor: pointer; flex-shrink: 0;
  border-radius: 12px;
}
.brand-mark-btn:hover { opacity: 0.92; }
.brand-mark {
  width: 42px; height: 42px; display: block;
  border-radius: 12px;
}
.brand-title-row {
  grid-column: 2;
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex-wrap: wrap;
}
.brand-name-btn {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: left;
  line-height: 1;
}
.brand-name {
  font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2;
  color: var(--ink);
}
[data-theme="dark"] .brand-name { color: var(--text); }
.brand-name em { font-style: normal; }
.brand-tagline {
  grid-column: 2;
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  color: var(--dim);
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.brand-xhs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #2563eb 10%, transparent);
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.35;
  text-decoration: none;
}
.brand-xhs:hover {
  background: color-mix(in srgb, #2563eb 18%, transparent);
  color: #1d4ed8;
}
html.dark .brand-xhs,
[data-theme="dark"] .brand-xhs {
  background: color-mix(in srgb, #60a5fa 18%, transparent);
  color: #93c5fd;
}
html.dark .brand-xhs:hover,
[data-theme="dark"] .brand-xhs:hover {
  color: #bfdbfe;
  background: color-mix(in srgb, #60a5fa 26%, transparent);
}
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-xhs-full { display: inline; }
.refresh-meta {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--dim); margin-right: 2px;
}
.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn.spinning svg { animation: spin .7s linear infinite; }
.icon-btn svg { width: 15px; height: 15px; }
.theme-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }

.page { flex: 1; width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--page-x) 20px; min-width: 0; overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.panel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 14px 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.panel-meta strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.panel-meta strong.up { color: var(--up); }
.panel-meta strong.down { color: var(--down); }
.panel-meta .sep {
  color: var(--border);
  font-weight: 400;
  user-select: none;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.table-card {
  overflow: hidden; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 0 0 1px rgba(15,23,42,0.02);
}
[data-theme="dark"] .table-card { background: rgba(15,23,42,0.4); box-shadow: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1080px; font-size: 12px; }
th {
  position: sticky; top: 0; z-index: 2; background: var(--th-bg); color: var(--muted);
  font-weight: 500; font-size: 12px; letter-spacing: 0.01em;
  padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border);
  white-space: pre-line; cursor: pointer; user-select: none; line-height: 1.25;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
th[title] { cursor: help; }
th:hover { color: var(--text); }
th.sorted { color: var(--accent); font-weight: 600; }
th.prem-col { background: color-mix(in srgb, var(--accent) 8%, var(--th-bg)); color: var(--accent); }
th.left, td.left { text-align: left; padding-left: 12px; }
th .sort-icon { margin-left: 2px; opacity: 0.35; font-size: 9px; }
th.sorted .sort-icon { opacity: 1; }
td {
  padding: 8px; text-align: center;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  vertical-align: middle; font-variant-numeric: tabular-nums; color: #475569;
  background: transparent; font-family: var(--font-mono); font-size: 12px;
}
[data-theme="dark"] td { color: #cbd5e1; }
td.left, td.name { font-family: var(--font-sans); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--hover); }
tr.best-row td { background: var(--best-bg); }
tr.best-row:hover td { background: color-mix(in srgb, var(--best-bg) 70%, var(--hover)); }
td.prem-col { background: color-mix(in srgb, var(--accent) 4%, transparent); font-weight: 700; font-size: 12px; }
tr:hover td.prem-col { background: color-mix(in srgb, var(--accent) 8%, var(--hover)); }
tr.best-row td.prem-col { background: color-mix(in srgb, var(--accent) 10%, var(--best-bg)); }

.sticky-col { position: sticky; left: 0; z-index: 3; background: var(--sticky-bg); }
th.sticky-col { z-index: 4; background: var(--th-bg); }
tr:hover .sticky-col { background: var(--hover); }
tr.best-row .sticky-col { background: color-mix(in srgb, var(--best-bg) 80%, var(--sticky-bg)); }
.sticky-code { left: 40px; }
.sticky-name { left: 100px; box-shadow: 6px 0 10px -8px rgba(15,23,42,0.14); }
[data-theme="dark"] .sticky-name { box-shadow: 6px 0 10px -8px rgba(0,0,0,0.4); }

.idx { color: var(--dim); width: 40px; font-size: 11px; }
.code { font-size: 11px; color: var(--dim); cursor: pointer; }
.code:hover { color: var(--accent); }
.name { font-weight: 500; color: var(--text); white-space: nowrap; font-size: 13px; }
.best-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); vertical-align: middle;
}
a.link { color: var(--link); text-decoration: none; font-weight: 600; }
a.link:hover { text-decoration: underline; }
.price { font-weight: 600; color: var(--text); border-radius: 4px; }
.up { color: var(--up); font-weight: 500; }
.down { color: var(--down); font-weight: 500; }
.prem { font-weight: 700; }
.prem.up { color: var(--up); }
.prem.down { color: var(--down); }
.dim { color: var(--dim); font-size: 11px; }
.gray { color: var(--muted); }
.gray-est { color: var(--dim); }
.expense { color: var(--dim); font-size: 11px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: #fff; font-size: 12px; padding: 8px 12px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading-row td { padding: 40px; color: var(--dim); text-align: center; font-family: var(--font-sans); }
.spinner {
  display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }


.tabs {
  display: flex; gap: 4px; margin: 16px 0 0;
  padding: 4px; width: fit-content; max-width: 100%;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 7px; padding: 7px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.panel { display: none; }
.panel.active { display: block; }

.status-wrap { margin-top: 16px; }
.status-lead { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.status-meta { margin: 0 0 12px; color: var(--text); font-size: 13px; font-weight: 600; }
.status-table-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.status-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.status-table th, .status-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.status-table tr:last-child td { border-bottom: 0; }
.status-table th { color: var(--muted); font-weight: 600; background: var(--th-bg); }
.status-table td.detail { color: var(--muted); white-space: normal; min-width: 160px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); display: inline-block; }
.status-pill.ok i { background: var(--ok); }
.status-pill.backup i { background: var(--accent); }
.status-pill.estimated i, .status-pill.partial i, .status-pill.stale i { background: var(--warn); }
.status-pill.fail i, .status-pill.missing i { background: var(--up); }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  margin: 14px 0 12px;
}
.filter-seg {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
}
.filter-btn {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 6px; padding: 6px 11px; font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: baseline; gap: 5px;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent); font-weight: 600;
}
.filter-btn .n {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--dim);
}
.filter-btn.active .n { color: var(--accent); }
.toolbar-aside {
  margin-left: auto;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  font-size: 12px; color: var(--muted); min-width: 0;
}
.toolbar-aside strong {
  font-family: var(--font-mono);
  font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
}
.sort-hint { font-size: 11px; color: var(--dim); }

#limitTable { min-width: 1060px; font-size: 12px; border-collapse: separate; border-spacing: 0; width: 100%; }
#limitTable th {
  position: sticky; top: 0; z-index: 2;
  white-space: nowrap; line-height: 1.25;
  padding: 10px 6px;
}
#limitTable th.limit-col {
  background: color-mix(in srgb, var(--accent) 8%, var(--th-bg)); color: var(--accent);
}
#limitTable td {
  padding: 8px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #475569;
}
[data-theme="dark"] #limitTable td { color: #cbd5e1; }
#limitTable td.chg-up, #limitTable td.up { color: var(--up); font-weight: 600; }
#limitTable td.chg-down, #limitTable td.down { color: var(--down); font-weight: 600; }
#limitTable th[data-key="name"],
#limitTable td.name {
  max-width: 12em;
  min-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#limitTable td.left, #limitTable td.name { font-family: var(--font-sans); }
#limitTable td.limit-col {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  font-weight: 700;
  font-size: 12px;
}
#limitTable tr:hover td.limit-col { background: color-mix(in srgb, var(--accent) 8%, var(--hover)); }
#limitTable tr.high-limit td { background: var(--high-bg); }
#limitTable tr.high-limit td.limit-col { background: color-mix(in srgb, var(--accent) 10%, var(--high-bg)); }
#limitTable th[data-key="channel"],
#limitTable td:last-child { padding-right: 12px; }

#constituentsTable { min-width: 720px; font-size: 12px; border-collapse: separate; border-spacing: 0; width: 100%; }
#constituentsTable th { position: sticky; top: 0; z-index: 2; white-space: nowrap; }
#constituentsTable th.weight-col {
  background: color-mix(in srgb, var(--accent) 8%, var(--th-bg)); color: var(--accent);
}
#constituentsTable td {
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 12px; color: #475569;
}
[data-theme="dark"] #constituentsTable td { color: #cbd5e1; }
#constituentsTable td.up { color: var(--up); font-weight: 600; }
#constituentsTable td.down { color: var(--down); font-weight: 600; }
#constituentsTable td.left, #constituentsTable td.name { font-family: var(--font-sans); }
#constituentsTable td.weight-col {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  font-weight: 700; color: var(--accent);
}

.share { font-size: 10px; color: var(--dim); margin-left: 6px; font-weight: 500; }
.buy-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 500;
  line-height: 1.3;
}
.buy-status.open { background: var(--ok-bg); color: var(--ok); }
.buy-status.limit { background: var(--warn-bg); color: var(--warn); }
.buy-status.pause { background: var(--bad-bg); color: var(--bad); }
.buy-status.fail { background: var(--closed-bg); color: var(--dim); }
.limit-amt { font-family: var(--font-mono); font-weight: 700; color: var(--warn); font-size: 12px; }
.limit-amt.high { color: var(--ok); }
.limit-amt.open { color: var(--accent); }
.limit-amt.pause { color: var(--bad); font-weight: 600; }
.fund-nav { font-family: var(--font-mono); color: var(--muted); }
.chg-up { color: var(--up); font-family: var(--font-mono); }
.chg-down { color: var(--down); font-family: var(--font-mono); }

/* —— SEO 正文 / FAQ —— */
.page-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* —— 复盘 —— */
.review-intro {
  margin: 14px 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.review-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 12px;
  text-align: left;
}
.review-card.active-mod {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
.review-card-kicker {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--dim); text-transform: uppercase;
}
.review-card h3 {
  margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--text);
}
.review-card p {
  margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.35;
}
.review-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px 10px;
}
.review-panel-head {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  margin-bottom: 10px;
}
.review-panel-head h2 {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.review-panel-head .hint { font-size: 12px; color: var(--dim); flex: 1 1 auto; }
.review-stats {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-bottom: 8px; font-size: 12px; color: var(--muted);
}
.review-stats strong {
  font-family: var(--font-mono);
  font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
}
.review-stats strong.up { color: var(--up); }
.review-stats strong.down { color: var(--down); }
.review-chart-wrap {
  position: relative;
  height: 320px;
  width: 100%;
}
.review-chart-wrap.sm { height: 220px; margin-top: 8px; }
.review-chart-wrap.dd-brushable {
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
.dd-brush-sel {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-sizing: border-box;
}
.review-brush-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--dim);
}
.review-empty {
  padding: 40px 16px; text-align: center; color: var(--dim); font-size: 13px;
}
.review-empty.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  z-index: 2;
}
.review-empty.overlay[hidden] { display: none !important; }
.review-panel + .review-panel { margin-top: 14px; }
.ath-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.ath-hero-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}
.ath-hero-pct {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
}
.ath-hero-pct.at { color: var(--ok); }
.ath-hero-pct.near { color: var(--text); }
.ath-hero-pct.mid { color: var(--warn); }
.ath-hero-pct.deep { color: var(--down); }
.ath-hero-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ath-bar-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 85%, var(--th-bg));
  overflow: hidden;
}
.ath-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  min-width: 2px;
}
.ath-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--dim);
}
.ath-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ath-kpi {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--th-bg) 55%, var(--surface));
}
.ath-kpi-k {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.ath-kpi-v {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ath-kpi-s {
  margin-top: 3px;
  font-size: 12px;
  color: var(--dim);
}
@media (min-width: 720px) {
  .ath-kpis { grid-template-columns: repeat(3, 1fr); }
}
.premium-hist { margin-top: 14px; }
.review-range-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, var(--th-bg));
}
.review-range-seg button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 5px 9px; border-radius: 6px; line-height: 1.2;
}
.review-range-seg button.active {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent); font-weight: 600;
}
.review-custom-range {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--muted);
}
.review-custom-range input[type="date"] {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 5px 8px;
  min-height: 30px;
  color-scheme: light dark;
}
.review-custom-range input[type="date"]:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.review-custom-range-sep { color: var(--dim); }
.review-custom-range-btn {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 80%, var(--th-bg));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  min-height: 30px;
  cursor: pointer;
}
.review-custom-range-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  color: var(--accent);
}
.review-custom-range-btn.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
}
.review-dd-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.review-dd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.review-dd-table th {
  position: static; text-align: left; font-weight: 600; color: var(--dim);
  padding: 6px 8px; white-space: nowrap; cursor: pointer; user-select: none;
  background: transparent; border-bottom: none; backdrop-filter: none;
}
.review-dd-table th:hover { color: var(--text); }
.review-dd-table th.sorted { color: var(--accent); }
.review-dd-table td {
  padding: 7px 8px; color: var(--text);
  border-top: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.review-dd-table td.mono {
  font-family: var(--font-mono);
}
.review-dd-table td.down { color: var(--down); font-weight: 600; }
.macro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.macro-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px 10px;
}
.macro-card-head {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline;
  margin-bottom: 8px;
}
.macro-card-head h2 {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.macro-card-head .hint { font-size: 12px; color: var(--dim); }
.macro-hero {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
  margin-bottom: 8px;
}
.macro-hero .val {
  font-family: var(--font-mono);
  font-size: 34px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.macro-hero .chg {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.macro-hero .chg.up { color: var(--up); }
.macro-hero .chg.down { color: var(--down); }
.macro-hero .chg.flat { color: var(--dim); }
.macro-status {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
}
.macro-status.calm { color: #0284c7; background: rgba(2,132,199,0.12); }
.macro-status.normal { color: #15803d; background: rgba(21,128,61,0.12); }
.macro-status.warn { color: #b45309; background: rgba(180,83,9,0.12); }
.macro-status.panic { color: #b91c1c; background: rgba(185,28,28,0.12); }
.macro-status.cheap, .macro-status.low { color: #15803d; background: rgba(21,128,61,0.12); }
.macro-status.fair { color: #64748b; background: rgba(100,116,139,0.12); }
.macro-status.high { color: #b45309; background: rgba(180,83,9,0.12); }
.macro-status.rich { color: #b91c1c; background: rgba(185,28,28,0.12); }
.macro-chart-wrap {
  position: relative; height: 160px; width: 100%;
}
.macro-pe-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.macro-pe-row { display: grid; gap: 4px; }
.macro-pe-top {
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
  font-size: 12px; color: var(--muted);
}
.macro-pe-top strong {
  font-family: var(--font-mono);
  font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums;
}
.macro-bar {
  position: relative; height: 10px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, #86efac 0%, #bbf7d0 20%, #cbd5e1 40%, #cbd5e1 60%, #fdba74 80%, #fca5a5 100%);
}
.macro-bar-marker {
  position: absolute; top: -3px; width: 3px; height: 16px;
  background: var(--ink); border-radius: 2px; transform: translateX(-50%);
}
[data-theme="dark"] .macro-bar-marker { background: #e2e8f0; }
.macro-legend {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  margin-top: 8px; font-size: 11px; color: var(--dim);
}
@media (min-width: 720px) {
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .macro-grid { grid-template-columns: 1fr 1fr; }
}

.val-summary {
  display: grid; gap: 10px; margin: 8px 0 16px;
  grid-template-columns: 1fr;
}
.val-card {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 14px 16px;
}
.val-card-label {
  font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px;
}
.val-card-main {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.val-card-val {
  font-family: var(--font-mono);
  font-size: 28px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .val-card-val { color: var(--text); }
.val-card-rows {
  display: grid; gap: 4px; font-size: 12px; color: var(--muted);
}
.val-card-rows div { display: flex; justify-content: space-between; gap: 8px; }
.val-card-rows strong {
  font-family: var(--font-mono);
  font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
}
.val-bar {
  position: relative; height: 6px; border-radius: 999px; margin: 8px 0 4px;
  background: linear-gradient(90deg, rgba(21,128,61,0.25), rgba(100,116,139,0.2), rgba(180,83,9,0.25), rgba(185,28,28,0.3));
}
.val-bar-marker {
  position: absolute; top: -3px; width: 3px; height: 12px; border-radius: 2px;
  background: var(--ink); transform: translateX(-50%);
}
[data-theme="dark"] .val-bar-marker { background: #e2e8f0; }
.val-note {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.val-note strong { color: var(--ink); font-weight: 700; }
[data-theme="dark"] .val-note strong { color: var(--text); }
.val-links {
  display: grid; gap: 8px; grid-template-columns: 1fr;
  margin-top: 16px;
}
.home-tool {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 12px 14px;
  cursor: pointer; text-align: left; font-family: inherit; color: inherit;
  font-size: 13px; font-weight: 600;
}
.home-tool:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.home-tool span { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 4px; }
@media (min-width: 720px) {
  .val-summary { grid-template-columns: repeat(3, 1fr); }
  .val-links { grid-template-columns: repeat(3, 1fr); }
}

/* —— 首页 —— */
.home { margin-top: 14px; display: flex; flex-direction: column; gap: 22px; }
.home-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--closed-bg); color: var(--closed);
}
.home-badge.ok { background: var(--ok-bg); color: var(--ok); }
.home-badge.warn { background: var(--warn-bg); color: var(--warn); }
.home-badge.bad { background: var(--bad-bg); color: var(--bad); }
.home-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.home-desk {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.home-kpis {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}
@media (min-width: 860px) {
  .home-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.home-kpi {
  border: 1px solid var(--border); border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--th-bg));
  padding: 12px 14px; text-align: left; cursor: pointer;
  font-family: inherit; color: inherit;
  min-width: 0; overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.home-kpi:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--surface);
}
.home-kpi-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.home-kpi-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--kpi-icon, #3b82f6);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.home-kpi-icon svg {
  width: 12px; height: 12px;
  display: block;
}
.home-kpi-k {
  font-size: 12px; font-weight: 700; color: var(--muted); margin: 0;
  line-height: 1.2;
}
.home-kpi-spark {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  max-width: 32%;
  height: 30px;
  margin: 0;
  flex-shrink: 0;
  color: var(--spark, var(--accent));
}
.home-kpi-spark.up { color: var(--up); }
.home-kpi-spark.down { color: var(--down); }
.home-kpi-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  min-width: 0;
  overflow: hidden;
}
.home-kpi-meter {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 75%, transparent);
  margin: 0 0 8px;
  overflow: hidden;
}
.home-kpi-meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  max-width: 100%;
}
.home-kpi-meter > i.ok { background: var(--ok); }
.home-kpi-meter > i.warn { background: var(--warn); }
.home-kpi-meter > i.bad { background: var(--bad); }
.home-kpi-meter--mark {
  position: relative;
  overflow: visible;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--ok) 35%, transparent) 0%,
    color-mix(in srgb, var(--warn) 35%, transparent) 45%,
    color-mix(in srgb, var(--bad) 40%, transparent) 100%);
}
.home-kpi-meter--mark > i { background: transparent; }
.home-kpi-meter--mark > b {
  position: absolute;
  top: -3px;
  width: 3px; height: 11px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 80%, transparent);
}
.home-kpi-main {
  display: flex; align-items: baseline; gap: 6px 8px;
  margin-bottom: 0;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  overflow: hidden;
}
.home-kpi-body:has(.home-kpi-spark) .home-kpi-main {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.home-kpi-v {
  font-family: var(--font-mono);
  font-size: clamp(17px, 5vw, 24px); font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1;
  min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-kpi-v.num { font-size: clamp(15px, 4.4vw, 20px); }
[data-theme="dark"] .home-kpi-v { color: var(--text); }
.home-kpi-chg {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--dim); flex: 0 0 auto;
}
.home-kpi-chg.up { color: var(--up); }
.home-kpi-chg.down { color: var(--down); }
.home-kpi-note {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-kpi-rows {
  display: grid; gap: 3px; font-size: 12px; color: var(--muted);
  min-width: 0;
}
.home-kpi-rows div { display: flex; justify-content: space-between; gap: 6px; min-width: 0; }
.home-kpi-rows div > span:first-child { flex-shrink: 0; }
.home-kpi-rows strong {
  font-family: var(--font-mono);
  font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
  text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-kpi-rows strong.up { color: var(--up); }
.home-kpi-rows strong.down { color: var(--down); }
div.home-kpi { cursor: default; }
div.home-kpi:hover {
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface) 88%, var(--th-bg));
}
.news-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.news-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px 12px;
}
.news-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.news-card-head h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.news-card-head .hint {
  font-size: 12px;
  color: var(--dim);
}

/* —— 今日快讯（卡片主题） —— */
.news-today {
  margin-top: 2px;
}
.news-digest-stamp {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
}
.news-live {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px 16px 8px;
}
.news-live-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.news-live-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}
.news-live-head span {
  font-size: 12px;
  color: var(--muted);
}
.news-digest-modules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-digest-mod {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 16px 16px 12px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 65%, transparent);
}
.news-digest-mod-top {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 10px 20px;
  align-items: start;
}
.news-digest-num {
  font-size: 28px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--blue) 55%, #93c5fd);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  text-align: right;
  min-width: 2.25rem;
}
[data-theme="dark"] .news-digest-num {
  color: color-mix(in srgb, var(--blue-light, #38bdf8) 70%, var(--text));
}
.news-digest-mod-main { min-width: 0; }
.news-digest-tag {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--blue);
}
.news-digest-mod-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
  color: var(--ink, var(--text));
}
[data-theme="dark"] .news-digest-mod-title { color: var(--text); }
.news-digest-take {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.news-digest-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  flex-shrink: 0;
}
.news-digest-icon svg {
  width: 22px;
  height: 22px;
}
.news-digest-mod-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
}
.news-digest-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.news-digest-sig {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  border: 1px solid transparent;
}
.news-digest-sig.up {
  color: var(--up);
  background: var(--bad-bg);
  border-color: color-mix(in srgb, var(--up) 18%, transparent);
}
.news-digest-sig.down {
  color: var(--down);
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--down) 18%, transparent);
}
.news-digest-sig.neutral {
  color: var(--muted);
  background: color-mix(in srgb, var(--border) 55%, transparent);
}
.news-digest-related {
  margin: 0;
  width: 100%;
}
.news-digest-related > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--blue);
  user-select: none;
}
.news-digest-related > summary em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  font-weight: 600;
}
.news-digest-related > summary::-webkit-details-marker { display: none; }
.news-digest-related > summary::after {
  content: '↓';
  font-size: 11px;
  color: var(--dim);
  transition: transform .15s ease;
}
.news-digest-related[open] > summary::after {
  transform: rotate(180deg);
}
.news-digest-related > summary:hover { color: var(--link); }
.news-digest-related-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.news-digest-related-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.news-digest-related-list a,
.news-digest-related-plain {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  text-decoration: none;
}
.news-digest-related-list a:hover { color: var(--link); }
.news-digest-related-list span {
  font-size: 11px;
  color: var(--dim);
}
.news-today-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.news-today-disclaimer {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 42em;
}
@media (max-width: 640px) {
  .news-digest-mod-top {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 8px 16px;
  }
  .news-digest-icon {
    display: none;
  }
  .news-digest-num {
    font-size: 24px;
    min-width: 2rem;
  }
  .news-digest-mod-title { font-size: 15px; }
}
.home-feed-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--th-bg));
  padding: 12px 14px 10px;
}
.home-feed-card[hidden] { display: none; }
.home-feed-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 12px; margin-bottom: 10px;
}
.home-feed-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.home-feed-meta {
  font-size: 12px; color: var(--dim);
}
.home-feed-list {
  display: flex; flex-direction: column; gap: 0;
  margin: 0; padding: 0; list-style: none;
}
.home-feed-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 8px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.home-feed-item:first-child { border-top: 0; padding-top: 2px; }
.home-feed-when {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.home-feed-body { min-width: 0; }
.home-feed-item-title {
  font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35;
}
.home-feed-item-title a {
  color: inherit; text-decoration: none;
}
.home-feed-item-title a:hover { color: var(--link); }
.home-feed-why {
  margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.45;
}
.home-feed-tag {
  display: inline-block; margin-top: 4px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 1px 6px; border-radius: 999px;
}
.home-feed-empty {
  padding: 8px 0 4px; font-size: 12px; color: var(--dim);
}
.home-feed-foot {
  margin-top: 8px; font-size: 11px; color: var(--dim);
}

/* —— 术语 —— */
.glossary-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  margin: 14px 0 12px;
}
.glossary-search {
  flex: 1 1 160px; min-width: 0; max-width: 280px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  padding: 8px 12px; font-size: 13px; font-family: inherit;
}
.glossary-search:focus {
  outline: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.glossary-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}
.glossary-card {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 16px 18px;
}
.glossary-card-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  margin-bottom: 10px;
}
.glossary-abbr {
  font-family: var(--font-mono);
  font-size: 20px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.02em;
}
.glossary-cn {
  font-size: 16px; font-weight: 700; color: var(--ink);
}
[data-theme="dark"] .glossary-cn { color: var(--text); }
.glossary-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}
.glossary-words {
  display: flex; flex-wrap: wrap; gap: 6px 8px;
  margin-bottom: 12px; padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  border: 1px solid var(--border);
}
.glossary-word {
  font-size: 12px; color: var(--muted); line-height: 1.4;
}
.glossary-word em {
  font-style: normal; font-weight: 700; color: var(--text);
  font-family: var(--font-mono);
}
.glossary-body {
  display: grid; gap: 10px; font-size: 13px; line-height: 1.6; color: var(--muted);
}
.glossary-row strong {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--ink); margin-bottom: 2px; letter-spacing: 0.02em;
}
[data-theme="dark"] .glossary-row strong { color: var(--text); }
.glossary-row code, .glossary-formula {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text);
  background: color-mix(in srgb, var(--border) 40%, transparent);
  padding: 1px 6px; border-radius: 4px;
}
.glossary-empty {
  padding: 32px 16px; text-align: center; color: var(--dim); font-size: 13px;
}
.board-wrap {
  width: 100%;
  max-width: none;
  margin: 22px 0 0;
  padding: 22px 24px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 5%, transparent);
}
.board-intro {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--th-bg) 70%, var(--surface));
  border: 0;
}
.board-intro p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.board-loading,
.board-error {
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--dim);
}
.board-error { color: var(--bad, #dc2626); }

/* —— 订阅 —— */
#panel-subscribe.active {
  position: relative;
}
.subscribe-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: 28px 40px;
  align-items: start;
  margin: 18px 0 8px;
  padding: 28px 28px 32px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--border));
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #fff), var(--surface));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent);
}
[data-theme="dark"] .subscribe-shell {
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--surface);
}
.subscribe-aside { padding-top: 4px; }
.subscribe-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.subscribe-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}
.subscribe-lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 36em;
}
.subscribe-aside-note {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 12px;
  opacity: 0.9;
}
.subscribe-lead strong { color: var(--text); font-weight: 650; }
.subscribe-pillars {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.subscribe-pillars li {
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.subscribe-pillars li span {
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
}
.subscribe-pillars li.is-live {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.subscribe-pillars li.is-live span { color: var(--accent); }
.subscribe-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.subscribe-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}
.subscribe-step-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  flex-shrink: 0;
}
.subscribe-main { min-width: 0; }
.subscribe-panel {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg, #f8fafc) 55%, var(--surface));
}
[data-theme="dark"] .subscribe-panel {
  background: color-mix(in srgb, var(--bg) 40%, var(--surface));
}
.subscribe-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--th-bg) 80%, var(--border));
}
.subscribe-seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background .15s, color .15s, box-shadow .15s;
}
.subscribe-seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent);
}
.subscribe-form { display: flex; flex-direction: column; gap: 12px; }
.subscribe-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 13px;
}
.subscribe-field[hidden] {
  display: none !important;
}
.subscribe-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.subscribe-field input[type="text"],
.subscribe-field input[type="password"],
.subscribe-field input[type="email"],
.subscribe-field input[type="number"] {
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color .15s, box-shadow .15s;
}
.subscribe-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.subscribe-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: filter .15s, background .15s;
}
.subscribe-btn.block { width: 100%; margin-top: 4px; }
.subscribe-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.subscribe-btn.primary:hover { filter: brightness(1.06); }
.subscribe-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.subscribe-hint {
  margin: 2px 0 0;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.45;
}
.subscribe-hint.err { color: var(--bad, #dc2626); }
.subscribe-hint.ok { color: var(--ok, #059669); }
.subscribe-config-block {
  margin-bottom: 14px;
}
.subscribe-config-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.subscribe-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.subscribe-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  flex-shrink: 0;
}
.subscribe-identity-text { flex: 1; min-width: 0; }
.subscribe-identity-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subscribe-identity-meta {
  font-size: 12px;
  color: var(--dim);
  margin-top: 2px;
}
.subscribe-link {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
  font-family: var(--font-sans);
  flex-shrink: 0;
}
.subscribe-topics {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 14px;
}
.subscribe-topic {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.subscribe-topic.is-soon { opacity: 0.62; }
.subscribe-topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.subscribe-topic-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.subscribe-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  background: color-mix(in srgb, var(--th-bg) 80%, var(--border));
  border-radius: 999px;
  padding: 2px 8px;
}
.subscribe-badge.is-live {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.subscribe-topic-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.subscribe-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
}
.subscribe-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.subscribe-switch-ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, var(--muted));
  position: relative;
  transition: background .18s;
}
.subscribe-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: transform .18s;
}
.subscribe-switch input:checked + .subscribe-switch-ui {
  background: var(--accent);
}
.subscribe-switch input:checked + .subscribe-switch-ui::after {
  transform: translateX(18px);
}
.subscribe-switch input:disabled + .subscribe-switch-ui {
  opacity: 0.55;
  cursor: not-allowed;
}
.subscribe-threshold {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.subscribe-delta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.subscribe-delta-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg, #f8fafc) 60%, var(--surface));
  padding: 0 10px 0 0;
  overflow: hidden;
}
.subscribe-delta-input input {
  width: 72px;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 10px 8px 10px 12px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.subscribe-delta-input span {
  font-size: 12px;
  color: var(--dim);
}
.subscribe-delta-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.subscribe-delta-presets button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: border-color .15s, color .15s, background .15s;
}
.subscribe-delta-presets button:hover,
.subscribe-delta-presets button.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
@media (max-width: 820px) {
  .subscribe-shell {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px 22px;
    margin-top: 14px;
  }
  .subscribe-steps {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .subscribe-lead { margin-bottom: 14px; }
}
@media (max-width: 480px) {
  .subscribe-delta-row { flex-direction: column; align-items: stretch; }
  .subscribe-delta-input { width: 100%; }
  .subscribe-delta-input input { width: 100%; }
}

#tcomment, #twikoo {
  min-height: 120px;
}
#tcomment {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
#twikoo .tk-footer, .twikoo .tk-footer { display: none !important; }
/* 匿名默认头像：对齐 gitproxy 风格，配色用看板蓝 */
#twikoo .tk-avatar:not(.tk-has-avatar),
.twikoo .tk-avatar:not(.tk-has-avatar) {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='3.2' fill='%23fff' fill-opacity='0.95'/%3E%3Cpath d='M5.5 18.2c.9-3.1 3.4-4.7 6.5-4.7s5.6 1.6 6.5 4.7c.1.4-.2.8-.6.8H6.1c-.4 0-.7-.4-.6-.8z' fill='%23fff' fill-opacity='0.95'/%3E%3C/svg%3E")
    center 46% / 54% no-repeat,
    linear-gradient(145deg, #93c5fd 0%, #2563eb 55%, #1d4ed8 100%) !important;
  border: none;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--accent) 28%, transparent);
  overflow: hidden;
}
#twikoo .tk-avatar:not(.tk-has-avatar) .tk-avatar-img,
.twikoo .tk-avatar:not(.tk-has-avatar) .tk-avatar-img {
  opacity: 0 !important;
}
#twikoo .tk-avatar,
#twikoo .tk-submit .tk-avatar {
  width: 40px !important;
  height: 40px !important;
  margin-right: 12px !important;
  border-radius: 8px !important;
}
#twikoo .tk-meta-input input,
#twikoo .el-input__inner,
#twikoo textarea,
#twikoo .tk-input,
#twikoo .el-textarea__inner {
  border-radius: 6px !important;
  border-color: var(--border) !important;
  background: color-mix(in srgb, var(--th-bg) 55%, var(--surface)) !important;
  color: var(--text) !important;
  font-size: 13px !important;
}
#twikoo .el-input-group__prepend {
  background: color-mix(in srgb, var(--border) 40%, var(--surface)) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
  font-size: 12px !important;
}
#twikoo .tk-send,
#twikoo .el-button--primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
#twikoo .el-button {
  border-radius: 6px !important;
}
#twikoo .tk-comments-title {
  font-size: 14px !important;
  font-weight: 650 !important;
  color: var(--text) !important;
  margin: 18px 0 8px !important;
}
#twikoo .tk-nick {
  font-weight: 650 !important;
  color: var(--text) !important;
}
#twikoo .tk-content {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--text) !important;
}
#twikoo .tk-tag,
#twikoo .tk-tag-green {
  font-size: 11px !important;
  border-radius: 4px !important;
  background: color-mix(in srgb, var(--accent) 12%, transparent) !important;
  color: var(--accent) !important;
  border: 0 !important;
}
[data-theme="dark"] .board-wrap {
  box-shadow: none;
}
[data-theme="dark"] .board-intro {
  background: color-mix(in srgb, var(--border) 35%, var(--surface));
}
[data-theme="dark"] #twikoo {
  color: var(--text);
}
[data-theme="dark"] #twikoo .tk-meta-input input,
[data-theme="dark"] #twikoo textarea,
[data-theme="dark"] #twikoo .el-textarea__inner,
[data-theme="dark"] #twikoo .el-input__inner {
  background: rgba(15, 23, 42, 0.55) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
@media (max-width: 560px) {
  .board-wrap { margin-top: 16px; padding: 16px 14px 12px; }
}

.footer { margin-top: 48px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); overflow: visible; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 18px var(--page-x); overflow: visible; }
.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand-name { font-size: 14px; font-weight: 600; color: var(--text); }
.footer-brand-name em { font-style: normal; color: var(--accent); }
.footer-brand-name.brand-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.footer-brand-name.brand-text em { -webkit-text-fill-color: transparent; }
.footer-copy {
  margin: 0;
  text-align: left;
  font-size: 12px;
  line-height: 1.55;
  color: var(--dim);
}
.footer-copy .footer-xhs {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-copy .footer-xhs:hover { color: var(--link); }
.footer-uv {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  font-size: inherit;
  color: inherit;
}
.footer-uv-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.footer-uv-btn:hover { color: var(--accent); }
.footer-uv-btn strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.footer-uv-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 80;
  width: min(280px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px 14px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 12%, transparent);
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.footer-uv-panel[hidden] { display: none; }
.footer-uv-panel h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.footer-uv-panel .hint {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 10px;
}
.footer-uv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}
.footer-uv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.footer-uv-row strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  :root { --page-x: 24px; }
}
@media (min-width: 1024px) {
  :root { --page-x: 32px; }
  .nav-inner { min-height: 84px; padding-top: 16px; padding-bottom: 16px; }
  .brand { column-gap: 16px; row-gap: 7px; max-width: 640px; }
  .brand-mark { width: 48px; height: 48px; border-radius: 13px; }
  .brand-name { font-size: 24px; }
  .brand-tagline { font-size: 13px; }
  .brand-title-row { gap: 12px; }
}

/* —— 手机端 —— */
@media (max-width: 640px) {
  :root { --page-x: 12px; }

  .nav-inner { min-height: 56px; padding: 10px var(--page-x); gap: 10px; }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: none;
  }
  .brand-mark-btn { grid-row: auto; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .brand-title-row { display: flex; flex: 1; min-width: 0; gap: 8px; }
  .brand-name { font-size: 17px; }
  .brand-tagline { display: none; }
  .brand-xhs { font-size: 10px; padding: 3px 8px; }
  .brand-xhs-full,
  .refresh-meta { display: none; }
  .icon-btn { width: 40px; height: 40px; }

  .page { padding-bottom: calc(28px + var(--safe-bottom)); }
  .tabs {
    margin: 10px 0 0;
    width: 100%;
    max-width: 100%;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 10px 14px; font-size: 13px; min-height: 40px; }

  .home { margin-top: 10px; gap: 14px; }
  .home-desk { gap: 10px; }
  .home-kpis { gap: 8px; }
  .home-kpi { padding: 12px 10px 10px; border-radius: 10px; }
  .home-kpi-head { gap: 7px; margin-bottom: 6px; }
  .home-kpi-icon { width: 20px; height: 20px; }
  .home-kpi-icon svg { width: 11px; height: 11px; }
  .home-kpi-k { font-size: 11px; }
  .home-kpi-spark { flex-basis: 48px; width: 48px; height: 26px; }
  .home-kpi-meter { margin-bottom: 6px; }
  .home-kpi-v { font-size: 19px; }
  .home-kpi-v.num { font-size: 16px; }
  .home-kpi-rows { font-size: 11px; }
  .home-kpi-note { font-size: 12px; }
  .home-feed-item { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 8px; padding: 7px 0; }
  .home-feed-when { font-size: 10px; }
  .home-feed-item-title { font-size: 12px; }
  .home-feed-why { font-size: 11px; }

  .panel-meta { margin: 10px 0 8px; font-size: 11px; gap: 4px 10px; }
  .toolbar { margin: 10px 0; gap: 8px; }
  .filter-seg { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .filter-btn { padding: 9px 12px; min-height: 38px; }
  .review-intro { margin: 10px 0 8px; font-size: 12px; }
  .review-panel-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .review-range-seg button { padding: 8px 10px; min-height: 34px; }
  .review-custom-range { width: 100%; }
  .review-custom-range input[type="date"] { flex: 1 1 120px; min-width: 0; }
  .review-chart-wrap { height: 220px; }
  .review-chart-wrap.sm { height: 180px; }
  .ath-hero-pct { font-size: 26px; }
  .macro-chart-wrap { height: 140px; }
  .val-card-val { font-size: 24px; }
  .footer-inner { padding: 16px var(--page-x) calc(16px + var(--safe-bottom)); }

  .table-mode-bar { display: flex; }
  .sticky-col,
  .sticky-code,
  .sticky-name {
    position: static !important;
    left: auto !important;
  }

  html.table-compact #panel-premium table {
    min-width: 0;
    width: 100%;
  }
  html.table-compact #panel-premium .col-rank,
  html.table-compact #panel-premium .col-price,
  html.table-compact #panel-premium .col-vol,
  html.table-compact #panel-premium .col-scale,
  html.table-compact #panel-premium .col-iopv,
  html.table-compact #panel-premium .col-nav,
  html.table-compact #panel-premium .col-navPrem,
  html.table-compact #panel-premium .col-company,
  html.table-compact #panel-premium .col-expense { display: none; }
  html.table-compact #panel-premium .col-name {
    max-width: 7.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.table-compact #limitTable { min-width: 0; width: 100%; }
  html.table-compact #limitTable .col-rank,
  html.table-compact #limitTable .col-buyFee,
  html.table-compact #limitTable .col-expFee,
  html.table-compact #limitTable .col-scale,
  html.table-compact #limitTable .col-nav,
  html.table-compact #limitTable .col-dayChg,
  html.table-compact #limitTable .col-navDate,
  html.table-compact #limitTable .col-channel { display: none; }
  html.table-compact #limitTable .col-name {
    max-width: 6.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.table-compact #constituentsTable { min-width: 0; width: 100%; }
  html.table-compact #constituentsTable .col-rank,
  html.table-compact #constituentsTable .col-mcap,
  html.table-compact #constituentsTable .col-price { display: none; }
  html.table-compact #constituentsTable .col-name {
    max-width: 7em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.table-full #panel-premium table { min-width: 980px; }
  html.table-full #limitTable { min-width: 900px; }
  html.table-full #constituentsTable { min-width: 640px; }

  th, td { padding: 9px 6px; }
  .table-card { border-radius: 10px; }
}
