/* ────────────────────────────────────────────────────────────
 * The Birthday Book
 *
 * Cases-style card walkthrough: cover -> 5 numbered cards -> save.
 * Palette: cream paper with a soft sage accent (--ba-sage) on the
 * title rule, question numerals, and the step-nav active dot.
 * Prints to one US Letter page via the print stylesheet at the end.
 * ──────────────────────────────────────────────────────────── */

:root {
  --ba-paper:       #F5F0E8;
  --ba-sheet:       #FFFFFF;
  --ba-card:        #FBF7EF;
  --ba-card-line:   #C9C3B6;
  --ba-ink:         #2A2823;
  --ba-ink-mute:    rgba(42, 40, 35, 0.72);
  --ba-rule:        rgba(42, 40, 35, 0.45);
  --ba-sage:        #7A8474;
  --ba-sage-soft:   #9FA994;
  --ba-serif:       'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --ba-sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Page wrapper ────────────────────────────────────────── */
.ba-page {
  background: var(--ba-paper);
  min-height: 100vh;
  padding: 32px 20px 64px;
  color: var(--ba-ink);
  font-family: var(--ba-sans);
  -webkit-font-smoothing: antialiased;
}

/* ── Cover (playful fabric palette) ─────────────────────── */
/* Bright yellow ground (from the strawberry-fabric palette), soft
   pink cloud shapes drifting behind the title, pink washi tape,
   light-blue ribbon marker. Sized to match the walkthrough card
   (800px) so switching from cover -> walkthrough is seamless. */
.ba-cover {
  max-width: 800px;
  margin: 40px auto 32px;
  padding: 128px 72px 112px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 1.2px, transparent 1.6px)
      0 0 / 22px 22px,
    #F5C534;
  color: var(--ba-ink);
  border-radius: 10px;
  box-shadow:
    0 24px 48px -18px rgba(42, 40, 35, 0.24),
    0 2px 4px rgba(42, 40, 35, 0.06);
  position: relative;
  overflow: visible;
  text-align: center;
}
/* Washi-tape tab at top-left. */
.ba-cover::before {
  content: "A RITUAL";
  position: absolute;
  top: -14px;
  left: 42px;
  padding: 8px 22px 7px;
  background: #EBC9D8;
  color: #6D3E52;
  font-family: var(--ba-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  transform: rotate(-2.5deg);
  box-shadow: 0 2px 6px rgba(42, 40, 35, 0.18);
  border-radius: 1px;
  z-index: 3;
}
/* Light-blue ribbon marker peeking out from the right edge. */
.ba-cover::after {
  content: "";
  position: absolute;
  top: 0;
  right: 56px;
  width: 24px;
  height: 92px;
  background: #B8DDE0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  z-index: 3;
}
.ba-cover > * { position: relative; z-index: 2; }
/* Inline eyebrow made redundant by the washi tape. */
.ba-cover > .ba-eyebrow { display: none; }
.ba-cover-title {
  font-family: var(--ba-serif);
  font-size: 4rem;
  font-weight: 700;
  color: var(--ba-ink);
  margin: 0 0 26px;
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.ba-cover-tagline {
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ba-ink-mute);
  line-height: 1.55;
  margin: 0 auto 40px;
  max-width: 520px;
}
.ba-cover-divider { display: none; }
.ba-cover-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.ba-cover-cta {
  padding: 16px 34px;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  border-radius: 4px;
}
/* Small "already have a book?" text link under the primary CTA.
   Reveals an inline email form so returning visitors on new
   devices can request a fresh magic link with one click. */
.ba-cover-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.ba-cover-relink-toggle {
  background: transparent;
  border: none;
  padding: 4px 0;
  color: var(--ba-ink);
  font-family: var(--ba-sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(42, 40, 35, 0.4);
  text-underline-offset: 4px;
}
.ba-cover-relink-toggle:hover {
  text-decoration-color: var(--ba-ink);
}
.ba-cover-relink {
  margin-top: 18px;
  text-align: center;
}
.ba-cover-relink-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: stretch;
  max-width: 420px;
  margin: 0 auto;
}
.ba-cover-relink-form[hidden] { display: none; }
.ba-cover-relink-form input[type="email"] {
  flex: 1 1 auto;
  padding: 12px 14px;
  border: 1.5px solid var(--ba-rule);
  border-radius: 3px;
  background: var(--ba-sheet);
  font-family: var(--ba-sans);
  font-size: 0.95rem;
  color: var(--ba-ink);
  outline: none;
  min-width: 0;
}
.ba-cover-relink-form input[type="email"]:focus { border-color: var(--ba-sage); }
.ba-cover-relink-form .ba-btn { white-space: nowrap; flex: 0 0 auto; }
.ba-cover-relink-status {
  margin-top: 12px;
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ba-ink-mute);
}
.ba-cover-relink-status.is-error { color: #A24A32; }
.ba-cover-relink-status.is-success { color: var(--ba-sage); font-style: normal; font-weight: 600; }
@media (max-width: 720px) {
  .ba-cover { padding: 88px 32px 72px; margin-top: 32px; }
  .ba-cover-title { font-size: 2.6rem; }
  .ba-cover::before { left: 20px; }
  .ba-cover::after { right: 28px; }
}

/* ── Step nav ────────────────────────────────────────────── */
.ba-step-nav-wrap {
  max-width: 800px;
  margin: 0 auto 22px;
}
.ba-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ba-header-link {
  background: transparent;
  border: none;
  color: var(--ba-ink-mute);
  font-family: var(--ba-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
}
.ba-header-link:hover { color: var(--ba-sage); }
.ba-header-link-right { margin-left: auto; }
.ba-cover-log-link { text-decoration: none; }
.ba-step-nav-label {
  font-family: var(--ba-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ba-sage);
  text-align: center;
  margin-bottom: 12px;
}
.ba-step-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ba-step-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed var(--ba-card-line);
  background: transparent;
  color: var(--ba-ink-mute);
  font-family: var(--ba-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ba-step-dot:hover:not(:disabled) { border-color: var(--ba-sage); color: var(--ba-sage); }
.ba-step-dot.done {
  background: var(--ba-ink);
  color: var(--ba-sheet);
  border-color: var(--ba-ink);
  border-style: solid;
}
.ba-step-dot.active {
  background: var(--ba-sage);
  color: var(--ba-sheet);
  border-color: var(--ba-sage);
  border-style: solid;
}

/* ── Card frame (dashed border echoing /cases/) ─────────── */
/* Background color swaps per active step via .ba-card-step-{n}
   toggled by the goto() JS. Palette: pink / green / mustard / red /
   beige. Muted enough for dark text to stay legible. */
.ba-card {
  max-width: 800px;
  margin: 0 auto 24px;
  background: var(--ba-card);
  border-radius: 6px;
  padding: 18px;
  position: relative;
  transition: background 0.35s ease;
}
.ba-card.ba-card-step-1 { background: #C8DFB4; }  /* soft mint  */
.ba-card.ba-card-step-2 { background: #F1DDB4; }  /* warm sand  */
.ba-card.ba-card-step-3 { background: #EFB69C; }  /* coral      */
.ba-card.ba-card-step-4 { background: #C4B4D0; }  /* lavender   */
.ba-card.ba-card-step-5 { background: #F3EBD9; }  /* cream      */
.ba-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(42, 40, 35, 0.35);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}
.ba-card > .ba-step { position: relative; z-index: 2; }

/* ── Step (only current one is visible) ─────────────────── */
.ba-step[hidden] { display: none; }
.ba-step { padding: 30px 40px 24px; }
.ba-step-head { margin-bottom: 22px; }
.ba-step-eyebrow {
  font-family: var(--ba-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(42, 40, 35, 0.7);
  margin-bottom: 12px;
}
.ba-step-heading {
  font-family: var(--ba-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ba-ink);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}
.ba-step-lede {
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ba-ink-mute);
  line-height: 1.55;
  margin: 0;
}
.ba-step-body { margin-bottom: 22px; }

/* ── Step-level nav bar ─────────────────────────────────── */
.ba-step-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(42, 40, 35, 0.4);
}
.ba-step-nav-spacer { flex: 1 1 auto; }

/* ── Buttons ─────────────────────────────────────────────── */
.ba-btn {
  font-family: var(--ba-sans);
  padding: 13px 26px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--ba-ink);
  color: var(--ba-sheet);
  border: 1.5px solid var(--ba-ink);
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  display: inline-block;
  line-height: 1.2;
}
.ba-btn:hover { background: var(--ba-sage); border-color: var(--ba-sage); color: var(--ba-sheet); }
.ba-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ba-btn-primary {
  background: var(--ba-sage);
  color: var(--ba-sheet);
  border-color: var(--ba-sage);
}
.ba-btn-primary:hover { background: var(--ba-sage-soft); border-color: var(--ba-sage-soft); }
.ba-btn-ghost {
  background: transparent;
  color: var(--ba-ink);
  border-color: var(--ba-ink);
}
.ba-btn-ghost:hover { background: var(--ba-ink); color: var(--ba-sheet); border-color: var(--ba-ink); }

/* ── Card 01 fields (chapter title / age / date) ────────── */
.ba-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ba-field-caption {
  font-family: var(--ba-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ba-ink-mute);
  white-space: nowrap;
}
.ba-field-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  margin-left: 6px;
}
.ba-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 22px;
  align-items: flex-end;
}
.ba-year-title-input {
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--ba-ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--ba-rule);
  padding: 6px 4px;
  outline: none;
  width: 100%;
}
.ba-year-title-input:focus { border-bottom-color: var(--ba-sage); }
.ba-year-input-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ba-inline-input {
  font-family: var(--ba-serif);
  font-size: 1rem;
  color: var(--ba-ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ba-rule);
  padding: 2px 4px;
  outline: none;
  width: 140px;
}
.ba-inline-input:focus { border-bottom-color: var(--ba-sage); }
.ba-inline-input-year { width: 68px; text-align: center; font-size: 1.15rem; }
.ba-inline-suffix {
  font-family: var(--ba-sans);
  font-size: 0.9rem;
  color: var(--ba-ink-mute);
  white-space: nowrap;
}
.ba-year-input-wrap { white-space: nowrap; }

/* ── Questions ───────────────────────────────────────────── */
.ba-questions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ba-question {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: baseline;
}
.ba-question-num {
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: rgba(42, 40, 35, 0.75);
  line-height: 1;
  text-align: right;
  padding-top: 4px;
}
.ba-question-text {
  font-family: var(--ba-sans);
  font-size: 0.98rem;
  color: var(--ba-ink);
  margin: 0 0 8px;
  line-height: 1.4;
}
.ba-answer {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  font-family: var(--ba-serif);
  font-size: 1rem;
  color: var(--ba-ink);
  line-height: 1.9;
  padding: 0 4px 2px;
  border: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(1.9em - 1px),
      var(--ba-rule) calc(1.9em - 1px),
      var(--ba-rule) 1.9em
    );
  background-attachment: local;
  outline: none;
  box-sizing: border-box;
}
.ba-answer:focus { background-color: rgba(122, 132, 116, 0.04); }

/* ── List-type answer (add-one-at-a-time entries) ────────── */
.ba-list { display: flex; flex-direction: column; gap: 8px; }
.ba-list-items { display: flex; flex-direction: column; gap: 8px; }
.ba-list-row {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 6px;
  align-items: center;
}
.ba-list-input {
  font-family: var(--ba-serif);
  font-size: 1rem;
  color: var(--ba-ink);
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #FFF6E0;
  box-shadow: 0 1px 3px rgba(42, 40, 35, 0.08);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.ba-list-input:focus { border-color: var(--ba-sage); background: #FFFBEA; }
.ba-list-del {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  color: var(--ba-ink-mute);
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ba-list-del:hover { color: var(--ba-ink); background: rgba(42, 40, 35, 0.06); }
.ba-list-add {
  align-self: flex-start;
  background: transparent;
  color: var(--ba-ink);
  border: 1px dashed var(--ba-ink);
  border-radius: 3px;
  padding: 8px 14px;
  font-family: var(--ba-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  margin-top: 4px;
}
.ba-list-add:hover { background: var(--ba-ink); color: var(--ba-sheet); }

/* ── Post-it note variant (grid of small square notes) ──── */
.ba-list-postit .ba-list-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.ba-list-postit .ba-list-row {
  position: relative;
  display: block;
  padding: 0;
}
.ba-list-postit .ba-list-input {
  display: block;
  min-height: 130px;
  width: 100%;
  padding: 18px 18px 30px;
  background: #FFE98A;
  font-family: var(--ba-serif);
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ba-ink);
  border: none;
  border-radius: 2px;
  box-shadow:
    2px 3px 0 rgba(42, 40, 35, 0.06),
    0 6px 14px -6px rgba(42, 40, 35, 0.28);
  resize: none;
  outline: none;
  box-sizing: border-box;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ba-list-postit .ba-list-input:focus {
  background: #FFF3B0;
  transform: rotate(0deg) translateY(-1px);
  box-shadow:
    2px 4px 0 rgba(42, 40, 35, 0.08),
    0 10px 22px -8px rgba(42, 40, 35, 0.32);
}
/* Give each note a tiny random-feeling tilt via nth-child. */
.ba-list-postit .ba-list-row:nth-child(3n+1) .ba-list-input { transform: rotate(-1.5deg); background: #FFE98A; }
.ba-list-postit .ba-list-row:nth-child(3n+2) .ba-list-input { transform: rotate( 1.2deg); background: #E4EAB8; }
.ba-list-postit .ba-list-row:nth-child(3n+3) .ba-list-input { transform: rotate(-0.6deg); background: #FBD9AF; }
.ba-list-postit .ba-list-del {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 2;
  color: rgba(42, 40, 35, 0.55);
}
.ba-list-postit .ba-list-del:hover { background: rgba(42, 40, 35, 0.12); }
.ba-list-postit .ba-list-add { margin-top: 12px; }

/* The list widget's default input is a single-line <input>. Postit
   variant would ideally use <textarea>, but reusing the list JS
   keeps things simple; text still wraps visually because CSS
   height + padding push it into a card shape. */

/* ── Madlib-type answer (sentence with fill-in blanks) ──── */
.ba-madlib {
  font-family: var(--ba-serif);
  font-size: 1.05rem;
  color: var(--ba-ink);
  margin: 0;
  padding: 22px 24px;
  background: rgba(122, 132, 116, 0.06);
  border: 1.5px dashed rgba(122, 132, 116, 0.35);
  border-radius: 4px;
  line-height: 1.5;
}
.ba-madlib-lead {
  display: block;
  font-family: var(--ba-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ba-ink-mute);
  margin-top: 18px;
}
.ba-madlib-lead:first-child { margin-top: 0; }
.ba-madlib-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ba-ink);
  background: var(--ba-sheet);
  border: none;
  border-bottom: 1.5px solid var(--ba-rule);
  outline: none;
  border-radius: 0;
  box-sizing: border-box;
}
.ba-madlib-input:focus { border-bottom-color: var(--ba-sage); }
.ba-madlib-input::placeholder {
  font-style: normal;
  color: var(--ba-ink-mute);
  opacity: 0.5;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* ── Reflection pair (end of Card 04) ───────────────────── */
.ba-reflect-pair {
  margin-top: 32px;
  padding: 22px 24px 20px;
  background: #F3EDDE;
  border: 1.5px solid #FFFFFF;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ba-reflect-col { display: flex; flex-direction: column; }
.ba-reflect-label {
  font-family: var(--ba-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(42, 40, 35, 0.7);
  margin-bottom: 8px;
}
.ba-reflect-echo {
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ba-ink);
  line-height: 1.55;
  padding: 8px 10px;
  background: rgba(122, 132, 116, 0.06);
  border-radius: 3px;
  min-height: 100px;
  white-space: pre-wrap;
}
.ba-reflect-echo.is-empty { color: var(--ba-ink-mute); font-style: italic; }
.ba-answer-compare { min-height: 100px; }

/* ── Save form (Card 05 body) ───────────────────────────── */
.ba-save-inner { max-width: 620px; }
.ba-save-eyebrow {
  font-family: var(--ba-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ba-sage);
  margin-bottom: 10px;
}
.ba-save-title {
  font-family: var(--ba-serif);
  font-size: 1.3rem;
  color: var(--ba-ink);
  margin: 0 0 8px;
  line-height: 1.25;
}
.ba-save-caption {
  font-family: var(--ba-sans);
  font-size: 0.94rem;
  color: var(--ba-ink-mute);
  line-height: 1.55;
  margin: 0 0 20px;
}
.ba-save-form { display: flex; flex-direction: column; gap: 16px; }
.ba-save-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.ba-field-label { display: flex; flex-direction: column; gap: 4px; }
.ba-field-label input[type="text"],
.ba-field-label input[type="email"],
.ba-field-label select,
.ba-save-form select {
  font-family: var(--ba-sans);
  font-size: 1rem;
  color: var(--ba-ink);
  padding: 10px 12px;
  border: 1.5px solid var(--ba-rule);
  border-radius: 3px;
  background: var(--ba-sheet);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.ba-field-label input:focus,
.ba-save-form select:focus { border-color: var(--ba-sage); }
.ba-field-label input.is-invalid,
.ba-field-label input.is-invalid:focus { border-color: #A24A32; background: #FFF5F0; }
.ba-date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--ba-sans);
  font-size: 0.92rem;
  color: var(--ba-ink);
  line-height: 1.4;
}
.ba-checkbox-label input[type="checkbox"] { margin-top: 3px; }
.ba-save-form .ba-btn-primary { align-self: flex-start; }
.ba-save-status {
  margin-top: 14px;
  font-family: var(--ba-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ba-ink-mute);
}
.ba-save-status.is-error { color: #A24A32; }
.ba-save-status.is-success { color: var(--ba-sage); font-style: normal; font-weight: 600; }
.ba-reminder-block {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(42, 40, 35, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ba-reminder-block .ba-save-eyebrow { margin-bottom: 4px; }
.ba-reminder-readonly {
  font-family: var(--ba-serif);
  font-size: 1rem;
  color: var(--ba-ink);
  margin: 0;
}
.ba-reminder-readonly strong { font-style: italic; font-weight: 600; }
.ba-reminder-edit {
  display: inline-block;
  margin-left: 12px;
  font-family: var(--ba-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ba-sage);
  text-decoration: none;
  border-bottom: 1px solid var(--ba-sage);
  padding-bottom: 1px;
}
.ba-reminder-edit:hover { color: var(--ba-ink); border-bottom-color: var(--ba-ink); }
.ba-save-alt {
  margin: 22px 0 0;
  font-family: var(--ba-sans);
  font-size: 0.88rem;
  color: var(--ba-ink-mute);
  padding-top: 18px;
  border-top: 1px solid rgba(42, 40, 35, 0.22);
}
.ba-save-alt-link {
  color: var(--ba-ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--ba-ink);
  margin-left: 6px;
}
.ba-save-alt-link:hover { color: var(--ba-sage); border-bottom-color: var(--ba-sage); }

/* ── Autosave flash ──────────────────────────────────────── */
.ba-savebar {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--ba-ink);
  color: var(--ba-sheet);
  padding: 8px 14px;
  border-radius: 4px;
  font-family: var(--ba-sans);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 100;
}
.ba-savebar.is-visible { opacity: 0.9; transform: translateY(0); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .ba-page { padding: 20px 12px 48px; }
  .ba-cover { padding: 40px 20px 32px; }
  .ba-cover-title { font-size: 2.4rem; }
  .ba-card { padding: 12px; }
  .ba-step { padding: 26px 22px 20px; }
  .ba-step-heading { font-size: 1.75rem; }
  .ba-step-dot { width: 38px; height: 38px; font-size: 0.72rem; }
  .ba-save-row { grid-template-columns: 1fr; }
  .ba-reflect-pair { grid-template-columns: 1fr; }
  .ba-field-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .ba-year-title-input { font-size: 1.35rem; }
  .ba-step-nav-bar { flex-direction: column-reverse; gap: 12px; align-items: stretch; }
  .ba-btn { text-align: center; }
}

/* ────────────────────────────────────────────────────────────
 * Print stylesheet -- expand all steps, remove nav, one page.
 * ──────────────────────────────────────────────────────────── */
/* Print echoes: text elements the JS injects on beforeprint so the
   full answer wraps naturally instead of being clipped by an input. */
.ba-print-echo { display: none; }

@page { size: Letter; margin: 0.75in; }
@media print {
  html, body { background: #FFFFFF !important; }
  .navbar, nav, header.site-header,
  .ba-cover, .ba-step-nav-wrap, .ba-step-nav-bar, .ba-savebar,
  .ba-step[data-step="5"] { display: none !important; }
  .ba-page { padding: 0 !important; background: #FFFFFF !important; }
  .ba-card {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #FFFFFF;
  }
  .ba-card::before { display: none !important; }
  .ba-step { display: block !important; padding: 12px 0 !important; page-break-inside: avoid; }
  .ba-step[hidden] { display: block !important; }
  .ba-step-heading { font-size: 1.4rem; }
  .ba-step-eyebrow { color: var(--ba-ink-mute); }
  .ba-step-head { margin-bottom: 14px; }
  .ba-questions { gap: 12px; }
  .ba-answer {
    min-height: 48px;
    font-size: 0.88rem;
    line-height: 1.7;
  }
  .ba-reflect-pair { margin-top: 16px; padding: 12px 14px; }

  /* Hide the input, show the echo, with type-appropriate styling. */
  .is-print-hidden { display: none !important; }
  .ba-print-echo {
    display: block;
    font-family: var(--ba-serif);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--ba-ink);
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 6px 2px;
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.15);
  }
  .ba-print-echo-title {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 600;
    border-bottom: none;
    padding: 4px 0;
  }
  .ba-print-echo-inline {
    display: inline;
    border-bottom: none;
    padding: 0 4px;
    font-weight: 600;
  }
  .ba-print-echo-madlib {
    font-style: italic;
    background: transparent;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.2);
  }
  .ba-print-echo-list {
    background: #FFFCE8;
    padding: 8px 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.15);
    margin-bottom: 4px;
  }
}
