/* ==========================================================================
   羊皮纸手稿风设计系统 · Parchment Manuscript Design System
   配色对齐汕头大学智慧课程门户：https://jou2327a.aisbest.eu.cc/index.html
   羊皮米黄 · 焦墨字 · 朱砂印 · 暗金标 · 双线框 · 宣纸暗纹
   ========================================================================== */

:root {
  /* 基础羊皮纸色相 (来自 jou2327a 核心设计规范) */
  --paper: #F0E6CF;            /* 羊皮米黄原色 */
  --paper-2: #E8DCBC;          /* 卡片纸深底 */
  --paper-3: #EFE4C6;          /* 卡片纸亮底 */
  --paper-hi: #F7EFDA;         /* 纸面高光 */
  --ink: #3A2E20;              /* 深褐焦墨 (标题/重点) */
  --ink-2: #6E5B41;            /* 次要深墨 (正文/副题) */
  --ink-3: #9C8964;            /* 弱化暗金墨色 (题注/标签) */
  --line: #D3C4A0;             /* 细线 */
  --line-2: #C7B189;           /* 界线 (高对比轮廓) */
  --cinnabar: #A2402F;         /* 经典朱砂红印色 (主强调) */
  --gold: #8C6A2F;             /* 暗金/青铜金 (章节标/角饰) */
  --indigo: #33567C;           /* 靛青 (备用学术色) */
  --verdigris: #51724B;        /* 铜绿 (备用学术色) */
  --ink-panel: #241B11;        /* 乌丝栏墨底 (主按钮/高深区) */
  
  --shadow: 0 2px 14px rgba(107,90,68,.16);
  --shadow-lift: 0 10px 26px rgba(107,90,68,.24);
  
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --latin: "EB Garamond", Georgia, "Times New Roman", serif;
  --song: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --hei: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  --fang: "FangSong", "STFangsong", "仿宋", var(--kai);
  --ease: cubic-bezier(.25, .6, .3, 1);

  /* 兼容已有代码属性名映射 */
  --bp: var(--paper);
  --bp-deep: var(--paper-2);
  --bp-light: var(--paper-3);
  --bp-hi: var(--paper-hi);
  --w: var(--ink);
  --w2: var(--ink-2);
  --w3: var(--ink-3);
  --w4: rgba(110,91,65,.45);
  --ln: var(--line);
  --ln2: var(--line-2);
  --red: var(--cinnabar);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; overflow: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--song);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* 纸面高光与自然斑驳 (jou2327a 原生径向漫反射 + 极淡工坊坐标格) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 700px at 16% 6%, rgba(255,250,235,.6), transparent 60%),
    radial-gradient(900px 620px at 86% 92%, rgba(156,137,100,.16), transparent 62%),
    radial-gradient(720px 520px at 72% 24%, rgba(140,106,47,.07), transparent 56%),
    radial-gradient(640px 420px at 26% 78%, rgba(107,90,68,.08), transparent 56%),
    linear-gradient(rgba(140,106,47,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,106,47,.03) 1px, transparent 1px);
  background-size: auto, auto, auto, auto, 28px 28px, 28px 28px;
}

/* 宣纸微质感噪点 (jou2327a 原生滤镜层) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 98;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.29 0 0 0 0 0.18 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E");
}

/* 四周自然晕影 (彻底移除，告别画框与暗角) */
.vignette {
  display: none !important;
}

::selection { background: rgba(162,64,47,.18); color: var(--ink); }
:focus-visible { outline: 1px solid var(--cinnabar); outline-offset: 2px; }

/* 细滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(110,91,65,.3) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb {
  background: rgba(110,91,65,.28);
  border-radius: 2px;
}
::-webkit-scrollbar-track { background: transparent; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ==========================================================================
   通透无界式页面基底 (Unconstrained Natural Flow)
   ========================================================================== */
.sheet {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}

/* 移除暗金图框角标，消除外框束缚感 */
.reg {
  display: none !important;
}

/* ── 仿古朱砂印章 (对齐 jou2327a .seal) ── */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cinnabar);
  color: var(--cinnabar);
  border-radius: 6px;
  font-family: var(--kai);
  font-weight: 700;
  background: rgba(162, 64, 47, 0.06);
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 1px rgba(162, 64, 47, 0.25);
  user-select: none;
  transition: transform .2s ease;
}
.seal:hover { transform: rotate(-1deg); }
.portal-seal {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
}
.portal-seal svg {
  width: 62%;
  height: 62%;
  display: block;
}

/* 上边条 (Full-Bleed Fixed Navigation Strip) */
.strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 36px;
  border-bottom: 1px solid var(--line);
  font-family: var(--latin), var(--song);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-2);
  background: rgba(247, 239, 218, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
  box-shadow: 0 1px 6px rgba(44, 37, 23, 0.05);
}

/* 语料归档柜内部条带恢复标准定位 */
.cabinet-sheet .strip {
  position: static;
  box-shadow: none;
  background: rgba(247, 239, 218, 0.6);
  z-index: auto;
}
.strip-left, .strip-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.strip .no { color: var(--ink); font-weight: 600; font-family: var(--latin), var(--mono); }
.strip .strip-sep { color: var(--gold); font-weight: bold; }
.strip-badge {
  color: var(--cinnabar);
  border: 1px solid rgba(162, 64, 47, 0.55);
  background: rgba(162, 64, 47, .06);
  padding: 2px 8px;
  letter-spacing: .08em;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 2px;
}
.strip .sub-label {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--song);
  letter-spacing: .06em;
}
.strip-org {
  color: var(--ink-2);
  font-weight: 500;
  font-family: var(--song);
  letter-spacing: .06em;
  font-size: 12px;
}
.strip time {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: .12em;
}

/* 章节前缀小横线标注 (t-label) */
.t-label {
  font-family: var(--hei), var(--song), sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.t-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: .8;
}

/* ==========================================================================
   工程线框按钮与输入组件 (Parchment & Ink Controls)
   ========================================================================== */
