/* 投资情报 2.1 —— 零框架、token 化 CSS。亮/暗跟随系统，不引 Web 字体。
   断点：720（手机，底部 tab）/ 1100（桌面，交易台双栏）。 */

/* ===================== tokens ===================== */
:root {
  color-scheme: light dark;
  --bg: #f5f6f8; --surface: #fff; --surface-2: #eef0f3; --line: #e3e6ea;
  --fg: #1b1f24; --fg-2: #4b5563; --muted: #8a94a3;
  --accent: #2457d6; --accent-bg: #e9effc;
  --up: #158a4a; --down: #c62828; --star: #c27803;
  --up-bg: rgba(21, 138, 74, .10); --down-bg: rgba(198, 40, 40, .10);
  --font: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r1: 6px; --r2: 10px; --r3: 14px;
  --lh: 1.7; --lh-ui: 1.5;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --topbar: 52px; --tabbar: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161a22; --surface-2: #1d222c; --line: #2a3140;
    --fg: #e6e8eb; --fg-2: #aab2bf; --muted: #7b8594;
    --accent: #6ea0ff; --accent-bg: #1a2740;
    --up: #4ade80; --down: #f87171; --star: #f2b544;
    --up-bg: rgba(74, 222, 128, .12); --down-bg: rgba(248, 113, 113, .12);
    --shadow: none;
  }
}

/* ===================== base ===================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14.5px/var(--lh) var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input { font: inherit; color: inherit; }
b, strong, h1, h2, h3, h4, h5 { font-weight: 600; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hint { font-size: 12px; margin: 12px 0 0; }

/* ===================== 顶栏 / 导航 ===================== */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 28px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.conn { font-size: 12px; font-weight: 400; color: var(--muted); padding: 1px 8px; border-radius: 999px; background: var(--surface-2); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn.ok { color: var(--up); background: var(--up-bg); }
.conn.err { color: var(--down); background: var(--down-bg); }
.tabs { display: flex; gap: 4px; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r2); color: var(--fg-2); line-height: var(--lh-ui); }
.tabs a svg { width: 18px; height: 18px; }
.tabs a:hover { background: var(--surface-2); text-decoration: none; }
.tabs a.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
main { max-width: 1280px; margin: 0 auto; padding: 16px 20px 64px; }

