/* ===========================================================
   theme.css — 可选主题
   用法：在 <html> 上加 data-theme 属性
     <html data-theme="archive">   神秘档案馆
     <html data-theme="codex">     羊皮纸手稿
     <html data-theme="terminal">  观测终端
   不设 data-theme 时用 style.css 里的原始预览配色（纯黑线条）。
   所有主题都遵守同一条原则：无圆角、细线、大量留白。
   =========================================================== */

/* ---------- 一 · 神秘档案馆 ----------
   冷墨蓝底 + 旧金描边。气质：编号档案、禁忌记录、黄昏议会。 */
html[data-theme="archive"]{
  --bg:        #0c0e12;
  --grid:      #14171d;
  --grid-major:#1b1f27;
  --line:      #c9a227;          /* 金色主描边 */
  --line-soft: #8a7220;
  --line-dim:  #2a2f3a;
  --fg:        #e8e4da;
  --fg-muted:  #9a958a;
  --fg-faint:  #6b6860;
  --accent:    #e8c766;

  --font: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC",
          Georgia, "Times New Roman", serif;
  --fs: 14px;
  --fs-sm: 12px;
  --fs-lg: 16px;
  --fs-xl: 21px;
}
html[data-theme="archive"] .shell > *,
html[data-theme="archive"] .comments,
html[data-theme="archive"] .drawer,
html[data-theme="archive"] .navitem,
html[data-theme="archive"] .actionbar,
html[data-theme="archive"] .brand,
html[data-theme="archive"] .statusbar,
html[data-theme="archive"] .sb-cell,
html[data-theme="archive"] .card,
html[data-theme="archive"] .act{ border-color: var(--line-soft); }
html[data-theme="archive"] .navitem.active,
html[data-theme="archive"] .act:hover,
html[data-theme="archive"] .act.on,
html[data-theme="archive"] .card:hover,
html[data-theme="archive"] .brand:hover,
html[data-theme="archive"] .sb-btn:hover,
html[data-theme="archive"] .sb-btn.on,
html[data-theme="archive"] .comment-form button:hover,
html[data-theme="archive"] .btnrow button.on{
  background: var(--line);
  color: #0c0e12;
}
html[data-theme="archive"] .card:hover .card-tag{ color:#4a3c10; }
html[data-theme="archive"] .page-title{
  letter-spacing:.1em;
  border-bottom:1px solid var(--line-dim);
  padding-bottom:14px;
}

/* ---------- 二 · 羊皮纸手稿 ----------
   暖纸底 + 墨线 + 朱印。气质：古籍志怪、手抄本、旧时代档案。 */
html[data-theme="codex"]{
  --bg:        #e9e1cf;
  --grid:      #e0d6c0;
  --grid-major:#d6cab0;
  --line:      #2b2419;          /* 墨线 */
  --line-soft: #6b5f4a;
  --line-dim:  #c0b49b;
  --fg:        #2b2419;
  --fg-muted:  #6b5f4a;
  --fg-faint:  #93866d;
  --accent:    #8c2f1e;          /* 朱红 */

  --font: "Kaiti SC", "KaiTi", "STKaiti", "Noto Serif SC", Georgia, serif;
  --fs: 15px;
  --fs-sm: 13px;
  --fs-lg: 17px;
  --fs-xl: 23px;
}
/* 纸纹：极淡的双色斜纹，避免死平 */
html[data-theme="codex"] body{
  background-image:
    repeating-linear-gradient(90deg, rgba(120,100,70,.05) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg,  rgba(120,100,70,.04) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 20% 0%, #f2ecdd 0%, #e9e1cf 55%, #ded3ba 100%);
  background-size:auto, auto, auto;
}
html[data-theme="codex"] .shell > *,
html[data-theme="codex"] .comments,
html[data-theme="codex"] .drawer,
html[data-theme="codex"] .statusbar{ background:#efe8d8; }
html[data-theme="codex"] .navitem.active,
html[data-theme="codex"] .act:hover,
html[data-theme="codex"] .act.on,
html[data-theme="codex"] .card:hover,
html[data-theme="codex"] .brand:hover,
html[data-theme="codex"] .sb-btn:hover,
html[data-theme="codex"] .sb-btn.on,
html[data-theme="codex"] .comment-form button:hover,
html[data-theme="codex"] .btnrow button.on{
  background:#2b2419; color:#efe8d8;
}
html[data-theme="codex"] .card:hover .card-tag{ color:#b9ad93; }
html[data-theme="codex"] .page-title{
  border-bottom:2px double var(--line);
  padding-bottom:12px;
}
/* 朱印：标题前一小方红 */
html[data-theme="codex"] .page-title::before{
  content:"";
  display:inline-block; width:11px; height:11px;
  background:var(--accent);
  margin-right:12px; vertical-align:2px;
}
html[data-theme="codex"] .doc blockquote{
  border-left:3px double var(--accent);
  color:#5a4b38;
  padding-left:18px;
}
html[data-theme="codex"] .doc pre,
html[data-theme="codex"] .field input,
html[data-theme="codex"] .field textarea,
html[data-theme="codex"] .field select,
html[data-theme="codex"] textarea{ background:#f4eee0; }

/* ---------- 三 · 观测终端 ----------
   近黑 + 青蓝荧光 + 等宽。气质：智械生命、普罗米修斯计划、破碎层级坐标。 */
html[data-theme="terminal"]{
  --bg:        #05080a;
  --grid:      #0a1014;
  --grid-major:#0f181d;
  --line:      #3fe0c8;          /* 青 */
  --line-soft: #1f8b7c;
  --line-dim:  #14312e;
  --fg:        #cfe9e4;
  --fg-muted:  #6f9c95;
  --fg-faint:  #4a6b66;
  --accent:    #ff6b4a;          /* 告警橙 */

  --font: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo,
          "Noto Sans Mono CJK SC", monospace;
  --fs: 12.5px;
  --fs-sm: 11.5px;
  --fs-lg: 14px;
  --fs-xl: 18px;
}
html[data-theme="terminal"] .shell > *,
html[data-theme="terminal"] .comments,
html[data-theme="terminal"] .drawer,
html[data-theme="terminal"] .statusbar{ border-color:var(--line-soft); }
html[data-theme="terminal"] .navitem.active,
html[data-theme="terminal"] .act:hover,
html[data-theme="terminal"] .act.on,
html[data-theme="terminal"] .card:hover,
html[data-theme="terminal"] .brand:hover,
html[data-theme="terminal"] .sb-btn:hover,
html[data-theme="terminal"] .sb-btn.on,
html[data-theme="terminal"] .comment-form button:hover,
html[data-theme="terminal"] .btnrow button.on{
  background:var(--line); color:#05080a;
}
html[data-theme="terminal"] .card:hover .card-tag{ color:#0a3a34; }
/* 荧光：只给主框和标题，别到处发光 */
html[data-theme="terminal"] .shell > *{ box-shadow:0 0 0 1px rgba(63,224,200,.10) inset; }
html[data-theme="terminal"] .page-title{
  color:var(--line);
  letter-spacing:.04em;
}
html[data-theme="terminal"] .page-title::before{
  content:"▌ "; color:var(--accent);
}
html[data-theme="terminal"] .panel-head::before{ content:"["; color:var(--line-soft); }
html[data-theme="terminal"] .panel-head::after{ content:"]"; color:var(--line-soft); }
html[data-theme="terminal"] .doc h1::before,
html[data-theme="terminal"] .doc h2::before,
html[data-theme="terminal"] .doc h3::before{ content:"# "; color:var(--line-soft); }
html[data-theme="terminal"] .doc blockquote{
  border-left:1px solid var(--accent); color:#9fc4be;
}
html[data-theme="terminal"] .card-tag{ text-transform:uppercase; letter-spacing:.14em; }
