/* ==========================================================================
   kndiail.asia — editorial.css
   「榭樱迹雪のBlog」纸本编辑设计系统
   层叠顺序：app.css（既有组件）→ 本文件（重定义 tokens + 首页 / 站头 / 站尾）
   字体：Instrument Serif（拉丁展示）+ Noto Serif SC 子集（中文展示）+ Instrument Sans
   ========================================================================== */

/* ---------- 0. 字体 ---------- */
@font-face {
  font-family: "KN Serif SC";
  src: url("fonts/NotoSerifSC-sub-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "KN Serif SC";
  src: url("fonts/NotoSerifSC-sub-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;

  --paper:      #F7F5F0;
  --paper-hi:   #FCFBF8;
  --paper-lo:   #EFECE5;
  --ink:        #242329;
  --ink-2:      #55535B;
  --ink-3:      #89868F;
  --ink-4:      #ADA9AE;
  --rule:       #DDD8CF;
  --rule-2:     #E7E2D9;
  --violet:     #6E6395;
  --violet-2:   #9389BD;
  --violet-3:   #B9AED8;
  --wash:       #EFEBF3;
  --night:      #17161B;
  --night-ink:  #E9E5DD;
  --night-3:    #837E7A;

  --f-disp: "KN Serif SC", "Instrument Serif", "Songti SC", Georgia, serif;
  --f-lat:  "Instrument Serif", "KN Serif SC", Georgia, "Times New Roman", serif;
  --f-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
            "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --wrap: 1304px;
  --gut: clamp(20px, 4.2vw, 56px);
  --read: 43rem;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* 兼容 app.css 既有组件（内页卡片 / 按钮 / 表单） */
  --bg: var(--paper);
  --bg-deep: var(--paper-lo);
  --panel: var(--paper-hi);
  --panel-2: var(--paper-lo);
  --card: var(--paper-hi);
  --card-hover: #fff;
  --line: var(--rule);
  --line-2: var(--rule-2);
  --accent: var(--violet);
  --accent-ink: #fff;
  --accent-soft: rgba(110, 99, 149, .08);
  --accent-line: rgba(110, 99, 149, .30);
  --shadow-1: none;
  --shadow-2: 0 18px 40px -34px rgba(36, 35, 41, .5);
  --r-1: 2px;
  --r-2: 3px;
  --r-3: 4px;
  --r-4: 4px;
  --head-h: 76px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --paper:      #141318;
  --paper-hi:   #1A1920;
  --paper-lo:   #100F14;
  --ink:        #EDE9E1;
  --ink-2:      #B5B0A9;
  --ink-3:      #87827D;
  --ink-4:      #615D59;
  --rule:       #302E35;
  --rule-2:     #26242B;
  --violet:     #B9AED8;
  --violet-2:   #9389BD;
  --violet-3:   #766B9D;
  --wash:       #1B1923;
  --night:      #0B0B0E;
  --night-ink:  #E9E5DD;
  --night-3:    #7C7772;

  --bg: var(--paper);
  --bg-deep: var(--paper-lo);
  --panel: var(--paper-hi);
  --panel-2: var(--paper-lo);
  --card: var(--paper-hi);
  --card-hover: #201F26;
  --accent-soft: rgba(185, 174, 216, .10);
  --accent-line: rgba(185, 174, 216, .32);
  --shadow-2: 0 18px 40px -30px rgba(0, 0, 0, .9);
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.78;
  letter-spacing: .006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 抹掉旧版的网格底纹与 bg-home.jpg 氛围层 */
body::before { display: none !important; }
.bg-layer { display: none !important; }

/* 纸的颗粒：一层极淡的噪点，盖住纯色平面的塑料感 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .30;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .16; }

::selection { background: var(--violet-3); color: #1c1b21; }
:root[data-theme="dark"] ::selection { background: var(--violet-3); color: #17161b; }

:focus-visible {
  outline: 1px solid var(--violet);
  outline-offset: 4px;
  border-radius: 1px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 99;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .1em;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 3. 排版原子 ---------- */
.micro {
  font-family: var(--f-sans);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-feature-settings: "tnum" 1;
}

.num {
  font-family: var(--f-lat);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .01em;
}

.dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 .55em;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  vertical-align: .28em;
}

.tlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding-bottom: 4px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink);
  transition: color .32s var(--ease);
}
.tlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: .22;
  transform-origin: left center;
  transition: opacity .32s var(--ease), transform .5s var(--ease-out);
}
.tlink .ar {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: 12px;
  transition: transform .38s var(--ease-out);
}
.tlink:hover { color: var(--violet); }
.tlink:hover::after { opacity: .85; }
.tlink:hover .ar { transform: translateX(4px); }
.tlink--s { font-size: 12px; color: var(--ink-2); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .3s var(--ease);
}
.icon-btn:hover { color: var(--violet); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- 4. 刊头 ---------- */
/* app.css 把 .site-head 固定为单行 76px 居中；新版是“小注 + 主行”两行结构 */
.site-head {
  height: auto;
  display: block;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-head.is-stuck { border-bottom-color: var(--rule); }

.mast-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--rule-2);
  transition: max-height .4s var(--ease), opacity .3s var(--ease), padding .4s var(--ease);
}
.site-head.is-stuck .mast-meta {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  border-color: transparent;
}
.mast-meta .micro { font-size: 9.5px; letter-spacing: .24em; }

