:root {
  --cpbt-bg: #f6f7f8;
  --cpbt-surface: #ffffff;
  --cpbt-surface-2: #f2f4f7;
  --cpbt-ink: #101114;
  --cpbt-muted: #646b76;
  --cpbt-soft: #8c939f;
  --cpbt-line: #e5e7eb;
  --cpbt-line-strong: #d4d8df;
  --cpbt-radius: 18px;
  --cpbt-radius-sm: 12px;
  --cpbt-shadow: 0 12px 30px rgba(15, 23, 42, .055);
  --cpbt-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.creatorpage-advanced-theme {
  margin: 0;
  min-height: 100vh;
  background: var(--cpbt-bg);
  color: var(--cpbt-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  text-rendering: optimizeLegibility;
}
body.creatorpage-advanced-theme a { color: inherit; text-decoration: none; }
body.creatorpage-advanced-theme img { max-width: 100%; height: auto; }
body.creatorpage-advanced-theme button,
body.creatorpage-advanced-theme input,
body.creatorpage-advanced-theme textarea,
body.creatorpage-advanced-theme select { font: inherit; }

.cpbt-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--cpbt-line);
}
.cpbt-nav {
  width: min(100%, var(--cpbt-max));
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.cpbt-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -.035em;
}
.cpbt-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.cpbt-brand strong { font-size: 17px; }
.cpbt-links {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 720;
  color: #303742;
}
.cpbt-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
}
.cpbt-links a:hover { background: var(--cpbt-surface-2); color: var(--cpbt-ink); }
.cpbt-links .cpbt-nav-cta {
  margin-left: 7px;
  background: #111827;
  color: #fff;
  padding-inline: 16px;
}
.cpbt-links .cpbt-nav-cta:hover { background: #020617; color: #fff; }
.cpbt-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--cpbt-line);
  border-radius: 999px;
  background: #fff;
  color: var(--cpbt-ink);
  font-weight: 800;
  cursor: pointer;
}

.cpbt-main { min-height: calc(100vh - 132px); }
.cpbt-template-clean { background: var(--cpbt-bg); }
.cpbt-content {
  width: min(100%, var(--cpbt-max));
  margin: 0 auto;
  padding: 54px 22px;
}
.cpbt-page-content { max-width: 960px; }
.cpbt-page-head h1,
.cpbt-article h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1;
  letter-spacing: -.058em;
  text-wrap: balance;
}
.cpbt-article {
  background: var(--cpbt-surface);
  border: 1px solid var(--cpbt-line);
  border-radius: var(--cpbt-radius);
  padding: 32px;
  box-shadow: var(--cpbt-shadow);
}
.cpbt-entry > *:first-child { margin-top: 0; }
.cpbt-entry > *:last-child { margin-bottom: 0; }
.cpbt-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--cpbt-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.cpbt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 12px 17px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 800;
}
.cpbt-footer {
  border-top: 1px solid var(--cpbt-line);
  padding: 26px 22px;
  background: #fff;
  text-align: center;
  color: var(--cpbt-muted);
  font-size: 14px;
}
.cpbt-footer p { margin: 0; }

.cpbt-plugin-missing {
  width: min(100%, var(--cpbt-max));
  margin: 0 auto;
  padding: 70px 22px;
}
.cpbt-plugin-missing > div {
  max-width: 860px;
  padding: 42px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--cpbt-line);
  box-shadow: var(--cpbt-shadow);
}
.cpbt-plugin-missing span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--cpbt-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.cpbt-plugin-missing h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(36px, 5.4vw, 66px);
  line-height: 1;
  letter-spacing: -.058em;
}
.cpbt-plugin-missing p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--cpbt-muted);
  font-size: 17px;
}

/* Plugin integration pages */
.creatorpage-plugin-active .cpb-wrap {
  width: min(100%, var(--cpbt-max));
  max-width: var(--cpbt-max);
}
.creatorpage-plugin-active .cpb-landing-v2 { padding-top: 30px; padding-bottom: 50px; }
.creatorpage-plugin-active .cpb-saas-hero { margin-top: 0; }
.creatorpage-plugin-active .cpb-template-gallery { margin-bottom: 20px; }
.creatorpage-plugin-active .cpb-auth-shell { min-height: calc(100vh - 150px); }
.cpbt-plugin-main,
.cpbt-creatorpage-content,
.cpbt-creatorpage-content .cpbt-entry {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}
.cpbt-is-plugin-page .cpbt-page-head { display: none; }
.cpbt-is-dashboard .cpbt-header,
.cpbt-is-dashboard .cpbt-footer,
.page-template-template-dashboard .cpbt-header,
.page-template-template-dashboard .cpbt-footer { display: none; }
.cpbt-is-dashboard.creatorpage-advanced-theme,
.page-template-template-dashboard.creatorpage-advanced-theme { background: #f6f7f8; }
.cpbt-dashboard-template,
.cpbt-is-dashboard .cpbt-main { min-height: 100vh; background: #f6f7f8; }

@media (max-width: 780px) {
  .cpbt-nav { padding: 12px 16px; }
  .cpbt-menu-button { display: inline-flex; }
  .cpbt-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    padding: 10px;
    border: 1px solid var(--cpbt-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--cpbt-shadow);
  }
  .cpbt-links.is-open { display: grid; }
  .cpbt-links a { justify-content: space-between; width: 100%; }
  .cpbt-links .cpbt-nav-cta { margin-left: 0; justify-content: center; }
  .cpbt-content { padding: 38px 16px; }
  .cpbt-creatorpage-content { padding: 0; }
  .cpbt-article { padding: 24px; border-radius: 18px; }
  .cpbt-plugin-missing { padding: 44px 16px; }
  .cpbt-plugin-missing > div { padding: 28px; border-radius: 20px; }
  .cpbt-footer { padding: 24px 16px; }
}
