/* ===========================================================================
   Made for This — companion workbook
   Aesthetic: "Forge & Fire" — warm, ember-lit, editorial. Deep tinted charcoal,
   burnt-orange ember, brass, and parchment. Fraunces (display) + Spectral (body).
   =========================================================================== */

:root {
  --bg: #1b1612;
  --bg-2: #221b16;
  --surface: #271f19;
  --surface-2: #2e251e;
  --line: #3a2e25;
  --line-soft: #322822;

  --ink: #ece0cd;
  --ink-soft: #ccbda5;
  --muted: #a08c72;
  --faint: #6f5f4d;

  --ember: #d2622e;
  --ember-bright: #e98a4b;
  --brass: #c79a51;
  --brass-soft: #d8b878;

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);

  --display: "Fraunces", Georgia, serif;
  --body: "Spectral", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(210, 98, 46, 0.16), transparent 60%),
    radial-gradient(700px 500px at 0% 105%, rgba(199, 154, 81, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Grain overlay — fixed, never on a scrolling container */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(210, 98, 46, 0.35);
  color: #fff;
}

/* --------------------------------------------------------------------------- Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(27, 22, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 2px 8px 2px 8px;
  background: linear-gradient(150deg, var(--ember-bright), var(--ember));
  box-shadow: 0 0 14px rgba(233, 138, 75, 0.6);
}
.brand-text {
  font-size: 1.02rem;
}

.nav {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}
.nav-menu {
  position: relative;
}
.nav-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-menu-toggle::-webkit-details-marker {
  display: none;
}
.nav-menu-toggle::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}
.nav-menu-toggle:hover {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.12);
}
.nav-menu[open] .nav-menu-toggle {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.12);
  border-color: var(--ember);
}
.nav-menu[open] .nav-menu-toggle::after {
  transform: rotate(-135deg) translateY(2px);
}
.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 11rem;
  padding: 0.4rem;
  background: rgba(27, 22, 18, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-menu-panel .nav-link {
  display: block;
}
.nav-link:hover {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.12);
}
.nav-link.current {
  color: var(--ember-bright);
}

.status {
  min-width: 9.5rem;
  text-align: right;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s;
}
.status[data-state="saving"] {
  color: var(--brass-soft);
}
.status[data-state="saved"],
.status[data-state="loaded"] {
  color: var(--muted);
}
.status[data-state="offline"] {
  color: var(--ember);
}
@media (max-width: 620px) {
  .status {
    display: none;
  }
  .nav-link {
    padding: 0.4rem 0.5rem;
  }
}

/* --------------------------------------------------------------------------- Views */
.view {
  display: none;
}
.view.active {
  display: block;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sheet {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.4rem) 5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------- Cover */
.cover {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) clamp(1.1rem, 4vw, 2.4rem) 5rem;
  overflow: hidden;
}
.ember {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 138, 75, 0.3), transparent 62%);
  filter: blur(10px);
  animation: pulse 7s ease-in-out infinite;
  z-index: -1;
}
@keyframes pulse {
  0%, 100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.cover-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.4rem;
}
.cover-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 11vw, 7rem);
  line-height: 0.94;
  margin: 0;
  letter-spacing: -0.02em;
}
.cover-sub {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 4vw, 2.1rem);
  color: var(--ember-bright);
  letter-spacing: 0;
  margin-top: 0.6rem;
}
.cover-lede {
  max-width: 40ch;
  margin: 2rem 0 3rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink-soft);
}