.mast {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  padding-top: 16px;
  padding-bottom: 15px;
  transition: padding .4s var(--ease);
}
.site-head.is-stuck .mast { padding-top: 11px; padding-bottom: 10px; }

.wordmark { display: flex; align-items: baseline; gap: 12px; line-height: 1; }
.wm-l {
  font-family: var(--f-lat);
  font-size: 25px;
  letter-spacing: .16em;
  color: var(--ink);
}
.wm-c {
  font-family: var(--f-disp);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .22em;
  color: var(--ink-3);
  white-space: nowrap;
}
.wordmark:hover .wm-c { color: var(--violet); }
.wm-c { transition: color .3s var(--ease); }

.mast-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  margin-left: auto;
}
.mast-nav a {
  position: relative;
  padding-bottom: 3px;
  font-size: 11px;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.mast-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--ease-out);
}
.mast-nav a:hover { color: var(--ink); }
.mast-nav a:hover::after { transform: scaleX(1); }
.mast-nav a[aria-current="page"] { color: var(--ink); }
.mast-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 3px;
  height: 3px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--violet);
}

.mast-tools { display: flex; align-items: center; gap: 10px; }

.mast-search { position: relative; display: flex; align-items: center; }
.mast-search input {
  width: 104px;
  padding: 5px 0 5px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink);
  outline: none;
  transition: width .45s var(--ease-out), border-color .3s var(--ease);
}
.mast-search input::placeholder { color: var(--ink-4); letter-spacing: .12em; }
.mast-search input:focus { width: 158px; border-bottom-color: var(--violet); }

.mast-rule { height: 1px; background: var(--rule); }

.burger { display: none; }
.burger span {
  display: block;
  width: 15px;
  height: 1px;
  background: currentColor;
  margin: 4px 0;
  transition: transform .35s var(--ease), opacity .3s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(2.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-2.5px) rotate(-45deg); }

/* ---------- 5. 抽屉 ---------- */
.drawer {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 39;
  padding: 96px var(--gut) 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 30px 60px -50px rgba(0, 0, 0, .6);
}
.drawer[hidden] { display: none; }
.drawer.is-open { animation: drawerIn .32s var(--ease-out); }
@keyframes drawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.drawer-search { display: flex; gap: 12px; margin-bottom: 26px; }
.drawer-search .btn {
  flex: none;
  padding: 9px 16px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink);
  border: 1px solid var(--rule);
  background: none;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.drawer-search .btn:hover { border-color: var(--violet); color: var(--violet); }
