@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --color-primary: #020218;
  --color-primary-soft: #1650eb;
  --color-secondary: #1650eb;
  --color-accent: #1650eb;
  --color-accent-hover: #4d84ff;
  --color-accent-soft: #f0f0ff;
  --color-cta: #1650eb;
  --color-cta-hover: #1852ec;
  --color-cta-end: #4d84ff;
  --color-gold: #f59e0b;
  --color-gold-light: #4d84ff;
  --color-background: #f0f0ff;
  --color-surface: #ffffff;
  --color-foreground: #36364a;
  --color-muted: #6a6a6a;
  --color-border: #e4dffb;
  --color-border-strong: #dedef7;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --header-h: 72px;
  --nav-h: 52px;
  --sticky-top: calc(var(--header-h) + var(--nav-h) + 10px);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(22, 80, 235, 0.06);
  --shadow-md: 0 12px 40px rgba(22, 80, 235, 0.12);
  --shadow-lg: 0 24px 60px rgba(22, 80, 235, 0.14);
  --shadow-preview: 0 28px 70px rgba(22, 80, 235, 0.18);
  --shadow-card: 0 5px 50px rgba(22, 80, 235, 0.1);
  --gradient-brand: linear-gradient(90deg, #1650eb 0%, #4d84ff 100%);
  --gradient-title: linear-gradient(153deg, #020218 0%, #1650eb 100%);
  --gradient-hero: radial-gradient(ellipse 70% 55% at 15% 0%, rgba(22, 80, 235, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(77, 132, 255, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 45% 40% at 50% 100%, rgba(22, 80, 235, 0.06) 0%, transparent 50%);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font: 16px/1.6 var(--font-body);
  color: var(--color-foreground);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-secondary); text-decoration: none; }
a:hover { color: var(--color-primary); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { left: 12px; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 28px;
}
@media (min-width: 900px) {
  .header-nav { display: flex; }
}
.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--color-primary); }

.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-link img { height: 36px; width: auto; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(22, 80, 235, 0.35);
}
.header-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 80, 235, 0.42);
}

/* ── Morph icons (morphicons-style) ── */
.morph-icon {
  position: relative;
  display: inline-flex;
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}
.morph-icon__a,
.morph-icon__b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.morph-icon__b {
  opacity: 0;
  transform: scale(0.85) rotate(-8deg);
}
a:hover .morph-icon__a,
button:hover .morph-icon__a {
  opacity: 0;
  transform: scale(0.85) rotate(8deg);
}
a:hover .morph-icon__b,
button:hover .morph-icon__b {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eef3ff;
  color: var(--color-secondary);
  flex-shrink: 0;
}
.icon-wrap--soft { background: var(--color-accent-soft); color: var(--color-secondary); }

/* ── Hero (SaaS) ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 20px 64px;
  background: var(--color-background);
  color: var(--color-foreground);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-showcase { order: -1; max-width: 420px; margin: 0 auto; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-secondary);
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-family: var(--font-body);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.03em;
  background: var(--gradient-title);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 520px;
  margin: 0 0 24px;
}

.hero-social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 28px;
  font-size: 0.875rem;
  color: var(--color-muted);
}
.hero-social strong {
  font-size: 1.125rem;
  color: var(--color-primary);
}
.hero-social a {
  font-weight: 600;
  color: var(--color-secondary);
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  max-width: 420px;
}

@media (max-width: 480px) {
  .hero-features { grid-template-columns: 1fr; }
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-foreground);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.hero-badge .icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.hero-features li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex-shrink: 0;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 8px 24px rgba(22, 80, 235, 0.35);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(22, 80, 235, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.btn-secondary:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  transform: translateY(-1px);
}

/* Hero showcase cards */
.hero-showcase {
  position: relative;
  min-height: 380px;
}

