:root {
  --ink: #203047;
  --muted: #65748b;
  --paper: #fffaf1;
  --surface: #ffffff;
  --sun: #ffd35a;
  --sun-dark: #f6a800;
  --mint: #8be7c7;
  --mint-dark: #20a985;
  --coral: #ff7d7d;
  --sky: #6fc9ff;
  --lavender: #bba7ff;
  --line: rgba(32, 48, 71, 0.13);
  --shadow: 0 22px 70px rgba(41, 50, 82, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff7e6;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(255, 250, 241, 0.9);
  border-bottom: 1px solid rgba(32, 48, 71, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #17314d;
  background: linear-gradient(135deg, var(--sun), var(--mint));
  border: 2px solid rgba(32, 48, 71, 0.14);
  border-radius: 8px;
  box-shadow: 0 5px 0 rgba(32, 48, 71, 0.12);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  color: #46566d;
  font-size: 0.95rem;
  font-weight: 700;
}

.main-nav a,
.nav-cta {
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.nav-cta:hover {
  color: var(--mint-dark);
  transform: translateY(-1px);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #17314d;
  font-weight: 800;
  background: var(--sun);
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 5px 0 rgba(32, 48, 71, 0.12);
  cursor: pointer;
}

.nav-cta.secondary {
  background: #fff;
  box-shadow: none;
}

.account-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.credits-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: #126653;
  font-size: 0.84rem;
  font-weight: 900;
  background: #dcfff4;
  border: 1px solid rgba(32, 169, 133, 0.2);
  border-radius: 8px;
}

.section,
.section-band,
.cta-section {
  padding: clamp(70px, 8vw, 110px) clamp(20px, 5vw, 72px);
}

.section {
  background: #fff;
}

.section-band {
  background:
    radial-gradient(circle at 9% 14%, rgba(255, 211, 90, 0.42), transparent 30%),
    linear-gradient(180deg, #fff7e6 0%, #fffdf8 100%);
}

.section-band.soft {
  background:
    linear-gradient(90deg, rgba(139, 231, 199, 0.24), rgba(111, 201, 255, 0.18)),
    #f8fffb;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  align-items: center;
  gap: clamp(36px, 5vw, 76px);
  min-height: min(760px, calc(100vh - 76px));
  padding-top: clamp(34px, 5vw, 66px);
  padding-bottom: clamp(28px, 4vw, 52px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #197b68;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 15px 0 0 var(--sun), 30px 0 0 var(--sky);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.price {
  font-family: "Baloo 2", Inter, sans-serif;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 5.3vw, 5.15rem);
  font-weight: 800;
  line-height: 1;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 4vw, 4.1rem);
  font-weight: 800;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  font-weight: 800;
}

.hero-lede,
.section-heading p,
.split-section p,
.feature-list p,
.steps p,
.price-card p,
.faq-grid p {
  color: var(--muted);
  line-height: 1.68;
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 22px;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions,
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.trust-row {
  margin-top: 18px;
  color: #46566d;
  font-size: 0.94rem;
  font-weight: 700;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-row span::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--mint-dark);
  border-radius: 50%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button.primary {
  color: #193049;
  background: linear-gradient(135deg, var(--sun), #ffbf45);
  box-shadow: 0 8px 0 rgba(189, 116, 0, 0.23);
}

.button.secondary {
  color: #17314d;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.14);
  box-shadow: 0 8px 0 rgba(32, 48, 71, 0.09);
}

.button.small {
  min-height: 40px;
  padding: 0 14px;
  color: #17314d;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.12);
}

.button.full {
  width: 100%;
}

.hero-visual {
  position: relative;
}

.hero-visual::after {
  position: absolute;
  right: 5%;
  bottom: -18px;
  width: 86%;
  height: 28px;
  content: "";
  background: rgba(32, 48, 71, 0.16);
  border-radius: 50%;
  filter: blur(16px);
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 10px solid #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 14px;
  padding: 20px clamp(20px, 5vw, 72px) 34px;
  background: #fffdf8;
}

.quick-tools a {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: #273a54;
  font-weight: 800;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.11);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(41, 50, 82, 0.07);
}

.tool-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #17314d;
  font-size: 0.86rem;
  font-weight: 900;
  background: #e7fff7;
  border-radius: 8px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto clamp(34px, 5vw, 56px);
  text-align: center;
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.builder-panel,
.preview-panel,
.price-card,
.steps article,
.feature-list article,
.faq-grid details,
.template-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(41, 50, 82, 0.08);
}

.builder-panel {
  display: grid;
  gap: 18px;
  align-self: start;
  padding: 22px;
}

label,
legend {
  color: #2d415c;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid rgba(32, 48, 71, 0.18);
  border-radius: var(--radius);
  font: inherit;
}

input:focus,
select:focus {
  outline: 3px solid rgba(111, 201, 255, 0.35);
  border-color: var(--sky);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(32, 48, 71, 0.14);
  border-radius: var(--radius);
}

.form-note,
.auth-message,
.generated-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--mint-dark);
}

