/* ============================================================
   晨星·路西法 · 首页 v6 —— 短而清楚,短片放在第二屏
   只给首页用;服务页、笔记、博客、短片页仍然用 css/style.css。

   v6 的约定(改之前先看,README「首页 v6」一节有原因):
   1. 八个区块,桌面约 9 屏、手机约 11 屏;不再钉住章节、不做滚动回放。
      v5 的滚动叙事桌面要滚 35 屏,短片排在第 28 屏,这是 v6 推翻它的原因。
   2. 短片是第二个区块(#films),导航第一项就是它;点封面在原地播放,没有 JS 时链到短片页。
   3. 手机上(≤ 760px),短片、七层厂房、项目小卡、三种买法改成横向滑动的一排,不把页面拉长。
   4. 动效只剩:标题入场、终端回放、数字累加、阅读进度条;系统开了"减少动态效果"全部关掉。
   5. 颜色只用下面的变量,深浅两套;强调靠实心近黑,不靠色相;点击区域 ≥ 44px;390px 宽无横向滚动。
   ============================================================ */
:root {
  --paper: #ffffff;
  --paper-2: #f5f6f7;
  --ink: #1e2124;
  --muted: #5f6368;
  --faint: #8f9296;
  --line: #e5e6e8;
  --line-2: #cfd2d6;
  --band: #1e2124;
  --band-2: #272b2f;
  --band-ink: #f2f3f5;
  --band-muted: #a6abb1;
  --band-line: #3a3e43;
  --band-dim: #4a4f55;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --nav-h: 56px;
  --wrap: 1180px;
  --gl: max(clamp(16px, 4vw, 32px), env(safe-area-inset-left, 0px));
  --gr: max(clamp(16px, 4vw, 32px), env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15181b; --paper-2: #1a1d21; --ink: #e8eaed; --muted: #a2a7ad; --faint: #84888d;
    --line: #2a2e32; --line-2: #41464c;
    --band: #0b0d0f; --band-2: #15181b; --band-ink: #f2f3f5; --band-muted: #a6abb1; --band-line: #2c3035; --band-dim: #3f444a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15181b; --paper-2: #1a1d21; --ink: #e8eaed; --muted: #a2a7ad; --faint: #84888d;
  --line: #2a2e32; --line-2: #41464c;
  --band: #0b0d0f; --band-2: #15181b; --band-ink: #f2f3f5; --band-muted: #a6abb1; --band-line: #2c3035; --band-dim: #3f444a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  --s-bg: var(--paper); --s-ink: var(--ink); --s-muted: var(--muted); --s-line: var(--line-2);
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--paper); }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -.015em; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gl); padding-right: var(--gr); position: relative; }
.eyebrow { font: 600 12.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--s-muted); }
.num { font-variant-numeric: tabular-nums; }
.band { --s-bg: var(--band); --s-ink: var(--band-ink); --s-muted: var(--band-muted); --s-line: var(--band-line); background: var(--band); color: var(--band-ink); }
.alt { background: var(--paper-2); }
.sec { padding-block: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }
.band.sec { border-top-color: var(--band); }
.anchor { position: absolute; top: 0; }
.sec { position: relative; }
.h2 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.15; font-weight: 800; margin-top: 12px; letter-spacing: -.025em; }
.sub { color: var(--s-muted); font-size: clamp(15.5px, 1.3vw, 17.5px); margin-top: 14px; max-width: 46em; }
.sub b { color: var(--s-ink); font-weight: 650; }
.sec-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.more { font-weight: 650; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.go { font: 600 13px/1 var(--mono); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
a.go:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 导航 + 阅读进度 ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.nav .wrap { height: var(--nav-h); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand small { font-weight: 500; color: var(--muted); margin-left: 8px; font-size: 13px; }
.seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 800 11px/1.05 var(--sans); text-align: center; letter-spacing: 0; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--muted); padding: 10px 9px; border-radius: 4px; min-height: 44px; display: inline-flex; align-items: center; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="true"] { color: var(--ink); font-weight: 650; }
.nav-links a[href="#films"] { color: var(--ink); font-weight: 650; }
.nav-links a[href="#films"]::before { content: "▶"; font-size: 9px; margin-right: 6px; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-links + .nav-actions { margin-left: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 4px; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--s-ink); background: var(--s-ink); color: var(--s-bg); transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: transparent; color: var(--s-ink); }
.btn.ghost { background: transparent; color: var(--s-ink); border-color: var(--s-line); }
.btn.ghost:hover { border-color: var(--s-ink); }
.btn.sm { min-height: 44px; padding: 0 12px; font-size: 13px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-2); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
.burger { display: none; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: currentColor; transition: transform .25s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 1060px) {
  .nav-links { display: none; }
  .burger { display: inline-grid; }
  .nav-actions { margin-left: auto; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav-links.open a { font-size: 16px; }
}
@media (max-width: 520px) { .nav-actions .btn.sm { display: none; } .brand small { display: none; } }
.skip { position: absolute; left: -9999px; top: 0; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { left: 16px; top: 16px; }

/* ---------- 00 开场 ---------- */
.hero { position: relative; overflow: hidden; }
.hero-lines { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 96px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 60%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 60%, transparent); }
.hero > .wrap { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(36px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-copy { display: grid; gap: 20px; }
.hero h1 { font-size: clamp(38px, 6vw, 80px); line-height: 1.06; font-weight: 800; letter-spacing: -.035em; }
.ch { display: inline-block; }
.is-anim .ch { animation: rise .8s var(--ease) backwards; animation-delay: calc(var(--i) * 32ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(.45em) rotate(4deg); filter: blur(6px); } }
.is-anim .hero .lede, .is-anim .hero .cta-row, .is-anim .hero .eyebrow { animation: fadeUp .8s var(--ease) backwards .55s; }
.is-anim .hero .eyebrow { animation-delay: 0s; }
.is-anim .hero .cta-row { animation-delay: .7s; }
.is-anim .term { animation: fadeUp .9s var(--ease) backwards .35s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
.lede { font-size: clamp(16.5px, 1.45vw, 19px); color: var(--muted); max-width: 38em; }
.lede b { color: var(--ink); font-weight: 650; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row .btn span { font-size: 11px; }

.term { background: var(--band); color: var(--band-ink); border-radius: 8px; font: 13px/1.7 var(--mono); overflow: hidden; border: 1px solid var(--band-line); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--band-line); color: var(--band-muted); font-size: 11.5px; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--band-dim); }
.term-bar span { margin-left: 8px; }
.term-body { padding: 14px 16px 16px; display: grid; gap: 4px; min-height: 236px; }
.t-prompt { color: var(--band-ink); }
.t-prompt::before { content: "› "; color: var(--band-muted); }
.t-caret { display: inline-block; width: 7px; height: 1.1em; background: var(--band-ink); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.t-line { display: grid; grid-template-columns: 18px 128px minmax(0, 1fr); gap: 8px; color: var(--band-muted); transition: opacity .3s; }
.t-line .ok { color: var(--band-ink); }
.t-line b { color: var(--band-ink); font-weight: 600; }
.t-line[data-wait] { opacity: 0; }
.t-foot { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--band-line); color: var(--band-muted); font-size: 11.5px; }
.t-foot b { color: var(--band-ink); }
@media (max-width: 420px) { .t-line { grid-template-columns: 16px minmax(0, 1fr); } .t-line span:last-child { grid-column: 2; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(32px, 4vw, 52px); border-top: 1px solid var(--line-2); position: relative; }
.stat { padding: 16px 20px 0 0; display: grid; gap: 4px; align-content: start; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat b { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 14px; }
.stat small { font: 11.5px/1.3 var(--mono); color: var(--faint); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .term { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 12px; }
  .stat small { display: none; }
}

/* ---------- 01 短片 ---------- */
.films-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.films-head { display: grid; gap: 0; align-content: start; position: sticky; top: calc(var(--nav-h) + 32px); }
.films-head .more { margin-top: 18px; justify-self: start; }
.film-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.film { display: grid; gap: 14px; align-content: start; }
.film-cover { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: #07070a; border: 1px solid var(--band-line); }
.film-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.film-cover:hover img { transform: scale(1.03); }
.film-cover .play { position: absolute; left: 10px; bottom: 10px; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(11, 13, 15, .72); border: 1.5px solid rgba(242, 243, 245, .9); transition: transform .25s var(--ease), background .25s; }
.film-cover .play::after { content: ""; position: absolute; left: 20px; top: 16px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #f2f3f5; }
.film-cover:hover .play { transform: scale(1.08); background: rgba(11, 13, 15, .9); }
.film-cover .dur { position: absolute; right: 10px; bottom: 24px; font: 600 11.5px/1 var(--mono); color: #f2f3f5; background: rgba(11, 13, 15, .72); padding: 5px 7px; border-radius: 3px; }
.film-cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #07070a; }
.film-meta { display: grid; gap: 6px; }
.film-meta .tag { font: 600 12px/1.4 var(--mono); color: var(--band-muted); letter-spacing: .04em; }
.film-meta .tag b { color: var(--band); background: var(--band-ink); padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.film-meta h3 { font-size: 20px; font-weight: 800; }
.film-meta h3 a { text-decoration: none; }
.film-meta h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.film-meta p { color: var(--band-muted); font-size: 14.5px; }
.films .more { color: var(--band-ink); }
@media (max-width: 1000px) { .films-grid { grid-template-columns: minmax(0, 1fr); } .films-head { position: static; } }
@media (max-width: 760px) { .film-meta p { font-size: 13.5px; } }

/* ---------- 02 代码工厂 ---------- */
.layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(28px, 4vw, 44px); counter-reset: none; }
.layer { border: 1px solid var(--line-2); border-radius: 6px; padding: 18px; display: grid; gap: 6px; align-content: start; background: var(--paper); }
.layer .lyr { font: 700 12px/1.4 var(--mono); color: var(--faint); letter-spacing: .06em; }
.layer h3 { font-size: 17px; font-weight: 800; line-height: 1.35; }
.layer p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.layer.pkg { background: var(--band); border-color: var(--band); color: var(--band-ink); }
.layer.pkg .lyr, .layer.pkg p { color: var(--band-muted); }
.layer.pkg .go { color: var(--band-ink); margin-top: 2px; }
.flow { margin-top: clamp(28px, 4vw, 44px); border-top: 2px solid var(--ink); padding-top: 16px; }
.flow-cap { font-weight: 750; font-size: 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.flow-cap span { font: 12px/1.4 var(--mono); color: var(--faint); font-weight: 500; }
.stations { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 16px; counter-reset: st; }
.stations li { counter-increment: st; display: grid; gap: 4px; align-content: start; position: relative; padding-top: 34px; }
.stations li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--mono); background: var(--ink); color: var(--paper); }
.stations li:not(:last-child)::after { content: ""; position: absolute; left: 30px; right: -6px; top: 11px; height: 2px; background: var(--line-2); }
.stations b { font-size: 15px; }
.stations span { font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 1000px) { .layers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .stations { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 20px; }
  .stations li:nth-child(4)::after { display: none; }
}
@media (max-width: 760px) {
  .layers { grid-auto-columns: min(66vw, 260px); }
  .stations { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stations li { grid-template-columns: 76px minmax(0, 1fr); padding: 0 0 12px 34px; gap: 8px; }
  .stations li::before { top: 0; }
  .stations li::after, .stations li:nth-child(4)::after { display: block; left: 11px; right: auto; top: 26px; bottom: 0; width: 2px; height: auto; }
  .stations li:last-child::after { display: none; }
  .stations b { line-height: 24px; }
  .stations span { padding-top: 2px; }
}

/* ---------- 03 项目 ---------- */
.case { border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); padding: clamp(18px, 2.2vw, 28px); display: grid; gap: 12px; align-content: start; }
.case.wide { margin-top: clamp(28px, 4vw, 44px); grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); border-color: var(--ink); }
.case-main { display: grid; gap: 12px; align-content: start; }
.case .meta { font: 600 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .04em; }
.case h3 { font-size: clamp(19px, 2vw, 25px); font-weight: 800; line-height: 1.25; }
.case p { color: var(--muted); font-size: 14.5px; }
.case p b { color: var(--ink); }
.decisions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.decisions li { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.decisions b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.kpis { display: flex; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.kpis div { display: grid; }
.kpis b { font-size: clamp(20px, 2.1vw, 26px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpis span { font-size: 12.5px; color: var(--muted); }
.kpis b span { font: inherit; color: inherit; }
.case.wide .kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; border-top: 0; border-left: 1px solid var(--line-2); padding: 0 0 0 clamp(20px, 3vw, 40px); align-content: center; }
.case.wide .kpis b { font-size: clamp(26px, 3vw, 38px); }
.stack-line { font: 12px/1.6 var(--mono); color: var(--faint); }
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
/* 03 案例卡(链到 cases/):摘要 + 1 个数字 + 证据等级;等级靠 ● ◐ ○ 区分,不靠颜色 */
.proof .sec-top + .cases { margin-top: clamp(20px, 3vw, 32px); }
.case h3 a { color: inherit; text-decoration: none; }
.case h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.case .ev { font: 600 12px/1.4 var(--mono); color: var(--ink); }
.case .go { justify-self: start; min-height: 44px; }
.proof .eyebrow.later { margin-top: clamp(28px, 4vw, 40px); }
@media (max-width: 900px) {
  .case.wide { grid-template-columns: minmax(0, 1fr); }
  .case.wide .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 0; border-top: 1px solid var(--line-2); padding: 14px 0 0; }
  .decisions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .case.wide .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case.wide .decisions, .case.wide .stack-line { display: none; }
}

/* ---------- 04 买工厂 ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(28px, 4vw, 44px); }
.tier { border: 1px solid var(--band-line); border-radius: 6px; padding: 22px; display: grid; gap: 10px; align-content: start; background: var(--band); }
.tier:hover, .tier.pick { border-color: var(--band-ink); }
.tier.pick { background: var(--band-2); }
.tier h3 { font-size: 21px; font-weight: 800; line-height: 1.3; }
.tier p { font-size: 14.5px; color: var(--band-muted); }
.tier ul { display: grid; gap: 6px; margin-top: 2px; }
.tier li { font-size: 14px; padding-left: 18px; position: relative; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--band-muted); font-family: var(--mono); }
.tier .btn { margin-top: 8px; justify-self: start; }
.tier-price { font-size: 13px; }
.tier-price b { color: var(--band-ink); font-weight: 700; }
.buy-proof { margin-top: 22px; font: 12.5px/1.7 var(--mono); color: var(--band-muted); }
.buy-proof a { color: var(--band-ink); text-underline-offset: 3px; margin-left: 6px; white-space: nowrap; }
@media (max-width: 900px) and (min-width: 761px) { .tiers { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .tier .btn { white-space: normal; text-align: left; line-height: 1.3; padding-block: 8px; } }

/* ---------- 05 经历 ---------- */
.exp-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(24px, 3.5vw, 40px); align-items: start; }
.tl li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); }
.tl li:last-child { border-bottom: 1px solid var(--line); }
.tl .when { font: 600 12.5px/1.75 var(--mono); color: var(--muted); }
.tl li.now .when { color: var(--ink); }
.tl li.now .when::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: 1px; }
.tl h3 { font-size: 16px; font-weight: 750; line-height: 1.5; }
.tl p { color: var(--muted); font-size: 14px; }
.skills { display: grid; gap: 4px; border: 1px solid var(--line-2); border-radius: 6px; padding: 20px; }
.skills dt { font-weight: 750; font-size: 14.5px; }
.skills dt:not(:first-child) { margin-top: 12px; }
.skills dd { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .exp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .tl li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tl li:not(.now) p { display: none; }
}

/* ---------- 06 笔记 + 博客最新(博客那段由 scripts/blog.py 生成进 index.html,这里只给样式) ---------- */
.posts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(24px, 3.5vw, 40px); }
.post { display: grid; gap: 8px; grid-template-rows: auto 1fr auto; text-decoration: none; padding: 18px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); transition: border-color .25s, transform .25s var(--ease); }
.post:hover { border-color: var(--ink); transform: translateY(-2px); }
.post .tag { font: 600 12px/1.4 var(--mono); color: var(--muted); }
.post h3 { font-size: 15.5px; font-weight: 750; line-height: 1.45; }
.post .go i { display: inline-block; font-style: normal; transition: transform .25s var(--ease); }
.post:hover .go i { transform: translateX(5px); }
@media (max-width: 1000px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .posts { grid-template-columns: minmax(0, 1fr); } .post { padding: 14px 16px; } .post .go { display: none; } }

#blog { background: var(--paper-2); }
#blog .wrap { padding-block: 0 clamp(56px, 7vw, 96px); }
#blog .narrow { max-width: var(--wrap); }
#blog .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; border-top: 1px solid var(--line-2); padding-top: 24px; }
#blog .sec-no { font: 600 12.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#blog h2 { font-size: clamp(19px, 2vw, 24px); font-weight: 800; }
#blog .sec-lead { color: var(--muted); font-size: 14.5px; flex-basis: 100%; }
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin-top: 16px; }
.post-list li { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.post-list h3 { font-size: 16px; font-weight: 750; line-height: 1.45; }
.post-list h3 a { text-decoration: none; }
.post-list h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-list p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.post-list code { font: 13px var(--mono); }
.case-meta { font: 600 12px/1.4 var(--mono); color: var(--muted); }
.offer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 12px; }
.offer-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; text-underline-offset: 4px; }
@media (max-width: 900px) { .post-list { grid-template-columns: minmax(0, 1fr); } .post-list p { -webkit-line-clamp: 2; line-clamp: 2; } }

/* ---------- 07 合作 + 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact .h2 { max-width: 15em; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.mail code { font: 600 clamp(17px, 1.8vw, 21px)/1 var(--mono); user-select: all; padding: 12px 14px; border: 1px solid var(--band-line); border-radius: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 18px; }
.links a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; color: var(--band-muted); }
.links a:hover { color: var(--band-ink); }
.offers { display: grid; }
.offers li { border-top: 1px solid var(--band-line); padding-block: 16px; display: grid; gap: 4px; }
.offers li:last-child { border-bottom: 1px solid var(--band-line); }
.offers h3 { font-size: 17px; font-weight: 750; }
.offers p { color: var(--band-muted); font-size: 14px; }
.offers a { font-weight: 650; font-size: 14px; text-underline-offset: 4px; min-height: 36px; display: inline-flex; align-items: center; justify-self: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 问答 ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 16px; padding-block: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--muted); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 16px; max-width: 70ch; font-size: 15px; }
.faq a { text-underline-offset: 3px; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.foot-row a { text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .t-caret { animation: none; }
  .film-cover img, .post, .film-cover .play { transition: none; }
}

/* ---------- 手机:几排卡片改成横向滑动,不把页面拉长(放在最后,压过上面各区块的列数) ---------- */
@media (max-width: 760px) {
  .film-row, .layers, .cases, .tiers {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(78vw, 320px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gl)) calc(-1 * var(--gr)); padding: 2px var(--gr) 14px var(--gl); scroll-padding-left: var(--gl);
    scrollbar-width: thin;
  }
  .film-row > *, .layers > *, .cases > *, .tiers > * { scroll-snap-align: start; }
  .film-row { grid-auto-columns: min(62vw, 260px); }
}
