:root {
  --primary: #cc785c;
  --primary-active: #a9583e;
  --ink: #141413;
  --body: #3d3d3a;
  --body-strong: #252523;
  --muted: #6c6a64;
  --muted-soft: #8e8b82;
  --hairline: #e6dfd8;
  --hairline-soft: #ebe6df;
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-cream-strong: #e8e0d2;
  --surface-dark: #181715;
  --on-primary: #ffffff;
  --success: #5db872;
  --warning: #e8a55a;
  --error: #c64545;
  --shadow-soft: 0 18px 36px -26px rgba(20, 20, 19, 0.14);
  --shell: 1120px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

html[lang="zh-CN"] body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.74;
}

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

a {
  color: inherit;
}

code,
pre {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.shell {
  width: min(var(--shell), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--ink) 0 28%, transparent 30%),
    conic-gradient(from 0deg,
      var(--ink) 0deg 12deg,
      transparent 12deg 30deg,
      var(--ink) 30deg 42deg,
      transparent 42deg 60deg,
      var(--ink) 60deg 72deg,
      transparent 72deg 90deg,
      var(--ink) 90deg 102deg,
      transparent 102deg 120deg,
      var(--ink) 120deg 132deg,
      transparent 132deg 150deg,
      var(--ink) 150deg 162deg,
      transparent 162deg 180deg,
      var(--ink) 180deg 192deg,
      transparent 192deg 210deg,
      var(--ink) 210deg 222deg,
      transparent 222deg 240deg,
      var(--ink) 240deg 252deg,
      transparent 252deg 270deg,
      var(--ink) 270deg 282deg,
      transparent 282deg 300deg,
      var(--ink) 300deg 312deg,
      transparent 312deg 330deg,
      var(--ink) 330deg 342deg,
      transparent 342deg 360deg);
}

.nav-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-scroll a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-scroll a.active,
.nav-scroll a:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.5);
  flex: 0 0 auto;
}

.lang-switch[hidden] {
  display: none;
}

.lang-link {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.lang-link.active {
  background: var(--surface-card);
  color: var(--ink);
}

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hairline-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.35rem;
  align-items: start;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

html[lang="zh-CN"] .eyebrow,
html[lang="zh-CN"] .kicker,
html[lang="zh-CN"] .equation-label,
html[lang="zh-CN"] .coral-note span {
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: none;
}

.hero h1,
.section-heading h2,
.feature-card h3,
.pattern-card h3,
.timeline-card h3,
.callout-card h3,
.stat-panel h3,
.definition-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Newsreader", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

html[lang="zh-CN"] .hero h1,
html[lang="zh-CN"] .section-heading h2,
html[lang="zh-CN"] .feature-card h3,
html[lang="zh-CN"] .pattern-card h3,
html[lang="zh-CN"] .timeline-card h3,
html[lang="zh-CN"] .callout-card h3,
html[lang="zh-CN"] .stat-panel h3,
html[lang="zh-CN"] .definition-card h3 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  letter-spacing: -0.01em;
}