.drawer-search input {
  flex: 1;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font-size: 15px;
  outline: none;
}
.drawer nav { display: grid; }
.drawer nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--f-disp);
  font-size: 20px;
}
.drawer nav a em {
  font-family: var(--f-sans);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.drawer nav a[aria-current="page"] { color: var(--violet); }
.drawer-foot { display: flex; gap: 22px; padding-top: 22px; }

/* ---------- 6. 首页 Hero ---------- */
.hero { padding-top: clamp(34px, 5vw, 68px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .74fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: stretch;
}

.hero-lead {
  display: flex;
  flex-direction: column;
  padding-top: 6px;
}

/* 天气：页脚信息式的编辑条目，锚在 Hero 左栏底部 */
.hero-wx {
  margin-top: auto;
  padding-top: clamp(30px, 4vw, 54px);
}
.hero-wx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule-2);
}
.hero-wx-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 9px;
}
.hero-wx-row .wx-t { font-size: 27px; }
.hero-wx-detail { font-size: 9px; letter-spacing: .14em; color: var(--ink-4); }

.issue { display: flex; align-items: center; gap: 0; margin: 0 0 clamp(22px, 3vw, 40px); color: var(--ink-3); }
.issue .dot { opacity: .55; }

.hero-title {
  margin: 0;
  display: block;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(54px, 8.4vw, 122px);
  line-height: .96;
  letter-spacing: .035em;
  color: var(--ink);
}
.ht-cn { display: block; }
.ht-blog {
  display: block;
  margin-top: clamp(8px, 1.2vw, 16px);
  margin-left: .1em;
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(15px, 1.9vw, 24px);
  letter-spacing: .08em;
  color: var(--ink-2);
}

.hero-en {
  margin: clamp(26px, 3.4vw, 44px) 0 0;
  padding-top: clamp(18px, 2vw, 26px);
  border-top: 1px solid var(--rule);
  font-family: var(--f-lat);
  font-size: clamp(21px, 2.7vw, 35px);
  line-height: 1.16;
  letter-spacing: .002em;
  color: var(--ink);
}
.hero-en em { font-style: italic; color: var(--ink-2); }

.hero-lede {
  max-width: 32em;
  margin: clamp(20px, 2.4vw, 30px) 0 0;
  font-size: 15px;
  line-height: 1.92;
  color: var(--ink-2);
}

.hero-links { display: flex; flex-wrap: wrap; gap: clamp(18px, 2.6vw, 38px); margin-top: clamp(22px, 2.6vw, 32px); }

/* 图版：纸 + 线稿 */
.hero-plate { margin: 0; }
.plate-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-lo);
  aspect-ratio: 3 / 4;
  box-shadow: 0 0 0 1px var(--rule-2) inset;
}
.plate-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.96) contrast(1.04);
  transform: scale(1.01);
  transition: transform 1.4s var(--ease-out);
}
.hero-plate:hover .plate-frame img { transform: scale(1.035); }
:root[data-theme="dark"] .plate-frame img { filter: brightness(.55) saturate(.8) contrast(1.05); }

.plate-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #2B2830;
  mix-blend-mode: multiply;
  opacity: .9;
}
:root[data-theme="dark"] .plate-art { color: #CFC8BE; mix-blend-mode: screen; opacity: .5; }

.hero-plate figcaption {
  display: flex;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--rule-2);
  margin-top: 12px;
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ink-4);
}

