/* ============================================================
   GotIt Guides — Landing page styles
   Palette: coral primary, warm off-white, deep charcoal
   ============================================================ */

:root {
  /* Brand tokens (CLAUDE.md · Brand — assets in brand/). --color-orange is
     the accent from the 2026 brand guidelines. The legacy --coral family
     below predates it and still drives most of the UI: repointing coral at
     the new orange is a deliberate visual decision, not a find-and-replace,
     so the two coexist until that call is made. */
  --color-ink: #1A1A1A;
  --color-orange: #ED7446;
  --color-cream: #FAFAF8;
  --font-brand: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --coral: var(--color-orange);
  --coral-dark: #D65F33;
  --coral-soft: #FFE7DC;
  --amber: #FFB347;
  --bg: var(--color-cream);
  --bg-tint: #FFF4EE;
  --ink: var(--color-ink);
  --ink-soft: #565049;
  --ink-muted: #8B847C;
  --line: #EDE8E2;
  --white: #FFFFFF;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.05);
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 24px 60px rgba(214, 95, 51, 0.18);

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ───────── Reset / base ───────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-brand);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--coral);
  color: var(--white);
  padding: 14px 26px;
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.32);
}
.btn-primary:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 107, 53, 0.42);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  padding: 14px 26px;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 20px; font-size: 0.95rem; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ───────── Header ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 10px; }

/* Header nav (jump to sections): a liquid-glass hamburger bubble on the left
   that opens a dropdown of section links. */
.nav-menu { position: relative; }
.nav-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: color 0.18s var(--ease), transform 0.12s var(--ease);
}
.nav-toggle:hover { color: var(--coral); transform: translateY(-1px); }
.nav-toggle svg { width: 20px; height: 20px; }
/* Alert dot when there are new sitter suggestions to see. */
.nav-toggle.has-alert::after {
  content: "";
  position: absolute; top: 7px; right: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--coral); border: 2px solid #fff;
}
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  font-size: 0.72rem; font-weight: 800; line-height: 1;
  color: #fff; background: var(--coral); border-radius: 999px;
}
/* Compact alert dot on the visible "My guides" header pill (new sitter feedback). */
.nav-myguides { position: relative; }
.nav-myguides.has-alert::after {
  content: "";
  position: absolute; top: -3px; right: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--coral); border: 2px solid #fff;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 268px;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  /* Same family as the site's cards, one step tighter than --radius-lg */
  border-radius: var(--radius);
  z-index: 60;
  transform-origin: top left;
  animation: navpop 0.2s var(--ease);
}
/* Fully opaque (overrides the translucent .glass, defined later): the menu
   opens over the hero's phone mockup, and any bleed-through of the artwork
   behind reads as noise rather than depth. */
.nav-dropdown.glass {
  background: var(--white);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 2px 6px rgba(26, 26, 26, 0.06);
}
@keyframes navpop {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dropdown { animation: none; }
}
/* Grouped rows with hairline separators — structure without clutter */
.navd-group { display: flex; flex-direction: column; gap: 2px; }
.navd-group + .navd-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.navd-label {
  margin: 4px 0 2px;
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.nav-dropdown a,
.nav-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--ink);
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.navd-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--ink-muted);
  transition: color 0.15s var(--ease);
}
.navd-ico svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Icons follow the row: muted at rest, orange with the label on hover */
.nav-dropdown a:hover .navd-ico,
.nav-dropdown button:hover .navd-ico,
.nav-dropdown a:focus-visible .navd-ico,
.nav-dropdown button:focus-visible .navd-ico { color: inherit; }
.nav-dropdown a:hover,
.nav-dropdown button:hover,
.nav-dropdown a:focus-visible,
.nav-dropdown button:focus-visible {
  background: var(--bg-tint);
  color: var(--coral-dark);
  outline: none;
}
.nav-dropdown a:focus-visible,
.nav-dropdown button:focus-visible { box-shadow: inset 0 0 0 2px var(--coral); }
.nav-dropdown a:active,
.nav-dropdown button:active { background: var(--coral-soft); }
/* Open state on the burger itself, so the trigger reads as "active" */
.nav-toggle[aria-expanded="true"] { background: var(--ink); color: var(--white); }
@media (max-width: 480px) {
  .nav-dropdown { width: 252px; }
}

/* Floating menu on published guides: one frosted bubble, fixed top-left, so
   the guide itself stays the creator's page (no brand bar). */
.guide-nav { position: fixed; top: 12px; left: 12px; z-index: 90; }
.guide-nav .nav-dropdown { min-width: 230px; }
/* Wordmark: always the committed SVG (brand/logo-*.svg), never re-typed text.
   The SVG's cap height is ~48% of its box, so 32px ≈ the old 1.4rem text. */
.logo-img { height: 32px; width: auto; display: block; }
/* Legacy text-wordmark styles kept only for anything still using the class. */
.logo-mark {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.logo-mark::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--coral);
  vertical-align: baseline;
}

/* ───────── Shared section ───────── */
.section { padding: 96px 0; }
.section-tint { background: var(--bg-tint); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coral-dark);
  background: var(--coral-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  padding: 56px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(255, 179, 71, 0.18), transparent 60%),
    radial-gradient(50% 50% at 5% 30%, rgba(255, 107, 53, 0.10), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-title {
  /* Two short sentences: big enough to lead, capped so "One simple guide."
     lands on its own line rather than wrapping mid-thought */
  font-size: clamp(2.05rem, 4vw, 2.7rem);
  font-weight: 800;
  margin: 8px 0 20px;
}
@media (max-width: 940px) {
  .hero-title { margin-left: auto; margin-right: auto; }
}
.hero-title .accent { color: var(--coral); display: block; }
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 14px;
}
.hero-support {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 480px;
  margin: 0 0 30px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.hero-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Hero phone mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone {
  position: relative;
  z-index: 2;
  width: 270px;
  background: var(--ink);
  border-radius: 42px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: var(--ink);
  border-radius: 0 0 16px 16px;
  z-index: 3;
}
.phone-screen {
  background: var(--bg);
  border-radius: 32px;
  padding: 18px 14px;
  overflow: hidden;
}
.mock-track {
  display: flex;
  transition: transform 0.5s var(--ease);
  touch-action: pan-y;
}
.mock-slide {
  /* Lock each slide to exactly one screen-width. iOS Safari can shrink flex
     items that only set min-width, which over-scrolls the translateX and makes
     later slides appear blank — flex:0 0 100% pins the width and prevents it. */
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.mock-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.mock-dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.mock-dot.active { background: var(--white); transform: scale(1.35); }
.mock-cover {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  color: var(--white);
  margin-bottom: 14px;
}
.mock-emoji { font-size: 2.4rem; display: block; }
.mock-title { font-weight: 800; font-size: 1.25rem; margin-top: 6px; }
.mock-subtitle { font-size: 0.78rem; opacity: 0.92; margin-top: 2px; }

.mock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.mock-card-icon { font-size: 1.3rem; }
.mock-card-title { font-weight: 700; font-size: 0.85rem; }
.mock-card-bar {
  height: 6px;
  width: 110px;
  background: var(--line);
  border-radius: 4px;
  margin-top: 6px;
}
.mock-card-bar.short { width: 70px; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  z-index: 1;
}
.blob-1 {
  width: 200px; height: 200px;
  background: rgba(255, 179, 71, 0.35);
  top: -20px; right: 0;
  animation: float 7s ease-in-out infinite reverse;
}
.blob-2 {
  width: 160px; height: 160px;
  background: rgba(255, 107, 53, 0.22);
  bottom: -10px; left: 10px;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ───────── Steps ───────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.step-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step-text { color: var(--ink-soft); font-size: 0.98rem; }

/* ───────── Use case cards ───────── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-emoji {
  font-size: 2.4rem;
  display: inline-block;
  margin-bottom: 14px;
}
.card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.card-text { color: var(--ink-soft); font-size: 0.95rem; }

/* ───────── Features ───────── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}
.feature {
  display: flex;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease);
}
.feature:hover { transform: translateY(-3px); }
.feature-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tint);
  border-radius: 14px;
}
.feature-title { font-size: 1.08rem; font-weight: 700; margin-bottom: 4px; }
.feature-text { color: var(--ink-soft); font-size: 0.95rem; }

/* ───────── Pricing ───────── */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.plan {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan-featured {
  border: 2px solid var(--coral);
  box-shadow: var(--shadow);
  transform: scale(1.03);
}
.plan-featured:hover { transform: scale(1.03) translateY(-4px); }
.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--coral);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-name { font-size: 1.15rem; font-weight: 700; color: var(--ink-soft); }
.plan-price { margin: 12px 0 4px; }
.plan-amount { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; }
.plan-period { color: var(--ink-muted); font-weight: 600; }
.plan-tagline { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 22px; }
.plan-features { margin-bottom: 26px; flex-grow: 1; }
.plan-features li {
  padding: 9px 0 9px 28px;
  position: relative;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.plan-features li:first-child { border-top: none; }
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--coral);
  font-weight: 800;
}

/* ───────── CTA band / waitlist ───────── */
.cta-band {
  background: linear-gradient(135deg, var(--coral), var(--amber));
}
.cta-inner { text-align: center; max-width: 620px; margin: 0 auto; color: var(--white); }
.cta-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.cta-sub { font-size: 1.1rem; opacity: 0.95; margin-bottom: 30px; }

/* Final CTA: secondary waitlist below the primary button */
.cta-waitlist { margin-top: 34px; }
.cta-waitlist-label { font-size: 0.95rem; opacity: 0.9; margin-bottom: 12px; }
.waitlist {
  display: flex;
  gap: 10px;
  background: var(--white);
  padding: 8px;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  max-width: 480px;
  margin: 0 auto;
}
.waitlist-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  min-width: 0;
}
.waitlist-input::placeholder { color: var(--ink-muted); }
.waitlist-msg {
  margin-top: 16px;
  font-weight: 600;
  min-height: 1.4em;
  color: var(--white);
}

/* ───────── Footer ───────── */
.site-footer {
  background: var(--ink);
  color: #C9C4BD;
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand .logo-mark { color: var(--white); }
.footer-brand .logo-img { height: 27px; }
/* Footer stacks centred on mobile — keep the logo centred with it. */
@media (max-width: 600px) { .footer-brand .logo-img { margin: 0 auto; } }
.footer-made { font-size: 0.9rem; margin-top: 4px; color: var(--ink-muted); }
.footer-copy { font-size: 0.9rem; color: var(--ink-muted); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--white); }

/* Link to the live example guide inside the examples section lead */
.example-real-link { color: var(--coral); font-weight: 700; text-decoration: none; white-space: nowrap; }
.example-real-link:hover { text-decoration: underline; }

/* ── About & privacy page ─────────────────────────────────────────────── */
.trust-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 34px;
}
@media (max-width: 860px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
/* One per row on a phone, but laid out sideways: icon beside the text rather
   than stacked above it, which left each card tall with a dead right half. */
@media (max-width: 560px) {
  .trust-grid { grid-template-columns: 1fr; gap: 12px; }
  .trust-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: start;
    padding: 18px;
  }
  .trust-emoji { grid-row: 1 / span 2; font-size: 1.45rem; line-height: 1.1; }
  .trust-item h3 { margin: 0 0 5px; }
  .trust-item p { grid-column: 2; font-size: 0.92rem; }
}
.trust-item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 24px 22px;
}
.trust-emoji { font-size: 1.7rem; }
.trust-item h3 { font-size: 1.05rem; font-weight: 800; margin: 10px 0 8px; }
.trust-item p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.contact-band { text-align: left; }
.contact-lines { font-size: 1.1rem; line-height: 2; margin-top: 18px; }
.contact-lines a { color: var(--coral); font-weight: 700; }
.contact-note { color: var(--ink-muted); margin-top: 10px; }

/* ───────── Scroll reveal ───────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ───────── Responsive ───────── */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-support { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .steps { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .plan-featured { transform: none; }
  .plan-featured:hover { transform: translateY(-4px); }
}

@media (max-width: 600px) {
  /* Sections are shorter on a phone, so the desktop rhythm reads as gaps */
  .section { padding: 52px 0; }
  .hero { padding: 32px 0 34px; }
  .container { padding: 0 20px; }
  /* Keep the header on one line: smaller logo + menu bubble + tighter pills so
     the hamburger, wordmark, "My guides" and "Create" all fit without wrapping. */
  .header-inner { height: 60px; }
  .header-left { gap: 9px; }
  .logo-mark { font-size: 1.08rem; white-space: nowrap; }
  .logo-img { height: 25px; }
  .nav-toggle { width: 38px; height: 38px; }
  .nav-toggle svg { width: 18px; height: 18px; }
  .header-right { gap: 7px; }
  .header-right .btn-sm { padding: 8px 14px; font-size: 0.88rem; white-space: nowrap; }
  .features { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .waitlist { flex-direction: column; border-radius: var(--radius); background: transparent; box-shadow: none; padding: 0; gap: 12px; }
  .waitlist-input { background: var(--white); border-radius: 999px; padding: 15px 22px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* Small phones (≈360px Androids): tighten the header just enough to keep the
   hamburger, wordmark, "My guides" and "Create" pills all on one line. */
@media (max-width: 400px) {
  .site-header .header-inner { padding-left: 14px; padding-right: 14px; }
  .header-left { gap: 7px; }
  .logo-mark { font-size: 1rem; }
  .logo-img { height: 23px; }
  .header-right { gap: 6px; }
  .header-right .btn-sm { padding: 8px 11px; font-size: 0.84rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   BUILDER + PUBLISHED GUIDE
   ============================================================ */

/* ---- Builder shell ---- */
.builder-main { padding: 40px 0 80px; min-height: calc(100vh - 68px); }
.builder-wrap { max-width: 760px; margin: 0 auto; }

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}
.wizard-progress .dot {
  width: 36px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.3s var(--ease);
}
.wizard-progress .dot.active { background: var(--coral); }
.wizard-progress .dot.done { background: var(--amber); }

/* Scoped to the builder wizard so it doesn't hide the homepage `.step` cards
   (the landing page reuses the `.step` class for its "how it works" tiles). */
.builder-main .step { display: none; animation: stepIn 0.45s var(--ease); }
.builder-main .step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.step-eyebrow {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 10px;
}
.step-heading {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.step-lead {
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 36px;
}

/* ---- Step 1: category cards ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cat-card {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 18px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  box-shadow: var(--shadow);
}
.cat-card:focus-visible { outline: 3px solid var(--coral-soft); }
.cat-card .cat-emoji { font-size: 2.6rem; display: block; margin-bottom: 12px; }
.cat-card .cat-name { font-weight: 700; font-size: 1.05rem; }
.cat-card .cat-desc { font-size: 0.85rem; color: var(--ink-muted); margin-top: 4px; }
/* "More guide types": reads as an expander, not a fourth guide type. */
.cat-card.cat-more { border-style: dashed; background: transparent; }
.cat-card.cat-more .cat-emoji { color: var(--coral); }
.cat-card.cat-more .cat-name { color: var(--coral-dark); }

/* ---- Step 2: question flow ---- */
.q-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 28px;
}
.q-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber));
  border-radius: 999px;
  width: 0;
  transition: width 0.4s var(--ease);
}
.q-count { text-align: center; color: var(--ink-muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.q-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
}
.q-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.q-hint { color: var(--ink-muted); font-size: 0.92rem; margin-bottom: 20px; }
.q-input, .q-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.q-input:focus, .q-textarea:focus {
  outline: none;
  border-color: var(--coral);
  background: var(--white);
}
.q-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

/* Dictation mic button inside fields */
.field-with-mic { position: relative; }
.q-input.has-mic { padding-right: 56px; }
.q-textarea.has-mic { padding-right: 56px; }
.mic-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    background 0.18s var(--ease), transform 0.12s var(--ease);
}
/* In a multi-line textarea, anchor the mic to the bottom-right. */
.mic-btn--area { top: auto; bottom: 10px; transform: none; }
.mic-btn:hover { border-color: var(--coral); color: var(--coral); }
.mic-btn:active { transform: translateY(-50%) scale(0.94); }
.mic-btn--area:active { transform: scale(0.94); }
.mic-btn.listening {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
  animation: micPulse 1.3s ease-out infinite;
}
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.45); }
  100% { box-shadow: 0 0 0 12px rgba(255, 107, 53, 0); }
}
.q-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 12px 4px;
}
.btn-link:hover { color: var(--ink); }
.btn-link:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- Building loader ---- */
.building { text-align: center; padding: 80px 20px; }
.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid var(--coral-soft);
  border-top-color: var(--coral);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.building-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.building-sub { color: var(--ink-soft); }

