/* ===========================================================
   folio —— 编辑部风格
   米白纸感 / 衬线刊头 / 编号列表 / 单栏窄阅读
   全部本地字体栈，零外部请求
   =========================================================== */

:root {
  --bg: #fbfaf6;
  --bg-soft: #f4f2ea;
  --bg-deep: #eeece2;
  --ink: #1a1915;
  --ink-2: #4a4840;
  --ink-3: #8a877c;
  --line: #e2ded1;
  --line-2: #cfc9b8;
  --accent: #b4442e;
  --accent-ink: #8f3423;
  --accent-wash: #f6ebe6;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --wide: 1120px;
  --read: 704px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

html[data-mode="dark"] {
  --bg: #15140f;
  --bg-soft: #1c1b15;
  --bg-deep: #23221a;
  --ink: #eae5d7;
  --ink-2: #b7b2a2;
  --ink-3: #807b6b;
  --line: #2c2a22;
  --line-2: #403d32;
  --accent: #e07a62;
  --accent-ink: #f09580;
  --accent-wash: #2a1d18;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 99;
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 刊头 ---------- */

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.masthead-in { max-width: var(--wide); margin: 0 auto; padding: 0 28px; }

.masthead-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px;
  padding: 18px 0 12px;
}

.brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.brand-name {
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1.12;
  letter-spacing: .04em;
  font-weight: 700;
  color: var(--ink);
}

.brand-kicker {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--mono);
}

.masthead-tools { display: flex; align-items: center; gap: 14px; padding-bottom: 4px; }

.masthead-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-3);
  white-space: nowrap;
}

.mode-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-2);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .3s var(--ease);
}
.mode-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-15deg); }

/* 导航 */

.nav {
  display: flex; align-items: center; gap: 30px;
  border-top: 1px solid var(--line);
  padding: 11px 0 9px;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
  font-size: 13.5px;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 3px 0;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .18s var(--ease);
}
.nav-item::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -9px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav-item:hover { color: var(--ink); }
.nav-item:hover::after, .nav-item.is-current::after { transform: scaleX(1); }
.nav-item.is-current { color: var(--ink); font-weight: 600; }

.nav-search { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.nav-search::after { display: none; }
.nav-search:hover { color: var(--accent); }

.caret {
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .5;
  transition: transform .2s var(--ease);
}
.nav-group { position: relative; }
.nav-group:hover .caret { transform: translateY(2px); }

.nav-panel {
  position: absolute; top: calc(100% + 13px); left: -14px;
  min-width: 158px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.35);
  padding: 7px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(-5px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.nav-group:hover .nav-panel,
.nav-group:focus-within .nav-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-panel a {
  display: block;
  padding: 8px 17px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .16s, color .16s;
}
.nav-panel a:hover { background: var(--bg-soft); color: var(--accent); }

/* ---------- 通用小件 ---------- */

.kicker {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker-dot {
  width: 5px; height: 5px; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.byline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--ink-3);
}
.byline .sep { opacity: .45; }

.tag-cat { color: var(--accent); font-weight: 500; }
.tag-cat a:hover { text-decoration: underline; text-underline-offset: 3px; }

.arrow {
  display: inline-block; width: 18px; height: 1px;
  background: currentColor; vertical-align: middle;
  margin-left: 9px; position: relative;
  transition: width .26s var(--ease);
}
.arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- 首页头条 ---------- */

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 52px;
  align-items: center;
  padding: 54px 0 48px;
  border-bottom: 2px solid var(--ink);
}

.lead-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.3vw, 44px);
  line-height: 1.24;
  letter-spacing: -.005em;
  font-weight: 700;
}
.lead-title a { transition: color .2s var(--ease); }
.lead-title a:hover { color: var(--accent); }

.lead-dek {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 46ch;
}

.readmore {
  display: inline-flex; align-items: center;
  margin-top: 22px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 500;
}
.readmore:hover .arrow { width: 30px; }

.lead-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-deep);
}
.lead-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.94);
  transition: transform .7s var(--ease), filter .5s;
}
.lead-media:hover img { transform: scale(1.035); filter: saturate(1.04); }
.lead-media::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(0,0,0,.10);
  pointer-events: none;
}

