/*
  Lost in Their Story - site styles (no build step).

  Brand pack v1 (5 Dec 2026): the "talking page" logo (a speech bubble with a
  folded corner). Electric blue #2950E6 for the bubble, buttons and links
  (hover #1E3DB8), pink #F5A3C0 for small highlights only (never text or
  buttons), ink #161A2B for text, paper #F4F5FA background, thin rules #C9CCD8.
  Headings in Schibsted Grotesk Bold, stories in Newsreader, interface in
  Figtree. Body text never under 16px. Logo files live in /brand.
  Still a printed-book feel: hairlines not shadows, small radii, no gradients.
  Highlights use tinted, fully bordered panels (never a coloured left bar).
*/
:root {
    --paper: #f4f5fa;
    --sheet: #ffffff;
    --ink: #161a2b;
    --ink-soft: #4d5266;
    --line: #dde0ea;
    --line-strong: #c9ccd8;
    --green: #2950e6;        /* the brand blue (kept the old name so every rule picks it up) */
    --green-dark: #1e3db8;
    --pink: #f5a3c0;
    --band: #161a2b;
    --on-band: #f4f5fa;
    --on-band-soft: #b8bdd0;
    --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3 {
    font-family: 'Schibsted Grotesk', 'Figtree', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
}
.serif { font-family: 'Newsreader', Georgia, 'Times New Roman', serif; font-optical-sizing: auto; }
h1 { font-size: clamp(2.7rem, 6.2vw, 4.9rem); line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; }
h3 { font-size: 1.4rem; line-height: 1.2; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 31em; }
.muted { color: var(--ink-soft); }
.small { font-size: 16px; }

/* Buttons: one primary style, one text link. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 600 17px/1 'Figtree', system-ui, sans-serif;
    padding: 16px 24px; border-radius: 6px; border: 1.5px solid transparent;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: var(--on-band); color: var(--band); }
.btn-light:hover { background: #fff; color: var(--band); }
.text-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1.5px; }
.text-link:hover { text-decoration-color: var(--ink); }
.btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
    outline: 3px solid rgba(41, 80, 230, .45); outline-offset: 3px;
}

/* Header */
.site-head { padding: 26px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.head-link { font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--line-strong); padding-bottom: 2px; }
.head-link:hover { border-color: var(--ink); color: var(--ink); }

/* Hero */
.hero { padding: 48px 0 104px; }
.hero .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: start; }
.hero-logo { display: block; width: 220px; height: auto; margin: 0 0 40px; }
.hero h1 { margin: 8px 0 28px; max-width: 11em; }
.hero .lead { font-size: 1.25rem; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 34px 0 16px; }
.hero-note { font-size: 16px; color: var(--ink-soft); max-width: 30em; }

/* Contents page (real chapter list from the question set) */
.contents { position: relative; margin-top: 10px; }
.contents::before {
    content: ""; position: absolute; inset: 9px -9px -9px 9px;
    background: var(--sheet); border: 1px solid var(--line); border-radius: 3px;
}
.contents-page {
    position: relative; background: var(--sheet); border: 1px solid var(--line-strong); border-radius: 3px;
    padding: 30px 32px 26px;
}
.contents-page h2 { font-size: 1.4rem; margin-bottom: 16px; }
.contents-page ol { list-style: none; margin: 0; padding: 0; }
.contents-page li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; }
.contents-page .no { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; width: 20px; flex: none; }
.contents-page .ch { font-family: 'Newsreader', Georgia, serif; font-size: 1.1rem; white-space: nowrap; }
.contents-page .dots { flex: 1; border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-4px); min-width: 16px; }
.contents-page .n { font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.contents-page .foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink-soft); }

/* Letter */
.letter { padding: 96px 0; border-top: 1px solid var(--line); }
.letter .wrap { display: grid; grid-template-columns: 4fr 8fr; gap: 72px; }
.letter h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); }
.letter .body { font-family: 'Newsreader', Georgia, serif; font-size: clamp(1.3rem, 2.1vw, 1.6rem); line-height: 1.5; max-width: 30em; }
.letter .sign { margin-top: 26px; font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; font-size: 1.3rem; }
.letter .sign span { display: block; font-family: 'Figtree', sans-serif; font-style: normal; font-size: 16px; color: var(--ink-soft); margin-top: 2px; }

/* How it works: phone + steps */
.how { padding: 112px 0 104px; background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; }
.phone {
    width: 290px; max-width: 100%; margin: 0 auto; border: 11px solid #24262a; border-radius: 40px;
    background: var(--paper); padding: 26px 22px 30px; text-align: center; aspect-ratio: 9 / 18.5;
    display: flex; flex-direction: column;
}
.phone .bar { width: 76px; height: 6px; border-radius: 3px; background: #24262a; margin: -12px auto 22px; opacity: .9; }
.phone .count { font-size: 12.5px; color: var(--ink-soft); }
.phone .q { font-family: 'Schibsted Grotesk', 'Figtree', sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.3; margin: 10px 0 auto; }
.phone .saved { font-size: 13px; color: var(--green-dark); background: #eaeefd; border: 1px solid #cdd7fa; border-radius: 4px; padding: 7px 10px; margin-top: 18px; }
.phone .rec {
    width: 112px; height: 112px; border-radius: 50%; margin: 18px auto 14px; background: var(--green);
    display: grid; place-items: center; border: 6px solid #d4dcfb;
}
.phone .rec svg { width: 38px; height: 38px; }
.phone .hint { font-weight: 600; font-size: 16px; }
.phone .sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.how h2 { margin-bottom: 30px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--green); }
.steps h3 { font-size: 1.3rem; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); margin: 0; max-width: 34em; }

