/*
  The Vine Kids
  Layout: left aligned editorial pages on a 1180px grid. The real
  cover and real pages carry the imagery; one signature graphic, the vine
  of 14 chapters. Literata is the book's voice, Figtree is ours.

  Light surfaces are painted as single color gradients on purpose: Instagram
  and Facebook in-app browsers force dark mode onto plain background colors
  and leave dark text on top, which makes pages unreadable. Gradients are
  left alone by those filters.
*/

@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-var.woff") format("woff");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* palette, sampled from the cover */
  --cream: #FBF4DE;
  --sand: #F2E6C3;
  --paper: #FFFCF3;
  --forest: #2C4A2E;
  --forest-deep: #1C3320;
  --forest-tint: #3A5C3C;
  --ink: #25291F;
  --muted: #5B5C3C; /* olive from the cover, 5.5:1 on sand, 6.3:1 on cream */
  --gold: #E1C25F;
  --gold-deep: #7B5E12;
  --leaf: #6F8A3A;
  --line: #E0D3AA;
  --line-strong: #8E8B6A;
  --line-dark: #4A6A4C;
  --on-dark: #FBF4DE;
  --on-dark-muted: #D9D2B4;
  --error: #9A2E1F;
  --error-bg: #F7E3DA;
  --success-bg: #E3EAD0;
  --white: #FFFFFF;
  --focus: var(--forest);

  /* fills (see note at the top) */
  --fill-cream: linear-gradient(var(--cream), var(--cream));
  --fill-sand: linear-gradient(var(--sand), var(--sand));
  --fill-paper: linear-gradient(var(--paper), var(--paper));
  --fill-white: linear-gradient(var(--white), var(--white));
  --fill-gold: linear-gradient(var(--gold), var(--gold));
  --fill-success: linear-gradient(var(--success-bg), var(--success-bg));
  --fill-error: linear-gradient(var(--error-bg), var(--error-bg));

  /* type */
  --font-book: "Literata", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-guide: "Figtree", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.9375rem;
  --text-base: 1.125rem;
  --text-md: 1.3125rem;
  --text-lg: 1.5rem;
  --text-h2: clamp(1.875rem, 1.35rem + 1.9vw, 2.625rem);
  --text-h1: clamp(2.125rem, 1.35rem + 3.2vw, 3.5rem);

  /* space */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-pad: clamp(4rem, 2.6rem + 5.5vw, 7.5rem);
  --wrap: 1180px;

  /* shape */
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-pill: 999px;
  --shadow-paper: 0 1px 2px rgba(37, 41, 31, 0.10), 0 12px 26px -10px rgba(37, 41, 31, 0.32);
  --shadow-book: 0 2px 4px rgba(37, 41, 31, 0.14), 0 28px 52px -18px rgba(37, 41, 31, 0.50);
  --shadow-soft: 0 1px 2px rgba(37, 41, 31, 0.06), 0 6px 18px -10px rgba(37, 41, 31, 0.22);

  --leaf-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 22'%3E%3Cpath d='M1 11C9 1 25-1 39 11 25 23 9 21 1 11z'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2325291F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  scrollbar-color: var(--leaf) var(--sand);
}

body {
  margin: 0;
  font-family: var(--font-guide);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--fill-cream) var(--cream);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

/* card checkout copy shows once SumUp is connected; invoice copy otherwise */
html:not(.checkout-on) [data-when="card"],
html.checkout-on [data-when="request"] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-book);
  font-weight: 600;
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-lg);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

h4 {
  font-size: 1.1875rem;
  line-height: 1.3;
}

/* a heading tag one level up that keeps the size of the level below */
h2.h3 {
  font-size: var(--text-lg);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

h3.h4 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: 0;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: var(--forest);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--gold-deep);
}

a:hover {
  text-decoration-thickness: 2.5px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

input,
textarea,
select,
button {
  font: inherit;
  color: inherit;
}

input,
textarea {
  caret-color: var(--forest);
}

.flow > * + * {
  margin-top: var(--flow-space, 1rem);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --flow-space: 1rem;
}

.lead {
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-s);
  background: var(--forest);
  color: var(--on-dark);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
}

/* surfaces */
.surface-cream { background: var(--fill-cream) var(--cream); }
.surface-sand { background: var(--fill-sand) var(--sand); }
.surface-forest { background: var(--forest); }
.surface-deep { background: var(--forest-deep); }

.on-dark {
  --focus: var(--gold);
  color: var(--on-dark);
}

.on-dark .lead {
  color: var(--on-dark-muted);
}

.on-dark a:not(.btn) {
  color: var(--on-dark);
  text-decoration-color: var(--gold);
}

.on-dark a.video-card {
  color: var(--ink);
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.45rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-guide);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-small {
  min-height: 2.75rem;
  padding: 0.55rem 1.05rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--forest);
  color: var(--on-dark);
}

.btn-primary:hover {
  background: var(--forest-deep);
}

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-secondary:hover {
  background: var(--fill-sand) var(--sand);
}

