:root {
  --ink: #2d2825;
  --ink-2: #453d38;
  --paper: #f6f0e8;
  --paper-2: #fffaf4;
  --white: #fffdf9;
  --terra: #a8543f;
  --terra-deep: #88422f;
  --rose: #ead4ca;
  --sage: #6e7968;
  --sage-pale: #e3e7dd;
  --sand: #d9c8b4;
  --line: rgba(62, 49, 41, .16);
  --muted: #766b64;
  --success: #4f7057;
  --warning: #8b6125;
  --danger: #9a3e35;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --shadow: 0 22px 60px rgba(69, 50, 40, .12);
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--rose); color: var(--ink); }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.narrow { max-width: 820px; }
.centered { text-align: center; }
.section { padding: 110px 0; }
.section-tight { padding-top: 42px; }
.eyebrow { margin: 0 0 15px; color: var(--terra); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: #e9c3b5; }
.lead-small { color: var(--muted); font-size: 1.02rem; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; }
h1 { font-size: clamp(3rem, 6vw, 6.5rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2.25rem, 4.5vw, 4.6rem); letter-spacing: -.035em; }
h3 { font-size: 1.55rem; }
em { color: var(--terra); font-style: italic; }
.optional { color: var(--muted); font-size: .72rem; font-weight: 400; }

/* Shared brand and controls */
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-family: var(--serif); font-size: 1.34rem; line-height: 1; white-space: nowrap; }
.logo > span:last-child > span { color: var(--terra); }
.logo-mark { width: 19px; height: 19px; border: 2px solid currentColor; border-radius: 50% 50% 50% 15%; transform: rotate(-24deg); position: relative; }
.logo-mark::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--terra); left: 5px; top: 5px; }
.logo-inverse { color: #fff; }
.logo-inverse > span:last-child > span { color: #e7b9aa; }
.button { min-height: 52px; padding: 13px 22px; border: 1px solid transparent; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(55, 41, 34, .14); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:hover:not(:disabled) { background: #171412; }
.button-light { background: rgba(255,255,255,.72); border-color: var(--line); color: var(--ink); }
.button-soft { background: var(--paper-2); border-color: var(--line); color: var(--ink); }
.button-cream { background: #fff8ec; color: var(--ink); }
.button-outline-light { border-color: rgba(255,255,255,.46); color: #fff; background: transparent; }
.button-small { min-height: 41px; padding: 9px 16px; font-size: .75rem; }
.button-full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button-row.centered { justify-content: center; }
.text-link { color: var(--terra-deep); font-size: .82rem; font-weight: 800; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.text-link.centered { display: block; width: fit-content; margin: 16px auto 0; }
.text-button, .nav-text-button { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 700; }
.text-button:hover, .nav-text-button:hover { color: var(--terra); }
.back-link { color: var(--muted); font-size: .78rem; font-weight: 700; display: inline-block; margin-bottom: 24px; }

/* Header and footer */
.site-header { height: 84px; position: relative; z-index: 90; border-bottom: 1px solid var(--line); background: rgba(246,240,232,.92); backdrop-filter: blur(15px); }
.site-header-quiet { background: var(--paper); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.desktop-nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.desktop-nav a:hover { color: var(--terra); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-link-small { color: var(--muted); font-size: .77rem; font-weight: 700; }
.site-footer { padding: 78px 0 28px; background: #251f1c; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 50px; }
.footer-grid > div:not(.footer-brand) { display: grid; align-content: start; gap: 8px; }
.footer-grid strong { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #ddbaa9; margin-bottom: 10px; }
.footer-grid a { color: rgba(255,255,255,.68); font-size: .82rem; }
.footer-brand p { max-width: 390px; color: rgba(255,255,255,.68); font-family: var(--serif); font-size: 1.28rem; margin: 24px 0 10px; }
.footer-brand .footer-trust { font-family: var(--sans); font-size: .72rem; color: rgba(255,255,255,.46); }
.footer-bottom { margin-top: 58px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.11); display: flex; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.42); font-size: .7rem; }

/* Homepage */
.home-hero { min-height: 750px; padding: 72px 0 84px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: .94fr 1.06fr; align-items: center; gap: clamp(40px, 7vw, 100px); }
.hero-copy h1 { margin: 0; }
.hero-lead { max-width: 660px; margin-top: 26px; color: var(--muted); font-size: 1.08rem; }
.trust-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: .69rem; font-weight: 700; }
.trust-row span::before { content: "✓"; color: var(--sage); margin-right: 6px; }
.hero-art { min-height: 610px; position: relative; }
.hero-portrait-card { position: absolute; width: min(82%, 510px); height: 590px; right: 6%; top: 0; border-radius: 46% 46% 24px 24px; background: linear-gradient(to top, rgba(31,26,23,.85), transparent 50%), url('/assets/hero-portrait.jpg') center 28%/cover; box-shadow: var(--shadow); overflow: hidden; }
.portrait-caption { position: absolute; left: 34px; bottom: 28px; color: #fff; }
.portrait-caption strong { display: block; font-family: var(--serif); font-size: 1.75rem; font-weight: 400; }
.portrait-caption small { color: rgba(255,255,255,.68); }
.voice-memory-card { width: 270px; min-height: 118px; padding: 18px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; position: absolute; left: -2%; top: 112px; z-index: 2; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: rgba(255,253,249,.91); box-shadow: 0 18px 50px rgba(53,39,33,.16); backdrop-filter: blur(12px); }
.voice-memory-card strong, .voice-memory-card small { display: block; }
.voice-memory-card small { color: var(--muted); font-size: .68rem; }
.round-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--terra); color: #fff; cursor: pointer; }
.wave-line { height: 26px; display: flex; align-items: center; gap: 3px; margin-top: 6px; }
.wave-line i { display: block; width: 3px; border-radius: 3px; background: var(--sage); }
.wave-line i:nth-child(1), .wave-line i:nth-child(6) { height: 8px; }.wave-line i:nth-child(2), .wave-line i:nth-child(8) { height: 20px; }.wave-line i:nth-child(3), .wave-line i:nth-child(9) { height: 13px; }.wave-line i:nth-child(4) { height: 25px; }.wave-line i:nth-child(5), .wave-line i:nth-child(10) { height: 16px; }.wave-line i:nth-child(7) { height: 23px; }
.hero-note { width: 245px; margin: 0; padding: 25px; position: absolute; right: 0; bottom: 24px; z-index: 3; border-radius: 22px; background: #e5dfd5; color: var(--ink); font-family: var(--serif); font-size: 1.08rem; box-shadow: var(--shadow); }
.hero-note small { display: block; margin-top: 15px; color: var(--muted); font-family: var(--sans); font-size: .67rem; }
.hero-qr { width: 100px; height: 116px; padding: 14px; position: absolute; left: 4%; bottom: 20px; z-index: 2; display: grid; place-items: center; text-align: center; border-radius: 20px; background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.mini-qr { font-size: 2.4rem; line-height: .9; }
.hero-qr small { font-size: .62rem; line-height: 1.2; }
.value-strip { background: var(--ink); color: #fff; }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.value-grid > div { min-height: 118px; padding: 26px; border-right: 1px solid rgba(255,255,255,.12); display: grid; align-content: center; }
.value-grid > div:last-child { border-right: 0; }
.value-grid strong { font-family: var(--serif); font-size: 1.18rem; font-weight: 400; }
.value-grid small { color: rgba(255,255,255,.58); }
.editorial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 8vw, 110px); align-items: center; }
.editorial-photo { min-height: 620px; border-radius: 260px 260px 26px 26px; background: linear-gradient(to top, rgba(35,29,26,.82), transparent 56%), url('/assets/memory-photos.jpg') center/cover; position: relative; box-shadow: var(--shadow); }
.editorial-photo > div { position: absolute; left: 42px; right: 42px; bottom: 38px; color: #fff; }
.editorial-photo strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.editorial-photo span { color: rgba(255,255,255,.72); font-size: .78rem; }
.editorial-copy h2 { font-size: clamp(2.35rem, 4vw, 4.2rem); }
.editorial-copy > p:not(.eyebrow) { color: var(--muted); max-width: 610px; }
.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-heading.centered { margin-left: auto; margin-right: auto; }
.section-heading > p:not(.eyebrow) { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-grid article { min-height: 310px; padding: 36px; border: 1px solid var(--line); border-radius: 28px; background: var(--paper-2); }
.feature-grid article:nth-child(2) { background: var(--sage-pale); }
.feature-grid article:nth-child(3) { background: #f1ddd5; }
.feature-grid h3 { margin: 55px 0 12px; }
.feature-grid p { color: var(--muted); font-size: .86rem; }
.feature-icon { font-size: 1.55rem; color: var(--terra); }
.dark-story-section { padding: 110px 0; background: var(--ink); color: #fff; }
.family-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.family-section-grid h2 { max-width: 650px; }
.family-section-grid > div:first-child > p:not(.eyebrow) { color: rgba(255,255,255,.68); }
.warm-checks { list-style: none; padding: 0; margin: 28px 0 34px; display: grid; gap: 13px; color: rgba(255,255,255,.74); font-size: .86rem; }
.warm-checks li::before { content: "✓"; color: #dcae9c; margin-right: 10px; }
.family-orbit { width: min(100%, 520px); aspect-ratio: 1; margin: auto; position: relative; }
.orbit-ring { position: absolute; inset: 66px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.orbit-ring::after { content: ""; position: absolute; inset: 48px; border: 1px dashed rgba(255,255,255,.12); border-radius: 50%; }
.orbit-center { width: 118px; height: 118px; position: absolute; inset: 0; margin: auto; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--terra); font-family: var(--serif); font-size: 1.2rem; }
.person-dot { width: 100px; height: 100px; border-radius: 50%; position: absolute; display: grid; place-items: end center; padding-bottom: 7px; border: 5px solid var(--ink); background: linear-gradient(to top, rgba(31,27,25,.8), transparent), url('/assets/family-generations.jpg') center/cover; font-size: .65rem; }
.person-one { top: 10px; left: calc(50% - 50px); }.person-two { right: 12px; top: calc(50% - 50px); background-position: 30% center; }.person-three { bottom: 10px; left: calc(50% - 50px); background-position: 70% center; }.person-four { left: 12px; top: calc(50% - 50px); background-position: 10% center; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: steps; }
.steps-grid article { padding: 30px 28px 36px; border-top: 1px solid var(--line); }
.steps-grid span { color: var(--terra); font-size: .72rem; font-weight: 800; }
.steps-grid h3 { margin: 45px 0 13px; }
.steps-grid p { color: var(--muted); font-size: .83rem; }
.qr-section { background: #eee5d9; }
.qr-home-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 90px; }
.plaque-scene { min-height: 600px; display: grid; place-items: center; position: relative; border-radius: 40px; background: radial-gradient(circle at top, #fff8ee, #d7d9cb 58%, #b6c0ad); overflow: hidden; }
.plaque-shadow { width: 330px; height: 520px; border-radius: 170px 170px 28px 28px; background: #81746a; opacity: .34; position: absolute; transform: translate(25px, 20px) rotate(5deg); }
.plaque-card { width: 310px; min-height: 500px; padding: 45px 36px; border-radius: 160px 160px 26px 26px; background: var(--ink); color: #fff; text-align: center; position: relative; box-shadow: 0 35px 70px rgba(43,37,33,.28); }
.plaque-card::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.14); border-radius: inherit; }
.plaque-brand { font-family: var(--serif); font-size: .82rem; }
.plaque-code { width: 210px; height: 210px; margin: 48px auto 26px; display: grid; place-items: center; border-radius: 20px; background: #fffdf8; color: var(--ink); font-size: 8rem; line-height: 1; }
.plaque-card strong { display: block; font-family: var(--serif); font-size: 1.16rem; font-weight: 400; }
.plaque-card small { display: block; margin-top: 12px; color: rgba(255,255,255,.55); font-size: .64rem; }
.large-copy { color: var(--muted); font-size: 1.05rem; }
.qr-facts { margin: 28px 0 34px; display: grid; gap: 18px; }
.qr-facts > div { padding-left: 19px; border-left: 2px solid var(--terra); }
.qr-facts strong, .qr-facts small { display: block; }
.qr-facts strong { font-family: var(--serif); font-size: 1.08rem; font-weight: 400; }
.qr-facts small { color: var(--muted); }
.trust-section { padding: 95px 0; background: var(--paper-2); }
.trust-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.trust-points { display: grid; gap: 22px; }
.trust-points p { padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); }
.trust-points strong { color: var(--ink); }
.home-cta { padding: 100px 0; background: var(--terra); color: #fff; text-align: center; }
.cta-inner { max-width: 850px; }
.cta-inner p:not(.eyebrow) { max-width: 670px; margin-left: auto; margin-right: auto; color: rgba(255,255,255,.74); }

/* Forms and authentication */
.form-stack { display: grid; gap: 12px; margin-top: 30px; }
.form-heading { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-bottom: 8px; }
.form-heading h2 { font-size: 1.85rem; margin-bottom: 6px; }
.form-heading p { color: var(--muted); font-size: .84rem; }
.step-badge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800; }
.field-label { display: block; margin-top: 7px; color: var(--ink); font-size: .74rem; font-weight: 800; }
.text-input { width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; outline: 0; background: #fffdf9; color: var(--ink); }
.text-input:focus { border-color: var(--terra); box-shadow: 0 0 0 4px rgba(168,84,63,.09); }
.text-input[readonly] { background: #eee8df; color: var(--muted); }
.activation-input { letter-spacing: .16em; font-weight: 800; text-transform: uppercase; }
.code-input { min-height: 70px; text-align: center; letter-spacing: .38em; font-size: 1.8rem; font-weight: 800; }
textarea.text-input { resize: vertical; line-height: 1.6; }
.textarea-medium { min-height: 125px; }
.textarea-large { min-height: 185px; }
.field-help, .security-note { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.form-message { margin: 3px 0; color: var(--success); font-size: .76rem; }
.form-warning { padding: 10px 12px; border-radius: 12px; background: #fff0d1; color: var(--warning); font-size: .73rem; }
.form-error { padding: 10px 12px; margin: 3px 0; border-radius: 12px; background: #fae3df; color: var(--danger); font-size: .76rem; }
.dev-code { padding: 10px 12px; border-radius: 12px; background: var(--sage-pale); font-size: .76rem; }
.turnstile-slot { min-height: 65px; margin-top: 4px; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-art { min-height: 100vh; padding: 44px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.auth-art-login { background: linear-gradient(to top, rgba(31,26,23,.9), rgba(31,26,23,.08)), url('/assets/family-generations.jpg') center/cover; }
.auth-logo { width: fit-content; }
.auth-quote { max-width: 630px; }
.auth-quote p { font-family: var(--serif); font-size: clamp(1.8rem, 3.3vw, 3.45rem); line-height: 1.1; }
.auth-quote small { color: rgba(255,255,255,.62); }
.auth-panel { padding: 60px clamp(28px, 6vw, 90px); display: grid; align-items: center; background: var(--paper-2); }
.auth-panel-inner { width: min(100%, 570px); margin: auto; }
.auth-panel-inner > h1 { font-size: clamp(3rem, 5vw, 5.1rem); margin-bottom: 18px; }
.auth-foot { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }
.claim-page { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; }
.claim-intro { padding: 44px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(to top, rgba(33,28,25,.93), rgba(33,28,25,.16)), url('/assets/hero-portrait.jpg') center 28%/cover; }
.claim-logo { width: fit-content; }
.claim-intro-copy { max-width: 650px; margin-top: auto; }
.claim-intro-copy h1 { font-size: clamp(3.2rem, 5vw, 5.7rem); }
.claim-intro-copy > p:not(.eyebrow) { color: rgba(255,255,255,.72); }
.claim-code { width: fit-content; margin: 28px 0; padding: 13px 18px; border: 1px solid rgba(255,255,255,.26); border-radius: 16px; background: rgba(255,255,255,.1); }
.claim-code span, .claim-code strong { display: block; }
.claim-code span { color: rgba(255,255,255,.58); font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; }
.claim-code strong { font-size: 1.3rem; letter-spacing: .08em; }
.claim-reassurance { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.claim-reassurance > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #d8b3a4; color: var(--ink); }
.claim-reassurance p { color: rgba(255,255,255,.65); font-size: .76rem; }
.claim-form-panel { padding: 60px clamp(28px, 6vw, 90px); display: grid; align-items: center; background: var(--paper-2); }
.large-icon { display: inline-grid; width: 72px; height: 72px; place-items: center; border-radius: 50%; background: var(--sage-pale); color: var(--sage); font-size: 2rem; margin-bottom: 18px; }

/* Onboarding */
.onboarding-page { min-height: 100vh; display: grid; grid-template-columns: .7fr 1.3fr; }
.onboarding-side { min-height: 100vh; padding: 46px clamp(28px, 4.5vw, 70px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(to top, rgba(33,28,25,.9), rgba(33,28,25,.24)), url('/assets/family-generations.jpg') center/cover; }
.onboarding-side h2 { font-size: clamp(2.3rem, 4vw, 4.25rem); }
.onboarding-side p:not(.eyebrow) { color: rgba(255,255,255,.7); }
.onboarding-side blockquote { margin: 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.2); font-family: var(--serif); color: rgba(255,255,255,.72); }
.onboarding-main { padding: 55px clamp(24px, 6vw, 90px); display: grid; place-items: center; background: var(--paper-2); }
.onboarding-card { width: min(100%, 830px); padding: clamp(28px, 5vw, 62px); border: 1px solid var(--line); border-radius: 34px; background: #fffdf9; box-shadow: var(--shadow); }
.onboarding-card h1 { font-size: clamp(2.65rem, 4.6vw, 4.8rem); }
.onboarding-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 34px; }
.onboarding-progress span { height: 4px; border-radius: 4px; background: #e7ded4; }
.onboarding-progress span.active { background: var(--terra); }
.connected-banner { margin-bottom: 30px; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border-radius: 16px; background: var(--sage-pale); }
.connected-banner > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: #fff; }
.connected-banner strong, .connected-banner small { display: block; }
.connected-banner small { color: var(--muted); }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0; }
.journey-choice { min-height: 230px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; text-align: left; background: #fff; cursor: pointer; }
.journey-choice:hover, .journey-choice.selected { border-color: var(--terra); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(71,51,42,.1); }
.choice-dot { width: 28px; height: 28px; display: block; margin-bottom: 45px; border: 1px solid var(--line); border-radius: 50%; }
.journey-choice.selected .choice-dot { border: 8px solid var(--terra); }
.journey-choice strong, .journey-choice small { display: block; }
.journey-choice strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.journey-choice small { margin-top: 9px; color: var(--muted); line-height: 1.45; }
.field-grid { display: grid; gap: 16px; margin: 28px 0; }
.field-grid.two, .field-grid:has(> div:nth-child(2)) { grid-template-columns: 1fr 1fr; }
.privacy-fieldset { margin: 25px 0; padding: 0; border: 0; }
.privacy-fieldset legend { margin-bottom: 12px; font-size: .76rem; font-weight: 800; }
.privacy-fieldset label { margin-bottom: 10px; padding: 15px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.privacy-fieldset input { margin-top: 4px; accent-color: var(--terra); }
.privacy-fieldset strong, .privacy-fieldset small { display: block; }
.privacy-fieldset small { color: var(--muted); }
.form-actions { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.form-actions.right { justify-content: flex-end; }

/* Dashboard and editor */
.dashboard-page, .editor-page, .admin-page { min-height: 70vh; }
.dashboard-hero { padding: 70px 0 55px; background: #ece2d7; }
.dashboard-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; }
.dashboard-heading h1, .editor-top h1, .admin-heading h1 { font-size: clamp(3rem, 5.7vw, 6rem); margin-bottom: 10px; }
.dashboard-heading p:not(.eyebrow), .editor-top p:not(.eyebrow), .admin-heading p:not(.eyebrow) { color: var(--muted); }
.dashboard-content { padding: 55px 0 100px; }
.story-list { display: grid; gap: 24px; }
.story-dashboard-card { min-height: 300px; display: grid; grid-template-columns: 330px 1fr; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--paper-2); box-shadow: 0 14px 38px rgba(61,45,37,.07); }
.story-card-art { min-height: 300px; position: relative; display: grid; place-items: center; background: var(--sage-pale); }
.story-card-art span { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.5); font-family: var(--serif); font-size: 4rem; color: var(--sage); }
.story-card-art small { position: absolute; left: 20px; bottom: 18px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.75); font-size: .64rem; font-weight: 800; }
.story-card-art.art-2 { background: #ead7ce; }.story-card-art.art-2 span { color: var(--terra); }.story-card-art.art-3 { background: #ddd5c8; }
.story-card-copy { padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; }
.story-card-copy h2 { font-size: 2.5rem; margin-bottom: 12px; }
.story-card-copy > p { color: var(--muted); }
.story-card-top, .story-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; }
.story-card-top small { color: var(--muted); }
.story-card-actions { margin-top: 20px; justify-content: flex-start; }
.status-pill { width: fit-content; padding: 5px 10px; border-radius: 999px; background: var(--sage-pale); color: var(--sage); font-size: .65rem; font-weight: 800; text-transform: capitalize; }
.status-unclaimed { background: #eee4d7; color: #7d604a; }.status-reserved { background: #fff0d1; color: #8a6124; }.status-claimed { background: var(--sage-pale); color: var(--success); }.status-suspended { background: #fae3df; color: var(--danger); }
.empty-dashboard { max-width: 640px; margin: 50px auto; text-align: center; }
.empty-memory { font-family: var(--serif); font-size: 7rem; line-height: .8; color: var(--terra); }
.empty-dashboard p { color: var(--muted); }
.editor-page, .admin-page { padding-bottom: 95px; }
.editor-top, .admin-heading { padding: 58px 0 40px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.editor-top-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.editor-top-meta span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .66rem; text-transform: capitalize; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.editor-main { display: grid; gap: 20px; }
.editor-card { padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper-2); box-shadow: 0 12px 35px rgba(61,45,37,.06); }
.card-heading { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-bottom: 26px; }
.card-heading > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: .65rem; }
.card-heading h2 { font-size: 1.9rem; margin-bottom: 5px; }
.card-heading p { color: var(--muted); font-size: .78rem; }
.sticky-card { position: sticky; top: 105px; display: grid; gap: 10px; }
.qr-summary { margin: 14px 0; padding: 14px; display: grid; grid-template-columns: 92px 1fr; gap: 13px; align-items: center; border-radius: 18px; background: #eee6dc; }
.qr-summary img { width: 92px; height: 92px; border-radius: 10px; }
.qr-summary strong, .qr-summary small { display: block; }
.qr-summary small { color: var(--muted); font-size: .68rem; }
.qr-summary .button { grid-column: 1 / -1; }
.cover-uploader { display: grid; grid-template-columns: 290px 1fr; gap: 26px; align-items: center; }
.cover-preview { min-height: 250px; border-radius: 24px; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--muted); background: #e8dfd3 center/cover no-repeat; }
.cover-uploader h3 { margin-bottom: 8px; }
.cover-uploader p { color: var(--muted); font-size: .78rem; }

/* QR admin */
.admin-heading { max-width: 850px; }
.admin-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 22px; align-items: start; }
.admin-results { min-height: 520px; }
.admin-recent { grid-column: 1 / -1; }
.critical-note { margin: 15px 0; padding: 13px 15px; border-radius: 13px; background: #fff0d1; color: var(--warning); font-size: .76rem; }
.generated-codes { margin-top: 20px; display: grid; gap: 10px; max-height: 580px; overflow: auto; }
.generated-codes article { padding: 12px; display: grid; grid-template-columns: 82px minmax(0,1fr) auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.generated-codes img { width: 82px; border-radius: 8px; }
.generated-codes strong, .generated-codes small, .generated-codes code { display: block; }
.generated-codes code { color: var(--muted); font-size: .65rem; overflow-wrap: anywhere; }
.mini-actions { display: grid; gap: 4px; }
.mini-actions a { padding: 5px 8px; border-radius: 8px; background: var(--paper); font-size: .64rem; font-weight: 800; }
.empty-illustration { min-height: 330px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-illustration span { font-size: 5rem; color: var(--sand); }
.empty-illustration p { max-width: 460px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .76rem; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
td a { color: var(--terra-deep); font-weight: 800; }

/* QR states */
.qr-state-page { min-height: 100vh; padding: 35px; display: grid; place-items: center; background: radial-gradient(circle at top, #fff9ef, #dcd8cf 58%, #b8c1b1); }
.qr-state-card { width: min(100%, 600px); padding: clamp(34px, 7vw, 70px); border-radius: 36px; background: rgba(255,253,249,.94); text-align: center; box-shadow: var(--shadow); }
.qr-state-symbol { width: 105px; height: 105px; margin: 40px auto 25px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-pale); color: var(--sage); font-size: 2.6rem; }
.qr-state-card h1 { font-size: clamp(2.7rem, 6vw, 4.5rem); }
.qr-state-card > p:not(.eyebrow) { color: var(--muted); }
.qr-state-card > small { display: block; margin-top: 23px; color: var(--muted); }
.private-story-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.private-story-art { padding: 46px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(to top, rgba(31,26,23,.91), rgba(31,26,23,.18)), url('/assets/hero-portrait.jpg') center/cover; }
.private-story-art h1 { font-size: clamp(4rem, 7vw, 7rem); }
.private-story-art p:not(.eyebrow) { color: rgba(255,255,255,.7); }
.private-story-panel { padding: 50px clamp(28px, 7vw, 95px); display: grid; place-items: center; background: var(--paper-2); text-align: center; }
.private-story-panel > div { max-width: 510px; }
.private-story-panel h2 { font-size: 2.5rem; }
.private-story-panel p { color: var(--muted); }

/* Published story */
.published-story { background: #f3ece3; }
.story-cover { min-height: 88vh; padding: 30px 0 70px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background-position: center 25%; background-size: cover; }
.sample-cover { background-image: linear-gradient(to top, rgba(31,27,25,.92), rgba(31,27,25,.08) 68%), url('/assets/hero-portrait.jpg'); }
.story-cover-top { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.story-brand-link { color: rgba(255,255,255,.68); font-size: .72rem; font-weight: 700; }
.story-cover-copy { margin-top: auto; }
.story-cover-copy h1 { font-size: clamp(4.5rem, 10vw, 9rem); margin-bottom: 6px; }
.story-dates { font-family: var(--serif); font-size: 1.4rem; color: rgba(255,255,255,.7); }
.story-intro { max-width: 780px; font-family: var(--serif); font-size: clamp(1.25rem, 2.1vw, 1.85rem); color: rgba(255,255,255,.82); }
.story-nav { position: sticky; top: 0; z-index: 70; border-bottom: 1px solid var(--line); background: rgba(246,240,232,.94); backdrop-filter: blur(15px); }
.story-nav .shell { min-height: 62px; display: flex; align-items: center; gap: 25px; overflow: auto; }
.story-nav a { white-space: nowrap; color: var(--muted); font-size: .74rem; font-weight: 800; }
.story-section { padding: 100px 0; }
.story-paper { background: var(--paper-2); }
.story-opening { display: grid; grid-template-columns: .95fr 1.05fr; gap: 90px; }
.story-opening blockquote { margin: 35px 0 18px; font-family: var(--serif); font-size: clamp(2rem, 4vw, 4rem); line-height: 1.09; }
.story-opening blockquote::before { content: "“"; display: block; margin-bottom: -10px; color: var(--terra); font-size: 6rem; line-height: .6; }
.story-opening > div > small { color: var(--muted); }
.story-prose { color: var(--ink-2); font-family: var(--serif); font-size: 1.18rem; }
.voice-placeholder { margin-top: 30px; padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; border-radius: 22px; background: var(--ink); color: #fff; font-family: var(--sans); }
.voice-placeholder button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--terra); color: #fff; }
.voice-placeholder strong, .voice-placeholder small { display: block; }
.voice-placeholder small { color: rgba(255,255,255,.58); font-size: .68rem; }
.voice-placeholder.active { grid-template-columns: auto 1fr auto; }
.voice-wave { color: #d5aaa0; letter-spacing: 3px; }
.chapter-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.chapter-grid article { min-height: 390px; border-radius: 28px; overflow: hidden; }
.chapter-photo { position: relative; background-size: cover; background-position: center; }
.chapter-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(32,27,24,.88), transparent 60%); }
.chapter-childhood { background-image: url('/assets/memory-photos.jpg'); }
.chapter-family { background-image: url('/assets/family-generations.jpg'); grid-column: 1 / -1; min-height: 470px !important; }
.chapter-photo > div { position: absolute; z-index: 2; left: 34px; right: 34px; bottom: 28px; color: #fff; }
.chapter-photo span, .chapter-paper > span { font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.chapter-photo h3 { margin: 8px 0; font-size: 2.2rem; }
.chapter-photo p { color: rgba(255,255,255,.68); }
.chapter-paper { padding: 38px; background: #ead9cf; }
.chapter-paper blockquote { margin: 70px 0 0; font-family: var(--serif); font-size: 2rem; line-height: 1.16; }
.memory-wall { columns: 3; column-gap: 18px; }
.memory-wall article { break-inside: avoid; margin-bottom: 18px; padding: 27px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.memory-wall article:nth-child(2n) { background: var(--sage-pale); }
.memory-wall article:nth-child(3n) { background: #ead9d1; }
.memory-wall span { color: var(--terra); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.memory-wall h3 { margin: 12px 0 4px; }
.memory-wall p { font-family: var(--serif); font-size: 1.12rem; }
.memory-wall small { color: var(--muted); }
.contribute-card { padding: clamp(35px, 6vw, 68px); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; border-radius: 38px; background: var(--sage); color: #fff; }
.contribute-card h2 { font-size: clamp(2.2rem, 4vw, 4rem); }
.contribute-card p:not(.eyebrow) { color: rgba(255,255,255,.7); }
.story-footer { padding: 45px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--ink); color: rgba(255,255,255,.55); font-size: .72rem; }

/* Simple and legal pages */
.simple-page { min-height: calc(100vh - 84px); padding: 100px 0; display: grid; place-items: center; }
.simple-page h1 { font-size: clamp(3rem, 6vw, 6rem); }
.simple-page p { color: var(--muted); }
.legal-page { padding: 95px 0 120px; }
.legal-page h1 { font-size: clamp(3.1rem, 6vw, 6rem); }
.legal-page h2 { margin-top: 45px; font-size: 2rem; }
.legal-page p { color: var(--muted); }
.legal-intro { font-family: var(--serif); font-size: 1.3rem; color: var(--ink-2) !important; }

@media (max-width: 1080px) {
  .desktop-nav { display: none; }
  .hero-grid, .editorial-grid, .family-section-grid, .qr-home-grid, .trust-grid, .story-opening { grid-template-columns: 1fr; }
  .hero-art { width: min(100%, 690px); margin: auto; }
  .editorial-photo { min-height: 560px; }
  .family-section-grid { gap: 35px; }
  .qr-home-grid { gap: 50px; }
  .plaque-scene { width: min(100%, 680px); margin: auto; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-recent { grid-column: auto; }
  .onboarding-page { grid-template-columns: .8fr 1.2fr; }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 30px), var(--shell)); }
  .site-header { height: 74px; }
  .header-actions .nav-link-small, .header-actions .nav-text-button { display: none; }
  .header-actions { gap: 7px; }
  .header-actions .button { padding: 8px 13px; }
  .home-hero { padding-top: 45px; }
  .hero-art { min-height: 560px; }
  .hero-portrait-card { height: 530px; width: 82%; right: 2%; }
  .voice-memory-card { width: 230px; left: 0; }
  .hero-note { width: 210px; right: 0; }
  .value-grid { grid-template-columns: 1fr 1fr; }
  .value-grid > div:nth-child(2) { border-right: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 240px; }
  .feature-grid h3 { margin-top: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .auth-page, .claim-page, .private-story-page { grid-template-columns: 1fr; }
  .auth-art { min-height: 440px; }
  .claim-intro { min-height: 600px; }
  .private-story-art { min-height: 620px; }
  .onboarding-page { grid-template-columns: 1fr; }
  .onboarding-side { min-height: 520px; }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-choice { min-height: auto; }
  .choice-dot { margin-bottom: 20px; }
  .dashboard-heading, .editor-top { align-items: start; flex-direction: column; }
  .story-dashboard-card { grid-template-columns: 1fr; }
  .story-card-art { min-height: 220px; }
  .cover-uploader { grid-template-columns: 1fr; }
  .cover-preview { min-height: 330px; }
  .story-cover-top { width: min(calc(100% - 30px), var(--shell)); }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-family { grid-column: auto; }
  .memory-wall { columns: 2; }
  .contribute-card { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .section { padding: 76px 0; }
  .logo { font-size: 1.13rem; }
  .header-actions .button { font-size: .68rem; }
  .hero-copy h1 { font-size: 3.35rem; }
  .button-row .button { width: 100%; }
  .trust-row { gap: 10px 14px; }
  .hero-art { min-height: 505px; }
  .hero-portrait-card { width: 90%; height: 470px; }
  .voice-memory-card { width: 205px; top: 68px; padding: 14px; }
  .hero-note { width: 180px; padding: 18px; font-size: .92rem; }
  .hero-qr { width: 83px; height: 101px; left: 0; }
  .value-grid { grid-template-columns: 1fr; }
  .value-grid > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .editorial-photo { min-height: 450px; border-radius: 220px 220px 22px 22px; }
  .family-orbit { transform: scale(.9); }
  .steps-grid { grid-template-columns: 1fr; }
  .plaque-scene { min-height: 535px; }
  .plaque-card { width: 270px; min-height: 450px; }
  .plaque-shadow { width: 285px; height: 470px; }
  .plaque-code { width: 180px; height: 180px; font-size: 6.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .auth-art, .claim-intro, .onboarding-side, .private-story-art { padding: 32px 22px; }
  .auth-panel, .claim-form-panel, .onboarding-main, .private-story-panel { padding: 45px 20px; }
  .onboarding-card { padding: 28px 20px; border-radius: 24px; }
  .field-grid.two, .field-grid:has(> div:nth-child(2)) { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .dashboard-heading .button { width: 100%; }
  .story-card-copy { padding: 28px 22px; }
  .editor-card { padding: 22px 18px; }
  .generated-codes article { grid-template-columns: 70px 1fr; }
  .mini-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .qr-summary { grid-template-columns: 74px 1fr; }
  .qr-summary img { width: 74px; height: 74px; }
  .qr-state-page { padding: 14px; }
  .qr-state-card { border-radius: 26px; }
  .story-cover { min-height: 78vh; }
  .story-cover-copy h1 { font-size: 4rem; }
  .story-nav .shell { width: calc(100% - 24px); }
  .story-section { padding: 72px 0; }
  .memory-wall { columns: 1; }
  .voice-placeholder.active { grid-template-columns: auto 1fr; }
  .voice-wave { grid-column: 1 / -1; }
  .story-footer { flex-direction: column; align-items: flex-start; padding: 35px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
