/* WAHA PRO Theme Studio V21.42.4 / Design System V3
   Semantic surfaces, isolated draft preview, fail-safe contrast and public/admin independence.
   MacFlow intentionally does not load this stylesheet. */
:root{
  --site-primary:#0a58ca;--site-secondary:#073f94;--site-accent:#00a7e1;
  --site-brand-text:#fff;--site-brand-muted:#dbeafe;
  --site-page:#f7fbff;--site-page-text:#071f3d;--site-muted-text:#52708f;
  --site-surface:#fff;--site-surface-text:#071f3d;--site-surface-muted:#52708f;
  --site-surface-alt:#eef6ff;--site-surface-alt-text:#071f3d;--site-surface-alt-muted:#52708f;
  --site-input-bg:#fff;--site-input-text:#071f3d;--site-input-placeholder:#61738b;
  --site-border:#d7e6f6;--site-header-bg:#052254;--site-header-text:#fff;--site-header-nav-text:#dbeafe;--site-header-nav-active-bg:#0a58ca;--site-header-nav-active-text:#fff;--site-header-mobile-menu-bg:#0b315f;--site-header-mobile-menu-text:#fff;--site-header-mobile-menu-border:#40658f;--site-footer-bg:#020b18;--site-footer-text:#fff;
  --site-primary-button:#0a58ca;--site-primary-button-text:#fff;--site-secondary-button:#fff;--site-secondary-button-text:#0a58ca;--site-link:#075bb5;--site-filter-bg:#fff;--site-filter-text:#075bb5;--site-filter-border:#d7e6f6;--site-filter-active-bg:#0a58ca;--site-filter-active-text:#fff;--site-filter-active-border:#0a58ca;
  --site-good:#15803d;--site-warn:#9a4d08;--site-bad:#b3123f;
  --site-radius:24px;--site-small-radius:14px;--site-button-radius:14px;--site-input-radius:12px;--site-content-width:1200px;--site-section-gap:72px;--site-font:Inter,Arial,Helvetica,sans-serif;--site-font-size:16px;--site-heading-weight:800;--site-shadow:0 18px 50px rgba(3,22,51,.12);
  --admin-page:#07182f;--admin-page-text:#f4f8ff;--admin-muted-text:#b9cae0;
  --admin-sidebar:#081a34;--admin-sidebar-text:#f4f8ff;--admin-topbar:#0b2242;--admin-topbar-text:#f4f8ff;
  --admin-surface:#0d284c;--admin-surface-text:#f4f8ff;--admin-surface-muted:#b9cae0;--admin-surface-alt:#102f58;--admin-surface-alt-text:#f4f8ff;
  --admin-border:#426385;--admin-primary:#1785f4;--admin-primary-text:#fff;--admin-input-bg:#eef6ff;--admin-input-text:#10233e;--admin-input-placeholder:#5c708a;
  --admin-good:#4ade80;--admin-warn:#fbbf24;--admin-bad:#fb7185;--admin-radius:16px;--admin-small-radius:11px;--admin-font:Inter,Arial,Helvetica,sans-serif;--admin-shadow:0 14px 34px rgba(8,31,63,.14)
}

/* PUBLIC — page role */
body.public-route-active{
  --ink:var(--site-page-text);--ink2:var(--site-muted-text);--soft:var(--site-page);--muted:var(--site-muted-text);--muted2:var(--site-muted-text);--line:var(--site-border);--glass:var(--site-surface);--glass2:var(--site-surface-alt);
  background:var(--site-page)!important;color:var(--site-page-text)!important;font-family:var(--site-font)!important;font-size:var(--site-font-size)
}
body.public-route-active .container{width:min(var(--site-content-width),calc(100% - 36px))}
body.public-route-active a:not(.btn):not(.header-cta):not(.social){color:var(--site-link)}
body.public-route-active .content>h1,body.public-route-active .content>h2,body.public-route-active .content>h3,
body.public-route-active .section>.container>h1,body.public-route-active .section>.container>h2{color:var(--site-page-text)}
body.public-route-active .content>p,body.public-route-active .section>.container>p{color:var(--site-muted-text)}

