/* Growing in the Secret Place: styled after the printed journal.
   Warm grey paper, a charcoal side band, script accents, serif body,
   wide-spaced capitals, black blessing pages. */

:root {
  --page: #F3F1ED;
  --paper: #FBFAF8;
  --paper-2: #EEEBE6;
  --ink: #232021;
  --muted: #6B6462;
  --band: #403B3D;
  --band-ink: #F3F1ED;
  --rule: #DCD6CF;
  --accent: #A3907C;
  --night: #0F0E0E;
  --night-ink: #F6F3EF;
  --focus: #8A6F55;
  --danger: #8E3B30;
  --lines: rgba(64, 59, 61, .13);
  --shadow: 0 1px 2px rgba(35, 32, 33, .06), 0 8px 28px rgba(35, 32, 33, .07);

  --script: "Mrs Saint Delafield", "Great Vibes", cursive;
  --script-soft: "Great Vibes", cursive;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --caps: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
  --narrow: "Archivo Narrow", "Arial Narrow", sans-serif;

  --radius: 10px;
  --col: 720px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #1B1918;
    --paper: #24211F;
    --paper-2: #2C2826;
    --ink: #EEE9E3;
    --muted: #B3AAA3;
    --band: #0F0E0E;
    --band-ink: #EEE9E3;
    --rule: #3A3532;
    --accent: #C2AE98;
    --night: #0B0A0A;
    --lines: rgba(238, 233, 227, .10);
    --focus: #C2AE98;
    --danger: #E08A7C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #1B1918; --paper: #24211F; --paper-2: #2C2826; --ink: #EEE9E3; --muted: #B3AAA3;
  --band: #0F0E0E; --band-ink: #EEE9E3; --rule: #3A3532; --accent: #C2AE98; --night: #0B0A0A;
  --lines: rgba(238, 233, 227, .10); --focus: #C2AE98; --danger: #E08A7C; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type helpers ---------- */
.caps { font-family: var(--caps); text-transform: uppercase; letter-spacing: .32em; font-weight: 600; font-size: .78rem; }
.script { font-family: var(--script); font-weight: 400; line-height: 1; }
.script-soft { font-family: var(--script-soft); font-weight: 400; line-height: 1; }
.muted { color: var(--muted); }
p { margin: 0 0 1em; }

/* Script word sitting over a serif italic phrase, like "Baby this week" */
.duo { display: flex; align-items: flex-end; gap: .1em; margin: 0 0 1rem; font-weight: 400; }
.duo .script { font-size: 3.1rem; transform: rotate(-8deg) translateY(-.15em); margin-right: -.05em; }
.duo .tail { font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1.1; }
.duo .tail.caps { font-style: normal; font-size: .95rem; letter-spacing: .35em; font-weight: 700; padding-bottom: .4em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .7em 1.4em; border-radius: 999px;
  border: 1px solid var(--band); background: var(--band); color: var(--band-ink);
  font-family: var(--caps); text-transform: uppercase; letter-spacing: .2em; font-size: .74rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: opacity .2s ease, background .2s ease;
}
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.small { min-height: 36px; padding: .45em 1em; font-size: .68rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--muted); font-size: .95rem; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.wordmark { text-decoration: none; display: flex; align-items: baseline; gap: .35em; white-space: nowrap; }
.wordmark .script-soft { font-size: 1.7rem; }
.wordmark .caps { font-size: .6rem; letter-spacing: .28em; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  font-family: var(--caps); text-transform: uppercase; letter-spacing: .18em; font-size: .66rem; font-weight: 700;
  text-decoration: none; padding: 10px 10px; border-radius: 8px; color: var(--muted);
}
.topnav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
@media (max-width: 640px) {
  .topbar { flex-direction: column; gap: 2px; padding-top: 6px; padding-bottom: 4px; }
  .wordmark .script-soft { font-size: 1.45rem; }
  .topnav a { padding: 8px 9px; letter-spacing: .14em; }
}

.demo-banner { background: var(--paper-2); color: var(--muted); font-family: var(--caps); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; text-align: center; padding: 6px 16px; }

/* ---------- generic page column ---------- */
main { display: block; }
.wrap { max-width: var(--col); margin: 0 auto; padding: 32px 16px 96px; }
.wrap.wide { max-width: 1040px; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--page); }
.signin-cover { background: #8a7a6c url("cover.jpg") center/cover no-repeat; min-height: 100vh; }
.signin-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(16px, 6vw, 80px); max-width: 560px; }
.signin-panel h1 { font-weight: 400; font-size: 2.4rem; line-height: 1.15; margin: .4em 0 .3em; }
.signin-panel h1 em { font-family: var(--script-soft); font-style: normal; font-size: 1.35em; }
.field { display: grid; gap: 6px; margin: 18px 0; }
.field label { font-family: var(--caps); text-transform: uppercase; letter-spacing: .2em; font-size: .68rem; font-weight: 700; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--paper); font-size: 1rem;
}
.code-input { letter-spacing: .5em; font-size: 1.4rem !important; text-align: center; }
.form-note { font-size: .92rem; color: var(--muted); }
.form-error { color: var(--danger); font-size: .95rem; }
@media (max-width: 820px) {
  .signin { grid-template-columns: 1fr; }
  .signin-cover { min-height: 46vh; background-position: center 40%; }
  .signin-panel { padding-top: 28px; }
}

