/* 灯下折页 — Lampfold */
:root {
  --bg: #f7f1e8;
  --bg-soft: #f0e8db;
  --ink: #1f1a17;
  --ink-muted: #5c534c;
  --accent: #a65d45;
  --accent-soft: #c4846e;
  --rule: #d9cfc0;
  --card: #fffdf9;
  --max: 680px;
  --wide: 920px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.85;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-soft);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(247, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.site-brand:hover {
  color: var(--accent);
}

.site-tagline {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.1rem;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.page-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.6rem;
  letter-spacing: 0.04em;
}

.page-hero .lede {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 36em;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  letter-spacing: 0.05em;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.35rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 4px 18px rgba(31, 26, 23, 0.06);
}

.card .meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}

.card h2,
.card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
}

.card h2 a,
.card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.card h2 a:hover,
.card h3 a:hover {
  color: var(--accent);
}

.card .excerpt {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  flex: 1;
}

.card .more {
  font-size: 0.85rem;
  align-self: flex-start;
  margin-top: 0.25rem;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.note-list li {
  border-bottom: 1px solid var(--rule);
}

.note-list a {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0.15rem;
  color: var(--ink);
  text-decoration: none;
  align-items: baseline;
}

.note-list a:hover {
  color: var(--accent);
}

.note-list .date {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.note-list .title {
  font-family: var(--serif);
  font-size: 1.02rem;
}

.note-list .cat {
  grid-column: 2;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: -0.35rem;
}

@media (max-width: 520px) {
  .note-list a {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.article {
  max-width: var(--max);
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.article-header .breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
}

.article-header .breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

.article-header .breadcrumb a:hover {
  color: var(--accent);
}

.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.article-body p {
  margin: 0 0 1.35rem;
  text-align: justify;
  text-justify: inter-ideograph;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.pull-quote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.15rem;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--ink);
}

.pull-quote p {
  margin: 0;
  text-align: left;
}

.article-end {
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.article-end a {
  margin-right: 1rem;
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.index-list li {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.index-list li:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.index-list h2 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.index-list h2 a {
  color: var(--ink);
  text-decoration: none;
}

.index-list h2 a:hover {
  color: var(--accent);
}

.index-list .meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.55rem;
}

.index-list .excerpt {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-body {
  max-width: var(--max);
}

.about-body p {
  margin: 0 0 1.25rem;
}

.about-body ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.about-body li {
  margin-bottom: 0.4rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.footer-inner strong {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.footer-motto {
  letter-spacing: 0.12em;
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.3rem 0.85rem;
  }

  main {
    padding-top: 1.75rem;
  }
}

/* —— 广告位壳层（待接入网络标签） —— */
.ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.75rem 0;
  background: var(--bg-soft);
  border: 1px dashed var(--rule);
  border-radius: 3px;
  color: var(--ink-muted);
  text-align: center;
  overflow: hidden;
}

.ad-slot::before {
  content: "广告";
  position: absolute;
  top: 0.35rem;
  left: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  opacity: 0.75;
  font-family: var(--sans);
  line-height: 1;
}

.ad-slot__inner {
  font-size: 0.82rem;
  color: var(--ink-muted);
  opacity: 0.85;
  padding: 0.75rem 1rem;
  max-width: 90%;
}

.ad-slot--banner {
  width: 100%;
  min-height: 90px;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

.ad-slot--inline {
  width: 100%;
  min-height: 100px;
  margin: 2rem 0;
}

.ad-slot--sidebar {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  margin: 0 auto 1.5rem;
}

.layout-with-rail {
  display: block;
}

.layout-with-rail .rail {
  display: none;
}

@media (min-width: 1100px) {
  .layout-with-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    align-items: start;
    max-width: calc(var(--wide) + 320px);
    margin-left: auto;
    margin-right: auto;
  }

  .layout-with-rail .rail {
    display: block;
    position: sticky;
    top: 5.5rem;
    padding-top: 0.25rem;
  }

  .layout-with-rail .rail .ad-slot--sidebar {
    margin-top: 0;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-sep {
  color: var(--rule);
  user-select: none;
}

.ads-demo-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.75rem 0 2rem;
}

@media (min-width: 720px) {
  .ads-demo-grid {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.policy-list {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--ink);
}

.policy-list li {
  margin-bottom: 0.55rem;
  color: var(--ink-muted);
}

/* 来源脚注 */
.article-sources {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.7;
}
.article-sources strong {
  color: var(--ink);
  font-weight: 500;
}
.article-sources ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.article-sources li {
  margin: 0.35rem 0;
}
.article-sources a {
  word-break: break-all;
}

/* reader support CTA */
.support-actions {
  margin: 1.25rem 0 1rem;
}

.support-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--card);
  background: var(--accent);
  text-decoration: none;
  padding: 0.55rem 1.15rem;
  border-radius: 2px;
  border: 1px solid var(--accent);
}

.support-btn:hover {
  color: var(--card);
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}
