/* МангаМиг — landing, 2026 */
:root {
  --bg: #F7F5F0;
  --bg-deep: #EFEBE3;
  --ink: #171717;
  --ink-soft: #2C2926;
  --muted: #6B645C;
  --muted-2: #8A837A;
  --card: #FFFDF9;
  --paper: #FFFcf8;
  --line: #E6DFD4;
  --line-strong: #D4CBBE;
  --accent: #C81E3A;
  --accent-hover: #A31830;
  --accent-soft: #FDECEE;
  --accent-ink: #8F1528;
  --ok: #1F7A4D;
  --ok-soft: #E6F3EC;
  --shadow: 0 18px 44px rgba(23, 23, 23, 0.08);
  --shadow-soft: 0 8px 24px rgba(23, 23, 23, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --wrap: 1180px;
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", "Noto Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::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;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.55 var(--font);
  font-weight: 400;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 520px at 8% -8%, #fde6ea 0%, transparent 55%),
    radial-gradient(900px 420px at 110% 0%, #eee7db 0%, transparent 48%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(247, 245, 240, 0.86);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.04);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(var(--wrap), calc(100% - 32px));
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.logo svg { width: 28px; height: 28px; display: block; }
.logo:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: rgba(23, 23, 23, 0.04); }

.header-cta { margin-left: 8px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
}
.menu-toggle:hover { background: rgba(23, 23, 23, 0.05); }
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  margin: 0 auto;
  position: relative;
  transition: transform .2s var(--ease), opacity .2s;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.site-header.is-open .menu-toggle span { background: transparent; }
.site-header.is-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
.site-header.is-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #c9bfb2; }
.btn-light {
  background: #fff;
  color: var(--accent);
  border-color: transparent;
}
.btn-light:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn-lg { padding: 13px 22px; font-size: 1rem; }

.tg-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 24px; }
.hero__copy { max-width: 40rem; }
.kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 650;
}
.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
  max-width: 38rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
}

.hero__visual {
  margin: 40px 0 0;
  position: relative;
}
.shot {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  text-align: left;
  color: inherit;
}
.shot:hover { border-color: var(--line-strong); }
.shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.shot img { width: 100%; background: #fff; }
.shot__flags {
  position: static;
  order: -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  pointer-events: none;
}
.flag {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.flag:last-child { color: var(--accent); }
.shot__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 253, 249, 0.94);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.shot:hover .shot__zoom,
.shot:focus-visible .shot__zoom {
  opacity: 1;
  transform: none;
}
.hero__visual figcaption {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head {
  max-width: 38rem;
  margin-bottom: 32px;
}
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 650;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Advantages ---------- */
.adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.adv {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-soft);
}
.adv__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.adv__icon svg { width: 20px; height: 20px; }
.adv h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.adv p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Examples ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.filter {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 550;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter:hover { border-color: var(--line-strong); color: var(--ink); }
.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.filter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.examples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.example { margin: 0; }
.example.is-hidden { display: none; }
.example figcaption {
  padding: 12px 4px 0;
}
.example figcaption strong {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.example figcaption span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}
.example--wide { grid-column: 1 / -1; }

/* ---------- How ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.step h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  font-weight: 650;
  padding-left: 44px;
}
.step p {
  margin: 0;
  color: var(--muted);
  padding-left: 44px;
}
.step h3::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0;
}

/* ---------- Tariffs ---------- */
.tariffs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}
.tariff {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.tariff.featured {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(156, 31, 74, 0.12);
  background: linear-gradient(180deg, #fff8fa 0%, var(--card) 42%);
}
.tariff__badge {
  position: absolute;
  top: -11px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.tariff h3 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.tariff .price {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tariff .price span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.tariff .price.from { font-size: 1.7rem; }
.tariff ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}
.tariff li {
  position: relative;
  padding: 5px 0 5px 18px;
}
.tariff li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.tariff .btn { width: 100%; }
.tariff-free .price { color: var(--ok); }

.pricing-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
  padding: 16px 48px 16px 18px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1.6px solid var(--ink);
  border-bottom: 1.6px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s var(--ease);
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 12px;
}
.faq details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  max-width: 52rem;
}

/* ---------- Final CTA + footer ---------- */
.final {
  padding: 0 0 72px;
}
.final__banner {
  background: var(--ink);
  color: #f4f1ec;
  border-radius: 22px;
  padding: 40px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.final__banner::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -160px;
  background: radial-gradient(circle, rgba(156, 31, 74, 0.45), transparent 68%);
  pointer-events: none;
}
.final__banner h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
  font-weight: 650;
  position: relative;
}
.final__banner p {
  margin: 0;
  color: #c9c2b8;
  max-width: 36rem;
  position: relative;
}
.final__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { color: var(--ink); font-weight: 650; letter-spacing: -0.02em; }
.footer-brand span { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.copyright { margin-top: 18px; color: var(--muted-2); font-size: 0.82rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 16, 15, 0.92);
  display: flex;
  flex-direction: column;
  color: #f4f1ec;
  padding: 16px;
}
.lightbox[hidden] { display: none !important; }
.lightbox__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 4px 4px 12px;
}
.lightbox__caption {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  color: #d8d2c8;
}
.lightbox__caption strong { color: #fff; font-weight: 650; }
.lightbox__tools { display: flex; gap: 8px; }
.lb-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lb-btn:hover { background: rgba(255,255,255,0.14); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  cursor: zoom-in;
}
.lightbox__stage.is-zoomed { cursor: zoom-out; place-items: start center; }
.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__stage.is-zoomed img {
  max-width: none;
  max-height: none;
  width: min(2400px, 200vw);
}
.lightbox__hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #9a948c;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .adv-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 800px) {
  .examples { grid-template-columns: 1fr 1fr; }
  .tariffs { grid-template-columns: 1fr 1fr; }
  .adv-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1100px) {
  .tariffs { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 88px 0; }
  .hero { padding: 64px 0 28px; }
}
@media (max-width: 799px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 16px 16px;
    background: rgba(247, 245, 240, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 12px 10px; }
  .header-cta {
    margin: 10px 0 0;
    width: 100%;
  }
  .header-cta .btn { width: 100%; }
  .hero { padding: 32px 0 16px; }
  .hero h1 { font-size: clamp(1.85rem, 9vw, 2.4rem); }
  .lead { font-size: 1.02rem; }
  .section { padding: 56px 0; }
  .final__banner { padding: 28px 22px; }
  .shot__zoom { display: none; }
}
@media (max-width: 479px) {
  .wrap { width: min(var(--wrap), calc(100% - 28px)); }
  .btn-lg { width: 100%; }
  .hero__actions { flex-direction: column; align-items: stretch; }
}

