/* Shared public-page typography; keep the navy/gold palette and editorial rows. */
/* Reading depth and inline research tools use the same quiet pill language as the library. */
.reader-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 26px 0 18px; }
.reader-mode-pills { display: inline-flex; border: 1px solid var(--line); border-radius: 28px; padding: 4px; gap: 3px; }
.reader-mode-pills button { min-height: 40px; padding: 8px 19px; border-radius: 23px; font-size: 13px; color: var(--secondary); }
.reader-mode-pills button[aria-pressed="true"] { background: var(--gold); color: var(--bg); }
#modalBody .reader-controls p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; flex: 1 1 220px; }
.source-citations { white-space: nowrap; margin-left: 5px; }
#modalBody .source-cite { display: inline-flex; align-items: center; min-width: 25px; min-height: 24px; justify-content: center; font: 12px/1.4 var(--sans); text-decoration: none; color: var(--gold); }
#modalBody .source-cite:hover { text-decoration: underline; }
#modalBody .glossary-term { font: inherit; color: inherit; display: inline; padding: 0; margin: 0; border: 0; border-bottom: 1px dotted var(--muted); border-radius: 0; text-align: inherit; line-height: inherit; }
#modalBody .glossary-term:hover,#modalBody .glossary-term:focus-visible { color: var(--gold); border-color: var(--gold); }
#modalBody .article-reference-list { margin: 20px 0; padding-left: 25px; }
#modalBody .article-reference-list > li { margin-bottom: 20px; padding-left: 6px; white-space: normal; scroll-margin-top: calc(var(--article-nav-height,90px) + 24px); }
#modalBody .article-reference-list > li::marker { color: var(--gold); font-size: 12px; }
#modalBody .article-reference-list a { font-size: 14px; }
#modalBody .source-meta { font-size: 12px; line-height: 1.7; margin: 5px 0; color: var(--muted); }
#modalBody .reader-note-dialog { width: min(520px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 1px solid #596047; border-radius: 16px; padding: 25px; box-shadow: 0 24px 80px #0009; }
#modalBody .reader-note-dialog::backdrop { background: #030a14bb; }
.reader-note-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
#modalBody .reader-note-heading h2 { font: 400 25px/1.35 var(--serif); letter-spacing: -.4px; margin: 5px 0 0; }
.reader-note-heading button { min-height: 40px; padding: 5px 0 5px 12px; font-size: 12px; color: var(--gold); white-space: nowrap; }
.reader-note-heading button span { margin-left: 8px; font-size: 20px; }
#modalBody .reader-note-dialog p { font-size: 15px; line-height: 1.8; margin: 0 0 18px; white-space: normal; }
#modalBody .reader-note-dialog a { font-size: 14px; overflow-wrap: anywhere; }
#modalBody .reader-note-dialog .source-meta,#modalBody .reader-note-dialog .reader-source-note { font-size: 12px; margin: 12px 0 0; color: var(--muted); }
#modalBody .reader-source-note { border-top: 1px solid var(--line); padding-top: 15px; }
@media (max-width: 520px) {
 .reader-controls { align-items: start; gap: 8px; }
 #modalBody .reader-controls p { flex-basis: 100%; }
 .reader-mode-pills button { min-height: 44px; padding-inline: 20px; }
 #modalBody .reader-note-dialog { padding: 20px; }
}