/* 底部信息栏 */
.rail {
  display: flex;
  align-items: baseline;
  gap: clamp(18px, 3vw, 40px);
  margin-top: clamp(30px, 4vw, 52px);
  padding: 15px 0 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.wx-t {
  font-family: var(--f-lat);
  font-size: 31px;
  line-height: 1;
  color: var(--ink);
}
.wx-t sup { font-size: .48em; vertical-align: super; margin-left: 1px; color: var(--ink-3); }
.wx-d { font-size: 13px; color: var(--ink-2); letter-spacing: .08em; }
.rail-note { margin-left: auto; font-size: 9px; letter-spacing: .16em; color: var(--ink-4); }

.rail-stats { display: flex; align-items: flex-end; gap: clamp(16px, 2.4vw, 34px); }
.rs { display: flex; align-items: baseline; gap: 8px; }
.rs + .rs { padding-left: clamp(16px, 2.4vw, 34px); border-left: 1px solid var(--rule-2); }
.rs b { font-family: var(--f-lat); font-weight: 400; font-size: 21px; line-height: 1; color: var(--ink); }
.rs .micro { font-size: 9px; letter-spacing: .16em; color: var(--ink-4); }

.rail-scroll { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.rail-scroll .micro { font-size: 9px; letter-spacing: .2em; color: var(--ink-4); }
.rs-line { position: relative; width: 34px; height: 1px; background: var(--rule); overflow: hidden; }
.rs-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--violet);
  transform: translateX(-100%);
  animation: railSlide 2.8s var(--ease) infinite;
}
@keyframes railSlide {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- 7. 章节头 ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-top: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(22px, 3vw, 38px);
}
.sec-no { font-size: 10px; letter-spacing: .16em; color: var(--ink-4); flex: none; }
.sec-title {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(25px, 2.9vw, 38px);
  line-height: 1;
  letter-spacing: .01em;
  color: var(--ink);
}
.sec-title em { font-style: italic; }
.sec-cn {
  font-family: var(--f-disp);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .2em;
  color: var(--ink-3);
  transform: translateY(-2px);
}
.sec-more { margin-left: auto; flex: none; }
.sec-head .sec-more.micro { font-size: 9.5px; letter-spacing: .18em; }

/* ---------- 8. 精选条目 ---------- */
.entries { padding-top: clamp(46px, 6vw, 82px); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: -18px 0 26px;
}
.chip {
  position: relative;
  padding: 0 0 4px;
  border: 0;
  background: none;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .3s var(--ease);
}
.chip span { font-family: var(--f-lat); font-size: 10px; margin-left: 3px; color: var(--ink-4); }
.chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .4s var(--ease-out);
}
.chip:hover { color: var(--ink); }
.chip.is-on { color: var(--violet); }
.chip.is-on::after { transform: scaleX(1); }

.feature { padding-bottom: clamp(28px, 3.4vw, 44px); border-bottom: 1px solid var(--rule); }
.feature[hidden] { display: none; }
.f-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0; color: var(--ink-3); }
.f-head .f-tag { color: var(--violet); }
.f-head > * + * { margin-left: .85em; }
.f-head .dot { margin: 0 .1em; }

.f-title {
  margin: clamp(16px, 2vw, 24px) 0 0;
  max-width: 22em;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.18;
  letter-spacing: -.018em;
  color: var(--ink);
}
.f-title a { transition: color .3s var(--ease); }
.f-title a:hover { color: var(--violet); }

.f-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(16px, 2vw, 24px);
}
.f-lede {
  flex: 1 1 30em;
  max-width: 44em;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.92;
  color: var(--ink-2);
}
.f-go { flex: none; margin-left: auto; }

.entry-list { display: grid; }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 46px 88px minmax(0, 1fr) 92px 22px;
  grid-template-areas:
    "no date title cat go"
    "no date ex    cat go";
  align-items: baseline;
  column-gap: 16px;
  padding: clamp(18px, 2vw, 25px) 0;
  border-bottom: 1px solid var(--rule-2);
  transition: color .3s var(--ease);
}
.row[hidden] { display: none; }
.row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .55s var(--ease-out);
  opacity: .55;
}
.row:hover::after { transform: scaleX(1); }
.r-no { grid-area: no; font-size: 11px; letter-spacing: .1em; color: var(--ink-4); }
.r-date { grid-area: date; font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3); }
.r-title {
  grid-area: title;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -.012em;
  color: var(--ink);
  transition: color .3s var(--ease), transform .45s var(--ease-out);
}
.r-ex {
  grid-area: ex;
  margin-top: 6px;
  max-width: 60ch;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--ink-3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color .3s var(--ease);
}
.row:hover .r-title { color: var(--violet); transform: translateX(3px); }
.row:hover .r-ex { color: var(--ink-2); }
.r-cat { grid-area: cat; font-size: 9.5px; letter-spacing: .14em; color: var(--ink-3); justify-self: end; text-align: right; }
.r-go {
  grid-area: go;
  font-size: 12px;
  color: var(--ink-4);
  justify-self: end;
  transition: transform .4s var(--ease-out), color .3s var(--ease);
}
.row:hover .r-go { color: var(--violet); transform: translate(3px, -3px); }

