/* DragonWatch v5: unified navigation, community CTA and publication hero.
   Deliberately scoped to these components; do not restyle the map/network.
   This file loads after the base site CSS. */

/* -------- Navigation: preserve the exact command-card structure -------- */
@media (min-width:1281px){
  .floating-topbar .top-nav{
    display:flex!important;align-items:center!important;justify-content:center!important;
    min-width:0!important;gap:clamp(6px,.60vw,12px)!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node{
    position:relative!important;
    display:grid!important;
    flex:1 1 0!important;
    grid-template-columns:18px 22px minmax(0,1fr)!important;
    grid-template-rows:1fr!important;
    column-gap:clamp(5px,.55vw,10px)!important;
    align-items:center!important;
    min-width:0!important;width:auto!important;
    padding:0 clamp(9px,.8vw,15px)!important;
    isolation:isolate!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-index{
    display:block!important;position:static!important;left:auto!important;top:auto!important;
    width:auto!important;height:auto!important;margin:0!important;padding:0!important;
    transform:none!important;grid-column:1!important;grid-row:1!important;
    justify-self:start!important;align-self:center!important;line-height:1!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .topnav-icon{
    display:grid!important;place-items:center!important;position:static!important;
    inset:auto!important;transform:none!important;margin:0!important;padding:0!important;
    grid-column:2!important;grid-row:1!important;
    width:22px!important;min-width:22px!important;height:22px!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .topnav-icon svg{
    display:block!important;width:20px!important;height:20px!important;
    fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy{
    display:flex!important;flex-direction:column!important;justify-content:center!important;
    align-items:flex-start!important;gap:3px!important;
    position:static!important;inset:auto!important;transform:none!important;
    grid-column:3!important;grid-row:1!important;
    margin:0!important;padding:0!important;width:auto!important;min-width:0!important;
    max-width:100%!important;text-align:left!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy b,
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy small{
    display:block!important;position:static!important;
    max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;
    text-overflow:ellipsis!important;margin:0!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy b{
    font-size:clamp(11px,.78vw,13px)!important;line-height:1.12!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy small{
    font-size:clamp(6px,.44vw,8px)!important;line-height:1.1!important;
  }
}
@media (min-width:1281px) and (max-width:1580px){
  .floating-topbar .top-nav{gap:7px!important}
  .floating-topbar .topnav-item.topnav-primary.dw-command-node{
    grid-template-columns:20px minmax(0,1fr)!important;column-gap:8px!important;padding:0 9px!important;
  }
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-index{display:none!important}
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .topnav-icon{grid-column:1!important}
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy{grid-column:2!important}
  .floating-topbar .topnav-item.topnav-primary.dw-command-node .dw-command-copy small{display:none!important}
}
@media (max-width:1280px){
  /* In the drawer use the base two-column icon + label arrangement. */
  .floating-topbar .top-nav.open .topnav-item.topnav-primary.dw-command-node{
    grid-template-columns:28px minmax(0,1fr)!important;grid-template-rows:1fr!important;
    min-width:0!important;
  }
  .floating-topbar .top-nav.open .topnav-item.topnav-primary.dw-command-node .dw-command-index{display:none!important}
  .floating-topbar .top-nav.open .topnav-item.topnav-primary.dw-command-node .topnav-icon{
    grid-column:1!important;grid-row:1!important;position:static!important;transform:none!important;
  }
  .floating-topbar .top-nav.open .topnav-item.topnav-primary.dw-command-node .dw-command-copy{
    grid-column:2!important;grid-row:1!important;position:static!important;
    inset:auto!important;transform:none!important;width:auto!important;min-width:0!important;
  }
}
@media (max-width:780px){
  .dw-mobile-workspace-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .dw-mobile-workspace-nav a{min-width:0!important;font-size:clamp(7px,1.9vw,9px)!important;letter-spacing:.015em!important;padding-inline:1px!important}
  .dw-mobile-workspace-nav a i,.dw-mobile-workspace-nav a i svg{width:19px!important;height:19px!important}
}

/* Mouse-driven lighting on hybrid computers may report a coarse primary
   pointer even when a real mouse is attached. Don't disable it in that case. */
@media (hover:none) and (prefers-reduced-motion:no-preference), (pointer:coarse) and (prefers-reduced-motion:no-preference){
  body.dw-pointer-mouse-detected.dw-cursor-light-enabled #dwCursorAura,
  body.dw-pointer-mouse-detected.dw-cursor-light-enabled .dw-surface-light{display:block!important}
}
/* Always keep text above the decorative cursor glow in the navigation. */
.floating-topbar .topnav-item.dw-command-node>.dw-surface-light{z-index:0!important}
.floating-topbar .topnav-item.dw-command-node>.dw-command-index,
.floating-topbar .topnav-item.dw-command-node>.topnav-icon,
.floating-topbar .topnav-item.dw-command-node>.dw-command-copy{z-index:1!important}

/* -------- Join the Fight: same container, spacing and grid as risk CTA -------- */
#dwCommunityFooter.dw-community-funnel{
  width:100%!important;max-width:none!important;box-sizing:border-box!important;
  margin:22px 0 40px!important;
  grid-template-columns:120px minmax(0,1fr) minmax(270px,.52fr)!important;
  min-height:0!important;gap:22px!important;
  padding:25px!important;border-radius:7px!important;
  border:1px solid #555!important;
  background:radial-gradient(circle at 11% 50%,rgba(146,53,62,.09),transparent 27%),linear-gradient(135deg,#161616,#101010)!important;
}
#dwCommunityFooter .global-risk-funnel-art{width:98px!important;height:98px!important}
#dwCommunityFooter .global-risk-funnel-copy h3{
  max-width:none!important;margin:4px 0 8px!important;font-size:24px!important;
  font-family:inherit!important;font-weight:800!important;line-height:1.16!important;
  letter-spacing:-.01em!important;color:#edf6f8!important;
}
#dwCommunityFooter .global-risk-funnel-copy p{font-size:12.5px!important;line-height:1.6!important;color:#a2aab0!important}
#dwCommunityFooter .global-risk-funnel-actions{min-width:0!important}
#dwCommunityFooter .global-risk-funnel-actions a.btn{text-decoration:none!important;min-height:36px!important}
#dwCommunityFooter .global-risk-funnel-actions small{display:flex!important;flex-wrap:wrap!important;gap:7px!important;justify-content:center!important;padding:3px 4px!important}
#dwCommunityFooter .global-risk-funnel-actions small a{color:#c0c5c9!important;text-decoration:none!important;font-size:11px!important}
#dwCommunityFooter .global-risk-funnel-actions small a:hover{text-decoration:underline!important;color:#fff!important}
body[data-page="about"] #dwCommunityFooter{display:none!important}
@media(max-width:1180px){
  #dwCommunityFooter.dw-community-funnel{
    grid-template-columns:88px minmax(0,1fr)!important;gap:18px!important;
  }
  #dwCommunityFooter .global-risk-funnel-art{width:84px!important;height:84px!important}
  #dwCommunityFooter .global-risk-funnel-actions{
    grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #dwCommunityFooter .global-risk-funnel-actions small{grid-column:1/-1!important}
}
@media(max-width:720px){
  #dwCommunityFooter.dw-community-funnel{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;padding:19px!important;margin:16px 0 24px!important;
  }
  #dwCommunityFooter .global-risk-funnel-art{width:76px!important;height:76px!important;margin:0 auto 2px!important}
  #dwCommunityFooter .global-risk-funnel-copy{text-align:center!important}
  #dwCommunityFooter .global-risk-funnel-copy h3{font-size:23px!important}
  #dwCommunityFooter .global-risk-funnel-proof{justify-content:center!important}
  #dwCommunityFooter .global-risk-funnel-actions{
    grid-column:1!important;display:flex!important;flex-direction:column!important;gap:8px!important;
  }
  #dwCommunityFooter .global-risk-funnel-actions a.btn{width:100%!important}
}

/* -------- About: dedicated vector artwork for each selected workspace -------- */
body[data-page="about"] .dw-explore-art{background:#0b1118!important}
body[data-page="about"] .dw-explore-art img{
  object-fit:cover!important;object-position:center!important;
  filter:none!important;transform:translateZ(0);transition:transform .4s ease!important;
}
body[data-page="about"] .dw-explore-panel:hover .dw-explore-art img{transform:scale(1.02)!important}
body[data-page="about"] .dw-explore-art::after{background:linear-gradient(0deg,rgba(6,8,12,.45),transparent 27%)!important}

/* -------- Analysis hero: one contained image+darkness treatment -------- */
body[data-page="blog"] .page-title{
  position:relative!important;isolation:isolate!important;overflow:hidden!important;
  background:#09090b!important;background-image:none!important;
  background-repeat:no-repeat!important;background-clip:padding-box!important;
}
body[data-page="blog"] .page-title::before,
body[data-page="blog"] .page-title::after{content:none!important;display:none!important}
body[data-page="blog"] .page-title .dw-analysis-hero-art{
  display:block!important;position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;max-width:none!important;
  padding:0!important;margin:0!important;z-index:0!important;pointer-events:none!important;
  background-image:
    linear-gradient(90deg,rgba(5,5,7,.91) 0%,rgba(5,5,7,.73) 23%,rgba(5,5,7,.34) 57%,rgba(5,5,7,.15) 100%),
    url('assets/analysis-header-v3.webp')!important;
  background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;
  border-radius:inherit!important;
}
body[data-page="blog"] .page-title .dw-analysis-hero-grid{
  display:block;position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 76% 23%,rgba(164,62,70,.13),transparent 26%),
             linear-gradient(0deg,rgba(245,211,175,.025) 1px,transparent 1px) right/100% 30px;
  opacity:.6;animation:dwAnalysisHalo 10s ease-in-out infinite alternate;
}
body[data-page="blog"] .page-title>div:not(.dw-analysis-hero-art){position:relative!important;z-index:2!important}
body[data-page="blog"] .page-title .dw-analysis-hero-art>.dw-surface-light{display:none!important}
@media(max-width:820px){
  body[data-page="blog"] .page-title .dw-analysis-hero-art{background-position:59% center!important}
}
@media(max-width:620px){
  body[data-page="blog"] .page-title .dw-analysis-hero-art{
    background-image:linear-gradient(0deg,rgba(5,5,7,.92),rgba(5,5,7,.54) 52%,rgba(5,5,7,.17)),url('assets/analysis-header-v3.webp')!important;
    background-position:60% center!important;
  }
}
@keyframes dwAnalysisHalo{from{opacity:.34}to{opacity:.72}}
@media(prefers-reduced-motion:reduce){
  body[data-page="blog"] .page-title .dw-analysis-hero-grid{animation:none!important}
  body[data-page="about"] .dw-explore-art img{transition:none!important}
}

/* Specificity fix: the legacy editor sizes .page-title>div:first-child to
   min(760px,58%) !important. This full-bleed art is deliberately exempt. */
body[data-page="blog"] .page-title > div.dw-analysis-hero-art:first-child{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  max-width:none!important;
  min-width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  z-index:0!important;
}

/* Article pages use the same CTA system, centered within the reading chrome. */
body.dw-article-page #dwCommunityFooter{max-width:min(1200px,calc(100% - 32px))!important;margin:34px auto 60px!important}
@media(max-width:780px){
  #dwCommunityFooter.dw-community-funnel{margin-bottom:calc(100px + env(safe-area-inset-bottom))!important}
  body.dw-article-page #dwCommunityFooter{margin-bottom:46px!important}
}


/* v6: Unified risk + community invitation. A single outer card with
   one logo, one border and a compact, responsive contact row. */
.global-risk-funnel.dw-unified-cta{
  grid-template-columns:120px minmax(0,1fr) minmax(270px,.52fr);
  row-gap:18px!important;
}
.dw-unified-cta .dw-unified-community{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,auto);
  align-items:center;
  gap:16px 24px;
  min-width:0;
  border-top:1px solid rgba(184,187,192,.2);
  padding-top:17px;
  padding-bottom:1px;
}
.dw-unified-community-copy{min-width:0}
.dw-unified-community-copy .research-kicker{
  color:#c56b71!important;
  font-size:10px!important;
  letter-spacing:.11em!important;
}
.dw-unified-community-copy h4{
  color:#f0ece9;
  font:800 clamp(20px,2vw,25px)/1.1 'IBM Plex Sans',system-ui,sans-serif;
  letter-spacing:-.015em;
  margin:4px 0 5px;
}
.dw-unified-community-copy p{
  max-width:67ch;
  color:#a3abb3;
  font-size:12.5px;
  line-height:1.55;
  margin:0;
}
.dw-unified-community-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
  min-width:0;
}
.dw-unified-community-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:0 0 auto;
  min-height:38px;
  padding:8px 12px;
  border:1px solid #4b4649;
  border-radius:5px;
  background:#121114;
  color:#cdd0d5;
  font:700 11px/1.25 'IBM Plex Sans',system-ui,sans-serif;
  text-align:center;
  text-decoration:none;
  white-space:nowrap;
  transition:border-color .16s,background .16s,color .16s;
}
.dw-unified-community-actions a:hover,
.dw-unified-community-actions a:focus-visible{
  color:#fff;
  border-color:#a94f58;
  background:#242024;
}
.dw-unified-community-actions a.dw-community-contact{
  color:#fff;
  background:linear-gradient(180deg,#58141d,#3a1016);
  border-color:#a83c49;
}
.dw-unified-community-actions a.dw-community-contact:hover,
.dw-unified-community-actions a.dw-community-contact:focus-visible{background:#72212b}
@media(max-width:1180px){
  .global-risk-funnel.dw-unified-cta{grid-template-columns:90px minmax(0,1fr)!important}
  .dw-unified-cta .dw-unified-community{
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch;
    gap:14px;
  }
  .dw-unified-community-actions{justify-content:flex-start}
}
@media(max-width:720px){
  .global-risk-funnel.dw-unified-cta{
    grid-template-columns:minmax(0,1fr)!important;
    gap:13px!important;
  }
  .dw-unified-cta .dw-unified-community{
    grid-column:1!important;
    text-align:center;
    padding-top:15px;
  }
  .dw-unified-community-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .dw-unified-community-actions a{white-space:normal;min-width:0;min-height:44px;padding:9px 7px}
  .dw-unified-community-actions .dw-community-contact{grid-column:1/-1}
}
@media(max-width:360px){
  .dw-unified-community-actions{grid-template-columns:1fr}
  .dw-unified-community-actions .dw-community-contact{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){
  .dw-unified-community-actions a{transition:none!important}
}
/* About now transitions directly from mission to workspace explorer. */
body[data-page="about"] .dw-about-mission + .dw-about-explore{
  padding-top:clamp(30px,4vw,58px);
}
