/* ClergyTrak marketing site — design system mirrors the app.
   Palette: warm-cream base, forest (housing) + navy (ministry) primaries,
   brass accent, ink text. Typeface: Inter. */

:root {
  --cream: #F5F0E6;
  --cream-2: #EFE8D8;
  --surface: #FFFFFF;
  --ink: #1E2520;
  --secondary: #4A4438;
  --muted: #7A6F5C;
  --forest: #234234;
  --forest-deep: #1B3328;
  --navy: #1E3A52;
  --brass: #C19A4B;
  --brass-soft: #D8B877;
  --brass-ink: #7E5F26; /* darker brass for small text on cream/white (WCAG AA) */
  --border: #E2DAC4;
  --hairline: #ECE4D2;
  --shadow: 0 18px 50px rgba(35, 66, 52, 0.10);
  --shadow-sm: 0 6px 20px rgba(35, 66, 52, 0.08);
  --shadow-lift: 0 22px 54px rgba(35, 66, 52, 0.14);
  --shadow-panel: 0 16px 50px rgba(35, 66, 52, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --maxw: 1080px;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;
  --dur-slow: 640ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.center { text-align: center; }
.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--forest); color: #fff; font-weight: 600;
  padding: 10px 18px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { left: 12px; }
.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;
}

/* ---------- Typography ---------- */
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 14px; }
.lead { font-size: 1.12rem; color: var(--secondary); }
.lead.center { max-width: 620px; margin-left: auto; margin-right: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass-ink);
  margin: 0 0 14px;
}
.eyebrow.center { text-align: center; }

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.seal {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--forest); color: var(--brass-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
}
.seal-lg { width: 76px; height: 76px; border-radius: 20px; font-size: 42px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.25;
  padding: 14px 24px; border-radius: 14px; text-decoration: none;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center; white-space: normal;
  appearance: none; -webkit-appearance: none;
}
.btn-sm { white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--forest-deep); box-shadow: var(--shadow); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border-color: #D5CBB0; box-shadow: 0 2px 10px rgba(35, 66, 52, 0.06);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--forest); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 9px 18px; font-size: 0.92rem; border-radius: 11px; }
.btn-lg { padding: 17px 32px; font-size: 1.08rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 240, 230, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a:not(.btn) { color: var(--secondary); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav-links a:not(.btn):hover { color: var(--forest); }
.nav-links-cta { display: none; }
.nav .btn-primary { margin-left: 8px; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  background: transparent; border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer;
}
.nav-toggle-icon { display: block; position: relative; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px;
  border-radius: 2px; background: var(--ink);
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 84px;
  background:
    radial-gradient(1100px 480px at 80% -8%, rgba(193,154,75,0.14), transparent 60%),
    linear-gradient(180deg, #FBF8F1 0%, var(--cream) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 26px; max-width: 540px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.microtrust { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ---------- Video embeds ---------- */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, var(--forest), var(--navy));
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.10);
}
.video-embed--portrait { aspect-ratio: 9 / 14; max-width: 320px; margin: 0 auto; }
.video-embed video, .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-embed .seal { background: rgba(255,255,255,0.10); color: var(--brass-soft); }
.play {
  width: 78px; height: 78px; border-radius: 50%;
  background: rgba(255,255,255,0.94); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25); transition: transform .15s ease;
  z-index: 2;
}
.play:hover { transform: scale(1.06); }
.play-icon { color: var(--forest); font-size: 26px; margin-left: 4px; }
.video-caption {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,0.92); font-size: 0.85rem; font-weight: 500;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4); z-index: 2;
}

/* ---------- Hero preview mockup (illustrative, pending a real screenshot) ---------- */
.hero-preview {
  position: relative;
  background: linear-gradient(155deg, var(--forest), var(--navy));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 22px;
}
.hero-preview-head {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 0.92rem;
  margin-bottom: 16px;
}
.hero-preview-head .seal { background: rgba(255,255,255,0.14); color: var(--brass-soft); }
.hero-preview-body {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 0 18px; box-shadow: var(--shadow-sm);
}
.hero-preview-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--hairline);
  font-size: 0.92rem; color: var(--secondary);
}
.hero-preview-row strong { color: var(--ink); font-weight: 700; }
.hero-preview-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 15px; font-weight: 700; color: var(--ink);
}
.hero-preview-total strong { color: var(--forest); font-size: 1.3rem; }
.hero-preview-chip {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; font-size: 0.82rem;
  padding: 8px 14px; border-radius: 999px;
}

/* ---------- Phone preview mockup (illustrative, pending a real demo capture) ---------- */
.phone-preview {
  position: relative; width: min(260px, 100%); margin: 0 auto;
  aspect-ratio: 9 / 17.5;
  background: linear-gradient(155deg, var(--forest-deep), var(--navy));
  border-radius: 34px; padding: 12px;
  box-shadow: var(--shadow-lift); border: 1px solid rgba(255,255,255,0.12);
}
.phone-preview-screen {
  position: relative; height: 100%;
  background: var(--cream); border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 46px 16px 16px;
}
.phone-preview-topbar {
  position: absolute; top: 16px; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.8rem; color: var(--forest);
}
.phone-preview-topbar .seal { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }
.rc-card {
  width: 100%; max-width: 190px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 16px 14px 20px; font-size: 0.78rem; color: var(--muted);
  clip-path: polygon(0 0, 100% 0, 100% 96%, 90% 100%, 80% 96%, 70% 100%, 60% 96%, 50% 100%, 40% 96%, 30% 100%, 20% 96%, 10% 100%, 0 96%);
}
.rc-head { font-weight: 800; letter-spacing: 0.1em; font-size: 0.72rem; color: var(--secondary); margin-bottom: 12px; }
.rc-line { height: 6px; border-radius: 3px; background: var(--cream-2); margin-bottom: 8px; }
.rc-line.w80 { width: 80%; } .rc-line.w70 { width: 70%; } .rc-line.w60 { width: 60%; }
.rc-total {
  display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed var(--border); font-weight: 800; color: var(--ink); font-size: 0.82rem;
}
.rc-chip {
  margin-top: 18px; background: var(--forest); color: #fff; font-weight: 700; font-size: 0.72rem;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Trust strip ----------
   A quiet hairline band of genuine signals directly under the hero.
   Policy: real facts only — never fabricated testimonials or counts. */
.trust-strip { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: rgba(255,255,255,0.45); }
.trust-strip-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px 38px; padding-top: 18px; padding-bottom: 18px;
}
.trust-item {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--secondary); font-size: 0.88rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
a.trust-item:hover { color: var(--forest); }
.trust-glyph { width: 18px; height: 18px; flex: none; color: var(--brass-ink); }

/* ---------- Voices (testimonials framework; section ships commented out
   in index.html until real, permissioned quotes exist) ---------- */
.voices { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.voices-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 40px; }
.voice-card {
  margin: 0; background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.voice-card blockquote {
  margin: 0 0 16px; font-family: 'Fraunces', Georgia, serif;
  font-size: 1.12rem; line-height: 1.5; color: var(--ink);
}
.voice-card figcaption { color: var(--muted); font-size: 0.88rem; }

/* ---------- Pain ---------- */
.pain { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.pain h2 { margin-bottom: 44px; max-width: 680px; margin-left: auto; margin-right: auto; }
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pain-card {
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 24px 20px;
}
.pain-icon {
  width: 44px; height: 44px; margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--forest);
  background: rgba(35, 66, 52, 0.06); border: 1px solid var(--hairline);
}
.pain-icon svg { width: 26px; height: 26px; }
.pain-card h3 { margin-bottom: 6px; font-size: 1.06rem; }
.pain-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------- How it works ---------- */
.how h2 { margin-bottom: 48px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--forest); color: var(--brass-soft);
  font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--secondary); }

/* ---------- Demo ---------- */
.demo { background: var(--cream-2); }
.demo-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.demo-copy .lead { margin-bottom: 24px; max-width: 480px; }