.wire-btn, button {
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: .08em;
  border: 1px solid var(--line-2);
  background: rgba(247, 239, 218, 0.5);
  color: var(--ink-2);
  padding: 6px 15px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.wire-btn:hover, button:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(140, 106, 47, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(107, 90, 68, 0.1);
}
.wire-btn.active {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: rgba(162, 64, 47, 0.08);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(162, 64, 47, 0.25);
}
.wire-btn.primary, button.primary, #send {
  border: 1px solid var(--ink-panel);
  color: var(--paper-hi);
  background: var(--ink-panel);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.wire-btn.primary:hover, button.primary:hover, #send:hover {
  background: #18120a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}
.wire-btn.mini {
  padding: 3px 9px;
  font-size: 11px;
  letter-spacing: .1em;
}
.wire-btn.cinnabar {
  border-color: var(--red);
  color: var(--red);
}
.wire-btn.cinnabar:hover {
  background: rgba(191,74,38,.08);
  border-color: var(--red);
}

/* 输入框与选择框 */
input, select, textarea {
  background: rgba(255,251,240,.65);
  border: 1px solid var(--ln);
  color: var(--w);
  border-radius: 0;
  padding: 8px 12px;
  font-family: var(--song);
  font-size: 14px;
  transition: border-color .18s var(--ease);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--w);
  outline: none;
  background: #ffffff;
}

/* ==========================================================================
   搜索引擎 / GPT 式中心检索入口 (Search Engine / GPT Portal)
   ========================================================================== */
.portal-wrapper {
  min-height: 100vh;
  height: 100%;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.portal-sheet {
  max-width: 100%;
  width: 100%;
  margin: 0;
  background: transparent;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 48px; /* 预留顶部固定导航栏高度，避免遮挡题头内容 */
}

.portal-content {
  position: relative;
  padding: 38px 32px 36px;
  text-align: center;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

#portal .portal-content {
  /* safe：内容高于视口时不把顶部题头裁切掉 */
  justify-content: safe center;
}

.portal-kicker {
  justify-content: center;
  margin-bottom: 6px;
  animation: scholarlyFadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.portal-title {
  font-family: var(--kai);
  font-size: 50px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .25em;
  text-indent: .25em;
  line-height: 1.25;
  margin: 4px 0 6px;
  animation: scholarlyFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
}

.portal-sub-zh {
  font-family: var(--kai);
  font-size: 19px;
  letter-spacing: .12em;
  color: var(--cinnabar);
  margin-bottom: 3px;
  font-weight: 600;
  animation: scholarlyFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.portal-sub-en {
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
  animation: scholarlyFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}

.portal-brief {
  max-width: 820px;
  margin: 0 auto 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
  text-align: center;
  white-space: nowrap;
  letter-spacing: .04em;
  animation: scholarlyFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

/* 中心大输入窗口 (Grand Search Console - Widescreen Enhanced) */
.search-console {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 24px;
  text-align: left;
  animation: consoleEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

.portal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}

.portal-tab {
  font-family: var(--hei);
  font-size: 13.5px;
  letter-spacing: .08em;
  padding: 10px 24px;
  border: 1px solid var(--line);
  border-bottom: none;
  background: rgba(232, 220, 188, 0.55);
  color: var(--ink-2);
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.portal-tab:hover {
  color: var(--ink);
  background: var(--paper-hi);
  transform: translateY(-1px);
}
.portal-tab.active {
  color: var(--ink);
  background: rgba(255, 252, 244, 0.98);
  border-color: var(--line-2);
  border-top: 2.5px solid var(--cinnabar);
  font-weight: 700;
  transform: none;
}

.console-box {
  background: rgba(255, 252, 244, 0.98);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 22px 28px 18px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 22px rgba(58, 46, 32, 0.06), 0 1px 2px rgba(58, 46, 32, 0.03);
  transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  animation: ambientGlow 8s ease-in-out 1.2s infinite alternate;
}
.console-box:focus-within {
  border-color: var(--cinnabar);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(58, 46, 32, 0.1), 0 0 0 1.5px rgba(178, 45, 21, 0.36);
  animation-play-state: paused;
}

.console-box textarea {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--song);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  resize: vertical;
  min-height: 64px;
  outline: none;
  transition: color 0.2s ease;
}
.console-box textarea::placeholder {
  color: var(--ink-3);
  font-style: italic;
  transition: opacity 0.2s ease;
}
.console-box textarea:focus::placeholder {
  opacity: 0.6;
}

.console-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.console-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--latin), var(--song);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-2);
  font-weight: 500;
}

/* 实时证据溯源雷达呼吸微标 */
.tele-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: var(--verdigris);
  display: inline-block;
  margin-right: 2px;
  position: relative;
  box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.6);
  animation: radarPing 2.4s cubic-bezier(0.25, 0, 0, 1) infinite;
}

#portal-submit {
  font-family: var(--hei);
  font-size: 13.5px;
  letter-spacing: .12em;
  padding: 9px 24px;
  border: 1px solid var(--ink-panel);
  background: var(--ink-panel);
  color: var(--paper-hi);
  border-radius: 3px;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
#portal-submit::after {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  width: 50px;
  left: -120%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: rotate(25deg);
  pointer-events: none;
}
#portal-submit:hover {
  background: #18120a;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(24, 18, 10, 0.28);
}
#portal-submit:hover::after {
  animation: buttonShimmer 1.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
#portal-submit:active {
  transform: translateY(0.5px) scale(0.985);
  box-shadow: 0 2px 6px rgba(24, 18, 10, 0.2);
}

/* 推荐探究主题 (Widescreen 4-column Grid · 梯次级联流) */
.portal-cards-grid {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  text-align: left;
}

.portal-cards-grid .prompt-card:nth-child(1) { animation: cardCascade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both; }
.portal-cards-grid .prompt-card:nth-child(2) { animation: cardCascade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }
.portal-cards-grid .prompt-card:nth-child(3) { animation: cardCascade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.52s both; }
.portal-cards-grid .prompt-card:nth-child(4) { animation: cardCascade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.59s both; }

.prompt-card {
  background: rgba(247, 239, 218, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(58, 46, 32, 0.04);
  display: flex;
  flex-direction: column;
}
.prompt-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.prompt-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}
.prompt-card:hover {
  border-color: var(--gold);
  background: var(--paper-hi);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(58, 46, 32, 0.09), 0 2px 5px rgba(58, 46, 32, 0.03);
}
.prompt-card:active {
  transform: translateY(-1px) scale(0.99);
}
.prompt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.prompt-card-tag {
  font-family: var(--hei);
  font-size: 11.5px;
  color: var(--cinnabar);
  letter-spacing: .08em;
  font-weight: 600;
  transition: color 0.2s ease;
}
.prompt-card:hover .prompt-card-tag {
  color: #8c1e0b;
}
.prompt-card-arrow {
  font-family: var(--latin);
  font-size: 12px;
  color: var(--gold);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}
.prompt-card:hover .prompt-card-arrow {
  color: var(--cinnabar);
  transform: translate(2.5px, -2.5px);
}
.prompt-card-text {
  font-family: var(--song);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  flex: 1;
}

