/* ============================================================
   Method DS · v4 · Components
   ----------------------------------------------------
   Bento Editorial · 粉彩拼贴 + 方格纸纹理 + 编辑衬线
============================================================ */

/* ============================================================
   ① Buttons · pill 按钮 + 1.4s 光扫
============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 17px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.28px;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
  transition: left 0s;
}
.btn:hover::before { left: 100%; transition: left var(--t-sweep) var(--ease); }

.btn--primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--primary:hover { background: var(--ink-deep); border-color: var(--ink-deep); }

.btn--accent { background: var(--accent); color: var(--cream); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

.section--dark .btn--ghost { border-color: var(--cream); color: var(--cream); }
.section--dark .btn--ghost:hover { background: var(--cream); color: var(--ink); }

.btn--lg { padding: 16px 28px; font-size: 15px; }
.btn--sm { padding: 10px 16px; font-size: 12px; }

.btn .arrow { display: inline-block; transition: transform var(--t-base) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   ② Tag / Chip · 圆角标签
============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-70);
  background: var(--ink-05);     /* 使用 token 自动适配暗色 */
  border-radius: var(--r-chip);
  border: 1px solid var(--ink-15);
  transition: background var(--t-theme) var(--ease), border-color var(--t-theme) var(--ease);
}
.chip--accent { background: var(--accent-pale); color: var(--accent-deep); border-color: var(--accent-soft); }
.chip--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
  background: currentColor;
}

/* ============================================================
   ③ Bento Card · 核心组件 · 粉彩色块 + 网格纸纹理
   ----------------------------------------------------
   通过 data-bento 切换 8 种粉彩配色
============================================================ */
.bento-card {
  --bento-bg: var(--cream-soft);
  --bento-tint: var(--cream);
  --bento-grid: var(--ink-08);
  --bento-ink: var(--ink);
  --card-lift: 0px;               /* JS 驱动的 tilt lift */

  position: relative;
  background: var(--bento-bg);
  border-radius: var(--r-bento);
  padding: var(--sp-10);
  overflow: hidden;
  isolation: isolate;
  /* transform 由 JS 动态控制（tilt + lift），CSS 只管 box-shadow */
  transition:
    box-shadow  var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
  display: flex;
  flex-direction: column;
  text-align: left;
  color: var(--bento-ink);
  text-decoration: none;
  /* 默认：顶部 1px 内高光（被光打亮的纸）+ 极细微底部柔影，叠出深度 */
  box-shadow:
    var(--edge-light),
    0 1px 0 var(--ink-08),
    0 4px 16px -4px rgba(26,43,74,0.07);
  /* 阻止全局颜色 transition 干扰 transform（由 JS 驱动） */
  will-change: transform, box-shadow;
}
/* 网格纹理覆层 */
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--bento-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bento-grid) 1px, transparent 1px);
  background-size: var(--grid-line) var(--grid-line);
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0.4));
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0.4));
  transition: opacity var(--t-med) var(--ease);
}
/* hover 时网格稍微更显眼 */
.bento-card:hover::before { opacity: 1.2; }

.bento-card > * { position: relative; z-index: 1; }

/* CSS-only hover fallback（JS tilt 优先，但 JS 失效时也有基础效果） */
@media (hover: hover) {
  .bento-card:hover { box-shadow: var(--shadow-raised); }
  /* 深色 / 强调色卡片：hover 带橙色光晕 */
  .bento-card[data-bento="dark"]:hover,
  .bento-card[data-bento="accent"]:hover {
    box-shadow: var(--shadow-raised-accent);
  }
  /* coral 卡片：浅橙晕 */
  .bento-card[data-bento="coral"]:hover {
    box-shadow:
      0 20px 48px -12px rgba(232,79,31,0.22),
      0 8px 20px -8px rgba(232,79,31,0.10);
  }
}

