/* Shared navigation from the approved homepage. */
.nav.home-nav {
  padding-block: 11px;
}
.nav.home-nav .nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 1120px;
  gap: 12px;
}
.home-nav-brand a {
  display: inline-flex;
  vertical-align: middle;
}
.home-nav .home-nav-brand img {
  width: auto;
  height: 32px;
  opacity: 0.85;
}
.home-nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 32px;
}
.home-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.home-nav-links a {
  color: var(--t2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.home-nav-links a:hover {
  color: var(--hd);
}
.home-nav a:focus-visible {
  outline: 2px solid var(--hd);
  outline-offset: 5px;
}
.home-nav-links a:focus-visible {
  border-radius: 2px;
}
.home-nav-start {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--hd);
  border-radius: 28px;
  background: #fff;
  color: var(--hd);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.home-nav-start:hover {
  background: var(--hd);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 160, 196, 0.12);
}
@media (max-width: 700px) {
  .home-nav-actions {
    display: contents;
  }
  .home-nav-start {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .home-nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 12px;
  }
  .home-nav-links a {
    font-size: 13px;
  }
}
@media (max-width: 560px) {
  .nav.home-nav .nav-inner {
    padding-inline: 20px;
  }
}
@media (max-width: 350px) {
  .nav.home-nav .nav-inner {
    gap: 8px;
    padding-inline: 12px;
  }
}

/* Product links open on hover or keyboard focus. */
.home-nav-solution {
  position: relative;
}
.home-nav-solution-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  z-index: 10;
  min-width: 220px;
  padding: 18px 8px 8px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.home-nav-solution-menu::before {
  content: '';
  position: absolute;
  inset: 10px 0 0;
  z-index: -1;
  border: 1px solid var(--bd);
  border-top: 2px solid var(--hd);
  border-radius: 12px;
  background: var(--sf);
  box-shadow: 0 12px 28px rgb(26 26 26 / 10%);
}
.home-nav-solution:hover .home-nav-solution-menu,
.home-nav-solution:focus-within .home-nav-solution-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.home-nav-solution-menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 6px;
}
.home-nav-solution-menu a:hover,
.home-nav-solution-menu a:focus-visible {
  color: var(--hd);
  background: #edf7fb;
}
@media (prefers-reduced-motion: reduce) {
  .home-nav-solution-menu {
    transition: none;
  }
}

/* Shared footer layout for the homepage and public deep dives. */
.site-footer-links {
  display: flex;
  justify-content: flex-end;
}
.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
@media (max-width: 700px) {
  :is(.homepage, .deep-dive) .site-footer-links {
    justify-content: flex-start;
  }
  :is(.homepage, .deep-dive) .site-footer-links > div {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 24px !important;
  }
  :is(.homepage, .deep-dive) .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 28px;
  }
}

/* Shared hover rhythm for standalone cards and calls to action. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.homepage, .deep-dive)
    :is(.cd, .lc, .arch-engine, .arch-source, .tool-card, .stat-card, .takeaway-header, .lbtn) {
    transition:
      translate 280ms ease,
      box-shadow 280ms ease,
      border-color 280ms ease,
      background-color 280ms ease,
      color 280ms ease;
  }
  :is(.homepage, .deep-dive)
    :is(.cd, .lc, .arch-engine, .arch-source, .tool-card, .stat-card, .takeaway-header):hover {
    translate: 0 -1px;
    box-shadow: var(--hover-shadow);
  }
  :is(.homepage, .deep-dive) .lbtn:hover {
    translate: 0 -1px;
    box-shadow: 0 4px 12px rgb(59 160 196 / 8%);
  }
}

/* Match every primary content card to the Visibility card's top rule. */
:is(.homepage, .deep-dive) {
  --card-top-rule: 2.25px;
}
:is(.homepage, .deep-dive)
  :is(
    .cd,
    .lc,
    .solution-product,
    .agent-card,
    .performer-group,
    .arch-engine,
    .arch-source,
    .tool-card,
    .stat-card,
    .score-model
  ),
.deep-dive .takeaway-group .takeaway-cards > .cd,
.deep-dive .score-method-steps > li {
  border-top: var(--card-top-rule) solid var(--hd);
}
.deep-dive .takeaway-header::before {
  border-top: var(--card-top-rule) solid var(--hd);
}
