/* Generated canonical stylesheet for index + all secondary pages. */
/* Sources before migration: secondary 2dd6c43cea95, index components b494442ae93c. */

 /* ===================== Design Tokens ===================== */
 :root {
 color-scheme: light;
 --background: 42 29% 97%;
 --foreground: 40 3% 15%;
 --card: 0 0% 100%;
 --card-foreground: 40 3% 15%;
 --primary: 12 49% 45%;
 --primary-foreground: 0 0% 100%;
 --secondary: 42 25% 95%;
 --secondary-foreground: 40 3% 22%;
 --muted: 42 25% 95%;
 --muted-foreground: 40 3% 40%;
 --accent: 12 55% 94%;
 --accent-foreground: 12 45% 40%;
 --destructive: 6 56% 50%;
 --destructive-foreground: 0 0% 100%;
 --success: 150 38% 38%;
 --border: 45 7% 89%;
 --input: 45 7% 89%;
 --ring: 12 49% 45%;
 --radius: 0.75rem;
 --radius-sm: 0.5rem;
 }

 html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
 body {
 background-color: hsl(var(--background));
 color: hsl(var(--foreground));
 -webkit-font-smoothing: antialiased;
 text-rendering: optimizeLegibility;
 }
 .tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
 :focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

 /* ===================== 背景层次 ===================== */
 .mesh-bg {
 position: fixed; inset: 0; z-index: -2; pointer-events: none;
 background:
 radial-gradient(1100px 600px at 15% -10%, rgba(216, 197, 170, 0.16) 0%, rgba(216, 197, 170, 0) 60%),
 radial-gradient(900px 520px at 88% 2%, rgba(226, 178, 145, 0.10) 0%, rgba(226, 178, 145, 0) 55%),
 radial-gradient(1000px 700px at 50% 116%, rgba(210, 195, 175, 0.12) 0%, rgba(210, 195, 175, 0) 60%);
 }
 .noise-bg {
 position: fixed; inset: 0; z-index: -1; pointer-events: none;
 opacity: 0.045;
 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
 background-size: 160px 160px;
 }

 /* ===================== Card ===================== */
 .card {
 background: hsl(var(--card)); color: hsl(var(--card-foreground));
 border: 1px solid hsl(var(--border)); border-radius: var(--radius);
 box-shadow: 0 1px 2px rgba(24, 24, 27, 0.03), 0 12px 32px -16px rgba(24, 24, 27, 0.08);
 }

 /* ===================== Button ===================== */
 .btn {
 display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
 height: 2.5rem; padding: 0 1rem; border-radius: var(--radius-sm);
 font-size: .875rem; font-weight: 500; line-height: 1; white-space: nowrap;
 border: 1px solid transparent; cursor: pointer; user-select: none;
 transition: background-color .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease, transform .1s ease;
 }
 .btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
 .btn:disabled { opacity: .5; pointer-events: none; }
 .btn:active:not(:disabled) { transform: scale(.97); }
 .btn svg { flex-shrink: 0; }

 .btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
 .btn-primary:hover:not(:disabled) { background: hsl(var(--primary) / .9); }

 .btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: hsl(var(--border)); }
 .btn-secondary:hover:not(:disabled) { background: hsl(var(--accent)); }

 .btn-outline { background: transparent; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
 .btn-outline:hover:not(:disabled) { background: hsl(var(--accent)); }

 .btn-ghost { background: transparent; color: hsl(var(--foreground)); }
 .btn-ghost:hover:not(:disabled) { background: hsl(var(--accent)); }

 .btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
 .btn-destructive:hover:not(:disabled) { background: hsl(var(--destructive) / .9); }

 .btn-icon { padding: 0; width: 2.5rem; height: 2.5rem; }

 /* 应用商店徽章 */
 .store-badge {
 display: inline-flex; align-items: center; gap: .625rem;
 height: 3rem; padding: 0 1rem;
 background: #1d1d1f; color: #fff; border-radius: var(--radius-sm);
 border: 1px solid #1d1d1f; cursor: pointer; text-decoration: none;
 transition: background-color .15s ease, opacity .15s ease, transform .1s ease;
 }
 .store-badge:hover { background: #000; }
 .store-badge:active { transform: scale(.97); }

 .spinner {
 width: 1rem; height: 1rem; border-radius: 50%;
 border: 2px solid currentColor; border-top-color: transparent;
 animation: spin .6s linear infinite;
 }
 @keyframes spin { to { transform: rotate(360deg); } }
 /* 按钮加载态（防连点 + spinner 反馈） */
 .btn { position: relative; }
 .btn-loading { pointer-events: none; opacity: .9; }
 .btn-loading > * { visibility: hidden; }
 .btn-loading::after {
 content: ''; position: absolute; top: 50%; left: 50%;
 width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem;
 border-radius: 50%;
 border: 2px solid currentColor; border-top-color: transparent;
 animation: spin .6s linear infinite;
 }


 /* ===================== Input ===================== */
 .input {
 height: 2.5rem; width: 100%; padding: 0 .75rem;
 border-radius: var(--radius-sm); border: 1px solid hsl(var(--input));
 background: hsl(var(--card)); color: hsl(var(--foreground));
 font-size: .875rem; transition: border-color .15s ease, box-shadow .15s ease;
 }
 .input::placeholder { color: hsl(var(--muted-foreground) / .7); }
 .input:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring) / .15); }
 .input:disabled { opacity: .5; cursor: not-allowed; }
 .input[aria-invalid="true"] { border-color: hsl(var(--destructive)); }
 .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px hsl(var(--destructive) / .15); }

 /* ===================== Toast ===================== */
 .toast-container {
 position: fixed; bottom: 1rem; right: 1rem; z-index: 200;
 display: flex; flex-direction: column; gap: .5rem; max-width: calc(100vw - 2rem);
 }
 .toast {
 display: flex; align-items: flex-start; gap: .75rem;
 background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
 padding: .875rem 1rem; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.16); width: 22rem; max-width: 100%;
 animation: toast-in .25s cubic-bezier(.22,.61,.36,1);
 }
 .toast.leaving { animation: toast-out .2s ease forwards; }
 .toast-icon { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: .125rem; }
 @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
 @keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

 /* ===================== 毛玻璃（局部） ===================== */
 .glass {
 background: rgba(250, 249, 247, 0.88);
 backdrop-filter: blur(14px) saturate(120%);
 -webkit-backdrop-filter: blur(14px) saturate(120%);
 }

 /* ===================== 正文排版 ===================== */
 .prose p { color: hsl(var(--foreground) / .88); }
 .prose a { color: hsl(var(--primary)); }
 .prose a:hover { color: hsl(var(--foreground)); }

 /* ===================== 入场动效 ===================== */
 html.js .reveal { opacity: 0; }
 html.js .reveal.in {
 opacity: 1;
 animation: reveal-in .4s cubic-bezier(.22,.61,.36,1) backwards;
 animation-delay: var(--d, 0ms);
 }
 @keyframes reveal-in {
 from { opacity: 0; transform: translateY(20px); }
 to { opacity: 1; transform: translateY(0); }
 }

 /* ===== 编辑杂志 衬线标题 + 珊瑚引语 + 衬线品牌 + 暖色徽章 ===== */
 h1, h2, h3 {
 font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
 letter-spacing: .01em !important;
 line-height: 1.28 !important;
 }
 header nav > a:first-child { font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif; letter-spacing: .02em; }
 p.text-primary { letter-spacing: .1em; }
 blockquote { border-left-color: hsl(var(--primary) / 0.55) !important; }
 .btn-primary:hover:not(:disabled) { background: #B0603F; }
 .store-badge { background: #1d1d1f !important; border-color: #1d1d1f !important; }
 .store-badge:hover { background: #000000 !important; }

 /* ===================== 阅读进度条 + 回到顶部 ===================== */
 #reading-progress {
 position: fixed; top: 0; left: 0; right: 0; z-index: 90;
 height: 2px; background: hsl(var(--primary));
 transform-origin: 0 0; transform: scaleX(0);
 pointer-events: none;
 }
 #back-top {
 position: fixed; bottom: 5rem; right: 1rem; z-index: 90;
 box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.18);
 }
 @media (max-width: 640px) { #back-top { bottom: 4.5rem; right: .75rem; } }


 @media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 html.js .reveal { opacity: 1; animation: none; }
 .btn:active { transform: none; }
 .spinner { animation: none; } .btn-loading::after { animation: none !important; }
 * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
 }

