/* ============================================================
   ItsBranMD Parent Guides — Design System
   Type: Newsreader (display serif) + Hanken Grotesk (UI/body)
   ============================================================ */

:root {
  /* --- Color: warm paper, cobalt, clinical red, calm green --- */
  --paper:        oklch(0.982 0.008 80);   /* warm cream page bg */
  --surface:      oklch(1 0 0);            /* card white */
  --surface-2:    oklch(0.965 0.010 80);   /* subtle warm fill */
  --ink:          oklch(0.255 0.012 65);   /* warm near-black text */
  --ink-soft:     oklch(0.46 0.012 70);    /* secondary text */
  --ink-faint:    oklch(0.62 0.010 75);    /* meta / captions */
  --line:         oklch(0.905 0.010 80);   /* hairline borders */
  --line-strong:  oklch(0.86 0.012 80);

  --cobalt:       oklch(0.48 0.165 264);   /* primary */
  --cobalt-deep:  oklch(0.40 0.165 264);
  --cobalt-soft:  oklch(0.95 0.035 264);   /* tint bg */
  --cobalt-ring:  oklch(0.48 0.165 264 / 0.30);

  --red:          oklch(0.535 0.175 28);   /* emergency, warnings only */
  --red-deep:     oklch(0.46 0.175 28);
  --red-soft:     oklch(0.962 0.028 33);   /* warning card bg */
  --red-line:     oklch(0.86 0.060 33);

  --green:        oklch(0.52 0.085 160);   /* reassurance */
  --green-soft:   oklch(0.965 0.030 160);
  --green-line:   oklch(0.86 0.045 160);

  --amber:        oklch(0.70 0.12 70);     /* home-care accent */
  --amber-soft:   oklch(0.965 0.035 75);
  --amber-line:   oklch(0.87 0.055 75);

  /* --- Type --- */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* --- Radius --- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* --- Shadow --- */
  --sh-sm: 0 1px 2px oklch(0.4 0.02 70 / 0.06), 0 1px 1px oklch(0.4 0.02 70 / 0.04);
  --sh-md: 0 4px 14px oklch(0.4 0.02 70 / 0.07), 0 1px 3px oklch(0.4 0.02 70 / 0.05);
  --sh-lg: 0 18px 48px oklch(0.35 0.03 70 / 0.12), 0 4px 12px oklch(0.35 0.03 70 / 0.06);

  /* --- Layout --- */
  --maxw: 1120px;
  --readw: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 640px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.4em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 650; }
img { max-width: 100%; display: block; }

::selection { background: var(--cobalt-soft); }

:focus-visible {
  outline: 3px solid var(--cobalt-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.read { max-width: var(--readw); margin-left: auto; margin-right: auto; }
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .section { padding: 40px 0; }
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin: 0 0 14px;
}
.eyebrow.muted { color: var(--ink-faint); }

.lede { font-size: 1.18rem; color: var(--ink-soft); line-height: 1.55; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.982 0.008 80 / 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .bar {
  display: flex; align-items: center; gap: 18px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  font-family: var(--serif); font-weight: 600; font-size: 1.34rem;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
}
.brand .mark b { color: var(--cobalt); font-weight: 600; }
.brand .sub {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 650; white-space: nowrap;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint);
  line-height: 1; padding-left: 11px; border-left: 1px solid var(--line-strong);
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a.navlink {
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: var(--r-sm);
}
.nav a.navlink:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
@media (max-width: 560px) {
  .nav .navlink { display: none; }
  .site-head .bar { gap: 10px; }
  .brand .sub { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--sans); font-weight: 650; font-size: 0.98rem;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--cobalt-deep); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-sm { padding: 9px 15px; font-size: 0.9rem; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.01em;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }
.badge.cobalt { background: var(--cobalt-soft); color: var(--cobalt-deep); border-color: transparent; }
.badge.red { background: var(--red-soft); color: var(--red-deep); border-color: var(--red-line); }
.badge.red .dot { background: var(--red); }
.badge.green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.badge.green .dot { background: var(--green); }

.cred-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}

/* Guide list card */
.guide-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 22px 20px;
  box-shadow: var(--sh-sm); text-decoration: none; color: inherit;
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative; height: 100%;
}
.guide-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--sh-md); border-color: var(--line-strong);
}
.guide-card .gc-title {
  font-family: var(--serif); font-size: 1.22rem; font-weight: 560;
  line-height: 1.18; color: var(--ink); letter-spacing: -0.01em;
}
.guide-card .gc-answer { font-size: 0.96rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.guide-card .gc-foot {
  margin-top: auto; padding-top: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 650; color: var(--ink-faint);
}
.guide-card .gc-foot .arrow { color: var(--cobalt); transition: transform .16s ease; }
.guide-card:hover .gc-foot .arrow { transform: translateX(3px); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Cluster tile */
.cluster-tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 20px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit; box-shadow: var(--sh-sm);
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.cluster-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--cobalt); }
.cluster-tile .ct-ico {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 8px;
  display: grid; place-items: center; background: var(--cobalt-soft); color: var(--cobalt-deep);
}
.cluster-tile .ct-name { font-family: var(--serif); font-size: 1.08rem; font-weight: 560; color: var(--ink); line-height: 1.15; }
.cluster-tile .ct-count { font-size: 0.82rem; font-weight: 650; color: var(--ink-faint); }

