/* Sleep Library pages: on top of uss.css (same tokens), plus a reading column. */

.lib { --read: 44rem; }

/* Reading pages: a static night sky instead of the homepage's animated
   scene, and every block visible on first paint (no scroll reveals). */
body.lib {
  background:
    radial-gradient(70% 50% at 15% 0%, rgba(60, 111, 212, 0.20), transparent 70%),
    radial-gradient(60% 40% at 90% 8%, rgba(122, 92, 196, 0.14), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.lib .reveal, .lib .reveal-up { opacity: 1; translate: none; transition: none; }

.lib-article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(3rem, 10vh, 7rem)) var(--gutter) 0;
}

.lib-article > * { max-width: var(--read); margin-inline: auto; }
.lib-article > .lib-facts,
.lib-article > .lib-related,
.lib-article > .lib-steps { max-width: none; }

/* ---------- Hero -------------------------------------------------------- */
.lib-hero { padding-bottom: clamp(2rem, 6vh, 3.5rem); }

.lib-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--fg-faint);
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}
.lib-crumbs a { text-decoration: none; color: var(--fg-muted); }
.lib-crumbs a:hover { color: #fff; }

.lib-hero .eyebrow { margin-bottom: 1rem; }
.lib-hero h1 { max-width: 18ch; }

.lib-sub {
  margin-top: 1.25rem;
  max-width: 40rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--fg-muted);
}

.lib-byline {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--fg-faint);
}

/* ---------- Reading column --------------------------------------------- */
.lib-prose {
  color: var(--fg-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
  padding-bottom: clamp(2rem, 6vh, 3rem);
}

.lib-prose > * + * { margin-top: 1rem; }
.lib-prose > p:first-child::first-letter,
.lib-prose > h2:first-child + p::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 0;
  font-size: 3.1em;
  line-height: 0.85;
  font-weight: 300;
  color: var(--sky-bright);
}

.lib-prose h2 {
  margin-top: clamp(2.5rem, 7vh, 3.75rem);
  padding: 0.7rem 1rem 0.7rem 1.1rem;
  border-left: 3px solid var(--sky);
  border-radius: 0 0.875rem 0.875rem 0;
  background: linear-gradient(90deg, rgba(134, 199, 226, 0.13), rgba(134, 199, 226, 0) 80%);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  color: var(--fg);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lib-prose h3 {
  margin-top: 1.75rem;
  color: var(--fg);
  font-size: 1.1875rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.lib-prose h2 + *, .lib-prose h3 + * { margin-top: 1rem; }

.lib-prose strong { color: var(--fg); font-weight: 500; }

.lib-prose a {
  color: var(--sky-bright);
  text-decoration: underline;
  text-decoration-color: rgba(168, 220, 242, 0.4);
  text-underline-offset: 0.18em;
}
.lib-prose a:hover { text-decoration-color: currentColor; }

.lib-prose ul, .lib-prose ol { padding-left: 0; display: grid; gap: 0.5rem; }
.lib-prose ul { list-style: none; }
.lib-prose ul > li {
  position: relative;
  padding: 0.55rem 1rem 0.55rem 2.25rem;
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.045);
  line-height: 1.5;
}
.lib-prose ul > li::before {
  content: "\2726";
  position: absolute;
  left: 0.85rem;
  top: 0.55rem;
  color: var(--sky);
  font-size: 0.875em;
}
.lib-prose ol { padding-left: 1.25rem; }
.lib-prose ol > li::marker { color: var(--sky); font-variant-numeric: tabular-nums; }

.lib-prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--sky);
  background: rgba(134, 199, 226, 0.06);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--fg);
}
.lib-prose blockquote p { margin: 0; }

/* ---------- Key facts (five articles carry them) ----------------------- */
.lib-facts { padding-bottom: clamp(2rem, 6vh, 3.5rem); }
.lib-facts .stat-band { margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }

.lib-facts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
@media (max-width: 55rem) { .lib-facts-grid { grid-template-columns: 1fr; } }

.lib-small-head {
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.lib-points { display: grid; gap: 0.5rem; }
.lib-points li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.lib-points li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.6em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--sky);
}

.lib-alert {
  padding: 1.25rem 1.375rem;
  border: 1px solid rgba(250, 237, 196, 0.28);
  border-radius: 0.75rem;
  background: rgba(250, 237, 196, 0.05);
}
.lib-alert .lib-points li::before { background: var(--moon); }

