/* 灵鹿增长 HARTA · 制度风 / 集团总部台面
 * 纸面、墨色、黄铜印记。图是信头，不是壁纸。 */

:root {
  --font-ui: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  /* 字阶：只此六级。正文是 1rem 基准，不进阶梯。 */
  --t-1: 1.75rem;   /* 页面标题 */
  --t-2: 1.24rem;   /* 区块标题 */
  --t-3: 1.06rem;   /* 条目标题 */
  --t-4: 0.94rem;   /* 紧凑正文、导航 */
  --t-5: 0.84rem;   /* 控件、meta */
  --t-6: 0.72rem;   /* 标签、表头、编号 */

  /* 档案体：日期、编号、档位、条数走等宽，中文回落到思源黑。公文感靠它。 */
  --font-meta: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Noto Sans SC", "PingFang SC", monospace;

  --page: oklch(95.6% 0.016 86);
  --wash: oklch(97.2% 0.014 88);
  --bg: oklch(97.8% 0.01 88);
  --panel-2: oklch(93.4% 0.018 86);
  /* 纸色带：比纸面深一档的台面区。透明混合让纸纹透上来，别糊成一块死色 */
  --zone: color-mix(in oklch, var(--panel-2) 78%, transparent);
  --border: oklch(80% 0.022 82);
  --rule: oklch(58% 0.09 76);
  --paper-shadow: 0 1px 0 oklch(100% 0.01 88 / 0.55), 0 18px 40px -28px oklch(28% 0.03 70 / 0.28);
  --ink-1: oklch(22% 0.018 75);
  --ink-2: oklch(38% 0.02 72);
  --ink-3: oklch(38% 0.022 70);
  --accent: oklch(48% 0.072 76);
  --accent-2: oklch(62% 0.09 80);
  --accent-3: oklch(42% 0.05 165);
  --accent-soft: oklch(92% 0.03 82);
  --on-accent: oklch(97% 0.01 88);
  --up: oklch(40% 0.07 160);
  --down: oklch(42% 0.12 25);
  --warn: oklch(55% 0.1 78);
  --shadow: none;
  --shadow-lg: none;
  --r: 2px;
  --r-sm: 2px;
  --rail: oklch(21% 0.014 58);
  --rail-ink: oklch(78% 0.018 95);
  --rail-ink-active: oklch(96% 0.01 88);
  --photo: url("../images/bg-light-hall.jpg");
  --photo-darken: oklch(20% 0.018 80 / 0.4);
  --on-photo: oklch(96% 0.01 88);
  --on-photo-2: oklch(88% 0.02 88);
  --photo-scrim: linear-gradient(165deg, oklch(16% 0.02 80 / 0.72) 0%, oklch(18% 0.02 80 / 0.38) 46%, oklch(14% 0.02 80 / 0.7) 100%);
  --photo-edge: oklch(96% 0.01 88 / 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --space: 8px;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0 0.18  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: light;
}

[data-theme="dark"] {
  --page: oklch(18% 0.012 80);
  --wash: oklch(19% 0.012 80);
  --bg: oklch(21% 0.012 78);
  --panel-2: oklch(24% 0.014 76);
  --zone: color-mix(in oklch, var(--panel-2) 75%, transparent);
  --border: oklch(34% 0.018 78);
  --rule: oklch(68% 0.07 80);
  --ink-1: oklch(93% 0.014 88);
  --ink-2: oklch(78% 0.02 85);
  --ink-3: oklch(72% 0.02 85);
  --accent: oklch(70% 0.07 80);
  --accent-2: oklch(74% 0.08 82);
  --accent-3: oklch(68% 0.04 165);
  --accent-soft: oklch(28% 0.03 78);
  --on-accent: oklch(18% 0.012 80);
  --up: oklch(72% 0.06 160);
  --down: oklch(68% 0.1 25);
  --warn: oklch(74% 0.08 82);
  --rail: oklch(14% 0.01 80);
  --rail-ink: oklch(70% 0.02 85);
  --rail-ink-active: oklch(94% 0.012 88);
  --photo: url("../images/bg-dark-lacquer.jpg");
  --photo-darken: oklch(12% 0.01 80 / 0.35);
  --on-photo: oklch(96% 0.01 88);
  --on-photo-2: oklch(88% 0.02 88);
  --photo-scrim: linear-gradient(165deg, oklch(12% 0.01 80 / 0.55) 0%, oklch(14% 0.01 80 / 0.28) 46%, oklch(10% 0.01 80 / 0.66) 100%);
  --photo-edge: oklch(96% 0.01 88 / 0.12);
  --paper-shadow: 0 1px 0 oklch(100% 0.01 88 / 0.04), 0 24px 48px -32px oklch(0% 0 0 / 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html {
  overflow-x: clip;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-ui);
  color: var(--ink-1);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  font-kerning: normal;
  background:
    linear-gradient(180deg, var(--wash), var(--page) 28%),
    var(--page);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  accent-color: var(--accent);
  text-underline-offset: 0.18em;
}
/* 纸纹压在纸上，不压在字和按钮上：z-index 为负，落在正文之下。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.34;
  background-image: var(--grain);
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::before {
  opacity: 0.2;
  mix-blend-mode: overlay;
}

::selection {
  background: color-mix(in oklch, var(--accent) 26%, var(--page));
  color: var(--ink-1);
}
::placeholder { color: var(--ink-3); opacity: 1; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a { color: inherit; text-decoration: none; }
button, a, .do, .go, .eye, .verdict, .textish { touch-action: manipulation; }

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 80;
  background: var(--ink-1);
  color: var(--bg);
  padding: 10px 16px;
  min-height: 44px;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip:focus {
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* 档案体统一落点：日期、编号、档位、条数、字段名。中文照旧走思源黑。 */
.meta, .who, .tag, .brand-line,
.history .when, .history .meta, .hook-facts, .chapter-name, .field-k, .slip-k,
.folio-cell .k, .sleeve-tab, .plat h3, th,
.pack .letterhead span {
  font-family: var(--font-meta);
  font-variant-numeric: tabular-nums;
}

/* ——— 主台 ——— */
.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100dvh;
}

.rail {
  background:
    linear-gradient(180deg, oklch(25% 0.016 58), var(--rail) 22%),
    var(--rail);
  color: var(--rail-ink);
  padding: 36px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--rule);
}
.brand {
  color: var(--rail-ink-active);
  margin: 0 8px 36px;
}
.logo {
  display: block;
  width: 172px;
  height: auto;
  object-fit: contain;
}
.gate-panel .logo { width: min(220px, 64%); }
.pack .letterhead .logo { width: 132px; }
.brand-line {
  margin-top: 10px;
  font-size: var(--t-6);
  letter-spacing: 0.08em;
  color: var(--rail-ink);
  white-space: nowrap;
}
.gate-panel .brand-line { color: var(--on-photo-2); }
.pack .brand-line { color: var(--ink-3); letter-spacing: 0.08em; }
.brand small,
.gate-sub,
.brand .mark,
.mark { display: none; }
.rail nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail a, .rail button.linkish {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--rail-ink);
  padding: 10px 12px;
  border-radius: 0;
  cursor: pointer;
  border-left: 2px solid transparent;
  letter-spacing: 0.04em;
  font-size: var(--t-4);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.rail a:hover, .rail button.linkish:hover {
  color: var(--rail-ink-active);
}
.rail a.on, .rail button.linkish.on {
  background: transparent;
  color: var(--rail-ink-active);
  box-shadow: none;
  border-left-color: var(--accent-2);
}
.rail #nav-logout {
  margin-top: 28px;
}