/* ---------- home ---------- */
.hello { text-align: center; padding: 24px 0 8px; }
.hello .script-soft { font-size: 3.2rem; display: block; }
.hello h1 { font-weight: 400; font-size: 1.15rem; margin: .6em 0 0; color: var(--muted); }
.now-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  background: var(--band); color: var(--band-ink); border-radius: var(--radius);
  padding: 26px 28px; margin: 28px 0 8px; text-decoration: none; box-shadow: var(--shadow);
}
.now-card .script { font-size: 3rem; display: block; margin: .1em 0 .15em; }
.now-card p { margin: 0; opacity: .85; font-size: 1rem; }
.now-card .btn { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
@media (max-width: 560px) { .now-card { grid-template-columns: 1fr; } }

.duebox { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; }
.duebox form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.duebox .field { margin: 0; flex: 1 1 180px; }

.trimester { margin: 40px 0 0; }
.trimester h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.trimester h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.week-tile {
  position: relative; display: block; text-decoration: none;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px 14px 12px; min-height: 108px; transition: transform .25s ease, box-shadow .25s ease;
}
.week-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.week-tile .script-soft { font-size: 1.9rem; display: block; }
.week-tile .size { font-size: .88rem; color: var(--muted); font-style: italic; line-height: 1.3; display: block; margin-top: 6px; }
.week-tile .state { display: block; margin-top: 8px; font-family: var(--caps); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.week-tile.done { background: var(--band); color: var(--band-ink); border-color: var(--band); }
.week-tile.done .size, .week-tile.done .state { color: var(--band-ink); opacity: .8; }
.week-tile.current { outline: 2px solid var(--accent); outline-offset: 2px; }
.extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 40px; }
.extra-tile { display: block; text-decoration: none; padding: 18px; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--paper); }
.extra-tile .script-soft { font-size: 2rem; display: block; }
.extra-tile span:last-child { color: var(--muted); font-size: .92rem; }

/* ---------- week layout ---------- */
.week { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.band { background: var(--band); color: var(--band-ink); position: relative; }
.band-label { position: sticky; top: 50vh; display: flex; justify-content: center; }
.band-label span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.band-label .script { font-size: 2.2rem; }
.band-label .caps { font-size: .7rem; margin-top: .8em; }
.week-main { min-width: 0; }
@media (max-width: 760px) {
  .week { grid-template-columns: 1fr; }
  .band { display: none; }
}

.week-head { max-width: var(--col); margin: 0 auto; padding: 22px 16px 0; text-align: center; }
.week-head .script { font-size: 3.6rem; display: inline-block; padding: 0 .3em; background: linear-gradient(transparent 30%, var(--paper-2) 30%, var(--paper-2) 85%, transparent 85%); }
.stepper { display: flex; gap: 6px; overflow-x: auto; padding: 14px 16px 10px; margin: 0 auto; max-width: calc(var(--col) + 32px); scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper a {
  flex: 0 0 auto; text-decoration: none; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--rule);
  font-family: var(--caps); text-transform: uppercase; letter-spacing: .16em; font-size: .62rem; font-weight: 700; color: var(--muted); background: var(--paper);
}
.stepper a[aria-current="step"] { background: var(--band); color: var(--band-ink); border-color: var(--band); }
.stepper a.has-words::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }

.sheet { max-width: var(--col); margin: 0 auto; padding: 18px 16px 40px; }
.sheet > section { animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.paper { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 5vw, 44px); }
.paper + .paper { margin-top: 18px; }
.paper h2, .paper h3 { margin-top: 0; }
.grey-band { background: var(--paper-2); border-radius: var(--radius); padding: 22px clamp(18px, 4vw, 30px); margin-top: 18px; }
.prompt-line { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.prompt-line .script { font-size: 2.3rem; white-space: nowrap; }
.prompt-line p { font-style: italic; margin: .35em 0 0; font-size: 1.08rem; }
@media (max-width: 520px) { .prompt-line { grid-template-columns: 1fr; gap: 4px; } }

.sheet-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.sheet-nav .btn { flex: 0 1 auto; }

/* Scripture cover */
.scripture {
  position: relative; overflow: hidden; border-radius: var(--radius); min-height: min(78vh, 680px);
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(26px, 6vw, 56px);
  color: #fff; background: #2b2829;
}
.scripture::before {
  content: ""; position: absolute; inset: 0; background: url("scripture.jpg") 40% center/cover;
  filter: grayscale(1) brightness(.55) contrast(1.05); transform: scale(1.04);
}
.scripture > * { position: relative; }
.scripture .ref { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2.2rem, 7vw, 3.6rem); letter-spacing: -.035em; line-height: 1; margin: 0 0 .5em; }
.scripture blockquote { margin: 0; font-family: var(--narrow); font-weight: 600; text-transform: uppercase; font-size: clamp(1.05rem, 3.4vw, 1.4rem); line-height: 1.32; max-width: 26ch; }
.scripture .wk { align-self: flex-end; font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.04em; }

/* Baby this week */
.bullets { padding-left: 1.2em; margin: 0 0 1em; }
.bullets li { margin: .2em 0; }

/* Prayers */
.prayer + .prayer { margin-top: 36px; }
.prayer .amen { font-family: var(--script); font-size: 2rem; text-align: right; margin: .3em 0 0; }

/* Reflection */
.refl-group { margin-top: 26px; }
.refl-group > h3 { font-weight: 400; font-style: italic; font-size: 1rem; color: var(--muted); margin: 0 0 4px; }
.refl-group .q { margin: 0 0 8px; }
.refl-group .entry + .q { margin-top: 18px; }