.preview-panel {
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 211, 90, 0.24), rgba(139, 231, 199, 0.16)),
    #fff;
}

.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.preview-header h3 {
  margin-bottom: 0;
  word-break: break-word;
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: #126653;
  font-size: 0.78rem;
  font-weight: 900;
  background: #dcfff4;
  border: 1px solid rgba(32, 169, 133, 0.2);
  border-radius: 8px;
}

.book-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.generated-result {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(32, 48, 71, 0.08);
}

.generation-progress {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(32, 48, 71, 0.1);
}

.generation-progress[hidden] {
  display: none;
}

.generation-progress h4 {
  margin: 2px 0 12px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.35rem;
}

.progress-orbit {
  position: relative;
  width: 86px;
  height: 86px;
  border: 4px solid rgba(139, 231, 199, 0.45);
  border-radius: 50%;
  animation: spin 1.8s linear infinite;
}

.progress-orbit::after {
  content: "";
  position: absolute;
  inset: 18px;
  background: linear-gradient(135deg, var(--sun), var(--sky));
  border-radius: 50%;
}

.progress-orbit span {
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--coral);
  border-radius: 50%;
}

.progress-orbit span:nth-child(1) { top: -7px; left: 34px; }
.progress-orbit span:nth-child(2) { right: 1px; bottom: 13px; background: var(--mint); }
.progress-orbit span:nth-child(3) { left: 4px; bottom: 10px; background: var(--sky); }

.progress-bar {
  height: 10px;
  overflow: hidden;
  background: #edf5f8;
  border-radius: 999px;
}

.progress-bar span {
  display: block;
  width: 16%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint));
  border-radius: inherit;
  transition: width 0.45s ease;
}

#progressSteps {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

#progressSteps li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: #c6d3df;
  border-radius: 50%;
}

#progressSteps li.active {
  color: #126653;
}

#progressSteps li.active::before {
  background: var(--mint-dark);
  box-shadow: 0 0 0 5px rgba(32, 169, 133, 0.12);
}

#progressSteps li.complete {
  color: #36506f;
}

#progressSteps li.complete::before {
  background: var(--sky);
}

.generation-progress.is-complete .progress-bar span {
  background: linear-gradient(90deg, var(--mint-dark), var(--mint));
}

.generation-progress.is-error .progress-bar span {
  background: linear-gradient(90deg, var(--coral), #ffb0b0);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.generated-result[hidden] {
  display: none;
}

.generated-result h4 {
  margin: 0;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.45rem;
}

.generated-result img {
  width: min(100%, 420px);
  aspect-ratio: 1;
  object-fit: contain;
  background: #fffdf8;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
}

.generated-actions {
  margin-top: 2px;
}

.generated-pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.generated-page-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  min-height: 74px;
  align-items: center;
  padding: 10px;
  color: #203047;
  background: #fffdf8;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: 8px;
}

.generated-page-card span {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #126653;
  background: #dcfff4;
  border-radius: 8px;
  font-weight: 900;
}

.generated-page-card strong,
.generated-page-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.generated-page-card small {
  color: var(--muted);
  font-weight: 800;
}

