/* =========================================================================
   practice-patient.css
   Shared design system for patient handouts (template + adapted).
   Fraunces serif for headings, Asap sans for body — warmer, slower-paced
   feel than the clinician briefs. Same paper palette so the two halves of
   the section feel related, not unrelated.

   COLOR SEMANTICS — pick by meaning, not by visual variety.

     SAGE / TEAL  positive, calming, "we've got this"
                  .real validation · .tiger analogy · .flareplan flare plan
                  · .closing affirmation
     CLAY         attention, important — but NOT alarming
                  .alert "when to stop" red flags
     (Amber is reserved for clinician material — never appears here.)

   Surfaces without an explicit meaning stay neutral (paper / paper-2 /
   line). If a new section doesn't fit one of the two meanings above,
   keep it neutral rather than adding a third color.
   ========================================================================= */

:root {
  --paper:    #F6F5F1;
  --paper-2:  #FFFFFF;
  --ink:      #21262E;
  --ink-soft: #59626C;

  --teal:      #14304F;
  --teal-deep: #0B1F37;
  --sage:      #8CA3BE;
  --sage-tint: #E2E8F0;
  --clay:      #A9764A;
  --clay-tint: #F0E7DB;
  --clay-deep: #7E5430;

  --line:   #DBD8D0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,48,79,.05), 0 8px 24px rgba(20,48,79,.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 85% -5%, var(--sage-tint), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, var(--clay-tint), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: 'Karla', 'Asap', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding: 48px 20px 80px;
}
/* 2026-06: the site-wide ~10% size-up is baked in here — a 110% root
   font-size scales all rem-based type, and .wrap is widened to match.
   (Replaces an earlier `zoom` experiment, which overflowed full-bleed
   layouts.) */
html { font-size: 110%; }
/* Site-wide container width (2026-06): one ~960px centered column across all
   of jen.PT — narrower than the old 1100px to ease reading, uniform so no
   page is wider or narrower than another. */
.wrap { max-width: 960px; margin: 0 auto; }

/* -- Page-top row (back link, right-aligned) -------------------------- */
.page-top {
  display: flex; justify-content: flex-end;
  margin-bottom: 14px;
}
.back {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: .82rem; font-weight: 500;
  color: var(--ink-soft);
  transition: color .15s ease;
  font-family: 'Karla', 'Asap', sans-serif;
}
.back:hover { color: var(--teal); }
.back svg { width: 14px; height: 14px; flex: none; }

/* -- Header row (kicker on left, print button on right) -------------- */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.header-row .toolbar { margin-top: 0; flex-shrink: 0; }

/* -- Kicker + header -------------------------------------------------- */
.kicker {
  font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  font-size: .72rem; color: var(--teal);
  display: inline-flex; align-items: center; gap: .55em;
}
.kicker::before {
  content: ""; width: 26px; height: 1.5px; background: var(--teal);
}

h1 {
  font-family: 'Lora', 'Fraunces', serif; font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.05; letter-spacing: -.01em;
  margin: .35em 0 .2em; color: var(--ink);
}
h1 em { font-style: italic; color: var(--teal); }

.sub {
  font-size: 1.08rem; color: var(--ink-soft);
  max-width: 60ch;
}

/* -- Toolbar (print button) ------------------------------------------- */
.toolbar {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px;
}
.toolbar button {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft); padding: 7px 14px; border-radius: 8px;
  font-family: 'Karla', 'Asap', sans-serif; font-size: .84rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s ease, color .15s ease;
}
.toolbar button:hover { border-color: var(--teal); color: var(--teal); }
.toolbar button svg { width: 14px; height: 14px; }

/* -- Section heads ---------------------------------------------------- */
section { margin-top: 46px; }

.sec-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sage); flex: none;
}
h2 {
  font-family: 'Lora', 'Fraunces', serif; font-weight: 600;
  font-size: 1.55rem; letter-spacing: -.01em; color: var(--ink);
}

