/* Mighty Bladder articles: the sales page's look (pink palette, DM Serif / Nunito Sans / Caveat Brush) applied to the library and reading pages. */
:root {
  color-scheme: light;
  --pink: #ec1a78;
  --pink-deep: #d10f66;
  --pink-soft: #fde7f0;
  --pink-wash: #fff4f8;
  --pink-brush: #f9b9d3;
  --ink: #141414;
  --text: #3a3438;
  --muted: #6d6268;
  --line: #f3d3e1;
  --white: #fff;
  --serif: "DM Serif Display", Georgia, serif;
  --script: "Caveat Brush", "Comic Sans MS", cursive;
  --sans: "Nunito Sans", system-ui, -apple-system, sans-serif;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 24px rgba(209, 15, 102, .08);
  --shadow-lg: 0 20px 50px rgba(209, 15, 102, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font: 400 18px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 22px; text-wrap: pretty; }
a { color: var(--pink-deep); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { color: #b80d5a; text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }

/* ---------- Header (matches the sales page nav) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  width: min(1240px, 100% - 48px); margin-inline: auto; height: 74px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { width: 200px; height: auto; }
.site-header nav { display: flex; gap: 32px; }
.site-header nav a {
  font: 700 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 10px 0;
}
.site-header nav a:hover { color: var(--pink); }
.site-header nav a[aria-current="page"] { color: var(--pink-deep); box-shadow: inset 0 -2px 0 var(--pink); }
.skip-link { position: absolute; left: 12px; top: -100px; background: var(--white); padding: 10px 14px; border-radius: 999px; z-index: 60; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
main { max-width: 800px; margin: 0 auto; padding: 56px 24px 80px; }
.index-main { max-width: 1240px; }
.wrap, .container { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5vw, 58px); margin: 12px 0 22px; }
h2 { font-size: 34px; margin: 52px 0 16px; }
h3 { font-size: 25px; margin: 32px 0 10px; }
.eyebrow, .kicker {
  margin: 0; font: 800 13px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--pink-deep);
}
.lede, .dek, .intro { font-size: 21px; line-height: 1.6; color: var(--text); }
.byline { margin: 0 0 4px; font: 800 15px/1.5 var(--sans); color: var(--ink); }
.meta, .article-meta { font-size: 14px; line-height: 1.6; color: var(--muted); }
article > header, .article-header { margin-bottom: 36px; }

/* ---------- Article body ---------- */
figure { margin: 36px 0; }
figure img, .hero-image img, img.hero-image {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 3 / 2; object-fit: cover;
}
figure.hero-image { margin: 36px 0; }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 12px; }
li::marker { color: var(--pink); }
strong { color: var(--ink); font-weight: 800; }
blockquote {
  margin: 32px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--pink);
  font: 400 24px/1.4 var(--serif); color: var(--ink);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 28px 0; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 800; color: var(--ink); background: var(--pink-wash); }

/* Callouts and editorial notes: soft pink panel with a hot pink edge */
.note, .callout, aside, .takeaway {
  margin: 36px 0; padding: 26px 28px;
  background: var(--pink-wash); border: 1px solid var(--line); border-left: 4px solid var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.note h2, .callout h2, aside h2, .takeaway h2 { font-size: 28px; margin: 10px 0 12px; }
.note h2:first-child, .callout h2:first-child, aside h2:first-child, .takeaway h2:first-child { margin-top: 0; }
.note p:last-child, .callout p:last-child, aside p:last-child, .takeaway p:last-child { margin-bottom: 0; }

/* Disclosed promotion: the sales page's offer card */
.promotion, .cta, .promo {
  position: relative; margin: 48px 0; padding: 32px;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.promotion h2, .cta h2, .promo h2 { font-size: 32px; margin: 10px 0 12px; }
.promotion p:last-of-type, .cta p:last-of-type, .promo p:last-of-type { margin-bottom: 24px; }

/* Buttons: hot pink pill, like the order buttons */
.button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
  padding: 14px 28px; border-radius: 999px; background: var(--pink-deep); color: var(--white);
  font: 800 15px/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  box-shadow: 0 8px 20px rgba(236, 26, 120, .32);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover, .btn:hover { color: var(--white); background: #b80d5a; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(236, 26, 120, .38); }

/* Sources */
.sources, .references {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 15px; line-height: 1.6; overflow-wrap: anywhere;
}
.sources h2, .references h2 { font-size: 26px; margin-top: 0; }

/* ---------- Library page ---------- */
.index-main > .eyebrow { text-align: center; }
.index-main > h1 { text-align: center; max-width: 16em; margin-inline: auto; }
.index-main > .lede { text-align: center; max-width: 40em; margin: 0 auto 8px; }

.article-search { max-width: 540px; margin: 32px auto 8px; text-align: center; }
.article-search label { display: block; margin-bottom: 10px; font: 400 26px/1 var(--script); color: var(--pink-deep); }
.article-search input {
  width: 100%; min-height: 52px; padding: 12px 22px;
  font: 600 17px/1.2 var(--sans); color: var(--ink);
  background: var(--white); border: 2px solid var(--pink-brush); border-radius: 999px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.article-search input::placeholder { color: #a8969f; }
.article-search input:focus { border-color: var(--pink); box-shadow: 0 0 0 5px rgba(236, 26, 120, .12); outline: none; }
.article-search .meta { margin: 10px 0 0; }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 40px 0 56px; }
.article-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(209, 15, 102, .14); }
.card-media { display: block; background: var(--pink-soft); }
.card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-copy { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
.card-copy h2 { font-size: 26px; margin: 8px 0 12px; }
.card-copy h2 a { color: var(--ink); text-decoration: none; }
.card-copy h2 a:hover { color: var(--pink-deep); }
.card-copy p:not(.eyebrow) { font-size: 16px; line-height: 1.6; }
.card-copy > a:last-child { margin-top: auto; font-weight: 800; font-size: 15px; text-decoration: none; }
.card-copy > a:last-child:hover { text-decoration: underline; }
.index-main > aside, .index-main > .promotion { max-width: 800px; margin-inline: auto; }
.index-main > .meta { max-width: 800px; margin: 32px auto 0; text-align: center; }

/* ---------- Footer (matches the sales page footer) ---------- */
.site-footer, footer {
  padding: 40px 24px 48px; text-align: center; font-size: 14px; color: var(--muted);
  background: var(--pink-wash); border-top: 1px solid var(--line);
}
.site-footer img { width: 170px; margin: 0 auto 14px; }
.site-footer p { margin: 0 0 8px; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 24px; }
.site-footer nav a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 10px 0; }
.site-footer nav a:hover { color: var(--pink-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .site-header__inner { width: calc(100% - 32px); height: 64px; }
  .brand img { width: 160px; }
  .site-header nav { gap: 20px; }
  .site-header nav a { padding: 14px 0; }
  main { padding: 36px 16px 56px; }
  h2 { font-size: 29px; }
  .lede, .dek, .intro { font-size: 19px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .note, .callout, aside, .takeaway { padding: 22px 20px; }
  .promotion, .cta, .promo { padding: 24px 20px; }
  .button, .btn { width: 100%; white-space: normal; text-align: center; }
  .card-copy > a:last-child, .site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 360px) {
  .brand img { width: 136px; }
  .site-header nav { gap: 14px; }
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .article-card, .button, .btn { transition: none; }
  .article-card:hover, .button:hover, .btn:hover { transform: none; }
}

/* Promotion cards show the full bundle of e-covers, as on the sales page */
.promotion__bundle {
  width: calc(100% + 32px); max-width: none; margin: -12px -16px 20px;
  aspect-ratio: 3 / 2; object-fit: contain; border-radius: var(--radius);
}
@media (max-width: 760px) {
  .promotion__bundle { width: calc(100% + 16px); margin: -8px -8px 16px; }
}

/* Reading aids: concise answers, section links and topic-specific next steps. */
.article-answer {
  margin: 26px 0 22px; padding: 22px 24px;
  background: var(--pink-wash); border-left: 4px solid var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-answer h2 { margin: 0 0 10px; font: 800 16px/1.4 var(--sans); }
.article-answer p { margin: 0; font-size: 18px; line-height: 1.65; }
.article-toc {
  margin: 28px 0 36px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.article-toc h2 { margin: 0 0 12px; font: 800 17px/1.4 var(--sans); }
.article-toc ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.article-toc li { margin: 0; }
.article-toc a { display: flex; align-items: center; min-height: 44px; padding: 8px 0; font-size: 16px; line-height: 1.45; }
main article h2[id], main article h3[id] { scroll-margin-top: 100px; }
.evidence-summary { padding: 24px; margin: 24px 0 30px; }
.evidence-summary h3 { margin: 0 0 16px; font: 800 18px/1.4 var(--sans); }
.evidence-summary dl { margin: 0; font-size: 16px; line-height: 1.55; }
.evidence-summary dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.evidence-summary dt { font-weight: 800; color: var(--ink); }
.evidence-summary dd { margin: 0; }
.evidence-summary .evidence-source { margin: 18px 0 0; font-size: 14px; line-height: 1.6; }
.appointment-questions { margin-top: 44px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.appointment-questions h2 { margin: 0 0 14px; font-size: 28px; }
.appointment-questions p { margin-bottom: 14px; font-size: 16px; }
.appointment-questions ul { margin-bottom: 0; }
.appointment-questions li:last-child { margin-bottom: 0; }
.related-reading { margin: 36px 0; }
.related-reading h2 { margin: 0 0 16px; font-size: 28px; }
.related-reading ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; list-style: none; padding: 0; margin: 0; }
.related-reading li { margin: 0; display: flex; }
.related-reading a { display: flex; align-items: center; width: 100%; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 800; font-size: 17px; line-height: 1.5; background: var(--pink-wash); }
@media (max-width: 760px) {
  .article-answer, .article-toc, .appointment-questions { padding: 20px; }
  .article-answer p { font-size: 17px; }
  .article-toc ul, .related-reading ul { grid-template-columns: minmax(0, 1fr); }
  .related-reading li + li { margin-top: 12px; }
  .evidence-summary { padding: 20px; }
  .evidence-summary dl > div { display: block; }
  .evidence-summary dt { margin-bottom: 5px; }
  main article h2[id], main article h3[id] { scroll-margin-top: 84px; }
}

/* Inline terms remain readable without hover, taps or JavaScript. */
.defined-term { font-style: normal; font-weight: 800; color: var(--ink); }
.term-definition { color: var(--text); }
.reading-time, .card-copy .card-reading-time {
  font-size: 14px; line-height: 1.5; font-weight: 700; color: var(--muted);
}
.reading-time { margin: -12px 0 0; }
.card-copy .card-reading-time { margin: 0 0 14px; }
.reading-progress {
  position: fixed; inset: 0 0 auto; z-index: 100; height: 4px;
  background: var(--pink-soft); pointer-events: none;
}
.reading-progress span {
  display: block; height: 100%; width: 100%; background: var(--pink-deep);
  transform: scaleX(0); transform-origin: left center;
}
.topic-filters {
  border: 0; padding: 0; margin: 28px auto 0; max-width: 1040px; min-width: 0;
}
.topic-filters legend { width: 100%; text-align: center; font: 800 16px/1.5 var(--sans); margin-bottom: 14px; }
.topic-filters > div { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 10px; row-gap: 10px; }
.topic-filters button {
  min-height: 44px; max-width: 100%; padding: 10px 17px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); color: var(--ink);
  font: 700 15px/1.4 var(--sans); cursor: pointer;
}
.topic-filters button:hover { border-color: var(--pink-deep); }
.topic-filters button[aria-pressed="true"] { color: var(--white); background: var(--pink-deep); border-color: var(--pink-deep); }
#clear-article-filters {
  border: 0; padding: 10px 4px; min-height: 44px; background: transparent;
  color: var(--pink-deep); text-decoration: underline; text-underline-offset: 4px;
  font: 700 15px/1.4 var(--sans); cursor: pointer;
}
@media (max-width: 760px) {
  .topic-filters { margin-top: 24px; }
  .topic-filters > div { column-gap: 8px; row-gap: 8px; }
  .topic-filters button { padding: 10px 13px; font-size: 14px; }
}
@media print {
  .reading-progress { display: none !important; }
}

/* phone readability pass: no reading text under 15px, thumb-sized controls */
@media (max-width:760px){
  body nav a, body header p.meta, body header p.reading-time, body figure figcaption, body .evidence-source, body .evidence-source a, body .site-footer p, body .site-footer a{font-size:16px !important}
  body p.eyebrow{font-size:15px !important}
  body p.meta{font-size:16px !important}
  body nav a{display:inline-flex;align-items:center;min-height:44px}
  body button{font-size:16px !important;min-height:44px}
}
