
/* v20: contrast-first layer. This file is intentionally last and overrides older experimental layers. */
:root {
  --v20-dark-bg: #020817;
  --v20-dark-card: #071225;
  --v20-dark-panel: #09182c;
  --v20-dark-text: #f6f9ff;
  --v20-dark-muted: #b8c5d9;
  --v20-light-bg: #eef7ff;
  --v20-light-bg2: #f8fcff;
  --v20-light-card: #ffffff;
  --v20-light-text: #071326;
  --v20-light-muted: #334155;
  --v20-line-light: rgba(15, 23, 42, .12);
  --v20-line-dark: rgba(180, 210, 255, .18);
}

/* ---------- Public light theme: never white text on pale background ---------- */
html[data-theme="light"] body:not(.dashboard-page),
html[data-theme="light"] body.auth-page {
  background: radial-gradient(circle at top left, #dff0ff 0, transparent 30rem),
              radial-gradient(circle at top right, #e9f6ff 0, transparent 28rem),
              linear-gradient(180deg, var(--v20-light-bg2) 0%, var(--v20-light-bg) 100%) !important;
  color: var(--v20-light-text) !important;
}
html[data-theme="light"] .page-aura,
html[data-theme="light"] body::before,
html[data-theme="light"] body::after { display:none !important; }

html[data-theme="light"] main :where(h1,h2,h3,h4,h5,h6,strong,label,legend),
html[data-theme="light"] .brand-copy strong,
html[data-theme="light"] .logo-wordmark {
  color: var(--v20-light-text) !important;
  text-shadow: none !important;
}
html[data-theme="light"] main :where(p,li,span,small,em),
html[data-theme="light"] .hero-lead,
html[data-theme="light"] .section p,
html[data-theme="light"] .page-hero p,
html[data-theme="light"] .team-card-copy p,
html[data-theme="light"] .hero-glass-card span {
  color: var(--v20-light-muted) !important;
  text-shadow: none !important;
}
html[data-theme="light"] main .eyebrow,
html[data-theme="light"] main .product-label,
html[data-theme="light"] main .team-card-copy span {
  color:#075db4 !important;
  text-shadow:none !important;
}
html[data-theme="light"] .button-primary { color:#fff !important; }
html[data-theme="light"] .button-secondary { color:var(--v20-light-text) !important; background:#fff !important; border-color:var(--v20-line-light) !important; }

html[data-theme="light"] :where(.hero-premium,.section,.page-hero,.story-narrative-v14,.story-flow-item-v14,.story-timeline-v14,.split-highlight-v14,.vision-2040-v19,.vision-2040-v20) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter:none !important;
}
html[data-theme="light"] :where(.hero-logo-lockup,.hero-glass-card,.product-card,.card,.mission-card,.timeline-card,.team-card-v18,.team-card-v20,.contact-card-main-v20,.contact-context-v20,.vision-focus-v19,.vision-focus-v20) {
  background: rgba(255,255,255,.94) !important;
  border: 1px solid var(--v20-line-light) !important;
  box-shadow: 0 22px 70px rgba(15,23,42,.08) !important;
  color: var(--v20-light-text) !important;
}
html[data-theme="light"] .hero-premium { min-height: min(880px, calc(100vh - 92px)) !important; }
html[data-theme="light"] .hero-logo-lockup * { color: var(--v20-light-text) !important; }
html[data-theme="light"] .check-grid span,
html[data-theme="light"] .clean-list li { color:var(--v20-light-text) !important; background:#fff !important; border-color:var(--v20-line-light) !important; }

/* ---------- Header controls ---------- */
.site-header-v20 { width:min(1500px, calc(100% - 48px)) !important; min-height:64px !important; padding:10px 16px !important; gap:16px !important; }
.site-header-v20 .brand-mark { width:42px !important; height:42px !important; }
.site-header-v20 .brand-copy small { letter-spacing:.18em !important; }
html[data-theme="light"] .site-header-v20 { background:rgba(255,255,255,.94) !important; border-color:var(--v20-line-light) !important; box-shadow:0 18px 60px rgba(15,23,42,.10) !important; }
html[data-theme="dark"] .site-header-v20 { background:rgba(4,11,25,.82) !important; border-color:var(--v20-line-dark) !important; box-shadow:0 22px 70px rgba(0,0,0,.35) !important; }
.header-tools-v20 { display:flex !important; align-items:center !important; gap:8px !important; }
.language-switcher-v20,
.theme-switch-v20,
.account-button-v20,
.menu-button-v20 {
  width:38px !important; height:38px !important; min-width:38px !important; border-radius:999px !important;
  display:inline-grid !important; place-items:center !important;
  border:1px solid rgba(148,163,184,.28) !important;
  background:rgba(255,255,255,.08) !important;
  color:var(--v20-dark-text) !important;
  text-decoration:none !important;
  box-shadow:none !important;
}
html[data-theme="light"] :where(.language-switcher-v20,.theme-switch-v20,.account-button-v20,.menu-button-v20) { background:#fff !important; color:var(--v20-light-text) !important; border-color:var(--v20-line-light) !important; }
.language-switcher-v20 { grid-template-rows:18px 10px !important; gap:1px !important; padding:3px 0 !important; }
.language-switcher-v20 img { width:20px !important; height:13px !important; object-fit:cover !important; border-radius:2px !important; box-shadow:0 0 0 1px rgba(0,0,0,.15); }
.language-switcher-v20 span { font-size:8px !important; line-height:1 !important; font-weight:950 !important; letter-spacing:.06em !important; color:inherit !important; }
.theme-switch-v20 .theme-toggle-icon { font-size:19px !important; line-height:1 !important; color:inherit !important; }
.account-button-v20 b { color:inherit !important; font-size:.78rem !important; font-weight:950 !important; }
.account-menu-v20 { position:relative !important; }
.account-dropdown-v20 { position:absolute !important; right:0 !important; top:calc(100% + 10px) !important; width:230px !important; padding:12px !important; border-radius:18px !important; background:#071225 !important; border:1px solid var(--v20-line-dark) !important; box-shadow:0 28px 80px rgba(0,0,0,.45) !important; z-index:80 !important; }
html[data-theme="light"] .account-dropdown-v20 { background:#fff !important; border-color:var(--v20-line-light) !important; box-shadow:0 28px 80px rgba(15,23,42,.18) !important; }
.account-dropdown-v20 :where(strong,small,a,button) { display:block !important; color:var(--v20-dark-text) !important; text-decoration:none !important; }
html[data-theme="light"] .account-dropdown-v20 :where(strong,small,a,button) { color:var(--v20-light-text) !important; }
.account-dropdown-v20 small { color:var(--v20-dark-muted) !important; margin:2px 0 8px !important; }
html[data-theme="light"] .account-dropdown-v20 small { color:var(--v20-light-muted) !important; }
.account-dropdown-v20 a,
.account-dropdown-v20 button { width:100% !important; text-align:left !important; padding:9px 10px !important; margin-top:4px !important; border-radius:12px !important; background:transparent !important; border:0 !important; font-weight:800 !important; cursor:pointer !important; }
.account-dropdown-v20 a:hover,
.account-dropdown-v20 button:hover { background:rgba(42,125,255,.12) !important; }
.menu-button-v20 { display:none !important; }
@media(max-width:980px){ .menu-button-v20{ display:inline-grid !important; } .site-nav-v20{ display:none; } .site-nav-v20.is-open{ display:flex !important; } }

/* ---------- Dashboard/admin: readable, not mosaic ---------- */
.dashboard-page { background:#020817 !important; color:var(--v20-dark-text) !important; }
.dashboard-page :where(h1,h2,h3,h4,strong,label,legend,th,td,p,small,span,em,a,button) { text-shadow:none !important; }
html[data-theme="dark"] .dashboard-page :where(h1,h2,h3,h4,strong,label,legend,th,td) { color:var(--v20-dark-text) !important; }
html[data-theme="dark"] .dashboard-page :where(p,small,em,span) { color:var(--v20-dark-muted) !important; }
html[data-theme="dark"] .dashboard-page .eyebrow { color:#69ddff !important; }
html[data-theme="dark"] .sidebar { background:#050c19 !important; color:var(--v20-dark-text) !important; border-color:var(--v20-line-dark) !important; }
html[data-theme="dark"] .sidebar :where(strong,small,a,button,span) { color:var(--v20-dark-text) !important; }
html[data-theme="dark"] .sidebar .brand-copy small { color:var(--v20-dark-muted) !important; }
html[data-theme="dark"] .sidebar-nav a,
html[data-theme="dark"] .logout-form button { background:#091525 !important; color:var(--v20-dark-text) !important; border:1px solid var(--v20-line-dark) !important; }

html[data-theme="light"] .dashboard-page { background:#eef6ff !important; color:var(--v20-light-text) !important; }
html[data-theme="light"] .dashboard-page :where(h1,h2,h3,h4,strong,label,legend,th,td,a,button) { color:var(--v20-light-text) !important; }
html[data-theme="light"] .dashboard-page :where(p,small,em,span) { color:var(--v20-light-muted) !important; }
html[data-theme="light"] .dashboard-page .eyebrow { color:#075db4 !important; }
html[data-theme="light"] .sidebar { background:#ffffff !important; color:var(--v20-light-text) !important; border-color:var(--v20-line-light) !important; box-shadow:12px 0 42px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .sidebar :where(strong,small,a,button,span) { color:var(--v20-light-text) !important; }
html[data-theme="light"] .sidebar .brand-copy small { color:var(--v20-light-muted) !important; }
html[data-theme="light"] .sidebar-nav a,
html[data-theme="light"] .logout-form button { background:#f7fbff !important; color:var(--v20-light-text) !important; border:1px solid var(--v20-line-light) !important; }
html[data-theme="light"] .dashboard-main { background:#eef6ff !important; }

.dashboard-card,
.admin-hero-v20,
.admin-list-card-v20,
.admin-form-card-v20,
.dashboard-topbar { border-radius:26px !important; }
html[data-theme="dark"] :where(.dashboard-card,.admin-hero-v20,.admin-list-card-v20,.admin-form-card-v20,.dashboard-topbar) { background:rgba(7,18,37,.94) !important; border:1px solid var(--v20-line-dark) !important; box-shadow:0 24px 80px rgba(0,0,0,.28) !important; }
html[data-theme="light"] :where(.dashboard-card,.admin-hero-v20,.admin-list-card-v20,.admin-form-card-v20,.dashboard-topbar) { background:#ffffff !important; border:1px solid var(--v20-line-light) !important; box-shadow:0 24px 70px rgba(15,23,42,.08) !important; }
.dashboard-actions-v20 { display:flex !important; gap:8px !important; align-items:center !important; }
.user-pill-v20 { display:flex !important; gap:8px !important; align-items:center !important; border-radius:999px !important; padding:6px 10px 6px 6px !important; border:1px solid var(--v20-line-dark) !important; background:rgba(255,255,255,.06) !important; }
html[data-theme="light"] .user-pill-v20 { background:#fff !important; border-color:var(--v20-line-light) !important; }
.user-pill-v20 b { width:28px !important; height:28px !important; display:grid !important; place-items:center !important; border-radius:999px !important; background:linear-gradient(135deg,#2a7dff,#7f4cff) !important; color:#fff !important; }
.user-pill-v20 span { color:inherit !important; font-weight:800 !important; }
.admin-hero-v20 { display:flex !important; justify-content:space-between !important; gap:18px !important; align-items:center !important; }
.admin-list-card-v20 { margin-top:22px !important; }
.admin-list-head-v20 { margin-bottom:18px !important; }
.users-table-wrap-v20 { width:100% !important; overflow-x:auto !important; padding-bottom:6px !important; }
.users-table-v20 { width:100% !important; min-width:860px !important; border-collapse:collapse !important; table-layout:fixed !important; }
.users-table-v20 th { padding:0 12px 10px !important; text-align:left !important; font-size:.74rem !important; text-transform:uppercase !important; letter-spacing:.10em !important; color:#7a8aa2 !important; border-bottom:1px solid rgba(148,163,184,.22) !important; }
.users-table-v20 td { padding:16px 12px !important; border-bottom:1px solid rgba(148,163,184,.16) !important; vertical-align:middle !important; }
.users-table-v20 th:nth-child(1), .users-table-v20 td:nth-child(1) { width:28%; }
.users-table-v20 th:nth-child(2), .users-table-v20 td:nth-child(2) { width:25%; }
.users-table-v20 th:nth-child(3), .users-table-v20 td:nth-child(3) { width:22%; }
.users-table-v20 th:nth-child(4), .users-table-v20 td:nth-child(4) { width:14%; }
.users-table-v20 th:nth-child(5), .users-table-v20 td:nth-child(5) { width:11%; }
.user-cell-v20 { display:flex !important; align-items:center !important; gap:12px !important; min-width:0 !important; }
.user-cell-v20 strong { display:block !important; white-space:normal !important; line-height:1.2 !important; }
.user-cell-v20 small { display:block !important; margin-top:2px !important; }
.user-avatar-v20 { width:38px !important; height:38px !important; flex:0 0 38px !important; border-radius:14px !important; display:grid !important; place-items:center !important; background:linear-gradient(135deg,#2a7dff,#7f4cff) !important; color:#fff !important; font-weight:950 !important; }
.permission-pills-v20 { display:flex !important; flex-wrap:wrap !important; gap:6px !important; }
.permission-pills-v20 span { padding:5px 8px !important; border-radius:999px !important; background:rgba(73,216,255,.10) !important; color:#67ddff !important; border:1px solid rgba(73,216,255,.22) !important; font-size:.75rem !important; font-weight:850 !important; }
html[data-theme="light"] .permission-pills-v20 span { background:#eef8ff !important; color:#075db4 !important; border-color:rgba(7,93,180,.14) !important; }
.row-actions-v20 { display:flex !important; flex-wrap:wrap !important; gap:8px !important; }
.row-actions-v20 form { margin:0 !important; }
.admin-form-card-v20 { margin-top:22px !important; }
.admin-user-form-v20 { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:14px !important; }
.admin-user-form-v20 label { display:grid !important; gap:6px !important; }
.admin-user-form-v20 input,
.admin-user-form-v20 select { width:100% !important; min-height:44px !important; border-radius:14px !important; padding:0 13px !important; border:1px solid rgba(148,163,184,.35) !important; background:#fff !important; color:var(--v20-light-text) !important; }
html[data-theme="dark"] .admin-user-form-v20 input,
html[data-theme="dark"] .admin-user-form-v20 select { background:#091525 !important; color:var(--v20-dark-text) !important; border-color:var(--v20-line-dark) !important; }
.permission-fieldset-v20 { grid-column:1 / -1 !important; border:1px solid rgba(148,163,184,.25) !important; border-radius:18px !important; padding:14px !important; display:flex !important; flex-wrap:wrap !important; gap:12px 20px !important; }
.permission-fieldset-v20 legend { padding:0 8px !important; font-weight:950 !important; }
.permission-fieldset-v20 label { display:flex !important; align-items:center !important; gap:8px !important; }
.admin-user-form-v20 .button { justify-self:start !important; }
@media(max-width:900px){ .admin-hero-v20{ flex-direction:column !important; align-items:flex-start !important; } .admin-user-form-v20{ grid-template-columns:1fr !important; } }

/* ---------- Team and partner stable visuals ---------- */
.team-card-v18 img, .team-card-v20 img { width:132px !important; height:132px !important; object-fit:cover !important; }
.team-modal-backdrop-v18 { background:rgba(2,6,14,.74) !important; backdrop-filter:blur(14px) !important; }
.team-modal-card-v18 { opacity:1 !important; background:#071225 !important; color:var(--v20-dark-text) !important; border:1px solid var(--v20-line-dark) !important; box-shadow:0 40px 130px rgba(0,0,0,.60) !important; }
.team-modal-card-v18 :where(h2,strong,p,span) { color:var(--v20-dark-text) !important; }
.team-modal-card-v18 p { color:var(--v20-dark-muted) !important; }
html[data-theme="light"] .team-modal-card-v18 { background:#fff !important; color:var(--v20-light-text) !important; border-color:var(--v20-line-light) !important; box-shadow:0 40px 130px rgba(15,23,42,.24) !important; }
html[data-theme="light"] .team-modal-card-v18 :where(h2,strong,span) { color:var(--v20-light-text) !important; }
html[data-theme="light"] .team-modal-card-v18 p { color:var(--v20-light-muted) !important; }
.partner-logo-card-v18 { background:#fff !important; padding:8px !important; }
.partner-logo-card-v18 img { width:100% !important; height:104px !important; object-fit:contain !important; }

/* ---------- Contact simple ---------- */
.contact-simple-v20 { display:grid !important; grid-template-columns:1.1fr .9fr !important; gap:24px !important; }
.contact-card-main-v20, .contact-context-v20 { padding:28px !important; border-radius:28px !important; }
@media(max-width:800px){ .contact-simple-v20{ grid-template-columns:1fr !important; } }

/* ---------- Vision ---------- */
.vision-2040-v20, .vision-2040-v19 { display:grid !important; grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr) !important; gap:32px !important; align-items:start !important; }
.vision-copy-v19 p, .vision-copy-v20 p { font-size:1.05rem !important; line-height:1.78 !important; margin:.9rem 0 !important; }
.vision-focus-v19, .vision-focus-v20 { padding:22px !important; border-radius:24px !important; }
.vision-focus-v19 li, .vision-focus-v20 li { padding:12px !important; border-radius:16px !important; margin-bottom:10px !important; }
@media(max-width:900px){ .vision-2040-v20, .vision-2040-v19{ grid-template-columns:1fr !important; } }
