/* Site-wide additions. Loaded after each page's inline styles. */

/* ---------- Mobile navigation ---------- */
.nav{ position:relative; }
.nav-toggle{
  display:none; align-items:center; justify-content:center; gap:6px;
  width:44px; height:44px; padding:0; border:1px solid #d8d8d8; border-radius:4px;
  background:#fff; color:#542177; font-size:14px; font-weight:600;
}
.nav-toggle svg{ display:block; }
@media (max-width:960px){
  .nav-toggle{ display:inline-flex; }
  .nav-links{
    display:none; position:absolute; top:100%; left:0; right:0; z-index:50;
    flex-direction:column; gap:2px; margin:0; padding:12px 32px 20px;
    background:#fff; border-bottom:1px solid #d8d8d8;
    box-shadow:0 18px 30px rgba(0,0,0,.08);
  }
  .nav-links.is-open{ display:flex; }
  .nav-links a{ padding:12px 0; border-bottom:1px solid #eeeeee; font-size:16px; }
  .nav-links a:last-child{ border-bottom:0; }
  .nav .btn-primary{ padding:10px 14px; font-size:14px; }
}
@media (max-width:600px){
  .nav{ gap:10px; }
  .nav .btn-primary{ display:none; }
  .utility .wrap{ flex-wrap:wrap; gap:4px; }
}

/* ---------- Cookie consent ---------- */
.nh-consent{
  position:fixed; left:16px; right:16px; bottom:16px; z-index:1000;
  max-width:920px; margin:0 auto; padding:20px 22px;
  background:#fff; color:#363636; border:1px solid #542177; border-radius:8px;
  box-shadow:0 24px 60px rgba(0,0,0,.18);
  font-family:'Inter',Arial,sans-serif; font-size:14px; line-height:21px;
}
.nh-consent p{ margin:0 0 14px; }
.nh-consent a{ color:#542177; text-decoration:underline; }
.nh-consent-actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.nh-consent button{
  font-family:inherit; font-size:14px; font-weight:600; padding:10px 18px;
  border-radius:4px; border:1px solid #542177; cursor:pointer;
}
.nh-consent .accept{ background:#542177; color:#fff; }
.nh-consent .reject{ background:#fff; color:#542177; }
.nh-consent .settings{ background:transparent; border-color:transparent; text-decoration:underline; padding-left:4px; padding-right:4px; }
.nh-consent button:focus-visible{ outline:2px solid #8E1EA2; outline-offset:2px; }
@media (max-width:600px){
  .nh-consent{ left:10px; right:10px; bottom:10px; padding:16px; }
}

/* ---------- Pre-approval ad placeholders ----------
   Empty ad boxes were useful for layout, but they should not ship to
   AdSense review. Remove this rule once real ad units are inserted. */
.ad-slot{ display:none !important; }

/* ---------- Article figures (cross-browser, aspect-ratio safe) ---------- */
.article-body figure{ margin:40px 0; text-align:center; }
.article-body img{
  display:block; max-width:100%; height:auto;
  margin:0 auto; border-radius:8px;
}
.article-body figcaption{
  font-family:'DM Mono', 'Inconsolata', monospace; font-size:12.5px; line-height:1.55;
  color:#6b6b6b; margin-top:12px; padding-top:10px;
  border-top:1px solid #d8d8d8; text-align:left;
}

/* ---------- Interactive polls (local-only, no backend) ---------- */
.poll-box{ background:#fafafa; }
.poll-box .p-options{ display:flex; flex-direction:column; gap:8px; margin:0 0 18px; }
.poll-box .p-option{
  display:flex; align-items:flex-start; gap:10px; padding:12px 14px;
  border:1px solid #d8d8d8; border-radius:6px; background:#fff;
  font-size:14.5px; line-height:1.45; color:#363636; cursor:pointer;
  transition:border-color .15s ease;
}
.poll-box .p-option:hover{ border-color:#b9b9b9; }
.poll-box .p-option input[type="radio"]{ margin-top:3px; flex-shrink:0; width:15px; height:15px; accent-color:#542177; }
.poll-box .p-vote{
  font-family:inherit; font-size:14px; font-weight:600; padding:10px 22px;
  background:#542177; color:#fff; border:none; border-radius:6px; cursor:pointer;
}
.poll-box .p-vote:hover{ background:#421a5f; }
.poll-box .p-result{ font-size:14.5px; line-height:1.5; color:#3a1a55; margin:0; }
.poll-box.is-answered .p-options, .poll-box.is-answered .p-vote{ display:none; }

/* Archive page uses an h1 with the h2 display size. */
h1.display-lg{ font-size:40px; font-weight:600; line-height:44px; color:#542177; margin:0 0 16px; }
@media (max-width:600px){ h1.display-lg{ font-size:32px; line-height:38px; } }

/* ---------- Heading-level equivalents ----------
   Card titles moved from h4 to h3 (and archive cards to h2) so screen
   readers get a valid outline. These rules preserve the original look. */
h3.display-xs, h2.display-xs{ font-size:20px; font-weight:500; line-height:28px; margin:0 0 4px; color:inherit; }
.preview-issue .preview-h{ font-size:15px; font-weight:600; margin:0 0 4px; color:#542177; }
.foot-col h3{ color:#542177; font-size:13px; margin:0 0 12px; font-weight:600; }
.trust-item h3{ margin:0 0 4px; font-size:14px; font-weight:600; color:#ffffff; }
.editor-card h3{ margin:0; font-size:16px; color:#542177; }
.author-info .author-name{ margin:0; font-size:15px; font-weight:600; color:#542177; }

/* Darken saturated category cards so white text meets 4.5:1. */
.category-card:not(.on-light){ background-image:linear-gradient(rgba(0,0,0,.45),rgba(0,0,0,.45)); }

/* ---------- Skip link ---------- */
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:2000;
  background:#542177; color:#fff; padding:10px 16px; border-radius:0 0 4px 0;
  font-size:14px; font-weight:600;
}
.skip-link:focus{ left:0; }

/* Category cards: keep inline background, add a readable scrim above it. */
.category-card{ position:relative; isolation:isolate; overflow:hidden; }
.category-card:not(.on-light)::before{
  content:""; position:absolute; inset:0; background:rgba(0,0,0,.45); z-index:-1;
}
.category-card h3{ font-size:19px; font-weight:500; margin:0; }

/* Highlighted inline claims: darker shades for 4.5:1 on white. */
.article-body .hl-red{ color:#D552A3; }
.article-body .hl-green{ color:#0e8a7f; }
.article-body .hl-orange{ color:#8E1EA2; }
.article-body .hl-purple{ color:#8E1EA2; }
.article-body .hl-blue{ color:#8E1EA2; }

/* Content-page footer: brand row above link columns. */
footer > .wrap{ flex-direction:column; align-items:stretch; }
.foot-brand{ display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:28px; }

/* Legal pages: align the article column with the page header. */
main.legal-body.wrap{ max-width:1140px; padding:48px 32px 72px; }
main.legal-body.wrap > *{ max-width:760px; }
@media (max-width:600px){ main.legal-body.wrap{ padding:36px 20px 56px; } }

/* Archive search */
.archive-search{ display:flex; gap:8px; max-width:560px; margin:8px 0 28px; }
.archive-search .text-input{ flex:1; }
.search-status{ font-size:14px; color:#5a5a5a; margin:-12px 0 24px; }
.search-status a{ text-decoration:underline; }
@media (max-width:600px){ .archive-search{ flex-direction:column; } }

/* Archive filtering: author display rules must not override [hidden] */
.card-feature[hidden]{ display:none !important; }

/* ---------- Big orange "Contact us" button in the header ---------- */
.nav{ justify-content:flex-start; gap:24px; }
.nav .nav-links{ margin-left:auto; }
.nav .btn-contact{
  display:inline-flex; align-items:center; justify-content:center;
  background:#D552A3; color:#ffffff;
  font-size:19px; font-weight:600; line-height:1;
  padding:18px 36px; border-radius:10px;
  white-space:nowrap; text-decoration:none;
  transition:background .15s ease;
}
.nav .btn-contact:hover{ background:#c2418a; }
@media (max-width:600px){
  .nav .btn-contact{ font-size:14px; padding:10px 14px; margin-left:auto; }
}

/* ---------- Apple-style motion ---------- */
@keyframes nhFadeUp {
  from { opacity:0; transform:translateY(26px); }
  to   { opacity:1; transform:none; }
}
.hero-copy > * { animation: nhFadeUp .8s cubic-bezier(.16,1,.3,1) both; }
.hero-copy > *:nth-child(2){ animation-delay:.08s; }
.hero-copy > *:nth-child(3){ animation-delay:.16s; }
.hero-copy > *:nth-child(4){ animation-delay:.24s; }
.hero-visual { animation: nhFadeUp .9s cubic-bezier(.16,1,.3,1) .2s both; }

.category-card, .card-feature, .editor-card, .preview-issue {
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s cubic-bezier(.16,1,.3,1);
}
a.category-card:hover, .card-feature:hover, .editor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(84,33,119,.16);
}
.preview-issue:hover { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce){
  .hero-copy > *, .hero-visual { animation: none; }
  .category-card, .card-feature, .editor-card, .preview-issue { transition: none; }
}

/* ---------- Medical disclaimer note ---------- */
.medical-disclaimer{
  background:#faf6ff; border:1px solid #e6dcf0; border-left:4px solid #8E1EA2;
  padding:16px 20px; border-radius:8px; margin:0 0 28px;
  font-size:15px; line-height:1.65; color:#4a3263;
}
