/* AppsHealthy Articles: loads after /styles.css and reuses its tokens. */
:root {
  --c-menopause: #7C5CBF;
  --c-pcos: #4F46E5;
  --c-contraception: #0B8079;
  --amber: #B45309;
}

/* ── Nav: current page + mobile menu ── */
.nav-links a[aria-current="page"] { color: var(--ink); position: relative; }
.nav-links a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { margin: auto; }
@media (max-width: 940px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links.art-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 24px 18px; }
  .nav-links.art-nav.open { display: flex; }
  .nav-links.art-nav a:not(.btn-pill) { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav-links.art-nav a[aria-current="page"]::after { display: none; }
  .nav-links.art-nav .btn-pill { margin-top: 14px; text-align: center; justify-content: center; }
}

/* ── Draft banner ── */
.draft-banner { background: #FEF3C7; color: #78350F; border-bottom: 1px solid #FCD34D; font-size: 14px; font-weight: 600; text-align: center; padding: 9px 16px; }

/* ── Reading progress ── */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 60; }

/* ── Shared bits ── */
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--c-contraception); position: relative; z-index: 2; }
.tag.menopause { background: var(--c-menopause); }
.tag.pcos { background: var(--c-pcos); }
.tag.contraception { background: var(--c-contraception); }
.crumbs { font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.crumbs span[aria-hidden] { opacity: .6; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card .thumb { aspect-ratio: 16 / 9; height: auto; background: var(--grad-soft); display: block; width: 100%; object-fit: cover; }
.thumb-ph { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, rgba(16,185,129,.16), rgba(37,99,235,.16)); }
.thumb-ph.menopause { background: linear-gradient(135deg, rgba(124,92,191,.20), rgba(37,99,235,.12)); }
.thumb-ph.pcos { background: linear-gradient(135deg, rgba(79,70,229,.20), rgba(14,165,164,.12)); }
.article-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card h3 { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.article-card h3 a:focus-visible { outline: none; }
.article-card:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.article-card p { color: var(--ink-soft); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .meta { margin-top: auto; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.article-card.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.5fr 1fr; }
.article-card.lead .thumb, .article-card.lead .thumb-ph { aspect-ratio: auto; height: 100%; min-height: 300px; }
.article-card.lead h3 { font-size: clamp(22px, 2.6vw, 30px); -webkit-line-clamp: 4; }
.article-card.lead .body { padding: 30px; justify-content: center; }
.article-card.lead p { -webkit-line-clamp: 4; font-size: 16px; }

/* ── Hub page ── */
.hub-hero { padding: 64px 0 28px; text-align: center; }
.hub-hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; margin-top: 16px; }
.hub-hero .lede { margin: 18px auto 0; max-width: 46ch; }
.hub-tools { max-width: 720px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hub-search { width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 16px; background: var(--surface); }
.hub-search:focus { outline: 3px solid rgba(37,99,235,.25); border-color: var(--blue); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip-row a, .chip-row button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip-row [aria-pressed="true"], .chip-row a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.hub-section { padding: 36px 0; }
.hub-section h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 20px; }
.hub-section .row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.hub-section .row-head a { font-weight: 700; color: var(--blue); }
.topic-row { margin-bottom: 40px; }
.topic-row p.desc { color: var(--ink-soft); margin-bottom: 18px; max-width: 70ch; }
.no-results { display: none; text-align: center; color: var(--ink-soft); padding: 30px 0; }
.topic-intro { max-width: 760px; margin: 18px auto 0; color: var(--ink-soft); font-size: 17px; text-align: left; }
.topic-intro p + p { margin-top: 12px; }

.promo-band { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.promo { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.promo::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; }
.promo.shebalance::before { background: linear-gradient(90deg, #7C5CBF, #4FD1C5); }
.promo.cerca::before { background: linear-gradient(90deg, #3E7B57, #0EA5A4); }
.promo h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.promo p { color: var(--ink-soft); margin-bottom: 18px; }
.promo .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-primary.cerca-cta { background: linear-gradient(135deg, #3E7B57, #0B8079); box-shadow: 0 12px 30px -10px rgba(11,128,121,.6); }
.trust-strip { text-align: center; padding: 26px; border-radius: var(--radius); background: var(--grad-soft); font-weight: 600; color: var(--ink); }
.trust-strip a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

/* ── Article page ── */
.art-wrap { display: grid; grid-template-columns: minmax(0, 720px) 280px; gap: 56px; justify-content: center; padding: 36px 24px 40px; max-width: var(--maxw); margin: 0 auto; }
.art-head h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; margin: 14px 0 12px; }
.art-head .dek { font-size: 19px; color: var(--ink-soft); }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink-soft); margin: 18px 0 24px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline b { color: var(--ink); font-weight: 600; }
.byline .pending { color: var(--amber); }
.hero-fig { margin: 0 0 28px; }
.hero-fig img, .hero-fig .img-ph { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); object-fit: cover; }

.prose { font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 700; margin-top: 2em; scroll-margin-top: 90px; }
.prose h3 { font-size: 22px; font-weight: 600; margin-top: 1.6em; scroll-margin-top: 90px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a.pending-link { color: inherit; text-decoration: underline dotted var(--ink-soft); cursor: help; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose strong { font-weight: 700; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg); font-weight: 700; }
.prose tr:nth-child(even) td { background: #FAFCFE; }
.prose td:first-child, .prose th:first-child { position: sticky; left: 0; background: inherit; font-weight: 600; }
.prose tbody tr td:first-child { background: var(--surface); }
.prose tbody tr:nth-child(even) td:first-child { background: #FAFCFE; }

.admonition { border-radius: var(--radius-sm); padding: 20px 22px; font-size: 16.5px; }
.admonition > * + * { margin-top: .7em; }
.admonition-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; }
.admonition.takeaways { background: var(--grad-soft); }
.admonition.takeaways ul { list-style: none; padding-left: 0; }
.admonition.takeaways li { position: relative; padding-left: 30px; }
.admonition.takeaways li::before { content: ''; position: absolute; left: 0; top: 5px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--emerald) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.admonition.tryit { border: 1px solid var(--line); border-left: 5px solid #0B8079; background: var(--surface); box-shadow: var(--shadow-sm); }
.admonition.tryit.shebalance { border-left-color: #7C5CBF; }
.admonition.tryit a { display: inline-block; margin-top: 4px; font-weight: 700; }
.admonition.warning { border-left: 5px solid #D97706; background: #FFFBEB; }
.admonition.warning .admonition-title { color: #92400E; }
.admonition.disclaimer { border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); font-size: 14.5px; }

.article-figure { margin: 1.8em 0; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius-sm); }
.article-figure figcaption { font-size: 14.5px; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }
.article-figure .credit { display: block; font-size: 13px; opacity: .85; margin-top: 2px; }
.article-figure.app-shot img { max-width: 300px; margin: 0 auto; display: block; border: 6px solid #141A22; border-radius: 28px; }
.article-figure.app-shot figcaption { text-align: center; }
.img-ph { display: grid; place-content: center; gap: 6px; text-align: center; padding: 22px; border: 2px dashed #CBD5E1; border-radius: var(--radius-sm);
  background: repeating-linear-gradient(45deg, #F8FAFC, #F8FAFC 12px, #F1F5F9 12px, #F1F5F9 24px); color: var(--ink-soft); font-size: 14px; aspect-ratio: 3 / 2; }
.img-ph b { color: var(--ink); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.img-ph small { font-size: 12.5px; max-width: 52ch; margin: 0 auto; }

.prose details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; background: var(--surface); }
.prose details + details { margin-top: 10px; }
.prose summary { cursor: pointer; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 18px; padding: 16px 0; list-style: none; position: relative; padding-right: 30px; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 22px; color: var(--ink-soft); }
.prose details[open] summary::after { content: '−'; }
.prose details p { padding-bottom: 16px; margin: 0; }
.prose .refs ol, .prose h2#references + ol { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); word-break: break-word; }

.art-side { position: relative; }
.side-sticky { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--surface); }
.toc h2, .toc summary { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.toc ol { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 2px; max-height: 52vh; overflow: auto; }
.toc a { display: block; font-size: 14px; color: var(--ink-soft); padding: 5px 8px; border-left: 2px solid transparent; line-height: 1.35; }
.toc a.active { color: var(--ink); border-left-color: var(--blue); background: var(--grad-soft); font-weight: 600; }
.toc-mobile { display: none; margin-bottom: 24px; }
.side-cta { border-radius: var(--radius-sm); padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.side-cta h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.side-cta p { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 14px; }
.side-cta .btn { width: 100%; }
.side-cta.shebalance { border-top: 4px solid #7C5CBF; }
.side-cta.cerca { border-top: 4px solid #0B8079; }

.people { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.person { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--surface); font-size: 15px; color: var(--ink-soft); }
.person b { display: block; color: var(--ink); font-size: 16px; margin: 2px 0 6px; }
.person .role { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.person a { color: var(--blue); text-decoration: underline; }
.end-cta { margin-top: 28px; }
.related { padding: 20px 0 60px; }
.related h2 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }

/* ── Editorial policy ── */
.policy { max-width: 760px; margin: 0 auto; padding: 40px 24px 70px; }
.policy h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; margin: 14px 0 18px; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .art-wrap { grid-template-columns: minmax(0, 720px); gap: 0; }
  .art-side { display: none; }
  .toc-mobile { display: block; }
  .toc-mobile ol { max-height: none; }
  .side-cta.mobile { display: block; margin: 26px 0; }
}
@media (min-width: 1024px) { .side-cta.mobile { display: none; } }
@media (max-width: 940px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card.lead { grid-template-columns: 1fr; }
  .article-card.lead .thumb, .article-card.lead .thumb-ph { aspect-ratio: 16 / 9; min-height: 0; }
  .promo-band { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }
  .art-wrap { padding: 24px 16px 30px; }
  .article-card.lead .body { padding: 20px; }
  .hub-hero { padding: 44px 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .article-card, .read-progress { transition: none; }
}
.featured-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .featured-grid { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }
