:root {
  color-scheme: light;
  --bg: #f2ecdf;
  --paper: #ffffff;
  --paper-soft: #fbf8f1;
  --ink: #162129;
  --muted: #5f6a72;
  --brand: #153e52;
  --brand-2: #a44e27;
  --line: rgba(22, 33, 41, 0.12);
  --line-strong: rgba(22, 33, 41, 0.18);
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(21, 62, 82, 0.09), transparent 33%),
    radial-gradient(circle at top right, rgba(164, 78, 39, 0.08), transparent 28%),
    linear-gradient(180deg, #faf8f3 0%, var(--bg) 100%);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.86;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; }
.site-shell { width: min(1140px, calc(100vw - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(250, 248, 242, 0.86);
  border-bottom: 1px solid rgba(22, 33, 41, 0.08);
}
.header-inner {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 12px;
}
.brand {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #0f5e72);
  color: #fff;
  font: 700 0.95rem/1 "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong,
.site-nav,
.eyebrow,
.button,
.section-heading,
.footer-grid,
.link-row,
.content-header,
.related-block h2,
.outline-title {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
.brand-copy span { color: var(--muted); font-size: 0.92rem; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 9px 14px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  flex: 0 0 auto;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.nav-link.is-active,
.nav-link:hover {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--brand);
}
.page-layout { padding: 26px 0 70px; display: grid; gap: 28px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px 0 10px;
}
.hero-copy,
.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px rgba(16, 28, 35, 0.05);
}
.hero-copy { max-width: none; padding: 26px 28px 28px; }
.hero-card { padding: 24px 24px 22px; align-self: stretch; }
.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 11ch;
}
.section-heading h2,
.content-header h2,
.related-block h2 { margin: 0 0 8px; font-size: 1.35rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
}
.button-secondary { background: transparent; color: var(--brand); }
.button-secondary:hover { color: white; background: var(--brand); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 64ch; }
.hero-card .lede { margin-bottom: 0; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-2);
}
.outline-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-2);
}
.hero-points {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 10px;
  color: var(--ink);
}
.check-list { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.home-section { margin-top: 28px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.feature-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  padding: 22px 22px 24px;
  box-shadow: 0 18px 40px rgba(16, 28, 35, 0.04);
}
.feature-panel-soft { background: rgba(251, 248, 241, 0.84); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 0 0 14px;
}
.section-heading p { margin: 0; color: var(--muted); }
.link-list { display: grid; gap: 16px; }
.link-row {
  border-top: 1px solid rgba(22, 33, 41, 0.08);
  padding-top: 14px;
}
.link-row:first-child { border-top: 0; padding-top: 0; }
.link-row h3 { margin: 0 0 6px; font-size: 1.12rem; line-height: 1.25; }
.link-row p { margin: 0; color: var(--muted); }
.link-row a { text-decoration: none; }
.link-row a:hover { text-decoration: underline; }
.reading-article {
  padding: 10px 0 0;
  border: 0;
  background: transparent;
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 22px;
  align-items: start;
}
.article-main {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(16, 28, 35, 0.05);
  padding: 28px 30px 30px;
}
.article-aside {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 96px;
}
.aside-card,
.outline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(251, 248, 241, 0.88);
  box-shadow: 0 12px 26px rgba(16, 28, 35, 0.04);
  padding: 18px 18px 16px;
}
.aside-copy { margin: 0 0 10px; color: var(--muted); }
.aside-copy:last-child { margin-bottom: 0; }
.outline-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 9px;
}
.outline-item a { color: var(--ink); text-decoration: none; }
.outline-item a:hover { color: var(--brand); text-decoration: underline; }
.outline-level-3 { margin-left: 0.35rem; }
.outline-level-4 { margin-left: 0.7rem; font-size: 0.98rem; }
.content-header {
  max-width: 50rem;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(22, 33, 41, 0.08);
}
.content-header h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.95rem);
  margin: 0;
  line-height: 1.02;
}
.prose {
  min-width: 0;
  max-width: 50rem;
  font-size: 1.07rem;
  line-height: 1.92;
}
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.2;
}
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose pre { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose blockquote {
  padding: 1rem 1.2rem;
  background: rgba(15, 76, 92, 0.08);
  border-left: 4px solid var(--brand);
  border-radius: 0 18px 18px 0;
}
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.prose pre {
  overflow: auto;
  padding: 1rem;
  border-radius: 18px;
  background: #0f2430;
  color: #f2f5f7;
}
.related-block {
  max-width: 50rem;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.compact-article { padding-top: 0; }
.search-layout {
  display: grid;
  gap: 18px;
}
.search-hero,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(16, 28, 35, 0.05);
}
.search-hero { padding: 26px 28px 22px; max-width: 56rem; }
.search-panel { padding: 24px 24px 18px; }
.search-label {
  display: block;
  margin: 0 0 10px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-2);
}
.search-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input {
  flex: 1 1 280px;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 0 18px;
  font: inherit;
  color: var(--ink);
  outline: none;
}
.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 62, 82, 0.12);
}
.search-meta {
  margin: 14px 0 18px;
  color: var(--muted);
}
.search-results {
  display: grid;
  gap: 14px;
}
.search-result {
  border-top: 1px solid rgba(22, 33, 41, 0.08);
  padding-top: 14px;
}
.search-result:first-child {
  border-top: 0;
  padding-top: 0;
}
.search-result h2 {
  margin: 0 0 6px;
  font-size: 1.16rem;
}
.search-result p { margin: 0; color: var(--muted); }
.search-empty {
  margin: 14px 0 0;
  color: var(--muted);
}
.empty-state { color: var(--muted); }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  color: var(--muted);
}
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--brand); }

@media (max-width: 900px) {
  .site-header { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: start; }
  .hero,
  .feature-grid,
  .article-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; top: auto; }
  .section-heading { display: grid; }
}

@media (max-width: 640px) {
  .site-shell { width: min(100vw - 20px, 1140px); }
  .hero { padding: 18px 0 4px; }
  .hero-copy,
  .hero-card,
  .feature-panel,
  .article-main,
  .aside-card,
  .outline-card,
  .search-hero,
  .search-panel {
    padding-left: 18px;
    padding-right: 18px;
  }
  .hero-copy h1,
  .content-header h1 { max-width: 100%; }
  .brand { align-items: flex-start; }
  .brand-copy span { display: none; }
  .header-inner { gap: 12px; }
  .site-nav { justify-content: flex-start; }
  .nav-link { padding: 8px 12px; }
  .lede { font-size: 1.03rem; }
}