/* Research is organized by use; compact drawers keep form and FAQ detail optional. */
.research-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 20px 0; }
.research-table-scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
#modalBody .research-table { width: 100%; min-width: 630px; border-collapse: collapse; table-layout: fixed; font-size: 13px; line-height: 1.75; }
#modalBody .research-table th,#modalBody .research-table td { vertical-align: top; text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; white-space: normal; }
#modalBody .research-table thead th { color: var(--muted); font-size: 11px; font-weight: 400; padding-top: 8px; }
#modalBody .research-table th[scope="row"] { color: var(--ink); font-weight: 500; }
#modalBody .research-table td { color: var(--secondary); }
#modalBody .outcome-table th:first-child { width: 24%; }
#modalBody .outcome-table th:nth-child(2) { width: 23%; }
#modalBody .research-table p { font-size: 13px; line-height: 1.75; margin: 0 0 9px; }
#modalBody .research-table .outcome-limits { color: var(--muted); }
.outcome-limits strong { color: var(--secondary); font-weight: 500; }
.outcome-rating { display: block; width: fit-content; font: 11px/1.5 var(--sans); letter-spacing: .15px; color: var(--gold); margin-top: 9px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px; }
#modalBody .practical-faq,#modalBody .form-guide-details { border-top: 1px solid var(--line); }
#modalBody .practical-faq:last-child,#modalBody .form-guide-details { border-bottom: 1px solid var(--line); }
#modalBody .practical-faq > summary,#modalBody .form-guide-details > summary { cursor: pointer; color: var(--ink); padding: 18px 4px; font-size: 14px; line-height: 1.7; }
#modalBody .practical-faq > summary:hover,#modalBody .form-guide-details > summary:hover { color: var(--gold); }
#modalBody .practical-faq[open] > summary { color: var(--gold); }
#modalBody .practical-faq > div { padding: 0 4px 12px; }
#modalBody .form-guide-details > summary span { color: var(--muted); font-size: 11px; padding-left: 12px; }
#modalBody .form-table { min-width: 700px; }
#modalBody .form-table th:first-child { width: 22%; }
#modalBody .form-table th:nth-child(2) { width: 34%; }
#modalBody .form-table small,.comparison-form-row small { display: block; font: 12px/1.75 var(--sans); color: var(--muted); margin-top: 9px; }
.form-source-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; font-size: 11px; }
#modalBody .form-source-links a { color: var(--gold); }
.practical-faq > summary:focus-visible,.form-guide-details > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 700px) {
  #modalBody .outcome-table,#modalBody .outcome-table tbody,#modalBody .outcome-table tr,#modalBody .outcome-table th,#modalBody .outcome-table td { display: block; min-width: 0; width: 100%; }
  #modalBody .outcome-table th:first-child,#modalBody .outcome-table th:nth-child(2) { width: 100%; }
  #modalBody .outcome-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #modalBody .outcome-table tr { border-top: 1px solid var(--line); padding: 14px 0; }
  #modalBody .outcome-table th,#modalBody .outcome-table td { border: 0; padding: 8px 0; }
  #modalBody .outcome-table td:first-of-type::before { content: 'Who was studied'; display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
  #modalBody .outcome-table th[scope="row"] { font-size: 15px; }
  .outcome-rating { display: inline-block; margin: 0 0 0 10px; vertical-align: middle; }
}
@media print {
 .reader-controls,.reader-note-dialog { display: none!important; }
 #modalBody [data-deep-only][hidden] { display: block!important; }
}
:root { --ink:#f1eee7; --muted:#a8b4c4; --secondary:#c5cdd8; }
.masthead nav,.masthead nav .section-pill { font-size:13px; }
@media(max-width:600px){.masthead nav,.masthead nav .section-pill { font-size:12px; }.masthead nav { gap:14px; }}
.results-meta,.sort-note,.focus-label,.focus-topic-heading,.stack-focus-caption,
.stack-results,#stackSortNote,.stack-type,.stack-evidence,.stack-match-kind,
.stack-matches-heading > a,.stack-matches-heading h2,.browse-fields label,
footer p,.footer-links button,.footer-links a { font-size: 12px; }
.footer-links { flex-wrap: wrap; gap: 10px 22px; }
.focus-pill,.focus-topic,.sort-pill,.stack-sort-pills button,.stack-focus-pills button { font-size: 12px; }
.focus-count { opacity: 1; font-size: 11px; }
.stack-focus-pills button span { font-size: 11px; }
.library-page .atlas-stats dt { font-size: 11px; }
.library-page .stats-note p { font-size: 13px; }
.stack-intro,.stacks-intro { font-size: 14px; line-height: 1.85; }
.stack-body h3 { font-size: 15px; }
.stack-guide-content > p,.stack-details p,.stack-body > p,.about-copy p { font-size: 15px; line-height: 1.85; }
.stack-ingredients { font-size: 14px; }
.stack-ingredients thead th,.stack-ingredients small,.stack-ingredients td span { font-size: 12px; }
.stack-subtitle { font-size: 14px; }
.stack-actions a,.stack-actions button,.stack-guide > summary,.stack-guide-nav,.stack-details summary,
.stack-sources p,.stack-sources .checked,.back-stack,.about-kicker,.about-label span,.about-copy .donate-note { font-size: 12px; }
.stack-kind,.stack-kind select { font-size: 12px; }
.stack-search input { font-size: 16px; }

/* Summaries use complete owner-editable fields, with no clipped safety text. */
#modalBody .article-summary { margin: 24px 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0 4px; }
#modalBody .article-summary h2 { font: 400 24px/1.4 var(--serif); margin: 0 0 17px; letter-spacing: -.3px; }
.article-summary dl { margin: 0; }
.article-summary dl > div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 20px; margin-bottom: 17px; }
.article-summary dt { font-size: 13px; color: var(--gold); }
.article-summary dd { margin: 0; min-width: 0; }
#modalBody .article-summary p { margin: 0; font-size: 14px; line-height: 1.8; }
#modalBody .article-summary p + p { margin-top: 10px; }
#modalBody .article-summary strong { color: var(--ink); font-weight: 500; }
#modalBody .article-summary dd > a { display: inline-flex; align-items: center; min-height: 34px; margin-top: 5px; font-size: 12px; }
#modalBody .article-section p { font-size: 15px; line-height: 1.85; }
#modalBody .article-section > h2 { font-size: 27px; }
#modalBody .article-section h3 { font-size: 15px; }
#modalBody .article-section .article-note,#modalBody .article-section .dosage-label,
#modalBody .article-section .dosage-note,#modalBody .article-section .dosage-units,
.dosage-source span,.reference small,#modalBody .article-contents .article-nav-label,
#modalBody .article-section .evidence,
#modalBody .article-contents a,#modalBody .article-mobile-nav > span,
#modalBody .entry-tools,#modalBody .entry-tools button,#modalBody .entry-tools a,
.quick-facts dt,.chemical-facts dt,.chemistry-date,.molecule-figure figcaption { font-size: 12px; }
#modalBody .quick-facts { margin: 25px 0 0; }
#modalBody .quick-facts dd { font-size: 13px; }
#modalBody .chemical-profile .chemical-kind,#modalBody .chemical-profile .chemistry-citation { font-size: 12px!important; }
#modalBody .article-mobile-nav select { font-size: 16px; }
#modalBody .article-contents a { text-decoration: none; }
#modalBody .article-contents a[aria-current] { text-decoration: underline; }

