/* 7 Silent Risks. One sheet of the cover's white paper from top to bottom;
   colours sampled from the cover (ART-DIRECTION.md). Green is for the reader's
   actions and ticks; the cover's red is kept for the title and a few words. */
@font-face { font-family: "EB Garamond"; src: url(/assets/fonts/eb-garamond.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(/assets/fonts/eb-garamond-italic.woff2) format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/assets/fonts/source-sans-3.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/assets/fonts/source-sans-3-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --paper: #f5f5f5; --ink: #282828; --soft: #5f5f5f; --rule: #d9d6d2;
  --red: #a8260c; --orange: #d75a20; --green: #5e6a2a; --green-dark: #4a5420; --leaf: #e7ead9;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.55 var(--sans); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.005em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
p { margin: 0; }
a { color: inherit; }
.red { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1120px, 100% - var(--pad) * 2); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Placeholders look like placeholders, in the page's own type. */
.ph {
  display: inline-block; padding: 0.1em 0.55em; border: 1px dashed #9a9a9a; border-radius: 4px;
  font: 500 0.8rem/1.5 var(--sans); letter-spacing: 0.02em; color: var(--soft); background: #ffffff80; vertical-align: middle;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.7rem 1.5rem;
  border: 1.5px solid var(--green); border-radius: 999px; background: var(--green); color: #fff;
  font: 600 1rem/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: scale(0.97); }
.btn-line { background: transparent; color: var(--green); }
.btn-line:hover { background: var(--leaf); }
.quiet-link { color: var(--ink); font-weight: 600; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.quiet-link:hover { color: var(--green); }

.buy-pill {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); z-index: 40;
  padding: 0.55rem 1.05rem; border-radius: 999px; background: var(--green); color: #fff; text-decoration: none;
  font: 600 0.9rem/1 var(--sans); box-shadow: 0 6px 18px #28282822; transition: opacity .3s, transform .3s;
}
.js .buy-pill { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.js.show-pill .buy-pill { opacity: 1; transform: none; pointer-events: auto; }

/* The ink pen: circles and ticks are drawn by moving the dash offset. */
.pen { fill: none; stroke: var(--ink); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.motion .pen:not(.drawn) { stroke-dashoffset: 1; }
.motion .pen.draw { stroke-dashoffset: 0; transition: stroke-dashoffset .85s cubic-bezier(.55,.1,.3,1); }

/* 1. The promise */
.promise {
  min-height: 100svh; display: grid; grid-template-columns: 1.08fr 0.92fr; align-items: center; gap: 2vw;
  padding: clamp(48px, 9vh, 96px) var(--pad) clamp(40px, 6vh, 72px); max-width: 1440px; margin-inline: auto;
}
.promise h1 { display: flex; flex-direction: column; gap: clamp(18px, 3vh, 30px); }
.title { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 500; color: var(--red); display: flex; align-items: baseline; gap: 0.18em; }
.seven { color: var(--ink); font-weight: 800; font-size: 1.5em; line-height: 0.8; }
.headline { font-size: clamp(2.5rem, 4.6vw, 4.4rem); line-height: 1.04; color: var(--ink); max-width: 13.5em; }
.key { position: relative; white-space: nowrap; font-size: 1.12em; font-style: italic; }
.underline { position: absolute; left: 0; right: 0; bottom: -0.12em; width: 100%; height: 0.2em; overflow: visible; }
.underline path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 1; }
.motion .underline path { stroke-dashoffset: 1; }
.motion .underline.draw path { stroke-dashoffset: 0; transition: stroke-dashoffset .6s ease-out; }
.byline { margin-top: clamp(20px, 3.5vh, 34px); font: 600 1.2rem/1.4 var(--sans); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions { margin-top: clamp(20px, 3.5vh, 32px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.proof-line { margin-top: clamp(18px, 3vh, 28px); }

.book-stage { position: relative; margin: 0; width: 100%; height: min(84svh, 760px); }
.book-stage .cover-box {
  position: absolute; left: 50%; top: 50%; height: 74%; width: auto; aspect-ratio: 2 / 3; transform: translate(-50%, -50%);
  box-shadow: 0 30px 50px -28px #28282866;
}
.book-stage svg.cover-box { box-shadow: none; overflow: visible; z-index: 2; pointer-events: none; }
#hero-book { will-change: transform, opacity; }
/* The cover is white on the page's white, so the 3D book carries its own soft shadow. */
.book-stage canvas { filter: drop-shadow(0 26px 30px #2828282e) drop-shadow(0 2px 3px #28282824); }

/* The apple that travels from the cover into the check-up. */
.traveler { display: none; }
.motion .traveler {
  display: block; position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none;
  transform-origin: 0 0; will-change: transform, opacity; aspect-ratio: 1040 / 1000;
}
.traveler img, .apple-slot img { width: 100%; height: auto; }
.traveler svg, .apple-slot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.traveler .pen, .apple-slot .pen { stroke-width: 6; }
.apple-slot { position: relative; aspect-ratio: 1040 / 1000; }
.motion .apple-slot:not(.own) > * { visibility: hidden; }

/* 2. The problem */
.problem {
  display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 4vw;
  min-height: 82svh; padding: 4vh var(--pad); max-width: 1320px; margin-inline: auto;
}
.problem .apple-slot { width: min(100%, 520px); justify-self: center; }
.problem-lines { display: grid; gap: clamp(14px, 2.4vh, 24px); }
.problem .line { font: 500 clamp(2.1rem, 3.6vw, 3.3rem)/1.1 var(--serif); }
.problem .line strong { font-weight: 600; font-size: 1.12em; }
.problem .line.small { font: 400 clamp(1.15rem, 1.6vw, 1.4rem)/1.45 var(--sans); max-width: 26em; margin-top: 6px; }
.problem .line.small strong { font-weight: 600; font-size: 1em; }

/* 3. The quiet check-up */
.checkup { position: relative; }
.checkup-stage {
  display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 4vw;
  padding: 6vh var(--pad); max-width: 1320px; margin-inline: auto;
}
.checkup .apple-slot { width: min(100%, 400px); justify-self: center; }
.checkup-panel header { display: grid; gap: 6px; margin-bottom: 14px; }
.checkup-panel header p { color: var(--soft); font-size: 1.1rem; }
.skip-check { justify-self: start; font-size: 0.9rem; color: var(--soft); text-underline-offset: 4px; }
.risks { display: grid; }
.risk {
  border: 0; border-top: 1px solid var(--rule); margin: 0; padding: 11px 0; min-width: 0;
  display: flex; align-items: center; gap: 16px;
}
.risk:last-child { border-bottom: 1px solid var(--rule); }
.risk legend { float: left; display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; flex: 1; padding: 0; min-width: 0; }
.box { grid-row: span 2; width: 24px; height: 24px; margin-top: 3px; border: 1.5px solid var(--ink); border-radius: 3px; }
.box svg { width: 100%; height: 100%; overflow: visible; }
.box path { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset .35s ease-out; }
.risk:has(input[value="yes"]:checked) .box path { stroke-dashoffset: 0; }
.name { font: 600 1.3rem/1.2 var(--serif); }
.q { font-size: 0.95rem; line-height: 1.35; color: var(--soft); }
.risk label { position: relative; flex: none; }
.risk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.risk label span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.35rem 0.85rem; border-radius: 999px;
  border: 1.5px solid #bdbab5; font: 600 0.88rem/1.1 var(--sans); white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s;
}
.risk input:hover + span { border-color: var(--green); }
.risk input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.risk input[value="yes"]:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.risk input[value="no"]:checked + span { background: #e6e4e0; border-color: #e6e4e0; }
.result { margin-top: 16px; display: grid; gap: 6px; }
.tally { font: 500 1.25rem/1.35 var(--serif); }
.tally strong { font-weight: 700; color: var(--green); }
.small-print { font-size: 0.88rem; color: var(--soft); }

/* Pinned only on wide, tall screens with motion on (script.js uses the same test). */
@media (min-width: 1000px) and (min-height: 680px) {
  .motion .checkup { height: 340svh; }
  .motion .checkup-stage { position: sticky; top: 0; height: 100svh; padding-block: 3vh; }
  .motion .checkup .risk { opacity: 0.22; transform: translateY(10px); transition: opacity .45s, transform .45s; }
  .motion .checkup .risk.in { opacity: 1; transform: none; }
  .motion .checkup .result { opacity: 0; transition: opacity .6s; }
  .motion .checkup .result.in { opacity: 1; }
}
@media (min-width: 1000px) and (max-height: 820px) {
  .risk { padding-block: 7px; }
  .name { font-size: 1.18rem; }
  .q { font-size: 0.88rem; }
  .checkup-panel h2 { font-size: 2.2rem; }
}

/* Phones and tablets: no pin; the rows play in once as the list comes into view. */
@media (max-width: 999px), (max-height: 679px) {
  .motion .checkup .risk { opacity: 0; transform: translateY(12px); transition: opacity .45s, transform .45s; }
  .motion .checkup .risk.in { opacity: 1; transform: none; }
  .motion .checkup .result { opacity: 0; transition: opacity .6s; }
  .motion .checkup .result.in { opacity: 1; }
}
/* Before the 3D book is ready the hero waits on blank paper, then the book turns in. */
.motion #hero-book:not(.flat) img.cover-box { opacity: 0; }

/* Plain fade the first time something is seen. */
.motion .fade { opacity: 0; transform: translateY(14px); transition: opacity .7s ease-out, transform .7s ease-out; }
.motion .fade.in { opacity: 1; transform: none; }
.motion .problem .fade:nth-child(2) { transition-delay: .35s; }
.motion .problem .fade:nth-child(3) { transition-delay: .7s; }

/* 4. What's inside */
.inside { padding: 14vh 0 10vh; }
.inside h2 { margin-bottom: 36px; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 64px; }
.chapters li { display: grid; grid-template-columns: 64px 1fr; align-items: start; padding: 16px 0; border-top: 1px solid var(--rule); }
.chapters .num { font: 800 3.2rem/0.85 var(--serif); color: var(--ink); }
.chapters h3 { font-size: 1.55rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.chapters p { color: var(--soft); font-size: 1rem; margin-top: 4px; }
.tick { display: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 7px; top: 3.5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.chapters li.marked .tick { display: inline-block; }
.ph-note { margin-top: 18px; }
.plain-promise { margin-top: 48px; font: 500 clamp(1.6rem, 2.6vw, 2.2rem)/1.2 var(--serif); }

/* 5. The author */
.author { padding: 10vh 0; }
.author .wrap { display: grid; grid-template-columns: minmax(220px, 0.7fr) 1.3fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.photo-frame {
  aspect-ratio: 4 / 5; border: 1.5px dashed #9a9a9a; border-radius: 6px; display: grid; place-items: center; padding: 20px; text-align: center;
  background: linear-gradient(#fff8, #fff8);
}
.motion .photo-frame { filter: blur(6px); opacity: 0.4; transition: filter .8s, opacity .8s; }
.motion .author.in .photo-frame { filter: none; opacity: 1; }
.chart-label { font: 600 0.8rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }
.chart h2 { margin: 10px 0 22px; font-size: clamp(2.2rem, 4vw, 3.4rem); }
.chart dl { margin: 0; }
.chart .row { display: grid; grid-template-columns: 180px 1fr; align-items: center; padding: 12px 0; position: relative; }
.chart .row::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); opacity: 0.35; transform-origin: left; }
.chart dt { font: 600 0.82rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.chart dd { margin: 0; }
.why { margin-top: 24px; }
.motion .chart .row::after { transform: scaleX(0); transition: transform .35s ease-out; }
.motion .chart .row dd, .motion .chart .row dt, .motion .why { opacity: 0; transition: opacity .3s; }
.motion .author.in .row::after { transform: none; }
.motion .author.in .row dt, .motion .author.in .row dd, .motion .author.in .why { opacity: 1; }
.motion .author.in .row:nth-child(2)::after, .motion .author.in .row:nth-child(2) > * { transition-delay: .2s; }
.motion .author.in .row:nth-child(3)::after, .motion .author.in .row:nth-child(3) > * { transition-delay: .4s; }
.motion .author.in .row:nth-child(4)::after, .motion .author.in .row:nth-child(4) > * { transition-delay: .6s; }
.motion .author.in .why { transition-delay: .9s; }

/* 6. Proof */
.proof { padding: 2vh 0 10vh; }
.proof h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 18px; }
.proof ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.proof li { padding: 22px 0 26px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }

/* 7. Questions for your doctor */
.questions { padding: 8vh 0 12vh; }
.questions .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.sheet {
  position: relative; background: #fff; padding: 46px 34px 40px 58px; transform: rotate(-1.6deg);
  box-shadow: 0 1px 0 #e3e0dc, 0 24px 40px -26px #28282855;
  background-image: linear-gradient(90deg, transparent 40px, #a8260c33 40px 41.5px, transparent 41.5px),
    repeating-linear-gradient(#fff 0 39px, #dfe5ea 39px 40px);
  background-position: 0 0, 0 30px;
}
.sheet::before { /* the torn top edge of a notepad sheet */
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 12px;
  background: radial-gradient(circle at 6px 0, transparent 5px, #fff 5.5px) 0 0 / 12px 12px repeat-x;
}
.sheet.fade.in { transform: rotate(-1.6deg); }
.sheet-head { font: italic 500 1.35rem/1 var(--serif); color: var(--soft); margin-bottom: 18px; }
.sheet ol { margin: 0; padding-left: 1.1em; display: grid; gap: 22px; }
.ask h2 { margin-bottom: 14px; }
.ask > p { color: var(--soft); max-width: 30em; }
.signup { margin-top: 22px; }
.signup label { display: block; font: 600 0.85rem/1 var(--sans); margin-bottom: 8px; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1 1 220px; min-height: 48px; padding: 0 16px; border: 1.5px solid #bdbab5; border-radius: 999px; background: #fff;
  font: 400 1rem var(--sans); color: var(--ink);
}
.field input:focus { border-color: var(--green); outline: none; }
.form-note { margin-top: 10px; font-size: 0.9rem; color: var(--soft); }
.form-done { margin-top: 10px; font-weight: 600; color: var(--green-dark); }
.chapter-link { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* 8. Get the book */
.buy { padding: 10vh 0 12vh; text-align: center; }
.buy h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.buy h2 .key { font-size: 1em; }
.buy-book { height: min(60svh, 560px); margin: 2vh auto 0; max-width: 560px; }
.buy-book .layer { position: absolute; inset: 0; transition: opacity .35s; }
.motion .buy-book { opacity: 0; transform: translateX(28vw) scale(0.92); }
.motion .buy-book.arrive { opacity: 1; transform: none; transition: opacity .5s ease-out, transform 1s cubic-bezier(.2,.7,.2,1); }
.play-mark {
  position: absolute; z-index: 3; right: 22%; bottom: 14%; width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); display: grid; place-items: center; box-shadow: 0 8px 20px #28282840;
  opacity: 0; transform: scale(0.6); transition: opacity .3s, transform .3s; pointer-events: none;
}
.play-mark svg { width: 26px; fill: #fff; margin-left: 3px; }
.buy[data-format="audiobook"] .play-mark { opacity: 1; transform: none; }
.formats { display: grid; grid-template-columns: repeat(4, minmax(0, 176px)); justify-content: center; gap: 10px; margin-top: 18px; }
.formats label { position: relative; }
.formats input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.formats label > span {
  display: grid; gap: 6px; justify-items: center; padding: 12px 12px; height: 100%; border: 1.5px solid #cfcbc5; border-radius: 12px; background: #fff;
  transition: border-color .2s, background-color .2s;
}
.formats b { font: 600 1.15rem/1 var(--serif); }
.formats input:checked + span { border-color: var(--green); background: var(--leaf); }
.formats input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.store { font-size: 0.92rem; }
.sample-note { margin-top: 18px; color: var(--soft); font-size: 0.98rem; }
.sample-note:focus { outline: none; }
.sample-note.flash { color: var(--ink); font-weight: 600; }

/* 9 to 11 */
.groups { padding: 6vh 0; }
.groups .wrap { border-top: 1px solid var(--ink); padding-top: 28px; display: grid; gap: 12px; }
.groups h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 6px; }
.faq { padding: 6vh 0 10vh; }
.faq h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 14px; }
details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; padding: 18px 36px 18px 0; font: 600 1.3rem/1.3 var(--serif); list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 1.6rem/1 var(--sans); color: var(--green); }
details[open] summary::after { content: "–"; }
details p { padding: 0 0 20px; max-width: 40em; }
.end { padding: 8vh 0 6vh; border-top: 1px solid var(--rule); background: #efefee; }
.end .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 72px; }
.end h2 { font-size: 1.9rem; margin-bottom: 10px; }
.notices { display: grid; gap: 14px; align-content: start; font-size: 0.95rem; }
.medical { font-weight: 600; }
.sample { color: var(--soft); }
.end-mark { grid-column: 1 / -1; justify-self: center; width: 44px; height: auto; margin-top: 12px; opacity: 0.9; }

/* Tablets and phones */
@media (max-width: 999px) {
  .checkup-stage { grid-template-columns: 1fr; }
  .checkup .apple-slot { width: min(46vw, 260px); }
}
@media (max-width: 860px) {
  .promise { grid-template-columns: 1fr; min-height: 0; gap: 0; padding-top: 72px; }
  .promise-copy { order: 0; }
  .book-stage#hero-book { height: min(58svh, 520px); }
  .problem { grid-template-columns: 1fr; min-height: 0; padding-block: 8vh; }
  .problem .apple-slot { width: min(62vw, 360px); }
  .questions .wrap { grid-template-columns: 1fr; }
  .author .wrap { grid-template-columns: 1fr; }
  .photo-frame { width: min(240px, 60vw); }
  .end .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .promise { padding-top: 64px; }
  .headline { font-size: clamp(2.1rem, 9.4vw, 2.8rem); }
  .title { font-size: 1.6rem; }
  .byline { font-size: 1.05rem; margin-top: 16px; }
  .actions { margin-top: 18px; }
  .book-stage#hero-book { height: 50svh; margin-top: 6px; }
  .chapters { grid-template-columns: 1fr; }
  .chapters li { grid-template-columns: 52px 1fr; }
  .chapters .num { font-size: 2.6rem; }
  .risk { flex-wrap: wrap; gap: 10px 8px; }
  .risk legend { flex-basis: 100%; }
  .risk label:first-of-type { margin-left: 40px; }
  .proof ul { grid-template-columns: 1fr; }
  .chart .row { grid-template-columns: 1fr; gap: 6px; }
  .formats label > span { padding: 10px 12px; }
  .formats { grid-template-columns: 1fr 1fr; }
  .buy-book { height: 52svh; }
  .sheet { padding: 40px 22px 32px 50px; }
}

/* Reduced motion: everything already drawn and in place. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .buy-pill, .box path { transition: none; }
}


/* Concept-preview tape. The server adds it to the page (lib/preview-notice.mjs).
   Slim and translucent at the bottom so it never takes space from the story;
   only its controls take clicks. Adapted from Christmas at the Love Lodge. */
.preview-notice {
  position: fixed; z-index: 45; inset: auto 0 0;
  height: calc(44px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  pointer-events: none;
  background: #f3cf45ed; color: #111;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #111;
}
.preview-notice::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: repeating-linear-gradient(115deg, #111 0 12px, transparent 12px 22px);
}
.preview-tape {
  position: absolute; inset: 4px 260px auto 0; height: 39px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
}
.preview-notice[data-preview-notice="neutral"] .preview-tape { right: 64px; }
.preview-tape-track { display: flex; width: max-content; animation: preview-tape-flow 34s linear infinite; }
.preview-tape-group { display: flex; flex-shrink: 0; }
.preview-tape-group > span {
  display: flex; align-items: center; gap: 1.8rem; padding-right: 1.8rem; height: 39px; white-space: nowrap;
  font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
}
.preview-tape-group i { font-style: normal; font-size: 0.9rem; }
@keyframes preview-tape-flow { to { transform: translateX(-50%); } }
.preview-tape-controls {
  position: absolute; top: 0; right: max(12px, env(safe-area-inset-right));
  display: flex; gap: 0.5rem; align-items: center; pointer-events: auto;
}
.preview-tape-controls a, .preview-tape-pause {
  display: inline-flex; justify-content: center; gap: 0.65rem; align-items: center;
  min-height: 44px; padding: 0.4rem 0.65rem; border: 0; background: transparent; color: #111;
  text-decoration: none; font: 700 0.78rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.preview-tape-controls a { border-left: 1px solid #1115; }
.preview-cta-copy { display: flex; flex-direction: column; gap: 4px; }
.preview-cta-copy small { font: 500 0.66rem/1 var(--sans); letter-spacing: 0.08em; }
.preview-tape-controls a:hover, .preview-tape-pause:hover { background: #1111; }
.preview-tape-controls a:focus-visible, .preview-tape-pause:has(input:focus-visible) { outline: 2px solid #111; outline-offset: -4px; }
.preview-tape-pause { position: relative; width: 44px; }
.preview-tape-pause svg { fill: currentColor; }
.preview-tape-pause input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.preview-tape-pause .i-play, .preview-notice:has(input:checked) .i-pause { display: none; }
.preview-notice:has(input:checked) .i-play { display: inline; }
.preview-notice:has(input:checked) .preview-tape-track { animation-play-state: paused; }
.has-preview-notice .end { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
  .preview-tape { right: 195px; }
  .preview-notice[data-preview-notice="neutral"] .preview-tape { right: 52px; }
  .preview-tape-group > span { font-size: 0.66rem; gap: 1.2rem; padding-right: 1.2rem; }
  .preview-tape-controls { right: max(4px, env(safe-area-inset-right)); gap: 0; }
  .preview-tape-controls a { font-size: 0.7rem; padding-inline: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .preview-tape-track { animation: none; }
  .preview-tape-pause { display: none; }
}