.filter-empty { padding: 26px 0; color: var(--ink-3); }

/* ---------- 9. 文学 ---------- */
.lit {
  position: relative;
  margin-top: clamp(56px, 7vw, 104px);
  padding: clamp(40px, 5vw, 76px) 0 clamp(48px, 6vw, 88px);
  background: var(--wash);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.lit-bg { position: absolute; inset: 0; pointer-events: none; }
.lit-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .12;
  filter: saturate(.55) brightness(1.15);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
}
:root[data-theme="dark"] .lit-bg img { opacity: .22; filter: saturate(.5) brightness(.85); }
.lit-inner { position: relative; }
.sec-head--lit { border-top-color: color-mix(in srgb, var(--ink) 16%, transparent); }

.lit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}
.lit-name {
  margin: 0;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: .06em;
  color: var(--ink);
}
.lit-note {
  max-width: 26em;
  margin: clamp(14px, 1.8vw, 20px) 0 clamp(18px, 2vw, 26px);
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.lit-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.lit-meta > div {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.lit-meta dt { font-size: 9px; letter-spacing: .2em; color: var(--ink-3); margin-bottom: 4px; }
.lit-meta dd { margin: 0; font-size: 14px; color: var(--ink); letter-spacing: .02em; }
.lit-meta dd.num { font-family: var(--f-lat); font-size: 19px; }

.chapters {
  columns: 3;
  column-gap: clamp(20px, 3vw, 44px);
  margin: clamp(34px, 4vw, 54px) 0 0;
  padding: 0;
  list-style: none;
}
.chapters li {
  break-inside: avoid;
  border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
}
.chapters a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  transition: color .3s var(--ease), padding-left .4s var(--ease-out);
}
.chapters a:hover { color: var(--violet); padding-left: 5px; }
.ch-n { flex: none; width: 18px; font-size: 10px; letter-spacing: .08em; color: var(--ink-4); }
.ch-t { font-size: 13.5px; letter-spacing: .01em; color: var(--ink-2); }
.chapters a:hover .ch-t { color: var(--violet); }

/* ---------- 10. 技术 ---------- */
.tech {
  margin-top: clamp(56px, 7vw, 104px);
  padding-block: clamp(46px, 5.5vw, 84px) clamp(40px, 5vw, 72px);
  background: var(--paper-hi);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.tech .sec-head { border-top-color: var(--rule); margin-bottom: clamp(24px, 3vw, 40px); }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.tech-col { padding: 0 clamp(18px, 2.6vw, 34px); }
.tech-col:first-child { padding-left: 0; }
.tech-col:last-child { padding-right: 0; }
.tech-col + .tech-col { border-left: 1px solid var(--rule-2); }

.tech-col h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink);
}
.tc-n { font-size: 11px; color: var(--ink-4); letter-spacing: .04em; }
.tech-col ol { margin: 0 0 14px; padding: 0; list-style: none; }
.tech-col li { border-bottom: 1px solid var(--rule-2); }
.tech-col li:last-child { border-bottom: 0; }
.tech-col li a { display: block; padding: 13px 0 14px; transition: color .3s var(--ease); }
.ti-d { display: block; font-size: 9px; letter-spacing: .16em; color: var(--ink-4); margin-bottom: 5px; }
.ti-t {
  display: block;
  font-size: 14px;
  line-height: 1.62;
  letter-spacing: .004em;
  color: var(--ink);
  transition: color .3s var(--ease);
}
.tech-col li a:hover .ti-t { color: var(--violet); }