.cover-movements {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.movement-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem clamp(1.2rem, 3vw, 2rem) 1.5rem;
  overflow: hidden;
}
.movement-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ember), transparent);
}
.mc-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.05;
  margin: 0.3rem 0 0.15rem;
}
.mc-sub {
  font-style: italic;
  color: var(--ember-bright);
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.mc-intro {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin: 0 0 1.3rem;
}
.mc-intro > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s;
}
.mc-intro > summary::-webkit-details-marker {
  display: none;
}
.mc-intro > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform 0.25s;
}
.mc-intro[open] > summary::after {
  transform: rotate(225deg);
}
.mc-intro > summary:hover {
  color: var(--brass-soft);
}
.mc-intro-body {
  padding: 0.2rem 0 1.3rem;
  max-width: 64ch;
}
.mc-intro-body p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.mc-intro-body p:last-child {
  margin-bottom: 0;
}
.mc-go {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ember-bright);
  transition: color 0.2s;
}
.mc-go:hover {
  color: var(--brass-soft);
}
.mc-go-plan {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.1rem;
  color: var(--ink);
}
/* Staggered reveal of movement cards */
body.ready .movement-card {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body.ready .movement-card:nth-child(2) {
  animation-delay: 0.08s;
}
body.ready .movement-card:nth-child(3) {
  animation-delay: 0.16s;
}

/* --------------------------------------------------------------------------- Welcome / splash */
.welcome {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.4rem, 7vw, 6rem) clamp(1.1rem, 4vw, 2.4rem) 5rem;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  overflow: hidden;
}
.welcome-ember {
  top: -160px;
  left: -160px;
  right: auto;
}
.welcome-cover {
  margin: 0;
  justify-self: start;
  position: relative;
}
.welcome-cover img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.welcome-cover::after {
  content: "";
  position: absolute;
  inset: auto -6% -10% -6%;
  height: 40%;
  background: radial-gradient(
    ellipse at center,
    rgba(210, 98, 46, 0.22),
    transparent 70%
  );
  filter: blur(6px);
  z-index: -1;
}
.welcome-panel {
  max-width: 46ch;
}
.welcome-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.1rem;
}
.welcome-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 1.8rem;
}
.welcome-prayer p {
  margin: 0 0 1.1rem;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.7;
  color: var(--ink-soft);
}
.welcome-prayer p:first-child::first-letter {
  font-family: var(--display);
  font-size: 3.2em;
  float: left;
  line-height: 0.78;
  padding: 0.05em 0.12em 0 0;
  color: var(--ember-bright);
}
.welcome-prayer-close {
  font-style: italic;
  color: var(--brass-soft);
}
.welcome-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.6rem;
  padding: 0.95rem 1.9rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #1b1612;
  background: linear-gradient(150deg, var(--ember-bright), var(--ember));
  border-radius: 999px;
  box-shadow: 0 14px 30px -14px rgba(210, 98, 46, 0.8);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.welcome-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 20px 38px -16px rgba(210, 98, 46, 0.9);
}
.welcome-cta-arrow {
  transition: transform 0.2s;
}
.welcome-cta:hover .welcome-cta-arrow {
  transform: translateX(4px);
}

@media (max-width: 760px) {
  .welcome {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }
  .welcome-cover {
    justify-self: center;
  }
  .welcome-cover img {
    max-width: 230px;
  }
}

/* --------------------------------------------------------------------------- Section headers */
.sec-head {
  margin-bottom: 2.6rem;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 1.8rem;
}
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.7rem;
}
.sec-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}
.sec-sub {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  margin: 0.5rem 0 0;
  color: var(--ember);
  line-height: 1.1;
}
.sec-intro {
  max-width: 52ch;
  margin: 1.1rem 0 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------- Progress */
.progress {
  margin-top: 1.8rem;
  max-width: 460px;
}
.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brass), var(--ember-bright));
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.progress-label {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------- Export toolbar (print / download / email) */
.wb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}
.wb-tool {
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.wb-tool:hover {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.12);
  border-color: var(--ember);
}
.wb-tool:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* Texting the retreat invite — primary-weighted button beside the plan field */
.invite-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: 1.1rem;
}
.wb-tool-go {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.14);
  border-color: var(--ember);
}
.invite-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.invite-hint.warn {
  color: var(--ember);
}

/* --------------------------------------------------------------------------- Weeks (accordion) */
.weeks {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 2.4rem 0 0;
}
.week {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.week.open {
  border-color: var(--ember);
}
.week-toggle {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas:
    "eyebrow tally chevron"
    "name    tally chevron"
    "goal    tally chevron";
  align-items: center;
  gap: 0.1rem 1rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 1.2rem clamp(1.1rem, 3vw, 1.7rem);
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--body);
  transition: background 0.2s;
}
.week-toggle:hover {
  background: rgba(210, 98, 46, 0.07);
}
.week-toggle:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}
.wk-eyebrow {
  grid-area: eyebrow;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
}
.wk-name {
  grid-area: name;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 0.15rem 0;
}
.week.open .wk-name {
  color: var(--ember-bright);
}
.wk-goal {
  grid-area: goal;
  font-style: italic;
  color: var(--brass-soft);
  font-size: 0.98rem;
}
.wk-tally {
  grid-area: tally;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.wk-tally.done {
  color: var(--brass-soft);
}
.wk-chevron {
  grid-area: chevron;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s;
}
.week.open .wk-chevron {
  transform: rotate(-135deg);
  border-color: var(--ember-bright);
}

/* The body is hidden until its week is opened */
.week-body {
  display: none;
  padding: 0 clamp(1.1rem, 3vw, 1.7rem) 1.6rem;
  border-top: 1px solid var(--line-soft);
}
.week.open .week-body {
  display: block;
  animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.week-body .phase-q {
  margin: 1.4rem 0 1.6rem;
}

/* --------------------------------------------------------------------------- Weekly calendar */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
@media (max-width: 680px) {
  .cal {
    grid-template-columns: repeat(4, 1fr);
  }
}
.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  cursor: pointer;
  padding: 0.7rem 0.3rem 0.85rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-family: var(--body);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.cal-day:hover {
  border-color: rgba(210, 98, 46, 0.5);
  transform: translateY(-1px);
}
.cal-day.current {
  background: linear-gradient(150deg, rgba(210, 98, 46, 0.2), transparent 75%),
    var(--surface-2);
  border-color: var(--ember);
}
.cal-day:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.cd-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.cd-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
}
.cal-day.current .cd-num {
  color: var(--ember-bright);
}
.cd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  margin-top: 0.15rem;
}
.cal-day.has-entry .cd-dot {
  background: var(--brass);
  box-shadow: 0 0 8px rgba(199, 154, 81, 0.6);
}