/* ===================== 通用控件 ===================== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
select, input[type=search], input[type=text] { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--surface); color: var(--fg); line-height: var(--lh-ui); }
select:focus, input:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden; background: var(--surface); }
.seg button { height: 30px; padding: 0 12px; border: 0; background: transparent; color: var(--fg-2); cursor: pointer; font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.btn { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--surface); color: var(--fg-2); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { color: #fff; opacity: .9; }
.btn.ghost { background: transparent; }
.btn.small { height: 26px; padding: 0 10px; font-size: 12px; }
.icon { width: 26px; height: 26px; border: 0; border-radius: var(--r1); background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon:hover { background: var(--surface-2); color: var(--fg); }
.count { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-2); margin-bottom: 8px; cursor: pointer; }

/* 芯片 / 徽章 / 星 / 涨跌 */
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 1; white-space: nowrap; border: 1px solid transparent; }
.chip.narr { background: var(--accent-bg); color: var(--accent); }
.chip.tk { font-family: var(--mono); font-size: 11.5px; border-color: var(--line); color: var(--fg); }
.chip.tk.up { color: var(--up); border-color: var(--up); background: var(--up-bg); }
.chip.tk.down { color: var(--down); border-color: var(--down); background: var(--down-bg); }
.chip.tag { color: var(--muted); padding: 0 4px; }
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
.badge.p0 { background: var(--down); color: #fff; }
.badge.p1 { background: var(--star); color: #fff; }
.badge.p2, .badge.p3, .badge.soft { background: var(--surface-2); color: var(--fg-2); }
.badge.ok { background: var(--up-bg); color: var(--up); }
.badge.kind { background: var(--accent-bg); color: var(--accent); }
.stars { color: var(--star); letter-spacing: 1px; font-size: 12px; }
.delta { font-size: 13px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); }

/* 加载 / 空 / 出错 */
.state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; flex-wrap: wrap; width: 100%; }
.state .state-ico { width: 16px; height: 16px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; font-weight: 600; }
.state.loading .state-ico { border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.state.empty .state-ico { background: var(--surface-2); color: var(--muted); }
.state.empty .state-ico::before { content: "—"; }
.state.error { color: var(--down); }
.state.error .state-ico { background: var(--down-bg); color: var(--down); }
.state.error .state-ico::before { content: "!"; }
.grid > .state { grid-column: 1 / -1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== 宏观 ===================== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: 12px 14px 10px; box-shadow: var(--shadow); transition: box-shadow .3s; scroll-margin-top: calc(var(--topbar) + 12px); }
.chart-card.flash { box-shadow: 0 0 0 3px var(--accent-bg), 0 0 0 4px var(--accent); }
.chart-card header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.chart-card h4 { margin: 0; font-size: 13px; line-height: 1.35; }
.chart-card .sub { font-size: 12px; color: var(--muted); }
.chart-card .acts { display: flex; gap: 2px; flex-shrink: 0; }
.kpi { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; flex-wrap: wrap; }
.kpi .val { font-size: 22px; font-weight: 600; line-height: 1.2; }
.kpi .date { font-size: 12px; color: var(--muted); margin-left: auto; }
.chart-card .info { font-size: 12px; color: var(--fg-2); background: var(--surface-2); border-radius: var(--r1); padding: 8px 10px; margin: 6px 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.chart-card .info dt { color: var(--muted); }
.chart-card .info dd { margin: 0; }
.plot { position: relative; height: 150px; }
.plot.tall { height: 260px; }
.plot canvas { width: 100% !important; height: 100% !important; touch-action: pan-y; }
.plot .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.plot .overlay .state { padding: 8px; }
.compare .c1 { color: var(--accent); }
.compare .c2 { color: var(--star); }
.compare .kpi .val { font-size: 14px; font-weight: 400; }
.compare .kpi .val b { font-size: 18px; }

/* 最近更新面板 */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); margin-bottom: 14px; box-shadow: var(--shadow); }
.panel > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13px; list-style: none; display: flex; gap: 8px; align-items: center; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::before { content: ""; width: 0; height: 0; border: 5px solid transparent; border-left-color: var(--muted); margin-right: 2px; transition: transform .15s; }
.panel[open] > summary::before { transform: rotate(90deg); }
.panel > summary .muted { font-weight: 400; }
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px 12px; padding: 0 10px 10px; }
.recent-item { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 6px 8px; border: 0; border-radius: var(--r1); background: transparent; text-align: left; cursor: pointer; font-size: 13px; line-height: var(--lh-ui); color: var(--fg); }
.recent-item:hover { background: var(--surface-2); }
.recent-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item .v { font-weight: 600; white-space: nowrap; }
.recent-item .v small { color: var(--muted); font-weight: 400; margin-left: 3px; font-size: 11px; }
.recent-item .dt { font-size: 12px; color: var(--muted); }

/* 对话框 */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); color: var(--fg); padding: 0; width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 720px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.dlg[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(10, 12, 16, .55); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { margin: 0; font-size: 16px; flex-shrink: 0; }
.dlg-head input { flex: 1; min-width: 0; }
.dlg-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 16px; }
.dlg-foot { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.dlg-foot .btn:last-child { margin-left: auto; }
.pick-group h5 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.pick-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: var(--r1); cursor: pointer; font-size: 13.5px; }
.pick-row:hover { background: var(--surface-2); }
.pick-row .sub { color: var(--muted); font-size: 12px; }
.pick-row .assets { margin-left: auto; display: flex; gap: 3px; }
.pick-row .assets i { font-style: normal; font-size: 10.5px; padding: 0 4px; border-radius: 3px; background: var(--surface-2); color: var(--fg-2); }
.cmp-form { display: grid; gap: 10px; padding: 16px; }
.cmp-form label { display: grid; gap: 4px; font-size: 13px; color: var(--fg-2); }
.cmp-form p { margin: 0; }

