@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0d1b3e;
  --teal:      #3a7a8a;
  --white:     #ffffff;
  --off-white: #f8f8fa;
  --muted:     #6b7a99;
  --border:    #e0e4ee;
  --grid:      #f0f0f5;
  --font:      'Space Mono', 'Courier New', monospace;
  --max:       1200px;
  --prose:     860px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--navy); background: var(--white); line-height: 1.7; display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; }
a:hover { color: var(--teal); }
h1,h2,h3,h4 { font-family: var(--font); font-weight: 700; line-height: 1.2; color: var(--navy); }
main { flex: 1; }

/* NAV */
#site-nav { background: var(--white); border-bottom: 1px solid var(--border); padding: 0 40px; position: sticky; top: 0; z-index: 100; }
#site-nav .nav-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 68px; }
#site-nav .logo img { height: 40px; width: auto; }
#site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; }
#site-nav ul a { font-family: var(--font); font-size: 0.82rem; color: var(--navy); padding: 8px 14px; text-decoration: none; transition: color 0.15s; }
#site-nav ul a:hover { color: var(--teal); }
#site-nav ul a.btn-nav { border: 1.5px solid var(--navy); border-radius: 4px; padding: 7px 18px; margin-left: 8px; }
#site-nav ul a.btn-nav:hover { background: var(--navy); color: var(--white); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); }
@media(max-width:700px) {
  #site-nav { padding: 0 20px; }
  .nav-toggle { display: flex; }
  #site-nav ul { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px; z-index: 99; }
  #site-nav ul.open { display: flex; }
  #site-nav ul a { padding: 10px 8px; }
}

/* FLOATING BACK BUTTON */
#back-btn { position: fixed; bottom: 28px; left: 28px; z-index: 200; background: var(--navy); color: var(--white); font-family: var(--font); font-size: 0.75rem; padding: 11px 20px; border-radius: 40px; text-decoration: none; box-shadow: 0 4px 16px rgba(13,27,62,0.3); transition: opacity 0.15s, transform 0.15s; white-space: nowrap; }
#back-btn:hover { opacity: 0.85; color: var(--white); text-decoration: none; transform: translateX(-2px); }
@media(max-width:500px) { #back-btn { bottom: 16px; left: 16px; font-size: 0.7rem; padding: 9px 14px; } }

/* FOOTER */
#site-footer { background: var(--white); border-top: 1px solid var(--border); padding: 48px 40px; margin-top: 80px; }
#site-footer .footer-inner { max-width: var(--max); margin: 0 auto; text-align: center; }
#site-footer p { font-size: 0.75rem; color: var(--muted); margin-bottom: 12px; }
#site-footer .footer-links { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
#site-footer .footer-links a { font-size: 0.75rem; color: var(--muted); text-decoration: underline; }
#site-footer .footer-links a:hover { color: var(--navy); }

/* HERO */
.hero { background: var(--white); padding: 120px 40px 100px; text-align: center; background-image: repeating-linear-gradient(90deg, transparent, transparent calc(100%/7 - 1px), var(--grid) calc(100%/7 - 1px), var(--grid) calc(100%/7)); }
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); max-width: 860px; margin: 0 auto 24px; }
.hero h2 { font-size: clamp(0.95rem, 1.8vw, 1.2rem); font-weight: 400; max-width: 700px; margin: 0 auto 56px; }
.hero-buttons { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn { display: inline-block; font-family: var(--font); font-size: 0.82rem; padding: 14px 44px; border-radius: 40px; cursor: pointer; border: none; text-decoration: none; transition: opacity 0.15s; }
.btn-primary, .btn-secondary { background: var(--navy); color: var(--white); }
.btn-primary:hover, .btn-secondary:hover { opacity: 0.85; color: var(--white); text-decoration: none; }

/* NEWSLETTER */
.newsletter-section { background: var(--white); padding: 72px 40px; text-align: center; }
.newsletter-section h2 { font-size: 1.3rem; margin-bottom: 10px; }
.newsletter-section p { color: var(--muted); font-size: 0.85rem; margin-bottom: 28px; font-weight: 400; }
.newsletter-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; max-width: 480px; margin: 0 auto; }
.newsletter-form input[type="email"] { flex: 1; min-width: 220px; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 4px; font-family: var(--font); font-size: 0.82rem; color: var(--navy); outline: none; }
.newsletter-form input[type="email"]:focus { border-color: var(--navy); }
.newsletter-form button { background: var(--navy); color: var(--white); border: none; border-radius: 40px; padding: 12px 28px; font-family: var(--font); font-size: 0.82rem; cursor: pointer; }
.newsletter-form button:hover { opacity: 0.85; }
.form-message { margin-top: 16px; font-size: 0.82rem; min-height: 24px; }