.generated-page-card.muted-card {
  display: flex;
  color: var(--muted);
  font-weight: 900;
  justify-content: center;
  text-align: center;
}

.sample-page {
  position: relative;
  min-height: 280px;
  padding: 22px;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid rgba(32, 48, 71, 0.13);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(32, 48, 71, 0.09);
}

.page-label {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 9px;
  color: #36506f;
  font-size: 0.75rem;
  font-weight: 900;
  background: #edf9ff;
  border-radius: 8px;
}

.cover-page {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #17314d;
  background:
    radial-gradient(circle at 68% 74%, rgba(111, 201, 255, 0.45), transparent 28%),
    linear-gradient(145deg, #fff2b7, #dffff4);
}

.cover-page h4 {
  max-width: 14ch;
  margin-bottom: 8px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 0.98;
  word-break: break-word;
}

.cover-page p {
  color: #39506d;
  font-weight: 800;
}

.cover-shapes {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(2, 38px);
  gap: 8px;
}

.cover-shapes span {
  width: 38px;
  height: 38px;
  background: var(--coral);
  border: 3px solid rgba(32, 48, 71, 0.11);
  border-radius: 50%;
}

.cover-shapes span:nth-child(2) {
  background: var(--sky);
  border-radius: 8px;
}

.cover-shapes span:nth-child(3) {
  grid-column: span 2;
  width: 82px;
  background: var(--lavender);
  border-radius: 999px;
}

.line-art {
  display: grid;
  gap: 12px;
  max-width: 220px;
}

.line-art span {
  display: block;
  height: 26px;
  border: 3px solid #273a54;
  border-radius: 999px;
}

.line-art span:nth-child(2) {
  width: 74%;
}

.line-art span:nth-child(3) {
  width: 58%;
}

.maze-art {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: min(44%, 150px);
  aspect-ratio: 1;
  background:
    linear-gradient(90deg, #273a54 8px, transparent 8px) 0 0 / 34px 34px,
    linear-gradient(#273a54 8px, transparent 8px) 0 0 / 34px 34px;
  border: 8px solid #273a54;
  border-radius: 8px;
  opacity: 0.88;
}

.plan-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.plan-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  color: #334861;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(32, 48, 71, 0.1);
  border-radius: var(--radius);
  font-weight: 700;
}

.plan-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  background: var(--coral);
  border-radius: 50%;
}

.download-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  color: #36506f;
  background: #fff;
  border: 1px dashed rgba(32, 48, 71, 0.22);
  border-radius: var(--radius);
  font-weight: 800;
}

.steps,
.pricing-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.steps article,
.price-card {
  padding: 24px;
}

.compact-steps {
  grid-template-columns: 1fr;
}

.compact-steps article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: start;
}

.compact-steps article span {
  grid-row: span 2;
  margin-bottom: 0;
}

.compact-steps article h3 {
  margin-bottom: 0;
}

.compact-steps article p {
  margin-bottom: 0;
}

.steps span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  color: #17314d;
  font-weight: 900;
  background: var(--sun);
  border-radius: 8px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.template-grid article {
  min-height: 116px;
  padding: 18px;
  background: linear-gradient(145deg, #fff, #f9fffd);
}

.template-grid strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.35rem;
}

.template-grid span {
  color: var(--muted);
  font-weight: 700;
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.pin-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(41, 50, 82, 0.08);
}

.pin-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
}

.pin-card strong,
.copy-block strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.25rem;
}

.pin-card p,
.copy-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pin-actions .button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.copy-grid {
  display: grid;
  gap: 14px;
}

.copy-block {
  padding: 18px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(41, 50, 82, 0.07);
}

.free-sample-section {
  background: #fffdf8;
}

.sample-download {
  display: flex;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 211, 90, 0.28), rgba(139, 231, 199, 0.22)),
    #fff;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(41, 50, 82, 0.08);
}

.sample-download h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.sample-download p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.pricing-band {
  background:
    linear-gradient(180deg, #fffaf1, #f2fbff);
}

.price-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
}