/* 灯箱 */
dialog.lightbox { border: 0; background: transparent; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .86); }
dialog.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lightbox img { max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: var(--r1); background: #fff; cursor: zoom-out; }
.lightbox .cap { color: #ddd; font-size: 12px; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lightbox .nav:hover { background: rgba(255, 255, 255, .3); }
.lightbox .nav.prev { left: 12px; }
.lightbox .nav.next { right: 12px; }

/* ===================== 研报 ===================== */
.stack { display: flex; flex-direction: column; gap: 10px; max-width: 880px; margin: 0 auto; }
.stack.wide-stack { max-width: 1100px; }
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 880px; margin: 0 auto 14px; }
.filterbar .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-toggle { display: none; }
.search { display: inline-flex; }
.search input { border-radius: var(--r1) 0 0 var(--r1); min-width: 180px; }
.search .btn { border-radius: 0 var(--r1) var(--r1) 0; border-left: 0; }
.starpick { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r1); background: var(--surface); height: 32px; align-items: center; padding: 0 8px 0 10px; }
.starpick .lbl { font-size: 12px; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.starpick button { border: 0; background: transparent; color: var(--line); font-size: 17px; padding: 0 2px; cursor: pointer; line-height: 1; }
.starpick button.on { color: var(--star); }
.starpick button:hover { color: var(--star); opacity: .7; }

.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: 12px 16px 10px; box-shadow: var(--shadow); display: block; color: inherit; }
a.item:hover { text-decoration: none; border-color: var(--accent); }
.item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); line-height: var(--lh-ui); }
.item .meta .src { font-weight: 600; color: var(--fg-2); }
.item .meta .dot { font-style: normal; }
.item .meta .badge { margin-left: auto; }
.item .ttl { margin: 4px 0 0; font-size: 16px; line-height: 1.45; }
.item .sub { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chips .gap { width: 8px; }
.chips .tags { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
details.more { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
details.more > summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 4px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; font-size: 11px; }
details.more[open] > summary::before { content: "▾"; }
details.more .prose { margin-top: 8px; font-size: 14px; }
.lead { color: var(--fg-2); border-left: 3px solid var(--accent); padding-left: 10px; margin: 0 0 10px; }
.src-link { font-size: 13px; }

/* ===================== 交易台 ===================== */
.daysep { font-size: 13px; color: var(--muted); margin: 14px 0 2px; font-weight: 600; }
.daysep:first-child { margin-top: 0; }
.pin-note { font-size: 12px; color: var(--muted); }
.desk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: calc(var(--topbar) + 12px); }
.desk-card.pinned { border-color: var(--accent); }
.desk-head { padding: 12px 16px; cursor: pointer; }
.desk-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.desk-head .ext { margin-left: auto; }
.desk-head .chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-left: 6px; transition: transform .15s; }
.desk-card.open .chev { transform: rotate(45deg); }
.desk-head .ttl { margin: 4px 0 0; font-size: 16px; line-height: 1.45; }
.desk-head .sub { font-size: 13px; color: var(--muted); }
.anchors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.anchor { height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg-2); font-size: 12px; cursor: pointer; }
.anchor:hover { color: var(--accent); border-color: var(--accent); }
.desk-body { display: none; border-top: 1px solid var(--line); padding: 4px 16px 14px; }
.desk-card.open .desk-body { display: block; }
.note { padding-top: 12px; scroll-margin-top: calc(var(--topbar) + 8px); }
.note + .note { border-top: 1px dashed var(--line); margin-top: 14px; }
.note h4 { margin: 0 0 8px; font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.note h4 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.thumb { height: 120px; width: auto; flex-shrink: 0; border-radius: var(--r1); border: 1px solid var(--line); cursor: zoom-in; background: #fff; }
.sec { margin-top: 8px; }
.sec h5 { margin: 0 0 4px; font-size: 13px; padding-left: 8px; border-left: 3px solid var(--accent); line-height: 1.4; }
.sec .cols { display: grid; grid-template-columns: 1fr; gap: 6px 24px; }
.sec .prose { font-size: 14px; }
.sec .prose > :first-child { margin-top: 0; }
.sec .prose > :last-child { margin-bottom: 0; }
.sec details.en > summary { cursor: pointer; font-size: 12px; color: var(--accent); list-style: none; }
.sec details.en > summary::-webkit-details-marker { display: none; }
.sec details.en > summary::before { content: "▸ "; }
.sec details.en[open] > summary::before { content: "▾ "; }
.sec details.en .prose { color: var(--fg-2); margin-top: 4px; }
.lang-zh .sec.bi details.en { display: none; }
.lang-en .sec.bi .zh { display: none; }
.lang-en .sec.bi details.en > summary { display: none; }
.lang-both.wide .sec.bi .cols { grid-template-columns: 1fr 1fr; }
.lang-both.wide .sec.bi details.en > summary { display: none; }
.lang-both.wide .sec.bi details.en .prose { margin-top: 0; }

/* ===================== 日报 / 笔记 ===================== */
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.side { position: sticky; top: calc(var(--topbar) + 16px); }
.sidelist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); overflow-y: auto; max-height: calc(100vh - var(--topbar) - 90px); box-shadow: var(--shadow); }
.side-item { display: block; width: 100%; text-align: left; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; line-height: var(--lh-ui); color: var(--fg); }
.side-item:last-child { border-bottom: 0; }
.side-item .d { font-weight: 600; font-size: 14px; }
.side-item small { display: block; color: var(--muted); font-size: 12px; }
.side-item:hover { background: var(--surface-2); }
.side-item.active { background: var(--accent-bg); color: var(--accent); }
.side-item.active small { color: var(--accent); opacity: .8; }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: 28px 36px 40px; min-height: 400px; box-shadow: var(--shadow); }
.paper > *:not(.fm):not(.back):not(.state) { max-width: 72ch; }
.fm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-2); padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.back { display: inline-block; font-size: 13px; margin-bottom: 12px; }
.note-card .ttl { font-size: 17px; }

