:root {
  --bg: #f4efe7;
  --bg-strong: #e8ddce;
  --surface: rgba(255, 251, 245, 0.86);
  --surface-strong: #fffdf8;
  --surface-dark: #211d18;
  --text: #1f1a14;
  --muted: #6f6357;
  --line: rgba(66, 50, 36, 0.12);
  --accent: #c96532;
  --accent-strong: #a1481d;
  --accent-soft: rgba(201, 101, 50, 0.12);
  --shadow: 0 24px 60px rgba(56, 35, 17, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --container: min(1180px, calc(100vw - 48px));
  --content: min(780px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 101, 50, 0.14), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(12, 95, 80, 0.16), transparent 22%),
    linear-gradient(180deg, #f7f2ea 0%, #f2ece3 100%);
  font-family: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
}

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

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

.site-shell {
  position: relative;
  min-height: 100vh;
}

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

.narrow {
  width: var(--content);
}

.section {
  padding: 44px 0;
}

.section-label {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(244, 239, 231, 0.72);
  border-bottom: 1px solid rgba(66, 50, 36, 0.08);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  color: var(--accent);
  font-weight: 700;
}

.brand-title {
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-logo {
  max-height: 34px;
  width: auto;
}

.site-header-tools {
  display: none;
  justify-self: end;
  gap: 10px;
}

.site-tool {
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(66, 50, 36, 0.08);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.site-nav .nav {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .nav a,
.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav .nav-current a,
.site-nav .nav a:hover,
.nav-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-members {
  display: flex;
  align-items: center;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--surface-dark);
  color: #f8f4ee;
  box-shadow: 0 20px 40px rgba(26, 20, 16, 0.16);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(66, 50, 36, 0.1);
}

.button.small {
  min-height: 40px;
  padding-inline: 16px;
  font-size: 0.9rem;
}

.button.full {
  width: 100%;
}

.hero-section {
  padding: 52px 0 24px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.side-card,
.story-card,
.archive-header,
.page-header,
.about-hero,
.pager-card,
.article-cover,
.site-footer-inner {
  background: var(--surface);
  border: 1px solid rgba(84, 61, 42, 0.08);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: var(--radius-xl);
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(201, 101, 50, 0.2) 0%, rgba(201, 101, 50, 0) 70%);
}

.hero-title {
  margin: 0;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-title small {
  display: block;
  max-width: 19ch;
  margin-top: 18px;
  color: var(--muted);
  font-family: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: normal;
}

.hero-description,
.page-summary,
.archive-header p {
  max-width: 58ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-panels {
  display: grid;
  gap: 18px;
}

.hero-panel,
.side-card,
.pager-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.hero-panel-highlight {
  background:
    linear-gradient(135deg, rgba(201, 101, 50, 0.12), rgba(201, 101, 50, 0.04)),
    rgba(255, 251, 245, 0.9);
}

.panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.panel-list li {
  position: relative;
  padding-left: 18px;
}

.panel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.archive-header h1,
.page-title,
.site-footer h2 {
  margin: 0;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.1;
}

.section-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.featured-grid,
.story-stack {
  display: grid;
  gap: 20px;
}

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

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.feed-side {
  display: grid;
  gap: 18px;
}

.story-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.story-card.is-featured {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(248, 239, 230, 0.94));
}

.story-cover {
  min-height: 100%;
  background: rgba(201, 101, 50, 0.08);
}

.story-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-body {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.story-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.story-title {
  margin: 14px 0 12px;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.24;
}

.story-title a:hover,
.text-link:hover {
  color: var(--accent-strong);
}

.story-excerpt,
.footer-block p,
.author-card p,
.side-card p {
  margin: 0;
  color: var(--muted);
}

.story-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.story-more,
.text-link {
  color: var(--accent-strong);
  font-weight: 700;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(66, 50, 36, 0.08);
  color: var(--text);
}

.topic-chip em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  color: var(--muted);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 0 0 1px rgba(66, 50, 36, 0.08);
}

.page-number {
  font-size: 0.94rem;
}

.archive-page,
.page-shell,
.about-page,
.article-page {
  padding: 42px 0 64px;
}

.archive-header,
.page-header,
.about-hero {
  padding: 34px;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.archive-header-author .author-card {
  align-items: center;
}

.author-card {
  display: flex;
  gap: 18px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.author-avatar-large {
  width: 88px;
  height: 88px;
}

.author-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 101, 50, 0.12);
  color: var(--accent-strong);
}

.author-avatar svg {
  width: 60%;
  height: 60%;
}

.article-shell {
  display: grid;
  gap: 28px;
}

.article-header {
  display: grid;
  gap: 18px;
  padding-top: 24px;
}

.article-kicker,
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-title {
  margin: 0;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(2.4rem, 4.4vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.article-summary {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.article-cover {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.article-cover img {
  width: 100%;
}

.article-cover figcaption {
  padding: 12px 18px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-layout,
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.article-main {
  display: grid;
  gap: 24px;
}

.article-content {
  padding: 36px;
  background: var(--surface-strong);
  border: 1px solid rgba(84, 61, 42, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content > :last-child {
  margin-bottom: 0;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
  line-height: 1.25;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content table {
  margin-top: 0;
  margin-bottom: 1.4rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.35rem;
}

.article-content blockquote {
  margin-left: 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(201, 101, 50, 0.08);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text);
}

.article-content code {
  padding: 0.15em 0.4em;
  border-radius: 8px;
  background: rgba(34, 27, 22, 0.08);
  font-size: 0.92em;
}

.article-content pre {
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #1f1c18;
  color: #f7f1ea;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.article-tags,
.article-comments {
  display: grid;
  gap: 16px;
}

.article-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pager-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pager-card strong {
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.2rem;
  line-height: 1.35;
}

.page-title {
  margin: 0;
}

.about-hero {
  display: flex;
  align-items: end;
  min-height: 240px;
}

.error-page {
  padding: 72px 0;
}

.error-stack ul {
  margin: 0;
  padding-left: 18px;
}

.site-footer {
  padding: 24px 0 48px;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto auto;
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.footer-block {
  min-width: 0;
}

.footer-nav .nav {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-meta {
  display: grid;
  align-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.footer-filings {
  display: grid;
  gap: 8px;
}

.footer-filings a {
  color: inherit;
  text-decoration: none;
}

.footer-filings a:hover {
  text-decoration: underline;
}

.gh-content .kg-width-wide img,
.gh-content .kg-width-full img,
.gh-content .kg-image-card img {
  width: 100%;
  border-radius: var(--radius-lg);
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kg-gallery-row {
  display: flex;
  gap: 12px;
}

.kg-gallery-image {
  margin: 0;
  flex: 1;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.kg-bookmark-card {
  margin: 1.8rem 0;
}

.kg-bookmark-container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.7fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.kg-bookmark-content {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.kg-bookmark-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.kg-bookmark-description {
  color: var(--muted);
  font-size: 0.95rem;
}

.kg-bookmark-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.kg-bookmark-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.kg-bookmark-author,
.kg-bookmark-publisher {
  white-space: nowrap;
}

.kg-bookmark-thumbnail img,
.kg-bookmark-thumbnail {
  width: 100%;
  height: 100%;
}

.kg-bookmark-thumbnail img {
  object-fit: cover;
}

.kg-callout-card {
  border-radius: var(--radius-lg);
}

@media (max-width: 980px) {
  .hero-layout,
  .feed-layout,
  .article-layout,
  .about-layout,
  .site-footer-inner,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    grid-template-columns: auto auto;
  }

  .site-header-tools {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(100% + 12px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 245, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .nav,
  .nav-members {
    flex-direction: column;
    align-items: stretch;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-cover img {
    aspect-ratio: 16 / 10;
  }

  .article-pager {
    grid-template-columns: 1fr;
  }

  .kg-bookmark-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --container: min(100vw - 28px, 1000px);
    --content: min(100vw - 28px, 760px);
  }

  .hero-copy,
  .hero-panel,
  .side-card,
  .story-body,
  .article-content,
  .archive-header,
  .page-header,
  .about-hero,
  .site-footer-inner {
    padding: 22px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .article-title {
    font-size: 2.35rem;
  }

  .section {
    padding: 28px 0;
  }
}