/* 移动端触控目标优化: 核心交互 ≥44px (WCAG 2.5.5) */
@media (max-width: 767px) {
  header a:not(.btn):not(.hidden):not([class*="hidden"]),
  footer nav a:not(.hidden):not([class*="hidden"]),
  nav[aria-label="本页目录"] a,
  #menu-btn, .tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  footer nav a:not(.hidden):not([class*="hidden"]) { padding: 0 .5rem; }
  #menu-btn { width: 44px; height: 44px; }
  .tab { height: 44px; }
  #search-clear { width: 44px !important; height: 44px !important; }
}

  :root {
    --background: 42 29% 97%;
    --foreground: 40 3% 15%;
    --card: 0 0% 100%;
    --card-foreground: 40 3% 15%;
    --primary: 12 49% 45%;
    --primary-foreground: 0 0% 100%;
    --secondary: 42 25% 95%;
    --secondary-foreground: 40 3% 22%;
    --muted: 42 25% 95%;
    --muted-foreground: 40 3% 40%;
    --accent: 12 55% 94%;
    --accent-foreground: 12 45% 40%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --border: 45 7% 89%;
    --input: 45 7% 89%;
    --ring: 12 49% 45%;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --duration-press: 160ms;
    --duration-quick: 150ms;
    --duration-fast: 200ms;
    --duration-enter: 250ms;
    --duration-reveal: 500ms;
  }


  html { scrollbar-gutter: stable; }
  body { font-family: "PingFang SC","Microsoft YaHei","Source Han Sans SC",system-ui,-apple-system,sans-serif; }
  h1, h2, h3, .font-serif, blockquote { font-family: "Songti SC","Noto Serif CJK SC","Source Han Serif SC","STSong","SimSun",Georgia,serif; }


/* ===================== 组件系统 ===================== */
  /* Button 基类 + 变体 */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
    border-radius: 9999px; border: none; cursor: pointer; user-select: none;
    text-decoration: none; transition: filter var(--duration-press) ease, background var(--duration-press) ease,
      border-color var(--duration-press) ease, box-shadow var(--duration-press) ease, transform var(--duration-press) var(--ease-out), opacity var(--duration-press) ease;
  }
  .btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
  .btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
  .btn-sm { height: 34px; padding: 0 16px; font-size: 13px; }
  .btn-md { height: 42px; padding: 0 22px; font-size: 14px; }
  .btn-lg { height: 50px; padding: 0 30px; font-size: 15px; }
  .btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
  .btn-primary:active { filter: brightness(.96); transform: scale(.97); }
  .btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border: 1px solid hsl(var(--border)); }
  .btn-secondary:active { transform: scale(.97); }
  .btn-ghost { background: transparent; color: hsl(var(--foreground)); border: 1px solid rgba(29,29,31,.22); }
  .btn-ghost:active { transform: scale(.97); }
  .btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
  .btn-destructive:active { transform: scale(.97); }
  .btn-outline { background: #fff; color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); }
  .btn-outline:active { transform: scale(.97); }
  /* 按钮 loading */
  .btn .btn-spinner { display: none; width: 15px; height: 15px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 9999px; animation: spin .7s linear infinite; }
  .btn.is-loading { pointer-events: none; opacity: .8; }
  .btn.is-loading .btn-spinner { display: inline-block; }
  @keyframes spin { to { transform: rotate(360deg); } }
  /* Input */
  .field { display: block; }
  .field-label { display: block; font-size: 13px; font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 6px; }
  .input {
    width: 100%; height: 44px; border-radius: var(--radius-md); border: 1px solid hsl(var(--input));
    background: #fff; padding: 0 14px; font-size: 14.5px; color: hsl(var(--foreground));
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .input::placeholder { color: hsl(var(--muted-foreground)); }
  .input:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(12 49% 58% / .13); }
  .input:disabled { background: hsl(var(--muted)); cursor: not-allowed; }
  .input-error { border-color: hsl(var(--destructive)); box-shadow: 0 0 0 3px hsl(0 72% 51% / .10); }
  .field-error { display: none; font-size: 12.5px; color: hsl(var(--destructive)); margin-top: 6px; }
  .field.is-invalid .field-error { display: block; }
  .field.is-invalid .input { border-color: hsl(var(--destructive)); box-shadow: 0 0 0 3px hsl(0 72% 51% / .10); }
  /* Dialog / Modal */
  .dialog {
    border: none; border-radius: var(--radius-lg); padding: 0; background: #fff;
    box-shadow: 0 24px 64px -24px rgba(20,15,10,.28);
    width: min(440px, calc(100vw - 32px)); overflow: hidden;
    transform-origin: center; transform: scale(.96); opacity: 0;
    transition: transform var(--duration-enter) var(--ease-out), opacity var(--duration-enter) var(--ease-out);
    will-change: transform, opacity;
  }
  .dialog::backdrop { background: rgba(20,15,10,.38); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--duration-enter) var(--ease-out); }
  .dialog[open].is-open { transform: scale(1); opacity: 1; }
  .dialog[open].is-open::backdrop { opacity: 1; }
  .dialog.is-closing { transform: scale(.96); opacity: 0; transition-duration: var(--duration-quick); }
  .dialog.is-closing::backdrop { opacity: 0; transition-duration: var(--duration-quick); }
  .dialog.no-motion, .dialog.no-motion::backdrop { transition: none !important; }
  .dialog-close {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9999px;
    border: none; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); cursor: pointer;
    transition: background .2s ease, color .2s ease;
  }
  /* Tabs */
  .tabs { display: flex; flex-wrap: wrap; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: none; height: 38px; padding: 0 16px; border-radius: 9999px; border: 1px solid transparent;
    font-size: 13.5px; font-weight: 600; color: hsl(var(--muted-foreground)); background: transparent;
    cursor: pointer; white-space: nowrap; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
  @media (hover: hover) and (pointer: fine) {
    .btn-primary:hover, .btn-destructive:hover { filter: brightness(1.08); }
    .btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
    .btn-secondary:hover { background: hsl(42 22% 90%); }
    .btn-ghost:hover { border-color: rgba(29,29,31,.5); background: rgba(29,29,31,.05); }
    .btn-ghost.btn-ghost-dark:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.06); }
    .btn-outline:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
    .lift:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -18px rgba(20,15,10,.18); border-color: hsl(12 50% 84%); }
    #articles-grid .article-card--lead:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -26px rgba(20,15,10,.42); border-color: rgba(255,255,255,.18); }
    .lift:hover .card-line::before { opacity: 1; }
    .group:hover .card-arrow { transform: translateX(2px); }
    .dialog-close:hover { background: hsl(var(--border)); color: hsl(var(--foreground)); }
    .tab:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
  }
  @media (hover: none), (pointer: coarse) {
    .transition-colors { transition: none !important; }
  }
  .tab[aria-selected="true"] { background: #fff; color: hsl(var(--primary)); border-color: hsl(var(--border)); box-shadow: 0 1px 3px rgba(20,15,10,.07); }
  /* 文章档案: 一篇领读 + 两列索引 */
  #articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  #articles-grid .article-card:not(.article-card--lead) {
    min-height: 220px;
    border-radius: 12px;
  }
  #articles-grid .article-card--lead {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    grid-template-rows: auto auto 1fr auto;
    column-gap: clamp(32px, 6vw, 76px);
    min-height: 320px;
    padding: clamp(32px, 4vw, 52px);
    color: #fff;
    background: #1d1d1f;
    border-color: rgba(255,255,255,.10);
  }
  #articles-grid .article-card--lead > .card-line { position: absolute; }
  #articles-grid .article-card:not(.article-card--lead) .lead-title-break { display: none; }
  #articles-grid .article-card--lead > span:nth-of-type(2) { grid-column: 1; grid-row: 1; }
  #articles-grid .article-card--lead > h3 {
    grid-column: 1;
    grid-row: 2 / 5;
    align-self: center;
    max-width: 20ch;
    margin-top: 20px;
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.15;
    color: #fff;
  }
  #article-search { padding-left: 40px; }
  #articles-grid .article-card--lead > p {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 20px;
    max-width: 54ch;
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255,255,255,.68);
  }
  #articles-grid .article-card--lead > div {
    grid-column: 2;
    grid-row: 4;
    color: rgba(255,255,255,.58);
  }
  @media (max-width: 1023px) {
    #articles .tabs {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding: 2px 2px 8px;
      margin: -2px;
      scroll-snap-type: x proximity;
    }
    #articles .tab { scroll-snap-align: start; }
    #articles .tabs + div { order: -1; }
  }
  @media (max-width: 767px) {
    .person-portrait { height: 320px; }
    #articles-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    #articles-grid .article-card--lead {
      display: flex !important;
      min-height: 0;
      padding: 28px 24px;
    }
    #articles-grid .article-card--lead > h3 {
      max-width: none;
      margin-top: 18px;
      font-size: 28px;
    }
    #articles-grid .article-card--lead > p {
      margin-top: 16px;
      font-size: 14.5px;
      line-height: 1.75;
    }
    #articles-grid .article-card--lead > div { margin-top: 24px; }
  }
  /* Toast 类型 */
  #toast.success { background: #0d7a4f; }
  #toast.error { background: #c92a2a; }
  /* Empty State */
  .empty-state { text-align: center; padding: 56px 24px; border: 1px dashed hsl(var(--border)); border-radius: var(--radius-lg); background: #fff; }
  .empty-state .empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 9999px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
  .empty-state h3 { font-size: 16px; font-weight: 700; }
  .empty-state p { margin-top: 6px; font-size: 13.5px; color: hsl(var(--muted-foreground)); }
  /* Error State */
  .error-state { text-align: center; padding: 48px 24px; border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); background: #fff; }
  .error-state .error-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 9999px; background: hsl(0 72% 51% / .08); color: hsl(var(--destructive)); }
  .error-state h3 { font-size: 16px; font-weight: 700; }
  .error-state p { margin-top: 6px; font-size: 13.5px; color: hsl(var(--muted-foreground)); }
  /* 文章卡分类标签 */
  .cat-tag { display: inline-flex; width: fit-content; border-radius: 9999px; background: hsl(var(--primary) / .10); padding: 3px 12px; font-size: 12px; font-weight: 600; color: hsl(var(--primary)); }
  /* 移动端触控目标优化: 核心交互 ≥44px (WCAG 2.5.5) */
  @media (max-width: 767px) {
    header a:not(.btn):not(.hidden):not([class*="hidden"]),
    footer nav a:not(.hidden):not([class*="hidden"]),
    nav[aria-label="本页目录"] a,
    #menu-btn, .tab {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
    }
    footer nav a:not(.hidden):not([class*="hidden"]) { padding: 0 .5rem; }
    #menu-btn { width: 44px; height: 44px; }
    .tab { height: 44px; }
    #search-clear { width: 44px !important; height: 44px !important; }
  }



