/*
Theme Name: Neuromind Pro Review
Theme URI: https://example.com
Author: Editorial Team
Description: Independent editorial review theme for Neuromind Pro. Health-editorial aesthetic: muted natural palette, generous whitespace, rounded cards, accessible typography.
Version: 1.0.0
Text Domain: neuromind-review
*/

/* ---------- Design tokens ---------- */
:root {
  --ink-900: #1c211f;
  --ink-700: #3a423e;
  --ink-500: #5c655f;

  --surface: #ffffff;
  --surface-muted: #f6f7f5;
  --surface-card: #fbfcfa;

  --border: #e3e6e1;

  --accent-50: #f0f4f1;
  --accent-100: #dde6df;
  --accent-300: #9db8a4;
  --accent-500: #5f8368;
  --accent-600: #4d6d55;
  --accent-700: #3d5744;

  --warn-50: #fdf6ec;
  --warn-500: #a86a2c;

  --radius-card: 1rem;
  --shadow-subtle: 0 1px 2px 0 rgba(28,33,31,0.04);
  --shadow-card: 0 1px 3px 0 rgba(28,33,31,0.06);

  --max-content: 72rem;
  --max-prose: 42rem;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
@media (min-width: 768px) { body { font-size: 18px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink-900); }
h1 { font-size: 2rem; font-weight: 700; }
@media (min-width: 640px) { h1 { font-size: 2.25rem; } }
h2 { font-size: 1.5rem; font-weight: 700; margin-top: 0; }
h3 { font-size: 1.125rem; font-weight: 600; margin-top: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-600);
  outline-offset: 2px;
}

ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }

.prose-col { max-width: var(--max-prose); margin: 0 auto; }

.section {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.section:first-child { border-top: none; padding-top: 0; }
.section > h2 { margin-bottom: 1rem; }
.section p, .section ul { color: var(--ink-700); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink-900);
  text-decoration: none;
}
.site-logo span { font-weight: 400; color: var(--ink-500); }

.primary-nav { display: none; gap: 1.5rem; align-items: center; }
.primary-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
}
.primary-nav a:hover { color: var(--accent-700); }

@media (min-width: 768px) {
  .primary-nav { display: flex; }
  .header-cta-desktop { display: inline-block !important; }
  .mobile-nav-toggle { display: none !important; }
}

.header-cta-desktop { display: none; }

.btn-cta {
  border-radius: 999px;
  background: var(--accent-500);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  box-shadow: var(--shadow-subtle);
  transition: background 0.15s ease;
  display: inline-block;
}
.btn-cta:hover { background: var(--accent-600); }

.mobile-nav-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--ink-700);
  cursor: pointer;
}

#mobile-nav {
  border-top: 1px solid var(--border);
  display: none;
}
#mobile-nav.is-open { display: block; }
#mobile-nav ul { list-style: none; margin: 0; padding: 0.5rem 1rem; }
#mobile-nav a {
  display: block;
  padding: 0.6rem 0;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
}
#mobile-nav .mobile-cta { padding-top: 0.5rem; }

/* ---------- Affiliate disclosure ---------- */
.affiliate-disclosure {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--accent-50);
}
.affiliate-disclosure p {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-700);
}
@media (min-width: 640px) { .affiliate-disclosure p { padding: 0.5rem 1.5rem; } }
.affiliate-disclosure a { font-weight: 600; text-decoration: underline; }
.affiliate-disclosure a:hover { color: var(--accent-700); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.875rem; color: var(--ink-500); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.25rem; margin: 0; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-700); text-decoration: underline; }
.breadcrumbs .current { color: var(--ink-700); }

/* ---------- Hero ---------- */
.product-hero { padding-top: 2rem; }
.product-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 768px) { .product-hero-grid { grid-template-columns: 1.3fr 1fr; } }
.product-hero h1 { margin-top: 0.75rem; }
.product-hero .intro { max-width: var(--max-prose); color: var(--ink-700); margin-top: 1rem; }
.hero-image-frame {
  max-width: 20rem;
  margin: 0 auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-subtle);
}
@media (min-width: 768px) { .hero-image-frame { margin: 0; } }

