/* The app's own chrome palette (WalkTheStories/Theme/Palette.swift) plus the
   ink canvas the App Store frames are set on (Marketing/screenshots). Someone
   who taps through from here to the store should land on the same brand. */
:root{
  --ink:#1B1914;
  --ink-2:#2A261E;
  --ink-line:#3A352A;
  --on-ink:#FBF3DD;
  --on-ink-muted:#C9BD9C;
  --brand:#EAC72B;
  --brand-ink:#6B5806;
  --ground:#FAEFBA;
  --page:#FDF8E6;
  --surface:#FFFFFF;
  --text:#1A1A1A;
  --text-muted:#5C554A;
  --hairline:#DCCF9C;
  --emphasis:#232A5E;
  --max:1160px;
  --gutter:24px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth; scroll-padding-top:72px}
@media (prefers-reduced-motion:reduce){ html{scroll-behavior:auto} *{transition:none!important} }
body{
  margin:0; background:var(--page); color:var(--text);
  font:400 17px/1.6 "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
img{max-width:100%; display:block; height:auto}
a{color:inherit}
h1,h2,h3{font-family:"Playfair Display", Georgia, serif; font-weight:700; margin:0; line-height:1.08; letter-spacing:-.01em; text-wrap:balance}
h1 em, h2 em{font-style:italic; color:var(--brand-ink)}
.dark h1 em, .dark h2 em{color:var(--brand)}
p{margin:0}
.wrap{max-width:var(--max); margin:0 auto; padding:0 var(--gutter)}
@media (max-width:560px){ :root{--gutter:16px} body{font-size:16px} }
.dark{background:var(--ink); color:var(--on-ink)}
.dark .muted{color:var(--on-ink-muted)}
.muted{color:var(--text-muted)}

/* ---------- App Store button ---------- */
.store{
  display:inline-flex; align-items:center; gap:10px;
  background:#000; color:#fff; text-decoration:none;
  border:1px solid #A6A6A6; border-radius:12px;
  padding:9px 18px 9px 14px; min-height:54px;
  transition:transform .15s ease, box-shadow .15s ease;
}
.store:hover{transform:translateY(-1px); box-shadow:0 8px 24px -8px rgba(0,0,0,.5)}
.store svg{width:26px; height:26px; flex:none}
.store span{display:flex; flex-direction:column; line-height:1.1}
.store small{font-size:11.5px; letter-spacing:.02em}
.store b{font-size:21px; font-weight:600; letter-spacing:-.01em}
.store[aria-disabled="true"]{cursor:default}
.store[aria-disabled="true"]:hover{transform:none; box-shadow:none}

/* ---------- Phone ---------- */
/* Same bezel as the App Store frames, sized off one variable. */
.phone{
  --w:300px;
  width:var(--w); flex:none;
  padding:calc(var(--w) * .021);
  border-radius:calc(var(--w) * .143);
  background:linear-gradient(160deg,#F6ECD2,#DCCB9F);
  box-shadow:0 0 0 1px rgba(0,0,0,.28), 0 30px 70px -20px rgba(27,25,20,.55);
}
.phone img{width:100%; aspect-ratio:1320/2868; border-radius:calc(var(--w) * .122); background:var(--ground)}
.dark .phone{box-shadow:0 0 0 1px rgba(0,0,0,.4), 0 40px 90px -20px rgba(0,0,0,.7), 0 0 120px rgba(234,199,43,.08)}

/* ---------- Header ---------- */
header.site{
  position:sticky; top:0; z-index:30;
  background:rgba(27,25,20,.86); backdrop-filter:saturate(140%) blur(10px); -webkit-backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid rgba(255,255,255,.06); color:var(--on-ink);
}
.nav{display:flex; align-items:center; justify-content:space-between; gap:20px; height:64px}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none}
.brand img{width:32px; height:32px; border-radius:8px}
.brand span{font-family:"Playfair Display", serif; font-weight:700; font-size:20px}
.navlinks{display:flex; align-items:center; gap:26px; font-size:14.5px; font-weight:500}
.navlinks a{text-decoration:none; color:var(--on-ink-muted)}
.navlinks a:hover{color:var(--on-ink)}
.navlinks a.pill{
  color:var(--ink); background:var(--brand); padding:8px 16px; border-radius:999px; font-weight:600;
}
.navlinks a.pill:hover{color:var(--ink); background:#F2D54E}
@media (max-width:820px){ .navlinks a:not(.pill){display:none} }

/* ---------- Hero ---------- */
.hero{position:relative; overflow:hidden; padding:64px 0 0}
.hero::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(900px 600px at 72% 40%, rgba(234,199,43,.13), transparent 70%),
    radial-gradient(700px 500px at 5% 100%, rgba(185,131,42,.14), transparent 70%),
    linear-gradient(180deg,var(--ink-2),var(--ink) 60%);
}
.route{position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none}
.hero-grid{position:relative; display:grid; grid-template-columns:1.02fr .98fr; gap:40px; align-items:center}
.hero-grid > div:first-child{padding-bottom:40px}
.hero h1{font-size:clamp(38px,5.4vw,72px); color:var(--on-ink); line-height:1.04}
.nw{white-space:nowrap}
.hero .lede{font-size:clamp(17px,1.6vw,20px); line-height:1.6; color:var(--on-ink-muted); max-width:34em; margin-top:24px}
.hero-cta{display:flex; align-items:center; gap:18px 22px; margin-top:34px; flex-wrap:wrap}
.facts{list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 18px; font-size:14px; color:var(--on-ink-muted)}
.facts li{display:flex; align-items:center; gap:7px}
.facts li::before{content:""; width:6px; height:6px; border-radius:50%; background:var(--brand); flex:none}
.hero-phones{position:relative; height:600px}
.hero-phones .phone{position:absolute}
.hero-phones .back{--w:280px; left:4%; top:70px; transform:rotate(-5deg); opacity:.96}
.hero-phones .front{--w:318px; right:4%; top:0}
@media (max-width:900px){
  .hero{padding-top:44px}
  .hero-grid{grid-template-columns:1fr; gap:36px}
  .hero-phones{height:500px; max-width:460px; width:100%; margin:0 auto}
  .hero-grid > div:first-child{padding-bottom:0}
  .hero-phones .back{--w:230px; left:0; top:60px}
  .hero-phones .front{--w:262px; right:0}
}
@media (max-width:420px){
  .hero-phones{height:420px}
  .hero-phones .back{--w:190px}
  .hero-phones .front{--w:218px}
}

/* ---------- How it works ---------- */
.how{background:var(--ground); padding:88px 0; border-bottom:1px solid var(--hairline)}
@media (max-width:900px){ .how{padding:64px 0} }
.how-head{max-width:640px}
.how-head h2{font-size:clamp(30px,3.8vw,44px)}
.steps{list-style:none; margin:44px 0 0; padding:0; display:grid; grid-template-columns:repeat(3,1fr); gap:20px; counter-reset:step}
@media (max-width:820px){ .steps{grid-template-columns:1fr} }
.steps li{
  background:var(--surface); border-radius:18px; padding:28px 26px 30px;
  box-shadow:0 1px 0 rgba(0,0,0,.04), 0 14px 30px -18px rgba(90,74,20,.35);
  counter-increment:step;
}
.steps li::before{
  content:counter(step); display:grid; place-items:center;
  width:38px; height:38px; border-radius:50%; background:var(--emphasis); color:#fff;
  font:700 17px/1 "Playfair Display", serif; margin-bottom:18px;
}
.steps h3{font-size:23px; margin-bottom:8px}
.steps p{color:var(--text-muted); font-size:16px}

/* ---------- Feature rows ---------- */
.feature{padding:104px 0}
.feature + .feature{padding-top:24px}
.row{display:grid; grid-template-columns:auto 1fr; gap:80px; align-items:center}
.row.flip{grid-template-columns:1fr auto}
.row.flip .shots{order:2}
.shots{display:flex; gap:22px; justify-content:center}
.shots.pair .phone{--w:262px}
.shots.pair .phone + .phone{margin-top:60px}
.copy{max-width:520px}
.copy h2{font-size:clamp(32px,4vw,50px)}
.copy .body{margin-top:20px; font-size:18px; line-height:1.65; color:var(--text-muted)}
.dark .copy .body{color:var(--on-ink-muted)}
.copy .body + .body{margin-top:14px}
.ticks{list-style:none; margin:26px 0 0; padding:0; display:grid; gap:12px}
.ticks li{display:grid; grid-template-columns:22px 1fr; gap:10px; font-size:16px; line-height:1.5}
.ticks svg{width:20px; height:20px; margin-top:2px; color:var(--emphasis)}
.dark .ticks svg{color:var(--brand)}
.ticks b{font-weight:600}
@media (max-width:900px){
  .feature{padding:72px 0}
  .row, .row.flip{grid-template-columns:1fr; gap:40px}
  .row .shots, .row.flip .shots{order:2}
  .copy{max-width:none}
}
@media (max-width:560px){
  .shots .phone{--w:240px}
  .shots.pair .phone{--w:min(44vw,200px)}
}

/* A strip of the passage itself, set the way the reader sets it. */
.excerpt{
  margin-top:28px; padding:18px 22px; border-left:3px solid var(--brand);
  background:var(--surface); border-radius:0 12px 12px 0;
  font:italic 400 17px/1.6 Georgia, "Times New Roman", serif; color:#3a342a;
  box-shadow:0 12px 26px -20px rgba(90,74,20,.45);
}
.excerpt cite{display:block; margin-top:8px; font:normal 500 13px/1.4 "Public Sans", sans-serif; color:var(--text-muted)}

/* ---------- Library ---------- */
.library{background:var(--ground); padding:100px 0; border-top:1px solid var(--hairline); border-bottom:1px solid var(--hairline)}
.section-head{max-width:700px; margin-bottom:44px}
.section-head h2{font-size:clamp(32px,4vw,50px)}
.section-head p{margin-top:16px; font-size:18px; color:var(--text-muted)}
.books{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(4,1fr); gap:22px}
@media (max-width:1000px){ .books{grid-template-columns:repeat(3,1fr)} }
@media (max-width:720px){ .books{grid-template-columns:repeat(2,1fr); gap:14px} }
.book a{
  display:block; height:100%; text-decoration:none; background:var(--surface); border-radius:14px; overflow:hidden;
  box-shadow:0 1px 0 rgba(0,0,0,.04), 0 12px 26px -18px rgba(90,74,20,.4);
  transition:transform .2s ease, box-shadow .2s ease;
}
.book a:hover{transform:translateY(-3px); box-shadow:0 1px 0 rgba(0,0,0,.04), 0 20px 36px -18px rgba(90,74,20,.5)}
.book a:focus-visible{outline:3px solid var(--emphasis); outline-offset:3px}
.book img{width:100%; aspect-ratio:720/375; object-fit:cover}
.book-meta{padding:14px 16px 16px}
.book h3{font-size:18px; line-height:1.2}
.book .author{font-size:12.5px; font-weight:600; color:var(--brand-ink); margin-top:4px}
.book .route-line{font-size:14px; color:var(--text-muted); margin-top:6px; line-height:1.45}
.book .figures{font-size:12.5px; color:var(--text-muted); margin-top:8px; font-variant-numeric:tabular-nums}
@media (max-width:720px){
  .book-meta{padding:10px 12px 12px}
  .book h3{font-size:15.5px}
  .book .route-line{display:none}
}
.vote{
  margin-top:36px; display:flex; gap:18px; align-items:center; flex-wrap:wrap;
  background:var(--emphasis); color:#fff; border-radius:18px; padding:24px 28px;
}
.vote h3{font-size:24px; color:#fff}
.vote p{color:#CBD0F0; font-size:16px; margin-top:4px}
.also{margin-top:22px; font-size:15px; color:var(--text-muted)}
.also a{color:var(--emphasis)}
.also a.all{font-weight:600; white-space:nowrap}

/* ---------- Pace calculator ---------- */
.calc{
  margin-top:30px; background:var(--surface); border-radius:18px; padding:24px 24px 22px;
  box-shadow:0 1px 0 rgba(0,0,0,.04), 0 16px 34px -20px rgba(90,74,20,.45);
}
.calc label{display:block; font-size:13.5px; font-weight:600; color:var(--text-muted); margin-bottom:8px}
.calc-inputs{display:grid; grid-template-columns:1fr 1fr; gap:18px}
@media (max-width:520px){ .calc-inputs{grid-template-columns:1fr} }
.calc select{
  width:100%; font:500 16px "Public Sans", sans-serif; color:var(--text);
  padding:11px 12px; border-radius:10px; border:1px solid var(--hairline); background:var(--page);
}
.calc input[type=range]{width:100%; accent-color:var(--emphasis); margin:10px 0 0}
.calc output.steps-out{font:700 22px/1 "Playfair Display", serif; display:block}
.calc-results{margin-top:22px; display:grid; grid-template-columns:repeat(3,1fr); gap:10px}
.calc-results div{background:var(--page); border:1px solid #EFE4B8; border-radius:12px; padding:12px 14px}
.calc-results span{display:block; font-size:12.5px; color:var(--text-muted)}
.calc-results b{display:block; font:700 22px/1.2 "Playfair Display", serif; margin-top:4px; font-variant-numeric:tabular-nums}
.calc-results .hl{background:#FFF6CF; border-color:var(--brand)}
@media (max-width:520px){ .calc-results{grid-template-columns:1fr} .calc-results div{display:flex; justify-content:space-between; align-items:baseline} .calc-results b{margin:0} }
.calc-note{margin-top:14px; font-size:13.5px; color:var(--text-muted)}

/* ---------- Together ---------- */
.together{position:relative; overflow:hidden; padding:110px 0}
.together .route{opacity:.9}
.together .row{position:relative}

/* ---------- Also in the app ---------- */
.extras{padding:96px 0; border-top:1px solid var(--hairline)}
.extra-grid{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,1fr); gap:34px 40px}
@media (max-width:860px){ .extra-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:520px){ .extra-grid{grid-template-columns:1fr; gap:26px} }
.extra-grid svg{width:28px; height:28px; color:var(--emphasis); margin-bottom:12px}
.extra-grid h3{font:600 17px/1.3 "Public Sans", sans-serif; letter-spacing:0}
.extra-grid p{font-size:15.5px; color:var(--text-muted); margin-top:6px}

/* ---------- The name ---------- */
.word{padding:96px 0; border-top:1px solid var(--ink-line)}
.word-inner{max-width:680px}
.headword{font-size:clamp(40px,5.6vw,60px); font-style:italic; display:flex; align-items:baseline; gap:16px; flex-wrap:wrap}
.headword .pos{font:600 15px "Public Sans", sans-serif; font-style:normal; color:var(--brand); letter-spacing:.04em}
.pron{color:#A89D7E; font-size:15px; margin-top:6px}
.def{font-size:19px; line-height:1.7; margin-top:26px; color:#E3D9BD}
.tie{
  font:italic 600 clamp(22px,2.8vw,30px)/1.35 "Playfair Display", serif; color:var(--on-ink);
  border-left:3px solid var(--brand); padding-left:22px; margin-top:32px;
}

/* ---------- FAQ ---------- */
.faq{padding:100px 0}
.faq-grid{display:grid; grid-template-columns:.8fr 1.2fr; gap:60px; align-items:start}
@media (max-width:860px){ .faq-grid{grid-template-columns:1fr; gap:28px} }
.faq h2{font-size:clamp(32px,4vw,46px)}
.faq-list details{border-bottom:1px solid var(--hairline)}
.faq-list details:first-child{border-top:1px solid var(--hairline)}
.faq-list summary{
  cursor:pointer; list-style:none; padding:20px 40px 20px 0; position:relative;
  font-weight:600; font-size:17.5px;
}
.faq-list summary::-webkit-details-marker{display:none}
.faq-list summary::after{
  content:""; position:absolute; right:6px; top:50%; width:10px; height:10px; margin-top:-7px;
  border-right:2px solid var(--text-muted); border-bottom:2px solid var(--text-muted); transform:rotate(45deg);
  transition:transform .2s ease;
}
.faq-list details[open] summary::after{transform:rotate(-135deg); margin-top:-2px}
.faq-list summary:focus-visible{outline:3px solid var(--emphasis); outline-offset:2px; border-radius:4px}
.faq-list details p{padding:0 0 22px; color:var(--text-muted); font-size:16.5px; max-width:60ch}
.faq-list details p + p{margin-top:-10px}

/* ---------- Closing ---------- */
.closing{position:relative; overflow:hidden; padding:100px 0 0}
.closing::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(800px 500px at 30% 20%, rgba(234,199,43,.12), transparent 70%);
}
.closing .row{position:relative; align-items:end}
.closing .copy{padding-bottom:110px}
.closing-shot{overflow:hidden; height:520px; display:flex; align-items:flex-start; justify-content:center}
@media (max-width:900px){
  .closing{padding-top:72px}
  .closing .copy{padding-bottom:0}
  .closing-shot{height:420px; order:2}
}

/* ---------- Footer ---------- */
footer{background:var(--ink); color:var(--on-ink-muted); border-top:1px solid var(--ink-line); padding:36px 0 44px; font-size:14px}
.footer-grid{display:flex; justify-content:space-between; align-items:center; gap:18px; flex-wrap:wrap}
.footer-brand{display:flex; align-items:center; gap:10px; color:var(--on-ink)}
.footer-brand img{width:26px; height:26px; border-radius:6px}
.footer-brand span{font-family:"Playfair Display", serif; font-weight:700; font-size:17px}
footer nav{display:flex; gap:22px}
footer nav a{text-decoration:none}
footer nav a:hover{color:var(--on-ink)}
