// Main app — tabbed shell. Tweak values are hard-coded (Tweaks panel removed).
// `?demo` URL flag renders the full-bleed mobile flow (phone preview).
const { useEffect } = React;

// Hard-coded design values. Was driven by the Tweaks panel; now inlined.
// Keep the EDITMODE markers so the values stay easy to find/edit.
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "accent": "#e63946",
  "price": 97,
  "guarantee": 60,
  "urgencyTimer": true,
  "headline": "Recover in half the time — or it's free.",
  "compliance": "moderate"
}/*EDITMODE-END*/;

function App() {
  const t = TWEAK_DEFAULTS;

  // Keep the accent CSS var wired so the theme color still applies.
  useEffect(() => {
    document.documentElement.style.setProperty('--tp-cta', t.accent);
  }, []);

  const isDemo = new URLSearchParams(location.search).has('demo');

  if (isDemo) return <DemoFlow t={t} fullBleed />;
  return <TabShell t={t} />;
}

ReactDOM.createRoot(document.getElementById('root')).render(<App />);