/* ==========================================================================
   学科核心数据指标带 (Disciplinary Metric Band)
   ========================================================================== */
.portal-stat-band {
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 18px 24px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), var(--shadow);
}
.stat-cell {
  text-align: center;
  padding: 4px 16px;
  flex: 1;
}
.stat-val {
  font-family: var(--latin), var(--song);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-unit {
  font-family: var(--kai);
  font-size: 14px;
  font-weight: 600;
  color: var(--cinnabar);
  margin-left: 3px;
}
.stat-lbl {
  font-family: var(--hei);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.stat-sub {
  font-family: var(--kai);
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: .04em;
}
.stat-sep {
  width: 1px;
  height: 38px;
  background: var(--line);
  opacity: 0.8;
}

/* ==========================================================================
   首页与各子页通用板块结构 (Portal Sections)
   ========================================================================== */
.portal-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 44px;
  text-align: left;
}
.section-header {
  margin-bottom: 18px;
}
.section-kicker {
  margin-bottom: 4px;
}
.section-title {
  font-family: var(--kai);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.section-desc {
  font-family: var(--song);
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ==========================================================================
   四大核心教研能力矩阵 (Four Disciplinary Pedagogy Pillars)
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.pillar-card {
  background: var(--paper-hi);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(58, 46, 32, 0.04);
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}
.pillar-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(58, 46, 32, 0.09), 0 2px 5px rgba(58, 46, 32, 0.03);
  background: #ffffff;
}
.pillar-card:active {
  transform: translateY(-1px) scale(0.99);
}
.pillar-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cinnabar);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pillar-title {
  font-family: var(--kai);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
  line-height: 1.35;
  margin-bottom: 8px;
}
.pillar-body {
  font-family: var(--song);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 12px;
  flex: 1;
}
.pillar-points {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.pillar-points li {
  font-family: var(--hei);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.8;
  position: relative;
  padding-left: 12px;
}
.pillar-points li::before {
  content: "•";
  color: var(--gold);
  position: absolute;
  left: 0;
  font-weight: bold;
}
.pillar-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.pillar-action {
  font-family: var(--hei);
  font-size: 12px;
  font-weight: 600;
  color: var(--cinnabar);
  letter-spacing: .06em;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pillar-card:hover .pillar-action {
  transform: translateX(3px);
  color: #8c1e0b;
}

/* ==========================================================================
   学术出版规范三线表 (Three-Line Table for Specs)
   ========================================================================== */
.specs-table-wrap {
  overflow-x: auto;
  background: var(--paper-hi);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 22px;
  box-shadow: 0 1px 4px rgba(107,90,68,.06);
}
.three-line-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--song);
  font-size: 13.5px;
  line-height: 1.65;
  text-align: left;
}
.three-line-table thead tr {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.three-line-table th {
  padding: 11px 14px;
  font-family: var(--kai);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .08em;
  background: transparent;
}
.three-line-table tbody tr {
  border-bottom: 1px solid var(--line);
}
.three-line-table tbody tr:last-child {
  border-bottom: 2px solid var(--ink);
}
.three-line-table td {
  padding: 12px 14px;
  vertical-align: top;
}
.tb-dim {
  font-family: var(--hei);
  font-weight: 600;
  color: var(--cinnabar);
  letter-spacing: .06em;
}
.tb-spec {
  font-family: var(--latin), var(--hei);
  font-weight: 600;
  color: var(--ink);
}
.tb-desc {
  color: var(--ink-2);
}

/* ==========================================================================
   高校合规与权利规范栏 (Compliance & Trust Strip)
   ========================================================================== */
.compliance-box {
  background: var(--paper-3);
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--cinnabar);
  border-radius: 3px;
  padding: 20px 26px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(107,90,68,.06);
}
.compliance-left {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.compliance-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 2px solid var(--cinnabar);
  color: var(--cinnabar);
  font-family: var(--kai);
  font-size: 15px;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(162, 64, 47, 0.08);
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 1px rgba(162, 64, 47, 0.2);
}
.compliance-title {
  font-family: var(--kai);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .06em;
}
.compliance-text {
  font-family: var(--song);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0;
}
.compliance-right {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.compliance-meta {
  font-family: var(--hei);
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
}
.c-label {
  color: var(--gold);
  font-weight: 600;
}

/* 凭证弹出卡片 (Fixed Dropdown Card directly beneath navbar '凭证' button) */
.portal-auth-panel {
  position: fixed;
  top: 50px;
  right: 36px;
  z-index: 1001;
  background: rgba(255, 252, 244, 0.98);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(44, 37, 23, 0.16), 0 2px 6px rgba(44, 37, 23, 0.08);
  border-radius: 4px;
  padding: 16px 20px;
  min-width: 320px;
  max-width: 90vw;
  box-sizing: border-box;
  animation: authPanelDrop 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authPanelDrop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.auth-panel-title {
  font-family: var(--hei);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .08em;
}
.auth-panel-close {
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 2px;
}
.auth-panel-close:hover {
  color: var(--cinnabar);
  background: rgba(162, 64, 47, 0.08);
}

.auth-inline-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-inline-form label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-inline-form input {
  padding: 5px 10px;
  font-size: 12px;
  width: 170px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 240, 0.85);
  border-radius: 2px;
  font-family: var(--mono);
}
.auth-inline-form input:focus {
  border-color: var(--cinnabar);
  background: #ffffff;
}
.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.auth-hint {
  font-size: 11px;
  color: var(--gold);
  font-family: var(--song);
  max-width: 190px;
  line-height: 1.35;
  text-align: right;
}

.portal-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 36px;
  margin-top: auto;
  background: rgba(247, 239, 218, 0.55);
  animation: scholarlyFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
}

.footer-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .06em;
}

.footer-org {
  color: var(--ink);
  font-weight: 700;
  font-family: var(--song);
}

.footer-sep {
  color: var(--gold);
  font-weight: 700;
}

.footer-usage {
  color: var(--ink-2);
  font-weight: 500;
  font-family: var(--song);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-ver {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .08em;
}

.footer-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--cinnabar);
  padding: 3px 10px;
  border: 1px solid var(--cinnabar);
  background: rgba(162, 64, 47, .08);
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(162, 64, 47, .12);
  display: inline-flex;
  align-items: center;
}

#portal-cabinet-btn {
  border-color: var(--line-2);
  color: var(--ink-2);
}
#portal-cabinet-btn:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(140, 106, 47, 0.08);
}

.hint {
  min-height: 1.4em;
  color: var(--red);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .08em;
}