.main {
  min-width: 0;
  padding: 0 0 88px;
  background: transparent;
}
.mast {
  height: 92px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 56px 12px;
  background:
    linear-gradient(180deg, oklch(22% 0.02 80 / 0.18), oklch(18% 0.02 80 / 0.72)),
    var(--photo) center 40% / cover no-repeat;
  border-bottom: 1px solid var(--rule);
}
[data-theme="dark"] .mast {
  background:
    linear-gradient(180deg, oklch(12% 0.01 80 / 0.3), oklch(10% 0.01 80 / 0.74)),
    var(--photo) center 42% / cover no-repeat;
}
.mast span {
  font-family: var(--font-meta);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-6);
  letter-spacing: 0.18em;
  line-height: 1.4;
  color: var(--on-photo);
}
.mast span:last-child { color: var(--on-photo-2); letter-spacing: 0.12em; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 56px 10px;
}
.who {
  color: var(--ink-3);
  font-size: var(--t-5);
  letter-spacing: 0.12em;
}
.tools { display: flex; gap: 8px; }

section[data-view] { padding: 0 56px; }

.hook {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 20px 0 8px;
  box-shadow: none;
  margin-bottom: 0;
  backdrop-filter: none;
}
.hook h1 {
  font-family: var(--font-display);
  font-size: var(--t-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-wrap: balance;
  max-width: 22em;
}
.hook .meta { margin-top: 12px; max-width: 68ch; }
/* 大标题下面那行事实：日期、条数、主战场。都是要抄进台账的数，走档案体 */
.hook-facts {
  margin-top: 10px;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.hook-facts:empty { display: none; }
.hook-facts .sep {
  font-style: normal;
  color: var(--accent);
  margin: 0 10px;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 8px 0 20px;
}
/* 历史档逐条不画线：日期列的档案体就是分栏。线只在选中时出现——那时它是状态，不是分隔 */
.history button {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 16px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 12px 0;
  cursor: pointer;
  border-radius: 0;
}
.history button.on { box-shadow: inset 0 -2px 0 var(--rule); }
.history button .when { color: var(--ink-3); font-size: var(--t-6); letter-spacing: 0.08em; }
.history button .what { font-family: var(--font-display); font-size: var(--t-3); }

.win {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 24px 0 4px;
  font-size: var(--t-4);
  color: var(--ink-2);
}
.win b { color: var(--ink-2); font-weight: 500; font-size: var(--t-6); letter-spacing: 0.12em; margin-right: 2px; vertical-align: 0.16em; }
/* 检查清单的等级词（红线/看一眼/发不出去）升为 label 角色，别混在正文里 */
#checks .line b {
  font-family: var(--font-meta);
  font-weight: 500;
  font-size: var(--t-6);
  letter-spacing: 0.12em;
  color: var(--ink-2);
  margin-right: 2px;
  vertical-align: 0.16em;
}

.card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  margin-top: 36px;
}
.card h2 {
  font-family: var(--font-display);
  font-size: var(--t-2);
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.card h2 .tag { margin-left: 8px; vertical-align: 0.18em; }
/* 纸色带让位给出活章的整章台面：封面回到本色纸，锚点交给右边的章 */
.card-id { margin-top: 24px; }
.cover-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
/* 关防章：黄铜描边、档案体、微微歪一点——章是盖上去的，没有一张章是正的 */
.stamp {
  flex: none;
  display: inline-block;
  white-space: pre-line;
  text-align: center;
  font-family: var(--font-meta);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-6);
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.7;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r);
  padding: 6px 12px;
  transform: rotate(-3deg);
  margin-top: 2px;
}
.meta { color: var(--ink-3); font-size: var(--t-5); letter-spacing: 0.02em; }

