/* =============================================================
   blog.css — HELMD blog (v1: Hims-clone styling)
   Pairs with legal.css (reset + .site-footer). Load legal.css FIRST,
   then this file.
   NOTE: Hims uses the licensed Adobe font "sofia-pro". As a free
   stand-in we use Poppins (geometric sans). Swap to a licensed
   Sofia Pro (or chosen brand face) in a later HELMD-ify pass.
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  --post-ink:rgba(0,0,0,.89);     /* headings — Hims near-black */
  --post-body:rgba(0,0,0,.78);    /* body copy */
  --post-mute:rgba(0,0,0,.55);    /* lead / captions / meta */
  --post-line:rgba(0,0,0,.12);
  --post-accent:#FBBC04;          /* HELMD gold — used sparingly */
  --geo:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --inter:'Inter',system-ui,-apple-system,sans-serif;
  --post-max:1180px;
}

body{font-family:var(--geo);background:#fff;color:var(--post-body);-webkit-font-smoothing:antialiased;line-height:1.6}
.blog-wrap a{color:inherit}

/* keep the shared dark site footer in the site face (Inter), not Poppins */
.site-footer,.site-footer *{font-family:var(--inter)}

/* ---------------- Header ---------------- */
.blog-header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--post-line)}
.blog-header .bh-inner{width:min(var(--post-max),92vw);margin:0 auto;display:flex;align-items:center;justify-content:space-between;height:64px}
.blog-header .bh-logo img{height:19px;width:auto;display:block}
.blog-header .bh-right{display:flex;align-items:center;gap:18px}
.blog-header .bh-right a{font-size:14px;font-weight:500;text-decoration:none;color:var(--post-ink)}
.blog-header .bh-cta{border:1px solid var(--post-ink);border-radius:4px;padding:8px 16px;transition:background .15s,color .15s}
.blog-header .bh-cta:hover{background:var(--post-ink);color:#fff}

/* category strip (index + article top) */
.cat-bar{border-bottom:1px solid var(--post-line)}
.cat-bar .cat-inner{width:min(var(--post-max),92vw);margin:0 auto;display:flex;gap:8px;overflow-x:auto;padding:14px 0;scrollbar-width:none}
.cat-bar .cat-inner::-webkit-scrollbar{display:none}
.cat-bar a{flex:none;font-size:14px;font-weight:500;text-decoration:none;color:var(--post-ink);padding:9px 18px;border:1px solid var(--post-line);border-radius:999px;white-space:nowrap;transition:background .15s,border-color .15s}
.cat-bar a:hover,.cat-bar a.is-active{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.2)}

/* ---------------- Index hero ---------------- */
.blog-index{width:min(var(--post-max),92vw);margin:0 auto;padding:56px 0 80px}
.blog-hero h1{font-family:var(--geo);font-weight:500;font-size:clamp(46px,9vw,92px);line-height:.98;letter-spacing:-.045em;color:var(--post-ink);margin:0}
.blog-hero p{font-family:var(--geo);font-weight:400;font-size:clamp(18px,2.4vw,24px);line-height:1.3;letter-spacing:-.02em;color:var(--post-mute);max-width:620px;margin:18px 0 0}
.blog-hero{margin-bottom:40px}

