:root {
  --paper: #f7f3ea;
  --paper-strong: #eee6d6;
  --ink: #20231f;
  --muted: #6d7068;
  --quiet: #8b887c;
  --line: rgba(32, 35, 31, 0.13);
  --moss: #203d35;
  --sage: #607667;
  --amber: #bd8845;
  --white: rgba(255, 255, 255, 0.7);
  --shadow: 0 18px 60px rgba(40, 42, 36, 0.1);
  --shadow-strong: 0 28px 90px rgba(40, 42, 36, 0.16);
  --content-width: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(189, 136, 69, 0.16), transparent 30rem),
    linear-gradient(135deg, #fbf8ef 0%, #ede4d2 50%, #e7ece2 100%);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--moss), var(--amber));
  transform-origin: left center;
}

.masthead {
  padding: 26px clamp(18px, 5vw, 72px) 42px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 76px 76px;
}

.masthead > * {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 82px;
}

.brand {
  color: var(--moss);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 243, 234, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-links a {
  min-width: 58px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(96, 118, 103, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: clamp(28px, 8vw, 120px);
  align-items: end;
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: clamp(24px, 5vw, 72px);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 54px clamp(18px, 5vw, 72px) 20px;
}

.showcase-copy {
  min-width: 0;
}

.showcase h2 {
  max-width: 820px;
  margin-bottom: 18px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.14;
  letter-spacing: 0;
}

.showcase-copy > p {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-grid article {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.68);
  box-shadow: 0 12px 36px rgba(40, 42, 36, 0.07);
}

.insight-grid svg {
  width: 30px;
  height: 30px;
  margin-bottom: 24px;
  color: var(--moss);
}

.insight-grid svg path,
.panel-title svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.insight-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
}

.insight-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.visual-showpiece {
  position: relative;
  align-self: stretch;
  min-height: 360px;
  padding: 12px;
  border: 1px solid rgba(32, 35, 31, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(32, 61, 53, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.visual-showpiece img {
  width: 100%;
  height: 100%;
  min-height: 334px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.visual-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.visual-caption span {
  display: block;
  margin-bottom: 4px;
  color: var(--moss);
  font-size: 13px;
  font-weight: 800;
}

.visual-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-copy {
  max-width: 910px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--sage);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(52px, 9vw, 132px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-text {
  max-width: 760px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.9;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-metrics span {
  min-width: 108px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
}

.hero-metrics strong {
  display: block;
  color: var(--moss);
  font-family: Georgia, serif;
  font-size: 30px;
  line-height: 1.1;
}

.author-chip {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
}

.author-chip img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  object-position: 50% 28%;
  border-radius: 8px;
  filter: saturate(0.9) contrast(0.96) brightness(1.04);
}

.author-chip span {
  display: block;
  color: var(--quiet);
  font-size: 12px;
}

.author-chip strong {
  display: block;
  margin: 2px 0 4px;
  font-size: 18px;
}

.author-chip p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 34px clamp(18px, 5vw, 72px) 72px;
}

.catalog-panel {
  position: sticky;
  top: 20px;
  align-self: start;
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 243, 234, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--moss);
}

.panel-title svg {
  width: 22px;
  height: 22px;
}

.panel-title strong {
  font-size: 16px;
}

.catalog-tools {
  margin-bottom: 14px;
}

.catalog-tools label {
  display: block;
  margin-bottom: 8px;
  color: var(--quiet);
  font-size: 13px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.catalog-tools input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.catalog-tools input:focus {
  border-color: rgba(32, 61, 53, 0.5);
  box-shadow: 0 0 0 3px rgba(96, 118, 103, 0.14);
}

.clear-search {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--moss);
  cursor: pointer;
}

.clear-search:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.result-count {
  margin: 9px 0 0;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.5;
}

.chapter-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 7px;
  flex: 0 0 auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.chapter-tab {
  flex: 0 0 auto;
  min-width: 48px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.chapter-tab.is-active {
  border-color: var(--moss);
  background: var(--moss);
  color: #fff;
}

.catalog-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-top: 12px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.chapter-group {
  margin-bottom: 18px;
}

.chapter-title {
  margin: 10px 0 8px;
  color: var(--moss);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.article-link {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  min-width: 0;
}

.article-link:hover,
.article-link:focus-visible,
.article-link.is-active {
  background: rgba(96, 118, 103, 0.13);
  color: var(--ink);
  outline: none;
}

.article-link span {
  color: var(--amber);
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.7;
}

.article-link strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 14px;
  line-height: 1.65;
}

.reader-panel {
  min-width: 0;
}

.reader-card {
  min-height: 760px;
  padding: clamp(26px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.78);
  box-shadow: var(--shadow);
  scroll-margin-top: 22px;
}

.reader-kicker {
  margin-bottom: 14px;
  color: var(--amber);
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 800;
}

.reader-card h2 {
  margin-bottom: 14px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.18;
  letter-spacing: 0;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
  color: var(--quiet);
  font-size: 13px;
}

.reader-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.reader-body {
  max-width: 850px;
  min-height: 280px;
}

.reader-body p {
  margin-bottom: 1.35em;
  color: #3d413b;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 2.05;
  text-align: justify;
}

.reader-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.reader-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--moss);
  font-weight: 800;
  cursor: pointer;
}

.reader-button:hover:not(:disabled),
.reader-button:focus-visible {
  border-color: rgba(32, 61, 53, 0.38);
  background: rgba(96, 118, 103, 0.12);
  outline: none;
}

.reader-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.8;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(189, 136, 69, 0.24);
  color: inherit;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 26px clamp(18px, 5vw, 72px) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-domain {
  color: var(--moss);
  font-weight: 800;
}

.footer-records {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  min-width: 0;
}

.icp-link,
.police-link {
  color: var(--muted);
  font-weight: 700;
  transition: color 180ms ease;
}

.police-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.police-link img {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.police-link span {
  overflow-wrap: anywhere;
}

.icp-link:hover,
.icp-link:focus-visible,
.police-link:hover,
.police-link:focus-visible {
  color: var(--moss);
}

.footer-note {
  justify-self: end;
  text-align: right;
}

@media (max-width: 980px) {
  .hero,
  .showcase,
  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-bar {
    margin-bottom: 52px;
  }

  .author-chip {
    max-width: 360px;
  }

  .catalog-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

  .catalog-list {
    max-height: 420px;
    flex: none;
  }

  .chapter-tabs {
    display: flex;
    overflow-x: auto;
  }

  .reader-card {
    min-height: auto;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-note {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .masthead,
  .showcase,
  .content-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .showcase {
    padding-top: 42px;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .visual-showpiece {
    min-height: 260px;
  }

  .visual-showpiece img {
    min-height: 260px;
  }

  .visual-caption {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .nav-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-metrics span {
    min-width: 0;
    padding: 11px;
  }

  .hero-metrics strong {
    font-size: 24px;
  }

  .reader-footer {
    flex-direction: column;
  }

  .reader-button {
    width: 100%;
  }

  .reader-body p {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .clear-search {
    width: 100%;
  }
}