.hero-showcase__main {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  background: #fff;
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.hero-showcase__main:hover { transform: rotate(0deg) scale(1.02); }
.hero-showcase__main img { width: 100%; height: auto; display: block; }

.float-card {
  position: absolute;
  z-index: 3;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease-out;
  max-width: 240px;
}
.float-card--review {
  bottom: 12%;
  left: -8%;
  animation: float-y 5s ease-in-out infinite;
}
.float-card--stat {
  top: 8%;
  right: -6%;
  animation: float-y 4s ease-in-out infinite 0.5s;
}
@media (max-width: 960px) {
  .float-card--review { left: 0; bottom: -12px; }
  .float-card--stat { right: 0; top: -12px; }
}
@keyframes float-y {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.float-card__stars { color: var(--color-secondary); font-size: 0.75rem; letter-spacing: 1px; }
.float-card__text { margin: 6px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--color-foreground); }
.float-card__author { margin: 8px 0 0; font-size: 0.75rem; color: var(--color-muted); }
.float-card__author strong { display: block; color: var(--color-primary); font-size: 0.8125rem; }

.float-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}
.float-stat__val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1;
}

.float-stat__label { font-size: 0.75rem; color: var(--color-muted); line-height: 1.35; }

/* Hero feature bar — SlidePix-style white card */
.hero-bar {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 28px 28px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
@media (max-width: 900px) {
  .hero-bar {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 40px;
    padding: 24px 20px 28px;
  }
}
@media (max-width: 480px) {
  .hero-bar { grid-template-columns: 1fr; }
}

.hero-bar__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: none;
  transition: transform var(--transition);
}
.hero-bar__item:hover {
  transform: translateY(-2px);
  box-shadow: none;
}
.hero-bar__item h3 {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
}
.hero-bar__item p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.45;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ── Trust bar ── */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: center;
  padding: 24px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-foreground);
  background: var(--color-surface);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #dde2e6;
  transition: border-color var(--transition);
}
.trust-item:hover {
  border-color: var(--color-cta-end);
}
.trust-item .icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

/* ── Doc nav (sticky) ── */
.doc-nav-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.doc-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.doc-nav-label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  min-width: 108px;
}

.doc-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.doc-nav::-webkit-scrollbar { display: none; }

@media (max-width: 640px) {
  .doc-nav-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .doc-nav-label { min-width: 0; }
}

.doc-nav a {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}
.doc-nav a:hover {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}
.doc-nav a.on {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(22, 80, 235, 0.35);
}

/* ── Editor zone ── */
.editor-zone {
  padding: 40px 20px 56px;
  background: var(--color-background);
}

.editor-head {
  max-width: 1200px;
  margin: 0 auto 28px;
}

.editor-head h2 {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  background: var(--gradient-title);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 10px;
}

.editor-head p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
  max-width: 640px;
  line-height: 1.65;
}

/* ── Builder grid ── */
.builder {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 28px;
  /* start — левая колонка по контенту; preview-col растягивается отдельно */
  align-items: start;
}

@media (min-width: 921px) {
  /* Ключ к sticky: колонка превью = высота всей строки (как у panel) */
  .preview-col {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .preview {
    position: sticky;
    top: var(--sticky-top);
    z-index: 10;
    flex: 0 0 auto;
    max-height: calc(100vh - var(--sticky-top) - 16px);
    overflow: visible;
  }

  .preview-stage {
    max-height: calc(100vh - var(--sticky-top) - 100px);
    overflow: auto;
    scrollbar-width: thin;
  }
}

@media (max-width: 920px) {
  .builder { grid-template-columns: 1fr; }
  .preview-col { order: -1; }
  .preview { position: static !important; max-height: none; }
  .preview-stage { max-height: none; overflow: visible; }
}

/* ── Panel ── */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.panel-block {
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}
.panel-block:last-child { border-bottom: none; }

.panel-block-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  margin: 0 0 16px;
}

.panel-block--accent {
  background: linear-gradient(180deg, #f8f9ff 0%, var(--color-accent-soft) 100%);
  border-top: 1px solid var(--color-border);
}

.ctrl { margin-bottom: 14px; }
.ctrl:last-child { margin-bottom: 0; }

.ctrl label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-foreground);
  margin-bottom: 6px;
}