.surface-sand .btn-secondary:hover {
  background: var(--fill-paper) var(--paper);
}

.btn-quiet {
  background: var(--fill-paper) var(--paper);
  color: var(--forest);
  border-color: var(--line-strong);
  border-width: 1.5px;
}

.btn-quiet:hover {
  border-color: var(--forest);
}

.btn-gold {
  background: var(--fill-gold) var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: var(--on-dark);
}

.btn-outline-light {
  background: transparent;
  color: var(--on-dark);
  border-color: var(--on-dark-muted);
}

.btn-outline-light:hover {
  border-color: var(--on-dark);
  background: var(--forest-tint);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

/* header */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: 4.5rem;
  padding-block: 0.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--forest);
  text-decoration: none;
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
}

.brand-leaf-gold {
  fill: var(--gold-deep);
}

.brand-leaf {
  fill: var(--leaf);
}

.header-cta {
  gap: 0.3em;
  flex: none;
}

.on-dark .brand {
  color: var(--on-dark);
}

.on-dark .brand-leaf-gold {
  fill: var(--gold);
}

.on-dark .brand-leaf {
  fill: var(--on-dark-muted);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.nav-list a:hover {
  background: var(--fill-sand) var(--sand);
}

.nav-list a[aria-current="page"] {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--gold-deep);
  text-underline-offset: 0.45em;
}

.nav-list .nav-shop a {
  margin-inline: 0.3rem;
  padding-inline: 1.2rem;
  background: var(--forest);
  color: var(--on-dark);
}

.nav-list .nav-shop a:hover {
  background: var(--forest-deep);
}

.nav-list .nav-shop a[aria-current="page"],
.header-shop[aria-current="page"] {
  color: var(--on-dark);
  text-decoration: none;
  box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--gold-deep);
}

.header-shop {
  display: none;
  flex: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--fill-paper) var(--paper);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 60em) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--fill-cream) var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }

  .js .nav-list.is-open {
    display: flex;
  }

  .js .header-shop {
    display: inline-flex;
  }

  .js .nav-list .nav-shop a {
    margin-inline: 0;
    background: none;
    color: var(--ink);
  }

  .js .nav-list .nav-shop a:hover {
    background: var(--fill-sand) var(--sand);
  }

  .js .nav-list .nav-shop a[aria-current="page"] {
    color: var(--forest);
    box-shadow: none;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--gold-deep);
  }

  .js .nav-list a {
    width: 100%;
    min-height: 3rem;
    padding-inline: 0.5rem;
    border-radius: var(--radius-s);
    font-size: 1.125rem;
  }

  .no-js .nav-list {
    flex-wrap: wrap;
  }
}

@media (max-width: 23.75em) {
  .nav-toggle {
    padding-inline: 0.7rem;
  }

  .nav-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 26.25em) {
  .hide-narrow {
    display: none;
  }

  .brand {
    font-size: 1.1875rem;
  }

  .brand-mark {
    width: 1.85rem;
    height: 1.85rem;
  }

  .header-inner {
    gap: 0.5rem;
  }
}

@media (max-width: 21.25em) {
  .header-inner {
    column-gap: 0.5rem;
  }

  .brand {
    gap: 0.45rem;
    font-size: 1.0625rem;
  }

  .brand-mark {
    width: 1.6rem;
    height: 1.6rem;
  }

  .header-shop {
    padding-inline: 1rem;
  }
}

/* hero */

.hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(4rem, 2.5rem + 5vw, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.hero-copy h1 {
  max-width: 15.5ch;
}

.hero-lead {
  max-width: 33rem;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.fact {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--fill-paper) var(--paper);
  font-weight: 700;
  font-size: 1rem;
  color: var(--forest);
}

.fact-age {
  border-color: var(--gold);
  background: var(--fill-gold) var(--gold);
  color: var(--ink);
  font-size: 1.0625rem;
}

.hero .actions {
  margin-top: 0.25rem;
}

.hero-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
}

.hero-price-amount {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: clamp(1.875rem, 1.6rem + 1vw, 2.375rem);
  line-height: 1;
  color: var(--forest);
}

.hero-price-note {
  font-size: 1.0625rem;
  color: var(--muted);
}

.book {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}

.book-cover {
  position: relative;
  width: min(100%, 420px);
  border-radius: 3px 8px 8px 3px;
  box-shadow: var(--shadow-book);
}

.book-cover img {
  width: 100%;
  border-radius: inherit;
}

/* the binding crease along the spine */
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5%;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, rgba(20, 24, 10, 0.26), rgba(255, 255, 255, 0.22) 38%, rgba(20, 24, 10, 0.08) 70%, rgba(20, 24, 10, 0));
  pointer-events: none;
}

.book-caption {
  display: grid;
  gap: 0.15rem;
  text-align: center;
}