/* ---------- Search ---------- */
.searchbox { position: relative; }
.searchbox input {
  width: 100%; font-family: var(--sans); font-size: 1.08rem;
  padding: 17px 20px 17px 52px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); box-shadow: var(--sh-sm);
}
.searchbox input::placeholder { color: var(--ink-faint); }
.searchbox input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-ring); }
.searchbox .s-ico { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }

/* ---------- Guide page content blocks ---------- */
.qa-block {
  background: var(--cobalt-soft); border: 1px solid oklch(0.88 0.05 264);
  border-radius: var(--r-lg); padding: 26px 28px;
}
.qa-block .qa-label {
  font-family: var(--sans); font-weight: 750; font-size: 0.76rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cobalt-deep);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.qa-block p { font-size: 1.22rem; line-height: 1.5; color: var(--ink); margin: 0; }
.qa-block p strong { color: var(--cobalt-deep); }

/* Callout sections (warning / reassure / home) */
.callout { border-radius: var(--r-lg); padding: 24px 26px; border: 1px solid var(--line); background: var(--surface); }
.callout + .callout { margin-top: 18px; }
.callout .co-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.callout .co-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.callout h3 { margin: 0; font-size: 1.34rem; }
.callout .co-sub { font-size: 0.92rem; color: var(--ink-soft); margin: 2px 0 0; }