/* Secret place */
.secret-steps p { margin: 0 0 .8em; }
.secret-steps .pray-quote { font-style: italic; border-left: 2px solid var(--accent); padding-left: 14px; }
.torn {
  margin-top: 22px; padding: 26px 22px 40px; background: #fff;
  background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 4px 4px;
  clip-path: polygon(0 3%, 6% 0, 13% 2.4%, 22% .4%, 31% 2.8%, 42% .6%, 53% 2.6%, 64% .2%, 74% 2.2%, 85% .4%, 94% 2.6%, 100% 1%, 100% 97%, 92% 100%, 83% 97.6%, 71% 99.6%, 60% 97.4%, 48% 99.4%, 37% 97.2%, 25% 99.8%, 14% 97.6%, 5% 99.6%, 0 97.8%);
}
:root[data-theme="dark"] .torn { background-color: #2c2826; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .torn { background-color: #2c2826; } }

/* Letter + legacy page */
.letter .opening { font-family: var(--script-soft); font-size: 2.6rem; margin: 0 0 .3em; line-height: 1.1; }
.legacy {
  margin-top: 22px; padding: clamp(26px, 6vw, 52px) clamp(18px, 5vw, 46px);
  background: #F7F3EC; color: #2a2624; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(120,100,80,.12), 0 14px 40px rgba(60,45,30,.14);
  clip-path: polygon(0 1%, 3% 0, 8% .7%, 15% 0, 23% .8%, 31% .1%, 40% .9%, 49% .2%, 58% .8%, 67% 0, 76% .9%, 85% .2%, 93% .8%, 100% .3%, 99.6% 10%, 100% 22%, 99.5% 35%, 100% 49%, 99.6% 62%, 100% 76%, 99.5% 88%, 100% 99.3%, 94% 100%, 86% 99.2%, 77% 100%, 68% 99.3%, 58% 100%, 49% 99.2%, 39% 100%, 30% 99.3%, 21% 100%, 12% 99.2%, 4% 100%, 0 99.4%, .5% 88%, 0 74%, .4% 61%, 0 47%, .5% 33%, 0 19%, .4% 8%);
}
.legacy h3 { text-align: center; margin: 0; font-family: var(--script-soft); font-weight: 400; font-size: 4rem; line-height: 1.1; }
.ornament { display: flex; justify-content: center; margin: 2px 0 12px; color: #A3907C; }
.legacy .tagline { text-align: center; font-family: var(--script); font-size: 1.7rem; line-height: 1.2; margin: 0 0 18px; }
.legacy .entry textarea { background-color: transparent; color: #2a2624; }

/* Memories */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 22px; }
.polaroid { background: #fff; padding: 10px 10px 8px; border-radius: 3px; box-shadow: var(--shadow); transform: rotate(var(--tilt, 0deg)); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); }
.polaroid input { width: 100%; border: 0; border-bottom: 1px dashed #d8d1c8; background: transparent; padding: 8px 2px 4px; font-family: var(--script-soft); font-size: 1.35rem; color: #2a2624; }
.polaroid input:focus { outline: none; border-bottom-color: #A3907C; }
.polaroid .remove { display: block; margin: 6px 0 0 auto; font-size: .78rem; color: #8a817a; }
.upload-zone {
  display: grid; place-items: center; text-align: center; gap: 8px; padding: 28px 18px; margin-top: 18px;
  border: 1.5px dashed var(--rule); border-radius: var(--radius); background: var(--paper);
}
.upload-zone.drag { border-color: var(--accent); background: var(--paper-2); }
.upload-zone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Blessing (black page) */
.blessing { background: var(--night); color: var(--night-ink); border-radius: var(--radius); padding: clamp(36px, 8vw, 72px) clamp(20px, 6vw, 60px); text-align: center; }
.blessing-title { display: inline-flex; align-items: center; gap: 18px; margin: 0 0 30px; font-weight: 400; }
.blessing-title .script { font-size: clamp(3.4rem, 10vw, 4.6rem); line-height: 1.15; }
.blessing-title .caps { font-size: .95rem; letter-spacing: .42em; line-height: 1.6; text-align: left; max-width: 7.5em; }
.blessing .subtitle { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: -10px 0 26px; opacity: .9; }
.blessing .poem p { font-family: var(--caps); font-size: 1.05rem; line-height: 1.7; margin: 0 auto 1.05em; max-width: 30ch; letter-spacing: .02em; }
.complete-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.blessing .btn.ghost { color: var(--night-ink); border-color: rgba(255,255,255,.3); }
.blessing .btn:not(.ghost) { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }

/* ---------- journal entry (textarea + voice) ---------- */
.entry { position: relative; margin-top: 10px; }
.entry textarea {
  display: block; width: 100%; min-height: 150px; resize: none; overflow: hidden;
  border: 0; border-radius: 6px; padding: 6px 4px 40px;
  background-color: transparent;
  background-image: repeating-linear-gradient(transparent 0, transparent 31px, var(--lines) 31px, var(--lines) 32px);
  background-attachment: local;
  line-height: 32px; font-size: 1.05rem; font-family: var(--serif);
}
.entry textarea:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 40%, transparent); }
.entry.tall textarea { min-height: 320px; }
.entry-tools { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 4px; min-height: 36px; }
.save-state { font-family: var(--caps); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.mic {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); cursor: pointer;
  font-family: var(--caps); text-transform: uppercase; letter-spacing: .16em; font-size: .62rem; font-weight: 700;
}
.mic[aria-pressed="true"] { background: var(--band); color: var(--band-ink); border-color: var(--band); }
.mic[aria-pressed="true"] .dot { animation: pulse 1.4s ease-in-out infinite; }
.mic .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
@keyframes pulse { 50% { opacity: .25; } }
.interim { font-style: italic; color: var(--muted); font-size: .95rem; min-height: 1.2em; margin: 2px 4px 0; }

/* ---------- reading pages (welcome, how-to, congratulations) ---------- */
.reading h1 { font-weight: 400; text-align: center; margin: 10px 0 24px; }
.reading h1 .script-soft { font-size: 3.6rem; display: block; }
.signature { font-family: var(--script-soft); font-size: 2.3rem; margin: 20px 0 0; }

/* ---------- birth ---------- */
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; }
.details-grid .field { margin: 10px 0; }
.details-grid input { background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding-left: 2px; }

/* ---------- legacy book ---------- */
.book-week { break-inside: avoid-page; margin: 0 0 48px; }
.book-week h2 { font-family: var(--script-soft); font-weight: 400; font-size: 2.8rem; margin: 0; }
.book-week .ref { font-style: italic; color: var(--muted); margin: 0 0 16px; }
.book-q { font-style: italic; color: var(--muted); margin: 16px 0 4px; font-size: .95rem; }
.book-a { white-space: pre-wrap; margin: 0; }
.book-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.book-photos figure { margin: 0; }
.book-photos figcaption { font-family: var(--script-soft); font-size: 1.2rem; text-align: center; }
.book-cover { text-align: center; padding: 40px 0 60px; }
.book-cover .script-soft { font-size: 4rem; display: block; line-height: 1.1; }

@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; color: #111; font-size: 12pt; }
  .topbar, .demo-banner, .no-print, #toast { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .paper { box-shadow: none; padding: 0; }
  .book-week { page-break-before: always; }
}

/* ---------- misc ---------- */
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); font-style: italic; }
#toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--band); color: var(--band-ink); padding: 10px 18px; border-radius: 999px; font-size: .95rem;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; z-index: 60; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 16px 40px; line-height: 1.5; }
.footer p { max-width: 640px; margin: 0 auto .6em; }

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

