:root {
  --bg: #f8f6f1;
  --surface: #ffffff;
  --surface-alt: #f2efe8;
  --ink: #14161f;
  --muted: #5b6275;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --accent: #ea580c;
  --border: rgba(20, 22, 31, 0.12);
  --radius: 12px;
  --ctl-radius: 8px;
  --ctl-h: 36px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }

p {
  margin: 0 0 16px 0;
  max-width: 70ch;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Global Banner */
.bt-global-banner {
  background: rgba(79, 70, 229, 0.12);
  border-bottom: 1px solid rgba(79, 70, 229, 0.28);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 10px 16px;
}

.bt-global-banner.is-warn {
  background: rgba(234, 88, 12, 0.12);
  border-bottom-color: rgba(234, 88, 12, 0.35);
}

/* Header — Strict 36px Uniform Control Height */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--ctl-h);
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

/* Hide redundant subtitle pill on medium screens so it never competes with 36px nav pills */
.brand-tag {
  display: none;
}

@media (min-width: 1200px) {
  .brand-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--surface-alt);
    color: var(--muted);
    border: 1px solid var(--border);
    white-space: nowrap;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ctl-h);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  padding: 0 12px;
  border-radius: var(--ctl-radius);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  text-decoration: none;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctl-h);
  padding: 0 12px;
  border-radius: var(--ctl-radius);
  background: rgba(79, 70, 229, 0.09);
  border: 1px solid rgba(79, 70, 229, 0.28);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.credit-pill:hover {
  background: rgba(79, 70, 229, 0.16);
  border-color: var(--primary);
}

.credit-pill.is-low {
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.4);
  color: var(--accent);
}

/* Buttons — Clean 2-Tier Sizing (44px Standard CTA, 36px Toolbar/Header Compact) */
.btn-primary,
.btn-secondary,
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--ctl-radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: #c2410c;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-sm {
  height: var(--ctl-h);
  min-height: var(--ctl-h);
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--ctl-radius);
}

.auth-bar .btn-sm {
  max-width: 176px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Studio Hero */
.studio-section {
  padding-top: 24px;
  padding-bottom: 48px;
}

.hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-sub {
  margin: 8px 0 0 0;
  color: var(--muted);
  font-size: 16px;
}

.studio-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.studio-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  align-items: start;
}

/* Left Canvas Lightbox */
.lightbox-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.seg-group {
  display: inline-flex;
  align-items: center;
  height: var(--ctl-h);
  background: var(--surface-alt);
  padding: 3px;
  border-radius: var(--ctl-radius);
  border: 1px solid var(--border);
  gap: 2px;
  flex-shrink: 0;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.seg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seg-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.sample-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: var(--ctl-radius);
  background: rgba(79, 70, 229, 0.08);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
}

.canvas-stage {
  position: relative;
  background: #181a24;
  border-radius: var(--radius);
  padding: 16px;
  max-height: 600px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border: 1px solid var(--border);
}

.studio-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: grab;
  background: #ffffff;
}

.studio-canvas.is-zoom-100 {
  max-width: none;
}

.studio-canvas:active {
  cursor: grabbing;
}

.filmstrip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.page-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  border-radius: var(--ctl-radius);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.page-chip.is-active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

/* Right Inspector & Batch Controls */
.inspector-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.drop-card {
  border: 1px dashed rgba(79, 70, 229, 0.45);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
}

.drop-card.is-dragover {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}

.drop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-strip {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: var(--ctl-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.slice-progress {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--ctl-radius);
  background: rgba(79, 70, 229, 0.08);
  font-size: 12px;
  font-weight: 600;
}

.slice-progress-track {
  height: 6px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.slice-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.2s ease;
}

/* Inline Conversion / Paywall Card */
.conversion-card {
  background: #fffaf5;
  border: 1.5px solid rgba(234, 88, 12, 0.45);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conversion-card h3 {
  font-size: 16px;
}

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

.lang-row,
.dim-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.studio-select,
.studio-input,
.studio-textarea {
  width: 100%;
  padding: 0 8px;
  height: var(--ctl-h);
  border-radius: var(--ctl-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 34px;
}

.studio-textarea {
  height: auto;
  min-height: 72px;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.45;
}

.inspector-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-sm {
  display: inline-flex;
  align-items: center;
  height: 28px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  white-space: nowrap;
}

.overflow-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.source-preview {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  background: var(--surface);
  border-radius: var(--ctl-radius);
  border: 1px solid var(--border);
}

.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
}

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

.glossary-drawer {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.glossary-drawer summary {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 130px;
  overflow-y: auto;
  font-size: 12px;
}

.glossary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.status-banner {
  padding: 8px 12px;
  border-radius: var(--ctl-radius);
  font-size: 13px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--ink);
}

.status-banner.is-error {
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.35);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Showcase Figure */
.showcase-figure {
  margin: 24px 0 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.showcase-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.showcase-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Content Sections */
.content-section {
  padding-top: 48px;
  padding-bottom: 48px;
  border-top: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.two-col-prose {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  align-items: start;
}

.prose-box h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose-box h2:first-child {
  margin-top: 0;
}

.prose-box ul {
  padding-left: 24px;
  max-width: 70ch;
}

.prose-box li {
  margin-bottom: 8px;
}

.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.price-card.is-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
}

.price-amount {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.price-amount span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.faq-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 70ch;
  margin-top: 24px;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
}

.faq-card summary {
  font-weight: 700;
  cursor: pointer;
}

.faq-card p {
  margin: 12px 0 0 0;
  color: var(--muted);
}

.related-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.rel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.rel-card:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .nav-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .studio-grid,
  .two-col-prose,
  .pricing-grid,
  .steps-grid,
  .related-cards {
    grid-template-columns: 1fr;
  }
  .inspector-pane {
    order: -1;
  }
  h1 { font-size: 28px; }
}


/* Quick Unlock CRO Modal */
.bt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bt-modal-dialog {
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.bt-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bt-modal-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bt-plan-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bt-plan-box.is-recommended {
  background: #fffaf5;
  border-color: var(--accent);
}

.bt-plan-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bt-save-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(234, 88, 12, 0.14);
  color: var(--accent);
}

.bt-save-pill.is-indigo {
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
}

.bt-plan-price {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.bt-plan-price span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.bt-plan-list {
  margin: 0 0 auto 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.65;
}

.bt-trust-strip {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.drop-card.is-sample-mode {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.06), rgba(79, 70, 229, 0.02));
  border: 1.5px dashed rgba(79, 70, 229, 0.55);
}

@media (max-width: 640px) {
  .bt-modal-plans {
    grid-template-columns: 1fr;
  }
}
