:root {
  /* 品牌色板（品牌清单第 7 节，勿加渐变/紫色/霓虹蓝） */
  --ink: #10222e;
  --ink-muted: #52636e;
  --paper: #fbf8f3;
  --surface: #ffffff;
  --brand: #11554c;
  --accent: #b86b3c;
  --line: #e3dcd2;
  --pos: #2e6b4f;
  --neg: #a33b2e;

  --shell: 1140px;
  --measure: 68ch;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

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

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-thickness: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header nav {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  gap: 3px;
  width: 18px;
}
.brand-mark i {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}
.brand-mark i:nth-child(2) {
  width: 14px;
  background: var(--accent);
}
.brand-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  border-bottom-color: var(--accent);
}

/* ---------- Shell ---------- */
main,
.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4.5rem;
}
.narrow {
  max-width: 760px;
}

/* ---------- Type ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.6rem;
}
h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  margin: 1.9rem 0 0.45rem;
}
p {
  margin: 0 0 1.1rem;
}
.lede {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: var(--measure);
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.muted {
  color: var(--ink-muted);
}

/* ---------- Hero ---------- */
.hero {
  padding: 1.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  max-width: 18ch;
}
.hero-sub {
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 1.06rem;
}
.hero-points {
  margin: 1.4rem 0 1.8rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}
.hero-points li::before {
  content: '—';
  color: var(--accent);
  margin-right: 0.55rem;
}
.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.15rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
}
.btn:hover {
  background: #0c453e;
}
.btn-ghost {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.95rem;
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--brand);
}

/* ---------- Section blocks ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.section-head a {
  font-size: 0.85rem;
}

.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.card:hover {
  border-color: var(--brand);
}
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}
.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  text-decoration: none;
  color: var(--ink);
}
.category-card .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.35rem;
}
.category-card .count {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.category-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ---------- Post list ---------- */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.6rem;
}
.post-list h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.3;
}
.post-list h2 a {
  text-decoration: none;
  color: var(--ink);
}
.post-list h2 a:hover {
  text-decoration: underline;
}
.meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--ink-muted);
  font-size: 0.82rem;
  margin: 0 0 0.45rem;
}
.excerpt {
  color: var(--ink-muted);
  margin: 0;
  max-width: var(--measure);
  font-size: 0.95rem;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

/* ---------- Article ---------- */
.article-head {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.article-head h1 {
  max-width: 22ch;
}
.byline {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.disclosure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 1.5rem 0;
}

.prose {
  max-width: var(--measure);
}
.prose h2,
.prose h3 {
  scroll-margin-top: 6rem;
}
.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}
.prose li {
  margin-bottom: 0.45rem;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.prose pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  margin: 1.5rem 0;
  font-variant-numeric: tabular-nums;
}
.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.prose th {
  background: var(--paper);
  font-weight: 500;
}
.prose td.num,
.prose th.num {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.86rem;
}
.prose blockquote {
  border-left: 3px solid var(--line);
  margin: 1.5rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  color: var(--ink-muted);
}

.article-foot {
  max-width: var(--measure);
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.article-foot p {
  margin: 0 0 0.6rem;
}
.sources {
  max-width: var(--measure);
  margin: 2.5rem 0 0;
}
.sources h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.sources ol {
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding-left: 1.2rem;
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 3rem 0 0;
  font-size: 0.95rem;
}
.pager .active {
  font-weight: 700;
  text-decoration: underline;
}
.pager .disabled,
.gap {
  color: var(--ink-muted);
}

/* ---------- Calculator ---------- */
.calc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 560px;
  margin: 2rem 0;
}
.calc label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 1rem 0 0.35rem;
}
.calc input,
.calc select {
  width: 100%;
  font-size: 1rem;
  font-family: var(--mono);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.calc button {
  margin-top: 1.25rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.calc-out {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.calc-row strong {
  font-family: var(--mono);
  font-weight: 400;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2.5rem 1.25rem 3rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.footer-cols {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}
.footer-cols h3 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.6rem;
}
.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.footer-cols a {
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-cols a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.footer-disclosure {
  max-width: var(--shell);
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.6;
}
.footer-meta {
  max-width: var(--shell);
  margin: 1rem auto 0;
  font-size: 0.78rem;
}

.comments {
  margin-top: 3rem;
  max-width: var(--measure);
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }
  main {
    padding-top: 1.5rem;
  }
  .nav-links {
    gap: 0.8rem;
    font-size: 0.85rem;
  }
}
