:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ink: #1b2733;
  --ink-2: #4a5a6a;
  --ink-3: #7c8b9a;
  --line: #dde4ec;
  --brand: #16455f;
  --brand-2: #1f6f8b;
  --accent: #c76b2f;
  --good: #2f7f6f;
  --warn: #d9a441;
  --bad: #b5462f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 69, 95, .06), 0 8px 24px rgba(22, 69, 95, .06);
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.app { display: flex; min-height: 100vh; }

/* ------------------------------------------------------------ sidebar */
.sidebar {
  width: 256px;
  flex: 0 0 256px;
  background: linear-gradient(180deg, #123a50 0%, #16455f 60%, #1a5570 100%);
  color: #dbe6ee;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand .mark {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: #8fb6c9; border: 1px solid rgba(143,182,201,.5); border-radius: 999px;
  padding: 2px 9px; margin-bottom: 10px;
}
.brand h1 { font-size: 16px; margin: 0 0 4px; color: #fff; line-height: 1.4; }
.brand p { margin: 0; font-size: 11.5px; color: #9db8c8; line-height: 1.5; }

.nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.nav .group-label {
  font-size: 10.5px; letter-spacing: .14em; color: #7fa3b6; text-transform: uppercase;
  padding: 12px 10px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: #cfdee8; padding: 9px 12px; border-radius: 8px; font-size: 13.5px;
  margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }

.sidebar-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.09); font-size: 11px; color: #8fa9ba; }

/* ------------------------------------------------------------ main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--ink-3); }
.crumb b { color: var(--ink); font-weight: 600; }
.topbar .meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 14px; }

.view { padding: 26px; max-width: 1400px; width: 100%; }

.page-head { margin-bottom: 20px; }
.page-head h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: .01em; }
.page-head p { margin: 0; color: var(--ink-2); max-width: 860px; }

/* ------------------------------------------------------------ cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.card-title h3 { margin: 0; font-size: 14.5px; }
.card-title .hint { font-size: 11.5px; color: var(--ink-3); }

.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid.two { grid-template-columns: 1.35fr 1fr; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.kpi-card { padding: 16px 18px; }
.kpi-card .label { font-size: 12.5px; color: var(--ink-3); }
.kpi-card .value { font-size: 27px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 2px; font-family: var(--mono); }
.kpi-card .value small { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-left: 3px; font-family: inherit; }
.kpi-card .delta { font-size: 12px; color: var(--good); font-weight: 600; }
.kpi-card .note { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* ------------------------------------------------------------ charts */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap.h280 { height: 280px; }
.chart-wrap.h240 { height: 240px; }
.chart-wrap.h320 { height: 320px; }
.chart-wrap.h360 { height: 360px; }

/* ------------------------------------------------------------ industry cards */
.ind-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.ind-card { cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s; overflow: hidden; }
.ind-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(22,69,95,.14); border-color: #b9c9d6; }
.ind-card .bar { height: 4px; }
.ind-card .body { padding: 16px 18px; }
.ind-card .cat { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.ind-card h3 { margin: 4px 0 6px; font-size: 16px; }
.ind-card .tag { font-size: 12.5px; color: var(--ink-2); min-height: 40px; }
.ind-card .foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ind-card .foot .num { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.ind-card .foot .num small { font-size: 11px; color: var(--ink-2); font-family: inherit; margin-left: 3px; }
.ind-card .foot .go { font-size: 12px; color: var(--brand-2); }

/* ------------------------------------------------------------ detail */
.detail-hero {
  border-radius: var(--radius); padding: 22px 24px; color: #fff; margin-bottom: 16px;
  background: linear-gradient(120deg, #16455f, #1f6f8b);
}
.detail-hero .cat { font-size: 11.5px; color: #b8d3e0; letter-spacing: .1em; }
.detail-hero h2 { margin: 6px 0 8px; font-size: 23px; }
.detail-hero p { margin: 0; color: #d7e6ee; max-width: 780px; }
.detail-hero .stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 18px; }
.detail-hero .stats .s .v { font-family: var(--mono); font-size: 21px; font-weight: 700; }
.detail-hero .stats .s .l { font-size: 11.5px; color: #b8d3e0; }

.section-title {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 12px;
  font-size: 15px; font-weight: 600;
}
.section-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--brand-2); }

.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.swot { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.swot .head { padding: 10px 16px; font-weight: 600; font-size: 13px; color: #fff; }
.swot.s .head { background: var(--good); }
.swot.w .head { background: var(--warn); }
.swot.o .head { background: var(--brand-2); }
.swot.t .head { background: var(--bad); }
.swot ul { margin: 0; padding: 12px 16px 14px 30px; }
.swot li { margin: 5px 0; color: var(--ink-2); font-size: 13px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: var(--surface-2); font-size: 12px; color: var(--ink-2); font-weight: 600; }
table.data tr:last-child td { border-bottom: none; }
table.data td.num { font-family: var(--mono); text-align: right; }

.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill.strong { background: #e2f1ec; color: var(--good); }
.pill.mid { background: #fbf0dc; color: #a5771f; }
.pill.weak { background: #f6e2dd; color: var(--bad); }
.pill.high { background: #f6e2dd; color: var(--bad); }
.pill.medium { background: #fbf0dc; color: #a5771f; }

.chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.chain .node { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.chain .node .st { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.chain .node .ds { font-size: 12px; color: var(--ink-2); min-height: 34px; }
.chain .node .lv { margin-top: 6px; }

.pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pain { border: 1px solid var(--line); border-left: 3px solid var(--bad); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
.pain h4 { margin: 0 0 4px; font-size: 13.5px; display: flex; justify-content: space-between; gap: 8px; }
.pain p { margin: 0; font-size: 12.5px; color: var(--ink-2); }

.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.trend { border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; background: var(--surface); }
.trend h4 { margin: 0 0 5px; font-size: 13.5px; color: var(--brand); }
.trend h4 span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-right: 6px; }
.trend p { margin: 0; font-size: 12.5px; color: var(--ink-2); }

.rec-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rec { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rec .head { padding: 11px 16px; font-weight: 600; font-size: 13px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.rec ol { margin: 0; padding: 12px 16px 14px 34px; }
.rec li { margin: 7px 0; font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------------ comparison */
.compare-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-picker button {
  font: inherit; font-size: 12.5px; padding: 6px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: all .14s; text-align: center; line-height: 1.35;
}
.compare-picker button:hover { border-color: var(--brand-2); color: var(--brand-2); }
.compare-picker button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 8px 12px; text-align: center; }
.matrix th.rowh { text-align: left; background: var(--surface-2); font-weight: 600; }
.matrix td.best { background: #e2f1ec; color: var(--good); font-weight: 700; font-family: var(--mono); }
.matrix td { font-family: var(--mono); }

/* ------------------------------------------------------------ cross recs */
.pillar { display: grid; grid-template-columns: 60px 1fr; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pillar:last-child { border-bottom: none; }
.pillar .ic {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #1f6f8b, #16455f);
}
.pillar h4 { margin: 2px 0 8px; font-size: 14.5px; }
.pillar ul { margin: 0; padding-left: 18px; }
.pillar li { margin: 4px 0; font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------------ misc */
.note-box {
  background: #fbf6ec; border: 1px solid #ecdcc0; border-radius: 10px;
  padding: 13px 16px; font-size: 12.5px; color: #7a6329;
}
.method-step { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.method-step:last-child { border-bottom: none; }
.method-step .n {
  flex: 0 0 34px; height: 34px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; color: var(--brand-2);
}
.method-step h4 { margin: 0 0 3px; font-size: 13.5px; }
.method-step p { margin: 0; font-size: 12.5px; color: var(--ink-2); }

.footer { padding: 22px 26px 34px; color: var(--ink-3); font-size: 12px; max-width: 1400px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-row .t { font-size: 11.5px; padding: 3px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

.empty { padding: 40px; text-align: center; color: var(--ink-3); }

@media (max-width: 1080px) {
  .grid.two, .swot-grid, .rec-cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-flex !important; }
  .view { padding: 16px; }
}
.menu-btn {
  display: none; align-items: center; gap: 8px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.scrim { display: none; }

/* ==================================================== 双视角 · AI · 周报 */

/* 角色切换 */
.role-switch { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.role-switch button {
  font: inherit; font-size: 12.5px; border: none; background: transparent; color: var(--ink-2);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.role-switch button:hover { color: var(--brand-2); }
.role-switch button.on { background: var(--brand); color: #fff; font-weight: 600; }
.role-badge {
  background: #e6eff4; color: var(--brand); font-weight: 600; font-size: 11.5px;
  padding: 2px 10px; border-radius: 999px;
}

/* 按钮 */
.btn-primary {
  font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; padding: 9px 20px; border-radius: 8px; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); padding: 9px 18px; border-radius: 8px; cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand-2); }
.btn-ghost:disabled, .btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost:disabled:hover { border-color: var(--line); color: var(--ink-2); }
.btn-mini {
  font: inherit; font-size: 11.5px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); padding: 4px 10px; border-radius: 6px; cursor: pointer; margin-right: 6px;
}
.btn-mini:hover { border-color: var(--brand-2); color: var(--brand-2); }
.btn-mini.danger:hover { border-color: var(--bad); color: var(--bad); }

/* 快捷入口 */
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.quick-links a {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.quick-links a:hover { text-decoration: none; transform: translateY(-2px); border-color: #b9c9d6; }
.quick-links b { display: block; font-size: 14.5px; color: var(--brand); margin-bottom: 4px; }
.quick-links span { font-size: 12.5px; color: var(--ink-3); }

/* 列表与键值 */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: flex; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--line); font-size: 13px;
}
.mini-list li:last-child { border-bottom: none; }
.mini-list li span { color: var(--ink-3); font-size: 12px; }
.bullet { margin: 0; padding-left: 18px; }
.bullet li { margin: 6px 0; font-size: 13px; color: var(--ink-2); }
.kv-inline { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.kv-inline > div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: 12.5px; }
.kv-inline b { color: var(--ink-3); font-weight: 600; }
.kv-inline span { color: var(--ink-2); }
.two-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0; }
.two-list b { font-size: 12.5px; }

/* 指标条 */
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.metric { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.metric .label { font-size: 11.5px; color: var(--ink-3); }
.metric .value { font-size: 18px; font-weight: 700; font-family: var(--mono); color: var(--brand); margin-top: 4px; }

/* AI 分析台 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  font: inherit; font-size: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: all .14s;
}
.chip:hover { border-color: var(--brand-2); color: var(--brand-2); background: #fff; }
.ai-input {
  width: 100%; font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; resize: vertical; color: var(--ink); background: var(--surface);
  line-height: 1.6; outline: none; transition: border-color .15s;
}
.ai-input:focus { border-color: var(--brand-2); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; background: var(--surface); color: var(--ink); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--brand-2); }
.ai-answer {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; font-size: 13.5px; color: var(--ink); line-height: 1.85;
}
.ai-loading { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ai-loading span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); display: inline-block;
  animation: aiPulse 1s infinite ease-in-out;
}
.ai-loading span:nth-child(2) { animation-delay: .15s; }
.ai-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes aiPulse { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* 行链接 */
table.data tr.row-link { cursor: pointer; transition: background .13s; }
table.data tr.row-link:hover { background: #f3f8fb; }

/* 报告预览 */
.rep-preview { max-height: 460px; overflow: auto; }
.rep-md {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin: 0; white-space: pre-wrap; word-break: break-word;
}

@media (max-width: 1080px) {
  .two-list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .role-switch { width: 100%; justify-content: center; }
  .role-switch button { flex: 1; }
}

/* ==================================================== 企业库 · 市场 · 工作台 */

/* 企业库布局 */
.ent-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.ent-list { padding: 8px; max-height: 720px; overflow: auto; }
.ent-item {
  position: relative; padding: 12px 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; transition: background .14s, border-color .14s;
}
.ent-item:hover { background: var(--surface-2); }
.ent-item.on { background: #eef5f9; border-color: #b9d3e0; }
.ent-item .ent-name { font-size: 13.5px; font-weight: 600; color: var(--ink); padding-right: 40px; }
.ent-item .ent-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.ent-item .ent-score {
  position: absolute; right: 12px; top: 12px; font-family: var(--mono);
  font-size: 15px; font-weight: 700; color: var(--brand-2);
}
.ent-item.on .ent-score { color: var(--brand); }

/* 工作台 */
.wb-list { max-height: 560px; overflow: auto; }
.wb-entry { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.wb-entry p { margin: 8px 0; font-size: 12.5px; color: var(--ink-2); }
.wb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-head b { font-size: 13.5px; }
.wb-time { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.wb-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wb-foot .t { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

@media (max-width: 1080px) {
  .ent-layout { grid-template-columns: 1fr; }
  .ent-list { max-height: 320px; }
}

/* 行情信号条 */
.ticker { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); }
.tick {
  flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px;
  border-right: 1px solid var(--line); color: var(--ink);
}
.tick:last-child { border-right: none; }
.tick:hover { background: var(--surface-2); text-decoration: none; }
.tick .tk-name { font-size: 11.5px; color: var(--ink-3); }
.tick .tk-val { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.tick .tk-chg { font-size: 11.5px; font-weight: 600; }
.tick-pros { background: #f7fbfa; }

/* 全局搜索 */
.search-btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-3); font-size: 12px; padding: 6px 10px; border-radius: 8px;
  font-family: inherit; cursor: pointer;
}
.search-btn:hover { border-color: var(--brand-2); color: var(--ink-2); }
.search-btn kbd {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 5px; background: var(--surface);
}
.search-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,30,40,.42);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 20px 20px;
}
.search-modal[hidden] { display: none; }
.search-panel {
  width: 100%; max-width: 620px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(20,30,40,.26);
}
.search-panel input {
  width: 100%; border: none; border-bottom: 1px solid var(--line);
  padding: 16px 20px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: transparent; outline: none;
}
.search-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.search-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; cursor: pointer; color: var(--ink);
}
.search-item:hover, .search-item.on { background: var(--surface-2); text-decoration: none; }
.search-item .si-kind {
  flex: 0 0 auto; font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.search-item .si-body { min-width: 0; }
.search-item .si-name { font-size: 13.5px; font-weight: 600; }
.search-item .si-sub { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 26px 16px; text-align: center; color: var(--ink-3); font-size: 12.5px; }
.search-foot {
  display: flex; gap: 16px; justify-content: flex-end;
  padding: 9px 16px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--ink-3); background: var(--surface-2);
}
@media (max-width: 720px) {
  .search-btn span { display: none; }
  .search-modal { padding-top: 8vh; }
}
