/* Clinic App — Insights / blog
   Additive layer on top of the site's styles.css. Reuses the real
   .nav, .footer, .btn, .brand, .eyebrow + all --vars. Blog-only pieces
   are namespaced .post-* so nothing collides with the marketing site. */

.post-main { overflow-x: hidden; }
.post-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* add an Insights link style consistent with nav (reuses .nav__links a) */
.nav__links a.is-active { color: var(--ink); font-weight: 700; }

/* ---------- Dark article hero ---------- */
.post-hero {
  background: radial-gradient(120% 150% at 72% -20%, #2a0a2e 0%, #160a18 42%, var(--dark) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.post-hero::after {
  content: ""; position: absolute; top: -28%; right: -8%; width: 560px; height: 560px;
  border-radius: 50%; background: var(--grad-soft); filter: blur(120px); opacity: .7;
}
.post-hero__in { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 58px; text-align: center; max-width: 940px; margin: 0 auto; }
.post-hero .eyebrow { margin-bottom: 22px; }
.post-hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.04em; line-height: .95;
  font-size: clamp(38px, 6vw, 72px); margin: 0 auto; max-width: 19ch;
}
.post-byline { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 36px; font-size: 14px; color: rgba(255,255,255,.66); }
.post-byline .sep { opacity: .4; }
.post-byline__a { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.post-byline__a img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.22); }
.post-byline__nm { display: flex; flex-direction: column; line-height: 1.3; }
.post-byline__name { color: #fff; font-weight: 700; }
.post-byline__role { color: rgba(255,255,255,.55); font-size: 12.5px; }

/* ---------- Two-column layout ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 56px; padding-top: 56px; padding-bottom: 20px; align-items: start; }

/* ---------- Article prose ---------- */
.post-body { min-width: 0; }
.post-body > * + * { margin-top: 24px; }
.post-lead { font-size: 21px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.post-body h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(28px,3.6vw,40px);
  letter-spacing: -.035em; line-height: 1.0; margin-top: 56px; padding-top: 12px; scroll-margin-top: 96px; position: relative;
}
.post-body h2::before { content: ""; position: absolute; top: -14px; left: 0; width: 44px; height: 3px; border-radius: 3px; background: var(--grad); }
.post-body h3 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-top: 38px; }
.post-body p { font-size: 18px; line-height: 1.7; color: var(--ink-70); }
.post-body strong { font-weight: 700; color: var(--ink); }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li { margin: 10px 0; line-height: 1.6; color: var(--ink-70); }
.post-body li::marker { color: var(--pink); }
.post-body a { color: var(--pink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.post-body a:hover { text-decoration-color: var(--pink); }

.post-pullquote {
  font-family: var(--display); font-weight: 800; font-size: clamp(24px,3.2vw,32px);
  letter-spacing: -.03em; line-height: 1.18; color: var(--ink);
  padding: 8px 0 8px 28px; border-left: 4px solid transparent; border-image: var(--grad) 1; margin: 44px 0;
}

/* Comparison table */
.post-cmp { overflow-x: auto; margin: 36px 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.post-cmp table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15.5px; }
.post-cmp th, .post-cmp td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink-70); }
.post-cmp thead th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-50); background: var(--cream-2); }
.post-cmp tbody tr:last-child td { border-bottom: none; }
.post-cmp td:first-child { font-weight: 700; color: var(--ink); }
.post-cmp .col-us { background: rgba(223,32,129,.05); font-weight: 700; color: var(--ink); }
.post-cmp .yes { color: #149e6a; font-weight: 800; }
.post-cmp .no { color: #c0392b; font-weight: 800; }

/* Callout (compliance etc.) */
.post-note { position: relative; margin: 44px 0; background: var(--dark); color: #fff; border-radius: var(--r-md); padding: 30px 32px; overflow: hidden; }
.post-note::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--grad); }
.post-note .eyebrow { color: rgba(255,255,255,.6); }
.post-note p { color: rgba(255,255,255,.82); font-size: 16.5px; margin-top: 14px; }
.post-note strong { color: #fff; }

/* FAQ */
.post-faq { margin: 52px 0 8px; }
.post-faq h2 { margin-bottom: 8px; }
.post-faq details { border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 14px; background: var(--panel); transition: border-color .25s, box-shadow .25s; }
.post-faq details[open] { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.post-faq summary { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; cursor: pointer; list-style: none; padding: 22px 56px 22px 24px; position: relative; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "+"; position: absolute; right: 22px; top: 16px; font-size: 26px; color: var(--pink); transition: transform .3s; }
.post-faq details[open] summary::after { transform: rotate(45deg); }
.post-faq details > p { padding: 0 24px 24px; color: var(--ink-70); font-size: 17px; margin: 0; line-height: 1.6; }

/* Author bio card */
.post-author { margin: 56px 0 8px; background: radial-gradient(120% 170% at 80% 0%, #2a0a2e 0%, #160a18 52%, var(--dark) 100%); color: #fff; border-radius: var(--r-lg); padding: 40px 36px; text-align: center; position: relative; overflow: hidden; }
.post-author::after { content: ""; position: absolute; bottom: -50%; left: 50%; transform: translateX(-50%); width: 400px; height: 400px; border-radius: 50%; background: var(--grad-soft); filter: blur(100px); opacity: .8; }
.post-author__in { position: relative; z-index: 1; max-width: 540px; margin: 0 auto; }
.post-author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; border: 3px solid rgba(255,255,255,.2); }
.post-author__name { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: #fff; }
.post-author__role { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: #FF8FC4; margin-top: 6px; }
.post-body .post-author__bio,
.post-author__bio { color: rgba(255,255,255,.82) !important; font-size: 16px; margin-top: 16px; line-height: 1.6; }

/* Sidebar */
.post-aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 28px; }
.post-aside__label { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-50); margin-bottom: 14px; }
.post-toc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px 22px; background: var(--cream-2); }
.post-toc ol { list-style: none; counter-reset: toc; padding: 0; }
.post-toc li { counter-increment: toc; }
.post-toc a { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 9px 0; color: var(--ink-70); font-size: 14.5px; line-height: 1.35; border-bottom: 1px solid var(--line); }
.post-toc li:last-child a { border-bottom: none; }
.post-toc a::before { content: counter(toc, decimal-leading-zero); font-size: 12px; font-weight: 700; color: var(--pink); padding-top: 1px; }
.post-toc a:hover, .post-toc a.active { color: var(--ink); font-weight: 700; }

.post-relcat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post-relcat a { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1/1; display: flex; align-items: flex-end; padding: 14px; color: #fff; background: var(--ink); }
.post-relcat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .4s cubic-bezier(.22,1,.36,1); }
.post-relcat a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,0) 34%, rgba(10,10,12,.86) 100%); }
.post-relcat a span { position: relative; z-index: 1; font-family: var(--display); font-weight: 800; font-size: 14px; text-transform: uppercase; line-height: 1.1; letter-spacing: -.01em; }
.post-relcat a:hover img { transform: scale(1.06); }