.callout.warn { background: var(--red-soft); border-color: var(--red-line); }
.callout.warn .co-ico { background: var(--red); color: #fff; }
.callout.warn h3 { color: var(--red-deep); }

.callout.reassure { background: var(--green-soft); border-color: var(--green-line); }
.callout.reassure .co-ico { background: var(--green); color: #fff; }
.callout.reassure h3 { color: var(--green); }

.callout.home { background: var(--amber-soft); border-color: var(--amber-line); }
.callout.home .co-ico { background: var(--amber); color: oklch(0.30 0.06 70); }
.callout.home h3 { color: oklch(0.40 0.07 70); }

/* Checklists inside callouts */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.04rem; line-height: 1.45; }
.checklist li .ck { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; margin-top: 1px; }
.checklist.warn-list li .ck { background: oklch(0.92 0.06 33); color: var(--red-deep); }
.checklist.reassure-list li .ck { background: oklch(0.92 0.05 160); color: var(--green); }
.checklist.home-list li { counter-increment: step; }
.checklist.home-list li .ck { background: oklch(0.90 0.06 75); color: oklch(0.40 0.07 70); font-weight: 750; font-size: 0.85rem; }

/* Reference table (e.g. normal breath rates) */
.reftable { width: 100%; border-collapse: collapse; font-size: 1rem; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.reftable caption { text-align: left; font-weight: 650; color: var(--ink-soft); padding: 0 0 10px; font-size: 0.95rem; }
.reftable th, .reftable td { padding: 13px 16px; text-align: left; }
.reftable thead th { background: var(--cobalt); color: #fff; font-weight: 650; font-size: 0.9rem; letter-spacing: 0.01em; }
.reftable tbody tr:nth-child(even) { background: var(--surface-2); }
.reftable tbody tr { border-top: 1px solid var(--line); }
.reftable td:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Video embed (placeholder) ---------- */
.video-frame {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: oklch(0.22 0.02 264); aspect-ratio: 16 / 9; box-shadow: var(--sh-md);
  border: 1px solid oklch(0.30 0.02 264);
  display: grid; place-items: center; cursor: pointer;
  background-image: repeating-linear-gradient(135deg, oklch(0.25 0.02 264) 0 14px, oklch(0.235 0.02 264) 14px 28px);
}
.video-frame .play {
  width: 74px; height: 74px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; box-shadow: 0 8px 30px oklch(0.2 0.1 28 / 0.5);
  transition: transform .16s ease;
}
.video-frame:hover .play { transform: scale(1.06); }
.video-frame .play svg { margin-left: 4px; }
.video-meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px;
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(transparent, oklch(0.18 0.02 264 / 0.85));
  color: oklch(0.95 0.005 264);
}
.video-meta .av { width: 34px; height: 34px; border-radius: 50%; background: var(--cobalt); display: grid; place-items: center; font-weight: 700; color:#fff; font-size: 0.85rem; flex: none; }
.video-meta .vt { font-size: 0.92rem; font-weight: 600; line-height: 1.2; }
.video-meta .vs { font-size: 0.78rem; opacity: 0.8; }
.video-note { font-size: 0.84rem; color: var(--ink-faint); margin-top: 10px; text-align: center; font-family: var(--sans); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 4px;
  display: flex; align-items: flex-start; gap: 14px;
  font-family: var(--serif); font-size: 1.16rem; font-weight: 560; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q-ico {
  flex: none; width: 26px; height: 26px; margin-top: 2px; color: var(--cobalt);
  transition: transform .2s ease;
}
.faq details[open] summary .q-ico { transform: rotate(45deg); }
.faq .faq-body { padding: 0 4px 20px 44px; color: var(--ink-soft); font-size: 1.02rem; }
.faq .faq-body p { margin: 0; }

/* ---------- Author / About block ---------- */
.author-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm);
}
.author-card .ac-photo {
  width: 84px; height: 84px; border-radius: 16px; flex: none;
  background: repeating-linear-gradient(135deg, var(--cobalt-soft) 0 10px, oklch(0.93 0.03 264) 10px 20px);
  display: grid; place-items: center; color: var(--cobalt-deep);
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem;
  border: 1px solid oklch(0.88 0.04 264);
}
.author-card h3 { margin: 0 0 3px; font-size: 1.25rem; }
.author-card .ac-role { font-size: 0.92rem; font-weight: 650; color: var(--cobalt-deep); margin-bottom: 8px; }
.author-card .ac-bio { font-size: 0.98rem; color: var(--ink-soft); margin: 0; }

.byline { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 0.95rem; }
.byline .ba { width: 42px; height: 42px; border-radius: 50%; flex:none; background: var(--cobalt); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.byline b { color: var(--ink); font-weight: 650; }
.byline .sep { color: var(--line-strong); }

/* ---------- Disclaimer ---------- */
.disclaimer {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px;
  font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5;
  display: flex; gap: 13px; align-items: flex-start;
}
.disclaimer .di-ico { flex: none; color: var(--ink-faint); margin-top: 1px; }

/* ---------- Email signup ---------- */
.signup {
  background: var(--cobalt); color: #fff; border-radius: var(--r-xl);
  padding: 44px; text-align: center; position: relative; overflow: hidden;
}
.signup::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 140% at 100% 0%, oklch(0.56 0.16 264) 0%, transparent 55%);
  pointer-events: none;
}
.signup > * { position: relative; }
.signup h2 { color: #fff; font-size: 1.9rem; margin-bottom: 8px; }
.signup p { color: oklch(0.92 0.04 264); margin: 0 auto 22px; max-width: 460px; }
.signup-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.signup-form input {
  flex: 1; padding: 14px 18px; border-radius: var(--r-pill); border: none;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
}
.signup-form input:focus { outline: 3px solid oklch(0.75 0.1 264); }
.signup .fine { font-size: 0.8rem; color: oklch(0.85 0.05 264); margin: 14px 0 0; }
@media (max-width: 520px) {
  .signup { padding: 32px 22px; }
  .signup-form { flex-direction: column; }
}

/* ---------- Sticky "When to get help" ---------- */
.help-fab {
  position: fixed; z-index: 60; right: 22px; bottom: 22px;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 0.95rem;
  padding: 13px 19px; border-radius: var(--r-pill); border: none; cursor: pointer;
  box-shadow: 0 10px 30px oklch(0.5 0.15 28 / 0.4); text-decoration: none;
  transition: transform .14s ease, box-shadow .18s ease;
}
.help-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px oklch(0.5 0.15 28 / 0.5); text-decoration: none; }
.help-fab .pulse { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 oklch(1 0 0 / 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(1 0 0 / 0.55); } 70% { box-shadow: 0 0 0 10px oklch(1 0 0 / 0); } 100% { box-shadow: 0 0 0 0 oklch(1 0 0 / 0); } }
@media (max-width: 640px) {
  .help-fab { left: 14px; right: 14px; bottom: 14px; justify-content: center; padding: 15px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .help-fab .pulse { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Emergency strip ---------- */
.emergency-strip {
  background: var(--red-soft); border: 1px solid var(--red-line);
  border-radius: var(--r-md); padding: 12px 16px;
  display: flex; align-items: center; gap: 11px; font-size: 0.92rem; color: var(--red-deep);
  font-weight: 600;
}
.emergency-strip svg { flex: none; }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--ink-faint); font-weight: 600; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-soft); }
.crumbs .sep { opacity: 0.6; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface-2); margin-top: 40px; }
.site-foot .fcols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding: 48px 0 36px; }
.site-foot .fbrand .mark { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
.site-foot .fbrand .mark b { color: var(--cobalt); }
.site-foot .fbrand p { font-size: 0.92rem; color: var(--ink-soft); max-width: 320px; margin: 10px 0 16px; }
.site-foot h4 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-foot a.flink { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
.site-foot a.flink:hover { color: var(--cobalt); }
.site-foot .fbot { border-top: 1px solid var(--line); padding: 18px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-faint); }
.social-row { display: flex; gap: 10px; }
.social-row a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.social-row a:hover { color: var(--cobalt); border-color: var(--cobalt); }
@media (max-width: 720px) { .site-foot .fcols { grid-template-columns: 1fr 1fr; } .site-foot .fbrand { grid-column: 1 / -1; } }

/* ---------- Layer transition (urgent → deeper) ---------- */
.layer-transition { display: flex; align-items: center; gap: 16px; margin: 6px 0 22px; }
.layer-transition .ln { flex: 1; height: 1px; background: var(--line-strong); }
.layer-transition .lbl {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 8px; text-align: center;
}
@media (max-width: 560px) {
  .layer-transition { gap: 10px; }
  .layer-transition .lbl { font-size: 0.66rem; letter-spacing: 0.06em; }
}

/* ---------- Deep-dive ("Why this happens") ---------- */
.deep-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 30px 30px 12px;
}
.deep-card .deep-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.deep-card .deep-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--cobalt-soft); color: var(--cobalt-deep);
}
.deep-card .deep-head h2 { margin: 0; font-size: 1.6rem; }
.deep-card .deep-head p { margin: 4px 0 0; font-size: 0.96rem; color: var(--ink-soft); }
.deep-accordion { margin-top: 18px; }
.deep-accordion details { border-top: 1px solid var(--line); }
.deep-accordion details:last-child { border-bottom: 1px solid var(--line); }
.deep-accordion summary {
  list-style: none; cursor: pointer; padding: 17px 2px;
  display: flex; align-items: center; gap: 13px;
  font-family: var(--serif); font-size: 1.16rem; font-weight: 560; color: var(--ink);
}
.deep-accordion summary::-webkit-details-marker { display: none; }
.deep-accordion summary .d-tog {
  flex: none; width: 26px; height: 26px; border-radius: 7px; margin-left: auto;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--cobalt); transition: transform .2s ease, background .2s ease;
}
.deep-accordion details[open] summary .d-tog { transform: rotate(45deg); background: var(--cobalt-soft); border-color: transparent; }
.deep-accordion summary .d-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cobalt); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.85rem;
}
.deep-accordion .d-body { padding: 0 2px 20px 41px; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.6; }
.deep-accordion .d-body p { margin: 0; }
.deep-accordion .d-body strong { color: var(--ink); }

