/* =========================================================
   KDP Launch Kit — design system
   ========================================================= */
:root {
  --brand-700: #5b21b6;
  --brand-600: #6d28d9;
  --brand-500: #7c3aed;
  --brand-400: #a78bfa;
  --brand-300: #c4b5fd;
  --brand-100: #ede9fe;
  --brand-50:  #f6f3ff;
  --grad: linear-gradient(120deg, #6d28d9 0%, #8b5cf6 48%, #c026d3 100%);
  --grad-soft: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
  --ink: #1c1631;
  --ink-2: #3a3452;
  --muted: #6b6880;
  --line: #ebe7f4;
  --line-2: #f2eff8;
  --bg: #ffffff;
  --bg-soft: #faf9fd;
  --ok: #059669; --ok-bg: #ecfdf5;
  --warn: #b45309; --warn-bg: #fffbeb;
  --err: #dc2626; --err-bg: #fef2f2;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(28, 22, 49, .05), 0 1px 1px rgba(28, 22, 49, .03);
  --shadow: 0 10px 30px -12px rgba(76, 29, 149, .18), 0 2px 6px rgba(28, 22, 49, .04);
  --shadow-lg: 0 30px 60px -20px rgba(76, 29, 149, .28), 0 8px 20px -8px rgba(28, 22, 49, .08);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
.ico { vertical-align: -0.14em; flex: none; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.serif { font-family: var(--serif); font-weight: 600; font-style: italic; letter-spacing: -.01em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.section { padding: 104px 0; }
.section-sm { padding: 64px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-600); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--grad); border-radius: 2px; }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 22px;
  border-radius: 999px; font: 600 .95rem/1 var(--font); border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -8px rgba(109, 40, 217, .65), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 28px -8px rgba(109, 40, 217, .75); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; background: #2b2347; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-700); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--brand-300); color: var(--brand-700); }
.btn-soft { background: var(--brand-50); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); }
.btn-danger { background: var(--err-bg); color: var(--err); border-color: #fecaca; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: .85rem; }
.btn-xs { --h: 30px; padding: 0 11px; font-size: .78rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(28,22,49,.25); }
.nav-inner { display: flex; align-items: center; height: 72px; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(109,40,217,.6); }
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: .94rem; padding: 8px 14px; border-radius: 999px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-700); background: var(--brand-50); }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: .2s; }
.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto; height: 720px; z-index: -1;
  background:
    radial-gradient(600px 340px at 78% 30%, rgba(167,139,250,.30), transparent 70%),
    radial-gradient(520px 320px at 12% 10%, rgba(192,38,211,.12), transparent 70%),
    radial-gradient(800px 400px at 50% 0%, rgba(237,233,254,.9), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .serif { font-size: 1.04em; }
.hero-sub { font-size: 1.16rem; color: var(--ink-2); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 24px;
}
.pill b { background: var(--grad); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: .74rem; letter-spacing: .02em; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px 26px; color: var(--muted); font-size: .9rem; }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { width: 18px; height: 18px; color: var(--ok); }

.hero-visual { position: relative; height: 560px; }
.book-stack { position: absolute; inset: 0; }
.book {
  position: absolute; width: 210px; aspect-ratio: 2/3; border-radius: 6px 12px 12px 6px; overflow: hidden;
  box-shadow: 0 30px 50px -18px rgba(28,22,49,.45), 0 10px 18px -10px rgba(28,22,49,.35);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.book::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.22) 0, rgba(255,255,255,.18) 2.5%, rgba(0,0,0,0) 6%, rgba(0,0,0,0) 100%); }