.last-updated { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: var(--ink-500); margin-top: 1rem; }
.badge-factchecked {
  border-radius: 999px;
  background: var(--accent-50);
  color: var(--accent-700);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
}

/* ---------- Cards / callouts ---------- */
.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}
.card-flat { box-shadow: none; }

.callout { border-radius: var(--radius-card); border: 1px solid; padding: 1.25rem 1.5rem; font-size: 0.9375rem; color: var(--ink-700); }
.callout-neutral { border-color: rgba(157,184,164,0.5); background: var(--accent-50); }
.callout-limitation { border-color: rgba(168,106,44,0.3); background: var(--warn-50); }
.callout h3 { margin-bottom: 0.5rem; }

.dev-flag {
  display: inline-block;
  border-radius: 6px;
  border: 1px solid rgba(168,106,44,0.4);
  background: var(--warn-50);
  color: var(--warn-500);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
}
body.env-production .dev-flag { display: none; }

/* ---------- Quick facts ---------- */
.quick-facts-card { border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface-card); box-shadow: var(--shadow-card); padding: 1.5rem; }
@media (min-width: 640px) { .quick-facts-card { padding: 2rem; } }
.quick-facts-grid { display: grid; gap: 0.4rem 2rem; margin-top: 1rem; }
@media (min-width: 640px) { .quick-facts-grid { grid-template-columns: 1fr 1fr; } }
.quick-facts-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid rgba(227,230,225,0.6); }
.quick-facts-row dt { font-size: 0.875rem; font-weight: 500; color: var(--ink-500); margin: 0; }
.quick-facts-row dd { font-size: 0.875rem; color: var(--ink-900); margin: 0; text-align: right; }
.quick-facts-note { font-size: 0.75rem; color: var(--ink-500); margin-top: 1rem; }

/* ---------- Table of contents ---------- */
.toc { border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface-card); }
.toc-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; text-align: left; font-size: 0.9rem; font-weight: 600; background: none; border: none; cursor: pointer; }
.toc-list { list-style: none; margin: 0; padding: 0 1rem 1rem; font-size: 0.9rem; display: none; }
.toc-list.is-open { display: block; }
.toc-list li { margin-bottom: 0.3rem; }
.toc-list a { text-decoration: none; color: var(--ink-700); }
.toc-list a:hover { color: var(--accent-700); text-decoration: underline; }
@media (min-width: 1024px) {
  .toc-toggle { display: none; }
  .toc-list { display: block !important; position: sticky; top: 5rem; max-height: 70vh; overflow-y: auto; padding: 1rem; }
}

/* ---------- Ingredient table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--border); }
table.ingredient-table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
table.ingredient-table thead { background: var(--surface-muted); }
table.ingredient-table th, table.ingredient-table td { padding: 0.75rem 1rem; }
table.ingredient-table th { font-weight: 600; color: var(--ink-900); }
table.ingredient-table td { color: var(--ink-700); border-top: 1px solid var(--border); }

/* ---------- Evidence cards ---------- */
.evidence-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .evidence-grid { grid-template-columns: 1fr 1fr; } }
.evidence-card dt { font-weight: 500; color: var(--ink-500); font-size: 0.875rem; margin-top: 0.75rem; }
.evidence-card dd { color: var(--ink-700); font-size: 0.9rem; margin: 0.15rem 0 0; }

/* ---------- Pros/cons ---------- */
.proscons-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .proscons-grid { grid-template-columns: 1fr 1fr; } }
.proscons-box { border-radius: var(--radius-card); padding: 1.25rem; border: 1px solid; }
.proscons-box.pros { border-color: rgba(157,184,164,0.5); background: var(--accent-50); }
.proscons-box.cons { border-color: rgba(168,106,44,0.3); background: var(--warn-50); }
.proscons-box h3 { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.03em; margin-bottom: 0.5rem; }
.proscons-box.pros h3 { color: var(--accent-700); }
.proscons-box.cons h3 { color: var(--warn-500); }
.proscons-box ul { list-style: none; padding: 0; font-size: 0.9rem; color: var(--ink-700); }
.proscons-box li { display: flex; gap: 0.5rem; }

