:root {
  --ink: #25313a;
  --muted: #62707a;
  --paper: #fffdf8;
  --cream: #f7f1e7;
  --mist: #edf4f1;
  --sage: #486e63;
  --sage-dark: #2f5148;
  --plum: #684f73;
  --gold: #d4a95f;
  --danger: #963f46;
  --border: rgba(37, 49, 58, 0.14);
  --shadow: 0 24px 70px rgba(55, 52, 48, 0.12);
  --radius: 24px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--sage-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--plum); }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0 0 0.7em; font-family: Georgia, "Times New Roman", serif; line-height: 1.08; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.45rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #95610a; outline-offset: 4px; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.narrow { max-width: 780px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tint { background: linear-gradient(135deg, var(--cream), var(--mist)); }
.eyebrow { margin-bottom: 14px; color: var(--sage-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; transform: translateY(-150%); background: white; border-radius: 8px; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--border); background: rgba(255, 253, 248, 0.94); backdrop-filter: blur(16px); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: white; background: var(--sage); border-radius: 50%; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav > a, .link-button { color: var(--ink); font-weight: 650; text-decoration: none; }
.nav-form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; }
.nav-toggle { display: none; padding: 7px 12px; color: var(--ink); border: 1px solid var(--border); background: white; border-radius: 10px; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 22px; color: white; font-weight: 750; text-decoration: none; background: var(--sage-dark); border: 2px solid var(--sage-dark); border-radius: 999px; cursor: pointer; transition: transform 160ms ease, background 160ms ease; }
.button:hover { color: white; background: var(--plum); border-color: var(--plum); transform: translateY(-2px); }
.button-small { min-height: 40px; padding: 8px 17px; }
.button-ghost { color: var(--ink); background: transparent; border-color: var(--border); }
.button-ghost:hover { color: var(--ink); background: white; border-color: var(--ink); }
.button-light { color: var(--sage-dark); background: white; border-color: white; }
.button-light:hover { color: var(--ink); background: var(--cream); border-color: var(--cream); }
.button-block { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.text-link { font-weight: 800; }

.hero { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 148px) 0; background: radial-gradient(circle at 80% 20%, rgba(212,169,95,.22), transparent 30%), linear-gradient(145deg, #fbf6eb, #e7f0ed 72%, #eee5f0); }
.hero::before { position: absolute; width: 420px; height: 420px; content: ""; left: -210px; bottom: -260px; background: rgba(255,255,255,.55); border-radius: 50%; }
.hero-grid { display: grid; align-items: center; gap: clamp(50px, 8vw, 100px); grid-template-columns: 1.05fr .95fr; }
.hero-copy { position: relative; z-index: 1; }
.hero-lead { max-width: 670px; color: #485861; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.trust-note { color: var(--muted); font-size: .9rem; }
.book-stage { position: relative; min-height: 480px; display: grid; place-items: center; }
.demo-book { width: min(350px, 78vw); aspect-ratio: .82; padding: 13px 19px 13px 13px; transform: rotate(4deg); background: #d9cbb5; border-radius: 9px 24px 24px 9px; box-shadow: 16px 28px 55px rgba(45,45,45,.22); }
.demo-cover { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 42px 28px; color: white; text-align: center; background: radial-gradient(circle at 50% 30%, #f7dca4 0 9%, transparent 10%), radial-gradient(circle at 30% 48%, rgba(255,255,255,.25) 0 2%, transparent 2.5%), linear-gradient(160deg, #345f65, #6b5578); border-radius: 5px 17px 17px 5px; }
.demo-cover::before { width: 55%; aspect-ratio: 1; content: ""; margin-bottom: auto; border: 1px solid rgba(255,255,255,.55); border-radius: 50% 50% 42% 58%; box-shadow: 0 0 0 22px rgba(255,255,255,.05); }
.demo-cover p { margin: 0; font-size: .9rem; letter-spacing: .15em; text-transform: uppercase; }
.demo-cover strong { font: 2rem/1.05 Georgia, serif; }
.spark { position: absolute; color: var(--gold); font-size: 3rem; }
.spark-one { top: 4%; left: 3%; }
.spark-two { right: 0; bottom: 8%; }

.steps-grid { padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(4, 1fr); list-style: none; counter-reset: step; }
.steps-grid li { padding-top: 22px; border-top: 1px solid var(--border); }
.steps-grid span { width: 38px; height: 38px; display: grid; margin-bottom: 24px; place-items: center; color: white; font-weight: 800; background: var(--sage); border-radius: 50%; }
.steps-grid p, .benefit-grid p, .demo-card p { color: var(--muted); }
.benefit-grid { display: grid; gap: 18px; grid-template-columns: repeat(5, 1fr); }
.benefit-grid article { padding: 26px 22px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 20px; }
.benefit-grid article > span { display: block; margin-bottom: 18px; color: var(--plum); font-size: 1.8rem; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.centered-heading { max-width: 720px; margin-bottom: 42px; text-align: center; }

.demo-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.demo-card { padding: 14px 14px 26px; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 38px rgba(55,52,48,.07); }
.demo-card h2, .demo-card h3, .demo-card p { margin-inline: 12px; }
.demo-art { position: relative; overflow: hidden; aspect-ratio: 4/3; margin-bottom: 24px; border-radius: 16px; }
.demo-art::before, .demo-art::after { position: absolute; content: ""; border-radius: 50%; }
.demo-card-moon .demo-art { background: linear-gradient(145deg, #263f58, #866d91); }
.demo-card-moon .demo-art::before { width: 82px; height: 82px; top: 28px; right: 34px; background: #ffe7a7; box-shadow: 0 0 50px #ffe7a7; }
.demo-card-moon .demo-art::after { width: 240px; height: 100px; left: -30px; bottom: -40px; background: #65826e; box-shadow: 130px -10px 0 #78947d; }
.demo-card-stars .demo-art { background: radial-gradient(circle at 30% 30%, white 0 2px, transparent 3px), radial-gradient(circle at 70% 20%, #ffe7a7 0 3px, transparent 4px), linear-gradient(150deg, #2e315c, #496f82); background-size: 48px 48px, 75px 75px, auto; }
.demo-card-stars .demo-art::after { width: 180px; height: 80px; left: 24%; bottom: -35px; background: #b08779; }
.demo-card-valley .demo-art { background: linear-gradient(#badbd0 0 56%, #93b984 57%); }
.demo-card-valley .demo-art::before { width: 120px; height: 120px; top: 24px; left: 34px; background: rgba(255,250,204,.8); box-shadow: 140px 60px 0 #739369; }

.tariff-grid { display: grid; align-items: stretch; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.tariff-card { position: relative; padding: 34px 30px; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 36px rgba(55,52,48,.06); }
.tariff-featured { border: 2px solid var(--sage); transform: translateY(-10px); }
.tariff-badge { position: absolute; top: -15px; right: 24px; padding: 5px 12px; color: white; font-size: .78rem; font-weight: 800; background: var(--sage); border-radius: 999px; }
.tariff-spreads strong { font: 2.2rem Georgia, serif; }
.feature-list { min-height: 150px; padding: 0; list-style: none; }
.feature-list li { margin: 8px 0; }
.feature-list li::before { margin-right: 8px; color: var(--sage); content: "✓"; font-weight: 900; }
.tariff-price { min-height: 28px; color: var(--muted); font-weight: 750; }

details { margin: 0 0 12px; padding: 18px 20px; background: white; border: 1px solid var(--border); border-radius: 14px; }
summary { font-weight: 800; cursor: pointer; }
details p { margin: 12px 0 0; color: var(--muted); }
.faq-list details { margin-bottom: 14px; }
.final-cta { padding: clamp(70px, 10vw, 120px) 0; color: white; text-align: center; background: linear-gradient(135deg, var(--sage-dark), #4d475f); }
.final-cta .eyebrow { color: #dfcfaa; }
.final-cta-inner { max-width: 820px; }
.page-hero, .account-hero { padding: clamp(62px, 8vw, 104px) 0; background: linear-gradient(140deg, var(--cream), var(--mist)); }
.page-hero h1, .account-hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; font-size: 1.8rem; }

.auth-section { min-height: 72vh; display: grid; padding: 70px 16px; place-items: center; background: linear-gradient(140deg, var(--cream), var(--mist)); }
.auth-card { width: min(100%, 520px); padding: clamp(28px, 6vw, 52px); background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
.stack-form { display: grid; gap: 10px; margin-top: 26px; }
.stack-form label { margin-top: 8px; font-weight: 750; }
.stack-form input { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #9aa4a8; border-radius: 10px; }
.stack-form small, .optional { color: var(--muted); font-size: .85rem; font-weight: 400; }
.stack-form .button { margin-top: 14px; }
.form-errors, .success-message, .flash { padding: 12px 16px; border-radius: 10px; }
.form-errors { color: #6f252b; background: #fbeaec; border: 1px solid #e8b8bd; }
.form-errors ul { margin: 0; padding-left: 20px; }
.success-message { color: #214e3c; background: #e5f4ec; border: 1px solid #b7dbc9; }
.flash { margin-top: 14px; background: var(--mist); border: 1px solid var(--border); }
.auth-switch { margin: 24px 0 0; text-align: center; }

.account-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.account-grid { display: grid; align-items: start; gap: 32px; grid-template-columns: 230px 1fr; }
.account-nav { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; }
.account-nav a { padding: 13px 16px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); }
.account-nav a:last-child { border: 0; }
.account-nav a:hover, .account-nav .active { background: var(--mist); font-weight: 800; }
.account-panel, .empty-state { padding: clamp(26px, 5vw, 48px); background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(55,52,48,.06); }
.empty-state { text-align: center; }
.empty-state > span { display: block; color: var(--gold); font-size: 3rem; }
.profile-details { display: grid; gap: 10px; }
.profile-details div { display: grid; padding: 12px 0; border-bottom: 1px solid var(--border); grid-template-columns: 180px 1fr; }
.profile-details dt { color: var(--muted); }
.profile-details dd { margin: 0; font-weight: 700; }
.profile-form { max-width: 520px; margin-top: 28px; }

.questionnaire-shell { max-width: 900px; }
.wizard-progress { margin-bottom: 24px; }
.wizard-progress p { margin-bottom: 6px; }
.wizard-progress progress { width: 100%; height: 12px; accent-color: var(--sage); }
.questionnaire-form { padding: clamp(24px, 5vw, 48px); background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.wizard-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.wizard-step legend { margin-bottom: 20px; font: 700 clamp(1.8rem, 4vw, 2.7rem)/1.1 Georgia, serif; }
.step-intro, .form-note { color: var(--muted); }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label, .upload-guidance label { display: grid; gap: 6px; font-weight: 750; }
.form-grid .wide { grid-column: 1 / -1; }
.questionnaire-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .questionnaire-form textarea { width: 100%; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #9aa4a8; border-radius: 10px; }
.questionnaire-form textarea { min-height: 100px; resize: vertical; }
.questionnaire-form small { color: var(--muted); font-weight: 400; }
.check-row { display: flex !important; align-items: start; gap: 10px; padding: 14px; background: var(--mist); border-radius: 12px; }
.check-row input { width: 20px; height: 20px; flex: 0 0 auto; }
.style-grid { display: grid; gap: 14px; margin-bottom: 30px; grid-template-columns: repeat(3, 1fr); }
.style-option { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.style-option:has(input:checked) { border-color: var(--sage); box-shadow: 0 0 0 2px var(--sage); }
.style-option span { color: var(--muted); }
.upload-guidance { display: grid; gap: 18px; }
.upload-guidance h2 { font-size: 1.7rem; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.wizard-actions [hidden] { display: none; }
.order-list { display: grid; gap: 16px; }
.order-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; color: var(--ink); text-decoration: none; background: white; border: 1px solid var(--border); border-radius: 18px; }
.order-card:hover { color: var(--ink); border-color: var(--sage); }
.order-card h2 { margin-bottom: 8px; font-size: 1.5rem; }
.status-pill { display: inline-flex; padding: 7px 13px; color: #214e3c; font-weight: 800; white-space: nowrap; background: #e5f4ec; border-radius: 999px; }
.order-detail > .status-pill { margin-bottom: 20px; }
.order-message { margin-top: 28px; padding: 20px; background: var(--mist); border-radius: 14px; }
.order-message p { margin: 4px 0 0; }

.site-footer { padding: 52px 0; color: #dbe4e0; background: #243a36; }
.site-footer .brand, .site-footer a { color: white; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr auto; }
.footer-grid p { max-width: 500px; margin-top: 14px; }
.footer-grid nav { display: grid; gap: 9px; align-content: start; }

@media (max-width: 900px) {
  .hero-grid, .account-grid { grid-template-columns: 1fr; }
  .book-stage { min-height: 400px; }
  .steps-grid, .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .tariff-grid { grid-template-columns: 1fr; }
  .tariff-featured { transform: none; }
  .account-nav { grid-template-columns: repeat(3, 1fr); }
  .account-nav a { text-align: center; border-right: 1px solid var(--border); border-bottom: 0; }
}

@media (max-width: 767px) {
  .header-inner { flex-wrap: wrap; padding-block: 14px; }
  .nav-toggle { display: none; }
  .site-nav { width: 100%; flex-wrap: wrap; padding-bottom: 8px; }
  .js-enabled .nav-toggle { display: block; }
  .js-enabled .site-nav { display: none; }
  .js-enabled .site-nav.is-open { display: flex; }
  .hero-grid { gap: 30px; }
  .book-stage { min-height: 340px; }
  .demo-book { width: min(270px, 74vw); }
  .demo-grid { grid-template-columns: 1fr; }
  .section-heading-row, .account-heading { align-items: start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid, .style-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .order-card { align-items: start; flex-direction: column; }
}

@media (max-width: 520px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .steps-grid, .benefit-grid { grid-template-columns: 1fr; }
  .account-nav { grid-template-columns: 1fr; }
  .account-nav a { text-align: left; border-right: 0; border-bottom: 1px solid var(--border); }
  .profile-details div { grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
}

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