/* ===================== Canonical shared site system ===================== */
.btn.hidden { display: none; }
#search-clear { position: absolute; }
#search-input { padding-left: 2.25rem; padding-right: 2.75rem; }

@media (min-width: 640px) {
  .btn.hidden.sm\:inline-flex { display: inline-flex; }
}
@media (min-width: 768px) {
  .btn.md\:hidden { display: none !important; }
}

body[data-secondary-template="list"] .card-hover {
  transition: transform 160ms cubic-bezier(.23,1,.32,1), border-color 160ms ease, box-shadow 160ms ease;
}
body[data-secondary-template="list"] .tabs {
  display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem;
  background: hsl(var(--muted)); border-radius: var(--radius-sm);
}
body[data-secondary-template="list"] .tab {
  height: 2rem; padding: 0 .875rem; border-radius: calc(var(--radius-sm) - 2px);
  font-size: .875rem; font-weight: 500; color: hsl(var(--muted-foreground));
  border: 0; background: transparent; cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
body[data-secondary-template="list"] .tab[data-active="true"] {
  background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
body[data-secondary-template="list"] .grid-fade { animation: secondary-grid-in 250ms cubic-bezier(.23,1,.32,1) both; }
@keyframes secondary-grid-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
body[data-secondary-template="list"] .state-box { text-align: center; padding: 3rem 1.5rem; }
body[data-secondary-template="list"] #focus .text-muted-foreground\/70 {
  color: hsl(var(--muted-foreground));
}

/* ===================== Dedicated article archive ===================== */
.archive-header {
  position: fixed; inset: 0 0 auto; z-index: 60;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.archive-header-inner {
  width: min(100% - 2rem, 72rem); height: 4rem; margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.archive-brand { justify-self: start; font-family: "Songti SC", "Noto Serif CJK SC", serif; font-weight: 700; }
.archive-desktop-nav { display: flex; align-items: center; gap: 2rem; font-size: .875rem; }
.archive-desktop-nav a { color: hsl(var(--muted-foreground)); transition: color 150ms ease; }
.archive-desktop-nav a[aria-current="page"], .archive-desktop-nav a:hover { color: hsl(var(--foreground)); }
.archive-header-actions { justify-self: end; display: flex; align-items: center; gap: .75rem; }
.archive-mobile-menu { border-top: 1px solid hsl(var(--border)); padding: .5rem 1rem .875rem; }
.archive-mobile-menu nav { display: grid; }
.archive-mobile-menu a { min-height: 44px; display: flex; align-items: center; border-radius: .5rem; padding-inline: .75rem; }
.archive-main { padding-top: 4rem; }

.archive-hero { border-bottom: 1px solid hsl(var(--border)); }
.archive-hero-inner {
  width: min(100% - 3rem, 72rem); margin-inline: auto; padding-block: clamp(4.5rem, 8vw, 7.5rem);
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr); gap: clamp(3rem, 8vw, 7rem); align-items: end;
}
.archive-breadcrumb { display: flex; align-items: center; gap: .5rem; color: hsl(var(--muted-foreground)); font-size: .8125rem; }
.archive-breadcrumb a { transition: color 150ms ease; }
.archive-breadcrumb a:hover { color: hsl(var(--foreground)); }
.archive-heading h1 {
  max-width: 12ch; margin-top: 1.75rem; font-size: clamp(3.5rem, 6.5vw, 6rem);
  font-weight: 800; letter-spacing: -.035em !important; line-height: 1.05 !important;
}
.archive-heading > p { max-width: 40rem; margin-top: 1.75rem; color: hsl(var(--muted-foreground)); font-size: 1.0625rem; line-height: 1.8; }
.archive-guide { padding-block: 1.5rem; border-block: 1px solid hsl(var(--border)); }
.archive-guide h2 { font-size: 1.25rem; font-weight: 700; }
.archive-guide p { margin-top: .875rem; color: hsl(var(--muted-foreground)); font-size: .9375rem; line-height: 1.75; }
.archive-guide a {
  margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .5rem;
  color: hsl(var(--primary)); font-size: .875rem; font-weight: 650;
  transition: color 150ms ease, gap 160ms var(--ease-out);
}
.archive-guide a svg { width: 1rem; height: 1rem; }

.archive-library { background: #f5f3ec; scroll-margin-top: 4rem; }
.archive-library-inner { width: min(100% - 3rem, 72rem); margin-inline: auto; padding-block: clamp(4rem, 7vw, 6.5rem); }
.archive-library-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.archive-library-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 750; letter-spacing: -.025em !important; }
#result-count { margin-top: .65rem; color: hsl(var(--muted-foreground)); font-size: .875rem; }
.archive-search { position: relative; width: min(100%, 23rem); }
.archive-search > svg {
  position: absolute; left: 0; top: 50%; width: 1rem; height: 1rem;
  color: hsl(var(--muted-foreground)); transform: translateY(-50%); pointer-events: none;
}
.archive-search input {
  width: 100%; min-height: 48px; padding: .75rem 2.5rem .75rem 1.75rem;
  border: 0; border-bottom: 1px solid hsl(var(--input)); border-radius: 0;
  background: transparent; color: hsl(var(--foreground)); outline: none;
  transition: border-color 150ms ease;
}
.archive-search input:focus { border-bottom-color: hsl(var(--foreground)); }
.archive-search input::placeholder { color: hsl(var(--muted-foreground)); }
.archive-search button {
  position: absolute; right: 0; top: 50%; width: 44px; height: 44px;
  display: grid; place-items: center; transform: translateY(-50%); border-radius: 999px;
}
.archive-search button.hidden { display: none; }
.archive-search button svg { width: 1rem; height: 1rem; }
.archive-tabs {
  margin-top: 2.5rem; display: flex; align-items: center; gap: 1.75rem;
  overflow-x: auto; border-bottom: 1px solid hsl(var(--border)); scrollbar-width: none;
}
.archive-tabs::-webkit-scrollbar { display: none; }
.archive-tabs .tab {
  position: relative; min-height: 48px; flex: 0 0 auto; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: hsl(var(--muted-foreground)); font-size: .875rem; font-weight: 600;
  transition: color 150ms ease;
}
.archive-tabs .tab::after {
  content: ""; position: absolute; inset: auto 0 -1px; height: 2px;
  background: hsl(var(--primary)); transform: scaleX(0); transform-origin: center;
  transition: transform 180ms var(--ease-out);
}
.archive-tabs .tab[data-active="true"] { color: hsl(var(--foreground)); }
.archive-tabs .tab[data-active="true"]::after { transform: scaleX(1); }
.archive-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4.5rem); margin-top: 2.5rem;
}
.archive-featured {
  grid-column: 1 / -1; margin-bottom: 1rem; padding: clamp(2rem, 5vw, 4.25rem);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); column-gap: clamp(2rem, 7vw, 6rem);
  border-radius: 1rem; background: #1d1d1f; color: #fff;
}
.archive-featured > div:first-child, .archive-featured > h3 { grid-column: 1; }
.archive-featured > h3 { align-self: center; margin-top: 1.25rem; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.14 !important; }
.archive-featured > p, .archive-featured > div:last-child { grid-column: 2; }
.archive-featured > p { align-self: end; margin-top: 0; color: rgba(255,255,255,.72); font-size: 1rem; line-height: 1.85; }
.archive-featured > div:first-child span:first-child, .archive-featured a { color: hsl(12 72% 80%); }
.archive-featured > div:first-child span:last-child, .archive-featured > div:last-child span { color: rgba(255,255,255,.60); }
.archive-featured > div:last-child { align-self: end; padding-top: 2rem; }
.archive-entry {
  min-height: 18rem; padding-block: 2rem; display: flex; flex-direction: column;
  border-top: 1px solid hsl(var(--border));
}
.archive-entry h3 { font-size: 1.125rem; line-height: 1.5 !important; }
.archive-entry p { max-width: 34rem; }
.archive-entry a { text-underline-offset: .22em; }
.archive-empty { padding: 5rem 1rem; text-align: center; }
.archive-empty > svg { width: 1.5rem; height: 1.5rem; margin-inline: auto; color: hsl(var(--muted-foreground)); }
.archive-empty h3 { margin-top: 1rem; font-size: 1.25rem; }
.archive-empty p { margin-top: .5rem; color: hsl(var(--muted-foreground)); }
.archive-empty .btn { margin-top: 1.5rem; }