/* ---------- App + web split ---------- */
.platform { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.platform .lead { margin-bottom: 34px; }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.platform-card {
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
}
.platform-card--web { background: #fff; border-color: rgba(35,66,52,0.25); }
.platform-label {
  display: inline-flex; margin: 0 0 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(35,66,52,0.08); color: var(--forest); font-size: 0.78rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.11em;
}
.platform-card h3 { margin-bottom: 14px; }
.platform-card ul { margin: 0 0 22px; padding-left: 20px; display: grid; gap: 9px; }
.platform-card li { color: var(--secondary); line-height: 1.45; }

/* ---------- Features ---------- */
.features h2 { margin-bottom: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.feature h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--secondary); font-size: 0.98rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-forest { background: var(--forest); }
.dot-navy { background: var(--navy); }
.dot-brass { background: var(--brass); }

/* ---------- Access tiers ---------- */
.third-number { background: var(--cream-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.third-number .lead.center { max-width: 780px; margin-left: auto; margin-right: auto; }

.access { background: var(--cream-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.access .lead { margin-bottom: 34px; }
.access-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.access-grid--two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.access-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.access-card--pro { border-color: rgba(35,66,52,0.32); }
.access-kicker {
  margin: 0 0 8px; color: var(--brass-ink); font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.access-card h3 { margin-bottom: 14px; }
.access-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.access-card li { position: relative; padding-left: 22px; color: var(--secondary); font-size: 0.96rem; line-height: 1.45; }
.access-card li::before {
  content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--forest);
}
.comparison-card {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.comparison-card h3 { margin-bottom: 14px; }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.comparison-table thead th {
  border-top: none;
  color: var(--forest);
  font-size: 0.95rem;
}
.comparison-table tbody th {
  color: var(--ink);
  font-size: 0.96rem;
  width: 44%;
}
.comparison-table tbody td {
  color: var(--secondary);
  font-size: 0.96rem;
}
.comparison-table tbody td:last-child {
  background: rgba(35, 66, 52, 0.05);
}
.compare-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.compare-pill--yes {
  background: rgba(35, 66, 52, 0.08);
  color: var(--forest);
}
.compare-pill--pro {
  background: rgba(35, 66, 52, 0.14);
  color: var(--forest-deep);
  box-shadow: inset 0 0 0 1px rgba(35, 66, 52, 0.12);
}
.compare-pill--no {
  background: rgba(122, 111, 92, 0.10);
  color: var(--muted);
}
.access-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Founder ---------- */
.founder { background: var(--forest); color: #fff; }
.founder-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.founder .eyebrow { color: var(--brass-soft); }
.founder .seal-lg { background: rgba(255,255,255,0.10); color: var(--brass-soft); }
.founder blockquote {
  margin: 0 0 14px; font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 600;
  line-height: 1.4; letter-spacing: -0.01em; color: #fff;
}
.founder-attr { margin: 0; color: rgba(255,255,255,0.75); font-weight: 500; }

/* ---------- Lead magnet ---------- */
.lead-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: 44px 40px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
}
.lead-card .lead { margin-bottom: 0; }
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.lead-form input {
  font-family: inherit; font-size: 1rem; padding: 15px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--cream);
  color: var(--ink); width: 100%;
}
.lead-form input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(193,154,75,0.18); }
.lead-form .btn { width: 100%; }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 2px 0 0; }
.form-note.success { color: var(--forest); font-weight: 600; }
.form-note.error { color: #B4452F; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq h2 { margin-bottom: 36px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 20px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.06rem; padding: 16px 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brass); font-size: 1.4rem; font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 18px; color: var(--secondary); }

/* ---------- Final CTA ---------- */
.final-cta { background: var(--surface); border-top: 1px solid var(--hairline); }
.final-cta h2 { margin-bottom: 10px; }
.final-cta .lead { margin-bottom: 26px; }
.final-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Web dashboard ---------- */
.dash-page { max-width: 1180px; margin: 0 auto; padding: 38px 22px 88px; }
.dash-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 28px; align-items: end; margin-bottom: 22px;
}
.dash-hero h1 { margin-bottom: 12px; }
.dash-actions {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); display: grid; gap: 10px;
}
.dash-label {
  display: block; color: var(--muted); font-size: 0.78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.11em;
}
.dash-select {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  background: #fff; color: var(--ink); font: 700 1rem Inter, system-ui, sans-serif;
}
.dash-status {
  background: rgba(35,66,52,0.08); border: 1px solid rgba(35,66,52,0.14);
  color: var(--forest); border-radius: 14px; padding: 12px 14px; font-weight: 600;
}
.dash-status[data-tone="error"] { background: #fdf1ef; border-color: #f2d2cc; color: #8d3f34; }
.dash-status[data-tone="ok"] { background: #eef6ef; border-color: #cfe5d0; color: var(--forest); }
/* Focus card — one hero number (the excludable amount) with a
   three-segment readiness ring: one arc per housing-allowance number. */
.dash-focus {
  margin-top: 18px;
}
.dash-focus-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 38px; align-items: center;
  background: var(--surface); border: 1px solid rgba(35, 66, 52, 0.30);
  border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--shadow);
}
.dash-ring-wrap { position: relative; width: 250px; height: 250px; margin: 0 auto; }
.dash-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-ring-seg {
  fill: none; stroke: var(--cream-2); stroke-width: 13; stroke-linecap: round;
}
.dash-ring-seg.is-ready { stroke: var(--forest); }
@media (prefers-reduced-motion: no-preference) {
  .dash-ring-seg { transition: stroke 600ms var(--ease-soft); }
}
.dash-ring-center {
  position: absolute; inset: 0; display: grid; place-content: center;
  gap: 5px; text-align: center; padding: 44px;
}
.dash-ring-center strong {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.05; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.dash-ring-center span:last-child { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.dash-focus-side { display: grid; gap: 12px; align-content: center; }
.dash-focus-row {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  border: 1px solid var(--hairline); border-radius: 14px; padding: 13px 16px;
  background: var(--surface);
}
@media (prefers-reduced-motion: no-preference) {
  .dash-focus-row { transition: border-color var(--dur-med) var(--ease-soft), background var(--dur-med) var(--ease-soft); }
}
.dash-focus-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brass); flex: none;
}
.dash-focus-row[data-ready="true"] .dash-focus-dot { background: var(--forest); }
.dash-focus-row > div { display: grid; gap: 2px; min-width: 0; }
.dash-focus-row > div > span { font-weight: 700; color: var(--ink); font-size: 0.95rem; line-height: 1.3; }
.dash-focus-row > div > small { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.dash-focus-row > strong {
  color: var(--forest); font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dash-focus-row[data-ready="false"] > strong { color: var(--brass-ink); font-size: 0.95rem; }
.dash-focus-row[data-lowest="true"] {
  border-color: rgba(35, 66, 52, 0.35); background: #f7faf7;
}
.dash-focus-help { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 900px) {
  .dash-focus-card { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px; }
  .dash-ring-wrap { width: 220px; height: 220px; }
}

.dash-grid { display: grid; gap: 18px; margin-top: 18px; }
.dash-grid--metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-grid--main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.dash-grid--single { grid-template-columns: minmax(0, 1fr); }
.dash-metric,
.dash-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.dash-metric { display: grid; gap: 7px; min-height: 148px; }
.dash-metric--accent { border-color: rgba(35,66,52,0.34); background: #fbfcf9; }
.dash-kicker {
  color: var(--brass); font-size: 0.74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.dash-metric strong { font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1; color: var(--ink); }
.dash-metric span:last-child { color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
.dash-panel h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); margin-bottom: 0; }
.dash-panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 18px; }
.dash-help { color: var(--muted); font-size: 0.94rem; line-height: 1.55; margin: 14px 0 0; }
.dash-limit-list { display: grid; gap: 10px; }
.dash-limit {
  border: 1px solid var(--hairline); border-radius: 14px; padding: 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px;
}
.dash-limit span { font-weight: 700; color: var(--ink); }
.dash-limit strong { color: var(--forest); }
.dash-limit small { grid-column: 1 / -1; color: var(--muted); }
.dash-limit--missing strong { color: #9b5b2f; }
.dash-limit--lowest {
  border-color: rgba(35, 66, 52, 0.35);
  background: #f7faf7;
}
.dash-limit-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.dash-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dash-split div {
  background: var(--cream); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 14px; display: grid; gap: 6px;
}
.dash-split span { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.dash-split strong { font-size: 1.25rem; color: var(--ink); }
.dash-bars { display: grid; gap: 12px; }
.dash-bar-row { display: grid; gap: 7px; }
.dash-bar-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 0.94rem; }
.dash-bar-row strong { color: var(--forest); }
.dash-bar-track { height: 9px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.dash-bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--forest); }
.dash-empty,
.dash-empty-cell { color: var(--muted); font-size: 0.94rem; }
.dash-empty-cell { text-align: center; padding: 22px !important; }
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th,
.dash-table td { text-align: left; border-bottom: 1px solid var(--hairline); padding: 10px 8px; font-size: 0.92rem; }
.dash-table th { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.dash-table td:first-child,
.dash-table th:first-child,
.dash-table td:last-child,
.dash-table th:last-child { white-space: nowrap; }
.dash-table td:last-child,
.dash-table th:last-child { text-align: right; }
.dash-report-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 18px; }
.dash-report-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(168px, 1fr));
  gap: 10px;
  min-width: min(100%, 420px);
  max-width: 420px;
}
.dash-report-actions .btn {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 10px 14px;
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: normal;
}
.dash-report-actions .btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.dash-report-actions .btn--pro { padding-right: 46px; }
.pro-badge {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brass);
  color: var(--forest-deep);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- Year-end packet ---------- */
.packet-page { max-width: 1120px; margin: 0 auto; padding: 34px 22px 88px; }
.packet-toolbar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 26px; align-items: end; margin-bottom: 20px;
}
.packet-document {
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: 42px; margin-top: 18px;
}
.packet-cover {
  min-height: 520px; display: grid; align-content: center; justify-items: center;
  text-align: center; border: 2px solid rgba(35,66,52,0.12); border-radius: 18px;
  padding: 48px 24px; margin-bottom: 34px;
}
.packet-brand { color: var(--forest); font-size: 2.35rem; font-weight: 800; letter-spacing: -0.02em; }
.packet-subtitle { color: var(--muted); font-weight: 700; margin: 8px 0 42px; }
.packet-cover h2 { font-size: clamp(2.2rem, 5vw, 4rem); color: var(--ink); margin-bottom: 16px; }
.packet-cover p { color: var(--secondary); margin-bottom: 6px; }
.packet-section { padding: 28px 0; border-top: 1px solid var(--hairline); break-inside: avoid; }
.packet-section h2 { font-size: 1.45rem; margin-bottom: 16px; }
.packet-summary-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.packet-summary-grid div,
.packet-frv-box div {
  background: var(--cream); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 14px; display: grid; gap: 6px;
}
.packet-summary-grid span,
.packet-frv-box span { color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }
.packet-summary-grid strong,
.packet-frv-box strong { color: var(--ink); font-size: 1.25rem; line-height: 1.15; }
.packet-note { color: var(--muted); font-size: 0.94rem; line-height: 1.55; margin-top: 14px; }
.packet-limit-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.packet-limit {
  border: 1px solid rgba(35,66,52,0.18); border-radius: 14px; padding: 14px;
  display: grid; gap: 6px; background: #fbfcf9;
}
.packet-limit span { font-weight: 700; color: var(--secondary); }
.packet-limit strong { color: var(--forest); font-size: 1.2rem; }
.packet-limit--missing { background: #fff8ed; border-color: rgba(193,154,75,0.38); }
.packet-limit--missing strong { color: #9b5b2f; }
.packet-table { min-width: 760px; }
.packet-table td:last-child,
.packet-table th:last-child { text-align: right; }
.packet-empty { color: var(--muted); }
.packet-callout {
  background: #fff8ed; border: 1px solid rgba(193,154,75,0.4); border-radius: 16px;
  padding: 18px; display: grid; gap: 10px;
}
.packet-callout p { color: var(--secondary); margin: 0; }
.packet-frv-box { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.packet-checklist { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--secondary); }

/* ---------- Church Board Report ---------- */
.board-settings { margin-bottom: 26px; }
.board-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.board-settings-grid label { display: grid; gap: 6px; }
.board-settings-grid label > span { font-size: 0.82rem; font-weight: 700; color: var(--secondary); }
.board-settings-grid input[type="text"],
.board-settings-grid input[type="number"],
.board-settings-grid select {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--surface);
}
.board-settings-check { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 10px; }
.board-settings-check span { font-size: 0.9rem; font-weight: 500 !important; }
.board-body { color: var(--secondary); line-height: 1.65; margin: 0 0 14px; }
.board-suggestion-box { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board-suggestion-result { background: var(--forest) !important; border-color: var(--forest) !important; }
.board-suggestion-result span { color: var(--brass-soft) !important; }
.board-suggestion-result strong { color: #fff !important; }
.board-resolution {
  border: 1px solid rgba(35,66,52,0.22); border-left: 4px solid var(--forest);
  border-radius: 12px; background: #fbfcf9; padding: 20px 22px;
  color: var(--ink); line-height: 1.7;
}
.board-resolution p { margin: 0 0 14px; }
.board-resolution p:last-child { margin-bottom: 0; }
.board-adoption { color: var(--secondary); line-height: 2; }
.board-blank { font-weight: 600; color: var(--ink); }
.board-signatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 46px; }
.board-signature span { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.board-signature-line { border-bottom: 1px solid var(--ink); height: 28px; }
.board-preview-banner {
  background: #fff8ed; border: 1px solid rgba(193,154,75,0.4); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 26px; display: grid; gap: 4px;
  color: var(--secondary); font-size: 0.94rem; line-height: 1.55;
}
.board-preview-banner a { color: var(--forest); font-weight: 700; }

/* ---------- Footer ---------- */
.footer { background: var(--forest-deep); color: rgba(255,255,255,0.82); padding: 40px 0; }
.footer .brand-name { color: #fff; }
.footer .seal { background: rgba(255,255,255,0.10); }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; margin-left: auto; }
.footer-links a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.94rem; }
.footer-links a:hover { color: var(--brass-soft); }
.copyright { width: 100%; margin: 10px 0 0; font-size: 0.85rem; color: rgba(255,255,255,0.55); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .demo-inner, .lead-card { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .demo-media { order: -1; }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .steps, .access-grid, .platform-grid, .dash-hero, .dash-grid--metrics, .dash-grid--main, .packet-toolbar, .packet-summary-grid, .packet-limit-list, .packet-frv-box, .board-settings-grid, .board-suggestion-box, .board-signatures { grid-template-columns: minmax(0, 1fr); }
  .dash-report-panel { display: grid; }
  .dash-report-actions { grid-template-columns: 1fr; max-width: none; }
  .dash-report-actions .btn:last-child:nth-child(odd) { grid-column: auto; }
  .packet-document { padding: 24px 18px; }
  .founder-inner { grid-template-columns: 1fr; gap: 22px; text-align: left; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-cta { display: none; }
  .nav--open .nav-links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 66px; left: 0; right: 0;
    margin: 0; padding: 12px 22px 20px;
    background: var(--cream); border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
  }
  .nav--open .nav-links a:not(.btn) { padding: 10px 0; font-size: 1.05rem; }
  .nav--open .nav-links .nav-links-cta {
    display: inline-flex; align-self: flex-start; margin-top: 10px;
  }
  .section { padding: 60px 0; }
}
@media (max-width: 520px) {
  .pain-grid { grid-template-columns: 1fr; }
  .lead-card { padding: 30px 22px; }
  .cta-row .btn { width: 100%; }
  .dash-split { grid-template-columns: 1fr; }
  .dash-panel-head { display: grid; }
}

@media print {
  .nav, .dash-actions, .dash-report-actions, .packet-toolbar, .dash-status, .btn, .board-settings, .pb-video { display: none !important; }
  body { background: #fff; }
  .dash-page, .packet-page { max-width: none; padding: 0; }
  .dash-grid--metrics { grid-template-columns: repeat(2, 1fr); }
  .dash-grid--main { grid-template-columns: 1fr; }
  .dash-focus-card { grid-template-columns: 1fr; }
  .dash-metric, .dash-panel, .dash-focus-card, .packet-document { box-shadow: none; break-inside: avoid; }
  .packet-document { border: 0; border-radius: 0; padding: 0; }
  .packet-cover { min-height: 9in; page-break-after: always; border-color: #d9d9d9; }
  .packet-section { break-inside: avoid; page-break-inside: avoid; }
}

/* ---------- Pre-launch / launch flip ----------
   Default (pre-launch): [data-soon-only] shows, [data-live-only] hides.
   main.js adds .app-live to <html> when APP_STORE_LIVE = true. */
html:not(.app-live) [data-live-only] { display: none !important; }
html.app-live [data-soon-only] { display: none !important; }

.soon-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(193, 154, 75, 0.14);
  border: 1px solid rgba(193, 154, 75, 0.35);
  color: var(--forest); font-weight: 600; font-size: 0.85rem;
  padding: 6px 14px; border-radius: 999px; margin: 0 0 18px;
}
.soon-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brass);
  animation: soon-pulse 2s ease-in-out infinite;
}
@keyframes soon-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Honeypot field — humans never see it; bots fill it. */
.lead-form .hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

/* ---------- Subpages (privacy, terms, playbook) ---------- */
.page { padding: 56px 0 84px; }
.page-narrow { max-width: 780px; margin: 0 auto; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.page .updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 30px; }
.page .eyebrow { margin-bottom: 10px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.card h3 { color: var(--forest); font-size: 1.02rem; margin: 24px 0 6px; }
.card h3:first-of-type { margin-top: 0; }
.card p, .card li { font-size: 0.98rem; color: var(--secondary); }
.card ul, .card ol { margin: 0 0 14px; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.card a { color: var(--forest); }

.pb-video { margin: 0 0 22px; }
.pb-video video {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); background: var(--forest);
  box-shadow: var(--shadow-sm);
}
.pb-video figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; text-align: center; }

.callout {
  background: var(--cream); border-left: 4px solid var(--brass);
  border-radius: 10px; padding: 16px 20px; margin: 18px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }

/* ---------- Playbook ---------- */
.pb-cover {
  background: linear-gradient(155deg, var(--forest), var(--navy));
  color: #fff; border-radius: 22px; padding: 52px 44px; margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.pb-cover .eyebrow { color: var(--brass-soft); }
.pb-cover h1 { color: #fff; margin-bottom: 12px; }
.pb-cover p { color: rgba(255,255,255,0.85); margin: 0; max-width: 560px; }
.pb-toc { columns: 2; column-gap: 30px; }
.pb-toc li { break-inside: avoid; }
.pb-example {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 16px 0;
}
.pb-example table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.pb-example td { padding: 6px 4px; border-bottom: 1px solid var(--hairline); color: var(--secondary); }
.pb-example tr:last-child td { border-bottom: none; font-weight: 700; color: var(--forest); }
.pb-example td:last-child { text-align: right; white-space: nowrap; }
.pb-check li { margin-bottom: 10px; }
.pb-disclaimer { font-size: 0.88rem; color: var(--muted); }

/* ---------- Playbook topic list (2026-07-24) ----------
   The guide's 3,900 words used to arrive as one continuous scroll. Now every
   topic is a row carrying its own one-line takeaway, so the whole guide reads
   as a single scannable page and the full prose opens only where a pastor
   wants it. Built on native <details> so it works without JS (and prints
   complete): the markup ships OPEN, and main.js collapses it on load — no JS
   means nothing is ever hidden. Understated by intent: hairlines and type,
   no heavy boxes. */
.pb-topics { padding: 0; overflow: hidden; }
.pb-topics-head { padding: 26px 26px 0; }
.pb-topics-hint { font-size: 0.88rem; color: var(--muted); margin: 4px 0 0; }
.pb-topics-tools { display: flex; gap: 10px; padding: 14px 26px 0; }
.pb-topic-list { border-top: 1px solid var(--hairline); margin-top: 18px; }

.pb-topic { border-bottom: 1px solid var(--hairline); }
.pb-topic:last-child { border-bottom: 0; }
.pb-topic > summary {
  display: grid;
  grid-template-columns: 2.1rem 1fr 1.1rem;
  align-items: baseline;
  column-gap: 14px; row-gap: 0;
  padding: 18px 26px;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur-fast) var(--ease-soft);
}
/* Explicit placement keeps <summary> valid: the number, heading, chevron and
   gist are siblings (a <summary> may hold phrasing + heading content only —
   no wrapper divs). */
.pb-topic-num { grid-column: 1; grid-row: 1; }
.pb-topic-title { grid-column: 2; grid-row: 1; }
.pb-topic-chev { grid-column: 3; grid-row: 1; }
.pb-topic-gist { grid-column: 2; grid-row: 2; }
.pb-topic > summary::-webkit-details-marker { display: none; }
.pb-topic > summary:hover { background: var(--cream); }
.pb-topic > summary:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }

/* Roman numerals in the display face — the same engraved treatment the
   homepage figures use. */
.pb-topic-num {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.95rem; font-weight: 600; color: var(--brass);
  font-variant-numeric: lining-nums; letter-spacing: 0.02em;
}
.pb-topic-num--move {
  font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass);
  white-space: nowrap;
}
/* "MOVE 1" needs a wider gutter than a bare chapter numeral, and the moves sit
   inside chapter 8's three groups — a small indent shows that belonging. */
.pb-topic:has(.pb-topic-num--move) > summary {
  grid-template-columns: 3.5rem 1fr 1.1rem;
  padding-left: 34px;
}
.pb-topic:has(.pb-topic-num--move) > .pb-topic-body {
  padding-left: calc(34px + 3.5rem + 14px);
}
@media (max-width: 640px) {
  .pb-topic:has(.pb-topic-num--move) > summary {
    grid-template-columns: 3.2rem 1fr 1rem; padding-left: 18px;
  }
  .pb-topic:has(.pb-topic-num--move) > .pb-topic-body { padding-left: 18px; }
}
.pb-topic-title {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 1.12rem; line-height: 1.3; color: var(--ink);
  margin: 0;
}
.pb-topic-gist {
  display: block; margin-top: 5px;
  font-size: 0.93rem; line-height: 1.5; color: var(--muted); max-width: 60ch;
}
/* The chevron is drawn, not a glyph, so it rotates cleanly. */
.pb-topic-chev {
  justify-self: end; width: 9px; height: 9px; margin-top: 6px;
  border-right: 1.5px solid var(--brass); border-bottom: 1.5px solid var(--brass);
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-soft);
}
.pb-topic[open] > summary { background: var(--cream); }
.pb-topic[open] .pb-topic-chev { transform: rotate(225deg); margin-top: 9px; }
.pb-topic[open] .pb-topic-gist { color: var(--secondary); }

.pb-topic-body { padding: 4px 26px 26px calc(26px + 2.1rem + 14px); }
.pb-topic-body > :first-child { margin-top: 0; }
.pb-topic-body > :last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .pb-topic > summary { grid-template-columns: 1.7rem 1fr 1rem; gap: 10px; padding: 16px 18px; }
  .pb-topics-head, .pb-topics-tools { padding-left: 18px; padding-right: 18px; }
  .pb-topic-body { padding: 4px 18px 22px 18px; }
  .pb-topic-title { font-size: 1.04rem; }
}
/* Group labels between the Moves keep the three "acts" intact in the list. */
.pb-topic-group {
  margin: 0; padding: 20px 26px 8px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(245,240,230,0.6), transparent);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brass);
}
@media (prefers-reduced-motion: reduce) {
  .pb-topic > summary, .pb-topic-chev { transition: none; }
}
/* Print: every topic complete, no chevrons, no controls. main.js also forces
   each <details open> before printing, so a saved PDF is the whole guide. */