/* Related guides remain compact and expandable, with evidence context visible. */
#modalBody .related-stacks h2 > span { margin-left: 8px; font: 12px var(--sans); color: var(--muted); letter-spacing: 0; }
.related-stacks ul { list-style: none; margin: 0; padding: 0; }
#modalBody .related-stacks li { padding: 17px 0; border-bottom: 1px solid var(--line); white-space: normal; }
#modalBody .related-stacks li > a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; text-decoration: none; color: var(--ink); }
.related-stack-title { font: 400 21px/1.45 var(--serif); }
#modalBody .related-stacks li > a:hover { color: var(--gold); }
#modalBody .related-stacks .related-stack-meta { color: var(--secondary); font-size: 13px; margin: 7px 0 0; }
#modalBody .related-stacks .related-stack-evidence { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.related-stacks-more > summary { color: var(--gold); cursor: pointer; padding: 13px 0; font-size: 13px; }

/* Show prices only when verified; unpriced products keep one clear Amazon link. */
#modalBody .amazon-product-heading h3,.stack-buying .amazon-product-heading h4 { font-size: 19px; line-height: 1.55; }
#modalBody .amazon-link,.stack-buying .amazon-link { font-size: 12px; min-height: 44px; }
#modalBody .amazon-products .affiliate-disclosure,.stack-body .affiliate-disclosure,
#modalBody .amazon-basis,#modalBody .amazon-note,#modalBody .amazon-updated,
.stack-buying .amazon-basis,.stack-buying .amazon-note,.stack-buying .amazon-updated,
.stack-body .stack-buy-coverage,.stack-buying .amazon-ingredient,
.amazon-pricing dt,.stack-buying .amazon-pricing dt,.amazon-details,.stack-buying .amazon-details summary { font-size: 12px; line-height: 1.8; }
.amazon-pricing dt { text-transform: none; letter-spacing: 0; }
.amazon-pricing dd,.stack-buying .amazon-pricing dd { font-size: 17px; }
.amazon-details summary { min-height: 36px; }