.archive-author { background: #1d1d1f; color: #fff; }
.archive-author-inner {
  width: min(100% - 3rem, 72rem); margin-inline: auto; padding-block: 3.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 3rem;
}
.archive-author h2 { font-size: 1.75rem; }
.archive-author p { max-width: 42rem; margin-top: .65rem; color: rgba(255,255,255,.66); line-height: 1.75; }
.archive-author-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 1.5rem; }
.archive-author-links a { color: hsl(12 72% 80%); font-size: .875rem; font-weight: 650; }
.archive-footer { border-top: 1px solid hsl(var(--border)); padding: 2.5rem 1.5rem; }
.archive-footer-inner {
  width: min(100%, 72rem); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem;
}
.archive-footer-inner > div { display: grid; gap: .2rem; }
.archive-footer-inner span, .archive-footer-inner p, .archive-footer nav { color: hsl(var(--muted-foreground)); font-size: .75rem; }
.archive-footer nav { display: flex; gap: 1.5rem; }
.archive-footer-inner > p { justify-self: end; }
.archive-disclaimer { max-width: 52rem; margin: 1.5rem auto 0; color: hsl(var(--muted-foreground)); font-size: .75rem; line-height: 1.7; text-align: center; }

@media (hover: hover) and (pointer: fine) {
  .archive-guide a:hover { gap: .75rem; color: hsl(var(--foreground)); }
  .archive-entry h3 a:hover { text-decoration: underline; }
  .archive-tabs .tab:hover { color: hsl(var(--foreground)); }
}

@media (max-width: 767px) {
  .archive-header-inner { width: min(100% - 2rem, 72rem); grid-template-columns: 1fr auto; }
  .archive-desktop-nav { display: none; }
  .archive-header-actions { grid-column: 2; }
  .archive-hero-inner { width: min(100% - 2rem, 72rem); padding-block: 3.5rem 4rem; grid-template-columns: 1fr; gap: 2.75rem; }
  .archive-heading h1 { margin-top: 1.5rem; font-size: clamp(2.75rem, 14vw, 4rem); }
  .archive-heading > p { margin-top: 1.25rem; font-size: 1rem; }
  .archive-guide { padding-block: 1.25rem; }
  .archive-library-inner { width: min(100% - 2rem, 72rem); padding-block: 3.5rem; }
  .archive-library-head { display: grid; gap: 1.75rem; }
  .archive-search { width: 100%; }
  .archive-tabs { margin-top: 1.5rem; gap: 1.5rem; }
  .archive-grid { grid-template-columns: minmax(0, 1fr); margin-top: 2rem; }
  .archive-featured { display: flex; flex-direction: column; padding: 2rem 1.5rem; }
  .archive-featured > h3 { margin-top: 1.25rem; font-size: 2rem; }
  .archive-featured > p { margin-top: 1.25rem; }
  .archive-featured > div:last-child { padding-top: 1.75rem; }
  .archive-entry { min-height: 0; padding-block: 1.75rem; }
  .archive-author-inner { width: min(100% - 2rem, 72rem); padding-block: 3rem; display: grid; gap: 2rem; }
  .archive-author-links { justify-content: start; }
  .archive-footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.5rem; }
  .archive-footer-inner > p { justify-self: center; }
  .archive-footer nav { flex-wrap: wrap; justify-content: center; }
}

