/* ===================================================================
   Default template pack — brand-neutral style tokens.
   All selectors scoped under .tp-default. Every color and font references
   the CSS variables the operator shell injects from the active brand's
   row in the Brands DB (--tp-bg, --tp-accent, --tp-display, --tp-body).
   =================================================================== */

.tp-default {
  /* Local fallbacks — overridden at runtime by :root.tp-active. */
  --tp-bg: #0A0A0C;
  --tp-bg-elev: #14141A;
  --tp-text: #FFFFFF;
  --tp-text-muted: #8A8A93;
  --tp-text-dim: #4F4F58;
  --tp-accent: #FF5B1F;
  --tp-accent-2: #FF7A45;
  --tp-grid-line: rgba(255, 255, 255, 0.05);
  --tp-grid-line-strong: rgba(255, 255, 255, 0.10);
  --tp-display: 'Inter Tight', system-ui, sans-serif;
  --tp-body: 'Manrope', system-ui, sans-serif;
}

/* ============== CAROUSEL — EDITORIAL LAYOUT ============== */
/* Aspect-aware (v2.5): width/height come from --slide-w / --slide-h CSS
   vars set by the renderer per platform/aspect. Defaults to 1080×1080
   square for the brief moment before the JS runs. Same aspect map as
   single-cards (1:1, 4:5, 1.91:1, 16:9, 9:16). */
.tp-default .cx-slide {
  width: var(--slide-w, 1080px);
  height: var(--slide-h, 1080px);
  position: relative;
  background: var(--tp-bg);
  overflow: hidden;
  color: var(--tp-text);
  isolation: isolate;
  font-family: var(--tp-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  margin-bottom: 24px;
}

.tp-default .cx-chrome {
  position: absolute; top: 60px; left: 60px; right: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.tp-default .cx-eyebrow {
  font-family: var(--tp-display);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--tp-text-muted);
}
.tp-default .cx-logo svg { display: block; height: 24px; width: auto; }

.tp-default .cx-body {
  position: absolute; left: 120px; right: 120px;
  top: 50%; transform: translateY(-50%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 56px;
}
.tp-default .cx-body--cta { gap: 40px; }

.tp-default .cx-rule {
  width: 64px; height: 2px; background: var(--tp-accent);
}

.tp-default .cx-h-hook {
  font-family: var(--tp-display);
  font-size: 88px; line-height: 1.06; font-weight: 600;
  letter-spacing: -0.025em; color: var(--tp-text);
  max-width: 820px;
}
.tp-default .cx-h-problem {
  font-family: var(--tp-display);
  font-size: 60px; line-height: 1.12; font-weight: 500;
  letter-spacing: -0.02em; color: var(--tp-text);
  max-width: 820px;
}
.tp-default .cx-h-insight {
  font-family: var(--tp-display);
  font-size: 56px; line-height: 1.16; font-weight: 500;
  letter-spacing: -0.018em; color: var(--tp-text);
  max-width: 820px;
}
.tp-default .cx-h-cta {
  font-family: var(--tp-display);
  font-size: 64px; line-height: 1.08; font-weight: 600;
  letter-spacing: -0.02em; color: var(--tp-text);
  max-width: 820px;
}

.tp-default .cx-stat-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 0 100px; gap: 36px;
}
.tp-default .cx-stat-number {
  font-family: var(--tp-display);
  font-size: 280px; font-weight: 600;
  letter-spacing: -0.045em; line-height: 1;
  color: var(--tp-accent);
}
.tp-default .cx-stat-caption {
  font-family: var(--tp-display);
  font-size: 30px; font-weight: 400;
  color: var(--tp-text); line-height: 1.4; max-width: 720px;
  letter-spacing: -0.005em;
}

.tp-default .cx-cta-link {
  display: inline-flex; align-items: center; gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--tp-accent);
  font-family: var(--tp-display);
  font-size: 22px; font-weight: 500;
  color: var(--tp-accent);
  letter-spacing: 0.02em;
}
.tp-default .cx-cta-link .cx-arrow { font-size: 24px; line-height: 1; }

.tp-default .cx-footer {
  position: absolute; bottom: 60px; left: 60px; right: 60px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: var(--tp-display);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--tp-text-dim);
}
.tp-default .cx-footer .cx-dot { color: var(--tp-text-dim); }

