/* =========================================================
   Book Review Platform — public styles
   Cool, eye-friendly light & dark themes
   ========================================================= */
:root, :root[data-theme="light"] {
  --bg: #F3F6F9;
  --bg-2: #EAF0F4;
  --surface: #FFFFFF;
  --surface-2: #F6F9FB;
  --text: #16222E;
  --muted: #5A6B7B;
  --line: #DCE4EB;
  --accent: #0E7C86;        /* calm teal */
  --accent-hover: #0A6770;
  --accent-ink: #FFFFFF;
  --accent-soft: #DDF0F0;
  --calm: #4C6FA8;          /* soft blue */
  --calm-soft: #E3EAF6;
  --good: #2E8B57;
  --bad: #B5484B;
  --bad-soft: #F8E5E5;
  --shadow: 0 1px 2px rgba(22, 34, 46, .05), 0 6px 20px rgba(22, 34, 46, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: "Fraunces", Georgia, "Noto Sans Gujarati", serif;
  --sans: "Inter", "Noto Sans Gujarati", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mm-0: #0E7C86; --mm-1: #4C6FA8; --mm-2: #6A5FA8; --mm-3: #2E8B7A; --mm-4: #3E7FA6; --mm-5: #7A6A9E;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E151C;
  --bg-2: #121C25;
  --surface: #16212B;
  --surface-2: #1A2733;
  --text: #E3EAF1;
  --muted: #95A6B6;
  --line: #263544;
  --accent: #4FBDBA;
  --accent-hover: #6DD0CD;
  --accent-ink: #06222A;
  --accent-soft: #163538;
  --calm: #88A7DC;
  --calm-soft: #1C2A3F;
  --good: #5CC08E;
  --bad: #E58A8C;
  --bad-soft: #3A1F23;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --mm-0: #4FBDBA; --mm-1: #88A7DC; --mm-2: #A79BE0; --mm-3: #5CC0A8; --mm-4: #6FB3D9; --mm-5: #B6A4D6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--sans); overflow-x: hidden; }
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--calm); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font: 600 clamp(2rem, 5vw, 3.2rem)/1.1 var(--serif); letter-spacing: -.01em; }
h2, .h2 { font: 600 clamp(1.5rem, 3.2vw, 2.1rem)/1.2 var(--serif); }
h3, .h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.mt { margin-top: 1.5rem; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .72em 1.25em; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.btn-sm { padding: .5em .95em; font-size: .88rem; }
.btn-xs { padding: .35em .7em; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.center-row { justify-content: center; }

label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .9rem; }
input, select, textarea { display: block; width: 100%; margin-top: .35rem; padding: .7em .85em; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: auto; margin: 0 .45rem 0 0; accent-color: var(--accent); vertical-align: middle; }
input[disabled] { opacity: .65; }
label.check { display: flex; align-items: flex-start; gap: .2rem; font-weight: 400; }
label.check input { margin-top: .3rem; }
.two { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }

.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; border: 1px solid; font-size: .95rem; }
.alert-success { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.alert-error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.alert-info { background: var(--calm-soft); border-color: color-mix(in srgb, var(--calm) 35%, transparent); }
.flash-wrap { padding-top: 1rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: var(--shadow); }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .02em; padding: .22em .65em; border-radius: 999px; background: var(--bg-2); color: var(--muted); }
.tag-premium { background: var(--calm-soft); color: var(--calm); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 60ch; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font: 600 .78rem var(--sans); letter-spacing: -.02em; flex: none; }
.brand-logo { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font: 600 1.05rem var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: .74rem; letter-spacing: .03em; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.menu a:not(.btn) { display: block; padding: .5rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500; }
.menu a:not(.btn):hover { background: var(--bg-2); }
.menu a[aria-current="page"] { color: var(--accent); }
.menu { display: flex; align-items: center; gap: 1rem; }
.menu-auth { display: flex; gap: .5rem; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; padding: .75rem 16px 1.25rem; display: none; }
  .menu.open { display: flex; }
  .menu ul { flex-direction: column; }
  .menu a:not(.btn) { padding: .75rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu-auth .btn { flex: 1; }
}

/* ---------- sections ---------- */
.blk { padding: clamp(2.2rem, 6vw, 4.2rem) 0; }
.blk + .blk { padding-top: 0; }
.blk-hero + .blk, .blk-quote + .blk, .blk-spacer + .blk { padding-top: 0; }
.sec-head { margin-bottom: 1.6rem; max-width: 720px; }
.sec-title { margin-bottom: .35em; }
.sec-intro { color: var(--muted); font-size: 1.05rem; margin: 0; }
.page-head h1 { margin-bottom: .3em; }
.empty-block { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; color: var(--muted); font-size: .9rem; }
.empty-block span { opacity: .7; }

/* hero */
.blk-hero { padding-top: clamp(2.5rem, 8vw, 5.5rem); }
.hero { display: grid; gap: 2.5rem; align-items: center; }
.hero.has-side { grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero.has-side { grid-template-columns: 1.35fr 1fr; } }
.hero h1 { max-width: 16ch; }
.hero-img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.hero-hello { margin-top: 1rem; color: var(--muted); }
.login-card { max-width: 440px; margin-inline: auto; }
.login-card.wide { max-width: 560px; }
.login-card h1, .login-card h2 { margin-bottom: 1rem; }
.auth-wrap { padding-block: 1rem; }

/* compare */
.compare { display: grid; gap: 1rem; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.cmp-yes { border-top: 4px solid var(--accent); }
.cmp-no { border-top: 4px solid var(--calm); }
.ticks { list-style: none; padding: 0; margin: 0 0 1rem; }
.ticks li { position: relative; padding: .45rem 0 .45rem 1.9rem; border-bottom: 1px dashed var(--line); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: .45rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.ticks li.no::before { content: "✕"; background: var(--calm-soft); color: var(--calm); }
.cmp-note { text-align: center; color: var(--muted); font-style: italic; margin-top: 1.2rem; }

/* quote */
.quote { margin: 0; text-align: center; padding: clamp(1rem, 4vw, 2.5rem) 0; }
.quote blockquote { margin: 0; font: 500 clamp(1.35rem, 3.4vw, 2rem)/1.35 var(--serif); }
.quote blockquote::before { content: "“"; display: block; font-size: 3.5rem; line-height: .6; color: var(--accent); margin-bottom: .5rem; }
.quote figcaption { margin-top: 1rem; color: var(--muted); }

/* prose */
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.2rem 0; padding: .8rem 1.2rem; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose > :last-child { margin-bottom: 0; }

.callout { border-radius: var(--radius); padding: 1.25rem 1.4rem; border: 1px solid var(--line); background: var(--surface); }
.callout.tone-accent { background: var(--accent-soft); border-color: transparent; }
.callout.tone-calm { background: var(--calm-soft); border-color: transparent; }
.callout h3 { margin-bottom: .4rem; }
.upi { font-size: 1.05rem; margin: .6rem 0 0; }

/* figures, gallery */
.figure { margin: 0; }
.figure img, .figure video { border-radius: var(--radius); width: 100%; }
.figure figcaption, .gallery figcaption { color: var(--muted); font-size: .88rem; margin-top: .5rem; text-align: center; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery.cols-3 { grid-template-columns: repeat(3, 1fr); } .gallery.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.video { width: 100%; border-radius: var(--radius); background: #000; }
.ratio { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* mind map */
.mindmap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 2rem); box-shadow: var(--shadow); }
.mm-center { width: fit-content; max-width: 100%; margin: 0 auto 1.6rem; padding: .8rem 1.5rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: 600 1.15rem var(--serif); text-align: center; position: relative; }
.mm-branches { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.mm-branch { --c: var(--mm-0); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius-sm); padding: .9rem 1rem; background: var(--surface-2); }
.mm-branch.c1 { --c: var(--mm-1); } .mm-branch.c2 { --c: var(--mm-2); } .mm-branch.c3 { --c: var(--mm-3); } .mm-branch.c4 { --c: var(--mm-4); } .mm-branch.c5 { --c: var(--mm-5); }
.mm-title { font-weight: 600; color: var(--c); margin-bottom: .4rem; }
.mm-branch ul { list-style: none; margin: 0; padding-left: .9rem; border-left: 2px solid color-mix(in srgb, var(--c) 35%, transparent); }
.mm-branch li { position: relative; padding: .22rem 0 .22rem .5rem; font-size: .94rem; }
.mm-branch li::before { content: ""; position: absolute; left: -.9rem; top: .9rem; width: .75rem; border-top: 2px solid color-mix(in srgb, var(--c) 35%, transparent); }
.mm-img { margin-top: 1rem; }

/* audio */
.tracks { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.track { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.track-head { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .6rem; }
.track-head p { margin: .1rem 0 0; }
.track-no { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--calm-soft); color: var(--calm); font-weight: 600; font-size: .9rem; }
.track audio { width: 100%; }

/* instagram */
.ig-profile { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--text); max-width: 420px; margin-bottom: 1.2rem; padding: 1rem 1.2rem; }
.ig-profile span:last-child { display: flex; flex-direction: column; }
.ig-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--calm-soft); color: var(--calm); flex: none; }
.reels { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.reels.embed { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.reel { margin: 0; }
.reel iframe { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.reel figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.reel-link { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--text); padding: 1rem; }
.play { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; font-size: .9rem; }

/* links */
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.link-row { display: flex; gap: .9rem; align-items: center; text-decoration: none; color: var(--text); padding: .9rem 1.1rem; }
.link-row > span:last-child { display: flex; flex-direction: column; }
.link-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }

/* grids, features, steps */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.feature h3 { margin-top: .6rem; }
.feature p { margin: 0; }
.f-icon { font-size: 1.6rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-2); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps.n3 { grid-template-columns: repeat(3, 1fr); } .steps.n4 { grid-template-columns: repeat(4, 1fr); } .steps.n5 { grid-template-columns: repeat(5, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; gap: 1rem; }
@media (min-width: 1000px) { .steps.n4 .step, .steps.n5 .step { flex-direction: column; gap: .8rem; } }
.step h3 { margin-bottom: .3rem; }
.step p { margin: 0; font-size: .94rem; }
.step-badge { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 1.25rem var(--serif); }
.step:nth-child(even) .step-badge { background: var(--calm); color: #fff; }
[data-theme="dark"] .step:nth-child(even) .step-badge { color: #0E151C; }

/* books */
.book-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .book-grid { grid-template-columns: repeat(3, 1fr); } }
.book-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 112px 1fr; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.book-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.book-card .cover { display: block; background: var(--bg-2); overflow: hidden; min-width: 0; }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2/3; }
.book-body { padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.book-body h3 { font: 600 1.08rem/1.25 var(--serif); margin-bottom: .25rem; }
.book-body h3 a { color: var(--text); text-decoration: none; }
.book-body .by { color: var(--muted); font-size: .88rem; margin-bottom: .5rem; }
.book-body p.small { margin-bottom: .6rem; }
.read-link { margin-top: auto; font-weight: 600; font-size: .9rem; text-decoration: none; }
.cover-ph { width: 100%; height: 100%; min-height: 168px; padding: .8rem; overflow: hidden; word-break: break-word; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, var(--accent), var(--calm)); color: #fff; }
.cover-ph span { font: 600 .9rem/1.25 var(--serif); }
.cover-ph small { font-size: .7rem; opacity: .85; }
.cover-ph.big { border-radius: var(--radius); aspect-ratio: 2/3; height: auto; }
.cover-ph.big span { font-size: 1.3rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.3rem; }
.filters input, .filters select { margin: 0; flex: 1 1 180px; width: auto; }
.filters input[type="search"] { flex: 3 1 260px; }
.pager { display: flex; justify-content: center; gap: .35rem; margin-top: 2rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--surface); }
.pager span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.empty { padding: 3rem 1rem; }

/* book page */
.book-hero { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--line); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); }
.bh-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .bh-grid { grid-template-columns: 240px 1fr; } }
.bh-cover { max-width: 240px; }
.bh-cover img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.by.lg { font-size: 1.1rem; color: var(--muted); }
.disclaimer { display: flex; gap: .9rem; align-items: flex-start; margin-top: 2rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--calm); }
.disclaimer img { border-radius: 50%; flex: none; object-fit: cover; }
.disclaimer p { margin: 0; font-size: .92rem; color: var(--muted); }
.locked { padding: 2.5rem 1.5rem; }
.lock-ico { font-size: 2rem; display: block; margin-bottom: .5rem; }
.related { background: var(--bg-2); padding-top: 3rem !important; margin-top: 2rem; }