/* PAGE HEADER */
.page-header { background: var(--white); padding: 64px 40px 40px; border-bottom: 1px solid var(--border); background-image: repeating-linear-gradient(90deg, transparent, transparent calc(100%/7 - 1px), var(--grid) calc(100%/7 - 1px), var(--grid) calc(100%/7)); }
.page-header .inner { max-width: var(--max); margin: 0 auto; }
.page-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 10px; }
.page-header p  { color: var(--muted); font-size: 0.85rem; font-weight: 400; max-width: 640px; }

/* FILTERS */
.filters-wrap { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 68px; z-index: 90; padding: 20px 40px; }
.filters-inner { max-width: var(--max); margin: 0 auto; }
.filter-group-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn { font-family: var(--font); font-size: 0.75rem; padding: 8px 18px; border: 1px solid var(--border); border-radius: 2px; background: var(--white); color: var(--navy); cursor: pointer; transition: all 0.12s; text-decoration: underline; white-space: nowrap; }
.filter-btn:hover { border-color: var(--navy); }
.filter-btn.active, .filter-btn.lever-active { background: var(--navy); border-color: var(--navy); color: var(--white); text-decoration: none; font-weight: 700; }
.results-bar { max-width: var(--max); margin: 16px auto 0; padding: 0 40px; font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.clear-btn { font-family: var(--font); font-size: 0.78rem; color: var(--navy); background: none; border: none; cursor: pointer; text-decoration: underline; display: none; }
.clear-btn.visible { display: inline; }

/* BLOG CARD GRID */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border-left: 1px solid var(--border); }
.card { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); transition: background 0.15s; }
.card:hover { background: var(--off-white); }
.card.hidden { display: none; }
.card > a { display: block; }
.card-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.card-img-placeholder { width: 100%; height: 220px; background: var(--off-white); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 2rem; }
.card-body { padding: 24px; }
.card-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 10px; }
.card-body h2 { font-size: 0.95rem; margin-bottom: 10px; line-height: 1.4; }
.card-body h2 a { color: var(--navy); text-decoration: underline; }
.card-body h2 a:hover { color: var(--teal); }
.card-body p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; font-weight: 400; }
.card-link { font-size: 0.8rem; color: var(--navy); text-decoration: underline; }

/* ARTICLE HEADER: title left, image right */
.article-header { max-width: var(--max); margin: 0 auto; padding: 56px 40px 40px; display: grid; grid-template-columns: 1fr 420px; gap: 56px; align-items: start; border-bottom: 1px solid var(--border); }
.article-header.no-img { grid-template-columns: 1fr; max-width: var(--prose); }
.article-header-text { display: flex; flex-direction: column; gap: 12px; }
.article-header-text h1 { font-size: clamp(1.5rem, 2.8vw, 2.4rem); margin: 0; }
.article-date { font-size: 0.78rem; color: var(--muted); }
.article-header-img img { width: 100%; display: block; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); text-decoration: underline; }
.back-link:hover { color: var(--navy); }
@media(max-width:800px) {
  .article-header { grid-template-columns: 1fr; padding: 28px 20px 24px; gap: 24px; }
  .article-header-img { order: -1; }
}