/* ---------- Personal note from Dr. Brandon ---------- */
.note-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--cobalt-soft); border: 1px solid oklch(0.89 0.045 264);
  border-radius: var(--r-lg); padding: 22px 24px;
}
.note-card .nc-av {
  width: 46px; height: 46px; border-radius: 50%; flex: none; background: var(--cobalt); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
}
.note-card .nc-body p { margin: 0; font-size: 1.06rem; line-height: 1.55; color: var(--ink); }
.note-card .nc-body .sig {
  margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--cobalt-deep);
}

/* ---------- Trusted resources ---------- */
.resources { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.resource {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px;
  text-decoration: none; color: inherit; transition: background .15s ease;
}
.resource + .resource { border-top: 1px solid var(--line); }
.resource:hover { background: var(--surface-2); text-decoration: none; }
.resource .rs-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--cobalt);
}
.resource .rs-name { font-weight: 700; font-size: 1rem; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.resource .rs-name .ext { color: var(--ink-faint); }
.resource .rs-desc { font-size: 0.93rem; color: var(--ink-soft); margin: 2px 0 0; line-height: 1.45; }

/* ---------- "Dr. Brandon's tip" inline callout ---------- */
.tip-inline {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 16px;
  background: var(--cobalt-soft); border: 1px solid oklch(0.89 0.045 264);
  border-radius: var(--r-md); padding: 16px 18px;
}
.tip-inline .ti-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--cobalt); color: #fff;
}
.tip-inline .ti-body { font-size: 1rem; line-height: 1.5; }
.tip-inline .ti-body b { color: var(--cobalt-deep); }

