@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --if-bg-0: #08152f;
  --if-bg-1: #0d1c3b;
  --if-panel: rgba(13, 27, 55, 0.88);
  --if-panel-strong: #13284c;
  --if-border: rgba(118, 153, 212, 0.35);
  --if-text: #eaf2ff;
  --if-muted: #9cb3d9;
  --if-accent: #38bdf8;
  --if-accent-2: #4f46e5;
  --if-good: #22c55e;
  --if-warn: #f59e0b;
  --if-danger: #ef4444;
  --if-shadow: 0 20px 40px rgba(2, 10, 25, 0.45);
}

body.flow-v2-module {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--if-text);
  background:
    radial-gradient(1100px 500px at 8% -18%, rgba(56, 189, 248, 0.2), transparent 60%),
    radial-gradient(900px 500px at 96% -22%, rgba(79, 70, 229, 0.18), transparent 60%),
    linear-gradient(180deg, var(--if-bg-1), var(--if-bg-0) 56%);
}

body.flow-v2-module main[id$="-root"] {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* Utility fallback layer for template-driven modules.
   Keeps 4_* and 6_* pages stable when dynamic class strings are not emitted by bundle tooling. */
body.flow-v2-module :is(.workspace-root, .tp42-shell, .flow3-card) {
  width: min(100%, 1180px);
  margin-left: auto;
  margin-right: auto;
}

body.flow-v2-module .grid { display: grid; }
body.flow-v2-module .flex { display: flex; }
body.flow-v2-module .block { display: block; }
body.flow-v2-module .hidden { display: none; }
body.flow-v2-module .inline-flex { display: inline-flex; }
body.flow-v2-module .items-center { align-items: center; }
body.flow-v2-module .items-start { align-items: flex-start; }
body.flow-v2-module .justify-between { justify-content: space-between; }
body.flow-v2-module .flex-wrap { flex-wrap: wrap; }
body.flow-v2-module .text-left { text-align: left; }
body.flow-v2-module .uppercase { text-transform: uppercase; }
body.flow-v2-module .tracking-wide { letter-spacing: 0.05em; }
body.flow-v2-module .w-full { width: 100%; }
body.flow-v2-module .min-w-full { min-width: 100%; }
body.flow-v2-module .min-h-0 { min-height: 0; }
body.flow-v2-module .overflow-auto { overflow: auto; }
body.flow-v2-module .overflow-hidden { overflow: hidden; }
body.flow-v2-module .overflow-x-auto { overflow-x: auto; }
body.flow-v2-module .max-h-40 { max-height: 10rem; }
body.flow-v2-module .max-h-44 { max-height: 11rem; }
body.flow-v2-module .max-h-52 { max-height: 13rem; }
body.flow-v2-module .max-h-64 { max-height: 16rem; }
body.flow-v2-module .max-h-\[280px\] { max-height: 280px; }
body.flow-v2-module .space-y-2 > * + * { margin-top: 0.5rem; }
body.flow-v2-module .space-y-3 > * + * { margin-top: 0.75rem; }
body.flow-v2-module .space-y-4 > * + * { margin-top: 1rem; }

body.flow-v2-module .gap-2 { gap: 0.5rem; }
body.flow-v2-module .gap-3 { gap: 0.75rem; }
body.flow-v2-module .gap-4 { gap: 1rem; }

body.flow-v2-module .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
body.flow-v2-module .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.flow-v2-module .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.flow-v2-module .col-span-2 { grid-column: span 2 / span 2; }

body.flow-v2-module .mt-1 { margin-top: 0.25rem; }
body.flow-v2-module .mt-2 { margin-top: 0.5rem; }
body.flow-v2-module .mt-3 { margin-top: 0.75rem; }
body.flow-v2-module .mt-4 { margin-top: 1rem; }
body.flow-v2-module .mt-5 { margin-top: 1.25rem; }
body.flow-v2-module .mb-2 { margin-bottom: 0.5rem; }
body.flow-v2-module .ml-2 { margin-left: 0.5rem; }
body.flow-v2-module .mr-1 { margin-right: 0.25rem; }
body.flow-v2-module .mr-2 { margin-right: 0.5rem; }

body.flow-v2-module .p-2 { padding: 0.5rem; }
body.flow-v2-module .p-3 { padding: 0.75rem; }
body.flow-v2-module .p-4 { padding: 1rem; }
body.flow-v2-module .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
body.flow-v2-module .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
body.flow-v2-module .py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
body.flow-v2-module .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
body.flow-v2-module .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }

body.flow-v2-module .rounded { border-radius: 0.25rem; }
body.flow-v2-module .rounded-lg { border-radius: 0.5rem; }
body.flow-v2-module .rounded-xl { border-radius: 0.75rem; }
body.flow-v2-module .rounded-full { border-radius: 9999px; }
body.flow-v2-module .border { border: 1px solid rgba(71, 85, 105, 0.7); }
body.flow-v2-module .border-b { border-bottom: 1px solid rgba(71, 85, 105, 0.7); }
body.flow-v2-module .border-slate-700 { border-color: rgba(71, 85, 105, 0.95); }
body.flow-v2-module .border-slate-800\/80 { border-color: rgba(30, 41, 59, 0.8); }
body.flow-v2-module .border-cyan-900\/60 { border-color: rgba(14, 116, 144, 0.6); }
body.flow-v2-module .border-amber-700\/50 { border-color: rgba(180, 83, 9, 0.5); }
body.flow-v2-module .border-rose-700\/50 { border-color: rgba(190, 24, 93, 0.5); }