/* ==========================================================================
   学科编辑室工作台 (Studio Workspace)
   ========================================================================== */
.studio-wrapper {
  height: 100vh;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.studio-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  outline: none;
  padding-top: 48px;
}

/* 顶栏 */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--ln);
  background: rgba(255,251,240,.5);
}

.brand-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-kicker {
  margin-bottom: 2px;
}
.brand-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.brand-name {
  font-family: var(--fang);
  font-size: 26px;
  font-weight: 400;
  color: var(--w);
  letter-spacing: .15em;
}
.brand-ver {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--w3);
  font-weight: 400;
}
.brand-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--w3);
  text-transform: uppercase;
}

.top-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tele-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tele-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--w2);
  border: 1px solid var(--ln);
  background: rgba(255,251,240,.7);
  padding: 3px 8px;
}
.tele-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 4px var(--red);
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
#provider-pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--w3);
}

/* 主体三栏布局 */
.studio-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(320px, 380px);
  min-height: 0;
  overflow: hidden;
}

/* 左栏：技能 */
.rail {
  padding: 16px 14px;
  border-right: 1px solid var(--ln);
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  background: rgba(255,251,240,.3);
}
.skills {
  display: grid;
  gap: 8px;
}
.skill {
  appearance: none;
  background: rgba(255,251,240,.6);
  border: 1px solid var(--ln);
  border-radius: 0;
  padding: 11px 12px;
  text-align: left;
  color: var(--w2);
  transition: all .16s var(--ease);
}
.skill:hover {
  border-color: var(--w);
  background: rgba(255,251,240,.9);
  color: var(--w);
}
.skill.on {
  border: 1.5px solid var(--w);
  border-left: 3.5px solid var(--red);
  background: #ffffff;
}
.skill b {
  display: block;
  font-family: var(--fang);
  font-size: 16px;
  font-weight: 400;
  color: var(--w);
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.skill span {
  display: block;
  font-family: var(--song);
  font-size: 12px;
  color: var(--w3);
  line-height: 1.45;
}
.skill-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cinnabar);
  border: 1px solid rgba(162, 64, 47, 0.4);
  background: rgba(162, 64, 47, 0.08);
  padding: 0 5px;
  border-radius: 9px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
}
.rail-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--w3);
  line-height: 1.5;
}

/* 中栏：对话与输入 */
.chat-col {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: rgba(255,251,240,.15);
}

.chat-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 24px;
  background: rgba(247, 239, 218, 0.55);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.chat-session-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-session-tag {
  font-family: var(--hei);
  font-weight: 700;
  color: var(--cinnabar);
  letter-spacing: .08em;
}
.chat-session-desc {
  font-family: var(--song);
  color: var(--ink-3);
  font-size: 11.5px;
}

.transcript {
  overflow-y: auto;
  min-height: 0;
  padding: 24px 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.bubble {
  position: relative;
  max-width: 52em;
  padding: 14px 18px;
  line-height: 1.95;
  font-size: 15px;
  border: 1px solid var(--ln);
}
.bubble.user {
  justify-self: end;
  background: rgba(255,251,240,.8);
  border-left: 3px solid var(--w3);
}
.bubble.user .who {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--w3);
  margin-bottom: 4px;
}
.bubble.assistant {
  justify-self: start;
  background: #ffffff;
  border-left: 3px solid var(--w);
}
.bubble.assistant .who {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--red);
  margin-bottom: 6px;
  font-weight: 600;
}
.bubble p { margin: 0 0 0.8em; }
.bubble p:last-child { margin-bottom: 0; }

/* 气泡内轻量 Markdown */
.bubble .md-h,
.triad-body .md-h,
.arm-body .md-h {
  font-family: var(--fang);
  font-weight: 500;
  color: var(--w);
  line-height: 1.45;
  margin: 0.95em 0 0.4em;
  letter-spacing: .04em;
}
.bubble .md-h1, .triad-body .md-h1, .arm-body .md-h1 { font-size: 1.28em; }
.bubble .md-h2, .triad-body .md-h2, .arm-body .md-h2 { font-size: 1.16em; }
.bubble .md-h3, .triad-body .md-h3, .arm-body .md-h3 { font-size: 1.06em; color: var(--w); }
.bubble .md-h4, .triad-body .md-h4, .arm-body .md-h4 { font-size: 1em; color: var(--w2); letter-spacing: .06em; }
.bubble .md-h:first-child,
.triad-body .md-h:first-child,
.arm-body .md-h:first-child { margin-top: 0.15em; }

.bubble .md-list,
.triad-body .md-list,
.arm-body .md-list {
  margin: 0.35em 0 0.85em;
  padding-left: 1.35em;
  color: var(--w2);
}
.bubble .md-list li,
.triad-body .md-list li,
.arm-body .md-list li {
  margin: 0.28em 0;
  line-height: 1.75;
  padding-left: 0.15em;
}
.bubble ul.md-list,
.triad-body ul.md-list,
.arm-body ul.md-list { list-style: disc; }
.bubble ol.md-list,
.triad-body ol.md-list,
.arm-body ol.md-list { list-style: decimal; }

.bubble .md-table-wrap,
.triad-body .md-table-wrap,
.arm-body .md-table-wrap {
  overflow-x: auto;
  margin: 0.6em 0 0.9em;
  border: 1px solid var(--ln);
}
.bubble .md-table,
.triad-body .md-table,
.arm-body .md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  line-height: 1.55;
}
.bubble .md-table th,
.bubble .md-table td,
.triad-body .md-table th,
.triad-body .md-table td,
.arm-body .md-table th,
.arm-body .md-table td {
  border: 1px solid var(--ln);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.bubble .md-table th,
.triad-body .md-table th,
.arm-body .md-table th {
  background: rgba(44,37,23,.04);
  font-family: var(--fang);
  font-weight: 500;
  color: var(--w);
  letter-spacing: .04em;
}
.bubble .md-table td,
.triad-body .md-table td,
.arm-body .md-table td { color: var(--w2); }

.bubble .md-code,
.triad-body .md-code,
.arm-body .md-code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(44,37,23,.06);
  border: 1px solid var(--ln);
  padding: 0.08em 0.35em;
  color: var(--w);
}
.bubble .md-pre,
.triad-body .md-pre,
.arm-body .md-pre {
  margin: 0.55em 0 0.9em;
  padding: 10px 12px;
  overflow-x: auto;
  background: rgba(44,37,23,.045);
  border: 1px solid var(--ln);
  font-size: 0.86em;
  line-height: 1.55;
}
.bubble .md-code-block,
.triad-body .md-code-block,
.arm-body .md-code-block {
  font-family: var(--mono);
  white-space: pre;
  color: var(--w2);
}

