@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:opsz@9..40&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f4ef;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #182126;
  --muted: #58636c;
  --line: #d8ddd7;
  --accent: #1f5f67;
  --accent-deep: #133b40;
  --accent-soft: #d9ecee;
  --gold: #bc8b2d;
  --gold-soft: #f4ead4;
  --shadow: 0 18px 40px rgba(13, 25, 32, 0.08);
  --radius: 18px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(31, 95, 103, 0.10), transparent 28%),
    linear-gradient(180deg, #f7f4ee 0%, #f3f0ea 100%);
  line-height: 1.72;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.content-card a,
.hero-main a,
.aside-card a,
.infobox a,
.page-footer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-card a,
.hero-main a {
  font-weight: 600;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(246, 244, 239, 0.92);
  border-bottom: 1px solid rgba(24, 33, 38, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.brand-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent-deep);
}

.topnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
}

.topnav a:hover,
.topnav a.active {
  background: var(--paper-strong);
  box-shadow: 0 8px 20px rgba(13, 25, 32, 0.08);
  text-decoration: none;
}

.hero {
  padding: 52px 0 30px;
}

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

.card {
  background: var(--paper);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 34px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 14px;
  line-height: 1.12;
  color: var(--accent-deep);
}

h1,
h2,
h3 {
  font-family: 'DM Serif Display', serif;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
}

.hero-lead {
  font-size: 1.08rem;
  color: #23323a;
  max-width: 64ch;
  margin-bottom: 18px;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.highlight {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(31, 95, 103, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
}

.highlight strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent-deep);
  margin-bottom: 6px;
}

.highlight span {
  color: var(--muted);
  font-size: 0.95rem;
}

.infobox {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.infobox-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
}

.fact-list {
  display: grid;
  gap: 12px;
}

.fact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(24, 33, 38, 0.08);
}

.fact-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.fact-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.fact-value {
  font-size: 0.98rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
  gap: 24px;
  padding-bottom: 30px;
}

.content-card,
.aside-card,
.stat-card,
.related-card,
.footer-card {
  padding: 28px;
}

.content-card p,
.content-card li,
.aside-card p,
.footer-card p,
.footer-card li {
  color: #24323a;
}

.content-card p + p,
.content-card ul + p,
.content-card h2 + p,
.content-card h3 + p {
  margin-top: 0;
}

.toc {
  display: grid;
  gap: 10px;
  margin: 18px 0 4px;
}

.toc a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(31, 95, 103, 0.06);
  font-weight: 600;
}

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

.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8faf8 100%);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 16px;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  color: var(--accent-deep);
  margin-bottom: 6px;
}

.stat-card small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.callout {
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  padding: 18px 18px 18px 20px;
  border-radius: 0 16px 16px 0;
  margin: 22px 0;
}

.section-list {
  padding-left: 18px;
}

.section-list li + li {
  margin-top: 10px;
}

.related-links {
  display: grid;
  gap: 12px;
}

.related-links a {
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 14px;
  font-weight: 700;
  background: #fff;
}

.related-links span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

.footer-card {
  margin-bottom: 48px;
}

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

.reference-list li {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(24, 33, 38, 0.08);
}

.reference-label {
  display: inline-block;
  min-width: 28px;
  font-weight: 800;
  color: var(--accent-deep);
}

.page-footer {
  padding: 0 0 52px;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-footer a {
  font-weight: 700;
}

.kicker-block {
  padding: 18px;
  border-radius: 16px;
  background: rgba(31, 95, 103, 0.06);
  margin-bottom: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 16px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .highlights,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max));
  }

  .topbar-inner {
    align-items: flex-start;
    padding: 12px 0;
  }

  .topnav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-main,
  .infobox,
  .content-card,
  .aside-card,
  .footer-card {
    padding: 22px;
  }

  .highlights,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .fact-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
