/* The site uses the added-content layer for section-specific layout overrides. */
@layer added-content {
  @media (max-width: 900px) {
    .releasePage .releaseGrid {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    .releasePage .releaseGrid > :is(.releaseMain, .releaseSide) {
      grid-column: 1 !important;
      grid-row: auto !important;
      min-width: 0;
      max-width: 100%;
    }
    .releasePage .releaseGrid > .releaseSide {
      display: grid;
      position: static;
    }
  }

  .study-controller .controller-intro .controller-hardware {
    width: min(100%, 500px) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin-inline: 0 !important;
  }
  @media (min-width: 641px) and (max-width: 900px) {
    .study-controller .controller-intro .controller-hardware { width: 38% !important; }
  }
  #customer-authority .estate-section .estate-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  #customer-authority .estate-layout .estate-figure {
    width: 100% !important;
    max-width: none !important;
  }
  @media (max-width: 940px) {
    #customer-authority .estate-section .estate-layout {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    #customer-authority .estate-layout .estate-figure {
      max-width: 640px !important;
      justify-self: start;
    }
  }

  .study-evaluation .evaluation-overview .evaluation-sketch {
    width: min(100%, 540px) !important;
    max-width: 100% !important;
    height: auto !important;
  }
  @media (min-width: 901px) {
    .cycle-section .cycle-body .cycle-dial {
      width: min(100%, 520px) !important;
      max-width: 100% !important;
    }
    .fr-acme .ac-wrap .ac-diagram svg,
    .discovery-study .dc-map .dc-visual svg {
      width: 100% !important;
      max-width: none !important;
      height: auto !important;
    }
    .rv-azure .rv-vault .rv-vault-copy figure {
      width: min(100%, 540px) !important;
    }
  }
  .pm-estate .pm-layout figure {
    width: min(100%, 520px) !important;
    justify-self: center;
  }
  .pm-estate .pm-layout figure svg {
    width: 100% !important;
    max-width: none !important;
    height: auto;
  }
  .doc-launchpad[data-section-layout="docs"] > .docs-study > .ds-wrap:first-child {
    padding-inline: clamp(16px, 2.2vw, 30px) !important;
    box-sizing: border-box;
  }
  .doc-launchpad .docs-study .ds-demo-screen {
    height: auto !important;
  }
  .doc-launchpad .docs-study .ds-demo-screen img {
    display: block;
    width: 100%;
    height: auto !important;
  }

  #trial-and-free .sj-inner > h2 { font-size: 25px !important; }
  .demoBenefits .demoBenefit p { font-size: 14px !important; line-height: 1.6 !important; }
  #data-privacy .responsibility-cell p { font-size: 14px !important; line-height: 1.7 !important; }
  .origin-study .origin-wrap .origin-credit { font-family: Arial, Helvetica, sans-serif !important; }
  :is(#key-custody, #evaluate) .sectionIn > h2 { font-size: 35px !important; line-height: 1.08 !important; }
  .nx-wildcard .rollout aside #case-heading { font-size: 1.1rem !important; line-height: 1.25 !important; }

  /* Give the controller's approval summary its own row below the firewall rules. */
  .controller-management .controller-management-visual {
    width: 100% !important;
    max-width: 600px !important;
  }
  .controller-management .controller-panel { transform: none !important; }
  .controller-management .controller-floating-card {
    position: static !important;
    max-width: none !important;
    margin: 0 16px 16px !important;
    box-shadow: none !important;
  }
  @media (min-width: 651px) and (max-width: 940px) {
    .controller-management .controller-management-layout {
      grid-template-columns: minmax(0, 1fr) !important;
      gap: 28px;
    }
    .controller-management .controller-management-visual { justify-self: center; }
  }
  @media (max-width: 650px) {
    .controller-management .controller-panel-head small,
    .controller-management .controller-metric span { font-size: 11px !important; }
    .controller-management .controller-metric small { font-size: 12px !important; }
  }

  #permanent-free .step-visual .plan-shot {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto !important;
  }
  #permanent-free .plan-shot [data-enlarge] { margin-inline: auto !important; }
  #permanent-free .plan-shot figcaption { max-width: 32ch; }
  @media (max-width: 600px) {
    #enterprise-trial .route-shot img[src$="/trial-banner.webp"] {
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 279 / 77;
      object-fit: cover;
      object-position: right center;
    }
  }

  /* Only the cards and labels whose light colours disappeared against the surface. */
  html[data-site-theme="light"] :is(.releaseBand article a.btn, .insightCard .readMore,
    .insightCard .insightTagLink, .articleJourneyLink span, .articleJourneyHome > a,
    .articleCta > a.btn.primary, .articleActions > a.btn.primary, article.flowStep2 > span) {
    color: #075e44 !important;
  }
  html[data-site-theme="dark"] .releaseGrid:has(#release-2-0-0) .releaseSide .card {
    background: #071b15 !important;
    border-color: #244639 !important;
    box-shadow: none;
  }
}