/* ---------- Steps ------------------------------------------------------- */
.lib-steps ol {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
}
@media (max-width: 62rem) { .lib-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .lib-steps ol { grid-template-columns: 1fr; } }

.lib-steps i {
  display: block;
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--sky);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
}
.lib-steps h3 { font-size: 1rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.lib-steps p { color: var(--fg-muted); font-size: 0.875rem; line-height: 1.4; }
.lib-steps + .pull { padding-block: clamp(2.5rem, 7vh, 4.5rem) clamp(1rem, 3vh, 2rem); }

/* ---------- FAQ, disclaimer, CTA --------------------------------------- */
.lib-faq { padding-bottom: clamp(2rem, 5vh, 3rem); }
.lib-faq .list-head h2, .lib-related .list-head h2 {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.lib-note { margin-top: .6rem; font-size: .875rem; color: var(--fg-muted); }
.lib-note a { color: var(--sky-bright); }
.lib-disclaimer { margin-block: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--fg-muted); font-size: .8125rem; line-height: 1.5; }
.lib-disclaimer ul { padding-left: 1rem; columns: 2 20rem; column-gap: 2rem; }
.lib-disclaimer li { break-inside: avoid; margin-bottom: .3rem; }

.lib-cta {
  margin-block: clamp(1rem, 3vh, 2rem) clamp(2rem, 6vh, 4rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(134, 199, 226, 0.14), transparent 60%),
    rgba(8, 18, 40, 0.6);
  max-width: var(--read);
}

.lib-cta-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.lib-cta-note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--moon);
}

.lib-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.lib-btn {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1.125rem;
  border-radius: 999px;
  background: #fff;
  color: var(--navy-900);
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: background 0.2s var(--ease-standard), scale 0.2s var(--ease-out-cubic);
}
.lib-btn:hover { background: var(--sky-bright); scale: 1.03; }
.btn-pill {
  width: auto;
  height: 2.5rem;
  margin-top: 0;
  padding: 0 1.125rem;
  border-radius: 999px;
}

/* ---------- Link grids (related, hub groups) --------------------------- */
.lib-link { display: block; text-decoration: none; }
.lib-link h3 { transition: color 0.2s var(--ease-standard); }
.lib-link:hover h3 { color: var(--sky-bright); }
.lib-related .list-grid { padding-bottom: clamp(2rem, 6vh, 4rem); }

/* ---------- Hub --------------------------------------------------------- */
.lib-intro { min-height: 82svh; }
.lib-intro .lib-sub { max-width: 34rem; }
.lib-jump { margin-top: 2rem; justify-content: flex-start; }

.lib-section { padding-top: clamp(3rem, 10vh, 6rem); }
.lib-section .cards { padding-bottom: clamp(1rem, 3vh, 2rem); }
.lib-card { text-decoration: none; display: block; }
.lib-card:hover .card-title { color: var(--sky-bright); }

.lib-group .list-head { padding-top: clamp(1.25rem, 4vh, 2.25rem); }
.lib-group .list-head .eyebrow { font-variant-numeric: tabular-nums; }
.lib-group .list-grid { padding-bottom: clamp(0.5rem, 2vh, 1rem); }

.wrap > .lib-cta { margin-top: clamp(3rem, 8vh, 5rem); }