/* markdown 排版 */
.prose { line-height: var(--lh); }
.prose h1 { font-size: 22px; margin: 0 0 12px; line-height: 1.35; }
.prose h2 { font-size: 18px; margin: 28px 0 10px; padding-left: 10px; border-left: 3px solid var(--accent); line-height: 1.4; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; }
.prose h4, .prose h5, .prose h6 { font-size: 14.5px; margin: 14px 0 6px; }
.prose p { margin: 8px 0; }
.prose strong { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 6px 0; }
.prose li { margin: 2px 0; }
.prose blockquote { margin: 10px 0; padding: 4px 12px; border-left: 3px solid var(--line); color: var(--fg-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.prose table { border-collapse: collapse; font-size: 13px; margin: 10px 0; display: block; overflow-x: auto; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--surface-2); padding: 10px 12px; border-radius: var(--r1); overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; border-radius: var(--r1); }
.prose a { word-break: break-all; }

/* ===================== 响应式 ===================== */
@media (max-width: 1100px) {
  main { padding: 14px 16px 64px; }
  .topbar { gap: 16px; }
  .tabs a { padding: 6px 10px; }
}
@media (max-width: 720px) {
  main { padding: 12px 12px calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
  .topbar { gap: 12px; padding: 0 14px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
  .tabs a { flex-direction: column; gap: 2px; padding: 6px 0; font-size: 11px; border-radius: 0; justify-content: center; line-height: 1.2; }
  .tabs a svg { width: 22px; height: 22px; }
  .tabs a:hover, .tabs a.active { background: transparent; }
  .grid { grid-template-columns: 1fr; }
  .plot { height: 130px; }
  .plot.tall { height: 220px; }
  .kpi .val { font-size: 20px; }
  .recent-list { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filterbar .count { margin-left: auto; }
  .filterbar .filters { display: none; width: 100%; order: 3; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
  .filterbar.open .filters { display: flex; }
  .filterbar .filters select, .filterbar .search, .filterbar .starpick { width: 100%; }
  .search input { flex: 1; min-width: 0; }
  .split { grid-template-columns: 1fr; gap: 10px; }
  .side { position: static; }
  .sidelist { flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; border-radius: var(--r2); }
  .side-item { border-bottom: 0; border-right: 1px solid var(--line); white-space: nowrap; padding: 8px 12px; width: auto; }
  .side-item small { display: none; }
  .paper { padding: 18px 16px 28px; }
  .item { padding: 12px 12px 8px; }
  .item .meta .badge { margin-left: 0; }
  .chips .tags { margin-left: 0; }
  .desk-head { padding: 12px; }
  .desk-body { padding: 4px 12px 12px; }
  .desk-head .ext { margin-left: 0; }
  .cmp-form { padding: 12px; }
  .dlg-body { padding: 8px 12px; }
  .lightbox .nav { width: 36px; height: 36px; }
}