/* ---------- 区块标题 ---------- */

.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding: 46px 0 4px;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .12em;
  font-weight: 700;
}
.sec-head h2::before {
  content: "";
  display: inline-block;
  width: 22px; height: 2px;
  background: var(--accent);
  vertical-align: 6px;
  margin-right: 11px;
}
.sec-more {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-3);
  transition: color .2s;
}
.sec-more:hover { color: var(--accent); }
.sec-head-sub { padding-top: 40px; }

/* ---------- 列表行 ---------- */

.rowlist { margin-top: 6px; }

.row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 148px;
  gap: 26px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s;
}
.row:first-child { border-top: 1px solid var(--line); }
.row:hover { border-bottom-color: var(--line-2); }

.row-no {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--ink-3);
  padding-top: 4px;
  letter-spacing: .02em;
  transition: color .2s;
}
.row:hover .row-no { color: var(--accent); }

.row-title {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -.002em;
}
.row-title a { transition: color .2s var(--ease); }
.row-title a:hover { color: var(--accent); }

.row-dek {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--ink-3); }
.row-meta .sep { opacity: .4; }

.row-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
}
.row-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.92);
  transition: transform .6s var(--ease), filter .5s;
}
.row:hover .row-thumb img { transform: scale(1.05); filter: saturate(1.03); }

/* ---------- 栏目条 ---------- */

.cats { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 0 0; }

.cat-chip {
  display: inline-flex; align-items: baseline; gap: 9px;
  padding: 8px 15px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color .2s, color .2s, background .2s;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.cat-chip-n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.cat-chip:hover .cat-chip-n { color: var(--accent); }

/* ---------- 列表页头 ---------- */

.list-head { padding: 52px 0 34px; border-bottom: 2px solid var(--ink); }
.list-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.005em;
}
.list-dek { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); max-width: 52ch; line-height: 1.8; }
.list-count { margin: 16px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }

/* ---------- 分页 ---------- */

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 40px 0 10px;
}
.pager-btn {
  padding: 10px 20px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color .2s, color .2s, background .2s;
}
.pager-btn:hover { border-color: var(--ink); color: var(--ink); }
.pager-btn.is-off { opacity: .35; pointer-events: none; }
.pager-count { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--ink-3); }

/* ---------- 文章页 ---------- */

.post { padding: 52px 0 20px; }

.post-head {
  max-width: var(--read);
  margin: 0 auto;
  padding-bottom: 34px;
}

.post-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 41px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.008em;
}

.post-dek {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-2);
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.byline-post { padding-top: 18px; border-top: 1px solid var(--line); }

.post-cover {
  margin: 0 0 52px;
  max-width: 980px;
  margin-left: auto; margin-right: auto;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--bg-deep);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--read)) 200px;
  gap: 56px;
  justify-content: center;
  align-items: start;
}

/* 目录 */

.toc {
  position: sticky; top: 108px;
  order: 2;
  font-size: 12.5px;
  line-height: 1.75;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.toc-head {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.toc nav ul { list-style: none; margin: 0; padding: 0; }
.toc nav ul ul { padding-left: 12px; }
.toc nav li { margin: 0 0 6px; }
.toc nav a {
  color: var(--ink-2);
  display: block;
  padding: 1px 0;
  transition: color .18s;
  border-left: 2px solid transparent;
  margin-left: -20px;
  padding-left: 18px;
}
.toc nav a:hover { color: var(--accent); border-left-color: var(--accent); }

/* 正文排版 */

.post-body {
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink);
  letter-spacing: .004em;
  min-width: 0;
}

.post-body > p { margin: 0 0 26px; }

.post-body h2 {
  position: relative;
  margin: 58px 0 22px;
  padding-top: 22px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .01em;
  border-top: 1px solid var(--line);
}
.post-body h2::before {
  content: "";
  position: absolute; top: -1px; left: 0;
  width: 46px; height: 2px;
  background: var(--accent);
}

.post-body h3 {
  margin: 40px 0 16px;
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .01em;
}
.post-body h3::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 3px;
}

.post-body h4 { margin: 30px 0 12px; font-size: 16px; font-weight: 700; color: var(--ink-2); }

