:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-alt: #f1eee7;
  --text: #1d2a27;
  --muted: #576661;
  --line: #d7d1c6;
  --brand: #214c46;
  --brand-dark: #173732;
  --accent: #c8b28a;
  --shadow: 0 10px 30px rgba(24, 38, 35, 0.08);
  --radius: 22px;
  --max: 1200px;
  --font-body: Almarai, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Libre Baskerville", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
img, svg, video { max-width: 100%; height: auto; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* A11y: skip link — hidden until keyboard-focused */
.skip-link {
  position: absolute; top: -40px; left: 8px; z-index: 1000;
  background: var(--brand); color: white;
  padding: 8px 14px; border-radius: 4px;
  font-weight: 700; font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; outline: 2px solid white; outline-offset: 2px; }

.announcement-bar {
  background: var(--surface-alt); color: var(--text); text-align: center;
  padding: 10px 24px; font-size: 13px; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}
.announcement-bar a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 0; }
.site-header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  min-width: 0;
}
.site-logo { flex: 0 0 auto; }
.site-logo img { height: 60px; width: auto; display: block; }
.site-logo--crop-canvas {
  position: relative;
  display: block;
  width: 150px;
  height: 60px;
  overflow: hidden;
}
.site-logo--crop-canvas img {
  position: absolute;
  top: -131px;
  left: -159px;
  width: auto;
  max-width: none;
  height: 318px;
}
.site-nav { display: flex; gap: 32px; flex: 1; justify-content: center; }
.site-nav a { color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.site-nav a:hover, .site-nav a.active { color: var(--brand); }
.site-menu { display: none; position: relative; flex: 0 0 auto; }
.site-menu-toggle {
  width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface-alt); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.site-menu-toggle::-webkit-details-marker { display: none; }
.site-menu-toggle::marker { content: ""; }
.site-menu-toggle:hover, .site-menu[open] .site-menu-toggle { border-color: var(--brand); background: var(--surface); }
.site-menu-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.site-menu-icon {
  width: 18px; height: 14px; display: flex; flex-direction: column;
  justify-content: space-between;
}
.site-menu-icon span {
  display: block; width: 100%; height: 2px;
  background: currentColor; border-radius: 999px;
}
.site-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30;
  width: min(280px, calc(100vw - 32px)); padding: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow);
}
.site-menu-panel a {
  display: block; padding: 12px 14px; border-radius: 6px;
  color: var(--text); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em;
}
.site-menu-panel a:hover, .site-menu-panel a.active {
  background: var(--surface-alt); color: var(--brand);
}
.header-cta-btn {
  background: var(--brand); color: white; padding: 12px 22px;
  border-radius: 999px; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.06em; box-shadow: var(--shadow); transition: 180ms ease;
  flex: 0 0 auto; white-space: nowrap;
}
.header-cta-btn:hover { background: var(--brand-dark); }

.breadcrumbs {
  width: min(820px, calc(100% - 40px)); margin: 0 auto;
  padding: 24px 0 0;
  font-size: 13px; color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { margin: 0 8px; opacity: 0.5; }

article { width: min(820px, calc(100% - 40px)); margin: 0 auto; }
.article-hero { padding: 24px 0 24px; }
.article-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: 16px;
}
h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.05; font-weight: 500; letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.course-pointer {
  margin-top: 20px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; color: var(--muted);
}
.course-pointer a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.article-body { padding: 8px 0 32px; font-size: 18px; line-height: 1.75; }
.article-body p { margin: 0 0 24px; }
.article-body p strong { font-weight: 700; }
.article-body h2 {
  font-family: var(--font-serif); font-size: 26px; line-height: 1.3;
  font-weight: 400; margin: 44px 0 18px;
}
.article-body ul { margin: 0 0 24px; padding: 0 0 0 22px; }
.article-body ul li { margin-bottom: 8px; }
.article-body .raw-list { list-style: none; padding: 0; margin: 0 0 24px; }
.article-body .raw-list li { padding: 4px 0; }

