/* v17 — stability layer: final contrast audit, compact header tools, team drawer, approved portraits. */

:root {
    --as-dark: #020711;
    --as-ink: #061327;
    --as-muted: #53627c;
    --as-panel: #ffffff;
    --as-line-light: rgba(19, 42, 78, .12);
    --as-shadow-light: 0 28px 90px rgba(16, 42, 83, .10);
}

/* Global light mode: high contrast, no white-on-light or dark-on-dark leftovers. */
html[data-theme="light"] body {
    color: var(--as-ink) !important;
    background:
        radial-gradient(circle at 10% 0%, rgba(44, 125, 255, .10), transparent 36rem),
        radial-gradient(circle at 90% 10%, rgba(73, 216, 255, .10), transparent 34rem),
        linear-gradient(180deg, #f7fbff 0%, #eef6ff 55%, #f9fcff 100%) !important;
}
html[data-theme="light"] body::before,
html[data-theme="light"] body::after,
html[data-theme="light"] .page-aura {
    opacity: .22 !important;
}
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] strong,
html[data-theme="light"] .brand-copy strong,
html[data-theme="light"] .site-nav a,
html[data-theme="light"] .hero h1,
html[data-theme="light"] .section h2,
html[data-theme="light"] .section h3,
html[data-theme="light"] .product-card h3,
html[data-theme="light"] .team-card h3,
html[data-theme="light"] .mission-card h3,
html[data-theme="light"] .timeline-card h3 {
    color: #061327 !important;
    text-shadow: none !important;
}
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] small,
html[data-theme="light"] .hero-lead,
html[data-theme="light"] .section p,
html[data-theme="light"] .product-card p,
html[data-theme="light"] .team-card p,
html[data-theme="light"] .mission-card p,
html[data-theme="light"] .timeline-card p {
    color: #31415d !important;
    text-shadow: none !important;
}
html[data-theme="light"] .eyebrow {
    color: #0a5bbf !important;
    text-shadow: none !important;
}
html[data-theme="light"] .eyebrow::before {
    background: linear-gradient(90deg, #2a7dff, #49d8ff) !important;
    box-shadow: none !important;
}

/* Header: compact, readable, with user tools. */
.site-header-v17 {
    width: min(1520px, calc(100% - 48px)) !important;
    min-height: 64px !important;
    padding: 9px 12px !important;
    gap: 12px !important;
    border-radius: 999px !important;
    z-index: 1000 !important;
}
html[data-theme="dark"] .site-header-v17 {
    background: rgba(2, 7, 17, .78) !important;
    border-color: rgba(170,205,255,.18) !important;
}
html[data-theme="light"] .site-header-v17 {
    background: rgba(255,255,255,.86) !important;
    border-color: rgba(19,42,78,.12) !important;
    box-shadow: 0 18px 55px rgba(16,42,83,.10) !important;
    backdrop-filter: blur(18px) saturate(140%) !important;
}
.brand-v17 { min-width: 190px !important; }
.brand-v17 .brand-mark { width: 42px !important; height: 42px !important; }
.brand-v17 .brand-copy strong {
    font-family: "Segoe Script", "Brush Script MT", "Comic Sans MS", cursive !important;
    letter-spacing: .015em !important;
    text-transform: none !important;
    font-size: 1.05rem !important;
    line-height: .9 !important;
}
.brand-v17 .brand-copy small { font-size: .62rem !important; letter-spacing: .12em !important; }
.brand-tricolor { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0 !important; width: 104px !important; height: 4px !important; margin: 4px 0 2px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.brand-tricolor i:nth-child(1) { background: #0b2a8b !important; }
.brand-tricolor i:nth-child(2) { background: #fff !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08) !important; }
.brand-tricolor i:nth-child(3) { background: #ef233c !important; }
.site-nav-v17 { gap: 2px !important; }
.site-nav-v17 > a { font-size: .84rem !important; padding: 8px 10px !important; }
.header-tools-v17 { display: inline-flex !important; align-items: center !important; gap: 8px !important; flex-wrap: nowrap !important; }
.user-tools-v17 { display: inline-flex !important; align-items: center !important; gap: 5px !important; padding: 3px !important; border: 1px solid rgba(148,163,184,.22) !important; border-radius: 999px !important; background: rgba(255,255,255,.055) !important; }
html[data-theme="light"] .user-tools-v17 { background: rgba(255,255,255,.72) !important; border-color: rgba(19,42,78,.12) !important; }
.icon-tool-v17,
.user-mini-v17,
.logout-mini-v17 button,
.theme-toggle-v17 {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    border: 1px solid rgba(148,163,184,.20) !important;
    background: rgba(255,255,255,.06) !important;
    color: #eaf4ff !important;
    text-decoration: none !important;
    font-weight: 850 !important;
    font-size: .9rem !important;
    cursor: pointer !important;
}
.user-mini-v17 { background: linear-gradient(135deg, #2a7dff, #7f4cff) !important; color: #fff !important; border: 0 !important; }
.user-mini-v17 b { color: #fff !important; font-size: .73rem !important; letter-spacing: .04em !important; }
.logout-mini-v17 { margin: 0 !important; display: inline-flex !important; }
.logout-mini-v17 button { padding: 0 !important; }
html[data-theme="light"] .icon-tool-v17,
html[data-theme="light"] .logout-mini-v17 button,
html[data-theme="light"] .theme-toggle-v17 { color: #061327 !important; background: rgba(255,255,255,.86) !important; border-color: rgba(19,42,78,.14) !important; }
.theme-toggle-v17 { width: auto !important; padding: 0 10px !important; gap: 5px !important; }
.theme-toggle-v17 .theme-toggle-text { font-size: .75rem !important; font-weight: 850 !important; }

/* Compact language control: flags visible but not dominant. */
.language-switcher-v17 {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    height: 34px !important;
    padding: 3px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(148,163,184,.22) !important;
    background: rgba(255,255,255,.055) !important;
    backdrop-filter: blur(14px) !important;
}
.language-globe { width: 22px !important; display: inline-flex !important; justify-content: center !important; color: var(--cyan) !important; font-size: .78rem !important; opacity: .85 !important; }
.language-switcher-v17 .language-link {
    min-width: 0 !important;
    width: auto !important;
    height: 27px !important;
    padding: 0 7px !important;
    gap: 5px !important;
    border-radius: 999px !important;
    color: #dceaff !important;
    font-size: .70rem !important;
    font-weight: 900 !important;
}
.language-switcher-v17 .language-link.is-active { background: linear-gradient(135deg, rgba(42,125,255,.96), rgba(127,76,255,.96)) !important; color: #fff !important; box-shadow: none !important; }
.language-switcher-v17 .language-flag { width: 18px !important; height: 12px !important; border-radius: 2px !important; box-shadow: 0 0 0 1px rgba(255,255,255,.52) !important; }
.language-switcher-v17 .language-code { font-size: .68rem !important; }
html[data-theme="light"] .language-switcher-v17 { background: rgba(255,255,255,.82) !important; border-color: rgba(19,42,78,.13) !important; }
html[data-theme="light"] .language-switcher-v17 .language-link { color: #061327 !important; }
html[data-theme="light"] .language-switcher-v17 .language-link.is-active { color: #fff !important; }

/* Main surfaces: dark is high-tech, light is clean and fused, not grey boxes with blue borders. */
.hero-premium,
.section,
.page-hero,
.story-narrative-v14,
.story-flow-item-v14,
.story-timeline-v14,
.split-highlight-v14,
.vision-2040-v16,
.product-card,
.card,
.mission-card,
.timeline-card,
.team-card-v17 {
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease !important;
}
html[data-theme="light"] .hero-premium,
html[data-theme="light"] .section,
html[data-theme="light"] .page-hero,
html[data-theme="light"] .story-narrative-v14,
html[data-theme="light"] .story-flow-item-v14,
html[data-theme="light"] .story-timeline-v14,
html[data-theme="light"] .split-highlight-v14,
html[data-theme="light"] .product-card,
html[data-theme="light"] .card,
html[data-theme="light"] .mission-card,
html[data-theme="light"] .timeline-card,
html[data-theme="light"] .team-card-v17 {
    background: rgba(255,255,255,.74) !important;
    border-color: rgba(19,42,78,.10) !important;
    box-shadow: 0 18px 70px rgba(16,42,83,.075) !important;
    backdrop-filter: blur(18px) saturate(125%) !important;
}
html[data-theme="light"] .hero-premium {
    background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(242,248,255,.72)) !important;
    border-color: rgba(19,42,78,.08) !important;
    box-shadow: 0 30px 120px rgba(20, 52, 94, .10) !important;
}
html[data-theme="light"] .hero-logo-lockup,
html[data-theme="light"] .hero-glass-card {
    background: rgba(255,255,255,.86) !important;
    border-color: rgba(19,42,78,.10) !important;
    color: #061327 !important;
    box-shadow: 0 20px 70px rgba(20,52,94,.10) !important;
}
html[data-theme="light"] .hero-logo-lockup *:not(.tricolor-line):not(i),
html[data-theme="light"] .hero-glass-card * { color: #061327 !important; }
html[data-theme="light"] .hero-visual { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html[data-theme="light"] .hero-visual img { box-shadow: 0 24px 90px rgba(14, 42, 86, .16) !important; }

/* High-tech stable effects: glow follows cards without unreadable transparency. */
@media (hover:hover) and (pointer:fine) {
    .product-card:hover,
    .mission-card:hover,
    .card:hover,
    .team-card-v17:hover,
    .partner-logo-card-v17:hover {
        transform: translateY(-6px) !important;
        box-shadow: 0 34px 110px rgba(0,0,0,.34), 0 0 0 1px rgba(73,216,255,.18) !important;
    }
    html[data-theme="light"] .product-card:hover,
    html[data-theme="light"] .mission-card:hover,
    html[data-theme="light"] .card:hover,
    html[data-theme="light"] .team-card-v17:hover,
    html[data-theme="light"] .partner-logo-card-v17:hover {
        box-shadow: 0 30px 90px rgba(16,42,83,.16), 0 0 0 1px rgba(42,125,255,.16) !important;
    }
}

/* Team cards and stable drawer. No random positioning, no translucent unreadable overlay. */
.team-section-v17 { position: relative !important; overflow: visible !important; }
.team-grid-v17 {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: clamp(14px, 1.6vw, 22px) !important;
    align-items: stretch !important;
}
.team-card-v17 {
    min-height: 380px !important;
    padding: 20px 18px !important;
    display: grid !important;
    grid-template-rows: auto 1fr !important;
    gap: 14px !important;
    cursor: pointer !important;
    border-radius: 24px !important;
    overflow: hidden !important;
}
.team-card-v17 .team-portrait-wrap { display: grid !important; justify-items: center !important; }
.team-card-v17 img {
    width: 138px !important;
    height: 138px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    background: #fff !important;
    border: 3px solid rgba(255,255,255,.95) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.24) !important;
    filter: grayscale(1) contrast(1.04) !important;
}
.team-card-v17 h3 { margin: 4px 0 0 !important; }
.team-card-v17 .team-card-copy span { color: var(--cyan) !important; font-weight: 900 !important; line-height: 1.28 !important; }
.team-card-v17.is-active,
.team-card-v17.is-locked { border-color: rgba(73,216,255,.62) !important; }
.team-detail-drawer-v17 {
    position: fixed !important;
    z-index: 3000 !important;
    right: max(26px, calc((100vw - 1520px) / 2 + 26px)) !important;
    top: 50% !important;
    width: min(460px, calc(100vw - 42px)) !important;
    transform: translateY(-50%) !important;
    padding: 28px 28px 24px !important;
    border-radius: 28px !important;
    border: 1px solid rgba(73,216,255,.30) !important;
    background: #061126 !important;
    color: #f6fbff !important;
    box-shadow: 0 40px 130px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
}
.team-detail-drawer-v17[hidden] { display: none !important; }
.team-detail-drawer-v17::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(73,216,255,.18), transparent 35%, rgba(127,76,255,.13));
    opacity: .82;
}
.team-detail-drawer-v17 > * { position: relative; z-index: 1; }
.team-detail-drawer-v17 h2 { margin: 12px 0 8px !important; color: #fff !important; }
.team-detail-drawer-v17 strong { display: block !important; color: #53ddff !important; margin-bottom: 14px !important; line-height: 1.35 !important; }
.team-detail-drawer-v17 p { color: #dceaff !important; line-height: 1.72 !important; margin: 0 !important; }
.team-detail-drawer-v17 small { display: block !important; color: rgba(220,234,255,.70) !important; margin-top: 16px !important; }
.team-detail-close-v17 {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 3 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
}
html[data-theme="light"] .team-detail-drawer-v17 {
    background: #ffffff !important;
    color: #061327 !important;
    border-color: rgba(42,125,255,.20) !important;
    box-shadow: 0 40px 130px rgba(16,42,83,.22), 0 0 0 1px rgba(19,42,78,.06) inset !important;
}
html[data-theme="light"] .team-detail-drawer-v17 h2 { color: #061327 !important; }
html[data-theme="light"] .team-detail-drawer-v17 strong { color: #0a5bbf !important; }
html[data-theme="light"] .team-detail-drawer-v17 p { color: #243552 !important; }
html[data-theme="light"] .team-detail-drawer-v17 small { color: #5a6b85 !important; }
html[data-theme="light"] .team-detail-close-v17 { color: #061327 !important; background: rgba(6,19,39,.06) !important; border-color: rgba(6,19,39,.14) !important; }

/* Partners: white cards, larger logos, no clipping. */
.ecosystem-v17 { align-items: center !important; }
.partner-logos-v17 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
}
.partner-logo-card-v17 {
    display: grid !important;
    place-items: center !important;
    gap: 7px !important;
    min-height: 122px !important;
    padding: 12px 14px !important;
    border-radius: 20px !important;
    background: #fff !important;
    border: 1px solid rgba(4,16,32,.08) !important;
    box-shadow: 0 18px 50px rgba(0,0,0,.12) !important;
    overflow: hidden !important;
}
.partner-logo-card-v17 img {
    width: 100% !important;
    max-width: 240px !important;
    height: 78px !important;
    object-fit: contain !important;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 0 !important;
}
.partner-logo-card-v17 span { color: #061327 !important; font-weight: 850 !important; font-size: .83rem !important; text-align: center !important; }

/* Vision 2040 editorial block. */
.vision-2040-v16 {
    border-radius: 34px !important;
    padding: clamp(34px, 6vw, 76px) !important;
    background: linear-gradient(135deg, rgba(43,125,255,.14), rgba(19,194,255,.06)), rgba(8,14,28,.72) !important;
    overflow: hidden !important;
}
.vision-copy-v16 { max-width: 980px !important; }
.vision-copy-v16 h2 { font-size: clamp(2.2rem, 5.2vw, 5.2rem) !important; line-height: .98 !important; letter-spacing: -.06em !important; }
.vision-sectors-v16 { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin-top: 16px !important; }
.vision-sectors-v16 span { display: inline-flex !important; padding: 10px 14px !important; border-radius: 999px !important; background: rgba(255,255,255,.06) !important; border: 1px solid rgba(148,163,184,.18) !important; color: #d8e3f6 !important; }
html[data-theme="light"] .vision-2040-v16 { background: rgba(255,255,255,.74) !important; }
html[data-theme="light"] .vision-sectors-v16 span { background: rgba(255,255,255,.90) !important; color: #31415d !important; border-color: rgba(19,42,78,.10) !important; }

/* Auth/login spacing and readability. */
.auth-card,
.auth-card-v15,
.login-modal-card-v15 { color: #f6fbff !important; }
.auth-fields label,
.auth-fields-v15 label { display: grid !important; gap: 7px !important; grid-template-columns: 1fr !important; }
.auth-fields label span,
.auth-fields-v15 label span { color: #dceaff !important; font-weight: 850 !important; }
.auth-fields input,
.auth-fields-v15 input { width: 100% !important; min-height: 46px !important; }
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-card-v15,
html[data-theme="light"] .login-modal-card-v15 { background: #fff !important; color: #061327 !important; }
html[data-theme="light"] .auth-card h1,
html[data-theme="light"] .auth-card h2,
html[data-theme="light"] .auth-card p,
html[data-theme="light"] .auth-card label span,
html[data-theme="light"] .login-modal-card-v15 h2,
html[data-theme="light"] .login-modal-card-v15 p,
html[data-theme="light"] .login-modal-card-v15 label span { color: #061327 !important; }

@media (max-width: 1180px) {
    .team-grid-v17 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .team-detail-drawer-v17 { right: 22px !important; }
}
@media (max-width: 900px) {
    .site-header-v17 { border-radius: 26px !important; align-items: center !important; }
    .site-nav-v17 { display: none !important; position: absolute !important; top: 72px !important; right: 12px !important; left: 12px !important; padding: 14px !important; border-radius: 22px !important; background: rgba(3,7,18,.97) !important; border: 1px solid var(--line) !important; flex-direction: column !important; align-items: stretch !important; }
    .site-nav-v17.is-open { display: flex !important; }
    html[data-theme="light"] .site-nav-v17 { background: rgba(255,255,255,.97) !important; border-color: rgba(19,42,78,.14) !important; }
    .menu-button-v17 { display: inline-flex !important; }
    .theme-toggle-v17 .theme-toggle-text { display: none !important; }
    .team-detail-drawer-v17 { top: auto !important; right: 14px !important; left: 14px !important; bottom: 14px !important; width: auto !important; transform: none !important; max-height: 70vh !important; overflow: auto !important; }
    .partner-logos-v17 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 620px) {
    .site-header-v17 { width: calc(100% - 24px) !important; }
    .brand-v17 .brand-copy small { display: none !important; }
    .brand-v17 { min-width: 0 !important; }
    .language-globe, .language-switcher-v17 .language-code { display: none !important; }
    .language-switcher-v17 .language-link { padding: 0 5px !important; }
    .team-grid-v17, .partner-logos-v17 { grid-template-columns: 1fr !important; }
    .team-card-v17 { min-height: auto !important; }
}