/* Lead article uses an inverse surface; keep its labels readable on charcoal. */
#articles-grid .article-card--lead > .w-fit,
#articles-grid .article-card--lead > div .text-\[hsl\(var\(--primary\)\)\] {
  color: hsl(12 72% 80%);
}
#articles-grid .article-card--lead > .w-fit { background: rgba(255,255,255,.10); }

/* Standard article containment fallback; corrected markup consumes the same measure. */
article.prose > .mt-14.border-t,
article.prose > .mt-8.grid {
  width: 100%; max-width: 48rem; margin-left: auto; margin-right: auto;
  padding-left: 1rem; padding-right: 1rem;
}

/* ===================== Inner-page editorial reading system ===================== */
html.js body[data-secondary-template] .reveal,
html.js body[data-secondary-template] .reveal.in {
  opacity: 1;
  transform: none;
  animation: none;
}

body[data-secondary-template] main > header.border-b > .max-w-3xl {
  width: min(100%, 50rem);
  max-width: 50rem;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
}
body[data-secondary-template] main > header h1 {
  max-width: 19ch;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  letter-spacing: -.018em !important;
  line-height: 1.16 !important;
}
body[data-secondary-template] main > header h1 + p {
  max-width: 43rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

body[data-secondary-template="article"] main > header.border-b > .max-w-3xl {
  width: min(100%, 75rem);
  max-width: 75rem;
}
body[data-secondary-template="article"] main > header h1 {
  max-width: 28ch;
}
body[data-secondary-template="article"] main > header h1 ~ p {
  max-width: 43rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

body[data-secondary-template="article"] article.prose > .max-w-3xl,
body[data-secondary-template="longform"] article.prose > .max-w-3xl {
  width: min(100%, 50rem);
  max-width: 50rem;
  padding-top: 3.25rem;
  padding-bottom: 5rem;
}
body[data-secondary-template] article.prose p:not([class*="text-"]),
body[data-secondary-template] article.prose li:not([class*="text-"]) {
  font-size: 1.0625rem;
  line-height: 1.85;
}
body[data-secondary-template] article.prose blockquote {
  margin-block: 1.75rem;
  padding: .15rem 0 .15rem 1.125rem;
  color: hsl(var(--foreground) / .72);
  font-size: 1rem;
  line-height: 1.8;
}
body[data-secondary-template] article.prose h2 {
  scroll-margin-top: 7.5rem;
  margin-top: 4rem;
  margin-bottom: 1.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid hsl(var(--border));
  font-size: clamp(1.55rem, 2.5vw, 1.85rem);
  letter-spacing: -.012em !important;
  line-height: 1.32 !important;
}
body[data-secondary-template] article.prose section > h2:first-child {
  margin-top: 0;
}
body[data-secondary-template="article"] article.prose .space-y-8 > section:first-child > h2:first-child {
  margin-top: 0;
}
body[data-secondary-template="article"] article.prose .space-y-8 > section > h2:not(:first-child) {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 1.125rem;
  line-height: 1.45 !important;
}
body[data-secondary-template] article.prose h3 {
  scroll-margin-top: 7.5rem;
  margin-top: 2.75rem;
  margin-bottom: .875rem;
  font-size: 1.1875rem;
  line-height: 1.45 !important;
}
body[data-secondary-template] article.prose .space-y-8 > section + section {
  margin-top: 4rem;
}
body[data-secondary-template] article.prose figure {
  margin-block: 2.25rem;
}
body[data-secondary-template] article.prose figure img,
body[data-secondary-template] article.prose figure svg {
  border-radius: .625rem;
}
body[data-secondary-template] article.prose figure svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
.article-media-scroll {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.article-media-hint {
  display: none;
  margin: .5rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: .75rem;
  line-height: 1.5;
  text-align: right;
}
body[data-secondary-template] article.prose figcaption {
  margin-top: .75rem;
  color: hsl(var(--muted-foreground));
  font-size: .8125rem;
  line-height: 1.65;
}
body[data-secondary-template] article.prose .card {
  border-color: hsl(var(--border));
  box-shadow: 0 12px 32px -28px rgba(24,20,16,.28);
}
body[data-secondary-template] article.prose table {
  font-variant-numeric: tabular-nums;
}
body[data-secondary-template] article.prose th,
body[data-secondary-template] article.prose td {
  padding-top: .75rem;
  padding-bottom: .75rem;
  line-height: 1.55;
}
body[data-secondary-template] article.prose pre {
  margin-block: 1.75rem;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

/* Standard articles: the same TOC becomes a rail on wide screens and a compact
   scrollable index everywhere else. The original linear layout remains the
   no-JS fallback. */
.article-toc {
  margin: 0 0 2.5rem;
  padding: .875rem 0;
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}
.article-toc > div {
  display: flex;
  flex-wrap: nowrap;
  gap: .25rem .5rem;
  max-width: 100%;
  overflow-x: auto;
  padding: .25rem 0 .125rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.article-toc a {
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: .45rem .65rem;
  border-radius: var(--radius-sm);
  color: hsl(var(--muted-foreground));
  font-size: .875rem;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color 150ms ease, background-color 150ms ease;
}
.article-toc a[aria-current="location"] {
  color: hsl(var(--foreground));
  background: hsl(var(--accent));
  font-weight: 650;
}

/* Long-form table of contents and current-location affordance. */
.longform-toc {
  position: sticky; top: 4rem; z-index: 45; margin: 0; width: 100%;
  border: 0; border-bottom: 1px solid hsl(var(--border)); border-radius: 0;
  background: hsl(var(--background) / .96); box-shadow: 0 10px 28px -28px rgba(20,15,10,.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.longform-toc summary {
  min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem max(1rem, calc((100vw - 50rem) / 2)); cursor: pointer; font-weight: 650; list-style: none;
}
.longform-toc summary::-webkit-details-marker { display: none; }
.longform-location {
  max-width: 62%; overflow: hidden; color: hsl(var(--primary)); font-size: .8125rem; font-weight: 600;
  text-overflow: ellipsis; white-space: nowrap;
}
.longform-toc nav {
  display: grid; gap: .125rem; max-height: min(56vh, 28rem); overflow: auto;
  padding: .25rem max(1rem, calc((100vw - 50rem) / 2)) .875rem;
}
.longform-toc a {
  min-height: 44px; display: flex; align-items: center; padding: .45rem .65rem;
  border-radius: var(--radius-sm); color: hsl(var(--muted-foreground)); font-size: .875rem;
  text-decoration: none; transition: color 150ms ease, background-color 150ms ease;
}
.longform-toc a[aria-current="location"] { color: hsl(var(--foreground)); background: hsl(var(--accent)); font-weight: 650; }

.table-scroll-hint {
  margin: .5rem 0 0; color: hsl(var(--muted-foreground)); font-size: .75rem; text-align: right;
}

pre { max-width: 100%; }
pre > code { display: block; width: max-content; min-width: 100%; }
#back-top { width: 44px; height: 44px; }

@media (hover: hover) and (pointer: fine) {
  body[data-secondary-template="list"] .card-hover:hover { transform: translateY(-2px); border-color: hsl(var(--input)); }
  .longform-toc a:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
  .article-toc a:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
}

@media (min-width: 1180px) {
  body[data-secondary-template="article"] article.prose > .article-reading-grid {
    width: min(100%, 75rem);
    max-width: 75rem;
    display: grid;
    grid-template-columns: minmax(0, 50rem) minmax(12rem, 1fr);
    column-gap: 4rem;
    align-items: start;
  }
  .article-reading-grid > .space-y-8,
  .article-reading-grid > .mt-14.border-t,
  .article-reading-grid > .mt-8.grid {
    grid-column: 1;
  }
  .article-reading-grid > .article-toc {
    position: sticky;
    top: 6rem;
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    margin: 0;
    padding: 0 0 0 1rem;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid hsl(var(--border));
  }
  .article-reading-grid > .article-toc > p {
    padding: 0 .5rem .75rem;
    border-bottom: 1px solid hsl(var(--border));
  }
  .article-reading-grid > .article-toc > div {
    display: grid;
    gap: .125rem;
    overflow: visible;
    padding: .5rem 0 0;
  }
  .article-reading-grid > .article-toc a {
    min-height: 40px;
    white-space: normal;
  }
  .longform-toc {
    position: fixed; top: 6rem; right: max(1.25rem, calc((100vw - 86rem) / 2));
    width: 13.5rem; max-height: calc(100vh - 7.25rem); overflow: auto; margin: 0;
    padding-left: .875rem; border: 0; border-left: 1px solid hsl(var(--border));
    background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .longform-toc summary {
    min-height: 0; display: block; padding: 0 0 .75rem; cursor: default;
    border-bottom: 1px solid hsl(var(--border));
  }
  .longform-location { display: block; max-width: 100%; margin-top: .4rem; }
  .longform-toc nav { max-height: none; overflow: visible; padding: .5rem 0 0; }
  .longform-toc a { min-height: 38px; padding: .35rem .5rem; font-size: .8125rem; }
}

@media (max-width: 767px) {
  body[data-secondary-template] main > header.border-b > .max-w-3xl {
    padding-top: 2.25rem;
    padding-bottom: 2.75rem;
  }
  body[data-secondary-template] main > header h1 {
    max-width: none;
    font-size: 2rem;
    line-height: 1.22 !important;
  }
  body[data-secondary-template] main > header h1 + p {
    font-size: 1rem;
    line-height: 1.75;
  }
  body[data-secondary-template="article"] article.prose > .max-w-3xl,
  body[data-secondary-template="longform"] article.prose > .max-w-3xl {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
  }
  body[data-secondary-template] article.prose p:not([class*="text-"]),
  body[data-secondary-template] article.prose li:not([class*="text-"]) {
    font-size: 1rem;
    line-height: 1.82;
  }
  body[data-secondary-template] article.prose h2 {
    margin-top: 3.25rem;
    padding-top: 1.75rem;
    font-size: 1.4rem;
  }
  body[data-secondary-template] article.prose h3 {
    margin-top: 2.25rem;
    font-size: 1.0625rem;
  }
  body[data-secondary-template] article.prose .space-y-8 > section + section { margin-top: 3.25rem; }
  body[data-secondary-template] article.prose figure { margin-block: 1.75rem; }
  body[data-secondary-template] article.prose th,
  body[data-secondary-template] article.prose td { padding: .7rem .65rem; }
  body[data-secondary-template] article.prose .overflow-x-auto > table {
    min-width: 44rem;
  }
  body[data-secondary-template] article.prose .article-media-scroll > svg {
    width: 44rem;
    max-width: none;
  }
  .article-media-hint { display: block; }
  body[data-secondary-template="list"] .tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scroll-snap-type: x proximity; }
  body[data-secondary-template="list"] .tab { min-height: 44px; scroll-snap-align: start; }
  #search-input { min-height: 44px; }
  article.prose > .mt-14.border-t a,
  article.prose > .mt-8.grid a,
  #article-grid article a,
  #reset-filter { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-secondary-template="list"] .grid-fade { animation: none !important; }
}

/* ===================== Claude detail-page system =====================
   article-detail-claude-v1
   A complete replacement world for every article detail route. */
@font-face {
  font-family: "Pan Detail Serif";
  src: url("fonts/noto-serif-sc-detail.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

body.claude-detail {
  --background: 45 25% 96%;
  --foreground: 40 7% 12%;
  --card: 45 33% 99%;
  --card-foreground: 40 7% 12%;
  --primary: 14 62% 57%;
  --primary-foreground: 0 0% 100%;
  --secondary: 45 16% 92%;
  --secondary-foreground: 40 7% 16%;
  --muted: 45 16% 92%;
  --muted-foreground: 40 4% 39%;
  --accent: 14 48% 92%;
  --accent-foreground: 14 48% 36%;
  --border: 45 11% 84%;
  --input: 45 11% 84%;
  --ring: 14 62% 57%;
  --radius: .875rem;
  background: #f7f6f2;
  color: #201f1c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.claude-detail .mesh-bg,
body.claude-detail .noise-bg { display: none; }

body.claude-detail ::selection {
  background: #e7b7a5;
  color: #201f1c;
}

body.claude-detail > header {
  position: sticky !important;
  top: 0;
  z-index: 70;
  border-color: #dedbd3 !important;
  background: rgba(247, 246, 242, .94) !important;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

body.claude-detail > header > .max-w-6xl {
  max-width: 86rem;
  padding-inline: 2rem;
}

body.claude-detail > header nav { height: 4rem; }
body.claude-detail > header nav > a:first-child {
  color: #201f1c;
  font-family: "Pan Detail Serif", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.015em;
}
body.claude-detail > header nav a:not(.btn) { color: #55524d; }
body.claude-detail > header nav a:not(.btn):hover { color: #201f1c; }
body.claude-detail > header .btn-primary {
  min-height: 2.5rem;
  padding-inline: 1.15rem;
  border-radius: .55rem;
  background: #201f1c;
  color: #fff;
  font-weight: 650;
}
body.claude-detail > header .btn-primary:hover { background: #393733; }
body.claude-detail > header #menu-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-color: #d8d5cd;
  border-radius: 999px;
  background: transparent;
}

body.claude-detail main { padding-top: 0 !important; }
body.claude-detail main > header.border-b {
  border-color: #dedbd3 !important;
  background: #f7f6f2;
}

body.claude-detail .detail-hero {
  width: min(100%, 86rem) !important;
  max-width: 86rem !important;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr);
  gap: clamp(3rem, 5vw, 5rem);
  align-items: end;
  padding: clamp(4rem, 8vw, 7.5rem) 2rem clamp(4rem, 7vw, 6.5rem) !important;
}

body.claude-detail .detail-hero-primary > a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  margin: 0 0 2.75rem;
  color: #6a6761;
  font-size: .875rem;
  text-decoration: none;
}

body.claude-detail .detail-hero h1 {
  max-width: 15ch !important;
  margin: 0;
  color: #201f1c;
  font-family: "Pan Detail Serif", serif;
  font-size: clamp(3.3rem, 5.8vw, 5.4rem) !important;
  font-weight: 600 !important;
  letter-spacing: -.045em !important;
  line-height: 1.04 !important;
  text-wrap: balance;
  word-break: auto-phrase;
}
body.claude-detail .detail-title-token { display: inline-block; }
body.claude-detail .detail-hero h1.detail-title-long {
  max-width: 18ch !important;
  font-size: clamp(2.9rem, 5vw, 4.6rem) !important;
}
body.claude-detail .detail-hero h1.detail-title-very-long {
  max-width: 20ch !important;
  font-size: clamp(2.55rem, 4.3vw, 4rem) !important;
}

body.claude-detail .detail-hero-secondary {
  padding-bottom: .25rem;
}
body.claude-detail .detail-hero-secondary > p {
  max-width: 34rem !important;
  margin: 0;
  color: #4f4c47;
  font-family: "Pan Detail Serif", serif;
  font-size: clamp(1.15rem, 1.65vw, 1.45rem) !important;
  line-height: 1.6 !important;
}
body.claude-detail .detail-hero-secondary > p + p { margin-top: .85rem; }
body.claude-detail .detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .8rem;
  margin-top: 2.25rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid #dedbd3;
  color: #6a6761;
  font-size: .8125rem;
}
body.claude-detail .detail-meta .detail-category {
  margin: 0 !important;
  color: #c96a4c;
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .04em;
}
body.claude-detail .detail-meta .text-foreground { color: #201f1c; }

body.claude-detail article.prose {
  color: #2a2926;
}
body.claude-detail article.prose > .detail-copy {
  width: min(100%, 54rem) !important;
  max-width: 54rem !important;
  padding: 5rem 2rem 7.5rem !important;
}
body.claude-detail article.prose p:not([class*="text-"]),
body.claude-detail article.prose li:not([class*="text-"]) {
  color: #363430;
  font-size: 1.125rem;
  line-height: 1.88;
}
body.claude-detail article.prose strong,
body.claude-detail article.prose .font-semibold,
body.claude-detail article.prose .font-bold,
body.claude-detail article.prose .font-medium { color: #201f1c; }
body.claude-detail article.prose a {
  color: #b85f43;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
body.claude-detail article.prose a:hover { color: #201f1c; }

body.claude-detail article.prose .space-y-8 > section + section { margin-top: 6rem; }
body.claude-detail article.prose h2 {
  scroll-margin-top: 7.5rem;
  margin-top: 6rem;
  margin-bottom: 1.5rem;
  padding-top: 2.75rem;
  border-top: 1px solid #d8d5cd;
  color: #201f1c;
  font-family: "Pan Detail Serif", serif;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -.025em !important;
  line-height: 1.28 !important;
  word-break: auto-phrase;
}
body.claude-detail article.prose h3 {
  scroll-margin-top: 7.5rem;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  color: #201f1c;
  font-family: "Pan Detail Serif", serif;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -.015em !important;
  line-height: 1.4 !important;
}
body.claude-detail article.prose .space-y-8 > section > h2:not(:first-child) {
  margin-top: 3.25rem;
  margin-bottom: 1rem;
  padding-top: 0;
  border-top: 0;
  font-size: 1.45rem;
}

body.claude-detail article.prose .card {
  border: 1px solid #ece8dd;
  border-radius: .85rem;
  background: #fbfaf6;
  box-shadow: none;
}
/* Functional containers — tables and code — keep a crisp white surface + edge */
body.claude-detail article.prose .card:has(table),
body.claude-detail article.prose .card:has(pre) {
  background: #fff;
  border-color: #e4e0d5;
}
/* Calm the oversized 道/法/术/器 markers into quiet serif, not black display weight */
body.claude-detail article.prose .card > p.text-4xl {
  font-family: "Pan Detail Serif", serif;
  font-weight: 500;
  line-height: 1.1;
}
/* A touch more breathing room between the stacked panels */
body.claude-detail article.prose .card { padding: 1.35rem 1.5rem; }
/* Numbered lists flow as clean lists, not boxes — matches the standard-article style */
body.claude-detail article.prose .card.space-y-4,
body.claude-detail article.prose .card.space-y-3 {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: .25rem 0 0;
}
/* Soften the filled number chips into quiet outlined markers */
body.claude-detail article.prose .card.space-y-4 span[class*="bg-[hsl(var(--primary))]"],
body.claude-detail article.prose .card.space-y-3 span[class*="bg-[hsl(var(--primary))]"] {
  background: #f4e7df !important;
  color: #b0603f !important;
}
body.claude-detail article.prose blockquote {
  margin-block: 2.25rem;
  padding: 1.5rem 1.65rem;
  border: 0 !important;
  border-radius: .8rem;
  background: #efede7;
  color: #47443f;
  font-family: "Pan Detail Serif", serif;
  font-size: 1.08rem;
  line-height: 1.75;
}

body.claude-detail article.prose figure { margin-block: 2.75rem; }
body.claude-detail article.prose figure > div {
  border-color: #dedbd3 !important;
  border-radius: .95rem !important;
  background: #fff !important;
  box-shadow: 0 12px 32px -28px rgba(32,31,28,.35) !important;
}
body.claude-detail article.prose figure img,
body.claude-detail article.prose figure svg { border-radius: .9rem; }
body.claude-detail article.prose figcaption {
  margin-top: .85rem;
  color: #77736c;
  font-size: .8125rem;
  line-height: 1.65;
  text-align: center;
}

/* Real-screenshot cards — dark terminal frame embedded in the light reading page */
body.claude-detail .shot-fig { margin: 2.25rem 0; }
body.claude-detail .shot-card { border: 1px solid #2b2824; border-radius: 16px; overflow: hidden; background: #0f0e0b; box-shadow: 0 1px 2px rgba(32,31,28,.04), 0 22px 48px -30px rgba(32,31,28,.32); }
body.claude-detail .shot-card .shot-bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid #23201c; background: #17140f; }
body.claude-detail .shot-card .shot-bar .l { display: flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: .02em; color: #c9c2b4; }
body.claude-detail .shot-card .shot-bar .l .d { width: 7px; height: 7px; border-radius: 50%; background: #cc785c; flex: none; }
body.claude-detail .shot-card .shot-bar .r { font-size: 12.5px; color: #8b8578; font-variant-numeric: tabular-nums; }
body.claude-detail .shot-card img { display: block; width: 100%; height: auto; }
body.claude-detail .shot-cap { margin-top: 16px; }
body.claude-detail .shot-cap .sc-eb { margin: 0; font-size: 12.5px; font-weight: 650; letter-spacing: .14em; color: #b0603f; }
body.claude-detail .shot-cap h4 { margin: 6px 0 0; font-size: 18px; font-weight: 600; color: #201f1c; font-family: "Pan Detail Serif", serif; }
body.claude-detail .shot-cap .sc-rows { margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
body.claude-detail .shot-cap .sc-row { display: flex; gap: 12px; align-items: baseline; font-size: 15px; line-height: 1.65; }
body.claude-detail .shot-cap .sc-k { flex: none; width: 52px; font-weight: 600; color: #b0603f; }
body.claude-detail .shot-cap .sc-v { color: #3f3d38; }
body.claude-detail .shot-cap .sc-v b { color: #201f1c; font-weight: 600; }

body.claude-detail article.prose .overflow-x-auto {
  border: 1px solid #dedbd3;
  border-radius: .85rem;
  background: #fff;
}
body.claude-detail article.prose table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
body.claude-detail article.prose th {
  padding: .9rem 1rem;
  border-color: #dedbd3;
  background: #efede7;
  color: #4e4b46;
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
}
body.claude-detail article.prose td {
  padding: .95rem 1rem;
  border-color: #e6e3dc;
  color: #393733;
  font-size: .9rem;
  line-height: 1.65;
}
body.claude-detail article.prose pre {
  margin-block: 2.25rem;
  padding: 1.35rem;
  border: 1px solid #302f2c;
  border-radius: .9rem;
  background: #1d1d1b;
  box-shadow: none;
}
body.claude-detail article.prose pre.overflow-x-auto {
  border-color: #302f2c;
  background: #1d1d1b;
}
body.claude-detail article.prose code { font-size: .82rem; line-height: 1.7; }

body.claude-detail .article-toc,
body.claude-detail .longform-toc {
  color: #4f4c47;
}
body.claude-detail .longform-toc {
  position: sticky; top: 4rem; z-index: 45; margin: 0; width: 100%;
  border: 0; border-bottom: 1px solid #dedbd3; border-radius: 0;
  background: rgba(247,246,242,.96); box-shadow: 0 12px 28px -30px rgba(32,31,28,.5);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
body.claude-detail .longform-toc summary {
  min-height: 3.5rem;
  padding: .85rem max(2rem, calc((100vw - 54rem) / 2));
  color: #201f1c;
  font-size: .875rem;
  font-weight: 650;
}
body.claude-detail .longform-location { color: #b85f43; font-weight: 600; }
body.claude-detail .longform-toc nav {
  gap: .15rem;
  padding: .35rem max(2rem, calc((100vw - 54rem) / 2)) 1rem;
}
body.claude-detail .longform-toc a,
body.claude-detail .article-toc a {
  border-radius: .55rem;
  color: #6a6761;
}
body.claude-detail .longform-toc a[aria-current="location"],
body.claude-detail .article-toc a[aria-current="location"] {
  background: #f2e3dc;
  color: #201f1c;
}

body.claude-detail .detail-pagination {
  border-color: #dedbd3 !important;
  background: #efede7;
}
body.claude-detail .detail-pagination > div { max-width: 54rem; }
body.claude-detail article.prose > .detail-copy > .mt-14.border-t,
body.claude-detail article.prose > .detail-copy > .mt-8.grid {
  border-color: #dedbd3 !important;
}

body.claude-detail .detail-download {
  width: min(100% - 3rem, 86rem);
  max-width: 86rem;
  margin-top: 6rem !important;
  padding: 0;
}
body.claude-detail .detail-download > .card {
  overflow: hidden;
  border: 0;
  border-radius: 1.25rem;
  background: #1f1e1b;
  color: #f7f6f2;
  box-shadow: none;
}
body.claude-detail .detail-download h2 { color: #f7f6f2; font-weight: 600; }
body.claude-detail .detail-download .text-foreground { color: #f7f6f2; }
body.claude-detail .detail-download .text-muted-foreground { color: rgba(247,246,242,.66); }
body.claude-detail .detail-download .text-primary { color: #e7a087; }
body.claude-detail .detail-download .border-border { border-color: rgba(247,246,242,.16); }
body.claude-detail .detail-download .bg-border { background: rgba(247,246,242,.16); }
body.claude-detail .detail-download .bg-background\/70 { background: #292824; }
body.claude-detail .detail-download .btn-primary {
  border-color: #d97757;
  background: #d97757;
  color: #fff;
}
body.claude-detail .detail-download .btn-primary:hover { background: #c96a4c; }
body.claude-detail .detail-download .store-badge {
  border-color: rgba(247,246,242,.3) !important;
  background: transparent !important;
  color: #f7f6f2;
}
body.claude-detail .detail-download .store-badge:hover { background: rgba(247,246,242,.08) !important; }

body.claude-detail .detail-footer {
  margin-top: 6rem;
  border-color: #dedbd3 !important;
  background: #f7f6f2;
}
body.claude-detail .detail-footer .max-w-6xl { max-width: 86rem; }
body.claude-detail #back-top {
  border-color: #201f1c;
  background: #201f1c;
  color: #fff;
  box-shadow: 0 10px 30px -18px rgba(32,31,28,.65);
}

@media (hover: hover) and (pointer: fine) {
  body.claude-detail .longform-toc a:hover,
  body.claude-detail .article-toc a:hover { background: #efede7; color: #201f1c; }
}

@media (min-width: 1180px) {
  body.claude-detail[data-secondary-template="article"] article.prose > .article-reading-grid {
    width: min(100%, 86rem) !important;
    max-width: 86rem !important;
    grid-template-columns: minmax(0, 48rem) minmax(14rem, 1fr);
    column-gap: clamp(4rem, 7vw, 7rem);
    padding: 5.5rem 2rem 8rem !important;
  }
  body.claude-detail .article-reading-grid > .article-toc {
    top: 6.5rem;
    padding-left: 1.25rem;
    border-left-color: #d8d5cd;
  }
  body.claude-detail .article-reading-grid > .article-toc > p { border-bottom-color: #d8d5cd; }

  body.claude-detail[data-secondary-template="longform"] article.detail-article {
    width: min(100%, 86rem);
    max-width: 86rem;
    display: grid;
    grid-template-columns: minmax(0, 48rem) minmax(14rem, 1fr);
    column-gap: clamp(4rem, 7vw, 7rem);
    align-items: start;
    margin-inline: auto;
    padding: 5.5rem 2rem 8rem;
  }
  body.claude-detail .longform-toc {
    position: sticky; top: 6.5rem; right: auto;
    width: auto; max-height: calc(100vh - 8rem); overflow: auto; margin: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-left: 1.25rem; border: 0; border-left: 1px solid #d8d5cd;
    background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body.claude-detail .longform-toc summary {
    min-height: 0;
    display: block;
    padding: 0 0 .9rem;
    border-bottom: 1px solid #d8d5cd;
    cursor: default;
  }
  body.claude-detail .longform-toc nav { max-height: none; overflow: visible; padding: .65rem 0 0; }
  body.claude-detail .longform-toc a { min-height: 2.5rem; padding: .45rem .55rem; font-size: .8125rem; }
  body.claude-detail[data-secondary-template="longform"] article.prose > .detail-copy {
    width: 100% !important;
    max-width: 48rem !important;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding: 0 !important;
  }
}

@media (max-width: 1179px) {
  body.claude-detail .detail-hero {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .72fr);
    gap: 3.5rem;
  }
  body.claude-detail .detail-hero h1 { font-size: clamp(3rem, 6.4vw, 4.6rem) !important; }
}

@media (max-width: 767px) {
  body.claude-detail > header > .max-w-6xl { padding-inline: 1rem; }
  body.claude-detail .detail-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding: 3rem 1.25rem 3.5rem !important;
  }
  body.claude-detail .detail-hero-primary > a { margin-bottom: 2rem; }
  body.claude-detail .detail-hero h1 {
    max-width: none !important;
    font-size: clamp(2.45rem, 11.5vw, 3.35rem) !important;
    line-height: 1.1 !important;
  }
  body.claude-detail .detail-hero h1.detail-title-long { font-size: 2.25rem !important; }
  body.claude-detail .detail-hero h1.detail-title-very-long { font-size: 2.05rem !important; }
  body.claude-detail .detail-hero-secondary {
    padding-top: 1.75rem;
    padding-bottom: 0;
    border-top: 1px solid #dedbd3;
  }
  body.claude-detail .detail-hero-secondary > p {
    font-family: inherit;
    font-size: 1.05rem !important;
    line-height: 1.72 !important;
  }
  body.claude-detail .detail-meta { margin-top: 1.5rem !important; padding-top: 1rem; }

  body.claude-detail article.prose > .detail-copy {
    padding: 3.5rem 1.25rem 5.5rem !important;
  }
  body.claude-detail article.prose p:not([class*="text-"]),
  body.claude-detail article.prose li:not([class*="text-"]) {
    font-size: 1.0625rem;
    line-height: 1.85;
  }
  body.claude-detail article.prose .space-y-8 > section + section { margin-top: 4.75rem; }
  body.claude-detail article.prose h2 {
    margin-top: 4.75rem;
    padding-top: 2.25rem;
    font-size: 1.75rem;
  }
  body.claude-detail article.prose h3 { margin-top: 3rem; font-size: 1.3rem; }
  body.claude-detail article.prose .card { border-radius: .8rem; }
  body.claude-detail article.prose blockquote { padding: 1.25rem; }
  body.claude-detail article.prose th,
  body.claude-detail article.prose td { padding: .75rem .8rem; }

  body.claude-detail .longform-toc summary {
    padding-inline: 1.25rem;
  }
  body.claude-detail .longform-toc nav { padding-inline: 1.25rem; }
  body.claude-detail .article-toc { margin-bottom: 2.75rem; }

  body.claude-detail .detail-download {
    width: calc(100% - 2rem);
    margin-top: 4rem !important;
  }
  body.claude-detail .detail-download > .card { border-radius: 1rem; }
  body.claude-detail .detail-download > .card > div { padding: 3.5rem 1.25rem; }
  body.claude-detail .detail-download h2 { font-size: 2rem; }
  body.claude-detail .detail-footer { margin-top: 4rem; }
  body.claude-detail #back-top {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* 订阅进群二维码占位（首页 subscribe dialog） */
.qr-slot{width:186px;height:186px;border:2px dashed #d8d5cd;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#faf9f5;}
.qr-slot .qr-slot-icon{width:54px;height:54px;color:#bcb7ab;}
.qr-slot .qr-slot-label{font-size:12.5px;color:#8a857a;letter-spacing:.02em;}
