:root {
  color-scheme: light;
  --ink: #322c25;
  --muted: #766f67;
  --paper: #f5eee5;
  --surface: #fffaf4;
  --line: #ead9c7;
  --green: #7d8b78;
  --blue: #7d8ca0;
  --clay: #bf7f68;
  --gold: #bd9258;
  --code-ink: #5a4338;
  --code-surface: #f8eadc;
  --code-line: #ead2bd;
  --shadow: 0 14px 36px rgba(70, 53, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.88), rgba(255, 250, 244, 0.2));
}

.brand {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
}

.main-nav a {
  border: 1px solid rgba(191, 127, 104, 0.22);
  border-radius: 8px;
  padding: 7px 13px;
  background: rgba(255, 250, 244, 0.45);
  backdrop-filter: blur(14px);
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(130deg, #f8f1e8 0%, #eee8df 54%, #f4e4d4 100%);
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  filter: saturate(1.02) contrast(0.96) brightness(1.03);
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 241, 232, 0.94), rgba(248, 241, 232, 0.7) 44%, rgba(248, 241, 232, 0.08)),
    linear-gradient(0deg, rgba(246, 232, 215, 0.42), rgba(246, 232, 215, 0) 48%);
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1120px, calc(100% - 40px));
  min-height: 76vh;
  margin: 0 auto;
  padding: 112px 0 82px;
}

.eyebrow,
.section-label,
.card-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 5.6rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 620px;
  margin: 26px 0 0;
  color: #6f665e;
  font-size: 1.28rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.button--primary {
  background: #c99564;
  color: #302114;
}

.button--light {
  border: 1px solid rgba(191, 127, 104, 0.34);
  color: #8e5f4f;
  background: rgba(255, 250, 244, 0.62);
}

.section {
  padding: 84px 0;
}

.section--intro {
  padding: 56px 0;
  background: #fffaf4;
  border-bottom: 1px solid var(--line);
}

.section--soft {
  background: #f0e8df;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: 48px;
  align-items: start;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

.intro-grid h2,
.section-heading h2,
.module-hero h1 {
  margin: 0;
  font-size: 3.2rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-grid > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading .section-label {
  grid-column: 1 / -1;
  margin-bottom: -4px;
}

.text-link {
  color: #9b6554;
  font-weight: 800;
  border-bottom: 2px solid rgba(191, 127, 104, 0.28);
}

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

.feature-card,
.article-card {
  min-height: 235px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card h3,
.article-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.22;
}

.feature-card p:last-child,
.article-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.split-list {
  display: grid;
  gap: 14px;
}

.split-list article,
.split-list .split-link {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: start;
  border-top: 1px solid rgba(24, 33, 29, 0.16);
  padding: 22px 0;
}

.split-list .split-link {
  transition: transform 160ms ease, border-color 160ms ease;
}

.split-list .split-link:hover,
.split-list .split-link:focus-visible {
  transform: translateX(4px);
  border-top-color: rgba(191, 127, 104, 0.42);
}

.split-list .split-link:focus-visible {
  outline: 3px solid rgba(191, 127, 104, 0.28);
  outline-offset: 4px;
}

.split-list span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: #bd8973;
  font-weight: 800;
}

.split-list h3 {
  margin: 0;
  font-size: 1.3rem;
}

.split-list p {
  margin: 7px 0 0;
  color: var(--muted);
}

.site-footer {
  padding: 30px 0;
  color: rgba(255, 250, 244, 0.78);
  background: #4b4038;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-grid p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.module-page {
  background: #f8f1e8;
}

.module-header {
  position: static;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.94);
  border-bottom: 1px solid var(--line);
}

.module-header .main-nav a {
  border-color: var(--line);
  background: #fffaf4;
}

.module-hero {
  padding: 76px 0 40px;
  background:
    linear-gradient(120deg, rgba(191, 127, 104, 0.12), rgba(125, 140, 160, 0.08)),
    #f8f1e8;
}