.hero h1 {
  max-width: 1120px;
  font-size: clamp(2.4rem, 4.3vw, 3.35rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="zh-CN"] .hero h1 {
  max-width: 1120px;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  line-height: 1.14;
}

.deck {
  max-width: 74ch;
  margin: 1rem 0 0;
  color: var(--body);
  font-size: 18px;
  line-height: 1.7;
}

html[lang="zh-CN"] .deck {
  max-width: 34em;
  line-height: 1.85;
}

.author-block {
  margin-top: 1.3rem;
}

.authors,
.affiliations {
  margin: 0.2rem 0;
}

.authors {
  color: var(--body-strong);
  font-weight: 600;
}

.affiliations {
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.button.primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button.primary:hover {
  background: var(--primary-active);
}

.button.secondary {
  background: var(--canvas);
  border-color: var(--hairline);
}

.button.secondary:hover {
  background: var(--surface-soft);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-facts article {
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
}

.fact-label {
  display: block;
  color: var(--muted-soft);
  font-size: 13px;
  font-weight: 500;
}

.hero-facts strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--body-strong);
  font-size: 15px;
  font-weight: 600;
}

html[lang="zh-CN"] .hero-facts strong {
  line-height: 1.8;
}

.hero-figure,
.media-card,
.wide-media {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  box-shadow: var(--shadow-soft);
}

.hero-figure img,
.media-card img,
.wide-media img {
  border-radius: var(--radius-md);
}

figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

html[lang="zh-CN"] figcaption {
  line-height: 1.8;
}

.section {
  padding: 84px 0;
  scroll-margin-top: 84px;
}

.band-soft {
  background: var(--surface-soft);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  max-width: 920px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="zh-CN"] .section-heading h2 {
  max-width: 22em;
  line-height: 1.18;
}

.wide-heading h2 {
  max-width: 1040px;
}

html[lang="zh-CN"] .wide-heading h2 {
  max-width: 24em;
}

.section-note {
  margin: 0.75rem 0 0;
  max-width: 76ch;
  color: var(--muted);
}

html[lang="zh-CN"] .section-note {
  line-height: 1.8;
}

.prose {
  max-width: 68ch;
  color: var(--body);
}

.prose p {
  margin: 0 0 1rem;
}

.prose-large {
  font-size: 17px;
}

html[lang="zh-CN"] .prose,
html[lang="zh-CN"] .prose-large {
  line-height: 1.8;
}

html[lang="zh-CN"] .prose-large {
  font-size: 16px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2.4rem;
  align-items: start;
}

.framework-layout,
.lifecycle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 2.6rem;
  align-items: start;
}

.lifecycle-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.figure-focus {
  padding: 18px;
}

.framework-copy {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.panorama-copy,
.atlas-copy {
  display: grid;
  gap: 1rem;
}

.panorama-copy.solo {
  max-width: 1000px;
  margin: -0.25rem 0 2.4rem;
}

.panorama-copy .prose,
.atlas-copy .prose {
  max-width: 68ch;
}

.panorama-copy.solo .prose {
  max-width: none;
  font-size: 17px;
  line-height: 1.75;
}

.panorama-copy.solo .pill-list {
  max-width: 920px;
}

.panorama-copy.solo + .wide-media {
  margin-top: 0;
}

.text-stack,
.stack-list {
  display: grid;
  gap: 1rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

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

.card-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.card-grid.count-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.panorama-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.78fr);
  gap: 2.4rem;
  margin-top: 2rem;
  align-items: start;
}

.pattern-lenses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.76fr) minmax(0, 1.24fr);
  gap: 2.4rem;
  align-items: start;
}

.wide-media {
  margin-top: 2rem;
}

.lower-split {
  margin-top: 2rem;
}

.hero-figure.figure-roadmap {
  padding: 22px;
}

.wide-media.figure-system-overview {
  padding: 22px;
}

.wide-media.figure-taxonomy-grid,
.atlas-figure.figure-evaluation-board {
  padding: 18px;
}

.atlas-figure img {
  width: 100%;
}

.feature-card,
.pattern-card,
.equation-card,
.definition-card,
.timeline-card,
.callout-card,
.stat-panel,
.citation-toolbar,
.generic-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-soft);
}

.feature-card,
.pattern-card,
.equation-card,
.definition-card,
.timeline-card,
.callout-card,
.stat-panel,
.generic-card {
  padding: 26px;
}

.feature-index,
.pattern-tag,
.card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-cream-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.feature-card h3,
.pattern-card h3,
.timeline-card h3,
.callout-card h3,
.stat-panel h3,
.generic-card h3,
.definition-card h3 {
  margin: 14px 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.definition-card h3 {
  font-size: 18px;
  line-height: 1.3;
}

.feature-card p,
.pattern-card p,
.definition-card p,
.timeline-card p,
.stat-panel p,
.callout-card p,
.generic-card p {
  margin: 0;
  color: var(--muted);
}

html[lang="zh-CN"] .feature-card p,
html[lang="zh-CN"] .pattern-card p,
html[lang="zh-CN"] .definition-card p,
html[lang="zh-CN"] .timeline-card p,
html[lang="zh-CN"] .stat-panel p,
html[lang="zh-CN"] .callout-card p,
html[lang="zh-CN"] .generic-card p {
  line-height: 1.8;
}

.definition-card {
  background: #fffdf9;
}

.definition-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-cream-strong);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
}