/* ---------- Pricing cards ---------- */
.pricing-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.pricing-card { border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface-card); box-shadow: var(--shadow-subtle); padding: 1.25rem; text-align: center; }
.pricing-card .price { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0 0; }
.pricing-card .price span { font-size: 0.85rem; font-weight: 400; color: var(--ink-500); }
.pricing-card .total { font-size: 0.9rem; color: var(--ink-500); margin: 0.15rem 0 0; }
.pricing-card-image-wrap { position: relative; display: inline-block; margin-bottom: 0.5rem; }
.pricing-card-image-wrap img { width: 100px; height: 100px; object-fit: contain; margin: 0 auto; }
.pricing-qty-badge {
    position: absolute; top: -6px; right: -10px;
    background: var(--accent-600); color: #fff;
    font-size: 0.75rem; font-weight: 700;
    border-radius: 999px; padding: 0.15rem 0.5rem;
    box-shadow: var(--shadow-subtle);
}

/* ---------- Buy checklist ---------- */
.checklist { list-style: none; padding: 1.25rem; margin: 0; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface-card); }
.checklist li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-700); }
.checklist li::before { content: ""; flex: 0 0 auto; width: 1rem; height: 1rem; margin-top: 0.15rem; border-radius: 3px; border: 1px solid rgba(92,101,95,0.5); }

/* ---------- FAQ accordion (native details/summary) ---------- */
.faq { border-radius: var(--radius-card); border: 1px solid var(--border); }
.faq details { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.faq details:first-child { border-top: none; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 500; color: var(--ink-900); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .marker { color: var(--ink-500); transition: transform 0.15s ease; }
.faq details[open] summary .marker { transform: rotate(45deg); }
.faq .faq-answer { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.6; color: var(--ink-700); }

/* ---------- Sidebar / mobile sticky CTA ---------- */
.layout-with-sidebar { display: grid; gap: 2rem; padding: 2.5rem 0; }
@media (min-width: 1024px) { .layout-with-sidebar { grid-template-columns: 1fr 260px; } }
.sidebar-col { display: none; }
@media (min-width: 1024px) { .sidebar-col { display: block; } }
.sticky-sidebar { position: sticky; top: 6rem; }
.sticky-sidebar ul { list-style: none; padding: 0; text-align: center; font-size: 0.9rem; }

.mobile-sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem 1rem;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  display: none;
}
.mobile-sticky-cta.is-visible { display: block; }
.mobile-sticky-cta.is-dismissed { display: none !important; }
@media (min-width: 768px) { .mobile-sticky-cta { display: none !important; } }
.mobile-sticky-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.mobile-sticky-cta .dismiss-btn { background: none; border: none; color: var(--ink-500); padding: 0.25rem; }

/* ---------- Author box ---------- */
.author-box { display: flex; gap: 1rem; align-items: flex-start; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface-card); padding: 1.25rem; }
.author-box img { border-radius: 999px; width: 56px; height: 56px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--border); background: var(--surface-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; padding: 3rem 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-500); margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col a { font-size: 0.9rem; color: var(--ink-700); text-decoration: none; }
.footer-col a:hover { color: var(--accent-700); }
.footer-legal { border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: 0.75rem; color: var(--ink-500); }
.footer-legal p { margin: 0.5rem 0; }

/* ---------- Internal link ---------- */
.internal-link { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.9rem; font-weight: 600; color: var(--accent-700); text-decoration: none; margin-top: 0.5rem; }
.internal-link:hover { text-decoration: underline; }

/* ---------- CTA button reused inline ---------- */
.btn-cta-inline { margin-top: 1rem; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 5rem 0; }
.not-found .eyebrow { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent-600); }
.not-found ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; padding: 0; font-size: 0.9rem; font-weight: 500; }
.not-found a { color: var(--accent-700); text-decoration: underline; }

/* ---------- Utility ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.text-sm { font-size: 0.875rem; } .text-muted { color: var(--ink-500); }
.flex-wrap-links { display: flex; flex-wrap: wrap; gap: 1rem; }