.book-title {
  font-family: var(--font-book);
  font-style: normal;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.book-subtitle {
  font-family: var(--font-book);
  font-size: 1.0625rem;
  color: var(--muted);
}

.book-author {
  font-size: var(--text-sm);
  color: var(--muted);
}

@media (max-width: 53.75em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-cover {
    width: min(78vw, 400px);
  }
}

@media (max-width: 30em) {
  .hero .actions .btn {
    flex: 1 1 100%;
  }
}

/* story */

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.story-copy {
  --flow-space: 1.1rem;
}

.story-copy > p {
  max-width: 34rem;
}

.story-copy > .ask {
  margin-top: 1.75rem;
}

.story-copy > .actions {
  margin-top: 1.75rem;
}

.ask {
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius-m);
  background: var(--fill-paper) var(--paper);
  box-shadow: var(--shadow-soft);
}

.ask-lead {
  font-size: 1rem;
  color: var(--muted);
}

.ask-quote p {
  font-family: var(--font-book);
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--forest-deep);
  text-wrap: balance;
}

.spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2.5vw, 1.75rem);
  align-items: start;
}

.sheet {
  display: grid;
  gap: 0.85rem;
}

.sheet-link {
  display: block;
  border-radius: 3px;
  box-shadow: var(--shadow-paper);
  background: var(--fill-white) var(--white);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}

.sheet-link img {
  width: 100%;
  border-radius: 3px;
}

.sheet-story .sheet-link {
  transform: rotate(-1.6deg);
}

.sheet-talk {
  margin-top: clamp(1.5rem, 5vw, 3rem);
}

.sheet-talk .sheet-link {
  transform: rotate(1.4deg);
}

.sheet-link:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 2px 4px rgba(37, 41, 31, 0.12), 0 22px 36px -12px rgba(37, 41, 31, 0.38);
}

.sheet figcaption {
  font-size: var(--text-sm);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 53.75em) {
  .story-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* families */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem);
  list-style: none;
  padding: 0;
}

.step-figure {
  aspect-ratio: 760 / 484;
  border-radius: 4px;
  overflow: hidden;
  background: var(--fill-white) var(--white);
  box-shadow: var(--shadow-paper);
}

.step-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.step h3 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.step-num {
  font-size: 1.875rem;
  line-height: 1;
  color: var(--gold-deep);
  font-variant-numeric: lining-nums;
}

.step h3 + p {
  margin-top: 0.5rem;
  color: var(--muted);
  max-width: 30rem;
}

.pace {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: var(--radius-m);
  background: var(--fill-sand) var(--sand);
}

.pace-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 1.5rem;
}

.pace-item dt {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--forest);
}

.pace-item dd {
  margin-top: 0.35rem;
  color: var(--muted);
}

@media (max-width: 53.75em) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 34rem;
  }

  .pace-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* vine of chapters, inside an expandable section */
.chapters {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chapters > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding: 1rem 3rem 1rem 0;
  font-family: var(--font-book);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  line-height: 1.3;
  color: var(--forest);
  list-style: none;
  cursor: pointer;
}

.chapters > summary::-webkit-details-marker {
  display: none;
}

.chapters > summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: -0.75rem;
  background: var(--forest);
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  transition: transform 0.25s ease;
}

.chapters[open] > summary::after {
  transform: rotate(180deg);
}

.chapters > summary:hover span {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--gold-deep);
}

.contents {
  margin-top: clamp(4.5rem, 9vw, 7rem);
}