.triad-body p { margin: 0 0 0.65em; }
.triad-body p:last-child { margin-bottom: 0; }

/* 行内学术角标 */
.cite-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: super;
  font-size: 10.5px;
  font-family: var(--mono);
  color: var(--red);
  background: rgba(191,74,38,.06);
  border: 1px solid var(--ln);
  border-radius: 0;
  padding: 0 4px;
  margin: 0 2px;
  line-height: 1.35;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.cite-pill:hover, .cite-pill.active {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

/* 浮窗 */
.cite-popover {
  position: fixed;
  z-index: 10000;
  max-width: 330px;
  background: #faf5e8;
  border: 1.5px solid var(--ln);
  outline: 1px solid var(--ln2);
  outline-offset: 3px;
  box-shadow: 0 8px 24px rgba(44,37,23,.12);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--w2);
  pointer-events: none;
  transition: opacity .15s var(--ease);
}
.cite-popover h4 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-family: var(--fang);
  color: var(--w);
  font-weight: 400;
  letter-spacing: .06em;
}
.cite-popover .pop-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.cite-popover .pop-snip {
  font-family: var(--song);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--w2);
  margin: 0;
}

/* 教学三联体卡片 (Socratic Triad in Blueprint Style) */
.triad-block {
  margin: 12px 0;
  padding: 12px 16px;
  line-height: 1.85;
  border: 1px solid var(--ln);
}
.triad-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fang);
  font-size: 13.5px;
  letter-spacing: .12em;
  margin-bottom: 6px;
}
.triad-conclusion {
  background: rgba(191,74,38,.04);
  border-left: 3.5px solid var(--red);
}
.triad-conclusion .triad-label { color: var(--red); }
.triad-conclusion .triad-body { font-weight: 500; color: var(--w); }

.triad-pedagogy {
  background: rgba(44,37,23,.025);
  border-left: 3.5px solid var(--w);
}
.triad-pedagogy .triad-label { color: var(--w); }
.triad-pedagogy .triad-body { color: var(--w2); }

.triad-inquiry {
  background: rgba(44,37,23,.018);
  border-left: 3.5px solid var(--w3);
}
.triad-inquiry .triad-label { color: var(--w3); }
.triad-inquiry .inquiry-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action-pill {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  background: rgba(255,251,240,.6);
  color: var(--w2);
  border: 1px solid var(--ln);
  border-radius: 0;
  padding: 4px 12px;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.action-pill:hover {
  border-color: var(--w);
  color: var(--w);
  background: rgba(44,37,23,.08);
}
.action-pill.ask-inquiry-btn {
  border-color: var(--red);
  color: var(--red);
}
.action-pill.ask-inquiry-btn:hover {
  background: rgba(191,74,38,.08);
}

/* 输入区域 */
.composer {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--ln);
  background: rgba(255,251,240,.65);
}
.composer textarea {
  resize: vertical;
  min-height: 60px;
  width: 100%;
}
.composer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips button {
  background: rgba(255,251,240,.5);
  color: var(--w2);
  border: 1px solid var(--ln);
  border-radius: 0;
  padding: 4px 10px;
  font-family: var(--song);
  font-size: 12px;
  letter-spacing: .06em;
  transition: all .16s var(--ease);
}
.chips button:hover {
  border-color: var(--w);
  color: var(--w);
  background: rgba(44,37,23,.05);
}

/* 右栏：语料依据与伴读抽屉 */
.cite-col {
  padding: 16px 14px;
  border-left: 1px solid var(--ln);
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  background: rgba(255,251,240,.3);
}
.cite-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.citations {
  display: grid;
  gap: 9px;
}
.cite {
  appearance: none;
  background: rgba(255,251,240,.6);
  border: 1px solid var(--ln);
  border-radius: 0;
  padding: 11px 12px;
  text-align: left;
  color: var(--w2);
  cursor: pointer;
  transition: all .16s var(--ease);
  position: relative;
}
.cite:hover {
  border-color: var(--w);
  background: #ffffff;
}
.cite.active-target {
  border: 1.5px solid var(--w);
  border-left: 3.5px solid var(--red);
  background: #ffffff;
}
.cite-idx-tag {
  position: absolute;
  top: 9px;
  right: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--red);
  letter-spacing: .06em;
}
.cite .date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--w3);
  letter-spacing: .12em;
  margin-bottom: 3px;
}
.cite h3 {
  font-family: var(--fang);
  font-size: 15.5px;
  font-weight: 400;
  color: var(--w);
  letter-spacing: .06em;
  margin: 0 0 4px;
  line-height: 1.4;
  padding-right: 24px;
}
.cite p {
  font-family: var(--song);
  font-size: 12px;
  color: var(--w3);
  margin: 0;
}
.empty {
  font-size: 13px;
  color: var(--w3);
  font-style: italic;
  padding: 12px 0;
}

/* 伴读抽屉 */
.side-reader {
  background: rgba(255,251,240,.8);
  border: 1px solid var(--ln);
  padding: 14px 16px;
  overflow-y: auto;
  max-height: 100%;
}
.side-story {
  display: grid;
  gap: 8px;
}
.side-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--red);
  letter-spacing: .12em;
}
.side-story h3 {
  font-family: var(--fang);
  font-size: 18px;
  font-weight: 400;
  color: var(--w);
  letter-spacing: .06em;
  line-height: 1.35;
}
.side-path {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--w4);
  letter-spacing: .08em;
  border-bottom: 1px solid var(--ln2);
  padding-bottom: 6px;
}
.side-body {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--w2);
  text-align: justify;
  text-justify: inter-ideograph;
}
.side-body p { margin-bottom: 0.8em; text-indent: 2em; }

.side-codes {
  margin-top: 14px;
  border-top: 1px solid var(--ln);
  padding-top: 10px;
}
.side-codes .code {
  border: 1px solid var(--ln2);
  background: rgba(255,251,240,.5);
  padding: 8px 10px;
  margin-bottom: 6px;
}
.side-codes .code h4 {
  font-family: var(--fang);
  font-size: 13px;
  color: var(--red);
  font-weight: 400;
  margin-bottom: 4px;
}
.side-codes .code dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  font-size: 11.5px;
}
.side-codes .code dt { font-family: var(--mono); color: var(--w3); }
.side-codes .code dd { color: var(--w); }

/* ==========================================================================
   语料柜抽屉与归档表格 (Cabinet)
   ========================================================================== */