/* ============================================================
   GUIDE DOCUMENT (shared by preview + published)
   ============================================================ */
.guide-doc { max-width: 680px; margin: 0 auto; }

.guide-cover {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 28px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.guide-cover .cover-emoji { font-size: 3.4rem; display: block; }
.guide-cover .cover-title { font-size: 2rem; font-weight: 800; margin-top: 10px; }
.guide-cover .cover-sub { font-size: 1rem; opacity: 0.95; margin-top: 6px; }
.guide-cover [contenteditable]:focus { outline: 2px dashed rgba(255,255,255,0.7); border-radius: 6px; }

/* Cover photo */
.guide-cover.has-cover {
  background-size: cover;
  background-position: center;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Desktop: the guide column is pinned at 680px wide, so a 240px-tall cover
   letterboxes the photo into a thin strip. Match the phone's ~3:2 hero shape
   instead (min-height, not aspect-ratio, so long titles still grow the box). */
@media (min-width: 720px) {
  .guide-cover.has-cover { min-height: 420px; }
}
/* No icon: the title block simply re-centres in the freed space (it can be
   dragged clear of a photo's subject with the ↕ move-title control). */
.guide-cover.has-cover .cover-emoji,
.guide-cover.has-cover .cover-title,
.guide-cover.has-cover .cover-sub {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
/* Title + subtitle block — full width so text stays centred; nudged vertically
   via an inline translateY (g.coverTextY). */
.cover-text { width: 100%; }
/* Editor-only ✕ to remove the cover icon (and stop the "＋" add-icon hint). */
.cover-emoji-x {
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 0.8rem; line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4;
}
.cover-emoji-x:hover { background: rgba(0, 0, 0, 0.52); }
.cover-emoji-x[hidden] { display: none; }
/* Editor-only reposition handle on the cover photo (top-left, clears the ✕). */
.cover-reposition-btn {
  position: absolute;
  top: 10px; left: 10px;
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4;
}
.cover-reposition-btn svg { width: 17px; height: 17px; }
.cover-reposition-btn:hover { background: rgba(0, 0, 0, 0.52); }
/* ↕ move-title — same frosted button language, tucked under the reposition
   handle so the two cover controls read as a set. */
.cover-textmove-btn {
  position: absolute;
  top: 48px; left: 10px;
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4;
}
.cover-textmove-btn:hover { background: rgba(0, 0, 0, 0.52); }
.cover-textmove-btn[hidden] { display: none; }
.guide-cover.repositioning .cover-textmove-btn { display: none; }
/* Editor-only standing invitation to add a cover photo (a hero feature that
   shouldn't hide in the dock's 📷 menu). In normal flow under the subtitle,
   frosted on the gradient; hidden once a photo is set. */
.cover-add-photo {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px;
  font-family: inherit; font-size: 0.92rem; font-weight: 700;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px dashed rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.cover-add-photo:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.cover-add-photo[hidden] { display: none; }
/* Section titles anywhere can end with the signature orange full stop. */
.section-title .accent { color: var(--coral); }
/* Same signature, on the headings that live outside .hero-title and
   .section-title: the security claim and the clinic handout. */
.sec-claim-t .accent, .op-title .accent, .op-claim-t .accent { color: var(--color-orange); }

/* ---------- The vet clinic front door (vets.html + homepage band) ---------- */
/* The mockup cover's stand-in clinic logo: a white badge, like the real one. */
.mock-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border-radius: 10px;
  padding: 7px 12px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
/* The security claim: three things an emailed PDF can't do, and the one
   honest caveat, kept in the same block so it never looks buried. */
.sec-contrast {
  list-style: none;
  max-width: 720px;
  margin: 0 auto 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}
.sec-contrast li {
  position: relative;
  padding-left: 26px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.sec-contrast li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--white);
  background: var(--color-orange);
  border-radius: 50%;
}
.sec-honest {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 18px;
  background: var(--white);
  border-left: 4px solid var(--color-ink);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
/* Same claim, leading the one-page security overview. */
.sec-claim {
  margin: 26px 0 34px;
  padding: 26px 24px;
  background: var(--color-cream);
  border: 1.5px solid var(--color-orange);
  border-radius: var(--radius);
}
.sec-claim-t { margin: 0 0 12px; font-size: 1.5rem; font-weight: 800; line-height: 1.25; }
.sec-claim > p { margin: 0 0 16px; }
.sec-claim .sec-contrast { justify-content: flex-start; margin-bottom: 18px; }
.sec-claim .sec-honest { margin: 0; }

/* Workflow timeline: six quiet steps down the page, joined by a line. */
.vets-flow {
  list-style: none;
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}
.vets-flow::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--line);
}
.vets-flow li {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 0 0 26px;
}
.vets-flow li:last-child { padding-bottom: 0; }
.vets-flow-emoji {
  position: relative;
  z-index: 1;
  flex: none;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.vets-flow strong { display: block; font-size: 1.02rem; }
.vets-flow p { margin: 3px 0 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; }

/* Homepage band: a quiet signpost, not a fork in the funnel. */
.vets-band {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.vets-band-emoji { font-size: 1.7rem; }
.vets-band-body { flex: 1; min-width: 220px; }
.vets-band-title { font-weight: 800; }
.vets-band-body p { color: var(--ink-soft); font-size: 0.92rem; margin: 3px 0 0; line-height: 1.5; }

/* Vet start screen: the upload card is a full-width horizontal lead bubble.
   (Doubled selector so it beats the later .start-card flex-column base.) */
.start-card.start-card-lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 2px;
  align-items: center;
}
.start-card.start-card-lead .start-emoji { grid-row: 1 / 3; font-size: 1.9rem; }
.start-card.start-card-lead .start-name { align-self: end; }
.start-card.start-card-lead .start-desc { align-self: start; }

/* Vet flow: upload actions lead the panel — file first, photos second. */
.vet-upload-row { display: flex; flex-direction: column; gap: 10px; margin: 0 0 6px; }
/* These labels are full sentences and the buttons are full width, so let them
   wrap on a narrow phone rather than run past the panel edge. */
.vet-upload-row .btn { white-space: normal; line-height: 1.35; }
.vet-upload-or {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin: 12px 0 2px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.vet-upload-or::before, .vet-upload-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Vet flow: the quiet scratch alternative under the upload panel. */
.start-scratch-alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.start-scratch-alt .btn-link { font-size: inherit; }

/* Share step: the guide code the front desk writes on the paperwork. */
.share-code {
  background: var(--bg-tint);
  border: 1.5px dashed var(--coral);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.share-code strong { font-size: 1.15rem; letter-spacing: 0.04em; }

/* Vet guides: the clinic-logo invitation sits under the photo one, quieter. */
.cover-add-logo {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: none;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.cover-add-logo:hover { background: rgba(255, 255, 255, 0.16); }
/* As the cover's ONLY standing invitation (vet guides), the logo button takes
   the prominence the photo invitation has elsewhere. */
.cover-add-logo-lead {
  margin-top: 20px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px dashed rgba(255, 255, 255, 0.8);
  padding: 11px 20px;
}
.cover-add-logo-lead:hover { background: rgba(255, 255, 255, 0.28); }
/* The clinic logo on the cover: a white badge, so any logo (including
   white-on-transparent) reads on cream, accent colours and photos alike. */
.cover-logo-wrap { position: relative; display: inline-block; }
.cover-logo {
  display: block;
  max-height: 84px;
  max-width: min(280px, 76vw);
  object-fit: contain;
  background: var(--white);
  border-radius: 14px;
  padding: 12px 18px;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-sm);
}
/* No cover photo: the clinic's logo IS the cover image — let it lead. */
.guide-cover:not(.has-cover) .cover-logo {
  max-height: 116px;
  max-width: min(340px, 84vw);
  padding: 16px 22px;
}
.cover-logo-x {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.75rem; line-height: 1;
  cursor: pointer;
  z-index: 4;
}
.cover-logo-x:hover { background: rgba(0, 0, 0, 0.62); }
.cover-reposition-btn[hidden] { display: none; }
.guide-cover.repositioning .cover-reposition-btn { display: none; }
/* Drag-to-reposition the cover photo / move the title */
.guide-cover.repositioning { cursor: grab; touch-action: none; user-select: none; }
.guide-cover.repositioning:active { cursor: grabbing; }
.guide-cover.repositioning .cover-emoji-x { display: none; }
.guide-cover.repositioning .cover-emoji,
.guide-cover.repositioning .cover-title,
.guide-cover.repositioning .cover-sub { pointer-events: none; }
.cover-reposition-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  background: rgba(26, 26, 26, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  z-index: 5;
}
.cover-reposition-done {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink, #1a1a1a);
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.guide-cover { position: relative; }

.cover-tools { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.cover-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.18s var(--ease);
}
.cover-btn:hover { background: rgba(255, 255, 255, 0.34); }

/* Accordion sections */
.guide-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.acc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  padding: 20px 22px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.acc-icon { font-size: 1.5rem; flex-shrink: 0; }
.acc-title-text { flex: 1; }
/* Remove-this-widget "✕" on every block header (sections, emergency, routine, logs) */
.block-x {
  margin-left: auto;
  flex-shrink: 0;
  width: 26px; height: 26px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  /* Destructive at rest — a delete control shouldn't look interchangeable
     with the collapse chevron that can sit beside it. */
  background: rgba(226, 80, 62, 0.09);
  color: #c0453a;
  font-family: inherit;
  font-size: 0.85rem; line-height: 1;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.block-x:hover { background: #e2503e; color: #fff; }
/* Keep the ✕ well clear of the chevron on accordion section headers */
.acc-header .block-x { margin-left: 22px; }
.acc-chevron {
  transition: transform 0.3s var(--ease);
  color: var(--ink-muted);
  flex-shrink: 0;
}
.guide-section.open .acc-chevron { transform: rotate(180deg); }
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--ease);
}
.guide-section.open .acc-body { grid-template-rows: 1fr; }
.acc-body-inner { overflow: hidden; }
.acc-content {
  padding: 0 22px 22px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.log-table td { overflow-wrap: anywhere; word-break: break-word; }
.acc-content[contenteditable]:focus {
  outline: 2px dashed var(--coral);
  border-radius: 8px;
  background: var(--bg-tint);
}
/* Rich-text lists (the global ul reset hides bullets, so restore them here) */
.acc-content ul, .acc-content ol { margin: 6px 0; padding-left: 1.5em; }
.acc-content ul { list-style: disc; }
.acc-content ol { list-style: decimal; }
.acc-content li { margin: 3px 0; }
.acc-content p { margin: 0 0 6px; }
/* Collapsible dropdown blocks inside a section (long lists — e.g. every
   seizure trigger). Native <details>: collapsed for viewers, tap to expand. */
.acc-content details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-tint, #FBF8F5);
  margin: 10px 0;
}
.acc-content summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 11px 14px;
  list-style: none; /* we draw our own chevron */
  display: flex; align-items: center; gap: 9px;
  -webkit-tap-highlight-color: transparent;
}
.acc-content summary::-webkit-details-marker { display: none; }
.acc-content summary::before {
  content: "▸";
  color: var(--coral);
  flex-shrink: 0;
  transition: transform 0.18s var(--ease, ease);
}
.acc-content details[open] > summary::before { transform: rotate(90deg); }
.acc-content details > *:not(summary) { margin: 0 14px 12px; }
/* In the editor the block is pinned open — label it so creators know what
   viewers will get. (Only editor bodies are contenteditable.) */
.acc-content[contenteditable] summary::after {
  content: "viewers tap to expand";
  font-size: 0.7rem; font-weight: 600; color: var(--ink-muted);
  margin-left: auto; padding-left: 10px; flex-shrink: 0;
}
@media print {
  .acc-content details { break-inside: avoid; }
  .acc-content summary::before { content: "▾"; }
}

/* ── Floating glass editor dock (step 3) ───────────────────────────────── */
.edit-dock {
  position: fixed;
  /* Sit just right of the centred content column rather than against the far
     edge of wide screens; clamp to 16px on narrower viewports. */
  right: max(16px, calc(50vw - 440px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 24px;
}
.glass {
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 40px rgba(26, 26, 26, 0.16);
}
/* The dock floats over content (especially on mobile, where it sits atop the
   cover/cards). A lightly-tinted glass fill would disappear over saturated
   colours and leave the lower buttons looking like loose circles, so give the
   dock a more opaque frosted fill so it always reads as one cohesive bar. */
.edit-dock.glass {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.85);
}
.dock-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dock-widget { transition: opacity 0.2s var(--ease); }
.dock-widget.dim { opacity: 0.5; }
.dock-sep { width: 22px; height: 1px; background: rgba(26, 26, 26, 0.12); margin: 1px 0; }
.dock-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-size: 1.2rem; line-height: 1;
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.12s var(--ease), opacity 0.15s var(--ease);
}
.dock-btn:hover:not(:disabled) { background: var(--white); transform: translateY(-1px); }
.dock-btn:disabled { opacity: 0.3; cursor: default; }
.dock-btn.on { background: var(--coral); box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3); }
.dock-btn.dock-danger:hover:not(:disabled) { background: #ffe2e2; }

/* Dock popover (left of the dock on desktop; aligned to its button via JS) */
.dock-pop {
  position: absolute;
  right: calc(100% + 12px);
  top: 0;
  display: flex;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.dock-pop-swatches { flex-wrap: wrap; width: 170px; }
.dock-pop-row { flex-direction: row; }
.dock-pop-list { flex-direction: column; min-width: 152px; }
.dock-pop-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: none; border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.dock-pop-btn:hover { background: var(--coral-soft); color: var(--coral-dark); }
.dock-pop-wide { width: auto; justify-content: flex-start; padding: 10px 14px; font-weight: 600; }

/* Selected-block highlight */
.guide-section.selected,
.guide-log.selected,
.guide-emergency.selected,
.guide-cover.selected {
  outline: 2.5px solid var(--coral);
  outline-offset: 3px;
}

/* Desktop keeps the always-open vertical dock; the collapsed-pill row is a
   mobile-only affordance. */
.dock-collapsed-row { display: none; }

/* Mobile: the dock was hovering mid-screen over the content column, which
   testers found obstructive. It now lives in the bottom-right corner and
   collapses to a single "✏️ Edit" pill; tapping expands the full toolbar
   (growing upward), and tapping anywhere else collapses it again. A small ↶
   bubble sits beside the pill whenever there's something to undo, so a slip
   never costs an expand-and-hunt. */
@media (max-width: 720px) {
  .edit-dock { top: auto; bottom: 18px; transform: none; right: 12px; gap: 5px; padding: 7px; }
  .dock-btn { width: 42px; height: 42px; font-size: 1.1rem; }
  .dock-pop-swatches { width: 150px; }

  .dock-collapsed-row { display: flex; align-items: center; gap: 8px; }
  .dock-toggle {
    border: none; border-radius: 999px;
    padding: 12px 18px;
    background: var(--coral); color: #fff;
    font-family: inherit; font-size: 0.95rem; font-weight: 800; line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(232, 82, 28, 0.35);
  }
  /* Expanded: the pill turns into a quiet ✕ close control at the dock's foot. */
  .edit-dock:not(.dock-collapsed) .dock-toggle {
    background: rgba(26, 26, 26, 0.08); color: var(--ink);
    box-shadow: none; padding: 10px 15px; font-size: 0.9rem;
  }
  .dock-quick-undo {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%;
    background: rgba(255, 255, 255, 0.95); color: var(--ink);
    font-size: 1.15rem; line-height: 1; cursor: pointer;
    box-shadow: 0 4px 14px rgba(26, 26, 26, 0.18);
  }
  .dock-quick-undo[hidden] { display: none; }
  /* Collapsed: hide the tools and the glass shell — only the pill (and the
     quick-undo bubble) remain on screen. */
  .edit-dock.dock-collapsed .dock-zone,
  .edit-dock.dock-collapsed .dock-sep,
  .edit-dock.dock-collapsed .dock-grip { display: none; }
  .edit-dock.dock-collapsed {
    background: transparent; border-color: transparent;
    box-shadow: none; padding: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* Per-media remove (×) overlay */
.sec-media-item { position: relative; margin-bottom: 12px; }
.sec-media-item:last-child { margin-bottom: 0; }
.sec-media-item .sec-photo { margin-bottom: 0; display: block; }
.sec-media-x {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(26, 26, 26, 0.66); color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.sec-media-x:hover { background: #d64545; }
/* Move media to another section */
.sec-media-move {
  position: absolute; top: 8px; right: 44px; z-index: 3;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(26, 26, 26, 0.66); color: #fff;
  font-size: 1rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.sec-media-move:hover { background: var(--coral); }
.sec-media-item.repositioning .sec-media-move { display: none; }
/* Reposition (pan/crop) handle — top-left so it clears the ✕ / ⇄ controls */
.sec-media-repos {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(26, 26, 26, 0.66); color: #fff;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.sec-media-repos svg { width: 17px; height: 17px; }
.sec-media-repos:hover { background: var(--coral); }
.sec-media-item.repositioning .sec-media-repos { display: none; }
.media-move-menu {
  position: fixed; z-index: 60;
  min-width: 200px; max-width: 260px;
  max-height: 60vh; overflow-y: auto;
  padding: 6px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg);
}
.media-move-head {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-muted); padding: 6px 8px 4px;
}
.media-move-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 10px; border: none; border-radius: 8px;
  background: none; color: var(--ink); font-family: inherit;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-move-item:hover { background: var(--soft); }
/* Empty-section prompt encouraging a photo or video */
.sec-media-prompt { display: flex; gap: 8px; flex-wrap: wrap; }
.sec-media-prompt-btn {
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg);
  border: 1px dashed var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.sec-media-prompt-btn:hover { color: var(--coral); border-color: var(--coral); background: var(--soft); }


/* Section media */
.sec-media { padding: 0 22px 18px; }
.sec-photo { width: 100%; border-radius: var(--radius-sm); margin-bottom: 12px; }
.sec-photo-wrap { position: relative; margin-bottom: 12px; }
.sec-photo-wrap .sec-photo { margin-bottom: 0; display: block; }
/* A repositioned section photo is cropped into a banner the creator has panned. */
.sec-photo.is-cropped { height: 220px; object-fit: cover; object-position: 50% 50%; }
/* Photo caption — a figcaption under the image; editable in the builder. */
.sec-photo-title { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; padding: 7px 2px 2px; text-align: left; }
.sec-photo-title[contenteditable] { cursor: text; outline: none; border-radius: 6px; padding: 7px 6px 4px; }
.sec-photo-title[contenteditable]:focus { background: var(--soft); }
.sec-photo-title[contenteditable]:empty::before { content: attr(data-ph); color: var(--ink-muted); opacity: 0.85; }
/* Show-whole-photo toggle (appears once a photo is cropped, beside reposition) */
.sec-media-whole {
  position: absolute; top: 8px; left: 44px; z-index: 3;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(26, 26, 26, 0.66); color: #fff; font-size: 0.95rem;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.sec-media-whole:hover { background: var(--coral); }
.sec-media-item.repositioning { cursor: grab; touch-action: none; user-select: none; }
.sec-media-item.repositioning:active { cursor: grabbing; }
.sec-media-item.repositioning .sec-media-x,
.sec-media-item.repositioning .sec-media-whole { display: none; }
.sec-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.sec-video iframe { width: 100%; height: 100%; border: 0; }
/* Video title bar over the top of a clip. pointer-events:none in the published
   guide so it never blocks the player; editable (auto) in the builder. */
.sec-video-title {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: 9px 14px;
  color: #fff; font-weight: 700; font-size: 0.95rem; line-height: 1.3;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.sec-video-title[contenteditable] { pointer-events: auto; cursor: text; outline: none; }
.sec-video-title[contenteditable]:focus { background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15)); }
.sec-video-title[contenteditable]:empty::before { content: attr(data-ph); opacity: 0.75; font-weight: 500; }

/* Dedicated Videos widget */
.guide-videos {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.videos-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.videos-hint { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 14px; line-height: 1.45; }
.videos-list { display: flex; flex-direction: column; gap: 16px; }
.videos-item { position: relative; }

/* Edit controls inside section (builder only) */
.sec-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 20px;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.tool-btn:hover { border-color: var(--coral); color: var(--coral); }
.tool-btn.danger:hover { border-color: #d64545; color: #d64545; }
.video-input-row { display: flex; gap: 8px; padding: 0 22px 18px; }
.video-input-row input {
  flex: 1; font-family: inherit; font-size: 0.9rem;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px;
}
.video-input-row input:focus { outline: none; border-color: var(--coral); }

/* Emergency block */
.guide-emergency {
  background: #FFF1F0;
  border: 1.5px solid #FFD6D2;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
}
.guide-emergency .em-head {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.1rem; color: #C0392B; margin-bottom: 14px;
}
.contact-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid #FFD6D2;
}
.contact-row:first-of-type { border-top: none; }
.contact-label { font-weight: 700; min-width: 110px; overflow-wrap: anywhere; }
.contact-label[contenteditable]:focus, .contact-value[contenteditable]:focus {
  outline: 2px dashed #C0392B; border-radius: 6px;
}
/* min-width:0 lets the flex item shrink so long values (e.g. URLs) wrap
   instead of overflowing the card. */
.contact-value { flex: 1; min-width: 0; color: var(--ink-soft); overflow-wrap: anywhere; word-break: break-word; }
.contact-value a { color: #C0392B; font-weight: 600; }
.contact-del {
  background: none; border: none; cursor: pointer; color: #C0392B;
  font-size: 1.1rem; opacity: 0.6; line-height: 1;
}
.contact-del:hover { opacity: 1; }

/* Log block */
.guide-log {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.log-head { display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.1rem; margin-bottom: 14px; }
.log-table { width: 100%; border-collapse: collapse; }
.log-table th, .log-table td {
  text-align: left; padding: 9px 8px; font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
}
.log-table th { color: var(--ink-muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.log-table td[contenteditable]:focus { outline: 2px dashed var(--coral); border-radius: 4px; }
.log-empty td { color: var(--ink-muted); font-style: italic; }

/* Viewer "add a log entry" row on the published guide */
.log-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: stretch; }
.log-add .q-input { font-size: 0.95rem; padding: 11px 14px; }
.log-add .log-when { flex: 0 1 150px; min-width: 120px; }
.log-add .log-note { flex: 1 1 180px; min-width: 0; }
.log-add .log-add-btn { flex: 0 0 auto; }
.log-add-msg { margin: 10px 0 0; font-size: 0.85rem; font-weight: 600; }
.log-add-msg.ok { color: #1a9e57; }
.log-add-msg.err { color: var(--coral-dark); }
@media (max-width: 460px) {
  .log-add .log-when, .log-add .log-note { flex: 1 1 100%; }
  .log-add .log-add-btn { width: 100%; }
}

/* ── Per-block accent colours (sections / logs / emergency) ──────────────
   Driven by --accent / --soft custom properties set in JS (GotItStore.applyAccent). */
.guide-section.has-accent { border-left: 6px solid var(--accent); }
.guide-section.has-accent .acc-header { background: var(--soft); }

.guide-log.has-accent { border-left: 6px solid var(--accent); }
.guide-emergency.has-accent {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-left: 6px solid var(--accent);
}
.guide-log.has-accent .log-head,
.guide-emergency.has-accent .em-head {
  background: var(--soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin: -2px -2px 14px;
}
.guide-emergency.has-accent .em-head { color: var(--ink); }

/* Builder action bar */
.builder-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 28px 0 8px;
}
.add-block-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.add-block {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--coral-dark);
  background: var(--coral-soft);
  border: 1.5px dashed var(--coral);
  border-radius: var(--radius);
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.15s var(--ease);
}
.add-block:hover { background: #ffd9c8; transform: translateY(-2px); }
.add-block:active { transform: translateY(0); }

/* Drag-to-reorder */
.drag-handle {
  cursor: grab;
  color: var(--ink-muted);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -2px;
  padding: 2px 2px;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}
.drag-handle:hover { color: var(--coral); }
.drag-handle:active { cursor: grabbing; }
/* Blocks ease into the "lifted" move-mode state (and settle back after). */
.guide-section, .guide-emergency, .guide-log, .guide-routine, .guide-videos {
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.guide-section.dragging,
.guide-emergency.dragging,
.guide-log.dragging,
.guide-routine.dragging,
.guide-videos.dragging {
  opacity: 0.97;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transform: scale(1.04) translateY(-3px);
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  cursor: grabbing;
  position: relative;
  z-index: 20;
}
/* While a block is being dragged, don't let anything on the page get selected
   (stops the browser highlighting the title/dots when you meant to move). */
body.dragging-active { cursor: grabbing; }
body.dragging-active,
body.dragging-active * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
/* Headers are the press-and-hold "move" zone: suppress the iOS long-press
   callout so holding lifts the block instead of selecting text. */
.acc-header, .em-head, .log-head, .routine-head, .videos-head {
  -webkit-touch-callout: none;
}
/* Drag handle also shown on emergency/log headers */
.em-head .drag-handle, .log-head .drag-handle { margin-right: 2px; }

.guide-footer {
  text-align: center;
  padding: 28px 0 12px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.guide-footer a { color: var(--coral); font-weight: 700; }

/* Suggestion box on a published guide (sitter → creator) */
.guide-feedback {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.gfb-title { font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; }
.gfb-lead { color: var(--ink-muted); font-size: 0.9rem; line-height: 1.5; margin: 0 0 14px; }
.gfb-text, .gfb-email {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: var(--bg);
}
.gfb-text { resize: vertical; min-height: 76px; margin-bottom: 10px; }
.gfb-email { margin-bottom: 12px; }
.gfb-text:focus, .gfb-email:focus { outline: none; border-color: var(--coral); }
.gfb-send {
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  color: #fff; background: var(--coral); border: none; border-radius: 999px;
  padding: 12px 22px; cursor: pointer;
}
.gfb-send:hover:not(:disabled) { background: var(--coral-dark, #E85A2A); }
.gfb-send:disabled { opacity: 0.7; cursor: default; }
.gfb-note { font-size: 0.88rem; margin: 12px 0 0; }
.gfb-note.ok { color: #1B7A4F; }
.gfb-note.err { color: #C0392B; }
/* Viewer → creator CTA on every shared free-tier guide (the growth loop) */
.guide-cta {
  max-width: 460px;
  margin: 8px auto 0;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--soft, #FFF3EC), #fff);
  border: 1px solid var(--line, #eee);
  box-shadow: var(--shadow);
  text-align: center;
}
.guide-cta-eyebrow {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--coral); margin: 0;
}
.guide-cta-title { font-size: 1.35rem; font-weight: 800; color: var(--ink); margin: 6px 0 0; line-height: 1.25; }
.guide-cta-sub { font-size: 0.95rem; color: var(--ink-muted); margin: 10px 0 18px; line-height: 1.5; }
/* Override .guide-footer a (coral) so the button keeps its white label */
.guide-footer a.guide-cta-btn { display: inline-block; color: #fff; }
.guide-foot-mini { margin: 18px 0 0; font-size: 0.85rem; color: var(--ink-muted); }

/* ---- Step 4: share ---- */
.share-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  max-width: 520px;
  margin: 0 auto;
}
.share-emoji { font-size: 3rem; }
.share-title { font-size: 1.5rem; font-weight: 800; margin: 8px 0 6px; }
.share-sub { color: var(--ink-soft); margin-bottom: 24px; }
.qr-box {
  display: inline-flex;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.qr-box canvas, .qr-box img { display: block; }
.share-label {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 4px 2px 6px;
}
.share-link {
  display: flex; gap: 8px; margin-bottom: 16px;
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 18px; align-items: center;
}
.share-link input {
  flex: 1; border: none; background: none; font-family: inherit;
  font-size: 0.92rem; color: var(--ink-soft); outline: none; min-width: 0;
}
.share-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.15s var(--ease);
}
.chip:hover { border-color: var(--coral); transform: translateY(-2px); }
.chip-ico { width: 18px; height: 18px; flex: none; }
.share-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* "Download QR" as a quiet text link tucked under the QR image */
.share-qr-dl-row { margin: -12px 0 22px; }
.share-qr-dl { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }

/* Labelled divider between the "share it" and "save/edit" halves of step 4 */
.share-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 30px 0 20px;
  color: var(--ink-muted); font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.share-divider::before, .share-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* No-account fallback: visible but visually secondary to the dashboard hero */
.save-fallback { margin-top: 20px; }
.save-fallback-head {
  text-align: left; font-size: 0.88rem; font-weight: 700;
  color: var(--ink); margin: 0 2px 14px; line-height: 1.45;
}
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--white); padding: 12px 22px;
  border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* The hidden attribute must always win, even over component display rules. */
[hidden] { display: none !important; }

/* ── Repositioned homepage helpers ───────────────────────────── */
/* Hero supporting microcopy */
.hero-micro {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--coral-dark);
  margin: -4px 0 22px;
  line-height: 1.5;
  max-width: 520px;
}

/* Centred lead paragraph under a section heading */
.section-lead {
  max-width: 580px;
  margin: 14px auto 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

/* A section-head used on its own (no grid/cards below it) */
.section-head--solo { margin-bottom: 0; }
.section-cta { margin-top: 28px; }
.section-cta--center { text-align: center; }

/* Hero reassurance ticks under the CTAs */
.hero-reassure {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.hero-reassure li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero-reassure li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--white);
  background: var(--coral);
  border-radius: 50%;
}
@media (max-width: 940px) {
  .hero-reassure { justify-content: center; }
}
/* On a phone, one tick per line centred individually reads as a ragged
   zigzag, and a single centred column floats with wide gutters either side.
   Pair them into a 2x2 that spans the same width as the CTAs above. */
@media (max-width: 620px) {
  .hero-reassure {
    /* One per line: two of these phrases wrap mid-word in a 2-up grid at
       phone widths. Anchored to the container edge (which is also the CTA
       buttons' edge) rather than centred as a block — a centred column of
       ragged-width items floats with wide gutters and reads as unaligned. */
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    justify-content: start;
    gap: 10px;
    text-align: left;
  }
}

/* Who-it's-for cards sit tight under the hero (they ARE the hero's payoff) */
.section-usecases { padding-top: 26px; }
/* Four short cards: two-up on phones rather than one full-width card per row,
   which left the content hugging the left edge with dead space beside it. */
@media (max-width: 600px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cards-4 .card { padding: 18px 15px; border-radius: var(--radius); }
  .cards-4 .card-emoji { font-size: 1.8rem; margin-bottom: 8px; }
  .cards-4 .card-title { font-size: 1.02rem; }
  .cards-4 .card-points { margin-top: 10px; gap: 5px; font-size: 0.9rem; }
  /* Pull the cards up towards the hero they belong to, and don't leave a
     canyon before the next section. */
  .section-usecases { padding-top: 6px; padding-bottom: 44px; }
  .usecase-more { margin-top: 16px; font-size: 0.88rem; }
}
.usecase-more {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.usecase-more a { color: var(--coral-dark); font-weight: 600; }

/* "The little things" — quotes from real handovers, the emotional heart.
   Speech-bubble cards, slightly off-kilter like fridge notes. */
.little-quotes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.little-quote {
  position: relative;
  margin: 0;
  padding: 18px 22px 18px 44px;
  max-width: 340px;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg-tint);
  border-radius: 18px;
}
.little-quote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 6px;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-orange);
  line-height: 1;
}
.little-quote:nth-child(odd) { transform: rotate(-0.8deg); }
.little-quote:nth-child(even) { transform: rotate(0.7deg); }
.little-lead {
  margin: 26px auto 0;
  max-width: 520px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  .little-quote:nth-child(odd), .little-quote:nth-child(even) { transform: none; }
}

/* Video tiles: stylised stand-ins for the real per-section videos —
   an ink card with a play mark, never a fake screenshot */
.vid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}
.vid-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 16 / 11;
  padding: 16px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  text-align: center;
}
.vid-play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-orange);
  color: var(--white);
  font-size: 0.95rem;
  padding-left: 3px; /* optically centre the triangle */
}
.vid-label {
  color: var(--cream, #FAFAF8);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}
@media (max-width: 940px) { .vid-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .vid-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .vid-label { font-size: 0.8rem; } }

/* The scattered-instructions picture: familiar fragments gathered into one
   guide. Flat surfaces only (borders, no shadows or gradients). */
.frag-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 34px auto 0;
  max-width: 780px;
}
.frag-cloud {
  flex: 1 1 55%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.frag-chip {
  padding: 8px 13px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
}
/* A hint of the old scatter: alternate chips sit slightly off-kilter */
.frag-chip:nth-child(odd) { transform: rotate(-1.6deg); }
.frag-chip:nth-child(even) { transform: rotate(1.2deg); }
.frag-arrow {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--coral-dark);
  flex: 0 0 auto;
}
.frag-dest {
  flex: 0 1 240px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.frag-dest-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.frag-dest-row {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 7px 10px;
  background: var(--bg-tint);
  border-radius: 10px;
}
.frag-dest-row + .frag-dest-row { margin-top: 6px; }
@media (max-width: 719px) {
  .frag-flow { flex-direction: column; gap: 14px; }
  .frag-arrow { transform: rotate(90deg); }
  .frag-dest { flex-basis: auto; width: min(100%, 300px); }
}
@media (prefers-reduced-motion: reduce) {
  .frag-chip:nth-child(odd), .frag-chip:nth-child(even) { transform: none; }
}

/* Bulleted highlights inside the use-case cards */
.card-points {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.card-points li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-soft);
}
.card-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

/* Three-up card grid (e.g. the six real-world examples) */
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 940px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }

/* Differentiation comparison list */
.compare-list {
  list-style: none;
  padding: 0;
  margin: 30px auto 0;
  max-width: 780px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 30px;
}
.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.compare-list svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--coral);
  margin-top: 1px;
}

/* Example guide preview card */
.example-wrap { max-width: 440px; margin: 30px auto 0; }
.example-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.example-cover {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  color: var(--white);
  text-align: center;
  padding: 28px 18px;
}
.example-emoji { font-size: 2.6rem; display: block; }
.example-title { font-weight: 800; font-size: 1.3rem; margin-top: 6px; }
.example-sub { font-size: 0.85rem; opacity: 0.92; margin-top: 2px; }
.example-sections { list-style: none; margin: 0; padding: 8px 18px; }
.example-sections li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--ink);
}
.example-sections li:last-child { border-bottom: none; }
.example-sections li span { font-size: 1.2rem; width: 24px; text-align: center; }
.example-cta { padding: 14px 18px 20px; }

/* Two-up pricing (Personal + Pro) */
.pricing-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.plan-badge--soon { background: var(--ink-muted); }

/* About / founder story */
.about-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: center;
}
.about-photo { text-align: center; }
.about-photo img {
  display: inline-block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--coral-soft), var(--shadow-lg);
}
.about-title { margin: 10px 0 18px; }
.about-text p {
  color: var(--ink-muted);
  font-size: 1.06rem;
  line-height: 1.7;
  margin: 0 0 14px;
}
.about-kicker {
  color: var(--ink) !important;
  font-weight: 700;
}
@media (max-width: 780px) {
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .compare-list { grid-template-columns: 1fr; }
  .pricing-2 { grid-template-columns: 1fr; max-width: 420px; }
}

/* Feedback — floating button + modal (persistent across builder steps) */
.feedback-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
  background: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 11px 17px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s var(--ease), background 0.18s var(--ease);
}
.feedback-fab:hover { transform: translateY(-2px); background: #000; }
.feedback-fab svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 640px) {
  .feedback-fab span { display: none; }
  .feedback-fab { padding: 13px; }
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
}
.feedback-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px 22px;
  animation: fbpop 0.18s var(--ease);
}
@keyframes fbpop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.feedback-x {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  color: var(--ink-muted); cursor: pointer;
}
.feedback-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.feedback-lead { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 16px; line-height: 1.5; }
.feedback-card .q-textarea { width: 100%; margin-bottom: 12px; }
.feedback-card .q-input { width: 100%; margin-bottom: 16px; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 10px; }
/* Cover nudge: two comfortable choices that never overflow the card */
.coverask-actions { flex-wrap: wrap; margin-top: 6px; }
.coverask-actions .btn { flex: 1 1 auto; white-space: nowrap; }
/* "Just a sec…" — the conversational pause before the finish line. Softer
   than the other question embeds: warm tint, breathing room, a voice. */
.lf-embed.lf-jas {
  background: #FFF8E7;
  border: 1.5px solid #F2D68A;
  border-radius: var(--radius-sm);
  padding: 18px 16px;
}
.lf-jas-eyebrow {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 2px;
}
.lf-jas-pre {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.lf-jas .lf-q { font-size: 1.02rem; }
.lf-jas-note { color: #8A6D1C; }
/* Standalone wrapper when the moment is active: extra breathing room,
   no section-card shell around it */
.lf-jas-wrap { margin: 26px 0 10px; }

/* Contextual idea line inside the dock's Add menu */
.dock-pop-hint {
  padding: 4px 12px 8px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  max-width: 230px;
}

/* Add-section template picker */
.secpick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.secpick-chip {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}
.secpick-chip:hover, .secpick-chip:focus-visible { border-color: var(--color-orange); color: var(--coral-dark); }
.secpick-chip--custom { border-style: dashed; color: var(--ink-soft); }

/* "Before You Worry" — the signature section. Warm amber, not alarming:
   a gentle tint that says "helpful tip", distinct from every other card. */
.privacy-formal-link {
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- Privacy policy page ---------- */
.policy-inner { max-width: 760px; }
.policy .section-title .accent { color: var(--coral); }
.policy-updated { color: var(--ink-muted); font-size: 0.85rem; margin: -6px 0 22px; }
.policy p, .policy li { color: var(--ink-soft); line-height: 1.65; }
.policy p { margin: 0 0 14px; }
.policy h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 30px 0 10px;
}
.policy ul { margin: 0 0 14px; padding-left: 22px; }
.policy li { margin-bottom: 6px; }
.policy a { color: var(--coral-dark); }
/* Reference tables (data-processing.html): scroll inside their own frame on
   phones — the page itself must never pan sideways. */
.policy-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.policy-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.policy-table th, .policy-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
.policy-table th {
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- Vet discharge guides ---------- */
/* The veterinary-advice disclaimer: shown in the builder above the publish
   bar, inside the safety-check modal, and under the published guide's cover.
   Deliberately quiet — present, not alarming. */
.vet-disclaimer {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 14px 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
/* Medications: the section a carer reaches for first — orange spine, strong title. */
.guide-section.sec-med { border-left: 5px solid var(--coral); }
.guide-section.sec-med .acc-title-text { font-weight: 800; }
/* Emergency warning signs: framed in ink so it reads as serious, not decorated. */
.guide-section.sec-urgent { border: 2px solid var(--ink); }
.guide-section.sec-urgent .acc-title-text { font-weight: 800; }
/* Unresolved "⚠️ Check with your clinic" flags from the AI extraction: the
   same amber language as Before You Worry, so "needs a human" reads
   consistently across the product. */
mark.vet-flag {
  display: inline-block;
  background: #FFF8E7;
  border: 1px solid #F2D68A;
  border-radius: 8px;
  padding: 2px 8px;
  margin: 2px 0;
  color: #8A6D1C;
  font-weight: 600;
}
/* Pre-publish safety-check modal bits */
.vetcheck-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.vetcheck-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.vetcheck-list li:last-child { border-bottom: none; }
.vetcheck-flags {
  background: #FFF8E7;
  border: 1px solid #F2D68A;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #8A6D1C;
  font-weight: 600;
}
.vetcheck-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.vetcheck-confirm input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--coral);
  flex-shrink: 0;
}
/* Flag triage: the ⚠️ to-do list staff action as soon as a vet guide is
   built. Same amber language as the flags themselves. */
.vet-triage-chip {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  color: #8A6D1C;
  background: #FFF8E7;
  border: 1.5px solid #F2D68A;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.vet-triage-chip:hover { border-color: #8A6D1C; }
.vt-card { max-height: 84vh; overflow-y: auto; }
.vt-item {
  padding: 14px;
  margin: 0 0 12px;
  background: #FFF8E7;
  border: 1px solid #F2D68A;
  border-radius: var(--radius-sm);
}
.vt-item-sec {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8A6D1C;
  margin: 0 0 4px;
}
.vt-item-text {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.vt-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vt-answer { margin-top: 10px; }
.vt-answer .q-textarea { width: 100%; min-height: 64px; margin: 0 0 8px; }
.vt-saveall { margin: 4px 0 12px; }
/* SMS to the owner: signposted, not yet built — faded so it reads as a
   promise rather than a button someone will keep pressing. */
.sms-soon { opacity: 0.55; margin-top: 18px; }
.sms-soon input, .sms-soon button { cursor: not-allowed; }
.soon-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
/* The tidy-up offer, once every flag has been actioned. */
.vt-refine {
  padding: 16px;
  margin: 4px 0 12px;
  background: var(--cream);
  border: 1.5px solid var(--coral);
  border-radius: var(--radius-sm);
}
.vt-refine-t { margin: 0 0 6px; font-size: 1rem; font-weight: 800; color: var(--ink); }
.vt-refine-p { margin: 0 0 12px; font-size: 0.88rem; line-height: 1.5; color: var(--ink-muted); }
.vt-refine-note { margin: 10px 0 0; font-size: 0.85rem; font-weight: 600; }
.vt-refine-note.ok { color: #1a9e57; }
.vt-refine-note.error { color: var(--coral-dark); }

.guide-section.sec-byw {
  background: #FFF8E7;
  border: 1.5px solid #F2D68A;
}
.guide-section.sec-byw .acc-icon { filter: none; }
.byw-intro {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8A6D1C;
}
/* In the editor the intro is a sibling of .acc-content, so it misses that
   element's 22px side padding and sits proud of the body text. (In the
   published guide it lives inside .acc-content and is already aligned.) */
.acc-body-inner > .byw-intro { padding: 0 22px; }

/* Empty sections show their hint as a real placeholder, not as text the
   creator has to delete before typing. Editor only — the published guide
   omits .acc-content entirely when a section has no body. */
.acc-content[contenteditable]:empty::before {
  content: "Tap to add details…";
  color: var(--ink-muted);
  pointer-events: none;
}

/* Warm send-off above the publish button (replaced the checklist) */
.pub-ready {
  margin: 22px 0 6px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

/* Video modal idea list */
.video-ideas {
  margin: 10px 0 14px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* Keep-your-key nudge (post-publish): stacked actions, quiet honest skip */
.keep-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.keep-skip {
  display: block;
  margin: 16px auto 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.feedback-note { margin: 12px 0 0; font-size: 0.88rem; font-weight: 600; }
.feedback-note.error { color: var(--coral-dark); }
.feedback-note.ok { color: #1a9e57; }

/* Feedback screenshot attach */
.feedback-attach { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; }
.feedback-attach-btn { cursor: pointer; }
.feedback-attach-preview { position: relative; display: inline-block; }
.feedback-attach-preview img {
  display: block; width: 54px; height: 54px;
  object-fit: cover; border-radius: 8px; border: 1px solid var(--line);
}
.feedback-attach-x {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 0.9rem; line-height: 1; cursor: pointer;
}

/* Header actions + AI button */
.header-actions { display: flex; align-items: center; gap: 10px; }

/* Polish action under question fields */
.field-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* "Help shape GotIt" prompt on the share page */
.share-feedback {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 22px auto 0;
  padding: 16px 18px;
  background: var(--coral-soft);
  border: 1px solid var(--coral);
  border-radius: var(--radius);
}
.share-feedback-emoji { font-size: 1.6rem; flex: none; }
.share-feedback-body { flex: 1; }
.share-feedback-title { font-weight: 700; }
.share-feedback-text { color: var(--ink-muted); font-size: 0.88rem; margin-top: 2px; line-height: 1.45; }
.share-feedback .btn { flex: none; }
@media (max-width: 520px) {
  .share-feedback { flex-direction: column; text-align: center; }
}

/* Compact "Add" dropdown (file / photo / video) */
.add-menu { position: relative; display: inline-block; }
.add-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 150px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.add-menu-item {
  text-align: left;
  background: none;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.add-menu-item:hover { background: var(--bg-tint); }
/* While a dropdown (Add / Colour) is open, let it escape the card. The section
   is overflow:hidden for its corners AND the tools live inside .acc-body-inner
   which is overflow:hidden for the accordion animation — lift both. */
.guide-section.add-open { overflow: visible; position: relative; z-index: 5; }
.guide-section.add-open .acc-body-inner { overflow: visible; }

/* Colour picker (per-block accent) */
.color-menu-btn { display: inline-flex; align-items: center; gap: 0; }
.color-dot {
  display: inline-block;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--amber));
  box-shadow: 0 0 0 1px var(--line);
  vertical-align: middle;
}
.color-dot--none { background: var(--white); }
.color-menu-list {
  flex-direction: row;
  flex-wrap: wrap;
  width: 180px;
  gap: 8px;
  padding: 12px;
}
.swatch {
  width: 26px; height: 26px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  transition: transform 0.12s var(--ease);
}
.swatch:hover { transform: scale(1.12); }
.swatch.active { box-shadow: 0 0 0 2px var(--ink); }
.swatch-default { background: var(--white); position: relative; overflow: hidden; }
.swatch-default::after {
  content: "";
  position: absolute;
  left: 50%; top: -3px; bottom: -3px;
  width: 2px; margin-left: -1px;
  background: #d64545;
  transform: rotate(45deg);
}

/* Per-step media preview (photo / video) in the question flow */
.q-media { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.q-media-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.q-media-item img { display: block; width: 96px; height: 96px; object-fit: cover; }
.q-media-vid {
  display: flex;
  align-items: center;
  padding: 0 30px 0 12px;
  height: 44px;
  font-weight: 600;
  font-size: 0.9rem;
}
.q-media-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.6);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.q-media-vid .q-media-x { background: var(--ink-muted); }

/* Add-a-video modal: upload control */
.video-upload-hint { margin: 8px 0 4px; color: var(--ink-muted); font-size: 0.82rem; line-height: 1.45; }
.video-progress { margin: 12px 0 4px; }
.video-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.video-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--amber));
  border-radius: 999px;
  transition: width 0.2s var(--ease);
}
.video-progress-label { margin: 8px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.video-or {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.video-or::before, .video-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Add-a-video modal instructions */
.video-help { margin: 0 0 16px; padding-left: 18px; color: var(--ink-muted); font-size: 0.92rem; line-height: 1.55; }
.video-help li { margin-bottom: 8px; }
.video-help strong { color: var(--ink); }
.feedback-card .q-input { width: 100%; }
.tool-btn:disabled { opacity: 0.6; cursor: default; }
.tool-btn:disabled:hover { border-color: var(--line); color: var(--ink-soft); }

/* AI key modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(26, 26, 26, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  animation: stepIn 0.3s var(--ease);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 12px; }
.modal-text { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; }
.modal-hint { color: var(--ink-muted); font-size: 0.82rem; margin-top: 10px; line-height: 1.5; }
.modal-text a, .modal-hint a { color: var(--coral); font-weight: 600; }
.modal-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

/* Build-from-notes/file panel (first question of each category) */
.import-panel {
  border: 1px solid var(--coral-soft);
  background: var(--bg-tint);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.import-toggle {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 14px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--coral-dark);
  cursor: pointer;
}
.import-toggle:hover { background: var(--coral-soft); }
.import-toggle.open { border-bottom: 1px solid var(--coral-soft); }
.import-body { padding: 4px 18px 18px; }
.import-lead { color: var(--ink-soft); font-size: 0.92rem; margin: 8px 0 12px; line-height: 1.5; }
.import-text { width: 100%; min-height: 110px; margin-bottom: 12px; }
.import-file-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.import-file-btn { cursor: pointer; display: inline-flex; align-items: center; }
.import-file-name { color: var(--ink-muted); font-size: 0.85rem; word-break: break-all; }
.import-go { width: 100%; }

/* Start chooser — paste existing notes vs start from scratch */
.start-grid {
  display: grid;
  /* minmax(0, …) not 1fr: a bare 1fr track is minmax(auto, 1fr) and cannot
     shrink below its widest child's min-content. Buttons are white-space:
     nowrap, so one long label ("Take or add photos of the paperwork") would
     otherwise inflate the track past the card and push the panel off-screen. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 8px;
}
.start-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.start-card:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  box-shadow: var(--shadow);
}
.start-card:focus-visible { outline: 3px solid var(--coral-soft); }
.start-card.active {
  border-color: var(--coral);
  box-shadow: var(--shadow);
  background: var(--bg-tint);
}
.start-emoji { font-size: 2.2rem; line-height: 1; }
/* Custom modern-mic icon (Talk it out) — brand-coloured, sized like an emoji */
.start-emoji .mic-modern { display: block; width: 1em; height: 1em; color: var(--coral); }
.start-name { font-weight: 700; font-size: 1.12rem; }
.start-desc { font-size: 0.9rem; color: var(--ink-muted); line-height: 1.45; }

/* Paste panel: opens inside the chooser grid, directly under the tapped card
   (builder.js moves it there), spanning the full row. */
.paste-panel {
  margin-top: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  animation: stepIn 0.3s var(--ease);
}
.start-grid .paste-panel { grid-column: 1 / -1; margin-top: 0; }
.paste-help { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.55; margin-bottom: 14px; }
.paste-text { width: 100%; min-height: 150px; margin-bottom: 12px; }
.paste-panel .import-file-row { margin-bottom: 8px; }
.paste-photo-hint { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.45; margin: 0 0 12px; }
/* "Or paste a link" — read a public page / Google Doc into the notes box */
.import-link-row { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.import-link-input { flex: 1; min-width: 0; padding-left: 12px; padding-right: 10px; }
.import-link-row .btn { flex: none; padding: 10px 14px; }
.import-link-note { font-size: 0.84rem; line-height: 1.45; margin: 0 0 12px; }
.import-link-note.ok { color: var(--green, #2E9E6B); }
.import-link-note.err { color: var(--coral-dark, #D65F33); }
/* "Talk it out" recorder */
.import-record { margin: 4px 0 14px; }
.record-btn.recording { background: #d64545; }
.record-btn.recording:hover { background: #c23b3b; }
.record-btn span { font-variant-numeric: tabular-nums; opacity: 0.92; }
.record-status { font-size: 0.86rem; color: var(--ink-muted); line-height: 1.45; margin: 8px 2px 0; text-align: center; }

/* Chosen import attachments (photos / files) */
.paste-attach { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.paste-attach:empty { margin: 0; }
.paste-attach-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.paste-attach-item img { display: block; width: 64px; height: 64px; object-fit: cover; }
.paste-attach-doc {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 30px 0 12px;
  max-width: 220px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.paste-attach-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paste-attach-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.6);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.paste-attach-doc .paste-attach-x { top: 50%; transform: translateY(-50%); background: var(--ink-muted); }

@media (max-width: 560px) {
  .start-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Stats page */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 28px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 14px;
  text-align: center;
}
.stat-emoji { font-size: 1.6rem; }
.stat-num { font-size: 2rem; font-weight: 800; margin-top: 4px; }
.stat-label { color: var(--ink-muted); font-size: 0.82rem; margin-top: 2px; }
.stat-h2 { font-size: 1.1rem; font-weight: 700; margin: 8px 0 10px; }
.stat-sub { font-weight: 400; font-size: 0.85rem; color: var(--ink-muted); }
.stat-list { list-style: none; padding: 0; margin: 0; }
.stat-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px; border-bottom: 1px solid var(--line); gap: 12px;
}
.stat-list li:last-child { border-bottom: none; }
.stat-list li span { color: var(--ink-muted); font-size: 0.9rem; white-space: nowrap; }
.stat-empty { color: var(--ink-muted); }
/* Whole-page date window bar (chips + custom from/to pair) */
.stat-winbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 12px 14px;
  background: var(--bg-tint);
  border-radius: var(--radius-sm);
}
.stat-win-custom { display: inline-flex; align-items: center; gap: 6px; }
.stat-win-custom input[type="date"] {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}
.stat-win-note { font-size: 0.85rem; font-weight: 700; color: var(--coral-dark); }
.stat-win-mark { display: inline-flex; gap: 6px; align-items: center; }
.stat-updated { font-size: 0.8rem; color: var(--ink-muted); margin-left: auto; }

/* Value line under a chart — a hover tooltip is invisible on a phone */
.chart-readout {
  margin: 6px 0 22px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}
.chart-readout-hint { font-weight: 500; color: var(--ink-muted); }
.stat-chart.has-readout i { cursor: pointer; }
.stat-chart i.picked { background: var(--coral-dark); }
.stat-chart i:focus-visible { outline: 2px solid var(--coral-dark); outline-offset: 1px; }
/* "Since you last checked" delta strip */
.stat-since {
  margin: -8px 0 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.stat-since b { color: var(--ink); }
/* Windowed funnel line under the creation funnel grid (follows the range chips) */
.stat-window {
  margin: -10px 0 26px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.stat-window b { color: var(--ink); }
.stat-foot { color: var(--ink-muted); font-size: 0.8rem; margin-top: 22px; }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }

/* Per-guide breakdown */
.stat-chipbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 12px;
}
.stat-chip {
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
  font-family: inherit; font-size: 0.82rem; font-weight: 700; line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.stat-chip:hover { border-color: var(--coral); }
.stat-chip.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.stat-chip-label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-muted); margin-right: 2px;
}
.stat-chip-sep { flex: 1 1 auto; min-width: 8px; }
/* Range chips live inside the chart's h2, right-aligned on one line */
.stat-range { float: right; display: inline-flex; gap: 4px; }
.stat-range .stat-chip { padding: 4px 10px; font-size: 0.76rem; }
.stat-filter {
  width: 100%; box-sizing: border-box; margin: 0 0 12px;
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-family: inherit; font-size: 0.92rem; color: var(--ink);
}
.stat-filter:focus { outline: none; border-color: var(--coral); }
.stat-guides { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
/* "Show all N guides" expander under the collapsed per-guide list */
.sg-more { display: block; width: 100%; text-align: center; margin: 2px 0 10px; }
/* Broadcast recipient picker */
.bcast-pick { margin: 0 0 14px; }
.bcast-pick summary { cursor: pointer; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.bcast-recips { max-height: 240px; overflow-y: auto; padding: 10px 2px 2px; }
.bcast-recip { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.bcast-recip-all { border-bottom: 1px solid var(--line); padding-bottom: 9px; margin-bottom: 4px; }
.bcast-src { color: var(--ink-muted); font-size: 0.78rem; }
/* Log write-permission toggle (editor) + read-only note (viewer) */
.log-perm { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font-size: 0.88rem; color: var(--ink-soft); cursor: pointer; }
.log-perm-hint { color: var(--ink-muted); font-size: 0.8rem; }
.log-readonly { color: var(--ink-muted); font-size: 0.88rem; margin: 10px 0 0; }

/* ============================================================
   "Lights up as you answer" scratch flow (stepLive)
   The guide skeleton is on screen from the start: ghost cards turn real as
   answers land; one spotlighted question is pinned above the keyboard.
   ============================================================ */
.lf-top { text-align: center; margin-bottom: 14px; }
.lf-count { font-size: 0.82rem; color: var(--ink-muted); margin-top: 4px; }
/* The spotlight is inline (under its card) on every screen size, so the doc
   only needs a little breathing room at the bottom. */
.lf-doc { padding-bottom: 80px; }
/* Cover states */
.lf-cover { cursor: pointer; min-height: 150px; padding: 30px 20px; }
.lf-cover .cover-emoji { font-size: 2.4rem; }
.lf-cover .cover-title { font-size: 1.5rem; }
.lf-ghost-cover {
  background: linear-gradient(135deg, #F4EDE6, #EFE7DD);
  box-shadow: none;
}
.lf-ghost-cover .cover-emoji { opacity: 0.55; }
.lf-ghost-cover .cover-title, .lf-ghost-cover .cover-sub { color: var(--ink-muted); text-shadow: none; }
.lf-cover.has-cover { background-size: cover; background-position: center; }
/* Section cards */
.lf-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.lf-card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.lf-card-icon { font-size: 1.1rem; }
.lf-card-body { margin-top: 8px; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.55; }
.lf-ghost { opacity: 0.5; border: 1.5px dashed var(--line); box-shadow: none; }
.lf-ghost .lf-card-title { color: var(--ink-muted); }
/* Just-completed ✓ badge */
.lf-lit { position: relative; }
.lf-lit::after {
  content: "✓";
  position: absolute; top: 10px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #1B7F4B; color: var(--white);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lf-cover.lf-lit::after { top: 12px; right: 14px; }
/* The current step: its card expands into the input — no overlay, the
   section IS the question. */
.lf-card.lf-open {
  opacity: 1; cursor: default;
  border: 1.5px solid var(--coral);
  box-shadow: 0 0 0 3px rgba(237, 116, 70, 0.18), var(--shadow);
}
.lf-cover.lf-open { cursor: default; }
.lf-open .lf-card-title { color: var(--ink); }
/* The question block that lives inside the open card/cover */
.lf-embed { margin-top: 12px; text-align: left; }
.lf-cover .lf-embed {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--ink);
  text-shadow: none;
}
.lf-q { font-weight: 800; font-size: 1.02rem; }
.lf-hint { font-size: 0.82rem; color: var(--ink-muted); margin: 3px 0 0; }
.lf-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.lf-btn-row .btn { flex: 0 0 auto; }
/* Small screens: Back + a big Next share the row (primary gets the thumb
   target); "Skip for now" becomes a quiet centred text link underneath —
   a deliberate two-line layout instead of an accidental wrap. */
@media (max-width: 719px) {
  .lf-btn-row .lf-flex { display: none; }
  .lf-btn-row #lfBack { order: 1; }
  .lf-btn-row #lfNext { order: 2; flex: 1 1 auto; }
  .lf-btn-row #lfSkip {
    order: 3; flex: 1 0 100%;
    background: transparent; border: none; box-shadow: none;
    color: var(--ink-muted); font-weight: 600;
  }
  .lf-btn-row #lfPhotoAdd { flex: 1 1 auto; }
}
.lf-flex { flex: 1; }
.lf-field-wrap { flex: 1; min-width: 200px; }
.lf-input { width: 100%; box-sizing: border-box; }
textarea.lf-input { resize: none; }
.lf-actions { margin-top: 8px; justify-content: flex-end; }
.lf-finish-hint { text-align: center; margin-top: 12px; }
/* Photo step: the cover is drag-to-frame; the decision panel sits below it */
.lf-cover.lf-reframe { cursor: grab; touch-action: none; user-select: none; }
.lf-cover.lf-reframe:active { cursor: grabbing; }
.lf-centre-btn {
  position: absolute;
  top: 10px; left: 10px;
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4;
}
.lf-centre-btn svg { width: 17px; height: 17px; }
.lf-centre-btn:hover { background: rgba(0, 0, 0, 0.52); }
.lf-photo-panel { opacity: 1; }
.lf-hint-ico svg { width: 13px; height: 13px; vertical-align: -2px; display: inline-block; }
@media (max-width: 719px) {
  .lf-photo-panel #lfPhotoAdd { order: 1; flex: 0 0 auto; }
  .lf-photo-panel #lfPhotoSkip { order: 2; flex: 1 1 auto; }
}
/* Legacy overlay container (unused; kept for markup compatibility) */
.lf-spot { display: none; }
/* "Saved" trace: a green line draws itself around the completed card */
.lf-tracing { position: relative; }
.lf-trace-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
/* Companion flash on the card itself when the loop closes */
.lf-card.lf-saved { border-color: #1B7F4B; box-shadow: 0 0 0 1px #1B7F4B, 0 6px 22px rgba(27, 127, 75, 0.18); transition: border-color 0.2s, box-shadow 0.2s; }
.lf-cover.lf-saved { box-shadow: 0 0 0 3px #1B7F4B, var(--shadow); transition: box-shadow 0.2s; }
/* Sparkle burst at the point where the trace completes */
.lf-spark {
  position: absolute;
  z-index: 6;
  font-size: 17px;
  line-height: 1;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: lfSparkPop 0.38s ease-out forwards;
}
.lf-spark-2 {
  font-size: 11px;
  margin-left: 16px;
  margin-top: 7px;
  animation-delay: 0.08s;
}
@keyframes lfSparkPop {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0; }
  45%  { transform: translate(-50%, -50%) scale(1.35) rotate(8deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.55) rotate(20deg); opacity: 0; }
}
/* Building loader: floating emoji among sparkles (shares pub-* keyframes) */
.building-fx { position: relative; display: inline-block; padding: 10px 44px 6px; margin-bottom: 6px; }
.building-emoji { font-size: 54px; line-height: 1; display: inline-block; animation: pubFloat 1.5s ease-in-out infinite; }
.building-fx .pub-sparks span { position: absolute; font-size: 15px; opacity: 0; animation: pubSpark 1.7s ease-in-out infinite; }
.building-fx .pub-sparks span:nth-child(1) { top: 0;    left: 16%; animation-delay: 0s; }
.building-fx .pub-sparks span:nth-child(2) { top: 22%;  right: 6%; animation-delay: 0.3s; font-size: 12px; }
.building-fx .pub-sparks span:nth-child(3) { bottom: 18%; left: 4%; animation-delay: 0.6s; }
.building-fx .pub-sparks span:nth-child(4) { bottom: 0;  right: 18%; animation-delay: 0.9s; }
.building-fx .pub-sparks span:nth-child(5) { top: 46%;  left: -4%; animation-delay: 1.2s; font-size: 12px; }
.building-fx .pub-sparks span:nth-child(6) { top: -8%;  right: 34%; animation-delay: 1.5s; }

/* "Drag to frame" invitation, bobbing on the fresh cover photo */
.lf-drag-hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lfDragBob 1.3s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.3s;
}
.lf-drag-hint-gone { opacity: 0; }
@keyframes lfDragBob {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-44%, -56%); }
}
/* Routine suggestions mined from the answers: tap-to-confirm chips */
.routine-suggest {
  background: var(--bg-tint);
  border: 1.5px dashed var(--coral);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 12px 0 4px;
}
.routine-suggest-t { font-size: 0.86rem; font-weight: 700; color: var(--coral-dark); margin-bottom: 9px; }
.routine-suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.routine-suggest-chip {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  /* Dashed like the box around it: these are proposals, not items yet.
     Real routine items render solid — the border is the tell. */
  border: 1.5px dashed var(--line-dark, var(--line));
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
}
.routine-suggest-chip .rsc-plus {
  color: var(--coral-dark);
  font-weight: 800;
  margin-right: 5px;
}
.routine-suggest-chip:hover { border-color: var(--coral); border-style: solid; color: var(--coral-dark); }
.routine-suggest-actions { display: flex; gap: 12px; align-items: center; flex-basis: 100%; margin-top: 4px; }

/* Privacy bubble (kids flow): quiet, expandable, never blocking */
.lf-privacy {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  padding: 0;
}
.lf-privacy summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.lf-privacy summary::-webkit-details-marker { display: none; }
.lf-privacy summary::after { content: "▾"; float: right; color: var(--ink-muted); transition: transform 0.2s; }
.lf-privacy[open] summary::after { transform: rotate(180deg); }
.lf-privacy-body {
  padding: 0 16px 13px;
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.lf-privacy-body a { color: var(--coral-dark); font-weight: 600; text-decoration: underline; }

/* End-cap: the ghost publish button that marks the flow's finish line */
.lf-endcap { text-align: center; margin: 18px 0 4px; pointer-events: none; }
.lf-endcap-btn {
  display: inline-block;
  padding: 13px 26px;
  border: 1.5px dashed var(--coral);
  border-radius: 999px;
  color: var(--coral-dark);
  font-weight: 700;
  opacity: 0.55;
  background: var(--bg-tint);
}
.lf-endcap-note { margin-top: 7px; font-size: 0.8rem; color: var(--ink-muted); }

/* Publish ceremony: dim screen, floating emoji among sparkles, payoff beat */
.pub-overlay {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 26, 26, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 0.32s ease;
}
.pub-overlay.pub-fade { opacity: 0; }
.pub-card { position: relative; text-align: center; color: var(--white); padding: 34px 46px; }
.pub-emoji { font-size: 58px; line-height: 1; animation: pubFloat 1.5s ease-in-out infinite; }
.pub-text { margin-top: 16px; font-weight: 800; font-size: 1.18rem; }
.pub-done .pub-emoji { animation: pubPop 0.5s var(--ease); }
.pub-sparks span {
  position: absolute; font-size: 17px; opacity: 0;
  animation: pubSpark 1.7s ease-in-out infinite;
}
.pub-sparks span:nth-child(1) { top: 6%;  left: 12%; animation-delay: 0s; }
.pub-sparks span:nth-child(2) { top: 18%; right: 8%;  animation-delay: 0.3s; font-size: 13px; }
.pub-sparks span:nth-child(3) { bottom: 30%; left: 2%; animation-delay: 0.6s; }
.pub-sparks span:nth-child(4) { bottom: 12%; right: 16%; animation-delay: 0.9s; }
.pub-sparks span:nth-child(5) { top: 40%; left: -6%; animation-delay: 1.2s; font-size: 13px; }
.pub-sparks span:nth-child(6) { top: -4%; right: 30%; animation-delay: 1.5s; }
.pub-done .pub-sparks span { animation: pubSparkBurst 0.55s ease-out forwards; opacity: 1; }
@keyframes pubFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-9px) scale(1.05); }
}
@keyframes pubPop {
  0%   { transform: scale(0.82); }
  55%  { transform: scale(1.32); }
  100% { transform: scale(1); }
}
@keyframes pubSpark {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50%      { opacity: 1; transform: scale(1.1); }
}
@keyframes pubSparkBurst {
  0%   { opacity: 1; transform: scale(0.6); }
  60%  { opacity: 1; transform: scale(1.5) rotate(12deg); }
  100% { opacity: 0; transform: scale(0.8) rotate(24deg); }
}
/* The floating feedback bubble sits over the question card's buttons on small
   screens — hide it while the live flow is the active step. */
@media (max-width: 720px) {
  body:has(#stepLive.active) .feedback-fab { display: none; }
}
.sg-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px;
}
.sg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sg-name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.sg-name:hover { color: var(--coral); text-decoration: underline; }
.sg-when { color: var(--ink-muted); font-size: 0.78rem; white-space: nowrap; flex-shrink: 0; }
.sg-new {
  flex-shrink: 0; align-self: center;
  background: var(--coral); color: #fff;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em;
  border-radius: 999px; padding: 2px 8px;
}
.sg-metrics { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.sg-metric { color: var(--ink-muted); font-size: 0.88rem; }
.sg-metric b { color: var(--ink); font-weight: 800; }
.sg-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-muted); font-size: 0.78rem; }
.sg-feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sg-feat {
  font-size: 0.76rem; font-weight: 600; color: var(--ink-soft);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px;
}

/* Custom link name (builder) */
.slug-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
  background: var(--white);
}
.slug-label { font-weight: 600; display: block; margin-bottom: 8px; }
.slug-optional { color: var(--ink-muted); font-weight: 400; font-size: 0.85rem; }
.slug-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}
.slug-input-wrap:focus-within { border-color: var(--coral); }
.slug-prefix { padding-left: 12px; color: var(--ink-muted); font-size: 0.92rem; white-space: nowrap; }
.slug-input-wrap .q-input {
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  flex: 1;
  padding-left: 2px;
  min-width: 0;
}
.slug-hint { color: var(--ink-muted); font-size: 0.82rem; margin-top: 10px; line-height: 1.5; }
.slug-row.locked .slug-input-wrap { opacity: 0.65; }
/* Once published the link can't change here — the picker collapses to a
   compact two-line note (the link, then where to change it). */
.slug-row-compact { padding: 10px 16px; }
.slug-compact {
  margin: 0; font-size: 0.86rem; color: var(--ink-muted);
  line-height: 1.45; overflow-wrap: anywhere;
}
.slug-compact b { color: var(--ink); font-weight: 700; }
.slug-compact-hint { display: block; font-size: 0.78rem; margin-top: 2px; }

/* Password lock — builder control + viewer unlock screen */
.lock-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
  background: var(--white);
}
.lock-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.lock-row .q-input { margin-top: 12px; }
.lock-hint { color: var(--ink-muted); font-size: 0.82rem; margin-top: 10px; line-height: 1.5; }

.email-links-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0 0 8px;
  line-height: 1.45;
}
.email-links-note {
  font-size: 0.85rem;
  margin: 10px 0 0;
}
.collab-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 8px 0 4px;
  padding: 10px 12px;
  background: var(--soft, #FBF8F5);
  border-radius: 10px;
}
.collab-note strong { color: var(--ink); }
.email-links-note.ok { color: var(--coral-dark); }
.email-links-note.err { color: var(--coral-dark); }

.lock-screen {
  max-width: 360px;
  margin: 24px auto 0;
  text-align: center;
}
.lock-screen .q-input { margin-bottom: 12px; }
.lock-screen .btn { width: 100%; }
.lock-error { color: var(--coral-dark); font-size: 0.88rem; margin-top: 10px; }

/* Builder responsive */
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .q-card { padding: 28px 20px; }
  .builder-main { padding: 24px 0 64px; }
  .contact-label { min-width: 84px; }
}

/* ============================================================
   My Guides dashboard (dashboard.html) + Google sign-in button
   ============================================================ */
.dash-main { padding: 48px 0 96px; min-height: 60vh; }

.dash-loading { text-align: center; color: var(--ink-muted); padding: 80px 0; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border: 3px solid var(--line); border-top-color: var(--coral);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sign-in invite */
.dash-signin { max-width: 460px; margin: 40px auto; text-align: center; }
.dash-emoji { font-size: 2.6rem; display: block; margin-bottom: 14px; }
.dash-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.dash-lead { color: var(--ink-soft); line-height: 1.55; margin: 0 0 24px; }
.dash-signin-actions { display: flex; justify-content: center; }
.dash-signin-note { margin-top: 16px; color: var(--coral-dark); font-size: 0.92rem; }
.dash-back { display: inline-block; margin-top: 22px; color: var(--ink-muted); font-weight: 600; font-size: 0.92rem; }
.dash-back:hover { color: var(--coral); }

.btn-google {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: inherit; font-weight: 700; font-size: 0.98rem;
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 13px 22px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), transform 0.12s var(--ease), box-shadow 0.18s var(--ease);
}
.btn-google:hover:not(:disabled) { border-color: var(--ink-muted); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-google:disabled { opacity: 0.6; cursor: default; }
.g-ico { width: 18px; height: 18px; flex: none; }

/* Guides grid */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.dash-head .dash-title { margin-bottom: 4px; }
.dash-head .dash-lead { margin: 0; }

.dash-empty {
  text-align: center; color: var(--ink-soft); max-width: 440px; margin: 40px auto;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 28px; box-shadow: var(--shadow-sm);
}
.dash-empty p { line-height: 1.55; margin: 8px 0 20px; }

.dash-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.dash-card {
  position: relative;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px 16px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dash-card-main { display: block; }
.dash-card-emoji { font-size: 1.9rem; display: block; margin-bottom: 8px; }
.dash-card-title {
  font-weight: 700; font-size: 1.05rem; color: var(--ink); line-height: 1.35;
  overflow-wrap: anywhere; margin-bottom: 16px;
}
.dash-card-actions { display: flex; gap: 8px; }
.dash-card-actions .btn { flex: 1; text-align: center; }
.dash-card-remove {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: transparent; color: var(--ink-muted); font-size: 1.2rem; line-height: 1;
  cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.dash-card-remove:hover { background: #FBE3E4; color: #C0392B; }
.dash-card-remove:disabled { opacity: 0.4; cursor: default; }

/* "Save to my guides" on the share screen */
.save-dash { margin: 18px 0 4px; }
.save-dash #myGuidesLink { margin-left: 8px; }
/* Hero variant: the recommended "keep it in your dashboard" call-to-action */
.save-dash-hero {
  margin: 8px 0 18px; padding: 16px 16px 18px;
  background: linear-gradient(160deg, var(--soft, #FFF3EC), #fff);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
}
.save-dash-hero .share-label { margin-top: 0; }
.save-dash-hero #saveToDash { margin-top: 4px; }
.save-dash-hero #myGuidesLink { display: inline-block; margin: 8px 0 0; }
.save-dash-rec {
  display: inline-block; margin-left: 6px; padding: 1px 8px; vertical-align: middle;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase;
  color: #fff; background: var(--coral); border-radius: 999px;
}

@media (max-width: 600px) {
  .dash-main { padding: 32px 0 72px; }
  .dash-head { flex-direction: column; align-items: stretch; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Print / Save-as-PDF — a fridge-friendly A4 version of a guide
   ============================================================ */
.print-only { display: none; }

/* Floating "Print / Save as PDF" button on the published guide (screen only) */
.print-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  font-family: inherit; font-weight: 700; font-size: 0.92rem;
  color: var(--white); background: var(--ink);
  border: none; border-radius: 999px; padding: 12px 18px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease);
}
.print-fab:hover { transform: translateY(-2px); background: #000; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .builder-main { padding: 0 !important; }
  .builder-main > .container { max-width: none !important; padding: 0 !important; }

  /* Hide interactive / screen-only chrome */
  .print-fab, .no-print, .guide-footer, .acc-chevron,
  .log-add, .log-add-msg, .sec-video, .lock-screen { display: none !important; }

  /* Reveal print-only bits */
  .print-only { display: block !important; }

  /* Compact header (with QR) replaces the big colour cover to save ink */
  .guide-cover { display: none !important; }
  .print-header {
    display: flex !important; column-span: all; -webkit-column-span: all;
    align-items: center; justify-content: space-between; gap: 16px;
    border-bottom: 2px solid var(--color-ink); padding-bottom: 10px; margin-bottom: 14px;
  }
  .print-head-text { display: flex; align-items: center; gap: 12px; }
  .print-emoji { font-size: 2rem; line-height: 1; }
  .print-title { font-size: 1.5rem; font-weight: 800; color: #111; }
  .print-sub { font-size: 0.85rem; color: #555; }
  .print-qr { display: flex; align-items: center; gap: 8px; flex: none; }
  .print-qr #printQr img, .print-qr #printQr canvas { display: block; }
  .print-qr-label { font-size: 0.68rem; color: #555; text-align: left; line-height: 1.3; }

  /* Two-column A4 flow; each block stays intact across the columns/pages */
  .guide-doc { max-width: none !important; margin: 0 !important; columns: 2; column-gap: 18px; }
  .guide-section, .guide-emergency, .guide-log {
    break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
    margin: 0 0 12px !important; box-shadow: none !important;
  }

  /* Force every accordion open on paper */
  .acc-body { grid-template-rows: 1fr !important; }
  .acc-body-inner { overflow: visible !important; }

  /* Ink-friendly section cards */
  .guide-section { border: 1px solid #ccc; border-radius: 8px; padding: 4px 12px 10px; }
  .guide-section .acc-header { background: transparent !important; padding: 8px 0 4px; cursor: default; }
  .acc-title-text { font-weight: 700; color: #111; }
  .acc-content { color: #222; font-size: 0.9rem; line-height: 1.45; }

  /* Emergency contacts: boxed + prominent (the bit you want on the fridge) */
  .guide-emergency {
    border: 2px solid #C0392B !important; background: #fff !important;
    border-radius: 8px; padding: 10px 14px;
  }
  /* Vet guides: the urgent-signs section keeps its weight on paper too */
  .guide-section.sec-urgent { border: 2px solid #C0392B !important; }
  .guide-section.sec-med { border-left: 4px solid #C0392B !important; }
  .em-head { color: #C0392B !important; }
  .contact-value a { color: #111 !important; }

  /* Daily Routine: a clean full-width schedule for the fridge */
  .guide-routine {
    column-span: all; -webkit-column-span: all;
    break-inside: avoid; page-break-inside: avoid;
    border: 1px solid #bbb; border-radius: 8px; padding: 10px 14px;
    margin: 0 0 14px !important; box-shadow: none !important; background: #fff !important;
  }
  .routine-head { font-size: 1.05rem; font-weight: 800; color: #111; }
  .routine-hint, .reminder-cal-btn, .routine-chip { display: none !important; }
  .routine-period-label { color: #333 !important; }
  .routine-entry { border-top: 1px solid #ddd; padding: 6px 0; }
  .routine-time { color: #111 !important; min-width: 70px; }

  /* Photos: keep but bound the height so they don't dominate a column */
  .sec-photo { max-width: 100%; max-height: 55mm; width: auto; margin: 6px 0; border-radius: 6px; }
  /* A repositioned (cropped) photo keeps its banner crop on paper too. */
  .sec-photo.is-cropped { width: 100%; height: 45mm; max-height: 45mm; object-fit: cover; }

  .video-note {
    font-size: 0.78rem; color: #333; border: 1px dashed #aaa;
    padding: 6px 8px; border-radius: 6px; margin: 6px 0 0;
  }

  /* Logs: show recorded entries, drop the input row */
  .log-table { font-size: 0.82rem; }

  a { color: #111 !important; text-decoration: none; }
}

/* ============================================================
   My Guides dashboard — cards, badges, menus, settings, teaser
   ============================================================ */
.dash-card-title { margin-bottom: 10px; }
.dash-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dash-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.dash-badge.is-pub { background: #DEF3E9; color: #1B7A4F; }
.dash-badge.is-draft { background: var(--line); color: var(--ink-muted); }
.dash-badge.is-locked { background: #FBE3E4; color: #C0392B; }
.dash-badge.is-public { background: #E5EEFE; color: #2B6CB0; }
.dash-card-updated { font-size: 0.8rem; color: var(--ink-muted); margin-bottom: 14px; }

/* More menu */
.dash-card-more-wrap { position: absolute; top: 10px; right: 10px; }
.dash-card-more {
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-muted); font-size: 1.2rem; line-height: 1;
  cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.dash-card-more:hover { background: var(--bg-tint); color: var(--ink); }
.dash-menu {
  position: absolute; top: 34px; right: 0; z-index: 30; min-width: 176px;
  display: none; flex-direction: column; padding: 6px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg);
}
.dash-menu.open { display: flex; }
.dash-menu-item {
  text-align: left; background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.9rem; font-weight: 600; color: var(--ink);
  padding: 9px 12px; border-radius: 8px;
}
.dash-menu-item:hover { background: var(--coral-soft); color: var(--coral-dark); }
.dash-menu-item.danger { color: #C0392B; }
.dash-menu-item.danger:hover { background: #FBE3E4; color: #C0392B; }
.dash-menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* First-run name prompt */
.name-prompt {
  background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px;
}
.name-prompt label { display: block; font-weight: 700; margin-bottom: 10px; }
.name-prompt-row { display: flex; gap: 10px; }
.name-prompt-row .q-input { flex: 1; }

/* Per-guide chips on dashboard cards (analytics + sitter feedback), and the
   windows they open */
.dash-card-chip {
  margin-top: 12px; margin-right: 8px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--soft, #FFF3EC); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; align-self: flex-start; transition: background 0.15s, border-color 0.15s;
}
.dash-card-chip:hover { background: #ffe6d8; border-color: var(--coral); }
.dash-card-chip b { font-variant-numeric: tabular-nums; }
.dash-card-feedback .dcf-count {
  font-size: 0.75rem; font-weight: 800; color: #fff; background: var(--coral);
  border-radius: 999px; padding: 1px 8px; line-height: 1.5;
}

.dash-fb-overlay {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 14, 10, 0.5); padding: 16px; overflow-y: auto;
}
.dash-fb-modal {
  width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column;
  background: var(--white, #fff); border-radius: var(--radius-lg, 18px); box-shadow: var(--shadow-lg, 0 18px 50px rgba(0,0,0,0.25));
  overflow: hidden;
}
.dash-fb-head {
  display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.dash-fb-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.dash-fb-emoji { font-size: 1.3rem; flex-shrink: 0; }
.dash-fb-close {
  width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(0,0,0,0.06);
  color: var(--ink-muted); font-size: 0.9rem; cursor: pointer; line-height: 1; flex-shrink: 0;
}
.dash-fb-close:hover { background: rgba(0,0,0,0.12); }
.dash-fb-list { padding: 16px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dash-fb-empty { color: var(--ink-muted); font-size: 0.92rem; line-height: 1.5; text-align: center; padding: 20px 0; }
.dash-fb-item { display: flex; gap: 12px; align-items: flex-start; background: var(--soft, #FBF8F5); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.dash-fb-item-main { flex: 1; min-width: 0; }
.dash-fb-msg { font-size: 0.95rem; color: var(--ink); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.dash-fb-meta { font-size: 0.78rem; color: var(--ink-muted); margin-top: 6px; overflow-wrap: anywhere; }
.dash-fb-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.dash-fb-reply { font-size: 0.85rem; font-weight: 700; color: var(--coral); text-decoration: none; white-space: nowrap; }
.dash-fb-reply:hover { text-decoration: underline; }
.dash-fb-del { width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(0,0,0,0.06); color: var(--ink-muted); font-size: 0.8rem; cursor: pointer; line-height: 1; }
.dash-fb-del:hover { background: #e2503e; color: #fff; }

/* Collaborate (share edit link) modal — reuses the .dash-fb modal shell */
.dash-collab-body { padding: 16px 20px 20px; }
.dash-collab-lead { color: var(--ink); font-size: 0.95rem; line-height: 1.5; margin: 0 0 14px; }
.dash-collab-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.dash-collab-link input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 0.9rem; color: var(--ink); background: var(--soft, #FBF8F5); font-family: inherit;
}
.dash-collab-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dash-collab-warn { margin: 14px 0 0; font-size: 0.82rem; color: var(--ink-muted); line-height: 1.45; }

.dash-search { margin-bottom: 20px; }
.dash-search .q-input { width: 100%; }

.dash-empty-title { font-size: 1.3rem; font-weight: 800; margin: 6px 0 8px; }
.dash-noresults { text-align: center; color: var(--ink-muted); padding: 24px 0; }

/* Soft "coming soon" teaser */
.dash-teaser {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding: 18px 22px;
  background: var(--bg-tint); border: 1px dashed var(--line); border-radius: var(--radius);
}
.dash-teaser-emoji { font-size: 1.6rem; }
.dash-teaser-body { flex: 1; min-width: 200px; }
.dash-teaser-title { font-weight: 800; }
.dash-teaser-body p { color: var(--ink-soft); font-size: 0.9rem; margin: 2px 0 0; }

/* The clinic kit (dashboard): logo + contact details, set once and stamped
   onto every new vet discharge guide by the builder. */
.clinic-kit {
  margin-top: 40px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.clinic-kit-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.clinic-kit-emoji { font-size: 1.6rem; line-height: 1.2; }
.clinic-kit-title { font-size: 1.1rem; font-weight: 800; margin: 0; }
.clinic-kit-sub { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; margin: 4px 0 0; }
.clinic-kit-body { display: flex; gap: 22px; flex-wrap: wrap; }
.clinic-kit-logo { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 160px; }
.clinic-kit-logo img {
  max-height: 84px; max-width: 220px; object-fit: contain;
  background: var(--bg-tint); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px;
}
.clinic-kit-logo-btn { cursor: pointer; }
.clinic-kit-fields { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.clinic-kit-fields .q-input { width: 100%; }
.set-note.err { color: var(--coral-dark); }

/* Account settings modal */
.dash-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dash-modal-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 26, 0.45); }
.dash-modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--white); border-radius: var(--radius-lg); padding: 28px 26px;
  box-shadow: var(--shadow-lg);
}
.dash-modal-x {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px;
  border: none; background: transparent; font-size: 1.4rem; color: var(--ink-muted);
  cursor: pointer; line-height: 1;
}
.dash-modal-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 18px; }
.set-label { display: block; font-weight: 700; font-size: 0.85rem; margin: 14px 0 6px; }
.set-row { display: flex; gap: 10px; }
.set-row .q-input { flex: 1; }
.set-note { font-size: 0.85rem; color: #1B7A4F; margin: 8px 0 0; }
.set-email { color: var(--ink-soft); margin: 0; }
.set-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn-danger-ghost {
  background: transparent; border: 1.5px solid #F2C2C2; color: #C0392B;
  border-radius: 999px; font-family: inherit; font-weight: 600; cursor: pointer;
}
.btn-danger-ghost:hover { background: #FBE3E4; border-color: #C0392B; }

/* Toast */
.dash-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--ink); color: #fff; font-weight: 600; font-size: 0.9rem;
  padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); z-index: 200;
}
.dash-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .name-prompt-row { flex-direction: column; }
  .set-actions { flex-direction: column-reverse; }
  .set-actions .btn { width: 100%; }
}

/* Dashboard card actions: keep three buttons inside narrow cards */
.dash-card-actions { gap: 6px; flex-wrap: wrap; }
.dash-card-actions .btn { flex: 1 1 auto; min-width: 0; padding: 8px 10px; font-size: 0.82rem; }
/* Declutter the dashboard header on phones — "+ New guide" is in the body */
@media (max-width: 600px) { #dashCreateTop { display: none; } }

/* ============================================================
   Editor: removable cover icon, AI polish overlay, draggable dock
   ============================================================ */
/* Cover icon is editable in the builder: type/paste an emoji, or backspace it
   away. When empty it shows a subtle "+" so you can add one back. */
.cover-emoji[contenteditable] { cursor: text; outline: none; min-width: 0.7em; }
.cover-emoji[contenteditable]:focus { outline: 2px dashed rgba(255, 255, 255, 0.75); border-radius: 10px; }
.cover-emoji[contenteditable]:empty::before { content: "＋"; opacity: 0.55; font-weight: 400; }

/* Full-screen "polishing" overlay (replaces text crammed into the dock button) */
.polish-overlay {
  position: fixed; inset: 0; z-index: 140;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 26, 26, 0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.polish-overlay-inner { text-align: center; color: #fff; }
.polish-spark { font-size: 3.6rem; line-height: 1; animation: polishPulse 1.15s ease-in-out infinite; }
.polish-label { margin-top: 14px; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; }
@keyframes polishPulse {
  0%, 100% { transform: scale(1) rotate(-6deg); opacity: 0.8; }
  50% { transform: scale(1.28) rotate(8deg); opacity: 1; }
}

/* Drag handle on the floating dock */
.dock-grip {
  width: 26px; height: 5px; border-radius: 3px;
  margin: 0 auto 4px; flex: none;
  background: rgba(26, 26, 26, 0.18);
  cursor: grab; touch-action: none;
}
.dock-grip:hover { background: rgba(26, 26, 26, 0.3); }
.edit-dock.dragging { transition: none; cursor: grabbing; }
.edit-dock.dragging .dock-grip { cursor: grabbing; }

/* Emergency contacts: on phones, stack label above value so long phone numbers
   don't break one digit per line in a squeezed column. */
@media (max-width: 560px) {
  .contact-row { flex-wrap: wrap; position: relative; padding-right: 24px; }
  .contact-label { flex: 1 1 100%; min-width: 0; }
  .contact-value { flex: 1 1 100%; }
  .contact-del { position: absolute; top: 8px; right: 0; }
}

/* Section icons are editable in the builder too (type an emoji or backspace
   to remove); an empty one shows a subtle "+" to add one back. */
.acc-icon[contenteditable] { cursor: text; outline: none; min-width: 0.7em; }
.acc-icon[contenteditable]:focus { outline: 2px dashed var(--coral); border-radius: 8px; }
.acc-icon[contenteditable]:empty::before { content: "＋"; opacity: 0.4; font-weight: 400; }

/* ============================================================
   Section reminders — creator editor + sitter "add to calendar"
   ============================================================ */
/* Creator: reminder-times editor inside a section */
.sec-reminder { margin-top: 14px; }
.reminder-add-btn {
  font-family: inherit; font-weight: 600; font-size: 0.9rem;
  color: var(--ink-soft); background: var(--bg-tint);
  border: 1px dashed var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
}
.reminder-add-btn:hover { border-color: var(--coral); color: var(--coral-dark); }
.reminder-head { font-weight: 700; font-size: 0.92rem; margin-bottom: 2px; }
.reminder-hint { font-size: 0.82rem; color: var(--ink-muted); margin: 0 0 10px; }
.reminder-times { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.reminder-time-row { display: inline-flex; align-items: center; gap: 4px; }
.reminder-time { width: auto; min-width: 120px; padding: 8px 10px; }
.reminder-time-x, .rem-time-x {
  border: none; background: transparent; color: var(--ink-muted);
  cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 4px;
}
.reminder-time-x:hover, .rem-time-x:hover { color: #C0392B; }
.reminder-add-time {
  font-family: inherit; font-weight: 600; font-size: 0.85rem;
  color: var(--coral-dark); background: transparent; border: none; cursor: pointer; padding: 0;
}

/* Sitter: "Add reminders to my calendar" button on a published section */
.reminder-cal-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; font-family: inherit; font-weight: 700; font-size: 0.92rem;
  color: var(--coral-dark); background: var(--coral-soft);
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 18px; cursor: pointer; transition: background 0.15s var(--ease), transform 0.12s var(--ease);
}
.reminder-cal-btn:hover { background: #FFD9C9; transform: translateY(-1px); }

/* Sitter: date/time picker modal */
.rem-modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rem-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 26, 0.45); }
.rem-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--white); border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto;
}
.rem-x { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: none; background: transparent; font-size: 1.4rem; color: var(--ink-muted); cursor: pointer; line-height: 1; }
.rem-title { font-size: 1.2rem; font-weight: 800; margin: 0 8px 6px 0; }
.rem-lead { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; margin: 0 0 18px; }
.rem-dates { display: flex; gap: 12px; margin-bottom: 16px; }
.rem-field { flex: 1; }
.rem-field label, .rem-sublabel { display: block; font-weight: 700; font-size: 0.82rem; margin-bottom: 6px; }
.rem-field .q-input { width: 100%; }
.rem-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.rem-time-row { display: inline-flex; align-items: center; gap: 4px; }
.rem-time-row .q-input { width: auto; min-width: 116px; padding: 9px 10px; }
.rem-add-time { font-family: inherit; font-weight: 600; font-size: 0.85rem; color: var(--coral-dark); background: transparent; border: none; cursor: pointer; padding: 0; }
.rem-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.rem-note { font-size: 0.86rem; margin: 12px 0 0; }
.rem-note.ok { color: #1B7A4F; }
.rem-note.err { color: #C0392B; }

@media (max-width: 480px) {
  .rem-dates { flex-direction: column; }
  .rem-actions { flex-direction: column-reverse; }
  .rem-actions .btn { width: 100%; }
}

/* Whole-guide "Polish" button + review modal */
.polish-all-row { margin-bottom: 16px; }
.btn-polish {
  background: linear-gradient(135deg, #FFF1E8, #FFE7D3);
  color: var(--coral-dark, #C0491F);
  border: 1px solid #FFD3B8;
  font-weight: 700;
  padding: 14px 26px; /* .btn has no base padding — without this it collapses to a thin strip */
}
.btn-polish:hover:not(:disabled) { background: linear-gradient(135deg, #FFE7D3, #FFDABF); }
.btn-polish:disabled { opacity: 0.7; cursor: default; }
.polish-all-hint { font-size: 0.82rem; color: var(--ink-muted); margin: 8px 4px 0; line-height: 1.45; text-align: center; }
.publish-save-note { font-size: 0.82rem; color: var(--ink-muted); margin: 0 4px 10px; line-height: 1.45; text-align: center; }
.publish-save-note strong { color: var(--ink); }

/* "Pick up where you left off" banner for a locally saved unpublished draft */
.draft-banner {
  background: var(--bg-tint);
  border: 1.5px solid var(--coral);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0 6px;
}
.draft-banner-text { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.5; }
.draft-banner-text b { overflow-wrap: anywhere; }
.draft-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.draft-banner-actions .btn { flex: 0 1 auto; }
/* Mobile: keep Save & publish reachable while scrolling a long guide — the
   toolbar sticks to the bottom of the screen until its natural spot scrolls
   into view. The bar itself is fully transparent: the pill buttons float on
   their own shadows, and the see-through strip around them never swallows
   taps (pointer-events pass through to the content behind). */
@media (max-width: 720px) {
  #publishBar {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin: 20px 0 0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    background: none;
    pointer-events: none;
  }
  #publishBar .btn {
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.22);
  }
  #publishBar .btn-ghost { background: var(--white); }
}
/* Exit is a quiet secondary action, not a primary-looking button. */
.btn-exit { background: transparent; color: var(--ink-muted); border: 1px solid transparent; box-shadow: none; font-weight: 600; }
.btn-exit:hover { background: var(--soft); color: var(--ink); }

.polish-modal { position: fixed; inset: 0; z-index: 160; display: flex; align-items: center; justify-content: center; padding: 20px; }
.polish-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 26, 0.45); }
.polish-card {
  position: relative; z-index: 1; width: 100%; max-width: 460px;
  background: var(--white); border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: var(--shadow-lg); max-height: 90vh; display: flex; flex-direction: column;
}
.polish-x { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: none; background: transparent; font-size: 1.4rem; color: var(--ink-muted); cursor: pointer; line-height: 1; }
.polish-title { font-size: 1.2rem; font-weight: 800; margin: 0 8px 6px 0; }
.polish-lead { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; margin: 0 0 16px; }
.polish-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.polish-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.polish-check { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--coral); }
.polish-row-body { flex: 1; min-width: 0; }
.polish-field { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); margin-bottom: 6px; }
.polish-before { font-size: 0.9rem; color: var(--ink-muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.28); margin-bottom: 5px; line-height: 1.4; }
.polish-after { font-size: 0.96rem; color: var(--ink); font-weight: 600; line-height: 1.45; }
.polish-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 480px) {
  .polish-actions { flex-direction: column-reverse; }
  .polish-actions .btn { width: 100%; }
}

/* ============================================================
   Daily Routine widget — editor + sitter timeline
   ============================================================ */
.guide-routine {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.routine-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.routine-hint { font-size: 0.85rem; color: var(--ink-muted); margin: 4px 0 12px; }

/* Editor: routine items */
.routine-list { display: flex; flex-direction: column; gap: 10px; }
.routine-empty { color: var(--ink-muted); font-size: 0.9rem; margin: 4px 0; }
.routine-item { background: var(--bg-tint); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.routine-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.routine-item-icon { font-size: 1.3rem; min-width: 1.4em; text-align: center; cursor: text; outline: none; }
.routine-item-icon:empty::before { content: "＋"; opacity: 0.4; }
.routine-item-label { font-weight: 700; flex: 1; min-width: 0; cursor: text; outline: none; }
.routine-item-icon:focus, .routine-item-label:focus { outline: 2px dashed var(--coral); border-radius: 6px; }
.routine-item-del { border: none; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 0.9rem; padding: 4px; }
.routine-item-del:hover { color: #C0392B; }
.routine-times { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Sitter: routine timeline */
.routine-period { margin-top: 12px; }
.routine-period-label { font-weight: 700; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 4px; }
.routine-entry { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.routine-time { font-weight: 700; min-width: 78px; color: var(--coral-dark); font-variant-numeric: tabular-nums; }
.routine-emoji { font-size: 1.2rem; flex: none; }
.routine-label { color: var(--ink); overflow-wrap: anywhere; }

/* Modal: read-only routine summary */
.rem-summary { background: var(--bg-tint); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.rem-summary-row { font-size: 0.9rem; color: var(--ink-soft); padding: 3px 0; }

/* Subtle "daily routine inside" hint chip near the top of a published guide */
.routine-chip {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 11px 16px;
  background: var(--coral-soft); color: var(--coral-dark);
  border-radius: 12px; font-weight: 600; font-size: 0.9rem;
  line-height: 1.35; transition: background 0.15s var(--ease);
}
.routine-chip:hover { background: #FFD9C9; }

/* ============================================================
   Mobile tap-target & focus-zoom pass
   ------------------------------------------------------------
   1) Small utility controls (the little ✕ / ⋯ / ＋ buttons) keep
      their light visual size but gain an invisible thumb-sized
      hit area via an ::after overlay — mis-taps were the #1
      mobile complaint, and visually enlarging every ✕ would
      clutter the design.
   2) On phones, form fields render at ≥16px so iOS Safari stops
      zoom-jumping the page when they're focused.
   ============================================================ */
.block-x, .routine-item-del, .reminder-time-x, .rem-time-x, .reminder-add-time,
.dash-card-more, .dash-fb-close, .dash-fb-del, .dash-fb-reply,
.mock-dot, .contact-value a { position: relative; }
/* (.feedback-x and the media-corner buttons are already absolutely positioned —
   they only get the ::after extension, never `relative`, or they'd fall out of
   their corners.) */
/* .contact-del is absolutely positioned on phones (contact rows wrap), so it
   only gets `relative` on wider screens where it's still in normal flow. */
@media (min-width: 561px) { .contact-del { position: relative; } }
.block-x::after, .cover-emoji-x::after, .cover-logo-x::after, .routine-item-del::after,
.reminder-add-time::after, .contact-del::after, .dash-card-more::after,
.dash-fb-close::after, .feedback-x::after {
  content: ""; position: absolute; inset: -8px;
}
/* Tighter extensions where neighbours sit close, so hit areas barely collide */
.reminder-time-x::after, .rem-time-x::after { content: ""; position: absolute; inset: -6px; }
/* On accordion headers the collapse chevron sits to the ✕'s left: extend the
   ✕'s tap zone up/down/right only, never toward the chevron. */
.acc-header .block-x::after { inset: -10px -12px -10px 0; }
.dash-fb-del::after, .dash-fb-reply::after { content: ""; position: absolute; inset: -5px -6px; }
.sec-media-x::after, .sec-media-move::after,
.sec-media-repos::after, .sec-media-whole::after {
  content: ""; position: absolute; inset: -6px -4px;
}
/* Carousel dots stay 7px visually but get a comfortable tap zone */
.mock-dot::after { content: ""; position: absolute; inset: -12px -4px; }
/* Tap-to-call links inside contact rows */
.contact-value a::after { content: ""; position: absolute; inset: -6px -4px; }
/* Header wordmark: bigger tap area without moving the layout */
.logo { padding: 8px 6px; margin: -8px -6px; }

/* Slightly taller pill buttons that were under ~36px */
.tool-btn { padding: 9px 14px; }
.sec-media-prompt-btn { padding: 10px 14px; }

@media (max-width: 720px) {
  /* iOS zooms the page when focusing a field under 16px — never render
     text fields smaller than that on phones. !important on purpose: this
     must beat any per-field class (e.g. .gfb-text), and inputs created
     without a type attribute would dodge [type="text"] selectors. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  textarea, select {
    font-size: 16px !important;
  }
  /* The expanded dock's close pill was a touch short */
  .edit-dock:not(.dock-collapsed) .dock-toggle { padding: 12px 16px; }
}

/* ============================================================
   Daily-views bar charts (dashboard sparklines + stats timelines)
   Single series in the brand hue: thin bars, 2px gaps, rounded
   tops, zero days as baseline stubs, today emphasised. Values
   live in tooltips/ink text, never in the series colour.
   ============================================================ */
/* Per-guide analytics window (reuses the .dash-fb modal shell) */
.dash-an-body { padding: 16px 20px 20px; }
.dash-an-nums { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.dash-an-nums .dash-an-num { flex: 1 1 45%; }
.dash-an-num {
  flex: 1; text-align: center; background: var(--soft, #FBF8F5);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px 10px;
}
.dash-an-num b { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-an-num span { font-size: 0.74rem; color: var(--ink-muted); font-weight: 600; }
.dash-an-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.dash-an-chart {
  display: flex; align-items: flex-end; gap: 3px; height: 110px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 12px 8px;
}
.dash-an-chart i { flex: 1 1 0; background: var(--coral); border-radius: 3px 3px 0 0; min-height: 2px; }
.dash-an-chart i.z { background: var(--line); border-radius: 1px; }
.dash-an-chart i.today { background: var(--coral-dark); }
.dash-an-chart i:hover { filter: brightness(0.85); }
.dash-an-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-muted); margin: 5px 4px 0; }
.dash-an-empty { color: var(--ink-muted); font-size: 0.92rem; text-align: center; padding: 18px 0; margin: 0; }
.dash-an-srcs { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-an-src {
  background: var(--soft, #FBF8F5); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; font-size: 0.8rem; color: var(--ink-muted);
}
.dash-an-src b { color: var(--ink); font-weight: 800; }
.dash-an-foot { font-size: 0.74rem; color: var(--ink-muted); margin: 14px 0 0; text-align: center; }

.stat-chart {
  display: flex; align-items: flex-end; gap: 2px; height: 120px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 14px 14px 10px; margin: 8px 0 4px;
}
.stat-chart i { flex: 1 1 0; background: var(--coral); border-radius: 3px 3px 0 0; min-height: 2px; }
.stat-chart i.z { background: var(--line); border-radius: 1px; }
.stat-chart i.today { background: var(--coral-dark); }
.stat-chart i:hover { filter: brightness(0.85); }
.stat-chart-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-muted); margin: 0 4px 26px; }
.stat-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: -14px 0 26px; }
.stat-cats b { color: var(--ink); }

.sg-daily { display: flex; align-items: flex-end; gap: 1px; height: 34px; margin-top: 10px; }
.sg-daily i { flex: 1 1 0; background: var(--coral); border-radius: 2px 2px 0 0; min-height: 2px; }
.sg-daily i.z { background: var(--line); border-radius: 1px; }
.sg-daily i.today { background: var(--coral-dark); }
.sg-daily i:hover { filter: brightness(0.85); }

/* ============================================================
   Clinic one-pager (clinic-onepager.html)
   A handout for trial clinics: one A4 on screen and on paper, so a
   practice manager can print it or forward the PDF unchanged.
   ============================================================ */
.onepager-body { background: var(--color-cream); }
.op-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px 0;
}
.op-bar-note { font-size: 0.85rem; color: var(--ink-muted); font-weight: 600; }
.op-sheet {
  max-width: 900px;
  margin: 16px auto 48px;
  padding: 34px 38px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.op-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-ink);
}
.op-logo { height: 30px; width: auto; }
.op-head-right { text-align: right; }
.op-url { margin: 6px 0 0; font-size: 0.82rem; font-weight: 700; color: var(--ink-muted); }
.op-title { margin: 20px 0 8px; font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.op-sub { margin: 0 0 22px; font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
.op-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.op-h2 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-orange);
}
.op-col + .op-col .op-h2:not(:first-child) { margin-top: 18px; }
.op-flow { margin: 0; padding-left: 18px; }
.op-flow li { margin-bottom: 7px; font-size: 0.86rem; line-height: 1.5; }
.op-list { margin: 0; padding-left: 18px; list-style: none; }
.op-list li {
  position: relative;
  margin-bottom: 8px;
  font-size: 0.86rem;
  line-height: 1.5;
}
.op-list li::before {
  content: "";
  position: absolute;
  left: -14px; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-orange);
}
.op-p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--ink-soft); }
.op-claim {
  margin: 26px 0 22px;
  padding: 20px 22px;
  background: var(--color-cream);
  border: 1.5px solid var(--color-orange);
  border-radius: var(--radius-sm);
}
.op-claim-t { margin: 0 0 10px; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.op-ticks {
  list-style: none;
  margin: 14px 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 22px;
}
.op-ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.45;
}
.op-ticks li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--white);
  background: var(--color-orange);
  border-radius: 50%;
}
.op-honest {
  margin: 0;
  padding: 11px 14px;
  background: var(--white);
  border-left: 3px solid var(--color-ink);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.op-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  border-top: 2px solid var(--color-ink);
}
.op-foot-t { margin: 0 0 4px; font-size: 0.95rem; font-weight: 800; }
.op-foot-p { margin: 0; font-size: 0.84rem; color: var(--ink-soft); }
.op-foot-contact { text-align: right; }
.op-foot-contact p { margin: 0 0 2px; font-size: 0.84rem; }
.op-foot-made { color: var(--ink-muted); }

@media (max-width: 720px) {
  .op-sheet { padding: 24px 20px; margin: 12px 12px 32px; }
  .op-cols, .op-ticks { grid-template-columns: 1fr; }
  .op-head, .op-foot { flex-direction: column; align-items: flex-start; }
  .op-head-right, .op-foot-contact { text-align: left; }
  .op-title { font-size: 1.5rem; }
}

/* One A4, no browser furniture, nothing orphaned across a page break. */
@media print {
  @page { size: A4 portrait; margin: 11mm; }
  .onepager-body { background: var(--white); }
  .op-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
  }
  .op-title { font-size: 1.55rem; }
  .op-sub { font-size: 0.82rem; margin-bottom: 14px; }
  .op-cols { gap: 20px; }
  .op-flow li, .op-list li { font-size: 0.75rem; margin-bottom: 5px; }
  .op-p { font-size: 0.75rem; }
  .op-claim { margin: 16px 0 14px; padding: 14px 16px; break-inside: avoid; }
  .op-claim-t { font-size: 1.1rem; }
  .op-ticks { gap: 5px 18px; margin: 10px 0; }
  .op-ticks li { font-size: 0.74rem; }
  .op-honest { font-size: 0.7rem; padding: 9px 11px; }
  .op-foot { break-inside: avoid; }
  .op-foot-t { font-size: 0.85rem; }
  .op-foot-p, .op-foot-contact p { font-size: 0.74rem; }
}

/* The tidy-up sparkle turns while the pass runs: a disabled button with static
   text gives no sign the press registered. */
.vt-spark {
  display: inline-block;
  animation: vt-spin 1.1s linear infinite;
}
@keyframes vt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vt-spark { animation: vt-pulse 1.4s ease-in-out infinite; }
  @keyframes vt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
}