/* 章节脊：章节名竖排钉在左脊上，跟着滚动走。文档变卷宗，靠的就是这一笔 */
.chapter {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  column-gap: 20px;
  margin-top: 56px;
}
/* 卡片必须钉死在右栏：不写这条，grid 自动排布会把隔一张的卡塞进 3.4rem 的书脊栏，挤成一列一字 */
.chapter > .card { grid-column: 2; }
.chapter-name {
  writing-mode: vertical-rl;
  align-self: start;
  position: sticky;
  top: 24px;
  font-size: var(--t-6);
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--accent);
  padding-left: 14px;
  border-left: 1px solid var(--rule);
}
.chapter .card:first-of-type {
  margin-top: 0;
}
/* 出活章坐整章纸色带：上半页读、下半页取用，纸的明暗自己分区 */
.chapter-take {
  margin: 56px -56px 0;
  padding: 24px 56px 48px;
  background: var(--zone);
}

/* 纸格：需求四问、投放三段。截谁重，别打谁收。 */
.folio {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.folio-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.folio-cell {
  padding: 16px 18px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.folio-cell:nth-child(2n) { border-right: 0; }
.folio-3 .folio-cell:nth-child(2n) { border-right: 1px solid var(--border); }
.folio-3 .folio-cell:nth-child(3n) { border-right: 0; }
.folio-cell:nth-last-child(-n+2) { border-bottom: 0; }
.folio-3 .folio-cell { border-bottom: 0; }
.folio-cell .k {
  font-size: var(--t-6);
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}
.folio-cell p { color: var(--ink-2); font-size: var(--t-4); }
.folio-cell p + p { margin-top: 4px; }
.folio-cell.is-who {
  background: color-mix(in oklch, var(--accent-soft) 70%, var(--bg));
}
.folio-cell.is-who p:not(.k) {
  color: var(--ink-1);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}
.folio-cell.is-skip {
  background: color-mix(in oklch, var(--down) 7%, var(--bg));
}
.folio-cell.is-skip .k { color: var(--down); }
[data-theme="dark"] .folio-cell.is-who {
  background: color-mix(in oklch, var(--accent) 18%, var(--bg));
}
[data-theme="dark"] .folio-cell.is-skip {
  background: color-mix(in oklch, var(--down) 16%, var(--bg));
}
.pack .folio-3 { grid-template-columns: 1fr; }
.pack .folio-3 .folio-cell,
.pack .folio-3 .folio-cell:nth-child(2n),
.pack .folio-3 .folio-cell:nth-child(3n) {
  border-right: 0;
  border-bottom: 1px solid var(--border);
}
.pack .folio-3 .folio-cell:last-child { border-bottom: 0; }

/* 函套：缺口编号在左，文案组名在上。有回音加黄铜棱。 */
.sleeves { display: flex; flex-direction: column; margin-top: 8px; }
.sleeve {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  margin-top: 26px;
}
.sleeve:first-child { margin-top: 0; }
.sleeve-tab {
  padding: 16px 8px 12px 0;
  color: var(--accent);
  font-size: var(--t-6);
  letter-spacing: 0.1em;
  line-height: 1.4;
}
.sleeve-body { padding: 16px 0 0; min-width: 0; }
.sleeve-body > h3 {
  font-family: var(--font-display);
  font-size: var(--t-3);
  font-weight: 600;
  margin: 0 0 10px;
}
.sleeve-across {
  display: block;
  border-top: 0;
  margin-top: 48px;
}
.sleeve-across:first-child { margin-top: 12px; }
.sleeve-across .sleeve-tab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 0 0 8px;
}
.sleeve-across .sleeve-tab span:first-child {
  font-family: var(--font-display);
  font-size: var(--t-3);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-1);
}
/* 组编号：黄铜档案号，和「缺口一」「问一」同一门语言。销售可以说「用组二那条」 */
.sleeve-num {
  font-family: var(--font-meta);
  font-style: normal;
  font-size: var(--t-6);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-right: 10px;
  vertical-align: 0.08em;
}
.sleeve-across .sleeve-tab span:last-child {
  font-size: var(--t-6);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  font-weight: 400;
}
/* 有回音的组是这页唯一的印记线：别的组头都不画线，它画，贵就贵在人少 */
.sleeve-across.is-hot .sleeve-tab { border-bottom: 2px solid var(--rule); padding-bottom: 7px; }
.sleeve-across .sleeve-body { padding: 2px 0 0; }
/* 文案条：组内靠留白分条，不再一条一根线把纸切成表 */
.sleeve-across .sleeve-body > .line {
  border-top: 0;
  padding: 20px 0 0;
}
.sleeve-across .sleeve-body > .line:first-child { padding-top: 12px; }
.sleeve-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  margin: 4px 0 10px;
}
.sleeve-fields .full { grid-column: 1 / -1; }
.field-k {
  font-size: var(--t-6);
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 8px 36px;
  margin-top: 14px;
  align-items: start;
}
.field-grid-one { grid-template-columns: minmax(0, 36rem); }
/* 带正文的平台横跨两栏：小红书的正文挤在窄栏里没法读 */
.field-col-wide { grid-column: 1 / -1; margin-top: 8px; }
.field-col { min-width: 0; }
/* 换外壳是次战场：内容降一档，别和主战场同重 */
.field-col-quiet .line-text { font-size: var(--t-4); }
.plats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  margin-top: 18px;
}
.plat {
  background: transparent;
  border-radius: 0;
  padding: 0;
  min-width: 0;
}
.plat + .plat { margin-top: 18px; }
.plat h3 {
  font-family: var(--font-ui);
  font-size: var(--t-6);
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.plat.is-main h3 { border-bottom: 2px solid var(--rule); padding-bottom: 7px; color: var(--ink-1); }
.plat.is-shell h3 { color: var(--ink-3); }

.notes { margin-top: 8px; }
.note {
  padding: 22px 0 0;
}
.note:first-child { padding-top: 12px; }
.note h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  /* 拆解层的引句比货架层的资产轻一档：这里是解释，不是拿来用的 */
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 6px;
}
.note p { color: var(--ink-2); }
.line {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 18px 0 0;
  margin-bottom: 0;
}
.line:first-child { padding-top: 10px; }
.line p { color: var(--ink-1); font-size: 1rem; text-wrap: pretty; }
/* 文案原句是要拿走的资产：升一档字重，压过下面的操作排 */
.line-text { font-weight: 500; }
/* 小红书正文的分行是内容的一部分，复制出去带换行，预览也得看得出来 */
.asis { white-space: pre-line; }
/* 就地改一条。照表单输入框那套走，别在这儿另起一套颜色 */
.edit-box {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--accent);
  background: var(--bg);
  border-radius: var(--r);
  font-size: 1rem;
  resize: vertical;
}
.edit-box:focus { outline: none; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acts-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 4px;
}
.line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.line-row .do { margin-top: 0; }