.post-body a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: text-decoration-color .2s, color .2s;
}
.post-body a:hover { color: var(--accent); text-decoration-color: currentColor; }

.post-body strong { font-weight: 700; color: var(--ink); }
.post-body em { font-style: italic; }

.post-body ul, .post-body ol { margin: 0 0 26px; padding-left: 1.4em; }
.post-body li { margin: 0 0 10px; }
.post-body ul li::marker { color: var(--accent); }
.post-body ol li::marker { color: var(--ink-3); font-family: var(--mono); font-size: 14px; }

.post-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body img { display: block; margin: 34px auto; border: 1px solid var(--line); }

.post-body hr {
  margin: 48px auto;
  border: 0;
  width: 60px;
  height: 1px;
  background: var(--line-2);
}

.post-body code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1px 5px;
}

.post-body pre {
  margin: 30px 0;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.8;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.post-body table {
  width: 100%;
  margin: 30px 0;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.7;
}
.post-body th {
  background: var(--bg-soft);
  font-weight: 700;
  text-align: left;
  font-size: 13.5px;
  letter-spacing: .02em;
}
.post-body th, .post-body td {
  padding: 11px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.post-body tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-soft) 55%, transparent); }

.post-body figure { margin: 32px 0; }
.post-body figcaption { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); text-align: center; font-family: var(--mono); }

/* 文末 */

.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.post-tags a { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); padding: 5px 11px; transition: color .2s, border-color .2s; }
.post-tags a:hover { color: var(--accent); border-color: var(--accent); }

.post-end { margin-top: 40px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.post-end-mark { display: block; width: 8px; height: 8px; background: var(--ink); margin-bottom: 14px; }
.post-end p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--ink-3); }

/* 上下篇 */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  max-width: 980px;
  margin: 64px auto 0;
  background: var(--line);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.post-nav-item { display: block; padding: 22px 26px; background: var(--bg); transition: background .2s; }
.post-nav-item:hover { background: var(--bg-soft); }
.post-nav-next { text-align: right; grid-column: 2; }
.post-nav-lab { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); margin-bottom: 8px; }
.post-nav-title { display: block; font-family: var(--serif); font-size: 15px; line-height: 1.55; color: var(--ink); }
.post-nav-item:hover .post-nav-title { color: var(--accent); }

/* ---------- 说说 ---------- */

.moments { margin-top: 12px; }

.moment {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 34px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.moment-when { text-align: right; padding-top: 3px; }
.moment-date { display: block; font-family: var(--serif); font-size: 19px; color: var(--ink); letter-spacing: .02em; }
.moment-year { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .1em; margin-top: 2px; }

.moment-text { margin: 0; font-size: 16.5px; line-height: 1.9; color: var(--ink-2); max-width: 62ch; }

.moment-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.moment-shots img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--line); transition: transform .4s var(--ease); }
.moment-shots a:hover img { transform: translateY(-2px); }

/* ---------- 搜索 ---------- */

.finder { padding: 30px 0 6px; }

.finder-input {
  width: 100%;
  padding: 16px 0;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 2px solid var(--ink);
  outline: none;
  transition: border-color .25s;
}
.finder-input::placeholder { color: var(--ink-3); opacity: .55; font-size: 22px; }
.finder-input:focus { border-bottom-color: var(--accent); }

.finder-tip { margin: 14px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }

.finder-results { margin-top: 8px; }
.finder-results .row { grid-template-columns: 46px minmax(0, 1fr) 148px; }
.finder-empty { padding: 46px 0; color: var(--ink-3); font-size: 14px; }
.finder mark { background: var(--accent-wash); color: var(--accent-ink); padding: 0 2px; }

/* ---------- 页脚 ---------- */

.colophon {
  margin-top: 84px;
  background: var(--bg-soft);
  border-top: 2px solid var(--ink);
  padding-top: 52px;
}

.colophon-in {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 46px;
  padding-bottom: 46px;
}

.colophon-brand {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .04em;
}
.colophon-desc { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-3); max-width: 40ch; }