/* --------------------------------------------------------------------------- Day panel */
.day-stage {
  margin-top: 1.4rem;
}
.day-panel {
  display: none;
}
.day-panel.active {
  display: block;
  animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.day-panel-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}
.dp-eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--ember-bright);
  line-height: 1;
}
.dp-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink);
}
.day-read {
  margin-bottom: 1.5rem;
}
.dp-read-head {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.7rem;
}
.dp-practices {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  max-width: 70ch;
}
.dp-practices li {
  margin-bottom: 0.4rem;
}
.dp-practices li::marker {
  color: var(--ember);
}
.phase-q {
  margin: 0;
  padding: 1rem 1.3rem;
  border-left: 2px solid var(--ember);
  background: linear-gradient(90deg, rgba(210, 98, 46, 0.09), transparent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  max-width: 64ch;
}
.phase-q span {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------- Checkboxes (Section Three) */
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check-box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  border: 1.5px solid var(--line);
  background: var(--bg-2);
  display: grid;
  place-items: center;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.check-box svg {
  width: 14px;
  height: 14px;
  color: #1b1612;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s, transform 0.18s;
}
.check input:checked + .check-box {
  background: linear-gradient(150deg, var(--ember-bright), var(--ember));
  border-color: var(--ember);
}
.check input:checked + .check-box svg {
  opacity: 1;
  transform: scale(1);
}
.check input:focus-visible + .check-box {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.check input:checked ~ .check-label {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--faint);
}

/* Fields */
.field-text,
.field-input {
  width: 100%;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.6rem 0.7rem;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-text::placeholder,
.field-input::placeholder {
  color: var(--faint);
  font-style: italic;
}
.field-text:focus,
.field-input:focus {
  outline: none;
  border-color: var(--ember);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(210, 98, 46, 0.16);
}
.audit {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

/* --------------------------------------------------------------------------- Steward note */
.steward {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 3rem;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(120deg, rgba(199, 154, 81, 0.1), transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steward svg {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: var(--ember-bright);
}
.steward p {
  margin: 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------- Blocks (section 2 & 3) */
.block {
  margin: 2.4rem 0;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.block-head {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.8rem;
}
.block-head.step {
  margin: 3rem 0 1.2rem;
  font-size: 1.7rem;
}
.block-body {
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 0 1rem;
}
.field-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 1.1rem 0 0.5rem;
}
.prompt {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-style: italic;
}

/* Movements */
.movements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
@media (max-width: 720px) {
  .movements {
    grid-template-columns: 1fr;
  }
}
.movement {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.movement::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(var(--ember), transparent);
}
.movement-head {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.8rem;
}
.numeral {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ember-bright);
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex: 0 0 auto;
}
.movement-head h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0;
}
.movement-sub {
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.movement-goal {
  color: var(--brass-soft);
  font-style: italic;
  margin: 0 0 0.4rem;
}

/* --------------------------------------------------------------------------- Covenant movements (accordion) */
.step-hint {
  color: var(--muted);
  font-style: italic;
  max-width: 60ch;
  margin: 0 0 0.4rem;
}
.cov-moves {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 1.2rem 0 0;
}
.cov-move {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cov-move.open {
  border-color: var(--ember);
}
.cov-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "num titles status chevron"
    "num goal   status chevron";
  align-items: center;
  gap: 0.15rem 1rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 1.1rem clamp(1.1rem, 3vw, 1.6rem);
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--body);
  transition: background 0.2s;
}
.cov-toggle:hover {
  background: rgba(210, 98, 46, 0.07);
}
.cov-toggle:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}
.cov-toggle .numeral {
  grid-area: num;
}
.cm-titles {
  grid-area: titles;
}
.cm-title {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--ink);
}
.cov-move.open .cm-title {
  color: var(--ember-bright);
}
.cm-sub {
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.cm-goal {
  grid-area: goal;
  font-style: italic;
  color: var(--brass-soft);
  font-size: 0.95rem;
}
.cm-status {
  grid-area: status;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.cm-status.done {
  color: var(--brass-soft);
}
.cm-chevron {
  grid-area: chevron;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s;
}
.cov-move.open .cm-chevron {
  transform: rotate(-135deg);
  border-color: var(--ember-bright);
}
.cov-body {
  display: none;
  padding: 0 clamp(1.1rem, 3vw, 1.6rem) 1.6rem;
  border-top: 1px solid var(--line-soft);
}
.cov-move.open .cov-body {
  display: block;
  animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cov-prayer {
  margin: 0.4rem 0 0;
  padding: 1rem 1.3rem;
  border-left: 2px solid var(--ember);
  background: linear-gradient(90deg, rgba(210, 98, 46, 0.09), transparent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--ink);
  max-width: 64ch;
}
.cov-example {
  margin: 0.6rem 0 0.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-2);
  max-width: 64ch;
}
.cov-example > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.6rem 0.95rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--brass);
  font-family: var(--display);
}
.cov-example > summary::-webkit-details-marker {
  display: none;
}
.cov-example > summary::before {
  content: "＋";
  margin-right: 0.5rem;
  color: var(--ember);
}
.cov-example[open] > summary::before {
  content: "－";
}
.cov-example[open] > summary {
  border-bottom: 1px solid var(--line-soft);
}
.cov-example .ce-lead {
  margin: 0.7rem 0.95rem 0.4rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft, var(--ink));
  opacity: 0.8;
}
.cov-example .ce-row {
  margin: 0.4rem 0.95rem 0.7rem;
  color: var(--ink);
  line-height: 1.5;
}
.cov-example .ce-tag {
  display: inline-block;
  margin-right: 0.55rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: rgba(210, 98, 46, 0.12);
  color: var(--ember);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.08em;
}
@media (max-width: 620px) {
  .cov-toggle {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "num titles chevron"
      "num goal   chevron"
      "num status chevron";
  }
}

/* --------------------------------------------------------------------------- Section 3: thicket */
.thicket {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 760px) {
  .thicket {
    grid-template-columns: 1fr;
  }
}
.role-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
}
.role-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
}
.role-card h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0.3rem 0 0.5rem;
}
.role-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