@media print {
  .pb-topics-tools, .pb-topic-chev, .pb-topics-hint { display: none !important; }
  .pb-topic { border-bottom: 0; break-inside: avoid; }
  .pb-topic > summary { padding: 0; background: none !important; break-after: avoid; }
  .pb-topic-body { padding: 0 0 18px 0; }
  .pb-topic-gist { color: #444; font-style: italic; }
}

/* Group dividers inside the long "Maximize it honestly" section — turn one wall
   of seven into three short, restful acts. */
.pb-group {
  margin: 36px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  break-after: avoid;
}
.pb-group:first-of-type { margin-top: 24px; }

/* Reading progress bar + sticky chapter strip — sit just under the sticky
   nav (66px tall). The chapter strip only appears once the reader has
   scrolled past the table of contents. */
.pb-progress { position: sticky; top: 66px; z-index: 40; height: 3px; background: var(--cream-2); }
.pb-progress-fill { height: 100%; width: 0%; background: var(--brass); }
@media (prefers-reduced-motion: no-preference) {
  .pb-progress-fill { transition: width 120ms linear; }
}
.pb-chapter-nav {
  position: sticky; top: 69px; z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: rgba(245, 240, 230, 0.94);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
  padding: 10px 16px; font-size: 0.86rem; font-weight: 600; color: var(--secondary);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
}
.pb-chapter-nav.is-visible { opacity: 1; pointer-events: auto; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .pb-chapter-nav { transition: opacity 220ms var(--ease-soft), transform 220ms var(--ease-soft); }
}
.pb-chapter-nav span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70vw; }
.pb-chapter-nav button {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  width: 30px; height: 30px; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.pb-chapter-nav button:hover { border-color: var(--brass); color: var(--forest); }
.pb-chapter-nav button:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 600px) {
  .pb-cover { padding: 36px 24px; }
  .pb-toc { columns: 1; }
}