.cabinet-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(44,37,23,.4);
  backdrop-filter: blur(4px);
}
.cabinet-sheet {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #faf5e8;
}
.cabinet-inner {
  padding: 24px 32px 32px;
}
.search-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-bottom: 18px;
}
.results {
  display: grid;
  gap: 8px;
}
.result {
  background: rgba(255,251,240,.6);
  border: 1px solid var(--ln);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.result:hover {
  border-color: var(--w);
  background: #ffffff;
}
.result .date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--red);
  letter-spacing: .12em;
}
.result h3 {
  font-family: var(--fang);
  font-size: 16px;
  font-weight: 400;
  color: var(--w);
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.result .meta {
  font-size: 12px;
  color: var(--w3);
}

.reader {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ln);
}
.reader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  margin-top: 16px;
  align-items: start;
}
.story {
  min-width: 0;
}
.story h2 {
  font-family: var(--fang);
  font-size: 22px;
  font-weight: 400;
  color: var(--w);
  margin-bottom: 8px;
  line-height: 1.35;
}
.story-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.story-path {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--w3);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--ln);
}
.story-body {
  font-size: 14.5px;
  line-height: 2.0;
  color: var(--w2);
  text-align: justify;
}
.story-body p { margin-bottom: 1em; text-indent: 2em; }

.codes, .side-codes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.codes {
  border-left: 1px solid var(--ln);
  padding-left: 20px;
}

/* ==========================================================================
   学术规范级语料标注卡片 (Scholarly Codebook Card Layout)
   ========================================================================== */
.code-card {
  background: #fffdf8;
  border: 1px solid #ded7ca;
  border-left: 3.5px solid var(--red, #a2402f);
  padding: 13px 15px;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(44, 37, 23, 0.04);
  transition: all .16s ease;
}
.code-card:hover {
  border-color: #c8bfb0;
  border-left-color: #872314;
  box-shadow: 0 2px 8px rgba(44, 37, 23, 0.08);
}
.code-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ede7db;
}
.code-title {
  font-family: var(--fang, STSong, "Songti SC", serif);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--red, #a2402f);
  letter-spacing: 0.04em;
  margin: 0;
}
.code-conf-tag {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10.5px;
  color: #8c8273;
  background: #f4ede1;
  padding: 1px 6px;
  border-radius: 2px;
}
.code-card-subhead {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #231f20;
  margin-bottom: 9px;
  padding: 5px 8px;
  background: rgba(162, 64, 47, 0.04);
  border-left: 2px solid rgba(162, 64, 47, 0.35);
  border-radius: 0 2px 2px 0;
}
.code-subhead-pill {
  font-size: 10px;
  color: var(--red, #a2402f);
  font-weight: 700;
  background: rgba(162, 64, 47, 0.12);
  padding: 0 5px;
  border-radius: 2px;
  flex-shrink: 0;
}
.code-subhead-text {
  font-weight: 600;
  color: #2e261b;
  word-break: break-word;
}
.code-rows-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.code-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
}
.code-row-stacked {
  flex-direction: column;
  gap: 3px;
  margin-top: 3px;
  margin-bottom: 4px;
}
.code-label {
  font-size: 11px;
  font-weight: 600;
  color: #847969;
  min-width: 58px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.code-row-stacked .code-label {
  color: #5d5446;
  font-size: 11.5px;
}
.code-val {
  color: #2c2517;
  flex: 1;
  word-break: break-word;
}
.code-row-stacked .code-val {
  background: #fbf8f0;
  padding: 6px 10px;
  border-left: 2px solid #d4cca9;
  border-radius: 0 2px 2px 0;
  font-size: 12px;
  line-height: 1.6;
  color: #383126;
  width: 100%;
  box-sizing: border-box;
}
.code-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--mono, monospace);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-support, .badge-yes {
  background: #eaf5eb;
  color: #237827;
  border: 1px solid #c3e6c5;
}
.badge-oppose, .badge-no {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
}
.badge-neutral {
  background: #f3efe6;
  color: #5c5549;
  border: 1px solid #e2dac9;
}
.badge-claim {
  background: #fbf0e8;
  color: #a3481b;
  border: 1px solid #f5d3bd;
}
.code-evidence-wrap {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #ded7c9;
}
.evidence-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}
.evidence-icon {
  color: var(--red, #a2402f);
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
}
.evidence-caption {
  font-size: 11px;
  font-weight: 600;
  color: #7b7161;
  letter-spacing: 0.04em;
}
.evidence-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.evidence-item {
  background: #fbf8f1;
  border-left: 2px solid var(--red, #a2402f);
  padding: 6px 9px;
  border-radius: 0 2px 2px 0;
}
.evidence-idx {
  display: inline-block;
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  color: #8c8273;
  margin-bottom: 2px;
  letter-spacing: 0.04em;
}
.evidence-text {
  font-family: var(--kai, "STKaiti", "KaiTi", serif);
  font-size: 12px;
  line-height: 1.65;
  color: #383025;
  margin: 0;
  text-align: justify;
}
.code-empty {
  padding: 16px;
  text-align: center;
  color: var(--w3);
  font-size: 12px;
}

/* 响应式断点与 taste-skill 视觉体验强化 */
.wire-btn:active, button:active, .portal-tab:active, .prompt-card:active {
  transform: translateY(1px) scale(0.99);
}

/* taste-skill 骨架屏载入动效 (Scholarly Skeleton Shimmer) */
.scholarly-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 12px;
}
.skel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--kai);
  font-size: 13.5px;
  color: var(--cinnabar);
  letter-spacing: .06em;
}
.skel-header::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--cinnabar);
  border-radius: 50%;
  animation: pulseDot 1.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.skel-line {
  height: 12px;
  background: linear-gradient(90deg, rgba(211, 196, 160, 0.2) 0%, rgba(247, 239, 218, 0.75) 50%, rgba(211, 196, 160, 0.2) 100%);
  background-size: 200% 100%;
  animation: skelShimmer 1.6s infinite ease-in-out;
  border-radius: 2px;
}
.skel-line.l1 { width: 92%; }
.skel-line.l2 { width: 78%; }
.skel-line.l3 { width: 64%; }
@keyframes skelShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   高级学术动效核心关键帧 (Scholarly High-End Animation Suite)
   ========================================================================== */
@keyframes stripSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scholarlyFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sealStampIn {
  0% {
    opacity: 0;
    transform: rotate(-12deg) scale(1.28);
    filter: drop-shadow(0 16px 24px rgba(178, 45, 21, 0.4));
  }
  65% {
    opacity: 1;
    transform: rotate(-3deg) scale(0.96);
    filter: drop-shadow(0 2px 6px rgba(178, 45, 21, 0.18));
  }
  100% {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
    filter: drop-shadow(0 2px 8px rgba(178, 45, 21, 0.12));
  }
}