/* Anchor offset under sticky header */
#advantages, #examples, #how, #pricing, #faq {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.btn-on-dark {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  background: transparent;
}
.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.tariffs { padding-top: 12px; }
@media (max-width: 799px) {
  .header-cta.btn { width: 100%; }
}

@media (min-width: 800px) {
  .examples > .example:last-child:not(.example--wide) {
    grid-column: 1 / -1;
    width: calc((100% - 20px) / 2);
    justify-self: center;
  }
}
.price-prefix {
  font-size: 1rem;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: -0.02em;
  margin-right: 6px;
}
.tariff .price.from { font-size: 2rem; }
.header-cta-bar {
  display: none;
  margin-left: auto;
  padding: 8px 13px;
  font-size: 0.85rem;
}
@media (max-width: 799px) {
  .header-cta-bar { display: inline-flex; }
  .menu-toggle { margin-left: 4px; }
}

/* ---------- Legal pages ---------- */
.wrap.legal-wrap { max-width: 760px; }
.legal { padding: 48px 0 80px; }
.legal h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 650;
}
.legal-meta {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}
.legal-lead {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.legal h2 {
  margin: 36px 0 12px;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  font-weight: 650;
  line-height: 1.3;
}
.legal p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}
.legal ol,
.legal ul {
  margin: 0 0 16px;
  padding-left: 1.25em;
  color: var(--ink-soft);
}
.legal li { margin: 0 0 8px; }
.legal li:last-child { margin-bottom: 0; }
.legal a { text-decoration-thickness: 1px; text-underline-offset: 2px; }

.legal-card {
  margin: 8px 0 28px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.legal-card h2 { margin-top: 0; }
.legal-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 10px 16px;
}
.legal-dl dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 3px;
}
.legal-dl dd {
  margin: 0;
  color: var(--ink);
}