body.flow-v2-module .bg-slate-950\/70 { background-color: rgba(2, 6, 23, 0.7); }
body.flow-v2-module .bg-slate-950\/60 { background-color: rgba(2, 6, 23, 0.6); }
body.flow-v2-module .bg-slate-900\/40 { background-color: rgba(15, 23, 42, 0.4); }
body.flow-v2-module .bg-slate-800 { background-color: rgb(30, 41, 59); }
body.flow-v2-module .bg-slate-700 { background-color: rgb(51, 65, 85); }
body.flow-v2-module .bg-cyan-600 { background-color: rgb(8, 145, 178); }
body.flow-v2-module .bg-cyan-700 { background-color: rgb(14, 116, 144); }
body.flow-v2-module .bg-emerald-600 { background-color: rgb(5, 150, 105); }
body.flow-v2-module .bg-emerald-700 { background-color: rgb(4, 120, 87); }
body.flow-v2-module .bg-indigo-700 { background-color: rgb(67, 56, 202); }
body.flow-v2-module .bg-blue-700 { background-color: rgb(29, 78, 216); }
body.flow-v2-module .bg-rose-700 { background-color: rgb(190, 24, 93); }
body.flow-v2-module .bg-rose-950\/20 { background-color: rgba(76, 5, 25, 0.2); }
body.flow-v2-module .bg-amber-950\/20 { background-color: rgba(69, 26, 3, 0.2); }
body.flow-v2-module .bg-rose-400 { background-color: rgb(251, 113, 133); }
body.flow-v2-module .bg-amber-400 { background-color: rgb(251, 191, 36); }
body.flow-v2-module .bg-yellow-400 { background-color: rgb(250, 204, 21); }
body.flow-v2-module .bg-emerald-400 { background-color: rgb(52, 211, 153); }
body.flow-v2-module .bg-sky-400 { background-color: rgb(56, 189, 248); }
body.flow-v2-module .bg-violet-400 { background-color: rgb(167, 139, 250); }

body.flow-v2-module .text-xs { font-size: 0.75rem; line-height: 1.25; }
body.flow-v2-module .text-sm { font-size: 0.875rem; line-height: 1.4; }
body.flow-v2-module .text-lg { font-size: 1.125rem; line-height: 1.35; }
body.flow-v2-module .text-xl { font-size: 1.25rem; line-height: 1.3; }
body.flow-v2-module .text-2xl { font-size: 1.5rem; line-height: 1.2; }
body.flow-v2-module .text-\[10px\] { font-size: 10px; line-height: 1.2; }
body.flow-v2-module .text-\[11px\] { font-size: 11px; line-height: 1.3; }
body.flow-v2-module .font-semibold { font-weight: 600; }
body.flow-v2-module .font-bold { font-weight: 700; }
body.flow-v2-module .font-extrabold { font-weight: 800; }