/* Retreat */
.rule {
  margin: 0 0 1.4rem;
  padding: 1rem 1.3rem;
  border-left: 2px solid var(--brass);
  background: linear-gradient(90deg, rgba(199, 154, 81, 0.1), transparent);
  font-style: italic;
  color: var(--ink);
  border-radius: 0 8px 8px 0;
}
.retreat-days {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 620px) {
  .retreat-days {
    grid-template-columns: 1fr;
  }
}
.retreat-day {
  padding: 1.1rem 1.2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.retreat-day h4 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}
.retreat-day p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.frame-head {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 1rem;
}
.frame {
  display: grid;
  gap: 0.9rem;
}
.frame-row {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 620px) {
  .frame-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}
.frame-word span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ember-bright);
  display: block;
}
.frame-word em {
  color: var(--muted);
  font-size: 0.9rem;
}

.mult-steps {
  margin: 0 0 0.6rem;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  max-width: 70ch;
}
.mult-steps li {
  margin-bottom: 0.5rem;
}
.mult-steps li::marker {
  color: var(--ember);
}

/* --------------------------------------------------------------------------- Covenant */
.covenant {
  margin: 2.4rem 0 0;
  padding: 2.4rem;
  text-align: center;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(210, 98, 46, 0.16), transparent 70%),
    var(--surface);
  border: 1px solid var(--ember);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.covenant svg {
  width: 40px;
  height: 40px;
  color: var(--ember-bright);
}
.covenant h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 0.6rem 0 0.8rem;
}
.covenant-body {
  max-width: 50ch;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-soft);
}
.covenant-sign {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.sign-field {
  width: min(280px, 80vw);
  text-align: left;
}
.sign-line {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.covenant-check {
  justify-content: center;
  max-width: 36ch;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------- Footer */
.foot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 0.85rem;
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===========================================================================
   The Interactive E-Book
   =========================================================================== */

/* A plain top-bar link (the E-Book), styled to sit beside the Action Plans
   dropdown as a matching pill. */
.nav-top-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-top-link:hover {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.12);
}
.nav-top-link.current {
  color: var(--ember-bright);
  border-color: var(--ember);
}

/* Reload explainer beside the e-book toolbar. */
.eb-reload-note {
  max-width: 60ch;
  margin: 1.1rem 0 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: linear-gradient(120deg, rgba(199, 154, 81, 0.09), transparent);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 10px;
}
.eb-reload-note strong {
  color: var(--brass-soft);
  font-weight: 600;
}

/* Contents rail — three sections of chapter buttons. */
.eb-contents {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin: 0 0 3rem;
}
@media (max-width: 760px) {
  .eb-contents {
    grid-template-columns: 1fr;
  }
}
.eb-contents-sec {
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.eb-contents-head {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.8rem;
  color: var(--ember);
}
.eb-contents-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.eb-toc-link {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.98rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  transition: color 0.2s, background 0.2s;
}
.eb-toc-link:hover {
  color: var(--ink);
  background: rgba(210, 98, 46, 0.1);
}
.eb-toc-link.current {
  color: var(--ember-bright);
  background: rgba(210, 98, 46, 0.12);
}
.eb-toc-n {
  flex: 0 0 auto;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brass);
}
.eb-toc-link.current .eb-toc-n {
  color: var(--ember-bright);
}

/* One chapter at a time. */
.eb-chapter {
  display: none;
}
.eb-chapter.active {
  display: block;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ebc-head {
  margin-bottom: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line-soft);
}
.ebc-eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.6rem;
}
.ebc-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}
.ebc-scripture {
  margin: 0.6rem 0 0;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--ember);
}

