:root {
  --navy: #0f2b46;
  --text: #0b1220;
  --muted: #5b6777;
  --rule: #d9dee6;
  --accent: #f28a2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: #f4f6fa;
  color: var(--text);
}

.lc-back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(217, 222, 230, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.12);
  text-decoration: none;
  color: var(--navy);
  font: 800 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  backdrop-filter: blur(8px);
}

.lc-back-btn:hover {
  border-color: rgba(242, 138, 46, 0.55);
  background: rgba(242, 138, 46, 0.08);
  color: var(--text);
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--lc-bg, #f4f6fa);
}

.canvas {
  width: 1970px;
  height: 1080px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(16, 24, 40, 0.12);
  display: flex;
  padding: 100px 120px;
  gap: 120px;
  align-items: flex-start;
}

/* LEFT SIDE FORM */
.form-wrapper {
  width: 520px;
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 24px;
  transform: translate(var(--lc-form-x, 0px), var(--lc-form-y, 0px));
}

#lead-capture-form-slot {
  width: 100%;
}

/* RIGHT SIDE CONTENT */
.content {
  flex: 1;
  max-width: 950px;
  transform: translate(var(--lc-content-x, 0px), var(--lc-content-y, 0px));
}

.lc-block {
  position: relative;
  transform: translate(var(--lc-x, 0px), var(--lc-y, 0px));
}

.lc-block[contenteditable="true"] {
  outline: 2px dashed rgba(242, 138, 46, 0.65);
  border-radius: 10px;
  padding: 10px;
}

.headline {
  font-size: var(--lc-headline-size, 64px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 26px;
  color: var(--navy);
}

.headline .accent {
  color: var(--accent);
  position: relative;
  padding-bottom: 8px;
}

.headline .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  border-radius: 999px;
  background: rgba(242, 138, 46, 0.25);
  transform: rotate(-2deg);
}

.subcopy {
  font-size: var(--lc-subcopy-size, 22px);
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 44px;
}

.rule {
  height: 1px;
  background: var(--rule);
  margin-bottom: 40px;
}

.section-title {
  font-size: var(--lc-section-title-size, 22px);
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 24px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.step h3 {
  margin: 0;
  font-size: var(--lc-step-title-size, 22px);
  font-weight: 800;
}

.step p {
  margin: 6px 0 0;
  font-size: var(--lc-step-body-size, 18px);
  color: var(--muted);
  line-height: 1.6;
}

/* RESPONSIVE */

@media (max-width: 2000px) {
  .canvas {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 1200px) {
  .canvas {
    flex-direction: column;
    gap: 60px;
    padding: 60px 40px;
  }

  .headline {
    font-size: min(var(--lc-headline-size, 64px), 44px);
  }

  .form-wrapper {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 600px) {
  body {
    background: #fff;
  }

  .stage {
    padding: 0;
  }

  .canvas {
    border-radius: 0;
    box-shadow: none;
    padding: 40px 20px;
  }

  .headline {
    font-size: min(var(--lc-headline-size, 64px), 34px);
  }

  .subcopy {
    font-size: min(var(--lc-subcopy-size, 22px), 18px);
  }

  .step h3 {
    font-size: min(var(--lc-step-title-size, 22px), 18px);
  }

  .step p {
    font-size: min(var(--lc-step-body-size, 18px), 16px);
  }
}

/* Template picker bar (persistent pages.json templates) */
.lc-template-bar {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  max-width: 1880px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 222, 230, 0.95);
  border-radius: 14px;
  box-shadow: 0 14px 45px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(8px);
}

.lc-template-bar-back {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 222, 230, 0.95);
  text-decoration: none;
  color: var(--navy);
  font: 800 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: rgba(255, 255, 255, 0.95);
}

.lc-template-bar-back:hover {
  border-color: rgba(242, 138, 46, 0.55);
  background: rgba(242, 138, 46, 0.1);
  color: var(--text);
}

.lc-template-bar-label {
  font: 800 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.lc-template-bar-select {
  flex: 1 1 720px;
  min-width: 420px;
  max-width: 1200px;
  padding: 10px 10px;
  border: 1px solid #d9dee6;
  border-radius: 12px;
  background: #fff;
  font: 800 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
}

.lc-template-bar-edit {
  padding: 10px 12px;
  border: 1px solid rgba(242, 138, 46, 0.55);
  border-radius: 12px;
  background: rgba(242, 138, 46, 0.1);
  font: 800 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  cursor: pointer;
}

.lc-template-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  flex: 1 1 320px;
}

.lc-template-bar-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 222, 230, 0.95);
  text-decoration: none;
  color: var(--navy);
  font: 800 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: rgba(255, 255, 255, 0.95);
}

.lc-template-bar-links a[aria-current="page"] {
  border-color: rgba(242, 138, 46, 0.55);
  background: rgba(242, 138, 46, 0.1);
  color: var(--text);
}