/* ---------- 11. 树洞 ---------- */
.void {
  margin-top: clamp(56px, 7vw, 104px);
  padding: clamp(48px, 6vw, 92px) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-lo) 100%);
}
.void-inner {
  display: grid;
  grid-template-columns: clamp(52px, 7vw, 104px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}
.void-mark {
  font-family: var(--f-lat);
  font-size: clamp(56px, 7vw, 104px);
  line-height: .74;
  color: var(--violet-2);
  opacity: .5;
  user-select: none;
}
.void-k { margin: 0 0 clamp(16px, 2vw, 24px); font-size: 9px; letter-spacing: .22em; }
.void-quote {
  max-width: 26em;
  margin: 0;
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(23px, 3.1vw, 38px);
  line-height: 1.62;
  letter-spacing: .015em;
  color: var(--ink);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.void-quote.is-out { opacity: 0; transform: translateY(5px); }
.void-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 22px;
  margin-top: clamp(22px, 2.6vw, 32px);
}
.void-next {
  border: 0;
  padding: 0 0 4px;
  background: none;
  font-family: var(--f-sans);
  cursor: pointer;
}
.void-next .ar { font-size: 13px; }
.void-next:hover .ar { transform: rotate(90deg); }

/* ---------- 12. 别处 ---------- */
.elsewhere { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 72px); }

.ew-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 6vw, 100px);
}
.ew-k { margin: 0 0 6px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-size: 9px; }

.ew-index ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ew-index li { border-bottom: 1px solid var(--rule-2); }
.ew-index a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  transition: color .3s var(--ease), padding-left .4s var(--ease-out);
}
.ew-index a:hover { color: var(--violet); padding-left: 4px; }
.ei-n { font-size: 14px; color: var(--ink); }
.ei-c { font-size: 9px; letter-spacing: .12em; color: var(--ink-4); }