/* Tone variants */
.bento-card[data-bento="mint"]    { --bento-bg: var(--p-mint);    --bento-grid: var(--p-mint-grid); }
.bento-card[data-bento="rose"]    { --bento-bg: var(--p-rose);    --bento-grid: var(--p-rose-grid); }
.bento-card[data-bento="sky"]     { --bento-bg: var(--p-sky);     --bento-grid: var(--p-sky-grid); }
.bento-card[data-bento="lilac"]   { --bento-bg: var(--p-lilac);   --bento-grid: var(--p-lilac-grid); }
.bento-card[data-bento="butter"]  { --bento-bg: var(--p-butter);  --bento-grid: var(--p-butter-grid); }
.bento-card[data-bento="blush"]   { --bento-bg: var(--p-blush);   --bento-grid: var(--p-blush-grid); }
.bento-card[data-bento="sand"]    { --bento-bg: var(--p-sand);    --bento-grid: var(--p-sand-grid); }
.bento-card[data-bento="coral"]   { --bento-bg: var(--p-coral);   --bento-grid: var(--p-coral-grid); }
.bento-card[data-bento="dark"]    { --bento-bg: var(--dark);      --bento-grid: var(--dark-grid);   --bento-ink: var(--cream); }
.bento-card[data-bento="accent"]  { --bento-bg: var(--accent);    --bento-grid: rgba(0,0,0,0.10);   --bento-ink: var(--cream); }
.bento-card[data-bento="cream"]   { --bento-bg: var(--cream-soft);--bento-grid: var(--ink-08); }

/* Bento card pieces */
.bento-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--bento-ink);
  opacity: 0.6;
  margin-bottom: var(--sp-3);
}
.bento-card__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: var(--fw-bold);
  line-height: 1.08;              /* 从 1.0 → 1.08，中文不那么挤 */
  letter-spacing: var(--ls-display);
  color: var(--bento-ink);
  margin: 0 0 var(--sp-4);
  text-wrap: balance;             /* v4.2: 平衡折行，避免孤字 widow */
}
.bento-card__title em {
  font-style: normal;
  color: var(--accent);
  font-weight: var(--fw-medium);
}
.bento-card__sub {
  font-size: var(--fs-body-sm);
  line-height: 1.65;              /* 中文正文行距更舒适 */
  color: var(--bento-ink);
  opacity: 0.75;
  margin: 0;
}
/* v4.2 · 暗色深饱和底上提高正文对比度，靠拢 WCAG AA */
[data-theme="dark"] .bento-card__sub { opacity: 0.86; }
.bento-card__num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: var(--fw-bold);
  line-height: 1.0;
  letter-spacing: var(--ls-display);
  color: var(--bento-ink);
  font-feature-settings: 'opsz' 144;
  margin: 0 0 var(--sp-3);
}
.bento-card__num sup { font-size: 0.5em; vertical-align: super; opacity: 0.7; }
.bento-card__foot {
  margin-top: auto;
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bento-card__arrow {
  width: 36px; height: 36px;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  opacity: 0.5;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.bento-card:hover .bento-card__arrow { opacity: 1; transform: translateX(4px); }

/* ============================================================
   ④ Bento Grid · 拼贴布局
   ----------------------------------------------------
   不同 modifier 给不同的布局比例
============================================================ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-4);
}
.bento-cell {
  grid-column: span 4;
  min-height: 280px;
  display: flex;
}
.bento-cell > .bento-card { width: 100%; }

/* Span variants */
.bento-cell--2 { grid-column: span 2; min-height: 180px; }
.bento-cell--3 { grid-column: span 3; }
.bento-cell--4 { grid-column: span 4; }
.bento-cell--5 { grid-column: span 5; }
.bento-cell--6 { grid-column: span 6; }
.bento-cell--7 { grid-column: span 7; }
.bento-cell--8 { grid-column: span 8; }
.bento-cell--12 { grid-column: span 12; }

.bento-cell--tall { min-height: 360px; }
.bento-cell--short { min-height: 180px; }
.bento-cell--xl { min-height: 460px; }

@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(6, 1fr); gap: var(--sp-3); }
  .bento-cell, .bento-cell--3, .bento-cell--4, .bento-cell--5 { grid-column: span 6; }
  .bento-cell--6, .bento-cell--7, .bento-cell--8, .bento-cell--12 { grid-column: span 6; }
  .bento-cell--2 { grid-column: span 3; }
  .bento-card { padding: var(--sp-6); }
}