/* plans */
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan .ticks { flex: 1; font-size: .93rem; }
.plan-hi { border: 2px solid var(--accent); }
.plan-badge { position: absolute; top: -.75rem; left: 1.4rem; background: var(--accent); color: var(--accent-ink); font-size: .74rem; font-weight: 600; padding: .25em .75em; border-radius: 999px; }
.price { margin: .2rem 0 .5rem; }
.price strong { font: 600 2rem var(--serif); }
.price span { color: var(--muted); }
.is-current { cursor: default; }
.plan-pick { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .9rem .2rem; margin: 0 0 1rem; }
.plan-pick legend { font-weight: 500; font-size: .9rem; padding: 0 .3rem; }
.plan-opt { display: flex; align-items: center; padding: .55rem .2rem; border-bottom: 1px dashed var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.plan-opt:last-of-type { border-bottom: 0; }
.plan-opt em { color: var(--muted); font-style: normal; margin-left: .3rem; }

/* founder, cta, faq, contact */
.founder { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 760px) { .founder { grid-template-columns: 280px 1fr; padding: 2.2rem; } }
.founder-img { width: 100%; max-width: 280px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--calm)); color: #fff; }
.cta h2 { color: #fff; margin-bottom: .3rem; }
.cta p { margin: 0; opacity: .92; }
.cta .btn { background: #fff; color: #10303A; border-color: #fff; }
.faq { display: grid; gap: .6rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.1rem; }
.faq-item summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .prose { padding-bottom: 1rem; color: var(--muted); }
.contact { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .contact.has-side { grid-template-columns: 1.6fr 1fr; } }
.contact-side { padding: .5rem 0; }

/* account / pending */
.acc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.acc-head h1 { margin-bottom: .2rem; }
.acc-head p { margin: 0; }
.pending { text-align: left; }
.status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #E0A93B; box-shadow: 0 0 0 6px color-mix(in srgb, #E0A93B 25%, transparent); margin-bottom: 1rem; }
.notfound { padding: 3rem 0; }
.admin-edit-bar { padding-bottom: 2rem; text-align: right; }

.spacer.sp-s { height: 1rem; } .spacer.sp-m { height: 2.5rem; } .spacer.sp-l { height: 5rem; }
.spacer hr { margin: 0; position: relative; top: 50%; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 3rem; padding-top: 2.5rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-bottom: 2rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-founder { display: flex; gap: .8rem; align-items: center; margin-bottom: .9rem; }
.foot-founder img { border-radius: 50%; object-fit: cover; }
.foot-founder div { display: flex; flex-direction: column; line-height: 1.3; }
.foot-h { font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.social a { color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.2rem 1.6rem; }
.foot-bottom p { margin: 0; }
.foot-tools { display: flex; align-items: center; gap: .6rem; }
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.theme-switch button { border: 0; background: transparent; color: var(--muted); width: 34px; height: 30px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; font: 500 .82rem var(--sans); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.admin-pencil { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--muted) !important; background: var(--bg); }
.admin-pencil:hover { color: var(--accent) !important; border-color: var(--accent); }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(5, 12, 18, .85); }
.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: 10px; }
.lb-cap { color: #fff; text-align: center; margin: .6rem 0 0; }
.lb-close { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.6rem; cursor: pointer; }

/* Book page: keep reading blocks left-aligned with the rest of the page */
.book-page .wrap.narrow { width: min(1160px, 100% - 32px); }
.book-page .wrap.narrow > * { max-width: 780px; }
