:root {
  --ink: #14251f;
  --ink-soft: #3d4f47;
  --deep: #0e3b2e;
  --deep-2: #14513f;
  --sand: #f3efe6;
  --sand-2: #e8e1d4;
  --paper: #fbf9f4;
  --accent: #b4472a;
  --line: #d6cfc1;
  --rail: 288px;
  --max: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, "Songti SC", serif;
  font-size: 17px;
  line-height: 1.85;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--deep-2); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.35;
  margin: 0 0 .55em;
  letter-spacing: .01em;
}

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

/* ---------- top bar ---------- */
.topbar {
  background: var(--deep);
  color: #e6efe9;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
}
.topbar span { opacity: .82; }

.sitehead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.sitehead .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
}
.brand img { width: 46px; height: 46px; border-radius: 10px; }
.brand strong { display: block; font-size: 19px; letter-spacing: .06em; }
.brand small { display: block; font-size: 12px; color: var(--ink-soft); letter-spacing: .12em; }

.menu-btn {
  margin-left: auto;
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--deep);
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Noto Sans SC", sans-serif;
}

.mainnav { border-top: 1px solid var(--line); background: #fff; }
.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0 22px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}
.mainnav a {
  display: block;
  padding: 13px 14px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.mainnav a:hover { color: var(--deep); }
.mainnav a.is-active { color: var(--deep); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- layout: left rail + content ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 42px;
  padding: 34px 0 60px;
}
.rail { position: sticky; top: 18px; align-self: start; }
.rail-box {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px 18px 20px;
  margin-bottom: 18px;
}
.rail-box h2 {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}
.rail-box ul { list-style: none; margin: 0; padding: 0; }
.rail-box li { border-bottom: 1px dotted var(--line); }
.rail-box li:last-child { border-bottom: 0; }
.rail-box a {
  display: block;
  padding: 9px 0;
  font-size: 15px;
  color: var(--ink-soft);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}
.rail-box a:hover { color: var(--accent); }
.rail-note { font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; }

/* ---------- hero (doc-style, not full-bleed) ---------- */
.doc-hero {
  border-left: 5px solid var(--deep);
  background: linear-gradient(90deg, var(--sand) 0%, var(--paper) 78%);
  padding: 30px 32px;
  margin-bottom: 34px;
}
.doc-hero .eyebrow {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12.5px;
  letter-spacing: .2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.doc-hero h1 { font-size: clamp(24px, 3vw, 34px); }
.doc-hero p { margin: 0; color: var(--ink-soft); max-width: 62ch; }
.doc-hero figure { margin: 22px 0 0; }
.doc-hero figure img { border: 1px solid var(--line); }

/* ---------- sections ---------- */
section { margin-bottom: 40px; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sec-head h2 { font-size: 21px; margin: 0; }
.sec-head .no {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--accent);
}
.sec-head a { font-size: 14px; font-family: "Noto Sans SC", sans-serif; }

/* offset cards: no three-equal-columns skeleton */
.stack-rows { display: grid; gap: 16px; }
.rowcard {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
}
.rowcard img { width: 100%; height: 118px; object-fit: cover; }
.rowcard h3 { font-size: 18px; margin-bottom: 6px; }
.rowcard p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.rowcard .meta {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  letter-spacing: .04em;
}

/* index list with big numerals */
.numlist { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.numlist li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.numlist li::before {
  content: counter(n, decimal-leading-zero);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 22px;
  color: var(--sand-2);
  -webkit-text-stroke: 1px var(--line);
  line-height: 1.2;
}
.numlist a { font-size: 17px; font-family: "Noto Sans SC", sans-serif; }
.numlist p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-soft); }

/* stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--deep);
  color: #eaf2ec;
}
.stat-strip div {
  padding: 20px 18px;
  border-right: 1px solid rgba(255,255,255,.16);
}
.stat-strip div:last-child { border-right: 0; }
.stat-strip b {
  display: block;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 24px;
  color: #fff;
}
.stat-strip span { font-size: 13px; opacity: .8; }

/* two-up asymmetric */
.asym {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}
.asym .big {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
}
.asym .big img { width: 100%; height: 230px; object-fit: cover; }
.asym .big div { padding: 18px; }
.asym .side { display: grid; gap: 14px; align-content: start; }
.asym .side article {
  background: var(--sand);
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
}
.asym .side h3 { font-size: 16.5px; margin-bottom: 4px; }
.asym .side p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* checklist block */
.checkrow { border: 1px solid var(--line); background: #fff; padding: 22px 24px; }
.checkrow ul { list-style: none; margin: 0; padding: 0; }
.checkrow li {
  padding: 11px 0 11px 26px;
  border-bottom: 1px dotted var(--line);
  position: relative;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.checkrow li::before {
  content: "";
  position: absolute;
  left: 0; top: 20px;
  width: 9px; height: 9px;
  border: 2px solid var(--deep-2);
  transform: rotate(45deg);
}
.checkrow li:last-child { border-bottom: 0; }

/* category chips */
.chipgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.chipcard {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}
.chipcard b {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 16.5px;
  display: block;
  color: var(--ink);
}
.chipcard span { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- article page ---------- */
.crumb {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--accent); }
.crumb span { margin: 0 7px; color: var(--line); }

.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.art-main h1 { font-size: clamp(25px, 3.2vw, 34px); margin-bottom: 14px; }
.art-info {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  margin-bottom: 26px;
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
}
.art-main figure { margin: 0 0 26px; }
.art-main figure img { width: 100%; border: 1px solid var(--line); }
.art-main figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 7px; }
.art-main h2 { font-size: 22px; margin-top: 34px; }
.art-main h3 { font-size: 18px; margin-top: 24px; }
.art-main p { margin: 0 0 18px; }
.art-main ul, .art-main ol { margin: 0 0 20px; padding-left: 22px; }
.art-main li { margin-bottom: 8px; }
.art-main blockquote {
  margin: 0 0 22px;
  padding: 16px 20px;
  background: var(--sand);
  border-left: 4px solid var(--deep);
  color: var(--ink-soft);
  font-size: 16px;
}
.art-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-bottom: 22px;
}
.art-main th, .art-main td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
.art-main th { background: var(--sand); font-family: "Noto Sans SC", sans-serif; }
.faq { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; }
.faq h3 { font-size: 17px; margin-top: 18px; }
.backcat {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14.5px;
}

.art-side { position: sticky; top: 18px; }
.side-box {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
  margin-bottom: 16px;
}
.side-box h2 {
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li { padding: 9px 0; border-bottom: 1px dotted var(--line); font-size: 14.5px; }
.side-box li:last-child { border-bottom: 0; }
.side-box a { font-family: "Noto Sans SC", sans-serif; color: var(--ink-soft); }
.side-box a:hover { color: var(--accent); }

/* ---------- category page ---------- */
.cat-hero {
  border: 1px solid var(--line);
  background: #fff;
  padding: 26px 28px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 240px;
  gap: 24px;
  align-items: center;
}
.cat-hero h1 { font-size: clamp(23px, 3vw, 30px); margin-bottom: 8px; }
.cat-hero p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.cat-hero img { border: 1px solid var(--line); }
.catlist { list-style: none; margin: 0; padding: 0; }
.catlist li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.catlist img { width: 100%; height: 100px; object-fit: cover; }
.catlist h2 { font-size: 18.5px; margin-bottom: 5px; }
.catlist p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.sitefoot {
  background: var(--deep);
  color: #cfdcd4;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 14px;
  padding: 40px 0 26px;
  margin-top: 30px;
}
.footgrid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 30px;
}
.sitefoot h3 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: .1em;
}
.sitefoot p { margin: 0 0 7px; line-height: 1.9; }
.sitefoot a { color: #cfdcd4; }
.sitefoot a:hover { color: #fff; }
.footbottom {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 13px;
  color: #a9bdb2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; gap: 26px; }
  .rail { position: static; }
  .art-layout { grid-template-columns: 1fr; }
  .art-side { position: static; }
  .cat-hero { grid-template-columns: 1fr; }
  .asym { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .wrap { padding: 0 15px; }
  .menu-btn { display: block; }
  .mainnav ul { display: none; flex-direction: column; padding: 0 15px 8px; }
  .mainnav.open ul { display: flex; }
  .mainnav a { border-bottom: 1px solid var(--line); padding: 13px 4px; }
  .mainnav a.is-active { border-bottom-color: var(--line); }
  .doc-hero { padding: 22px 18px; }
  .rowcard { grid-template-columns: 1fr; }
  .rowcard img { height: 160px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip div:nth-child(2n) { border-right: 0; }
  .chipgrid { grid-template-columns: 1fr; }
  .catlist li { grid-template-columns: 1fr; }
  .catlist img { height: 150px; }
  .footgrid { grid-template-columns: 1fr; }
  .numlist li { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .sitehead .wrap { gap: 12px; }
}