.soc { margin: 0; padding: 0; list-style: none; }
.soc li { border-bottom: 1px solid var(--rule-2); }
.soc a {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 16px;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  transition: color .3s var(--ease);
}
.soc a:hover { color: var(--violet); }
.soc-k { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); }
.soc-v { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.soc .ar { font-size: 11px; color: var(--ink-4); justify-self: end; transition: transform .4s var(--ease-out); }
.soc a:hover .ar { transform: translate(3px, -3px); color: var(--violet); }

/* ---------- 13. 版权页（深色反转） ---------- */
.colophon {
  background: var(--night);
  color: var(--night-ink);
  padding: clamp(40px, 5vw, 68px) 0 22px;
}
.colophon .micro { color: var(--night-3); }
.col-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .85fr));
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(30px, 4vw, 52px);
}
.col-word {
  display: block;
  font-family: var(--f-lat);
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1;
  letter-spacing: .14em;
  color: var(--night-ink);
}
.col-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.95; color: var(--night-3); }
.col-nav, .col-acct, .col-facts { display: flex; flex-direction: column; gap: 9px; }
.col-nav .micro, .col-acct .micro, .col-facts .micro { padding-bottom: 8px; border-bottom: 1px solid rgba(233, 229, 221, .14); margin-bottom: 3px; }
.col-nav a, .col-acct a {
  font-size: 12.5px;
  color: rgba(233, 229, 221, .72);
  transition: color .3s var(--ease), transform .3s var(--ease-out);
}
.col-nav a:hover, .col-acct a:hover { color: #fff; transform: translateX(3px); }
.col-facts p { margin: 0; font-size: 12px; line-height: 1.9; color: rgba(233, 229, 221, .55); }
.col-facts .dot { opacity: .35; }
.col-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 229, 221, .12);
}
.col-bottom .micro { font-size: 9px; letter-spacing: .16em; }
.col-spacer { flex: 1; }
.col-bottom a { color: var(--night-3); transition: color .3s var(--ease); }
.col-bottom a:hover { color: #fff; }
.no-uc { text-transform: none; letter-spacing: .06em; }

/* ---------- 14. 进度环 ---------- */
.read-ring {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 30;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease-out);
}
.read-ring.is-on { opacity: 1; transform: none; pointer-events: auto; }
.read-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rr-track { fill: none; stroke: var(--rule); stroke-width: 1; }
.rr-fill {
  fill: none;
  stroke: var(--violet);
  stroke-width: 1;
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
  transition: stroke-dashoffset .12s linear;
}
.rr-txt { position: relative; font-size: 8px; letter-spacing: .04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 15. 内页协调（文章 / 归档 / 动态） ---------- */
/* 让内页内容与刊头左右对齐（app.css 的 container 是 1200/24） */
.container {
  max-width: var(--wrap);
  padding-inline: var(--gut);
}

.page-head { padding: clamp(32px, 4vw, 56px) 0 clamp(20px, 2.4vw, 30px); border-bottom: 1px solid var(--rule); }
.page-head .eyebrow {
  display: block;
  font-family: var(--f-sans);
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 14px;
}
.page-title {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.16;
  letter-spacing: .02em;
}
.page-sub { margin: 12px 0 0; font-size: 12px; letter-spacing: .04em; color: var(--ink-3); }
.search-form { display: flex; gap: 10px; margin-top: 22px; max-width: 460px; }
.search-form input {
  flex: 1;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font-size: 14px;
  outline: none;
}
.search-form input:focus { border-bottom-color: var(--violet); }

.posts { display: grid; }
.post-row {
  display: block;
  margin: 0;
  padding: clamp(18px, 2vw, 26px) 0;
  border: 0;
  border-bottom: 1px solid var(--rule-2);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.post-row[hidden] { display: none; }
.post-row .pr-idx {
  display: block;
  font-family: var(--f-lat);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.pr-title {
  margin: 0 0 7px;
  font-family: var(--f-sans);
  font-size: clamp(17px, 1.9vw, 23px);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -.008em;
}
.pr-title a { transition: color .3s var(--ease); }
.pr-title a:hover { color: var(--violet); }
.pr-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 10px; letter-spacing: .1em; color: var(--ink-3); }
.pr-meta .pm-sep { color: var(--ink-4); }
.pm-cat { color: var(--violet); }
.pr-text { max-width: 62ch; margin: 8px 0 0; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.pr-foot { display: none; }

.pager { display: flex; gap: 20px; padding: 32px 0 8px; font-size: 12px; letter-spacing: .08em; color: var(--ink-3); }
.pager a { transition: color .3s var(--ease); }
.pager a:hover { color: var(--violet); }

.post-body {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-2);
}
.post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--f-sans);
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--ink);
}
.post-body blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 22px;
  border-left: 1px solid var(--violet-2);
  font-family: var(--f-disp);
  font-size: 1.12em;
  line-height: 1.9;
  color: var(--ink);
}
.post-body blockquote p { margin: 0; }
.post-body a {
  color: var(--ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color .3s var(--ease);
}
.post-body a:hover { color: var(--violet); background-size: 0 1px; }
.post-body pre { border-radius: 2px; background: var(--paper-lo); border: 1px solid var(--rule-2); }
.post-body img { border-radius: 1px; }

/* ---------- 16. 载入动效 ---------- */
.is-home .hero-lead > * {
  animation: riseIn .9s var(--ease-out) both;
}
.is-home .hero-lead > :nth-child(1) { animation-delay: .05s; }
.is-home .hero-lead > :nth-child(2) { animation-delay: .12s; }
.is-home .hero-lead > :nth-child(3) { animation-delay: .22s; }
.is-home .hero-lead > :nth-child(4) { animation-delay: .30s; }
.is-home .hero-lead > :nth-child(5) { animation-delay: .38s; }
.is-home .hero-plate { animation: fadeIn 1.3s var(--ease-out) both; animation-delay: .16s; }
.is-home .rail { animation: riseIn 1s var(--ease-out) both; animation-delay: .46s; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .78fr); gap: 40px; }
  .col-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapters { columns: 2; }
}

