:root {
  --accent: #0e7569;
  --accent-dark: #0a5a50;
  --brand-dark: #0e4f47;
  --text: #17322f;
  --text-muted: #43605b;
  --text-faint: #6b8580;
  --bg: #fbfcfc;
  --bg-tint: #eef5f3;
  --bg-tint-2: #d5eae5;
  --border: #e3ebe9;
  --border-input: #cfdedb;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Public Sans', Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 { font-family: 'Newsreader', Georgia, serif; letter-spacing: -0.5px; }

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* Top utility bar */
.topbar { background: var(--brand-dark); color: #dff1ee; font-size: 14px; padding: 8px 0; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar-inner a { color: #dff1ee; }
.topbar-links { display: flex; gap: 20px; }

/* Header */
.site-header { background: #ffffff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 32px; height: 76px; }
.logo { display: flex; align-items: baseline; gap: 2px; text-decoration: none; flex-shrink: 0; white-space: nowrap; }
.logo-a { font-family: 'Newsreader', Georgia, serif; font-weight: 700; font-size: 30px; color: var(--brand-dark); letter-spacing: -0.5px; }
.logo-b { font-family: 'Newsreader', Georgia, serif; font-weight: 700; font-size: 30px; color: var(--accent); letter-spacing: -0.5px; }
.logo:hover { text-decoration: none; }

#nav-links { display: flex; gap: 6px; flex: 1; }
#nav-links a { padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 16px; color: var(--text); }
#nav-links a:hover { background: var(--bg-tint); text-decoration: none; }
#nav-links a.active { font-weight: 700; color: var(--brand-dark); background: var(--bg-tint); }

.btn-subscribe { flex-shrink: 0; white-space: nowrap; background: var(--accent); color: #ffffff; font-weight: 700; font-size: 16px; padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer; font-family: inherit; }
.btn-subscribe:hover { background: var(--accent-dark); text-decoration: none; }

/* Mobile nav toggle (hidden on desktop) */
.mobile-nav-checkbox { display: none; }
.mobile-nav-btn { display: none; flex-shrink: 0; flex-direction: column; justify-content: center; gap: 4px; width: 34px; height: 34px; cursor: pointer; }
.mobile-nav-btn span { display: block; width: 100%; height: 2px; background: var(--brand-dark); border-radius: 2px; }
#mobile-nav-panel { display: none; }

/* Hero */
.hero-section { background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%); }
#hero-grid { max-width: 1180px; margin: 0 auto; padding: 56px 24px 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; background: var(--bg-tint-2); color: var(--brand-dark); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
#hero-title { font-weight: 600; font-size: 52px; line-height: 1.12; margin: 20px 0 18px; letter-spacing: -1px; text-wrap: pretty; }
.hero-lede { font-size: 20px; color: var(--text-muted); margin: 0 0 28px; max-width: 52ch; text-wrap: pretty; }
.btn-primary { background: var(--accent); color: #ffffff; font-weight: 700; font-size: 17px; padding: 15px 30px; border-radius: 999px; display: inline-block; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
#hero-img { height: 400px; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(14,79,71,0.15); }
#hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section generic */
.section { max-width: 1180px; margin: 0 auto; padding: 56px 24px; width: 100%; box-sizing: border-box; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-weight: 600; font-size: 34px; margin: 0; }

/* Topics grid */
#topics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.topic-card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; box-sizing: border-box; }
.topic-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(14,79,71,0.10); text-decoration: none; }
.topic-glyph { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-tint-2); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-family: 'Newsreader', Georgia, serif; font-weight: 700; font-size: 22px; }
.topic-name { font-weight: 700; font-size: 19px; color: var(--text); }
.topic-blurb { font-size: 15px; color: var(--text-faint); line-height: 1.5; }

/* Latest / articles grid */
.latest-section { background: #ffffff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#latest-grid, #articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.article-card { display: flex; flex-direction: column; gap: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.article-card:hover { box-shadow: 0 10px 28px rgba(14,79,71,0.12); text-decoration: none; }
.article-card-img { display: block; height: 190px; background: var(--bg-tint) center/cover no-repeat; }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; flex: 1; }
.article-tag { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.article-title { font-family: 'Newsreader', Georgia, serif; font-weight: 600; font-size: 23px; line-height: 1.25; color: var(--text); text-wrap: pretty; }
.article-excerpt { font-size: 15.5px; color: var(--text-muted); line-height: 1.55; }
.article-meta { font-size: 14px; color: var(--text-faint); margin-top: 4px; }

/* Search form (articles.php) */
.search-form { display: flex; gap: 12px; max-width: 480px; margin: 0 0 24px; }
.search-form input[type="search"] { flex: 1; font-size: 16px; padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--border-input); background: #ffffff; color: var(--text); outline: none; font-family: inherit; }
.search-form input[type="search"]:focus { border-color: var(--accent); }
.search-form button { border: none; cursor: pointer; }

/* Filter pills (articles.php) */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-pill { font-family: inherit; font-size: 16px; font-weight: 600; padding: 10px 20px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--border-input); background: #ffffff; color: var(--text); display: inline-block; }
.filter-pill:hover { border-color: var(--accent); text-decoration: none; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 44px; }
.pagination .page-link { font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--border-input); }
.pagination .page-link:hover { border-color: var(--accent); background: var(--bg-tint); text-decoration: none; }
.pagination .page-status { font-size: 14px; color: var(--text-faint); }
.filter-pill.active { border-color: var(--accent); background: var(--accent); color: #ffffff; }

/* Exercise of the week / steps grid */
#steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.step-card-img { height: 200px; background: var(--bg-tint); }
.step-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.step-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-title { font-weight: 700; font-size: 19px; }
.step-text { font-size: 15.5px; color: var(--text-muted); line-height: 1.55; }

/* About / author */
.about-section { background: var(--brand-dark); color: #eef5f3; }
#about-grid { max-width: 1180px; margin: 0 auto; padding: 64px 24px; display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
.about-photo { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; display: block; }
.about-eyebrow { color: #8fc7bd; font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.about-name { font-family: 'Newsreader', Georgia, serif; font-weight: 600; font-size: 36px; margin: 10px 0 14px; letter-spacing: -0.5px; color: #ffffff; }
.about-bio { font-size: 18px; line-height: 1.65; margin: 0 0 20px; max-width: 64ch; color: #cfe4e0; text-wrap: pretty; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { border: 1px solid #2f6b62; border-radius: 999px; padding: 8px 16px; font-size: 14.5px; font-weight: 600; color: #dff1ee; }

/* Newsletter */
.newsletter-section { max-width: 820px; margin: 0 auto; padding: 72px 24px; text-align: center; width: 100%; box-sizing: border-box; }
#newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
#newsletter-form input[type="email"] { flex: 1; font-size: 17px; padding: 14px 20px; border-radius: 999px; border: 1.5px solid var(--border-input); background: #ffffff; color: var(--text); outline: none; font-family: inherit; }
#newsletter-form input[type="email"]:focus { border-color: var(--accent); }
.newsletter-notice { margin-top: 16px; font-size: 15px; color: var(--accent); font-weight: 600; }

/* Footer */
.site-footer { background: #ffffff; border-top: 1px solid var(--border); margin-top: auto; }
#footer-row { max-width: 1180px; margin: 0 auto; padding: 36px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-logo { font-family: 'Newsreader', Georgia, serif; font-weight: 700; font-size: 22px; color: var(--brand-dark); text-decoration: none; }
.footer-logo span { color: var(--accent); }
.footer-disclaimer { font-size: 14px; color: var(--text-faint); max-width: 60ch; }
.footer-copy { font-size: 14px; color: var(--text-faint); }

/* Article page */
.article-header-block { max-width: 760px; margin: 0 auto; padding: 48px 24px 0; }
.breadcrumb { font-size: 15px; color: var(--text-faint); margin-bottom: 18px; }
#article-title { font-weight: 600; font-size: 46px; line-height: 1.14; margin: 0 0 18px; letter-spacing: -1px; text-wrap: pretty; }
.article-subtitle { font-size: 21px; color: var(--text-muted); margin: 0 0 26px; text-wrap: pretty; }
.article-byline { display: flex; align-items: center; gap: 14px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.byline-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.byline-name { font-weight: 700; font-size: 16px; }
.byline-meta { font-size: 14.5px; color: var(--text-faint); }

.article-hero-wrap { max-width: 920px; margin: 0 auto; padding: 36px 24px 0; }
#article-hero { height: 420px; border-radius: 20px; overflow: hidden; background: var(--bg-tint); }
#article-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.article-body { max-width: 760px; margin: 0 auto; padding: 40px 24px 0; }
.article-body p { margin: 0 0 20px; }

.callout-box { background: var(--bg-tint); border: 1px solid var(--bg-tint-2); border-radius: 16px; padding: 22px 26px; margin: 8px 0 32px; }
.callout-box .callout-title { font-weight: 700; color: var(--brand-dark); margin-bottom: 6px; }
.callout-box .callout-text { font-size: 16.5px; color: var(--text-muted); }

.move-block { margin: 0 0 36px; }
.move-title { font-weight: 600; font-size: 30px; margin: 0 0 6px; letter-spacing: -0.5px; }
.move-title .move-num { color: var(--accent); }
.move-dose { font-size: 15px; color: var(--text-faint); font-weight: 600; margin-bottom: 16px; }
#move-img { height: 300px; border-radius: 16px; overflow: hidden; margin-bottom: 16px; background: var(--bg-tint); }
#move-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.move-why { margin: 0; font-size: 16.5px; color: var(--text-muted); }
.move-why strong { color: var(--brand-dark); }

.safety-box { background: #fff8f0; border: 1px solid #f0e2cf; border-radius: 16px; padding: 22px 26px; margin-bottom: 44px; }
.safety-box .safety-title { font-weight: 700; color: #8a5a2a; margin-bottom: 6px; }
.safety-box .safety-text { font-size: 16.5px; color: #6b5a44; }

.author-box-wrap { max-width: 760px; margin: 0 auto; padding: 0 24px 56px; }
#author-box { background: var(--brand-dark); border-radius: 20px; padding: 30px 32px; display: flex; gap: 24px; align-items: center; }
.author-box-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.author-box-name { font-family: 'Newsreader', Georgia, serif; font-weight: 600; font-size: 24px; color: #ffffff; margin-bottom: 6px; }
.author-box-bio { font-size: 16px; color: #cfe4e0; line-height: 1.55; }
.author-box-bio a { color: #8fc7bd; }

.related-section { background: #ffffff; border-top: 1px solid var(--border); }
.related-inner { max-width: 1180px; margin: 0 auto; padding: 48px 24px 56px; }
#related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.related-card:hover { box-shadow: 0 8px 24px rgba(14,79,71,0.10); text-decoration: none; }
.related-title { font-family: 'Newsreader', Georgia, serif; font-weight: 600; font-size: 21px; line-height: 1.3; color: var(--text); text-wrap: pretty; }
.related-meta { font-size: 14px; color: var(--text-faint); }

/* 404 page */
.not-found-section { text-align: center; padding-top: 72px; }
.not-found-title { font-weight: 600; font-size: 40px; margin: 20px 0 14px; letter-spacing: -0.5px; }
.not-found-lede { font-size: 19px; color: var(--text-muted); max-width: 52ch; margin: 0 auto; text-wrap: pretty; }

/* Responsive */
@media (max-width: 860px) {
  #nav-links { display: none !important; }
  .btn-subscribe { display: none !important; }
  .mobile-nav-btn { display: flex !important; }

  .mobile-nav-checkbox:checked ~ #mobile-nav-panel { display: flex; }
  #mobile-nav-panel {
    flex-direction: column;
    border-top: 1px solid var(--border);
    background: #ffffff;
  }
  #mobile-nav-panel a {
    padding: 14px 24px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  #mobile-nav-panel a:last-child { border-bottom: none; }
  #mobile-nav-panel a:hover { background: var(--bg-tint); text-decoration: none; }

  #hero-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  #hero-img { height: 260px !important; }
  #hero-title { font-size: 34px !important; }
  #topics-grid { grid-template-columns: repeat(2, 1fr) !important; }
  #latest-grid, #articles-grid { grid-template-columns: 1fr !important; }
  #steps-grid { grid-template-columns: 1fr !important; }
  #about-grid { grid-template-columns: 1fr !important; text-align: center; }
  #about-grid .about-photo { margin: 0 auto; }
  #newsletter-form { flex-direction: column !important; }
  #footer-row { text-align: center; justify-content: center !important; }
  #article-title { font-size: 32px !important; }
  #article-hero { height: 260px !important; }
  #move-img { height: 220px !important; }
  #author-box { flex-direction: column !important; text-align: center; }
  #related-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  #hero-title { font-size: 28px !important; }
  #topics-grid { grid-template-columns: 1fr !important; }
}