/* PUBLIC — brand/hero role. This prevents page text from leaking onto blue gradients. */
body.public-route-active .hero,body.public-route-active .page-hero,body.public-route-active .services-v10,
body.public-route-active .cta-section,body.public-route-active .article-final-cta{
  color:var(--site-brand-text)!important;--ink:var(--site-brand-text);--ink2:var(--site-brand-muted);--muted:var(--site-brand-muted);--muted2:var(--site-brand-muted);--glass:color-mix(in srgb,var(--site-brand-text) 12%,transparent);--glass2:color-mix(in srgb,var(--site-brand-text) 8%,transparent);--line:color-mix(in srgb,var(--site-brand-text) 22%,transparent)
}
body.public-route-active .hero h1,body.public-route-active .hero h2,body.public-route-active .hero h3,
body.public-route-active .page-hero h1,body.public-route-active .page-hero h2,body.public-route-active .page-title,
body.public-route-active .services-v10 h1,body.public-route-active .services-v10 h2,body.public-route-active .services-v10 h3{color:var(--site-brand-text)!important}
body.public-route-active .hero p,body.public-route-active .page-hero p,body.public-route-active .hero .lead,
body.public-route-active .page-hero .lead,body.public-route-active .services-v10 p{color:var(--site-brand-muted)!important}
body.public-route-active .page-hero,body.public-route-active .hero{background:linear-gradient(135deg,var(--site-secondary),var(--site-primary))!important}

/* PUBLIC — header/footer roles */
body.public-route-active .site-header{background:var(--site-header-bg)!important;color:var(--site-header-text)!important;border-color:var(--site-border)!important}
body.public-route-active .site-header :is(.brand,.brand b,.brand small,.theme-toggle,.nav-toggle,.nav-close){color:var(--site-header-text)!important}
body.public-route-active .main-nav a{color:var(--site-header-nav-text)!important;background:transparent!important}
body.public-route-active .main-nav a:hover,body.public-route-active .main-nav a.active{color:var(--site-header-nav-active-text)!important;background:var(--site-header-nav-active-bg)!important}
body.public-route-active .site-header .nav-toggle{background:var(--site-header-mobile-menu-bg)!important;color:var(--site-header-mobile-menu-text)!important;border-color:var(--site-header-mobile-menu-border)!important}
body.public-route-active .site-header .nav-toggle:hover,body.public-route-active .site-header .nav-toggle:focus-visible{background:var(--site-header-nav-active-bg)!important;color:var(--site-header-nav-active-text)!important;border-color:var(--site-header-nav-active-bg)!important}
body.public-route-active .site-footer{background:var(--site-footer-bg)!important;color:var(--site-footer-text)!important;border-color:var(--site-border)!important}
body.public-route-active .site-footer a,body.public-route-active .site-footer p,body.public-route-active .site-footer small,body.public-route-active .site-footer h2,body.public-route-active .site-footer h3{color:var(--site-footer-text)!important}

/* PUBLIC — semantic surface role, including legacy page-specific cards. */
body.public-route-active :is(.card,.panel,.content-card,.service-card,.article-card,.team-card,.partner-card,.blog-card,.blog-display-card,.faq-item,.founder-v10,.value-mini-grid article,.side-card,.article-body,.contact-intel-card){
  --ink:var(--site-surface-text);--ink2:var(--site-surface-muted);--muted:var(--site-surface-muted);--muted2:var(--site-surface-muted);--glass:var(--site-surface);--glass2:var(--site-surface-alt);--line:var(--site-border);
  background:var(--site-surface)!important;color:var(--site-surface-text)!important;border-color:var(--site-border)!important
}
body.public-route-active :is(.card,.panel,.content-card,.service-card,.article-card,.team-card,.partner-card,.blog-card,.blog-display-card,.faq-item,.founder-v10,.value-mini-grid article,.side-card,.article-body,.contact-intel-card) :is(h1,h2,h3,h4,h5,h6,.faq-q){color:var(--site-surface-text)!important}
body.public-route-active :is(.card,.panel,.content-card,.service-card,.article-card,.team-card,.partner-card,.blog-card,.blog-display-card,.faq-item,.founder-v10,.value-mini-grid article,.side-card,.article-body,.contact-intel-card) :is(p,li,.muted,.muted2,.faq-a,.blog-meta,small){color:var(--site-surface-muted)!important}
body.public-route-active :is(.surface-alt,.notice,.article-rich blockquote){
  --ink:var(--site-surface-alt-text);--ink2:var(--site-surface-alt-muted);background:var(--site-surface-alt)!important;color:var(--site-surface-alt-text)!important;border-color:var(--site-border)!important
}
body.public-route-active :is(.surface-alt,.notice,.article-rich blockquote) :is(p,li,.muted,.muted2,small){color:var(--site-surface-alt-muted)!important}