.chapters > .contents {
  margin-top: 1rem;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.contents-head {
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
  --flow-space: 0.6rem;
}

.contents-head p {
  color: var(--muted);
}

.vine {
  position: relative;
  max-width: 1000px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
}

.vine-stem {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 100%;
  margin-left: -20px;
  overflow: visible;
}

.vine-stem path {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.vine-list {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
  grid-auto-rows: minmax(2.6rem, auto);
  list-style: none;
  padding: 0;
}

.vine-item {
  position: relative;
  grid-row: var(--row) / span 2;
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding: 0.3rem 0 1.4rem;
}

.vine-item:nth-child(odd) {
  grid-column: 1;
  text-align: right;
  justify-items: end;
}

.vine-item:nth-child(even) {
  grid-column: 3;
  text-align: left;
  justify-items: start;
}

.vine-leaf {
  position: absolute;
  top: 0.45rem;
  width: 2.6rem;
  height: 1.45rem;
  background: var(--leaf);
  -webkit-mask: var(--leaf-shape) center / contain no-repeat;
  mask: var(--leaf-shape) center / contain no-repeat;
}

.vine-item:nth-child(odd) .vine-leaf {
  right: -3.125rem;
  transform: scaleX(-1) rotate(-16deg);
}

.vine-item:nth-child(even) .vine-leaf {
  left: -3.125rem;
  transform-origin: left center;
  transform: rotate(-16deg);
}

.vine-item:nth-child(4n + 3) .vine-leaf,
.vine-item:nth-child(4n + 4) .vine-leaf {
  background: var(--forest);
}

.vine-item-free .vine-leaf {
  background: var(--gold-deep);
}

.vine-num {
  margin-right: 0.4em;
  color: var(--gold-deep);
  font-variant-numeric: lining-nums;
}

.vine-title {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
}

.vine-theme {
  font-size: 1rem;
  color: var(--muted);
}

.vine-free {
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 1rem;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .vine-stem path {
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation: vine-grow linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes vine-grow {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 45em) {
  .vine-stem {
    left: 22px;
  }

  .vine-list {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .vine-item,
  .vine-item:nth-child(odd),
  .vine-item:nth-child(even) {
    grid-column: 2;
    grid-row: auto;
    text-align: left;
    justify-items: start;
    padding-bottom: 1.4rem;
  }

  .vine-item:nth-child(odd) .vine-leaf,
  .vine-item:nth-child(even) .vine-leaf {
    left: -2.4rem;
    right: auto;
    width: 2.15rem;
    height: 1.2rem;
    transform-origin: left center;
    transform: rotate(-16deg);
  }

  .contents-head {
    text-align: left;
    margin-inline: 0;
  }
}

/* churches */

.churches h2,
.churches h3,
.churches h4 {
  color: var(--on-dark);
}

.week {
  display: grid;
  gap: 1rem;
}

.week-bar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.week-day {
  padding: 0.55rem 0;
  border-radius: var(--radius-s);
  background: var(--forest-tint);
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
}

.week-day-sunday {
  background: var(--fill-gold) var(--gold);
  color: var(--ink);
}

.week-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.week-plan-item {
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: var(--radius-m);
  --flow-space: 0.6rem;
}

.week-plan-sunday {
  background: var(--fill-gold) var(--gold);
  color: var(--ink);
}

.churches .week-plan-sunday h3 {
  color: var(--ink);
}

.week-plan-home {
  background: var(--forest-tint);
}

.week-quote p {
  font-family: var(--font-book);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
}

.week-plan-item > .week-quote {
  margin-top: 0.9rem;
}

.week-try {
  margin-top: 0.9rem;
  color: var(--on-dark-muted);
}

.handbook-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.handbook {
  --flow-space: 0.9rem;
}

.handbook > p:not(.list-label) {
  max-width: 36rem;
  color: var(--on-dark-muted);
}

.rhythm-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem clamp(1.5rem, 4vw, 2.5rem);
  padding-top: 0.9rem;
}

.rhythm {
  padding-top: 0.85rem;
  border-top: 2px solid var(--gold);
}

.rhythm dt {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--on-dark);
}

.rhythm dd {
  margin-top: 0.3rem;
  font-size: 1rem;
  color: var(--on-dark-muted);
}

.list-label {
  padding-top: 0.9rem;
  font-weight: 700;
  color: var(--on-dark);
}

.tick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.5rem;
  list-style: none;
  padding: 0;
  color: var(--on-dark-muted);
}

.tick-list li,
.shop-notes li {
  position: relative;
  padding-left: 1.6rem;
}

.tick-list li::before,
.shop-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 1rem;
  height: 0.6rem;
  background: var(--gold);
  -webkit-mask: var(--leaf-shape) center / contain no-repeat;
  mask: var(--leaf-shape) center / contain no-repeat;
}

.spread-dark .sheet-link {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22), 0 18px 34px -12px rgba(0, 0, 0, 0.55);
}

.spread-dark .sheet figcaption {
  color: var(--on-dark-muted);
}

.fit-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: clamp(3.5rem, 7vw, 5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line-dark);
}

.settings {
  --flow-space: 1.25rem;
}

.fit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
}

.fit-item dt {
  font-weight: 700;
  color: var(--on-dark);
}

.fit-item dd {
  margin-top: 0.2rem;
  color: var(--on-dark-muted);
}

.copies {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-m);
  background: var(--forest-tint);
  --flow-space: 0.5rem;
}

.copies p {
  color: var(--on-dark-muted);
}