#controller-layout figure > a:has(picture), #controller-layout figure picture { display: block; }
#controller-layout figure picture img { display: block; }

/* Embedded homepage previews retain their own controls, colours and typeface. */
#client-server-preview .ps-ov-data,
#client-server-preview .ps-ov-data :is(th, td),
#client-server-preview .ps-ov-attention :is(table, th, td),
#client-server-preview .ps-ov-chart :is(span, b),
#client-server-preview .ps-ov-horizon :is(span, b),
#client-server-preview .ps-ov-section-head .ps-ov-route,
#client-server-preview .ps-ov-usage-row,
#client-server-preview .ps-ov-legend span,
#client-server-preview .ps-ov-strip small,
#client-server-preview .ps-ov-health b,
#client-server-preview .ps-ov-subtitle,
#client-server-preview .ps-ov-target p,
#client-server-preview .ps-ov-operations p,
#client-server-preview .ps-ov-filters > *,
#client-server-preview .ps-ov-alert-counts,
#client-server-preview .ps-ov-channel-counts span,
#client-server-preview .ps-rail-row > span,
#client-server-preview .ps-ov-engine { font-size: 12px; line-height: 1.4; }
#client-server-preview .ps-ov-attention { overflow-x: auto; }
#client-server-preview .ps-ov-attention :is(th, td:first-child, td:last-child) { white-space: nowrap; }
#client-server-preview .ps-ov-attention :is(.ps-ov-critical, .ps-ov-high) { font-size: 12px; }

@media (max-width: 1000px) {
  #client-server-preview:has(.ps-overview-content .ps-ov-head) {
    max-height: min(80svh, 800px);
    overflow-y: auto;
  }
  #client-server-preview:has(.ps-overview-content .ps-ov-head) + #overview-scroll-hint {
    display: block;
    margin: 8px 2px 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
  }
}
#client-server-preview .gov-graph-viewport .gov-diagram { width: max(100%, 850px); }
#client-server-preview .gov-edges-text,
#client-server-preview .gov-node .kind { font-size: 11px; }

/* The illustrated certificate and the four lifecycle nodes need separate space. */
.certHero .certSketchNode small, .certHero .certSketchKicker,
.certHero .certSketchRow span { font-size: 10px; }
.aboutHero .certHero { container: certificate-hero / inline-size; }
@container certificate-hero (max-width: 475px) {
  .aboutHero .certHero .certSketch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "issue deploy" "cert cert" "renew verify";
    gap: 12px;
    min-height: 0;
    padding: 16px;
  }
  .certHero .certSketch .certSketchNode,
  .certHero .certSketch .certSketchCore {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }
  .certHero .certSketchNode.ca { grid-area: issue; }
  .certHero .certSketchNode.target { grid-area: deploy; }
  .certHero .certSketchNode.audit { grid-area: renew; }
  .certHero .certSketchNode.verify { grid-area: verify; }
  .certHero .certSketch .certSketchCore { grid-area: cert; max-width: 300px; justify-self: center; }
  .certHero .certSketchRoute { display: none; }
  .certHero .certHeroNote { position: relative; inset: auto !important; margin: 0 16px 16px; }
  .certHero .certSketchNode small, .certHero .certSketchRow span { font-size: 12px; }
}