/* Homepage chapter: every library page, grouped, flowing in columns */
.lib-flow { padding-bottom: clamp(1.5rem, 5vh, 3rem); }
.lib-flow > .reveal:not(.list-head) { columns: 3 16rem; column-gap: clamp(1.5rem, 4vw, 3rem); }
.lib-block { break-inside: avoid; padding-bottom: 1.75rem; }
.lib-block h4 {
  display: grid;
  gap: 0.2rem;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.25rem;
}
.lib-block h4 span { font-size: 0.75rem; letter-spacing: 0.02em; color: var(--fg-faint); }
.lib-block li a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-standard);
}
.lib-block li a:hover { color: #fff; }
.lib-block li a::after { content: "→"; color: var(--fg-faint); }

/* ---------- References (research summaries) ---------------------------- */
.lib-prose sup { line-height: 0; font-size: 0.72em; }
.lib-prose sup a { text-decoration: none; padding: 0 0.1em; }
.lib-refs { padding-bottom: clamp(2rem, 6vh, 3rem); }
.lib-refs h2 { font-size: 1.25rem; font-weight: 400; letter-spacing: -0.03em; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
.lib-refs ol { margin: 0; padding-left: 1.5rem; display: grid; gap: 0.875rem; padding-top: 1rem; }
.lib-refs li { color: var(--fg-muted); font-size: 0.875rem; line-height: 1.5; }
.lib-refs li::marker { color: var(--sky); font-variant-numeric: tabular-nums; }
.lib-refs li:target { background: rgba(134, 199, 226, 0.08); border-radius: 0.375rem; outline: 1px solid rgba(134, 199, 226, 0.3); outline-offset: 4px; }
.lib-ref-t { color: var(--fg); }
.lib-refs a { color: var(--sky-bright); text-decoration: none; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lib-refs a:hover { text-decoration: underline; }
.lib-refs em { color: var(--moon); font-style: normal; }

/* ---------- In this article (contents card) ----------------------------- */
.lib-toc {
  margin-bottom: clamp(1.5rem, 4vh, 2.25rem);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: rgba(8, 18, 40, 0.72);
}
.lib-toc-title { display: flex; align-items: center; gap: 0.5rem; color: var(--fg); font-size: 1rem; margin-bottom: 0.75rem; }
.lib-toc-icon, .lib-head-icon, .ig-icon, .lib-ext, .video-play-icon {
  width: 1.25rem; height: 1.25rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.lib-toc-icon, .lib-head-icon { color: var(--sky); }
.lib-toc ol { margin: 0; padding-left: 1.4rem; columns: 2 15rem; column-gap: 2rem; }
.lib-toc li { break-inside: avoid; padding: 0.2rem 0; color: var(--fg-faint); font-size: 0.9375rem; }
.lib-toc li::marker { color: var(--sky); font-variant-numeric: tabular-nums; }
.lib-toc a { color: var(--fg-muted); text-decoration: none; }
.lib-toc a:hover { color: var(--sky-bright); text-decoration: underline; }
.lib-faq h2, .lib-reading h2 { scroll-margin-top: calc(var(--nav-h) + 1rem); }

/* ---------- Infographics (tools/infographics.mjs; NeoBoard templates) -- */
.ig {
  margin-block: clamp(1.25rem, 4vh, 2rem);
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: rgba(8, 18, 40, 0.72);
  font-size: 0.9375rem;
}
.ig-kicker { color: var(--sky); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.35rem; }
.ig-title { color: var(--fg); font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1.1rem; text-wrap: balance; }
.ig h3 { color: var(--fg); font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.ig p { color: var(--fg-muted); line-height: 1.45; }
.ig .ig-icon { color: var(--sky); }
.ig-pill { display: inline-block; margin-top: 0.5rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--sky); color: var(--navy-900); font-size: 0.8125rem; font-weight: 500; }
.ig .is-key { background: rgba(134, 199, 226, 0.12); outline: 2px solid var(--sky); outline-offset: -2px; }

/* F: key numbers */
.ig-numbers { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.625rem; }
.ig-numbers li { padding: 0.9rem 1rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.045); }
.ig-numbers b { display: block; color: var(--fg); font-size: clamp(1.9rem, 4.5vw, 2.5rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ig-numbers small { font-size: 0.45em; letter-spacing: 0; margin-left: 0.2em; color: var(--fg-muted); }
.ig-numbers span { display: block; margin-top: 0.4rem; color: var(--fg-muted); line-height: 1.3; }
.ig-sub { color: var(--fg); margin-bottom: 0.5rem; }
.ig-bars { margin-bottom: 1.25rem; }
.ig-bars ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.ig-bars li { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr auto; align-items: center; gap: 0.75rem; }
.ig-bar { height: 0.625rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ig-bar i { display: block; height: 100%; border-radius: inherit; background: var(--sky); }
.ig-bar-label { color: var(--fg-muted); }
.ig-bar-val { color: var(--fg); font-variant-numeric: tabular-nums; }
.ig-bar-val em { color: var(--fg-faint); font-style: normal; }
@media (max-width: 34rem) { .ig-bars li { grid-template-columns: 1fr auto; } .ig-bar { grid-column: 1 / -1; grid-row: 2; } }

/* A: key points + see-a-doctor box */
.ig-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.5rem; }
.ig-points li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.9rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.045); color: var(--fg-muted); line-height: 1.4; }
.ig-points .ig-icon { margin-top: 0.05rem; }
.ig-alert { margin-top: 1rem; padding: 0.9rem 1.1rem; border-left: 3px solid var(--moon); border-radius: 0 0.75rem 0.75rem 0; background: rgba(250, 237, 196, 0.07); }
.ig-alert-title { display: flex; gap: 0.5rem; align-items: center; color: var(--moon); margin-bottom: 0.4rem; }
.ig-alert .ig-icon { color: var(--moon); }
.ig-alert ul { margin: 0; padding-left: 1.75rem; display: grid; gap: 0.25rem; color: var(--fg-muted); }
.ig-alert li::marker { color: var(--moon); }

/* B: numbered steps */
.ig-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.ig-steps li { display: grid; grid-template-columns: 2rem 1.5rem 1fr; gap: 0.75rem; align-items: start; padding: 0.8rem 1rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.045); }
.ig-steps li:not(:has(.ig-icon)) { grid-template-columns: 2rem 1fr; }
.ig-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--sky); color: var(--sky); font-variant-numeric: tabular-nums; }
.ig-steps .ig-icon { margin-top: 0.3rem; }
.ig-steps p { margin-top: 0.2rem; }