/* ---------------- Post grid ---------------- */
.post-grid{display:grid;grid-template-columns:1fr;gap:38px 48px}
@media(min-width:880px){.post-grid{grid-template-columns:1.15fr 1fr}}
.post-feature{display:block;text-decoration:none;color:inherit}
.post-feature .pf-img{aspect-ratio:16/11;background:#ece9e3 center/cover no-repeat;border-radius:10px;overflow:hidden}
.post-feature .pf-img img{width:100%;height:100%;object-fit:cover}
.post-feature h2{font-family:var(--geo);font-weight:500;font-size:clamp(26px,3.4vw,36px);line-height:1.05;letter-spacing:-.03em;color:var(--post-ink);margin:20px 0 0}
.post-feature .pf-meta{font-size:13px;color:var(--post-mute);margin:12px 0 0}
.post-feature .pf-ex{font-size:16px;line-height:1.45;color:var(--post-body);margin:10px 0 0}
.post-feature:hover h2{text-decoration:underline;text-underline-offset:3px}

.post-list{display:flex;flex-direction:column}
.post-card{display:grid;grid-template-columns:1fr 104px;gap:18px;align-items:start;text-decoration:none;color:inherit;padding:22px 0;border-bottom:1px solid var(--post-line)}
.post-card:first-child{padding-top:0}
.post-card h3{font-family:var(--geo);font-weight:500;font-size:21px;line-height:1.12;letter-spacing:-.02em;color:var(--post-ink);margin:0}
.post-card .pc-meta{font-size:12.5px;color:var(--post-mute);margin:8px 0 0}
.post-card .pc-tags{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0}
.post-card .pc-tags span{font-size:11px;color:var(--post-ink);background:rgba(0,0,0,.05);border-radius:999px;padding:4px 10px}
.post-card .pc-img{width:104px;height:78px;border-radius:8px;overflow:hidden;background:#ece9e3}
.post-card .pc-img img{width:100%;height:100%;object-fit:cover}
.post-card:hover h3{text-decoration:underline;text-underline-offset:3px}

/* ---------------- Article layout ---------------- */
.article-wrap{width:min(var(--post-max),92vw);margin:0 auto;padding:34px 0 70px;display:grid;grid-template-columns:1fr;gap:0}
@media(min-width:980px){.article-wrap{grid-template-columns:268px minmax(0,720px);gap:56px;justify-content:center}}

.toc{display:none}
@media(min-width:980px){
  .toc{display:block;position:sticky;top:96px;align-self:start;max-height:calc(100vh - 120px);overflow:auto}
  .toc h4{font-family:var(--geo);font-weight:500;font-size:18px;letter-spacing:-.01em;color:var(--post-ink);margin:0 0 16px}
  .toc ul{list-style:none;margin:0;padding:0;border-left:1px solid var(--post-line)}
  .toc li{margin:0}
  .toc a{display:block;font-size:13.5px;line-height:1.35;color:var(--post-mute);text-decoration:none;padding:9px 0 9px 16px;margin-left:-1px;border-left:1px solid transparent;transition:color .15s,border-color .15s}
  .toc a:hover{color:var(--post-ink)}
  .toc a.is-active{color:var(--post-ink);border-left-color:var(--post-ink);font-weight:500}
}

.article-main{min-width:0}
.breadcrumb{font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--post-mute);margin:0 0 18px}
.breadcrumb a{text-decoration:none;color:var(--post-mute)}
.breadcrumb a:hover{color:var(--post-ink)}
.article-title{font-family:var(--geo);font-weight:500;font-size:clamp(34px,5.6vw,58px);line-height:1.02;letter-spacing:-.04em;color:var(--post-ink);margin:0}

/* byline */
.byline{display:flex;align-items:center;gap:14px;margin:26px 0 8px}
.byline img{width:54px;height:54px;border-radius:50%;object-fit:cover;flex:none;border:1px solid var(--post-line)}
.byline .by-meta{font-size:14px;line-height:1.5;color:var(--post-mute)}
.byline .by-meta a{color:var(--post-ink);font-weight:500;text-decoration:none}
.byline .by-meta a:hover{text-decoration:underline}
.byline .by-dates{font-size:12.5px;color:var(--post-mute)}

/* lead + body prose */
.post-lead{font-family:var(--geo);font-weight:400;font-size:clamp(19px,2.2vw,23px);line-height:1.4;letter-spacing:-.018em;color:var(--post-mute);margin:26px 0 0}
.post-body{margin-top:34px}
.post-body p{font-size:17px;line-height:1.65;color:var(--post-body);margin:0 0 20px}
.post-body h2{font-family:var(--geo);font-weight:500;font-size:clamp(28px,3.6vw,38px);line-height:1.08;letter-spacing:-.03em;color:var(--post-ink);margin:46px 0 6px;scroll-margin-top:90px}
.post-body h3{font-family:var(--geo);font-weight:600;font-size:20px;line-height:1.2;letter-spacing:-.01em;color:var(--post-ink);margin:30px 0 8px}
.post-body ul,.post-body ol{margin:0 0 20px;padding-left:22px}
.post-body li{font-size:17px;line-height:1.6;color:var(--post-body);margin:0 0 9px}
.post-body strong{font-weight:600;color:var(--post-ink)}
.post-body a{color:var(--post-ink);text-decoration:underline;text-decoration-color:rgba(0,0,0,.35);text-underline-offset:2px;transition:text-decoration-color .15s}
.post-body a:hover{text-decoration-color:var(--post-ink)}

/* section header + copy-link */
.sec-head{display:flex;align-items:baseline;gap:12px}
.sec-head .copy-link{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--post-mute);background:none;border:none;cursor:pointer;font-family:var(--geo);padding:0;white-space:nowrap;transition:color .15s}
.sec-head .copy-link:hover{color:var(--post-ink)}
.sec-head .copy-link.copied{color:#2E7D32}

/* callout / disclaimer note */
.callout{background:rgba(0,0,0,.035);border-radius:10px;padding:16px 18px;margin:24px 0;font-size:14.5px;line-height:1.55;color:var(--post-body)}
.callout strong{color:var(--post-ink)}
.flag{background:rgba(251,188,4,.16);border-left:3px solid var(--post-accent);border-radius:0 8px 8px 0;padding:12px 16px;margin:24px 0;font-size:13.5px;line-height:1.55;color:var(--post-ink)}

/* comparison table */
.cmp{width:100%;border-collapse:collapse;margin:22px 0;font-size:14.5px;line-height:1.45}
.cmp th,.cmp td{border-bottom:1px solid var(--post-line);padding:12px 12px;text-align:left;vertical-align:top}
.cmp thead th{font-weight:600;color:var(--post-ink);border-bottom:2px solid rgba(0,0,0,.25)}
.cmp tbody th{font-weight:500;color:var(--post-ink)}
.cmp td{color:var(--post-body)}
.cmp .col-helmd{background:rgba(251,188,4,.08)}
.cmp-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* inline CTA card */
.cta-card{background:#111;color:#FAFAF8;border-radius:12px;padding:26px 24px;margin:34px 0;display:flex;flex-wrap:wrap;align-items:center;gap:16px 22px;justify-content:space-between}
.cta-card .cc-txt h4{font-family:var(--geo);font-weight:600;font-size:21px;letter-spacing:-.02em;color:#fff;margin:0}
.cta-card .cc-txt p{font-size:14px;line-height:1.45;color:rgba(250,250,248,.78);margin:6px 0 0;max-width:440px}
.cta-card .cc-btn{flex:none;background:var(--post-accent);color:#111;font-family:var(--geo);font-weight:600;font-size:15px;text-decoration:none;padding:13px 24px;border-radius:4px;transition:filter .15s}
.cta-card .cc-btn:hover{filter:brightness(.94)}

/* takeaways */
.takeaways{margin-top:8px}
.takeaways li{margin-bottom:12px}

/* sources */
.sources{margin:48px 0 0;padding-top:24px;border-top:1px solid var(--post-line)}
.sources h2{font-family:var(--geo);font-weight:500;font-size:22px;letter-spacing:-.02em;color:var(--post-ink);margin:0 0 14px}
.sources ol{margin:0;padding-left:20px}
.sources li{font-size:13px;line-height:1.5;color:var(--post-mute);margin:0 0 10px}
.sources a{color:var(--post-mute);text-decoration:underline;text-decoration-color:rgba(0,0,0,.25);word-break:break-word}
.sources a:hover{color:var(--post-ink)}

/* editorial / med-disclaimer block */
.ed-standards{margin:36px 0 0;padding:20px;background:rgba(0,0,0,.035);border-radius:10px;font-size:12.5px;line-height:1.65;color:var(--post-mute)}
.ed-standards strong{color:var(--post-ink)}

/* author bio */
.author-bio{margin:40px 0 0;padding-top:30px;border-top:1px solid var(--post-line);display:flex;gap:18px;align-items:flex-start}
.author-bio img{width:72px;height:72px;border-radius:50%;object-fit:cover;flex:none;border:1px solid var(--post-line)}
.author-bio .ab-name{font-family:var(--geo);font-weight:600;font-size:18px;letter-spacing:-.01em;color:var(--post-ink)}
.author-bio .ab-role{font-size:13px;color:var(--post-mute);margin:2px 0 10px}
.author-bio p{font-size:14.5px;line-height:1.55;color:var(--post-body);margin:0 0 10px}
.author-bio a.ab-link{font-size:13.5px;font-weight:500;color:var(--post-ink);text-decoration:none}
.author-bio a.ab-link:hover{text-decoration:underline}

/* related */
.related{width:min(var(--post-max),92vw);margin:0 auto;padding:40px 0 70px;border-top:1px solid var(--post-line)}
.related h2{font-family:var(--geo);font-weight:500;font-size:26px;letter-spacing:-.02em;color:var(--post-ink);margin:0 0 22px}
.related .rel-grid{display:grid;grid-template-columns:1fr;gap:22px}
@media(min-width:760px){.related .rel-grid{grid-template-columns:repeat(3,1fr)}}
.related a{text-decoration:none;color:inherit}
.related .rel-img{aspect-ratio:16/10;background:#ece9e3;border-radius:8px;overflow:hidden;margin-bottom:12px}
.related .rel-img img{width:100%;height:100%;object-fit:cover}
.related h3{font-family:var(--geo);font-weight:500;font-size:18px;line-height:1.15;letter-spacing:-.02em;color:var(--post-ink);margin:0}
.related .rel-meta{font-size:12.5px;color:var(--post-mute);margin:8px 0 0}
.related a:hover h3{text-decoration:underline;text-underline-offset:3px}

/* author landing page */
.author-page{width:min(760px,92vw);margin:0 auto;padding:54px 0 60px}
.author-page .ap-head{display:flex;gap:20px;align-items:center;margin-bottom:30px}
.author-page .ap-head img{width:96px;height:96px;border-radius:50%;object-fit:cover;flex:none;border:1px solid var(--post-line)}
.author-page h1{font-family:var(--geo);font-weight:500;font-size:clamp(30px,5vw,46px);line-height:1.02;letter-spacing:-.03em;color:var(--post-ink);margin:0}
.author-page .ap-role{font-size:15px;color:var(--post-mute);margin-top:6px}
.author-page .ap-bio p{font-size:16px;line-height:1.6;color:var(--post-body);margin:0 0 16px}
.author-page h2{font-family:var(--geo);font-weight:500;font-size:24px;letter-spacing:-.02em;color:var(--post-ink);margin:30px 0 14px}
.author-page .ap-articles{list-style:none;padding:0;margin:0}
.author-page .ap-articles li{border-bottom:1px solid var(--post-line);padding:14px 0}
.author-page .ap-articles a{font-family:var(--geo);font-weight:500;font-size:18px;letter-spacing:-.01em;color:var(--post-ink);text-decoration:none}
.author-page .ap-articles a:hover{text-decoration:underline}
@media(max-width:520px){.author-page .ap-head{flex-direction:column;align-items:flex-start;gap:14px}}

/* mobile inline TOC (shown above article on small screens) */
.toc-inline{display:block;border:1px solid var(--post-line);border-radius:10px;padding:18px 18px 8px;margin:26px 0 0}
.toc-inline summary{font-family:var(--geo);font-weight:500;font-size:16px;color:var(--post-ink);cursor:pointer;list-style:none;margin-bottom:8px}
.toc-inline summary::-webkit-details-marker{display:none}
.toc-inline summary::after{content:"▾";float:right;color:var(--post-mute)}
.toc-inline[open] summary::after{content:"▴"}
.toc-inline ul{list-style:none;margin:0;padding:0}
.toc-inline li{margin:0}
.toc-inline a{display:block;font-size:14.5px;color:var(--post-body);text-decoration:none;padding:9px 0;border-top:1px solid var(--post-line)}
@media(min-width:980px){.toc-inline{display:none}}