.book img { width: 100%; height: 100%; object-fit: cover; }
.book-1 { left: 0; top: 64px; transform: rotate(-9deg); z-index: 2; }
.book-2 { left: 21%; top: 8px; width: 236px; transform: rotate(2deg); z-index: 4; }
.book-3 { left: 52%; top: 40px; transform: rotate(9deg); z-index: 3; }
.book-4 { left: 3%; top: 318px; width: 156px; transform: rotate(-6deg); z-index: 1; }
.hero-visual:hover .book-1 { transform: rotate(-11deg) translateY(-6px); }
.hero-visual:hover .book-3 { transform: rotate(11deg) translateY(-6px); }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.score-card {
  position: absolute; right: -14px; bottom: 26px; z-index: 6; width: 262px; background: rgba(255,255,255,.96);
  border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg);
}
.score-card .sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.score-card .sc-title { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.score-card .sc-badge { white-space: nowrap; font-size: .7rem; font-weight: 700; color: var(--ok); background: var(--ok-bg); padding: 3px 8px; border-radius: 99px; }
.sc-big { display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px; }
.sc-big strong { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.sc-big span { color: var(--muted); font-weight: 600; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 10px; font-size: .82rem; margin: 7px 0; color: var(--ink-2); }
.bar-row b { text-align: right; font-weight: 700; color: var(--ink); }
.bar { height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .2s ease, box-shadow .25s ease, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.icon-box { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); margin-bottom: 18px; }
.icon-box svg { width: 24px; height: 24px; }
.icon-box.grad { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(109,40,217,.7); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }

.trust-strip { padding: 56px 0 24px; }
.trust-title { text-align: center; font-weight: 700; color: var(--ink-2); margin-bottom: 26px; font-size: 1.05rem; }
.mini-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px; text-align: center; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .92rem; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.mini-card svg { width: 26px; height: 26px; color: var(--brand-600); }

/* Steps */
.steps { counter-reset: step; position: relative; }
.step { position: relative; padding: 30px 26px; }
.step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 0 0 6px var(--brand-50); }
.steps-line { position: absolute; top: 52px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--brand-300) 0 8px, transparent 8px 16px); z-index: 0; }
.step { z-index: 1; }