.slip-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: 12px;
}
.slip-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.slip-k {
  font-size: var(--t-6);
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.verdict {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 8px 0;
  min-height: 44px;
  min-width: 44px;
  border-radius: 0;
  cursor: pointer;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  box-shadow: inset 0 -1px 0 var(--border);
}
.verdict:hover { color: var(--ink-1); box-shadow: inset 0 -1px 0 var(--ink-2); }
.verdict:active { transform: scale(0.98); }
.verdict.on-yes { color: var(--up); box-shadow: inset 0 -1px 0 var(--up); }
.verdict.on-no { color: var(--down); box-shadow: inset 0 -1px 0 var(--down); }

.textish {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  padding: 8px 0;
  min-height: 44px;
  min-width: 44px;
  border-radius: 0;
  cursor: pointer;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  box-shadow: none;
}
.textish:hover { color: var(--ink-1); }
.textish:active { transform: none; }
.textish.on-yes { color: var(--up); }
.textish.on-no { color: var(--down); }
.textish:disabled { opacity: 0.4; cursor: not-allowed; }

.btn, .do {
  border: 1px solid var(--ink-1);
  background: var(--ink-1);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: var(--r);
  cursor: pointer;
  letter-spacing: 0.06em;
  font-size: var(--t-5);
  min-height: 44px;
  box-shadow: inset 0 1px 0 oklch(100% 0.01 88 / 0.14);
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}
.btn:active, .do:active { transform: scale(0.98); }
.btn:hover, .do:hover { background: color-mix(in oklch, var(--ink-1) 88%, var(--accent)); }
.btn.gold {
  background: transparent;
  color: var(--ink-1);
  border-color: var(--accent);
}
.btn.gold:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.btn.ghost {
  background: transparent;
  color: var(--ink-1);
  border-color: var(--border);
}
.btn.ghost:hover { border-color: var(--ink-2); }
.btn.tiny { font-size: var(--t-6); padding: 6px 10px; min-height: 44px; letter-spacing: 0.04em; }
.do {
  font-size: var(--t-6);
  padding: 5px 12px;
  min-height: 32px;
  letter-spacing: 0.04em;
}
@media (pointer: coarse) {
  .do { min-height: 44px; padding: 10px 14px; }
}
.btn:disabled, .do:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.on-yes { background: var(--up); border-color: var(--up); color: oklch(98% 0.01 160); }
.btn.on-no { background: var(--down); border-color: var(--down); color: oklch(98% 0.01 25); }

.chase { display: grid; gap: 0; }
.chase .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 12px 0;
  border-radius: 0;
  background: transparent;
}
/* 条目名升到条目标题一级，跟历史档按钮同一层级，扫列表时名字先出来 */
.chase .row strong {
  display: block;
  font-weight: 600;
  font-size: var(--t-3);
  line-height: 1.4;
  margin-bottom: 2px;
}
.tag {
  display: inline;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-3);
}
.go {
  border: 0;
  background: transparent;
  color: var(--ink-1);
  font-weight: 600;
  font-size: var(--t-5);
  min-height: 44px;
  padding: 0;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 transparent;
}
.go:hover { color: var(--accent); box-shadow: inset 0 -1px 0 var(--rule); }
.go:active { transform: scale(0.98); }
.go:disabled { opacity: 0.4; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); }
th {
  color: var(--ink-3);
  font-size: var(--t-6);
  font-weight: 500;
  letter-spacing: 0.14em;
}
td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 台账：日期和结果是这表要一列列扫的东西，日期走档案体，结果加重 */
td:first-child { font-family: var(--font-meta); font-size: var(--t-5); }
td:nth-child(4) { font-weight: 500; }
td:last-child { color: var(--ink-2); }