@media (max-width: 900px) {
  .mast-meta { display: none; }
  .mast { padding-top: 14px; padding-bottom: 13px; gap: 16px; }
  .mast-nav { display: none; }
  .burger { display: inline-flex; flex-direction: column; }
  .mast-tools { margin-left: auto; }
  .mast-search { display: none; }

  .hero { padding-top: 26px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hero-plate { order: 2; }
  .plate-frame { aspect-ratio: 4 / 3; }
  .hero-lede { max-width: none; }

  .rail { flex-wrap: wrap; gap: 14px 24px; align-items: center; }
  .rail-wx { width: 100%; flex-wrap: wrap; }
  .wx-sub { width: 100%; margin-top: 2px; }
  .rail-stats { margin-left: 0; }
  .rail-scroll { display: none; }

  .sec-head { flex-wrap: wrap; gap: 10px 12px; }
  .sec-cn { order: 3; }
  .sec-more { margin-left: auto; }

  .row {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    grid-template-areas:
      "no title go"
      "no meta  go"
      "no ex    go";
    gap: 2px 12px;
    align-items: start;
    padding: 15px 0 17px;
  }
  .r-no { grid-area: no; padding-top: 3px; }
  .r-title { grid-area: title; }
  .r-date { grid-area: meta; display: inline; font-size: 9px; }
  .r-ex { margin-top: 5px; font-size: 12px; }
  .r-cat { display: none; }
  .r-go { grid-area: go; align-self: center; }
  .row:hover .r-title { transform: none; }

  .lit-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
  .lit-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .tech-grid { grid-template-columns: minmax(0, 1fr); }
  .tech-col { padding: 0; }
  .tech-col + .tech-col { border-left: 0; border-top: 1px solid var(--rule); margin-top: 26px; padding-top: 18px; }

  .void-inner { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .void-mark { font-size: 54px; line-height: .6; }

  .ew-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .col-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .col-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero-title { font-size: clamp(52px, 15.4vw, 76px); letter-spacing: .02em; }
  .ht-blog { font-size: 14px; letter-spacing: .2em; }
  .hero-en { font-size: 20px; }
  .hero-lede { font-size: 14.5px; line-height: 1.9; }
  .hero-links { gap: 18px; }

  .rail { padding: 14px 0; }
  .rail-stats { gap: 14px; }
  .rs + .rs { padding-left: 14px; }
  .rs b { font-size: 18px; }
  .rs .micro { font-size: 8px; letter-spacing: .1em; }
  .wx-t { font-size: 25px; }
  .wx-sub { font-size: 8.5px; letter-spacing: .08em; }

  .feature .f-lede { font-size: 13.5px; line-height: 1.9; }
  .entry-list { margin-top: 4px; }

  .sec-title { font-size: 24px; }
  .sec-cn { font-size: 10px; letter-spacing: .14em; }
  .sec-more { font-size: 11px; }

  .chapters { columns: 2; column-gap: 22px; }
  .chapters a { padding: 8px 0; gap: 9px; }
  .ch-t { font-size: 12.5px; }

  .chapters { columns: 2; column-gap: 18px; }
  .ew-index ul { grid-template-columns: minmax(0, 1fr); }
  .soc a { grid-template-columns: 68px minmax(0, 1fr) 14px; }
  .void-quote { font-size: 21px; line-height: 1.7; }
  .col-top { grid-template-columns: minmax(0, 1fr); }
  .col-bottom { gap: 12px; }
  .col-spacer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-head, .colophon, .read-ring, .grain, .drawer { display: none; }
  body { background: #fff; }
}