/* ---------- Motion foundation ----------
   Every movement is gated behind prefers-reduced-motion: no-preference.
   Reduced-motion users get instant, static states with color/shadow feedback only. */

:focus-visible {
  outline: 3px solid rgba(193, 154, 75, 0.55);
  outline-offset: 2px;
}

.nav {
  transition: box-shadow var(--dur-med) var(--ease-soft), background var(--dur-med) var(--ease-soft);
}
.nav--scrolled {
  background: rgba(245, 240, 230, 0.94);
  box-shadow: 0 8px 30px rgba(35, 66, 52, 0.08);
}

/* Marketing card hover feedback — color/shadow works for everyone… */
.feature:hover, .step:hover, .pain-card:hover, .access-card:hover, .platform-card:hover {
  border-color: rgba(193, 154, 75, 0.5);
  box-shadow: var(--shadow-lift);
}

/* …movement only for those who welcome it. */
@media (prefers-reduced-motion: no-preference) {
  .feature, .step, .pain-card, .access-card, .platform-card {
    transition: transform var(--dur-med) var(--ease-soft),
                box-shadow var(--dur-med) var(--ease-soft),
                border-color var(--dur-med) var(--ease-soft);
  }
  .feature:hover, .step:hover, .pain-card:hover, .access-card:hover, .platform-card:hover {
    transform: translateY(-4px);
  }
  .btn { transition: transform var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft); }
  .btn-primary:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(1px); }
  .dash-bar-track span { transition: width 900ms var(--ease-soft); }

  /* Hero entrance — a calm, staggered rise on first paint. */
  html.js .hero-copy > * {
    opacity: 0; transform: translateY(14px);
    animation: ct-rise var(--dur-slow) var(--ease-soft) forwards;
  }
  html.js .hero-copy > *:nth-child(2) { animation-delay: 70ms; }
  html.js .hero-copy > *:nth-child(3) { animation-delay: 140ms; }
  html.js .hero-copy > *:nth-child(4) { animation-delay: 210ms; }
  html.js .hero-copy > *:nth-child(5) { animation-delay: 280ms; }
  html.js .hero-media {
    opacity: 0; transform: translateY(22px) scale(0.985);
    animation: ct-rise 700ms var(--ease-soft) 320ms forwards;
  }

  /* Scroll reveals — sections rise gently into view, once. */
  html.js .reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity var(--dur-slow) var(--ease-soft), transform var(--dur-slow) var(--ease-soft);
  }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
  html.js .reveal-d1 { transition-delay: 90ms; }
  html.js .reveal-d2 { transition-delay: 180ms; }
  html.js .reveal-d3 { transition-delay: 270ms; }
}

@keyframes ct-rise { to { opacity: 1; transform: none; } }

/* Figure reveal — [data-countup] figures paint their TRUE value immediately
   (see animateCount in main.js) and get this one-shot brass "light-up" when
   first scrolled into view, in place of a misleading numeric count-up from $0.
   Pure text-shadow (no opacity/transform) so there's no flicker or layout
   shift; the 100% state matches the hero figure's base shadow so it settles
   seamlessly. */
@media (prefers-reduced-motion: no-preference) {
  .is-counted { animation: ct-figure-reveal 1100ms var(--ease-soft) 1; }
}
@keyframes ct-figure-reveal {
  0%   { text-shadow: 0 0 0 rgba(216, 184, 119, 0); }
  35%  { text-shadow: 0 0 34px rgba(216, 184, 119, 0.6); }
  100% { text-shadow: 0 0 26px rgba(216, 184, 119, 0.2); }
}

/* Skeleton shimmer — honest loading placeholders for data surfaces. */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--cream-2); border-radius: 8px;
  color: transparent !important; pointer-events: none;
  min-height: 1em;
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton::after {
    content: ''; position: absolute; inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: ct-shimmer 1.4s infinite;
  }
}
@keyframes ct-shimmer { 100% { transform: translateX(100%); } }

/* ---------- Living-seal assistant avatar ----------
   A small expressive face built from the brand seal, not a mascot or
   chat-bubble icon. States: idle (gentle blink), listening (perks up
   when the composer is focused), thinking (eyes close while checking
   sources), answered (brief brass pulse). The static face itself is
   always visible; only the animated transitions are gated behind
   prefers-reduced-motion. */
.asst-avatar {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: var(--forest); display: flex; align-items: center; justify-content: center;
  position: relative;
}
.asst-avatar--sm { width: 40px; height: 40px; border-radius: 11px; }
.asst-avatar-face { display: flex; gap: 9px; }
.asst-avatar--sm .asst-avatar-face { gap: 7px; }
.asst-eye { width: 7px; height: 7px; border-radius: 50%; background: var(--brass-soft); display: block; }
.asst-avatar--sm .asst-eye { width: 5px; height: 5px; }

.asst-avatar.is-listening { transform: scale(1.05); }
.asst-avatar.is-listening .asst-eye { transform: scaleY(1.25); }
.asst-avatar.is-thinking .asst-eye { transform: scaleY(0.15); }

.asst-avatar-mouth { position: absolute; bottom: 10px; display: none; gap: 3px; }
.asst-avatar--sm .asst-avatar-mouth { bottom: 8px; }
.asst-avatar.is-thinking .asst-avatar-mouth { display: flex; }
.asst-avatar-mouth span { width: 4px; height: 4px; border-radius: 50%; background: var(--brass-soft); opacity: .5; }