.colophon-head {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.colophon-col a {
  display: block;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color .18s;
}
.colophon-col a:hover { color: var(--accent); }

.colophon-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 20px; padding-bottom: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* ===========================================================
   版式变体：data-layout = ledger | grid | stream
   =========================================================== */

/* grid：两列卡片 */
body[data-layout="grid"] .rowlist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
}
body[data-layout="grid"] .row {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 30px 0;
}
body[data-layout="grid"] .row-no { display: none; }
body[data-layout="grid"] .row-thumb {
  order: -1;
  margin-bottom: 18px;
  aspect-ratio: 16 / 10;
}
body[data-layout="grid"] .row-title { font-size: 19.5px; }

/* stream：紧凑，无编号无图 */
body[data-layout="stream"] .row {
  grid-template-columns: minmax(0, 1fr) 112px;
  padding: 22px 0;
}
body[data-layout="stream"] .row-no { display: none; }
body[data-layout="stream"] .row-title { font-size: 19px; }
body[data-layout="stream"] .row-dek { -webkit-line-clamp: 1; margin-bottom: 9px; }
body[data-layout="stream"] .lead { padding: 46px 0 40px; }
body[data-layout="stream"] .lead-media { aspect-ratio: 3 / 2; }

/* ===========================================================
   响应式
   =========================================================== */

@media (max-width: 1000px) {
  .lead { gap: 34px; padding: 40px 0 36px; }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc {
    order: 0;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    margin-bottom: 34px;
    max-height: 216px;
    overflow-y: auto;
  }
  .toc nav a { margin-left: 0; padding-left: 0; border-left: 0; }
  .post-cover { aspect-ratio: 16 / 9; margin-bottom: 36px; }
}

