
/* Gold text links; black lettering on filled gold buttons and title boxes. */
a[href], a[href] :is(span,strong,em,b,font,h1,h2,h3,h4,h5,h6) { color: #FFCC00 !important; }
a[href]:is(.theme-link-solid,.cta-button,.btn-yellow,.box-link),
a[href]:is(.theme-link-solid,.cta-button,.btn-yellow,.box-link) :is(span,strong,em,b,h1,h2,h3,h4,h5,h6),
a[href][style*="background-color: #FFCC00" i], a[href][style*="background: #FFCC00" i],
a[href] [style*="background-color: #FFCC00" i], a[href] [style*="background: #FFCC00" i] { color: #000000 !important; }

/* Compact boxes for standalone links; links in sentences remain plain. */
a.standalone-link[href] {
 display: inline-block !important; width: fit-content !important; max-width: 100% !important;
 box-sizing: border-box; align-self: center; justify-self: center; flex: 0 1 auto !important;
 min-height: 0 !important; padding: 6px 12px !important; border: 1px solid #FFCC00 !important;
 border-radius: 5px; text-align: center; line-height: 1.4 !important; vertical-align: middle;
}
a.standalone-link[href]:is(.theme-link-solid,.theme-link-hollow,.box-link,.heading-panel-link) {
 padding: 0 !important; border: 0 !important;
}
a.standalone-link[href].heading-panel-link { color: #000000 !important; }

/* Consistent slim H1 panels, without changing heading links or anchors. */
h1[style*="background-color: #FFCC00" i],
h1 [style*="background-color: #FFCC00" i] {
  padding: 2px 12px !important;
  line-height: 1.15 !important;
}
h1 a.standalone-link[href] {
  padding: 2px 12px !important;
  line-height: 1.15 !important;
}
h1 a.standalone-link[href].heading-panel-link {
  padding: 0 !important;
  border: 0 !important;
}
/* Consistent space above page titles, including their flanking lines. */
.site-h1-spacing { margin-top: 24px !important; }
.site-h1-leading { margin-top: 0 !important; padding-top: 0 !important; }
.site-empty-heading-header { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }

/* Gentle text-link movement: half the original 5% enlargement. */
a[href]:not(:has(img)),
a[href]:has(img) :is(h1,h2,h3,h4,h5,h6):not(:has(img)) {
  transition: transform 0.3s ease-in-out;
  transform-origin: center;
}
a[href]:not(:has(img)):is(:hover,:focus-visible),
a[href]:has(img) :is(h1,h2,h3,h4,h5,h6):not(:has(img)):hover,
a[href]:has(img):focus-visible :is(h1,h2,h3,h4,h5,h6):not(:has(img)) {
  transform: scale(1.025) !important;
}
/* A shared image-and-title link moves only its text, never its photograph. */
a[href]:has(img), a[href] img {
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  a[href]:not(:has(img)):is(:hover,:focus-visible),
  a[href]:has(img) :is(h1,h2,h3,h4,h5,h6):not(:has(img)):hover,
  a[href]:has(img):focus-visible :is(h1,h2,h3,h4,h5,h6):not(:has(img)) {
    transform: none !important;
  }
}

/* Subtle gold glow accompanies the gentle text-link hover movement. */
a[href]:not(:has(img)),
a[href]:has(img) :is(h1,h2,h3,h4,h5,h6):not(:has(img)) {
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
}
a[href]:not(:has(img)):is(:hover,:focus-visible),
a[href]:has(img) :is(h1,h2,h3,h4,h5,h6):not(:has(img)):hover,
a[href]:has(img):focus-visible :is(h1,h2,h3,h4,h5,h6):not(:has(img)) {
  text-shadow: 0 0 6px rgba(255,204,0,0.85), 0 0 12px rgba(255,204,0,0.45) !important;
  filter: drop-shadow(0 0 6px rgba(255,204,0,0.85)) drop-shadow(0 0 10px rgba(255,204,0,0.35)) !important;
}
a[href]:has(img), a[href] img {
  filter: none !important;
}

/* Let filled H1 panels glow outside the gold background, not behind it. */
h1[style*="background-color: #FFCC00" i] {
  transition: box-shadow 0.3s ease-in-out;
}
h1[style*="background-color: #FFCC00" i]:has(a:is(:hover,:focus-visible)) {
  box-shadow: 0 0 6px rgba(255,204,0,0.85), 0 0 14px rgba(255,204,0,0.5);
}

/* A gold title panel is already a box: remove the second outline around it. */
a.standalone-link[href]:has([style*="background-color: #FFCC00" i]),
a.standalone-link[href]:has([style*="background: #FFCC00" i]),
a.standalone-link[href]:has(.yellow-box),
:is(h1,h2,h3,h4,h5,h6)[style*="background-color: #FFCC00" i] > a.standalone-link[href],
:is(h1,h2,h3,h4,h5,h6)[style*="background: #FFCC00" i] > a.standalone-link[href] {
  border: 0 !important;
  padding: 0 !important;
}

/* Keep the authored black-and-gold palette instead of automatic dark recolouring. */
:root { color-scheme: only light; }
[style*="background: #FFCC00" i],
[style*="background:#FFCC00" i],
[style*="background-color:#FFCC00" i] {
  background-image: linear-gradient(#FFCC00, #FFCC00);
}