.module-hero p:last-child {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.article-card {
  min-height: 210px;
}

.article-card--link {
  display: block;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.article-card--link:hover,
.article-card--link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(191, 127, 104, 0.42);
  box-shadow: 0 18px 44px rgba(70, 53, 38, 0.11);
}

.article-card--link:focus-visible {
  outline: 3px solid rgba(191, 127, 104, 0.28);
  outline-offset: 4px;
}

.article-detail {
  padding: 70px 0 88px;
}

.article-wrap {
  max-width: 860px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: #9b6554;
  font-weight: 800;
  border-bottom: 2px solid rgba(191, 127, 104, 0.28);
}

.article-detail h1 {
  margin: 0;
  font-size: 3.1rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.article-detail h2 {
  margin: 34px 0 10px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.article-detail p {
  margin: 10px 0 0;
  color: var(--muted);
}

.article-detail code {
  border: 1px solid var(--code-line);
  border-radius: 6px;
  padding: 2px 5px;
  color: var(--code-ink);
  background: var(--code-surface);
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.article-detail pre {
  overflow-x: auto;
  margin: 16px 0 0;
  border: 1px solid var(--code-line);
  border-radius: 8px;
  padding: 18px;
  color: #544139;
  background: #fbefe2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.article-detail pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 0.92rem;
}

.article-detail ol,
.article-detail ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.article-detail li + li {
  margin-top: 8px;
}

.study-note {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.study-note h2 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.16;
}

.study-note h3 {
  margin: 28px 0 8px;
  font-size: 1.28rem;
}

.study-note p {
  margin: 10px 0 0;
  color: var(--muted);
}

.study-note code {
  border: 1px solid var(--code-line);
  border-radius: 6px;
  padding: 2px 5px;
  color: var(--code-ink);
  background: var(--code-surface);
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.study-note pre {
  overflow-x: auto;
  margin: 16px 0 0;
  border: 1px solid var(--code-line);
  border-radius: 8px;
  padding: 18px;
  color: #544139;
  background: #fbefe2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.study-note pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 0.92rem;
}

.study-note ol,
.study-note ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.study-note li + li {
  margin-top: 8px;
}

.note-lead {
  max-width: 780px;
  font-size: 1.06rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  border-radius: 8px;
  padding: 3px 9px;
  color: #8e5f4f;
  background: rgba(191, 127, 104, 0.13);
  font-weight: 800;
}

.note-band {
  margin-top: 28px;
  border-left: 4px solid var(--clay);
  padding: 18px 22px;
  background: #fffaf4;
}

.note-band p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 780px) {
  .site-header {
    position: absolute;
    min-height: auto;
    align-items: flex-start;
    padding: 18px 20px;
  }

  .main-nav {
    max-width: 220px;
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: 0.86rem;
  }

  .hero,
  .hero__content {
    min-height: 84vh;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(248, 241, 232, 0.92), rgba(248, 241, 232, 0.7) 58%, rgba(248, 241, 232, 0.3)),
      linear-gradient(0deg, rgba(246, 232, 215, 0.44), rgba(246, 232, 215, 0.06));
  }

  .hero__content {
    padding-top: 136px;
  }

  .hero__image {
    object-position: right bottom;
    opacity: 0.92;
  }

  .hero h1 {
    font-size: 3.8rem;
  }

  .hero__lead {
    font-size: 1.08rem;
  }

  .intro-grid,
  .card-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .article-card {
    min-height: auto;
  }

  .study-note {
    padding: 22px;
  }

  .article-detail {
    padding: 46px 0 64px;
  }

  .article-wrap {
    padding: 24px;
  }

  .article-detail h1 {
    font-size: 2.15rem;
  }

  .article-detail h2 {
    font-size: 1.35rem;
  }

  .study-note h2 {
    font-size: 1.75rem;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .wrap,
  .hero__content {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    gap: 10px;
    padding: 14px;
  }

  .brand {
    padding-top: 6px;
  }

  .main-nav a {
    padding: 6px 9px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .intro-grid h2,
  .section-heading h2,
  .module-hero h1 {
    font-size: 2.15rem;
  }

  .button {
    width: 100%;
  }

  .split-list article,
  .split-list .split-link {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }
}
