/* Page parts of the canvas that change with state or screen size. Everything else is inline, as on the artboards. */
[hidden] { display: none !important; }

/* Goal tiles (Main.dc.html): grey when not picked, white with an ink ring when picked. */
.goal-tile { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 12px 20px; border: 0; border-radius: 12px; background: #F5F5F7; color: #1D1D1F; font-family: inherit; text-align: left; cursor: pointer; }
.goal-tile svg { stroke: #6E6E73; flex: none; }
.goal-tile { color: #1D1D1F; text-decoration: none; }
.goal-tile:hover { text-decoration: none; }
.goal-tile:has(.goal-tile-pick[aria-pressed="true"]) { background: #FFFFFF; outline: 2px solid #1D1D1F; outline-offset: -2px; }
/* On the home page a tile is two controls: the main part picks the goal for the panel below, the link opens its page. */
div.goal-tile { padding: 0 20px 0 0; gap: 12px; }
.goal-tile-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 12px 0 12px 20px; border: 0; background: transparent; color: inherit; font-family: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.goal-tile-more { flex: none; font-size: 15px; color: #0066CC; white-space: nowrap; }
.goal-tile-more:hover { text-decoration: underline; }

/* Pager dots: a pill for the current page, a dot for the others. */
.pager-dot { width: 36px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pager-dot span { display: block; width: 8px; height: 8px; border-radius: 999px; background: #86868B; }
.pager-dot[aria-current="true"] span { width: 24px; background: #1D1D1F; }

/* Round arrow buttons of the ranking. */
.round-btn { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #D2D2D7; border-radius: 999px; background: #FFFFFF; color: #1D1D1F; cursor: pointer; }
.round-btn:disabled { opacity: 0.4; cursor: default; }

/* Type sizes of the desktop artboards, and of Mobile.dc.html under 600px. */
.display-xl { font-size: 88px; }
.lead { font-size: 24px; }
@media (max-width: 600px) {
  .display-xl { font-size: 46px; }
  .lead { font-size: 19px; }
  .home-hero { padding-top: 56px !important; }
  .sf-display-l { font-size: 34px; }
  .sf-intro { font-size: 16px; }
  .result-box { padding: 24px !important; }
}
.page-main { max-width: 1200px; margin: 0 auto; padding: 0 24px 96px; box-sizing: border-box; }

/* Supplement page (Supplement.dc.html). */
.md p { margin: 0; }
.md p + p, .md ul, .md ol { margin-top: 8px; }
.md ul, .md ol { padding-left: 20px; margin-bottom: 0; }
.md h2 { font-size: 24px; margin: 24px 0 8px; letter-spacing: -0.02em; }
sup a { font-size: 11px; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #F5F5F7; color: #424245; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: #1D1D1F; color: #FFFFFF; font-weight: 600; }
.benefit-row { width: 100%; display: grid; grid-template-columns: 190px minmax(0, 1fr) 76px 110px 20px; gap: 20px; align-items: center; min-height: 60px; padding: 8px 0; border: 0; background: transparent; text-align: left; font-family: inherit; color: #1D1D1F; cursor: pointer; }
.toc-link { padding: 8px 12px; border-radius: 10px; color: #424245; }
.toc-link.is-current { background: #F5F5F7; color: #1D1D1F; font-weight: 600; }
.toc { position: sticky; top: 24px; }
@media (max-width: 860px) { .toc { position: static; max-width: none !important; } }
@media (max-width: 600px) { .dl-row { grid-template-columns: 1fr !important; gap: 4px !important; } }

/* Explainers (Explainers.dc.html, Explainer.dc.html). */
.seg { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: #424245; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.seg[aria-selected="true"] { background: #FFFFFF; color: #1D1D1F; font-weight: 600; }
.organ-spot { padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.organ-spot[aria-pressed="true"] { background: rgba(0, 113, 227, 0.10); box-shadow: 0 0 0 2px #0071E3; }
.prose p { margin: 0; font-size: 19px; line-height: 1.6; color: #1D1D1F; }
.prose p + p, .prose ul, .prose ol, .prose ul + p, .prose ol + p, .prose .md-table + p { margin-top: 16px; }
.prose li { font-size: 19px; line-height: 1.6; }
.prose h2 { margin: 48px 0 16px; font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.prose h3 { margin: 32px 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.display-l2 { font-size: 64px; }
@media (max-width: 600px) { .display-l2 { font-size: 38px; } .prose h2 { font-size: 28px; } }

/* The note spans the whole footer (Nov 2026 request), not the 900px measure of the canvas. */
.sf-footer-note { max-width: none; }
.info-prose h2 { font-size: 28px; margin-top: 40px; }
.info-prose p, .info-prose li { font-size: 17px; }
/* A Markdown table (src/markdown.ts): it scrolls sideways on a narrow screen, the page does not. */
.prose .md-table { margin-top: 16px; overflow-x: auto; }
.prose .md-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose .md-table th, .prose .md-table td { padding: 8px 16px 8px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line, #E5E5EA); }
.prose .md-table th { font-weight: 600; vertical-align: bottom; border-bottom-color: #D1D1D6; }
.sf-footer-text a { color: var(--ink-secondary); }
.goal-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 150px 120px; gap: 24px; }


/* Blog (Blog.dc.html, BlogPost.dc.html). */
.post-hero-title { font-size: 48px; }
.post-title { font-size: 56px; }
.in-short ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.post-prose { display: flex; flex-direction: column; gap: 16px; font-size: 19px; line-height: 1.55; }
.post-prose p { margin: 0; }
.post-prose h2 { margin: 24px 0 0; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
.post-prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 0; font-size: 19px; font-weight: 600; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc[open] .acc-v { display: none; }
@media (max-width: 600px) { .post-hero-title { font-size: 32px; } .post-title { font-size: 36px; } }
.post-prose .md, .in-short .md { display: contents; }
.post-prose .md p + p { margin-top: 0; }

/* Supplement page: questions open in place, and the bar at the top once the hero has scrolled away. */
.qa-row { border-top: 1px solid #E8E8ED; }
.qa-row summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 48px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.qa-row summary::-webkit-details-marker { display: none; }
.qa-row[open] .acc-v { display: none; }
.qa-row[open] summary { font-weight: 600; }
.compact-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); border-bottom: 1px solid #E8E8ED; transform: translateY(-100%); transition: transform 0.2s ease; }
.compact-bar.is-shown { transform: none; }
.compact-bar-goals { font-size: 15px; color: #6E6E73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.toc { top: 72px; }
@media (max-width: 600px) { .compact-bar-goals { display: none; } }

/* Home: a goal tile puts its numbers under the name when the row is too narrow for both. */
.goal-tile-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.goal-tile-name { flex: 1 0 auto; max-width: 100%; font-size: 17px; font-weight: 600; }
.goal-tile-stats { font-size: 14px; color: #6E6E73; }
@media (max-width: 600px) { .goal-tile-text { flex-direction: column; align-items: flex-start; } .goal-tile-name { flex: none; } }

/* Home: the ranking of a goal scrolls sideways; part of the next card shows, so the reader sees there is more. */
.rank-row { list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.rank-row:focus-visible { outline: 2px solid #0071E3; outline-offset: 4px; border-radius: 12px; }
.rank-card { flex: 0 0 calc((100% - 24px) / 3 - 20px); min-width: 240px; box-sizing: border-box; scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 12px; background: #FFFFFF; }
@media (max-width: 600px) { .rank-card { flex-basis: 80%; } }

/* Footer: the language menu, before the copyright line. It opens upwards. */
.sf-footer-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.lang-menu { position: relative; }
.lang-menu summary { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; color: #424245; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: #1D1D1F; }
.lang-menu summary:focus-visible { outline: 2px solid #0071E3; outline-offset: 2px; border-radius: 6px; }
.lang-menu-chevron { transition: transform 0.15s; }
.lang-menu[open] .lang-menu-chevron { transform: rotate(180deg); }
.lang-menu ul { position: absolute; bottom: 100%; left: 0; z-index: 10; margin: 0 0 4px; padding: 4px; list-style: none; min-width: 200px; border: 1px solid #E8E8ED; border-radius: 12px; background: #FFFFFF; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.lang-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #424245; text-decoration: none; }
a.lang-menu-item:hover { background: #F5F5F7; color: #1D1D1F; text-decoration: none; }
.lang-menu-current { font-weight: 600; color: #1D1D1F; }
.lang-menu-none { color: #86868B; }
.lang-menu-none small { font-size: 12px; }
.sf-footer-base { align-items: center; }

.sf-menu-toggle, .sf-menu-icon-close { display: none; }

@media (min-width: 800px) and (max-width: 1000px) {
  .sf-header-in { padding-inline: var(--space-16); column-gap: var(--space-8); }
  .sf-nav { column-gap: var(--space-6); }
}

/* Keep the navigation links visible when the mobile menu script has not loaded. */
@media (max-width: 799px) {
  .sf-header { position: relative; }
  .sf-header-in { row-gap: 0; column-gap: var(--space-16); }
  .sf-signin { order: 1; margin-left: auto; }
  .sf-menu-toggle {
    order: 2;
    flex: none;
    place-items: center;
    width: var(--touch-min);
    height: var(--touch-min);
    padding: 0;
    border: 0;
    border-radius: var(--radius-cell);
    color: var(--ink);
    background: transparent;
    cursor: pointer;
  }
  .sf-menu-toggle:not([hidden]) { display: grid; }
  .sf-menu-toggle:hover, .sf-menu-toggle[aria-expanded="true"] { background: var(--surface-panel); }
  .sf-menu-toggle[aria-expanded="true"] .sf-menu-icon-open { display: none; }
  .sf-menu-toggle[aria-expanded="true"] .sf-menu-icon-close { display: block; }
  .sf-nav { order: 3; flex: 1 0 100%; min-width: 0; justify-content: flex-start; gap: 0 var(--space-16); padding-bottom: var(--space-8); }
  .sf-nav .sf-nav-link { display: flex; align-items: center; min-width: var(--touch-min); min-height: var(--touch-min); max-width: 100%; }
  .sf-menu-toggle:not([hidden]) + .sf-nav {
    position: absolute;
    inset: 100% 0 auto;
    z-index: 30;
    box-sizing: border-box;
    max-height: calc(100vh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: var(--space-8) var(--space-24);
    border-top: 1px solid var(--line-soft);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease-out, transform 180ms ease-out, visibility 0s linear 180ms;
  }
  .sf-menu-toggle:not([hidden])[aria-expanded="true"] + .sf-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
  .sf-menu-toggle:not([hidden]) + .sf-nav .sf-nav-link { flex: none; padding-inline: var(--space-12); border-radius: 10px; font-size: 15px; }
  .sf-menu-toggle:not([hidden]) + .sf-nav .sf-nav-link:is(:hover, .is-active) { background: var(--surface-panel); text-decoration: none; }
}

@media (max-width: 799px) and (prefers-reduced-motion: reduce) {
  .sf-menu-toggle:not([hidden]) + .sf-nav { transition: none; }
}

/* Footer: "Ask about supp.tips on" as the assistants' logos, as on supp.fit. The 6 logos stay on
   one line (304px): their column takes 2 grid tracks, and the whole row on a phone. */
.ask-ai { display: flex; flex-wrap: nowrap; gap: 8px; }
.sf-footer-ask { grid-column: span 2; }
@media (max-width: 600px) {
  /* On a phone the 4 link columns sit 2 by 2, and the logos take the whole row below them. */
  .sf-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-footer-ask { grid-column: 1 / -1; }
}
@media (max-width: 360px) { .ask-ai { gap: 6px; } .ask-ai a { width: 40px; height: 40px; } }
.ask-ai a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; box-sizing: border-box; border: 1px solid #E5E5EA; border-radius: 12px; background: #FFFFFF; }
.ask-ai a:hover { border-color: #0071E3; }
.ask-ai a:focus-visible { outline: 2px solid #0071E3; outline-offset: 2px; }

/* Evidence map: the goals row stays in view while the rows scroll. A scroll container stops
   position: sticky from following the page, so on a wide screen the table is not one; on a narrow
   screen the table scrolls in its own box (both ways) and the goals row sticks to its top. */
/* A white shadow on the left and right covers the gaps between the columns, so no square shows through beside a goal; none at the bottom, or it would cut the outline of a selected square in the first row. */
.sf-matrix-goal, .sf-matrix-corner { position: sticky; top: 0; z-index: 2; background: #FFFFFF; box-shadow: -6px 0 0 #FFFFFF, 6px 0 0 #FFFFFF; }
.sf-matrix-goal { flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding-top: 12px; }
@media (min-width: 1040px) { .sf-matrix-scroll { overflow: visible; } }
@media (max-width: 1039px) { .sf-matrix-scroll { max-height: 80vh; overflow: auto; } }

/* Evidence map: the row and the column under the pointer (src/static/map.js). */
.sf-matrix .sf-cell { transition: opacity 0.12s, filter 0.12s; }
/* Grey, not just paler: a paler blue would read as a weaker grade. */
.sf-matrix.is-crossing .sf-cell:not(.is-lit) { filter: saturate(0.1); opacity: 0.3; }
.sf-matrix-goal.is-hover { color: var(--ink, #1D1D1F); }
.sf-matrix-goal.is-hover span { text-decoration: underline; text-underline-offset: 4px; }
.sf-matrix-row.is-hover { color: var(--link, #0066CC); }
@media (prefers-reduced-motion: reduce) { .sf-matrix .sf-cell { transition: none; } }

/* Evidence map: a goal in the header is a link to its goal page, like the supplement names in the rows. */
.sf-matrix-goal-link { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
/* Only the name is underlined: the link itself never is, or the two lines show one under the other. */
.sf-matrix-goal-link:hover, .sf-matrix-goal-link:focus { text-decoration: none; }
.sf-matrix-goal-link:hover span { color: var(--link, #0066CC); text-decoration: underline; text-underline-offset: 4px; }
.sf-matrix-goal-link:focus-visible { outline: 2px solid #0071E3; outline-offset: 2px; border-radius: 8px; }

/* Evidence map: the popup of a square (src/static/map.js places it next to the square, inside the
   window). On a narrow screen it is a sheet at the bottom of the screen. */
.map-pop { position: fixed; z-index: 20; left: 0; top: 0; box-sizing: border-box; width: 320px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 22px; border: 1px solid var(--line-soft, #E8E8ED); border-radius: 18px; background: var(--surface, #FFFFFF); color: var(--ink, #1D1D1F); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14); }
.map-pop:focus { outline: none; }
.map-pop:focus-visible { outline: 2px solid var(--focus-ring, #0071E3); outline-offset: 2px; }
.map-pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.map-pop-title { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; }
.map-pop-close { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -6px -8px 0 0; border: 0; border-radius: 50%; background: var(--surface-panel, #F5F5F7); color: var(--ink-secondary, #424245); cursor: pointer; }
.map-pop-close:hover { color: var(--ink, #1D1D1F); }
.map-pop-close:focus-visible { outline: 2px solid var(--focus-ring, #0071E3); outline-offset: 2px; }
.map-pop-grade { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.map-pop-counts { font-size: 15px; color: var(--ink-muted, #6E6E73); margin-top: -6px; }
.map-pop-top { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft, #E8E8ED); }
.map-pop-sub { font-size: 13px; font-weight: 600; color: var(--ink-muted, #6E6E73); }
.map-pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.map-pop-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 15px; }
.map-pop-name { overflow-wrap: anywhere; }
.map-pop-n { color: var(--ink-secondary, #424245); white-space: nowrap; }
.map-pop-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 500; }
@media (max-width: 600px) {
  .map-pop { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; max-height: 70vh; border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.16); }
}

/* Pair page (/supplements/<supplement>/<goal>): the grade line under the heading and the benefits table. */
.pair-grade { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 17px; }
.pair-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 140px 120px; gap: 16px; }
@media (max-width: 600px) { .pair-row { grid-template-columns: minmax(0, 1fr) 90px 84px 64px; gap: 8px; font-size: 14px; } }

/* Pair page: a benefit in the table is a link (icon + name) that filters the studies (src/static/pair.js). */
.pair-benefit { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; color: #1D1D1F; text-decoration: none; }
.pair-benefit:hover span, .pair-benefit[aria-current="true"] span { color: var(--link, #0066CC); text-decoration: underline; text-underline-offset: 4px; }
/* Only the name is underlined, never the link itself: two lines would show. */
.pair-benefit:hover, .pair-benefit:focus { text-decoration: none; }
.pair-benefit:focus-visible { outline: 2px solid #0071E3; outline-offset: 2px; border-radius: 6px; }

/* The cookie notice (layout.tsx CookieNotice): a panel fixed to the bottom left, full width on a phone. */
.cookie-notice { position: fixed; z-index: 50; left: 24px; bottom: 24px; box-sizing: border-box; max-width: 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 22px; border: 1px solid #E8E8ED; border-radius: 22px; background: #FFFFFF; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); font-size: 14px; line-height: 1.45; color: #424245; }
.cookie-notice p { margin: 0; padding-right: 32px; }
.cookie-notice-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-notice-accept, .cookie-notice-decline { min-height: 44px; padding: 0 24px; font-size: 15px; }
.cookie-notice-decline { box-sizing: border-box; border: 1px solid #D2D2D7; border-radius: 999px; background: #FFFFFF; color: #1D1D1F; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.cookie-notice-decline:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
/* The cross in the top right corner, like the close button of the map popup (.map-pop-close). */
.cookie-notice-close { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-panel, #F5F5F7); color: var(--ink-secondary, #424245); cursor: pointer; }
.cookie-notice-close:hover { color: var(--ink, #1D1D1F); }
.cookie-notice-close:focus-visible { outline: 2px solid var(--focus-ring, #0071E3); outline-offset: 2px; }
@media (max-width: 560px) {
  .cookie-notice { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