.churches > .wrap > .actions {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.groups-fit .fit-grid {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.groups-fit .fit-item dt {
  color: var(--forest);
}

.groups-fit .fit-item dd {
  color: var(--muted);
}

.groups-fit .copies {
  background: var(--fill-sand) var(--sand);
}

.groups-fit .copies p {
  color: var(--muted);
}

.groups-fit > .wrap > .actions {
  margin-top: clamp(2.25rem, 4vw, 3rem);
}

/* home: the handbook and churches invitation */
.leaders-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.leaders-copy {
  --flow-space: 1.1rem;
}

.leaders-copy .lead {
  max-width: 34rem;
}

.leaders-copy > .actions {
  margin-top: 1.75rem;
}

.spread-single {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 300px);
  justify-self: center;
}

/* home: hear from the author */

.section.intro {
  padding-block: clamp(3rem, 2rem + 4vw, 4.75rem);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
}

.intro-copy {
  --flow-space: 0.9rem;
  max-width: 36rem;
}

.intro-copy p {
  color: var(--on-dark-muted);
}

.intro-copy p:last-child {
  padding-top: 0.25rem;
}

.intro-more {
  font-weight: 700;
}

.intro .video-card {
  width: 100%;
  max-width: none;
  border-color: transparent;
}

.intro .video-thumb {
  width: 6.5rem;
}

@media (max-width: 53.75em) {
  .intro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro .video-card {
    max-width: 30rem;
  }
}

@media (max-width: 53.75em) {
  .leaders-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .spread-single {
    width: min(100%, 250px);
    justify-self: start;
  }
}

@media (max-width: 60em) {
  .handbook-grid,
  .fit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .spread-dark {
    max-width: 34rem;
  }
}

@media (max-width: 53.75em) {
  .week-plan {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 35em) {
  .rhythm-list,
  .fit-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 26.25em) {
  .tick-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .week-day {
    font-size: 0.8125rem;
  }
}

/* shop */

.packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  list-style: none;
  padding: 0;
}

.pack {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--fill-paper) var(--paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pack.is-selected {
  border-color: var(--forest);
  box-shadow: 0 0 0 1px var(--forest), var(--shadow-soft);
}

.pack-books {
  display: flex;
  align-items: flex-end;
  height: 9rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--line);
}

.pack-books-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--w));
  gap: var(--gap, 3px);
}

.pack-book {
  width: var(--w);
  aspect-ratio: 1105 / 1430;
  border-radius: 1px 2px 2px 1px;
  background: url("../img/cover-128.webp") center / cover;
  box-shadow: 0 1px 1.5px rgba(37, 41, 31, 0.28);
}

.pack-name {
  font-size: 1.375rem;
}

.pack-count {
  margin-top: 0.2rem;
  font-weight: 700;
  color: var(--forest);
}

.pack-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.65rem;
  margin-top: 0.75rem;
}

.price {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 2.125rem;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}

.price-quote {
  font-size: 1.625rem;
}

.per {
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.pack .btn {
  width: 100%;
  margin-top: 1.25rem;
  align-self: end;
}

.pack-via {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

.shop-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2.5rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
  color: var(--muted);
  font-size: 1rem;
}

.shop-notes li::before {
  background: var(--leaf);
}

.noscript-note {
  padding: 1.25rem;
  border-radius: var(--radius-m);
  background: var(--fill-sand) var(--sand);
}

.order {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.order-how {
  --flow-space: 1.25rem;
}

.order-steps {
  display: grid;
  gap: 1.1rem;
  list-style: none;
  padding: 0;
  counter-reset: order;
}

.order-steps li {
  position: relative;
  padding-left: 3rem;
  color: var(--muted);
  counter-increment: order;
}

.order-steps li strong {
  color: var(--ink);
}

.order-steps li::before {
  content: counter(order);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--fill-sand) var(--sand);
  color: var(--forest);
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.125rem;
}

.email-route {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius-m);
  background: var(--fill-sand) var(--sand);
}

.email-route p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.email-text {
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.copy-status {
  min-height: 1.6em;
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--forest);
}

.on-dark .copy-status {
  color: var(--gold);
}

@media (max-width: 60em) {
  .packs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 35em) {
  .packs {
    grid-template-columns: minmax(0, 1fr);
  }

  .pack-books {
    height: 8rem;
  }
}

/* panels and forms */

.panel {
  padding: clamp(1.35rem, 3.5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--fill-paper) var(--paper);
  box-shadow: var(--shadow-soft);
}

.form-body {
  --flow-space: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  margin-inline: 0;
  padding: 0;
  border: 0;
}

.field-label {
  padding: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.optional {
  margin-left: 0.35rem;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1rem;
}

.field-row-3 {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
}

.input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--fill-white) var(--white);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.input:hover {
  border-color: var(--forest);
}

.input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--forest);
}

.input[aria-invalid="true"] {
  border-color: var(--error);
}

textarea.input {
  min-height: 6.5rem;
  resize: vertical;
}

select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background: var(--chevron) no-repeat right 0.85rem center / 1.1rem, var(--fill-white);
  cursor: pointer;
}

.field-error {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--error);
}

.field-note {
  margin-top: 0.35rem;
  font-size: var(--text-sm);
  color: var(--muted);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.choice,
.check {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  cursor: pointer;
}

.check {
  align-items: flex-start;
  min-height: 0;
  padding-block: 0.35rem;
  font-size: 1rem;
  color: var(--muted);
}

input[type="radio"],
input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  flex: none;
  accent-color: var(--forest);
}

.check input {
  margin-top: 0.2rem;
}

.pack-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.pack-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.15rem 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--fill-white) var(--white);
  cursor: pointer;
}

.pack-option input {
  margin-top: 0.2rem;
}

.pack-option:has(input:checked) {
  border-color: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
  background: var(--fill-cream) var(--cream);
}

.pack-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.pack-option-name {
  font-weight: 700;
}

.pack-option-meta {
  grid-column: 2;
  font-size: var(--text-sm);
  color: var(--muted);
}