@keyframes consoleEntrance {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambientGlow {
  0%, 100% {
    box-shadow: 0 4px 22px rgba(58, 46, 32, 0.06), 0 1px 2px rgba(58, 46, 32, 0.03);
  }
  50% {
    box-shadow: 0 8px 30px rgba(58, 46, 32, 0.09), 0 1px 3px rgba(178, 45, 21, 0.05);
  }
}

@keyframes radarPing {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(45, 106, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 106, 79, 0);
  }
}

@keyframes buttonShimmer {
  0% {
    left: -120%;
  }
  25%, 100% {
    left: 140%;
  }
}

@keyframes cardCascade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 降低动效偏好适配 (Accessibility Guardrail) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 960px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .rail, .cite-col {
    display: none;
  }
  .strip {
    padding: 8px 14px;
    font-size: 10.5px;
  }
}

@media (max-width: 1200px) {
  .portal-sheet {
    max-width: 96%;
  }
  .portal-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .strip {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 8px 12px;
    height: auto;
  }
  .strip-left, .strip-right {
    flex-wrap: wrap;
    gap: 6px;
  }
  .strip-org {
    display: none;
  }
  .portal-sheet {
    padding-top: 88px;
  }
  .portal-wrapper {
    padding: 8px;
  }
  .portal-content {
    padding: 20px 16px 14px;
  }
  .portal-title {
    font-size: 38px;
    letter-spacing: .18em;
  }
  .portal-brief {
    white-space: normal;
    font-size: 12.5px;
    line-height: 1.6;
  }
  .portal-stat-band {
    flex-direction: column;
    gap: 14px;
    padding: 16px 12px;
  }
  .stat-sep {
    width: 60%;
    height: 1px;
  }
  .portal-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .compliance-box {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .compliance-right {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 10px;
  }
  .portal-tabs {
    flex-wrap: wrap;
  }
  .portal-tab {
    padding: 6px 12px;
    font-size: 12px;
  }
  .portal-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .portal-seal {
    display: none;
  }
}

/* ==========================================================================
   同题对照页 (Compare) · 评测看板 (Eval Board)
   ========================================================================== */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: var(--hei);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: .04em;
}
.toggle input { accent-color: var(--cinnabar); }
.compare-chips {
  margin-top: 10px;
  justify-content: flex-start;
}
.compare-grid {
  max-width: 1400px;
  margin: 22px auto 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  text-align: left;
}
.arm {
  background: var(--paper-hi);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-2);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  box-shadow: 0 1px 4px rgba(107,90,68,.06);
}
.arm-mowen { border-top-color: var(--cinnabar); }
.arm-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.arm-title {
  font-family: var(--kai);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
  line-height: 1.35;
}
.arm-sub {
  font-family: var(--song);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.arm-head > div:first-child {
  flex: 1 1 45%;
  min-width: 200px;
}
.arm-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .06em;
  flex: 0 1 50%;
  max-width: 50%;
  line-height: 1.6;
}
.arm-meta .hint { display: inline; font-size: 10.5px; }
.arm-provider .ext, .ext {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid var(--cinnabar);
  color: var(--cinnabar);
  font-family: var(--hei);
  font-size: 10.5px;
  letter-spacing: .08em;
  border-radius: 2px;
  vertical-align: middle;
}
.arm-body {
  flex: 1;
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  max-height: 560px;
  overflow-y: auto;
}
.arm-body p { margin: 0 0 .8em; }
.arm-body .triad-block { margin: 10px 0; }
.cite-pill.muted {
  color: var(--ink-3);
  border-style: dashed;
  cursor: default;
}
a.cite-pill { text-decoration: none; }
.arm-cites {
  padding: 0 18px 12px;
  display: grid;
  gap: 8px;
}
.arm-cites .cite {
  display: block;
  text-decoration: none;
}
.arm-foot {
  border-top: 1px dashed var(--line);
  padding: 10px 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 42px;
}
.stat-chip {
  font-family: var(--hei);
  font-size: 11.5px;
  letter-spacing: .04em;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: rgba(247,239,218,.6);
  color: var(--ink-2);
  border-radius: 2px;
}
.stat-chip.good { border-color: var(--verdigris); color: var(--verdigris); }
.stat-chip.warn { border-color: var(--cinnabar); color: var(--cinnabar); }
.compare-note {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  padding: 10px 14px;
  border: 1px dashed var(--line-2);
  background: rgba(247,239,218,.5);
  border-radius: 3px;
}
.compare-note p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* 评测看板 */
.eval-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  counter-reset: step;
}
.eval-step {
  position: relative;
  background: var(--paper-hi);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 16px 14px;
  box-shadow: 0 1px 4px rgba(107,90,68,.06);
}
.eval-step::after {
  content: "→";
  position: absolute;
  right: -13px;
  top: 18px;
  color: var(--gold);
  font-family: var(--latin);
  font-size: 16px;
}
.eval-step:last-child::after { content: ""; }
.eval-step .num {
  font-family: var(--latin);
  font-size: 22px;
  font-weight: 700;
  color: var(--cinnabar);
  line-height: 1;
  margin-bottom: 6px;
}
.eval-step h4 {
  font-family: var(--kai);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .04em;
}
.eval-step p {
  font-family: var(--song);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 6px;
}
.eval-step .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: .06em;
}
.status-pill {
  display: inline-block;
  font-family: var(--hei);
  font-size: 11px;
  letter-spacing: .08em;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--ink-2);
  background: rgba(247,239,218,.6);
  white-space: nowrap;
}
.status-pill.ready { border-color: var(--verdigris); color: var(--verdigris); }
.status-pill.later { border-color: var(--gold); color: var(--gold); }
.status-pill.pilot { border-color: var(--cinnabar); color: var(--cinnabar); }
.bar {
  position: relative;
  height: 8px;
  background: rgba(211,196,160,.35);
  border-radius: 2px;
  overflow: hidden;
  min-width: 140px;
}
.bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--gold);
}
.eval-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.eval-card {
  background: var(--paper-hi);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: 3px;
  padding: 14px 16px;
}
.eval-card h4 {
  font-family: var(--latin), var(--kai);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.eval-card p {
  font-family: var(--song);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 4px;
}
.eval-card .use {
  font-family: var(--hei);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: .06em;
}
.results-placeholder {
  border: 1px dashed var(--line-2);
  background: rgba(247,239,218,.5);
  padding: 18px 22px;
  border-radius: 3px;
  font-family: var(--song);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.results-placeholder code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  background: rgba(255,251,240,.9);
  padding: 1px 5px;
  border: 1px solid var(--line);
}
.delta-up { color: var(--verdigris); font-weight: 700; }
.delta-down { color: var(--cinnabar); font-weight: 700; }
.rules-list {
  margin: 0;
  padding-left: 1.4em;
  font-family: var(--song);
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
}
.rules-list li::marker { color: var(--gold); }

@media (max-width: 1100px) {
  .eval-flow { grid-template-columns: repeat(2, 1fr); }
  .eval-step::after { content: ""; }
  .eval-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .compare-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .eval-flow, .eval-cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   2026-09 门户打磨层 · Mast / Inner pages / Proportion / Motion
   ========================================================================== */

:root {
  --kai: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", "Songti SC", serif;
  --latin: "EB Garamond", Georgia, "Times New Roman", serif;
  --song: "LXGW WenKai", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --hei: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --fang: "LXGW WenKai", "FangSong", "STFangsong", var(--kai);
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --motion-quick: 150ms;
  --motion-fast: 250ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
html, body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
body.is-studio,
html:has(body.is-studio) {
  height: 100%;
  overflow: hidden;
}

.wire-btn, button {
  transition: border-color var(--motion-fast) var(--ease-out),
              color var(--motion-fast) var(--ease-out),
              background var(--motion-fast) var(--ease-out),
              transform var(--motion-quick) var(--ease-out),
              box-shadow var(--motion-fast) var(--ease-out);
}
.pillar-card {
  transition: transform var(--motion-fast) var(--ease-out),
              border-color var(--motion-fast) var(--ease-out),
              box-shadow var(--motion-fast) var(--ease-out),
              background var(--motion-fast) var(--ease-out);
}

/* 顶栏：品牌 + 文字导航，替代堆叠 mini 按钮 */
.mast {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 239, 218, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mast-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.mast-mark {
  font-family: var(--kai);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
}
.mast-sub {
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--cinnabar);
  font-weight: 600;
  padding-bottom: 1px;
}
.mast-toggle {
  display: none;
  margin-left: auto;
  min-height: 40px;
  padding: 8px 14px;
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.12em;
  border: 1px solid var(--line-2);
  background: rgba(247, 239, 218, 0.7);
  color: var(--ink);
  border-radius: var(--radius-xs);
}
.mast-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.mast-link {
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-decoration: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px 7px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}
.mast-link:hover {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--gold);
  transform: none;
  box-shadow: none;
}
.mast-link.is-current {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--cinnabar);
}
.mast-time {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 4.6em;
  text-align: right;
}

.portal-wrapper {
  min-height: 100vh;
  height: auto;
  overflow: visible;
}
.portal-sheet { overflow: visible; }
.portal-content {
  justify-content: flex-start;
  padding: 36px 32px 28px;
  max-width: 1180px;
}

/* 首页题头：收一收，不再垂直居中铺满 */
.hero-lockup {
  position: relative;
  text-align: center;
  margin: 8px auto 28px;
  max-width: 760px;
}
.hero-lockup .portal-seal,
.portal-content > .portal-seal {
  position: absolute;
  top: -6px;
  right: 8px;
}
.portal-title {
  font-size: clamp(40px, 5vw, 56px);
  margin: 0 0 4px;
}
.portal-sub-zh {
  font-size: 18px;
  margin-bottom: 4px;
}
.portal-sub-en {
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}
.portal-brief {
  white-space: normal;
  max-width: 36em;
  font-size: 14.5px;
  margin: 0 auto;
}

.search-console,
.portal-cards-grid {
  max-width: 840px;
}
.search-console { margin-bottom: 20px; }
.portal-cards-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.prompt-card { padding: 16px 18px; border-radius: var(--radius-sm); }
.prompt-card-text { font-size: 14px; line-height: 1.7; }
.console-box { border-radius: var(--radius-md); }

.portal-stat-band {
  max-width: 100%;
  margin: 8px auto 28px;
  border-radius: var(--radius-sm);
}
.home-continue {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0 auto 24px;
  flex-wrap: wrap;
}
.home-continue a {
  font-family: var(--hei);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.home-continue a:hover {
  color: var(--cinnabar);
  border-bottom-color: var(--cinnabar);
}

.portal-footer {
  margin-top: 12px;
}

/* 内页：页面题名，而不是再写一遍「墨闻」 */
.inner-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 32px 48px;
}
.page-head {
  text-align: left;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.page-kicker {
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}
.page-title {
  font-family: var(--kai);
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin: 0 0 10px;
}
.page-lead {
  font-family: var(--song);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 46em;
  margin: 0;
}
.inner-main .pillars-grid,
.inner-main .portal-stat-band,
.inner-main .portal-section {
  max-width: 100%;
}
.inner-main .section-header { margin-bottom: 16px; }

.tele-group .tele-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verdigris);
  box-shadow: none;
  animation: none;
}