body.flow-v2-module .text-white { color: #fff; }
body.flow-v2-module .text-slate-500 { color: #64748b; }
body.flow-v2-module .text-slate-400 { color: #94a3b8; }
body.flow-v2-module .text-slate-300 { color: #cbd5e1; }
body.flow-v2-module .text-slate-200 { color: #e2e8f0; }
body.flow-v2-module .text-slate-100 { color: #f1f5f9; }
body.flow-v2-module .text-cyan-300 { color: #67e8f9; }
body.flow-v2-module .text-cyan-200 { color: #a5f3fc; }
body.flow-v2-module .text-sky-300 { color: #7dd3fc; }
body.flow-v2-module .text-sky-200 { color: #bae6fd; }
body.flow-v2-module .text-emerald-300 { color: #6ee7b7; }
body.flow-v2-module .text-emerald-200 { color: #a7f3d0; }
body.flow-v2-module .text-yellow-300 { color: #fde047; }
body.flow-v2-module .text-yellow-200 { color: #fef08a; }
body.flow-v2-module .text-amber-300 { color: #fcd34d; }
body.flow-v2-module .text-amber-200 { color: #fde68a; }
body.flow-v2-module .text-indigo-200 { color: #c7d2fe; }
body.flow-v2-module .text-rose-300 { color: #fda4af; }
body.flow-v2-module .text-rose-200 { color: #fecdd3; }

@media (min-width: 768px) {
  body.flow-v2-module .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.flow-v2-module .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.flow-v2-module .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.flow-v2-module .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body.flow-v2-module .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.flow-v2-module .md\:col-span-4 { grid-column: span 4 / span 4; }
}

@media (min-width: 1024px) {
  body.flow-v2-module .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.flow-v2-module .lg\:col-span-3 { grid-column: span 3 / span 3; }
}

@media (min-width: 1280px) {
  body.flow-v2-module .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.flow-v2-module .xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  body.flow-v2-module .xl\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  body.flow-v2-module .xl\:col-span-2 { grid-column: span 2 / span 2; }
}

body.flow-v2 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--if-text);
  background:
    radial-gradient(1100px 500px at 10% -20%, rgba(56, 189, 248, 0.24), transparent 60%),
    radial-gradient(900px 500px at 95% -30%, rgba(79, 70, 229, 0.22), transparent 60%),
    linear-gradient(180deg, var(--if-bg-1), var(--if-bg-0) 55%);
  min-height: 100vh;
}

body.flow-v2 main[id^="page2-"],
body.flow-v2 #onboarding-root {
  position: relative;
  z-index: 2;
}

body.flow-v2 .flow-shell-card {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  backdrop-filter: blur(8px);
}

body.flow-v2 h1,
body.flow-v2 h2,
body.flow-v2 h3 {
  color: #f8fbff;
  letter-spacing: 0.01em;
}

body.flow-v2 p,
body.flow-v2 label,
body.flow-v2 li,
body.flow-v2 span {
  color: var(--if-muted);
}

body.flow-v2 select,
body.flow-v2 input[type="text"],
body.flow-v2 input[type="month"] {
  background: #f5f8ff;
  color: #0f172a;
  border: 1px solid #bfd0ee;
  border-radius: 10px;
}

body.flow-v2 button {
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

body.flow-v2 button:hover {
  transform: translateY(-1px);
}

body.flow-v2 .flow-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

body.flow-v2 .flow-btn-primary {
  background: linear-gradient(135deg, var(--if-accent), var(--if-accent-2));
  color: #fff;
}

body.flow-v2 .flow-btn-secondary {
  background: rgba(19, 40, 76, 0.8);
  border-color: rgba(156, 179, 217, 0.35);
  color: #e6f0ff;
}

body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) {
  width: min(100%, 1180px);
  margin-left: auto;
  margin-right: auto;
}

body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) h1,
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) h2 {
  font-size: clamp(1.85rem, 1.45rem + 1.1vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
}

body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) h3 {
  font-size: clamp(1.15rem, 1.02rem + 0.4vw, 1.45rem);
  line-height: 1.2;
  font-weight: 700;
}

body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) p,
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) li,
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) label,
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) span {
  line-height: 1.55;
}

body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) button,
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) .flow-btn {
  border-radius: 14px !important;
  border: 1px solid rgba(118, 153, 212, 0.34);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(2, 10, 25, 0.24);
}

body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) input:not([type="radio"]):not([type="checkbox"]),
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) select,
body.flow-v2 :is(#onboarding-root, #device-step-root, #page2-3-root, #behavior-step-root, #review-step-root) textarea {
  min-height: 46px;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Step 2.1 */
body.flow-v2 #onboarding-root > div {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
}

body.flow-v2 #onboarding-root input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

body.flow-v2 #onboarding-root input[type="radio"] + label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  border: 1px solid rgba(156, 179, 217, 0.35);
  background: rgba(19, 40, 76, 0.7);
  color: #deebff;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 600;
}

body.flow-v2 #onboarding-root input[type="radio"]:checked + label {
  border-color: transparent;
  background: linear-gradient(135deg, var(--if-accent), var(--if-accent-2));
  color: #fff;
}

/* Step 2.2 */
body.flow-v2 #device-step-root > div {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}

body.flow-v2 #deviceGrid > div,
body.flow-v2 #deviceGrid > button {
  border-radius: 14px !important;
}

body.flow-v2 #deviceGrid > div {
  border: 1px solid rgba(102, 126, 234, 0.35);
  background: linear-gradient(180deg, rgba(15, 30, 58, 0.92), rgba(8, 18, 38, 0.9)) !important;
  box-shadow: 0 12px 28px rgba(2, 10, 25, 0.28);
}

body.flow-v2 #deviceGrid > button {
  min-height: 11rem;
  background:
    linear-gradient(180deg, rgba(13, 27, 55, 0.92), rgba(8, 18, 38, 0.9)),
    linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.18));
  border: 1px dashed rgba(147, 197, 253, 0.5) !important;
  color: #ecfeff;
}

/* Step 2.3 */
body.flow-v2 #page2-3-root {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
body.flow-v2 #page2-3-root > .jc-renderer-root {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}

body.flow-v2 .group-header {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.16), rgba(56, 189, 248, 0.12));
  border: 1px solid rgba(118, 153, 212, 0.3);
  border-radius: 12px;
}

body.flow-v2 .question-box {
  border: 1px solid rgba(118, 153, 212, 0.24);
  border-radius: 12px;
  margin-top: 0.55rem;
  background: rgba(10, 22, 46, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Step 2.4 */
body.flow-v2 #behavior-step-root {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}

body.flow-v2 #behavior-step-root .section-card {
  background: rgba(12, 25, 50, 0.75);
  border: 1px solid rgba(118, 153, 212, 0.28);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(2, 10, 25, 0.22);
}

body.flow-v2 .phishing-button {
  border: 1px solid rgba(118, 153, 212, 0.3) !important;
}

/* Step 2.5 */
body.flow-v2 #review-step-root {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}

body.flow-v2 #review-step-root .bg-gray-800,
body.flow-v2 #review-step-root .bg-gray-900 {
  border: 1px solid rgba(118, 153, 212, 0.24);
  border-radius: 12px;
  background: rgba(11, 24, 47, 0.84) !important;
}

body.flow-v2 #review-step-root .content p,
body.flow-v2 #review-step-root .content li,
body.flow-v2 #review-step-root .content strong {
  color: #e8f1ff;
}

/* shared modal support if utility styles partially fail */
body.flow-v2 .fixed.inset-0 {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

@media (max-width: 900px) {
  body.flow-v2 #page2-3-root,
  body.flow-v2 #behavior-step-root,
  body.flow-v2 #review-step-root,
  body.flow-v2 #onboarding-root > div,
  body.flow-v2 #device-step-root > div {
    border-radius: 14px;
    padding: 1rem;
  }
}