/* ============================================================
   ⑤ Editorial illustration · 简笔几何插画基础
============================================================ */
.illus {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.illus--center {
  margin-left: auto;
  margin-right: auto;
}
.illus path, .illus circle, .illus rect, .illus polygon, .illus line {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   ⑥ Pillar card · 编辑感大字理念卡
============================================================ */
.pillar {
  padding: var(--sp-8);
  background: var(--cream-soft);
  border-radius: var(--r-bento);
  position: relative;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--ink-05) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ink-05) 1px, transparent 1px);
  background-size: var(--grid-line) var(--grid-line);
  pointer-events: none;
}
.pillar > * { position: relative; }
.pillar__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-5);
}
.pillar__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: var(--ls-tight);
  color: var(--ink);
  margin: 0 0 var(--sp-4);
}
.pillar__title em { font-style: normal; color: var(--accent); font-weight: var(--fw-medium); }
.pillar__text { font-size: var(--fs-body-sm); line-height: var(--lh-base); color: var(--ink-70); margin: 0; }

/* ============================================================
   ⑦ Quote · 大字编辑引用
============================================================ */
.quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: var(--fw-medium);
  font-style: normal;             /* 移除：中文引用斜体效果差 */
  line-height: 1.25;
  letter-spacing: var(--ls-tight);
  color: var(--ink);
  max-width: 880px;
  hanging-punctuation: first;     /* v4.3: 引号悬挂到版心外，行首对齐更利落 */
  text-wrap: balance;
}
.quote em { color: var(--accent); font-style: normal; font-weight: var(--fw-bold); }
.quote__cite {
  display: block;
  margin-top: var(--sp-5);
  font-family: var(--font-mono);
  font-size: 13px;
  font-style: normal;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-50);
}

/* ============================================================
   ⑧ Stats · 数字
============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.stat {
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--ink-10);   /* v4.2: 更细更淡，去表格感 */
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-display);
  line-height: 1;
  color: var(--ink);
  margin-bottom: var(--sp-3);
  font-feature-settings: 'opsz' 144, 'tnum' 1, 'lnum' 1;
  font-variant-numeric: tabular-nums lining-nums;   /* v4.4: 数字列对齐 */
}
.stat__num em { font-style: italic; color: var(--accent); font-weight: var(--fw-medium); }
.stat__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-60);
}
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   ⑨ Module deep · 长卡列表（用于详解）
============================================================ */
.module-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--ink-15);
  align-items: start;
}
.module-row:last-child { border-bottom: 1px solid var(--ink-15); }
.module-row__num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: var(--fw-bold);
  line-height: 1;
  font-style: italic;
  letter-spacing: var(--ls-display);
  font-feature-settings: 'opsz' 144;
}
.module-row[data-tone="accent"] .module-row__num { color: var(--accent); }
.module-row[data-tone="mint"]   .module-row__num { color: #4a7a3a; }
.module-row[data-tone="rose"]   .module-row__num { color: #b34d3a; }
.module-row[data-tone="sky"]    .module-row__num { color: #3a6a92; }
.module-row[data-tone="lilac"]  .module-row__num { color: #6b549a; }
.module-row[data-tone="peach"] .module-row__num { color: #a37a14; }
.module-row[data-tone="blush"]  .module-row__num { color: #b34a6c; }
.module-row[data-tone="ink"]    .module-row__num { color: var(--ink); }
.module-row[data-tone="dark"]   .module-row__num { color: var(--ink-deep); }

.module-row__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.module-row__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: var(--ls-tight);
  color: var(--ink);
  margin: 0;
}
.module-row__code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-50);
}
.module-row__body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-70);
  margin: 0 0 var(--sp-5);
  max-width: 720px;
}
.module-row__bits {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.module-row__bit {
  flex: 1;
  min-width: 240px;
}
.module-row__bit-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: var(--sp-2);
}
.module-row__bit-text {
  font-size: 14px;
  line-height: var(--lh-base);
  color: var(--ink-80);
}
@media (max-width: 768px) {
  .module-row { grid-template-columns: 1fr; gap: var(--sp-3); }
}

/* ============================================================
   ⑩ Process · 4-step
============================================================ */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.process__step {
  padding: var(--sp-6);
  background: var(--cream-soft);
  border-radius: var(--r-card);
  position: relative;
  overflow: hidden;
}
.process__step::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--ink-05) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ink-05) 1px, transparent 1px);
  background-size: var(--grid-line) var(--grid-line);
  pointer-events: none;
}
.process__step > * { position: relative; }
.process__step-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-style: italic;
  font-weight: var(--fw-bold);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--sp-4);
}
.process__step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--sp-3);
  color: var(--ink);
}
.process__step-text {
  font-size: 14px;
  line-height: var(--lh-base);
  color: var(--ink-70);
  margin: 0;
}
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .process { grid-template-columns: 1fr; } }