.inline-cta {
  margin: 32px 0; padding: 18px 22px;
  background: var(--surface-alt); border-left: 4px solid var(--accent);
  border-radius: 4px; font-size: 15px; line-height: 1.6; color: var(--text);
}
.inline-cta a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.pull-quote {
  font-family: var(--font-serif); font-size: 22px; line-height: 1.4;
  font-weight: 400; font-style: italic;
  border-left: 3px solid var(--brand); padding: 12px 0 12px 24px;
  margin: 36px 0; color: var(--text);
}

.cluster-note {
  margin: 40px 0 24px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; color: var(--muted); line-height: 1.6;
}
.cluster-note strong { color: var(--text); font-weight: 700; }

.end-cta {
  background: var(--brand); color: white;
  border-radius: 16px; padding: 32px 28px;
  margin: 40px 0; box-shadow: var(--shadow);
}
.end-cta h3 { font-family: var(--font-serif); font-size: 24px; margin: 0 0 14px; line-height: 1.25; font-weight: 400; }
.end-cta p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.92); }
.end-cta-button {
  display: inline-block; background: var(--accent); color: var(--brand-dark);
  padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 13px; letter-spacing: 0.06em;
  transition: transform 0.1s ease;
}
.end-cta-button:hover { transform: translateX(2px); }

.references {
  margin: 40px 0 32px; padding: 22px 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.references h2 { font-family: var(--font-serif); font-size: 17px; margin: 0 0 14px; font-weight: 400; }
.references p { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0; }

.related-section { margin: 40px 0; }
.related-section h2 { font-family: var(--font-serif); font-size: 20px; margin: 0 0 14px; font-weight: 400; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related-list a {
  display: block; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; text-decoration: none; color: var(--text);
  transition: border-color 0.15s ease;
}
.related-list a:hover { border-color: var(--brand); }
.related-list .type-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); margin-right: 10px;
}
.related-list .title { font-weight: 600; font-size: 15px; }
.related-list .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 32px; margin-top: 32px; }
.site-footer-inner {
  width: min(var(--max), calc(100% - 40px)); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 56px; align-items: start;
}
.site-footer .footer-logo img { height: 52px; width: auto; }
.site-footer .footer-logo--crop-canvas a {
  position: relative;
  display: block;
  width: 130px;
  height: 52px;
  overflow: hidden;
}
.site-footer .footer-logo--crop-canvas img {
  position: absolute;
  top: -113px;
  left: -138px;
  width: auto;
  max-width: none;
  height: 275px;
}
.site-footer .footer-links { display: flex; flex-direction: column; gap: 12px; }
.site-footer .footer-links a { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--text); }
.site-footer .footer-links a:hover { color: var(--brand); }
.site-footer .footer-social { display: flex; gap: 10px; }
.site-footer .footer-social a {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.site-footer .footer-social a:hover { background: var(--brand); color: white; border-color: var(--brand); }
.site-footer .footer-social svg { width: 16px; height: 16px; }
.substack-quiet-link { margin-top: 16px; font-size: 13px; color: var(--muted); }
.substack-quiet-link a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.site-footer .copy {
  width: min(var(--max), calc(100% - 40px));
  margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}

@media (max-width: 1100px) {
  .site-nav { display: none; }
  .site-menu { display: block; }
}

@media (max-width: 900px) {
  h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); }
  .site-footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 520px) {
  .site-header { padding: 12px 0; }
  .site-header-inner {
    width: calc(100% - 32px);
    gap: 12px;
  }
  .site-logo--crop-canvas {
    width: 120px;
    height: 48px;
  }
  .site-logo--crop-canvas img {
    top: -105px;
    left: -127px;
    height: 254px;
  }
  .header-cta-btn {
    padding: 10px 16px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }
}