p.body, .lead { font-size: 1.04rem; color: var(--ink-soft); }
p.body + p.body { margin-top: 12px; }
.lead { margin-bottom: 6px; font-size: 1.05rem; }

/* -- Figures (SVG illustrations) -------------------------------------- *
   SVG text size scale — three tiers, set via font-size attribute on
   each <text> element:
     headline (22)  feature labels — "Now" / "Goal" below dials
     primary  (16)  key terms inside or anchoring shapes — "spinal cord"
     detail   (14)  descriptive labels, axis ticks, sublabels — minimum
                    readable size for SVG body text
   Use 16 only when the text is the visual anchor of a shape. Default
   to 14 for everything that isn't headline or anchor.

   COLLISION RULE — text must not overlap or sit beneath illustration
   shapes, with one exception: text intentionally placed inside a shape
   that holds it (e.g. "spinal cord + brain" inside the amplifier
   polygon; "gentle / movement" labeling the arrow between dial gauges).
   When bumping a size during cleanup, re-check spacing around every
   shape edge in the SVG — a 2-3px font bump can nudge text under a
   line or stroke without warning.
   --------------------------------------------------------------------- */
figure { margin: 24px 0; text-align: center; }
figure svg {
  max-width: 100%; height: auto; border-radius: var(--radius);
  background: var(--paper-2); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 12px;
}
figcaption {
  font-size: .9rem; color: var(--ink-soft); margin-top: 10px;
  font-style: italic; font-family: 'Lora', 'Fraunces', serif;
}

/* -- Step / numbered cards -------------------------------------------- */
.steps { display: grid; gap: 14px; }
.step {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.step::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--sage);
}
.step h3 {
  font-family: 'Lora', 'Fraunces', serif; font-size: 1.15rem;
  color: var(--teal-deep); margin-bottom: 5px;
}
.step p { font-size: .98rem; color: var(--ink-soft); }
@media (min-width: 640px) {
  .steps.two-col { grid-template-columns: 1fr 1fr; }
}

/* -- "Things you may notice" Q&A items -------------------------------- */
.noticed { display: grid; gap: 14px; }
.item {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.item .q {
  font-family: 'Lora', 'Fraunces', serif; font-weight: 600;
  color: var(--ink); font-size: 1.06rem;
  margin-bottom: 7px; display: block;
}
.item .q::before {
  content: "\201C"; color: var(--sage); font-size: 1.2em;
  line-height: 0; vertical-align: -.2em; margin-right: .05em;
}
.item .q::after {
  content: "\201D"; color: var(--sage); font-size: 1.2em;
  line-height: 0; vertical-align: -.4em; margin-left: .03em;
}
.item p { color: var(--ink-soft); font-size: .98rem; }
.item p + p { margin-top: 10px; }
.remind {
  display: block; margin-top: 10px; background: var(--clay-tint);
  border-radius: 10px; padding: 10px 13px;
  font-size: .93rem; color: var(--teal-deep); font-style: italic;
}

/* -- Shift / reframing rows ------------------------------------------- */
.shift { display: grid; grid-template-columns: 1fr; gap: 14px; }
.shift-row {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.shift-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--sage);
}
.shift-row h3 {
  font-family: 'Lora', 'Fraunces', serif; font-size: 1.15rem;
  color: var(--teal-deep); margin-bottom: 6px;
}
.shift-row p { font-size: .97rem; color: var(--ink-soft); }
@media (min-width: 640px) {
  .shift { grid-template-columns: 1fr 1fr; }
}

/* -- Tiger / analogy callout ------------------------------------------ */
.tiger {
  background: var(--sage-tint); border: 1px solid var(--sage);
  border-radius: var(--radius); padding: 18px 22px; margin-top: 16px;
  font-size: 1rem; color: var(--ink);
}
.tiger b { color: var(--teal-deep); font-family: 'Lora', 'Fraunces', serif; }