/* Sample questions */
.questions { padding: 96px 0 88px; }
.questions .intro { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: end; margin-bottom: 44px; }
.questions .intro p { margin: 0; color: var(--ink-soft); font-size: 1.1rem; max-width: 30em; }
.q-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; list-style: none; margin: 0; padding: 0; }
.q-list li { padding: 22px 0 24px; border-top: 1px solid var(--line); }
.q-list .ch { font-size: 14px; color: var(--ink-soft); }
.q-list .q { font-family: 'Schibsted Grotesk', 'Figtree', sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.35; margin-top: 4px; letter-spacing: -.01em; }

/* Price band */
.price { background: var(--band); color: var(--on-band); padding: 112px 0; }
.price .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
.price h2 { color: #fff; font-size: 1.5rem; }
.price .amount { font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; font-size: clamp(5rem, 10vw, 7.5rem); line-height: .95; color: #fff; margin: 14px 0 12px; letter-spacing: -.03em; }
.price .terms { color: var(--on-band-soft); font-size: 1.08rem; max-width: 24em; }
.price .terms strong { color: #fff; font-weight: 600; }
.included { list-style: none; margin: 0 0 32px; padding: 0; }
.included li { padding: 15px 0; border-top: 1px solid rgba(238, 241, 236, .16); }
.included li:last-child { border-bottom: 1px solid rgba(238, 241, 236, .16); }
.included strong { color: #fff; font-weight: 600; }
.included span { color: var(--on-band-soft); }
.price .later { margin-top: 18px; font-size: 16px; color: var(--on-band-soft); }

/* FAQ */
.faq { padding: 96px 0; }
.faq .wrap { display: grid; grid-template-columns: 4fr 8fr; gap: 72px; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
    list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
    font-family: 'Schibsted Grotesk', 'Figtree', sans-serif; font-weight: 700; font-size: 1.15rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-52%);
    font-family: 'Figtree', sans-serif; font-weight: 400; font-size: 1.6rem; color: var(--ink-soft);
}
details[open] summary::after { content: "\2212"; }
details p { color: var(--ink-soft); margin: -4px 0 22px; max-width: 38em; }

/* Waitlist */
.join { padding: 104px 0 112px; background: var(--sheet); border-top: 1px solid var(--line); }
.join .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.join h2 { margin-bottom: 16px; }
.form-card { border: 1px solid var(--line-strong); border-radius: 3px; padding: 32px; background: var(--paper); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 16px; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input[type=text], .field input[type=email], .field input[type=password], .field select {
    width: 100%; font: 400 17px/1.4 'Figtree', system-ui, sans-serif; color: var(--ink);
    padding: 13px 14px; border-radius: 4px; border: 1px solid var(--line-strong); background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(41, 80, 230, .18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 6px 0 24px; font-size: 16px; color: var(--ink-soft); }
.check input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--green); }
.form-card .btn { width: 100%; }
.error { color: #b42318; font-size: 16px; margin-top: 6px; }
.alert { background: #fdecea; border: 1px solid #f5c2bd; color: #8a1c12; border-radius: 4px; padding: 12px 16px; margin-bottom: 20px; font-size: 16px; }
.notice { background: #eaeefd; border: 1px solid #cdd7fa; color: #1e3db8; border-radius: 4px; padding: 12px 16px; margin: 20px 0; font-size: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-foot { padding: 36px 0 52px; color: var(--ink-soft); font-size: 16px; border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-foot a { color: var(--ink-soft); }
.site-foot .foot-company { flex-basis: 100%; font-size: 14px; }
.btn-small { padding: 9px 16px; font-size: 16px; }

/* Simple pages (thanks, privacy, admin) */
.page { padding: 40px 0 96px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2.3rem, 4.6vw, 3.3rem); margin: 0 0 22px; }
.page h2 { font-size: 1.55rem; margin: 36px 0 10px; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 6px; }
.placeholder { background: #fff7e0; border: 1px dashed #d9b24a; border-radius: 3px; padding: 1px 6px; }
.sheet { background: var(--sheet); border: 1px solid var(--line-strong); border-radius: 3px; padding: 40px; }
.sheet .tip { border: 1px solid var(--line); background: var(--paper); border-radius: 3px; padding: 18px 20px; margin: 26px 0 30px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0 36px; }
.admin-grid > div { background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; padding: 20px 22px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--sheet); border: 1px solid var(--line); }
.admin-table th { text-align: left; background: var(--paper); padding: 11px 14px; font-weight: 600; }
.admin-table td { padding: 10px 14px; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 960px) {
    .hero .wrap, .letter .wrap, .how .wrap, .questions .intro, .price .wrap, .faq .wrap, .join .wrap { grid-template-columns: 1fr; gap: 44px; }
    .how .wrap { gap: 56px; }
    .how .phone-col { order: 2; }
    .q-list { grid-template-columns: 1fr; }
    .hero { padding-bottom: 80px; }
    .letter, .questions, .faq { padding: 72px 0; }
    .how, .price, .join { padding: 80px 0; }
    .contents { margin-right: 9px; }
}
@media (max-width: 560px) {
    body { font-size: 16.5px; }
    .hero-logo { width: 170px; margin-bottom: 28px; }
    .wrap { padding: 0 20px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .form-card, .sheet { padding: 24px 20px; }
    .contents-page { padding: 24px 20px 20px; }
    .contents-page .n { display: none; }
    .hero-cta .btn { width: 100%; }
    .admin-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
}

/* ---------- Organiser area and family page ---------- */
.head-nav { display: flex; align-items: center; gap: 20px; }
.head-nav form { margin: 0; }
.link-button { background: none; border: none; padding: 0; font: 600 16px 'Figtree', sans-serif; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--ink); }
.wrap > .notice { margin: 0 0 8px; }
.app-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.app-title h1 { margin: 0; }
.crumb { font-size: 16px; color: var(--ink-soft); margin: 0 0 6px; }
.crumb a { color: var(--ink-soft); }
.tabs { display: flex; gap: 4px 26px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.tabs a { padding: 10px 0; color: var(--ink-soft); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on, .tabs a:hover { color: var(--ink); border-color: var(--green); }
.progress-line { font-size: 17px; margin: 0 0 8px; }
.dot-sep { color: var(--line-strong); margin: 0 8px; }
.chapter-block h2 { font-size: 1.45rem; margin: 34px 0 6px; }
.answer-list, .story-list { list-style: none; margin: 0; padding: 0; }
.answer-list li a, .story-list li a { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.answer-list li:last-child a, .story-list li:last-child a { border-bottom: 1px solid var(--line); }
.answer-list li a:hover .prompt, .story-list li a:hover .big { text-decoration: underline; text-underline-offset: 3px; }
.answer-list .prompt { font-family: 'Schibsted Grotesk', 'Figtree', sans-serif; font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.state { flex: none; font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.state-published { color: var(--green); font-weight: 600; }
.state-writing { color: #8a6a12; }
.story-list .big { font-size: 1.5rem; }
.choice-list { border: none; padding: 0; margin: 0 0 22px; }
.choice-list legend { font-weight: 600; margin-bottom: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; margin-bottom: 8px; cursor: pointer; }
.choice input { accent-color: var(--green); width: 18px; height: 18px; }
.field textarea, .copy-row input, .answer-form textarea, .sheet textarea {
    width: 100%; font: 400 17px/1.5 'Figtree', system-ui, sans-serif; color: var(--ink);
    padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line-strong); background: #fff; resize: vertical;
}
.q-editor .q-chapter { font-size: 1.35rem; margin: 34px 0 8px; }
.q-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.q-fields { flex: 1; }
.q-fields textarea { width: 100%; font: 400 1.05rem/1.45 'Newsreader', Georgia, serif; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--sheet); resize: vertical; }
.q-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.chapter-input { font: 400 14px 'Figtree', sans-serif; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; width: 220px; margin-left: 6px; background: #fff; }
.q-move { display: flex; flex-direction: column; gap: 6px; }
.q-move button { width: 38px; height: 36px; border: 1px solid var(--line-strong); background: #fff; border-radius: 4px; cursor: pointer; font-size: 16px; }
.q-move button:disabled { opacity: .35; cursor: default; }
.save-bar { position: sticky; bottom: 0; background: var(--paper); padding: 16px 0; margin-top: 24px; border-top: 1px solid var(--line); display: flex; gap: 14px 22px; align-items: center; flex-wrap: wrap; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { flex: 1; min-width: 0; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.share-buttons .btn { padding: 13px 18px; font-size: 16px; }
.answer-q { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2; margin: 0 0 24px; }
.parts { display: grid; gap: 12px; margin-bottom: 22px; }
.part { background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.part-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.part audio { width: 100%; }
.answer-form .field label { font-size: 17px; }
.story-text { font-family: 'Newsreader', Georgia, serif; font-size: 1.3rem; line-height: 1.65; margin: 10px 0 40px; }
.prev-next { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; font-weight: 600; }
.prev-next a { color: var(--green); }
.serif { font-family: 'Newsreader', Georgia, serif; }
@media (max-width: 560px) {
    .q-row { flex-direction: column; }
    .q-move { flex-direction: row; }
    .copy-row { flex-direction: column; }
    .chapter-input { width: 100%; margin: 4px 0 0; }
}
