/* AntLibrary — vanilla CSS, two design directions via [data-theme] */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Theme A · Paper & Ink ─────────────────────────────────────────────── */
:root, [data-theme="a"] {
  --bg: #faf9f6;
  --bg-alt: #f2ede8;
  --surface: #ffffff;
  --text: #1e1a18;
  --muted: #7a6f6b;
  --accent: #8a1515;
  --accent-hover: #6e1010;
  --accent-light: #fdf2f2;
  --border: #e3ddd7;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
  --heading: "DM Serif Display", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --hw: 400;            /* heading weight */
  --hw-strong: 400;     /* strong heading weight */
  --ls-display: -0.01em;
  --hero-bg: #faf9f6;
  --hero-text: #1e1a18;
  --hero-muted: #7a6f6b;
}

/* ─── Theme B · Precision SaaS ──────────────────────────────────────────── */
[data-theme="b"] {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #b91c1c;
  --accent-hover: #991b1b;
  --accent-light: #fff1f2;
  --border: #e2e8f0;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.14);
  --heading: "Plus Jakarta Sans", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --hw: 700;
  --hw-strong: 800;
  --ls-display: -0.03em;
  --hero-bg: #0c1120;
  --hero-text: #f1f5f9;
  --hero-muted: #94a3b8;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  transition: background 0.3s, color 0.3s;
}
::selection { background: rgba(138,21,21,0.15); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ─── Type helpers ──────────────────────────────────────────────────────── */
.display { font-family: var(--heading); font-weight: var(--hw); letter-spacing: var(--ls-display); line-height: 1.15; }
.display.strong { font-weight: var(--hw-strong); }
.h-heading { font-family: var(--heading); font-weight: var(--hw); }
.h-heading.strong { font-weight: var(--hw-strong); }
.section-label {
  display: inline-block; font-family: var(--body); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
.section-label.light { color: rgba(255,255,255,0.6); }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--body); font-weight: 600; font-size: 0.875rem;
  padding: 0.75rem 1.75rem; border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.18s;
  border: none; text-decoration: none; line-height: 1.2;
}
[data-theme="b"] .btn { letter-spacing: 0.01em; }
.btn.sm { padding: 0.55rem 1.25rem; font-size: 0.8rem; }
.btn.lg { padding: 0.9rem 2.2rem; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-light); }
.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { background: rgba(255,255,255,0.9); }
.btn-white-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.45); }
.btn-white-outline:hover { background: rgba(255,255,255,0.12); }
.btn-block { width: 100%; justify-content: center; }

/* ─── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}
[data-theme="b"] .nav { background: var(--surface); }
.nav-inner { display: flex; align-items: center; height: 64px; gap: 2rem; }
.nav-cta-desktop + .nav-cta-desktop { margin-left: -1.4rem; }
.nav-links-desktop { display: flex; align-items: center; gap: 2rem; }
.nav-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.nav-logo img { height: 34px; width: 34px; object-fit: contain; transition: filter 0.3s; }
.nav-logo span { font-family: var(--heading); font-weight: var(--hw); font-size: 1.3rem; color: var(--text); transition: color 0.3s; }
[data-theme="b"] .nav-logo span { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-spacer { flex: 1; }
.nav-link {
  background: none; border: none; cursor: pointer; font-family: var(--body); font-size: 0.875rem;
  font-weight: 400; color: var(--text); padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: color 0.15s; text-decoration: none;
}
.nav-link.active { font-weight: 600; color: var(--accent); border-bottom-color: var(--accent); }

/* Nav over dark hero (theme B, home, not scrolled) */
[data-theme="b"] .nav.hero-dark {
  background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
}
[data-theme="b"] .nav.hero-dark .nav-logo span { color: #fff; }
[data-theme="b"] .nav.hero-dark .nav-logo img { filter: brightness(2) saturate(0.6); }
[data-theme="b"] .nav.hero-dark .nav-link { color: var(--hero-text); }
[data-theme="b"] .nav.hero-dark .nav-link.active { color: #fff; border-bottom-color: #fff; }

/* Mobile nav */
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 8px; flex-shrink: 0; }
.burger-bar { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.2s, background 0.3s; }
[data-theme="b"] .nav.hero-dark .burger-bar { background: #fff; }
.nav-burger.open .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.open .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem 2rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface); }
.mobile-menu[hidden] { display: none; }
.mobile-link { background: none; border: none; text-align: left; font-family: var(--body); font-size: 1rem; font-weight: 500; color: var(--text); padding: 0.75rem 0.25rem; cursor: pointer; border-bottom: 1px solid var(--border); text-decoration: none; }
.mobile-link.active { color: var(--accent); font-weight: 700; }
.mobile-cta { margin-top: 0.75rem; justify-content: center; }
@media (max-width: 820px) {
  .nav-links-desktop, .nav-cta-desktop { display: none; }
  .nav-burger { display: flex; }
  .nav-spacer { flex: 1; }
  /* keep nav solid on mobile even over the dark hero so the menu is readable */
  [data-theme="b"] .nav.hero-dark { background: var(--surface); }
  [data-theme="b"] .nav.hero-dark .nav-logo span { color: var(--text); }
  [data-theme="b"] .nav.hero-dark .nav-logo img { filter: none; }
  [data-theme="b"] .nav.hero-dark .burger-bar { background: var(--text); }
}

