/* ===== Decorative banner behind the H1 on technical/policy pages ===== */
body.aif-technical header.entry-header{
  position: relative;
  z-index: 0;
  padding-block: clamp(.55rem, 1.8vw, 1rem) .4rem;
}

body.aif-technical header.entry-header::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;                 /* top area, full width of the header */
  height: clamp(100px, 22vw, 170px);
  z-index: -1;
  pointer-events: none;
  border-radius: 24px;
}

/* Light theme */
body.aif-technical header.entry-header::before{
  background:
    /* top fade toward page bg #FAFAFC */
    linear-gradient(180deg,
      rgba(250,250,252,.72) 0%,
      rgba(250,250,252,.28) 12%,
      rgba(250,250,252,0)   30%),
    /* brand wash (slightly softer) */
    radial-gradient(120% 80% at 6% 0%,
      rgba(196,181,253,.18) 0%,
      rgba(196,181,253,.08) 40%,
      rgba(196,181,253,0)   70%),

    /* subtle vertical tint */
    linear-gradient(180deg,
      rgba(196,181,253,.05) 0%,
      rgba(196,181,253,0)   100%);
}

/* tiny bottom seam so it blends into the content card */
body.aif-technical header.entry-header{
  box-shadow: inset 0 -1px 0 rgba(39,49,62,.08);
}

/* If your article wrapper clips the banner, let it show */
body.aif-technical .inside-article{ overflow: visible; }

/* Dark mode */
@media (prefers-color-scheme: dark){
  body.aif-technical header.entry-header::before{
    background:
  linear-gradient(180deg,
  rgba(15,19,25,.52) 0%,
  rgba(15,19,25,0)   18%),

      radial-gradient(110% 75% at 10% 0%,
        rgba(196,181,253,.095) 0%,
        rgba(196,181,253,.05)  34%,
        rgba(196,181,253,0)    66%),

      linear-gradient(180deg,
        rgba(196,181,253,.03) 0%,
        rgba(196,181,253,0)   100%),
  }

  body.aif-technical header.entry-header{
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.06);
  }
}

/*     Dark + mobile: keep the fade tight     */
@media (max-width: 480px) and (prefers-color-scheme: dark){
  body.aif-technical header.entry-header::before{
    height: clamp(82px, 27vw, 116px);
  }
}

/* Respect reduced motion (future-proof if you animate later) */
@media (prefers-reduced-motion: reduce){
  body.aif-technical header.entry-header::before{ animation: none !important; }
}

/* High-contrast / forced colors / print: remove decoration */
@media (prefers-contrast: more){
  body.aif-technical header.entry-header::before{ display:none; }
}
@media (forced-colors: active){
  body.aif-technical header.entry-header::before{ display:none; }
}
@media print{
  body.aif-technical header.entry-header::before{ display:none; }
}

/* Small screens */
@media (max-width: 480px){
  body.aif-technical header.entry-header{
    padding-block: .6rem .4rem;
  }
  body.aif-technical header.entry-header::before{
    height: clamp(84px, 28vw, 120px);
    border-radius: 14px;
    inset: 0 .3rem auto .3rem;
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
  }
  body.aif-technical .entry-content > *:first-child{
    margin-top: .7rem;
  }
}

/* Nice jump targets when linking to sections on long policy pages */
body.aif-technical .entry-content :is(h2,h3,h4){ scroll-margin-top: 6.5rem; }

@media (max-width: 420px){
  body.aif-technical header.entry-header::before{
    /* pull the radius down one notch and avoid touching the container edge */
    border-radius: 14px;
    inset: 0 .1rem auto .1rem;
  }
}

/* ============================
   Legal / technical content spacing
   (Consultation Terms, etc.)
   ============================ */

/* Give the content block a bit more room under the H1 band */
body.aif-technical .aif-legal-section{
  margin-top: 1rem;           /* space under the header decoration */
}

/* Paragraph rhythm inside legal sections */
body.aif-technical .aif-legal-section > p{
  margin-block: .45rem .75rem;
  max-width: 62rem;           /* keep line-length comfortable if needed */
}

/* Slightly tighten the gap between "Last updated" and the next paragraph */
body.aif-technical .aif-legal-section > p:first-of-type{
  margin-bottom: .4rem;
}

/* Section headings: consistent, not too heavy */
body.aif-technical .aif-legal-section h2{
  margin-top: 1.7rem;         /* space above each H2 */
  margin-bottom: .35rem;      /* space before lists/paragraphs */
}

/* Lists under each heading: small breathing room and tidy indent */
body.aif-technical .aif-legal-section :is(ul, ol){
  margin-top: .25rem;
  margin-bottom: 1rem;
  padding-left: 1.25rem;      /* align bullets/numbers nicely */
}

/* Optional: last paragraph at the bottom, a little extra space from footer */
body.aif-technical .aif-legal-section > p:last-of-type{
  margin-bottom: 1.4rem;
}

#cmplz-document {
  border: none;
  padding: 0;
}

.cookie-statement-wrapper #cmplz-document {
  margin-top: .9rem;
}

/* =========================
   Complianz – Cookie overview dropdowns (Section 6)
   Fix broken summary marker + add unicode chevron
   ========================= */

body.aif-technical #cmplz-cookies-overview details.cmplz-dropdown{
  border: 1px solid rgba(47,58,74,.12);
  border-radius: 12px;
  background: #EEF1F6;
  margin: 0 0 .75rem;
  overflow: hidden;
}

/* Make the summary a proper row: name left, purpose right, chevron at end */
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
}

/* Kill the native disclosure marker that’s currently falling onto a new line */
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header::marker{ content: ""; }
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header::-webkit-details-marker{
  display: none;
}

/* Right-side label ("Functional", "Statistics", etc.) */
body.aif-technical #cmplz-cookies-overview p.cmplz-service-purposes{
  margin: 0;
  white-space: nowrap;
  color: #5B6573;
  font-weight: 600;
  font-size: .95rem;
}

/* Our unicode chevron */
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header::after{
  content: "\25BE";
  flex: 0 0 auto;
  margin-left: .25rem;
  color: #2F3A4A;
  font-size: 1.05rem;
  line-height: 1;
}

/* Swap chevron when expanded */
body.aif-technical #cmplz-cookies-overview details[open] > summary.cmplz-service-header::after{
  content: "\25B4";
}

/* Optional: content area spacing when opened */
body.aif-technical #cmplz-cookies-overview details[open]{
  background: #FAFAFC;
}
body.aif-technical #cmplz-cookies-overview details[open] > :not(summary){
  padding: .2rem 1.1rem 1rem;
}

body.aif-technical #cmplz-document .cmplz-always-active,
body.aif-technical #cmplz-document .cmplz-purpose-toggle{
  display: none;
}

/* FINAL kill-switch for Complianz arrows in cookie policy */
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header > *:has(svg),
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header .cmplz-chevron,
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header .cmplz-icon,
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header button{
  display: none !important;
}

/* Hide Complianz’ built-in chevron so only our unicode chevron shows */
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header .cmplz-chevron,
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header .cmplz-icon,
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header svg,
body.aif-technical #cmplz-cookies-overview summary.cmplz-service-header [class*="chevron"]{
  display: none !important;
  visibility: hidden !important;
}