/* ============================================================
   ⑪ Table
============================================================ */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-50);
  border-bottom: 1px solid var(--ink-15);
}
.tbl tbody td {
  padding: var(--sp-5);
  border-bottom: 1px solid var(--ink-08);
  vertical-align: top;
  color: var(--ink-80);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-base);
}
.tbl tbody tr:hover td { background: var(--cream-soft); }
.tbl tbody td:first-child {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  color: var(--ink);
  width: 24%;
}
.tbl tbody td:last-child {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-wide);
  color: var(--ink-50);
  width: 20%;
}

/* ============================================================
   ⑫ Codeblock · prompt block
============================================================ */
.codeblock {
  background: var(--dark);
  border-radius: var(--r-card);
  padding: var(--sp-8);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  color: rgba(245,242,236,0.78);
  position: relative;
  overflow: hidden;
}
.codeblock::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(245,242,236,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245,242,236,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.codeblock > * { position: relative; }
.codeblock__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid rgba(245,242,236,0.10);
}
.codeblock__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent-soft);
}
.codeblock__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--cream);
  padding: 7px 14px;
  border: 1px solid rgba(245,242,236,0.20);
  background: transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-base) var(--ease);
}
.codeblock__copy:hover { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.codeblock pre { margin: 0; white-space: pre-wrap; }
.codeblock .hl { color: var(--accent-soft); font-weight: var(--fw-semibold); }

/* ============================================================
   ⑬ Modal · 详情面板
============================================================ */
.panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(15, 26, 48, 0.55);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  display: none;
  padding: var(--sp-10) var(--sp-5);
  overflow-y: auto;
}
.panel.is-open { display: flex; align-items: flex-start; justify-content: center; }
.panel__card {
  background: var(--cream);
  border-radius: var(--r-bento);
  max-width: 720px;
  width: 100%;
  padding: var(--sp-12);
  position: relative;
  overflow: hidden;
  animation: panel-in 300ms var(--ease);
}
.panel__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--ink-05) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ink-05) 1px, transparent 1px);
  background-size: var(--grid-line) var(--grid-line);
  pointer-events: none;
}
.panel__card > * { position: relative; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel__close {
  position: absolute;
  top: var(--sp-5); right: var(--sp-5);
  background: transparent;
  border: 1px solid var(--ink-20);
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: 18px;
  color: var(--ink-70);
  display: grid;
  place-items: center;
  z-index: 2;
  transition: all var(--t-base) var(--ease);
}
.panel__close:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.panel__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.panel__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  margin: 0 0 var(--sp-3);
  color: var(--ink);
}
.panel__lede {
  font-size: var(--fs-lede);
  line-height: var(--lh-base);
  color: var(--ink-70);
  margin: 0 0 var(--sp-8);
  max-width: 560px;
}
.panel h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin: var(--sp-6) 0 var(--sp-3);
}
.panel p, .panel li { font-size: 15px; line-height: var(--lh-base); color: var(--ink-80); }
.panel ul { padding-left: var(--sp-5); margin: 0; }
.panel li { margin-bottom: var(--sp-2); }

