/* ============================================================
   靛金 v3 · indigo-gilt  (new-api preset theme, deploy layer)
   浅色: 象牙纸底 + 靛蓝强调   深色: 墨蓝底 + 鎏金强调
   来源: 靛金全量设计稿_3.zip / indigo-gilt-v3.css
   挂载: html.theme-indigo-gilt  (JS 自动加) 或 body[data-theme-preset=indigo-gilt]
   ============================================================ */

/* ---------- 浅色 ---------- */
html.theme-indigo-gilt,
body[data-theme-preset=indigo-gilt]{
  --background:#faf9f5;
  --foreground:#1a1c26;
  --card:#ffffff;
  --card-foreground:#1a1c26;
  --popover:#ffffff;
  --popover-foreground:#1a1c26;
  --primary:#2f3f8f;
  --primary-foreground:#ffffff;
  --secondary:#f0eee6;
  --secondary-foreground:#2a2d3a;
  --muted:#f0eee6;
  --muted-foreground:#6e6f78;
  --accent:#eceef6;
  --accent-foreground:#2f3f8f;
  --destructive:#b5403a;
  --destructive-foreground:#ffffff;
  --success:#4f7d5c;
  --success-foreground:#ffffff;
  --warning:#a8822f;
  --warning-foreground:#ffffff;
  --info:#2f3f8f;
  --info-foreground:#ffffff;
  --neutral:#6e6f78;
  --neutral-foreground:#ffffff;
  --border:#e8e6dc;
  --input:#dedcd1;
  --ring:#2f3f8f;
  --chart-1:#2f3f8f;
  --chart-2:#5d6bb0;
  --chart-3:#8f99cc;
  --chart-4:#bfc5e3;
  --chart-5:#dfe2f0;
  --sidebar:#f5f4ed;
  --sidebar-foreground:#3a3c48;
  --sidebar-primary:#2f3f8f;
  --sidebar-primary-foreground:#ffffff;
  --sidebar-accent:#eceee6;
  --sidebar-accent-foreground:#1a1c26;
  --sidebar-border:#e8e6dc;
  --sidebar-ring:#2f3f8f;
  --skeleton-base:#efede6;
  --skeleton-highlight:#f7f6f1;
  --radius:.5rem;
  --font-serif:"Lora Variable","Lora","Source Serif 4","Noto Serif SC","Songti SC",STSong,Georgia,serif;
}

/* ---------- 深色 ---------- */
html.dark.theme-indigo-gilt,
.dark body[data-theme-preset=indigo-gilt],
body[data-theme-preset=indigo-gilt].dark,
[data-theme-preset=indigo-gilt] .dark{
  --background:#0f1222;
  --foreground:#eceae2;
  --card:#151929;
  --card-foreground:#eceae2;
  --popover:#1a1e30;
  --popover-foreground:#eceae2;
  --primary:#d8b45e;
  --primary-foreground:#14120a;
  --secondary:#1f2336;
  --secondary-foreground:#e6e3d8;
  --muted:#1b1f31;
  --muted-foreground:#9a9caa;
  --accent:#272632;
  --accent-foreground:#e8c877;
  --destructive:#e5776f;
  --destructive-foreground:#14120a;
  --success:#86b892;
  --success-foreground:#0f1222;
  --warning:#d8b45e;
  --warning-foreground:#14120a;
  --info:#d8b45e;
  --info-foreground:#14120a;
  --neutral:#9a9caa;
  --neutral-foreground:#0f1222;
  --border:#ffffff14;
  --input:#ffffff22;
  --ring:#d8b45e;
  --chart-1:#d8b45e;
  --chart-2:#b39550;
  --chart-3:#8f7a4a;
  --chart-4:#5f553c;
  --chart-5:#3a3730;
  --sidebar:#0c0f1d;
  --sidebar-foreground:#d9d7cf;
  --sidebar-primary:#d8b45e;
  --sidebar-primary-foreground:#14120a;
  --sidebar-accent:#1b1f31;
  --sidebar-accent-foreground:#f5f3ea;
  --sidebar-border:#ffffff10;
  --sidebar-ring:#d8b45e;
  --skeleton-base:#1d2134;
  --skeleton-highlight:#282d45;
}

/* ---------- 排版与细节（仅本主题） ---------- */
html.theme-indigo-gilt,
body[data-theme-preset=indigo-gilt]{
  font-feature-settings:"tnum" 1,"cv11" 1;
  letter-spacing:-.005em;
}
html.theme-indigo-gilt h1,
html.theme-indigo-gilt h2,
html.theme-indigo-gilt h3,
body[data-theme-preset=indigo-gilt] h1,
body[data-theme-preset=indigo-gilt] h2,
body[data-theme-preset=indigo-gilt] h3{
  font-family:var(--font-serif);
  font-weight:500;
  letter-spacing:-.01em;
}
/* 选中态：靛蓝左线（浅）/ 鎏金左线（深）——只改描边不改布局 */
html.theme-indigo-gilt [data-sidebar-item][data-active="true"],
html.theme-indigo-gilt [aria-current="page"]{
  box-shadow:inset 2px 0 0 var(--primary);
}
html.dark.theme-indigo-gilt [data-sidebar-item][data-active="true"],
html.dark.theme-indigo-gilt [aria-current="page"]{
  box-shadow:inset 2px 0 0 var(--primary);
}
/* 滚动条随主题 */
html.theme-indigo-gilt ::-webkit-scrollbar-thumb{background:var(--border)}
