/* ============================================================
   Hoch Health — ARTICLE layer.
   Loads ON TOP OF styles.css. Adds editorial typography for /articles/ only.
   Scoped under .article / article-specific classes so the rest of the site is untouched.
   Reuses the brand tokens defined in styles.css (:root) — does not redefine them.
   ============================================================ */

:root{
  /* the reading face — loaded via Google Fonts in the article <head> */
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --measure: 680px;
  --teal-tint: rgba(47,183,164,.07);
  --faint: #8a939c;
}

/* reading progress bar */
.reading-progress{
  position:fixed; top:0; left:0; height:3px; width:0;
  background:linear-gradient(90deg,var(--teal),var(--teal-deep)); z-index:60;
}

/* ---- shell ---- */
.article{ max-width:var(--measure); margin:0 auto; padding:0 24px; }
.article__masthead{ padding:56px 0 0; }

/* category pill / tag */
.article__eyebrow{
  font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.1em;
  font-size:11.5px; font-weight:500; color:var(--teal-deep); text-decoration:none;
  display:inline-block; margin:0 0 18px;
  background:var(--teal-tint); border:1px solid rgba(47,183,164,.30);
  padding:6px 13px; border-radius:999px; line-height:1;
  transition:background .15s ease, border-color .15s ease;
}
.article__eyebrow:hover{ background:rgba(47,183,164,.14); border-color:rgba(47,183,164,.5); }
.article h1{
  font-size:clamp(31px,4.6vw,44px); line-height:1.1; letter-spacing:-.02em;
  margin:0 0 18px; text-wrap:balance;
}
.article__dek{
  font-family:var(--serif); font-style:italic; font-size:clamp(19px,2.3vw,22px);
  line-height:1.5; color:var(--text-muted); margin:0 0 32px;
}

