* {
  box-sizing: border-box;
}

body {
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, .16);
  --panel-border: rgba(186, 230, 253, .22);
  --page-bg:
    radial-gradient(circle at top left, rgba(56, 189, 248, .16), transparent 32rem),
    #07111f;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: var(--page-bg);
  color: #f8fbff;
}

body[data-font="modern"] { font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif; }
body[data-font="classic"] { font-family: Georgia, Times New Roman, serif; }
body[data-font="compact"] { font-family: Arial, Helvetica, sans-serif; }

body[data-bg="light"] {
  --page-bg: #f8fbff;
  color: #0f172a;
}

body[data-bg="light"] .hero-copy,
body[data-bg="light"] .video-panel,
body[data-bg="light"] .content-card,
body[data-bg="light"] .checkout-card {
  background: #ffffff;
}

body[data-bg="light"] p,
body[data-bg="light"] .content-card ul {
  color: #475569;
}

body[data-bg="premium"] {
  --page-bg:
    radial-gradient(circle at top right, rgba(234, 179, 8, .2), transparent 34rem),
    #020617;
  --accent: #eab308;
  --accent-soft: rgba(234, 179, 8, .18);
}

a {
  color: inherit;
}

.funnel-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px clamp(18px, 4vw, 42px);
  border-bottom: 1px solid rgba(186, 230, 253, .16);
  background: rgba(7, 17, 31, .92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 950;
}

.brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
}

.editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.editor-bar button,
.editor-bar input,
.button {
  min-height: 42px;
  border: 1px solid rgba(186, 230, 253, .24);
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  padding: 10px 13px;
}

.editor-bar button,
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.editor-bar input {
  width: min(360px, 68vw);
  background: #0d1a2b;
  color: #f8fbff;
}

.button.secondary,
.editor-bar button.secondary {
  background: transparent;
  color: #bae6fd;
}

.funnel-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 52px) 20px 64px;
}

.funnel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.video-panel,
.content-card,
.checkout-card {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(13, 26, 43, .86);
  box-shadow: 0 22px 80px rgba(0, 0, 0, .22);
}

.checkout-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: #bfdbfe;
  font-size: 15px;
  font-weight: 850;
}

.checkout-form input {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(186, 230, 253, .24);
  border-radius: 8px;
  background: #0d1a2b;
  color: #f8fbff;
  font: inherit;
  padding: 12px;
}

body[data-bg="light"] .checkout-form label {
  color: #334155;
}

body[data-bg="light"] .checkout-form input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.hero-copy {
  padding: clamp(24px, 5vw, 42px);
}

.step {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .02em;
  padding: 8px 12px;
}

h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
}

h2,
h3 {
  margin: 0 0 10px;
}

p {
  color: #bfdbfe;
  font-size: 20px;
  line-height: 1.55;
}

.video-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.video-frame {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, .18), rgba(14, 165, 233, .06)),
    #102034;
  color: var(--accent);
  text-align: center;
  font-size: 24px;
  font-weight: 950;
  padding: 24px;
}

.video-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(186, 230, 253, .28);
  border-radius: 8px;
  pointer-events: none;
}

.video-frame iframe {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 8px;
}

.video-caption {
  margin: 0;
  color: #93c5fd;
  font-size: 15px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.content-card {
  padding: 22px;
}

.content-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.6;
}

.checkout-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
}

.price {
  color: #ffffff;
  font-size: clamp(42px, 8vw, 74px);
  font-weight: 950;
  line-height: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  text-decoration: none;
}

[data-editable][contenteditable="true"] {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.save-note {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.design-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 12px clamp(18px, 4vw, 42px);
  border-bottom: 1px solid rgba(186, 230, 253, .12);
  background: rgba(7, 17, 31, .96);
}

.design-panel[hidden] {
  display: none;
}

.design-panel label {
  display: grid;
  gap: 5px;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 850;
}

.design-panel select,
.design-panel input {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(186, 230, 253, .22);
  border-radius: 8px;
  background: #0d1a2b;
  color: #f8fbff;
  font: inherit;
  padding: 8px;
}

body[data-layout="video-left"] .video-panel {
  order: -1;
}

body[data-layout="video-top"] .funnel-hero {
  grid-template-columns: 1fr;
}

body[data-layout="video-top"] .video-panel {
  order: -1;
}

body[data-video-size="small"] .video-frame,
body[data-video-size="small"] .video-frame iframe {
  min-height: 220px;
}

body[data-video-size="large"] .video-frame,
body[data-video-size="large"] .video-frame iframe {
  min-height: 460px;
}

body[data-border="sharp"] .hero-copy,
body[data-border="sharp"] .video-panel,
body[data-border="sharp"] .content-card,
body[data-border="sharp"] .checkout-card,
body[data-border="sharp"] .video-frame {
  border-radius: 0;
}

body[data-border="round"] .hero-copy,
body[data-border="round"] .video-panel,
body[data-border="round"] .content-card,
body[data-border="round"] .checkout-card,
body[data-border="round"] .video-frame {
  border-radius: 18px;
}

body[data-border="glow"] .hero-copy,
body[data-border="glow"] .video-panel,
body[data-border="glow"] .content-card,
body[data-border="glow"] .checkout-card {
  box-shadow: 0 0 0 1px var(--accent), 0 24px 90px rgba(56, 189, 248, .2);
}

@media (max-width: 900px) {
  .funnel-hero,
  .content-grid,
  .checkout-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .design-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