.price-card.featured {
  border-color: rgba(246, 168, 0, 0.45);
  box-shadow: 0 24px 70px rgba(246, 168, 0, 0.2);
  transform: translateY(-10px);
}

.price {
  margin-bottom: 12px;
  font-size: 3.4rem;
  font-weight: 800;
}

.price span {
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: 1rem;
}

.price-card ul {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.price-card .buy-button {
  width: 100%;
  margin-top: 20px;
}

.price-card li {
  color: #36506f;
  font-weight: 700;
}

.price-card li::before {
  margin-right: 8px;
  color: var(--mint-dark);
  content: "✓";
  font-weight: 900;
}

.feature-list {
  display: grid;
  gap: 16px;
}

.feature-list article {
  padding: 22px;
}

.faq-band {
  background: #f8fffb;
}

.faq-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-grid details {
  padding: 20px;
}

.faq-grid summary {
  cursor: pointer;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.24rem;
  font-weight: 800;
}

.faq-grid p {
  margin: 12px 0 0;
}

.cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    linear-gradient(135deg, rgba(255, 211, 90, 0.48), rgba(187, 167, 255, 0.28)),
    #fffaf1;
}

.cta-section h2 {
  max-width: 760px;
  margin-bottom: 0;
}

.email-form {
  display: flex;
  width: min(100%, 470px);
  gap: 10px;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(41, 50, 82, 0.09);
}

.email-form input {
  min-width: 0;
  margin: 0;
  border-color: transparent;
  background: transparent;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 72px);
  color: #65748b;
  background: #17314d;
  font-size: 0.92rem;
  font-weight: 700;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 49, 77, 0.48);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 6vw, 3rem);
}

.modal-card p {
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #36506f;
  background: #fff7e6;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-card {
  width: min(100%, 520px);
}

.payment-secure-row {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 18px 0 12px;
  padding: 10px 12px;
  color: #36506f;
  background: #effaf4;
  border: 1px solid rgba(38, 160, 105, 0.18);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 800;
}

.payment-element {
  min-height: 122px;
  margin: 12px 0 16px;
}

.dashboard-card {
  width: min(100%, 980px);
  max-height: min(88vh, 860px);
  overflow: auto;
}

.dashboard-head,
.dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-card h2 {
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.dash-panel {
  margin-top: 14px;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid rgba(32, 48, 71, 0.12);
  border-radius: 8px;
}

.dash-panel h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.profile-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 9px 12px;
  margin: 0;
}

.profile-list dt {
  color: var(--muted);
  font-weight: 800;
}

.profile-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.saved-card-list,
.history-list {
  display: grid;
  gap: 10px;
}

.saved-card,
.history-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(32, 48, 71, 0.11);
  border-radius: 8px;
}

.saved-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.card-brand,
.history-title {
  color: var(--ink);
  font-weight: 900;
}

.history-meta,
.dashboard-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  padding: 14px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed rgba(32, 48, 71, 0.18);
  border-radius: 8px;
  font-weight: 800;
}

.history-list.compact .history-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .hero,
  .builder-shell,
  .split-section,
  .cta-section,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .quick-tools,
  .steps,
  .pricing-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-card.featured {
    transform: none;
  }

  .cta-section {
    display: grid;
  }
}

@media (max-width: 660px) {
  .site-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .brand {
    font-size: 1.26rem;
  }

  .nav-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .credits-pill {
    display: none;
  }

  .section,
  .section-band,
  .cta-section {
    padding: 58px 16px;
  }

  .hero {
    padding-top: 38px;
  }

  h1 {
    font-size: clamp(2.65rem, 16vw, 4rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-visual img {
    border-width: 6px;
  }

  .quick-tools,
  .book-preview,
  .form-grid,
  .generation-progress,
  .generated-pages,
  .steps,
  .pricing-grid,
  .faq-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .quick-tools {
    padding: 14px 16px 24px;
  }

  .preview-header,
  .download-strip,
  .sample-download,
  .site-footer,
  .email-form,
  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sample-page {
    min-height: 240px;
  }
}