/* C: head to head and plain comparison tables */
.ig-table-wrap { overflow-x: auto; }
.ig-table-wrap:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 0.5rem; }
.ig-vs, .ig-table { width: 100%; border-collapse: separate; border-spacing: 0.375rem; margin: -0.375rem; width: calc(100% + 0.75rem); }
.ig-vs th, .ig-vs td, .ig-table th, .ig-table td { padding: 0.65rem 0.8rem; border-radius: 0.5rem; text-align: left; vertical-align: top; line-height: 1.4; }
.ig-vs thead th, .ig-table thead th { color: var(--fg); font-weight: 500; font-size: 1.0625rem; }
.ig-vs tbody th, .ig-table tbody th { color: var(--fg); font-weight: 400; width: 26%; }
.ig-vs td, .ig-table td { color: var(--fg-muted); }
.ig-table td { background: rgba(255, 255, 255, 0.045); }
.ig-vs thead th:nth-child(2), .ig-vs td:nth-child(2) { background: rgba(134, 199, 226, 0.10); }
.ig-vs thead th:nth-child(3), .ig-vs td:nth-child(3) { background: rgba(250, 237, 196, 0.08); }
.ig-vs thead th:nth-child(3) { position: relative; }
.ig-vs thead th:nth-child(3)::before {
  content: "VS"; position: absolute; left: -1.05rem; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--navy-900); border: 1px solid var(--rule); color: var(--fg); font-size: 0.6875rem; letter-spacing: 0.04em; z-index: 1;
}
.ig tr.is-key { outline: none; background: none; }
.ig tr.is-key th, .ig tr.is-key td { color: var(--fg); font-weight: 500; box-shadow: inset 0 0 0 2px var(--sky); }
.ig tr.is-key .ig-pill { display: table; }
.ig-caption { margin-top: 0.75rem; color: var(--fg-faint); }
@media (max-width: 34rem) {
  .ig-vs thead td { display: none; }
  .ig-vs thead tr, .ig-vs tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; margin-bottom: 0.375rem; }
  .ig-vs, .ig-vs thead, .ig-vs tbody { display: block; margin: 0; width: 100%; }
  .ig-vs tbody th { grid-column: 1 / -1; width: auto; padding: 0.4rem 0.2rem 0; color: var(--sky); }
  .ig .ig-vs tr.is-key th { box-shadow: none; color: var(--sky); }
  .ig-vs tr.is-key .ig-pill { display: inline-block; margin: 0 0 0 0.5rem; }
}

