/* External Line palette layer for cmd.jehorizon.com. Loaded after Next styles. */
html:has(#jeh-cohesion-shell[data-jeh-context="cmd"]):not([data-theme="dark"]) {
  --brand-violet: #e66a24;
  --brand-violet-soft: #e66a24;
  --brand-cyan: #d48753;
  --brand-cyan-soft: #f4bd98;
  --accent: #c14d0b;
  --accent-2: #e66a24;
  --gradient-brand: linear-gradient(#b94912, #b94912);
  --gradient-brand-soft: linear-gradient(#fff0e3, #fff0e3);
  --surface-0: #ffffff;
  --surface-1: #f7f3ec;
  --surface-2: #f0eae1;
  --surface-3: #e7dfd3;
  --surface-inverse: #102a36;
  --text-strong: #102a36;
  --text-default: #172b34;
  --text-muted: #4c606a;
  --text-subtle: #60727a;
  --text-on-accent: #ffffff;
  --border-subtle: #e5ddd2;
  --border-default: #d7d1c6;
  --border-strong: #b8b0a3;
  --border-focus: #c14d0b;
  --btn-primary-bg: #b94912;
  --btn-primary-text: #ffffff;
  --shadow-focus: 0 0 0 3px rgba(230,106,36,.28);
  color-scheme: light;
}

/* The login CSS module otherwise pins the entire form to the previous dark theme. */
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) { background: #f7f3ec; color: #172b34; }
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__shell"] {
  --surface-0: #ffffff;
  --surface-1: #f7f3ec;
  --surface-2: #f0eae1;
  --surface-inverse: #102a36;
  --text-strong: #102a36;
  --text-default: #172b34;
  --text-muted: #4c606a;
  --text-subtle: #60727a;
  --border-default: #d7d1c6;
  --border-subtle: #e5ddd2;
  --brand-violet: #e66a24;
  --gradient-brand: linear-gradient(#b94912, #b94912);
  background: #f7f3ec;
  color: #172b34;
  color-scheme: light;
}
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__shell"] :is(a,button,input):focus-visible {
  outline-color: #b94912;
}
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__shell"] [style*="var(--gradient-brand)"] {
  background-color: #b94912;
  color: #fff;
}
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__aside"] {
  border-color: #d7d1c6;
  background: #f0eae1;
}
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__aside"] :is(h2,p,li,svg) { color: #172b34; }
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__error"] { color: #a22520; }
body:has(#jeh-cohesion-shell[data-jeh-route="login"]) [class*="login-module"][class*="__shell"] a[class*="text-violet"] { color: #a5410a; }

/* Signup owns a set of literal dark Tailwind utilities, so its public form
   needs a narrow route-scoped surface and text correction. Form/consent markup,
   prices, semantic error colors, and submit behavior remain untouched. */
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) {
  background: #f7f3ec;
  color: #172b34;
}
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) h1,
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) h2,
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) h3 { color: #102a36; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) :is([class*="bg-slate-900"],[class*="bg-slate-950"],[class*="bg-violet-950"]) {
  background-color: #fff;
  border-color: #d7d1c6;
}
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) [class*="bg-emerald-950"] { background-color: #edf6ed; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) :is([class*="text-slate-200"],[class*="text-slate-300"],[class*="text-slate-400"],[class*="text-violet-200"],[class*="text-violet-300"],[class*="text-emerald-200"],[class*="text-emerald-300"]) { color: #4c606a; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) [class*="text-white"]:not(button):not(option) { color: #172b34; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) :is(input:not([type="checkbox"]),select,textarea) {
  background: #fff;
  color: #172b34;
  border-color: #aeb9b9;
}
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) :is(input,textarea)::placeholder { color: #61737d; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) option { background: #fff; color: #172b34; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) :is(button[class*="bg-emerald-600"],button[class*="bg-violet-600"],button[class*="bg-cyan-600"],button[class*="bg-sky-600"]) {
  background: #b94912;
  color: #fff;
  border-color: #c14d0b;
}
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) a[class*="text-emerald-400"] { color: #a5410a; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) a[class*="text-violet-400"] { color: #a5410a; }
body:has(#jeh-cohesion-shell[data-jeh-route="signup"]) :is(a,button,input,select,textarea):focus-visible { outline: 3px solid #b94912; outline-offset: 3px; }

/* Existing app navigation and status colors stay under React control. */
@media print { #jeh-cohesion-shell { display: none !important; } }