/* Shared protected workspace */
body.flow-v2-workspace[data-protected-page="true"] {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--if-text);
  background:
    radial-gradient(1200px 640px at 4% -18%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(960px 560px at 100% -20%, rgba(79, 70, 229, 0.16), transparent 62%),
    linear-gradient(180deg, #08152f, #050d1d 58%, #08152f 100%);
  min-height: 100vh;
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-frame {
  width: min(100%, 1600px);
  margin: 0 auto;
  display: flex;
  gap: 22px;
  padding: 28px clamp(16px, 2vw, 30px) 42px;
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-main {
  min-width: 0;
  flex: 1 1 auto;
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-root,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) {
  width: min(100%, 1220px);
  margin-left: auto;
  margin-right: auto;
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-root.workspace-compact,
body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root {
  width: min(100%, 1040px);
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar {
  width: 250px;
  flex: 0 0 250px;
  align-self: flex-start;
  position: sticky;
  top: 98px;
  border: 1px solid var(--jc-border-md);
  border-radius: 22px;
  background: var(--jc-bg-elevated);
  box-shadow: var(--jc-shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar h3 {
  margin: 0 0 0.8rem;
  color: var(--jc-text-primary) !important;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar ul {
  margin: 0;
  padding-left: 1.1rem;
}

body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar li,
body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar p,
body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar div {
  color: var(--jc-text-secondary) !important;
  line-height: 1.55;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) {
  position: relative;
  z-index: 2;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) h1,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) h2,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) h3 {
  color: #f8fbff;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) h1 {
  font-size: clamp(2rem, 1.65rem + 1vw, 3.15rem);
  font-weight: 800;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) h2 {
  font-size: clamp(1.15rem, 1rem + 0.45vw, 1.6rem);
  font-weight: 700;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) p,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) li,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) td,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) th,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) label,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) span {
  line-height: 1.6;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) a {
  color: #8fd9ff;
  text-decoration-color: rgba(143, 217, 255, 0.46);
  text-underline-offset: 0.17em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, filter 0.15s ease;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) a:hover {
  color: #d9f4ff;
  text-decoration-color: rgba(217, 244, 255, 0.72);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) :is(ul, ol) {
  margin-top: 0.55rem;
  margin-bottom: 0.55rem;
  padding-left: 1.2rem;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) :is(li + li) {
  margin-top: 0.35rem;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) > section,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) > article,
body.flow-v2-workspace[data-protected-page="true"] #case-builder-root > section {
  border: 1px solid rgba(118, 153, 212, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(13, 29, 57, 0.94), rgba(8, 18, 38, 0.88)),
    linear-gradient(135deg, rgba(34, 211, 238, 0.05), rgba(79, 70, 229, 0.06));
  box-shadow: 0 22px 54px rgba(2, 10, 25, 0.32);
  backdrop-filter: blur(14px);
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) > section > :is(header, h1, h2):first-child {
  margin-top: 0;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) article {
  border-color: rgba(118, 153, 212, 0.18) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(180deg, rgba(12, 25, 50, 0.84), rgba(8, 18, 38, 0.8)) !important;
  box-shadow: 0 16px 34px rgba(2, 10, 25, 0.2);
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) article :is(h3, h4) {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 18px;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) thead {
  background: rgba(16, 34, 64, 0.96) !important;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) td,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) th {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) button,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .tp42-btn,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .flow41-btn,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) a[href^="/pages/"] {
  border-radius: 14px !important;
  box-shadow: 0 12px 24px rgba(2, 10, 25, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) a[href^="/pages/"],
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) a[href^="/downloads/"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(125, 211, 252, 0.34);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(79, 70, 229, 0.56));
  color: #eff8ff;
  font-weight: 700;
  text-decoration: none;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) button:hover,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .tp42-btn:hover,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .flow41-btn:hover,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) a[href^="/pages/"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(2, 10, 25, 0.28);
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) input,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) select,
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) textarea {
  min-height: 46px;
  border-radius: 14px !important;
  border: 1px solid rgba(118, 153, 212, 0.32) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_4_root) .grid.grid-cols-2,
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_4_root, #step6_5_root, #step6_3_root) .grid {
  gap: 1rem;
}

body.flow-v2-workspace[data-protected-page="true"] #case-builder-root .toggle {
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: rgba(8, 18, 38, 0.72);
  color: #bae6fd;
  font-weight: 700;
}

body.flow-v2-workspace[data-protected-page="true"] #case-builder-root .toggle:hover {
  background: rgba(14, 116, 144, 0.2);
}

body.flow-v2-workspace[data-protected-page="true"] .tp42-card,
body.flow-v2-workspace[data-protected-page="true"] .flow41-card {
  border-color: rgba(118, 153, 212, 0.24) !important;
  border-radius: 22px !important;
  box-shadow: 0 22px 54px rgba(2, 10, 25, 0.26);
}

/* Workspace restoration pass (targeted to avoid over-scaling) */
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) {
  width: min(100%, 1100px);
}

body.flow-v2-workspace[data-protected-page="true"] #case-builder-root :is(#declared-section, #scanned-section, #footer-section) > section {
  overflow: hidden;
}