/* The chapter prose — set on a comfortable reading measure. */
.ebc-prose {
  max-width: 68ch;
  margin: 0 auto;
}
.ebc-prose p {
  margin: 0 0 1.15rem;
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--ink);
}
.ebc-prose p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 600;
  font-size: 3.4rem;
  line-height: 0.8;
  padding: 0.3rem 0.6rem 0 0;
  color: var(--ember);
}

/* Discussion + Selah blocks under each chapter. */
.ebc-block {
  max-width: 68ch;
  margin: 2.6rem auto 0;
  padding: 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ebc-selah {
  background: linear-gradient(150deg, rgba(199, 154, 81, 0.08), transparent);
}
.ebc-block-head {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}
.ebc-block-hint {
  margin: 0 0 1.3rem;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
}
.ebc-q {
  margin-bottom: 1.4rem;
}
.ebc-q-text {
  display: flex;
  gap: 0.7rem;
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-size: 1.04rem;
}
.ebc-q-n {
  flex: 0 0 auto;
  font-family: var(--display);
  font-weight: 600;
  color: var(--ember);
}
.ebc-selah-body {
  margin-bottom: 0.4rem;
}
.ebc-selah-body p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* The closing prayer. */
.ebc-prayer {
  max-width: 68ch;
  margin: 2.2rem auto 0;
  padding: 1.5rem 1.7rem;
  border-left: 3px solid var(--ember);
  background: rgba(210, 98, 46, 0.06);
  border-radius: 0 10px 10px 0;
}
.ebc-prayer-title {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.6rem;
}
.ebc-prayer p:last-child {
  margin: 0;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* Link from the e-book into the matching action plan, where the book places one. */
.ebc-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.8rem;
  max-width: 68ch;
  margin: 2.2rem auto 0;
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}
.ebc-action:hover {
  border-color: var(--ember);
  background: rgba(210, 98, 46, 0.1);
}
.ebc-action-tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.ebc-action-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin-right: auto;
}
.ebc-action-arrow {
  font-size: 1.3rem;
  color: var(--ember-bright);
}

/* Previous / next chapter pager. */
.ebc-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 68ch;
  margin: 3rem auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
}
.eb-pager-btn {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
  font-family: var(--body);
  background: transparent;
  border: 0;
  padding: 0.3rem;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.eb-pager-btn.next {
  text-align: right;
  margin-left: auto;
}
.eb-pager-btn:hover {
  color: var(--ember-bright);
}
.ebp-dir {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}
.ebp-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
}