@keyframes asst-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes asst-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.12); }
  96% { transform: scaleY(1); }
}
@keyframes asst-avatar-pulse {
  0% { box-shadow: 0 0 0 0 rgba(193, 154, 75, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(193, 154, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(193, 154, 75, 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .asst-avatar.is-idle .asst-eye { animation: asst-blink 5.5s infinite; }
  .asst-avatar.is-listening,
  .asst-avatar.is-listening .asst-eye,
  .asst-avatar.is-thinking .asst-eye { transition: transform 220ms var(--ease-soft); }
  .asst-avatar.is-answered { animation: asst-avatar-pulse 900ms var(--ease-soft); }
  .asst-avatar-mouth span { animation: asst-bounce 1.1s infinite ease-in-out; }
  .asst-avatar-mouth span:nth-child(2) { animation-delay: .15s; }
  .asst-avatar-mouth span:nth-child(3) { animation-delay: .3s; }
}

/* Compact "ask the assistant" nudge — reuses the living-seal avatar as a
   quiet invitation on pages other than the assistant's own. */
.asst-nudge { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dash-panel.asst-nudge { margin-top: 18px; }
.asst-nudge-copy { flex: 1; min-width: 220px; }
.asst-nudge .btn { flex: none; }
.asst-nudge .btn-primary { color: #fff; } /* beats a container's own "a { color }" rule, e.g. .card a */

/* Floating assistant dock (playbook): stays put while the guide scrolls,
   so the Assistant is one tap away the moment a question arises. */
.asst-dock {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px 11px 12px; max-width: 300px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lift);
  text-decoration: none; color: var(--ink);
  opacity: 0; transform: translateY(12px) scale(0.98); pointer-events: none;
}
.asst-dock.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.asst-dock:hover { border-color: var(--brass); }
.asst-dock:hover .asst-eye { transform: scaleY(1.25); }
.asst-dock .asst-avatar { flex: none; }
.asst-dock-copy { display: flex; flex-direction: column; line-height: 1.25; }
.asst-dock-title { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.asst-dock-sub { font-size: 0.78rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .asst-dock { transition: opacity var(--dur-med) var(--ease-soft), transform var(--dur-med) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft); }
  .asst-dock .asst-eye { transition: transform 200ms var(--ease-soft); }
}
@media (max-width: 560px) {
  .asst-dock { right: 14px; bottom: 14px; padding: 10px; border-radius: 999px; }
  .asst-dock-copy { display: none; }
}
@media print { .asst-dock { display: none !important; } }

/* ---------- Scroll story: from shoebox to signed report ----------
   The section is a tall track; its inner stage sticks while scrolling.
   JS sets data-phase="0..3" on .journey; CSS transitions each layer.
   Default markup ships data-phase="3" so no-JS and reduced-motion
   readers see the finished composition. */
.journey { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.journey-track { min-height: 0; }
@media (prefers-reduced-motion: no-preference) {
  /* Tall track = scroll runway for the pinned stage. Reduced-motion readers
     get a normal, unpinned section instead. */
  .journey-track { min-height: 320vh; }
}
.journey-sticky { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; padding: 66px 0 40px; }
.journey-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 52px; align-items: center; width: 100%; }
.journey-captions { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.journey-captions li {
  position: relative; padding-left: 30px; color: var(--muted);
  font-size: 1.02rem; line-height: 1.5;
}
.journey-captions li::before {
  content: ''; position: absolute; left: 0; top: 0.42em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cream-2); border: 2px solid var(--border);
}
.journey[data-phase="0"] li[data-caption="0"],
.journey[data-phase="1"] li[data-caption="1"],
.journey[data-phase="2"] li[data-caption="2"],
.journey[data-phase="3"] li[data-caption="3"] { color: var(--ink); font-weight: 600; }
.journey[data-phase="0"] li[data-caption="0"]::before,
.journey[data-phase="1"] li[data-caption="1"]::before,
.journey[data-phase="2"] li[data-caption="2"]::before,
.journey[data-phase="3"] li[data-caption="3"]::before { background: var(--brass); border-color: var(--brass); }

.journey-stage { position: relative; min-height: 440px; }

.jr-receipt {
  position: absolute; left: 50%; top: 50%;
  width: min(250px, 68%); margin-left: max(-125px, -34%); margin-top: -190px;
  background: #fff; border: 1px solid var(--border);
  padding: 20px 18px 30px; box-shadow: var(--shadow);
  font-size: 0.82rem; color: var(--muted);
  clip-path: polygon(0 0, 100% 0, 100% 97%, 92% 100%, 84% 97%, 76% 100%, 68% 97%, 60% 100%, 52% 97%, 44% 100%, 36% 97%, 28% 100%, 20% 97%, 12% 100%, 4% 97%, 0 100%);
  transform: rotate(-7deg) translateY(14px);
}
.jr-receipt-head { font-weight: 800; letter-spacing: 0.12em; color: var(--secondary); margin-bottom: 14px; }
.jr-line { height: 8px; border-radius: 4px; background: var(--cream-2); margin-bottom: 10px; }
.jr-line.w80 { width: 80%; } .jr-line.w70 { width: 70%; } .jr-line.w60 { width: 60%; } .jr-line.w50 { width: 50%; }
.jr-receipt-total {
  display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px;
  border-top: 1px dashed var(--border); font-weight: 800; color: var(--ink);
}
.jr-scan-chip {
  position: absolute; left: 12px; bottom: -16px;
  background: var(--forest); color: #fff; font-weight: 700; font-size: 0.76rem;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  opacity: 0; transform: translateY(8px) scale(0.92);
}
.journey[data-phase="1"] .jr-receipt { transform: rotate(0deg) translateY(0); }
.journey[data-phase="1"] .jr-scan-chip { opacity: 1; transform: none; }
.journey[data-phase="2"] .jr-receipt,
.journey[data-phase="3"] .jr-receipt {
  transform: rotate(6deg) translate(-70%, -34%) scale(0.55);
  opacity: 0.35;
}
.journey[data-phase="2"] .jr-scan-chip,
.journey[data-phase="3"] .jr-scan-chip { opacity: 0; }

.jr-report {
  position: absolute; left: 50%; top: 50%;
  width: min(400px, 96%); transform: translate(-50%, -46%) scale(0.97);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0 0 10px; opacity: 0;
}
.jr-report-head {
  display: flex; align-items: center; gap: 10px;
  background: var(--forest); color: #fff; font-weight: 700; font-size: 0.92rem;
  border-radius: var(--radius) var(--radius) 0 0; padding: 14px 18px; margin-bottom: 8px;
}
.jr-report-head .seal { width: 26px; height: 26px; font-size: 15px; border-radius: 7px; background: rgba(255,255,255,0.14); }
.jr-report-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid var(--hairline);
  font-size: 0.94rem; color: var(--secondary);
}
.jr-report-row strong { color: var(--ink); }
.jr-report-row .jr-check { color: var(--forest); font-weight: 800; margin-right: 8px; }
.jr-report-total { border-bottom: 0; font-weight: 700; color: var(--ink); }
.jr-report-total strong { color: var(--forest); font-size: 1.15rem; }
.journey[data-phase="2"] .jr-report,
.journey[data-phase="3"] .jr-report { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.jr-seal {
  position: absolute; right: -18px; top: -24px;
  width: 96px; height: 96px; border-radius: 50%;
  border: 3px solid var(--brass); color: var(--brass-ink);
  display: grid; place-content: center; text-align: center;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  background: rgba(255, 248, 237, 0.92);
  transform: rotate(-12deg) scale(1.7); opacity: 0;
}
.journey[data-phase="3"] .jr-seal { opacity: 1; transform: rotate(-12deg) scale(1); }

@media (prefers-reduced-motion: no-preference) {
  .jr-receipt { transition: transform 700ms var(--ease-soft), opacity 700ms var(--ease-soft); }
  .jr-scan-chip { transition: transform 420ms var(--ease-soft) 120ms, opacity 420ms var(--ease-soft) 120ms; }
  .jr-report { transition: transform 700ms var(--ease-soft), opacity 700ms var(--ease-soft); }
  .jr-seal { transition: transform 480ms var(--ease-soft) 260ms, opacity 480ms var(--ease-soft) 260ms; }
  .journey-captions li, .journey-captions li::before { transition: color 320ms ease, background 320ms ease, border-color 320ms ease; }
}

@media (max-width: 900px) {
  .journey-inner { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .journey-sticky { padding: 48px 0 32px; align-items: start; }
  .journey-stage { min-height: 400px; }
  .jr-report { width: min(340px, 100%); }
}

/* ---------- Interactive three-number demo ---------- */
.three-demo {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px;
  margin-top: 40px; text-align: left;
}
.three-demo-rows { display: grid; gap: 14px; }
.three-demo-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px 16px; position: relative;
}
.three-demo-row.is-lowest {
  border-color: rgba(35, 66, 52, 0.45);
  background: #f7faf7;
  box-shadow: var(--shadow-sm);
}
@media (prefers-reduced-motion: no-preference) {
  .three-demo-row { transition: border-color var(--dur-med) var(--ease-soft), background var(--dur-med) var(--ease-soft), box-shadow var(--dur-med) var(--ease-soft); }
}
.three-demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.three-demo-head label { font-weight: 700; color: var(--ink); font-size: 1rem; }
.three-demo-head output { font-weight: 800; color: var(--forest); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.three-demo-row p { margin: 2px 0 12px; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.three-demo-cap {
  display: none; position: absolute; top: -11px; right: 14px;
  background: var(--forest); color: #fff; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
}
.three-demo-row.is-lowest .three-demo-cap { display: inline-block; }
.three-demo input[type="range"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 8px; border-radius: 999px;
  background: var(--cream-2); border: 1px solid var(--hairline);
  cursor: pointer; margin: 0;
}
.three-demo input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(35, 66, 52, 0.35);
}
.three-demo input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--forest); border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(35, 66, 52, 0.35);
}
.three-demo-result {
  background: var(--forest); color: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 28px;
  display: grid; align-content: center; gap: 10px; text-align: center;
}
.three-demo-result > span {
  color: var(--brass-soft); font-size: 0.78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.three-demo-result strong {
  font-size: clamp(2.1rem, 4.5vw, 3rem); font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.three-demo-note { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.94rem; line-height: 1.5; }
.three-demo-disclaimer { margin: 6px 0 0; color: rgba(255, 255, 255, 0.55); font-size: 0.78rem; }
@media (max-width: 900px) {
  .three-demo { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  /* Motion states must never affect paper: reveal everything, unpin the
     scroll story, and show its finished composition. */
  .reveal { opacity: 1 !important; transform: none !important; }
  .journey-track { min-height: 0 !important; }
  .journey-sticky { position: static !important; min-height: 0 !important; }
  /* Force brand colors to render in the PDF — without this Chrome drops every
     background, turning the green cover (white text) into invisible white-on-white. */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .nav, .footer, .no-print, .pb-progress, .pb-chapter-nav { display: none !important; }
  body { background: #fff; }
  .page { padding: 24px 0 0; }
  .card, .pb-cover { box-shadow: none; break-inside: avoid; }
  .pb-cover { margin: 0 0 24px; }
  .card { margin-bottom: 16px; }
}

/* ============================================================
   "THE READING" — homepage art direction (scoped to body.home)
   A warm brass-and-enamel precision instrument: the page breathes
   light (cream, air, hairlines); dark enamel "console" panels arrive
   only where the instrument reads. Fraunces carries headlines and
   every figure so the numbers feel struck into brass, not printed by
   a terminal; Inter stays the calm workhorse for body, UI, and the
   engraved micro-labels. Brass is rationed like a jewel.
   ============================================================ */
body.home {
  --case-grad: linear-gradient(150deg, #234234 0%, #1E3A52 100%);
  --ink-on-dark: rgba(245, 240, 230, 0.74);
  --ink-on-dark-soft: rgba(245, 240, 230, 0.52);
  --brass-sheen: linear-gradient(100deg, #C19A4B, #D8B877, #C19A4B);
  --num: 'Cinzel', Georgia, serif;   /* Lane 1: classical Roman-inscription figures */
}

/* --- Display type: Fraunces for headlines + figures --- */
body.home h1,
body.home h2 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}
body.home h1 { font-weight: 600; font-variation-settings: 'opsz' 96; line-height: 1.05; }
/* Lane 1: the hero headline set larger + more confident */
body.home .hero h1 {
  font-size: clamp(2.9rem, 5.6vw, 4.5rem);
  font-variation-settings: 'opsz' 120;
  letter-spacing: -0.02em; line-height: 1.02;
}
body.home h2 { font-weight: 600; font-variation-settings: 'opsz' 60; }
body.home .ct-figure,
body.home .readout-figure,
body.home .rail-value,
body.home .nav-reading-value,
body.home .three-demo-result strong {
  font-family: var(--num);
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: 0.005em;   /* Cinzel breathes a touch */
}

/* Engraved micro-label recipe (Inter, no true small-caps in the free face,
   so the etched look = uppercase + heavy tracking + restrained weight). */
body.home .console-plate-label,
body.home .readout-label,
body.home .rail-label,
body.home .rail-tick,
body.home .nav-reading-label {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.7rem;
}

/* --- Nav reading chip: the instrument is never off --- */
body.home .nav-reading {
  display: inline-flex; align-items: center; gap: 9px;
  margin-left: 18px; padding: 6px 13px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,0.5); text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
}
body.home .nav-reading:hover { border-color: var(--brass); background: rgba(255,255,255,0.8); }
body.home .nav-reading-label { color: var(--brass-ink); font-size: 0.62rem; }
body.home .nav-reading-value { color: var(--forest); font-weight: 600; font-size: 1rem; line-height: 1; }

/* --- Hero descend link --- */
body.home .hero-descend {
  display: inline-block; margin-top: 20px;
  color: var(--brass-ink); font-weight: 600; font-size: 0.9rem;
  text-decoration: none; letter-spacing: 0.01em;
  border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease-soft);
}
body.home .hero-descend:hover { border-color: var(--brass); }
body.home .hero-descend span { transition: transform var(--dur-fast) var(--ease-soft); display: inline-block; }
body.home .hero-descend:hover span { transform: translateY(2px); }

/* --- The console: dark enamel instrument panel --- */
body.home .console {
  position: relative;
  background: var(--case-grad);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(216,184,119,0.18);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(216,184,119,0.28);
  padding: 26px 28px 24px;
}
body.home .console-plate {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(216,184,119,0.22);
}
body.home .console-plate .seal { width: 26px; height: 26px; font-size: 15px; border-radius: 7px; background: rgba(216,184,119,0.16); color: var(--brass-soft); }
body.home .console-plate-label { color: var(--ink-on-dark); }

/* The readout well — the single biggest, warmest object */
body.home .readout { text-align: left; }
body.home .readout-label { color: var(--ink-on-dark-soft); display: block; margin-bottom: 6px; }
body.home .readout-figure {
  display: block; font-weight: 600;
  font-size: clamp(3rem, 6.5vw, 4.4rem); line-height: 1;
  color: var(--brass-soft);
  text-shadow: 0 0 26px rgba(216,184,119,0.20);
}
body.home .readout-note { margin: 12px 0 0; color: var(--ink-on-dark); font-size: 0.95rem; line-height: 1.5; max-width: 34ch; }

/* Reading rails — engraved statement lines beneath the readout */
body.home .rails { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(216,184,119,0.18); display: grid; gap: 2px; }
body.home .rail {
  position: relative;
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
}
body.home .rail-label { color: var(--ink-on-dark); white-space: nowrap; }
body.home .rail-dots {
  flex: 1; align-self: center; height: 1px;
  background-image: radial-gradient(currentColor 0.5px, transparent 0.5px);
  background-size: 6px 2px; background-repeat: repeat-x;
  color: rgba(216,184,119,0.4);
}
body.home .rail-value { color: #F5F0E6; font-weight: 500; font-size: 1.08rem; font-variation-settings: 'opsz' 36; }
body.home .rail.is-limiting { background: rgba(216,184,119,0.10); }
body.home .rail.is-limiting .rail-value { color: var(--brass-soft); }
body.home .rail-tick {
  display: none; position: absolute; top: -9px; left: 12px;
  background: var(--brass-sheen); color: #33260C;
  padding: 3px 9px; border-radius: 999px; font-size: 0.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
body.home .rail.is-limiting .rail-tick { display: inline-block; }

/* ---- #third-number restyled as the operable instrument ---- */
body.home .three-demo {
  background: var(--case-grad);
  border: 1px solid rgba(216,184,119,0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(216,184,119,0.28);
  padding: 30px 30px 28px;
  gap: 34px;
}
body.home .three-demo-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(216,184,119,0.14);
  border-radius: var(--radius-sm);
  padding: 15px 18px 17px;
}
body.home .three-demo-row.is-lowest {
  border-color: rgba(216,184,119,0.5);
  background: rgba(216,184,119,0.10);
  box-shadow: none;
}
body.home .three-demo-head label {
  color: var(--ink-on-dark); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.76rem;
}
body.home .three-demo-head output {
  color: #F5F0E6; font-weight: 500; font-size: 1.2rem;
  font-family: var(--num); letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums lining-nums;
}
body.home .three-demo-row.is-lowest .three-demo-head output { color: var(--brass-soft); }
body.home .three-demo-row p { color: var(--ink-on-dark-soft); }
body.home .three-demo-cap {
  background: var(--brass-sheen); color: #33260C;
  letter-spacing: 0.08em;
}

/* Faders: brass knobs on an etched tick track */
body.home .three-demo input[type="range"] {
  background: rgba(216,184,119,0.14);
  border: none; height: 3px; border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, rgba(216,184,119,0.5) 0 1px, transparent 1px 9%);
}
body.home .three-demo input[type="range"]::-webkit-slider-thumb {
  width: 18px; height: 18px;
  background: radial-gradient(circle at 35% 30%, #E6CF94, #C19A4B 70%);
  border: 2px solid #F5F0E6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.home .three-demo input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  background: radial-gradient(circle at 35% 30%, #E6CF94, #C19A4B 70%);
  border: 2px solid #F5F0E6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.home .three-demo input[type="range"]:focus-visible { outline: 2px solid var(--brass-soft); outline-offset: 4px; }

/* Readout well inside the demo */
body.home .three-demo-result {
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(216,184,119,0.24);
  box-shadow: none;
  text-align: left; align-content: start; gap: 8px;
}
body.home .three-demo-result > span {
  color: var(--ink-on-dark-soft); letter-spacing: 0.14em;
}
body.home .three-demo-result strong {
  font-weight: 600; color: var(--brass-soft);
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  text-shadow: 0 0 24px rgba(216,184,119,0.18);
}
body.home .three-demo-note { color: var(--ink-on-dark); }
body.home .three-demo-disclaimer { color: var(--ink-on-dark-soft); }

/* Insider line beneath the instrument */
body.home .reading-insider {
  text-align: center; margin: 28px auto 0; max-width: 600px;
  color: var(--brass-ink); font-weight: 600; letter-spacing: 0.01em;
}

/* --- Founder recast as the maker's plate --- */
body.home .founder-attr {
  padding-top: 14px; margin-top: 4px;
  border-top: 1px solid rgba(216,184,119,0.3);
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.76rem;
  color: var(--brass-soft);
}

/* --- Final CTA becomes the closing dark band --- */
body.home .final-cta { background: var(--case-grad); border-top: 0; }
body.home .final-cta h2 { color: #fff; }
body.home .final-cta .lead { color: var(--ink-on-dark); }
body.home .final-cta .btn-primary { background: #F5F0E6; color: var(--forest); }
body.home .final-cta .btn-primary:hover { background: #fff; }
body.home .final-cta .btn-ghost { background: transparent; box-shadow: none; border-color: rgba(245,240,230,0.4); color: #fff; }
body.home .final-cta .btn-ghost:hover { border-color: var(--brass-soft); color: var(--brass-soft); }

/* --- Pricing: mark the annual Pro tier as the heirloom plate --- */
body.home .access-card--pro:last-child { border-color: rgba(193,154,75,0.5); box-shadow: var(--shadow); }

/* --- Reduced-motion / no-JS safety: the hero readout is real text --- */
body.home .readout-figure,
body.home .three-demo-result strong { transition: none; }

@media (max-width: 720px) {
  body.home .nav-reading { display: none; }
}
@media (max-width: 900px) {
  body.home .console { padding: 22px 20px 20px; }
  body.home .rail-label { font-size: 0.66rem; }
}

/* ============================================================
   "THE READING" — mid-page cohesion (homepage only)
   Carries the hero's understated-editorial feel through the rest
   of the page: quiet hairline panels instead of SaaS drop-shadow
   cards, engraved figure-numbers, flattened labels, tabular money.
   ============================================================ */

/* Cards become calm panels on paper — a hairline at rest, a brass
   hairline + gentle lift on hover (the translateY lift already lives
   in the reduced-motion-safe hover block above). */
body.home .pain-card,
body.home .step,
body.home .platform-card,
body.home .feature,
body.home .access-card,
body.home .comparison-card {
  box-shadow: none;
  border-color: var(--hairline);
}
body.home .platform-card--web { border-color: rgba(35,66,52,0.22); }
body.home .access-card--pro { border-color: rgba(193,154,75,0.42); }
body.home .pain-card:hover,
body.home .step:hover,
body.home .platform-card:hover,
body.home .feature:hover,
body.home .access-card:hover {
  border-color: var(--brass);
  box-shadow: var(--shadow-sm);
}

/* How it works — step numerals set like engraved figure numbers
   (Fraunces + brass rule), echoing the console's "01 · …" labels. */
body.home .step-num {
  width: auto; height: auto; margin-bottom: 16px;
  background: none; border-radius: 0;
  display: inline-block; padding: 0 2px 6px;
  font-family: var(--num); font-weight: 600; font-size: 2.1rem; line-height: 1;
  letter-spacing: 0.01em;
  color: var(--brass-ink);
  border-bottom: 2px solid var(--brass);
}

/* Feature markers: a small brass tick reads more considered than a dot. */
body.home .feature .dot { border-radius: 2px; width: 9px; height: 9px; background: var(--brass); }

/* Labels flatten from filled pills to engraved text (matches eyebrows). */
body.home .platform-label {
  background: none; padding: 0; border-radius: 0;
  color: var(--brass-ink); letter-spacing: 0.14em;
}

/* Pricing + comparison: align the money like a statement. */
body.home .comparison-table { font-variant-numeric: tabular-nums lining-nums; }
body.home .compare-price { color: var(--brass-ink); font-weight: 600; }
body.home .access-kicker { color: var(--brass-ink); }

/* FAQ: quiet ruled entries rather than boxed cards. */
body.home .faq details {
  box-shadow: none; border-color: var(--hairline);
  border-radius: var(--radius-sm);
}
body.home .faq details[open] { border-color: var(--border); }

/* ============================================================
   "THE READING" — site-wide continuity (every page)
   Carries the homepage's editorial voice across the whole site:
   Fraunces for headings, quiet hairline content panels. Fraunces is
   now linked on every page. Inner-page DATA figures stay Inter
   tabular for legibility — the serif is for headings + hero moments,
   which reads as one system (serif titles, sans data) end to end.
   ============================================================ */
h1, h2 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  font-weight: 600;
}
.ct-figure {
  font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Quiet content panels: a hairline at rest instead of a drop-shadow,
   matching the homepage's editorial cards. Applies to the shared
   content card and the dashboard panels/metrics. */
.card,
.dash-panel,
.dash-metric {
  box-shadow: none;
  border-color: var(--hairline);
}

/* ============================================================
   EZRA WIDGET — site-wide floating assistant popup (ezra-widget.js)
   Concierge refinement 2026-07-22 (base: Stephen's approved mockup
   structure — do not revert). Design intents, in order:
   1. The panel physically GROWS OUT of the launcher: its transform-origin
      sits outside the panel, at the launcher's position, so the open
      scale genuinely emanates from the button; the panel's bottom-right
      corner is tightened toward its anchor.
   2. Asymmetric motion: a long, soft expo-out entrance (opacity lands
      first, the transform settles after — materialize, then anchor) and
      a brief discreet exit. Children settle in a quiet stagger.
   3. Material depth: layered shadows, an inset brass keyline frame
      (bespoke stationery), a shadow scrim under the enamel head, a
      recessed composer tray, inner highlights on enamel surfaces.
   4. Editorial type: Fraunces for Ezra's name and his greeting,
      engraved micro-labels for status/labels/footer, Inter for answers.
   No purple, no bounce, no gradients beyond the brand enamel case.
   Reduced-motion users get a fully functional widget with all motion
   collapsed to instant (see the block at the end).
   ============================================================ */
.ezra {
  position: fixed; right: 24px; bottom: 22px; z-index: 70;
  font-family: 'Inter', system-ui, sans-serif; color: var(--ink);
  --ezra-case: linear-gradient(150deg, #234234 0%, #1E3A52 100%);
  --ezra-hairline: rgba(216, 184, 119, 0.28);
  --ezra-cream-on-dark: rgba(245, 240, 230, 0.78);
  --ezra-cream-soft: rgba(245, 240, 230, 0.58);
  --ezra-settle: cubic-bezier(0.19, 1, 0.22, 1); /* expo-out: soft, anchored landing */
}

/* --- Launcher: enamel pill with a living brass halo --- */
.ezra__launcher {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 0 20px 0 12px;
  background: var(--ezra-case);
  border: 1px solid var(--ezra-hairline); border-radius: 999px;
  color: #F5F0E6; font-family: inherit; cursor: pointer;
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(216, 184, 119, 0.22);
  overflow: hidden;
  /* backwards fill (not forwards): a forwards fill would pin the keyframe's
     transform forever and silently kill the hover lift and the is-open
     recede below — the animation must release the transform when done. */
  animation: ezra-rise 480ms var(--ease-soft) 300ms backwards;
  transition: transform var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.ezra__launcher:hover { transform: translateY(-2px); border-color: rgba(216, 184, 119, 0.55); }
.ezra__launcher:active { transform: translateY(0); }
/* Open: the launcher recedes a step — the presence has moved up into the
   panel it just produced. Halo calms rather than competing with the panel. */
.ezra.is-open .ezra__launcher {
  transform: translateY(0) scale(0.96);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(216, 184, 119, 0.18);
}
/* The sheen rests while the panel is open — the launcher has handed the room
   to the panel; only the halo's quiet breathing continues. (Do NOT calm the
   halo by retiming its running animation: changing duration remaps the
   elapsed clock and visibly snaps at the exact moment of the open.) */
.ezra.is-open .ezra__launcher::after { animation-play-state: paused; opacity: 0; }
@keyframes ezra-rise { from { opacity: 0; transform: translateY(10px) scale(0.97); } }

/* The halo: a warm brass radiance that breathes continuously — the
   always-on "Ezra is here" cue, visible without any interaction. */
.ezra__halo {
  position: absolute; inset: -20%; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 32% 50%, rgba(216, 184, 119, 0.38), transparent 62%);
  opacity: 0.35;
  animation: ezra-halo 3.6s ease-in-out infinite;
}
@keyframes ezra-halo {
  0%, 100% { opacity: 0.22; transform: scale(0.98); }
  50% { opacity: 0.85; transform: scale(1.05); }
}
/* Periodic brass sheen sweeping the pill — foil catching the light. */
.ezra__launcher::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(216, 184, 119, 0.25) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: ezra-sheen 7s var(--ease-soft) 2.2s infinite;
  transition: opacity 300ms var(--ease-soft);
}
@keyframes ezra-sheen {
  0% { transform: translateX(-120%); }
  16% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

/* The mark: Ezra's seal — a recessed plaque with two brass eyes that blink. */
.ezra__mark {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 13px;
  background: rgba(216, 184, 119, 0.13);
  border: 1px solid rgba(216, 184, 119, 0.22);
  box-shadow: inset 0 2px 4px rgba(20, 30, 26, 0.35), inset 0 -1px 0 rgba(216, 184, 119, 0.14);
  position: relative; z-index: 1;
}
.ezra__mark span {
  width: 6px; height: 6px; border-radius: 999px; display: inline-block;
  background: var(--brass-soft);
  box-shadow: 0 0 9px rgba(216, 184, 119, 0.55);
  animation: ezra-blink 4s infinite;
}
@keyframes ezra-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  93%, 96% { transform: scaleY(0.12); }
}
/* Hover: the seal leans in. The plaque scales, not the eyes — the running
   blink animation owns the eyes' transform, so a hover transform on the
   spans themselves would never render. */
.ezra__mark { transition: transform 200ms var(--ease-soft); }
.ezra__launcher:hover .ezra__mark { transform: scale(1.1); }
/* On open, Ezra acknowledges you: one soft double-blink in the header. */
.ezra.is-open .ezra__header .ezra__mark span {
  animation: ezra-blink 4s infinite, ezra-acknowledge 640ms var(--ease-soft) 460ms 1;
}
@keyframes ezra-acknowledge {
  0%, 100% { transform: scaleY(1); }
  22%, 62% { transform: scaleY(0.15); }
  42%, 82% { transform: scaleY(1); }
}
/* Thinking: eyes settle into a slow alternating pulse while Ezra works.
   (Placed after the acknowledge rule and matched at the same depth so the
   thinking state wins in the header while a request is in flight.) */
.ezra.is-thinking .ezra__mark span,
.ezra.is-thinking .ezra__header .ezra__mark span { animation: ezra-ponder 1.2s ease-in-out infinite; }
.ezra.is-thinking .ezra__mark span:nth-child(2) { animation-delay: 0.35s; }
@keyframes ezra-ponder {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
/* Answered: one warm flare of the halo as the answer lands. */
.ezra.is-answered .ezra__halo { animation: ezra-halo-flare 900ms var(--ease-soft) 1, ezra-halo 3.6s ease-in-out 900ms infinite; }
@keyframes ezra-halo-flare {
  0% { opacity: 0.3; transform: scale(0.98); }
  35% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 0.3; transform: scale(0.98); }
}

.ezra__launcher-label {
  position: relative; z-index: 1;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em;
}

/* --- Panel: paper in an enamel case, grown from the launcher below. ---
   Closed = invisible but transitionable (visibility+opacity+transform).
   The transform-origin sits OUTSIDE the panel, at the launcher's location
   (~64px in from the right edge, ~41px below the bottom edge), so the
   scale genuinely emanates from the button. The bottom-right corner is
   tightened toward that anchor. Base transitions here are the EXIT (brief,
   discreet); the entrance is defined under .is-open (long, soft). */
.ezra__panel {
  position: absolute; right: 0; bottom: calc(100% + 12px);
  width: min(392px, calc(100vw - 44px));
  max-height: min(74vh, 600px);
  max-height: min(74dvh, 600px); /* dvh: mobile browser chrome must not eat the composer */
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 12px var(--radius-lg);
  box-shadow: 0 30px 80px rgba(35, 66, 52, 0.22), 0 8px 24px rgba(35, 66, 52, 0.10);
  overflow: hidden;
  transform-origin: calc(100% - 64px) calc(100% + 41px);
  opacity: 0; transform: scale(0.9);
  visibility: hidden; pointer-events: none;
  transition: opacity 220ms var(--ease-soft),
              transform 240ms var(--ease-soft),
              visibility 240ms var(--ease-soft);
}
.ezra.is-open .ezra__panel {
  opacity: 1; transform: none;
  visibility: visible; pointer-events: auto;
  transition: opacity 320ms var(--ezra-settle),
              transform 560ms var(--ezra-settle),
              visibility 560ms var(--ezra-settle);
}
/* Inset brass keyline — the framed-certificate cue, one hair above visible. */
.ezra__panel::after {
  content: ''; position: absolute; inset: 7px; z-index: 5; pointer-events: none;
  border: 1px solid rgba(216, 184, 119, 0.13);
  border-radius: 15px 15px 5px 15px;
}
/* Children settle in a quiet stagger after the panel materializes.
   Base = closed state (also the exit: no delays, everything retires
   together); delays live only under .is-open. */
.ezra__panel > * {
  opacity: 0; transform: translateY(8px);
  transition: opacity 200ms var(--ease-soft), transform 200ms var(--ease-soft);
}
.ezra.is-open .ezra__panel > * {
  opacity: 1; transform: none;
  transition: opacity 420ms var(--ezra-settle), transform 420ms var(--ezra-settle);
}
.ezra.is-open .ezra__panel > .ezra__header { transition-delay: 60ms; }
.ezra.is-open .ezra__panel > .ezra__chips { transition-delay: 150ms; }
.ezra.is-open .ezra__panel > .ezra__thread { transition-delay: 210ms; }
.ezra.is-open .ezra__panel > .ezra__composer { transition-delay: 270ms; }
.ezra.is-open .ezra__panel > .ezra__foot { transition-delay: 320ms; }

/* Head: the instrument case. Ezra's name in Fraunces, like every headline. */
.ezra__header {
  display: flex; align-items: center; gap: 13px; padding: 17px 20px;
  background: var(--ezra-case);
  border-bottom: 1px solid var(--ezra-hairline);
  box-shadow: inset 0 1px 0 rgba(245, 240, 230, 0.08);
  position: relative;
}
.ezra__header::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(245, 240, 230, 0.10), transparent 46%);
  pointer-events: none;
}
.ezra__header .ezra__mark { width: 40px; height: 40px; background: rgba(216, 184, 119, 0.15); }
.ezra__header-copy { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; min-width: 0; }
.ezra__title {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto;
  font-weight: 600; font-size: 1.28rem; color: #F5F0E6; letter-spacing: 0.01em;
}
.ezra__status {
  margin: 4px 0 0; font-size: 0.64rem; color: var(--ezra-cream-soft);
  text-transform: uppercase; letter-spacing: 0.11em; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ezra__close {
  width: 34px; height: 34px; flex: none; border: 0; border-radius: 999px;
  background: none; color: var(--ezra-cream-soft); font-size: 22px; line-height: 1;
  cursor: pointer; position: relative; z-index: 1;
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.ezra__close:hover { background: rgba(245, 240, 230, 0.10); color: #F5F0E6; }

/* Suggested questions: an engraved eyebrow over quiet paper chips.
   The whole block retires once the first question is asked. */
.ezra__chips {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 16px 20px 2px;
}
.ezra__chips-label {
  width: 100%; margin: 0 0 2px;
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--brass-ink);
}
.ezra__chip {
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--cream);
  color: var(--ink); font-family: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.ezra__chip:hover {
  transform: translateY(-1px); border-color: var(--brass);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
/* The chips retire gracefully on the first question — JS pins the block's
   measured height inline, then this collapses it (max-height needs
   !important to beat that inline pin; the visibility flip at the end takes
   the hidden chips out of the tab order). display:none would snap. */
.ezra.is-started .ezra__panel > .ezra__chips {
  max-height: 0 !important; opacity: 0;
  padding-top: 0; padding-bottom: 0;
  overflow: hidden; visibility: hidden; pointer-events: none;
  transition: max-height 380ms var(--ezra-settle), opacity 240ms var(--ease-soft),
              padding 380ms var(--ezra-settle), visibility 0s linear 380ms;
}

/* Thread: warm paper under the enamel case. A sticky scrim carries the
   case's shadow onto the paper as it scrolls beneath — physical depth. */
.ezra__thread {
  flex: 1; overflow-y: auto; padding: 12px 20px 16px;
  display: flex; flex-direction: column; gap: 12px; min-height: 150px;
  background: radial-gradient(480px 140px at 50% 0%, rgba(193, 154, 75, 0.05), transparent 70%);
}
.ezra__thread::before {
  content: ''; position: sticky; top: 0; z-index: 2; flex: none;
  display: block; height: 12px; margin: -12px -20px 0;
  background: linear-gradient(180deg, rgba(30, 42, 37, 0.07), transparent);
}
.ezra__msg {
  max-width: 88%; padding: 12px 15px; border-radius: 15px;
  font-size: 0.92rem; line-height: 1.6; white-space: pre-line;
  animation: ezra-msg-in 320ms var(--ease-soft);
}
@keyframes ezra-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ezra__msg--assistant {
  align-self: flex-start; background: var(--cream);
  border: 1px solid var(--hairline); color: var(--ink);
  border-bottom-left-radius: 5px;
  box-shadow: 0 1px 2px rgba(35, 66, 52, 0.06);
}
/* Ezra's greeting is set in the site serif — a salutation, not a chat
   bubble. Subsequent answers stay in Inter for working clarity. */
.ezra__msg--greeting {
  font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto;
  font-weight: 500; font-size: 1.02rem; line-height: 1.6;
  max-width: 94%;
}
.ezra__msg--user {
  align-self: flex-end; background: var(--forest); color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(245, 240, 230, 0.14), 0 1px 2px rgba(35, 66, 52, 0.10);
}

/* Thinking: a small paper bubble with three brass dots. */
.ezra__thinking {
  align-self: flex-start; display: inline-flex; gap: 6px; align-items: center;
  background: var(--cream); border: 1px solid var(--hairline);
  border-radius: 15px; border-bottom-left-radius: 5px; padding: 13px 15px;
  animation: ezra-msg-in 320ms var(--ease-soft);
}
.ezra__thinking span {
  width: 7px; height: 7px; border-radius: 999px; display: block;
  background: var(--brass);
  animation: ezra-breath 1.2s infinite ease-in-out;
}
.ezra__thinking span:nth-child(2) { animation-delay: 0.15s; }
.ezra__thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ezra-breath {
  0%, 80%, 100% { opacity: 0.35; transform: scale(0.88); }
  40% { opacity: 1; transform: scale(1.05); }
}

/* Source links under grounded answers (signed-in mode). */
.ezra__sources {
  align-self: flex-start; max-width: 88%;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  animation: ezra-msg-in 320ms var(--ease-soft);
}
.ezra__sources-label {
  width: 100%; font-size: 0.64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--brass-ink);
}
.ezra__src {
  font-size: 0.78rem; font-weight: 600; color: var(--forest);
  background: var(--cream); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-soft);
}
a.ezra__src:hover { border-color: var(--brass); }

/* Composer: a recessed tray the raised input sits in — writing desk, not
   chat bar. The brass focus ring visibly "wakes" the widget when typing. */
.ezra__composer {
  display: grid; grid-template-columns: 1fr auto; gap: 9px;
  padding: 13px 16px;
  background: var(--cream-2);
  border-top: 1px solid var(--hairline);
  box-shadow: inset 0 2px 4px rgba(35, 66, 52, 0.05);
}
.ezra__input {
  min-width: 0; height: 46px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 13px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; /* 16px minimum — under that, iOS Safari zooms the page on focus */
  box-shadow: 0 1px 2px rgba(35, 66, 52, 0.05);
  transition: border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.ezra__input:focus {
  outline: none; border-color: var(--brass);
  box-shadow: 0 0 0 4px rgba(193, 154, 75, 0.16), 0 1px 2px rgba(35, 66, 52, 0.05);
}
.ezra__send {
  height: 46px; padding: 0 18px; border: 0; border-radius: 13px;
  background: var(--forest); color: #F5F0E6;
  font-family: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(216, 184, 119, 0.18);
  transition: transform var(--dur-fast) var(--ease-soft),
              background var(--dur-fast) var(--ease-soft);
}
.ezra__send:hover { transform: translateY(-1px); background: var(--forest-deep); }
.ezra__send:active { transform: translateY(0); }
.ezra__send[disabled] { opacity: 0.55; cursor: default; transform: none; }

.ezra__sr-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ezra__foot {
  display: block; text-align: center; padding: 11px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass-ink); text-decoration: none; background: var(--cream-2);
  transition: color var(--dur-fast) var(--ease-soft);
}
.ezra__foot:hover { color: var(--forest); }

/* Tablet & below: collapse the launcher to a compact icon-only button so the
   full "Ask Ezra" pill never overlaps the example card, pricing table, or other
   content. The label + wide pill only show on desktop (≥1024px); the round
   launcher keeps its accessible name via aria-label on the button. */
@media (max-width: 1024px) {
  .ezra__launcher {
    width: 56px; min-height: 56px; padding: 0; gap: 0; justify-content: center;
  }
  .ezra__launcher-label { display: none; }
}

@media (max-width: 480px) {
  .ezra { right: 14px; bottom: 14px; }
  .ezra__launcher { width: 54px; min-height: 54px; }
  .ezra__panel {
    width: calc(100vw - 28px); right: -8px; max-height: 72vh;
    transform-origin: calc(100% - 27px) calc(100% + 39px);
  }
}
/* Short viewports (landscape phones): the composer must never be clipped —
   the thread and chips give way and scroll instead. */
@media (max-height: 620px) {
  .ezra__panel {
    max-height: calc(100vh - 104px);
    max-height: calc(100dvh - 104px);
  }
  .ezra__thread { min-height: 60px; }
  .ezra__chips { min-height: 0; overflow-y: auto; }
}

@media print { .ezra { display: none !important; } }

/* Reduced motion: the widget stays fully functional — every animation and
   transition collapses to effectively instant, so state changes still land. */
@media (prefers-reduced-motion: reduce) {
  .ezra *, .ezra *::after, .ezra *::before, .ezra__launcher, .ezra__panel {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .ezra__launcher { opacity: 1; transform: none; }
}