/* Legacy route fixes now expressed as semantic roles, not per-theme hard coded colors. */
body.public-route-active .about-v10{background:var(--site-page)!important;color:var(--site-page-text)!important}
body.public-route-active .about-copy-v10 .lead{color:var(--site-muted-text)!important}
body.public-route-active .article-rich :is(h1,h2,h3,h4){color:var(--site-surface-text)!important}
body.public-route-active .article-rich :is(p,li){color:var(--site-surface-muted)!important}
body.public-route-active .article-rich a{color:var(--site-link)!important}
body.public-route-active .side-card .social{background:var(--site-surface-alt)!important;color:var(--site-link)!important;border-color:var(--site-border)!important}
body.public-route-active .blog-content,body.public-route-active .faq-q,body.public-route-active .faq-a{color:inherit}

/* PUBLIC — navigation/filter roles are independent from body links. */
body.public-route-active .filter-chip,
body.public-route-active .blog-category-pills a{
  background:var(--site-filter-bg)!important;color:var(--site-filter-text)!important;border-color:var(--site-filter-border)!important
}
body.public-route-active .filter-chip:hover,
body.public-route-active .filter-chip.active,
body.public-route-active .blog-category-pills a:hover,
body.public-route-active .blog-category-pills a.active{
  background:var(--site-filter-active-bg)!important;color:var(--site-filter-active-text)!important;border-color:var(--site-filter-active-border)!important
}
body.public-route-active .partner-category{color:var(--site-page-text)!important}
body.public-route-active.visitor-light :is(.partner-card,.partner-pill,.partner-logo-v10) img[src$=".svg"]{
  filter:brightness(0) saturate(100%)!important;opacity:.9!important
}
body.public-route-active.visitor-dark :is(.partner-card,.partner-pill,.partner-logo-v10) img[src$=".svg"]{
  filter:brightness(0) invert(1)!important;opacity:.96!important
}
body.public-route-active img.waha-image-fallback-failed{opacity:.72!important;object-fit:contain!important}

/* PUBLIC — forms and actions */
body.public-route-active input,body.public-route-active textarea,body.public-route-active select{
  background:var(--site-input-bg)!important;color:var(--site-input-text)!important;border-color:var(--site-border)!important;border-radius:var(--site-input-radius)!important
}
body.public-route-active input::placeholder,body.public-route-active textarea::placeholder{color:var(--site-input-placeholder)!important;opacity:1}
body.public-route-active .form label{color:var(--ink2)!important}
body.public-route-active .btn.primary,body.public-route-active .header-cta{background:var(--site-primary-button)!important;color:var(--site-primary-button-text)!important;border-color:var(--site-primary-button)!important;border-radius:var(--site-button-radius)!important}
body.public-route-active .btn.secondary{background:var(--site-secondary-button)!important;color:var(--site-secondary-button-text)!important;border-color:var(--site-border)!important;border-radius:var(--site-button-radius)!important}
body.public-route-active .notice.good{border-color:var(--site-good)!important}body.public-route-active .notice.warn{border-color:var(--site-warn)!important}body.public-route-active .notice.bad{border-color:var(--site-bad)!important}