/* ARTICLE BODY — full prose width, clean typography */
.article-body-wrap {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 48px 40px 80px;
}
.article-body {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--navy);
}
/* Reset Webflow inline styles completely */
.article-body *,
.article-body strong,
.article-body em,
.article-body a,
.article-body li,
.article-body p,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font) !important;
  font-size: inherit;
}
.article-body p  { margin-bottom: 1.4em; font-weight: 400 !important; font-size: 0.92rem !important; }
.article-body h2 { font-size: 2rem !important;   font-weight: 700 !important; margin: 2.2em 0 0.6em; line-height: 1.2; }
.article-body h3 { font-size: 1.4rem !important; font-weight: 700 !important; margin: 1.8em 0 0.5em; }
.article-body h4 { font-size: 1.1rem !important; font-weight: 700 !important; margin: 1.4em 0 0.4em; }
.article-body strong { font-weight: 700 !important; font-size: inherit !important; }
.article-body em     { font-style: italic; font-weight: 400 !important; }
.article-body a      { color: var(--navy); text-decoration: underline; font-size: inherit !important; }
.article-body a:hover { color: var(--teal); }
.article-body ul,
.article-body ol { margin: 0 0 1.4em 1.6em; }
.article-body li { margin-bottom: 0.4em; font-weight: 400 !important; font-size: 0.92rem !important; }
.article-body blockquote { border-left: 3px solid var(--navy); padding: 10px 20px; margin: 1.8em 0; color: var(--muted); font-style: italic; }

/* Images and figures in articles */
.article-body figure { margin: 2em 0; text-align: center; }
.article-body figure img { max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--border); }
.article-body figcaption { font-size: 0.75rem !important; color: var(--muted); margin-top: 8px; font-style: italic; }
.article-body img { max-width: 100%; height: auto !important; width: auto !important; margin: 1.6em auto; display: block; border: 1px solid var(--border); }

/* Embedded videos */
.embed-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 2em 0; border: 1px solid var(--border); }
.embed-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* BOOKS */
.resource-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-left: 1px solid var(--border); }
.resource-item { display: flex; flex-direction: column; padding: 28px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); transition: background 0.15s; }
.resource-item:hover { background: var(--off-white); }
.resource-item.hidden { display: none; }
.resource-cover { display: none; }
.resource-info h2 { font-size: 0.9rem; margin-bottom: 8px; line-height: 1.4; }
.resource-info h2 a { color: var(--navy); text-decoration: underline; }
.resource-info h2 a:hover { color: var(--teal); }
.resource-info .author { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; font-weight: 400; }
.resource-info p { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; line-height: 1.6; font-weight: 400; }

/* PROSE PAGES */
.prose-wrap { max-width: var(--prose); margin: 0 auto; padding: 56px 40px 80px; }
.prose-wrap h2 { font-size: 1.2rem; margin: 2em 0 0.6em; }
.prose-wrap h3 { font-size: 1rem; margin: 1.6em 0 0.5em; }
.prose-wrap p  { margin-bottom: 1.2em; font-weight: 400; font-size: 0.9rem; line-height: 1.75; }
.prose-wrap ul, .prose-wrap ol { margin: 0 0 1.2em 1.6em; }
.prose-wrap li { margin-bottom: 0.4em; font-size: 0.9rem; font-weight: 400; }
.prose-wrap a { color: var(--navy); }

/* TAG */
.tag { display: inline-block; font-family: var(--font); font-size: 0.68rem; font-weight: 700; text-transform: lowercase; color: var(--white); padding: 3px 10px; border-radius: 2px; }

/* MOBILE */
@media(max-width:700px) {
  .hero { padding: 80px 20px 64px; }
  .page-header { padding: 40px 20px 28px; }
  .filters-wrap { padding: 16px 20px; }
  .results-bar { padding: 0 20px; }
  .container { padding: 0 20px; }
  .article-body-wrap { padding: 28px 20px 60px; }
  .prose-wrap { padding: 32px 20px 60px; }
  .card-grid { grid-template-columns: 1fr; }
  .resource-list { grid-template-columns: 1fr; }
  #site-footer { padding: 32px 20px; }
  .newsletter-section { padding: 48px 20px; }
  .embed-wrap { padding-bottom: 75%; }
}

/* ── IMAGE & EMBED OVERRIDES ──────────────────── */
/* Remove all grey borders from images */
.article-body img,
.article-body figure img { border: none !important; }

/* Make embeds (Google Slides / YouTube) full article width */
.embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2em 0;
  border: none;
  width: 100%;
}
.embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
