/* ============================================================
   薄伽梵歌 · 行动哲学读书站 · 全站样式
   视觉方向：战场赭(行动 / 尘土) × 克里希那蓝(超越 / 警示) × 纸本暖白
   俱卢之野：两军对垒，中间一辆战车，车上一段对话决定了余下十六章
   ============================================================ */

:root {
  --paper: #f4f1ea;
  --paper-deep: #e9e2d2;
  --ink: #24211b;
  --muted: #6b6255;
  --accent: #6f2f16;        /* 战场赭 · 行动 */
  --accent-deep: #431d0d;
  --accent-wash: #ecdfd5;
  --caution: #2a3a6b;        /* 克里希那蓝 · 超越 / 警示 */
  --caution-wash: #dde3f0;
  --line: #ddd3bf;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --latin: "Didot", "Bodoni 72", "Baskerville", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; height: 58px;
}
.nav-brand {
  font-family: var(--latin);
  font-size: 14px; letter-spacing: 0.2em;
  color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap;
}
.nav-brand .mark { color: var(--accent); }
.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav-links a {
  font-size: 14px; color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-radius: 2px; white-space: nowrap;
}
.nav-links a:hover { color: var(--accent-deep); background: var(--accent-wash); }
.nav-links a.active { color: var(--paper); background: var(--accent); }