.ctrl input[type=text],
.ctrl textarea,
.ctrl select {
  width: 100%;
  font-size: 0.9375rem;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-foreground);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ctrl input:focus,
.ctrl textarea:focus,
.ctrl select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(22, 80, 235, 0.12);
}
.ctrl textarea { min-height: 72px; resize: vertical; }
.ctrl-row { display: flex; gap: 12px; }
.ctrl-row > div { flex: 1; }

.ctrl input[type=color] {
  width: 52px;
  height: 42px;
  padding: 3px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
}
.ctrl input[type=file] {
  font-size: 0.8125rem;
  width: 100%;
}

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1;
  min-width: 80px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 10px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  cursor: pointer;
  color: var(--color-muted);
  transition: all var(--transition);
  font-family: inherit;
}
.seg button:hover:not(:disabled) {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: var(--color-accent-soft);
}
.seg button.on {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(22, 80, 235, 0.28);
}
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }

.bgpick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}

.bgpick .bgthumb {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--color-border);
  cursor: pointer;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.bgpick .bgthumb:hover {
  border-color: var(--color-secondary);
  transform: scale(1.03);
}
.bgpick .bgthumb.on {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(22, 80, 235, 0.2);
}

.hint {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 8px;
  line-height: 1.5;
}
.hint a { color: var(--color-secondary); }

.samples { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.samples button {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-background);
  color: var(--color-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.samples button:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: var(--color-accent-soft);
}

.btn-download {
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  font-family: inherit;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(22, 80, 235, 0.35);
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(22, 80, 235, 0.45);
}

.format-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.format-modal[hidden] { display: none; }
.format-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 24, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.format-modal-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-card);
}
.format-modal-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin: 0 0 20px;
  text-align: center;
}
.format-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.format-opt {
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 18px 8px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  background: var(--color-surface);
  color: var(--color-foreground);
}
.format-opt:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-secondary);
}
.format-opt--pdf {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(22, 80, 235, 0.3);
}
.format-opt--pdf:hover {
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(22, 80, 235, 0.38);
}
.format-opt--jpg {
  background: #eef3ff;
  color: var(--color-secondary);
  border-color: var(--color-border);
}
.format-opt--png {
  background: var(--color-accent-soft);
  color: var(--color-secondary);
  border-color: var(--color-border);
}
.format-modal-close {
  width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.format-modal-close:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: var(--color-accent-soft);
}

body.modal-open { overflow: hidden; }

/* ── Preview (sticky) ── */
.preview-col {
  min-width: 0;
}

.preview {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.preview.is-fixed {
  box-shadow: var(--shadow-md);
}

.preview-placeholder {
  visibility: hidden;
  pointer-events: none;
  flex-shrink: 0;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.preview-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.preview-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-secondary);
  background: var(--color-accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
}

.preview-stage {
  position: relative;
  background: linear-gradient(145deg, #f0f0ff 0%, #e8ecff 100%);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 16px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: calc(100vh - var(--sticky-top) - 120px);
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-preview);
}

.bgloading {
  position: absolute;
  inset: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  pointer-events: none;
  z-index: 3;
}
.bgloading.on { opacity: 1; visibility: visible; }
.bgloading .spin {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(22, 80, 235, 0.12);
  border-top-color: var(--color-secondary);
  border-radius: 50%;
  animation: bgspin 0.7s linear infinite;
}
@keyframes bgspin { to { transform: rotate(360deg); } }

/* ── Content sections ── */
.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.section-title {
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  background: var(--gradient-title);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 48px 0 12px;
}

.section-lead {
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 0 28px;
  font-size: 1rem;
}

.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.steps li {
  position: relative;
  padding: 20px 20px 20px 56px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 28px;
  height: 28px;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 28px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--color-primary);
}
.feature-card p { margin: 0; font-size: 0.875rem; color: var(--color-muted); line-height: 1.6; }