/* ADMIN — page/sidebar/topbar/surface roles */
body.admin-route-active{background:var(--admin-page)!important;color:var(--admin-page-text)!important;font-family:var(--admin-font)!important}
body.admin-route-active .admin-shell,body.admin-route-active .dedicated-dashboard-shell,body.admin-route-active .admin-main{background:var(--admin-page)!important;color:var(--admin-page-text)!important}
body.admin-route-active .admin-side{background:var(--admin-sidebar)!important;color:var(--admin-sidebar-text)!important;border-color:var(--admin-border)!important}
body.admin-route-active .admin-side :is(a,b,span,label,small){color:var(--admin-sidebar-text)}
body.admin-route-active .admin-topbar,body.admin-route-active .dashboard-command-bar{background:var(--admin-topbar)!important;color:var(--admin-topbar-text)!important;border-color:var(--admin-border)!important}
body.admin-route-active .admin-topbar :is(h1,h2,h3,b,span,a,button),body.admin-route-active .dashboard-command-bar :is(h1,h2,h3,b,span,a,button){color:var(--admin-topbar-text)}
body.admin-route-active :is(.card,.admin-card,.notice,.modal-box){
  background:var(--admin-surface)!important;color:var(--admin-surface-text)!important;border-color:var(--admin-border)!important;border-radius:var(--admin-radius)!important;box-shadow:var(--admin-shadow)
}
body.admin-route-active :is(.card,.admin-card,.notice,.modal-box) :is(h1,h2,h3,h4,h5,h6,label,th,td,b,strong){color:var(--admin-surface-text)}
body.admin-route-active :is(.card,.admin-card,.notice,.modal-box) :is(.muted,.muted2,small,p.help){color:var(--admin-surface-muted)!important}
body.admin-route-active .theme-token-group summary,body.admin-route-active .admin-table tbody tr:hover{background:var(--admin-surface-alt)!important;color:var(--admin-surface-alt-text)!important}
body.admin-route-active .admin-table,body.admin-route-active .table-wrap{border-color:var(--admin-border)!important}
body.admin-route-active input,body.admin-route-active textarea,body.admin-route-active select{
  background:var(--admin-input-bg)!important;color:var(--admin-input-text)!important;border-color:var(--admin-border)!important;border-radius:var(--admin-small-radius)!important
}
body.admin-route-active input::placeholder,body.admin-route-active textarea::placeholder{color:var(--admin-input-placeholder)!important;opacity:1}
body.admin-route-active .btn.primary{background:var(--admin-primary)!important;color:var(--admin-primary-text)!important;border-color:var(--admin-primary)!important}
body.admin-route-active .btn.secondary{background:var(--admin-surface-alt)!important;color:var(--admin-surface-alt-text)!important;border-color:var(--admin-border)!important}
body.admin-route-active .admin-menu a.is-active,body.admin-route-active .admin-menu a[aria-current=page]{background:var(--admin-primary)!important;color:var(--admin-primary-text)!important}
body.admin-route-active .admin-menu a:hover{background:var(--admin-surface-alt)!important;color:var(--admin-surface-alt-text)!important}
body.admin-route-active .status-pill.good{color:var(--admin-good)!important}body.admin-route-active .status-pill.warn{color:var(--admin-warn)!important}body.admin-route-active .status-pill.bad{color:var(--admin-bad)!important}

/* ADMIN floating actions: outer dock is ALWAYS transparent. Only toggle/menu may be styled. */
body.admin-route-active .admin-action-fab{background:transparent!important;color:inherit!important;border:0!important;box-shadow:none!important;padding:0!important}
body.admin-route-active .admin-action-fab-toggle{background:var(--admin-primary)!important;color:var(--admin-primary-text)!important;border-color:var(--admin-border)!important}
body.admin-route-active .admin-action-fab-menu{background:color-mix(in srgb,var(--admin-surface) 88%,transparent)!important;color:var(--admin-surface-text)!important;border-color:var(--admin-border)!important;backdrop-filter:blur(18px)}
body.admin-route-active.admin-actions-solid .admin-action-fab-menu{background:var(--admin-surface)!important;backdrop-filter:none}
body.admin-route-active .admin-scroll-top-fab{background:var(--admin-primary)!important;color:var(--admin-primary-text)!important;border-color:var(--admin-border)!important}