.form { max-width: 36rem; }
.form label {
  display: block;
  font-size: var(--t-6);
  /* 字段之间靠留白分，不靠线分 */
  font-weight: 500;
  letter-spacing: 0.12em;
  margin: 20px 0 6px;
  color: var(--ink-2);
}
.form > label:first-of-type { margin-top: 4px; }
.form input, .form select, .form textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid transparent;
  background: var(--panel-2);
  border-radius: var(--r);
  font-size: 1rem;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.form input:hover, .form select:hover, .form textarea:hover {
  border-color: var(--border);
}
.form input:focus, .form select:focus, .form textarea:focus,
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
}
.form textarea { min-height: 90px; }
.form input:-webkit-autofill,
.form input:-webkit-autofill:hover,
.form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink-1);
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--accent);
}

/* ——— 建档附件：像一张附件清单，不做上传卡片墙 ——— */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.material-desk {
  margin-top: 28px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--border);
}
.material-heading,
.analysis-head,
.material-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.material-heading h3 { font-size: var(--t-3); font-weight: 600; line-height: 1.4; }
.material-heading .meta { margin-top: 2px; }
.folio-no,
.analysis-head > span {
  font-family: var(--font-meta);
  font-size: var(--t-6);
  letter-spacing: 0.14em;
  color: var(--ink-3);
  white-space: nowrap;
}
.material-drop {
  margin-top: 16px;
  min-height: 118px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  border: 1px dashed var(--border);
  background: color-mix(in oklch, var(--panel-2) 48%, transparent);
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.material-drop:hover,
.material-drop.dragging { border-color: var(--accent); background: var(--accent-soft); }
.material-drop strong { font-size: var(--t-4); font-weight: 600; }
.material-drop span { margin-top: 2px; color: var(--ink-2); font-size: var(--t-5); }
.material-drop small { margin-top: 8px; color: var(--ink-3); font-size: var(--t-6); }
.link-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}
.link-line .btn { min-width: 92px; }
.material-queue { margin-top: 12px; }
.material-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}
.material-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-meta);
  font-size: var(--t-6);
}
.material-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--t-5);
  line-height: 1.4;
}
.material-name small { display: block; color: var(--ink-3); font-size: var(--t-6); }
.material-actions { align-items: center; margin-top: 16px; }
.material-actions .meta { text-align: right; }
.material-analysis {
  margin-top: 24px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--rule);
  animation: rise 260ms var(--ease) both;
}
.material-record {
  margin-top: 30px;
  padding: 22px 0 26px;
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--border);
  animation: rise 260ms var(--ease) both;
}
.material-record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.material-record-head h2 { margin-top: 2px; }
.record-k {
  color: var(--accent);
  font-family: var(--font-meta);
  font-size: var(--t-6);
  letter-spacing: 0.18em;
}
.material-record-pitch {
  margin-top: 14px;
  padding: 10px 14px;
  background: color-mix(in oklch, var(--accent-soft) 72%, var(--bg));
  color: var(--ink-1);
  font-size: var(--t-4);
  line-height: 1.65;
}
.analysis-head { align-items: center; }
.analysis-head .textish { color: var(--accent); }
.analysis-overview { margin-top: 12px; font-size: var(--t-4); color: var(--ink-1); }
.analysis-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 20px;
  margin-top: 22px;
}
.analysis-columns section { border-top: 1px solid var(--border); padding-top: 9px; }
.analysis-columns h4 {
  font-family: var(--font-meta);
  font-size: var(--t-6);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-weight: 500;
}
.analysis-columns ul { margin: 7px 0 0 1.1em; }
.analysis-columns li { margin-top: 4px; font-size: var(--t-5); color: var(--ink-2); }
.analysis-sources { margin-top: 24px; }
.analysis-source-head,
.analysis-source-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.analysis-source-head {
  grid-template-columns: 1fr auto;
  min-height: 34px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  font-family: var(--font-meta);
  font-size: var(--t-6);
  letter-spacing: 0.1em;
}
.analysis-source-row {
  min-height: 54px;
  border-bottom: 1px solid var(--border);
}
.analysis-source-no {
  color: var(--accent);
  font-family: var(--font-meta);
  font-size: var(--t-6);
}
.analysis-source-row strong {
  display: block;
  color: var(--ink-1);
  font-size: var(--t-5);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.analysis-source-row small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: var(--t-6);
  line-height: 1.45;
}
.analysis-source-row em {
  color: var(--ink-3);
  font-family: var(--font-meta);
  font-size: var(--t-6);
  font-style: normal;
  letter-spacing: 0.06em;
}
.analysis-transcripts { margin-top: 20px; }
.analysis-transcripts details { border-top: 1px solid var(--border); }
.analysis-transcripts summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--font-meta);
  font-size: var(--t-6);
  letter-spacing: 0.08em;
}
.analysis-transcripts p {
  padding: 4px 0 16px;
  color: var(--ink-2);
  font-size: var(--t-5);
  white-space: pre-wrap;
}
.analysis-warning { margin-top: 18px; color: var(--warn); }

