/* ============================================================
   Trasix — Tweaks panel + device preview (review tool only)
   Not part of the shipped site; load only where you want it.
   ============================================================ */

/* ─── Device stage / frame ──────────────────────────────── */
#tx-stage { width: 100%; }
#tx-frame { width: 100%; min-width: 0; }

/* Tablet & mobile: center the frame on a neutral stage with device chrome */
#tx-stage.is-tablet,
#tx-stage.is-mobile {
  padding: 40px 0;
  min-height: 100vh;
  background:
    repeating-linear-gradient(45deg, rgba(45,49,66,0.04) 0 1px, transparent 1px 22px),
    var(--neutral-200);
}
#tx-stage.is-tablet #tx-frame,
#tx-stage.is-mobile #tx-frame {
  margin: 0 auto;
  overflow: clip;
  background: var(--bg-canvas);
  border: 12px solid var(--neutral-950);
  border-radius: 40px;
  box-shadow: 0 40px 90px rgba(30,33,51,0.35);
}
#tx-stage.is-tablet #tx-frame { width: 834px; }
#tx-stage.is-mobile  #tx-frame { width: 402px; }

/* Tweakable heading font + nav style hooks */
h1, h2, h3, h4, h5, h6 { font-family: var(--tx-head, var(--font-sans)); }
.nav-solid .nav-inner {
  background: var(--white);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-md);
}

/* ════════════════════════════════════════════════════════
   Responsive reflow — keyed to the stage's device class so it
   applies in any rendering engine (no container-query reliance).
   Tablet gets the medium layout; mobile gets the full stack.
   ════════════════════════════════════════════════════════ */

/* ---- Tablet ---- */
#tx-stage.is-tablet .feature-grid { grid-template-columns: repeat(2, 1fr); }
#tx-stage.is-tablet .how-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
#tx-stage.is-tablet .how-steps::before { display: none; }
#tx-stage.is-tablet .footer-cols { grid-template-columns: repeat(2, 1fr); }
#tx-stage.is-tablet .trust-logos { flex-wrap: wrap; gap: 28px; }
#tx-stage.is-tablet .testimonial-card { grid-template-columns: 240px 1fr; }

/* ---- Mobile ---- */
#tx-stage.is-mobile .nav-links,
#tx-stage.is-mobile .nav-cta { display: none; }
#tx-stage.is-mobile .nav-inner::after {
  content: "";
  width: 22px; height: 2px;
  background: var(--fg-primary);
  box-shadow: 0 -7px 0 var(--fg-primary), 0 7px 0 var(--fg-primary);
  margin-right: 6px;
}
#tx-stage.is-mobile .hero { padding: 40px 24px 44px; min-height: 0; }
#tx-stage.is-mobile .hero-grid { grid-template-columns: 1fr; gap: 28px; }
#tx-stage.is-mobile .hero h1 { font-size: var(--text-3xl); }
#tx-stage.is-mobile .hero-points li { font-size: var(--text-base); }
#tx-stage.is-mobile .hero-cta-row { flex-wrap: wrap; }
#tx-stage.is-mobile .hero-visual { height: 260px; }
#tx-stage.is-mobile .trust-inner { grid-template-columns: 1fr; gap: 20px; }
#tx-stage.is-mobile .trust-logos { flex-wrap: wrap; justify-content: flex-start; gap: 24px; }
#tx-stage.is-mobile .features-head { flex-direction: column; align-items: flex-start; gap: 14px; }
#tx-stage.is-mobile .feature-grid { grid-template-columns: 1fr; }
#tx-stage.is-mobile .stats { padding: 48px 24px; }
#tx-stage.is-mobile .stats-card { grid-template-columns: 1fr; gap: 20px; padding: 28px; }
#tx-stage.is-mobile .stat-item { border-right: none; border-bottom: 1px solid var(--border-default); padding: 0 0 20px; }
#tx-stage.is-mobile .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
#tx-stage.is-mobile .how-steps { grid-template-columns: 1fr; row-gap: 32px; }
#tx-stage.is-mobile .how-steps::before { display: none; }
#tx-stage.is-mobile .roles-card { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
#tx-stage.is-mobile .roles-tabs { flex-wrap: wrap; }
#tx-stage.is-mobile .roles-visual { height: 260px; }
#tx-stage.is-mobile .showcase-card { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
#tx-stage.is-mobile .showcase-tabs { flex-wrap: wrap; }
#tx-stage.is-mobile .testimonial-row { grid-template-columns: 1fr; }
#tx-stage.is-mobile .testimonial-card { grid-template-columns: 1fr; }
#tx-stage.is-mobile .tm-arrow { display: none; }
#tx-stage.is-mobile .tm-image { height: 280px; }
#tx-stage.is-mobile .integrations-card { flex-direction: column; border-radius: var(--radius-xl); padding: 24px; }
#tx-stage.is-mobile .integrations-logos { flex-wrap: wrap; justify-content: center; gap: 20px; }
#tx-stage.is-mobile .cta-banner { padding: 32px; }
#tx-stage.is-mobile .cta-banner-inner { grid-template-columns: 1fr; gap: 20px; }
#tx-stage.is-mobile .cta-banner h2 { font-size: var(--text-2xl); }
#tx-stage.is-mobile .cta-banner-actions { justify-content: flex-start; }
#tx-stage.is-mobile .footer-form-section { grid-template-columns: 1fr; gap: 28px; }
#tx-stage.is-mobile .footer-form-section h2 { font-size: var(--text-3xl); }
#tx-stage.is-mobile .footer-form { grid-template-columns: 1fr; }
#tx-stage.is-mobile .footer-form .field-wide,
#tx-stage.is-mobile .footer-form .submit-row { grid-column: span 1; }
#tx-stage.is-mobile .footer-form .submit-row { flex-direction: column; align-items: stretch; gap: 12px; }
#tx-stage.is-mobile .footer-bottom { grid-template-columns: 1fr; gap: 32px; }
#tx-stage.is-mobile .footer-cols { grid-template-columns: 1fr; }
#tx-stage.is-mobile .footer-meta { flex-direction: column; gap: 10px; align-items: center; }
#tx-stage.is-mobile .container { max-width: calc(100% - 40px); }

