/* davidsing.com/education — patient-education page shell.
   Phase 1: STRUCTURE ONLY. Reuses css/tokens.css and the .signup/.field/.btn/.thanks
   pattern from css/site.css unchanged (same form markup, new copy, a hidden source
   field). This file adds only what the letter page did not need: a long-form article
   with anchored sections, a jump-to-section nav, a red-flag card, and a visible
   placeholder style so unreviewed clinical content can never be mistaken for
   reviewed clinical content.

   2026-11-09: page is public (index, follow), linked from the homepage footer and
   listed in sitemap.xml. Clinical sections stay placeholder-marked until David
   supplies the copy. See docs/patient-education-funnel-plan.md. */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 18px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 60vh;
  background: var(--hero-glow);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-6);
}
@media (min-width: 40em) {
  .page { padding: var(--space-6) var(--space-4) var(--space-7); }
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--text);
  padding: var(--space-3); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); font-weight: 600;
}
.skip:focus { left: var(--space-3); top: var(--space-3); z-index: 10; }


/* -------------------------------------------------------------------- masthead */
/* Smaller cousin of the letter's .letterhead — this page is not the letter, so it
   should not compete visually with it. Same identity, quieter presentation. */

.masthead {
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.masthead__eyebrow {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 var(--space-2);
}

.masthead__title {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 var(--space-2);
  color: var(--text);
}
@media (min-width: 34em) {
  .masthead__title { font-size: var(--fs-2xl); }
}

.masthead__by {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--text-dim);
}
.masthead__by strong { color: var(--text); }


/* ------------------------------------------------------------------ disclaimer */
/* Sits right under the masthead, above everything else. This is the "who this page
   is for / is not for" framing plus the standing not-medical-advice notice. It is
   NOT a placeholder — this wording is boilerplate already used elsewhere on this
   site (index.html footer), so it does not need David's clinical review. */

.disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-3);
  margin-bottom: var(--space-5);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.55;
}
.disclaimer strong { color: var(--text); }


/* ------------------------------------------------------------------------- toc */

.toc {
  margin: 0 0 var(--space-5);
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.toc__label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 var(--space-2);
}
.toc ol {
  margin: 0;
  padding: 0 0 0 1.25em;
}
.toc li { margin: 0 0 var(--space-1); }
.toc a {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.toc a:hover, .toc a:focus-visible { border-bottom-color: currentColor; }


/* --------------------------------------------------------------------- article */

.edu-section {
  margin-bottom: var(--space-6);
  scroll-margin-top: var(--space-4);
}

.edu-section__title {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--space-3);
  color: var(--text);
}
@media (min-width: 40em) {
  .edu-section__title { font-size: var(--fs-xl); }
}

.edu-section__lede {
  margin: 0 0 var(--space-4);
  font-size: var(--fs-md);
  color: var(--text-dim);
  line-height: 1.6;
}

.edu-sub { margin-bottom: var(--space-4); }
.edu-sub__title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--text);
}


/* -------------------------------------------------------------- red-flag card
   Same visual language as renobackpain's edu-card--redflag: left danger border,
   tinted background, calm instruction. Never names an ER. Never assesses severity
   by itself — that judgment is the physician's, not this page's. */

.redflag {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--danger) 40%, var(--border));
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.redflag__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-2);
}
.redflag__title svg { width: 22px; height: 22px; color: var(--danger); flex: 0 0 auto; }
.redflag p { margin: 0 0 var(--space-2); color: var(--text-dim); line-height: 1.55; }
.redflag p:last-child { margin-bottom: 0; }


/* --------------------------------------------------------------- placeholder
   The whole point of Phase 1: it must be IMPOSSIBLE to mistake this for reviewed
   clinical content. Dashed border, muted ink, an explicit tag. Nothing here reads
   as finished copy at a glance. */

.placeholder {
  background: var(--surface-2);
  border: 2px dashed var(--accent-line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  color: var(--text-faint);
  font-style: italic;
  line-height: 1.6;
}
.placeholder__tag {
  display: inline-block;
  font-style: normal;
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: var(--space-2);
}


/* -------------------------------------------------------------------- escalation */

.escalation {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}


/* ---------------------------------------------------------------------- footer */

.foot {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-faint);
  line-height: 1.6;
}
.foot p { margin: 0 0 var(--space-1); }
.foot a { color: var(--accent-2); }

.hidden { display: none !important; }


/* ----------------------------------------------------------------------- print */

@media print {
  body::before, .skip, .toc, .escalation, .foot { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { max-width: none; padding: 0; }
  .placeholder { border-color: #999; color: #444; }
}