/* Theme Studio itself */
.theme-studio-intro{display:flex;justify-content:space-between;gap:24px;align-items:center}.theme-health{min-width:190px;padding:14px 16px;border:1px solid var(--admin-border);border-radius:var(--admin-small-radius);display:grid;gap:4px}.theme-health.good{border-color:var(--admin-good)}.theme-health.warn{border-color:var(--admin-warn)}
.theme-preset-bar,.theme-save-dock{display:flex;justify-content:space-between;align-items:center;gap:18px}.theme-studio-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr);gap:20px;align-items:start}.theme-studio-controls{display:grid;gap:16px}.theme-token-group{padding:0!important;overflow:hidden}.theme-token-group summary{cursor:pointer;padding:18px 20px;display:flex;justify-content:space-between;gap:16px;align-items:center}.theme-token-group summary span{color:var(--admin-surface-muted)!important;font-size:.85rem}.theme-token-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px}.theme-token-field{display:grid;gap:7px}.theme-color-control{display:grid;grid-template-columns:48px minmax(0,1fr);gap:8px}.theme-color-control input[type=color]{width:48px;height:42px;padding:3px;cursor:pointer}
.theme-studio-preview{position:sticky;top:96px;overflow:hidden}.theme-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.theme-preview-toolbar select{max-width:190px}
.theme-preview-browser{--preview-primary:#0a58ca;--preview-primary-text:#fff;--preview-secondary:#fff;--preview-secondary-text:#0a58ca;--preview-accent:#00a7e1;--preview-page:#f7fbff;--preview-page-text:#071f3d;--preview-surface:#fff;--preview-surface-text:#071f3d;--preview-muted:#52708f;--preview-border:#d7e6f6;--preview-input-bg:#fff;--preview-input-text:#071f3d;--preview-header:#052254;--preview-header-text:#fff;--preview-menu-bg:#0b315f;--preview-menu-text:#fff;--preview-menu-border:#40658f;--preview-footer:#020b18;--preview-footer-text:#fff;--preview-radius:24px;--preview-button-radius:14px;--preview-input-radius:12px;--preview-font:Inter,Arial,sans-serif;background:var(--preview-page)!important;border:1px solid var(--preview-border)!important;border-radius:18px;overflow:hidden;color:var(--preview-page-text)!important;font-family:var(--preview-font);box-shadow:none!important}
.theme-preview-header{padding:12px 14px;background:var(--preview-header)!important;color:var(--preview-header-text)!important;border-bottom:1px solid var(--preview-border);display:flex;align-items:center;gap:10px;font-size:.76rem}.theme-preview-header span{color:inherit!important}.theme-preview-nav{margin-left:auto}.theme-preview-menu{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--preview-menu-border);border-radius:9px;background:var(--preview-menu-bg);color:var(--preview-menu-text)!important;font-size:1rem;line-height:1}.theme-preview-logo{font-weight:900}.theme-preview-hero{padding:24px;background:var(--preview-page)!important;color:var(--preview-page-text)!important}.theme-preview-hero h2{color:var(--preview-page-text)!important}.theme-preview-hero p,.theme-preview-card p{color:var(--preview-muted)!important}.theme-preview-browser .btn.primary{background:var(--preview-primary)!important;color:var(--preview-primary-text)!important;border-color:var(--preview-primary)!important;border-radius:var(--preview-button-radius)!important}.theme-preview-browser .btn.secondary{background:var(--preview-secondary)!important;color:var(--preview-secondary-text)!important;border-color:var(--preview-border)!important;border-radius:var(--preview-button-radius)!important}.theme-preview-card{margin:0 18px 18px;padding:16px;background:var(--preview-surface)!important;color:var(--preview-surface-text)!important;border:1px solid var(--preview-border)!important;border-radius:var(--preview-radius);box-shadow:none!important}.theme-preview-card b{color:var(--preview-surface-text)!important}.theme-preview-card input{background:var(--preview-input-bg)!important;color:var(--preview-input-text)!important;border:1px solid var(--preview-border)!important;border-radius:var(--preview-input-radius)!important}.theme-preview-footer{padding:14px;background:var(--preview-footer)!important;color:var(--preview-footer-text)!important}.theme-preview-audit{margin-top:14px;padding:12px 14px;border:1px solid var(--admin-border);border-radius:var(--admin-small-radius);display:grid;gap:3px}.theme-preview-audit.good{border-color:var(--admin-good)}.theme-preview-audit.warn{border-color:var(--admin-warn)}
@media(max-width:1100px){.theme-studio-layout{grid-template-columns:1fr}.theme-studio-preview{position:relative;top:auto}}@media(max-width:700px){.theme-token-grid{grid-template-columns:1fr}.theme-preset-bar,.theme-save-dock,.theme-studio-intro{align-items:stretch;flex-direction:column}.theme-preview-toolbar{align-items:stretch;flex-direction:column}.theme-preview-toolbar select{max-width:none}}

