/* Linen · Teal · Espresso on stone — see DESIGN.md in the app repo */
:root {
  --ground: #ECE7DD; --surface: #F7F4ED; --line: #DDD6C9; --track: #DFD9CE;
  --ink: #2E2420; --muted: #6A5F58; --accent: #1F4E5A; --accent-deep: #163A43;
  --accent-tint: #D9E3E4; --espresso: #3A2C25; --warn: #8C3B2E; --warn-tint: #F0DCD3;
  --display: 'Fraunces', Georgia, serif; --ui: 'Instrument Sans', system-ui, sans-serif; --reading: 'Literata', Georgia, serif;
  --r-btn: 12px; --r-card: 14px; --r-panel: 16px; --gutter: 24px; --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--ui); color: var(--ink); background: var(--ground) url(assets/stone-linen.jpg) repeat; background-size: 64px 64px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-deep); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.1; margin: 0; color: var(--ink); }
h1 { font-size: clamp(38px, 6vw, 60px); }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 20px; }
p { margin: 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.stone-teal { background: var(--accent) url(assets/stone-teal.jpg) repeat; background-size: 64px 64px; color: var(--surface); }
.stone-espresso { background: var(--espresso) url(assets/stone-espresso.jpg) repeat; background-size: 64px 64px; color: var(--surface); }
.stone-teal .eyebrow, .stone-espresso .eyebrow { color: var(--surface); opacity: 0.9; }
.stone-teal h2, .stone-espresso h2, .stone-teal h3, .stone-espresso h3 { color: var(--surface); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: var(--r-btn); font: 700 16px var(--ui); cursor: pointer; border: 0; transition: transform .08s ease, opacity .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--surface); box-shadow: 0 8px 18px rgba(31,78,90,0.28); }
.btn-primary:hover { color: var(--surface); opacity: 0.94; }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-weight: 600; }
.btn-secondary:hover { color: var(--ink); background: rgba(46,36,32,0.04); }
.btn-light { background: var(--surface); color: var(--accent); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 600 13px var(--ui); color: var(--ink); }
.chip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 600 12px var(--ui); color: var(--ink); }
.ai-label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font: 600 12px var(--ui); }
.ai-label.human { background: #E4E7D9; color: #4A5034; }   /* human-written: olive, a pen instead of a sparkle */

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); background: rgba(236,231,221,0.82); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.wordmark { display: inline-flex; align-items: baseline; font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); line-height: 1; }
/* The mark is the "n": a thick lowercase n whose counter is a book seen down its spine (pages with an arched lower edge). Its viewBox is cropped to the n, so with align-items:baseline the n's feet sit exactly on the text baseline. */
.wordmark .mark { width: 1.112em; height: 1.2em; color: var(--accent); flex: none; margin-right: 0.1em; }
.wordmark.no-n .mark { margin-right: 0.28em; }
.wordmark .brand-rest { letter-spacing: -0.015em; }
.nav { display: flex; gap: 22px; align-items: center; font-weight: 600; font-size: 14px; }
.nav a { color: var(--muted); } .nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--surface); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
@media (max-width: 720px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border: 0; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero p.lede { font-size: 19px; color: var(--muted); max-width: 520px; margin-top: 18px; line-height: 1.55; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.hero .fine, .fine { font-size: 13px; color: var(--muted); margin-top: 14px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* Phone mock */
.phone { width: 300px; margin: 0 auto; border-radius: 36px; border: 6px solid #2A2522; background: var(--ground) url(assets/stone-linen.jpg) repeat; background-size: 64px 64px; box-shadow: 0 30px 60px rgba(46,36,32,0.35); overflow: hidden; aspect-ratio: 390 / 844; position: relative; font-size: 11px; }
.phone .screen { padding: 40px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.phone .row { display: flex; align-items: center; justify-content: space-between; }
.phone .title { font-family: var(--display); font-size: 22px; color: var(--ink); }
.phone .pill { height: 26px; padding: 0 9px; font-size: 10px; }
.phone .cover { flex-shrink: 0; border-radius: 3px; color: var(--surface); padding: 8px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; box-shadow: 0 10px 20px rgba(46,36,32,0.28); font-family: var(--display); font-weight: 600; line-height: 1.1; }
.phone .cover small { font-family: var(--ui); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; font-weight: 500; }
.phone .hero-book { display: flex; gap: 12px; align-items: center; }
.phone .hero-book .cover { width: 92px; height: 138px; font-size: 11px; }
.phone .hero-book h4 { font-family: var(--display); font-weight: 500; font-size: 16px; margin: 0 0 4px; line-height: 1.12; }
.phone .hero-book .meta { color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.phone .ai-label { font-size: 9px; padding: 4px 8px; }
.phone .mini-btn { display: inline-block; margin-top: 6px; background: var(--accent); color: var(--surface); font-weight: 700; font-size: 10px; padding: 7px 12px; border-radius: 999px; }
.phone .band { border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 18px rgba(46,36,32,0.18); }
.phone .band strong { display: block; font-family: var(--display); font-weight: 500; font-size: 14px; }
.phone .band .eyebrow { font-size: 8px; }
.phone .band small { font-size: 9px; opacity: 0.9; }
.phone .band .btn-light { min-height: 28px; padding: 0 10px; font-size: 10px; border-radius: 999px; margin-left: auto; }
.phone .rail { display: flex; gap: 10px; overflow: hidden; }
.phone .rail .cover { width: 84px; height: 126px; font-size: 10px; }
.phone .rail-title { font-family: var(--display); font-size: 16px; }
.phone .tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding-top: 10px; font-size: 9px; font-weight: 600; color: var(--muted); }
.phone .tabbar span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phone .tabbar svg { width: 20px; height: 20px; stroke: currentColor; }
.phone .tabbar .on { color: var(--accent); }

.btn.soon { opacity: .7; cursor: default; }
.btn.soon:active { transform: none; }
.phone .mini-btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.phone .player { position: absolute; left: 10px; right: 10px; bottom: 70px; height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 18px rgba(46,36,32,0.2); }
.phone .player .thumb { width: 26px; height: 38px; border-radius: 2px; flex: none; }
.phone .player .pt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.phone .player .pt b { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .player .pt small { font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .player svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* Listen section */
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink); }
.ticks li::before { content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.player-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px; box-shadow: 0 14px 30px rgba(46,36,32,0.18); max-width: 420px; margin: 0 auto; width: 100%; }
.player-card .pc-top { display: flex; gap: 16px; align-items: center; }
.player-card .cover { flex-shrink: 0; width: 92px; height: 138px; border-radius: 4px; color: var(--surface); padding: 9px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; box-shadow: 0 10px 20px rgba(46,36,32,0.28); font-family: var(--display); font-weight: 600; font-size: 12px; line-height: 1.1; }
.player-card .cover small { font-family: var(--ui); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; font-weight: 500; }
.player-card .scrub { height: 6px; border-radius: 3px; background: var(--line); margin-top: 22px; overflow: hidden; }
.player-card .scrub span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.player-card .times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.player-card .transport { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; color: var(--ink); }
.player-card .transport svg { width: 22px; height: 22px; }
.player-card .transport .skip { font-size: 11px; font-weight: 700; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.player-card .transport .play { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(31,78,90,0.3); }
.player-card .transport .play svg { width: 26px; height: 26px; margin-left: 3px; }
.player-card .tools { display: flex; gap: 8px; margin-top: 18px; }
.player-card .tools span { flex: 1; text-align: center; font-size: 11px; font-weight: 600; padding: 9px 2px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.player-card .tools .on { color: var(--accent); border-color: var(--accent); }
.author-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 860px) { .author-panel { grid-template-columns: 1fr; } }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 17px; margin-top: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.step { position: relative; }
.step .n { font-family: var(--display); font-size: 40px; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.panel { border-radius: var(--r-panel); padding: 28px; box-shadow: 0 14px 30px rgba(46,36,32,0.24); }

/* Pricing */
.plan { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .plan { grid-template-columns: 1fr; } }
.plan .price { font-family: var(--display); font-size: 52px; line-height: 1; letter-spacing: -0.02em; }
.plan .price small { font-family: var(--ui); font-size: 15px; letter-spacing: 0; opacity: 0.85; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.plan li::before { content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.stone-espresso .plan li::before { background: rgba(247,244,237,0.16); color: var(--surface); }
.alt-list { display: grid; gap: 12px; }
.alt { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.alt strong { display: block; font-size: 15px; }
.alt span { font-size: 13px; color: var(--muted); }
.alt .amt { font-family: var(--display); font-size: 22px; white-space: nowrap; }

/* Author math */
.math { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .math { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; color: var(--ink); }
.stat b { display: block; font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1; margin: 6px 0; }
.stat span { font-size: 12px; color: var(--muted); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--display); font-size: 22px; color: var(--accent); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); font-size: 15px; margin-top: 10px; line-height: 1.6; max-width: 720px; }

/* Forms */
form.stack { display: grid; gap: 10px; }
label { font-size: 12px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=date], select, textarea { width: 100%; font: 15px var(--ui); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
textarea { min-height: 110px; resize: vertical; }
.inline-form { display: flex; gap: 8px; max-width: 460px; }
.inline-form input { flex: 1; }
@media (max-width: 520px) { .inline-form { flex-direction: column; } }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); font-size: 14px; font-weight: 600; }
.notice.warn { background: var(--warn-tint); color: var(--warn); }

/* Prose pages */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose h3 { font-size: 18px; margin: 24px 0 6px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; margin-bottom: 12px; }
.prose ul { padding-left: 20px; }
.prose .meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.placeholder { background: var(--warn-tint); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); font-weight: 600; } footer a:hover { color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--track); position: relative; transition: background .2s; flex-shrink: 0; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(46,36,32,0.3); transition: left .2s; }
.toggle input:checked { background: var(--accent); } .toggle input:checked::after { left: 23px; }
.hidden { display: none !important; }

/* Legal pages */
.legal-nav { font-size: 13px; color: var(--muted); margin: -12px 0 24px; }
.legal-nav a { color: var(--accent); font-weight: 600; }

/* Construction-paper texture on every box: layered over the surface colour (and over the stone on the coloured panels). */
.paper, .card, .panel, .stat, .player-card, .phone .band, .phone .player, .alt-list, .step { background-image: url(assets/paper.png?v=2); background-size: 320px 320px; }
.stone-teal { background-image: url(assets/paper.png?v=2), url(assets/stone-teal.jpg); background-size: 320px 320px, 64px 64px; }
.stone-espresso { background-image: url(assets/paper.png?v=2), url(assets/stone-espresso.jpg); background-size: 320px 320px, 64px 64px; }
.btn-primary, .btn-light { background-image: url(assets/paper.png?v=2); background-size: 320px 320px; }