@media (max-width: 900px) {
  .mast {
    flex-wrap: wrap;
    padding: 8px 14px;
    gap: 8px;
  }
  .mast-toggle { display: inline-flex; }
  .mast-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding: 6px 0 8px;
    border-top: 1px solid var(--line);
    gap: 2px;
  }
  .mast-nav.is-open { display: flex; }
  .mast-link {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    border-bottom: 1px solid var(--line);
  }
  .mast-link.is-current { border-bottom-color: var(--cinnabar); }
  .mast-time { display: none; }
  .mast-sub { display: none; }
  .portal-content, .inner-main { padding: 22px 16px 32px; }
  .hero-lockup .portal-seal,
  .portal-content > .portal-seal { display: none; }
  .portal-cards-grid,
  .pillars-grid { grid-template-columns: 1fr; }
  .portal-stat-band { flex-direction: column; gap: 12px; }
  .stat-sep { width: 40%; height: 1px; }
  .portal-wrapper { padding: 0; }
  .compliance-box { grid-template-columns: 1fr; }
  .compliance-right {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mast { backdrop-filter: none; }
}
a.pillar-card { color: inherit; text-decoration: none; }
.mast-link.as-btn {
  font: inherit;
  letter-spacing: inherit;
}
.mast-nav { flex-wrap: nowrap; }
.pillars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.inner-main .pillar-card { min-height: 100%; }
@media (max-width: 1180px) {
  .mast-sub { display: none; }
}
@media (max-width: 900px) {
  .mast-nav { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .pillars-grid { grid-template-columns: 1fr; }
}