/* ── Mobile: centre all content ─────────────────────────── */
#tx-stage.is-mobile .hero-copy,
#tx-stage.is-mobile .hero-inner,
#tx-stage.is-mobile .hero-lede,
#tx-stage.is-mobile .features-head,
#tx-stage.is-mobile .features-head p,
#tx-stage.is-mobile .feature-card,
#tx-stage.is-mobile .how-head,
#tx-stage.is-mobile .how-step,
#tx-stage.is-mobile .roles-head,
#tx-stage.is-mobile .roles-content,
#tx-stage.is-mobile .showcase-head,
#tx-stage.is-mobile .showcase-content,
#tx-stage.is-mobile .plan-head,
#tx-stage.is-mobile .plan-tool,
#tx-stage.is-mobile .connect-card,
#tx-stage.is-mobile .faq-head,
#tx-stage.is-mobile .faq-head > div,
#tx-stage.is-mobile .stats-head,
#tx-stage.is-mobile .trust-label,
#tx-stage.is-mobile .integrations-title,
#tx-stage.is-mobile .testimonial-card,
#tx-stage.is-mobile .tm-quote,
#tx-stage.is-mobile .cta-banner-inner,
#tx-stage.is-mobile .footer-form-section,
#tx-stage.is-mobile .footer-form-section > div,
#tx-stage.is-mobile .footer-brand,
#tx-stage.is-mobile .footer-col { text-align: center; }

/* Centre the inline / flex bits too */
#tx-stage.is-mobile .feature-icon,
#tx-stage.is-mobile .how-step-num { margin-left: auto; margin-right: auto; }
#tx-stage.is-mobile .features-head { align-items: center; }
#tx-stage.is-mobile .hero-cta-row,
#tx-stage.is-mobile .hero-cta-center,
#tx-stage.is-mobile .cta-banner-actions,
#tx-stage.is-mobile .plan-eyebrow,
#tx-stage.is-mobile .section-label,
#tx-stage.is-mobile .plan-tool-link,
#tx-stage.is-mobile .roles-content .btn,
#tx-stage.is-mobile .showcase-content .btn,
#tx-stage.is-mobile .tm-attribution { justify-content: center; }
#tx-stage.is-mobile .stage-pill,
#tx-stage.is-mobile .hero-eyebrow,
#tx-stage.is-mobile .hero-topbar { justify-content: center; }
#tx-stage.is-mobile .plan-tool-link,
#tx-stage.is-mobile .roles-content .btn,
#tx-stage.is-mobile .showcase-content .btn { align-self: center; }
#tx-stage.is-mobile .footer-brand img { margin-left: auto; margin-right: auto; }
#tx-stage.is-mobile .footer-col ul { align-items: center; }
#tx-stage.is-mobile .hero-rotator-stage { min-height: 104px; }
#tx-stage.is-mobile .stat-slide { flex-direction: column; text-align: center; gap: 14px; }
#tx-stage.is-mobile .stat-slide .stat-body { align-items: center; }
#tx-stage.is-mobile .stat-slide .stat-num { font-size: 54px; }
#tx-stage.is-mobile .stat-slide .stat-unit { font-size: 24px; }
#tx-stage.is-mobile .stats-stage { min-height: 230px; }

/* ════════════════════════════════════════════════════════
   Floating launcher + panel
   ════════════════════════════════════════════════════════ */