/* ——— 甲方包裹 ——— */
.pack {
  max-width: 68ch;
  margin: 0 auto;
  background: var(--bg);
  padding: 64px 40px 112px;
  min-height: 100dvh;
  box-shadow: var(--paper-shadow);
  animation: rise 400ms var(--ease) both;
}
.pack .letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.pack .letterhead span {
  font-size: var(--t-6);
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.pack h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 600;
  margin: 12px 0 20px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pack h2 {
  font-family: var(--font-display);
  font-size: var(--t-3);
  margin: 48px 0 14px;
}
.pack section > p { margin-bottom: 8px; color: var(--ink-2); }
.gap {
  background: transparent;
  border: 0;
  margin-top: 24px;
  margin-bottom: 4px;
}
.gap h3 {
  font-family: var(--font-display);
  font-size: var(--t-3);
  font-weight: 600;
  margin: 0 0 10px;
}
.gap p { margin-bottom: 8px; color: var(--ink-2); }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.eye {
  position: absolute;
  right: 2px;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  line-height: 0;
}
.eye svg { display: block; }
.eye:hover, .eye.is-on { color: var(--ink-1); }
.eye:focus-visible {
  outline: none;
  color: var(--accent);
  box-shadow: inset 0 -1px 0 var(--accent);
}
.tabs {
  display: flex;
  gap: 24px;
  margin: 8px 0 28px;
}
.tabs a {
  padding: 8px 0 10px;
  border-radius: 0;
  border: 0;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  font-size: var(--t-5);
}
.tabs a:hover { color: var(--ink-1); }
.tabs a.on {
  background: transparent;
  color: var(--ink-1);
  font-weight: 500;
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--rule);
}
.hidden { display: none !important; }
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  background: var(--ink-1);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  box-shadow: var(--paper-shadow);
}