.feature-icon {
  margin-bottom: 16px;
}
.feature-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.categories h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin: 28px 0 12px;
}
.categories ul { margin: 0; padding-left: 20px; color: var(--color-muted); }
.categories li { margin-bottom: 8px; line-height: 1.55; }
.categories a { font-weight: 600; }

.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-muted);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { background: var(--color-background); }
.faq-item p {
  margin: 0;
  padding: 0 20px 16px;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.65;
}

.tpls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.tpls a { text-decoration: none; color: inherit; cursor: pointer; }
.tpls figure { margin: 0; }
.tpls img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  background: #fff;
  transition: transform var(--transition), box-shadow var(--transition);
}
.tpls a:hover img {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.tpls figcaption {
  font-size: 0.8125rem;
  margin-top: 10px;
  font-weight: 600;
  color: var(--color-muted);
  text-align: center;
}
.tpls a:hover figcaption { color: var(--color-secondary); }

/* ── Stats, SEO, reviews, CTA ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0 8px;
}
@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
.stat-card strong {
  display: block;
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-secondary);
  line-height: 1.1;
}
.stat-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card span {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.seo-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin: 48px 0;
}
@media (max-width: 640px) {
  .seo-content { padding: 24px 20px; }
}
.seo-content h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--color-primary);
  margin: 32px 0 12px;
}
.seo-content h3:first-child { margin-top: 0; }
.seo-content p {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--color-text);
}
.seo-content ul {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--color-text);
  line-height: 1.7;
  font-size: 0.9375rem;
}
.seo-content li { margin-bottom: 6px; }
.seo-content a { font-weight: 600; }

.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.use-case {
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-top: 3px solid var(--color-secondary);
  transition: transform var(--transition), box-shadow var(--transition);
}
.use-case:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.use-case h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 8px;
  color: var(--color-primary);
}
.use-case p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.compare-wrap { overflow-x: auto; margin: 24px 0; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.compare-table thead th {
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table .yes { color: #15803d; font-weight: 700; }
.compare-table .no { color: #b91c1c; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-stars {
  color: var(--color-secondary);
  font-size: 1rem;
  letter-spacing: 2px;
}
.review-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text);
  flex: 1;
}
.review-author {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.4;
}
.review-author strong {
  display: block;
  color: var(--color-primary);
  font-size: 0.875rem;
}
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: #eef3ff;
  border: 1px solid rgba(22, 80, 235, 0.12);
  border-radius: var(--radius);
}
.reviews-score {
  font-family: var(--font-body);
  font-size: 3rem;
  font-weight: 600;
  color: var(--color-secondary);
  line-height: 1;
}
.reviews-meta { font-size: 0.875rem; color: var(--color-muted); }
.reviews-meta strong { color: var(--color-primary); }

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.audience-item {
  text-align: center;
  padding: 16px 12px;
  background: var(--color-background);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.cta-banner {
  margin: 48px 0 0;
  padding: 4px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(22, 80, 235, 0.14) 0%, rgba(77, 132, 255, 0.1) 100%);
}
.cta-banner__inner {
  padding: 48px 32px;
  text-align: center;
  background: var(--color-surface);
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid var(--color-border);
}
.cta-banner__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 20px;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--color-primary);
}
.cta-banner p {
  margin: 0 auto 28px;
  color: var(--color-muted);
  max-width: 520px;
  line-height: 1.65;
  font-size: 1rem;
}
.cta-banner .btn-primary {
  margin: 0 auto;
}

/* ── Footer ── */
.site-footer {
  background: var(--color-surface);
  color: var(--color-muted);
  padding: 48px 20px 32px;
  margin-top: 32px;
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.site-footer a { color: var(--color-secondary); }
.site-footer p { margin: 0 0 10px; font-size: 0.875rem; line-height: 1.6; }
.footer-logo { margin-bottom: 16px; height: 32px; width: auto; }
.footer-disclaimer {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  opacity: 0.65;
  line-height: 1.6;
}