@media (max-width: 820px) {
  .wrap, .masthead-in { padding: 0 20px; }
  .masthead-row { padding: 14px 0 10px; align-items: center; }
  .brand-name { font-size: 23px; }
  .brand-kicker { display: none; }
  .masthead-date { display: none; }
  .nav { gap: 20px; padding: 9px 0 7px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { white-space: nowrap; font-size: 13px; }
  .nav-search { margin-left: 0; }
  .nav-panel { display: none; }

  .lead { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 32px 0 30px; }
  .lead-media { order: -1; aspect-ratio: 16 / 10; }
  .lead-media img { width: 100%; }
  .lead-title { font-size: 27px; }
  .lead-dek { font-size: 15px; }

  .row, body[data-layout="stream"] .row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    padding: 22px 0;
  }
  .row-thumb, body[data-layout="grid"] .row-thumb { display: none; }
  .row-title { font-size: 17.5px; line-height: 1.5; }
  .row-dek { font-size: 13.5px; -webkit-line-clamp: 2; }
  body[data-layout="grid"] .rowlist { grid-template-columns: 1fr; gap: 0; }

  .post { padding: 32px 0 10px; }
  .post-title { font-size: 25px; }
  .post-dek { font-size: 14.5px; padding-left: 12px; }
  .post-body { font-size: 16.5px; line-height: 1.92; }
  .post-body h2 { font-size: 21px; margin-top: 44px; }
  .post-body h3 { font-size: 17.5px; }
  .post-body table { display: block; overflow-x: auto; white-space: nowrap; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { grid-column: 1; text-align: left; }
  .post-nav-item { padding: 18px 20px; }

  .moment { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .moment-when { display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .moment-date { font-size: 15px; }
  .moment-year { margin-top: 0; }

  .finder-input { font-size: 20px; }
  .finder-input::placeholder { font-size: 18px; }

  .colophon-in { grid-template-columns: 1fr 1fr; gap: 30px; }
  .colophon-about { grid-column: 1 / -1; }
  .colophon-base { flex-direction: column; gap: 6px; }
  .sec-head { padding-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 打印 */
@media print {
  .masthead, .colophon, .post-nav, .toc, .pager, .finder { display: none !important; }
  body { background: #fff; color: #000; }
  .post-body { font-size: 11pt; }
}

/* 阅读进度条 */
.readbar {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  transition: transform .1s linear;
}

/* 带下拉的父项 */
.nav-parent { cursor: default; }
.nav-group:hover .nav-parent.is-current::after,
.nav-group:hover .nav-parent::after { transform: scaleX(1); }

/* 机场卡片（短代码） */
.card-airport {
  margin: 34px 0;
  border: 1px solid var(--line-2);
  border-top: 2px solid var(--accent);
  background: var(--bg-soft);
}
.card-airport-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 16px 20px 0;
}
.card-airport-name { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.card-airport-route {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 2px 8px;
}
.card-airport-body { padding: 10px 20px 0; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.card-airport-body p { margin: 0 0 10px; }
.card-airport-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px 16px;
  margin-top: 10px;
}
.card-airport-price { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.card-airport-link { color: var(--accent); font-size: 13px; display: inline-flex; align-items: center; }
.card-airport-link:hover .arrow { width: 28px; }


/* 暗色下纸感封面略微压暗，避免刺眼 */
html[data-mode="dark"] .lead-media img,
html[data-mode="dark"] .row-thumb img,
html[data-mode="dark"] .post-cover img,
html[data-mode="dark"] .moment-shots img { filter: brightness(.84) saturate(.92); }
html[data-mode="dark"] .lead-media:hover img,
html[data-mode="dark"] .row:hover .row-thumb img { filter: brightness(.92) saturate(1); }

/* ===========================================================
   结构变体：data-structure = classic | rail | spread
   换的是 DOM 顺序和骨架，不是配色
   =========================================================== */

/* ---------- rail：左侧竖栏 ---------- */

.rail { display: none; }

@media (min-width: 1001px) {
  body[data-structure="rail"] { padding-left: 252px; }

  .rail {
    position: fixed; left: 0; top: 0; z-index: 40;
    width: 252px; height: 100vh;
    display: flex; flex-direction: column;
    padding: 30px 26px 22px;
    background: var(--bg);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .rail-brand { display: block; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
  .rail-name {
    display: block;
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.25;
  }
  .rail-kicker {
    display: block; margin-top: 5px;
    font-family: var(--mono); font-size: 9.5px;
    letter-spacing: .2em; color: var(--ink-3);
  }

  .rail-nav { display: flex; flex-direction: column; gap: 2px; padding: 22px 0 0; }
  .rail-group { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }

  .rail-link {
    position: relative;
    font-size: 14px;
    color: var(--ink-2);
    padding: 6px 0 6px 14px;
    transition: color .18s var(--ease);
  }
  .rail-link::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 2px; background: var(--accent);
    transform: scaleY(0); transform-origin: center;
    transition: transform .24s var(--ease);
  }
  .rail-link:hover { color: var(--ink); }
  .rail-link:hover::before, .rail-link.is-current::before { transform: scaleY(1); }
  .rail-link.is-current { color: var(--ink); font-weight: 600; }

  .rail-sub {
    font-size: 12.5px;
    color: var(--ink-3);
    padding: 4px 0 4px 28px;
    transition: color .18s;
  }
  .rail-sub:hover, .rail-sub.is-current { color: var(--accent); }

  .rail-link-search { margin-top: 10px; color: var(--ink-3); font-size: 13px; }

  .rail-foot {
    margin-top: auto; padding-top: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border-top: 1px solid var(--line);
  }
  .rail-date { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); }

  body[data-structure="rail"] main.wrap {
    max-width: 1080px;
    margin: 0;
    padding: 0 54px;
  }
  body[data-structure="rail"] .colophon-rail { margin-top: 72px; }
  .colophon-rail .colophon-in,
  .colophon-rail .colophon-base {
    max-width: 1080px; margin: 0 auto;
    padding-left: 54px; padding-right: 54px;
  }
}

@media (max-width: 1000px) {
  body[data-structure="rail"] { padding-left: 0; }

  .rail {
    position: sticky; top: 0; z-index: 40;
    display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 16px;
    width: 100%; height: auto;
    padding: 10px 20px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-head { flex: 0 0 auto; }
  .rail-brand { padding-bottom: 0; border-bottom: 0; }
  .rail-name { font-size: 19px; white-space: nowrap; }
  .rail-kicker { display: none; }
  .rail-nav { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 15px; padding: 0; flex: 0 0 auto; min-width: 0; }
  .rail-group { flex-direction: row; flex-wrap: nowrap; gap: 15px; padding-bottom: 0; flex: 0 0 auto; }
  .rail-link { white-space: nowrap; padding: 2px 0; font-size: 13px; }
  .rail-link::before { display: none; }
  .rail-link.is-current { border-bottom: 2px solid var(--accent); }
  .rail-sub { display: none; }
  .rail-link-search { margin-top: 0; }
  .rail-foot { margin: 0 0 0 auto; padding: 0; border-top: 0; flex: 0 0 auto; }
  .rail-date { display: none; }
  .colophon-rail .colophon-in,
  .colophon-rail .colophon-base { padding-left: 20px; padding-right: 20px; }
}

/* ---------- spread：报头式 ---------- */

.spread {
  position: relative;
  padding: 30px 0 0;
  border-bottom: 2px solid var(--ink);
  background: var(--bg);
}

.spread-in {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 28px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.spread-meta {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.spread-brand {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .16em;
  text-indent: .16em;
  transition: color .2s var(--ease);
}
.spread-brand:hover { color: var(--accent); }

.spread-nav {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 26px;
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink-2);
}
.spread-nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.spread-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.spread-nav a.is-current { color: var(--ink); border-bottom-color: var(--ink); }

.spread-mode { position: absolute; right: 28px; top: 26px; }

body[data-structure="spread"] .lead {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
  gap: 0;
  padding: 54px 0 46px;
}
body[data-structure="spread"] .lead-media {
  order: -1;
  max-width: 860px;
  margin: 0 auto 34px;
  aspect-ratio: 2 / 1;
}
body[data-structure="spread"] .lead-title { font-size: clamp(31px, 4vw, 52px); line-height: 1.22; }
body[data-structure="spread"] .lead-dek { margin-left: auto; margin-right: auto; }
body[data-structure="spread"] .kicker,
body[data-structure="spread"] .byline { justify-content: center; }
body[data-structure="spread"] .readmore { justify-content: center; }

body[data-structure="spread"] .list-head { text-align: center; }
body[data-structure="spread"] .list-head .kicker { justify-content: center; }
body[data-structure="spread"] .list-dek { margin-left: auto; margin-right: auto; }

/* spread 页脚：反色 + 大字裁切 */

.colophon-spread {
  margin-top: 88px;
  padding: 54px 0 0;
  background: var(--ink);
  color: var(--bg);
  border-top: 0;
  overflow: hidden;
}

.cs-inner { max-width: var(--wide); margin: 0 auto; padding: 0 28px; }

.cs-cols {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
}
.cs-head {
  margin: 0 0 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase;
  opacity: .5;
}
.cs-desc { margin: 0; font-size: 13.5px; line-height: 1.9; opacity: .68; max-width: 40ch; }
.cs-col a { display: block; padding: 3px 0; font-size: 13.5px; opacity: .82; transition: opacity .18s, color .18s; }
.cs-col a:hover { opacity: 1; color: var(--accent); }

.cs-mark { line-height: .76; margin: 30px 0 0; overflow: hidden; }
.cs-mark span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(76px, 15vw, 186px);
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--bg);
  opacity: .14;
}

.cs-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 18px 0 22px;
  border-top: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  opacity: .5;
}

@media (max-width: 820px) {
  .spread { padding-top: 20px; }
  .spread-in { padding: 0 20px 14px; }
  .spread-mode { right: 20px; top: 18px; width: 26px; height: 26px; }
  .spread-meta { margin-bottom: 12px; font-size: 9.5px; }
  .spread-brand { font-size: 27px; letter-spacing: .1em; text-indent: .1em; }
  .spread-nav { gap: 16px; margin-top: 16px; font-size: 12.5px; }
  body[data-structure="spread"] .lead { padding: 34px 0 30px; }
  body[data-structure="spread"] .lead-media { aspect-ratio: 16 / 10; margin-bottom: 24px; }
  body[data-structure="spread"] .lead-title { font-size: 25px; }

  .cs-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
  .cs-col-about { grid-column: 1 / -1; }
  .cs-mark span { font-size: 62px; }
  .colophon-spread { margin-top: 56px; padding-top: 38px; }
}

/* spread 导航里的子项平铺 */
.spread-nav a.spread-sub { font-size: 11.5px; opacity: .6; letter-spacing: .04em; }
.spread-nav a.spread-sub:hover { opacity: 1; }