/* ——— 登录 / 注册 ——— */
.gate {
  display: grid;
  grid-template-columns: minmax(280px, 42vw) minmax(0, 1fr);
  min-height: 100dvh;
}
.gate-panel {
  position: relative;
  color: var(--on-photo);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    var(--photo-scrim),
    var(--photo) center / cover no-repeat;
  box-shadow: inset -1px 0 0 var(--photo-edge);
}
.gate-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px clamp(32px, 7vw, 88px);
  background: var(--bg);
  box-shadow: -28px 0 56px oklch(24% 0.03 70 / 0.08);
}
.gate-form > * { width: 100%; max-width: 26rem; }
.gate-form .hook {
  border-bottom: 0;
  padding: 0 0 8px;
}
.gate-form .hook h1 {
  font-size: var(--t-1);
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 20px 16px 12px;
  }
  .brand { width: 100%; margin-bottom: 8px; }
  .rail nav { flex-direction: row; flex-wrap: wrap; }
  .rail a, .rail button.linkish { width: auto; min-width: 64px; }
  .rail #nav-logout { margin-top: 0; }
  .plats,
  .folio, .folio-3, .field-grid, .sleeve-fields { grid-template-columns: 1fr; }
  .folio-cell,
  .folio-cell:nth-child(2n),
  .folio-3 .folio-cell,
  .folio-3 .folio-cell:nth-child(2n),
  .folio-3 .folio-cell:nth-child(3n) { border-right: 0; }
  .folio-cell,
  .folio-cell:nth-last-child(-n+2),
  .folio-3 .folio-cell { border-bottom: 1px solid var(--border); }
  .folio-cell:last-child,
  .folio-3 .folio-cell:last-child { border-bottom: 0; }
  .sleeve { grid-template-columns: 1fr; }
  .sleeve-tab { padding: 12px 0 6px; }
  .sleeve-body { padding: 8px 0 14px; }
  .sleeve-fields .full { grid-column: auto; }
  .line-row { grid-template-columns: 1fr; }
  .line-row .do { justify-self: start; }
  /* 窄屏放不下书脊：章节名回横排，线跟着回来 */
  .chapter { display: block; margin-top: 48px; }
  .chapter-name {
    writing-mode: horizontal-tb;
    position: static;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0 0 10px;
    letter-spacing: 0.2em;
  }
  .chapter-take { margin: 48px -16px 0; padding: 20px 16px 36px; }
  .topbar, section[data-view] { padding-left: 16px; padding-right: 16px; }
  .card-id { margin: 24px -16px 0; padding: 20px 16px 24px; }
  .tools { width: 100%; }
  .hook h1 { max-width: none; }
  .mast { height: 56px; padding: 0 16px 10px; }
  .mast span { font-size: var(--t-6); letter-spacing: 0.06em; }
  .gate { grid-template-columns: 1fr; }
  .gate-panel { min-height: 148px; padding: 28px 24px; }
  .logo { width: 140px; }
  .brand-line { letter-spacing: 0.04em; }
  .pack { padding: 40px 20px 80px; }
  .pack .letterhead { align-items: flex-start; gap: 8px; }
  .pack .brand-line { white-space: normal; }
  .analysis-columns { grid-template-columns: 1fr; }
  .analysis-source-row { grid-template-columns: 28px minmax(0, 1fr); padding: 8px 0; }
  .analysis-source-row em { grid-column: 2; }
  .link-line { grid-template-columns: 1fr; }
  .link-line .btn { justify-self: start; }
  .material-actions { align-items: flex-start; flex-direction: column; }
  .material-actions .meta { text-align: left; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.history button { transition: color 180ms var(--ease); }
.history button:hover .what { color: var(--accent); }
.line p { transition: color 180ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .pack { animation: none; }
}

/* ——— 模型接口：一个渠道一张卡，密钥地址各行其是，模型按能力分栏 ——— */
.llm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.llm-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--r);
  margin-top: 0;
}
/* 正在出档的那张卡描一圈铜边，扫一眼就知道现在用的是谁 */
.llm-card.is-active {
  border-color: color-mix(in oklch, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 30%, transparent);
}
.llm-card.is-dragging { opacity: 0.55; }
.llm-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-bottom: 1px solid var(--border);
}
.llm-card.is-folded .llm-head { border-bottom-color: transparent; }
.llm-grip {
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  cursor: grab;
  padding: 12px 4px;
  line-height: 0;
}
.llm-grip:active { cursor: grabbing; }
.llm-fold {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: var(--r);
}
.llm-fold:hover { color: var(--ink-1); background: var(--zone); }
.llm-name { flex: 1; min-width: 0; font-size: var(--t-3); font-weight: 600; margin: 0; }
/* 名字就是卡片标题，输入框藏成一根下划线，点了才现形 */
.llm-name input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 0;
  font-size: var(--t-3);
  font-weight: 600;
  border-radius: 0;
  min-height: 0;
}
.llm-name input:hover { box-shadow: inset 0 -1px 0 var(--border); }
.llm-name input:focus,
.llm-name input:focus-visible {
  outline: none;
  box-shadow: inset 0 -1px 0 var(--accent);
}
.llm-live {
  border: 0;
  background: transparent;
  color: color-mix(in oklch, var(--ink-3) 55%, transparent);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: var(--r);
}
.llm-live:hover { color: var(--ink-2); }
.llm-live.is-on { color: var(--up); }
.llm-head-acts { display: inline-flex; gap: 6px; flex: none; }
.llm-docs { text-decoration: none; display: inline-flex; align-items: center; }
.llm-body { padding: 2px 14px 14px; }
.llm-card.is-folded .llm-body { display: none; }
.llm-field-k {
  display: block;
  font-size: var(--t-6);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  margin: 12px 0 6px;
}
.llm-fields > .llm-field-k:first-child { margin-top: 12px; }
.llm-fields > .meta { margin: 8px 0 0; }
.llm-fields input,
.llm-fields select,
.llm-add-row input,
.llm-add-card input,
.llm-vision select {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid transparent;
  background: var(--panel-2);
  border-radius: var(--r);
  font-size: var(--t-4);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
/* .pass-wrap 的右侧眼睛位在通用内边距之后补回来，两套规则同一优先级，靠后声明赢 */
.llm-fields .pass-wrap input { padding-right: 48px; }
.llm-fields input:hover,
.llm-fields select:hover,
.llm-add-row input:hover,
.llm-add-card input:hover,
.llm-vision select:hover {
  border-color: var(--border);
}
.llm-fields input:focus,
.llm-fields input:focus-visible,
.llm-fields select:focus,
.llm-add-row input:focus,
.llm-add-row input:focus-visible,
.llm-add-card input:focus,
.llm-vision select:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
}
/* 已存的密钥只露掩码，一根横放的等宽字条加一支改笔 */
.llm-key-view {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 0 4px 0 14px;
  min-height: 44px;
}
.llm-key-view:hover { border-color: var(--border); }
.llm-key-view code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-meta);
  font-size: var(--t-5);
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.llm-key-edit {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: var(--r);
}
.llm-key-edit:hover { color: var(--accent); }
.llm-base-add {
  width: 100%;
  min-height: 44px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--ink-2);
  border-radius: var(--r);
  cursor: pointer;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
}
.llm-base-add:hover { border-color: var(--accent); color: var(--ink-1); }
.llm-tabs {
  display: flex;
  gap: 2px 18px;
  border-bottom: 1px solid var(--border);
  margin-top: 14px;
}
.llm-tab {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  padding: 8px 2px;
  min-height: 44px;
  cursor: pointer;
  font-size: var(--t-5);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 transparent;
  transition: box-shadow 160ms var(--ease), color 160ms var(--ease);
}
.llm-tab:hover { color: var(--ink-1); }
.llm-tab.is-on {
  color: var(--ink-1);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.llm-count {
  font-family: var(--font-meta);
  font-weight: 400;
  font-size: var(--t-6);
  color: var(--ink-3);
  background: var(--zone);
  padding: 1px 6px;
  border-radius: var(--r);
}
.llm-tab.is-on .llm-count { color: var(--accent); background: var(--accent-soft); }
.llm-model-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.llm-cat { font-size: var(--t-6); letter-spacing: 0.14em; color: var(--ink-2); font-weight: 500; }
.llm-model-acts { display: inline-flex; gap: 16px; }
.llm-model-acts .textish { padding: 4px 0; min-height: 36px; }
.llm-add-row { display: flex; gap: 8px; margin-top: 8px; }
.llm-add-row input { flex: 1; }
.llm-vision { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.llm-vision .llm-field-k { margin: 0; }
.llm-vision select { width: auto; min-width: 9em; min-height: 36px; padding: 6px 10px; }
.llm-vision .do { min-height: 36px; }
.llm-models {
  margin-top: 8px;
  border: 1px solid var(--border);
  max-height: 340px;
  overflow: auto;
  background: var(--bg);
}
.llm-models::-webkit-scrollbar { width: 8px; }
.llm-models::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.llm-model {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.llm-model:last-child { border-bottom: 0; }
.llm-model:hover { background: var(--zone); }
.llm-model-txt { min-width: 0; }
.llm-model strong {
  display: block;
  font-size: var(--t-4);
  font-weight: 500;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.llm-model code {
  display: block;
  font-family: var(--font-meta);
  font-size: var(--t-6);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 关着的模型整个降一档，扫过去就知道哪些现在算数 */
.llm-model.is-off strong,
.llm-model.is-off code { opacity: 0.5; }
.llm-model.is-current {
  background: color-mix(in oklch, var(--accent-soft) 55%, var(--bg));
  box-shadow: inset 2px 0 0 var(--accent);
}
.llm-model.is-current:hover { background: color-mix(in oklch, var(--accent-soft) 80%, var(--bg)); }
.llm-now {
  display: inline-block;
  margin-left: 8px;
  font-size: var(--t-6);
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 45%, transparent);
  padding: 0 6px;
  border-radius: var(--r);
  vertical-align: 0.14em;
  font-weight: 500;
}
.llm-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: var(--r);
  cursor: pointer;
  padding: 0;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.llm-toggle .llm-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--ink-3);
  border-radius: var(--r);
  transition: transform 180ms var(--ease), background 160ms var(--ease);
}
.llm-toggle.is-on { background: var(--up); border-color: var(--up); }
.llm-toggle.is-on .llm-knob { transform: translateX(18px); background: oklch(97% 0.01 88); }
.llm-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 45%, transparent); }
.llm-empty { padding: 16px 14px; }
.llm-empty .meta { margin: 0; }
.llm-foot { margin-top: 8px; }
.llm-foot .textish:hover { color: var(--down); }
.llm-add-card { border-style: dashed; background: transparent; padding: 16px 14px; }
.llm-add-card strong { display: block; font-size: var(--t-3); font-weight: 600; }
.llm-add-card .meta { margin-top: 4px; }
.llm-add-card input { margin-top: 10px; }
@media (max-width: 980px) {
  .llm-grid { grid-template-columns: 1fr; }
}