/* ============== SINGLE-CARD (image post) ==============
   One image at the platform-preferred aspect. Width/height come from
   --card-w / --card-h CSS vars set by the renderer per aspect:
     1:1     → 1080×1080  (square — IG square fallback)
     4:5     → 1080×1350  (portrait — IG single, LinkedIn vertical)
     1.91:1  → 1200×627   (LinkedIn horizontal / link-preview)
     16:9    → 1920×1080  (X horizontal)
     9:16    → 1080×1920  (Reels / TikTok vertical)
   Typography stays sized for the 1080-base — text scales relatively
   smaller on landscape canvases, which reads fine because landscape
   posts treat text more incidentally than square/portrait. */
.tp-default .cx-card {
  width: var(--card-w, 1080px);
  height: var(--card-h, 1080px);
  position: relative;
  background: var(--tp-bg);
  overflow: hidden;
  color: var(--tp-text);
  isolation: isolate;
  font-family: var(--tp-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  margin-bottom: 24px;
}
.tp-default .cx-card-chrome {
  position: absolute; top: 60px; left: 60px; right: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.tp-default .cx-card-eyebrow {
  font-family: var(--tp-display);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--tp-text-muted);
}
.tp-default .cx-card-logo svg { display: block; height: 24px; width: auto; }
.tp-default .cx-card-body {
  position: absolute; left: 120px; right: 120px;
  top: 50%; transform: translateY(-50%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 56px;
}
.tp-default .cx-card-rule {
  width: 64px; height: 2px; background: var(--tp-accent);
}
.tp-default .cx-card-text {
  font-family: var(--tp-display);
  font-size: 96px; line-height: 1.04; font-weight: 600;
  letter-spacing: -0.025em; color: var(--tp-text);
  max-width: 820px;
}
.tp-default .cx-card-footer {
  position: absolute; bottom: 60px; left: 60px; right: 60px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: var(--tp-display);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--tp-text-dim);
}
.tp-default .cx-card-footer .cx-card-dot { color: var(--tp-text-dim); }

/* ============== LINKEDIN PREVIEW ============== */
.tp-default .li-frame {
  background: var(--tp-bg-elev);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.18s ease;
  font-family: var(--tp-body);
}
.tp-default .li-frame:hover { border-color: var(--tp-accent); }
.tp-default .li-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tp-default .li-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tp-accent-2), var(--tp-accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tp-display); font-size: 12px; font-weight: 700; color: #fff;
}
.tp-default .li-name { font-size: 13px; font-weight: 600; color: var(--tp-text); }
.tp-default .li-meta { font-size: 11px; color: var(--tp-text-muted); }
.tp-default .li-body { font-size: 14px; line-height: 1.55; color: var(--tp-text); white-space: pre-wrap; }

/* ============== X / TWITTER PREVIEW ============== */
.tp-default .x-frame {
  background: var(--tp-bg-elev);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 16px;
  cursor: pointer;
  font-family: var(--tp-body);
  font-size: 14px; line-height: 1.5;
  white-space: pre-wrap;
  transition: border-color 0.18s ease;
  color: var(--tp-text);
}
.tp-default .x-frame:hover { border-color: var(--tp-accent); }
.tp-default .x-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tp-default .x-handle { color: var(--tp-text-muted); font-size: 12px; }
.tp-default .x-name { font-weight: 600; font-size: 13px; }

/* ============== IG PREVIEW ============== */
.tp-default .ig-frame {
  background: var(--tp-bg-elev);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--tp-body);
  transition: border-color 0.18s ease;
  overflow: hidden;
}
.tp-default .ig-frame:hover { border-color: var(--tp-accent); }
.tp-default .ig-square {
  aspect-ratio: 1 / 1;
  background-color: var(--tp-bg);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.tp-default .ig-square-text {
  font-family: var(--tp-display);
  font-size: 28px; font-weight: 600; color: var(--tp-text);
  text-align: center; padding: 0 32px; line-height: 1.15;
  letter-spacing: -0.01em; position: relative; z-index: 2;
}
.tp-default .ig-meta {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--tp-grid-line-strong);
}
.tp-default .ig-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tp-accent-2), var(--tp-accent));
  background-size: cover;
  background-position: center;
}
.tp-default .ig-handle { font-size: 13px; color: var(--tp-text); font-weight: 600; }
.tp-default .ig-caption {
  padding: 0 14px 14px;
  font-size: 13px; line-height: 1.5; color: var(--tp-text-muted);
  white-space: pre-wrap;
}