.order-summary {
  min-height: 1.6em;
  font-weight: 700;
  color: var(--forest);
}

.form-fine {
  font-size: var(--text-sm);
  color: var(--muted);
}

.form-status {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-m);
  outline: none;
}

.form-status:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.form-status.is-success {
  background: var(--fill-success) var(--success-bg);
  color: var(--forest-deep);
}

.form-status.is-error {
  margin-top: 1.25rem;
  background: var(--fill-error) var(--error-bg);
  color: var(--ink);
}

.form-status > * + * {
  margin-top: 0.75rem;
}

.form-status h3,
.form-status h4 {
  font-size: 1.25rem;
}

.form-status .status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-status .preview-note {
  font-size: var(--text-sm);
  color: var(--muted);
}

form.is-sent .form-body {
  display: none;
}

@media (max-width: 35em) {
  .field-row,
  .pack-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-row-3 > .field:first-child {
    grid-column: 1 / -1;
  }
}

/* free resources */

.free-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.free-panel {
  display: grid;
  gap: 1.5rem;
  --flow-space: 0.75rem;
}

.free-panel p {
  color: var(--muted);
}

.sample {
  display: grid;
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.free-panel p.sample-title {
  font-weight: 700;
  color: var(--forest);
}

.sample-pages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem 0.65rem;
  list-style: none;
  padding: 0;
}

.sample-page {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.sample-thumb {
  position: relative;
  display: block;
  transition: transform 0.2s ease;
}

.sample-page img {
  width: 100%;
  border-radius: 2px;
  background: var(--fill-white) var(--white);
  box-shadow: var(--shadow-paper);
}

.sample-page:hover .sample-thumb {
  transform: translateY(-3px);
}

.sample-page:hover .sample-label {
  text-decoration: underline;
  text-decoration-color: var(--gold-deep);
}

@media (max-width: 30em) {
  .sample-pages {
    gap: 0.6rem 0.45rem;
  }

  .sample-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Chapter One email gate */

.free-panel .gate-form {
  padding-top: 0;
  border-top: 0;
}

.page-lock {
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--forest);
  color: var(--on-dark);
}

.page-lock svg {
  width: 0.85rem;
  height: 0.85rem;
}

.lock-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html.chapter-unlocked .page-lock,
html.chapter-unlocked .lock-text {
  display: none;
}

.gate-form .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 0.75rem;
}

@media (max-width: 30em) {
  .sample-page .page-lock {
    top: -0.3rem;
    right: -0.3rem;
    width: 1.2rem;
    height: 1.2rem;
    border-width: 1.5px;
  }

  .sample-page .page-lock svg {
    width: 0.62rem;
    height: 0.62rem;
  }
}

.mini-form {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.mini-form .form-body {
  --flow-space: 0.75rem;
}

.inline-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inline-input .input {
  flex: 1 1 14rem;
  width: auto;
}

.inline-input .btn {
  flex: 0 0 auto;
}

@media (max-width: 53.75em) {
  .free-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 30em) {
  .inline-input .btn {
    flex: 1 1 100%;
  }
}

/* about */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
}

.author-print {
  justify-self: center;
  width: min(100%, 400px);
  padding: 10px;
  border-radius: 4px;
  background: var(--fill-white) var(--white);
  box-shadow: var(--shadow-paper);
  transform: rotate(-1.4deg);
}

.author-print img {
  width: 100%;
  border-radius: 2px;
}

.about-copy {
  --flow-space: 1rem;
}

.about-copy > p {
  max-width: 36rem;
  color: var(--muted);
}

.about-copy > .video-card {
  margin-top: 1.5rem;
}

.about-copy > .prayer {
  margin-top: 2rem;
}

.about-copy > .actions {
  margin-top: 2rem;
}

.video-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: 30rem;
  padding: 0.75rem 1.25rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--fill-paper) var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  border-color: var(--forest);
  box-shadow: var(--shadow-soft);
}

.video-thumb {
  position: relative;
  flex: none;
  width: 6rem;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--sand);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--on-dark);
  box-shadow: 0 2px 8px rgba(20, 34, 22, 0.35);
}

.video-play svg {
  width: 1.15rem;
  height: 1.15rem;
}

