/* ═══════════════════════════════════════════════════════════════════
   The Documented Patient — Shared Stylesheet
   Version: 1.0 (Launch)
   Fonts: Inter (400, 600, 800) via Google Fonts
   ═══════════════════════════════════════════════════════════════════ */

/* ── Brand tokens ─────────────────────────────────────────────────── */
:root {
  --purple:       #8E63C7;
  --purple-hover: #7A52B3;
  --purple-light: #F4F0FF;
  --orange:       #FFA04C;
  --orange-light: #FFF7ED;
  --text:         #111827;
  --muted:        #6B7280;
  --white:        #FFFFFF;
  --border:       #E5E7EB;
  --bg-page:      #F9FAFB;
  --bg-hero:      #F4F0FF;
  --success-bg:   #ECFDF5;
  --success-bdr:  #10B981;
  --success-head: #065F46;
  --success-body: #047857;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(142,99,199,.1);
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ─────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.7;
  background-color: var(--bg-page);
}

/* ── Typography ───────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; }
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3 { font-weight: 700; }
p  { font-size: 1.0625rem; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: var(--radius-md);
  border: none; cursor: pointer; text-decoration: none;
  transition: background-color .18s, transform .12s;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn-primary  { background-color: var(--purple); color: var(--white); font-size: 1.0625rem; padding: 15px 30px; }
.btn-primary:hover  { background-color: var(--purple-hover); transform: translateY(-1px); }
.btn-dark     { background-color: var(--text); color: var(--white); }
.btn-dark:hover     { background-color: #1F2937; }
.btn-outline  { background-color: transparent; color: var(--purple); border: 1.5px solid var(--purple); }
.btn-outline:hover  { background-color: var(--purple-light); }

/* ── Icon helper ──────────────────────────────────────────────────── */
.icon {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  fill: none; flex-shrink: 0;
}

/* ── Navigation ───────────────────────────────────────────────────── */
.site-nav {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-weight: 800; font-size: 1rem;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo-mark {
  width: 32px; height: 32px; background-color: var(--purple);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { stroke: white; width: 16px; height: 16px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 0.9375rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { background-color: var(--purple); color: var(--white) !important; padding: 8px 18px; border-radius: var(--radius-sm); transition: background-color .15s !important; }
.nav-cta:hover { background-color: var(--purple-hover) !important; }
@media (max-width: 640px) { .nav-links li:not(:last-child) { display: none; } }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer { background-color: var(--white); border-top: 1px solid var(--border); padding: 48px 24px; }
.footer-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.footer-disclaimer {
  background-color: var(--purple-light); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px 24px;
  font-size: 0.875rem; color: var(--muted);
}
.footer-disclaimer strong { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; }
.footer-links a { font-size: 0.875rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8125rem; color: var(--muted); }

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 48px 52px;
}
@media (max-width: 640px) { .card { padding: 32px 24px; } }

/* ── Eyebrow / label ──────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 10px;
}
.optional-label {
  display: inline-block;
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 10px;
}

/* ── Article card (library grid) ──────────────────────────────────── */
.article-card {
  background-color: var(--white); border-radius: var(--radius-md);
  border: 1px solid var(--border); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--text);
  transition: border-color .18s, box-shadow .18s, transform .12s;
  box-shadow: var(--shadow-sm);
}
.article-card:hover { border-color: var(--purple); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.article-card h3 { font-weight: 700; font-size: 1rem; line-height: 1.35; }
.article-card p  { font-size: 0.9rem; color: var(--muted); flex: 1; }
.article-card.disabled { pointer-events: none; opacity: .75; cursor: default; }

/* ── Category label ───────────────────────────────────────────────── */
.article-category {
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--purple);
}

/* ── Badges ───────────────────────────────────────────────────────── */
.coming-soon-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 100px;
  background-color: var(--orange-light); color: var(--orange); border: 1px solid #FDDCB5;
  align-self: flex-start;
}
.live-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 100px;
  background-color: #ECFDF5; color: #047857; border: 1px solid #6EE7B7;
  align-self: flex-start;
}