/* -- "This is real" validation callout -------------------------------- */
.real {
  background: var(--sage-tint); border: 1px solid var(--sage);
  border-radius: var(--radius); padding: 20px 24px;
}
.real h2 {
  color: var(--teal-deep); font-size: 1.35rem; margin-bottom: 8px;
}
.real p { color: var(--ink); font-size: 1rem; }

/* -- Card / list with clean bullets ------------------------------------ */
.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.card p + p { margin-top: 12px; }

ul.clean { list-style: none; display: grid; gap: 12px; }
ul.clean li {
  position: relative; padding-left: 28px; color: var(--ink-soft);
}
ul.clean li::before {
  content: ""; position: absolute; left: 2px; top: .55em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper-2); border: 2px solid var(--teal);
}
ul.clean li b { color: var(--ink); }

.flareplan {
  background: linear-gradient(180deg, var(--sage-tint), var(--paper-2));
  border: 1px solid var(--sage);
}

/* -- Closing affirmation card ----------------------------------------- */
/* Sage (not clay) — closing reads as positive resolution, which belongs
   to the sage/teal family per the color-semantics rule above. */
.closing {
  background: var(--sage-tint); border: 1px solid var(--sage);
  border-radius: var(--radius); padding: 24px; margin-top: 46px;
}
.closing p {
  font-family: 'Lora', 'Fraunces', serif; font-size: 1.15rem;
  color: var(--teal-deep); font-style: italic; line-height: 1.5;
}

/* -- Alert callout (red-flag / "when to stop" sections) --------------- */
/* Clay (warm, attention-grabbing) — NOT red, NOT alarm-red. Patient
   handouts shouldn't induce alarm; clay signals "this matters" without
   making the page feel like an ER warning sheet. */
.alert {
  background: var(--clay-tint); border: 1px solid var(--clay);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.alert h2 {
  color: var(--clay-deep); font-size: 1.35rem; margin-bottom: 10px;
}
.alert p, .alert li { color: var(--ink); font-size: 1rem; }
.alert ul.clean li::before { border-color: var(--clay); }
.alert p + ul.clean { margin-top: 10px; }
.alert ul.clean + p { margin-top: 12px; }

/* -- Footer ----------------------------------------------------------- */
/* Standardized single-line, left-aligned format across patient material:
     General handout:  jen.PT * Updated [Month YYYY]
     Adapted handout:  jen.PT * Created [Month YYYY]
   Plain text, no .doc-date span needed. */
footer {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: .86rem; color: var(--ink-soft); text-align: left;
  font-family: 'Karla', 'Asap', sans-serif;
}
/* jen.PT mark in the footer lockup — teal sparkle before the text.
   2rem matches the clinician footer + landing eyebrow mark exactly. */
footer::before {
  content: ""; display: inline-block;
  width: 2rem; height: 2rem; margin-right: .4em; vertical-align: middle;
  background: url(/brand/sparkle-navy.svg) center / contain no-repeat;
}
footer a {
  color: var(--teal); text-decoration: none;
  border-bottom: 1px solid var(--sage);
}
footer a:hover { color: var(--teal-deep); border-color: var(--teal); }

/* -- Subtle reveal on load -------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* -- Print ------------------------------------------------------------ */
@media print {
  body { background: #fff; padding: 0; color: #000; }
  .step, .mech, .real, figure svg, .card, .closing, .tiger, .item, .shift-row {
    box-shadow: none;
  }
  .back, .toolbar, footer a { display: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
  section { break-inside: avoid; }
}

/* -- Selected references (collapsed footnote block on patient handouts) -- */
.refs { margin-top: 26px; }
.refs summary { cursor: pointer; font-family: 'Karla', 'Asap', sans-serif; font-size: .82rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .04em; }
.refs summary:hover { color: var(--teal); }
.refs ol { margin: 10px 0 0; padding-left: 22px; font-size: .8rem; color: var(--ink-soft); }
.refs li { margin-bottom: 6px; line-height: 1.45; }
.refs i { font-style: italic; }