/* ============================================================
   ⑭ Toast
============================================================ */
.toast {
  position: fixed;
  bottom: var(--sp-10);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  transition: all var(--t-base) var(--ease);
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   ⑮ Field · 表单输入（v4.3 新增）
   ----------------------------------------------------
   编辑体输入：mono 大写标签 + 发丝描边 + 聚焦橙环
   结构：<label class="field"><span class="field__label">…</span>
          <input class="field__input"><span class="field__hint">…</span></label>
============================================================ */
.field { display: flex; flex-direction: column; gap: var(--sp-2); width: 100%; }
.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-50);
}
.field__label .req { color: var(--accent); }
.field__input,
.field__textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream-soft);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-input);
  padding: 12px 14px;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.field__input::placeholder,
.field__textarea::placeholder { color: var(--ink-40); }
.field__textarea { resize: vertical; min-height: 96px; }
.field__input:hover,
.field__textarea:hover { border-color: var(--ink-30); }
.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.field__input:disabled,
.field__textarea:disabled {
  background: var(--ink-05);
  color: var(--ink-40);
  cursor: not-allowed;
}
.field__hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-50); letter-spacing: var(--ls-wide); }

/* 状态 */
.field--error .field__input,
.field--error .field__textarea { border-color: var(--danger); }
.field--error .field__input:focus,
.field--error .field__textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 26%, transparent); }
.field--error .field__hint { color: var(--danger); }
.field--success .field__input,
.field--success .field__textarea { border-color: var(--success); }
.field--success .field__hint { color: var(--success); }

/* 行内输入组（input + 按钮，如口令框）*/
.field-group { display: flex; gap: var(--sp-3); align-items: stretch; flex-wrap: wrap; }
.field-group .field { flex: 1; min-width: 200px; }
.field-group .btn { align-self: flex-end; }

/* ============================================================
   ⑯ Prose · 长文排版系统（v4.4）
   ----------------------------------------------------
   用 <article class="prose"> 包裹原生 HTML 正文，自动获得
   编辑体的字号 / 行距 / 垂直节奏，无需逐元素加 class。
============================================================ */
.prose {
  max-width: 68ch;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--ink-80);
  text-wrap: pretty;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child  { margin-bottom: 0; }

.prose p { margin: 0 0 var(--sp-6); text-wrap: pretty; }
/* 衬线小标题 + 垂直节奏（上紧下松，制造段落组）*/
.prose h2 {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: var(--ls-tight);
  color: var(--ink); margin: var(--sp-16) 0 var(--sp-5); text-wrap: balance; scroll-margin-top: 120px;
}
.prose h3 {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--fs-h4); line-height: var(--lh-snug); letter-spacing: var(--ls-snug);
  color: var(--ink); margin: var(--sp-12) 0 var(--sp-4); text-wrap: balance; scroll-margin-top: 120px;
}
.prose h4 {
  font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-h5); color: var(--ink); margin: var(--sp-10) 0 var(--sp-3);
}
.prose h2 em, .prose h3 em { font-style: italic; color: var(--accent); }
.prose h2 + p, .prose h3 + p, .prose h4 + p { margin-top: 0; }

.prose strong { font-weight: var(--fw-semibold); color: var(--ink); }
.prose em { font-style: italic; }
.prose small { font-size: var(--fs-sm); color: var(--ink-60); }
.prose mark { background: var(--accent-pale); color: var(--ink); padding: 0 4px; border-radius: 3px; }