@media (max-width: 700px) {
  #modalBody .article-summary dl > div { grid-template-columns: 1fr; gap: 4px; margin-bottom: 19px; }
  #modalBody .article-section > h2 { font-size: 24px; }
  .focus-pill,.stack-focus-pills button,.stack-sort-pills button { min-height: 44px; }
  .library-page .atlas-stats dt { font-size: 10px; }
}
@media (max-width: 520px) {
  .amazon-product-heading,.stack-buying .amazon-product-heading { grid-template-columns: minmax(0,1fr); gap: 10px; }
  #modalBody .amazon-link,.stack-buying .amazon-link { justify-self: start; }
  .stack-search-row { flex-wrap: wrap; gap: 8px 16px; }
  .stack-search { flex-basis: 100%; }
  .stack-kind { display: flex; }
  .stack-kind > span { display: inline; }
  .stack-kind select { max-width: none; padding: 10px 0; }
}
/* Source dates stay distinct from editorial review and publication notes. */
.article-update-meta{display:flex;flex-wrap:wrap;gap:8px 24px;padding:17px 0 10px;color:var(--muted);font-size:10px;border-top:1px solid var(--line);margin-top:19px}.article-update-meta span strong{font-weight:400;color:var(--secondary);margin-left:5px}.article-update-meta a{color:var(--gold)}.review-dates{display:flex;flex-wrap:wrap;gap:18px 35px;margin:23px 0}.review-dates div{min-width:155px}.review-dates dt{font-size:11px;color:var(--muted)}.review-dates dd{margin:4px 0 0;font-size:13px;color:var(--secondary)}.source-date-details{margin:20px 0;font-size:12px}.source-date-details summary{cursor:pointer;color:var(--gold);padding:6px 0}.publication-updates{list-style:none;padding:0!important;margin:20px 0}.publication-updates li{display:grid;grid-template-columns:95px minmax(0,1fr);gap:20px;padding:17px 0;border-bottom:1px solid var(--line);margin:0!important}.publication-updates time{font-size:11px;color:var(--muted);padding-top:3px}.publication-updates p{margin:0!important;font-size:13px!important}.publication-updates small{font-size:10px;color:var(--muted);display:block;margin-top:7px}.product-transparency{margin-top:18px;border-top:1px solid var(--line);padding-top:9px}.product-transparency summary{cursor:pointer;color:var(--gold);font-size:11px;padding:5px 0}.product-detail-body{padding:8px 0 2px;overflow-wrap:anywhere}.product-detail-body dl{display:block;margin:10px 0 18px}.product-detail-body dl>div{display:grid;grid-template-columns:155px minmax(0,1fr);gap:15px;margin:12px 0}.product-detail-body dt{color:var(--muted);font-size:11px}.product-detail-body dd{color:var(--secondary);font-size:12px;line-height:1.85;margin:0}.product-detail-body .product-reference{font-size:10px!important;color:var(--muted);line-height:1.8!important}.product-reference a{color:var(--gold);text-decoration:underline;text-underline-offset:3px}.product-detail-body .article-note{font-size:10px!important;line-height:1.8!important;color:var(--muted)}.product-testing{border-top:1px solid var(--line);margin-top:20px;padding-top:15px}.product-testing h4{margin:0 0 8px;font-size:12px;font-weight:500}.product-testing p{font-size:12px!important;line-height:1.85!important}.product-testing strong{font-weight:500;color:var(--secondary)}@media(max-width:550px){.product-detail-body dl>div{display:block}.product-detail-body dd{margin-top:4px}.publication-updates li{grid-template-columns:1fr;gap:7px}.article-update-meta{display:grid;gap:7px}}

.product-transparency summary{font-size:12px}.product-detail-body dt{font-size:12px}.product-detail-body dd{font-size:13px}.product-detail-body .product-reference,.product-detail-body .article-note{font-size:11px!important}.product-testing p{font-size:13px!important}.article-update-meta{font-size:11px}
.element-reference-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; width:100%; min-height:144px; aspect-ratio:5/3; padding:16px; background:var(--panel); color:var(--gold); border:1px solid #c7ae7855; border-radius:4px; }
.element-reference-label { font:11px/1.3 var(--sans); letter-spacing:.14em; color:var(--muted); }
.element-reference-tile strong { font:400 72px/1 var(--sans); letter-spacing:-3px; }
.molecule-figure:has(.element-reference-tile) > a { display:block; max-width:280px; margin-inline:auto; text-decoration:none!important; }
.molecule-figure .element-reference-tile { min-height:168px; }