/* Score dashboard (large) */
.score-dash { display: grid; grid-template-columns: 340px 1fr; gap: 0; overflow: hidden; padding: 0; box-shadow: var(--shadow-lg); border-radius: 26px; }
.score-dash .left { background: var(--grad); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; }
.score-dash .left p, .score-dash .left h3 { color: #fff; }
.score-dash .left::after { content: ''; position: absolute; inset: 0; background: radial-gradient(300px 200px at 30% 10%, rgba(255,255,255,.25), transparent 70%); pointer-events: none; }
.ring { width: 200px; height: 200px; position: relative; margin-bottom: 18px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .val strong { font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; display: block; }
.ring .val span { font-size: .9rem; opacity: .85; }
.score-dash .right { padding: 40px 44px; }
.score-row { display: grid; grid-template-columns: 160px 1fr 44px; gap: 18px; align-items: center; padding: 13px 0; border-bottom: 1px dashed var(--line); cursor: default; }
.score-row:last-of-type { border-bottom: 0; }
.score-row .lbl { font-weight: 600; color: var(--ink-2); }
.score-row .num { font-weight: 800; text-align: right; }
.score-row .bar { height: 10px; }
.score-row:hover .bar i { filter: brightness(1.1); }
.score-tip { font-size: .82rem; color: var(--muted); grid-column: 1 / -1; display: none; margin-top: -4px; }
.score-row.open .score-tip { display: block; }

/* Before/after */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: stretch; }
.ba .card { padding: 30px; }
.ba-label { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.ba-before .ba-label { background: #f3f2f7; color: var(--muted); }
.ba-after { border-color: var(--brand-300); box-shadow: var(--shadow); position: relative; }
.ba-after .ba-label { background: var(--grad); color: #fff; }
.ba-field { margin-bottom: 16px; }
.ba-field small { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.ba-before .ba-field div { color: var(--muted); }
.ba-after .ba-field div { color: var(--ink); }
.ba-field .t { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.ba-arrow { display: grid; place-items: center; }
.ba-arrow span { width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow); color: var(--brand-600); }
.ba-cover { display: flex; gap: 18px; align-items: flex-start; }
.ba-cover img { width: 92px; border-radius: 4px 8px 8px 4px; box-shadow: 0 12px 24px -10px rgba(28,22,49,.45); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); margin: 0 6px 6px 0; }

/* Gallery */
.gallery-filters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 34px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 999px; font: 600 .86rem var(--font); color: var(--ink-2); cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--brand-300); color: var(--brand-700); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100vw - 1200px) / 2 + 24px)); padding: 10px max(24px, calc((100vw - 1200px) / 2 + 24px)) 34px; scrollbar-width: thin; scrollbar-color: var(--brand-300) transparent; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--brand-100); border-radius: 8px; }
.g-item { flex: 0 0 200px; scroll-snap-align: start; transition: opacity .3s, transform .3s; }
.g-item.dim { display: none; }
.g-item figure { margin: 0; }
.g-item .book-img { aspect-ratio: 2/3; border-radius: 4px 10px 10px 4px; overflow: hidden; position: relative; box-shadow: 0 20px 34px -18px rgba(28,22,49,.5); transition: transform .3s ease, box-shadow .3s; }
.g-item .book-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.2) 0, rgba(255,255,255,.15) 3%, transparent 7%); }
.g-item:hover .book-img { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 28px 44px -18px rgba(28,22,49,.55); }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-item figcaption { margin-top: 14px; }
.g-item figcaption b { display: block; font-size: .93rem; line-height: 1.3; }
.g-item figcaption span { font-size: .8rem; color: var(--muted); }
.gallery-wrap { position: relative; }
.gallery-nav { display: flex; justify-content: center; gap: 10px; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); color: var(--ink); }
.round-btn:hover { border-color: var(--brand-300); color: var(--brand-700); }
.note { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 10px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 30px 26px; border-radius: 22px; }
.price-card.popular { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); transform: translateY(-8px); }
.popular-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .12em; padding: 6px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(109,40,217,.7); }
.price-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.price-card .tagline { color: var(--muted); font-size: .88rem; min-height: 42px; margin-bottom: 18px; }
.price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price strong { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; }
.price span { color: var(--muted); font-weight: 600; }
.credits-note { font-size: .82rem; color: var(--brand-700); font-weight: 600; background: var(--brand-50); padding: 6px 10px; border-radius: 10px; margin: 8px 0 20px; }
.feat-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; flex: 1; }
.feat-list li { display: flex; gap: 10px; font-size: .92rem; color: var(--ink-2); align-items: flex-start; }
.feat-list svg { width: 18px; height: 18px; flex: none; color: var(--brand-600); margin-top: 2px; }
.pricing-foot { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 34px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; transition: box-shadow .2s, border-color .2s; }
.faq details[open] { box-shadow: var(--shadow); border-color: var(--brand-100); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--brand-600); transition: transform .2s; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { color: var(--muted); padding-bottom: 20px; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: 30px; padding: 70px 56px; background: var(--grad); color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.cta-band::before { content: ''; position: absolute; width: 460px; height: 460px; right: -120px; top: -180px; border-radius: 50%; background: rgba(255,255,255,.12); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); font-size: 1.08rem; }
.cta-band .btn-light { background: #fff; color: var(--brand-700); }
.cta-band .btn-light:hover { color: var(--brand-700); box-shadow: 0 10px 28px -8px rgba(0,0,0,.35); transform: translateY(-1px); }
.cta-books { display: flex; justify-content: center; position: relative; height: 220px; }
.cta-books img { width: 120px; position: absolute; border-radius: 3px 8px 8px 3px; box-shadow: 0 20px 34px -14px rgba(0,0,0,.5); }

.authors-band { border-radius: 26px; overflow: hidden; position: relative; }
.authors-band img { width: 100%; height: 300px; object-fit: cover; object-position: center 40%; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 64px 0 34px; background: var(--bg-soft); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; margin-bottom: 40px; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { color: var(--ink-2); font-size: .93rem; }
.footer a:hover { color: var(--brand-700); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; font-size: .82rem; color: var(--muted); }

/* Page hero (inner pages) */
.page-hero { padding: 72px 0 40px; text-align: center; position: relative; }
.page-hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 360px; z-index: -1; background: radial-gradient(700px 260px at 50% 0, rgba(237,233,254,.95), transparent 70%); }
.page-hero p { color: var(--muted); font-size: 1.12rem; max-width: 640px; margin: 0 auto; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 7px; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; font: 400 .97rem var(--font);
  color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; appearance: none;
}
textarea.input { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--brand-50); }
.help { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.check input { margin-top: 4px; accent-color: var(--brand-600); }

.auth-wrap { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--grad); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; }
.auth-side p { color: rgba(255,255,255,.88); }
.auth-books { display: flex; gap: 14px; margin-top: 36px; }
.auth-books img { width: 110px; border-radius: 3px 8px 8px 3px; box-shadow: 0 18px 30px -12px rgba(0,0,0,.5); }
.auth-books img:nth-child(2) { transform: translateY(-16px); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 2rem; }