/* V21.42.1 release hardening: high-risk legacy admin light surfaces + responsive media. */
body.admin-route-active :is(.rich-editor,.rich-output,.dashboard-global-search-card,.theme-mode-preview.is-light,.media-library-card.is-light-surface){color:#0b1b35!important}
body.admin-route-active :is(.rich-editor,.rich-output,.dashboard-global-search-card,.theme-mode-preview.is-light,.media-library-card.is-light-surface) :is(h1,h2,h3,h4,p,li,span,b,strong,em,label,small,th,td){color:inherit!important;opacity:1!important;text-shadow:none!important}
body.admin-route-active :is(.rich-editor,.rich-output){background:#fff!important}body.admin-route-active :is(.rich-editor,.rich-output) a{color:#0a58ca!important}
.waha-responsive-picture{display:block;max-width:100%}.waha-responsive-picture>img{display:block;width:100%;height:auto;background-color:var(--site-surface-alt)}
img[data-waha-responsive="1"]{transition:filter .18s ease,opacity .18s ease}
body.admin-route-active .theme-studio-form .actions,body.admin-route-active .theme-studio-preview .actions{background:transparent!important;box-shadow:none!important}

/* V21.42.2 pre-publish semantic hardening. */
body.admin-route-active .dashboard-global-search-card{
  background:var(--admin-input-bg)!important;color:var(--admin-input-text)!important;border-color:var(--admin-border)!important;box-shadow:var(--admin-shadow)!important
}
body.admin-route-active .dashboard-global-search-card :is(h1,h2,h3,h4,p,label,b,strong,span:not(.eyebrow)){color:var(--admin-input-text)!important;opacity:1!important;text-shadow:none!important}
body.admin-route-active .dashboard-global-search-card .eyebrow{color:var(--admin-primary)!important;background:color-mix(in srgb,var(--admin-primary) 10%,transparent)!important;border-color:color-mix(in srgb,var(--admin-primary) 28%,transparent)!important}
body.admin-route-active .dashboard-search-results a{background:var(--admin-input-bg)!important;color:var(--admin-input-text)!important;border-color:var(--admin-border)!important}
body.admin-route-active .dashboard-search-results a :is(b,span){color:var(--admin-input-text)!important}
body.admin-route-active .system-health-command-card,body.admin-route-active .system-health-policy-card{background:var(--admin-surface)!important;color:var(--admin-surface-text)!important;border-color:var(--admin-border)!important}
body.admin-route-active .system-health-command-card :is(h2,p,.muted),body.admin-route-active .system-health-policy-card :is(h2,p,.muted){color:var(--admin-surface-text)!important}
body.admin-route-active .system-health-command-block{background:#071426!important;color:#e7f3ff!important;border:1px solid color-mix(in srgb,var(--admin-primary) 34%,transparent)!important;border-radius:18px!important;padding:18px 20px!important;line-height:1.85!important;min-height:164px!important;white-space:pre-wrap!important}
.theme-preset-actions{flex-wrap:wrap!important;justify-content:flex-end}
@media(max-width:760px){.theme-preset-actions{justify-content:flex-start}}