/* Dark mode: keep main buttons light so they stand out */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn:not(.ghost) { background: var(--ink); color: var(--page); border-color: var(--ink); }
}
:root[data-theme="dark"] .btn:not(.ghost) { background: var(--ink); color: var(--page); border-color: var(--ink); }

/* ---------- sales page ---------- */
.sales { overflow-x: hidden; }
.sales h2 { font-weight: 400; font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.15; text-align: center; margin: 0 0 14px; }
.sales h2 em, .sales h1 em { font-style: italic; color: var(--accent); }
.sales-hero {
  max-width: 1080px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) 16px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 64px); align-items: center;
}
.sales-hero h1 { font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; margin: 14px 0 18px; letter-spacing: -.01em; }
.sales-hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.sales-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 10px; }
.sales-cover img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 20px 50px rgba(35, 32, 33, .22); transform: rotate(1.2deg); }
@media (max-width: 820px) {
  .sales-hero { grid-template-columns: 1fr; text-align: center; }
  .sales-hero .lede { margin: 0 auto; }
  .sales-ctas { justify-content: center; }
  .sales-cover { order: -1; max-width: 300px; margin: 0 auto; }
}
.sales-band { background: var(--band); color: var(--band-ink); text-align: center; padding: 44px 16px; }
.sales-quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 4.5vw, 2.2rem); margin: 0 0 10px; }
.sales-band .caps { font-size: .7rem; opacity: .8; margin: 0; }
.sales-section { max-width: 820px; margin: 0 auto; padding: clamp(44px, 8vw, 80px) 16px 0; }
.rhythm { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.rhythm li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.rhythm .num { font-family: var(--script-soft); font-size: 2.2rem; line-height: 1; color: var(--accent); text-align: center; }
.rhythm h3, .feature h3 { font-family: var(--caps); text-transform: uppercase; letter-spacing: .2em; font-size: .74rem; font-weight: 700; margin: 4px 0 6px; }
.rhythm p, .feature p { margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 28px; }
.feature { background: var(--paper); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sales-legacy .legacy { max-width: 640px; margin: 0 auto; }
.legacy-quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; text-align: center; margin: 0 auto 8px; max-width: 32em; }
.sales-legacy .signature { text-align: center; color: #2a2624; }
.sales-about p { font-size: 1.08rem; }
.price-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(24px, 5vw, 40px); text-align: center; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; }
.price { font-family: var(--serif); font-size: 3.4rem; margin: 6px 0 12px; line-height: 1; }
.price span { font-size: 1rem; color: var(--muted); font-style: italic; }
.price-card ul { text-align: left; margin: 0 auto 22px; padding: 0; list-style: none; max-width: 340px; }
.price-card li { padding: 7px 0 7px 26px; border-bottom: 1px solid var(--rule); position: relative; }
.price-card li::before { content: "♡"; position: absolute; left: 2px; color: var(--accent); }
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 4px; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.sales-final { padding-bottom: 20px; }
