/* ═══════════════════════════════════════════════════════════════════
   reading area — same design system as the front page.
   Tokens copied from index.html, not re-invented:
     · fluid root font (0.694445vw)          · paper white #f6f5f1
     · Suisse Intl book 400                  · archidose 8rem grid overlay
     · four-colour restraint: #000 / #1a1a1a / #9f9f9f / #f6f5f1
   Paths are CSS-relative, so this file serves /writing/ and /writing/*.html.
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Suisse Intl";
  src: url("fonts/suisseintl-book.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

html {
  font-size: max(9.5px, 0.694445vw);
  font-family: "Suisse Intl", ui-sans-serif, system-ui, sans-serif;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; width: 0; }

body {
  background-color: #f6f5f1;
  margin: 0;
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(rgba(20,20,20,0.045) 0.3pt, transparent 0.3pt),
    linear-gradient(90deg, rgba(20,20,20,0.045) 0.3pt, transparent 0.3pt);
  background-size: 8rem 8rem;
}
* { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* ── 左侧固定骨架：区名 + 品类 ─────────────────────────────── */
.rail {
  position: fixed; left: 6rem; top: 5rem; width: 22rem;
  z-index: 10;
}
.rail .back {
  display: inline-block; font-size: 1.15rem; color: #9f9f9f;
  transition: color .3s, transform .3s;
}
.rail .back:hover { color: #1a1a1a; transform: translateX(-2px); }
.rail .label {
  margin-top: 5.4rem; font-size: 1.15rem; letter-spacing: .14em;
  text-transform: uppercase; color: #1a1a1a;
}
.rail .count { margin-top: .8rem; font-size: 1.15rem; color: #9f9f9f; }
.rail .cats { margin-top: 3.4rem; }
.rail .cats li { margin-bottom: 1.05rem; }
.rail .cats button {
  font: inherit; font-size: 1.2rem; background: none; cursor: pointer;
  color: #9f9f9f; padding: 0; text-align: left;
  transition: color .3s, transform .3s;
}
.rail .cats button:hover { color: #1a1a1a; transform: translateX(2px); }
.rail .cats button[aria-pressed="true"] { color: #1a1a1a; }
.rail .cats .n { color: #9f9f9f; opacity: .6; margin-left: .5rem; }

/* ── 正文列 ─────────────────────────────────────────────────── */
.wrap { position: relative; z-index: 5; padding: 5rem 6rem 14rem 34rem; }
.head { padding-bottom: 3.2rem; border-bottom: 1px solid rgba(20,20,20,.12); }
.head h1 { font-size: 3.2rem; font-weight: 400; line-height: 1.05; max-width: 52rem; }
.head .sub { margin-top: 1.8rem; font-size: 1.3rem; color: #9f9f9f; max-width: 40rem; }

/* ── 索引条目 ───────────────────────────────────────────────── */
.entries { margin-top: 0; }
.entry {
  display: grid; grid-template-columns: 5rem 1fr 12rem;
  gap: 2rem; align-items: baseline;
  padding: 2.5rem 0 2.4rem;
  border-bottom: 1px solid rgba(20,20,20,.10);
  transition: border-color .3s, transform .3s;
}
.entry:hover { border-color: rgba(20,20,20,.34); transform: translateX(3px); }
.entry .no { font-size: 1.15rem; color: #9f9f9f; }
.entry .t { font-size: 2.05rem; line-height: 1.15; }
.entry .t .dim { color: #9f9f9f; }
.entry .why { margin-top: .9rem; font-size: 1.25rem; color: #9f9f9f; max-width: 46rem; }
.entry .meta { font-size: 1.15rem; color: #9f9f9f; text-align: right; }
.entry .meta .st { display: block; color: #1a1a1a; margin-bottom: .4rem; }

/* ── 单篇 ───────────────────────────────────────────────────── */
.doc { max-width: 62rem; }
.doc .kicker {
  font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; color: #9f9f9f;
}
.doc h1 { margin-top: 2rem; font-size: 4.4rem; font-weight: 400; line-height: 1.03; }
.doc .lede {
  margin-top: 2.6rem; padding-top: 2.6rem; font-size: 2rem; line-height: 1.4;
  border-top: 1px solid rgba(20,20,20,.12);
}
.doc h2 { margin-top: 6.4rem; font-size: 1.3rem; letter-spacing: .14em;
  text-transform: uppercase; color: #1a1a1a; font-weight: 400; }
.doc p { margin-top: 1.6rem; font-size: 1.5rem; max-width: 52rem; }
.doc p strong { font-weight: 400; box-shadow: inset 0 -.55em 0 rgba(20,20,20,.07); }

/* 数字块 —— 每条带出处；查不到就写待回填，不写猜的 */
.fig { margin-top: 2.6rem; border-top: 1px solid rgba(20,20,20,.12); }
.fig .row {
  display: grid; grid-template-columns: 1fr 14rem 18rem; gap: 2rem;
  padding: 1.5rem 0; border-bottom: 1px solid rgba(20,20,20,.08); align-items: baseline;
}
.fig .k { font-size: 1.4rem; }
.fig .v { font-size: 1.6rem; text-align: right; }
.fig .s { font-size: 1.15rem; color: #9f9f9f; }
.fig .pend { color: #9f9f9f; }

/* 出处块 —— 我们的不同点：把"怎么知道的"摊开给读者看 */
.prov { margin-top: 6.4rem; padding: 2.6rem 0 0; border-top: 1px solid rgba(20,20,20,.12); }
.prov .label { font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; color: #9f9f9f; }
.prov ul { margin-top: 1.8rem; }
.prov li { font-size: 1.3rem; color: #1a1a1a; padding-left: 2.2rem; position: relative; margin-bottom: .9rem; }
.prov li::before { content: "—"; position: absolute; left: 0; color: #9f9f9f; opacity: .6; }

/* 落点 */
.ask { margin-top: 6.4rem; padding-top: 2.6rem; border-top: 1px solid rgba(20,20,20,.12); }
.ask .label { font-size: 1.3rem; max-width: 40rem; }
.ask form { margin-top: 2.2rem; display: flex; gap: 1.4rem; flex-wrap: wrap; max-width: 60rem; }
.ask input, .ask textarea {
  font: inherit; font-size: 1.35rem; padding: 1.4rem 1.6rem;
  background: transparent; color: #1a1a1a;
  border: 1px solid rgba(20,20,20,.20); transition: border-color .3s;
}
.ask input:focus, .ask textarea:focus { outline: none; border-color: rgba(20,20,20,.60); }
.ask input { flex: 1 1 22rem; }
.ask textarea { flex: 1 1 100%; min-height: 9rem; resize: vertical; }
.ask button {
  font: inherit; font-size: 1.35rem; padding: 1.4rem 2.6rem; cursor: pointer;
  background: #1a1a1a; color: #f6f5f1; transition: opacity .3s;
}
.ask button:hover { opacity: .82; }
.ask .note { margin-top: 1.6rem; font-size: 1.15rem; color: #9f9f9f; }

/* ── 小屏 ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .rail { position: static; width: auto; padding: 4rem 4rem 0; }
  .rail .label, .rail .cats { margin-top: 2.6rem; }
  .rail .cats { display: flex; flex-wrap: wrap; gap: 1.6rem; }
  .rail .cats li { margin: 0; }
  .wrap { padding: 3rem 4rem 8rem; }
  .head h1 { font-size: 2.6rem; }
  .entry { grid-template-columns: 3.4rem 1fr; }
  .entry .meta { display: none; }
  .entry .t { font-size: 1.8rem; }
  .doc h1 { font-size: 3rem; }
  .doc .lede { font-size: 1.7rem; }
  .fig .row { grid-template-columns: 1fr; gap: .4rem; }
  .fig .v { text-align: left; }
}

/* 文章配图（orange line 插画）：图像本身已压到 1600px webp */
.fig-img { margin: 2.2rem 0; }
.fig-img img { width: 100%; height: auto; display: block; }
.fig-img figcaption {
  margin-top: .6rem;
  font-size: .8125rem;
  line-height: 1.5;
  color: #6f6a63;
  max-width: 46ch;
}