body.flow-v2-workspace[data-protected-page="true"] #case-builder-root .toggle {
  min-height: 34px;
  font-size: 0.82rem;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root .flow41-card {
  border-radius: 18px !important;
  border-color: rgba(118, 153, 212, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(12, 27, 54, 0.9), rgba(8, 18, 38, 0.86)) !important;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root .flow41-btn {
  min-height: 40px;
  border-radius: 11px !important;
  border: 1px solid rgba(125, 211, 252, 0.3) !important;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root .flow41-input {
  border-radius: 11px !important;
  min-height: 44px;
}

/* page4_1 parity alignment + tokenized surface system */
body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 1.5rem;
  --p41-hero-surface:
    radial-gradient(130% 130% at -6% -24%, var(--jc-cyan-a10) 0%, transparent 62%),
    radial-gradient(130% 130% at 106% -28%, var(--jc-purple-a10) 0%, transparent 64%),
    linear-gradient(180deg, var(--jc-bg-card) 0%, var(--jc-bg-elevated) 100%);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-renderer {
  gap: var(--jc-space-3);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root :is(.p41-hero, .p41-module, .p41-diagnostics) {
  background: var(--p41-hero-surface);
  border-color: var(--jc-cyan-a25);
  box-shadow: var(--jc-shadow-card), inset 0 0 0 1px var(--jc-cyan-a10);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-hero-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-hero-main {
  flex: 1 1 420px;
  min-width: 0;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-page-title {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-page-lead {
  width: 100%;
  max-width: none;
  padding-inline: 1.2rem;
  box-sizing: border-box;
  text-align: left;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-top-back {
  flex-shrink: 0;
  margin-top: 4px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-context-ribbon {
  margin-bottom: 0.5rem;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-diagnostics-body {
  padding: 16px 20px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-kicker {
  margin-bottom: 10px;
  display: block;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-diag-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: var(--jc-text-sm);
  color: var(--jc-text-secondary);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-diag-label {
  color: var(--jc-text-muted);
  font-family: var(--jc-font-mono);
  font-size: var(--jc-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-runtime-badge {
  margin-left: 6px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-trend-block {
  margin-top: 12px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-trend-caption {
  margin-bottom: 5px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-card {
  padding: 14px;
  border: 1px solid var(--jc-cyan-a25);
  box-shadow: inset 0 0 0 1px var(--jc-cyan-a10);
  background: linear-gradient(180deg, var(--jc-bg-sunken) 0%, var(--jc-bg-elevated) 100%);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-value {
  margin: 4px 0 0;
  font-family: var(--jc-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-value--confidence,
body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-value--exposure {
  font-size: var(--jc-text-xl);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-value--confidence {
  color: var(--jc-success);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-value--exposure {
  color: var(--jc-warning);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-score-value--persona {
  font-size: var(--jc-text-md);
  color: var(--jc-cyan);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-note-label {
  color: var(--jc-text-secondary);
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-form-group {
  max-width: 480px;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-action-bar {
  margin-top: 0 !important;
  border-top: none !important;
  padding-top: 0 !important;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-btn {
  min-height: 3rem;
}

body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .jc-btn:disabled,
body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .jc-btn-primary:disabled {
  animation: none !important;
  box-shadow: none !important;
  filter: none !important;
}

@media (max-width: 840px) {
  body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-action-bar {
    grid-template-columns: 1fr !important;
  }

  body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-top-back,
  body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .p41-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .jc-btn-primary {
    animation: none !important;
  }

  body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .jc-btn,
  body.flow-v2-workspace[data-protected-page="true"] #confidence-summary-root.p41-page-root .jc-btn::after {
    transition: none !important;
    animation: none !important;
  }
}

/* page 4.2 compact staging mirror */
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root {
  width: min(100%, 1080px);
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell {
  font-size: 14px;
  line-height: 1.4;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-card {
  border-radius: 16px !important;
  border-color: rgba(94, 130, 191, 0.44) !important;
  background:
    linear-gradient(180deg, rgba(8, 22, 48, 0.96), rgba(6, 14, 33, 0.95)) !important;
  box-shadow: 0 8px 20px rgba(2, 10, 25, 0.24);
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-kpi {
  border-color: rgba(94, 130, 191, 0.42) !important;
  border-radius: 12px !important;
  background: rgba(9, 21, 45, 0.86) !important;
  box-shadow: none;
  padding: 8px 10px;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-chip {
  font-size: 0.68rem;
  color: #c9dbfb;
  border-color: rgba(110, 147, 209, 0.42);
  background: rgba(8, 18, 38, 0.74);
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-btn {
  min-height: 38px;
  border-radius: 10px !important;
  border: 1px solid rgba(110, 147, 209, 0.42) !important;
  box-shadow: none;
  font-size: 0.94rem;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-input {
  min-height: 40px;
  border-radius: 10px !important;
  font-size: 0.9rem;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-loader,
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-fresh-strip {
  border-color: rgba(94, 130, 191, 0.36);
  background: rgba(7, 18, 39, 0.82);
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-fresh-item {
  font-size: 0.66rem;
  border-color: rgba(94, 130, 191, 0.36);
  background: rgba(10, 22, 46, 0.8);
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .text-2xl {
  font-size: 1.82rem !important;
  line-height: 1.16 !important;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .text-lg {
  font-size: 1.05rem !important;
  line-height: 1.3 !important;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .text-sm {
  font-size: 0.88rem !important;
}

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .text-xs {
  font-size: 0.74rem !important;
}

/* page4_2 utility fallback (prevents collapsed single-column rendering) */
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .grid { display: grid !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .flex { display: flex !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .items-center { align-items: center !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .items-start { align-items: flex-start !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .justify-between { justify-content: space-between !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .flex-wrap { flex-wrap: wrap !important; }

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .gap-2 { gap: 0.5rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .gap-3 { gap: 0.75rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .gap-4 { gap: 1rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .space-y-2 > * + * { margin-top: 0.5rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .space-y-3 > * + * { margin-top: 0.75rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .space-y-4 > * + * { margin-top: 1rem !important; }

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .mt-1 { margin-top: 0.25rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .mt-2 { margin-top: 0.5rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .mt-3 { margin-top: 0.75rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .p-3 { padding: 0.75rem !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .p-4 { padding: 1rem !important; }

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .grid-cols-1 { grid-template-columns: minmax(0, 1fr) !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .col-span-2 { grid-column: span 2 / span 2 !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .col-span-4 { grid-column: span 4 / span 4 !important; }

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .max-h-40 { max-height: 10rem !important; overflow: auto !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .max-h-44 { max-height: 11rem !important; overflow: auto !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .max-h-52 { max-height: 13rem !important; overflow: auto !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .max-h-64 { max-height: 16rem !important; overflow: auto !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .max-h-\[280px\] { max-height: 280px !important; overflow: auto !important; }

body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .overflow-auto { overflow: auto !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .overflow-x-auto { overflow-x: auto !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .hidden { display: none !important; }
body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .w-full { width: 100% !important; }

@media (min-width: 768px) {
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .md\:col-span-4 { grid-column: span 4 / span 4 !important; }
}

@media (min-width: 1280px) {
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .xl\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] #treatment-hub-root .tp42-shell .xl\:col-span-2 { grid-column: span 2 / span 2 !important; }
}

/* Shared 4.x / 6.x consistency layer */
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) {
  --ws-cyan: #8de8ff;
  --ws-sky: #7dd3fc;
  --ws-emerald: #6ee7b7;
  --ws-amber: #fcd34d;
  --ws-rose: #fda4af;
  --ws-indigo: #a5b4fc;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .rounded-2xl { border-radius: 16px !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .rounded-xl { border-radius: 12px !important; }

body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-cyan-200 { color: var(--ws-cyan) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-cyan-300 { color: #67e8f9 !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-sky-300 { color: var(--ws-sky) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-emerald-200 { color: #a7f3d0 !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-emerald-300 { color: var(--ws-emerald) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-yellow-200 { color: #fde68a !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) :is(.text-yellow-300, .text-amber-300) { color: var(--ws-amber) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) :is(.text-rose-300, .text-red-300, .text-red-400) { color: var(--ws-rose) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #case-builder-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root) .text-indigo-200 { color: var(--ws-indigo) !important; }

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-cyan-600,
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-cyan-700 {
  background: linear-gradient(135deg, #0f8fb1, #1d5dcc) !important;
  color: #eef9ff !important;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-emerald-600,
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-emerald-700,
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-green-600 {
  background: linear-gradient(135deg, #0f766e, #15803d) !important;
  color: #ecfdf5 !important;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-indigo-600,
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-indigo-700 {
  background: linear-gradient(135deg, #4338ca, #5b4deb) !important;
  color: #eef2ff !important;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-rose-700,
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-red-700 {
  background: linear-gradient(135deg, #9f1239, #be123c) !important;
  color: #fff1f2 !important;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-slate-700 {
  background: linear-gradient(135deg, #334155, #1e293b) !important;
  color: #e2e8f0 !important;
}

body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root, #treatment-hub-root) :is(a, button).bg-gradient-to-r {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: #eef2ff !important;
}

body.flow-v2-workspace[data-protected-page="true"] #step6_5_root #exportJson { background: linear-gradient(135deg, #10b981, #14b8a6) !important; }
body.flow-v2-workspace[data-protected-page="true"] #step6_5_root #exportSummary { background: linear-gradient(135deg, #0ea5e9, #2563eb) !important; }
body.flow-v2-workspace[data-protected-page="true"] #step6_5_root #exportInvoice { background: linear-gradient(135deg, #6366f1, #7c3aed) !important; }
body.flow-v2-workspace[data-protected-page="true"] #step6_5_root #markClosed:not(:disabled) { background: linear-gradient(135deg, #15803d, #16a34a) !important; }

/* layout fallback for 6.x pages too */
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .grid { display: grid !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .flex { display: flex !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .flex-wrap { flex-wrap: wrap !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .items-center { align-items: center !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .justify-between { justify-content: space-between !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .grid-cols-1 { grid-template-columns: minmax(0, 1fr) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .gap-2 { gap: 0.5rem !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .gap-3 { gap: 0.75rem !important; }
body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .gap-4 { gap: 1rem !important; }

@media (min-width: 768px) {
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
}

@media (min-width: 1280px) {
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.flow-v2-workspace[data-protected-page="true"] :is(#step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) .xl\:col-span-2 { grid-column: span 2 / span 2 !important; }
}

@media (max-width: 1279px) {
  body.flow-v2-workspace[data-protected-page="true"] .workspace-frame {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.flow-v2-workspace[data-protected-page="true"] .workspace-sidebar {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body.flow-v2-workspace[data-protected-page="true"] .workspace-frame {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) > section,
  body.flow-v2-workspace[data-protected-page="true"] :is(#confidence-summary-root, #treatment-hub-root, #step6_2_root, #step6_3_root, #step6_4_root, #step6_5_root, #case-builder-root) article {
    border-radius: 18px !important;
  }
}

/* Page 3.2 only */
body.flow-v2-page3 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 1.45;
  color: var(--if-text);
  background:
    radial-gradient(1200px 560px at 8% -18%, rgba(56, 189, 248, 0.22), transparent 62%),
    radial-gradient(1100px 560px at 100% -28%, rgba(79, 70, 229, 0.2), transparent 62%),
    linear-gradient(180deg, #0a1733, #08152f 58%);
}

body.flow-v2-page3 #page3_2-root {
  width: min(1440px, calc(100% - 28px));
  margin: 14px auto 28px;
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 22px;
  box-shadow: var(--if-shadow);
  padding: 1rem;
}

body.flow-v2-page3 .flow3-cta-grid > div {
  background: rgba(12, 27, 54, 0.9) !important;
  border: 1px solid rgba(118, 153, 212, 0.3) !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 10, 25, 0.35);
}

body.flow-v2-page3 .flow3-panel {
  background: rgba(12, 27, 54, 0.82) !important;
  border: 1px solid rgba(118, 153, 212, 0.28) !important;
  border-radius: 14px;
}

body.flow-v2-page3 .flow3-panel h3,
body.flow-v2-page3 .flow3-panel h4,
body.flow-v2-page3 .flow3-panel h5 {
  color: #f8fbff;
}

body.flow-v2-page3 .flow3-panel p,
body.flow-v2-page3 .flow3-panel span,
body.flow-v2-page3 .flow3-panel li,
body.flow-v2-page3 .flow3-panel label {
  color: #dbe8ff;
}

body.flow-v2-page3 .flow3-btn {
  border-radius: 12px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

body.flow-v2-page3 .flow3-res {
  background: rgba(8, 18, 40, 0.72);
  border: 1px solid rgba(118, 153, 212, 0.22);
  border-radius: 12px;
}

@media (max-width: 900px) {
  body.flow-v2-page3 #page3_2-root {
    width: calc(100% - 14px);
    margin: 8px auto 18px;
    border-radius: 14px;
    padding: 0.7rem;
  }
}

/* Page 3.1 booking flow */
body.flow-v2-page31 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 1.45;
  color: var(--if-text);
  background:
    radial-gradient(1200px 560px at 8% -18%, rgba(34, 197, 94, 0.14), transparent 62%),
    radial-gradient(1100px 560px at 98% -28%, rgba(56, 189, 248, 0.16), transparent 62%),
    linear-gradient(180deg, #0a1733, #08152f 58%);
}

body.flow-v2-page31 #book-root {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
}

body.flow-v2-page31 .flow31-panel {
  background: rgba(12, 27, 54, 0.84);
  border: 1px solid rgba(118, 153, 212, 0.28);
  border-radius: 14px;
}

body.flow-v2-page31 .flow31-btn {
  border-radius: 12px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

body.flow-v2-page31 .flow31-input,
body.flow-v2-page31 .flatpickr-input {
  background: #f5f8ff !important;
  color: #0f172a !important;
  border: 1px solid #bfd0ee !important;
  border-radius: 10px !important;
}

body.flow-v2-page31 .flow31-card {
  background: rgba(12, 27, 54, 0.9) !important;
  border: 1px solid rgba(118, 153, 212, 0.28) !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 10, 25, 0.32);
}

@media (max-width: 900px) {
  body.flow-v2-page31 #book-root {
    border-radius: 14px;
    padding: 0.7rem;
  }
}

/* Page 3 viewer */
body.flow-v2-page3viewer {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 1.45;
  color: var(--if-text);
  background:
    radial-gradient(1200px 560px at 8% -18%, rgba(56, 189, 248, 0.18), transparent 62%),
    radial-gradient(1100px 560px at 98% -28%, rgba(239, 68, 68, 0.12), transparent 62%),
    linear-gradient(180deg, #0a1733, #08152f 58%);
}

body.flow-v2-page3viewer #viewer-root {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  padding: 1rem;
}

body.flow-v2-page3viewer .flow3v-card {
  background: rgba(12, 27, 54, 0.9) !important;
  border: 1px solid rgba(118, 153, 212, 0.3) !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 10, 25, 0.32);
}

body.flow-v2-page3viewer .flow3v-card-alt {
  background: rgba(9, 23, 45, 0.9) !important;
  border: 1px solid rgba(118, 153, 212, 0.3) !important;
  border-radius: 14px;
}

body.flow-v2-page3viewer .flow3v-table thead th {
  color: #dbe8ff;
  font-weight: 700;
}

body.flow-v2-page3viewer .flow3v-table tbody td {
  color: #c8d8f5;
}

@media (max-width: 900px) {
  body.flow-v2-page3viewer #viewer-root {
    border-radius: 14px;
    padding: 0.7rem;
  }
}

/* BrowserGuard dashboard */
body.flow-v2-bgd {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 1.45;
  color: var(--if-text);
  background:
    radial-gradient(1200px 560px at 8% -18%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(1100px 560px at 98% -28%, rgba(99, 102, 241, 0.12), transparent 62%),
    linear-gradient(180deg, #0a1733, #08152f 58%);
}

body.flow-v2-bgd .flowbg-shell {
  background: var(--if-panel);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  box-shadow: var(--if-shadow);
  padding: 1rem;
}

body.flow-v2-bgd .flowbg-wrap {
  max-width: 1140px;
  margin: 0 auto;
}

body.flow-v2-bgd .flowbg-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.flow-v2-bgd .flowbg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

body.flow-v2-bgd .flowbg-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  margin-top: 0.7rem;
}

body.flow-v2-bgd .flowbg-form-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}

body.flow-v2-bgd .flowbg-label {
  display: block;
  font-size: 0.82rem;
  color: #dbe8ff;
}

body.flow-v2-bgd .flowbg-btn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  margin-top: 0.8rem;
}

body.flow-v2-bgd .flowbg-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}

body.flow-v2-bgd .flowbg-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

body.flow-v2-bgd .flowbg-kpi-card {
  background: rgba(12, 27, 54, 0.88);
  border: 1px solid rgba(118, 153, 212, 0.3);
  border-radius: 12px;
  padding: 0.75rem;
}

body.flow-v2-bgd .flowbg-kpi-label {
  font-size: 0.76rem;
  color: #a6bfeb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.flow-v2-bgd .flowbg-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #eaf2ff;
  margin-top: 0.2rem;
}

body.flow-v2-bgd .flowbg-card {
  background: rgba(12, 27, 54, 0.88) !important;
  border: 1px solid rgba(118, 153, 212, 0.3) !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 10, 25, 0.32);
}

body.flow-v2-bgd h1,
body.flow-v2-bgd h2,
body.flow-v2-bgd h3 {
  color: #f8fbff;
  letter-spacing: 0.01em;
}

body.flow-v2-bgd .flowbg-btn {
  border-radius: 12px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(148, 163, 184, 0.32);
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  color: #e7f1ff;
}

body.flow-v2-bgd .flowbg-btn-primary {
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

body.flow-v2-bgd .flowbg-btn-success {
  background: linear-gradient(135deg, #0d9488, #16a34a);
}

body.flow-v2-bgd .flowbg-btn-neutral {
  background: linear-gradient(135deg, #334155, #1e293b);
}

body.flow-v2-bgd .flowbg-input {
  background: #f5f8ff !important;
  color: #0f172a !important;
  border: 1px solid #bfd0ee !important;
  border-radius: 10px !important;
}

body.flow-v2-bgd #bgd-url-output {
  min-height: 7.5rem;
  background: rgba(6, 16, 35, 0.75);
  border: 1px solid rgba(118, 153, 212, 0.26);
  border-radius: 10px;
  padding: 0.6rem;
}

body.flow-v2-bgd .flowbg-table-wrap {
  margin-top: 0.7rem;
  border: 1px solid rgba(118, 153, 212, 0.3);
  border-radius: 12px;
  overflow: auto;
}

body.flow-v2-bgd .flowbg-table {
  width: 100%;
  border-collapse: collapse;
}

body.flow-v2-bgd .flowbg-table th,
body.flow-v2-bgd .flowbg-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid rgba(118, 153, 212, 0.2);
  font-size: 0.86rem;
}

body.flow-v2-bgd .flowbg-table thead th {
  border-top: 0;
  color: #cfe0ff;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  body.flow-v2-bgd .flowbg-shell {
    border-radius: 14px;
    padding: 0.7rem;
  }
}

@media (min-width: 860px) {
  body.flow-v2-bgd .flowbg-layout {
    grid-template-columns: 1fr 1.2fr;
  }
  body.flow-v2-bgd .flowbg-form-grid-two {
    grid-template-columns: 1fr 1fr;
  }
  body.flow-v2-bgd .flowbg-btn-row {
    grid-template-columns: 1fr 1fr;
  }
  body.flow-v2-bgd .flowbg-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.flow-v2-bgd .flowbg-two {
    grid-template-columns: 1fr 1fr;
  }
}

/* Threat Intel page */
body.flow-v2-ti {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body.flow-v2-ti #threat-intel-root {
  max-width: none;
}

body.flow-v2-ti .ti-shell > div {
  max-width: 1040px !important;
  margin: 0 auto !important;
}

/* BrowserGuard console */
body.flow-v2-bgc {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 1.45;
  color: var(--if-text);
  background:
    radial-gradient(1200px 560px at 8% -18%, rgba(14, 165, 233, 0.16), transparent 62%),
    radial-gradient(1100px 560px at 98% -28%, rgba(30, 64, 175, 0.14), transparent 62%),
    linear-gradient(180deg, #0a1733, #08152f 58%);
}

body.flow-v2-bgc #browser-guard-root > section {
  max-width: 1140px;
  margin: 0 auto;
}

body.flow-v2-bgc h1,
body.flow-v2-bgc h2,
body.flow-v2-bgc h3 {
  color: #f8fbff;
  letter-spacing: 0.01em;
}

body.flow-v2-bgc #browser-guard-root header,
body.flow-v2-bgc #browser-guard-root article,
body.flow-v2-bgc #browser-guard-root details {
  background: rgba(12, 27, 54, 0.88) !important;
  border: 1px solid rgba(118, 153, 212, 0.3) !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 10, 25, 0.32);
}

body.flow-v2-bgc #browser-guard-root input,
body.flow-v2-bgc #browser-guard-root select,
body.flow-v2-bgc #browser-guard-root textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 10px !important;
  border: 1px solid rgba(118, 153, 212, 0.42) !important;
  background: #0d2347 !important;
  color: #eaf2ff !important;
  box-sizing: border-box;
}

body.flow-v2-bgc #browser-guard-root input::placeholder,
body.flow-v2-bgc #browser-guard-root textarea::placeholder {
  color: #9cb3d9;
}

body.flow-v2-bgc #browser-guard-root button {
  min-height: 44px;
  border-radius: 12px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

body.flow-v2-bgc #browser-guard-root pre {
  line-height: 1.4;
}