/* Price calculator */
.calc-card { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); }
.calc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.calc-head label { font-family: var(--body); font-size: 0.95rem; font-weight: 600; color: var(--text); }
.calc-mem { font-family: var(--heading); font-weight: var(--hw-strong); font-size: 1.5rem; color: var(--accent); letter-spacing: -0.02em; }
.calc-card input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.calc-scale { display: flex; justify-content: space-between; font-family: var(--body); font-size: 0.75rem; color: var(--muted); margin-top: 6px; }
.calc-out { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--border); text-align: center; }
.calc-tier { font-family: var(--body); font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }
.calc-tier b { color: var(--text); font-weight: 700; }
.calc-price { font-family: var(--heading); font-weight: var(--hw-strong); font-size: 3rem; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.calc-price .calc-per { font-family: var(--body); font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.calc-note { font-family: var(--body); font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 1.5rem; line-height: 1.6; }
.hero { background: var(--hero-bg); transition: background 0.3s; }
[data-theme="a"] .hero { padding-top: 6rem; }
[data-theme="b"] .hero { margin-top: -64px; padding-top: 8rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding-bottom: 5rem; }
.hero h1 { color: var(--hero-text); font-size: clamp(2.6rem, 5vw, 4.2rem); margin-bottom: 1.5rem; }
[data-theme="b"] .hero h1 { font-size: clamp(2.4rem, 4.5vw, 3.75rem); line-height: 1.1; }
.hero h1 em { font-style: italic; color: var(--accent); }
[data-theme="b"] .hero h1 .acc { color: #f87171; }
.hero p.lead { font-family: var(--body); font-size: 1.1rem; color: var(--hero-muted); line-height: 1.75; margin-bottom: 2.25rem; max-width: 440px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-note { font-family: var(--body); font-size: 0.8rem; color: var(--hero-muted); }
.hero-visual { display: flex; justify-content: flex-end; }
.hero-visual-tilt { transform: perspective(1000px) rotateY(-4deg) rotateX(2deg); transform-origin: center; width: 100%; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(185,28,28,0.15);
  border: 1px solid rgba(185,28,28,0.3); border-radius: 20px; padding: 4px 12px; margin-bottom: 1.5rem;
}
.badge-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #f87171; }
.badge-pill span { font-family: var(--body); font-size: 0.75rem; font-weight: 600; color: #fca5a5; letter-spacing: 0.06em; }

/* Stats strip (theme B) */
.stats-strip { border-top: 1px solid rgba(255,255,255,0.06); padding: 2rem; display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; }
.stats-strip .stat-n { font-family: var(--heading); font-size: 2rem; font-weight: 800; color: #f1f5f9; letter-spacing: -0.04em; }
.stats-strip .stat-l { font-family: var(--body); font-size: 0.8rem; color: #64748b; margin-top: 2px; }

/* Client logo marquee */
.clients { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2.25rem 0; overflow: hidden; }
.clients-label { text-align: center; font-family: var(--body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.75rem; }
.marquee { width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 4rem; width: max-content; animation: marquee-scroll 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.client-logo { display: flex; align-items: center; flex-shrink: 0; }
.client-logo img { height: 46px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: 0.6; transition: filter 0.25s, opacity 0.25s; }
.client-logo:hover img { filter: grayscale(0); opacity: 1; }
[data-theme="b"] .client-logo img { filter: grayscale(1) brightness(0.92); }
[data-theme="b"] .client-logo:hover img { filter: grayscale(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { overflow-x: auto; } }

/* ─── Sections ──────────────────────────────────────────────────────────── */
section.pad { padding: 6rem 0; }
.section-head { text-align: center; margin-bottom: 3.5rem; }
.section-head h2 { font-size: 2.5rem; line-height: 1.2; max-width: 560px; margin: 0 auto; }
[data-theme="b"] .section-head h2 { font-size: 2.2rem; }

/* Highlights */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.hl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.hl-card:hover { box-shadow: var(--shadow-lg); }
.hl-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent-light); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.hl-card h3 { font-family: var(--heading); font-weight: var(--hw); font-size: 1.25rem; margin-bottom: 0.6rem; color: var(--text); }
[data-theme="b"] .hl-card h3 { font-size: 1.1rem; font-weight: 700; }
.hl-card p { font-family: var(--body); font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* Feature rows */
.feature-rows { display: flex; flex-direction: column; gap: 6rem; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.feature-content h3 { font-size: 2rem; margin-bottom: 0.75rem; line-height: 1.2; color: var(--text); }
[data-theme="b"] .feature-content h3 { font-size: 1.75rem; }
.feature-content p.desc { font-family: var(--body); font-size: 1rem; color: var(--muted); line-height: 1.75; margin-bottom: 1.5rem; }
.feature-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.feature-bullets li { display: flex; gap: 0.75rem; align-items: flex-start; font-family: var(--body); font-size: 0.9rem; color: var(--text); }
.feature-bullets svg { flex-shrink: 0; margin-top: 2px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; position: relative; }
.steps-line { position: absolute; top: 24px; left: calc((100% - 6rem) / 6); right: calc((100% - 6rem) / 6); height: 1px; background: var(--border); z-index: 0; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.step-num { width: 48px; height: 48px; border-radius: var(--radius); background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--heading); font-weight: var(--hw-strong); font-size: 1.5rem; position: relative; z-index: 1; flex-shrink: 0; }
[data-theme="b"] .step-num { font-size: 1.25rem; }
.step h4 { font-family: var(--heading); font-weight: var(--hw); font-size: 1.2rem; color: var(--text); }
[data-theme="b"] .step h4 { font-size: 1.05rem; font-weight: 700; }
.step p { font-family: var(--body); font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* CTA banner */
.cta-banner { padding: 5rem 0; }
[data-theme="a"] .cta-banner { background: var(--accent); }
[data-theme="b"] .cta-banner { background: #0c1120; border-top: 1px solid rgba(255,255,255,0.06); }
.cta-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.cta-inner h2 { color: #fff; font-size: 2.5rem; margin-bottom: 1rem; line-height: 1.2; }
[data-theme="b"] .cta-inner h2 { font-size: 2.2rem; }
.cta-inner p { font-family: var(--body); font-size: 1rem; color: rgba(255,255,255,0.75); margin-bottom: 2.5rem; line-height: 1.7; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Page hero (interior) ──────────────────────────────────────────────── */
.page-hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 5rem 0 4rem; }
.page-hero .inner { max-width: 760px; margin: 0 auto; text-align: center; }
.page-hero h1 { font-size: 3rem; margin-bottom: 1rem; line-height: 1.15; color: var(--text); }
[data-theme="b"] .page-hero h1 { font-size: 2.5rem; font-weight: 800; }
.page-hero p { font-family: var(--body); font-size: 1.05rem; color: var(--muted); line-height: 1.75; }

/* Features grid */
.feat-cat { margin-bottom: 0; }
.feat-cat + .feat-cat { margin-top: 4rem; }
.feat-cat-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.feat-cat-head h3 { font-family: var(--heading); font-weight: var(--hw); font-size: 1.5rem; color: var(--text); }
[data-theme="b"] .feat-cat-head h3 { font-size: 1.3rem; font-weight: 700; }
.feat-cat-head .rule { flex: 1; height: 1px; background: var(--border); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; transition: border-color 0.2s, box-shadow 0.2s; box-shadow: var(--shadow); }
.feat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.feat-card .ic { width: 56px; height: 56px; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: center; background: var(--accent-light); transition: background 0.2s; }
[data-theme="a"] .feat-card .ic { border-radius: 50%; }
[data-theme="b"] .feat-card .ic { border-radius: var(--radius); }
.feat-card:hover .ic { background: var(--accent); }
.feat-card .ic svg { stroke: var(--accent); }
.feat-card:hover .ic svg { stroke: #fff; }
.feat-card h4 { font-family: var(--heading); font-weight: var(--hw); font-size: 1.15rem; color: var(--text); margin-bottom: 0.5rem; }
[data-theme="b"] .feat-card h4 { font-size: 1.05rem; font-weight: 700; }
.feat-card p { font-family: var(--body); font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.plan { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); position: relative; }
.plan.featured { background: var(--accent); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: #fff; border: 1.5px solid var(--accent); border-radius: 20px; padding: 2px 14px; font-family: var(--body); font-size: 0.72rem; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; white-space: nowrap; }
.plan-name { font-family: var(--body); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.plan.featured .plan-name { color: rgba(255,255,255,0.7); }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 0.5rem; flex-wrap: wrap; }
.plan-price .amt { font-family: var(--heading); font-size: 2.5rem; font-weight: var(--hw-strong); color: var(--text); letter-spacing: -0.03em; white-space: nowrap; }
.plan-price .amt.amt-sm { font-size: 1.6rem; line-height: 1.3; }
.plan.featured .plan-price .amt { color: #fff; }
.plan-price .per { font-family: var(--body); font-size: 0.85rem; color: var(--muted); }
.plan.featured .plan-price .per { color: rgba(255,255,255,0.65); }
.plan-desc { font-family: var(--body); font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.6; }
.plan-note { display: inline-block; font-family: var(--body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em; color: var(--accent); background: var(--accent-light); border-radius: 6px; padding: 4px 10px; margin-bottom: 1rem; }
.plan.featured .plan-note { color: #fff; background: rgba(255,255,255,0.18); }
.plan.featured .plan-desc { color: rgba(255,255,255,0.8); }
.plan .btn { margin-bottom: 2rem; }
.plan-feats { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.plan-feats li { display: flex; gap: 0.6rem; align-items: flex-start; font-family: var(--body); font-size: 0.875rem; color: var(--text); }
.plan.featured .plan-feats li { color: rgba(255,255,255,0.9); }
.plan-feats svg { flex-shrink: 0; margin-top: 2px; }

/* FAQ */
.faqs { max-width: 760px; margin: 0 auto; }
.faqs h2 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; color: var(--text); }
[data-theme="b"] .faqs h2 { font-size: 1.75rem; }
.faq { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.faq h4 { font-family: var(--heading); font-weight: var(--hw); font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
[data-theme="b"] .faq h4 { font-size: 1rem; font-weight: 700; }
.faq p { font-family: var(--body); font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* Signup */
.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; padding: 5rem 0; }
.signup-grid h1 { font-size: 2.5rem; margin-bottom: 0.75rem; line-height: 1.15; color: var(--text); }
[data-theme="b"] .signup-grid h1 { font-size: 2.2rem; font-weight: 800; }
.signup-grid .sub { font-family: var(--body); font-size: 1rem; color: var(--muted); margin-bottom: 2.5rem; line-height: 1.7; }
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-family: var(--body); font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.field input, .field select {
  width: 100%; font-family: var(--body); font-size: 0.9rem; padding: 0.7rem 0.9rem;
  border-radius: var(--radius); border: 1.5px solid var(--border); outline: none;
  color: var(--text); background: var(--surface); transition: border-color 0.15s;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field.err input { border-color: #dc2626; }
.field .err-msg { font-family: var(--body); font-size: 0.75rem; color: #dc2626; display: none; }
.field.err .err-msg { display: block; }
.form .terms { font-family: var(--body); font-size: 0.78rem; color: var(--muted); text-align: center; }
.signup-aside { position: sticky; top: 80px; }
.aside-card { background: var(--bg-alt); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 2.5rem; margin-bottom: 1.5rem; }
.aside-card h3 { font-family: var(--heading); font-weight: var(--hw); font-size: 1.4rem; color: var(--text); margin-bottom: 1.5rem; }
[data-theme="b"] .aside-card h3 { font-size: 1.2rem; font-weight: 700; }
.benefits { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.benefits li { display: flex; gap: 0.75rem; align-items: flex-start; }
.benefits li span { font-family: var(--body); font-size: 0.9rem; color: var(--text); line-height: 1.5; }
.quote-card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 1.75rem; }
.quote-card .q { font-family: var(--body); font-size: 0.875rem; color: var(--muted); line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
.quote-card .who { display: flex; align-items: center; gap: 0.75rem; }
.quote-card .ava { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--border); }
.quote-card .who .nm { font-family: var(--body); font-weight: 600; font-size: 0.85rem; color: var(--text); }
.quote-card .who .rl { font-family: var(--body); font-size: 0.78rem; color: var(--muted); }
.signup-done { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; }
.signup-done .inner { max-width: 480px; }
.signup-done .check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.signup-done h2 { font-family: var(--heading); font-weight: var(--hw); font-size: 2rem; color: var(--text); margin-bottom: 0.75rem; }
[data-theme="b"] .signup-done h2 { font-size: 1.75rem; font-weight: 700; }
.signup-done p { font-family: var(--body); font-size: 1rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.7; }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
[data-theme="b"] .footer { background: #0c1120; border-top-color: rgba(255,255,255,0.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-social { margin-top: 1rem; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; }
.footer-brand img { height: 28px; width: 28px; object-fit: contain; }
[data-theme="b"] .footer-brand img { filter: brightness(3) saturate(0.3); }
.footer-brand span { font-family: var(--heading); font-weight: var(--hw); font-size: 1.1rem; color: var(--text); }
[data-theme="b"] .footer-brand span { color: #e2e8f0; font-weight: 700; }
.footer p.about { font-family: var(--body); font-size: 0.85rem; color: var(--muted); line-height: 1.7; max-width: 240px; margin-bottom: 1rem; }
.footer .made { font-family: var(--body); font-size: 0.8rem; color: var(--muted); display: block; margin-bottom: 1rem; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-col .footer-social a { width: 36px; height: 36px; margin-bottom: 0; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.footer-col .footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="b"] .footer-col .footer-social a { border-color: rgba(255,255,255,0.18); color: #94a3b8; }
[data-theme="b"] .footer-col .footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-col h4 { font-family: var(--body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer-col a { display: block; font-family: var(--body); font-size: 0.875rem; color: var(--text); margin-bottom: 0.6rem; cursor: pointer; text-decoration: none; }
[data-theme="b"] .footer-col a, [data-theme="b"] .footer p.about { color: #94a3b8; }
[data-theme="b"] .footer-col a { color: #e2e8f0; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
[data-theme="b"] .footer-bottom { border-top-color: rgba(255,255,255,0.08); }
.footer-bottom p { font-family: var(--body); font-size: 0.8rem; color: var(--muted); }
.footer-bottom a { color: inherit; text-decoration: none; transition: color 0.15s; }
.footer-bottom a:hover { color: var(--accent); text-decoration: underline; }

/* ─── Tweaks panel ──────────────────────────────────────────────────────── */
@keyframes tweaksIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.tweaks {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14); width: 230px; animation: tweaksIn 0.2s ease;
  font-family: system-ui, sans-serif;
}
.tweaks[hidden] { display: none; }
.tweaks .title { font-weight: 700; font-size: 0.85rem; color: #0f172a; margin-bottom: 14px; }
.tweaks .grp-label { font-size: 0.7rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.tweaks label.radio { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; }
.tweaks label.radio input { accent-color: #8a1515; }
.tweaks label.radio span { font-size: 0.875rem; color: #0f172a; }
.tweaks .divider { border-top: 1px solid #f1f5f9; margin-top: 4px; padding-top: 14px; }
.tweaks .slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tweaks .slider-head .v { font-size: 0.8rem; font-weight: 700; color: #8a1515; }
.tweaks input[type=range] { width: 100%; accent-color: #8a1515; cursor: pointer; }
.tweaks .nav-btn { display: block; width: 100%; text-align: left; background: none; border: none; padding: 5px 8px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; color: #334155; margin-bottom: 2px; text-transform: capitalize; }
.tweaks .nav-btn.active { background: #fdf2f2; color: #8a1515; font-weight: 600; }

/* ─── Mockups (shared) ──────────────────────────────────────────────────── */
.mock { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-lg); width: 100%; }
.mock.dash { max-width: 480px; }
.mock-aspect { aspect-ratio: 4/3; display: flex; flex-direction: column; }

/* Dashboard mockup — adapts to dark hero in theme B */
.dash-bar { background: var(--bg-alt); padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 9px; align-items: center; }
.dash-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-title { font-family: var(--heading); font-weight: var(--hw); font-size: 14px; color: var(--text); white-space: nowrap; }
.dash-greet { font-family: var(--body); font-size: 11px; color: var(--muted); margin-left: auto; }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.dash-stat { background: var(--surface); padding: 14px 14px 10px; }
.dash-stat .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dash-stat .row svg { stroke: var(--accent); }
.dash-stat .lab { font-family: var(--body); font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.dash-stat .foot { display: flex; align-items: flex-end; justify-content: space-between; }
.dash-stat .val { font-family: var(--heading); font-size: 24px; font-weight: var(--hw-strong); color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.dash-stat .more { font-family: var(--body); font-size: 9px; font-weight: 600; color: var(--accent); }
.dash-tbl-title { padding: 12px 16px 8px; font-family: var(--body); font-size: 11px; font-weight: 700; color: var(--text); }
.dash-tbl { padding: 0 16px 14px; }
.dash-tbl .head { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; padding: 6px 8px; background: var(--bg-alt); border-radius: 4px 4px 0 0; }
.dash-tbl .head span { font-family: var(--body); font-size: 8.5px; font-weight: 600; color: var(--muted); text-align: center; }
.dash-tbl .head span:first-child { text-align: left; }
.dash-tbl .r { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; padding: 7px 8px; border-bottom: 1px solid var(--border); align-items: center; }
.dash-tbl .r .lang { font-family: var(--body); font-size: 10px; font-weight: 600; color: var(--text); }
.dash-tbl .r .c { font-family: var(--body); font-size: 10px; color: var(--muted); text-align: center; }
.dash-tbl .r .tot { font-family: var(--body); font-size: 10px; font-weight: 700; color: var(--text); text-align: center; }
.dash-foot { padding: 10px 16px; background: var(--bg-alt); display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--border); }
.dash-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.dash-foot span { font-family: var(--body); font-size: 11px; color: var(--muted); }

/* Dark-hero overrides for dashboard (theme B home hero) */
[data-theme="b"] .hero .mock.dash { background: #151e30; border-color: rgba(255,255,255,0.08); }
[data-theme="b"] .hero .dash-bar, [data-theme="b"] .hero .dash-foot { background: #0c1120; border-color: rgba(255,255,255,0.07); }
[data-theme="b"] .hero .dash-stats { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.07); }
[data-theme="b"] .hero .dash-stat { background: #1a2438; }
[data-theme="b"] .hero .dash-title, [data-theme="b"] .hero .dash-stat .val, [data-theme="b"] .hero .dash-tbl-title, [data-theme="b"] .hero .dash-tbl .r .lang, [data-theme="b"] .hero .dash-tbl .r .tot { color: #f1f5f9; }
[data-theme="b"] .hero .dash-greet, [data-theme="b"] .hero .dash-stat .lab, [data-theme="b"] .hero .dash-tbl .head span, [data-theme="b"] .hero .dash-tbl .r .c, [data-theme="b"] .hero .dash-foot span { color: #94a3b8; }
[data-theme="b"] .hero .dash-tbl .head { background: #0c1120; }
[data-theme="b"] .hero .dash-tbl .r { border-color: rgba(255,255,255,0.07); }

/* Borrow Book mockup */
.bb-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.bb-logo { width: 17px; height: 17px; border-radius: 5px; background: var(--accent); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bb-title { font-family: var(--heading); font-weight: var(--hw); font-size: 13px; color: var(--text); }
.bb-btn-back { padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border); font-family: var(--body); font-size: 9px; font-weight: 600; color: var(--muted); }
.bb-btn-confirm { padding: 4px 11px; border-radius: var(--radius); background: var(--accent); font-family: var(--body); font-size: 9px; font-weight: 600; color: #fff; }
.bb-body { display: grid; grid-template-columns: 1.05fr 1fr; flex: 1; min-height: 0; }
.bb-left { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--border); overflow: hidden; }
.bb-flabel { font-family: var(--body); font-size: 8px; font-weight: 700; letter-spacing: 0.13em; color: var(--muted); }
.bb-barcode { border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 8px 9px; display: flex; align-items: center; gap: 6px; }
.bb-barcode .caret { width: 1px; height: 11px; background: var(--accent); }
.bb-select { border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; display: flex; align-items: center; }
.bb-select span { font-family: var(--body); font-size: 9px; color: var(--muted); }
.bb-sel-head { display: flex; align-items: center; gap: 6px; }
.bb-sel-head .lbl { font-family: var(--body); font-size: 8px; font-weight: 700; letter-spacing: 0.13em; color: var(--muted); }
.bb-sel-head .left { font-family: var(--body); font-size: 8px; color: var(--muted); }
.bb-sel-head .neg { padding: 1px 6px; border-radius: 4px; background: var(--text); color: var(--surface); font-family: var(--body); font-size: 8px; font-weight: 700; }
.bb-toggle { width: 24px; height: 13px; border-radius: 8px; background: var(--border); position: relative; flex-shrink: 0; }
.bb-toggle .knob { position: absolute; top: 1.5px; left: 1.5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.bb-book { display: flex; gap: 9px; align-items: flex-start; }
.bb-book .meta { display: flex; flex-direction: column; gap: 3px; padding-top: 1px; flex: 1; min-width: 0; }
.bb-book .meta .qty { font-family: var(--body); font-size: 8px; color: var(--muted); }
.bb-book .meta .ttl { font-family: var(--body); font-size: 10px; font-weight: 700; color: var(--text); }
.bb-book .meta .sub { font-family: var(--body); font-size: 8px; color: var(--muted); }
.bb-right { padding: 12px 14px; display: flex; flex-direction: column; background: var(--bg-alt); overflow: hidden; }
.bb-mlabel { font-family: var(--body); font-size: 8px; font-weight: 700; letter-spacing: 0.13em; color: var(--muted); margin-bottom: 4px; }
.bb-mrow { display: flex; justify-content: space-between; align-items: center; padding: 5.5px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.bb-mrow .k { font-family: var(--body); font-size: 9px; color: var(--muted); flex-shrink: 0; }
.bb-mrow .v { font-family: var(--body); font-size: 9px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-tabs { display: flex; gap: 14px; margin-top: 8px; border-bottom: 1px solid var(--border); }
.bb-tabs .tab { font-family: var(--body); font-size: 9px; color: var(--muted); padding-bottom: 5px; }
.bb-tabs .tab.active { font-weight: 600; color: var(--text); border-bottom: 2px solid var(--accent); }

/* Books manage mockup */
.bm-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.bm-logo { width: 17px; height: 17px; border-radius: 5px; background: var(--accent); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bm-title { font-family: var(--heading); font-weight: var(--hw); font-size: 13px; color: var(--text); }
.bm-new { margin-left: auto; padding: 4px 11px; border-radius: var(--radius); background: var(--accent); font-family: var(--body); font-size: 9px; font-weight: 600; color: #fff; }
.bm-tabs { display: flex; padding: 0 14px; border-bottom: 1px solid var(--border); }
.bm-tabs .t { font-family: var(--body); font-size: 9px; font-weight: 400; color: var(--muted); padding: 9px 12px 7px 0; margin-right: 4px; border-bottom: 2px solid transparent; }
.bm-tabs .t.active { font-weight: 700; color: var(--text); border-bottom-color: var(--accent); }
.bm-filters { padding: 10px 14px 6px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--border); }
.bm-sel { border: 1px solid var(--border); border-radius: var(--radius); padding: 5px 8px; display: flex; align-items: center; }
.bm-sel span { font-family: var(--body); font-size: 8px; color: var(--muted); }
.bm-filter-actions { display: flex; gap: 6px; margin-top: 1px; }
.bm-clear { padding: 4px 9px; border-radius: var(--radius); background: var(--accent-light); border: 1px solid var(--accent); font-family: var(--body); font-size: 8px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.bm-search { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; display: flex; align-items: center; gap: 5px; }
.bm-search span { font-family: var(--body); font-size: 8px; color: var(--muted); }
.bm-tbl { flex: 1; min-height: 0; overflow: hidden; }
.bm-thead { display: grid; grid-template-columns: 14px 34px 1.6fr 1.1fr 0.9fr; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.bm-thead span { font-family: var(--body); font-size: 8px; font-weight: 700; color: var(--text); }
.bm-check { width: 9px; height: 9px; border: 1.5px solid var(--muted); border-radius: 2px; }
.bm-trow { display: grid; grid-template-columns: 14px 34px 1.6fr 1.1fr 0.9fr; gap: 8px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.bm-trow:last-child { border-bottom: none; }
.bm-trow .chk { width: 9px; height: 9px; border: 1.5px solid var(--border); border-radius: 2px; }
.bm-trow .ttl { font-family: var(--body); font-size: 8.5px; font-weight: 600; color: var(--accent); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bm-trow .pub { font-family: var(--body); font-size: 8px; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bm-trow .isbn { font-family: var(--body); font-size: 8px; color: var(--text); }
.bm-trow .bc { font-family: var(--body); font-size: 7.5px; color: var(--muted); }

/* Book cover */
.cover { border-radius: 3px; flex-shrink: 0; position: relative; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.cover .spine { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.18); }
.cover .spine-hl { position: absolute; top: 0; bottom: 0; background: rgba(255,255,255,0.25); width: 1px; }
.cover .content { position: absolute; display: flex; flex-direction: column; }
.cover .bar { background: rgba(255,255,255,0.85); border-radius: 1px; }
.cover .bar.dim { background: rgba(255,255,255,0.7); }
.cover .rule { background: rgba(255,255,255,0.45); height: 1px; }
.cover .emblem { border-radius: 50%; border: 1px solid rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; }
.cover .emblem .dot { border-radius: 50%; background: rgba(255,255,255,0.75); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .feature-row, .signup-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .grid-3, .grid-4, .plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps-line { display: none; }
  .hero-visual { justify-content: center; }
  .hero-visual-tilt { transform: none; max-width: 480px; }
}