/* 列表 · accent 标记 */
.prose ul, .prose ol { margin: 0 0 var(--sp-6); padding-left: var(--sp-6); }
.prose li { margin-bottom: var(--sp-3); padding-left: var(--sp-2); }
.prose ul > li::marker { color: var(--accent); }
.prose ol > li::marker { color: var(--accent); font-family: var(--font-mono); font-size: 0.85em; }
.prose li > ul, .prose li > ol { margin-top: var(--sp-3); margin-bottom: 0; }
/* 定义列表 / 术语 */
.prose dl { margin: 0 0 var(--sp-6); }
.prose dt { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 19px; color: var(--ink); margin-top: var(--sp-5); }
.prose dd { margin: var(--sp-1) 0 0; color: var(--ink-70); }

/* 引用块（编辑体 · 左侧橙线 + 衬线）*/
.prose blockquote {
  margin: var(--sp-8) 0; padding: var(--sp-2) 0 var(--sp-2) var(--sp-6);
  border-left: 2px solid var(--accent);
  font-family: var(--font-display); font-size: 22px; font-style: normal;
  line-height: 1.5; letter-spacing: var(--ls-snug); color: var(--ink);
}
.prose blockquote p { margin: 0; }
.prose blockquote cite {
  display: block; margin-top: var(--sp-3); font-family: var(--font-mono);
  font-size: 12px; font-style: normal; letter-spacing: var(--ls-wide);
  text-transform: uppercase; color: var(--ink-50);
}

/* 分割线 · 三点饰记（编辑体过场）*/
.prose hr {
  border: none; margin: var(--sp-12) auto; height: auto; text-align: center;
}
.prose hr::before {
  content: "* * *"; letter-spacing: 0.6em; color: var(--ink-30);
  font-family: var(--font-display); font-size: 20px;
}

/* 行内代码 / 代码块 */
.prose code {
  font-family: var(--font-mono); font-size: 0.86em; background: var(--ink-08);
  padding: 2px 6px; border-radius: var(--r-chip); color: var(--ink);
}
.prose pre {
  margin: var(--sp-6) 0; padding: var(--sp-6); background: var(--dark);
  border-radius: var(--r-card); overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: rgba(245,242,236,0.82);
}
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* 表格 · 复用 .tbl 视觉 */
.prose table { width: 100%; border-collapse: collapse; margin: var(--sp-8) 0; font-size: var(--fs-body-sm); }
.prose th { text-align: left; padding: var(--sp-3) var(--sp-4); font-family: var(--font-mono); font-size: 11px;
            letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--ink-50); border-bottom: 1px solid var(--hairline-strong); }
.prose td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--hairline); color: var(--ink-80); vertical-align: top; }

/* 正文图片 */
.prose img { border-radius: var(--r-card); margin: var(--sp-8) 0; }

/* 开篇 lede + 下沉首字（可选）：<p class="prose__lede"> / <span class="dropcap"> */
.prose .prose__lede { font-size: var(--fs-lede); line-height: var(--lh-base); color: var(--ink-70); margin-bottom: var(--sp-8); }

/* ============================================================
   ⑰ Callout · 注记 / 提示 / 警示框（v4.4）
   ----------------------------------------------------
   <div class="callout callout--tip"><div class="callout__title">…</div><p>…</p></div>
============================================================ */
.callout {
  --c: var(--info); --c-bg: var(--info-pale);
  margin: var(--sp-8) 0; padding: var(--sp-5) var(--sp-6);
  background: var(--c-bg);
  /* 去掉深色粗左条：改用与底色同族的柔和整框描边，更编辑体 */
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
  border-radius: var(--r-card);
}
.callout > :last-child { margin-bottom: 0; }
.callout__title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--c);
  margin-bottom: var(--sp-3);
}
.callout__title::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--c); }
.callout p, .callout li { font-size: var(--fs-body-sm); line-height: 1.7; color: var(--ink-80); margin: 0 0 var(--sp-2); }
.callout--note { --c: var(--info);    --c-bg: var(--info-pale); }
.callout--tip  { --c: var(--success); --c-bg: var(--success-pale); }
.callout--warn { --c: var(--warning); --c-bg: var(--warning-pale); }
.callout--key  { --c: var(--accent-deep); --c-bg: var(--accent-pale); }