/* ---------- Illustration slots (warning section) ---------- */
.illus-block { margin-bottom: 18px; }
.illus-cap { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-deep); margin-bottom: 10px; }
.illus-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.illus-card { background: var(--surface); border: 1px solid var(--red-line); border-radius: var(--r-md); padding: 10px; }
.illus-card image-slot { display: block; width: 100%; height: 116px; }
.illus-card .ic-name { font-weight: 700; font-size: 0.92rem; margin: 9px 2px 1px; color: var(--ink); }
.illus-card .ic-desc { font-size: 0.8rem; color: var(--ink-soft); margin: 0 2px; line-height: 1.35; }
@media (max-width: 560px) { .illus-row { grid-template-columns: 1fr; } .illus-card image-slot { height: 150px; } }

/* ---------- Quick Clips (related Shorts) ---------- */
.clips details { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px 4px; }
.clips summary {
  list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem; color: var(--ink);
}
.clips summary::-webkit-details-marker { display: none; }
.clips summary .cs-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; }
.clips summary .cs-tog { margin-left: auto; color: var(--ink-faint); transition: transform .2s ease; }
.clips details[open] summary .cs-tog { transform: rotate(180deg); }
.clips summary .cs-sub { font-weight: 500; color: var(--ink-faint); font-size: 0.9rem; }
.clips-grid { display: flex; gap: 14px; padding: 4px 18px 18px; flex-wrap: wrap; }
.clip { width: 150px; flex: none; }
.clip .short-frame {
  position: relative; width: 150px; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden;
  background: oklch(0.22 0.02 264); display: grid; place-items: center; cursor: pointer;
  border: 1px solid oklch(0.30 0.02 264);
  background-image: repeating-linear-gradient(135deg, oklch(0.25 0.02 264) 0 12px, oklch(0.235 0.02 264) 12px 24px);
}
.clip .short-frame .play-sm { width: 46px; height: 46px; border-radius: 50%; background: var(--red); display: grid; place-items: center; }
.clip .short-frame .badge-short { position: absolute; top: 8px; left: 8px; background: oklch(0.18 0.02 264 / 0.7); color: #fff; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 7px; border-radius: 5px; }
.clip .clip-label { font-size: 0.84rem; font-weight: 600; color: var(--ink); margin-top: 8px; line-height: 1.3; }

/* ---------- Decision flowchart ---------- */
.flow { max-width: 600px; margin: 0 auto; }
.flow-start {
  text-align: center; font-family: var(--serif); font-size: 1.22rem; font-weight: 560; color: #fff;
  background: var(--cobalt); border-radius: var(--r-md); padding: 14px 18px;
}
.flow-step {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 16px 18px; box-shadow: var(--sh-sm);
}
.flow-qhead { display: flex; gap: 12px; align-items: flex-start; }
.flow-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.82rem; display: grid; place-items: center; margin-top: 1px; }
.flow-q { font-weight: 650; font-size: 1.04rem; line-height: 1.35; color: var(--ink); }
.flow-q .hint { display: block; font-weight: 500; font-size: 0.86rem; color: var(--ink-faint); margin-top: 1px; }
.flow-offramp { display: flex; align-items: center; gap: 10px; margin-top: 13px; padding-left: 38px; flex-wrap: wrap; }
.flow-offramp + .flow-offramp { margin-top: 9px; }
.flow-blabel { font-size: 0.78rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px; }
.flow-end {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem;
  padding: 8px 14px; border-radius: var(--r-pill); line-height: 1.15;
}
.flow-end .fe-ico { display: grid; place-items: center; }
.end-er { background: var(--red); color: #fff; }
.end-call { background: var(--amber-soft); color: oklch(0.42 0.09 65); border: 1px solid var(--amber-line); }
.end-call .fe-ico { color: var(--amber); }
.end-monitor { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.flow-yes { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; padding: 11px 0; }
.flow-yes .yl { font-size: 0.74rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt); }
.flow-yes svg { color: var(--cobalt); flex: none; }

/* ---------- Downloadable reference card ---------- */
.refcard-section { display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; }
@media (max-width: 680px) { .refcard-section { grid-template-columns: 1fr; gap: 24px; justify-items: center; text-align: center; } }
.refcard {
  width: 310px; border-radius: 22px; overflow: hidden; background: var(--surface);
  box-shadow: var(--sh-lg); border: 1px solid var(--line); font-family: var(--sans);
}
.refcard .rc-head { background: var(--cobalt); color: #fff; padding: 18px 20px; position: relative; }
.refcard .rc-head .rc-kicker { font-size: 0.66rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.refcard .rc-head h3 { font-family: var(--serif); color: #fff; font-size: 1.4rem; margin: 4px 0 0; line-height: 1.1; }
.refcard .rc-head .rc-bh { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; background: oklch(1 0 0 / 0.18); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 0.85rem; }
.refcard .rc-body { padding: 16px 20px 18px; }
.refcard .rc-h { font-size: 0.7rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }
.refcard .rc-rates { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 0.82rem; margin-bottom: 16px; }
.refcard .rc-rates .rc-age { color: var(--ink-soft); }
.refcard .rc-rates .rc-val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; white-space: nowrap; }
.refcard .rc-warn { display: grid; gap: 7px; margin-bottom: 14px; }
.refcard .rc-warn li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.84rem; line-height: 1.3; list-style: none; }
.refcard .rc-warn li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-top: 6px; flex: none; }
.refcard ul { margin: 0; padding: 0; }
.refcard .rc-strip { border-radius: 9px; padding: 9px 12px; font-size: 0.8rem; line-height: 1.3; margin-bottom: 8px; }
.refcard .rc-strip b { font-weight: 750; }
.refcard .rc-911 { background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red-deep); }
.refcard .rc-ped { background: var(--amber-soft); border: 1px solid var(--amber-line); color: oklch(0.42 0.09 65); }
.refcard .rc-foot { border-top: 1px solid var(--line); padding: 11px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 0.74rem; }
.refcard .rc-foot b { color: var(--ink); }
.refcard .rc-foot .rc-site { color: var(--cobalt); font-weight: 700; }