.equation-card {
  background: #fffdf9;
  min-width: 0;
}

.framework-equation {
  margin-bottom: 2rem;
}

.equation-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.equation-card code {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 0.5rem;
  color: var(--ink);
  max-width: 100%;
  overflow-x: visible;
  padding-bottom: 0.25rem;
  font-size: clamp(1.1rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.equation-card p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.timeline-card {
  display: grid;
  gap: 0.75rem;
}

.timeline-card article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--hairline);
}

.timeline-card article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-card article h3 {
  margin-top: 0;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 700;
}

.pattern-lens {
  background: #fffdf9;
}

.callout-card ul,
.generic-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.callout-card li + li,
.generic-card li + li {
  margin-top: 0.45rem;
}

.coral-note {
  padding: 24px 26px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-soft);
}

.coral-note span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.coral-note p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--on-primary);
}

.stat-panel {
  background: #fffdf9;
}

.stat-number,
.card-metric {
  display: block;
  color: var(--ink);
  font-family: "Newsreader", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
}

.stat-panel.good .stat-number,
.generic-card.good .card-metric {
  color: var(--success);
}

.stat-panel.bad .stat-number,
.generic-card.bad .card-metric {
  color: var(--error);
}

.stat-panel.neutral .stat-number,
.generic-card.neutral .card-metric {
  color: var(--warning);
}

.generic-card.accent {
  background: var(--primary);
  border-color: transparent;
}

.generic-card.accent .card-label,
.generic-card.accent h3,
.generic-card.accent p,
.generic-card.accent li {
  color: var(--on-primary);
}

.generic-card.accent .card-label {
  background: rgba(255, 255, 255, 0.18);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: #fffdf9;
  border: 1px solid var(--hairline);
  color: var(--body-strong);
  font-size: 14px;
  font-weight: 500;
}

.citation-shell {
  max-width: 900px;
}

.citation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px 22px;
  background: #fffdf9;
}

.citation-toolbar p {
  margin: 0;
  color: var(--muted);
}

html[lang="zh-CN"] .citation-toolbar p {
  line-height: 1.8;
}

pre {
  margin: 1rem 0 0;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-dark);
  color: #faf9f5;
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer {
  padding: 36px 0 52px;
  border-top: 1px solid var(--hairline);
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  color: var(--muted);
  font-size: 14px;
}

.footer-row p {
  margin: 0;
}

@media (max-width: 1080px) {
  .hero-grid,
  .split-layout,
  .framework-layout,
  .lifecycle-layout,
  .panorama-layout,
  .atlas-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .card-grid.count-4,
  .pattern-lenses,
  .stats-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(var(--shell), calc(100% - 1.25rem));
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.75rem 0;
  }

  .topbar-end {
    width: 100%;
    justify-content: space-between;
    gap: 0.7rem;
  }

  .nav-scroll {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.85rem;
    padding-bottom: 0;
  }

  .nav-scroll a {
    font-size: 13px;
  }

  .hero,
  .section {
    padding: 68px 0;
  }

  .card-grid,
  .definition-grid,
  .pattern-lenses,
  .stats-band,
  .footer-row {
    grid-template-columns: 1fr !important;
  }

  .citation-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-card,
  .pattern-card,
  .equation-card,
  .definition-card,
  .timeline-card,
  .callout-card,
  .stat-panel,
  .generic-card {
    padding: 22px;
  }

  .panorama-copy.solo {
    margin-bottom: 1.8rem;
  }

  .panorama-copy.solo .prose {
    font-size: 16px;
    line-height: 1.8;
  }

  .equation-card code {
    font-size: 13px;
  }
}