.video-text {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.video-title {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.video-meta {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--forest);
}

.prayer {
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.prayer blockquote p {
  font-family: var(--font-book);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.05rem + 0.75vw, 1.625rem);
  line-height: 1.4;
  color: var(--forest-deep);
}

.prayer figcaption {
  font-size: var(--text-sm);
  color: var(--muted);
}

@media (max-width: 53.75em) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .author-print {
    width: min(80vw, 380px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .author-print {
    transform: none;
  }
}

/* faq */

.faq {
  padding-top: 0;
}

.faq-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: var(--section-pad);
}

.faq-grid::before,
.footer-fine::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

.faq-head p {
  color: var(--muted);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-child {
  border-top: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 1rem 3rem 1rem 0;
  font-family: var(--font-book);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: -0.675rem;
  background: var(--forest);
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item summary:hover {
  color: var(--forest);
}

.faq-answer {
  max-width: 40rem;
  padding: 0 0 1.5rem;
  color: var(--muted);
  --flow-space: 0.75rem;
}

.faq-open-top {
  padding-top: var(--section-pad);
}

.faq-open-top .faq-grid {
  padding-top: 0;
}

.faq-open-top .faq-grid::before {
  display: none;
}

@media (max-width: 53.75em) {
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lost {
  padding-block: var(--section-pad);
}

.lost-body {
  max-width: 36rem;
  min-height: 40vh;
  align-content: center;
  --flow-space: 1.25rem;
}

.lost-body p {
  color: var(--muted);
}

/* footer */

.site-footer {
  padding-block: clamp(3.5rem, 6vw, 5rem) 2.5rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}

.footer-brand p:not(.brand) {
  max-width: 18rem;
  color: var(--on-dark-muted);
}

.brand-footer {
  margin-right: 0;
}

.footer-col {
  --flow-space: 0.6rem;
}

.footer-heading {
  font-family: var(--font-guide);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0;
}

.footer-links {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
}

.site-footer a {
  overflow-wrap: anywhere;
}

.footer-fine {
  position: relative;
  display: grid;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
}

.footer-fine::before {
  border-top-color: var(--line-dark);
}

.footer-fine p {
  max-width: 62rem;
}

@media (max-width: 53.75em) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 30em) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-bottom: 0.5rem;
  padding: 0;
  list-style: none;
}

.footer-legal a {
  display: inline-block;
  padding-block: 0.3rem;
  font-weight: 600;
}

.footer-legal a[aria-current="page"] {
  color: var(--gold);
  text-decoration: none;
}

/* policy pages: privacy, accessibility, ordering */

.policy {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}

.policy-body {
  max-width: calc(38rem + 2 * var(--gutter));
  --flow-space: 1rem;
}

.policy-date {
  font-size: var(--text-sm);
  color: var(--muted);
}

.policy-body > h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.4375rem, 1.25rem + 0.8vw, 1.75rem);
  line-height: 1.2;
}

.policy-body ul,
.policy-body ol {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.35rem;
}

.policy-body li::marker {
  color: var(--leaf);
  font-weight: 700;
}

.policy-short {
  --flow-space: 0.75rem;
  margin-top: 2rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--fill-paper) var(--paper);
  box-shadow: var(--shadow-soft);
}

.policy-short h2 {
  font-size: 1.3125rem;
  line-height: 1.25;
}

/* order status page */

.order-status > .policy-short {
  margin-top: 1.75rem;
}

.order-status > .actions {
  margin-top: 1.75rem;
}

.order-facts {
  display: grid;
  gap: 0.65rem;
}

.order-facts div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
}

.order-facts dt {
  font-weight: 700;
  color: var(--forest);
}

.order-facts dd {
  margin: 0;
}

/* reader */

.reader {
  width: min(1040px, calc(100vw - 2rem));
  max-width: none;
  height: min(94vh, 1100px);
  height: min(94dvh, 1100px);
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--fill-cream) var(--cream);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(15, 25, 15, 0.6);
  overflow: hidden;
}

.reader::backdrop {
  background: rgba(20, 34, 22, 0.72);
}

.reader[open] {
  display: block;
}

.reader-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  height: 100%;
}

.reader-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.reader-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 1.125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reader-modes {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--fill-sand) var(--sand);
}

.mode-btn {
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}

.mode-btn[aria-pressed="true"] {
  background: var(--fill-paper) var(--paper);
  color: var(--forest);
  box-shadow: 0 1px 3px rgba(37, 41, 31, 0.18);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--fill-paper) var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-btn:hover {
  border-color: var(--forest);
}

.reader-stage {
  position: relative;
  display: grid;
  place-items: center;
  place-items: safe center;
  min-height: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  overflow: auto;
  background: var(--fill-sand) var(--sand);
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
}

.reader-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  background: var(--fill-white) var(--white);
  box-shadow: var(--shadow-paper);
  -webkit-user-select: none;
  user-select: none;
}

.reader-text {
  width: 100%;
  max-width: 40rem;
  align-self: start;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 4px;
  background: var(--fill-paper) var(--paper);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-book);
  font-size: 1.1875rem;
  line-height: 1.7;
}

.reader-text h3 {
  font-size: 1.375rem;
  margin: 1.25rem 0 0.5rem;
}

.reader-text h3:first-child {
  margin-top: 0;
}

.reader-text p + p {
  margin-top: 0.85rem;
}

.reader-text ul {
  margin: 0.5rem 0 0.85rem;
  padding-left: 1.25rem;
}

.reader-text li + li {
  margin-top: 0.35rem;
}

.reader-text .toc {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
}

.reader-text .toc-title {
  display: block;
  font-weight: 600;
}

