/* Site overrides for dotscastle.in. Loaded after the template's own stylesheet,
   so it is the place for anything specific to this site or to a third party
   extension rather than to DC Theme itself. */

/* The consent plugin floats its trigger at z-index 999999, far above the panel
   the template opens at 1045, so the cookie button sat on top of an open menu
   and covered the links near the bottom of it. The dialog the trigger opens is
   deliberately left alone, because a consent dialog does belong above
   everything. Only the resting button steps aside, and only while a panel or a
   modal is actually open. Hidden rather than transparent so it leaves the tab
   order too: a control nobody can see should not still take focus. */
html:has(.offcanvas.show, .modal.show) .cc-trigger {
  visibility: hidden;
}

/* The plugin draws its privacy policy link at 96x18, under the 24px minimum in
   WCAG 2.2 SC 2.5.8. It sits on its own rather than inside a sentence, so the
   exception for inline links does not cover it. Padding lifts the target to 24px
   without moving the text or changing the plugin's own files. */
#cc--main .cc-link {
  display: inline-block;
  padding-block: 3px;
}

/* The accent stays the orange from the logo, at full brightness. What it needs
   is an edge, not a duller fill: the fill alone measures 2.03:1 on the tinted
   section and 2.27:1 on white, under the 3:1 WCAG 1.4.11 wants between a control
   and its background. Darkening the fill fixes those two and breaks the third,
   dropping the brand blue band from 4.07:1 to 2.75:1, which is why it looked
   muddy there. A darker border of the same hue reads as 4.54:1 on white and
   4.07:1 on the tint, while on the blue band the bright fill is already doing
   the job at 4.07:1. Every background covered, and the button still looks like
   the logo. */
.btn-accent {
  --bs-btn-border-color: #A86722;
  --bs-btn-hover-border-color: #A86722;
  --bs-btn-active-border-color: #A86722;
  --bs-btn-disabled-border-color: #A86722;
}

/* The sector strip on the home page is sixteen links dressed as tiles. The anchor
   carries colour:inherit inline so the row does not read as a wall of blue; this
   gives back the affordance that removed, on hover and on keyboard focus. Site
   CSS rather than the template's, because the tiles are content here and the
   template's budget has about 3KB left. */
.dc-section__body a:has(> p):hover p,
.dc-section__body a:has(> p):focus-visible p {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dc-section__body a:has(> p):focus-visible {
  outline: 2px solid var(--dc-accent-text);
  outline-offset: 4px;
  border-radius: var(--dc-radius);
}