/* ── Form elements ────────────────────────────────────────────────── */
.input-field {
  flex: 1; min-width: 0; padding: 13px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--text);
  background-color: #FAFAFA; transition: border-color .18s, background-color .18s;
}
.input-field::placeholder { color: #9CA3AF; }
.input-field:focus { outline: none; border-color: var(--purple); background-color: var(--white); }
.input-field:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.form-note { font-size: 0.875rem; color: var(--muted); }
.form-row { display: flex; gap: 12px; }
@media (max-width: 560px) { .form-row { flex-direction: column; } }

/* ── Success message ──────────────────────────────────────────────── */
.success-msg {
  display: none;
  background-color: var(--success-bg); border: 1px solid var(--success-bdr);
  border-radius: var(--radius-md); padding: 28px 32px;
}
.success-msg h4 { font-weight: 800; font-size: 1.25rem; color: var(--success-head); margin-bottom: 8px; }
.success-msg p  { font-size: 1rem; color: var(--success-body); }
.form-submitted .signup-form { display: none; }
.form-submitted .success-msg { display: block; }

/* ── Trust note ───────────────────────────────────────────────────── */
.trust-note { display: flex; align-items: center; gap: 7px; font-size: 0.9375rem; color: var(--muted); }
.trust-note svg { stroke: var(--muted); width: 16px; height: 16px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Article body styles ──────────────────────────────────────────── */
.article-body h2 { font-weight: 800; font-size: 1.25rem; margin: 40px 0 12px; }
.article-body h3 { font-weight: 700; font-size: 1.0625rem; margin: 28px 0 10px; }
.article-body p  { font-size: 1.0625rem; margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.article-body li { font-size: 1.0625rem; }
.article-body strong { font-weight: 600; }
.article-body a { color: var(--purple); }
.article-body a:hover { text-decoration: underline; }

/* ── Callout box ──────────────────────────────────────────────────── */
.callout {
  background-color: var(--purple-light);
  border-left: 4px solid var(--purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; margin: 32px 0;
}
.callout p { font-size: 1rem; margin: 0; }

/* ── Script box ───────────────────────────────────────────────────── */
.script-box {
  background-color: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px 28px; margin: 24px 0;
}
.script-box .script-label {
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 10px;
}
.script-box p { font-size: 1rem; font-style: italic; color: var(--text); margin: 0; }

/* ── Disclaimer box ───────────────────────────────────────────────── */
.disclaimer-box {
  background-color: var(--purple-light); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px 24px; margin-top: 48px;
  font-size: 0.875rem; color: var(--muted);
}
.disclaimer-box strong { color: var(--text); }

/* ── Article CTA block ────────────────────────────────────────────── */
.article-cta {
  background-color: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 44px; margin-top: 48px;
  display: flex; flex-direction: column; gap: 16px;
}
@media (max-width: 640px) { .article-cta { padding: 28px 24px; } }
.article-cta h3 { font-weight: 800; font-size: 1.25rem; }
.article-cta p  { font-size: 1rem; color: var(--muted); }
.article-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Back link ────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9375rem; font-weight: 600; color: var(--purple);
  text-decoration: none; margin-top: 40px;
}
.back-link:hover { text-decoration: underline; }
.back-link svg { stroke: var(--purple); width: 14px; height: 14px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── Breadcrumb ───────────────────────────────────────────────────── */
.breadcrumb {
  max-width: 760px; margin: 0 auto; padding: 20px 24px 0;
  display: flex; align-items: center; gap: 6px;
  font-size: 0.875rem; color: var(--muted);
}
.breadcrumb a { color: var(--purple); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* ── Placeholder notice (dev-only) ───────────────────────────────── */
.placeholder-notice {
  background-color: #FFFBEB; border: 2px dashed #FCD34D;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 0.875rem; color: #92400E; font-weight: 600;
  margin-bottom: 16px;
}

.nav-logo-img { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; flex-shrink: 0; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