.alert { padding: 14px 18px; border-radius: 14px; font-size: .92rem; margin-bottom: 18px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--ok-bg); color: #065f46; border-color: #a7f3d0; }
.alert-error { background: var(--err-bg); color: #991b1b; border-color: #fecaca; }
.alert-info { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.alert-warn { background: var(--warn-bg); color: #92400e; border-color: #fde68a; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--bg-soft); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .logo { padding: 6px 10px 20px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; font-size: .93rem; }
.side-nav a svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.side-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.side-nav a.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.side-nav a.active svg { color: var(--brand-600); }
.side-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 18px 12px 6px; }
.side-foot { margin-top: auto; padding-top: 16px; }
.credit-box { background: var(--grad); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.credit-box small { opacity: .85; font-size: .76rem; }
.credit-box strong { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.credit-box a { color: #fff; font-size: .8rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.main { min-width: 0; }
.topbar { height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 1.15rem; margin: 0; letter-spacing: -.01em; font-weight: 700; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.content { padding: 32px; max-width: 1280px; }
.menu-btn { display: none; }

.stat { padding: 22px; }
.stat small { color: var(--muted); font-weight: 600; font-size: .82rem; display: flex; align-items: center; gap: 8px; }
.stat strong { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.big-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--grad); color: #fff; border-radius: 22px; padding: 28px 32px; margin: 24px 0; box-shadow: var(--shadow); }
.big-cta h2 { color: #fff; font-size: 1.4rem; margin: 0 0 4px; }
.big-cta p { margin: 0; opacity: .88; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfbff; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-brand { background: var(--brand-50); color: var(--brand-700); }
.empty { text-align: center; padding: 56px 20px; }
.empty .icon-box { margin: 0 auto 16px; }

/* Upload */
.dropzone { display: block; border: 2px dashed var(--brand-300); background: linear-gradient(180deg, #fbfaff, #fff); border-radius: 22px; padding: 56px 24px; text-align: center; cursor: pointer; transition: .2s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand-500); background: var(--brand-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone h2 { font-size: 1.5rem; margin: 10px 0 6px; }
.file-chip { display: inline-flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 16px; font-weight: 600; font-size: .9rem; }
.progress-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.progress-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; transition: color .2s; }
.progress-list li .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.progress-list li.active { color: var(--ink); font-weight: 600; }
.progress-list li.active .dot { border-color: var(--brand-500); border-top-color: transparent; animation: spin .8s linear infinite; }
.progress-list li.done { color: var(--ink-2); }
.progress-list li.done .dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.progress-list li.done .dot::after { content: '✓'; font-size: .75rem; font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }
.pbar { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .6s ease; border-radius: 99px; }

/* Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 26px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 16px; font-weight: 600; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.tabs a .lock { font-size: .7rem; margin-left: 4px; }

.rec { position: relative; }
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.rec-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.rec.is-best { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: var(--shadow); }
.best-badge { display: inline-flex; gap: 6px; align-items: center; background: var(--grad); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; margin-bottom: 12px; }
.why { font-size: .9rem; color: var(--ink-2); }
.why b { color: var(--ink); }
.conf { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.conf-dots { display: inline-flex; gap: 3px; }
.conf-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.conf-dots i.on { background: var(--brand-500); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 20px; font-size: .94rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); }
.desc-body { white-space: pre-wrap; font-size: .97rem; line-height: 1.7; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 20px; }
.lock-card { text-align: center; padding: 48px 24px; background: linear-gradient(180deg, #fff, var(--brand-50)); }
.prompt-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: #17122b; color: #e9e3ff; border-radius: 14px; padding: 18px; white-space: pre-wrap; line-height: 1.6; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .9rem; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.book-thumb { width: 42px; height: 56px; border-radius: 3px 6px 6px 3px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8rem; flex: none; box-shadow: 0 6px 12px -6px rgba(109,40,217,.6); }
.book-cell { display: flex; gap: 12px; align-items: center; }
.score-pill { display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 10px; border-radius: 99px; font-weight: 800; font-size: .85rem; background: var(--brand-50); color: var(--brand-700); }
.inline-form { display: inline; }
.admin-tag { background: #17122b; color: #fff; font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .08em; }
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.chart-bars div { flex: 1; background: var(--grad); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; }
.chart-bars div span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .66rem; color: var(--muted); white-space: nowrap; }

.g-side { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.g-side-r { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; align-items: start; }
.book-header { display: flex; gap: 20px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.book-header .book-thumb { width: 64px; height: 88px; font-size: 1.4rem; }
.book-header h2 { font-size: 1.5rem; margin: 0 0 4px; }
.book-header .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); }
.book-header .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.regen-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 14px; }
.regen-bar .input { height: 40px; flex: 1; min-width: 200px; }
.price-big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-plain li { display: flex; gap: 10px; align-items: flex-start; }
.imp { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; gap: 12px; align-items: flex-start; }
.imp .badge { flex: none; }
details.inline-edit summary { cursor: pointer; list-style: none; }
details.inline-edit summary::-webkit-details-marker { display: none; }
.kw-bar { width: 90px; display: inline-block; vertical-align: middle; margin-right: 8px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .float { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card.popular { transform: none; }
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { height: 520px; max-width: 560px; margin: 0 auto; width: 100%; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-proof { justify-content: center; }
  .score-dash { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; padding: 54px 34px; }
  .cta-books { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu { display: block; position: absolute; top: 72px; left: 0; right: 0; height: calc(100vh - 72px); height: calc(100dvh - 72px); background: #fff; border-top: 1px solid var(--line); padding: 20px 24px; z-index: 49; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s; overflow-y: auto; }
  .nav.open .mobile-menu { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-menu a.ml { display: block; padding: 14px 4px; font-weight: 600; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--line-2); }
  .mobile-menu .btn { margin-top: 12px; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .g-3, .g-2, .g-side, .g-side-r { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .steps-line { display: none; }
  .ba { grid-template-columns: 1fr; }
  .ba-arrow span { transform: rotate(90deg); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .app.side-open .sidebar { transform: none; }
  .app.side-open::after { content: ''; position: fixed; inset: 0; background: rgba(28,22,49,.35); z-index: 55; }
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .big-cta { flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 32px 0 64px; }
  .pill { font-size: .76rem; text-align: left; }
  .hero-visual { height: 470px; }
  .book { width: 150px; }
  .book-2 { width: 168px; left: 28%; }
  .book-1 { left: 0; top: 60px; }
  .book-3 { left: 56%; top: 76px; }
  .book-4 { width: 112px; left: 2%; top: 260px; }
  .score-card { right: 0; left: auto; bottom: 0; width: 240px; padding: 16px; }
  .pricing-grid, .g-4 { grid-template-columns: 1fr; }
  .g-6 { grid-template-columns: repeat(2, 1fr); }
  .score-dash .right { padding: 26px 20px; }
  .score-row { grid-template-columns: 110px 1fr 36px; gap: 10px; font-size: .9rem; }
  .card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .g-item { flex-basis: 160px; }
  .gallery { padding-left: 16px; padding-right: 16px; scroll-padding-inline: 16px; }
  .btn-lg { --h: 52px; padding: 0 22px; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Blog ---------- */
.blog-card h2.blog-card-title { font-size: 1.25rem; margin: 6px 0 10px; line-height: 1.3; }
.blog-card h2.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card h2.blog-card-title a:hover { text-decoration: underline; }
.post-meta { margin-top: 10px; }
.post-body a { text-decoration: underline; }
.post-body blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid #6d28d9; background: rgba(109,40,217,.06); border-radius: 8px; }
.post-body blockquote p { margin: 0; }
.post-disclosure { margin-top: 2em; font-size: .92rem; }