/* D: decision flow */
.ig-flow { display: grid; justify-items: center; max-width: 30rem; margin-inline: auto; }
.ig-node { width: 100%; padding: 0.75rem 1rem; border-radius: 0.75rem; border: 1px solid var(--rule); background: rgba(255, 255, 255, 0.045); text-align: center; }
.ig-node p { color: var(--fg); }
.ig-start { border-radius: 999px; }
.ig-ask { border-color: var(--sky); background: rgba(134, 199, 226, 0.10); }
.ig-ask .ig-q { display: none; }
.ig-do { }
.ig-end { background: var(--sky); border-color: var(--sky); }
.ig-end p { color: var(--navy-900); font-weight: 500; }
.ig-warn { border-color: var(--moon); background: rgba(250, 237, 196, 0.08); }
.ig-warn p { color: var(--moon); }
.ig-no { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px dashed var(--rule); }
.ig-node .ig-no { color: var(--fg-muted); font-size: 0.875rem; }
.ig-no b { color: var(--moon); font-weight: 500; margin-right: 0.4rem; }
.ig-link { position: relative; width: 2px; height: 1.6rem; background: var(--sky); opacity: 0.8; }
.ig-link::after { content: ""; position: absolute; left: 50%; bottom: -1px; translate: -50% 0; border: 5px solid transparent; border-top-color: var(--sky); border-bottom: 0; }
.ig-link span { position: absolute; left: 0.6rem; top: 50%; translate: 0 -50%; color: var(--sky); font-size: 0.8125rem; }

/* E: cause and effect chain */
.ig-chain { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1.5rem; }
.ig-chain li { position: relative; padding: 0.9rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.045); }
.ig-chain li + li::before { content: "\2192"; position: absolute; left: -1.25rem; top: 1.1rem; color: var(--sky); }
.ig-chain .ig-icon { width: 1.75rem; height: 1.75rem; margin-bottom: 0.5rem; }
.ig-chain p { margin-top: 0.25rem; }
@media (max-width: 48rem) {
  .ig-chain { grid-template-columns: 1fr; gap: 1.25rem; }
  .ig-chain li + li::before { content: "\2193"; left: 1.2rem; top: -1.2rem; }
}

/* Treatment option cards */
.ig-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.625rem; }
.ig-option { padding: 1rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.045); }
.ig-option header { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; }
.ig-option p + p { margin-top: 0.45rem; }
.ig-option b { display: block; color: var(--fg-faint); font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Section heads with an icon (videos, sources) ---------------- */
.lib-head { display: flex; align-items: center; gap: 0.6rem; color: var(--fg); font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 400; letter-spacing: -0.03em; margin-bottom: 0.9rem; }

/* ---------- Videos: poster link, real <video> only after a click -------- */
.lib-videos { margin-block: clamp(1.5rem, 4vh, 2.5rem); }
.lib-video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.video-play { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 0.75rem; overflow: hidden; background: var(--navy-800); }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale 0.3s var(--ease-standard); }
.video-play:hover img { scale: 1.03; }
.video-play-btn { position: absolute; inset: 0; margin: auto; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(5, 7, 15, 0.7); border: 1px solid rgba(255, 255, 255, 0.5); }
.video-play-icon { fill: #fff; stroke: none; width: 1.4rem; height: 1.4rem; margin-left: 0.2rem; }
.video-play:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.video video { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; }
.lib-watch { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.lib-watch li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.lib-watch a { color: var(--sky-bright); }

/* ---------- Trusted medical sources ------------------------------------ */
.lib-reading { margin-block: clamp(1.5rem, 5vh, 3rem); }
.lib-reading-lede { color: var(--fg-muted); margin-bottom: 0.9rem; }
.lib-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.lib-badges a {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.85rem; border: 1px solid rgba(134, 199, 226, 0.45); border-radius: 999px;
  color: var(--fg); font-size: 0.875rem; text-decoration: none; background: rgba(134, 199, 226, 0.06);
}
.lib-badges a:hover { border-color: var(--sky-bright); color: var(--sky-bright); }
.lib-ext { width: 0.85rem; height: 0.85rem; color: var(--fg-faint); }
.lib-reading-card { padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: 1rem; background: rgba(8, 18, 40, 0.72); }
.lib-reading-card h3 { color: var(--fg); font-size: 1.0625rem; font-weight: 500; margin-bottom: 0.75rem; }
.lib-reading-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.lib-reading-card li { display: flex; gap: 0.6rem; align-items: baseline; }
.lib-reading-card a { color: var(--sky-bright); text-decoration: underline; text-decoration-color: rgba(168, 220, 242, 0.4); text-underline-offset: 0.18em; }
.lib-chip { flex: none; padding: 0.1rem 0.5rem; border-radius: 0.375rem; background: rgba(134, 199, 226, 0.14); color: var(--sky-bright); font-size: 0.75rem; letter-spacing: 0.02em; }