.legal-table-wrap {
  margin: 8px 0 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-table th {
  font-weight: 600;
  background: var(--bg-deep);
  color: var(--ink);
  white-space: nowrap;
}
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table .price-cell {
  white-space: nowrap;
  font-weight: 650;
  color: var(--ink);
}

.footer-legal {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-legal + .copyright { margin-top: 6px; }

@media (max-width: 599px) {
  .legal { padding: 32px 0 64px; }
  .legal-card { padding: 18px 18px; }
  .legal-dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .legal-dl dt { margin-top: 10px; }
  .legal-dl dt:first-child { margin-top: 0; }
  .legal-table .price-cell { white-space: normal; }
}


/* ---------- Before / After slider ---------- */
.ba-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.ba-tabs button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.ba-tabs button:hover { border-color: var(--line-strong); color: var(--ink); }
.ba-tabs button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ba {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  background: #111;
  box-shadow: var(--shadow);
  user-select: none;
  touch-action: none;
  aspect-ratio: 3 / 4;
  max-height: min(72vh, 820px);
  margin: 0 auto;
}
.ba img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #161616;
  pointer-events: none;
}
.ba__after { position: absolute; inset: 0; }
.ba__before-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  border-right: 0;
}
.ba__before { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.ba__handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  color: var(--ink);
}
.ba__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.08em;
}
.ba__label {
  position: absolute;
  top: 14px;
  z-index: 2;
  background: rgba(17,17,17,.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  pointer-events: none;
}
.ba__label--before { left: 14px; }
.ba__label--after { right: 14px; }
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
}
.ba-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 12px 0 0;
}
.ba-caption strong { color: var(--ink); font-weight: 650; }

/* ---------- Upload on landing ---------- */
.upload-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .upload-grid { grid-template-columns: 1fr; }
}
.upload-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.drop {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  padding: 32px 18px;
  text-align: center;
  background: #fbfaf6;
  cursor: pointer;
}
.drop input[type="file"] { display: none; }
.drop.drag, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.drop span { display: block; color: var(--muted); font-size: 0.92rem; }
.upload-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; align-items: end; }
.upload-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.upload-row select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  min-width: 160px;
}
.upload-status { margin-top: 16px; color: var(--muted); font-size: 0.95rem; }
.upload-status.is-error { color: #9b1c1c; }
.upload-preview { margin-top: 16px; display: none; }
.upload-preview.is-on { display: block; }
.upload-preview img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #111;
}
.upload-price { margin: 10px 0 0; font-weight: 650; }

/* ---------- Compare table ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.compare th, .compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare th { font-size: 0.86rem; letter-spacing: 0.02em; color: var(--muted); font-weight: 650; }
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; width: 22%; }
.compare .ok { color: var(--ok); font-weight: 650; }
.compare .bad { color: #9b1c1c; }
.compare .ours { background: var(--accent-soft); }

.price-old {
  display: inline-block;
  margin-right: 8px;
  color: var(--muted-2);
  text-decoration: line-through;
  font-weight: 500;
  font-size: 0.7em;
}
.tariff .promo-note { color: var(--accent-ink); font-weight: 650; font-size: 0.92rem; margin: 0 0 8px; }

.tariffs-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 860px) {
  .tariffs-2 { grid-template-columns: 1fr; }
}

.hero__visual .ba { max-height: min(68vh, 760px); width: min(100%, 460px); }
@media (max-width: 900px) {
  .hero__visual .ba { width: 100%; }
}

@media (min-width: 980px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 48px;
    align-items: center;
  }
  .hero__visual { margin: 0; }
  .hero__copy { max-width: none; }
}


/* Layout fixes: 3 tariff cards, no wrap on brand, stacked upload steps */
.table-wrap,
.compare-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}
@media (max-width: 799px) {
  .table-wrap, .compare-wrap { overflow: visible; }
  .compare {
    min-width: 0 !important;
    width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .compare thead { display: none; }
  .compare tbody, .compare tr, .compare th, .compare td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .compare tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    margin: 0 0 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
  }
  .compare td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
  }
  .compare td:last-child { border-bottom: 0; }
  .compare td:first-child {
    width: 100%;
    font-weight: 700;
    background: #f6f3ee;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--muted);
    font-weight: 650;
    margin-bottom: 4px;
  }
  .compare td:first-child::before { display: none; }
  .compare td.ours { background: var(--accent-soft); }
}
.compare th.ours { white-space: nowrap; }
.upload-steps.steps {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 16px;
}
@media (min-width: 800px) {
  .tariffs { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .tariffs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 599px) {
  .upload-row { flex-direction: column; align-items: stretch; }
  .upload-row .btn { width: 100%; text-align: center; }
  .drop { padding: 24px 14px; }
  .drop strong { font-size: 0.98rem; }
}

html, body { overflow-x: clip; }