#tx-fab {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 4000;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border: none; cursor: pointer;
  border-radius: var(--radius-full);
  background: var(--neutral-950);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 30px rgba(30,33,51,0.35);
}
#tx-fab svg { width: 16px; height: 16px; }
#tx-fab:hover { background: var(--neutral-800); }

#tx-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  z-index: 4001;
  background: var(--white);
  box-shadow: -16px 0 50px rgba(30,33,51,0.18);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  font-family: var(--font-sans);
}
#tx-panel.open { transform: translateX(0); }

.tx-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-default);
}
.tx-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.tx-close { background: none; border: none; cursor: pointer; color: var(--fg-secondary); font-size: 20px; line-height: 1; padding: 4px; }
.tx-close:hover { color: var(--fg-primary); }

.tx-body { padding: 8px 22px 28px; overflow-y: auto; }
.tx-section { padding: 18px 0; border-bottom: 1px solid var(--border-light); }
.tx-section:last-child { border-bottom: none; }
.tx-label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 12px;
}

/* Segmented control (device views) */
.tx-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--neutral-100); padding: 4px; border-radius: var(--radius-md); }
.tx-seg button {
  border: none; cursor: pointer; background: transparent;
  padding: 9px 6px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  color: var(--fg-secondary);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.tx-seg button svg { width: 17px; height: 17px; }
.tx-seg button.active { background: var(--white); color: var(--red-500); box-shadow: var(--shadow-sm); }

/* Swatches */
.tx-swatches { display: flex; gap: 10px; }
.tx-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 2px #fff; }
.tx-swatch.active { border-color: var(--neutral-900); }

/* Select / range / toggle rows */
.tx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tx-row:last-child { margin-bottom: 0; }
.tx-row span { font-size: 13px; color: var(--fg-primary); }
.tx-select { font-family: var(--font-sans); font-size: 13px; padding: 8px 10px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--white); color: var(--fg-primary); cursor: pointer; }
.tx-range { width: 140px; accent-color: var(--red-500); }
.tx-pills { display: flex; gap: 6px; }
.tx-pill { border: 1px solid var(--border-default); background: var(--white); cursor: pointer; padding: 7px 12px; border-radius: var(--radius-full); font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--fg-secondary); }
.tx-pill.active { background: var(--neutral-900); color: #fff; border-color: var(--neutral-900); }

.tx-reset {
  width: 100%; margin-top: 4px;
  padding: 11px; cursor: pointer;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: var(--white); color: var(--fg-secondary);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
}
.tx-reset:hover { background: var(--neutral-100); color: var(--fg-primary); }

.tx-save {
  width: 100%; margin-bottom: 8px;
  padding: 12px; cursor: pointer;
  border: none; border-radius: var(--radius-md);
  background: var(--red-500); color: #fff;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
}
.tx-save:hover { background: var(--red-600); }

.tx-toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  z-index: 4100;
  max-width: 460px;
  background: var(--neutral-950); color: #fff;
  font-family: var(--font-sans); font-size: 13px; line-height: 1.45;
  padding: 14px 20px; border-radius: var(--radius-md);
  box-shadow: 0 16px 44px rgba(30,33,51,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tx-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Logo sizing control */
.tx-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--fg-tertiary); font-weight: 500; }
.tx-logo-hint { font-size: 12px; color: var(--fg-secondary); line-height: 1.5; margin: 0; }
.tx-logname { text-transform: capitalize; font-weight: 600; }
img[data-logo] { cursor: pointer; }
img.tx-logo-selected { outline: 2px solid var(--red-500); outline-offset: 6px; border-radius: 2px; opacity: 1 !important; }

/* Click-to-edit copy mode */
body.tx-textedit #tx-frame h1,
body.tx-textedit #tx-frame h2,
body.tx-textedit #tx-frame h3,
body.tx-textedit #tx-frame h4,
body.tx-textedit #tx-frame h5,
body.tx-textedit #tx-frame h6,
body.tx-textedit #tx-frame p,
body.tx-textedit #tx-frame a,
body.tx-textedit #tx-frame li,
body.tx-textedit #tx-frame blockquote,
body.tx-textedit #tx-frame button { cursor: text; }
body.tx-textedit #tx-frame h1:hover,
body.tx-textedit #tx-frame h2:hover,
body.tx-textedit #tx-frame h3:hover,
body.tx-textedit #tx-frame h4:hover,
body.tx-textedit #tx-frame p:hover,
body.tx-textedit #tx-frame li:hover,
body.tx-textedit #tx-frame blockquote:hover { outline: 1px dashed rgba(237,22,66,0.5); outline-offset: 3px; }
.tx-editing { outline: 2px solid var(--red-500) !important; outline-offset: 3px; border-radius: 2px; background: rgba(237,22,66,0.04); }