.reader-text .toc-theme {
  display: block;
  font-size: 1rem;
  color: var(--muted);
}

.reader-stage:not(.is-text) .reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.reader-stage.is-text {
  place-items: start center;
}

.reader-stage.is-text .reader-img {
  display: none;
}

.reader-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--line);
}

.reader-count {
  display: grid;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
}

.reader-count span {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.reader-controls .btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.reader-thumbs {
  position: relative;
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
}

.thumb {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  width: 5.75rem;
  padding: 0.4rem 0.25rem 0.3rem;
  border: 2px solid transparent;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.thumb-img {
  position: relative;
  display: block;
  width: 2.9rem;
}

.thumb img {
  width: 2.9rem;
  border-radius: 1px;
  background: var(--fill-white) var(--white);
  box-shadow: 0 1px 3px rgba(37, 41, 31, 0.3);
}

.thumb .page-lock {
  top: -0.3rem;
  right: -0.55rem;
  width: 1.35rem;
  height: 1.35rem;
}

.thumb .page-lock svg {
  width: 0.7rem;
  height: 0.7rem;
}

.thumb:hover {
  color: var(--ink);
}

.thumb[aria-current="page"] {
  border-color: var(--forest);
  background: var(--fill-paper) var(--paper);
  color: var(--ink);
}

.reader-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.6rem 1.25rem 0.85rem;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  font-weight: 700;
}

.reader-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.reader-status {
  flex: 1 1 100%;
  padding-top: 0.35rem;
  color: var(--forest);
}

.reader-status:empty {
  display: none;
}

.reader-lock {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 36rem);
  padding: clamp(0.5rem, 2vw, 1.25rem);
  overflow: hidden;
  border-radius: 4px;
  background: var(--fill-white) var(--white);
  box-shadow: var(--shadow-paper);
}

.reader-lock-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  opacity: 0.55;
  transform: scale(1.06);
  pointer-events: none;
}

.reader-lock-card {
  --flow-space: 0.6rem;
  position: relative;
  width: 100%;
  max-width: 25rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  border-radius: var(--radius-m);
  background: var(--fill-paper) var(--paper);
  box-shadow: var(--shadow-book);
}

.reader-lock-title {
  font-size: 1.375rem;
}

.reader-lock-card > p {
  color: var(--muted);
}

.reader-lock .gate-form {
  margin-top: 0.85rem;
}

.reader-lock .form-body {
  --flow-space: 0.75rem;
}

/* on short screens, a locked page gets the thumbnail strip's room for the form */
@media (max-height: 44em) {
  .reader.is-locked .reader-thumbs,
  .reader-lock-card > p {
    display: none;
  }
}

html.reader-open {
  overflow: hidden;
}

@media (max-width: 40em) {
  .reader {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    max-width: 100vw;
    max-height: 100dvh;
  }

  .reader-shell {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .reader-title {
    font-size: 1rem;
  }

  .reader-top {
    padding-left: 1rem;
  }

  .reader-controls .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .reader-controls .btn {
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
  }

  .reader-foot {
    gap: 0 1.1rem;
    padding-inline: 1rem;
  }
}

/* video dialog */

.zoom.video-dialog {
  width: fit-content;
  max-width: calc(100vw - 2rem);
  height: fit-content;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  border-radius: var(--radius-m);
}

.video-stage {
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: var(--forest-deep);
}

/* exact 9:16, sized to fit both the screen width and its height */
.video-frame {
  width: min(calc(100vw - 4rem), calc((100vh - 9rem) * 0.5625), 427px);
  width: min(calc(100vw - 4rem), calc((100dvh - 9rem) * 0.5625), 427px);
  aspect-ratio: 9 / 16;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--forest-deep);
}

/* enlarged handbook page */

.zoom {
  width: min(900px, calc(100vw - 2rem));
  max-width: none;
  height: min(94vh, 1180px);
  height: min(94dvh, 1180px);
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--fill-cream) var(--cream);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(15, 25, 15, 0.6);
  overflow: hidden;
}

.zoom::backdrop {
  background: rgba(20, 34, 22, 0.72);
}

.zoom-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.zoom-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.zoom-title {
  flex: 1;
  min-width: 0;
  font-size: 1.125rem;
}

.zoom-stage {
  overflow: auto;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: var(--fill-sand) var(--sand);
  overscroll-behavior: contain;
}

.zoom-stage img {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  background: var(--fill-white) var(--white);
  box-shadow: var(--shadow-paper);
}

@media (max-width: 40em) {
  .zoom {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .zoom-shell {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sheet-link,
  .faq-item summary::after {
    transition: none;
  }

  .sheet-story .sheet-link,
  .sheet-talk .sheet-link,
  .sheet-link:hover {
    transform: none;
  }
}

/* print */

@media print {
  .site-header,
  .reader,
  .order-form,
  .mini-form,
  .panel-form {
    display: none !important;
  }

  .surface-forest,
  .surface-deep {
    background: none;
    color: var(--ink);
  }
}