/* ---------- Video stage (centerpiece) ---------- */
.video-stage { max-width: 860px; margin: 0 auto; transition: max-width .25s ease; }
.video-stage.cinema { max-width: 1100px; }
.video-stage .video-frame { aspect-ratio: 16 / 9; }

/* ---------- Visual warning: show-don't-tell ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.compare-panel { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-sm); }
.compare-panel .cp-head { padding: 12px 16px; display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.98rem; }
.compare-panel .cp-head .cp-ico { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.compare-panel.ok .cp-head { background: var(--green-soft); color: var(--green); border-bottom: 1px solid var(--green-line); }
.compare-panel.ok .cp-head .cp-ico { background: var(--green); color: #fff; }
.compare-panel.bad .cp-head { background: var(--red-soft); color: var(--red-deep); border-bottom: 1px solid var(--red-line); }
.compare-panel.bad .cp-head .cp-ico { background: var(--red); color: #fff; }
.compare-panel image-slot { display: block; width: 100%; height: 210px; }
.compare-panel .cp-cap { padding: 12px 16px; font-size: 0.94rem; color: var(--ink-soft); line-height: 1.45; }
.compare-panel .cp-cap b { color: var(--ink); }

.signrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .signrow { grid-template-columns: 1fr; } }
.sign { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.sign image-slot { display: block; width: 100%; height: 130px; }
.sign .s-name { font-weight: 700; font-size: 0.96rem; margin: 10px 2px 1px; color: var(--ink); }
.sign .s-line { font-size: 0.84rem; color: var(--ink-soft); margin: 0 2px; line-height: 1.35; }

.warn-extras { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.warn-extras > * { flex: 1 1 240px; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 16px; display: flex; gap: 11px; align-items: flex-start; font-size: 0.92rem; line-height: 1.4; }
.mini-card .mc-ico { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--cobalt-soft); color: var(--cobalt-deep); }
.mini-card b { color: var(--ink); }
.warn-close { background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red-deep); border-radius: var(--r-md); padding: 15px 18px; font-weight: 600; font-size: 1.02rem; display: flex; gap: 11px; align-items: center; }
.warn-close svg { flex: none; }

.support-clips .sc-head { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.95rem; color: var(--ink); margin-bottom: 12px; }
.support-clips .sc-head .badge-live { background: var(--red); color: #fff; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 5px; }

/* ---------- Deeper-content band ---------- */
.deeper-band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Misc utility ---------- */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: var(--gap, 16px); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tab { padding: 9px 16px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); cursor: pointer; text-decoration: none; }
.pill-tab:hover { border-color: var(--cobalt); color: var(--cobalt); text-decoration: none; }
.pill-tab.active { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.hide-empty:empty { display: none; }

/* ---------- Print: save reference card ---------- */
#printHost { display: none; }
@media print {
  body.printing > *:not(#printHost) { display: none !important; }
  body.printing #printHost { display: grid !important; place-items: center; min-height: 100vh; }
  body.printing #printHost .refcard { box-shadow: none; width: 360px; }
  body.printing .help-fab { display: none !important; }
}