/* ---- byline ---- */
.article__byline{
  display:flex; align-items:center; gap:14px; padding:18px 0;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
/* the signature unit — avatar + name/credential, always on one line */
.article__sig{ display:flex; align-items:center; gap:14px; }
.article__who{ min-width:0; }
.article__avatar{
  width:46px; height:46px; border-radius:50%; flex:none;
  background:radial-gradient(circle at 32% 28%,var(--teal),var(--teal-deep));
  color:#fff; font-weight:800; font-size:16px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.14);
}
.article__name{ color:var(--ink); font-weight:700; font-size:15px; line-height:1.25; }
.article__cred{ color:var(--text-muted); font-size:13px; margin-top:2px; }
.article__meta{ margin-left:auto; text-align:right; color:var(--faint); font-size:13px; line-height:1.5; }
.article__date{ display:block; color:var(--text-muted); font-weight:600; }
.article__read{ display:block; }

/* ---- featured image (breaks out wider than the reading column) ---- */
.article__hero{
  margin:32px 0 8px;
  width:min(860px, calc(100vw - 40px));
  margin-left:50%;
  transform:translateX(-50%);
}
.article__hero img{ width:100%; border-radius:8px; display:block; }
.article__heroph{ /* CSS placeholder — swap for a real <img> on deploy */
  aspect-ratio:16/8; border-radius:8px; position:relative; overflow:hidden;
  background:
    repeating-linear-gradient(90deg,transparent 0 78px,rgba(255,255,255,.5) 78px 92px),
    linear-gradient(160deg,#153e39,#1f8f7f 46%,#2fb7a4 78%,#8fe3d6);
}
.article__heroph span{
  position:absolute; left:16px; bottom:14px; color:#fff;
  font-family:'JetBrains Mono',monospace; font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  background:rgba(0,0,0,.45); padding:5px 9px; border-radius:4px;
}
.article__caption{ font-size:12.5px; color:var(--faint); margin:10px 2px 0; }

/* ---- body prose ---- */
.article__body{ padding:24px 0 8px; }
.article__body p{ font-family:var(--serif); font-size:19px; line-height:1.72; color:var(--text); margin:0 0 22px; }
.article__body a{ color:var(--teal-deep); text-decoration:underline; text-underline-offset:2px; text-decoration-thickness:1px; }
.article__body h2{ font-size:26px; line-height:1.2; letter-spacing:-.015em; margin:44px 0 14px; text-wrap:balance; }
.article__body h3{ font-size:19px; margin:30px 0 10px; font-weight:700; }
.article__body strong{ color:var(--ink); font-weight:600; }

.article__body ol{ margin:0 0 24px; padding:0; counter-reset:step; list-style:none; }
.article__body ol li{
  font-family:var(--serif); font-size:19px; line-height:1.6; color:var(--text);
  position:relative; padding:0 0 18px 52px;
}
.article__body ol li::before{
  counter-increment:step; content:counter(step);
  position:absolute; left:0; top:1px; width:32px; height:32px; border-radius:50%;
  background:var(--teal-tint); color:var(--teal-deep); font-weight:800; font-size:15px;
  display:flex; align-items:center; justify-content:center;
}
.article__body ol li b{ color:var(--ink); font-weight:700; font-size:16px; display:block; margin-bottom:3px; }

/* pull quote */
.pullquote{
  margin:36px 0; padding:6px 0 6px 24px; border-left:3px solid var(--teal);
  font-family:var(--serif); font-style:italic; font-size:23px; line-height:1.42; color:var(--ink);
}

/* performance tiers */
.tiers{ margin:8px 0 26px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.tier{ display:flex; gap:14px; align-items:baseline; padding:14px 18px; border-top:1px solid var(--line); }
.tier:first-child{ border-top:0; }
.tier__k{ font-weight:800; font-size:14px; color:var(--ink); min-width:86px; }
.tier__k .swatch{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:8px; }
.tier__v{ font-family:var(--serif); font-size:16.5px; line-height:1.5; color:var(--text-muted); }

/* CTA panel (button reuses global .btn) */
.article-cta{
  margin:44px 0; background:var(--teal-tint); border:1px solid rgba(47,183,164,.28);
  border-radius:14px; padding:30px;
}
.article-cta__eyebrow{ font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.1em; font-size:11px; color:var(--teal-deep); margin:0 0 10px; }
.article-cta h2{ font-size:24px; line-height:1.18; letter-spacing:-.01em; margin:0 0 10px; }
.article-cta p{ font-family:var(--serif); font-size:17.5px; line-height:1.55; color:var(--text); margin:0 0 20px; }

/* inline calculator — reusable shell for fitness-test articles (per-article JS supplies the formula) */
.calc{
  font-family:'Inter',sans-serif; margin:32px 0;
  border:1px solid var(--line); border-radius:var(--radius-lg);
  background:#fbfcfc; padding:26px 26px 28px;
}
.calc .calc__eyebrow{
  font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.12em;
  font-size:12px; color:var(--teal-deep); margin:0 0 18px;
}
.calc__grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px 18px; margin-bottom:20px; }
.calc__field{ display:flex; flex-direction:column; gap:6px; }
.calc__field > span{ font-size:13px; font-weight:600; color:var(--text-muted); }
.calc__field input, .calc__field select{
  font-family:'Inter',sans-serif; font-size:16px; color:var(--ink);
  border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fff; width:100%;
}
.calc__field input:focus, .calc__field select:focus{
  outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(47,183,164,.16);
}
.calc__time{ display:flex; align-items:center; gap:8px; }
.calc__time span{ color:var(--text-muted); font-weight:700; }
.calc .btn{ width:100%; justify-content:center; }
.calc__result{ margin-top:22px; padding-top:20px; border-top:1px solid var(--line); text-align:center; }
.calc__number{ font-size:46px; font-weight:800; color:var(--ink); line-height:1; letter-spacing:-.02em; }
.calc__unit{ font-size:16px; font-weight:600; color:var(--text-muted); letter-spacing:0; }
.calc .calc__note{ font-family:var(--serif); font-size:16px; line-height:1.5; color:var(--text-muted); margin:12px auto 0; max-width:46ch; }
.calc__result--error .calc__readout{ display:none; }
.calc__readout{ display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; }
.calc__cat{
  font-family:'Inter',sans-serif; font-weight:700; font-size:13px; letter-spacing:.04em;
  text-transform:uppercase; color:#fff; padding:6px 13px; border-radius:999px; white-space:nowrap;
}
.calc__cat--poor{ background:#c65b4e; }
.calc__cat--fair{ background:#d99a3c; }
.calc__cat--good{ background:var(--teal); }
.calc__cat--excellent{ background:var(--teal-deep); }
/* save-for-later mini form */
.calc__save{ margin-top:22px; padding-top:20px; border-top:1px dashed var(--line); }
.calc .calc__save-label{ font-family:'Inter',sans-serif; font-size:14px; font-weight:600; color:var(--ink); margin:0 0 12px; text-align:center; }
.calc__save-row{ display:flex; gap:10px; }
.calc__save-row input{ font-family:'Inter',sans-serif; font-size:15px; color:var(--ink); border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fff; flex:1 1 0; min-width:0; }
.calc__save-row input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(47,183,164,.16); }
.calc__save-row .btn{ width:auto; flex:0 0 auto; white-space:nowrap; }
.calc .calc__save-msg{ font-family:'Inter',sans-serif; font-size:13.5px; font-weight:600; color:var(--teal-deep); margin:12px 0 0; text-align:center; }
@media (max-width:520px){
  .calc__grid{ grid-template-columns:1fr; }
  .calc__save-row{ flex-direction:column; }
  .calc__save-row .btn{ width:100%; }
}

/* honeypot — off-screen bot trap; real users never see or tab to it */
.hp-field{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* standalone "save this article for later" block (any article, no calculator needed) */
.save-block{ font-family:'Inter',sans-serif; margin:36px 0; border:1px solid var(--line); border-radius:var(--radius-lg); background:#fbfcfc; padding:22px 24px; }
.save-block .save-block__label{ font-family:'Inter',sans-serif; font-size:14.5px; font-weight:600; color:var(--ink); margin:0 0 12px; }
.save-block__row{ display:flex; gap:10px; }
.save-block__row input{ font-family:'Inter',sans-serif; font-size:15px; color:var(--ink); border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fff; flex:1 1 0; min-width:0; }
.save-block__row input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(47,183,164,.16); }
.save-block__row .btn{ width:auto; flex:0 0 auto; white-space:nowrap; }
.save-block .save-block__msg{ font-family:'Inter',sans-serif; font-size:13.5px; font-weight:600; color:var(--teal-deep); margin:12px 0 0; }
/* slim variant — compact, but tinted so it reads as an offer without interrupting the read */
.save-block--slim{ padding:16px 18px; margin:28px 0; background:var(--teal-tint); border-color:rgba(47,183,164,.30); }
.save-block--slim .save-block__label{ font-size:14px; line-height:1.45; color:var(--ink); margin:0 0 11px; }
.save-block--slim .save-block__label b{ font-weight:700; color:var(--teal-deep); }
.save-block--slim .save-block__row input{ font-size:14px; padding:9px 12px; }
.save-block--slim .save-block__row .btn{ padding:9px 18px; font-size:14px; }
@media (max-width:520px){
  .save-block__row{ flex-direction:column; }
  .save-block__row .btn{ width:100%; }
}

/* sources */
.article-sources{ margin:40px 0 0; padding-top:26px; border-top:1px solid var(--line); }
.article-sources h2{ font-size:18px; text-transform:uppercase; letter-spacing:.04em; margin:0 0 18px; }
.ref{ margin:0 0 18px; }
.ref__t{ font-weight:700; font-size:14.5px; color:var(--ink); font-family:'Inter',sans-serif; }
.ref__note{ font-family:var(--serif); font-style:italic; color:var(--text-muted); font-size:15px; margin:2px 0 4px; }
.ref__c{ font-family:var(--serif); font-size:14.5px; line-height:1.5; color:var(--text-muted); }
.ref__c .pmid{ font-family:'JetBrains Mono',monospace; font-size:12.5px; color:var(--teal-deep); }

/* bottom tag row — topical + physiology tags (metadata footer) */
.article__tags{
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  margin:34px 0 0; padding-top:24px; border-top:1px solid var(--line);
}
.article__tags .label{ font-family:'Inter',sans-serif; font-size:13px; color:var(--faint); font-weight:600; margin-right:2px; }
.tag-pill{
  font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.06em;
  font-size:11px; color:var(--text-muted); background:var(--soft); border:1px solid var(--line);
  padding:5px 11px; border-radius:999px; text-decoration:none; line-height:1;
  transition:border-color .15s ease, color .15s ease;
}
.tag-pill:hover{ border-color:var(--teal-line); color:var(--teal-deep); }
.tag-pill--phys{ background:var(--teal-tint); border-color:rgba(47,183,164,.30); color:var(--teal-deep); }

/* closing CTA band (bottom of the article) — dark, brand "get in touch". Distinct from the in-content lead-magnet panel.
   Note: parent-scoped selectors so text color beats .article__body p specificity. */
.closing-cta{
  margin:36px 0 8px; background:var(--ink); color:#fff; border-radius:14px;
  padding:28px 30px; display:flex; align-items:center; justify-content:space-between;
  gap:22px; flex-wrap:wrap;
}
.closing-cta__body{ flex:1 1 280px; }
.closing-cta .closing-cta__h{ font-family:'Inter',sans-serif; font-weight:800; font-size:21px; line-height:1.2; color:#fff; margin:0 0 5px; letter-spacing:-.01em; }
.closing-cta .closing-cta__p{ font-family:var(--serif); font-size:15.5px; line-height:1.5; color:rgba(255,255,255,.82); margin:0; }
.closing-cta .btn{ background:var(--teal-deep); color:#fff; flex:none; }
.closing-cta .btn:hover{ background:var(--teal); }

@media (max-width:560px){
  .article__masthead{ padding-top:36px; }

  /* byline: avatar + name on one line (signature); date-left / read-right on the line below */
  .article__byline{ flex-wrap:wrap; }
  .article__meta{
    margin-left:0; width:100%; order:3;
    display:flex; justify-content:space-between; align-items:baseline;
    text-align:left; margin-top:14px; padding-top:12px; border-top:1px solid var(--line);
  }
  .article__date, .article__read{ display:inline; }

  /* closing CTA: kill the 280px height basis (was a width basis on desktop) + tighten the box */
  .closing-cta{ flex-direction:column; align-items:flex-start; gap:14px; padding:22px 22px; }
  .closing-cta__body{ flex:0 0 auto; }
  .closing-cta .btn{ width:100%; text-align:center; }
}

/* ============================================================
   ARTICLES LANDING PAGE  (articles/index.html)
   ============================================================ */
.articles-hero{ max-width:var(--maxw); margin:0 auto; padding:60px 28px 4px; }
.articles-hero h1{ font-size:clamp(34px,5vw,52px); line-height:1.06; letter-spacing:-.02em; margin:0 0 14px; }
.articles-hero p{ font-family:var(--serif); font-size:19px; line-height:1.6; color:var(--text-muted); max-width:660px; margin:0; }

.articles-wrap{ max-width:var(--maxw); margin:0 auto; padding:0 28px 20px; }
.section-heading{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin:56px 0 0; }
.section-heading h2{ font-size:clamp(24px,3vw,32px); letter-spacing:-.02em; }
.section-heading .sub{ font-family:var(--serif); font-style:italic; color:var(--text-muted); font-size:16px; }

.section-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:26px; }

.section-card{ position:relative; aspect-ratio:3/2; border-radius:12px; overflow:hidden; display:block; text-decoration:none; box-shadow:var(--shadow); background:var(--ink); }
.section-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .45s ease; }
.section-card::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,0) 34%,rgba(0,0,0,.76)); }
.section-card:hover img{ transform:scale(1.04); }
.section-card__tag{ position:absolute; z-index:2; top:14px; left:14px; font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.08em; font-size:11px; color:#fff; background:rgba(0,0,0,.5); padding:5px 10px; border-radius:6px; }
.section-card__body{ position:absolute; z-index:2; left:18px; right:18px; bottom:16px; }
.section-card__title{ font-family:'Inter',sans-serif; font-weight:800; font-size:32px; line-height:1.1; color:#fff; letter-spacing:-.015em; margin:0 0 5px; }
.section-card__purpose{ font-family:var(--serif); font-style:italic; font-size:13.5px; line-height:1.35; color:rgba(255,255,255,.82); margin:0; }

/* light variant — for a data graphic: contain + pad so nothing is cropped */
.section-card--light{ background:#fff; }
.section-card--light img{ object-fit:contain; padding:18px 18px 64px; }
.section-card--light::after{ background:linear-gradient(180deg,rgba(255,255,255,0) 58%,#ffffff 90%); }
.section-card--light .section-card__tag{ background:rgba(17,20,24,.78); }
.section-card--light .section-card__title{ color:var(--ink); }
.section-card--light .section-card__purpose{ color:var(--text-muted); }

/* featured "Latest" card — horizontal */
.feature-card{ display:grid; grid-template-columns:1.05fr 1fr; margin-top:26px; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:#fff; box-shadow:var(--shadow); text-decoration:none; transition:box-shadow .18s ease, transform .18s ease; }
.feature-card:hover{ box-shadow:0 12px 30px rgba(17,20,24,.10); transform:translateY(-2px); }
.feature-card__media{ position:relative; min-height:270px;
  background:
    repeating-linear-gradient(90deg,transparent 0 78px,rgba(255,255,255,.5) 78px 92px),
    linear-gradient(160deg,#153e39,#1f8f7f 46%,#2fb7a4 78%,#8fe3d6); }
.feature-card__media img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.feature-card__tag{ position:absolute; top:16px; left:16px; font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.08em; font-size:11px; color:#fff; background:rgba(0,0,0,.5); padding:5px 10px; border-radius:6px; }
.feature-card__body{ padding:30px 32px; display:flex; flex-direction:column; justify-content:center; }
.feature-card__k{ font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.1em; font-size:11px; color:var(--teal-deep); margin:0 0 10px; }
.feature-card__title{ font-family:'Inter',sans-serif; font-weight:800; font-size:26px; line-height:1.14; letter-spacing:-.02em; color:var(--ink); margin:0 0 12px; }
.feature-card__dek{ font-family:var(--serif); font-size:16px; line-height:1.55; color:var(--text-muted); margin:0 0 18px; }
.feature-card__meta{ font-family:'Inter',sans-serif; font-size:13px; color:var(--faint); }
.feature-card__meta b{ color:var(--text-muted); font-weight:600; }

@media (max-width:900px){
  .section-grid{ grid-template-columns:repeat(2,1fr); }
  .feature-card{ grid-template-columns:1fr; }
  .feature-card__media{ min-height:200px; }
}
@media (max-width:560px){
  .section-grid{ grid-template-columns:1fr; }
  .articles-hero{ padding-top:40px; }
  /* cards go full-width on mobile — bump the tag so it stays legible */
  .section-card__tag{ font-size:16px; padding:6px 12px; }
}

/* ============================================================
   SECTION / TAG LISTING PAGES  (articles/<section>/index.html)
   ============================================================ */
/* contained hero (gutters on both sides), shorter landscape image cut on a wide diagonal */
.section-page-hero{ position:relative; max-width:var(--maxw); margin:0 auto; overflow:hidden; }
.section-page-hero__text{ position:relative; z-index:2; max-width:44%; min-height:320px; padding:48px 0 48px 28px; display:flex; flex-direction:column; justify-content:center; }
.crumb{ font-family:'Inter',sans-serif; font-size:13px; color:var(--faint); margin:0 0 14px; }
.crumb a{ color:var(--text-muted); text-decoration:none; font-weight:600; }
.crumb a:hover{ color:var(--teal-deep); }
.section-page-hero h1{ font-size:clamp(32px,4.6vw,48px); line-height:1.05; letter-spacing:-.02em; margin:0 0 14px; text-wrap:balance; }
.section-page-hero p{ font-family:var(--serif); font-size:19px; line-height:1.55; color:var(--text-muted); margin:0; }
.section-page-hero__media{ position:absolute; top:0; right:28px; bottom:0; width:48%; }
.section-page-hero__media img{ width:100%; height:100%; object-fit:cover; display:block; clip-path:polygon(20% 0, 100% 0, 100% 100%, 0% 100%); }
@media (max-width:820px){
  .section-page-hero{ overflow:visible; }
  .section-page-hero__text{ position:static; max-width:none; min-height:0; padding:44px 28px 0; display:block; }
  .section-page-hero__media{ position:static; width:auto; margin:22px 28px 0; }
  .section-page-hero__media img{ clip-path:none; aspect-ratio:16/10; border-radius:var(--radius-lg); }
}

.article-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:22px; max-width:var(--maxw); margin:32px auto 0; padding:0 28px; }
.article-card{ display:flex; flex-direction:column; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff; text-decoration:none; box-shadow:var(--shadow); transition:box-shadow .18s ease, transform .18s ease; }
.article-card:hover{ box-shadow:0 12px 30px rgba(17,20,24,.10); transform:translateY(-2px); }
.article-card__media{ position:relative; aspect-ratio:16/10;
  background:repeating-linear-gradient(90deg,transparent 0 78px,rgba(255,255,255,.5) 78px 92px),linear-gradient(160deg,#153e39,#1f8f7f 46%,#2fb7a4 78%,#8fe3d6); }
.article-card__media img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.article-card__tag{ position:absolute; top:12px; left:12px; font-family:'JetBrains Mono',monospace; text-transform:uppercase; letter-spacing:.08em; font-size:10.5px; color:#fff; background:rgba(0,0,0,.5); padding:4px 9px; border-radius:6px; }
.article-card__body{ padding:18px 20px 20px; display:flex; flex-direction:column; gap:9px; flex:1; }
.article-card__title{ font-family:'Inter',sans-serif; font-weight:800; font-size:19px; line-height:1.18; letter-spacing:-.01em; color:var(--ink); margin:0; }
.article-card__dek{ font-family:var(--serif); font-size:14.5px; line-height:1.5; color:var(--text-muted); margin:0; }
.article-card__meta{ font-family:'Inter',sans-serif; font-size:12.5px; color:var(--faint); margin-top:auto; padding-top:4px; }

.section-note{ max-width:var(--maxw); margin:20px auto 0; padding:0 28px; }
.section-note p{ font-family:var(--serif); font-style:italic; color:var(--text-muted); margin:0; }

@media (max-width:560px){
  .article-list{ grid-template-columns:1fr; }
}