/* ============================================================
   ⑱ Sidenote · 边注（Tufte 式 · 宽屏浮到右栏，窄屏内联）
   ----------------------------------------------------
   <span class="sidenote">…</span> 直接跟在正文里
============================================================ */
.sidenote {
  display: block; font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-60);
  border-left: 2px solid var(--accent-soft); padding-left: var(--sp-4);
  margin: var(--sp-4) 0;
}
.sidenote__ref { color: var(--accent); font-weight: var(--fw-semibold); vertical-align: super; font-size: 0.7em; padding: 0 1px; }
/* 宽屏：浮到右侧页边，与正文并行 */
@media (min-width: 1100px) {
  .prose--sidenotes { padding-right: 240px; }
  .prose--sidenotes .sidenote {
    float: right; clear: right; width: 200px; margin-right: -240px; margin-top: 0;
    border-left: none; padding-left: 0; border-top: 1px solid var(--hairline-strong); padding-top: var(--sp-2);
  }
}

/* ============================================================
   ⑲ Figure · 图 + 图说
============================================================ */
.figure { margin: var(--sp-10) 0; }
.figure img, .figure svg, .figure .figure__frame {
  border-radius: var(--r-card); border: 1px solid var(--hairline); display: block; width: 100%;
}
.figure__frame { background: var(--cream-soft); padding: var(--sp-8); }
.figure figcaption, .figure__cap {
  margin-top: var(--sp-3); padding-left: var(--sp-4); border-left: 2px solid var(--accent);
  font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-60);
}
.figure__cap b { color: var(--ink); font-weight: var(--fw-semibold); }

/* ============================================================
   ⑳ Pullquote · 悬浮大字引言（穿插长文中，制造呼吸）
============================================================ */
.pullquote {
  font-family: var(--font-display); font-weight: var(--fw-medium);
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.28; letter-spacing: var(--ls-tight);
  color: var(--ink); margin: var(--sp-6) 0; padding: var(--sp-2) 0;
  border-top: 1px solid var(--hairline-strong); border-bottom: 1px solid var(--hairline-strong);
  text-wrap: balance;
}
.pullquote em { font-style: normal; color: var(--accent); }
/* 当 pullquote 是 .prose 内的 <p> 时，盖过 .prose p 的 margin */
.prose p.pullquote { margin: var(--sp-8) 0; }
@media (min-width: 1100px) {
  .pullquote--float { float: right; width: 320px; margin: var(--sp-2) 0 var(--sp-6) var(--sp-10); }
}

/* ============================================================
   ㉑ Byline · 作者署名 / 落款（个人著作站签名件）
============================================================ */
.byline { display: flex; align-items: center; gap: var(--sp-4); }
.byline__mark {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--r-pill);
  background: var(--accent); color: var(--cream); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 22px;
}
.byline__name { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 18px; color: var(--ink); letter-spacing: var(--ls-tight); line-height: 1.2; }
.byline__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--ls-wide); color: var(--ink-50); text-transform: uppercase; margin-top: 2px; }
.byline--lg .byline__mark { width: 60px; height: 60px; font-size: 28px; }
.byline--lg .byline__name { font-size: 22px; }

/* ============================================================
   ㉒ Badge · 状态徽章（已发布 / 规划中 / 进行中）
============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding: 4px 10px 4px 8px; border-radius: var(--r-pill);
  background: var(--ink-05); color: var(--ink-70); border: 1px solid var(--hairline-strong);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-pill); background: currentColor; }
.badge--live    { background: var(--success-pale); color: var(--success); border-color: transparent; }
.badge--planned { background: var(--ink-05);       color: var(--ink-50);  }
.badge--wip     { background: var(--warning-pale); color: var(--warning); border-color: transparent; }
.badge--live::before { animation: badge-pulse 2s var(--ease) infinite; }
@keyframes badge-pulse { 0%,100%{ opacity:1 } 50%{ opacity:0.35 } }
@media (prefers-reduced-motion: reduce) { .badge--live::before { animation: none; } }