.post-asidecta { background: var(--dark); color: #fff; border-radius: var(--r-md); padding: 26px 24px; }
.post-asidecta h3 { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.post-asidecta p { color: rgba(255,255,255,.66); font-size: 14px; margin: 8px 0 18px; }

/* Bottom CTA band */
.post-cta { background: var(--dark); color: #fff; border-radius: var(--r-lg); padding: 58px 44px; text-align: center; position: relative; overflow: hidden; margin: 16px 0 0; }
.post-cta::after { content: ""; position: absolute; bottom: -45%; left: 50%; transform: translateX(-50%); width: 500px; height: 500px; border-radius: 50%; background: var(--grad-soft); filter: blur(95px); opacity: .85; }
.post-cta__in { position: relative; z-index: 1; max-width: 580px; margin: 0 auto; }
.post-cta h2 { font-family: var(--display); font-weight: 800; color: #fff; font-size: clamp(28px,3.8vw,44px); letter-spacing: -.035em; line-height: 1.02; margin: 16px 0; }
.post-cta p { color: rgba(255,255,255,.72); margin: 0 auto 26px; font-size: 17px; }

/* ---------- Index ---------- */
.hero--insights { padding-bottom: clamp(56px, 8vw, 96px); }
.hero--insights .hero__sub { color: var(--ink-70); }
.post-idxhero { padding: 76px 0 44px; }
.post-idxhero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px,6vw,74px); line-height: .96; letter-spacing: -.04em; margin: 22px 0 18px; max-width: 17ch; }
.post-idxhero p { font-size: 19px; color: var(--ink-70); max-width: 56ch; }
.post-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 40px 0 96px; }
.post-card { background: var(--panel); padding: 34px 30px 28px; display: flex; flex-direction: column; min-height: 252px; transition: background .3s; }
.post-card:hover { background: var(--cream-2); }
.post-card__tier { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-50); }
.post-card__title { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.08; letter-spacing: -.03em; color: var(--ink); margin: 14px 0 12px; }
.post-card__excerpt { color: var(--ink-70); font-size: 16px; flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 500; color: var(--ink-50); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.post-card__meta img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.post-card__meta .spacer { margin-left: auto; }
.post-card__arrow { color: var(--pink); font-weight: 700; }
.post-card--feature { grid-column: 1/-1; background: var(--dark); }
.post-card--feature .post-card__title { font-size: clamp(30px,4.2vw,44px); max-width: 20ch; color: #fff; }
.post-card--feature .post-card__tier { color: #FF8FC4; }
.post-card--feature .post-card__excerpt { color: rgba(255,255,255,.72); max-width: 58ch; }
.post-card--feature:hover { background: #141416; }
.post-card--feature .post-card__meta { border-top-color: rgba(255,255,255,.16); color: rgba(255,255,255,.6); }

/* Reveal */
@keyframes postrise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.post-reveal { animation: postrise .7s cubic-bezier(.22,1,.36,1) both; }
.post-reveal-1 { animation-delay: .05s; } .post-reveal-2 { animation-delay: .12s; } .post-reveal-3 { animation-delay: .19s; }
@media (prefers-reduced-motion: reduce) { .post-reveal { animation: none; } }

/* Responsive */
@media (max-width: 940px) {
  .post-layout { grid-template-columns: 1fr; gap: 8px; padding-top: 40px; }
  .post-aside { position: static; margin-top: 32px; }
  .post-toc { display: none; }
}
@media (max-width: 760px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-card { padding: 26px 22px 22px; min-height: 0; }
  .post-card--feature .post-card__title { font-size: clamp(26px, 8vw, 34px); }
  .post-hero__in { padding-top: 52px; padding-bottom: 44px; }
  .post-lead { font-size: 19px; }
  .post-body h2 { margin-top: 44px; }
  .post-author { padding: 32px 22px; }
  .post-pullquote { font-size: 22px; padding-left: 20px; }
}

/* Comparison table — fit iPhone without the messy horizontal scroll */
@media (max-width: 600px) {
  .post-cmp { overflow-x: visible; border-radius: var(--r-sm); }
  .post-cmp table { min-width: 0; width: 100%; font-size: 13px; table-layout: fixed; }
  .post-cmp th, .post-cmp td { padding: 11px 9px; vertical-align: top; word-break: break-word; }
  .post-cmp thead th { font-size: 10px; letter-spacing: .02em; }
  .post-cmp th:first-child, .post-cmp td:first-child { width: 46%; white-space: normal; }
  .post-cmp th:not(:first-child), .post-cmp td:not(:first-child) { width: 27%; text-align: center; }
  .post-cmp .yes, .post-cmp .no { font-size: 13px; }
}

/* Phone — reduce body text, tighten paddings */
@media (max-width: 540px) {
  .post-body p { font-size: 16px; }
  .post-body li { font-size: 16px; }
  .post-lead { font-size: 17px; }
  .post-note { padding: 22px 20px; }
  .post-note p { font-size: 15.5px; }
  .post-faq summary { font-size: 17px; padding: 18px 48px 18px 18px; }
  .post-faq details > p { padding: 0 18px 18px; font-size: 16px; }
}

/* Very small phones */
@media (max-width: 400px) {
  .post-relcat { grid-template-columns: 1fr 1fr; gap: 8px; }
  .post-cmp table { font-size: 12px; }
  .post-cmp th, .post-cmp td { padding: 9px 7px; }
  .post-hero__in { padding-top: 38px; padding-bottom: 30px; }
  .post-note { padding: 18px 16px; }
}