/* ---------- 版面骨架 ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 760px; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--latin);
  font-size: 12px; letter-spacing: 0.3em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 900; line-height: 1.3; }
h1 { font-size: clamp(34px, 5.5vw, 56px); letter-spacing: 0.02em; }
h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 20px; }
h3 { font-size: 20px; margin: 28px 0 10px; }
p { margin: 14px 0; }
.lede { font-size: 18px; color: var(--muted); max-width: 680px; }
strong { color: var(--accent-deep); }
em { font-style: normal; border-bottom: 2px solid var(--caution); }
a.text-link { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }

blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  padding: 18px 24px; margin: 22px 0;
  font-family: var(--serif); font-size: 17px;
}
blockquote cite {
  display: block; font-family: var(--latin);
  font-size: 12px; letter-spacing: 0.12em;
  color: var(--muted); margin-top: 8px; font-style: normal;
}

.inscription {
  text-align: center; font-family: var(--latin);
  font-size: 13px; letter-spacing: 0.5em;
  color: var(--accent-deep); text-transform: uppercase; margin: 8px 0 0;
}

/* ---------- 图框（SVG） ---------- */
.figure {
  border: 1.5px solid var(--ink);
  background: #fbfaf6;
  padding: 28px 24px 18px; margin: 28px 0;
}
.figure svg { display: block; width: 100%; height: auto; }
.figcap {
  font-family: var(--latin); font-size: 12px; color: var(--muted);
  letter-spacing: 0.1em; margin-top: 14px;
  border-top: 1px solid var(--line); padding-top: 10px;
}
.figcap b { color: var(--accent); font-weight: 700; }

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  border: 1.5px solid var(--ink);
  background: #fdfcf8;
  padding: 24px; position: relative;
  box-shadow: 4px 4px 0 var(--accent-wash);
}
.card h3 { margin-top: 0; }
.card .tag {
  display: inline-block; font-family: var(--latin);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--paper); background: var(--accent);
  padding: 2px 9px; margin-bottom: 12px; text-transform: uppercase;
}
.card .tag.caution { background: var(--caution); }
.card p { font-size: 15px; color: #41463f; }
a.card { display: block; text-decoration: none; color: inherit; transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--accent-wash); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; margin: 36px 0; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--accent);
}
.t-item { position: relative; padding: 0 0 34px; }
.t-item::before {
  content: ""; position: absolute; left: -32px; top: 8px;
  width: 12px; height: 12px; background: var(--paper);
  border: 3px solid var(--accent); border-radius: 50%;
}
.t-item.milestone::before { background: var(--caution); border-color: var(--caution); }
.t-year { font-family: var(--latin); font-weight: 700; font-size: 15px; color: var(--accent-deep); letter-spacing: 0.08em; }
.t-item h3 { margin: 4px 0 6px; font-size: 18px; }
.t-item p { margin: 0; font-size: 15px; color: #41463f; max-width: 640px; }

/* ---------- 精读块 ---------- */
.chapter { border-left: 4px solid var(--accent); padding: 8px 0 8px 26px; margin: 40px 0; }
.chapter .ch-no { font-family: var(--latin); font-size: 12px; letter-spacing: 0.26em; color: var(--accent); text-transform: uppercase; }
.chapter h3 { margin-top: 6px; font-size: 22px; }
.chapter ul { margin: 12px 0 12px 22px; }
.chapter li { margin: 6px 0; font-size: 15px; }
.chapter p { font-size: 15px; }
.keybox { background: var(--paper-deep); border: 1px solid var(--line); padding: 14px 18px; margin: 16px 0; font-size: 15px; }
.keybox b { font-family: var(--latin); font-size: 12px; letter-spacing: 0.2em; color: var(--accent-deep); display: block; margin-bottom: 6px; text-transform: uppercase; }

.difficulty { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 10px; }
.difficulty i { width: 9px; height: 9px; border: 1.5px solid var(--accent); border-radius: 50%; display: inline-block; }
.difficulty i.on { background: var(--accent); }

/* ---------- 适用边界 / 争议块 ---------- */
.keybox.bound {
  border: 1.5px dashed var(--accent);
  background: var(--accent-wash);
  padding: 16px 20px; margin: 22px 0; font-size: 14.5px; color: #37402f;
}
.keybox.bound b {
  font-family: var(--latin); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; display: block; margin-bottom: 6px; color: var(--accent-deep);
}
.keybox.controversy {
  border: 1.5px solid var(--caution);
  border-left-width: 5px;
  background: var(--caution-wash);
  padding: 16px 20px; margin: 24px 0; font-size: 15px; color: #22284a;
}
.keybox.controversy b {
  font-family: var(--latin); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; display: block; margin-bottom: 6px; color: var(--caution);
}
.keybox.warn {
  border: 2px solid var(--caution);
  background: var(--caution-wash);
  padding: 18px 22px; margin: 26px 0; font-size: 15px; color: #22284a;
}
.keybox.warn b {
  font-family: var(--latin); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; display: block; margin-bottom: 8px; color: var(--caution);
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 64px;
  border-bottom: 2px solid var(--ink);
  background:
    repeating-linear-gradient(92deg, rgba(111, 47, 22, 0.055) 0 2px, transparent 2px 26px),
    var(--paper);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .lede { margin-top: 20px; }

/* ---------- 签名交互：业瑜伽决策台（二维象限） ---------- */
.gitalab {
  border: 2px solid var(--ink);
  background: #fdfcf8;
  padding: 26px; margin: 30px 0;
  box-shadow: 6px 6px 0 var(--accent-wash);
}
.gl-title { font-family: var(--latin); font-size: 13px; letter-spacing: 0.22em; color: var(--accent); margin-bottom: 6px; text-transform: uppercase; }
.gl-sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.gl-body { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media (max-width: 760px) { .gl-body { grid-template-columns: 1fr; } }

.gl-plane-wrap { position: relative; }
.gl-plane {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  border: 1.5px solid var(--ink); background: var(--paper);
  cursor: crosshair; touch-action: none; overflow: hidden;
}
.gl-quad { position: absolute; width: 50%; height: 50%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12.5px; color: var(--muted); padding: 10px; line-height: 1.5; }
.gl-quad.q1 { top: 0; left: 50%; background: rgba(42,58,107,0.06); }
.gl-quad.q2 { top: 0; left: 0; background: rgba(111,47,22,0.09); }
.gl-quad.q3 { top: 50%; left: 0; background: rgba(111,47,22,0.03); }
.gl-quad.q4 { top: 50%; left: 50%; background: rgba(42,58,107,0.10); }
.gl-axis-h, .gl-axis-v { position: absolute; background: var(--ink); }
.gl-axis-h { left: 0; right: 0; top: 50%; height: 1px; }
.gl-axis-v { top: 0; bottom: 0; left: 50%; width: 1px; }
.gl-point {
  position: absolute; width: 22px; height: 22px; margin: -11px;
  background: var(--accent); border: 3px solid var(--paper);
  border-radius: 50%; box-shadow: 0 0 0 2px var(--ink);
  cursor: grab;
}
.gl-point:active { cursor: grabbing; }
.gl-axis-label { position: absolute; font-family: var(--latin); font-size: 11px; letter-spacing: 0.1em; color: var(--ink); text-transform: uppercase; }
.gl-axis-label.top { top: -22px; left: 50%; transform: translateX(-50%); }
.gl-axis-label.bottom { bottom: -22px; left: 50%; transform: translateX(-50%); }
.gl-axis-label.left { left: -8px; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: left center; }
.gl-axis-label.right { right: -8px; top: 50%; transform: translateY(-50%) rotate(90deg); transform-origin: right center; }

.gl-presets { display: flex; flex-direction: column; gap: 8px; }
.gl-presets button {
  font-family: var(--sans); font-size: 13.5px; text-align: left;
  padding: 10px 12px; cursor: pointer;
  border: 1.5px solid var(--ink); background: #fff;
}
.gl-presets button:hover { background: var(--accent-wash); }
.gl-readout { margin-top: 22px; min-height: 130px; font-size: 15px; line-height: 1.8; border-top: 1px solid var(--line); padding-top: 16px; }
.gl-readout .head { display: block; font-family: var(--serif); font-weight: 900; font-size: 19px; margin-bottom: 8px; color: var(--accent-deep); }
.gl-readout .why { color: #41463f; }
.gl-readout .warn { color: var(--caution); font-weight: 700; }
.gl-btns { display: flex; gap: 10px; justify-content: flex-start; margin-top: 16px; flex-wrap: wrap; }
.gl-btns button {
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  padding: 8px 14px; cursor: pointer;
  border: 2px solid var(--ink); background: #fff;
}
.gl-btns .btn-reset { border-color: var(--muted); color: var(--muted); }

/* ---------- 页脚 ---------- */
footer {
  border-top: 2px solid var(--ink); margin-top: 40px;
  padding: 36px 0 48px; background: var(--paper-deep);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: baseline; }
footer p, footer a { font-family: var(--latin); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }

.page-head { padding: 64px 0 48px; border-bottom: 2px solid var(--ink); }
.page-head .lede { margin-top: 16px; }
.concept { margin: 56px 0; }

table.terms { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
table.terms th, table.terms td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
table.terms th { background: var(--accent-wash); font-family: var(--latin); font-size: 12px; letter-spacing: 0.15em; color: var(--accent-deep); text-transform: uppercase; }
table.terms td:first-child { font-weight: 700; }
.table-scroll { overflow-x: auto; margin: 24px 0; }
.table-scroll table.terms { margin: 0; min-width: 560px; }

.note-inline { color: var(--muted); font-size: 0.9em; border-bottom: 1px dotted var(--line); }

:focus-visible { outline: 3px solid var(--caution); outline-offset: 2px; }
