/* Holding Differently CSS runtime v860: direct current DB section slate */
/* Render mode: no catalogue filtering, no owner-scope filtering, no CSS history dependency. */
/* Section count: 37 */

/* === Site colour system [site_colours] === */
/* HD RMS site_colours v999 clean
Owner: site_colours
Canonical design-token owner only. Defines colour, action, status, focus,
menu, footer, quick-jump, hub-card and timeline colour-role tokens.
No component selectors, layout rules, card rules, form rules, table rules,
font rules or tool-specific styling live here. */
:root,
.theme-default {

  /* Core palette */
  --colour-page-bg: #CADABA;
  --colour-surface: #FFFFF4;
  --colour-surface-strong: #FFFFFF;
  --colour-surface-soft: #ECF2DE;
  --colour-surface-banner: #D9E6C2;
  --colour-heading: #244A25;
  --colour-text: #162B17;
  --colour-muted: #526150;
  --colour-primary: #2F6B38;
  --colour-primary-hover: #24522B;
  --colour-strong-surface: #153E28;
  --colour-on-primary: #FFFFFF;
  --colour-border: #C2D0B0;
  --colour-border-soft: #E1EAD5;
  --colour-accent: #B78626;
  --colour-accent-strong: #684900;
  --colour-shadow: #C2D0B0;

  /* Links and focus */
  --colour-link: #684900;
  --colour-link-hover: #2F6B38;
  --colour-focus-ring: #1d4ed8;
  --hd-focus-ring: var(--colour-focus-ring);
  --hd-focus-ring-soft: color-mix(in srgb, var(--hd-focus-ring) 24%, transparent);

  /* Status roles */
  --colour-success: #0B7A3B;
  --colour-warning: #8A6400;
  --colour-danger: #A43D3D;
  --colour-disabled-bg: #334155;
  --colour-disabled-text: #F8FAFC;
  --colour-success-bg: #ECFDF5;
  --colour-success-text: #064E3B;
  --colour-warning-bg: #FFF7ED;
  --colour-warning-text: #7C2D12;
  --colour-error-bg: #FEF2F2;
  --colour-error-text: #7F1D1D;
  --colour-info-bg: #EFF6FF;
  --colour-info-text: #1E3A8A;
  --hd-success-surface: var(--colour-success-bg);
  --hd-success-text: var(--colour-success-text);
  --hd-warning-surface: var(--colour-warning-bg);
  --hd-warning-text: var(--colour-warning-text);
  --hd-error-surface: var(--colour-error-bg);
  --hd-error-text: var(--colour-error-text);
  --hd-info-surface: var(--colour-info-bg);
  --hd-info-text: var(--colour-info-text);

  /* Panels and fields */
  --colour-panel-tint: #ECF2DE;
  --colour-field-bg: #FFFFF4;
  --colour-field-border: #C2D0B0;
  --colour-field-focus: #2F6B38;
  --colour-checkbox-bg: #FFFFF4;
  --colour-checkbox-border: #2F6B38;

  /* Menu roles */
  --colour-menu-bg: #FFFFF4;
  --colour-menu-panel-bg: #ECF2DE;
  --colour-menu-heading-bg: #ECF2DE;
  --colour-menu-heading-text: #244A25;
  --colour-menu-border: #E1EAD5;
  --colour-menu-hover-bg: #ECF2DE;
  --colour-menu-hover-text: #244A25;
  --colour-menu-active-bg: #244A25;
  --colour-menu-active-text: #FFFFFF;

  /* Hero/banner colour roles */
  --colour-hero-surface-bg: #D9E6C2;
  --colour-hero-surface-border: #E1EAD5;

  /* Action roles */
  --colour-action-bg: #2F6B38;
  --colour-action-text: #FFFFFF;
  --colour-action-hover-bg: #24522B;
  --colour-action-hover-text: #FFFFFF;
  --colour-toolbar-action-bg: #153E28;
  --colour-toolbar-action-text: #FFFFFF;
  --colour-toolbar-action-hover-bg: #24522B;
  --colour-toolbar-action-hover-text: #FFFFFF;

  /* Footer roles */
  --colour-footer-bg: #20452C;
  --colour-footer-text: #FFFFFF;
  --colour-footer-muted: #DDE8EA;
  --colour-footer-accent: #F7C85F;
  --colour-footer-border: #6F8E95;
  --colour-footer-panel-bg: #173420;
  --colour-footer-button-border: #8CA9B0;
  --colour-footer-link: #FFFFFF;
  --colour-footer-link-hover: #FFFFFF;
  --colour-footer-action-bg: #2F6B38;
  --colour-footer-action-text: #FFFFFF;
  --colour-footer-action-hover-bg: #24522B;
  --colour-footer-action-hover-text: #FFFFFF;

  /* Quick Jump roles */
  --colour-quickjump-panel-bg: #FFFFF4;
  --colour-quickjump-card-bg: #FFFFF4;
  --colour-quickjump-text: #162B17;
  --colour-quickjump-panel-text: #162B17;
  --colour-quickjump-accent: #684900;
  --colour-quickjump-icon-bg: #ECF2DE;
  --colour-quickjump-icon-text: #684900;
  --colour-quickjump-border: #E1EAD5;
  --colour-quickjump-hover-bg: #ECF2DE;
  --colour-quickjump-hover-text: #162B17;

  /* Hub-card roles */
  --colour-hub-card-bg: #FFFFF4;
  --colour-hub-card-hover-bg: #ECF2DE;
  --colour-hub-card-text: #162B17;
  --colour-hub-card-hover-text: #162B17;
  --colour-hub-card-title: var(--colour-heading);
  --colour-hub-card-muted: var(--colour-muted);
  --colour-hub-card-border: #E1EAD5;
  --colour-hub-card-icon-bg: #ECF2DE;
  --colour-hub-card-icon-text: #244A25;
  --colour-hub-card-button-bg: #2F6B38;
  --colour-hub-card-button-text: #FFFFFF;
  --colour-hub-card-button-hover-bg: #24522B;
  --colour-hub-card-button-hover-text: #FFFFFF;

  /* Timeline colour roles */
  --colour-timeline-phase-1: #B78626;
  --colour-timeline-phase-1-text: #06141B;
  --colour-timeline-phase-2: #2F6B38;
  --colour-timeline-phase-2-text: #FFFFFF;
  --colour-timeline-phase-3: #684900;
  --colour-timeline-phase-3-text: #FFFFFF;
  --colour-timeline-phase-4: #24522B;
  --colour-timeline-phase-4-text: #FFFFFF;
  --colour-timeline-phase-5: #153E28;
  --colour-timeline-phase-5-text: #FFFFFF;
  --colour-timeline-phase-6: #684900;
  --colour-timeline-phase-6-text: #FFFFFF;
  --colour-timeline-soft-bg: #ECF2DE;
  --colour-timeline-soft-text: #162B17;
  --colour-timeline-card-bg: #FFFFF4;
  --colour-timeline-card-border: #E1EAD5;
  --colour-timeline-button-bg: #153E28;
  --colour-timeline-button-text: #FFFFFF;
  --colour-timeline-button-hover-bg: #24522B;
  --colour-timeline-button-hover-text: #FFFFFF;
  --colour-timeline-board-bg: var(--colour-surface);
  --colour-timeline-board-panel: var(--colour-surface-soft);
  --colour-timeline-board-text: var(--colour-text);

  /* Legacy hd-colour aliases kept as read-only compatibility aliases */
  --hd-colour-page-bg: #CADABA;
  --hd-colour-surface: #FFFFF4;
  --hd-colour-surface-soft: #ECF2DE;
  --hd-colour-surface-muted: var(--colour-surface-soft);
  --hd-colour-surface-banner: #D9E6C2;
  --hd-colour-surface-strong: #FFFFFF;
  --hd-colour-primary: #2F6B38;
  --hd-colour-primary-strong: #24522B;
  --hd-colour-on-primary: #FFFFFF;
  --hd-colour-accent: #B78626;
  --hd-colour-accent-strong: #684900;
  --hd-colour-heading: #244A25;
  --hd-colour-text: #162B17;
  --hd-colour-muted: #526150;
  --hd-colour-border: #C2D0B0;
  --hd-colour-border-soft: #E1EAD5;
}

/* === Site shell, typography and media sizing [site_shell] === */
/* HD RMS v998 owner contract: site_shell
Owner: Site shell, typography and media sizing.
Owns the html/body frame, outer site shell, shared page rail, focus treatment,
global media sizing, skip link, reveal utility, embedded-layout utility and small
site-wide helper utilities.
Does not own header branding, navigation, hero/CTA, footer, main-content heading
rhythm, public form cards, admin tool cards, generic buttons, generic fields or
component-specific layout. */
:root {
  --site-wrapper-max: 1100px;
  --site-shell-top-gap: 14px;
  --site-shell-bottom-gap: 24px;
  --site-shell-radius: 24px;
  --site-shell-page-gutter: clamp(18px, 4vw, 48px);
  --site-shell-width: min(var(--site-wrapper-max), calc(100vw - (var(--site-shell-page-gutter) * 2)));
  --site-font-family: Lato, Arial, Helvetica, sans-serif;
  --site-font-size: 17px;
  --site-line-height: 1.55;
  --site-focus-colour: var(--colour-accent, #c48d2f);
  --site-scrollbar-thumb: var(--colour-heading, #12364a);
  --site-scrollbar-track: var(--colour-surface-soft, #f7f0df);
  --site-scrollbar-width: 12px;
  --page-bg: var(--colour-page-bg, #f7f4ed);
  --paper: var(--colour-surface, #fffdf8);
  --heading: var(--colour-heading, #12364a);
  --text: var(--colour-text, #102630);
}

html {
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--site-font-family);
  font-size: var(--site-font-size);
  line-height: var(--site-line-height);
  scroll-behavior: smooth;
  scrollbar-color: var(--site-scrollbar-thumb) var(--site-scrollbar-track);
  scrollbar-width: auto;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--site-font-family);
  overflow-x: hidden;
}

#hd-site-shell,
.hd-site-shell,
.site-shell {
  width: var(--site-shell-width);
  max-width: var(--site-shell-width);
  margin: var(--site-shell-top-gap) auto var(--site-shell-bottom-gap);
  background: var(--paper);
  border-radius: var(--site-shell-radius);
  box-sizing: border-box;
  overflow: visible;
}

#hd-site-header,
#hd-site-main,
#hd-site-footer {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

#hd-site-header {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

#hd-site-main {
  margin-top: 0;
  border-top: 0;
}

#hd-site-header + #hd-site-main,
#hd-site-main + #hd-site-footer {
  margin-top: 0;
}

#hd-header-shell,
#nav-container,
#hd-site-main.hd-main-content-shell,
#hd-site-footer,
.hd-footer-container {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

a {
  color: var(--heading);
  text-underline-offset: 3px;
}

.hd-link {
  color: var(--colour-link, #0f5c75);
  font-weight: 800;
  text-underline-offset: .18em;
}

.hd-link:hover,
.hd-link:focus-visible {
  text-decoration-thickness: .16em;
}

.hd-link--plain {
  color: inherit;
  text-decoration: none;
}

.hd-link--plain:hover,
.hd-link--plain:focus-visible {
  text-decoration: underline;
  text-underline-offset: .18em;
}

:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

:focus-visible {
  outline: 2px solid var(--site-focus-colour);
  outline-offset: 3px;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  box-sizing: border-box;
}

#hd-site-shell img,
#hd-main img,
#hd-site-main img,
.hd-main-inner img {
  max-width: 100%;
  height: auto;
}

::-webkit-scrollbar {
  width: var(--site-scrollbar-width);
  height: var(--site-scrollbar-width);
}

::-webkit-scrollbar-track {
  background: var(--site-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--site-scrollbar-thumb);
  border: 3px solid var(--site-scrollbar-track);
  border-radius: 999px;
}

.hd-skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: var(--paper);
  color: var(--heading);
  z-index: 21000;
}

.hd-skip-link:focus,
.hd-skip-link:focus-visible {
  position: fixed;
  top: 12px;
  left: 50%;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 2px solid var(--site-focus-colour);
  border-radius: 10px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--colour-shadow, #102630) 18%, transparent);
  transform: translateX(-50%);
}

.hd-main-content-shell--shared,
.hd-main-content-wrapper--shared,
.hd-main-content-inner--shared,
.hd-shell,
.hd-public-shell,
.hd-admin-shell {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.hd-main-content-inner--shared > :first-child {
  margin-top: 0;
}

.hd-main-content-inner--shared > :last-child {
  margin-bottom: 0;
}

.hd-page-title,
.hd-content-title,
.hd-page-heading {
  overflow-wrap: anywhere;
}

.hd-hero,
.hd-hero-card,
.hd-page-heading-card {
  min-width: 0;
}

/* Content image figure/card styling belongs to Public page content blocks. Site shell keeps only global media sizing. */
.hd-m0 {
  margin: 0 !important;
}

.hd-mt-0 {
  margin-top: 0 !important;
}

.hd-mt-4 {
  margin-top: 4px !important;
}

.hd-mt-6 {
  margin-top: 6px !important;
}

.hd-mt-8 {
  margin-top: 8px !important;
}

.hd-mt-10 {
  margin-top: 10px !important;
}

.hd-mt-12 {
  margin-top: 12px !important;
}

.hd-mt-14 {
  margin-top: 14px !important;
}

.hd-mt-16 {
  margin-top: 16px !important;
}

.hd-mt-18 {
  margin-top: 18px !important;
}

.hd-mb-0 {
  margin-bottom: 0 !important;
}

.hd-mb-6 {
  margin-bottom: 6px !important;
}

.hd-mb-8 {
  margin-bottom: 8px !important;
}

.hd-mb-10 {
  margin-bottom: 10px !important;
}

.hd-mb-12 {
  margin-bottom: 12px !important;
}

.hd-mb-14 {
  margin-bottom: 14px !important;
}

.hd-mb-16 {
  margin-bottom: 16px !important;
}

.hd-my-10 {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

.hd-pl-18 {
  padding-left: 18px !important;
}

.hd-inlineblock {
  display: inline-block !important;
}

.hd-hidden,
[hidden] {
  display: none !important;
}

.hd-flex {
  display: flex;
}

.hd-flex--wrap {
  flex-wrap: wrap;
}

.hd-flex--align-center {
  align-items: center;
}

.hd-flex--gap-10 {
  gap: 10px;
}

.hd-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hd-anchor,
.anchor-target {
  scroll-margin-top: 160px;
}

.hd-hr {
  border: 0;
  border-top: 1px solid var(--colour-border, #d8c9a8);
  margin: 18px 0;
}

.hd-main-inner--wide {
  max-width: min(1180px, calc(100vw - 32px));
}

.hd-main-inner--narrow {
  max-width: min(860px, calc(100vw - 32px));
}

.hd-message-region {
  position: relative;
  z-index: 5;
}

.hd-layout-embedded #hd-site-header,
.hd-layout-embedded #hd-site-footer {
  display: none !important;
}

.fade-in {
  opacity: 1;
  transform: none;
}

body.hd-reveal-ready .fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: var(--hd-reveal-delay, 0ms);
}

body.hd-reveal-ready .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  body.hd-reveal-ready .fade-in,
  body.hd-reveal-ready .fade-in.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
HD RMS v1071 mobile shell rail refinement
Owner: site_shell.
Purpose: keep the outer shell full width on phones while providing a reusable
inner rail token for header, navigation, main-content and footer owners.
========================================================= */
@media (max-width: 900px) {
  :root {
    --site-wrapper-max: 720px;
    --site-shell-page-gutter: clamp(10px, 3vw, 18px);
    --site-shell-top-gap: 10px;
    --site-shell-bottom-gap: 18px;
    --site-shell-radius: 20px;
    --hd-mobile-shell-gutter: clamp(12px, 4vw, 18px);
    --hd-mobile-inner-width: min(calc(100% - (var(--hd-mobile-shell-gutter) * 2)), 720px);
    --hd-mobile-component-rail: var(--hd-mobile-inner-width);
  }
}

@media (max-width: 760px) {
  :root {
    --site-shell-page-gutter: 0px;
    --site-shell-top-gap: 0px;
    --site-shell-bottom-gap: 0px;
    --site-shell-radius: 0px;
    --hd-mobile-shell-gutter: clamp(12px, 4.5vw, 18px);
    --hd-mobile-inner-width: min(calc(100% - (var(--hd-mobile-shell-gutter) * 2)), 720px);
    --hd-mobile-component-rail: var(--hd-mobile-inner-width);
  }

  #hd-site-shell,
  .hd-site-shell,
  .site-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
  }

  #hd-site-header,
  #hd-site-main,
  #hd-site-footer {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* === Header banner shell and branding [header_banner] === */
/* =========================================================
HD RMS header_banner v1000 clean owner section
Owns:
- header panel and header shell
- branding row: logo, title and subtitle
- header search/accessibility icon placement
- search/accessibility dropdown presentation
Does not own:
- CTA / hero banner
- primary navigation
- admin account strip
- main content, footer or generic buttons
========================================================= */

/* =========================================================
Header tokens
========================================================= */
:root {
  --hd-css-runtime-ready: 1;

  /* Header shell */
  --header-shell-radius: 34px;
  --header-shell-padding-top: clamp(22px, 3vw, 34px);
  --header-shell-padding-right: clamp(22px, 3.2vw, 38px);
  --header-shell-padding-bottom: clamp(14px, 2vw, 24px);
  --header-shell-padding-left: clamp(22px, 3.2vw, 38px);
  --header-shell-bg: var(--colour-surface, #fffdf8);

  /* Branding layout */
  --header-brand-grid-gap: clamp(22px, 3.2vw, 44px);
  --header-side-col-width: clamp(132px, 14vw, 190px);
  --header-title-col-width: minmax(0, 660px);

  /* Logo */
  --header-logo-width: clamp(132px, 12vw, 156px);
  --header-logo-x: 0px;
  --header-logo-y: 0px;

  /* Title */
  --header-title-max-width: 680px;
  --header-title-size: clamp(2.1rem, 3vw, 2.65rem);
  --header-title-line-height: 1.08;
  --header-title-letter-spacing: .105em;
  --header-title-weight: 700;
  --header-title-x: 0px;
  --header-title-y: 0px;

  /* Subtitle */
  --header-subtitle-max-width: 720px;
  --header-subtitle-size: clamp(1.08rem, 1.8vw, 1.35rem);
  --header-subtitle-line-height: 1.24;
  --header-subtitle-letter-spacing: .045em;
  --header-subtitle-weight: 800;
  --header-subtitle-gap: clamp(14px, 2vw, 22px);
  --header-subtitle-x: 0px;
  --header-subtitle-y: 0px;

  /* Icon row */
  --header-icons-x: 0px;
  --header-icons-y: 0px;
  --header-icon-gap: clamp(8px, 1vw, 14px);
  --header-icon-button-size: clamp(38px, 3.8vw, 48px);
  --header-icon-svg-size: clamp(20px, 2vw, 25px);
  --header-icon-radius: 14px;
  --header-icon-bg: var(--colour-surface, #fffdf8);
  --header-icon-colour: var(--colour-heading, #003c56);
  --header-icon-border: color-mix(in srgb, var(--colour-heading, #003c56) 18%, transparent);
  --header-icon-shadow: 0 12px 26px rgba(0, 60, 86, .12);
  --header-icon-hover-bg: color-mix(in srgb, var(--colour-primary, #00728a) 10%, var(--colour-surface, #fffdf8));
  --header-icon-hover-colour: var(--colour-heading, #003c56);
  --header-icon-hover-border: color-mix(in srgb, var(--colour-primary, #00728a) 38%, transparent);
  --header-icon-hover-shadow: 0 16px 32px rgba(0, 60, 86, .18);
  --header-icon-active-bg: var(--colour-primary, #00728a);
  --header-icon-active-colour: var(--colour-on-primary, #fff);
  --header-icon-active-border: var(--colour-primary, #00728a);
  --header-icon-active-shadow: 0 16px 32px rgba(0, 60, 86, .22);

  /* Header dropdowns */
  --header-dropdown-width: 268px;
  --header-dropdown-max-height: min(72vh, 560px);
  --header-dropdown-radius: 18px;
  --header-dropdown-padding: clamp(14px, 2.2vw, 20px);
  --header-dropdown-bg: var(--colour-menu-bg, var(--colour-surface, #fffdf8));
  --header-dropdown-text: var(--colour-text, #102630);
  --header-dropdown-border: var(--colour-menu-border, var(--colour-border-soft, #dfe6dc));
  --header-dropdown-shadow: 0 22px 48px rgba(0, 38, 54, .24);
  --header-dropdown-heading-bg: var(--colour-menu-heading-bg, var(--colour-menu-panel-bg, var(--colour-surface-soft, #f3f1e8)));
  --header-dropdown-heading-text: var(--colour-menu-heading-text, var(--colour-heading, #003c56));
  --header-dropdown-hover-bg: var(--colour-menu-hover-bg, var(--colour-surface-soft, #f3f1e8));
  --header-dropdown-hover-text: var(--colour-menu-hover-text, var(--colour-heading, #003c56));
}

/* =========================================================
Header panel and shell
========================================================= */
#hd-css-runtime-probe {
  display: none !important;
}

#hd-site-header,
#hd-header-panel,
#hd-header-panel.hd-site-header-panel,
#hd-header-panel.hd-shell-panel,
.hd-site-header-panel,
.hd-header-panel {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  background: transparent !important;
}

#hd-header-shell,
#hd-header-shell.hd-site-header-shell,
#hd-header-shell.hd-shell,
.hd-site-header-shell {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding:
  var(--header-shell-padding-top)
  var(--header-shell-padding-right)
  var(--header-shell-padding-bottom)
  var(--header-shell-padding-left) !important;
  position: relative !important;
  overflow: visible !important;
  background: var(--header-shell-bg) !important;
  border-radius: var(--header-shell-radius) var(--header-shell-radius) 0 0 !important;
  box-shadow: none !important;
}

/* =========================================================
Brand grid
========================================================= */
#hd-header-shell .brand-strip,
#hd-header-shell .brand-strip.hd-header-grid,
#hd-header-shell .hd-header-grid,
#hd-header-shell .hd-branding-shell,
#hd-header-shell .hd-header-branding,
#hd-header-shell [data-hd-shell-role="brand-inner"],
#hd-site-header .brand-strip,
#hd-site-header .brand-strip.hd-header-grid,
#hd-site-header .hd-header-grid,
#hd-site-header .hd-branding-shell,
#hd-site-header .hd-header-branding {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns:
  minmax(120px, var(--header-side-col-width))
  var(--header-title-col-width)
  minmax(120px, var(--header-side-col-width)) !important;
  column-gap: var(--header-brand-grid-gap) !important;
  row-gap: 0 !important;
  align-items: start !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  overflow: visible !important;
}

/* =========================================================
Logo
========================================================= */
#hd-header-shell .hd-header-grid__logo,
#hd-header-shell .brand-logo-link {
  grid-column: 1 !important;
  justify-self: center !important;
  align-self: start !important;
  width: var(--header-logo-width) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  transform: translate(var(--header-logo-x), var(--header-logo-y)) !important;
  z-index: 2 !important;
}

#hd-header-shell .brand-logo-wrap {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#hd-header-shell .brand-logo,
#hd-header-shell .hd-brand-logo,
#hd-header-shell .site-logo {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

#hd-header-shell .brand-logo-fallback,
#hd-header-shell .hd-media-css-fallback {
  display: none !important;
}

/* =========================================================
Title and subtitle
========================================================= */
#hd-header-shell .brand-main,
#hd-header-shell .brand-main.hd-header-grid__title,
#hd-header-shell .brand-text,
#hd-header-shell .brand-top-row,
#hd-header-shell .hd-header-grid__title {
  grid-column: 2 !important;
  justify-self: center !important;
  align-self: start !important;
  width: min(100%, var(--header-title-max-width)) !important;
  max-width: var(--header-title-max-width) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  transform: translate(var(--header-title-x), var(--header-title-y)) !important;
  z-index: 1 !important;
}

#hd-header-shell .brand-title,
#hd-header-shell .hd-brand-title,
#hd-header-shell .site-title {
  display: block !important;
  width: 100% !important;
  max-width: var(--header-title-max-width) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  color: var(--colour-heading, #003c56) !important;
  font-size: var(--header-title-size) !important;
  line-height: var(--header-title-line-height) !important;
  font-weight: var(--header-title-weight) !important;
  letter-spacing: var(--header-title-letter-spacing) !important;
  text-align: center !important;
  text-wrap: balance !important;
}

#hd-header-shell .brand-title-line {
  display: block !important;
  white-space: nowrap !important;
}

#hd-header-shell .brand-subtitle,
#hd-header-shell .hd-brand-subtitle,
#hd-header-shell .site-subtitle {
  display: block !important;
  width: min(100%, var(--header-subtitle-max-width)) !important;
  max-width: var(--header-subtitle-max-width) !important;
  margin: var(--header-subtitle-gap) auto 0 !important;
  padding: 0 !important;
  color: var(--colour-accent-strong, var(--colour-accent, #755000)) !important;
  font-size: var(--header-subtitle-size) !important;
  line-height: var(--header-subtitle-line-height) !important;
  font-weight: var(--header-subtitle-weight) !important;
  letter-spacing: var(--header-subtitle-letter-spacing) !important;
  text-align: center !important;
  text-wrap: balance !important;
  transform: translate(var(--header-subtitle-x), var(--header-subtitle-y)) !important;
}

#hd-header-shell .brand-subtitle-nowrap {
  white-space: normal !important;
}

/* =========================================================
Header icon row
========================================================= */
#hd-header-shell .brand-controls-inline,
#hd-header-shell .brand-controls-inline.hd-header-grid__actions,
#hd-header-shell .brand-actions,
#hd-header-shell .header-actions,
#hd-header-shell .hd-header-actions,
#hd-header-shell .hd-header-icon-row,
#hd-header-shell [data-hd-shell-role="header-actions"],
#hd-site-header .brand-controls-inline,
#hd-site-header .brand-controls-inline.hd-header-grid__actions,
#hd-site-header .brand-actions,
#hd-site-header .header-actions,
#hd-site-header .hd-header-actions,
#hd-site-header .hd-header-icon-row,
#hd-site-header [data-hd-shell-role="header-actions"] {
  grid-column: 3 !important;
  justify-self: end !important;
  align-self: start !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: var(--header-icon-gap) !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  overflow: visible !important;
  transform: translate(var(--header-icons-x), var(--header-icons-y)) !important;
  z-index: 300 !important;
}

#hd-header-shell .hd-header-icon-wrap,
#hd-header-shell details.hd-header-icon-wrap,
#hd-header-shell details.nav-dropdown--search,
#hd-header-shell details.nav-dropdown--accessibility,
#hd-site-header .hd-header-icon-wrap,
#hd-site-header details.hd-header-icon-wrap,
#hd-site-header details.nav-dropdown--search,
#hd-site-header details.nav-dropdown--accessibility {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  width: var(--header-icon-button-size) !important;
  height: var(--header-icon-button-size) !important;
  min-width: var(--header-icon-button-size) !important;
  min-height: var(--header-icon-button-size) !important;
  max-width: var(--header-icon-button-size) !important;
  max-height: var(--header-icon-button-size) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  line-height: 1 !important;
}

#hd-header-shell summary.brand-icon,
#hd-header-shell .brand-icon,
#hd-header-shell .hd-header-icon-control,
#hd-header-shell .nav-btn-dropdown,
#hd-site-header summary.brand-icon,
#hd-site-header .brand-icon,
#hd-site-header .hd-header-icon-control,
#hd-site-header .nav-btn-dropdown {
  appearance: none !important;
  -webkit-appearance: none !important;
  list-style: none !important;
  box-sizing: border-box !important;
  display: inline-grid !important;
  place-items: center !important;
  width: var(--header-icon-button-size) !important;
  height: var(--header-icon-button-size) !important;
  min-width: var(--header-icon-button-size) !important;
  min-height: var(--header-icon-button-size) !important;
  max-width: var(--header-icon-button-size) !important;
  max-height: var(--header-icon-button-size) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--header-icon-border) !important;
  border-radius: var(--header-icon-radius) !important;
  background: var(--header-icon-bg) !important;
  color: var(--header-icon-colour) !important;
  box-shadow: var(--header-icon-shadow) !important;
  text-decoration: none !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transform: none !important;
  transition:
  background .16s ease,
  color .16s ease,
  border-color .16s ease,
  box-shadow .16s ease,
  transform .16s ease !important;
}

#hd-header-shell summary.brand-icon::-webkit-details-marker,
#hd-header-shell summary.brand-icon::marker,
#hd-site-header summary.brand-icon::-webkit-details-marker,
#hd-site-header summary.brand-icon::marker {
  display: none !important;
  content: "" !important;
}

#hd-header-shell summary.brand-icon::before,
#hd-header-shell summary.brand-icon::after,
#hd-site-header summary.brand-icon::before,
#hd-site-header summary.brand-icon::after {
  display: none !important;
  content: none !important;
}

#hd-header-shell .brand-icon:hover,
#hd-header-shell .brand-icon:focus-visible,
#hd-header-shell .hd-header-icon-control:hover,
#hd-header-shell .hd-header-icon-control:focus-visible,
#hd-site-header .brand-icon:hover,
#hd-site-header .brand-icon:focus-visible,
#hd-site-header .hd-header-icon-control:hover,
#hd-site-header .hd-header-icon-control:focus-visible {
  background: var(--header-icon-hover-bg) !important;
  color: var(--header-icon-hover-colour) !important;
  border-color: var(--header-icon-hover-border) !important;
  box-shadow: var(--header-icon-hover-shadow) !important;
  transform: translateY(-1px) !important;
  outline: 0 !important;
}

#hd-header-shell details[open] > summary.brand-icon,
#hd-header-shell .hd-header-icon-control[aria-current="page"],
#hd-header-shell .hd-header-icon-control.active,
#hd-site-header details[open] > summary.brand-icon,
#hd-site-header .hd-header-icon-control[aria-current="page"],
#hd-site-header .hd-header-icon-control.active {
  background: var(--header-icon-active-bg) !important;
  color: var(--header-icon-active-colour) !important;
  border-color: var(--header-icon-active-border) !important;
  box-shadow: var(--header-icon-active-shadow) !important;
}

#hd-header-shell .hd-header-symbol-svg,
#hd-header-shell .hd-header-icon-svg,
#hd-header-shell .hd-header-icon-control svg,
#hd-header-shell .brand-icon svg,
#hd-site-header .hd-header-symbol-svg,
#hd-site-header .hd-header-icon-svg,
#hd-site-header .hd-header-icon-control svg,
#hd-site-header .brand-icon svg {
  display: block !important;
  width: var(--header-icon-svg-size) !important;
  height: var(--header-icon-svg-size) !important;
  min-width: var(--header-icon-svg-size) !important;
  min-height: var(--header-icon-svg-size) !important;
  color: currentColor !important;
  stroke: currentColor !important;
  fill: none;
}

#hd-header-shell .hd-header-icon-fallback,
#hd-site-header .hd-header-icon-fallback {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
}

/* =========================================================
Header dropdown panels
Search/accessibility only. Admin account menu is not owned here.
========================================================= */
#hd-header-shell .hd-header-search-panel,
#hd-header-shell .hd-search-panel,
#hd-header-shell .hd-accessibility-panel,
#hd-header-shell #search-icon-menu,
#hd-header-shell #accessibility-icon-menu,
#hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
#hd-header-shell details.nav-dropdown--search > .dropdown-menu,
#hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
#hd-site-header .hd-header-search-panel,
#hd-site-header .hd-search-panel,
#hd-site-header .hd-accessibility-panel,
#hd-site-header #search-icon-menu,
#hd-site-header #accessibility-icon-menu,
#hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
#hd-site-header details.nav-dropdown--search > .dropdown-menu,
#hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 18000 !important;
  width: min(var(--header-dropdown-width), calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: var(--header-dropdown-max-height) !important;
  overflow: auto !important;
  box-sizing: border-box !important;
  padding: var(--header-dropdown-padding) !important;
  border: 1px solid var(--header-dropdown-border) !important;
  border-radius: var(--header-dropdown-radius) !important;
  background: var(--header-dropdown-bg) !important;
  color: var(--header-dropdown-text) !important;
  box-shadow: var(--header-dropdown-shadow) !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#hd-header-shell .dropdown-menu__heading,
#hd-header-shell #accessibility-icon-menu .dropdown-menu__heading,
#hd-header-shell #search-icon-menu .dropdown-menu__heading,
#hd-header-shell .hd-accessibility-panel .dropdown-menu__heading,
#hd-site-header .dropdown-menu__heading,
#hd-site-header #accessibility-icon-menu .dropdown-menu__heading,
#hd-site-header #search-icon-menu .dropdown-menu__heading,
#hd-site-header .hd-accessibility-panel .dropdown-menu__heading {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--header-dropdown-border) !important;
  border-radius: 12px !important;
  background: var(--header-dropdown-heading-bg) !important;
  color: var(--header-dropdown-heading-text) !important;
}

#hd-header-shell .dropdown-menu__heading strong,
#hd-site-header .dropdown-menu__heading strong {
  display: block !important;
  color: inherit !important;
  font-size: 1rem !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

#hd-header-shell .dropdown-menu__heading small,
#hd-site-header .dropdown-menu__heading small {
  display: block !important;
  color: var(--header-dropdown-text) !important;
  font-size: .86rem !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

#hd-header-shell #accessibility-icon-menu a,
#hd-header-shell #accessibility-icon-menu .dropdown-item,
#hd-header-shell #accessibility-icon-menu button,
#hd-header-shell .hd-accessibility-panel a,
#hd-header-shell .hd-accessibility-panel button,
#hd-header-shell .dropdown-menu a,
#hd-header-shell .dropdown-menu button,
#hd-site-header #accessibility-icon-menu a,
#hd-site-header #accessibility-icon-menu .dropdown-item,
#hd-site-header #accessibility-icon-menu button,
#hd-site-header .hd-accessibility-panel a,
#hd-site-header .hd-accessibility-panel button,
#hd-site-header .dropdown-menu a,
#hd-site-header .dropdown-menu button {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 36px !important;
  margin: 2px 0 !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  color: var(--header-dropdown-text) !important;
  background: transparent !important;
  font-size: .94rem !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-align: left !important;
  text-decoration: none !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

#hd-header-shell #accessibility-icon-menu a:hover,
#hd-header-shell #accessibility-icon-menu a:focus-visible,
#hd-header-shell .hd-accessibility-panel a:hover,
#hd-header-shell .hd-accessibility-panel a:focus-visible,
#hd-header-shell .dropdown-menu a:hover,
#hd-header-shell .dropdown-menu a:focus-visible,
#hd-header-shell .dropdown-menu button:hover,
#hd-header-shell .dropdown-menu button:focus-visible,
#hd-site-header #accessibility-icon-menu a:hover,
#hd-site-header #accessibility-icon-menu a:focus-visible,
#hd-site-header .hd-accessibility-panel a:hover,
#hd-site-header .hd-accessibility-panel a:focus-visible,
#hd-site-header .dropdown-menu a:hover,
#hd-site-header .dropdown-menu a:focus-visible,
#hd-site-header .dropdown-menu button:hover,
#hd-site-header .dropdown-menu button:focus-visible {
  background: var(--header-dropdown-hover-bg) !important;
  color: var(--header-dropdown-hover-text) !important;
  outline: 2px solid color-mix(in srgb, var(--colour-focus-ring, var(--colour-accent, #c49a2c)) 65%, transparent) !important;
  outline-offset: 1px !important;
}

#hd-header-shell .hd-header-search-label,
#hd-site-header .hd-header-search-label {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  color: var(--colour-heading, #003c56) !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  text-align: center !important;
}

#hd-header-shell .hd-header-search-row,
#hd-site-header .hd-header-search-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  width: 100% !important;
}

#hd-header-shell .hd-header-search-input,
#hd-header-shell .hd-header-search-submit,
#hd-header-shell .hd-search-panel input,
#hd-header-shell .hd-search-panel button,
#hd-site-header .hd-header-search-input,
#hd-site-header .hd-header-search-submit,
#hd-site-header .hd-search-panel input,
#hd-site-header .hd-search-panel button {
  box-sizing: border-box !important;
  min-height: 40px !important;
  max-width: 100% !important;
  font-size: .98rem !important;
}

#hd-header-shell .hd-header-search-input,
#hd-header-shell .hd-search-panel input,
#hd-site-header .hd-header-search-input,
#hd-site-header .hd-search-panel input {
  width: 100% !important;
}

#hd-header-shell .hd-header-search-submit,
#hd-header-shell .hd-search-panel button,
#hd-site-header .hd-header-search-submit,
#hd-site-header .hd-search-panel button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  background: var(--colour-primary, #29495a) !important;
  color: var(--colour-on-primary, #fff) !important;
  border: 1px solid var(--colour-primary, #29495a) !important;
  text-decoration: none !important;
}

#hd-header-shell .hd-header-search-help,
#hd-site-header .hd-header-search-help {
  margin: 10px 0 0 !important;
  color: var(--header-dropdown-text) !important;
  font-size: .9rem !important;
  line-height: 1.35 !important;
  text-align: center !important;
}

/* =========================================================
Tablet
========================================================= */
@media (min-width: 761px) and (max-width: 1200px) {
  :root {
    --header-brand-grid-gap: clamp(20px, 3vw, 38px);
    --header-side-col-width: clamp(112px, 14vw, 150px);
    --header-logo-width: clamp(118px, 13vw, 144px);
    --header-title-size: clamp(2rem, 3.2vw, 2.45rem);
    --header-subtitle-size: clamp(1rem, 1.9vw, 1.22rem);
    --header-icon-button-size: clamp(36px, 4vw, 44px);
    --header-icon-svg-size: clamp(18px, 2.2vw, 22px);
    --header-icon-gap: 10px;
  }

  #hd-header-shell .brand-title,
  #hd-site-header .brand-title,
  #hd-header-shell .site-title,
  #hd-site-header .site-title,
  #hd-header-shell .hd-site-title,
  #hd-site-header .hd-site-title {
    max-width: min(78vw, 760px) !important;
    line-height: 1.06 !important;
    text-wrap: balance !important;
  }

  #hd-header-shell .brand-subtitle,
  #hd-site-header .brand-subtitle,
  #hd-header-shell .site-subtitle,
  #hd-site-header .site-subtitle,
  #hd-header-shell .hd-site-subtitle,
  #hd-site-header .hd-site-subtitle {
    max-width: min(72vw, 680px) !important;
    line-height: 1.16 !important;
    text-wrap: balance !important;
  }
}

/* =========================================================
Mobile
Header becomes a centred vertical brand stack.
CTA/hero and primary nav are not styled here.
========================================================= */
@media (max-width: 760px) {
  :root {
    --header-shell-radius: 0;
    --header-shell-padding-top: clamp(16px, 4.4vw, 24px);
    --header-shell-padding-right: clamp(14px, 4vw, 18px);
    --header-shell-padding-bottom: clamp(10px, 3vw, 16px);
    --header-shell-padding-left: clamp(14px, 4vw, 18px);
    --header-logo-width: clamp(124px, 31vw, 164px);
    --header-title-max-width: 31rem;
    --header-title-size: clamp(1.7rem, 7vw, 2.3rem);
    --header-title-line-height: 1.08;
    --header-title-letter-spacing: .066em;
    --header-subtitle-max-width: 30rem;
    --header-subtitle-size: clamp(.94rem, 3.6vw, 1.06rem);
    --header-subtitle-line-height: 1.24;
    --header-subtitle-gap: clamp(6px, 1.8vw, 9px);
    --header-icon-button-size: 34px;
    --header-icon-svg-size: 19px;
    --header-icon-gap: 9px;
    --header-icon-radius: 10px;
  }

  #hd-site-header,
  #hd-header-panel,
  #hd-header-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: auto !important;
    transform: none !important;
    background: var(--colour-surface, #fffdf8) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  #hd-header-shell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: clamp(6px, 2vw, 10px) !important;
    padding:
    var(--header-shell-padding-top)
    var(--header-shell-padding-right)
    var(--header-shell-padding-bottom)
    var(--header-shell-padding-left) !important;
    text-align: center !important;
  }

  #hd-header-shell .brand-strip,
  #hd-header-shell .brand-strip.hd-header-grid,
  #hd-header-shell .hd-header-grid,
  #hd-site-header .brand-strip,
  #hd-site-header .brand-strip.hd-header-grid,
  #hd-site-header .hd-header-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    justify-items: center !important;
    align-items: center !important;
    gap: clamp(8px, 2.4vw, 14px) !important;
    width: var(--hd-mobile-inner-width, min(calc(100% - 24px), 720px)) !important;
    max-width: var(--hd-mobile-inner-width, min(calc(100% - 24px), 720px)) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #hd-header-shell .brand-logo-link,
  #hd-header-shell .brand-logo-wrap,
  #hd-header-shell .hd-header-grid__logo,
  #hd-site-header .brand-logo-link,
  #hd-site-header .brand-logo-wrap,
  #hd-site-header .hd-header-grid__logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 0 !important;
    align-self: center !important;
    justify-self: center !important;
    width: var(--header-logo-width) !important;
    max-width: var(--header-logo-width) !important;
    margin: 0 auto !important;
    transform: none !important;
  }

  #hd-header-shell .brand-main,
  #hd-header-shell .brand-text,
  #hd-header-shell .brand-top-row,
  #hd-header-shell .hd-header-grid__title,
  #hd-site-header .brand-main,
  #hd-site-header .brand-text,
  #hd-site-header .brand-top-row,
  #hd-site-header .hd-header-grid__title {
    grid-column: 1 !important;
    grid-row: 2 !important;
    order: 1 !important;
    width: min(100%, var(--header-title-max-width)) !important;
    max-width: var(--header-title-max-width) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
    transform: none !important;
  }

  #hd-header-shell .brand-title,
  #hd-header-shell .hd-brand-title,
  #hd-header-shell .site-title,
  #hd-site-header .brand-title,
  #hd-site-header .hd-brand-title,
  #hd-site-header .site-title {
    width: 100% !important;
    max-width: 100% !important;
    font-size: var(--header-title-size) !important;
    line-height: var(--header-title-line-height) !important;
    letter-spacing: var(--header-title-letter-spacing) !important;
  }

  #hd-header-shell .brand-title-line,
  #hd-site-header .brand-title-line {
    white-space: normal !important;
  }

  #hd-header-shell .brand-subtitle,
  #hd-header-shell .hd-brand-subtitle,
  #hd-header-shell .site-subtitle,
  #hd-site-header .brand-subtitle,
  #hd-site-header .hd-brand-subtitle,
  #hd-site-header .site-subtitle {
    width: min(100%, var(--header-subtitle-max-width)) !important;
    max-width: var(--header-subtitle-max-width) !important;
    margin: var(--header-subtitle-gap) auto 0 !important;
    font-size: var(--header-subtitle-size) !important;
    line-height: var(--header-subtitle-line-height) !important;
    text-align: center !important;
    text-wrap: balance !important;
  }

  #hd-header-shell .brand-controls-inline,
  #hd-header-shell .brand-controls-inline.hd-header-grid__actions,
  #hd-header-shell .brand-actions,
  #hd-header-shell .header-actions,
  #hd-header-shell .hd-header-actions,
  #hd-header-shell .hd-header-icon-row,
  #hd-header-shell [data-hd-shell-role="header-actions"],
  #hd-site-header .brand-controls-inline,
  #hd-site-header .brand-controls-inline.hd-header-grid__actions,
  #hd-site-header .brand-actions,
  #hd-site-header .header-actions,
  #hd-site-header .hd-header-actions,
  #hd-site-header .hd-header-icon-row,
  #hd-site-header [data-hd-shell-role="header-actions"] {
    grid-column: 1 !important;
    grid-row: 3 !important;
    order: 2 !important;
    position: relative !important;
    z-index: 300 !important;
    width: auto !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--header-icon-gap) !important;
    margin: clamp(4px, 1.6vw, 8px) auto 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  #hd-header-shell .hd-header-icon-wrap,
  #hd-header-shell details.hd-header-icon-wrap,
  #hd-header-shell details.nav-dropdown--search,
  #hd-header-shell details.nav-dropdown--accessibility,
  #hd-site-header .hd-header-icon-wrap,
  #hd-site-header details.hd-header-icon-wrap,
  #hd-site-header details.nav-dropdown--search,
  #hd-site-header details.nav-dropdown--accessibility {
    position: relative !important;
    width: var(--header-icon-button-size) !important;
    height: var(--header-icon-button-size) !important;
    min-width: var(--header-icon-button-size) !important;
    min-height: var(--header-icon-button-size) !important;
    max-width: var(--header-icon-button-size) !important;
    max-height: var(--header-icon-button-size) !important;
  }

  #hd-header-shell .brand-icon,
  #hd-header-shell .hd-header-icon-control,
  #hd-header-shell summary.brand-icon,
  #hd-header-shell .nav-btn-dropdown,
  #hd-site-header .brand-icon,
  #hd-site-header .hd-header-icon-control,
  #hd-site-header summary.brand-icon,
  #hd-site-header .nav-btn-dropdown {
    width: var(--header-icon-button-size) !important;
    height: var(--header-icon-button-size) !important;
    min-width: var(--header-icon-button-size) !important;
    min-height: var(--header-icon-button-size) !important;
    max-width: var(--header-icon-button-size) !important;
    max-height: var(--header-icon-button-size) !important;
    border-radius: var(--header-icon-radius) !important;
    padding: 0 !important;
    transform: none !important;
  }

  #hd-header-shell .brand-icon svg,
  #hd-header-shell .hd-header-icon-control svg,
  #hd-header-shell .hd-header-symbol-svg,
  #hd-header-shell .hd-header-icon-svg,
  #hd-site-header .brand-icon svg,
  #hd-site-header .hd-header-icon-control svg,
  #hd-site-header .hd-header-symbol-svg,
  #hd-site-header .hd-header-icon-svg {
    width: var(--header-icon-svg-size) !important;
    height: var(--header-icon-svg-size) !important;
    min-width: var(--header-icon-svg-size) !important;
    min-height: var(--header-icon-svg-size) !important;
  }

  #hd-header-shell .hd-header-search-panel,
  #hd-header-shell .hd-search-panel,
  #hd-header-shell .hd-accessibility-panel,
  #hd-header-shell #search-icon-menu,
  #hd-header-shell #accessibility-icon-menu,
  #hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--search > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
  #hd-site-header .hd-header-search-panel,
  #hd-site-header .hd-search-panel,
  #hd-site-header .hd-accessibility-panel,
  #hd-site-header #search-icon-menu,
  #hd-site-header #accessibility-icon-menu,
  #hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
  #hd-site-header details.nav-dropdown--search > .dropdown-menu,
  #hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(90vw, 390px) !important;
    max-width: min(90vw, 390px) !important;
    max-height: min(72vh, 520px) !important;
    padding: 14px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    overflow: auto !important;
  }

  #hd-header-shell .hd-header-search-row,
  #hd-site-header .hd-header-search-row {
    grid-template-columns: 1fr !important;
  }

  #hd-header-shell .hd-header-search-input,
  #hd-header-shell .hd-header-search-submit,
  #hd-header-shell .hd-search-panel input,
  #hd-header-shell .hd-search-panel button,
  #hd-site-header .hd-header-search-input,
  #hd-site-header .hd-header-search-submit,
  #hd-site-header .hd-search-panel input,
  #hd-site-header .hd-search-panel button {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* =========================================================
HD RMS v1000 header/banner correction.
Owner: header_banner.
Fixes narrow desktop/tablet branding collapse, keeps mobile as a centred stack,
and prevents Search/Accessibility dropdown panels from creating horizontal scroll.
========================================================= */
:root {
  --header-dropdown-width: 420px;
  --header-dropdown-max-height: min(74vh, 560px);
}

#hd-header-shell .hd-header-search-panel,
#hd-header-shell .hd-search-panel,
#hd-header-shell .hd-accessibility-panel,
#hd-header-shell #search-icon-menu,
#hd-header-shell #accessibility-icon-menu,
#hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
#hd-header-shell details.nav-dropdown--search > .dropdown-menu,
#hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
#hd-site-header .hd-header-search-panel,
#hd-site-header .hd-search-panel,
#hd-site-header .hd-accessibility-panel,
#hd-site-header #search-icon-menu,
#hd-site-header #accessibility-icon-menu,
#hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
#hd-site-header details.nav-dropdown--search > .dropdown-menu,
#hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
  width: min(var(--header-dropdown-width), calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

#hd-header-shell .dropdown-menu *,
#hd-header-shell #accessibility-icon-menu *,
#hd-header-shell #search-icon-menu *,
#hd-site-header .dropdown-menu *,
#hd-site-header #accessibility-icon-menu *,
#hd-site-header #search-icon-menu * {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#hd-header-shell #accessibility-icon-menu,
#hd-site-header #accessibility-icon-menu {
  scrollbar-gutter: stable;
}

/* Treat narrow browser windows/tablets as mobile header layout earlier. */
@media (max-width: 900px) {
  :root {
    --header-shell-radius: 0;
    --header-shell-padding-top: clamp(18px, 4vw, 28px);
    --header-shell-padding-right: clamp(16px, 4vw, 22px);
    --header-shell-padding-bottom: clamp(14px, 3.5vw, 20px);
    --header-shell-padding-left: clamp(16px, 4vw, 22px);
    --header-logo-width: clamp(126px, 26vw, 166px);
    --header-title-max-width: min(100%, 34rem);
    --header-title-size: clamp(1.55rem, 6vw, 2.05rem);
    --header-title-line-height: 1.1;
    --header-title-letter-spacing: .055em;
    --header-subtitle-max-width: min(100%, 32rem);
    --header-subtitle-size: clamp(.94rem, 3.2vw, 1.08rem);
    --header-subtitle-line-height: 1.25;
    --header-subtitle-gap: clamp(8px, 2vw, 12px);
    --header-icon-button-size: 38px;
    --header-icon-svg-size: 20px;
    --header-icon-gap: 10px;
    --header-icon-radius: 11px;
    --header-dropdown-width: min(390px, calc(100vw - 28px));
  }

  #hd-site-header,
  #hd-header-panel,
  #hd-header-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    transform: none !important;
    background: var(--colour-surface, #fffdf8) !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  #hd-header-shell {
    display: block !important;
    padding:
    var(--header-shell-padding-top)
    var(--header-shell-padding-right)
    var(--header-shell-padding-bottom)
    var(--header-shell-padding-left) !important;
    text-align: center !important;
  }

  #hd-header-shell .brand-strip,
  #hd-header-shell .brand-strip.hd-header-grid,
  #hd-header-shell .hd-header-grid,
  #hd-header-shell .hd-branding-shell,
  #hd-header-shell .hd-header-branding,
  #hd-site-header .brand-strip,
  #hd-site-header .brand-strip.hd-header-grid,
  #hd-site-header .hd-header-grid,
  #hd-site-header .hd-branding-shell,
  #hd-site-header .hd-header-branding {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    justify-items: center !important;
    align-items: center !important;
    gap: clamp(10px, 2.4vw, 16px) !important;
    width: min(100%, var(--hd-mobile-shell-max, 720px)) !important;
    max-width: min(100%, var(--hd-mobile-shell-max, 720px)) !important;
    margin-inline: auto !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #hd-header-shell .hd-header-grid__logo,
  #hd-header-shell .brand-logo-link,
  #hd-header-shell .brand-logo-wrap,
  #hd-site-header .hd-header-grid__logo,
  #hd-site-header .brand-logo-link,
  #hd-site-header .brand-logo-wrap {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    align-self: center !important;
    width: var(--header-logo-width) !important;
    max-width: var(--header-logo-width) !important;
    margin: 0 auto !important;
    transform: none !important;
  }

  #hd-header-shell .brand-main,
  #hd-header-shell .brand-main.hd-header-grid__title,
  #hd-header-shell .brand-text,
  #hd-header-shell .brand-top-row,
  #hd-header-shell .hd-header-grid__title,
  #hd-site-header .brand-main,
  #hd-site-header .brand-main.hd-header-grid__title,
  #hd-site-header .brand-text,
  #hd-site-header .brand-top-row,
  #hd-site-header .hd-header-grid__title {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    width: min(100%, var(--header-title-max-width)) !important;
    max-width: var(--header-title-max-width) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
    transform: none !important;
  }

  #hd-header-shell .brand-title,
  #hd-header-shell .hd-brand-title,
  #hd-header-shell .site-title,
  #hd-site-header .brand-title,
  #hd-site-header .hd-brand-title,
  #hd-site-header .site-title {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    font-size: var(--header-title-size) !important;
    line-height: var(--header-title-line-height) !important;
    letter-spacing: var(--header-title-letter-spacing) !important;
    text-align: center !important;
    text-wrap: balance !important;
    overflow-wrap: normal !important;
  }

  #hd-header-shell .brand-title-line,
  #hd-site-header .brand-title-line {
    white-space: normal !important;
  }

  #hd-header-shell .brand-subtitle,
  #hd-header-shell .hd-brand-subtitle,
  #hd-header-shell .site-subtitle,
  #hd-site-header .brand-subtitle,
  #hd-site-header .hd-brand-subtitle,
  #hd-site-header .site-subtitle {
    width: min(100%, var(--header-subtitle-max-width)) !important;
    max-width: var(--header-subtitle-max-width) !important;
    margin: var(--header-subtitle-gap) auto 0 !important;
    font-size: var(--header-subtitle-size) !important;
    line-height: var(--header-subtitle-line-height) !important;
    text-align: center !important;
    text-wrap: balance !important;
    transform: none !important;
  }

  #hd-header-shell .brand-controls-inline,
  #hd-header-shell .brand-controls-inline.hd-header-grid__actions,
  #hd-header-shell .brand-actions,
  #hd-header-shell .header-actions,
  #hd-header-shell .hd-header-actions,
  #hd-header-shell .hd-header-icon-row,
  #hd-header-shell [data-hd-shell-role="header-actions"],
  #hd-site-header .brand-controls-inline,
  #hd-site-header .brand-controls-inline.hd-header-grid__actions,
  #hd-site-header .brand-actions,
  #hd-site-header .header-actions,
  #hd-site-header .hd-header-actions,
  #hd-site-header .hd-header-icon-row,
  #hd-site-header [data-hd-shell-role="header-actions"] {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: center !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--header-icon-gap) !important;
    width: auto !important;
    margin: clamp(4px, 1.4vw, 8px) auto 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  #hd-header-shell .hd-header-search-panel,
  #hd-header-shell .hd-search-panel,
  #hd-header-shell .hd-accessibility-panel,
  #hd-header-shell #search-icon-menu,
  #hd-header-shell #accessibility-icon-menu,
  #hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--search > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
  #hd-site-header .hd-header-search-panel,
  #hd-site-header .hd-search-panel,
  #hd-site-header .hd-accessibility-panel,
  #hd-site-header #search-icon-menu,
  #hd-site-header #accessibility-icon-menu,
  #hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
  #hd-site-header details.nav-dropdown--search > .dropdown-menu,
  #hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    width: min(390px, calc(100vw - 28px)) !important;
    max-width: calc(100vw - 28px) !important;
    max-height: min(72vh, 520px) !important;
    transform: translateX(-50%) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* =========================================================
Print
========================================================= */
@media print {
  #hd-site-header,
  #hd-header-panel,
  #hd-header-shell {
    display: none !important;
  }
}

/* =========================================================
HD RMS v1001 header icon centring correction
Keeps search and accessibility symbols optically centred inside their square
header buttons. This belongs here because the header owns the icon controls.
========================================================= */
#hd-header-shell .hd-header-icon-wrap,
#hd-header-shell details.hd-header-icon-wrap,
#hd-header-shell details.nav-dropdown--search,
#hd-header-shell details.nav-dropdown--accessibility,
#hd-site-header .hd-header-icon-wrap,
#hd-site-header details.hd-header-icon-wrap,
#hd-site-header details.nav-dropdown--search,
#hd-site-header details.nav-dropdown--accessibility {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  line-height: 0 !important;
}

#hd-header-shell summary.brand-icon,
#hd-header-shell .brand-icon,
#hd-header-shell .hd-header-icon-control,
#hd-header-shell .nav-btn-dropdown,
#hd-site-header summary.brand-icon,
#hd-site-header .brand-icon,
#hd-site-header .hd-header-icon-control,
#hd-site-header .nav-btn-dropdown {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  text-align: center !important;
  line-height: 0 !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

#hd-header-shell .brand-icon > *,
#hd-header-shell .hd-header-icon-control > *,
#hd-header-shell summary.brand-icon > *,
#hd-header-shell .nav-btn-dropdown > *,
#hd-site-header .brand-icon > *,
#hd-site-header .hd-header-icon-control > *,
#hd-site-header summary.brand-icon > *,
#hd-site-header .nav-btn-dropdown > * {
  grid-area: 1 / 1 !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
}

#hd-header-shell .hd-header-symbol-svg,
#hd-header-shell .hd-header-icon-svg,
#hd-header-shell .hd-header-icon-control svg,
#hd-header-shell .brand-icon svg,
#hd-site-header .hd-header-symbol-svg,
#hd-site-header .hd-header-icon-svg,
#hd-site-header .hd-header-icon-control svg,
#hd-site-header .brand-icon svg {
  display: block !important;
  margin: auto !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  vertical-align: middle !important;
  overflow: visible !important;
}

#hd-header-shell .hd-header-icon-control img,
#hd-header-shell .brand-icon img,
#hd-site-header .hd-header-icon-control img,
#hd-site-header .brand-icon img {
  display: block !important;
  width: var(--header-icon-svg-size) !important;
  height: var(--header-icon-svg-size) !important;
  object-fit: contain !important;
  margin: auto !important;
}

/* =========================================================
HD RMS v1003 header icon and dropdown correction
Keeps the search/accessibility controls visually centred inside their square buttons
and prevents accessibility/search panels from becoming wider than their content area.
========================================================= */
:root {
  --header-dropdown-width: 268px;
  --header-dropdown-max-height: min(68vh, 500px);
}

#hd-header-shell :is(summary.brand-icon,.brand-icon,.hd-header-icon-control,.nav-btn-dropdown),
#hd-site-header :is(summary.brand-icon,.brand-icon,.hd-header-icon-control,.nav-btn-dropdown) {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  line-height: 0 !important;
  font-size: 0 !important;
  text-align: center !important;
  overflow: hidden !important;
}

#hd-header-shell :is(summary.brand-icon,.brand-icon,.hd-header-icon-control,.nav-btn-dropdown) > *,
#hd-site-header :is(summary.brand-icon,.brand-icon,.hd-header-icon-control,.nav-btn-dropdown) > * {
  grid-area: 1 / 1 !important;
  place-self: center !important;
  margin: 0 !important;
}

#hd-header-shell :is(.hd-header-symbol-svg,.hd-header-icon-svg,.hd-header-icon-control svg,.brand-icon svg),
#hd-site-header :is(.hd-header-symbol-svg,.hd-header-icon-svg,.hd-header-icon-control svg,.brand-icon svg) {
  position: static !important;
  display: block !important;
  place-self: center !important;
  margin: auto !important;
  transform: none !important;
  vertical-align: middle !important;
  overflow: visible !important;
}

#hd-header-shell .hd-header-icon-fallback,
#hd-site-header .hd-header-icon-fallback {
  font-size: 1rem !important;
  line-height: 1 !important;
}

#hd-header-shell :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu),
#hd-site-header :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu) {
  width: min(var(--header-dropdown-width, 320px), calc(100vw - 36px)) !important;
  max-width: min(var(--header-dropdown-width, 320px), calc(100vw - 36px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#hd-header-shell :is(.hd-accessibility-panel,#accessibility-icon-menu) :is(a,button,.dropdown-item),
#hd-site-header :is(.hd-accessibility-panel,#accessibility-icon-menu) :is(a,button,.dropdown-item) {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

@media (max-width: 900px) {
  #hd-header-shell :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu),
  #hd-site-header :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu) {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(86vw, 340px) !important;
    max-width: min(86vw, 340px) !important;
  }
}

/* =========================================================
HD RMS v1004 header icon centring and dropdown refinement
Owner: header_banner
Purpose: fix late-loading icon offset, constrain accessibility/search dropdowns,
and keep public/admin header branding stable at narrow widths.
========================================================= */
:root {
  --header-dropdown-width: 268px;
  --header-dropdown-max-height: min(68vh, 500px);
  --header-icon-button-size: clamp(40px, 3.8vw, 48px);
  --header-icon-svg-size: clamp(21px, 2vw, 25px);
}

#hd-header-shell .brand-controls-inline,
#hd-header-shell .brand-controls-inline.hd-header-grid__actions,
#hd-header-shell .brand-actions,
#hd-header-shell .header-actions,
#hd-header-shell .hd-header-actions,
#hd-header-shell .hd-header-icon-row,
#hd-site-header .brand-controls-inline,
#hd-site-header .brand-controls-inline.hd-header-grid__actions,
#hd-site-header .brand-actions,
#hd-site-header .header-actions,
#hd-site-header .hd-header-actions,
#hd-site-header .hd-header-icon-row {
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
}

#hd-header-shell .hd-header-icon-wrap,
#hd-header-shell details.hd-header-icon-wrap,
#hd-header-shell details.nav-dropdown--search,
#hd-header-shell details.nav-dropdown--accessibility,
#hd-site-header .hd-header-icon-wrap,
#hd-site-header details.hd-header-icon-wrap,
#hd-site-header details.nav-dropdown--search,
#hd-site-header details.nav-dropdown--accessibility {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  line-height: 0 !important;
  overflow: visible !important;
}

#hd-header-shell summary.brand-icon,
#hd-header-shell .brand-icon,
#hd-header-shell .hd-header-icon-control,
#hd-header-shell .nav-btn-dropdown,
#hd-site-header summary.brand-icon,
#hd-site-header .brand-icon,
#hd-site-header .hd-header-icon-control,
#hd-site-header .nav-btn-dropdown {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  text-align: center !important;
  line-height: 0 !important;
  font-size: 0 !important;
  padding: 0 !important;
}

#hd-header-shell .brand-icon > *,
#hd-header-shell .hd-header-icon-control > *,
#hd-header-shell summary.brand-icon > *,
#hd-header-shell .nav-btn-dropdown > *,
#hd-site-header .brand-icon > *,
#hd-site-header .hd-header-icon-control > *,
#hd-site-header summary.brand-icon > *,
#hd-site-header .nav-btn-dropdown > * {
  grid-area: 1 / 1 !important;
  align-self: center !important;
  justify-self: center !important;
}

#hd-header-shell .hd-header-symbol-svg,
#hd-header-shell .hd-header-icon-svg,
#hd-header-shell .hd-header-icon-control svg,
#hd-header-shell .brand-icon svg,
#hd-site-header .hd-header-symbol-svg,
#hd-site-header .hd-header-icon-svg,
#hd-site-header .hd-header-icon-control svg,
#hd-site-header .brand-icon svg {
  display: block !important;
  margin: auto !important;
  position: static !important;
  flex: 0 0 auto !important;
  transform: translate(0,0) !important;
  transform-origin: 50% 50% !important;
  vertical-align: middle !important;
  pointer-events: none !important;
}

#hd-header-shell details[open] > summary.brand-icon svg,
#hd-site-header details[open] > summary.brand-icon svg {
  transform: translate(0,0) !important;
}

#hd-header-shell .hd-header-search-panel,
#hd-header-shell .hd-search-panel,
#hd-header-shell .hd-accessibility-panel,
#hd-header-shell #search-icon-menu,
#hd-header-shell #accessibility-icon-menu,
#hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
#hd-header-shell details.nav-dropdown--search > .dropdown-menu,
#hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
#hd-site-header .hd-header-search-panel,
#hd-site-header .hd-search-panel,
#hd-site-header .hd-accessibility-panel,
#hd-site-header #search-icon-menu,
#hd-site-header #accessibility-icon-menu,
#hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
#hd-site-header details.nav-dropdown--search > .dropdown-menu,
#hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
  width: min(var(--header-dropdown-width), calc(100vw - 34px)) !important;
  max-width: calc(100vw - 34px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
  line-height: 1.35 !important;
}

@media (max-width: 900px) {
  :root {
    --header-dropdown-width: 268px;
  }

  #hd-header-shell .brand-strip,
  #hd-header-shell .brand-strip.hd-header-grid,
  #hd-header-shell .hd-header-grid,
  #hd-site-header .brand-strip,
  #hd-site-header .brand-strip.hd-header-grid,
  #hd-site-header .hd-header-grid {
    width: min(100%, var(--hd-mobile-inner-width, 720px)) !important;
    max-width: min(100%, var(--hd-mobile-inner-width, 720px)) !important;
  }
}

@media (max-width: 760px) {
  :root {
    --header-icon-button-size: 36px;
    --header-icon-svg-size: 20px;
    --header-dropdown-width: 268px;
  }

  #hd-header-shell .hd-header-search-panel,
  #hd-header-shell .hd-search-panel,
  #hd-header-shell .hd-accessibility-panel,
  #hd-header-shell #search-icon-menu,
  #hd-header-shell #accessibility-icon-menu,
  #hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--search > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
  #hd-site-header .hd-header-search-panel,
  #hd-site-header .hd-search-panel,
  #hd-site-header .hd-accessibility-panel,
  #hd-site-header #search-icon-menu,
  #hd-site-header #accessibility-icon-menu,
  #hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
  #hd-site-header details.nav-dropdown--search > .dropdown-menu,
  #hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(88vw, var(--header-dropdown-width)) !important;
    max-width: min(88vw, var(--header-dropdown-width)) !important;
  }
}

/* HD RMS v1005 header icon centring and dropdown containment.
Owner: header_banner. Keeps search/accessibility controls visually centred even when SVG defaults or inherited line-height change. */
#hd-header-shell :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown),
#hd-site-header :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) {
  display: inline-grid !important;
  place-content: center !important;
  place-items: center !important;
  text-align: center !important;
  line-height: 0 !important;
  vertical-align: middle !important;
  padding: 0 !important;
}

#hd-header-shell :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) > *,
#hd-site-header :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) > * {
  grid-area: 1 / 1 !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  transform: none !important;
}

#hd-header-shell :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) svg,
#hd-site-header :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) svg,
#hd-header-shell :is(.hd-header-symbol-svg,.hd-header-icon-svg),
#hd-site-header :is(.hd-header-symbol-svg,.hd-header-icon-svg) {
  position: static !important;
  display: block !important;
  margin: 0 !important;
  inset: auto !important;
  transform: none !important;
  line-height: 1 !important;
  overflow: visible !important;
  align-self: center !important;
  justify-self: center !important;
  vertical-align: middle !important;
}

#hd-header-shell :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) svg *,
#hd-site-header :is(.brand-icon,.hd-header-icon-control,summary.brand-icon,.nav-btn-dropdown) svg * {
  transform-box: fill-box;
  transform-origin: center;
}

#hd-header-shell :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu),
#hd-site-header :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu) {
  width: min(340px, calc(100vw - 32px)) !important;
  max-width: min(340px, calc(100vw - 32px)) !important;
  overflow-x: hidden !important;
}

#hd-header-shell :is(.hd-accessibility-panel,#accessibility-icon-menu) a,
#hd-site-header :is(.hd-accessibility-panel,#accessibility-icon-menu) a {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

/* v1062 header/navigation shell width alignment
Owners: header_banner and primary_navigation
Purpose: align the header shell and primary-navigation rail with the main H1/content shell width. */
:root {
  --hd-shell-content-width-current: var(--site-shell-width, var(--site-wrapper-max, 1100px));
}

html body #hd-header-shell,
html body .hd-site-header-shell,
html body #nav-container,
html body [data-hd-shell-role="primary-nav-shell"] {
  box-sizing: border-box !important;
  width: min(100%, var(--hd-shell-content-width-current)) !important;
  max-width: var(--hd-shell-content-width-current) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* v1048 compact header utility menus
Owner: header_banner. Keeps accessibility/search menus aligned to the icon-button scale instead of opening as oversized panels. */
:root {
  --header-dropdown-width: 268px;
}

#hd-header-shell :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu),
#hd-site-header :is(.hd-header-search-panel,.hd-search-panel,.hd-accessibility-panel,#search-icon-menu,#accessibility-icon-menu,details.hd-header-icon-wrap > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu,details.nav-dropdown--accessibility > .dropdown-menu) {
  width: min(var(--header-dropdown-width), calc(100vw - 34px)) !important;
  min-width: min(232px, calc(100vw - 34px)) !important;
  max-width: min(var(--header-dropdown-width), calc(100vw - 34px)) !important;
}

#hd-header-shell :is(.hd-accessibility-panel,#accessibility-icon-menu) :is(a,button,.dropdown-item),
#hd-site-header :is(.hd-accessibility-panel,#accessibility-icon-menu) :is(a,button,.dropdown-item) {
  padding: 9px 10px !important;
}

/* =========================================================
HD RMS v1071 mobile header utility-menu centring
Owner: header_banner.
Purpose: centre Search and Accessibility controls and their dropdown panels
within the mobile viewport/inner rail rather than relative to one icon button.
========================================================= */
@media (max-width: 760px) {
  #hd-header-shell .brand-controls-inline,
  #hd-header-shell .brand-controls-inline.hd-header-grid__actions,
  #hd-header-shell .brand-actions,
  #hd-header-shell .header-actions,
  #hd-header-shell .hd-header-actions,
  #hd-header-shell .hd-header-icon-row,
  #hd-header-shell [data-hd-shell-role="header-actions"],
  #hd-site-header .brand-controls-inline,
  #hd-site-header .brand-controls-inline.hd-header-grid__actions,
  #hd-site-header .brand-actions,
  #hd-site-header .header-actions,
  #hd-site-header .hd-header-actions,
  #hd-site-header .hd-header-icon-row,
  #hd-site-header [data-hd-shell-role="header-actions"] {
    position: relative !important;
    width: var(--hd-mobile-inner-width, min(calc(100% - 24px), 720px)) !important;
    max-width: var(--hd-mobile-inner-width, min(calc(100% - 24px), 720px)) !important;
    margin-inline: auto !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  #hd-header-shell .hd-header-icon-wrap,
  #hd-header-shell details.hd-header-icon-wrap,
  #hd-header-shell details.nav-dropdown--search,
  #hd-header-shell details.nav-dropdown--accessibility,
  #hd-site-header .hd-header-icon-wrap,
  #hd-site-header details.hd-header-icon-wrap,
  #hd-site-header details.nav-dropdown--search,
  #hd-site-header details.nav-dropdown--accessibility {
    position: static !important;
  }

  #hd-header-shell .hd-header-search-panel,
  #hd-header-shell .hd-search-panel,
  #hd-header-shell .hd-accessibility-panel,
  #hd-header-shell #search-icon-menu,
  #hd-header-shell #accessibility-icon-menu,
  #hd-header-shell details.hd-header-icon-wrap > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--search > .dropdown-menu,
  #hd-header-shell details.nav-dropdown--accessibility > .dropdown-menu,
  #hd-site-header .hd-header-search-panel,
  #hd-site-header .hd-search-panel,
  #hd-site-header .hd-accessibility-panel,
  #hd-site-header #search-icon-menu,
  #hd-site-header #accessibility-icon-menu,
  #hd-site-header details.hd-header-icon-wrap > .dropdown-menu,
  #hd-site-header details.nav-dropdown--search > .dropdown-menu,
  #hd-site-header details.nav-dropdown--accessibility > .dropdown-menu {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(340px, var(--hd-mobile-inner-width, calc(100vw - 24px))) !important;
    min-width: min(232px, var(--hd-mobile-inner-width, calc(100vw - 24px))) !important;
    max-width: var(--hd-mobile-inner-width, calc(100vw - 24px)) !important;
    margin-inline: auto !important;
  }
}

/* =========================================================
HD RMS v1091 core polish: mobile accessibility/search menu containment
Owner: header_banner.
Purpose: keep header dropdowns centred, wide enough to read, and constrained to
viewport width without clipping on mobile. This replaces the narrow mobile menu
behaviour at the header owner level rather than patching individual pages.
========================================================= */
@media (max-width: 720px) {
  #hd-header-shell :is(details.nav-dropdown--accessibility, details.nav-dropdown--search),
  #hd-site-header :is(details.nav-dropdown--accessibility, details.nav-dropdown--search) {
    position: static !important;
  }

  #hd-header-shell :is(.hd-accessibility-panel,#accessibility-icon-menu,details.nav-dropdown--accessibility > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu),
  #hd-site-header :is(.hd-accessibility-panel,#accessibility-icon-menu,details.nav-dropdown--accessibility > .dropdown-menu,details.nav-dropdown--search > .dropdown-menu) {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 21rem) !important;
    min-width: min(92vw, 19rem) !important;
    max-width: calc(100vw - 2rem) !important;
    box-sizing: border-box !important;
    padding: clamp(1rem, 4vw, 1.35rem) !important;
    overflow: visible !important;
    z-index: 80 !important;
  }

  #hd-header-shell :is(.hd-accessibility-panel,#accessibility-icon-menu) :is(a,button,.dropdown-item),
  #hd-site-header :is(.hd-accessibility-panel,#accessibility-icon-menu) :is(a,button,.dropdown-item) {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.25 !important;
    text-align: left !important;
  }

  #hd-header-shell :is(.hd-accessibility-panel,#accessibility-icon-menu) .dropdown-menu__heading,
  #hd-site-header :is(.hd-accessibility-panel,#accessibility-icon-menu) .dropdown-menu__heading {
    width: 100% !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
  }
}

/* =========================================================
HD RMS v1092 core polish correction: mobile header dropdowns
Owner: header_banner.
Purpose: centre and widen search/accessibility dropdowns on mobile while keeping
within the viewport and theme-token surface model.
========================================================= */
@media (max-width: 700px) {
  .hd-header-dropdown,
  .hd-accessibility-menu,
  .hd-search-menu,
  [data-hd-accessibility-menu],
  [data-hd-search-menu] {
    width: min(21rem, calc(100vw - 2rem)) !important;
    max-width: calc(100vw - 2rem) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    border-radius: 1.15rem !important;
    padding: clamp(1rem, 4vw, 1.35rem) !important;
    background: var(--colour-surface-panel, var(--colour-surface, #fffdf8)) !important;
    border: 1px solid var(--colour-border-soft, rgba(16,71,48,.22)) !important;
    box-shadow: 0 18px 36px color-mix(in srgb, var(--colour-shadow, #102b22) 14%, transparent) !important;
  }
}

/* =========================================================
HD RMS v1098 header search and icon form states
Owner: header_banner.
Purpose: keep the header search control on the shared button/token path while
preserving validation behaviour. Search should look active when valid and readable
when disabled.
========================================================= */
.hd-header-search-form {
  gap: clamp(10px, 1.2vw, 14px) !important;
}

.hd-header-search-submit {
  background: var(--colour-primary, #1b5f37) !important;
  color: var(--colour-on-primary, #ffffff) !important;
  -webkit-text-fill-color: var(--colour-on-primary, #ffffff) !important;
  border: 1px solid color-mix(in srgb, var(--colour-primary, #1b5f37) 78%, var(--colour-text, #06334a) 22%) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--colour-shadow, #102630) 14%, transparent) !important;
}

.hd-header-search-submit:hover,
.hd-header-search-submit:focus-visible {
  background: color-mix(in srgb, var(--colour-primary, #1b5f37) 86%, var(--colour-accent, #c46f35) 14%) !important;
  color: var(--colour-on-primary, #ffffff) !important;
  -webkit-text-fill-color: var(--colour-on-primary, #ffffff) !important;
}

.hd-header-search-submit:disabled,
.hd-header-search-submit[disabled],
.hd-header-search-submit[aria-disabled="true"] {
  background: color-mix(in srgb, var(--colour-surface-soft, #f1dfc7) 86%, var(--colour-border, #bf7847) 14%) !important;
  color: var(--colour-text, #06334a) !important;
  -webkit-text-fill-color: var(--colour-text, #06334a) !important;
  border-color: color-mix(in srgb, var(--colour-border, #bf7847) 78%, var(--colour-text, #06334a) 22%) !important;
  opacity: 1 !important;
}

/* === Hero banner image and CTA [hero_banner_cta] === */
/* =========================================================
HD RMS hero_banner_cta
Canonical CTA / hero banner owner section.
Owns banner height, artwork frame, hero image and CTA.
Mobile display must not override these component rules.
========================================================= */
:root {

  /* Shared rail with nav/content */
  --hero-rail-width: min(calc(100% - clamp(1rem, 3.2vw, 3.5rem)), 1320px);

  /* Contract hooks for mobile hero controls.
  These stay in hero_banner_cta because they are hero component tokens, not generic mobile guardrails. */
  --hd-mobile-component-rail: min(calc(100% - 1rem), 640px);
  --mobile-hero-image-width: min(88vw, 420px);
  --mobile-hero-cta-width: min(190px, 64%);

  /* Banner shell */
  --hero-banner-radius: 28px;
  --hero-banner-bg: var(--colour-cta-shell-bg, color-mix(in srgb, var(--colour-surface-banner, #d9d5ec) 72%, var(--colour-accent, #c7a23a) 8%, var(--colour-surface, #fff) 20%));
  --hero-banner-border: 1px solid color-mix(in srgb, var(--colour-primary, #00728a) 14%, transparent);
  --hero-banner-margin-top: clamp(12px, 1.6vw, 22px);

  /* Desktop/tablet spacing */
  --hero-banner-padding-top: clamp(16px, 1.8vw, 28px);
  --hero-banner-padding-right: 12px;
  --hero-banner-padding-bottom: clamp(16px, 1.8vw, 28px);
  --hero-banner-padding-left: 12px;

  /* Space between image and CTA */
  --hero-stack-gap: clamp(14px, 1.5vw, 22px);

  /* Artwork frame */
  --hero-artwork-width: clamp(620px, 48vw, 780px);
  --hero-artwork-aspect: 2.05 / 1;

  /*
  The house image appears to have transparent canvas.
  Desktop/tablet scale it up inside a controlled frame.
  */
  --hero-image-fit: contain;
  --hero-image-position: center center;
  --hero-image-scale: 1.55;
  --hero-image-x: 0px;
  --hero-image-y: 0px;

  /* CTA button */
  --hero-cta-width: 292px;
  --hero-cta-min-height: 50px;
  --hero-cta-font-size: 1rem;
  --hero-cta-radius: 14px;
  --hero-cta-bg: linear-gradient(105deg, var(--colour-accent, #c7a23a), var(--colour-primary, #00728a));
  --hero-cta-colour: var(--colour-on-primary, #fff);
  --hero-cta-hover-bg: linear-gradient(105deg, var(--colour-primary-hover, #005f74), var(--colour-accent-strong, #9d7b17));
  --hero-cta-hover-colour: #FFFFFF;
  --hero-cta-shadow: 0 14px 30px rgba(0, 60, 86, .22);
  --hero-cta-hover-shadow: 0 18px 38px rgba(0, 60, 86, .28);
}

/* =========================================================
Banner shell
========================================================= */
html body #hd-header-shell .hero-banner.hd-hero-banner-shell,
html body #hd-site-header #hd-header-shell .hero-banner.hd-hero-banner-shell,
html body #hd-header-shell [data-hd-hero-banner="true"],
html body .hd-hero-banner-shell,
html body [data-hd-hero-banner] {
  display: block !important;
  width: var(--hero-rail-width) !important;
  max-width: var(--hero-rail-width) !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: var(--hero-banner-margin-top) auto 0 !important;
  padding:
  var(--hero-banner-padding-top)
  var(--hero-banner-padding-right)
  var(--hero-banner-padding-bottom)
  var(--hero-banner-padding-left) !important;
  border-radius: var(--hero-banner-radius) !important;
  background: var(--hero-banner-bg) !important;
  border: var(--hero-banner-border) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* =========================================================
Internal content stack
========================================================= */
html body #hd-header-shell .hd-hero-content-stack,
html body #hd-site-header .hd-hero-content-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  justify-items: center !important;
  align-items: center !important;
  align-content: center !important;
  gap: var(--hero-stack-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* =========================================================
Image wrapper
========================================================= */
html body #hd-header-shell .hero-media.hd-hero-media-shell,
html body #hd-site-header .hero-media.hd-hero-media-shell,
html body #hd-header-shell .hero-banner > .hero-media,
html body #hd-site-header .hero-banner > .hero-media {
  display: block !important;
  position: relative !important;
  grid-row: 1 !important;
  width: min(var(--hero-artwork-width), 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  line-height: 0 !important;
  box-sizing: border-box !important;
}

/* =========================================================
Artwork frame
========================================================= */
html body #hd-header-shell .hd-hero-artwork-frame,
html body #hd-site-header .hd-hero-artwork-frame {
  display: block !important;
  position: relative !important;
  width: min(var(--hero-artwork-width), 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: var(--hero-artwork-aspect) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  line-height: 0 !important;
  box-sizing: border-box !important;
}

/* =========================================================
Image display
========================================================= */
html body #hd-header-shell .hd-hero-artwork-frame img.hero-media__image,
html body #hd-site-header .hd-hero-artwork-frame img.hero-media__image,
html body #hd-header-shell img.hero-media__image[data-hd-css-managed-media="hero"],
html body #hd-site-header img.hero-media__image[data-hd-css-managed-media="hero"] {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: var(--hero-image-fit) !important;
  object-position: var(--hero-image-position) !important;
  margin: 0 auto !important;
  transform: translate(var(--hero-image-x), var(--hero-image-y)) scale(var(--hero-image-scale)) !important;
  transform-origin: center center !important;
  box-sizing: border-box !important;
}

/* Hide old overlay/fallback items */
html body #hd-header-shell .hero-overlay,
html body #hd-site-header .hero-overlay,
html body #hd-header-shell .hero-media__fallback,
html body #hd-site-header .hero-media__fallback {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
}

/* =========================================================
CTA button row
========================================================= */
html body #hd-header-shell .hero-links,
html body #hd-site-header .hero-links,
html body #hd-header-shell .hero-links.hero-links--left,
html body #hd-site-header .hero-links.hero-links--left,
html body #hd-header-shell .hd-hero-cta-shell,
html body #hd-site-header .hd-hero-cta-shell {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  grid-row: 2 !important;
  z-index: 2 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
}

html body #hd-header-shell .hero-pill,
html body #hd-site-header .hero-pill,
html body #hd-header-shell .hero-banner .hero-pill,
html body #hd-site-header .hero-banner .hero-pill {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .8rem !important;
  width: min(var(--hero-cta-width), 100%) !important;
  min-width: 0 !important;
  min-height: var(--hero-cta-min-height) !important;
  padding: .68rem 1.25rem !important;
  border-radius: var(--hero-cta-radius) !important;
  background: var(--hero-cta-bg) !important;
  color: var(--hero-cta-colour) !important;
  border: 1px solid color-mix(in srgb, var(--colour-accent, #c7a23a) 50%, var(--colour-primary, #00728a)) !important;
  box-shadow: var(--hero-cta-shadow) !important;
  font-size: var(--hero-cta-font-size) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-decoration: none !important;
  text-align: center !important;
  transform: none !important;
  box-sizing: border-box !important;
}

html body #hd-header-shell .hero-pill:hover,
html body #hd-header-shell .hero-pill:focus-visible,
html body #hd-site-header .hero-pill:hover,
html body #hd-site-header .hero-pill:focus-visible {
  background: var(--hero-cta-hover-bg) !important;
  color: var(--hero-cta-hover-colour) !important;
  box-shadow: var(--hero-cta-hover-shadow) !important;
  text-decoration: none !important;
}

/* =========================================================
Navigation rail alignment
========================================================= */
html body #hd-header-shell .hd-primary-nav-wrap,
html body #hd-site-header .hd-primary-nav-wrap,
html body #nav-container .hd-primary-nav,
html body #hd-header-shell .hd-primary-nav,
html body #hd-site-header .hd-primary-nav {
  width: var(--hero-rail-width) !important;
  max-width: var(--hero-rail-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* =========================================================
Tablet
========================================================= */
@media (min-width: 761px) and (max-width: 1280px) {
  :root {
    --hero-banner-padding-top: clamp(16px, 2vw, 26px);
    --hero-banner-padding-bottom: clamp(16px, 2vw, 26px);
    --hero-artwork-width: clamp(560px, 58vw, 720px);
    --hero-artwork-aspect: 2 / 1;
    --hero-image-fit: contain;
    --hero-image-position: center center;
    --hero-image-scale: 1.48;
    --hero-image-x: 0px;
    --hero-image-y: 0px;
    --hero-stack-gap: clamp(13px, 1.5vw, 20px);
    --hero-cta-width: 270px;
    --hero-cta-min-height: 50px;
    --hero-cta-font-size: .96rem;
  }
}

/* =========================================================
Mobile
Banner height kept tight, house image around 15% larger
========================================================= */
@media (max-width: 760px) {
  :root {
    --hero-rail-width: var(--hd-mobile-component-rail);
    --hero-banner-radius: 20px;
    --hero-banner-margin-top: 8px;

    /* Keep banner height tight */
    --hero-banner-padding-top: 10px;
    --hero-banner-padding-right: 12px;
    --hero-banner-padding-bottom: 12px;
    --hero-banner-padding-left: 12px;

    /*
    Mobile house image enlarged by around 15%.
    Width and scale are increased, while the banner spacing stays compact.
    */
    --hero-artwork-width: var(--mobile-hero-image-width);
    --hero-artwork-aspect: 1.72 / 1;
    --hero-image-fit: contain;
    --hero-image-position: center center;
    --hero-image-scale: 1.36;
    --hero-image-x: 0px;
    --hero-image-y: 0px;

    /* Compact gap between image and CTA */
    --hero-stack-gap: 10px;

    /* Compact CTA */
    --hero-cta-width: var(--mobile-hero-cta-width);
    --hero-cta-min-height: 38px;
    --hero-cta-font-size: .82rem;
  }

  html body #hd-header-shell .hero-banner.hd-hero-banner-shell,
  html body #hd-site-header #hd-header-shell .hero-banner.hd-hero-banner-shell,
  html body #hd-header-shell [data-hd-hero-banner="true"],
  html body .hd-hero-banner-shell,
  html body [data-hd-hero-banner] {
    width: var(--hero-rail-width) !important;
    max-width: var(--hero-rail-width) !important;
    margin: var(--hero-banner-margin-top) auto 0 !important;
    padding:
    var(--hero-banner-padding-top)
    var(--hero-banner-padding-right)
    var(--hero-banner-padding-bottom)
    var(--hero-banner-padding-left) !important;
    border-radius: var(--hero-banner-radius) !important;
    overflow: hidden !important;
  }

  html body #hd-header-shell .hd-hero-content-stack,
  html body #hd-site-header .hd-hero-content-stack {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    justify-items: center !important;
    align-items: center !important;
    gap: var(--hero-stack-gap) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body #hd-header-shell .hero-media.hd-hero-media-shell,
  html body #hd-site-header .hero-media.hd-hero-media-shell,
  html body #hd-header-shell .hero-banner > .hero-media,
  html body #hd-site-header .hero-banner > .hero-media {
    width: var(--hero-artwork-width) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }

  html body #hd-header-shell .hd-hero-artwork-frame,
  html body #hd-site-header .hd-hero-artwork-frame {
    width: var(--hero-artwork-width) !important;
    max-width: 100% !important;
    aspect-ratio: var(--hero-artwork-aspect) !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  html body #hd-header-shell .hd-hero-artwork-frame img.hero-media__image,
  html body #hd-site-header .hd-hero-artwork-frame img.hero-media__image,
  html body #hd-header-shell img.hero-media__image[data-hd-css-managed-media="hero"],
  html body #hd-site-header img.hero-media__image[data-hd-css-managed-media="hero"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: var(--hero-image-fit) !important;
    object-position: var(--hero-image-position) !important;
    transform: translate(var(--hero-image-x), var(--hero-image-y)) scale(var(--hero-image-scale)) !important;
    transform-origin: center center !important;
  }

  html body #hd-header-shell .hero-links,
  html body #hd-site-header .hero-links,
  html body #hd-header-shell .hero-links.hero-links--left,
  html body #hd-site-header .hero-links.hero-links--left,
  html body #hd-header-shell .hd-hero-cta-shell,
  html body #hd-site-header .hd-hero-cta-shell {
    position: static !important;
    grid-row: 2 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 4 !important;
  }

  html body #hd-header-shell .hero-pill,
  html body #hd-site-header .hero-pill,
  html body #hd-header-shell .hero-banner .hero-pill,
  html body #hd-site-header .hero-banner .hero-pill {
    width: var(--hero-cta-width) !important;
    min-height: var(--hero-cta-min-height) !important;
    padding: .5rem .8rem !important;
    font-size: var(--hero-cta-font-size) !important;
    line-height: 1.1 !important;
    border-radius: 11px !important;
  }
}

/* v1048 wider CTA banner rail and complementary CTA/nav background
Owner: hero_banner_cta. Aligns the CTA banner with the current main shell/navigation rail without borrowing the exact navigation-button colour. */
:root {
  --hero-rail-width: min(calc(100% - clamp(1rem, 3.2vw, 3.5rem)), 1320px);
  --hero-banner-bg: var(--colour-cta-shell-bg, color-mix(in srgb, var(--colour-surface-banner, #d9d5ec) 72%, var(--colour-accent, #c7a23a) 8%, var(--colour-surface, #fff) 20%));
}

/* v1051 core rail alignment: CTA banner uses the same outer rail as primary navigation. */
:root {
  --hero-rail-width: min(100%, 1320px);
  --hero-banner-margin-top: clamp(10px, 1.35vw, 18px);
  --hero-banner-padding-top: clamp(14px, 1.55vw, 24px);
  --hero-banner-padding-bottom: clamp(14px, 1.55vw, 24px);
  --hero-banner-bg: var(--colour-cta-shell-bg, color-mix(in srgb, var(--colour-surface-banner, #d9d5ec) 70%, var(--colour-surface, #fffdf8) 30%));
}

/* v1095: keep the hero/banner surface distinct from the primary navigation rail while staying token-led. */
.hd-hero-banner,
.hd-hero,
.hd-banner-cta,
.hd-hero-cta,
.hd-public-hero,
.hd-site-hero {
  background: color-mix(in srgb, var(--colour-accent, #c8922e) 12%, var(--colour-surface, #fffdf6) 88%);
}

/* === Primary navigation [primary_navigation] === */
/* =========================================================
HD RMS primary_navigation v1000
Clean owner section.
Owns primary nav shell, nav grid, nav links, hover/current states
and bottom page navigation rows.
Mobile nav sizing is owned here, not in mobile_display.
========================================================= */

/* =========================================================
Tokens
========================================================= */
:root {

  /* Parent navigation card: aligns with the hero/image banner rail. */
  --nav-parent-width: 100%;
  --nav-parent-max: 100%;
  --nav-parent-margin-top: clamp(10px, 1.5vw, 16px);
  --nav-parent-padding-y: 12px;
  --nav-parent-padding-x: 12px;
  --nav-parent-radius: 20px;
  --nav-parent-bg: var(--colour-nav-shell-bg, color-mix(in srgb, var(--colour-surface-banner, #d9d5ec) 48%, var(--colour-footer-bg, #6f5849) 10%, var(--colour-surface, #fffdf8) 42%));
  --nav-parent-border: color-mix(in srgb, var(--colour-primary, #46387f) 18%, transparent);
  --nav-parent-shadow: none;

  /* Inner button set: can be narrower/wider independently of the parent card. */
  --nav-shell-width: 780px;
  --nav-shell-max: 780px;
  --nav-shell-margin-top: 0px;
  --nav-shell-padding: 0px;
  --nav-shell-radius: 14px;
  --nav-grid-gap: 8px;
  --nav-grid-columns: 3;
  --nav-button-height: 52px;
  --nav-button-radius: 10px;
  --nav-button-padding-y: .5rem;
  --nav-button-padding-x: .9rem;
  --nav-button-font-size: clamp(.94rem, 1vw, 1.02rem);
  --nav-button-font-weight: 780;
  --nav-button-line-height: 1.12;
  --nav-underline-height: 3px;
  --nav-underline-width: 3.2rem;
  --nav-underline-bottom: 7px;
  --nav-shell-bg: transparent;
  --nav-button-bg: var(--colour-nav-bg, var(--colour-primary, #466832));
  --nav-button-text: var(--colour-nav-text, var(--colour-on-primary, #ffffff));
  --nav-current-bg: var(
  --colour-nav-current-bg,
  color-mix(in srgb, var(--nav-button-bg) 72%, #000 28%)
  );
  --nav-current-text: var(--colour-nav-current-text, var(--colour-on-primary, #ffffff));
  --nav-hover-shadow: 0 10px 20px rgba(32, 24, 45, .12);
}

/* =========================================================
Nav shell
========================================================= */
#hd-header-shell #nav-container,
#hd-site-header #nav-container,
#nav-container,
.hd-primary-nav-shell,
.hd-primary-nav-wrap,
.hd-main-navigation {
  box-sizing: border-box !important;
  width: min(100%, var(--nav-parent-width)) !important;
  max-width: var(--nav-parent-max) !important;
  margin: var(--nav-parent-margin-top) auto 0 !important;
  padding: var(--nav-parent-padding-y) var(--nav-parent-padding-x) !important;
  border: 1px solid var(--nav-parent-border) !important;
  border-radius: var(--nav-parent-radius) !important;
  background: var(--nav-parent-bg) !important;
  box-shadow: var(--nav-parent-shadow) !important;
}

/* Inner nav card controls the menu rail independently of the larger parent. */
#hd-header-shell #nav-container > #nav-header,
#hd-site-header #nav-container > #nav-header,
#nav-container > #nav-header,
#hd-header-shell #nav-header,
#hd-site-header #nav-header,
#nav-header,
.hd-primary-nav-card {
  box-sizing: border-box !important;
  display: block !important;
  width: min(100%, var(--nav-shell-width)) !important;
  max-width: var(--nav-shell-max) !important;
  min-width: 0 !important;
  margin: var(--nav-shell-margin-top) auto 0 !important;
  padding: var(--nav-shell-padding) !important;
  border: 0 !important;
  border-radius: var(--nav-shell-radius) !important;
  background: var(--nav-shell-bg) !important;
}

#hd-header-shell #nav-container > .hd-primary-nav,
#hd-site-header #nav-container > .hd-primary-nav,
#nav-container > .hd-primary-nav {
  box-sizing: border-box !important;
  display: block !important;
  width: min(100%, var(--nav-shell-width)) !important;
  max-width: var(--nav-shell-max) !important;
  margin: 0 auto !important;
}

/* =========================================================
Nav grid
========================================================= */
#hd-header-shell #nav-container .hd-primary-nav,
#hd-site-header #nav-container .hd-primary-nav,
#nav-container .hd-primary-nav,
#hd-header-shell #nav-header .hd-primary-nav,
#hd-site-header #nav-header .hd-primary-nav,
#nav-header .hd-primary-nav,
#hd-header-shell .hd-primary-nav,
#hd-site-header .hd-primary-nav,
.hd-primary-nav,
.hd-main-nav,
.hd-main-nav ul {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(var(--nav-grid-columns), minmax(0, 1fr)) !important;
  gap: var(--nav-grid-gap) !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#hd-header-shell .hd-primary-nav__item,
#hd-site-header .hd-primary-nav__item,
.hd-primary-nav__item {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================================
Nav links / buttons
========================================================= */
#hd-header-shell #nav-container .hd-primary-nav__link,
#hd-header-shell #nav-container a.hd-primary-nav__link,
#hd-header-shell .hd-primary-nav .hd-primary-nav__link,
#hd-header-shell #nav-header a,
#hd-site-header #nav-container .hd-primary-nav__link,
#hd-site-header #nav-container a.hd-primary-nav__link,
#hd-site-header .hd-primary-nav .hd-primary-nav__link,
#hd-site-header #nav-header a,
#nav-container .hd-primary-nav__link,
#nav-container .hd-primary-nav a,
.hd-primary-nav__link,
.hd-primary-nav a,
.hd-main-nav a,
.hd-main-nav button {
  box-sizing: border-box !important;
  position: relative !important;
  isolation: isolate !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: var(--nav-button-height) !important;
  min-height: var(--nav-button-height) !important;
  margin: 0 !important;
  padding: var(--nav-button-padding-y) var(--nav-button-padding-x) !important;
  border: 1px solid transparent !important;
  border-radius: var(--nav-button-radius) !important;
  background: var(--nav-button-bg) !important;
  color: var(--nav-button-text) !important;
  box-shadow: none !important;
  font-size: var(--nav-button-font-size) !important;
  font-weight: var(--nav-button-font-weight) !important;
  line-height: var(--nav-button-line-height) !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
  overflow: hidden !important;
  transform: none !important;
  transition:
  background-color .16s ease,
  color .16s ease,
  border-color .16s ease,
  box-shadow .16s ease !important;
}

/* Label */
#hd-header-shell .hd-primary-nav__label,
#hd-site-header .hd-primary-nav__label,
#nav-container .hd-primary-nav__label,
.hd-primary-nav__label,
.hd-primary-nav a span,
.hd-main-nav a span {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  line-height: var(--nav-button-line-height) !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  transform: none !important;
}

/* Remove older label underline */
#hd-header-shell .hd-primary-nav__label::after,
#hd-site-header .hd-primary-nav__label::after,
#nav-container .hd-primary-nav__label::after,
.hd-primary-nav__label::after,
.hd-primary-nav a span::after,
.hd-main-nav a span::after {
  content: none !important;
  display: none !important;
}

/* Link-level underline */
#hd-header-shell #nav-container .hd-primary-nav__link::after,
#hd-header-shell #nav-container a.hd-primary-nav__link::after,
#hd-header-shell .hd-primary-nav .hd-primary-nav__link::after,
#hd-header-shell #nav-header a::after,
#hd-site-header #nav-container .hd-primary-nav__link::after,
#hd-site-header #nav-container a.hd-primary-nav__link::after,
#hd-site-header .hd-primary-nav .hd-primary-nav__link::after,
#hd-site-header #nav-header a::after,
#nav-container .hd-primary-nav__link::after,
#nav-container .hd-primary-nav a::after,
.hd-primary-nav__link::after,
.hd-primary-nav a::after,
.hd-main-nav a::after,
.hd-main-nav button::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  bottom: var(--nav-underline-bottom) !important;
  width: min(var(--nav-underline-width), calc(100% - 2rem)) !important;
  height: var(--nav-underline-height) !important;
  border-radius: 999px !important;
  background: currentColor !important;
  opacity: 0 !important;
  transform: translateX(-50%) scaleX(.72) !important;
  transform-origin: center !important;
  transition: opacity .16s ease, transform .16s ease !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Remove any older before underline/icon effects */
#hd-header-shell #nav-container .hd-primary-nav__link::before,
#hd-site-header #nav-container .hd-primary-nav__link::before,
#nav-container .hd-primary-nav__link::before,
.hd-primary-nav__link::before,
.hd-primary-nav a::before,
.hd-main-nav a::before,
.hd-main-nav button::before {
  content: none !important;
  display: none !important;
}

/* =========================================================
Hover / focus
========================================================= */
#hd-header-shell #nav-container .hd-primary-nav__link:hover,
#hd-header-shell #nav-container .hd-primary-nav__link:focus-visible,
#hd-header-shell #nav-container a.hd-primary-nav__link:hover,
#hd-header-shell #nav-container a.hd-primary-nav__link:focus-visible,
#hd-header-shell #nav-header a:hover,
#hd-header-shell #nav-header a:focus-visible,
#hd-site-header #nav-container .hd-primary-nav__link:hover,
#hd-site-header #nav-container .hd-primary-nav__link:focus-visible,
#hd-site-header #nav-container a.hd-primary-nav__link:hover,
#hd-site-header #nav-container a.hd-primary-nav__link:focus-visible,
#hd-site-header #nav-header a:hover,
#hd-site-header #nav-header a:focus-visible,
#nav-container .hd-primary-nav__link:hover,
#nav-container .hd-primary-nav__link:focus-visible,
#nav-container .hd-primary-nav a:hover,
#nav-container .hd-primary-nav a:focus-visible,
.hd-primary-nav__link:hover,
.hd-primary-nav__link:focus-visible,
.hd-primary-nav a:hover,
.hd-primary-nav a:focus-visible,
.hd-main-nav a:hover,
.hd-main-nav a:focus-visible,
.hd-main-nav button:hover,
.hd-main-nav button:focus-visible {
  background: var(--nav-button-bg) !important;
  color: var(--nav-button-text) !important;
  border-color: color-mix(in srgb, currentColor 28%, transparent) !important;
  box-shadow: var(--nav-hover-shadow) !important;
  transform: none !important;
  text-decoration: none !important;
}

#hd-header-shell #nav-container .hd-primary-nav__link:hover::after,
#hd-header-shell #nav-container .hd-primary-nav__link:focus-visible::after,
#hd-header-shell #nav-container a.hd-primary-nav__link:hover::after,
#hd-header-shell #nav-container a.hd-primary-nav__link:focus-visible::after,
#hd-header-shell #nav-header a:hover::after,
#hd-header-shell #nav-header a:focus-visible::after,
#hd-site-header #nav-container .hd-primary-nav__link:hover::after,
#hd-site-header #nav-container .hd-primary-nav__link:focus-visible::after,
#hd-site-header #nav-container a.hd-primary-nav__link:hover::after,
#hd-site-header #nav-container a.hd-primary-nav__link:focus-visible::after,
#hd-site-header #nav-header a:hover::after,
#hd-site-header #nav-header a:focus-visible::after,
#nav-container .hd-primary-nav__link:hover::after,
#nav-container .hd-primary-nav__link:focus-visible::after,
#nav-container .hd-primary-nav a:hover::after,
#nav-container .hd-primary-nav a:focus-visible::after,
.hd-primary-nav__link:hover::after,
.hd-primary-nav__link:focus-visible::after,
.hd-primary-nav a:hover::after,
.hd-primary-nav a:focus-visible::after,
.hd-main-nav a:hover::after,
.hd-main-nav a:focus-visible::after,
.hd-main-nav button:hover::after,
.hd-main-nav button:focus-visible::after {
  opacity: 1 !important;
  transform: translateX(-50%) scaleX(1) !important;
}

/* =========================================================
Current / active state
========================================================= */
#hd-header-shell #nav-container .hd-primary-nav__link.is-active,
#hd-header-shell #nav-container .hd-primary-nav__link.active,
#hd-header-shell #nav-container .hd-primary-nav__link.hd-nav-current,
#hd-header-shell #nav-container .hd-primary-nav__link[aria-current="page"],
#hd-header-shell #nav-container a.hd-primary-nav__link.is-active,
#hd-header-shell #nav-container a.hd-primary-nav__link.active,
#hd-header-shell #nav-container a.hd-primary-nav__link.hd-nav-current,
#hd-header-shell #nav-container a.hd-primary-nav__link[aria-current="page"],
#hd-header-shell #nav-header a.is-active,
#hd-header-shell #nav-header a.active,
#hd-header-shell #nav-header a.hd-nav-current,
#hd-header-shell #nav-header a[aria-current="page"],
#hd-site-header #nav-container .hd-primary-nav__link.is-active,
#hd-site-header #nav-container .hd-primary-nav__link.active,
#hd-site-header #nav-container .hd-primary-nav__link.hd-nav-current,
#hd-site-header #nav-container .hd-primary-nav__link[aria-current="page"],
#hd-site-header #nav-header a.is-active,
#hd-site-header #nav-header a.active,
#hd-site-header #nav-header a.hd-nav-current,
#hd-site-header #nav-header a[aria-current="page"],
#nav-container .hd-primary-nav__link.is-active,
#nav-container .hd-primary-nav__link.active,
#nav-container .hd-primary-nav__link.hd-nav-current,
#nav-container .hd-primary-nav__link[aria-current="page"],
.hd-primary-nav__link.is-active,
.hd-primary-nav__link.active,
.hd-primary-nav__link.hd-nav-current,
.hd-primary-nav__link[aria-current="page"] {
  background: var(--nav-current-bg) !important;
  color: var(--nav-current-text) !important;
  border-color: color-mix(in srgb, var(--nav-current-bg) 68%, #000 32%) !important;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--nav-current-text, #fff) 22%, transparent) !important;
  text-decoration: none !important;
}

/* Do not show underline on current item unless hovered/focused */
#hd-header-shell #nav-container .hd-primary-nav__link[aria-current="page"]:not(:hover):not(:focus-visible)::after,
#hd-header-shell #nav-container .hd-primary-nav__link.is-active:not(:hover):not(:focus-visible)::after,
#hd-header-shell #nav-container .hd-primary-nav__link.active:not(:hover):not(:focus-visible)::after,
#hd-header-shell #nav-container .hd-primary-nav__link.hd-nav-current:not(:hover):not(:focus-visible)::after,
#hd-site-header #nav-container .hd-primary-nav__link[aria-current="page"]:not(:hover):not(:focus-visible)::after,
#hd-site-header #nav-container .hd-primary-nav__link.is-active:not(:hover):not(:focus-visible)::after,
#hd-site-header #nav-container .hd-primary-nav__link.active:not(:hover):not(:focus-visible)::after,
#hd-site-header #nav-container .hd-primary-nav__link.hd-nav-current:not(:hover):not(:focus-visible)::after,
#nav-container .hd-primary-nav__link[aria-current="page"]:not(:hover):not(:focus-visible)::after,
.hd-primary-nav__link[aria-current="page"]:not(:hover):not(:focus-visible)::after,
.hd-primary-nav__link.is-active:not(:hover):not(:focus-visible)::after,
.hd-primary-nav__link.active:not(:hover):not(:focus-visible)::after,
.hd-primary-nav__link.hd-nav-current:not(:hover):not(:focus-visible)::after {
  opacity: 0 !important;
}

/* =========================================================
Tablet
========================================================= */
@media (min-width: 761px) and (max-width: 1280px) {
  :root {
    --nav-parent-width: var(--hd-mobile-inner-width, min(calc(100% - 28px), 760px));
    --nav-parent-max: var(--hd-mobile-inner-width, min(calc(100% - 28px), 760px));
    --nav-shell-width: 100%;
    --nav-shell-max: 100%;
    --nav-shell-padding: clamp(7px, 1vw, 10px);
    --nav-shell-radius: 16px;
    --nav-grid-gap: clamp(6px, .8vw, 8px);
    --nav-button-height: clamp(42px, 4.5vw, 50px);
    --nav-button-padding-y: .45rem;
    --nav-button-padding-x: .72rem;
    --nav-button-font-size: clamp(.86rem, 1.15vw, .96rem);
    --nav-underline-width: 2.8rem;
    --nav-underline-bottom: 6px;
  }

  #hd-header-shell #nav-container,
  #hd-site-header #nav-container,
  #nav-container,
  .hd-primary-nav-wrap,
  .hd-main-navigation {
    width: min(100%, var(--nav-parent-width)) !important;
    max-width: var(--nav-parent-max) !important;
    margin-inline: auto !important;
  }
}

/* =========================================================
Mobile
Smaller/lighter two-column primary navigation
========================================================= */
@media (max-width: 760px) {
  :root {
    --nav-parent-width: var(--hd-mobile-inner-width, min(calc(100% - 28px), 760px));
    --nav-parent-max: var(--hd-mobile-inner-width, min(calc(100% - 28px), 760px));
    --nav-shell-width: 100%;
    --nav-shell-max: 100%;
    --nav-shell-margin-top: clamp(8px, 2.2vw, 11px);
    --nav-shell-padding: 6px;
    --nav-shell-radius: 14px;
    --nav-grid-columns: 2;
    --nav-grid-gap: 6px;
    --nav-button-height: 38px;
    --nav-button-radius: 9px;
    --nav-button-padding-y: .42rem;
    --nav-button-padding-x: .5rem;
    --nav-button-font-size: clamp(.78rem, 3.25vw, .88rem);
    --nav-button-font-weight: 760;
    --nav-button-line-height: 1.08;
    --nav-underline-height: 0px;
    --nav-underline-width: 0px;
    --nav-underline-bottom: 0px;
    --nav-hover-shadow: none;
  }

  #hd-header-shell #nav-container,
  #hd-site-header #nav-container,
  #nav-container,
  .hd-primary-nav-wrap,
  .hd-main-navigation {
    width: min(100%, var(--nav-parent-width)) !important;
    max-width: var(--nav-parent-max) !important;
    margin: var(--nav-parent-margin-top) auto 0 !important;
    padding: var(--nav-parent-padding-y) var(--nav-parent-padding-x) !important;
    border-radius: var(--nav-parent-radius) !important;
  }

  #hd-header-shell #nav-container .hd-primary-nav,
  #hd-site-header #nav-container .hd-primary-nav,
  #nav-container .hd-primary-nav,
  #hd-header-shell #nav-header .hd-primary-nav,
  #hd-site-header #nav-header .hd-primary-nav,
  #nav-header .hd-primary-nav,
  #hd-header-shell .hd-primary-nav,
  #hd-site-header .hd-primary-nav,
  .hd-primary-nav,
  .hd-main-nav,
  .hd-main-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--nav-grid-gap) !important;
  }

  #hd-header-shell #nav-container .hd-primary-nav__link,
  #hd-header-shell #nav-container a.hd-primary-nav__link,
  #hd-header-shell .hd-primary-nav .hd-primary-nav__link,
  #hd-header-shell #nav-header a,
  #hd-site-header #nav-container .hd-primary-nav__link,
  #hd-site-header #nav-container a.hd-primary-nav__link,
  #hd-site-header .hd-primary-nav .hd-primary-nav__link,
  #hd-site-header #nav-header a,
  #nav-container .hd-primary-nav__link,
  #nav-container .hd-primary-nav a,
  .hd-primary-nav__link,
  .hd-primary-nav a,
  .hd-main-nav a,
  .hd-main-nav button {
    height: var(--nav-button-height) !important;
    min-height: var(--nav-button-height) !important;
    padding: var(--nav-button-padding-y) var(--nav-button-padding-x) !important;
    border-radius: var(--nav-button-radius) !important;
    font-size: var(--nav-button-font-size) !important;
    font-weight: var(--nav-button-font-weight) !important;
    line-height: var(--nav-button-line-height) !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
  }

  #hd-header-shell .hd-primary-nav__label,
  #hd-site-header .hd-primary-nav__label,
  #nav-container .hd-primary-nav__label,
  .hd-primary-nav__label,
  .hd-primary-nav a span,
  .hd-main-nav a span {
    line-height: var(--nav-button-line-height) !important;
    padding: 0 !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* Mobile: remove underline treatment entirely to reduce visual weight */
  #hd-header-shell #nav-container .hd-primary-nav__link::after,
  #hd-header-shell #nav-container a.hd-primary-nav__link::after,
  #hd-header-shell .hd-primary-nav .hd-primary-nav__link::after,
  #hd-header-shell #nav-header a::after,
  #hd-site-header #nav-container .hd-primary-nav__link::after,
  #hd-site-header #nav-container a.hd-primary-nav__link::after,
  #hd-site-header .hd-primary-nav .hd-primary-nav__link::after,
  #hd-site-header #nav-header a::after,
  #nav-container .hd-primary-nav__link::after,
  #nav-container .hd-primary-nav a::after,
  .hd-primary-nav__link::after,
  .hd-primary-nav a::after,
  .hd-main-nav a::after,
  .hd-main-nav button::after {
    content: none !important;
    display: none !important;
  }
}

/* =========================================================
Bottom page navigation rows
========================================================= */
.hd-admin-nav,
.hd-public-nav--bottom {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-top: 1px solid var(--colour-border-soft) !important;
  padding-top: 16px !important;
  margin-top: 24px !important;
}

.hd-admin-nav .hd-btn,
.hd-public-nav--bottom .hd-btn {
  min-width: 118px !important;
}

/* =========================================================
Print
========================================================= */
@media print {
  .hd-site-header,
  .hd-header,
  .hd-main-nav,
  .hd-accessibility,
  .hd-search,
  .hd-bottom-toolbar,
  .hd-admin-strip {
    display: none !important;
  }
}

/* =========================================================
HD RMS v1000 primary navigation narrow viewport correction.
Owner: primary_navigation.
Moves the compact two-column nav breakpoint to 900px so it aligns with the
header's centred narrow/tablet stack.
========================================================= */
@media (min-width: 761px) and (max-width: 900px) {
  :root {
    --nav-parent-width: var(--hd-mobile-inner-width, min(calc(100% - 28px), 760px));
    --nav-parent-max: var(--hd-mobile-inner-width, min(calc(100% - 28px), 760px));
    --nav-shell-width: 100%;
    --nav-shell-max: 100%;
    --nav-shell-margin-top: clamp(8px, 2vw, 12px);
    --nav-shell-padding: 6px;
    --nav-shell-radius: 14px;
    --nav-grid-columns: 2;
    --nav-grid-gap: 6px;
    --nav-button-height: 40px;
    --nav-button-padding-y: .42rem;
    --nav-button-padding-x: .55rem;
    --nav-button-font-size: clamp(.82rem, 2.2vw, .92rem);
    --nav-underline-height: 0px;
    --nav-underline-width: 0px;
    --nav-underline-bottom: 0px;
    --nav-hover-shadow: none;
  }

  #hd-header-shell #nav-container,
  #hd-site-header #nav-container,
  #nav-container,
  .hd-primary-nav-wrap,
  .hd-main-navigation {
    width: min(100%, var(--nav-parent-width)) !important;
    max-width: var(--nav-parent-max) !important;
    margin: var(--nav-parent-margin-top) auto 0 !important;
  }

  #hd-header-shell #nav-container .hd-primary-nav,
  #hd-site-header #nav-container .hd-primary-nav,
  #nav-container .hd-primary-nav,
  .hd-primary-nav,
  .hd-main-nav,
  .hd-main-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #hd-header-shell #nav-container .hd-primary-nav__link::after,
  #hd-site-header #nav-container .hd-primary-nav__link::after,
  #nav-container .hd-primary-nav__link::after,
  .hd-primary-nav__link::after,
  .hd-primary-nav a::after,
  .hd-main-nav a::after,
  .hd-main-nav button::after {
    content: none !important;
    display: none !important;
  }
}

/* v1062 header/navigation shell width alignment
Owners: header_banner and primary_navigation
Purpose: align the header shell and primary-navigation rail with the main H1/content shell width. */
:root {
  --hd-shell-content-width-current: var(--site-shell-width, var(--site-wrapper-max, 1100px));
}

html body #hd-header-shell,
html body .hd-site-header-shell,
html body #nav-container,
html body [data-hd-shell-role="primary-nav-shell"] {
  box-sizing: border-box !important;
  width: min(100%, var(--hd-shell-content-width-current)) !important;
  max-width: var(--hd-shell-content-width-current) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* v1048 nav and CTA visual flow
Owner: primary_navigation. The parent navigation card is intentionally related to, but not identical to, the button colour. */
:root {
  --nav-parent-bg: var(--colour-nav-shell-bg, color-mix(in srgb, var(--colour-surface-banner, #d9d5ec) 48%, var(--colour-footer-bg, #6f5849) 10%, var(--colour-surface, #fffdf8) 42%));
  --nav-parent-border: color-mix(in srgb, var(--colour-primary, #46387f) 18%, transparent);
  --nav-button-bg: var(--colour-nav-bg, var(--colour-primary, #46387f));
  --nav-current-bg: var(--colour-nav-current-bg, color-mix(in srgb, var(--nav-button-bg) 76%, #000 24%));
}

/* v1051 nav/CTA width contract: parent nav card aligns with hero CTA rail. */
:root {
  --nav-parent-width: min(100%, 1320px);
  --nav-parent-max: min(100%, 1320px);
  --nav-parent-margin-top: clamp(10px, 1.35vw, 18px);
  --nav-parent-bg: var(--colour-nav-shell-bg, color-mix(in srgb, var(--colour-surface-banner, #d9d5ec) 54%, var(--colour-surface, #fffdf8) 46%));
}

/* =========================================================
HD RMS v1103 primary navigation mobile rail correction
Owner: primary_navigation.
Purpose: one canonical rail/card rule. The tonal surface belongs to the parent
navigation card, while primary buttons keep the action colour. Mobile and desktop
spacing are deliberately separate and even.
========================================================= */
:root {
  --hd-primary-nav-rail-bg: color-mix(in srgb, var(--colour-surface-strong, #d9c5ae) 76%, var(--colour-surface, #fffaf1) 24%);
  --hd-primary-nav-rail-border: color-mix(in srgb, var(--colour-border, #bd8a61) 64%, transparent);
  --hd-primary-nav-rail-pad-y: clamp(18px, 2.2vw, 28px);
  --hd-primary-nav-rail-pad-x: clamp(22px, 3vw, 36px);
  --hd-primary-nav-gap: clamp(12px, 1.5vw, 18px);
}

#nav-container,
.hd-primary-nav,
.primary-navigation,
.hd-primary-navigation,
.hd-primary-nav-shell,
.hd-primary-nav-panel,
.hd-primary-nav-rail,
.hd-site-primary-nav,
.hd-public-primary-nav,
.hd-main-navigation,
.hd-page-nav,
.hd-public-nav-links,
.nav-primary-panel,
.primary-nav-panel,
nav[aria-label="Primary"] {
  background: var(--hd-primary-nav-rail-bg) !important;
  border: 1px solid var(--hd-primary-nav-rail-border) !important;
  border-radius: var(--radius-xl, 24px) !important;
  padding: var(--hd-primary-nav-rail-pad-y) var(--hd-primary-nav-rail-pad-x) !important;
  box-shadow: var(--shadow-soft, 0 18px 44px rgba(0,0,0,.08)) !important;
  box-sizing: border-box !important;
}

#nav-container ul,
.hd-primary-nav ul,
.primary-navigation ul,
.hd-primary-navigation ul,
.hd-site-primary-nav ul,
.hd-public-primary-nav ul,
.hd-main-navigation ul,
.hd-page-nav ul,
.hd-public-nav-links ul,
.nav-primary-list,
.primary-nav-list,
.hd-primary-nav-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: var(--hd-primary-nav-gap) !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: stretch !important;
}

#nav-container a,
.hd-primary-nav a,
.primary-navigation a,
.hd-primary-navigation a,
.hd-site-primary-nav a,
.hd-public-primary-nav a,
.hd-main-navigation a,
.hd-page-nav a,
.hd-public-nav-links a {
  min-height: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.18 !important;
  font-size: clamp(1rem, 1.05vw, 1.13rem) !important;
  text-align: center !important;
}

@media (max-width: 760px) {
  :root {
    --hd-primary-nav-rail-pad-y: clamp(14px, 4.2vw, 18px);
    --hd-primary-nav-rail-pad-x: clamp(14px, 4vw, 18px);
    --hd-primary-nav-gap: clamp(10px, 3.3vw, 14px);
  }

  #nav-container,
  .hd-primary-nav,
  .primary-navigation,
  .hd-primary-navigation,
  .hd-primary-nav-shell,
  .hd-primary-nav-panel,
  .hd-primary-nav-rail,
  .hd-site-primary-nav,
  .hd-public-primary-nav,
  .hd-main-navigation,
  .hd-page-nav,
  .hd-public-nav-links,
  .nav-primary-panel,
  .primary-nav-panel,
  nav[aria-label="Primary"] {
    width: min(calc(100% - 20px), 430px) !important;
    max-width: min(calc(100% - 20px), 430px) !important;
    margin-inline: auto !important;
    background: var(--hd-primary-nav-rail-bg) !important;
  }

  #nav-container ul,
  .hd-primary-nav ul,
  .primary-navigation ul,
  .hd-primary-navigation ul,
  .hd-site-primary-nav ul,
  .hd-public-primary-nav ul,
  .hd-main-navigation ul,
  .hd-page-nav ul,
  .hd-public-nav-links ul,
  .nav-primary-list,
  .primary-nav-list,
  .hd-primary-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #nav-container a,
  .hd-primary-nav a,
  .primary-navigation a,
  .hd-primary-navigation a,
  .hd-site-primary-nav a,
  .hd-public-primary-nav a,
  .hd-main-navigation a,
  .hd-page-nav a,
  .hd-public-nav-links a {
    min-height: 48px !important;
    padding: 12px 10px !important;
    font-size: clamp(.94rem, 4vw, 1.05rem) !important;
  }
}

/* === Main content areas and headings [main_content] === */
/* HD RMS v997 owner contract: main_content
Owner: Main content areas and headings.
Owns the canonical main content shell, content rail, global message-region spacing,
first-content rhythm, page headings, readable content rhythm and normalised page flow.
Does not own header, hero/banner, navigation, footer, public form components,
admin tool-specific cards, generic buttons/forms/tables or mobile component layouts.
*/
:root {
  --hd-main-content-pad-x: clamp(28px, 3.2vw, 48px);
  --hd-main-content-pad-x-mobile: clamp(18px, 4.8vw, 24px);
  --hd-main-top-gap: 0px;
  --hd-main-bottom-gap: clamp(34px, 4vw, 54px);
  --hd-first-title-gap-after: clamp(10px, 1vw, 14px);
  --hd-content-surface-gap: clamp(14px, 1.6vw, 20px);
  --hd-content-card-pad-mobile: clamp(18px, 5vw, 24px);
  --hd-page-title-size: clamp(2rem, 3vw, 2.75rem);
  --hd-page-title-size-mobile: var(--hd-mobile-h1-size, clamp(1.38rem, 6.15vw, 1.72rem));
  --hd-page-title-line: 1.12;
  --hd-page-body-line: 1.58;
  --hd-page-body-size: clamp(1rem, 1.05vw, 1.08rem);
  --hd-page-body-size-mobile: clamp(1rem, 4.3vw, 1.08rem);
  --hd-page-flow-gap: clamp(12px, 1.35vw, 20px);
}

/* Main content rail */
#hd-site-main.hd-main-content-shell,
main#hd-site-main,
.hd-main-content-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 var(--hd-main-bottom-gap);
  background: var(--main-content-bg, var(--colour-surface, #fffdf6));
  color: var(--colour-text, #0e2a35);
  box-sizing: border-box;
  overflow: visible;
}

#hd-main.hd-main-content-wrapper,
.hd-main-content-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 var(--hd-main-content-pad-x);
  box-sizing: border-box;
  overflow: visible;
}

#hd-site-main .hd-main-inner,
#hd-site-main .hd-main-content-inner,
#hd-site-main .hd-main-content-inner--shared,
#hd-main .hd-main-inner,
#hd-main .hd-main-content-inner,
#hd-main .hd-main-content-inner--shared {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}

/* Global message region */
#hd-message-region,
.hd-message-region {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#hd-message-region.hd-message-region--global,
.hd-message-region[data-hd-message-region="global"] {
  display: grid;
  gap: .75rem;
  margin: 0 0 clamp(10px, 1.2vw, 16px);
}

#hd-message-region:empty,
.hd-message-region:empty,
.hd-message-region[hidden],
.hd-message-region[aria-hidden="true"] {
  display: none;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* First visible content contract */
#hd-site-main .hd-main-content-inner > :first-child:not(#hd-message-region),
#hd-site-main .hd-main-content-inner > #hd-message-region + *,
#hd-main .hd-main-content-inner > :first-child:not(#hd-message-region),
#hd-main .hd-main-content-inner > #hd-message-region + *,
#hd-main .hd-main-content-inner > .hd-content-panel:first-child,
#hd-main .hd-main-content-inner > .hd-standard-page-shell:first-child,
#hd-main .hd-main-content-inner > .hd-public-page:first-child,
#hd-main .hd-main-content-inner > .hd-tool-page:first-child,
#hd-main .hd-main-content-inner > .hd-admin-tool-page:first-child {
  margin-top: 0;
  padding-top: 0;
}

#hd-site-main .hd-content-panel,
#hd-site-main .hd-standard-page-shell,
#hd-site-main .hd-public-page,
#hd-site-main .hd-tool-page,
#hd-site-main .hd-admin-tool-page,
#hd-main .hd-content-panel,
#hd-main .hd-standard-page-shell,
#hd-main .hd-public-page,
#hd-main .hd-tool-page,
#hd-main .hd-admin-tool-page {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  margin-top: 0;
  padding-top: 0;
}

#hd-site-main .hd-content-panel,
#hd-site-main .hd-standard-page-shell,
#hd-site-main .hd-public-page,
#hd-site-main .hd-tool-page,
#hd-site-main .hd-admin-tool-page {
  display: grid;
  gap: var(--hd-content-surface-gap);
}

#hd-site-main .hd-content-panel > *,
#hd-site-main .hd-standard-page-shell > *,
#hd-site-main .hd-public-page > *,
#hd-site-main .hd-tool-page > *,
#hd-site-main .hd-admin-tool-page > * {
  min-width: 0;
  box-sizing: border-box;
}

/* Hidden top anchors must not become grid items. When these anchors are
display:block inside a grid page shell, row-gap is still inserted before the
first H1. Keep the anchor addressable but remove it from the flow. */
#hd-site-main .hd-anchor,
#hd-site-main #top.hd-anchor,
#hd-site-main [id="top"].hd-anchor {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#hd-site-main .hd-anchor:first-child + *,
#hd-site-main #top.hd-anchor + *,
#hd-site-main [id="top"].hd-anchor + * {
  margin-top: 0;
  padding-top: 0;
}

/* Page heading rhythm */
#hd-site-main .hd-page-heading-card,
#hd-site-main .hd-tool-heading,
#hd-site-main .hd-admin-hero,
#hd-site-main .hd-page-intro {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--hd-first-title-gap-after);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

#hd-site-main .hd-page-heading-card:first-child,
#hd-site-main .hd-content-panel > .hd-page-heading-card:first-child,
#hd-site-main .hd-tool-page > .hd-page-heading-card:first-child,
#hd-site-main .hd-public-page > .hd-page-heading-card:first-child {
  margin-top: 0;
  padding-top: 0;
}

#hd-site-main h1,
#hd-site-main .hd-page-title,
#hd-main h1,
#hd-main .hd-page-title {
  margin: 0 0 var(--hd-first-title-gap-after);
  padding: 0;
  color: var(--colour-heading, #12364a);
  font-size: var(--hd-page-title-size);
  line-height: var(--hd-page-title-line);
  font-weight: 760;
  letter-spacing: .012em;
  overflow: visible;
  max-width: 100%;
}

#hd-site-main .hd-page-heading-card > h1,
#hd-site-main .hd-page-heading-card > .hd-page-title,
#hd-site-main .hd-tool-heading > h1,
#hd-site-main .hd-admin-hero > h1 {
  margin-bottom: 0;
}

#hd-site-main h2,
#hd-main h2 {
  margin: 0 0 .7rem;
  padding: 0 0 .42rem;
  color: var(--colour-heading, #12364a);
  font-size: clamp(1.16rem, 1.55vw, 1.42rem);
  line-height: 1.24;
  font-weight: 720;
  border: 0;
  border-bottom: 1px solid var(--colour-border-soft, rgba(24, 45, 55, .16));
}

#hd-site-main h3,
#hd-main h3 {
  margin: 0 0 .55rem;
  color: var(--colour-heading, #12364a);
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.28;
  font-weight: 700;
}

/* Readable text rhythm */
#hd-site-main p,
#hd-site-main li,
#hd-site-main dd,
#hd-site-main dt,
#hd-main p,
#hd-main li,
#hd-main dd,
#hd-main dt {
  font-size: var(--hd-page-body-size);
  line-height: var(--hd-page-body-line);
  overflow-wrap: normal;
  word-break: normal;
}

#hd-site-main p,
#hd-main p {
  margin: 0 0 .82rem;
}

#hd-site-main p:last-child,
#hd-main p:last-child {
  margin-bottom: 0;
}

#hd-site-main .hd-card,
#hd-site-main .hd-panel,
#hd-site-main .hd-content-card,
#hd-site-main .hd-page-section,
#hd-site-main .hd-public-section,
#hd-site-main .content-card {
  box-sizing: border-box;
  max-width: 100%;
  overflow: visible;
}

#hd-site-main .hd-admin-nav--bottom,
#hd-site-main .hd-public-nav--bottom {
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: clamp(14px, 2vw, 22px);
  border-top: 1px solid var(--colour-border-soft, rgba(24, 45, 55, .16));
}

/* Public content page shell rhythm */
.hd-public-content-surface,
.hd-page-shell--public-page,
.hd-public-page {
  --hd-public-page-gap: clamp(12px, 1.4vw, 20px);
  --hd-public-card-padding: clamp(18px, 2vw, 28px);
}

.hd-page-shell--public-page.hd-content-panel,
.hd-public-page.hd-content-panel {
  margin-top: 0;
}

.hd-page-shell--public-page > section:first-child,
.hd-public-page > section:first-child {
  display: grid;
  gap: var(--hd-public-page-gap);
}

.hd-page-shell--public-page .hd-page-heading-card,
.hd-public-page .hd-page-heading-card,
.hd-public-page .hd-anchor + .hd-page-heading-card,
.hd-page-shell--public-page .hd-anchor + .hd-page-heading-card {
  margin: 0;
  padding: 0;
}

.hd-page-shell--public-page .hd-page-heading-card + .hd-card,
.hd-public-page .hd-page-heading-card + .hd-card,
.hd-page-shell--public-page .hd-page-heading-card + section,
.hd-public-page .hd-page-heading-card + section,
.hd-page-shell--public-page .hd-page-heading-card + form,
.hd-public-page .hd-page-heading-card + form {
  margin-top: 0;
}

.hd-public-page .hd-mt-14,
.hd-page-shell--public-page .hd-mt-14 {
  margin-top: var(--hd-public-page-gap);
}

#hd-main .hd-public-page > section > :first-child,
#hd-main .hd-page-shell--public-page > section > :first-child {
  margin-top: 0;
}

/* Normalised page flow */
.hd-page-shell-normalised {
  --hd-page-flow-gap: clamp(12px, 1.35vw, 20px);
  --hd-page-card-pad: clamp(18px, 2.1vw, 28px);
  margin-top: 0;
}

.hd-main-content-inner > .hd-page-shell-normalised:first-child,
.hd-main-content-inner > .hd-content-panel:first-child,
.hd-main-content-inner > .hd-admin-content-surface:first-child,
.hd-main-content-inner > .hd-public-content-surface:first-child {
  margin-top: 0;
}

.hd-page-shell-normalised > :first-child,
.hd-page-shell-normalised section:first-child > :first-child,
.hd-page-shell-normalised article:first-child > :first-child,
.hd-page-shell-normalised form:first-child > :first-child,
.hd-page-shell-normalised .hd-section-stack > :first-child,
.hd-page-shell-normalised .hd-content-stack > :first-child,
.hd-page-shell-normalised .hd-form-stack > :first-child {
  margin-top: 0;
}

.hd-page-shell-normalised .hd-page-heading-card:first-child,
.hd-page-shell-normalised .hd-anchor + .hd-page-heading-card,
.hd-page-shell-normalised #top + .hd-page-heading-card {
  margin-top: 0;
  padding-top: 0;
}

.hd-page-shell-normalised .hd-page-title,
.hd-page-shell-normalised h1:first-child {
  margin-top: 0;
}

.hd-page-shell-normalised .hd-page-heading-card + *,
.hd-page-shell-normalised h1:first-child + *,
.hd-page-shell-normalised .hd-page-title + * {
  margin-top: var(--hd-page-flow-gap);
}

.hd-page-shell-normalised .hd-content-panel,
.hd-page-shell-normalised .hd-card,
.hd-page-shell-normalised .hd-admin-card,
.hd-page-shell-normalised .hd-public-card {
  min-width: 0;
}

.hd-page-shell-normalised .hd-section-stack,
.hd-page-shell-normalised .hd-content-stack,
.hd-page-shell-normalised .hd-form-stack {
  display: grid;
  gap: var(--hd-page-flow-gap);
}

.hd-page-shell-normalised .hd-section-stack > :last-child,
.hd-page-shell-normalised .hd-content-stack > :last-child,
.hd-page-shell-normalised .hd-form-stack > :last-child {
  margin-bottom: 0;
}

/* Mobile behaviour for this owner only */
@media (max-width: 760px) {
  :root {
    --hd-main-top-gap: 0px;
    --hd-main-bottom-gap: clamp(24px, 8vw, 40px);
    --hd-content-surface-gap: clamp(14px, 4vw, 20px);
    --hd-first-title-gap-after: clamp(10px, 2.6vw, 14px);
    --hd-page-flow-gap: 11px;
  }

  #hd-main.hd-main-content-wrapper,
  .hd-main-content-wrapper {
    padding-left: var(--hd-main-content-pad-x-mobile);
    padding-right: var(--hd-main-content-pad-x-mobile);
  }

  #hd-site-main h1,
  #hd-site-main .hd-page-title,
  #hd-main h1,
  #hd-main .hd-page-title {
    font-size: var(--hd-page-title-size-mobile);
    line-height: 1.12;
    letter-spacing: .02em;
  }

  #hd-site-main p,
  #hd-site-main li,
  #hd-site-main dd,
  #hd-site-main dt,
  #hd-main p,
  #hd-main li,
  #hd-main dd,
  #hd-main dt {
    font-size: var(--hd-page-body-size-mobile);
    line-height: 1.52;
  }

  #hd-site-main .hd-card,
  #hd-site-main .hd-panel,
  #hd-site-main .hd-content-card,
  #hd-site-main .hd-page-section,
  #hd-site-main .hd-public-section,
  #hd-site-main .content-card,
  .hd-page-shell-normalised .hd-card,
  .hd-page-shell-normalised .hd-admin-card,
  .hd-page-shell-normalised .hd-public-card,
  .hd-page-shell-normalised .hd-standard-card,
  .hd-page-shell-normalised .hd-content-card {
    padding-left: var(--hd-content-card-pad-mobile);
    padding-right: var(--hd-content-card-pad-mobile);
  }

  .hd-public-content-surface,
  .hd-page-shell--public-page,
  .hd-public-page {
    --hd-public-page-gap: 12px;
    --hd-public-card-padding: clamp(14px, 4vw, 18px);
  }

  .hd-page-shell-normalised .hd-page-heading-card + *,
  .hd-page-shell-normalised h1:first-child + *,
  .hd-page-shell-normalised .hd-page-title + * {
    margin-top: 10px;
  }
}

/* =========================================================
HD RMS v1102 canonical first-title placement
Owner: main_content.
Purpose: remove layered H1/top-gap corrections and keep hidden top anchors
out of grid flow so they cannot create a gap before the first page title.
========================================================= */
:root {
  --hd-main-top-gap: 0px;
  --hd-first-title-gap-after: clamp(10px, 1vw, 14px);
  --hd-content-surface-gap: clamp(14px, 1.6vw, 20px);
}

body.hd-public-body #hd-site-main,
body.hd-public-body main#hd-site-main,
body.hd-admin-body #hd-site-main,
body.hd-admin-body main#hd-site-main,
body.is-public-page #hd-site-main,
body.is-public-page main#hd-site-main,
body.is-admin-page #hd-site-main,
body.is-admin-page main#hd-site-main {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}

body.hd-public-body #hd-main.hd-main-content-wrapper,
body.hd-public-body .hd-main-content-wrapper,
body.hd-admin-body #hd-main.hd-main-content-wrapper,
body.hd-admin-body .hd-main-content-wrapper,
body.is-public-page #hd-main.hd-main-content-wrapper,
body.is-public-page .hd-main-content-wrapper,
body.is-admin-page #hd-main.hd-main-content-wrapper,
body.is-admin-page .hd-main-content-wrapper {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}

body.hd-public-body #hd-main .hd-main-content-inner,
body.hd-public-body #hd-main .hd-main-inner,
body.hd-admin-body #hd-main .hd-main-content-inner,
body.hd-admin-body #hd-main .hd-main-inner,
body.is-public-page #hd-main .hd-main-content-inner,
body.is-public-page #hd-main .hd-main-inner,
body.is-admin-page #hd-main .hd-main-content-inner,
body.is-admin-page #hd-main .hd-main-inner {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}

body.hd-public-body #hd-main .hd-content-panel:first-child,
body.hd-public-body #hd-main .hd-standard-page-shell:first-child,
body.hd-public-body #hd-main .hd-public-page:first-child,
body.hd-admin-body #hd-main .hd-content-panel:first-child,
body.hd-admin-body #hd-main .hd-admin-tool-page:first-child,
body.is-public-page #hd-main .hd-content-panel:first-child,
body.is-public-page #hd-main .hd-standard-page-shell:first-child,
body.is-public-page #hd-main .hd-public-page:first-child,
body.is-admin-page #hd-main .hd-content-panel:first-child,
body.is-admin-page #hd-main .hd-admin-tool-page:first-child {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
  align-content: start !important;
  justify-content: stretch !important;
  min-block-size: 0 !important;
}

body.hd-public-body #hd-main .hd-content-panel:first-child > :first-child,
body.hd-public-body #hd-main .hd-public-page:first-child > :first-child,
body.hd-admin-body #hd-main .hd-content-panel:first-child > :first-child,
body.hd-admin-body #hd-main .hd-admin-tool-page:first-child > :first-child,
body.is-public-page #hd-main .hd-content-panel:first-child > :first-child,
body.is-public-page #hd-main .hd-public-page:first-child > :first-child,
body.is-admin-page #hd-main .hd-content-panel:first-child > :first-child,
body.is-admin-page #hd-main .hd-admin-tool-page:first-child > :first-child {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}

body.hd-public-body #hd-main :is(.hd-anchor,#top).hd-anchor:first-child,
body.hd-admin-body #hd-main :is(.hd-anchor,#top).hd-anchor:first-child,
body.is-public-page #hd-main :is(.hd-anchor,#top).hd-anchor:first-child,
body.is-admin-page #hd-main :is(.hd-anchor,#top).hd-anchor:first-child {
  position: absolute !important;
  inset-block-start: 0 !important;
  inset-inline-start: 0 !important;
  display: block !important;
  block-size: 1px !important;
  inline-size: 1px !important;
  min-block-size: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  line-height: 0 !important;
}

body.hd-public-body #hd-main :is(.hd-anchor,#top).hd-anchor:first-child + :is(h1,.hd-page-title,.hd-page-heading-card),
body.hd-admin-body #hd-main :is(.hd-anchor,#top).hd-anchor:first-child + :is(h1,.hd-page-title,.hd-page-heading-card),
body.is-public-page #hd-main :is(.hd-anchor,#top).hd-anchor:first-child + :is(h1,.hd-page-title,.hd-page-heading-card),
body.is-admin-page #hd-main :is(.hd-anchor,#top).hd-anchor:first-child + :is(h1,.hd-page-title,.hd-page-heading-card),
body.hd-public-body #hd-main :is(h1,.hd-page-title,.hd-page-heading-card):first-child,
body.hd-admin-body #hd-main :is(h1,.hd-page-title,.hd-page-heading-card):first-child,
body.is-public-page #hd-main :is(h1,.hd-page-title,.hd-page-heading-card):first-child,
body.is-admin-page #hd-main :is(h1,.hd-page-title,.hd-page-heading-card):first-child {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}

body.hd-public-body #hd-main :is(h1,.hd-page-title):first-of-type,
body.hd-admin-body #hd-main :is(h1,.hd-page-title):first-of-type,
body.is-public-page #hd-main :is(h1,.hd-page-title):first-of-type,
body.is-admin-page #hd-main :is(h1,.hd-page-title):first-of-type {
  margin-block-start: 0 !important;
  margin-block-end: var(--hd-first-title-gap-after) !important;
}

@media (max-width: 760px) {
  :root {
    --hd-first-title-gap-after: 10px;
    --hd-content-surface-gap: 14px;
  }

  body.hd-public-body #hd-site-main,
  body.hd-public-body main#hd-site-main,
  body.hd-admin-body #hd-site-main,
  body.hd-admin-body main#hd-site-main {
    padding-block-start: 0 !important;
  }
}

/* === Public page content blocks [page_content_blocks] === */
/* HD RMS v1013 owner cleanup: blog/update cards and action/result cards are now removed from this generic public-content owner. */

/* =========================================================
HD RMS page_content_blocks v972
Clean owner section.
Owns:
- public content sections and public cards
- rich public page content: headings inside cards, prose, lists, tables
- public content images and embeds
- public resource/update/search result cards
- public suite navigation used within content pages
- public error/processing cards
Does not own:
- header/banner/CTA/nav/footer shell layout
- admin inline editor editing UI
- admin tool hub cards
- timeline-specific layout
- global typography or whole-site link styling
========================================================= */
:root {
  --pcb-card-bg: var(--colour-surface, #fffdf8);
  --pcb-card-bg-soft: var(--colour-surface-soft, #f7f0df);
  --colour-panel-tint: color-mix(in srgb, var(--colour-accent, #a8672e) 10%, var(--colour-surface, #fffdf8));
  --pcb-card-bg-strong: var(--colour-surface-strong, var(--colour-surface, #fffdf8));
  --pcb-card-border: var(--colour-border-soft, #d8cdb9);
  --pcb-card-text: var(--colour-text, #12212b);
  --pcb-card-heading: var(--colour-heading, #073a63);
  --pcb-card-muted: var(--colour-muted, #526474);
  --pcb-card-link: var(--colour-link, var(--colour-primary, #06456b));
  --pcb-card-link-hover: var(--colour-link-hover, var(--colour-primary-hover, #053b5d));
  --pcb-card-shadow: 0 10px 24px rgba(10, 24, 32, .06);
  --pcb-card-radius: var(--radius-card, 18px);
  --pcb-card-padding: clamp(18px, 2.2vw, 28px);
  --pcb-card-gap: clamp(14px, 2vw, 22px);
  --pcb-section-gap: clamp(16px, 2.2vw, 26px);
  --pcb-media-radius: var(--media-radius, 14px);
  --pcb-focus-ring: var(--hd-focus-ring-soft, color-mix(in srgb, var(--colour-focus-ring, var(--colour-accent, #b8872f)) 32%, transparent));
}

/* =========================================================
Public page surface and first-heading rhythm
========================================================= */
#hd-site-main .hd-public-page,
#hd-site-main .hd-public-content-surface,
#hd-site-main .hd-page-shell-normalised.hd-public-page,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db {
  box-sizing: border-box !important;
  display: grid !important;
  gap: var(--pcb-section-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  color: var(--pcb-card-text) !important;
}

#hd-site-main .hd-public-page > #top:first-child,
#hd-site-main .hd-public-page > .top.hd-anchor:first-child,
#hd-site-main .hd-public-page > .hd-anchor:first-child,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > #top.hd-anchor,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > .top.hd-anchor,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > .hd-anchor:first-child {
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  line-height: 0 !important;
}

#hd-site-main .hd-public-page > #top:first-child + *,
#hd-site-main .hd-public-page > .top.hd-anchor:first-child + *,
#hd-site-main .hd-public-page > .hd-anchor:first-child + *,
#hd-site-main .hd-public-page > section:first-of-type,
#hd-site-main .hd-public-page > .hd-page-heading-card:first-child,
#hd-site-main .hd-public-page .hd-page-heading-card:first-child,
#hd-site-main .hd-public-content-surface .hd-page-heading-card:first-child,
#hd-site-main .hd-public-page > h1:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hd-public-page .hd-page-heading-card,
body.is-public-page #hd-site-main .hd-page-heading-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 clamp(.85rem, 1.8vw, 1.25rem) !important;
}

.hd-public-page .hd-page-heading-card h1,
.hd-public-page .hd-page-heading-card h2,
.hd-public-page .hd-page-title {
  margin-top: 0 !important;
  color: var(--pcb-card-heading) !important;
}

.hd-public-page .hd-page-heading-card .hd-eyebrow,
.hd-public-page .hd-eyebrow {
  color: var(--pcb-card-muted) !important;
}

/* =========================================================
Public cards and content sections
========================================================= */
.hd-public-page .hd-card,
.hd-public-page .hd-content-card,
.hd-public-page .hd-page-section,
.hd-public-page .hd-public-card,
.hd-public-page .hd-public-section--card,
.hd-public-page section.hd-card,
.hd-public-page article.hd-card,
.hd-public-content-card,
.hd-public-page-card,
body.is-public-page #hd-site-main .hd-card,
body.hd-public-body #hd-site-main .hd-card,
body.is-public-page #hd-site-main .hd-content-card,
body.hd-public-body #hd-site-main .hd-content-card,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > section.hd-page-section.hd-public-section.hd-content-card[data-hd-public-section="section"] {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: var(--pcb-card-padding) !important;
  border: 1px solid var(--pcb-card-border) !important;
  border-radius: var(--pcb-card-radius) !important;
  background: var(--pcb-card-bg) !important;
  color: var(--pcb-card-text) !important;
  box-shadow: var(--pcb-card-shadow) !important;
  overflow-wrap: anywhere !important;
}

.hd-public-page .hd-card + .hd-card,
.hd-public-page .hd-content-card + .hd-content-card,
.hd-public-page .hd-page-section + .hd-page-section,
.hd-public-page .hd-public-section--card + .hd-public-section--card,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > section.hd-page-section.hd-public-section.hd-content-card[data-hd-public-section="section"] + section.hd-page-section.hd-public-section.hd-content-card[data-hd-public-section="section"] {
  margin-top: var(--pcb-card-gap) !important;
}

.hd-public-page .hd-card > :first-child,
.hd-public-page .hd-content-card > :first-child,
.hd-public-page .hd-page-section > :first-child,
.hd-public-page .hd-public-section--card > :first-child,
.hd-public-content-card > :first-child,
.hd-public-page-card > :first-child {
  margin-top: 0 !important;
}

.hd-public-page .hd-card > :last-child,
.hd-public-page .hd-content-card > :last-child,
.hd-public-page .hd-page-section > :last-child,
.hd-public-page .hd-public-section--card > :last-child,
.hd-public-content-card > :last-child,
.hd-public-page-card > :last-child {
  margin-bottom: 0 !important;
}

.hd-public-page .hd-card .hd-card,
.hd-public-page .hd-content-card .hd-card,
.hd-public-page .hd-page-section .hd-card,
.hd-public-page .hd-content-card .hd-content-card,
.hd-public-page .hd-page-section .hd-page-section {
  background: var(--pcb-card-bg-soft) !important;
  border-color: color-mix(in srgb, var(--pcb-card-border) 72%, transparent) !important;
  box-shadow: none !important;
}

.hd-public-page .hd-card:focus-within,
.hd-public-page .hd-content-card:focus-within,
.hd-public-page .hd-public-card:focus-within,
.hd-public-page .hd-resource-card:focus-within,
.hd-public-page .hd-search-result-card:focus-within {
  box-shadow: 0 0 0 4px var(--pcb-focus-ring) !important;
}

/* =========================================================
Rich public content: headings, prose, links, lists, tables
========================================================= */
.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) :where(h2, h3) {
  color: var(--pcb-card-heading) !important;
  line-height: 1.22 !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card) > :where(h2, h3):first-child,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > section.hd-page-section.hd-public-section.hd-content-card[data-hd-public-section="section"] > :where(h2, .hd-public-section__title):first-child {
  margin-top: 0 !important;
  margin-bottom: clamp(.75rem, 1.6vw, 1.1rem) !important;
  padding-bottom: .5rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--pcb-card-border) 78%, transparent) !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) :where(p, li, dd) {
  color: var(--pcb-card-text) !important;
  line-height: 1.6 !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) :where(a:not(.hd-btn):not(.hd-icon-btn)) {
  color: var(--pcb-card-link) !important;
  text-decoration-thickness: .09em !important;
  text-underline-offset: .16em !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) :where(a:not(.hd-btn):not(.hd-icon-btn):hover, a:not(.hd-btn):not(.hd-icon-btn):focus-visible) {
  color: var(--pcb-card-link-hover) !important;
  text-decoration-thickness: .13em !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) :where(ul, ol),
.hd-content-list {
  display: block !important;
  margin: .75rem 0 1rem 1.45rem !important;
  padding-left: 1.2rem !important;
  list-style-position: outside !important;
  line-height: 1.6 !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) ul,
.hd-content-list--bullets {
  list-style-type: disc !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) ol,
.hd-content-list--numbered {
  list-style-type: decimal !important;
}

.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) li,
.hd-content-list__item {
  display: list-item !important;
  margin: .34rem 0 !important;
  padding-left: .18rem !important;
  line-height: 1.6 !important;
}

.hd-public-page li > :first-child {
  margin-top: 0 !important;
}

.hd-public-page li > :last-child {
  margin-bottom: 0 !important;
}

.hd-public-page ol li::marker,
.hd-content-list--numbered li::marker {
  font-weight: 800 !important;
  color: var(--colour-accent, #1f4b66) !important;
}

.hd-public-page ul li::marker,
.hd-content-list--bullets li::marker {
  color: var(--colour-accent, #1f4b66) !important;
}

.hd-content-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 1.2rem 0 !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.hd-content-table,
.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1rem 0 !important;
  background: var(--pcb-card-bg) !important;
}

.hd-content-table th,
.hd-content-table td,
.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) th,
.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) td {
  border: 1px solid var(--pcb-card-border) !important;
  padding: .65rem .75rem !important;
  vertical-align: top !important;
  text-align: left !important;
}

.hd-content-table th,
.hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) th {
  background: var(--pcb-card-bg-soft) !important;
  color: var(--pcb-card-heading) !important;
  font-weight: 850 !important;
}

/* =========================================================
Images, figures, embeds and media in public content
========================================================= */
.hd-content-image {
  display: block !important;
  width: min(var(--hd-content-image-width, 55%), 100%) !important;
  max-width: 100% !important;
  margin: 1.2rem auto !important;
  padding: var(--hd-content-image-spacing, 16px) !important;
  background: var(--hd-content-image-bg, var(--pcb-card-bg)) !important;
  border: 1px solid color-mix(in srgb, var(--pcb-card-border) 72%, transparent) !important;
  border-radius: calc(var(--hd-content-image-radius, 10px) + 8px) !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.hd-content-image__img,
.hd-content-image img,
.hd-public-page .hd-page-section img,
.hd-public-page .hd-content-card img,
.hd-public-page .hd-card img,
.hd-public-page .hd-content-standard img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--hd-content-image-radius, var(--pcb-media-radius)) !important;
  object-fit: contain !important;
}

.hd-content-image__img,
.hd-content-image img {
  width: 100% !important;
  filter: brightness(var(--hd-content-image-brightness, 100%)) contrast(var(--hd-content-image-contrast, 100%)) !important;
  opacity: var(--hd-content-image-opacity, 1) !important;
}

.hd-content-image--align-left {
  margin-left: 0 !important;
  margin-right: auto !important;
}

.hd-content-image--align-center {
  margin-left: auto !important;
  margin-right: auto !important;
}

.hd-content-image--align-right {
  margin-left: auto !important;
  margin-right: 0 !important;
}

.hd-content-image figcaption,
.hd-public-page figure figcaption {
  margin-top: .55rem !important;
  color: var(--pcb-card-muted) !important;
  font-size: .95rem !important;
  line-height: 1.45 !important;
}

.hd-media-frame,
.hd-image-frame,
.hd-asset-frame,
.hd-embed-frame {
  max-width: 100% !important;
  overflow: hidden !important;
  border-radius: var(--pcb-media-radius) !important;
  background: var(--pcb-card-bg-soft) !important;
}

.hd-embed-frame iframe,
.hd-media-frame iframe,
.hd-public-page iframe {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
}

/* =========================================================
Public suite navigation inside content pages
========================================================= */
.hd-public-suite-nav {
  display: grid !important;
  gap: .65rem !important;
  margin: clamp(12px, 2vw, 18px) 0 clamp(18px, 2.6vw, 26px) !important;
  padding: clamp(12px, 1.8vw, 16px) !important;
  border: 1px solid var(--pcb-card-border) !important;
  border-radius: var(--pcb-card-radius) !important;
  background: color-mix(in srgb, var(--pcb-card-bg-soft) 74%, var(--pcb-card-bg)) !important;
  box-shadow: var(--pcb-card-shadow) !important;
}

.hd-public-suite-nav__label {
  display: block !important;
  color: var(--pcb-card-muted) !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.hd-public-suite-nav__links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: center !important;
}

.hd-public-suite-nav__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.45rem !important;
  padding: .55rem .85rem !important;
  border: 1px solid var(--pcb-card-border) !important;
  border-radius: 999px !important;
  background: var(--pcb-card-bg) !important;
  color: var(--pcb-card-heading) !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 14px rgba(10, 24, 32, .05) !important;
}

.hd-public-suite-nav__link:hover,
.hd-public-suite-nav__link:focus-visible,
.hd-public-suite-nav__link.is-active {
  border-color: color-mix(in srgb, var(--colour-primary, #005ea8) 50%, var(--pcb-card-border)) !important;
  background: color-mix(in srgb, var(--colour-primary, #005ea8) 10%, var(--pcb-card-bg)) !important;
  color: var(--pcb-card-heading) !important;
}

.hd-public-suite-nav__link.is-active {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--colour-primary, #005ea8) 26%, transparent) !important;
}

/* =========================================================
Resource, document, search and generic public cards
========================================================= */
.hd-card-list,
.hd-resource-grid,
.hd-resource-list,
.hd-document-list,
.hd-search-results,
.hd-results-list,
.hd-public-card-grid,
.hd-public-page .hd-card-grid,
.hd-public-page .hd-grid--cards {
  display: grid !important;
  gap: clamp(.85rem, 1.8vw, 1.25rem) !important;
  width: 100% !important;
}

.hd-public-card-grid,
.hd-public-page .hd-card-grid,
.hd-public-page .hd-grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
}

.hd-list-card,
.hd-resource-card,
.hd-document-card,
.hd-search-result,
.hd-search-result-card,
.hd-shared-doc-card,
.hd-handbook-card {
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  border: 1px solid var(--pcb-card-border) !important;
  border-radius: var(--pcb-card-radius) !important;
  background: var(--pcb-card-bg) !important;
  color: var(--pcb-card-text) !important;
  box-shadow: var(--pcb-card-shadow) !important;
}

.hd-resource-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  gap: 0 !important;
  overflow: hidden !important;
}

.hd-resource-card__body,
.hd-resource-card__action,
.hd-search-result-card,
.hd-search-result,
.hd-document-card,
.hd-shared-doc-card,
.hd-handbook-card {
  padding: clamp(.95rem, 2vw, 1.25rem) !important;
}

.hd-resource-card__action {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-left: 1px solid var(--pcb-card-border) !important;
  background: color-mix(in srgb, var(--pcb-card-bg) 88%, var(--colour-accent, #2d6a7f) 12%) !important;
}

.hd-resource-card__type,
.hd-search-result-card__path,
.hd-list-card__type,
.hd-card-badge {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  border-radius: 999px !important;
  padding: .22rem .62rem !important;
  background: var(--colour-muted-surface, var(--pcb-card-bg-soft)) !important;
  color: var(--colour-muted-text, var(--pcb-card-muted)) !important;
  font-size: .84rem !important;
  font-weight: 700 !important;
}

.hd-list-card__meta,
.hd-resource-card__meta,
.hd-document-card__meta,
.hd-search-result__meta,
.hd-meta-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .35rem .65rem !important;
  align-items: center !important;
  color: var(--pcb-card-muted) !important;
  font-size: .94rem !important;
}

.hd-list-card__actions,
.hd-resource-card__actions,
.hd-document-card__actions,
.hd-search-result__actions,
.hd-card-actions,
.hd-resource-hub .hd-actions,
.hd-resource-handbook-callout .hd-actions,
#key-links .hd-actions,
.hd-public-hub-card .hd-actions,
.hd-public-card .hd-actions,
.hd-content-card .hd-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .6rem !important;
  align-items: center !important;
}

.hd-public-hub-card .hd-actions,
.hd-public-card .hd-actions,
.hd-content-card .hd-actions {
  justify-content: center !important;
  text-align: center !important;
}

.hd-search-result-card__title {
  display: inline-block !important;
  font-weight: 800 !important;
  font-size: clamp(1rem, 1.5vw, 1.14rem) !important;
  line-height: 1.3 !important;
  color: var(--pcb-card-link) !important;
}

.hd-search-result-card__snippet {
  margin-top: .55rem !important;
  color: var(--pcb-card-text) !important;
}

@media (min-width: 761px) {
  .hd-public-hub-card,
  .hd-public-card--hub {
    min-height: 13rem !important;
  }
}

/* =========================================================
Public Resources page listing polish
========================================================= */
.hd-public-page--resources .hd-resource-hub,
.hd-public-page--resources .hd-manager-content-card {
  background: color-mix(in srgb, var(--pcb-card-bg) 94%, var(--pcb-card-bg-soft) 6%) !important;
  border-color: color-mix(in srgb, var(--pcb-card-border) 74%, var(--pcb-card-heading) 8%) !important;
}

.hd-public-page--resources .hd-resource-list {
  gap: 18px !important;
}

.hd-public-page--resources .hd-resource-card {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 230px) !important;
  gap: clamp(14px, 2vw, 24px) !important;
  border-radius: 20px !important;
}

.hd-public-page--resources .hd-resource-card__body {
  min-width: 0 !important;
  padding: clamp(18px, 2.4vw, 28px) !important;
}

.hd-public-page--resources .hd-resource-card__action {
  display: grid !important;
  place-items: center !important;
  padding: clamp(18px, 2vw, 26px) !important;
  background: color-mix(in srgb, var(--pcb-card-bg-soft) 72%, var(--colour-accent, #b99041) 10%) !important;
}

.hd-public-page--resources .hd-resource-card__action .hd-btn {
  min-width: 150px !important;
  justify-content: center !important;
}

.hd-public-page--resources .hd-resource-card h3 {
  margin-top: 10px !important;
  color: var(--pcb-card-heading) !important;
}

.hd-public-page--resources .hd-resource-card__body p,
.hd-public-page--resources .hd-resource-library-note {
  max-width: 72ch !important;
}

/* =========================================================
Public error and processing cards
========================================================= */
.hd-error-card {
  box-sizing: border-box !important;
  max-width: 42rem !important;
  margin: 2rem auto !important;
  padding: clamp(22px, 4vw, 38px) !important;
  border: 1px solid var(--pcb-card-border) !important;
  border-radius: var(--pcb-card-radius) !important;
  background: var(--pcb-card-bg) !important;
  color: var(--pcb-card-text) !important;
  box-shadow: var(--pcb-card-shadow) !important;
}

.hd-error-card {
  display: grid !important;
  gap: 16px !important;
}

.hd-error-code {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  border: 1px solid var(--pcb-card-border) !important;
  background: var(--pcb-card-bg-soft) !important;
  color: var(--pcb-card-heading) !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

.hd-error-body {
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
  max-width: 820px !important;
}

.hd-error-debug {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  background: var(--pcb-card-bg-soft) !important;
  padding: 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--pcb-card-border) !important;
  overflow: auto !important;
}

/* =========================================================
Mobile adjustments owned by page content blocks
========================================================= */
@media (max-width: 760px) {
  :root {
    --pcb-card-radius: 16px;
    --pcb-card-padding: 16px;
    --pcb-card-gap: 12px;
    --pcb-section-gap: clamp(14px, 4vw, 20px);
  }

  .hd-public-page,
  .hd-public-content-surface {
    gap: var(--pcb-section-gap) !important;
  }

  .hd-content-image {
    width: min(var(--hd-content-image-width-mobile, 100%), 100%) !important;
    padding: clamp(10px, 3vw, 14px) !important;
  }

  .hd-public-suite-nav__links,
  .hd-list-card__actions,
  .hd-resource-card__actions,
  .hd-document-card__actions,
  .hd-search-result__actions,
  .hd-card-actions,
  .hd-resource-hub .hd-actions,
  .hd-resource-handbook-callout .hd-actions,
  #key-links .hd-actions {
    justify-content: center !important;
    text-align: center !important;
  }

  .hd-public-card-grid,
  .hd-public-page .hd-card-grid,
  .hd-public-page .hd-grid--cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .hd-resource-card,
  .hd-public-page--resources .hd-resource-card {
    grid-template-columns: 1fr !important;
  }

  .hd-resource-card__action,
  .hd-public-page--resources .hd-resource-card__action {
    border-left: 0 !important;
    border-top: 1px solid var(--pcb-card-border) !important;
    place-items: stretch !important;
  }

  .hd-resource-card__action .hd-btn,
  .hd-public-page--resources .hd-resource-card__action .hd-btn {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hd-public-page :where(.hd-card, .hd-content-card, .hd-page-section, .hd-public-section--card, .hd-content-standard) :where(ul, ol),
  .hd-content-list {
    margin-left: 1.1rem !important;
    padding-left: 1rem !important;
  }

  .hd-content-table-wrap {
    margin: 1rem 0 !important;
  }
}

/* =========================================================
HD RMS v1004 public page/card/H2 consistency and link-chevron suppression
Owner: page_content_blocks
========================================================= */
:root {
  --hd-public-card-radius: 22px;
  --hd-public-card-pad: clamp(20px, 2.4vw, 32px);
  --hd-public-card-shadow: 0 16px 38px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
  --hd-public-h2-accent: var(--colour-accent, #a8672e);
}

body.is-public-page #hd-site-main .hd-public-page .hd-content-card,
body.is-public-page #hd-site-main .hd-public-page .hd-card,
body.is-public-page #hd-site-main .hd-public-page .hd-page-section,
.hd-public-page .hd-content-card,
.hd-public-page .hd-public-section--card,
.hd-public-page .hd-card {
  border-radius: var(--hd-public-card-radius) !important;
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 88%, var(--colour-accent, #a8672e) 8%) !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: var(--hd-public-card-shadow) !important;
  padding: var(--hd-public-card-pad) !important;
}

.hd-public-page :where(.hd-content-card, .hd-card, .hd-page-section, .hd-public-section--card) > :where(h2, .hd-public-section__title):first-child,
.hd-public-page :where(.hd-content-card, .hd-card, .hd-page-section, .hd-public-section--card) :where(h2):first-child,
body.is-public-page #hd-site-main .hd-content-panel > .hd-public-page.hd-public-page--db > section.hd-page-section.hd-public-section.hd-content-card[data-hd-public-section="section"] > :where(h2, .hd-public-section__title):first-child {
  position: relative !important;
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center !important;
  gap: .75rem !important;
  margin: 0 0 clamp(14px, 1.6vw, 20px) !important;
  padding: 0 0 clamp(8px, 1vw, 12px) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 82%, transparent) !important;
  color: var(--colour-heading, #2e4329) !important;
}

.hd-public-page :where(.hd-content-card, .hd-card, .hd-page-section, .hd-public-section--card) > :where(h2, .hd-public-section__title):first-child::before,
.hd-public-page :where(.hd-content-card, .hd-card, .hd-page-section, .hd-public-section--card) :where(h2):first-child::before {
  content: "" !important;
  display: inline-block !important;
  width: .55rem !important;
  height: 1.4rem !important;
  border-radius: 999px !important;
  background: var(--hd-public-h2-accent) !important;
}

.hd-public-page :where(a.hd-content-link--internal)::after,
.hd-public-page :where(a.hd-content-link)::after,
.hd-content-link::after {
  content: none !important;
  display: none !important;
}

.hd-public-page .hd-actions,
.hd-public-page .hd-card .hd-actions,
.hd-public-page .hd-content-card .hd-actions,
.hd-public-page .hd-public-section .hd-actions {
  justify-content: center !important;
}

.hd-public-page .hd-btn,
.hd-public-page a.hd-btn,
.hd-public-page button.hd-btn {
  color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
  -webkit-text-fill-color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
}

.hd-public-page--accessibility-statement .hd-card,
.hd-public-page--privacy .hd-card,
.hd-public-page--cookies .hd-card,
.hd-public-policy-page .hd-card,
.hd-page-shell--public-page .hd-card {
  border-radius: var(--hd-public-card-radius) !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: var(--hd-public-card-shadow) !important;
}

@media (max-width:760px) {
  :root {
    --hd-public-card-pad: clamp(16px, 4.8vw, 22px);
  }
}

/* HD RMS v1005 public page card and heading consistency.
Owner: page_content_blocks. Restores richer public page cards and H2 treatment without taking over form/button/table owners. */
.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card),
.hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card),
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card),
.hd-public-page--accessibility :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card),
.hd-public-page--privacy :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card),
.hd-public-page--cookies :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) {
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #e0e7d4) 88%, var(--colour-accent, #a8672e) 12%) !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--colour-surface, #fffdf4) 96%, var(--colour-surface-soft, #e9eedd) 4%), var(--colour-surface, #fffdf4)) !important;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent) !important;
  padding: clamp(18px, 2.4vw, 32px) !important;
}

.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child,
.hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child,
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child,
.hd-public-page--accessibility :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child,
.hd-public-page--privacy :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child,
.hd-public-page--cookies :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child {
  display: flex !important;
  align-items: center !important;
  gap: .7rem !important;
  margin: 0 0 1rem !important;
  padding: 0 0 .72rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--colour-border-soft, #e0e7d4) 78%, transparent) !important;
  color: var(--colour-heading, #2e4329) !important;
  font-size: clamp(1.25rem, 1.8vw, 1.62rem) !important;
  line-height: 1.18 !important;
}

.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child::before,
.hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child::before,
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child::before,
.hd-public-page--accessibility :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child::before,
.hd-public-page--privacy :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child::before,
.hd-public-page--cookies :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > h2:first-child::before {
  content: "";
  flex: 0 0 .42rem;
  width: .42rem;
  height: 1.35em;
  border-radius: 999px;
  background: var(--colour-accent, #a8672e);
}

.hd-public-page :is(a.hd-content-link,.hd-content-link--internal)::after,
.hd-page-shell--public-page :is(a.hd-content-link,.hd-content-link--internal)::after {
  content: "" !important;
  display: none !important;
}

/* v1076 pass8: public resources/content integration.
Owner: page_content_blocks. Public Resources library cards, related links and resource callouts only. */
.hd-public-resource-surface {
  --hd-public-resource-gap: clamp(14px, 2vw, 22px);
  --hd-public-resource-radius: 22px;
  --hd-public-resource-line: color-mix(in srgb, var(--colour-border-soft, #d8c9a8) 86%, transparent);
  --hd-public-resource-soft: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 68%, var(--colour-surface, #fffdf8));
}

.hd-public-resource-surface .hd-public-resource-intro-card,
.hd-public-resource-surface .hd-public-resource-library-card,
.hd-public-resource-surface .hd-related-resource-links {
  border-left: 6px solid var(--colour-accent, #b8872f) !important;
  background: linear-gradient(135deg, var(--colour-surface, #fffdf8), var(--hd-public-resource-soft)) !important;
}

.hd-public-resource-surface .hd-public-resource-callout {
  border: 1px solid color-mix(in srgb, var(--colour-primary, #06456b) 24%, var(--hd-public-resource-line)) !important;
  background: color-mix(in srgb, var(--colour-primary, #06456b) 8%, var(--colour-surface, #fffdf8)) !important;
}

.hd-public-resource-surface .hd-resource-list {
  gap: var(--hd-public-resource-gap) !important;
}

.hd-public-resource-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: clamp(12px, 1.5vw, 18px) !important;
  border: 1px solid var(--hd-public-resource-line) !important;
  border-radius: var(--hd-public-resource-radius) !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--colour-shadow, #102630) 9%, transparent) !important;
}

.hd-public-resource-card h3 {
  color: var(--colour-heading, #073b5f) !important;
}

.hd-public-resource-card .hd-resource-card__type {
  display: inline-flex !important;
  width: fit-content !important;
  border: 1px solid color-mix(in srgb, var(--colour-primary, #06456b) 24%, var(--hd-public-resource-line)) !important;
  border-radius: 999px !important;
  padding: .2rem .55rem !important;
  background: color-mix(in srgb, var(--colour-primary, #06456b) 8%, var(--colour-surface, #fffdf8)) !important;
  color: var(--colour-heading, #073b5f) !important;
}

.hd-public-resource-card .hd-resource-card__action {
  align-self: center !important;
}

@media (max-width: 760px) {
  .hd-public-resource-card {
    grid-template-columns: 1fr !important;
  }

  .hd-public-resource-card .hd-resource-card__action,
  .hd-public-resource-card .hd-resource-card__action .hd-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* end v1076 pass8 public resources/content integration */

/* =========================================================
HD RMS v1077 public sitemap page
Owner: page_content_blocks.
========================================================= */
.hd-public-page--sitemap .hd-public-sitemap-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 2vw, 1.45rem) !important;
  margin-top: clamp(1rem, 2vw, 1.35rem) !important;
}

.hd-public-page--sitemap .hd-public-sitemap-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
}

.hd-public-page--sitemap .hd-public-sitemap-list {
  display: grid !important;
  gap: .58rem !important;
  margin: 0 !important;
  padding-left: 1.15rem !important;
}

.hd-public-page--sitemap .hd-public-sitemap-list a {
  font-weight: 750 !important;
}

@media (max-width: 900px) {
  .hd-public-page--sitemap .hd-public-sitemap-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
HD RMS v1080 pass12: public card finished default state.
Owner: page_content_blocks.
Improves the normal, non-hover card state for public cards and generated content
cards without taking ownership of footer, timeline, form or admin-specific cards.
========================================================= */
.hd-public-page,
.hd-public-content-surface,
.hd-page-shell--public-page {
  --hd-public-card-edge: color-mix(in srgb, var(--colour-accent, #b8872f) 76%, var(--colour-border-soft, #d8c9a8) 24%);
  --hd-public-card-line: color-mix(in srgb, var(--colour-border-soft, #d8c9a8) 86%, var(--colour-heading, #073a63) 8%);
  --hd-public-card-soft: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 64%, var(--colour-surface, #fffdf8) 36%);
}

.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card,.hd-public-section--card),
.hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card),
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) {
  position: relative !important;
  border-color: var(--hd-public-card-line) !important;
  background: linear-gradient(145deg,
  color-mix(in srgb, var(--colour-surface, #fffdf8) 94%, #fff 6%),
  var(--hd-public-card-soft)) !important;
  box-shadow: 0 15px 36px color-mix(in srgb, var(--colour-shadow, #102630) 10%, transparent) !important;
}

.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card,.hd-public-section--card)::before,
.hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card)::before,
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card)::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 5px !important;
  border-radius: var(--pcb-card-radius, 18px) 0 0 var(--pcb-card-radius, 18px) !important;
  background: var(--hd-public-card-edge) !important;
  opacity: .72 !important;
}

.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card,.hd-public-section--card):focus-within,
.hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card):focus-within,
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card):focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--colour-focus, var(--colour-accent, #b8872f)) 34%, transparent),
  0 16px 38px color-mix(in srgb, var(--colour-shadow, #102630) 12%, transparent) !important;
}

.hd-public-page :is(.hd-card-grid,.hd-public-card-grid,.hd-resource-list,.hd-public-sitemap-grid) > :is(.hd-card,.hd-public-card,.hd-content-card,.hd-public-sitemap-card,.hd-public-resource-card),
.hd-page-shell--public-page :is(.hd-card-grid,.hd-public-card-grid) > :is(.hd-card,.hd-public-card,.hd-content-card) {
  min-height: 100% !important;
}

.hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card,.hd-public-section--card) > :is(p,ul,ol):last-child,
.hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card) > :is(p,ul,ol):last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 760px) {
  .hd-public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card,.hd-public-section--card)::before,
  .hd-page-shell--public-page :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card)::before,
  .hd-public-content-surface :is(.hd-card,.hd-public-card,.hd-page-section,.hd-content-card)::before {
    width: 4px !important;
    opacity: .62 !important;
  }
}

/* end v1080 pass12 */

/* =========================================================
HD RMS v1103 public card mobile rhythm
Owner: page_content_blocks.
Purpose: shared public card spacing and integrated border-accent behaviour. This
keeps nested cards apart without using loose internal colour strips.
========================================================= */
.hd-content-panel,
.hd-public-page,
.hd-page-content {
  gap: clamp(18px, 2.4vw, 30px) !important;
}

.hd-content-card,
.hd-card,
.hd-public-card,
.hd-page-card,
.hd-rich-content-card {
  border-left-width: 6px;
  border-left-color: var(--colour-accent, #a35a29);
}

.hd-content-card > :first-child,
.hd-card > :first-child,
.hd-public-card > :first-child,
.hd-page-card > :first-child {
  margin-top: 0;
}

.hd-content-card + .hd-content-card,
.hd-card + .hd-card,
.hd-public-card + .hd-public-card,
.hd-page-card + .hd-page-card,
.hd-content-card + .hd-actions,
.hd-card + .hd-actions {
  margin-top: clamp(18px, 2.4vw, 30px) !important;
}

@media (max-width: 760px) {
  .hd-content-panel,
  .hd-public-page,
  .hd-page-content {
    gap: clamp(16px, 5.4vw, 24px) !important;
  }

  .hd-content-card,
  .hd-card,
  .hd-public-card,
  .hd-page-card,
  .hd-rich-content-card {
    padding: clamp(18px, 5.2vw, 24px) !important;
    border-left-width: 5px;
  }
}

/* === Public forms, result pages and subscription flow [public_forms_and_results] === */
/* HD RMS v995 owner contract: public_forms_and_results
Owner: public_forms_and_results
Dropdown: Public forms, result pages and subscription flow
Owns public-facing form pages, result/action-result pages, sign-up,
unsubscribe, contact, accessibility-report and search form presentation.
Does not own generic field controls, generic button design, shared alerts,
public content cards outside forms/results, navigation, shell, footer, recaptcha
base styling or admin tools.
*/
:root {
  --hd-public-form-gap: clamp(14px, 1.8vw, 22px);
  --hd-public-form-card-pad: clamp(18px, 2.6vw, 32px);
  --hd-public-form-radius: 22px;
  --hd-public-form-inner-radius: 18px;
  --hd-public-form-border: color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 88%, var(--colour-accent, #c69a44) 12%);
  --hd-public-form-surface: var(--colour-surface, #fffdf8);
  --hd-public-form-soft: var(--colour-panel-tint, var(--colour-surface-soft, #f3f1e8));
  --hd-public-form-shadow: 0 16px 38px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
}

/* Page scope */
.hd-public-interactive-page,
.hd-form-page.hd-public-page,
.hd-public-page--contact,
.hd-public-page--sign-up-for-updates,
.hd-public-page--unsubscribe,
.hd-public-page--accessibility-report-issue,
.hd-public-page--action-result,
.hd-public-page--search {
  display: grid;
  gap: clamp(16px, 2.4vw, 26px);
  min-width: 0;
}

/* Heading/introduction panels for public interactive pages */
.hd-public-interactive-page .hd-page-heading-card,
.hd-form-page.hd-public-page .hd-page-heading-card,
.hd-public-page--contact .hd-page-heading-card,
.hd-public-page--sign-up-for-updates .hd-page-heading-card,
.hd-public-page--unsubscribe .hd-page-heading-card,
.hd-public-page--accessibility-report-issue .hd-page-heading-card,
.hd-public-page--search .hd-page-heading-card {
  margin-bottom: clamp(12px, 2vw, 20px);
  border: 1px solid var(--hd-public-form-border);
  border-radius: var(--hd-public-form-radius);
  background: color-mix(in srgb, var(--hd-public-form-surface) 95%, var(--colour-surface-soft, #f3f1e8) 5%);
  padding: var(--hd-public-form-card-pad);
  box-shadow: var(--hd-public-form-shadow);
}

.hd-public-interactive-page .hd-public-suite-nav {
  margin-bottom: clamp(16px, 2vw, 22px);
}

/* Form/result cards */
.hd-public-form-card,
.hd-public-result-card,
.hd-public-interactive-page .hd-card:has(form),
.hd-public-page--action-result .hd-card,
#sign-up-for-updates .a11y-panel,
#unsubscribe .a11y-panel {
  border: 1px solid var(--hd-public-form-border);
  border-radius: var(--hd-public-form-radius);
  background: var(--hd-public-form-surface);
  padding: var(--hd-public-form-card-pad);
  box-shadow: var(--hd-public-form-shadow);
  min-width: 0;
}

#sign-up-for-updates .a11y-panel + .a11y-panel,
#unsubscribe .a11y-panel + .a11y-panel,
.hd-public-page--contact .a11y-panel + .a11y-panel,
.hd-public-page--accessibility-report-issue .a11y-panel + .a11y-panel,
.hd-public-interactive-page .a11y-panel + .a11y-panel {
  margin-top: clamp(14px, 1.8vw, 22px);
}

.hd-public-result-card,
.hd-public-page--action-result .hd-card:first-of-type {
  margin-top: 0;
}

.hd-public-page--action-result .hd-public-result-card,
.hd-public-page--action-result .hd-card,
.hd-public-page--sign-up-for-updates .hd-action-processing-card {
  border-left: 7px solid var(--colour-primary, #06456b);
}

.hd-public-page--search .hd-card:has(form) {
  border-left: 7px solid var(--colour-accent, #2d6a7f);
}

/* Public forms: layout only. Base field/button design remains with forms_fields/buttons_actions. */
.hd-public-interactive-page form,
.hd-form-page.hd-public-page form,
.hd-public-page--contact form,
.hd-public-page--sign-up-for-updates form,
.hd-public-page--unsubscribe form,
.hd-public-page--accessibility-report-issue form,
.hd-public-page--search form {
  display: grid;
  gap: var(--hd-public-form-gap);
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 84%, transparent);
  border-radius: var(--hd-public-form-inner-radius);
  background: color-mix(in srgb, var(--hd-public-form-surface) 96%, var(--colour-surface-soft, #f3f1e8) 4%);
  padding: clamp(18px, 2.4vw, 30px);
  box-shadow: none;
}

.hd-public-interactive-page .hd-form,
.hd-public-interactive-page .hd-grid,
.hd-public-page--contact .hd-grid,
.hd-public-page--sign-up-for-updates .hd-grid,
.hd-public-page--unsubscribe .hd-grid,
.hd-public-page--accessibility-report-issue .hd-grid,
#sign-up-for-updates .hd-grid,
#unsubscribe .hd-grid {
  gap: var(--hd-public-form-gap);
  align-items: start;
}

.hd-public-interactive-page .hd-field,
.hd-public-interactive-page .form-row,
.hd-public-interactive-page .hd-form-row {
  margin-bottom: 0;
}

.hd-public-interactive-page label,
.hd-public-interactive-page .hd-field label,
.hd-public-interactive-page .hd-field > span,
.hd-public-page--contact label,
.hd-public-page--accessibility-report-issue label,
#sign-up-for-updates .hd-field label,
#unsubscribe .hd-field label,
.hd-search-form__label {
  display: block;
  margin: 0 0 .45rem;
  font-weight: 850;
  color: var(--colour-heading, #173642);
  letter-spacing: .01em;
}

.hd-search-guidance,
.hd-public-page .hd-help,
.hd-page-shell--public-page .hd-help,
.hd-public-page .hd-form-help,
#unsubscribe .hd-unsubscribe-panel .a11y-help,
#sign-up-for-updates .hd-signup-panel .a11y-help {
  max-width: 72ch;
  color: var(--colour-muted, var(--hd-text-muted, #40535a));
  line-height: 1.45;
}

/* Public-page input sizing where a form/result page needs stronger local rhythm. */
.hd-public-interactive-page input:not([type="checkbox"]):not([type="radio"]),
.hd-public-interactive-page textarea,
.hd-public-interactive-page select,
.hd-public-interactive-page .hd-input,
.hd-public-page--contact input:not([type="checkbox"]):not([type="radio"]),
.hd-public-page--contact textarea,
.hd-public-page--accessibility-report-issue input:not([type="checkbox"]):not([type="radio"]),
.hd-public-page--accessibility-report-issue textarea,
#sign-up-for-updates .hd-input,
#unsubscribe .hd-input {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
}

.hd-public-interactive-page textarea,
.hd-public-page--contact textarea,
.hd-public-page--accessibility-report-issue textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.hd-public-interactive-page input:focus,
.hd-public-interactive-page textarea:focus,
.hd-public-interactive-page select:focus {
  outline: 3px solid color-mix(in srgb, var(--colour-field-focus, var(--colour-primary, #2f4758)) 28%, transparent);
  outline-offset: 2px;
}

/* Choices and confirmation/helper panels */
.hd-public-interactive-page .hd-choice--panel,
.hd-public-interactive-page .hd-checkbox-panel,
.hd-public-page--sign-up-for-updates .hd-choice--panel,
#sign-up-for-updates .hd-choice--panel {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--hd-public-form-soft);
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 80%, transparent);
}

.hd-action-processing-card {
  text-align: center;
  place-items: center;
}

.hd-public-page--accessibility-report-issue .v356-accessibility-note,
.hd-public-page--accessibility-report-issue .hd-form-note,
.hd-public-page--accessibility-report-issue .a11y-help:last-child {
  grid-column: 1 / -1;
  margin: .35rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--hd-public-form-soft) 88%, var(--colour-accent, #c69a44) 12%);
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 70%, var(--colour-accent, #c69a44) 30%);
  color: var(--colour-text, #102630);
}

/* Public form action rows */
.hd-public-interactive-page .hd-actions,
.hd-public-interactive-page .form-actions,
.hd-public-page--sign-up-for-updates .hd-actions,
.hd-public-page--unsubscribe .hd-actions,
.hd-public-page--contact .hd-actions,
.hd-public-page--accessibility-report-issue .hd-actions,
#sign-up-for-updates .hd-actions,
#unsubscribe .hd-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: .35rem;
  padding-top: clamp(14px, 2vw, 20px);
  border-top: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 84%, transparent);
}

/* Mobile behaviour owned by this public form/result component section. */
@media (max-width: 760px) {
  .hd-public-interactive-page form,
  .hd-form-page.hd-public-page form,
  .hd-public-page--contact form,
  .hd-public-page--sign-up-for-updates form,
  .hd-public-page--unsubscribe form,
  .hd-public-page--accessibility-report-issue form,
  .hd-public-page--search form {
    padding: 16px;
    border-radius: 18px;
  }

  .hd-public-form-card,
  .hd-public-result-card,
  .hd-public-interactive-page .hd-card:has(form),
  .hd-public-page--action-result .hd-card,
  #sign-up-for-updates .a11y-panel,
  #unsubscribe .a11y-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .hd-public-interactive-page .hd-actions,
  .hd-public-interactive-page .form-actions,
  .hd-public-page--sign-up-for-updates .hd-actions,
  .hd-public-page--unsubscribe .hd-actions,
  .hd-public-page--contact .hd-actions,
  .hd-public-page--accessibility-report-issue .hd-actions,
  #sign-up-for-updates .hd-actions,
  #unsubscribe .hd-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .hd-public-interactive-page .hd-actions .hd-btn,
  .hd-public-interactive-page .form-actions .hd-btn,
  .hd-public-interactive-page button[type="submit"],
  #sign-up-for-updates .hd-actions .hd-btn,
  #unsubscribe .hd-actions .hd-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
HD RMS v1004 public form/policy page consistency
Owner: public_forms_and_results
========================================================= */
.hd-public-interactive-page .hd-page-heading-card,
.hd-form-page.hd-public-page .hd-page-heading-card,
.hd-public-page--contact .hd-page-heading-card,
.hd-public-page--sign-up-for-updates .hd-page-heading-card,
.hd-public-page--unsubscribe .hd-page-heading-card,
.hd-public-page--accessibility-report-issue .hd-page-heading-card,
.hd-public-page--search .hd-page-heading-card {
  margin-bottom: clamp(10px, 1.5vw, 16px) !important;
}

.hd-public-interactive-page .hd-public-form-card,
.hd-public-interactive-page .hd-public-result-card,
.hd-public-interactive-page .a11y-panel,
.hd-public-interactive-page .hd-card:has(form),
.hd-form-page.hd-public-page form,
.hd-public-page--contact form,
.hd-public-page--sign-up-for-updates form,
.hd-public-page--unsubscribe form,
.hd-public-page--accessibility-report-issue form,
.hd-public-page--search form {
  border-radius: 22px !important;
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 88%, var(--colour-accent, #a8672e) 8%) !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent) !important;
}

.hd-public-interactive-page .hd-actions,
.hd-public-interactive-page .form-actions,
.hd-public-page--sign-up-for-updates .hd-actions,
.hd-public-page--unsubscribe .hd-actions,
.hd-public-page--contact .hd-actions,
.hd-public-page--accessibility-report-issue .hd-actions {
  justify-content: center !important;
}

/* HD RMS v1005 accessibility/public form page consistency.
Owner: public_forms_and_results. Keeps accessibility report/result/search pages visually aligned with public content pages. */
.hd-public-page--accessibility-report-issue,
.hd-public-page--action-result,
.hd-public-page--search,
.hd-public-interactive-page {
  display: grid !important;
  gap: clamp(14px, 1.8vw, 24px) !important;
}

.hd-public-page--accessibility-report-issue :is(.a11y-panel,.hd-public-form-card,.hd-public-result-card,.hd-card:has(form)),
.hd-public-page--action-result :is(.a11y-panel,.hd-public-form-card,.hd-public-result-card,.hd-card),
.hd-public-page--search :is(.a11y-panel,.hd-public-form-card,.hd-public-result-card,.hd-card:has(form)) {
  border-radius: 22px !important;
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #e0e7d4) 88%, var(--colour-accent, #a8672e) 12%) !important;
  background: var(--colour-surface, #fffdf4) !important;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent) !important;
}

/* v1013 rehomed from Public page content blocks: public action/result processing cards. */
.hd-action-processing-card {
  box-sizing: border-box;
  max-width: 42rem;
  margin: 2rem auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--colour-border-soft, #d8c9a8);
  border-radius: 20px;
  background: var(--colour-surface, #fffdf8);
  color: var(--colour-text, #102630);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--colour-shadow, #102630) 8%, transparent);
  text-align: center;
  place-items: center;
}

.hd-processing-wheel {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 6px solid rgba(30, 48, 90, .16);
  border-top-color: var(--colour-accent, #4b4aa3);
  margin: 0 auto 18px;
  animation: hdspin 1s linear infinite;
}

@keyframes hdspin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-processing-wheel {
    animation: none;
    border-top-color: rgba(30, 48, 90, .16);
    box-shadow: inset 0 0 0 6px var(--colour-accent, #4b4aa3);
  }
}

/* v1076 pass8: Report an Accessibility Issue page presentation.
Owner: public_forms_and_results. Keeps this public form clear without nested-card clutter. */
.hd-public-page--accessibility-report-issue .hd-public-form-intro--accessibility {
  display: grid !important;
  gap: .65rem !important;
  border-left: 6px solid var(--colour-accent, #b8872f) !important;
  background: linear-gradient(135deg, var(--colour-surface, #fffdf8), color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 72%, var(--colour-surface, #fffdf8))) !important;
}

.hd-public-page--accessibility-report-issue .hd-public-form-intro__title {
  margin: 0 !important;
  color: var(--colour-heading, #073b5f) !important;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem) !important;
}

.hd-public-page--accessibility-report-issue .hd-accessibility-report-card {
  border-left: 6px solid color-mix(in srgb, var(--colour-primary, #06456b) 72%, var(--colour-accent, #b8872f)) !important;
}

.hd-public-page--accessibility-report-issue .hd-accessibility-report-optional {
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8c9a8) 88%, transparent) !important;
  border-radius: 16px !important;
  padding: .85rem 1rem !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 54%, transparent) !important;
}

.hd-public-page--accessibility-report-issue .hd-accessibility-report-optional > summary {
  cursor: pointer !important;
  color: var(--colour-heading, #073b5f) !important;
}

.hd-public-page--accessibility-report-issue .hd-accessibility-report-routing-note {
  border-radius: 14px !important;
  padding: .75rem .9rem !important;
  background: color-mix(in srgb, var(--colour-primary, #06456b) 7%, var(--colour-surface, #fffdf8)) !important;
  border: 1px solid color-mix(in srgb, var(--colour-primary, #06456b) 18%, var(--colour-border-soft, #d8c9a8)) !important;
}

@media (max-width: 760px) {
  .hd-public-page--accessibility-report-issue .hd-public-form-intro--accessibility,
  .hd-public-page--accessibility-report-issue .hd-accessibility-report-card {
    border-left-width: 4px !important;
  }

  .hd-public-page--accessibility-report-issue .hd-accessibility-report-optional {
    padding: .75rem !important;
  }
}

/* end v1076 pass8 accessibility report presentation */

/* v1095: reduce boxed-in public forms and preserve alignment on small screens. */
.hd-public-form-card,
.hd-subscribe-form,
.hd-unsubscribe-form,
.hd-accessibility-report-form,
.hd-contact-form {
  border-left: 5px solid color-mix(in srgb, var(--colour-accent, #c8922e) 65%, var(--colour-border, #d8c7a7));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--colour-shadow, #0e2a35) 8%, transparent);
}

.hd-public-form-card .hd-field-grid,
.hd-subscribe-form .hd-field-grid,
.hd-accessibility-report-form .hd-field-grid,
.hd-contact-form .hd-field-grid {
  align-items: start;
  row-gap: clamp(14px, 2vw, 20px);
}

@media (max-width: 720px) {
  .hd-public-form-card,
  .hd-subscribe-form,
  .hd-unsubscribe-form,
  .hd-accessibility-report-form,
  .hd-contact-form {
    padding: clamp(18px, 5.5vw, 24px);
  }

  .hd-public-form-card .hd-field,
  .hd-subscribe-form .hd-field,
  .hd-accessibility-report-form .hd-field,
  .hd-contact-form .hd-field {
    margin: 0;
  }
}

/* =========================================================
HD RMS v1098 public form rhythm
Owner: public_forms_and_results.
Purpose: avoid card-on-card crowding and ensure form action buttons inherit the
shared readable disabled state.
========================================================= */
.hd-public-form-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper),
.hd-subscribe-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper),
.hd-contact-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper),
.hd-accessibility-report-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper) {
  margin-bottom: clamp(18px, 2.4vw, 30px) !important;
}

.hd-public-form-page :where(.hd-form-actions,.hd-actions,.hd-button-row),
.hd-subscribe-page :where(.hd-form-actions,.hd-actions,.hd-button-row),
.hd-contact-page :where(.hd-form-actions,.hd-actions,.hd-button-row),
.hd-accessibility-report-page :where(.hd-form-actions,.hd-actions,.hd-button-row) {
  margin-top: clamp(16px, 2vw, 24px) !important;
  padding-top: clamp(12px, 1.4vw, 18px) !important;
}

@media (max-width: 720px) {
  .hd-public-form-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper),
  .hd-subscribe-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper),
  .hd-contact-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper),
  .hd-accessibility-report-page :where(.hd-card,.hd-form-card,.hd-panel,.hd-form-wrapper) {
    margin-bottom: clamp(18px, 6vw, 28px) !important;
  }
}

/* =========================================================
HD RMS v1099 public form rhythm and disabled controls
Owner: public_forms_and_results.
Purpose: keep stacked form cards readable on narrow screens and stop disabled
submit controls using white text on pale backgrounds.
========================================================= */
.hd-public-form-card,
.hd-form-card,
.hd-form-panel,
.hd-subscribe-card,
.hd-unsubscribe-card,
.hd-accessibility-report-card,
.hd-contact-form-card {
  margin-block: clamp(16px, 1.8vw, 26px) !important;
}

.hd-public-form-card + .hd-public-form-card,
.hd-form-card + .hd-form-card,
.hd-form-panel + .hd-form-panel {
  margin-top: clamp(18px, 2vw, 30px) !important;
}

.hd-public-form-card .hd-form-actions,
.hd-form-card .hd-form-actions,
.hd-form-panel .hd-form-actions {
  margin-top: clamp(18px, 2vw, 28px) !important;
}

.hd-public-form-card :where(button,.hd-btn,.hd-button):where(:disabled,[disabled],[aria-disabled="true"]),
.hd-form-card :where(button,.hd-btn,.hd-button):where(:disabled,[disabled],[aria-disabled="true"]),
.hd-form-panel :where(button,.hd-btn,.hd-button):where(:disabled,[disabled],[aria-disabled="true"]) {
  background: color-mix(in srgb, var(--colour-surface-soft, #f1dfc7) 88%, var(--colour-accent, #9a5425) 12%) !important;
  color: var(--colour-text, #06334a) !important;
  -webkit-text-fill-color: var(--colour-text, #06334a) !important;
  border-color: color-mix(in srgb, var(--colour-accent, #9a5425) 72%, var(--colour-text, #06334a) 28%) !important;
  opacity: 1 !important;
}

@media (max-width: 720px) {
  .hd-public-form-card,
  .hd-form-card,
  .hd-form-panel {
    padding: clamp(16px, 5vw, 24px) !important;
  }
}

/* === Buttons, action controls and toolbars [buttons_actions] === */
/* =========================================================
HD RMS buttons_actions v1075
Clean owner section.
Pass 7: button hierarchy and action-state refinement.
Owns:
- generic buttons and button links
- button variants: primary, secondary, ghost, danger, small, compact, locked
- shared action rows, form action rows, button rows and toolbars
- pills, status chips and chip rows
- bottom page/admin/public action rows
Does not own:
- primary navigation buttons
- hero/CTA banner button
- footer-specific button layout
- form fields, labels or validation
- page card layout or tool-specific cards
========================================================= */

/* =========================================================
Tokens
========================================================= */
:root {
  --btn-bg: var(--colour-action-bg, var(--colour-primary, #2f4758));
  --btn-text: var(--colour-action-text, var(--colour-on-primary, #ffffff));
  --btn-border: color-mix(in srgb, var(--btn-bg) 74%, #000 26%);
  --btn-hover-bg: var(--colour-action-hover-bg, var(--colour-primary-hover, #243847));
  --btn-hover-text: var(--colour-action-hover-text, var(--btn-text));
  --btn-hover-border: color-mix(in srgb, var(--btn-hover-bg) 74%, #000 26%);
  --btn-secondary-bg: color-mix(in srgb, var(--colour-surface, #fffdf8) 86%, var(--colour-surface-soft, #f3f1e8) 14%);
  --btn-secondary-text: var(--colour-heading, #12364a);
  --btn-secondary-border: color-mix(in srgb, var(--colour-border, #d8c9a8) 84%, var(--colour-heading, #12364a) 16%);
  --btn-secondary-hover-bg: color-mix(in srgb, var(--colour-surface-soft, #f3f1e8) 72%, var(--colour-surface, #fffdf8) 28%);
  --btn-secondary-hover-text: var(--colour-heading, #12364a);
  --btn-secondary-hover-border: color-mix(in srgb, var(--colour-primary, #2f4758) 58%, var(--colour-border, #d8c9a8) 42%);
  --btn-ghost-bg: transparent;
  --btn-ghost-text: var(--colour-link, var(--colour-heading, #12364a));
  --btn-ghost-border: color-mix(in srgb, var(--colour-border, #d8c9a8) 58%, transparent);
  --btn-ghost-hover-bg: color-mix(in srgb, var(--colour-primary, #2f4758) 7%, var(--colour-surface, #fffdf8));
  --btn-ghost-hover-text: var(--colour-link-hover, var(--colour-heading, #12364a));
  --btn-danger-bg: var(--colour-danger-bg, #8b1a1a);
  --btn-danger-text: var(--colour-danger-text, #ffffff);
  --btn-danger-border: color-mix(in srgb, var(--btn-danger-bg) 82%, #000 18%);
  --btn-danger-hover-bg: var(--colour-danger-hover-bg, #6f1111);
  --btn-danger-hover-text: var(--colour-danger-hover-text, #ffffff);
  --btn-disabled-bg: var(--colour-surface-soft, #f3f1e8);
  --btn-disabled-text: var(--colour-muted, #526170);
  --btn-disabled-border: var(--colour-border-soft, #d8cdb9);
  --btn-min-height: 42px;
  --btn-radius: 12px;
  --btn-padding-y: .62rem;
  --btn-padding-x: 1rem;
  --btn-gap: .5rem;
  --btn-font-size: .96rem;
  --btn-font-weight: 820;
  --btn-line-height: 1.15;
  --btn-shadow: 0 10px 22px color-mix(in srgb, var(--colour-shadow, #102630) 18%, transparent);
  --btn-hover-shadow: 0 13px 28px color-mix(in srgb, var(--colour-shadow, #102630) 22%, transparent);
  --btn-secondary-shadow: 0 3px 10px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
  --btn-secondary-hover-shadow: 0 7px 16px color-mix(in srgb, var(--colour-shadow, #102630) 11%, transparent);
  --btn-small-min-height: 34px;
  --btn-small-padding-y: .42rem;
  --btn-small-padding-x: .72rem;
  --btn-small-font-size: .86rem;
  --btn-compact-min-height: 32px;
  --btn-compact-padding-y: .34rem;
  --btn-compact-padding-x: .62rem;
  --btn-compact-font-size: .82rem;
  --btn-focus-ring: var(--colour-focus, var(--colour-accent, #ffbf47));
  --btn-focus-ring-soft: color-mix(in srgb, var(--btn-focus-ring) 26%, transparent);
  --actions-gap: .65rem;
  --actions-row-gap: .65rem;
  --toolbar-gap: .65rem;
  --toolbar-bg: var(--colour-surface, #fffdf8);
  --toolbar-border: var(--colour-border-soft, #d8cdb9);
  --toolbar-radius: 16px;
  --toolbar-padding: 12px;
  --pill-min-height: 32px;
  --pill-padding-x: .72rem;
  --pill-radius: 999px;
  --pill-font-size: .84rem;
  --pill-font-weight: 820;
}

/* =========================================================
Base buttons
========================================================= */
.hd-btn,
.hd-button,
button.hd-btn,
button.hd-button,
a.hd-btn,
a.hd-button,
.button,
a.button,
button.button,
.btn,
a.btn,
button.btn,
input[type="submit"].hd-btn,
input[type="button"].hd-btn,
input[type="submit"].hd-button,
input[type="button"].hd-button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--btn-gap) !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: var(--btn-min-height) !important;
  margin: 0 !important;
  padding: var(--btn-padding-y) var(--btn-padding-x) !important;
  border: 1px solid var(--btn-border) !important;
  border-radius: var(--btn-radius) !important;
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  box-shadow: var(--btn-shadow) !important;
  font: inherit !important;
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  line-height: var(--btn-line-height) !important;
  letter-spacing: .005em !important;
  text-align: center !important;
  text-decoration: none !important;
  text-wrap: balance !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transform: none !important;
  transition:
  background-color .16s ease,
  color .16s ease,
  border-color .16s ease,
  box-shadow .16s ease,
  opacity .16s ease !important;
}

.hd-btn:hover,
.hd-btn:focus-visible,
.hd-button:hover,
.hd-button:focus-visible,
button.hd-btn:hover,
button.hd-btn:focus-visible,
button.hd-button:hover,
button.hd-button:focus-visible,
a.hd-btn:hover,
a.hd-btn:focus-visible,
a.hd-button:hover,
a.hd-button:focus-visible,
.button:hover,
.button:focus-visible,
.btn:hover,
.btn:focus-visible,
input[type="submit"].hd-btn:hover,
input[type="submit"].hd-btn:focus-visible,
input[type="button"].hd-btn:hover,
input[type="button"].hd-btn:focus-visible {
  background: var(--btn-hover-bg) !important;
  color: var(--btn-hover-text) !important;
  border-color: var(--btn-hover-border) !important;
  box-shadow: var(--btn-hover-shadow) !important;
  text-decoration: none !important;
  transform: none !important;
}

.hd-btn:focus-visible,
.hd-button:focus-visible,
button.hd-btn:focus-visible,
button.hd-button:focus-visible,
a.hd-btn:focus-visible,
a.hd-button:focus-visible,
.button:focus-visible,
.btn:focus-visible,
input[type="submit"].hd-btn:focus-visible,
input[type="button"].hd-btn:focus-visible {
  outline: 3px solid var(--btn-focus-ring) !important;
  outline-offset: 3px !important;
  box-shadow: var(--btn-hover-shadow), 0 0 0 6px var(--btn-focus-ring-soft) !important;
}

/* Avoid nested spans changing button rhythm. */
.hd-btn > *,
.hd-button > *,
.button > *,
.btn > * {
  line-height: inherit !important;
}

/* =========================================================
Button variants
========================================================= */
.hd-btn--primary,
.hd-button--primary,
.hd-btn.primary,
.hd-primary-action,
.hd-action-primary,
.hd-btn--action,
.hd-btn--cta,
.hd-btn--save,
.hd-btn--apply,
.hd-btn--send,
.hd-btn--confirm,
.hd-btn--publish,
.hd-btn--continue,
button[name="save"],
button[value="save"],
button[value="apply"],
button[value="send"] {
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  -webkit-text-fill-color: var(--btn-text) !important;
  border-color: var(--btn-border) !important;
  box-shadow: var(--btn-shadow) !important;
}

.hd-btn--primary:hover,
.hd-btn--primary:focus-visible,
.hd-button--primary:hover,
.hd-button--primary:focus-visible,
.hd-primary-action:hover,
.hd-primary-action:focus-visible,
.hd-action-primary:hover,
.hd-action-primary:focus-visible,
.hd-btn--action:hover,
.hd-btn--action:focus-visible,
.hd-btn--cta:hover,
.hd-btn--cta:focus-visible,
.hd-btn--save:hover,
.hd-btn--save:focus-visible,
.hd-btn--apply:hover,
.hd-btn--apply:focus-visible,
.hd-btn--send:hover,
.hd-btn--send:focus-visible,
.hd-btn--confirm:hover,
.hd-btn--confirm:focus-visible,
.hd-btn--publish:hover,
.hd-btn--publish:focus-visible,
.hd-btn--continue:hover,
.hd-btn--continue:focus-visible,
button[name="save"]:hover,
button[name="save"]:focus-visible,
button[value="save"]:hover,
button[value="save"]:focus-visible,
button[value="apply"]:hover,
button[value="apply"]:focus-visible,
button[value="send"]:hover,
button[value="send"]:focus-visible {
  background: var(--btn-hover-bg) !important;
  color: var(--btn-hover-text) !important;
  -webkit-text-fill-color: var(--btn-hover-text) !important;
  border-color: var(--btn-hover-border) !important;
  box-shadow: var(--btn-hover-shadow) !important;
}

.hd-btn--primary *,
.hd-button--primary *,
.hd-primary-action *,
.hd-action-primary *,
.hd-btn--action *,
.hd-btn--cta *,
.hd-btn--save *,
.hd-btn--apply *,
.hd-btn--send *,
.hd-btn--confirm *,
.hd-btn--publish *,
.hd-btn--continue * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.hd-btn--secondary,
.hd-button--secondary,
.hd-btn.secondary,
.button.secondary,
.btn.secondary,
.hd-secondary-action,
.hd-action-secondary,
.hd-btn--preview,
.hd-btn--test,
.hd-btn--export,
.hd-btn--download,
.hd-btn--back,
.hd-btn--cancel,
a.hd-btn[download] {
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-text) !important;
  border-color: var(--btn-secondary-border) !important;
  box-shadow: var(--btn-secondary-shadow) !important;
}

.hd-btn--secondary:hover,
.hd-btn--secondary:focus-visible,
.hd-button--secondary:hover,
.hd-button--secondary:focus-visible,
.hd-secondary-action:hover,
.hd-secondary-action:focus-visible,
.hd-action-secondary:hover,
.hd-action-secondary:focus-visible,
.hd-btn--preview:hover,
.hd-btn--preview:focus-visible,
.hd-btn--test:hover,
.hd-btn--test:focus-visible,
.hd-btn--export:hover,
.hd-btn--export:focus-visible,
.hd-btn--download:hover,
.hd-btn--download:focus-visible,
.hd-btn--back:hover,
.hd-btn--back:focus-visible,
.hd-btn--cancel:hover,
.hd-btn--cancel:focus-visible,
a.hd-btn[download]:hover,
a.hd-btn[download]:focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
  box-shadow: var(--btn-secondary-hover-shadow) !important;
}

.hd-btn--ghost,
.hd-button--ghost,
.hd-btn.ghost,
.hd-action-ghost,
.hd-btn--link,
.hd-button--link {
  background: var(--btn-ghost-bg) !important;
  color: var(--btn-ghost-text) !important;
  border-color: var(--btn-ghost-border) !important;
  box-shadow: none !important;
}

.hd-btn--ghost:hover,
.hd-btn--ghost:focus-visible,
.hd-button--ghost:hover,
.hd-button--ghost:focus-visible,
.hd-action-ghost:hover,
.hd-action-ghost:focus-visible,
.hd-btn--link:hover,
.hd-btn--link:focus-visible,
.hd-button--link:hover,
.hd-button--link:focus-visible {
  background: var(--btn-ghost-hover-bg) !important;
  color: var(--btn-ghost-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
  box-shadow: none !important;
}

.hd-btn--danger,
.hd-button--danger,
.hd-danger,
.hd-delete,
.hd-remove,
.hd-destructive,
.hd-btn--delete,
.hd-btn--remove,
.hd-btn--archive,
[data-hd-danger],
button[value="delete"],
button[value="remove"] {
  background: var(--btn-danger-bg) !important;
  color: var(--btn-danger-text) !important;
  border-color: var(--btn-danger-border) !important;
}

.hd-btn--danger:hover,
.hd-btn--danger:focus-visible,
.hd-button--danger:hover,
.hd-button--danger:focus-visible,
.hd-danger:hover,
.hd-danger:focus-visible,
.hd-delete:hover,
.hd-delete:focus-visible,
.hd-remove:hover,
.hd-remove:focus-visible,
.hd-destructive:hover,
.hd-destructive:focus-visible,
[data-hd-danger]:hover,
[data-hd-danger]:focus-visible,
.hd-btn--delete:hover,
.hd-btn--delete:focus-visible,
.hd-btn--remove:hover,
.hd-btn--remove:focus-visible,
.hd-btn--archive:hover,
.hd-btn--archive:focus-visible,
button[value="delete"]:hover,
button[value="delete"]:focus-visible,
button[value="remove"]:hover,
button[value="remove"]:focus-visible {
  background: var(--btn-danger-hover-bg) !important;
  color: var(--btn-danger-hover-text) !important;
  border-color: color-mix(in srgb, var(--btn-danger-hover-bg) 82%, #000 18%) !important;
}

.hd-btn--small,
.hd-button--small,
.hd-btn.small,
.btn-small,
.button-small {
  min-height: var(--btn-small-min-height) !important;
  padding: var(--btn-small-padding-y) var(--btn-small-padding-x) !important;
  font-size: var(--btn-small-font-size) !important;
  border-radius: calc(var(--btn-radius) - 2px) !important;
}

.hd-btn--compact,
.hd-button--compact,
.hd-btn.compact,
.hd-compact-actions .hd-btn,
.hd-toolbar--compact .hd-btn {
  min-height: var(--btn-compact-min-height) !important;
  padding: var(--btn-compact-padding-y) var(--btn-compact-padding-x) !important;
  font-size: var(--btn-compact-font-size) !important;
  border-radius: calc(var(--btn-radius) - 3px) !important;
}

.hd-btn--wide,
.hd-button--wide {
  min-width: min(14rem, 100%) !important;
}

.hd-btn--full,
.hd-button--full {
  width: 100% !important;
}

.hd-btn--locked,
.hd-button--locked,
.hd-is-disabled,
.hd-btn[disabled],
.hd-button[disabled],
button.hd-btn:disabled,
button.hd-button:disabled,
input[type="submit"].hd-btn:disabled,
input[type="button"].hd-btn:disabled,
.hd-btn[aria-disabled="true"],
.hd-button[aria-disabled="true"] {
  background: var(--btn-disabled-bg) !important;
  color: var(--btn-disabled-text) !important;
  border-color: var(--btn-disabled-border) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: .72 !important;
  pointer-events: none !important;
}

/* =========================================================
Action rows and toolbars
========================================================= */
.hd-actions,
.hd-form-actions,
.hd-action-row,
.hd-button-row,
.action-row,
.button-row,
.form-actions,
.tool-actions,
.hd-toolbar-actions,
.hd-control-row,
.hd-btn-row {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: var(--actions-row-gap) var(--actions-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hd-actions--center,
.hd-action-row--center,
.hd-form-actions--center,
.hd-button-row--center,
.hd-toolbar-actions--center {
  justify-content: center !important;
  text-align: center !important;
}

.hd-actions--end,
.hd-action-row--end,
.hd-form-actions--end,
.hd-button-row--end,
.hd-toolbar-actions--end {
  justify-content: flex-end !important;
}

.hd-actions--between,
.hd-action-row--between,
.hd-form-actions--between,
.hd-button-row--between,
.hd-toolbar-actions--between,
.hd-actions--split,
.hd-toolbar--split {
  justify-content: space-between !important;
}

.hd-actions--compact,
.hd-action-row--compact,
.hd-form-actions--compact,
.hd-button-row--compact {
  --actions-gap: .45rem;
  --actions-row-gap: .45rem;
}

.hd-actions > *,
.hd-form-actions > *,
.hd-action-row > *,
.hd-button-row > *,
.action-row > *,
.button-row > *,
.form-actions > *,
.tool-actions > *,
.hd-toolbar-actions > *,
.hd-control-row > *,
.hd-btn-row > * {
  min-width: 0 !important;
}

.hd-actions .hd-btn,
.hd-form-actions .hd-btn,
.hd-action-row .hd-btn,
.hd-button-row .hd-btn,
.hd-toolbar-actions .hd-btn,
.hd-control-row .hd-btn {
  flex: 0 1 auto !important;
}

.hd-toolbar,
.toolbar,
.hd-actions--toolbar,
.hd-editor-toolbar,
.hd-editor-command-toolbar,
.hd-inline-toolbar,
.hd-controls-row,
.hd-filter-row {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: var(--toolbar-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: var(--toolbar-padding) !important;
  border: 1px solid var(--toolbar-border) !important;
  border-radius: var(--toolbar-radius) !important;
  background: var(--toolbar-bg) !important;
}

.hd-toolbar--plain,
.hd-actions--plain {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* Editor toolbars can scroll horizontally if a tool has many commands. */
.hd-inline-toolbar,
.hd-editor-toolbar,
.hd-editor-command-toolbar {
  overflow-x: auto !important;
  white-space: normal !important;
}

.hd-inline-toolbar .hd-btn,
.hd-editor-toolbar .hd-btn,
.hd-editor-command-toolbar .hd-btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* =========================================================
Bottom navigation/action rows
========================================================= */
.hd-admin-nav--bottom,
.hd-admin-nav-bottom,
.hd-public-nav--bottom,
.hd-public-nav-bottom,
.hd-bottom-toolbar,
.hd-bottom-actions,
.hd-page-actions,
.hd-page-actions-bottom,
.hd-public-actions {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(10px, 2vw, 16px) !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: clamp(18px, 2.2vw, 26px) 0 0 !important;
  padding: clamp(10px, 1.5vw, 14px) 0 0 !important;
  border-top: 1px solid var(--toolbar-border) !important;
  background: transparent !important;
}

.hd-admin-nav--bottom .hd-admin-nav__left,
.hd-admin-nav--bottom .hd-admin-nav__right,
.hd-admin-nav-bottom .hd-admin-nav__left,
.hd-admin-nav-bottom .hd-admin-nav__right {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--actions-gap) !important;
  margin: 0 !important;
}

.hd-admin-nav--bottom .hd-admin-nav__left:empty,
.hd-admin-nav--bottom .hd-admin-nav__right:empty,
.hd-admin-nav-bottom .hd-admin-nav__left:empty,
.hd-admin-nav-bottom .hd-admin-nav__right:empty {
  display: none !important;
}

/* Toolbar/bottom buttons keep their explicit hierarchy. Unmarked bottom actions are secondary by default. */
.hd-admin-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):not(.hd-delete):not(.hd-remove),
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):not(.hd-delete):not(.hd-remove),
.hd-page-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):not(.hd-delete):not(.hd-remove),
.hd-page-actions button:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):not(.hd-delete):not(.hd-remove),
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):not(.hd-delete):not(.hd-remove),
.hd-bottom-actions button:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):not(.hd-delete):not(.hd-remove) {
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  border-color: var(--btn-secondary-border) !important;
  box-shadow: var(--btn-secondary-shadow) !important;
}

.hd-admin-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):hover,
.hd-admin-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):focus-visible,
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):hover,
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):focus-visible,
.hd-page-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):hover,
.hd-page-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):focus-visible,
.hd-page-actions button:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):hover,
.hd-page-actions button:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):focus-visible,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):hover,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):focus-visible,
.hd-bottom-actions button:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):hover,
.hd-bottom-actions button:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
  box-shadow: var(--btn-secondary-hover-shadow) !important;
}

a.hd-btn--toolbar,
button.hd-btn--toolbar {
  background: var(--colour-toolbar-action-bg, var(--btn-bg)) !important;
  color: var(--colour-toolbar-action-text, var(--btn-text)) !important;
  border-color: var(--colour-toolbar-action-bg, var(--btn-bg)) !important;
}

a.hd-btn--toolbar:hover,
a.hd-btn--toolbar:focus-visible,
button.hd-btn--toolbar:hover,
button.hd-btn--toolbar:focus-visible {
  background: var(--colour-toolbar-action-hover-bg, var(--btn-hover-bg)) !important;
  color: var(--colour-toolbar-action-hover-text, var(--btn-hover-text)) !important;
  border-color: var(--colour-toolbar-action-hover-bg, var(--btn-hover-bg)) !important;
}

/* =========================================================
Pills and status chips
========================================================= */
.hd-pillrow,
.hd-status-row,
.hd-chip-row,
.hd-docs-chiprow,
.hd-jump-row,
.hd-tool-jump-row {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .55rem !important;
  max-width: 100% !important;
  margin: .85rem 0 !important;
}

.hd-pill,
button.hd-pill,
a.hd-pill,
.hd-status-chip,
.hd-chip,
.hd-docs-chiprow a {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .38rem !important;
  max-width: 100% !important;
  min-height: var(--pill-min-height) !important;
  padding: .34rem var(--pill-padding-x) !important;
  border: 1px solid var(--btn-secondary-border) !important;
  border-radius: var(--pill-radius) !important;
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  box-shadow: none !important;
  font-size: var(--pill-font-size) !important;
  font-weight: var(--pill-font-weight) !important;
  line-height: 1.12 !important;
  text-decoration: none !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

button.hd-pill,
a.hd-pill,
.hd-pill--link,
.hd-docs-chiprow a {
  cursor: pointer !important;
}

button.hd-pill:hover,
button.hd-pill:focus-visible,
a.hd-pill:hover,
a.hd-pill:focus-visible,
.hd-pill--link:hover,
.hd-pill--link:focus-visible,
.hd-docs-chiprow a:hover,
.hd-docs-chiprow a:focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
  text-decoration: none !important;
}

.hd-pill--ok,
.hd-status-chip__value--ok,
.hd-chip--ok {
  border-color: var(--colour-success, #1f7a4b) !important;
  background: color-mix(in srgb, var(--colour-success, #1f7a4b) 12%, var(--colour-surface, #fffdf8)) !important;
  color: color-mix(in srgb, var(--colour-success, #1f7a4b) 70%, #000 30%) !important;
}

.hd-pill--warn,
.hd-status-chip__value--warn,
.hd-chip--warn {
  border-color: var(--colour-warning, #b9831e) !important;
  background: color-mix(in srgb, var(--colour-warning, #b9831e) 15%, var(--colour-surface, #fffdf8)) !important;
  color: color-mix(in srgb, var(--colour-warning, #b9831e) 62%, #000 38%) !important;
}

.hd-pill--fail,
.hd-status-chip__value--fail,
.hd-chip--fail {
  border-color: var(--colour-danger, #a83a45) !important;
  background: color-mix(in srgb, var(--colour-danger, #a83a45) 12%, var(--colour-surface, #fffdf8)) !important;
  color: color-mix(in srgb, var(--colour-danger, #a83a45) 72%, #000 28%) !important;
}

/* =========================================================
Admin tuning
========================================================= */
body.is-admin,
body.is-admin-page,
.hd-admin-page {
  --btn-min-height: 40px;
  --btn-radius: 12px;
  --btn-font-weight: 790;
  --btn-shadow: 0 9px 20px color-mix(in srgb, var(--colour-shadow, #001f31) 14%, transparent);
  --btn-hover-shadow: 0 12px 26px color-mix(in srgb, var(--colour-shadow, #001f31) 18%, transparent);
  --btn-secondary-shadow: 0 3px 9px color-mix(in srgb, var(--colour-shadow, #001f31) 6%, transparent);
  --btn-secondary-hover-shadow: 0 7px 15px color-mix(in srgb, var(--colour-shadow, #001f31) 10%, transparent);
  --toolbar-bg: color-mix(in srgb, var(--colour-surface, #fffdf8) 88%, var(--colour-surface-soft, #f3f1e8) 12%);
  --toolbar-radius: 16px;
  --toolbar-padding: 12px;
}

/* =========================================================
Mobile
========================================================= */
@media (max-width: 760px) {
  :root {
    --btn-min-height: 38px;
    --btn-radius: 10px;
    --btn-padding-y: .52rem;
    --btn-padding-x: .82rem;
    --btn-font-size: .9rem;
    --btn-line-height: 1.1;
    --btn-small-min-height: 32px;
    --btn-small-padding-y: .36rem;
    --btn-small-padding-x: .6rem;
    --btn-small-font-size: .82rem;
    --btn-compact-min-height: 30px;
    --btn-compact-font-size: .78rem;
    --actions-gap: .5rem;
    --actions-row-gap: .5rem;
    --toolbar-padding: 10px;
    --toolbar-gap: .5rem;
    --pill-min-height: 30px;
    --pill-font-size: .8rem;
  }

  .hd-actions,
  .hd-form-actions,
  .hd-action-row,
  .hd-button-row,
  .action-row,
  .button-row,
  .form-actions,
  .tool-actions,
  .hd-toolbar-actions,
  .hd-control-row,
  .hd-btn-row {
    justify-content: center !important;
    align-items: center !important;
  }

  .hd-actions--end,
  .hd-action-row--end,
  .hd-form-actions--end,
  .hd-button-row--end,
  .hd-toolbar-actions--end {
    justify-content: center !important;
  }

  .hd-actions--between,
  .hd-action-row--between,
  .hd-form-actions--between,
  .hd-button-row--between,
  .hd-toolbar-actions--between,
  .hd-actions--split,
  .hd-toolbar--split {
    justify-content: center !important;
  }

  .hd-actions > .hd-btn,
  .hd-form-actions > .hd-btn,
  .hd-action-row > .hd-btn,
  .hd-button-row > .hd-btn,
  .hd-toolbar-actions > .hd-btn {
    flex: 0 1 auto !important;
    min-width: min(10rem, 100%) !important;
  }

  .hd-admin-nav--bottom,
  .hd-admin-nav-bottom,
  .hd-public-nav--bottom,
  .hd-public-nav-bottom,
  .hd-bottom-toolbar,
  .hd-bottom-actions,
  .hd-page-actions,
  .hd-page-actions-bottom,
  .hd-public-actions {
    justify-content: center !important;
    gap: .55rem !important;
  }

  .hd-admin-nav-bottom a,
  .hd-public-nav-bottom a,
  .hd-page-actions a,
  .hd-bottom-actions a {
    flex: 0 1 auto !important;
    min-width: min(9.5rem, 100%) !important;
  }

  .hd-toolbar,
  .toolbar,
  .hd-actions--toolbar,
  .hd-editor-toolbar,
  .hd-editor-command-toolbar,
  .hd-inline-toolbar,
  .hd-controls-row,
  .hd-filter-row {
    justify-content: center !important;
  }
}

/* =========================================================
Action hierarchy helpers
These aliases let tools use meaningful class names without adding
tool-specific button CSS. Primary actions should be used sparingly:
save, apply, send, publish, confirm and continue. Secondary actions
cover preview, test, export, download, back and cancel. Ghost/link
actions are for low-emphasis navigation or helper links.
========================================================= */
.hd-action-hint,
.hd-button-hint {
  color: var(--colour-muted, #526170) !important;
  font-size: .92rem !important;
  line-height: 1.35 !important;
}

.hd-action-group,
.hd-button-group {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: .5rem !important;
  align-items: center !important;
}

.hd-action-group--primary-first .hd-btn:first-child,
.hd-button-group--primary-first .hd-btn:first-child {
  order: -1 !important;
}

/* =========================================================
Print
========================================================= */
@media print {
  .hd-actions,
  .hd-form-actions,
  .hd-action-row,
  .hd-button-row,
  .hd-toolbar,
  .hd-admin-nav--bottom,
  .hd-admin-nav-bottom,
  .hd-public-nav--bottom,
  .hd-public-nav-bottom,
  .hd-bottom-toolbar,
  .hd-bottom-actions,
  .hd-page-actions,
  .hd-page-actions-bottom {
    display: none !important;
  }
}

/* =========================================================
HD RMS v1087 pre-final polish: secondary action token contrast
Owner: buttons_actions.
Purpose: keep primary actions green/dark and secondary actions in the accent
family, including hover/focus and bottom page actions.
========================================================= */
:root {
  --btn-secondary-bg: color-mix(in srgb, var(--colour-accent, #b8872f) 16%, var(--colour-surface, #fffdf8) 84%);
  --btn-secondary-text: color-mix(in srgb, var(--colour-heading, #073a63) 88%, #000 12%);
  --btn-secondary-border: color-mix(in srgb, var(--colour-accent, #b8872f) 62%, var(--colour-border, #d8c9a8) 38%);
  --btn-secondary-hover-bg: color-mix(in srgb, var(--colour-accent, #b8872f) 82%, #000 10%);
  --btn-secondary-hover-text: var(--colour-on-accent, #ffffff);
  --btn-secondary-hover-border: color-mix(in srgb, var(--colour-accent, #b8872f) 72%, #000 28%);
}

.hd-btn--secondary:hover,
.hd-button--secondary:hover,
.hd-btn.secondary:hover,
.button.secondary:hover,
.btn.secondary:hover,
.hd-secondary-action:hover,
.hd-action-secondary:hover,
.hd-btn--secondary:focus-visible,
.hd-button--secondary:focus-visible,
.hd-btn.secondary:focus-visible,
.button.secondary:focus-visible,
.btn.secondary:focus-visible,
.hd-secondary-action:focus-visible,
.hd-action-secondary:focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
}

.hd-page-actions a:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger),
.hd-page-actions button:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger),
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger),
.hd-bottom-actions button:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger),
.hd-public-page .hd-page-actions a[href*="#top"],
.hd-public-page .hd-bottom-actions a[href*="#top"] {
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-text) !important;
  border-color: var(--btn-secondary-border) !important;
}

.hd-page-actions a:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger):hover,
.hd-page-actions button:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger):hover,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger):hover,
.hd-bottom-actions button:not(.hd-btn--primary):not(.hd-action-primary):not(.hd-btn--danger):hover,
.hd-public-page .hd-page-actions a[href*="#top"]:hover,
.hd-public-page .hd-bottom-actions a[href*="#top"]:hover {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
}

/* =========================================================
HD RMS v1088 pre-final secondary button token correction
Owner: buttons_actions.
Purpose: make secondary buttons visibly secondary, readable and accent-led in
normal and hover states instead of collapsing into primary dark-green styling.
========================================================= */
:root {
  --btn-secondary-bg: color-mix(in srgb, var(--colour-accent, #c89a2f) 10%, var(--colour-surface, #fffdf8) 90%);
  --btn-secondary-text: color-mix(in srgb, var(--colour-heading, #073b2b) 84%, #000 16%);
  --btn-secondary-border: color-mix(in srgb, var(--colour-accent, #c89a2f) 72%, var(--colour-border-soft, #d8c9a8) 28%);
  --btn-secondary-hover-bg: color-mix(in srgb, var(--colour-accent, #c89a2f) 28%, var(--colour-surface, #fffdf8) 72%);
  --btn-secondary-hover-text: color-mix(in srgb, var(--colour-heading, #073b2b) 88%, #000 12%);
  --btn-secondary-hover-border: color-mix(in srgb, var(--colour-accent-strong, #9c741d) 78%, var(--colour-primary, #245f3c) 22%);
}

.hd-btn--secondary,
.hd-button--secondary,
.hd-btn.secondary,
.button.secondary,
.btn.secondary,
.hd-secondary-action,
.hd-action-secondary,
.hd-btn--preview,
.hd-btn--test,
.hd-btn--export,
.hd-btn--download,
.hd-btn--back,
.hd-btn--cancel,
a.hd-btn[download],
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger),
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger) {
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-text) !important;
  border-color: var(--btn-secondary-border) !important;
}

.hd-btn--secondary:hover,
.hd-btn--secondary:focus-visible,
.hd-button--secondary:hover,
.hd-button--secondary:focus-visible,
.hd-secondary-action:hover,
.hd-secondary-action:focus-visible,
.hd-action-secondary:hover,
.hd-action-secondary:focus-visible,
.hd-btn--preview:hover,
.hd-btn--preview:focus-visible,
.hd-btn--test:hover,
.hd-btn--test:focus-visible,
.hd-btn--export:hover,
.hd-btn--export:focus-visible,
.hd-btn--download:hover,
.hd-btn--download:focus-visible,
.hd-btn--back:hover,
.hd-btn--back:focus-visible,
.hd-btn--cancel:hover,
.hd-btn--cancel:focus-visible,
a.hd-btn[download]:hover,
a.hd-btn[download]:focus-visible,
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):hover,
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):focus-visible,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):hover,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
}

@media (max-width: 760px) {
  .hd-actions .hd-btn,
  .hd-form-actions .hd-btn,
  .hd-button-row .hd-btn {
    min-width: min(13rem, 100%) !important;
  }
}

/* =========================================================
HD RMS v1089 pre-final polish correction: secondary actions remain secondary
Owner: buttons_actions.
Purpose: reinstate the clear primary/secondary distinction. Secondary actions
use an accent-token surface with dark readable text in normal and hover states,
rather than becoming primary green or pale with white text.
========================================================= */
:root {
  --btn-secondary-bg: color-mix(in srgb, var(--colour-accent, #c89a2f) 16%, var(--colour-surface, #fffdf8) 84%);
  --btn-secondary-text: color-mix(in srgb, var(--colour-heading, #073b2b) 92%, #000 8%);
  --btn-secondary-border: color-mix(in srgb, var(--colour-accent, #c89a2f) 70%, var(--colour-primary, #245f3c) 12%, var(--colour-border-soft, #d8c9a8) 18%);
  --btn-secondary-hover-bg: color-mix(in srgb, var(--colour-accent, #c89a2f) 34%, var(--colour-surface, #fffdf8) 66%);
  --btn-secondary-hover-text: color-mix(in srgb, var(--colour-heading, #073b2b) 94%, #000 6%);
  --btn-secondary-hover-border: color-mix(in srgb, var(--colour-accent-strong, #9c741d) 74%, var(--colour-primary, #245f3c) 26%);
}

.hd-btn--secondary,
.hd-button--secondary,
.hd-btn.secondary,
.button.secondary,
.btn.secondary,
.hd-secondary-action,
.hd-action-secondary,
.hd-btn--preview,
.hd-btn--test,
.hd-btn--export,
.hd-btn--download,
.hd-btn--back,
.hd-btn--cancel,
a.hd-btn[download],
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger),
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger),
.hd-public-page .hd-page-actions a[href*="#top"],
.hd-public-page .hd-bottom-actions a[href*="#top"],
.hd-resource-hub__links .hd-btn--secondary,
.hd-resource-hub__links a.hd-btn:not(.hd-btn--primary):not(.hd-btn--cta),
.hd-resource-handbook-callout .hd-btn--secondary {
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-text) !important;
  border: 1px solid var(--btn-secondary-border) !important;
}

.hd-btn--secondary:hover,
.hd-btn--secondary:focus-visible,
.hd-button--secondary:hover,
.hd-button--secondary:focus-visible,
.hd-secondary-action:hover,
.hd-secondary-action:focus-visible,
.hd-action-secondary:hover,
.hd-action-secondary:focus-visible,
.hd-btn--preview:hover,
.hd-btn--preview:focus-visible,
.hd-btn--test:hover,
.hd-btn--test:focus-visible,
.hd-btn--export:hover,
.hd-btn--export:focus-visible,
.hd-btn--download:hover,
.hd-btn--download:focus-visible,
.hd-btn--back:hover,
.hd-btn--back:focus-visible,
.hd-btn--cancel:hover,
.hd-btn--cancel:focus-visible,
a.hd-btn[download]:hover,
a.hd-btn[download]:focus-visible,
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):hover,
.hd-public-nav-bottom a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):focus-visible,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):hover,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn--action):not(.hd-btn--cta):not(.hd-btn--danger):focus-visible,
.hd-public-page .hd-page-actions a[href*="#top"]:hover,
.hd-public-page .hd-page-actions a[href*="#top"]:focus-visible,
.hd-public-page .hd-bottom-actions a[href*="#top"]:hover,
.hd-public-page .hd-bottom-actions a[href*="#top"]:focus-visible,
.hd-resource-hub__links .hd-btn--secondary:hover,
.hd-resource-hub__links .hd-btn--secondary:focus-visible,
.hd-resource-hub__links a.hd-btn:not(.hd-btn--primary):not(.hd-btn--cta):hover,
.hd-resource-hub__links a.hd-btn:not(.hd-btn--primary):not(.hd-btn--cta):focus-visible,
.hd-resource-handbook-callout .hd-btn--secondary:hover,
.hd-resource-handbook-callout .hd-btn--secondary:focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-hover-border) !important;
  transform: translateY(-1px);
}

/* =========================================================
HD RMS v1090 pre-final correction: reliable secondary action colours
Owner: buttons_actions.
Purpose: keep secondary actions readable and visibly different from primary
navigation/actions across public pages, admin tools and theme palettes.
========================================================= */
:root {
  --btn-secondary-bg: var(--colour-button-secondary-bg, color-mix(in srgb, var(--colour-accent, #c99a2e) 18%, var(--colour-surface, #fffdf8) 82%));
  --btn-secondary-text: var(--colour-button-secondary-text, color-mix(in srgb, var(--colour-heading, #073b2b) 88%, #000 12%));
  --btn-secondary-border: var(--colour-button-secondary-border, color-mix(in srgb, var(--colour-accent, #c99a2e) 74%, var(--colour-primary, #245f3c) 26%));
  --btn-secondary-hover-bg: var(--colour-button-secondary-hover-bg, color-mix(in srgb, var(--colour-accent, #c99a2e) 34%, var(--colour-surface, #fffdf8) 66%));
  --btn-secondary-hover-text: var(--colour-button-secondary-hover-text, color-mix(in srgb, var(--colour-heading, #073b2b) 92%, #000 8%));
}

.hd-btn--secondary,
.hd-button--secondary,
.hd-secondary-action,
.hd-action-secondary,
.hd-btn--back,
.hd-btn--cancel,
.hd-btn--preview,
.hd-btn--test,
.hd-btn--export,
.hd-btn--download,
.hd-phase-button--secondary,
a.hd-btn[href="#top"],
a.hd-btn[href="#site-top"],
button.hd-btn[value="cancel"],
button.hd-btn[value="preview"],
button.hd-btn[value="download_palette_css"],
.hd-public-nav-bottom .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger),
.hd-bottom-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger) {
  background: var(--btn-secondary-bg) !important;
  color: var(--btn-secondary-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-text) !important;
  border-color: var(--btn-secondary-border) !important;
  text-decoration-color: color-mix(in srgb, var(--btn-secondary-text) 45%, transparent) !important;
}

.hd-btn--secondary:hover,
.hd-btn--secondary:focus-visible,
.hd-button--secondary:hover,
.hd-button--secondary:focus-visible,
.hd-secondary-action:hover,
.hd-secondary-action:focus-visible,
.hd-action-secondary:hover,
.hd-action-secondary:focus-visible,
.hd-btn--back:hover,
.hd-btn--back:focus-visible,
.hd-btn--cancel:hover,
.hd-btn--cancel:focus-visible,
.hd-btn--preview:hover,
.hd-btn--preview:focus-visible,
.hd-btn--test:hover,
.hd-btn--test:focus-visible,
.hd-btn--export:hover,
.hd-btn--export:focus-visible,
.hd-btn--download:hover,
.hd-btn--download:focus-visible,
.hd-phase-button--secondary:hover,
.hd-phase-button--secondary:focus-visible,
a.hd-btn[href="#top"]:hover,
a.hd-btn[href="#top"]:focus-visible,
a.hd-btn[href="#site-top"]:hover,
a.hd-btn[href="#site-top"]:focus-visible,
button.hd-btn[value="cancel"]:hover,
button.hd-btn[value="cancel"]:focus-visible,
button.hd-btn[value="preview"]:hover,
button.hd-btn[value="preview"]:focus-visible,
button.hd-btn[value="download_palette_css"]:hover,
button.hd-btn[value="download_palette_css"]:focus-visible,
.hd-public-nav-bottom .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
.hd-public-nav-bottom .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):focus-visible,
.hd-bottom-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
.hd-bottom-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):focus-visible {
  background: var(--btn-secondary-hover-bg) !important;
  color: var(--btn-secondary-hover-text) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text) !important;
  border-color: var(--btn-secondary-border) !important;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .hd-btn--secondary,
  .hd-button--secondary,
  .hd-secondary-action,
  .hd-action-secondary,
  .hd-phase-button--secondary,
  a.hd-btn[href="#top"],
  a.hd-btn[href="#site-top"] {
    min-height: 44px !important;
  }
}

/* =========================================================
HD RMS v1091 core polish: primary/secondary action separation
Owner: buttons_actions.
Purpose: keep secondary actions visibly different from primary submit/navigation
buttons while preserving AA contrast across generated theme palettes.
========================================================= */
.hd-btn--secondary,
.hd-btn.secondary,
.hd-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger),
.hd-page-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger),
.hd-bottom-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger),
a.hd-btn[href*="top"],
button.hd-btn[data-hd-scroll-top] {
  background: color-mix(in srgb, var(--colour-accent, #b8872f) 18%, var(--colour-surface-panel, #fffaf0) 82%) !important;
  color: var(--colour-text, #092d22) !important;
  border-color: color-mix(in srgb, var(--colour-accent, #b8872f) 70%, var(--colour-primary, #174f34) 30%) !important;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--colour-shadow, #123322) 9%, transparent) !important;
}

.hd-btn--secondary:hover,
.hd-btn.secondary:hover,
.hd-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
.hd-page-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
.hd-bottom-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
a.hd-btn[href*="top"]:hover,
button.hd-btn[data-hd-scroll-top]:hover {
  background: color-mix(in srgb, var(--colour-accent, #b8872f) 32%, var(--colour-surface-panel, #fffaf0) 68%) !important;
  color: var(--colour-text, #092d22) !important;
  border-color: var(--colour-accent, #b8872f) !important;
}

.hd-btn--primary,
.hd-actions .hd-btn--primary,
.hd-page-actions .hd-btn--primary,
.hd-bottom-actions .hd-btn--primary {
  background: var(--colour-primary, #1f6a3b) !important;
  color: var(--colour-on-primary, #ffffff) !important;
  border-color: color-mix(in srgb, var(--colour-primary, #1f6a3b) 82%, #000 18%) !important;
}

/* =========================================================
HD RMS v1092 core polish correction: secondary action tokens
Owner: buttons_actions.
Purpose: keep follow-up/back/navigation actions visually secondary and readable
across palettes instead of inheriting dark primary button styling.
========================================================= */
.hd-btn--secondary,
.hd-btn-secondary,
a.hd-btn--secondary,
button.hd-btn--secondary,
.nav-buttons a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]),
.hd-page-actions a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]),
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]),
.hd-actions a[href*="#top"],
.hd-actions .hd-btn[href*="#top"],
a[href="#top"].hd-btn {
  background: color-mix(in srgb, var(--colour-accent, #b8872f) 16%, var(--colour-surface-panel, #fffdf8) 84%) !important;
  color: var(--colour-link, var(--colour-heading, #063d2a)) !important;
  border-color: color-mix(in srgb, var(--colour-accent, #b8872f) 58%, var(--colour-border-soft, #d7cbb4) 42%) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--colour-shadow, #102b22) 7%, transparent) !important;
}

.hd-btn--secondary:hover,
.hd-btn--secondary:focus-visible,
.hd-btn-secondary:hover,
.hd-btn-secondary:focus-visible,
.nav-buttons a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]):hover,
.nav-buttons a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]):focus-visible,
.hd-page-actions a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]):hover,
.hd-page-actions a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]):focus-visible,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]):hover,
.hd-bottom-actions a:not(.hd-btn--primary):not(.hd-btn-primary):not([aria-current="page"]):focus-visible,
.hd-actions a[href*="#top"]:hover,
.hd-actions a[href*="#top"]:focus-visible,
a[href="#top"].hd-btn:hover,
a[href="#top"].hd-btn:focus-visible {
  background: color-mix(in srgb, var(--colour-accent, #b8872f) 28%, var(--colour-surface-panel, #fffdf8) 72%) !important;
  color: var(--colour-heading, #063d2a) !important;
  border-color: var(--colour-accent, #b8872f) !important;
}

/* v1094 core polish: WCAG-safe disabled and validation-aware button states. */
.hd-btn:disabled,
.hd-btn[disabled],
.hd-button:disabled,
.hd-button[disabled],
button:disabled,
button[disabled],
input[type="submit"]:disabled,
input[type="submit"][disabled],
input[type="button"]:disabled,
input[type="button"][disabled],
.hd-btn.is-disabled,
.hd-button.is-disabled,
.hd-btn[aria-disabled="true"],
.hd-button[aria-disabled="true"] {
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 72%, var(--colour-muted, #526474) 28%) !important;
  color: var(--colour-heading, #12364a) !important;
  -webkit-text-fill-color: var(--colour-heading, #12364a) !important;
  border-color: color-mix(in srgb, var(--colour-heading, #12364a) 46%, var(--colour-border, #d8c9a8) 54%) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

.hd-btn:disabled:hover,
.hd-btn[disabled]:hover,
button:disabled:hover,
input[type="submit"]:disabled:hover,
.hd-btn[aria-disabled="true"]:hover {
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 72%, var(--colour-muted, #526474) 28%) !important;
  color: var(--colour-heading, #12364a) !important;
  border-color: color-mix(in srgb, var(--colour-heading, #12364a) 46%, var(--colour-border, #d8c9a8) 54%) !important;
}

/* v1095: settle secondary/action button tokens and timeline small actions. */
.hd-btn--secondary,
button.hd-btn--secondary,
a.hd-btn--secondary,
.hd-action-row .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger),
.hd-page-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger),
.hd-back-to-top,
a[href="#top"],
button[data-hd-show-more],
.hd-timeline-show-more,
.hd-timeline-phase-toggle,
.hd-resource-cta-secondary {
  background: color-mix(in srgb, var(--colour-accent, #c8922e) 18%, var(--colour-surface, #fffdf6) 82%);
  color: var(--colour-text, #0e2a35);
  border-color: color-mix(in srgb, var(--colour-accent, #c8922e) 78%, var(--colour-border, #d8c7a7));
}

.hd-btn--secondary:hover,
button.hd-btn--secondary:hover,
a.hd-btn--secondary:hover,
.hd-action-row .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
.hd-page-actions .hd-btn:not(.hd-btn--primary):not(.hd-btn--danger):hover,
.hd-back-to-top:hover,
a[href="#top"]:hover,
button[data-hd-show-more]:hover,
.hd-timeline-show-more:hover,
.hd-timeline-phase-toggle:hover,
.hd-resource-cta-secondary:hover {
  background: color-mix(in srgb, var(--colour-accent, #c8922e) 34%, var(--colour-surface, #fffdf6) 66%);
  color: var(--colour-text, #0e2a35);
  border-color: color-mix(in srgb, var(--colour-accent, #c8922e) 86%, var(--colour-border, #d8c7a7));
}

button:disabled,
.hd-btn:disabled,
.hd-btn.is-disabled,
.hd-btn[aria-disabled="true"] {
  color: color-mix(in srgb, var(--colour-text, #0e2a35) 75%, var(--colour-surface, #fffdf6));
  background: color-mix(in srgb, var(--colour-muted, #86939a) 22%, var(--colour-surface, #fffdf6) 78%);
  border-color: color-mix(in srgb, var(--colour-muted, #86939a) 46%, var(--colour-border, #d8c7a7) 54%);
  opacity: 1;
}

/* =========================================================
HD RMS v1103 button state consolidation
Owner: buttons_actions.
Purpose: canonical disabled, secondary and compact action-row states. Disabled
controls must remain readable;
secondary controls must never inherit white text
on pale/accent-light surfaces.
========================================================= */
:root {
  --hd-action-primary-bg: var(--colour-action-bg, var(--colour-primary, #236336));
  --hd-action-primary-text: var(--colour-action-text, var(--colour-on-primary, #ffffff));
  --hd-action-secondary-bg: color-mix(in srgb, var(--colour-surface-soft, #f1dfc7) 88%, var(--colour-accent, #9a5425) 12%);
  --hd-action-secondary-text: var(--colour-text, #06334a);
  --hd-action-secondary-border: color-mix(in srgb, var(--colour-accent, #9a5425) 72%, var(--colour-text, #06334a) 28%);
  --hd-action-secondary-hover-bg: color-mix(in srgb, var(--colour-surface-soft, #f1dfc7) 76%, var(--colour-accent, #9a5425) 24%);
  --hd-action-disabled-bg: color-mix(in srgb, var(--colour-surface-soft, #f1dfc7) 86%, var(--colour-border, #bf7847) 14%);
  --hd-action-disabled-text: var(--colour-text, #06334a);
  --hd-action-disabled-border: color-mix(in srgb, var(--colour-border, #bf7847) 78%, var(--colour-text, #06334a) 22%);
}

:where(button,input[type="submit"],input[type="button"],.hd-btn,.hd-button,.btn,a.hd-btn):where(:disabled,[disabled],[aria-disabled="true"],.is-disabled,.disabled),
.hd-card :where(button,input[type="submit"],input[type="button"],.hd-btn,.hd-button,.btn):where(:disabled,[disabled],[aria-disabled="true"],.is-disabled,.disabled),
.hd-form :where(button,input[type="submit"],input[type="button"],.hd-btn,.hd-button,.btn):where(:disabled,[disabled],[aria-disabled="true"],.is-disabled,.disabled) {
  background: var(--hd-action-disabled-bg) !important;
  color: var(--hd-action-disabled-text) !important;
  -webkit-text-fill-color: var(--hd-action-disabled-text) !important;
  border: 1px solid var(--hd-action-disabled-border) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

:where(.hd-btn--secondary,.hd-button--secondary,.btn-secondary,.hd-action-secondary,.hd-btn.secondary,.hd-bottom-actions a:not(:first-child),.hd-page-actions a:not(:first-child),.hd-form-actions .hd-btn--secondary,a.hd-btn:not(.hd-btn--primary):not(.hd-btn--danger)):not(:disabled):not([disabled]):not([aria-disabled="true"]) {
  background: var(--hd-action-secondary-bg) !important;
  color: var(--hd-action-secondary-text) !important;
  -webkit-text-fill-color: var(--hd-action-secondary-text) !important;
  border-color: var(--hd-action-secondary-border) !important;
  text-decoration: none !important;
}

:where(.hd-btn--secondary,.hd-button--secondary,.btn-secondary,.hd-action-secondary,.hd-btn.secondary,.hd-bottom-actions a:not(:first-child),.hd-page-actions a:not(:first-child),.hd-form-actions .hd-btn--secondary,a.hd-btn:not(.hd-btn--primary):not(.hd-btn--danger)):not(:disabled):not([disabled]):not([aria-disabled="true"]):hover {
  background: var(--hd-action-secondary-hover-bg) !important;
  color: var(--hd-action-secondary-text) !important;
  -webkit-text-fill-color: var(--hd-action-secondary-text) !important;
  border-color: color-mix(in srgb, var(--colour-accent, #9a5425) 86%, var(--colour-text, #06334a) 14%) !important;
}

.hd-actions,
.hd-button-row,
.hd-action-row,
.hd-page-actions,
.hd-form-actions,
.hd-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.4vw, 18px) !important;
  margin-block: clamp(18px, 2.2vw, 28px) !important;
  align-items: center;
}

.hd-card + .hd-actions,
.hd-card + .hd-button-row,
.hd-card + .hd-action-row,
.hd-panel + .hd-actions,
.hd-content-card + .hd-actions {
  margin-top: clamp(18px, 2.2vw, 28px) !important;
}

@media (max-width: 760px) {
  .hd-actions,
  .hd-button-row,
  .hd-action-row,
  .hd-page-actions,
  .hd-form-actions,
  .hd-bottom-actions {
    justify-content: center;
    gap: 12px !important;
    margin-block: clamp(16px, 5vw, 24px) !important;
  }
}

/* === Forms, fields, validation and recaptcha controls [forms_fields] === */
/* =========================================================
HD RMS forms_fields v973
Clean owner section.
Owns:
- generic form containers, field rows and field grids
- labels, legends, help text and required markers
- text inputs, selects, textareas, file and colour inputs
- checkbox/radio sizing and choice rows/cards
- fieldsets, form sections and form accordions
- validation/error/success/help states
- reCAPTCHA/spam-protection indicators
Does not own:
- admin tool cards or page shells
- email template preview layout
- Send Updates message-specific cards
- Accessibility palette page layout
- footer/header/nav/buttons component styling
========================================================= */

/* =========================================================
Tokens
========================================================= */
:root {
  --form-grid-gap: clamp(12px, 1.6vw, 18px);
  --form-row-gap: clamp(12px, 1.5vw, 18px);
  --form-field-gap: 7px;
  --form-field-min-height: 46px;
  --form-field-radius: 12px;
  --form-field-padding-y: 10px;
  --form-field-padding-x: 14px;
  --form-field-bg: var(--colour-field-bg, var(--colour-surface, #fffdf8));
  --form-field-text: var(--colour-text, #102630);
  --form-field-border: var(--colour-field-border, var(--colour-border-soft, #d8cdb9));
  --form-field-focus: var(--colour-field-focus, var(--colour-primary, #2f4758));
  --form-field-placeholder: var(--colour-muted, #526170);
  --form-label-colour: var(--colour-heading, #063d63);
  --form-help-colour: var(--colour-muted, #526170);
  --form-panel-bg: var(--colour-panel-tint, var(--colour-surface-soft, #f3f1e8));
  --form-panel-border: var(--colour-border-soft, #d8cdb9);
  --form-panel-radius: 16px;
  --form-panel-padding: clamp(14px, 1.8vw, 20px);
  --form-checkbox-size: 1.2rem;
  --form-checkbox-size-mobile: 1.28rem;
  --form-checkbox-accent: var(--colour-checkbox-border, var(--colour-primary, #2f4758));
  --form-choice-bg: var(--colour-panel-tint, var(--colour-surface-soft, #f3f1e8));
  --form-choice-border: var(--colour-border-soft, #d8cdb9);
  --form-error-colour: var(--colour-danger, #a7202f);
  --form-success-colour: var(--colour-success, #207245);
  --recaptcha-badge-size: 34px;
  --recaptcha-logo-size: 22px;
}

/* =========================================================
Form containers and rhythm
========================================================= */
.hd-form,
form.hd-form,
.hd-form--stack,
.hd-public-form,
.hd-tool-form,
.hd-form-panel form,
.hd-card form,
.hd-panel form {
  display: grid !important;
  gap: var(--form-row-gap) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-form-panel,
.hd-fieldset,
fieldset.hd-fieldset,
.hd-form-section,
.hd-form-group,
.hd-settings-section {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: var(--form-panel-padding) !important;
  border: 1px solid var(--form-panel-border) !important;
  border-radius: var(--form-panel-radius) !important;
  background: var(--form-panel-bg) !important;
}

fieldset,
details {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

legend {
  color: var(--form-label-colour) !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  padding-inline: .35rem !important;
}

/* =========================================================
Field rows and grids
========================================================= */
.hd-field,
.hd-form-field,
.hd-control-field,
.field,
.form-row,
.form-group,
.admin-form-row,
.hd-form-row {
  display: grid !important;
  gap: var(--form-field-gap) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.hd-field + .hd-field,
.hd-form-field + .hd-form-field,
.form-row + .form-row,
.form-group + .form-group {
  margin-top: var(--form-row-gap) !important;
}

.hd-grid,
.hd-grid-2,
.hd-grid--2,
.hd-grid-3,
.hd-grid--3,
.hd-form-grid,
.hd-field-grid,
.form-grid,
.tool-form-grid,
.hd-settings-grid,
.hd-control-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--form-grid-gap) !important;
  align-items: start !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-grid-3,
.hd-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.hd-grid > *,
.hd-grid-2 > *,
.hd-grid--2 > *,
.hd-grid-3 > *,
.hd-grid--3 > *,
.hd-form-grid > *,
.hd-field-grid > *,
.form-grid > *,
.tool-form-grid > *,
.hd-settings-grid > *,
.hd-control-grid > *,
.form-row > * {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-span-2,
.form-span-2,
.hd-grid .full,
.form-grid .full {
  grid-column: 1 / -1 !important;
}

/* =========================================================
Labels, help text and required markers
========================================================= */
label,
.hd-label,
.hd-form-label,
.hd-field > span:first-child,
.hd-form-field > span:first-child {
  color: var(--form-label-colour) !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.hd-field > label,
.hd-form-field > label,
.form-row > label,
.form-group > label,
.admin-form-row > label {
  display: block !important;
  margin: 0 !important;
}

.hd-help,
.help,
.form-help,
.field-help,
.help-text,
.hd-field-help,
.hd-form-help,
.hd-form-hint,
.hd-hint,
.hd-upload-help,
.hd-muted,
small {
  display: block !important;
  max-width: 78ch !important;
  margin: 0 !important;
  color: var(--form-help-colour) !important;
  line-height: 1.45 !important;
  font-size: .94rem !important;
}

.hd-required,
.hd-required-marker,
.hd-field label span[aria-hidden="true"],
.hd-form label span[aria-hidden="true"] {
  color: var(--form-error-colour) !important;
  font-weight: 850 !important;
}

/* =========================================================
Text controls
========================================================= */
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="submit"]):not([type="button"]),
select,
textarea,
.hd-input,
.hd-select,
.hd-textarea,
.hd-form-control,
.form-control {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: var(--form-field-min-height) !important;
  padding: var(--form-field-padding-y) var(--form-field-padding-x) !important;
  border: 1px solid var(--form-field-border) !important;
  border-radius: var(--form-field-radius) !important;
  background: var(--form-field-bg) !important;
  color: var(--form-field-text) !important;
  font: inherit !important;
  line-height: 1.35 !important;
  box-shadow: none !important;
  overflow-wrap: anywhere !important;
}

textarea,
.hd-textarea {
  min-height: 132px !important;
  resize: vertical !important;
  overflow: auto !important;
  line-height: 1.5 !important;
}

.hd-code-input,
.hd-textarea--code,
textarea[name*="sql"],
textarea[name*="css"] {
  min-height: 10rem !important;
  font-family: Consolas, Monaco, "Courier New", monospace !important;
  line-height: 1.45 !important;
}

select,
.hd-select {
  padding-right: 2.65rem !important;
}

::placeholder {
  color: var(--form-field-placeholder) !important;
  opacity: .82 !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
select:focus,
textarea:focus,
.hd-input:focus,
.hd-select:focus,
.hd-textarea:focus,
.hd-form-control:focus,
.form-control:focus {
  border-color: var(--form-field-focus) !important;
  outline: 3px solid color-mix(in srgb, var(--form-field-focus) 24%, transparent) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--form-field-focus) 14%, transparent) !important;
}

/* =========================================================
File, colour and locked controls
========================================================= */
input[type="file"],
.hd-file-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

input[type="color"] {
  inline-size: 44px !important;
  block-size: 34px !important;
  min-inline-size: 44px !important;
  min-block-size: 34px !important;
  padding: 2px !important;
  border: 1px solid var(--form-field-border) !important;
  border-radius: 8px !important;
  background: var(--form-field-bg) !important;
}

.hd-colour-tool {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 5px 6px 5px 10px !important;
  border: 1px solid var(--form-panel-border) !important;
  border-radius: 13px !important;
  background: var(--form-field-bg) !important;
}

.hd-input--locked,
input[readonly],
textarea[readonly] {
  background: color-mix(in srgb, var(--form-field-bg) 74%, var(--form-panel-bg) 26%) !important;
  color: var(--form-help-colour) !important;
  border-style: dashed !important;
}

/* =========================================================
Input with action
========================================================= */
.hd-input-action,
.input-action,
.field-with-action,
.hd-search-form__row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-search-form__input {
  min-width: 0 !important;
}

/* =========================================================
Checkbox and radio controls
========================================================= */
input[type="checkbox"],
input[type="radio"] {
  inline-size: var(--form-checkbox-size) !important;
  block-size: var(--form-checkbox-size) !important;
  min-inline-size: var(--form-checkbox-size) !important;
  min-block-size: var(--form-checkbox-size) !important;
  flex: 0 0 var(--form-checkbox-size) !important;
  margin: .08rem .45rem 0 0 !important;
  accent-color: var(--form-checkbox-accent) !important;
  vertical-align: middle !important;
}

.hd-checkbox,
.hd-checkbox-row,
.hd-radio-row,
.hd-toggle-row,
.hd-checkline,
.checkbox-row,
.hd-choice,
.hd-check,
.hd-form-check,
.hd-field--checkbox,
.hd-form-checkbox,
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
  display: flex !important;
  align-items: flex-start !important;
  gap: .65rem !important;
  min-width: 0 !important;
  max-width: 100% !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
}

.hd-checkbox input[type="checkbox"],
.hd-checkbox-row input[type="checkbox"],
.hd-radio-row input[type="radio"],
.hd-toggle-row input[type="checkbox"],
.hd-checkline input[type="checkbox"],
.hd-checkline input[type="radio"],
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"],
.hd-choice input,
.hd-check input,
.hd-form-check input,
label:has(input[type="checkbox"]) input[type="checkbox"],
label:has(input[type="radio"]) input[type="radio"] {
  margin-right: 0 !important;
}

.hd-checkbox-card,
.hd-consent-card,
.hd-form-consent,
.hd-check-option,
.hd-form-check,
.hd-checkbox-panel,
.hd-choice--panel {
  padding: 12px 14px !important;
  border: 1px solid var(--form-choice-border) !important;
  border-radius: 14px !important;
  background: var(--form-choice-bg) !important;
  color: var(--form-field-text) !important;
}

.hd-checkbox-list,
.hd-radio-list,
.hd-toggle-list {
  display: grid !important;
  gap: .5rem !important;
}

/* =========================================================
Form actions alignment only
Button visuals are owned by buttons_actions.
========================================================= */
.hd-form .hd-actions,
.hd-form-actions,
.form-actions,
form .hd-actions,
.a11y-panel .hd-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .7rem !important;
  margin-top: clamp(14px, 1.8vw, 20px) !important;
}

.hd-actions--end,
.hd-form-actions--end {
  justify-content: flex-end !important;
}

.hd-actions--center,
.hd-form-actions--center {
  justify-content: center !important;
}

/* =========================================================
Accordions and collapsible form sections
========================================================= */
.hd-accordion,
details.hd-accordion,
.hd-admin-collapsible-section,
details.hd-card {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: clip !important;
}

.hd-accordion > summary,
details.hd-accordion > summary,
.hd-admin-collapsible-section > summary,
details.hd-card > summary,
details > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .75rem !important;
  min-height: 0 !important;
  padding: .9rem 1rem !important;
  border-radius: 14px !important;
  color: var(--form-label-colour) !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  cursor: pointer !important;
  list-style: none !important;
}

.hd-accordion > summary::-webkit-details-marker,
details.hd-accordion > summary::-webkit-details-marker,
.hd-admin-collapsible-section > summary::-webkit-details-marker,
details.hd-card > summary::-webkit-details-marker,
details > summary::-webkit-details-marker {
  display: none !important;
}

.hd-accordion > summary::before,
.hd-admin-collapsible-section > summary::before,
details.hd-card > summary::before {
  content: "▸" !important;
  flex: 0 0 auto !important;
  font-size: .82em !important;
  line-height: 1 !important;
}

.hd-accordion[open] > summary::before,
.hd-admin-collapsible-section[open] > summary::before,
details.hd-card[open] > summary::before {
  content: "▾" !important;
}

.hd-accordion__body,
.hd-form-section__body {
  padding: var(--form-panel-padding) !important;
}

/* =========================================================
Validation and status
========================================================= */
input:user-invalid,
select:user-invalid,
textarea:user-invalid,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.hd-field-error,
.hd-form-error {
  border-color: var(--form-error-colour) !important;
}

.hd-field .error,
.hd-field .validation-message,
.form-error,
.validation-error,
.hd-error-text,
.hd-validation-message {
  display: block !important;
  margin-top: 6px !important;
  color: var(--form-error-colour) !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}

.hd-success-text,
.hd-form-success,
.hd-validation-success {
  color: var(--form-success-colour) !important;
  font-weight: 750 !important;
}

/* =========================================================
reCAPTCHA and spam-protection indicators
========================================================= */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  right: -9999px !important;
  bottom: -9999px !important;
  transform: scale(.01) !important;
}

.hd-recaptcha-active-indicator,
.hd-recaptcha-logo-badge,
.hd-recaptcha-indicator,
.recaptcha-indicator,
.recaptcha-status,
.hd-spam-protection,
[data-hd-recaptcha-badge] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  inline-size: var(--recaptcha-badge-size) !important;
  block-size: var(--recaptcha-badge-size) !important;
  min-inline-size: var(--recaptcha-badge-size) !important;
  min-block-size: var(--recaptcha-badge-size) !important;
  max-inline-size: var(--recaptcha-badge-size) !important;
  max-block-size: var(--recaptcha-badge-size) !important;
  margin-inline-end: .45rem !important;
  border: 1px solid var(--form-panel-border) !important;
  border-radius: 10px !important;
  background: var(--form-field-bg) !important;
  color: var(--form-help-colour) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--colour-shadow, #102630) 10%, transparent) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.hd-recaptcha-active-indicator svg,
.hd-recaptcha-active-indicator__logo,
.hd-recaptcha-logo-badge__icon,
.hd-recaptcha-active-indicator__mark,
.hd-recaptcha-indicator img,
.recaptcha-indicator img,
.recaptcha-status img,
.hd-spam-protection img,
img[src*="recaptcha"] {
  display: block !important;
  inline-size: var(--recaptcha-logo-size) !important;
  block-size: var(--recaptcha-logo-size) !important;
  max-inline-size: var(--recaptcha-logo-size) !important;
  max-block-size: var(--recaptcha-logo-size) !important;
  object-fit: contain !important;
}

/* CSS-drawn fallback logo mark */
.hd-recaptcha-active-indicator__mark,
.hd-recaptcha-logo-badge__icon {
  position: relative !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #2f7de1, #0f5fb5) !important;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.85) !important;
}

.hd-recaptcha-active-indicator__arc {
  position: absolute !important;
  inset: 2px !important;
  border-radius: 50% !important;
  border: 3px solid #4285f4 !important;
  border-left-color: #34a853 !important;
  border-bottom-color: #fbbc05 !important;
}

.hd-recaptcha-active-indicator__dot,
.hd-recaptcha-logo-badge__check {
  position: absolute !important;
  right: 1px !important;
  top: 1px !important;
  inline-size: 6px !important;
  block-size: 6px !important;
  border-radius: 50% !important;
  background: #4285f4 !important;
}

/* =========================================================
Public/admin scoped refinements
========================================================= */
.hd-public-page .hd-field,
.hd-page-shell--public-page .hd-field,
.hd-page-shell-normalised .hd-field,
.hd-page-shell-normalised .hd-form-row,
.hd-page-shell-normalised .hd-form-field,
.hd-page-shell-normalised .hd-control-group {
  display: grid !important;
  gap: var(--form-field-gap) !important;
}

body.is-admin,
body.is-admin-page {
  --form-field-radius: 12px;
  --form-field-min-height: 46px;
  --form-grid-gap: clamp(14px, 1.6vw, 20px);
}

body.is-admin textarea,
body.is-admin-page textarea,
body.is-admin .hd-textarea,
body.is-admin-page .hd-textarea {
  min-height: 150px !important;
}

/* =========================================================
Visually hidden honeypot fields
========================================================= */
.hd-form .hd-visually-hidden,
.hd-form .hd-visually-hidden input[aria-hidden="true"],
.hd-honeypot,
.hd-spam-field {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

/* =========================================================
Mobile
Forms_fields owns only form-specific mobile behaviour.
Overall page/mobile rails remain owned by mobile_display.
========================================================= */
@media (max-width: 760px) {
  :root {
    --form-grid-gap: 12px;
    --form-row-gap: 12px;
    --form-field-min-height: 42px;
    --form-field-radius: 11px;
    --form-field-padding-y: 9px;
    --form-field-padding-x: 12px;
    --form-panel-padding: 14px;
  }

  .hd-grid,
  .hd-grid-2,
  .hd-grid--2,
  .hd-grid-3,
  .hd-grid--3,
  .hd-form-grid,
  .hd-field-grid,
  .form-grid,
  .tool-form-grid,
  .hd-settings-grid,
  .hd-control-grid {
    grid-template-columns: 1fr !important;
  }

  .hd-input-action,
  .input-action,
  .field-with-action,
  .hd-search-form__row {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .hd-search-form__button,
  .hd-input-action .hd-btn,
  .field-with-action .hd-btn {
    justify-self: center !important;
  }

  input[type="checkbox"],
  input[type="radio"] {
    inline-size: var(--form-checkbox-size-mobile) !important;
    block-size: var(--form-checkbox-size-mobile) !important;
    min-inline-size: var(--form-checkbox-size-mobile) !important;
    min-block-size: var(--form-checkbox-size-mobile) !important;
    flex-basis: var(--form-checkbox-size-mobile) !important;
  }

  .hd-form .hd-actions,
  .hd-form-actions,
  .form-actions,
  form .hd-actions,
  .a11y-panel .hd-actions {
    justify-content: center !important;
  }
}

/* =========================================================
HD RMS v1098 form field spacing and validation state
Owner: forms_fields.
Purpose: keep fields, fieldsets and action rows from collapsing into adjacent cards.
========================================================= */
.hd-form-grid,
.hd-field-grid,
.hd-form-row,
.form-row {
  gap: clamp(16px, 2vw, 24px) !important;
}

.hd-form-field,
.form-field,
.hd-field,
fieldset,
.hd-form-group {
  margin-bottom: clamp(14px, 1.8vw, 22px) !important;
}

.hd-form-actions,
.form-actions {
  border-top: 1px solid color-mix(in srgb, var(--colour-border, #d8b28c) 72%, transparent) !important;
  padding-top: clamp(14px, 1.8vw, 22px) !important;
}

input:disabled,
textarea:disabled,
select:disabled {
  color: var(--colour-text, #06334a) !important;
  -webkit-text-fill-color: var(--colour-text, #06334a) !important;
  opacity: 1 !important;
}

/* === Tables, data views and generic result tables [tables_data_views] === */
/* HD RMS tables_data_views v983 clean owner section.
Owner: tables_data_views.
Owns generic tables, table wrappers, reusable data views, report tables and non-tool-specific code/output blocks only.
Does not own DB/SQL result skins, analytics dashboard/report chart styling, admin page shells, hub cards, alerts, badges, forms, buttons or media libraries.
*/

/* Core table/data-view tokens */
:root {
  --hd-table-border: var(--colour-border-soft, #d8c9a8);
  --hd-table-radius: var(--radius-card, 16px);
  --hd-table-bg: var(--colour-surface, #fffdf8);
  --hd-table-head-bg: var(--colour-surface-soft, #f7f0df);
  --hd-table-head-text: var(--colour-heading, #123b63);
  --hd-table-text: var(--colour-text, #12212b);
  --hd-table-row-border: color-mix(in srgb, var(--hd-table-border) 72%, transparent);
  --hd-table-row-hover: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 55%, transparent);
  --hd-table-cell-y: var(--v496-table-cell-padding-y, .7rem);
  --hd-table-cell-x: var(--v496-table-cell-padding-x, .85rem);
  --hd-table-font-size: var(--v496-table-font-size, .95rem);
  --hd-code-bg: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 72%, #ffffff 28%);
}

/* Generic scroll wrappers */
.hd-table-wrap,
.hd-tablewrap,
.hd-table-wrapper,
.hd-data-table-wrap,
.hd-results-table-wrap,
.hd-report-table-wrap,
.hd-scroll-table,
.hd-scroll-x,
.table-wrap,
.data-table-wrap,
.report-table-wrap {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  border: 1px solid var(--hd-table-border) !important;
  border-radius: var(--hd-table-radius) !important;
  background: var(--hd-table-bg) !important;
}

/* Generic tables only. Tool-specific tables may add owner-specific refinements in their own section. */
.hd-table,
.hd-data-table,
.hd-results-table,
.hd-report-table,
.hd-admin-table,
.data-table,
.report-table,
table.hd-table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: var(--hd-table-bg) !important;
  color: var(--hd-table-text) !important;
  font-size: var(--hd-table-font-size) !important;
}

.hd-table th,
.hd-table td,
.hd-data-table th,
.hd-data-table td,
.hd-results-table th,
.hd-results-table td,
.hd-report-table th,
.hd-report-table td,
.hd-admin-table th,
.hd-admin-table td,
.data-table th,
.data-table td,
.report-table th,
.report-table td,
table.hd-table th,
table.hd-table td {
  padding: var(--hd-table-cell-y) var(--hd-table-cell-x) !important;
  border-bottom: 1px solid var(--hd-table-row-border) !important;
  vertical-align: top !important;
  text-align: left !important;
  line-height: 1.42 !important;
  overflow-wrap: anywhere !important;
}

.hd-table th,
.hd-data-table th,
.hd-results-table th,
.hd-report-table th,
.hd-admin-table th,
.data-table th,
.report-table th,
table.hd-table th {
  background: var(--hd-table-head-bg) !important;
  color: var(--hd-table-head-text) !important;
  font-weight: 900 !important;
  letter-spacing: .015em !important;
}

.hd-table tr:last-child td,
.hd-data-table tr:last-child td,
.hd-results-table tr:last-child td,
.hd-report-table tr:last-child td,
.hd-admin-table tr:last-child td,
.data-table tr:last-child td,
.report-table tr:last-child td,
table.hd-table tr:last-child td {
  border-bottom: 0 !important;
}

.hd-table tbody tr:hover,
.hd-data-table tbody tr:hover,
.hd-results-table tbody tr:hover,
.hd-report-table tbody tr:hover,
.hd-admin-table tbody tr:hover,
.data-table tbody tr:hover,
.report-table tbody tr:hover {
  background: var(--hd-table-row-hover) !important;
}

/* Compact and numeric table helpers */
.hd-table--compact th,
.hd-table--compact td {
  padding: .52rem .62rem !important;
  font-size: .9rem !important;
}

.hd-table .hd-col-count,
.hd-data-table .hd-col-count,
.hd-report-table .hd-col-count,
.hd-admin-table .hd-col-count,
.hd-col-count,
.hd-col-number,
.hd-col-actions {
  white-space: nowrap !important;
}

.hd-col-count,
.hd-col-number {
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}

.hd-col-actions {
  text-align: right !important;
}

/* Reusable data/result panels, not tool page shells. */
.hd-data-view,
.data-view,
.hd-result-card,
.result-card,
.hd-report-card,
.report-card,
.hd-panel--results {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  border: 1px solid var(--hd-table-border) !important;
  border-radius: var(--hd-table-radius) !important;
  background: var(--hd-table-bg) !important;
  padding: clamp(14px, 1.6vw, 18px) !important;
}

.hd-data-view > :first-child,
.data-view > :first-child,
.hd-result-card > :first-child,
.result-card > :first-child,
.hd-report-card > :first-child,
.report-card > :first-child {
  margin-top: 0 !important;
}

.hd-data-view > :last-child,
.data-view > :last-child,
.hd-result-card > :last-child,
.result-card > :last-child,
.hd-report-card > :last-child,
.report-card > :last-child {
  margin-bottom: 0 !important;
}

/* Report table helpers, without owning analytics chart/report-builder layout. */
.hd-report-tablewrap,
.hd-report-table-wrap {
  margin-block: .75rem !important;
}

.hd-report-table {
  min-width: 38rem !important;
}

.hd-report-table th {
  text-transform: none !important;
}

.hd-report-table .hd-col-count {
  width: 9rem !important;
}

/* Non-tool-specific code/output blocks. DB/SQL-specific result sets stay in admin_database_tools. */
pre,
.hd-pre,
.diag-pre,
.hd-code-block,
.hd-codebox,
.hd-code--wrap,
.output-block,
.log-output,
.code-output {
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow: auto !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  border: 1px solid var(--hd-table-border) !important;
  border-radius: 14px !important;
  background: var(--hd-code-bg) !important;
  color: var(--colour-text, #12212b) !important;
  padding: .9rem 1rem !important;
  line-height: 1.55 !important;
}

/* Generic progress/data bars used in data views. */
.hd-progress,
.progress,
.hd-progress-track {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 16px !important;
  border: 1px solid var(--hd-table-border) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 82%, #ffffff 18%) !important;
  overflow: hidden !important;
}

.hd-progress__bar,
.progress-bar,
.hd-progress-bar {
  display: block !important;
  height: 100% !important;
  min-width: 0 !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, var(--colour-primary, #06456b), var(--colour-accent, #b88a2e)) !important;
  transition: width 220ms ease !important;
}

/* Whole-site normalised page tables: generic table behaviour only. */
.hd-page-shell-normalised .hd-table-wrap,
.hd-page-shell-normalised .hd-table-wrapper,
.hd-page-shell-normalised .hd-data-table-wrap,
.hd-page-shell-normalised .hd-table-shell {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  border: 1px solid var(--hd-table-border) !important;
  border-radius: var(--hd-table-radius) !important;
  background: var(--hd-table-bg) !important;
}

.hd-page-shell-normalised table,
.hd-page-shell-normalised .hd-table,
.hd-page-shell-normalised .hd-data-table {
  width: 100% !important;
  border-collapse: collapse !important;
  color: var(--hd-table-text) !important;
}

.hd-page-shell-normalised th,
.hd-page-shell-normalised td {
  padding: var(--hd-table-cell-y) var(--hd-table-cell-x) !important;
  border-bottom: 1px solid var(--hd-table-row-border) !important;
  vertical-align: top !important;
  text-align: left !important;
}

.hd-page-shell-normalised th {
  color: var(--hd-table-head-text) !important;
  background: var(--hd-table-head-bg) !important;
  font-weight: 900 !important;
}

.hd-page-shell-normalised tr:last-child td {
  border-bottom: 0 !important;
}

/* Accessibility utility retained here only because it supports data/table labels across tools. */
.hd-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .hd-table th,
  .hd-table td,
  .hd-data-table th,
  .hd-data-table td,
  .hd-results-table th,
  .hd-results-table td,
  .hd-report-table th,
  .hd-report-table td,
  .hd-admin-table th,
  .hd-admin-table td,
  .hd-page-shell-normalised th,
  .hd-page-shell-normalised td {
    padding: .56rem .62rem !important;
  }

  .hd-table--compact th,
  .hd-table--compact td {
    padding: .48rem .55rem !important;
  }

  .hd-report-table {
    min-width: 34rem !important;
  }
}

/* === Shared feedback, alert, toast and status core [shared_feedback_message_core] === */
/* HD RMS shared_feedback_message_core v982 clean + rehome pass.
Owner: shared_feedback_message_core.
Owns alerts, messages, notices, feedback stacks, toasts, badges, pills,
tags, status dots/pills and empty/status message surfaces only.
Does not own form controls, tables, DB/SQL tools, media libraries, email
template buttons, report toolbars or page/content layout. */
:root {
  --hd-feedback-radius: 16px;
  --hd-feedback-pad-y: .9rem;
  --hd-feedback-pad-x: 1rem;
  --hd-feedback-gap: .65rem;
  --hd-feedback-shadow: 0 10px 24px rgba(10,24,32,.07);
  --hd-feedback-border: var(--colour-border-soft, #d8c9a8);
  --hd-feedback-surface: var(--colour-surface, #fffdf8);
  --hd-feedback-text: var(--colour-text, #12212b);
  --hd-feedback-heading: var(--colour-heading, #053b5d);
  --hd-feedback-success: var(--colour-success, #147d53);
  --hd-feedback-danger: var(--colour-danger, #a52828);
  --hd-feedback-warning: var(--colour-warning, #9a6400);
  --hd-feedback-info: var(--colour-primary, #06456b);
  --hd-toast-top-offset: calc(15vh + env(safe-area-inset-top));
}

#hd-message-region.hd-message-region,
.hd-message-region,
.hd-feedback-stack {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

#hd-message-region.hd-message-region,
.hd-message-region {
  margin: 0 0 18px !important;
  padding: 0 !important;
}

#hd-message-region:empty,
.hd-message-region:empty,
.hd-feedback-stack:empty,
.hd-alert:empty,
.hd-message:empty,
.hd-feedback:empty,
.hd-notice:empty,
.hd-status-message:empty,
.hd-form-message:empty,
.hd-tool-result:empty {
  display: none !important;
}

.hd-feedback-stack {
  display: grid !important;
  gap: 12px !important;
  margin: 0 0 18px !important;
}

#hd-message-region .hd-feedback-stack,
.hd-message-region .hd-feedback-stack,
.hd-main-content-inner > .hd-feedback-stack,
.hd-content-panel > .hd-feedback-stack {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.hd-feedback-stack--local {
  margin: 14px 0 18px !important;
}

.hd-feedback-stack--inline-editor {
  margin: 0 0 18px !important;
}

.hd-alert,
.hd-message,
.hd-feedback,
.hd-notice,
.hd-status-message,
.hd-form-message,
.hd-tool-result,
.hd-admin-alert,
.hd-admin-message,
.hd-admin-feedback,
.hd-admin-result,
.hd-admin-result-panel,
[data-hd-toast] {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 0 !important;
  padding: var(--hd-feedback-pad-y) var(--hd-feedback-pad-x) !important;
  border: 1px solid var(--hd-feedback-border) !important;
  border-left-width: 7px !important;
  border-radius: var(--hd-feedback-radius) !important;
  background: var(--hd-feedback-surface) !important;
  color: var(--hd-feedback-text) !important;
  box-shadow: var(--hd-feedback-shadow) !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
  word-spacing: normal !important;
}

.hd-feedback {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  gap: .25rem .65rem !important;
  align-items: start !important;
}

.hd-admin-result-card .hd-alert {
  display: grid !important;
  gap: .25rem !important;
}

.hd-alert > :first-child,
.hd-message > :first-child,
.hd-feedback > :first-child,
.hd-notice > :first-child,
.hd-status-message > :first-child,
.hd-form-message > :first-child,
.hd-tool-result > :first-child {
  margin-top: 0 !important;
}

.hd-alert > :last-child,
.hd-message > :last-child,
.hd-feedback > :last-child,
.hd-notice > :last-child,
.hd-status-message > :last-child,
.hd-form-message > :last-child,
.hd-tool-result > :last-child {
  margin-bottom: 0 !important;
}

.hd-feedback__title,
.hd-alert > strong:first-child,
.hd-message > strong:first-child,
.hd-status-message > strong:first-child,
.hd-form-message > strong:first-child,
.hd-tool-result > strong:first-child,
.hd-toast > strong:first-child,
[data-hd-toast] strong:first-child,
[role="status"] > strong:first-child,
[role="alert"] > strong:first-child {
  display: inline-block !important;
  margin: 0 .38rem 0 0 !important;
  color: inherit !important;
  font-weight: 900 !important;
  vertical-align: baseline !important;
}

.hd-feedback__title {
  color: var(--hd-feedback-heading) !important;
  white-space: normal !important;
}

.hd-feedback__message,
.hd-toast__msg,
.hd-toast > span,
.hd-toast > p {
  display: block !important;
  min-width: 0 !important;
  color: inherit !important;
  overflow-wrap: break-word !important;
}

.hd-alert a,
.hd-message a,
.hd-feedback a,
.hd-toast a,
.hd-status-message a,
.hd-form-message a,
.hd-tool-result a,
.hd-admin-alert a,
.hd-admin-message a,
.hd-admin-feedback a,
.hd-admin-result-panel a {
  color: currentColor !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  text-underline-offset: .16em !important;
}

.hd-alert--success,
.hd-alert-success,
.hd-message--success,
.hd-feedback--success,
.hd-form-message--success,
.hd-status-message--success,
.hd-tool-result--success,
.hd-status-success,
[data-hd-toast="success"] {
  border-color: color-mix(in srgb, var(--hd-feedback-success) 38%, var(--hd-feedback-border)) !important;
  border-left-color: var(--hd-feedback-success) !important;
  background: color-mix(in srgb, var(--hd-feedback-success) 10%, var(--hd-feedback-surface)) !important;
  color: var(--colour-success-text, #103f29) !important;
}

.hd-alert--danger,
.hd-alert--error,
.hd-alert-danger,
.hd-message--danger,
.hd-message--error,
.hd-feedback--danger,
.hd-feedback--error,
.hd-form-message--error,
.hd-status-message--danger,
.hd-status-message--error,
.hd-tool-result--danger,
.hd-tool-result--error,
.hd-status-danger,
[data-hd-toast="danger"],
[data-hd-toast="error"] {
  border-color: color-mix(in srgb, var(--hd-feedback-danger) 38%, var(--hd-feedback-border)) !important;
  border-left-color: var(--hd-feedback-danger) !important;
  background: color-mix(in srgb, var(--hd-feedback-danger) 9%, var(--hd-feedback-surface)) !important;
  color: var(--colour-danger-text, #641f1f) !important;
}

.hd-alert--warning,
.hd-alert--warn,
.hd-alert-warning,
.hd-message--warning,
.hd-message--warn,
.hd-feedback--warning,
.hd-feedback--warn,
.hd-form-message--warning,
.hd-status-message--warning,
.hd-tool-result--warning,
[data-hd-toast="warning"],
[data-hd-toast="warn"] {
  border-color: color-mix(in srgb, var(--hd-feedback-warning) 42%, var(--hd-feedback-border)) !important;
  border-left-color: var(--hd-feedback-warning) !important;
  background: color-mix(in srgb, var(--hd-feedback-warning) 11%, var(--hd-feedback-surface)) !important;
  color: var(--colour-warning-text, #5f4200) !important;
}

.hd-alert--info,
.hd-alert-info,
.hd-message--info,
.hd-feedback--info,
.hd-form-message--info,
.hd-status-message--info,
.hd-tool-result--info,
[data-hd-toast="info"] {
  border-color: color-mix(in srgb, var(--hd-feedback-info) 34%, var(--hd-feedback-border)) !important;
  border-left-color: var(--hd-feedback-info) !important;
  background: color-mix(in srgb, var(--hd-feedback-info) 7%, var(--hd-feedback-surface)) !important;
  color: var(--colour-info-text, var(--colour-heading, #053b5d)) !important;
}

.hd-alert--success::before {
  content: none !important;
}

.hd-badge,
.badge,
.hd-pill,
.hd-status-pill,
.hd-tag {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  max-width: 100% !important;
  min-height: 1.75rem !important;
  margin: 0 .45rem .25rem 0 !important;
  padding: .28rem .64rem !important;
  border: 1px solid var(--hd-feedback-border) !important;
  border-radius: 999px !important;
  background: var(--colour-surface-soft, #f7f0df) !important;
  color: var(--hd-feedback-heading) !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-decoration: none !important;
  vertical-align: middle !important;
  white-space: normal !important;
}

.hd-badge--success,
.hd-pill--success,
.hd-status-pill--success,
.hd-status-pill.is-good,
.hd-status-dot--pass,
.is-good {
  border-color: color-mix(in srgb, var(--hd-feedback-success) 42%, #fff) !important;
  background: color-mix(in srgb, var(--hd-feedback-success) 14%, #fff) !important;
  color: var(--colour-success-text, #0b5a30) !important;
}

.hd-badge--danger,
.hd-badge--error,
.hd-pill--danger,
.hd-status-pill--danger,
.hd-status-dot--fail,
.is-error {
  border-color: color-mix(in srgb, var(--hd-feedback-danger) 38%, #fff) !important;
  background: color-mix(in srgb, var(--hd-feedback-danger) 12%, #fff) !important;
  color: var(--colour-danger-text, #741f1f) !important;
}

.hd-badge--warning,
.hd-badge--warn,
.hd-pill--warning,
.hd-status-dot--warn,
.is-warning {
  border-color: color-mix(in srgb, var(--hd-feedback-warning) 40%, #fff) !important;
  background: color-mix(in srgb, var(--hd-feedback-warning) 14%, #fff) !important;
  color: var(--colour-warning-text, #624400) !important;
}

.hd-badge--info,
.hd-badge--soft,
.hd-pill--info,
.hd-status-pill--info {
  border-color: color-mix(in srgb, var(--hd-feedback-info) 26%, #fff) !important;
  background: var(--colour-info-soft, #edf7fb) !important;
  color: var(--colour-info-text, #073b5f) !important;
}

.hd-status-dot,
.hd-status-dot--pass,
.hd-status-dot--warn,
.hd-status-dot--fail {
  display: inline-block !important;
  width: .72rem !important;
  height: .72rem !important;
  border-radius: 999px !important;
  background: currentColor !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent) !important;
  vertical-align: middle !important;
}

.hd-empty,
.hd-empty-state {
  box-sizing: border-box !important;
  width: 100% !important;
  padding: 14px 16px !important;
  border: 1px dashed var(--hd-feedback-border) !important;
  border-radius: 14px !important;
  background: var(--colour-surface-soft, #f7f0df) !important;
  color: var(--colour-muted, #526476) !important;
  line-height: 1.45 !important;
}

.hd-message-list,
.hd-result-list,
#admin .hd-message-list,
#admin .hd-result-list {
  display: grid !important;
  gap: .75rem !important;
}

.hd-toast-wrap,
.hd-toast-region,
.hd-toast-stack {
  position: fixed !important;
  top: var(--hd-toast-top-offset) !important;
  right: 16px !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 100000 !important;
  display: grid !important;
  gap: 10px !important;
  width: min(430px, calc(100vw - 32px)) !important;
  pointer-events: none !important;
}

.hd-toast,
.hd-toast-message {
  pointer-events: auto !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: .65rem !important;
  align-items: start !important;
  width: 100% !important;
  margin: 0 !important;
  padding: .9rem 1rem !important;
  border: 1px solid var(--hd-feedback-border) !important;
  border-left-width: 7px !important;
  border-radius: 16px !important;
  background: var(--hd-feedback-surface) !important;
  color: var(--hd-feedback-text) !important;
  box-shadow: 0 18px 42px rgba(10,24,32,.22) !important;
  line-height: 1.35 !important;
}

.hd-toast__icon {
  width: .82rem !important;
  height: .82rem !important;
  margin-top: .28rem !important;
  border-radius: 999px !important;
  background: var(--hd-toast-accent, var(--hd-feedback-info)) !important;
}

.hd-toast__body {
  display: grid !important;
  gap: .16rem !important;
  min-width: 0 !important;
}

.hd-toast__title,
.hd-toast > strong:first-child {
  display: block !important;
  margin: 0 !important;
  font-weight: 900 !important;
  color: inherit !important;
}

.hd-toast__close,
.hd-toast > button {
  align-self: start !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.72) !important;
  color: inherit !important;
  cursor: pointer !important;
}

.hd-toast--success {
  --hd-toast-accent: var(--hd-feedback-success);
  border-left-color: var(--hd-toast-accent) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-feedback-success) 13%, #fff), #fff 76%) !important;
  color: var(--colour-success-text, #0f442b) !important;
}

.hd-toast--error,
.hd-toast--danger {
  --hd-toast-accent: var(--hd-feedback-danger);
  border-left-color: var(--hd-toast-accent) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-feedback-danger) 11%, #fff), #fff 76%) !important;
  color: var(--colour-danger-text, #681f1f) !important;
}

.hd-toast--warning,
.hd-toast--warn {
  --hd-toast-accent: var(--hd-feedback-warning);
  border-left-color: var(--hd-toast-accent) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-feedback-warning) 13%, #fff), #fff 76%) !important;
  color: var(--colour-warning-text, #5f4200) !important;
}

.hd-toast--info {
  --hd-toast-accent: var(--hd-feedback-info);
  border-left-color: var(--hd-toast-accent) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-feedback-info) 8%, #fff), #fff 76%) !important;
  color: var(--colour-info-text, var(--colour-heading, #053b5d)) !important;
}

@media (max-width: 760px) {
  .hd-feedback {
    grid-template-columns: 1fr !important;
  }

  .hd-feedback__title,
  .hd-alert > strong:first-child,
  .hd-message > strong:first-child,
  .hd-status-message > strong:first-child,
  .hd-form-message > strong:first-child,
  .hd-tool-result > strong:first-child {
    margin-right: 0 !important;
  }

  .hd-toast-wrap,
  .hd-toast-region,
  .hd-toast-stack {
    top: auto !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 24px) !important;
  }

  .hd-toast,
  .hd-toast-message {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    padding: .8rem .9rem !important;
  }
}

/* === Footer shell, privacy and cookies [footer_shell] === */
/* =========================================================
HD RMS footer_shell v970
Clean owner section.
Owns the shared footer shell, footer cards, partner logos,
contact action, privacy/update links and public cookie consent modal.
Ownership boundaries:
- Does own: footer rail, footer inner layout, partner logos,
footer contact/privacy cards, footer links, footer contact button,
cookie/privacy consent modal.
- Does not own: global typography, Quick Jump, hub cards, timeline,
primary navigation, header, hero/CTA banner, generic page buttons.
========================================================= */

/* =========================================================
Footer tokens
========================================================= */
:root {
  --footer-shell-width: 100%;
  --footer-shell-max: 100%;
  --footer-shell-radius: 24px;
  --footer-shell-padding-block-start: clamp(28px, 4vw, 44px);
  --footer-shell-padding-inline: clamp(18px, 3vw, 38px);
  --footer-shell-padding-block-end: clamp(24px, 3vw, 34px);
  --footer-shell-gap: clamp(24px, 3.4vw, 38px);
  --footer-inner-width: min(920px, 100%);
  --footer-card-radius: 18px;
  --footer-card-padding: clamp(18px, 2.4vw, 28px);
  --footer-card-gap: clamp(18px, 2.6vw, 30px);
  --footer-card-min-height: clamp(168px, 18vw, 204px);
  --footer-logo-grid-width: min(840px, 100%);
  --footer-logo-grid-gap: clamp(14px, 2vw, 22px);
  --footer-logo-card-radius: 16px;
  --footer-logo-card-min-height: 96px;
  --footer-logo-card-padding: clamp(14px, 2vw, 20px) clamp(20px, 3vw, 34px);
  --footer-logo-img-max-width: 72%;
  --footer-logo-img-max-height: 64px;
  --footer-logo-strath-max-width: 64%;
  --footer-logo-strath-max-height: 64px;
  --footer-logo-sg-max-width: 74%;
  --footer-logo-sg-max-height: 60px;
  --footer-logo-celcis-max-width: 76%;
  --footer-logo-celcis-max-height: 62px;
  --footer-logo-sprag-max-width: 72%;
  --footer-logo-sprag-max-height: 64px;
  --footer-contact-button-min-width: 12rem;
  --footer-contact-button-min-height: 3.1rem;
  --footer-contact-button-radius: 16px;
  --footer-bg: var(--colour-footer-bg, var(--colour-primary-dark, #261d45));
  --footer-text: var(--colour-footer-text, #ffffff);
  --footer-heading: var(--colour-footer-heading, var(--footer-text));
  --footer-muted: var(--colour-footer-muted, color-mix(in srgb, var(--footer-text) 88%, transparent));
  --footer-link: var(--colour-footer-link, var(--footer-text));
  --footer-link-hover: var(--colour-footer-link-hover, var(--footer-link));
  --footer-card-bg: var(--colour-footer-card-bg, color-mix(in srgb, var(--footer-bg) 84%, #ffffff 16%));
  --footer-logo-card-bg: var(--colour-footer-logo-card-bg, var(--colour-surface-strong, #ffffff));
  --footer-border: color-mix(in srgb, var(--footer-text) 26%, transparent);
  --footer-rule: color-mix(in srgb, var(--footer-text) 30%, transparent);
  --footer-focus: var(--hd-focus-ring, var(--colour-focus, #ffffff));
  --footer-focus-soft: var(--hd-focus-ring-soft, rgba(255,255,255,.22));
  --footer-action-bg: var(--colour-footer-action-bg, var(--colour-action-bg, var(--colour-primary, #2f4758)));
  --footer-action-text: var(--colour-footer-action-text, var(--colour-action-text, var(--colour-on-primary, #ffffff)));
  --footer-action-hover-bg: var(--colour-footer-action-hover-bg, var(--colour-action-hover-bg, var(--colour-primary-hover, #073a63)));
  --footer-action-hover-text: var(--colour-footer-action-hover-text, var(--colour-action-hover-text, var(--footer-action-text)));
  --footer-action-border: var(--colour-footer-button-border, var(--colour-border, #bfc8c1));
}

/* =========================================================
Footer shell and inner rail
========================================================= */
#hd-site-footer,
.hd-site-footer {
  box-sizing: border-box !important;
  width: var(--footer-shell-width) !important;
  max-width: var(--footer-shell-max) !important;
  margin: 0 auto !important;
  padding:
  var(--footer-shell-padding-block-start)
  var(--footer-shell-padding-inline)
  var(--footer-shell-padding-block-end) !important;
  border-radius: 0 0 var(--footer-shell-radius) var(--footer-shell-radius) !important;
  background: var(--footer-bg) !important;
  color: var(--footer-text) !important;
  overflow: hidden !important;
}

#hd-site-footer *,
#hd-site-footer *::before,
#hd-site-footer *::after,
.hd-site-footer *,
.hd-site-footer *::before,
.hd-site-footer *::after {
  box-sizing: border-box !important;
  min-width: 0 !important;
}

#hd-footer,
#hd-site-footer #hd-footer,
#hd-site-footer .hd-footer-container,
#hd-site-footer .footer-container,
#hd-site-footer .hd-footer-inner,
#hd-site-footer .footer-inner,
#hd-site-footer .footer-content,
.hd-site-footer .hd-footer-container,
.hd-site-footer .footer-container,
.hd-site-footer .hd-footer-inner,
.hd-site-footer .footer-inner,
.hd-site-footer .footer-content {
  box-sizing: border-box !important;
  display: grid !important;
  gap: var(--footer-shell-gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  color: var(--footer-text) !important;
}

/* =========================================================
Footer typography and links scoped to footer only
========================================================= */
#hd-site-footer h2,
#hd-site-footer h3,
#hd-site-footer h4,
.hd-site-footer h2,
.hd-site-footer h3,
.hd-site-footer h4 {
  margin: 0 0 .75rem !important;
  color: var(--footer-heading) !important;
  line-height: 1.2 !important;
  letter-spacing: .01em !important;
}

#hd-site-footer p,
#hd-site-footer li,
.hd-site-footer p,
.hd-site-footer li {
  color: var(--footer-muted) !important;
  line-height: 1.56 !important;
  overflow-wrap: break-word !important;
}

#hd-site-footer a:not(.footer-partner):not(.hd-footer-partner):not(.footer-logo-link):not(.hd-footer-logo-link),
.hd-site-footer a:not(.footer-partner):not(.hd-footer-partner):not(.footer-logo-link):not(.hd-footer-logo-link) {
  color: var(--footer-link) !important;
  -webkit-text-fill-color: var(--footer-link) !important;
  text-decoration: underline !important;
  text-decoration-color: color-mix(in srgb, currentColor 72%, transparent) !important;
  text-decoration-thickness: max(1px, .08em) !important;
  text-underline-offset: .22em !important;
}

#hd-site-footer a:not(.footer-partner):not(.hd-footer-partner):not(.footer-logo-link):not(.hd-footer-logo-link):hover,
#hd-site-footer a:not(.footer-partner):not(.hd-footer-partner):not(.footer-logo-link):not(.hd-footer-logo-link):focus-visible,
.hd-site-footer a:not(.footer-partner):not(.hd-footer-partner):not(.footer-logo-link):not(.hd-footer-logo-link):hover,
.hd-site-footer a:not(.footer-partner):not(.hd-footer-partner):not(.footer-logo-link):not(.hd-footer-logo-link):focus-visible {
  color: var(--footer-link-hover) !important;
  -webkit-text-fill-color: var(--footer-link-hover) !important;
  text-decoration-color: currentColor !important;
  background: color-mix(in srgb, currentColor 12%, transparent) !important;
}

#hd-site-footer a:focus-visible,
#hd-site-footer button:focus-visible,
.hd-site-footer a:focus-visible,
.hd-site-footer button:focus-visible {
  outline: 3px solid var(--footer-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px var(--footer-focus-soft) !important;
}

/* =========================================================
Partner logo area
========================================================= */
#hd-site-footer .footer-partners,
#hd-site-footer .hd-footer-partners,
.hd-site-footer .footer-partners,
.hd-site-footer .hd-footer-partners {
  width: var(--footer-logo-grid-width) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: visible !important;
  text-align: center !important;
}

#hd-site-footer .footer-partners-title,
#hd-site-footer .hd-footer-partners-title,
.hd-site-footer .footer-partners-title,
.hd-site-footer .hd-footer-partners-title {
  display: none !important;
}

#hd-site-footer .footer-partners-heading,
#hd-site-footer .hd-footer-partners-heading,
.hd-site-footer .footer-partners-heading,
.hd-site-footer .hd-footer-partners-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(10px, 2vw, 18px) !important;
  margin: 0 auto clamp(16px, 2.4vw, 22px) !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--footer-heading) !important;
  font-size: clamp(.88rem, 1.5vw, 1rem) !important;
  line-height: 1.25 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  text-align: center !important;
}

#hd-site-footer .footer-partners-heading::before,
#hd-site-footer .footer-partners-heading::after,
#hd-site-footer .hd-footer-partners-heading::before,
#hd-site-footer .hd-footer-partners-heading::after,
.hd-site-footer .footer-partners-heading::before,
.hd-site-footer .footer-partners-heading::after,
.hd-site-footer .hd-footer-partners-heading::before,
.hd-site-footer .hd-footer-partners-heading::after {
  content: "" !important;
  display: block !important;
  height: 1px !important;
  flex: 1 1 80px !important;
  max-width: 220px !important;
  background: color-mix(in srgb, var(--footer-text) 42%, transparent) !important;
}

#hd-site-footer .footer-partners-grid,
#hd-site-footer .hd-footer-partners-grid,
#hd-site-footer .footer-logo-grid,
#hd-site-footer .hd-footer-logo-grid,
.hd-site-footer .footer-partners-grid,
.hd-site-footer .hd-footer-partners-grid,
.hd-site-footer .footer-logo-grid,
.hd-site-footer .hd-footer-logo-grid,
.hd-footer-logos,
.hd-footer-logo-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--footer-logo-grid-gap) !important;
  width: var(--footer-logo-grid-width) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

#hd-site-footer .footer-partner,
#hd-site-footer .hd-footer-partner,
#hd-site-footer .footer-logo-link,
#hd-site-footer .hd-footer-logo-link,
#hd-site-footer .hd-footer-logo-card,
#hd-site-footer .hd-collaborator-logo-card,
.hd-site-footer .footer-partner,
.hd-site-footer .hd-footer-partner,
.hd-site-footer .footer-logo-link,
.hd-site-footer .hd-footer-logo-link,
.hd-site-footer .hd-footer-logo-card,
.hd-site-footer .hd-collaborator-logo-card {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: var(--footer-logo-card-min-height) !important;
  padding: var(--footer-logo-card-padding) !important;
  border: 0 !important;
  border-radius: var(--footer-logo-card-radius) !important;
  background: var(--footer-logo-card-bg) !important;
  color: inherit !important;
  text-decoration: none !important;
  overflow: hidden !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

#hd-site-footer .footer-partner:hover,
#hd-site-footer .hd-footer-partner:hover,
#hd-site-footer .footer-logo-link:hover,
#hd-site-footer .hd-footer-logo-link:hover,
#hd-site-footer .hd-footer-logo-card:hover,
#hd-site-footer .hd-collaborator-logo-card:hover,
#hd-site-footer .footer-partner:focus-visible,
#hd-site-footer .hd-footer-partner:focus-visible,
#hd-site-footer .footer-logo-link:focus-visible,
#hd-site-footer .hd-footer-logo-link:focus-visible,
#hd-site-footer .hd-footer-logo-card:focus-visible,
#hd-site-footer .hd-collaborator-logo-card:focus-visible {
  background: var(--footer-logo-card-bg) !important;
  color: inherit !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

#hd-site-footer .footer-partner img,
#hd-site-footer .hd-footer-partner img,
#hd-site-footer .footer-logo-link img,
#hd-site-footer .hd-footer-logo-link img,
#hd-site-footer .hd-footer-logo-card img,
#hd-site-footer .hd-collaborator-logo-card img,
#hd-site-footer .organisation-logo img,
.hd-site-footer .footer-partner img,
.hd-site-footer .hd-footer-partner img,
.hd-site-footer .footer-logo-link img,
.hd-site-footer .hd-footer-logo-link img,
.hd-site-footer .hd-footer-logo-card img,
.hd-site-footer .hd-collaborator-logo-card img,
.hd-site-footer .organisation-logo img {
  display: block !important;
  width: auto !important;
  max-width: var(--footer-logo-img-max-width) !important;
  height: auto !important;
  max-height: var(--footer-logo-img-max-height) !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: auto !important;
  transform: none !important;
  transition: none !important;
  filter: none !important;
  opacity: 1 !important;
}

#hd-site-footer .footer-partner--strath img,
#hd-site-footer .hd-footer-partner--strath img,
#hd-site-footer [class*="strath"] img {
  max-width: var(--footer-logo-strath-max-width) !important;
  max-height: var(--footer-logo-strath-max-height) !important;
}

#hd-site-footer .footer-partner--sg img,
#hd-site-footer .hd-footer-partner--sg img,
#hd-site-footer [class*="sg"] img,
#hd-site-footer [class*="government"] img {
  max-width: var(--footer-logo-sg-max-width) !important;
  max-height: var(--footer-logo-sg-max-height) !important;
}

#hd-site-footer .footer-partner--celcis img,
#hd-site-footer .hd-footer-partner--celcis img,
#hd-site-footer [class*="celcis"] img {
  max-width: var(--footer-logo-celcis-max-width) !important;
  max-height: var(--footer-logo-celcis-max-height) !important;
}

#hd-site-footer .footer-partner--sprag img,
#hd-site-footer .hd-footer-partner--sprag img,
#hd-site-footer [class*="sprag"] img {
  max-width: var(--footer-logo-sprag-max-width) !important;
  max-height: var(--footer-logo-sprag-max-height) !important;
}

/* =========================================================
Footer cards: contact and privacy
========================================================= */
#hd-site-footer .footer-top,
#hd-site-footer .hd-footer-top,
#hd-site-footer .footer-cards,
#hd-site-footer .hd-footer-cards,
#hd-site-footer .footer-card-grid,
#hd-site-footer .hd-footer-card-grid,
.hd-site-footer .footer-top,
.hd-site-footer .hd-footer-top,
.hd-site-footer .footer-cards,
.hd-site-footer .hd-footer-cards,
.hd-site-footer .footer-card-grid,
.hd-site-footer .hd-footer-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--footer-card-gap) !important;
  align-items: stretch !important;
  width: var(--footer-inner-width) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

#hd-site-footer .footer-contact,
#hd-site-footer .footer-privacy,
#hd-site-footer .hd-footer-contact,
#hd-site-footer .hd-footer-privacy,
#hd-site-footer .footer-card,
#hd-site-footer .hd-footer-card,
.hd-site-footer .footer-contact,
.hd-site-footer .footer-privacy,
.hd-site-footer .hd-footer-contact,
.hd-site-footer .hd-footer-privacy,
.hd-site-footer .footer-card,
.hd-site-footer .hd-footer-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: var(--footer-card-min-height) !important;
  padding: var(--footer-card-padding) !important;
  border: 1px solid var(--footer-border) !important;
  border-radius: var(--footer-card-radius) !important;
  background: var(--footer-card-bg) !important;
  color: var(--footer-text) !important;
  overflow: hidden !important;
}

#hd-site-footer .footer-contact-title,
#hd-site-footer .footer-privacy-title,
#hd-site-footer .hd-footer-contact h2,
#hd-site-footer .hd-footer-privacy h2,
.hd-site-footer .footer-contact-title,
.hd-site-footer .footer-privacy-title,
.hd-site-footer .hd-footer-contact h2,
.hd-site-footer .hd-footer-privacy h2 {
  margin: 0 0 .75rem !important;
  padding-bottom: .65rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--footer-text) 36%, transparent) !important;
}

#hd-site-footer .footer-contact-text,
#hd-site-footer .footer-privacy-text,
#hd-site-footer .footer-privacy-links,
#hd-site-footer .footer-privacy-links li,
.hd-site-footer .footer-contact-text,
.hd-site-footer .footer-privacy-text,
.hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links li {
  color: var(--footer-muted) !important;
}

#hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 18px !important;
  margin: auto 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#hd-site-footer .footer-privacy-links a,
.hd-site-footer .footer-privacy-links a {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

/* =========================================================
Footer contact action
========================================================= */
#hd-site-footer .footer-contact-actions,
#hd-site-footer .hd-footer-contact-actions,
#hd-site-footer .footer-actions,
#hd-site-footer .hd-footer-actions,
#hd-site-footer .footer-nav-actions,
#hd-site-footer .hd-footer-nav-actions,
.hd-site-footer .footer-contact-actions,
.hd-site-footer .hd-footer-contact-actions,
.hd-site-footer .footer-actions,
.hd-site-footer .hd-footer-actions,
.hd-site-footer .footer-nav-actions,
.hd-site-footer .hd-footer-nav-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .6rem !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

#hd-site-footer .footer-contact-btn,
#hd-site-footer a.footer-contact-btn,
#hd-site-footer .hd-footer-contact-button,
#hd-site-footer .hd-footer-contact-cta,
#hd-site-footer .footer-contact .hd-btn,
#hd-site-footer .hd-footer-contact .hd-btn,
#hd-site-footer a[href*="/content/contact"],
.hd-site-footer .footer-contact-btn,
.hd-site-footer a.footer-contact-btn,
.hd-site-footer .hd-footer-contact-button,
.hd-site-footer .hd-footer-contact-cta,
.hd-site-footer .footer-contact .hd-btn,
.hd-site-footer .hd-footer-contact .hd-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: flex-start !important;
  gap: .55rem !important;
  width: fit-content !important;
  min-width: var(--footer-contact-button-min-width) !important;
  min-height: var(--footer-contact-button-min-height) !important;
  margin: auto auto 0 !important;
  padding: .82rem 1.35rem !important;
  border: 1px solid color-mix(in srgb, var(--footer-action-bg) 72%, var(--footer-action-border) 28%) !important;
  border-radius: var(--footer-contact-button-radius) !important;
  background: var(--footer-action-bg) !important;
  color: var(--footer-action-text) !important;
  -webkit-text-fill-color: var(--footer-action-text) !important;
  box-shadow: 0 16px 32px color-mix(in srgb, var(--colour-shadow, #102630) 18%, transparent) !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  transform: none !important;
}

#hd-site-footer .footer-contact-btn:hover,
#hd-site-footer a.footer-contact-btn:hover,
#hd-site-footer .hd-footer-contact-button:hover,
#hd-site-footer .hd-footer-contact-cta:hover,
#hd-site-footer .footer-contact .hd-btn:hover,
#hd-site-footer .hd-footer-contact .hd-btn:hover,
.hd-site-footer .footer-contact-btn:hover,
.hd-site-footer a.footer-contact-btn:hover,
.hd-site-footer .hd-footer-contact-button:hover,
.hd-site-footer .hd-footer-contact-cta:hover,
.hd-site-footer .footer-contact .hd-btn:hover,
.hd-site-footer .hd-footer-contact .hd-btn:hover {
  background: var(--footer-action-hover-bg) !important;
  color: var(--footer-action-hover-text) !important;
  -webkit-text-fill-color: var(--footer-action-hover-text) !important;
  border-color: color-mix(in srgb, var(--footer-action-hover-bg) 70%, var(--footer-action-border) 30%) !important;
  text-decoration: none !important;
  filter: brightness(1.04) !important;
  transform: none !important;
}

/* =========================================================
Footer links and bottom strip
========================================================= */
#hd-site-footer .footer-links,
#hd-site-footer .hd-footer-links,
.hd-site-footer .footer-links,
.hd-site-footer .hd-footer-links {
  width: var(--footer-inner-width) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

#hd-site-footer .footer-links-title,
.hd-site-footer .footer-links-title {
  margin: 0 0 .75rem !important;
}

#hd-site-footer .footer-links-list,
#hd-site-footer .footer-link-list,
.hd-site-footer .footer-links-list,
.hd-site-footer .footer-link-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .6rem 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#hd-site-footer .footer-bottom,
#hd-site-footer .hd-footer-bottom,
.hd-site-footer .footer-bottom,
.hd-site-footer .hd-footer-bottom {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding-top: 18px !important;
  border-top: 1px solid var(--footer-rule) !important;
  text-align: center !important;
  color: var(--footer-muted) !important;
}

#hd-site-footer .footer-bottom-text,
.hd-site-footer .footer-bottom-text {
  margin: 0 !important;
  color: inherit !important;
}

/* =========================================================
Tablet and narrow desktop
========================================================= */
@media (max-width: 900px) {
  :root {
    --footer-shell-width: var(--hd-mobile-inner-width, min(calc(100% - 24px), 720px));
    --footer-shell-max: var(--hd-mobile-inner-width, min(calc(100% - 24px), 720px));
    --footer-card-min-height: 0px;
  }

  #hd-site-footer .footer-top,
  #hd-site-footer .hd-footer-top,
  #hd-site-footer .footer-cards,
  #hd-site-footer .hd-footer-cards,
  #hd-site-footer .footer-card-grid,
  #hd-site-footer .hd-footer-card-grid,
  .hd-site-footer .footer-top,
  .hd-site-footer .hd-footer-top,
  .hd-site-footer .footer-cards,
  .hd-site-footer .hd-footer-cards,
  .hd-site-footer .footer-card-grid,
  .hd-site-footer .hd-footer-card-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
Mobile
========================================================= */
@media (max-width: 760px) {
  :root {
    --footer-shell-width: 100%;
    --footer-shell-max: 100%;
    --footer-shell-radius: 0px;
    --footer-shell-padding-block-start: clamp(22px, 6vw, 30px);
    --footer-shell-padding-inline: clamp(14px, 4vw, 18px);
    --footer-shell-padding-block-end: clamp(20px, 5vw, 26px);
    --footer-shell-gap: clamp(18px, 5vw, 26px);
    --footer-card-padding: clamp(16px, 5vw, 20px);
    --footer-card-gap: clamp(14px, 4vw, 18px);
    --footer-card-radius: 16px;
    --footer-logo-grid-width: min(90%, 380px);
    --footer-logo-grid-gap: 10px;
    --footer-logo-card-min-height: 82px;
    --footer-logo-card-padding: 10px 16px;
    --footer-logo-card-radius: 14px;
    --footer-logo-img-max-width: 76%;
    --footer-logo-img-max-height: 58px;
    --footer-logo-strath-max-width: 64%;
    --footer-logo-strath-max-height: 54px;
    --footer-logo-sg-max-width: 76%;
    --footer-logo-sg-max-height: 50px;
    --footer-logo-celcis-max-width: 78%;
    --footer-logo-celcis-max-height: 54px;
    --footer-logo-sprag-max-width: 72%;
    --footer-logo-sprag-max-height: 58px;
    --footer-contact-button-min-width: min(220px, 100%);
    --footer-contact-button-min-height: 42px;
    --footer-contact-button-radius: 12px;
  }

  #hd-site-footer,
  .hd-site-footer {
    width: var(--footer-shell-width) !important;
    max-width: var(--footer-shell-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #hd-site-footer p,
  #hd-site-footer li,
  .hd-site-footer p,
  .hd-site-footer li {
    font-size: clamp(.86rem, 3.2vw, .96rem) !important;
    line-height: 1.42 !important;
  }

  #hd-site-footer .footer-partners-grid,
  #hd-site-footer .hd-footer-partners-grid,
  #hd-site-footer .footer-logo-grid,
  #hd-site-footer .hd-footer-logo-grid,
  .hd-site-footer .footer-partners-grid,
  .hd-site-footer .hd-footer-partners-grid,
  .hd-site-footer .footer-logo-grid,
  .hd-site-footer .hd-footer-logo-grid,
  .hd-footer-logos,
  .hd-footer-logo-grid {
    grid-template-columns: 1fr !important;
    width: var(--footer-logo-grid-width) !important;
    max-width: var(--footer-logo-grid-width) !important;
  }

  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .65rem 1rem !important;
  }

  #hd-site-footer .footer-contact-btn,
  #hd-site-footer a.footer-contact-btn,
  #hd-site-footer .hd-footer-contact-button,
  #hd-site-footer .hd-footer-contact-cta,
  #hd-site-footer .footer-contact .hd-btn,
  #hd-site-footer .hd-footer-contact .hd-btn,
  .hd-site-footer .footer-contact-btn,
  .hd-site-footer a.footer-contact-btn,
  .hd-site-footer .hd-footer-contact-button,
  .hd-site-footer .hd-footer-contact-cta,
  .hd-site-footer .footer-contact .hd-btn,
  .hd-site-footer .hd-footer-contact .hd-btn {
    align-self: center !important;
    min-width: var(--footer-contact-button-min-width) !important;
    min-height: var(--footer-contact-button-min-height) !important;
    padding: 8px 14px !important;
    font-size: .92rem !important;
    border-radius: var(--footer-contact-button-radius) !important;
  }
}

@media (max-width: 520px) {
  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-links {
    grid-template-columns: 1fr !important;
  }
}

/* HD RMS v1005 footer/site menus pass.
Owner: footer_shell. Keeps footer content cards and footer buttons readable after palette changes. */
#hd-site-footer :is(.footer-contact-btn,.hd-btn),
.hd-site-footer :is(.footer-contact-btn,.hd-btn) {
  color: var(--colour-footer-action-text, var(--colour-on-primary, #fff)) !important;
  -webkit-text-fill-color: var(--colour-footer-action-text, var(--colour-on-primary, #fff)) !important;
  background: var(--colour-footer-action-bg, var(--colour-primary, #4d6533)) !important;
  border-color: color-mix(in srgb, var(--colour-footer-action-bg, var(--colour-primary, #4d6533)) 70%, var(--colour-footer-text, #fff) 30%) !important;
}

#hd-site-footer a,
.hd-site-footer a {
  color: var(--colour-footer-link, var(--colour-footer-text, #fff)) !important;
  -webkit-text-fill-color: var(--colour-footer-link, var(--colour-footer-text, #fff)) !important;
}

/* =========================================================
HD v1026 footer bottom polish
Owns the public footer bottom edge and copyright finish only.
========================================================= */
#hd-site-footer,
#hd-footer-panel,
.hd-site-footer,
.hd-footer-shell {
  margin-block-end:0!important;
  border-block-end:0!important;
}

#hd-site-footer .hd-footer-copyright,
#hd-site-footer .footer-copyright,
#hd-site-footer .hd-footer-bottom {
  margin-block-start:clamp(1.4rem,3vw,2.2rem)!important;
  padding-block:clamp(1.05rem,2.2vw,1.45rem)!important;
  border-block-start:1px solid color-mix(in srgb,var(--colour-footer-text,#fff) 22%,transparent)!important;
  text-align:center!important;
}

#hd-site-footer a,
#hd-footer-panel a {
  text-underline-offset:.18em!important;
  text-decoration-thickness:.08em!important;
}

#hd-site-footer .hd-footer-inner,
#hd-footer-panel .hd-footer-inner {
  border-end-start-radius:clamp(20px,3vw,32px)!important;
  border-end-end-radius:clamp(20px,3vw,32px)!important;
}

body:has(#hd-site-footer) #hd-site-footer + * {
  margin-block-start:0!important;
}

/* =========================================================
Cookie / analytics consent flow v1052
Owner: footer_shell.
This single owner block covers the friendly first prompt, settings modal,
cookie-notice page action buttons, z-index/stacking, keyboard focus and
mobile presentation. Older bottom-strip and duplicate floating-card rules
have been removed from this owner section.
========================================================= */
:root {
  --cookie-layer-z: 2147483600;
  --cookie-surface: var(--colour-surface, #fffdf8);
  --cookie-surface-soft: var(--colour-surface-soft, #efe4d9);
  --cookie-text: var(--colour-text, #173642);
  --cookie-heading: var(--colour-heading, #103f3c);
  --cookie-muted: var(--colour-muted, #536472);
  --cookie-border: var(--colour-border-soft, #d8c9a8);
  --cookie-action-bg: var(--colour-action-bg, var(--colour-primary, #8a4706));
  --cookie-action-text: var(--colour-action-text, #ffffff);
  --cookie-action-hover-bg: var(--colour-action-hover-bg, #5f2f03);
  --cookie-focus: var(--colour-focus, #f6c85f);
}

html.hd-cookie-modal-open,
body.hd-cookie-modal-open {
  overflow: auto !important;
}

.hd-cookie-consent,
.hd-cookie-settings,
.hd-cookie-consent *,
.hd-cookie-settings *,
.hd-cookie-consent *::before,
.hd-cookie-settings *::before,
.hd-cookie-consent *::after,
.hd-cookie-settings *::after {
  box-sizing: border-box !important;
}

.hd-cookie-consent[hidden],
.hd-cookie-settings[hidden],
.hd-cookie-consent[aria-hidden="true"],
.hd-cookie-settings[aria-hidden="true"] {
  display: none !important;
}

.hd-cookie-consent--floating {
  position: fixed !important;
  left: max(1rem, env(safe-area-inset-left)) !important;
  right: auto !important;
  bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  z-index: var(--cookie-layer-z) !important;
  width: min(34rem, calc(100vw - 2rem)) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--cookie-text) !important;
  isolation: isolate !important;
  pointer-events: auto !important;
  animation: hdCookieFloatIn .22s ease-out both !important;
}

.hd-cookie-consent--floating .hd-cookie-consent__inner {
  position: relative !important;
  display: grid !important;
  gap: .9rem !important;
  padding: 1.08rem 1.15rem 1.14rem !important;
  border-radius: 1.25rem !important;
  background: var(--cookie-surface) !important;
  color: var(--cookie-text) !important;
  border: 1px solid var(--cookie-border) !important;
  box-shadow: 0 26px 80px rgba(6, 13, 22, .34) !important;
}

.hd-cookie-consent__text {
  display: grid !important;
  gap: .24rem !important;
  padding-right: 1.8rem !important;
}

.hd-cookie-consent__eyebrow {
  margin: 0 !important;
  color: var(--cookie-muted) !important;
  -webkit-text-fill-color: var(--cookie-muted) !important;
  font-size: .76rem !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  font-weight: 850 !important;
}

.hd-cookie-consent #hd-cookie-consent-title,
.hd-cookie-consent__text strong {
  display: block !important;
  margin: 0 !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem) !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
}

.hd-cookie-consent #hd-cookie-consent-desc,
.hd-cookie-consent__text span {
  display: block !important;
  color: var(--cookie-text) !important;
  -webkit-text-fill-color: var(--cookie-text) !important;
  font-size: .96rem !important;
  line-height: 1.45 !important;
}

.hd-cookie-consent__close {
  position: absolute !important;
  right: .65rem !important;
  top: .6rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--colour-surface-strong, #ffffff) !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-size: 1.32rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.hd-cookie-consent__actions,
.hd-cookie-settings__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .62rem !important;
  align-items: center !important;
}

.hd-cookie-consent__actions .hd-btn,
.hd-cookie-consent__actions a.hd-btn,
.hd-cookie-settings__actions .hd-btn,
.hd-cookie-settings__actions a.hd-btn,
[data-hd-cookie-open-settings].hd-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.78rem !important;
  min-width: 0 !important;
  padding: .72rem 1.06rem !important;
  border-radius: .75rem !important;
  border: 1px solid color-mix(in srgb, var(--cookie-action-bg) 82%, #000 18%) !important;
  background: var(--cookie-action-bg) !important;
  color: var(--cookie-action-text) !important;
  -webkit-text-fill-color: var(--cookie-action-text) !important;
  font-size: .94rem !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.hd-cookie-consent__actions .hd-btn:hover,
.hd-cookie-consent__actions .hd-btn:focus-visible,
.hd-cookie-settings__actions .hd-btn:hover,
.hd-cookie-settings__actions .hd-btn:focus-visible,
[data-hd-cookie-open-settings].hd-btn:hover,
[data-hd-cookie-open-settings].hd-btn:focus-visible {
  background: var(--cookie-action-hover-bg) !important;
  color: var(--cookie-action-text) !important;
  -webkit-text-fill-color: var(--cookie-action-text) !important;
  transform: none !important;
}

.hd-cookie-consent__actions .hd-btn--link,
.hd-cookie-settings__actions .hd-btn--link {
  background: color-mix(in srgb, var(--cookie-surface) 82%, var(--cookie-surface-soft) 18%) !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  border-color: var(--cookie-border) !important;
  text-decoration: underline !important;
  text-underline-offset: .18em !important;
}

.hd-cookie-consent__actions .hd-btn--link:hover,
.hd-cookie-consent__actions .hd-btn--link:focus-visible,
.hd-cookie-settings__actions .hd-btn--link:hover,
.hd-cookie-settings__actions .hd-btn--link:focus-visible {
  background: var(--cookie-surface-soft) !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
}

.hd-cookie-consent__close:focus-visible,
.hd-cookie-consent__actions .hd-btn:focus-visible,
.hd-cookie-settings__actions .hd-btn:focus-visible,
.hd-cookie-setting-row--toggle input:focus-visible + .hd-cookie-toggle,
[data-hd-cookie-open-settings].hd-btn:focus-visible {
  outline: 3px solid var(--cookie-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--cookie-focus) 34%, transparent) !important;
}

.hd-cookie-settings {
  position: fixed !important;
  inset: 0 !important;
  z-index: calc(var(--cookie-layer-z) + 1) !important;
  display: grid !important;
  place-items: end start !important;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)) !important;
  isolation: isolate !important;
  pointer-events: auto !important;
}

.hd-cookie-settings__backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  background: rgba(5, 8, 12, .56) !important;
  backdrop-filter: blur(2px) !important;
}

.hd-cookie-settings__panel {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  gap: .92rem !important;
  width: min(40.5rem, calc(100vw - 2rem)) !important;
  max-height: min(84vh, 46rem) !important;
  overflow: auto !important;
  padding: clamp(1.08rem, 2.2vw, 1.55rem) !important;
  border-radius: 1.35rem !important;
  background: var(--cookie-surface) !important;
  color: var(--cookie-text) !important;
  border: 1px solid var(--cookie-border) !important;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42) !important;
  animation: hdCookieFloatIn .22s ease-out both !important;
}

.hd-cookie-settings__panel h2 {
  margin: .1rem 2.3rem .2rem 0 !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-size: clamp(1.45rem, 2.4vw, 2rem) !important;
  line-height: 1.15 !important;
}

.hd-cookie-settings__panel .hd-help,
#hd-cookie-settings-desc {
  margin: 0 !important;
  color: var(--cookie-text) !important;
  -webkit-text-fill-color: var(--cookie-text) !important;
  line-height: 1.5 !important;
}

.hd-cookie-settings__rows {
  display: grid !important;
  gap: .75rem !important;
  margin: .35rem 0 .2rem !important;
}

.hd-cookie-setting-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 1rem !important;
  align-items: center !important;
  padding: .9rem !important;
  border-radius: 1rem !important;
  background: var(--cookie-surface-soft) !important;
  border: 1px solid color-mix(in srgb, var(--cookie-border) 76%, transparent) !important;
  color: var(--cookie-text) !important;
}

.hd-cookie-setting-row--note {
  grid-template-columns: 1fr !important;
  background: color-mix(in srgb, var(--cookie-surface) 70%, var(--cookie-surface-soft) 30%) !important;
}

.hd-cookie-setting-row strong {
  display: block !important;
  margin: 0 0 .2rem !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-size: 1rem !important;
}

.hd-cookie-setting-row span {
  display: block !important;
  color: var(--cookie-muted) !important;
  -webkit-text-fill-color: var(--cookie-muted) !important;
  line-height: 1.42 !important;
}

.hd-cookie-setting-row--toggle {
  cursor: pointer !important;
}

.hd-cookie-setting-row--toggle input {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hd-cookie-toggle {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 5.4rem !important;
  min-width: 5.4rem !important;
  min-height: 2.35rem !important;
  padding: .15rem .42rem !important;
  border-radius: 999px !important;
  background: var(--colour-field-border, #b9aea1) !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-weight: 850 !important;
  font-size: .82rem !important;
  border: 1px solid var(--cookie-border) !important;
}

.hd-cookie-toggle i {
  position: absolute !important;
  left: .38rem !important;
  top: 50% !important;
  display: block !important;
  width: 1.55rem !important;
  height: 1.55rem !important;
  border-radius: 999px !important;
  background: var(--cookie-surface, #fffdf8) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.24) !important;
  transform: translate(0, -50%) !important;
  transition: transform .16s ease !important;
}

.hd-cookie-setting-row--toggle input:checked + .hd-cookie-toggle {
  background: var(--cookie-action-bg) !important;
  left: .55rem !important;
  right: auto !important;
  color: var(--cookie-action-text) !important;
  -webkit-text-fill-color: var(--cookie-action-text) !important;
}

.hd-cookie-setting-row--toggle input:checked + .hd-cookie-toggle i {
  transform: translate(2.95rem, -50%) !important;
}

.hd-cookie-toggle__label {
  position: absolute !important;
  right: .55rem !important;
  display: inline-block !important;
  width: 2.1rem !important;
  margin-left: 0 !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  text-align: center !important;
  line-height: 1 !important;
}

.hd-cookie-setting-row--toggle input:checked + .hd-cookie-toggle .hd-cookie-toggle__label {
  color: var(--cookie-action-text) !important;
  -webkit-text-fill-color: var(--cookie-action-text) !important;
}

.hd-cookie-toggle.is-locked {
  min-width: 6.2rem !important;
  padding-inline: .82rem !important;
  background: var(--colour-strong-surface, #6b584b) !important;
  color: var(--colour-on-primary, #ffffff) !important;
  -webkit-text-fill-color: var(--colour-on-primary, #ffffff) !important;
}

@keyframes hdCookieFloatIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .hd-cookie-consent--floating {
    left: .75rem !important;
    right: .75rem !important;
    bottom: .75rem !important;
    width: auto !important;
  }

  .hd-cookie-consent__actions,
  .hd-cookie-settings__actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .hd-cookie-consent__actions .hd-btn,
  .hd-cookie-settings__actions .hd-btn,
  .hd-cookie-consent__actions a.hd-btn,
  .hd-cookie-settings__actions a.hd-btn {
    width: 100% !important;
  }

  .hd-cookie-settings {
    place-items: end stretch !important;
    padding: .75rem !important;
  }

  .hd-cookie-settings__panel {
    width: 100% !important;
    max-height: 86vh !important;
  }

  .hd-cookie-setting-row {
    grid-template-columns: 1fr !important;
  }

  .hd-cookie-toggle {
    justify-self: start !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-cookie-consent--floating,
  .hd-cookie-settings__panel {
    animation: none !important;
  }
}

/* v1053 policy page tightening: avoids policy pages feeling over-carded after header/nav. */
.hd-public-policy-page .hd-page-heading-card {
  margin-bottom: clamp(10px, 1.5vw, 18px) !important;
}

.hd-public-policy-page .hd-card {
  padding-block: clamp(18px, 2.4vw, 28px) !important;
}

.hd-public-policy-page .hd-card + .hd-card {
  margin-top: clamp(14px, 2vw, 22px) !important;
}

/* v1057 cookie toggle and consent action polish.
Keeps ownership inside footer_shell cookie/privacy component. */
.hd-cookie-settings__actions {
  align-items: stretch !important;
}

.hd-cookie-settings__actions .hd-btn {
  min-width: 10.5rem !important;
}

.hd-cookie-setting-row--toggle {
  align-items: center !important;
}

.hd-cookie-toggle {
  width: 6.2rem !important;
  min-width: 6.2rem !important;
  min-height: 2.55rem !important;
  padding: .18rem .5rem !important;
  justify-content: flex-end !important;
  overflow: hidden !important;
  background: color-mix(in srgb, var(--cookie-surface-soft) 70%, var(--cookie-heading) 18%) !important;
  border: 1px solid color-mix(in srgb, var(--cookie-border) 80%, var(--cookie-heading) 20%) !important;
}

.hd-cookie-toggle i {
  left: .42rem !important;
  width: 1.75rem !important;
  height: 1.75rem !important;
  z-index: 2 !important;
}

.hd-cookie-toggle__label {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 2.1rem !important;
  margin: 0 .28rem 0 2.25rem !important;
  color: var(--cookie-heading) !important;
  -webkit-text-fill-color: var(--cookie-heading) !important;
  font-size: .82rem !important;
  line-height: 1 !important;
  text-align: center !important;
  z-index: 1 !important;
}

.hd-cookie-setting-row--toggle input:checked + .hd-cookie-toggle {
  justify-content: flex-start !important;
  background: var(--cookie-action-bg) !important;
  color: var(--cookie-action-text) !important;
  -webkit-text-fill-color: var(--cookie-action-text) !important;
}

.hd-cookie-setting-row--toggle input:checked + .hd-cookie-toggle i {
  transform: translate(3.6rem, -50%) !important;
}

.hd-cookie-setting-row--toggle input:checked + .hd-cookie-toggle .hd-cookie-toggle__label {
  margin: 0 2.25rem 0 .35rem !important;
  color: var(--cookie-action-text) !important;
  -webkit-text-fill-color: var(--cookie-action-text) !important;
}

.hd-cookie-toggle.is-locked {
  justify-content: center !important;
  min-height: 2.55rem !important;
  width: auto !important;
  min-width: 6.9rem !important;
  text-align: center !important;
}

@media (max-width: 700px) {
  .hd-cookie-setting-row--toggle {
    align-items: start !important;
  }

  .hd-cookie-toggle {
    justify-self: start !important;
    margin-top: .1rem !important;
  }

  .hd-cookie-settings__actions .hd-btn,
  .hd-cookie-settings__actions a.hd-btn {
    min-width: 0 !important;
  }
}

/* =========================================================
HD RMS v1071 mobile footer typography and full-width shell finish
Owner: footer_shell.
Purpose: keep the mobile footer full-width with internal padding and prevent
footer H2 headings from dominating the mobile page.
========================================================= */
@media (max-width: 760px) {
  #hd-site-footer,
  .hd-site-footer {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  #hd-site-footer h2,
  .hd-site-footer h2 {
    font-size: clamp(1.05rem, 4.6vw, 1.28rem) !important;
    line-height: 1.22 !important;
    margin-bottom: .55rem !important;
    text-wrap: balance !important;
  }

  #hd-site-footer h3,
  .hd-site-footer h3 {
    font-size: clamp(1rem, 4vw, 1.16rem) !important;
    line-height: 1.22 !important;
  }

  #hd-site-footer .footer-card,
  #hd-site-footer .hd-footer-card,
  #hd-site-footer .footer-contact,
  #hd-site-footer .hd-footer-contact,
  #hd-site-footer .footer-updates,
  #hd-site-footer .hd-footer-updates,
  #hd-site-footer .footer-privacy,
  #hd-site-footer .hd-footer-privacy,
  .hd-site-footer .footer-card,
  .hd-site-footer .hd-footer-card,
  .hd-site-footer .footer-contact,
  .hd-site-footer .hd-footer-contact,
  .hd-site-footer .footer-updates,
  .hd-site-footer .hd-footer-updates,
  .hd-site-footer .footer-privacy,
  .hd-site-footer .hd-footer-privacy {
    border-radius: 15px !important;
  }
}

/* =========================================================
HD RMS v1077 footer structure and important links pass
Owner: footer_shell.
Purpose: create a clearer footer layout with compact contact/update cards
beside a larger privacy/cookies/accessibility card, while keeping mobile
order clear and avoiding database-only dependency for essential footer links.
========================================================= */
:root {
  --footer-side-card-gap: clamp(14px, 2vw, 18px);
  --footer-layout-gap: clamp(18px, 3vw, 30px);
  --footer-card-large-min-height: clamp(230px, 22vw, 300px);
}

#hd-site-footer .footer-top.hd-footer-layout,
.hd-site-footer .footer-top.hd-footer-layout {
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr) !important;
  gap: var(--footer-layout-gap) !important;
  align-items: stretch !important;
  width: var(--footer-inner-width) !important;
}

#hd-site-footer .footer-side-cards,
#hd-site-footer .hd-footer-side-cards,
.hd-site-footer .footer-side-cards,
.hd-site-footer .hd-footer-side-cards {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: var(--footer-side-card-gap) !important;
  align-items: stretch !important;
  min-width: 0 !important;
}

#hd-site-footer .footer-updates,
#hd-site-footer .hd-footer-updates,
.hd-site-footer .footer-updates,
.hd-site-footer .hd-footer-updates {
  min-height: 0 !important;
}

#hd-site-footer .footer-card--compact,
#hd-site-footer .hd-footer-card--compact,
.hd-site-footer .footer-card--compact,
.hd-site-footer .hd-footer-card--compact {
  min-height: 0 !important;
  padding: clamp(16px, 2vw, 22px) !important;
}

#hd-site-footer .footer-card--large,
#hd-site-footer .hd-footer-card--large,
.hd-site-footer .footer-card--large,
.hd-site-footer .hd-footer-card--large {
  min-height: var(--footer-card-large-min-height) !important;
  justify-content: start !important;
}

#hd-site-footer .footer-updates-title,
#hd-site-footer .footer-updates-text,
#hd-site-footer .footer-updates-links,
#hd-site-footer .footer-updates-links li,
.hd-site-footer .footer-updates-title,
.hd-site-footer .footer-updates-text,
.hd-site-footer .footer-updates-links,
.hd-site-footer .footer-updates-links li {
  color: var(--footer-muted) !important;
}

#hd-site-footer .footer-updates-title,
#hd-site-footer .hd-footer-updates h2,
.hd-site-footer .footer-updates-title,
.hd-site-footer .hd-footer-updates h2 {
  margin: 0 0 .72rem !important;
  padding-bottom: .62rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--footer-text) 36%, transparent) !important;
  color: var(--footer-heading) !important;
}

#hd-site-footer .footer-updates-links,
#hd-site-footer .hd-footer-action-links,
.hd-site-footer .footer-updates-links,
.hd-site-footer .hd-footer-action-links {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: .55rem !important;
  margin: auto 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#hd-site-footer .footer-updates-links a,
#hd-site-footer .hd-footer-action-links a,
.hd-site-footer .footer-updates-links a,
.hd-site-footer .hd-footer-action-links a {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start !important;
}

#hd-site-footer .footer-links,
#hd-site-footer .hd-footer-links,
.hd-site-footer .footer-links,
.hd-site-footer .hd-footer-links {
  padding-top: clamp(8px, 1.5vw, 14px) !important;
  border-top: 1px solid color-mix(in srgb, var(--footer-text) 18%, transparent) !important;
}

@media (max-width: 900px) {
  #hd-site-footer .footer-top.hd-footer-layout,
  .hd-site-footer .footer-top.hd-footer-layout {
    grid-template-columns: 1fr !important;
  }

  #hd-site-footer .footer-side-cards,
  #hd-site-footer .hd-footer-side-cards,
  .hd-site-footer .footer-side-cards,
  .hd-site-footer .hd-footer-side-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #hd-site-footer .footer-side-cards,
  #hd-site-footer .hd-footer-side-cards,
  .hd-site-footer .footer-side-cards,
  .hd-site-footer .hd-footer-side-cards {
    grid-template-columns: 1fr !important;
  }

  #hd-site-footer .footer-card--large,
  #hd-site-footer .hd-footer-card--large,
  .hd-site-footer .footer-card--large,
  .hd-site-footer .hd-footer-card--large {
    min-height: 0 !important;
  }

  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-links {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
HD RMS v1087 pre-final polish: footer flow and card balance
Owner: footer_shell.
Purpose: let the footer read as a coherent ending section rather than one tall
empty card beside two compact cards.
========================================================= */
#hd-site-footer .footer-top.hd-footer-layout,
.hd-site-footer .footer-top.hd-footer-layout {
  grid-template-columns: 1fr !important;
  align-items: start !important;
}

#hd-site-footer .footer-side-cards,
#hd-site-footer .hd-footer-side-cards,
.hd-site-footer .footer-side-cards,
.hd-site-footer .hd-footer-side-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--footer-side-card-gap, clamp(14px, 2vw, 18px)) !important;
}

#hd-site-footer .footer-card--large,
#hd-site-footer .hd-footer-card--large,
.hd-site-footer .footer-card--large,
.hd-site-footer .hd-footer-card--large {
  min-height: 0 !important;
}

#hd-site-footer .footer-privacy,
#hd-site-footer .hd-footer-privacy,
.hd-site-footer .footer-privacy,
.hd-site-footer .hd-footer-privacy {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr) !important;
  gap: clamp(16px, 3vw, 34px) !important;
  align-items: start !important;
}

#hd-site-footer .footer-privacy-title,
#hd-site-footer .footer-privacy-text,
.hd-site-footer .footer-privacy-title,
.hd-site-footer .footer-privacy-text {
  grid-column: 1 !important;
}

#hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links {
  grid-column: 2 !important;
  grid-row: 1 / span 3 !important;
  align-self: start !important;
  margin-top: .15rem !important;
}

@media (max-width: 900px) {
  #hd-site-footer .footer-side-cards,
  #hd-site-footer .hd-footer-side-cards,
  .hd-site-footer .footer-side-cards,
  .hd-site-footer .hd-footer-side-cards,
  #hd-site-footer .footer-privacy,
  #hd-site-footer .hd-footer-privacy,
  .hd-site-footer .footer-privacy,
  .hd-site-footer .hd-footer-privacy {
    grid-template-columns: 1fr !important;
  }

  #hd-site-footer .footer-privacy-title,
  #hd-site-footer .footer-privacy-text,
  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-title,
  .hd-site-footer .footer-privacy-text,
  .hd-site-footer .footer-privacy-links {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

/* =========================================================
HD RMS v1088 pre-final footer flow refinement
Owner: footer_shell.
Purpose: reduce heavy blockiness and improve reading flow while keeping the
footer token-led and accessible.
========================================================= */
.hd-site-footer .hd-footer-card,
#hd-site-footer .hd-footer-card,
.site-footer .hd-footer-card {
  background: color-mix(in srgb, var(--colour-footer-text, #fff) 8%, var(--colour-footer-bg, #102630) 92%) !important;
  border-color: color-mix(in srgb, var(--colour-footer-text, #fff) 22%, transparent) !important;
}

.hd-site-footer .hd-footer-grid,
#hd-site-footer .hd-footer-grid,
.site-footer .hd-footer-grid {
  align-items: stretch !important;
  gap: clamp(18px, 2.5vw, 28px) !important;
}

.hd-site-footer .hd-footer-card--privacy,
#hd-site-footer .hd-footer-card--privacy,
.site-footer .hd-footer-card--privacy {
  min-height: auto !important;
}

.hd-site-footer .hd-footer-card--privacy .hd-footer-links,
#hd-site-footer .hd-footer-card--privacy .hd-footer-links,
.site-footer .hd-footer-card--privacy .hd-footer-links {
  margin-top: clamp(14px, 2vw, 20px) !important;
  align-content: start !important;
}

@media (min-width: 900px) {
  .hd-site-footer .hd-footer-grid,
  #hd-site-footer .hd-footer-grid,
  .site-footer .hd-footer-grid {
    grid-template-columns: minmax(250px, .8fr) minmax(0, 1.35fr) !important;
  }

  .hd-site-footer .hd-footer-card--updates,
  #hd-site-footer .hd-footer-card--updates,
  .site-footer .hd-footer-card--updates {
    grid-column: 1 !important;
  }

  .hd-site-footer .hd-footer-card--privacy,
  #hd-site-footer .hd-footer-card--privacy,
  .site-footer .hd-footer-card--privacy {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
  }
}

@media (max-width: 899px) {
  .hd-site-footer .hd-footer-grid,
  #hd-site-footer .hd-footer-grid,
  .site-footer .hd-footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
HD RMS v1089 pre-final polish correction: footer flow and card balance
Owner: footer_shell.
Purpose: make footer cards read as one composed footer rather than isolated blocks
with excessive empty space.
========================================================= */
.hd-site-footer,
#hd-site-footer,
.site-footer {
  --footer-card-bg-composed: color-mix(in srgb, var(--colour-footer-text, #fff) 7%, var(--colour-footer-bg, #102630) 93%);
}

.hd-site-footer .hd-footer-grid,
#hd-site-footer .hd-footer-grid,
.site-footer .hd-footer-grid {
  gap: clamp(18px, 2.4vw, 28px) !important;
  align-items: start !important;
}

.hd-site-footer .hd-footer-card,
#hd-site-footer .hd-footer-card,
.site-footer .hd-footer-card {
  background: var(--footer-card-bg-composed) !important;
  padding: clamp(22px, 2.5vw, 32px) !important;
  min-height: 0 !important;
}

.hd-site-footer .hd-footer-card--privacy,
#hd-site-footer .hd-footer-card--privacy,
.site-footer .hd-footer-card--privacy {
  display: grid !important;
  gap: clamp(16px, 2.2vw, 26px) !important;
  align-items: start !important;
}

.hd-site-footer .hd-footer-card--privacy .hd-footer-links,
#hd-site-footer .hd-footer-card--privacy .hd-footer-links,
.site-footer .hd-footer-card--privacy .hd-footer-links {
  margin-top: 0 !important;
  gap: .75rem clamp(18px, 3vw, 36px) !important;
}

@media (min-width: 900px) {
  .hd-site-footer .hd-footer-grid,
  #hd-site-footer .hd-footer-grid,
  .site-footer .hd-footer-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
  }

  .hd-site-footer .hd-footer-card--privacy,
  #hd-site-footer .hd-footer-card--privacy,
  .site-footer .hd-footer-card--privacy {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr) !important;
  }

  .hd-site-footer .hd-footer-card--privacy h2,
  #hd-site-footer .hd-footer-card--privacy h2,
  .site-footer .hd-footer-card--privacy h2 {
    grid-column: 1 / -1 !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 899px) {
  .hd-site-footer .hd-footer-card,
  #hd-site-footer .hd-footer-card,
  .site-footer .hd-footer-card {
    padding: clamp(20px, 6vw, 26px) !important;
  }
}

/* =========================================================
HD RMS v1090 pre-final correction: composed footer layout
Owner: footer_shell.
Purpose: remove the over-large empty footer card feeling and make contact,
updates, privacy, cookies and accessibility read as one balanced footer.
========================================================= */
#hd-site-footer .hd-footer-layout,
.hd-site-footer .hd-footer-layout,
.site-footer .hd-footer-layout {
  width: min(100%, 1080px) !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: clamp(18px, 2.4vw, 28px) !important;
}

#hd-site-footer .hd-footer-side-cards,
.hd-site-footer .hd-footer-side-cards,
.site-footer .hd-footer-side-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
  gap: clamp(18px, 2.4vw, 24px) !important;
}

#hd-site-footer .hd-footer-card,
.hd-site-footer .hd-footer-card,
.site-footer .hd-footer-card {
  min-height: 0 !important;
  padding: clamp(20px, 2.4vw, 28px) !important;
  border-radius: clamp(18px, 2vw, 24px) !important;
}

#hd-site-footer .hd-footer-card--compact,
.hd-site-footer .hd-footer-card--compact,
.site-footer .hd-footer-card--compact {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: clamp(12px, 1.6vw, 18px) !important;
}

#hd-site-footer .hd-footer-card--compact p,
.hd-site-footer .hd-footer-card--compact p,
.site-footer .hd-footer-card--compact p {
  margin-bottom: 0 !important;
}

#hd-site-footer .hd-footer-privacy,
#hd-site-footer .hd-footer-card--large,
.hd-site-footer .hd-footer-privacy,
.hd-site-footer .hd-footer-card--large,
.site-footer .hd-footer-privacy,
.site-footer .hd-footer-card--large {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr) !important;
  grid-template-areas: "title links" "text links" !important;
  gap: clamp(12px, 2vw, 18px) clamp(24px, 4vw, 42px) !important;
  align-items: start !important;
  min-height: 0 !important;
}

#hd-site-footer .footer-privacy-title,
#hd-site-footer .hd-footer-privacy h2,
.hd-site-footer .footer-privacy-title,
.hd-site-footer .hd-footer-privacy h2,
.site-footer .footer-privacy-title,
.site-footer .hd-footer-privacy h2 {
  grid-area: title !important;
  margin: 0 !important;
}

#hd-site-footer .footer-privacy-text,
.hd-site-footer .footer-privacy-text,
.site-footer .footer-privacy-text {
  grid-area: text !important;
  max-width: 58ch !important;
  margin: 0 !important;
}

#hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links,
.site-footer .footer-privacy-links {
  grid-area: links !important;
  align-self: start !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .8rem 1.8rem !important;
  margin: .15rem 0 0 !important;
  padding: 0 !important;
}

#hd-site-footer .footer-privacy-links li,
.hd-site-footer .footer-privacy-links li,
.site-footer .footer-privacy-links li,
#hd-site-footer .hd-footer-action-links li,
.hd-site-footer .hd-footer-action-links li,
.site-footer .hd-footer-action-links li {
  margin: 0 !important;
}

#hd-site-footer .hd-footer-bottom,
.hd-site-footer .hd-footer-bottom,
.site-footer .hd-footer-bottom {
  margin-top: clamp(22px, 3vw, 34px) !important;
  padding-top: clamp(16px, 2vw, 22px) !important;
}

@media (max-width: 780px) {
  #hd-site-footer .hd-footer-side-cards,
  .hd-site-footer .hd-footer-side-cards,
  .site-footer .hd-footer-side-cards,
  #hd-site-footer .hd-footer-privacy,
  #hd-site-footer .hd-footer-card--large,
  .hd-site-footer .hd-footer-privacy,
  .hd-site-footer .hd-footer-card--large,
  .site-footer .hd-footer-privacy,
  .site-footer .hd-footer-card--large {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  #hd-site-footer .footer-privacy-title,
  #hd-site-footer .footer-privacy-text,
  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-title,
  .hd-site-footer .footer-privacy-text,
  .hd-site-footer .footer-privacy-links,
  .site-footer .footer-privacy-title,
  .site-footer .footer-privacy-text,
  .site-footer .footer-privacy-links {
    grid-area: auto !important;
  }

  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-links,
  .site-footer .footer-privacy-links {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
HD RMS v1091 core polish: footer composition and mobile privacy card
Owner: footer_shell.
Purpose: correct mobile footer text wrapping, remove the oversized privacy block,
and keep footer cards balanced through the footer owner section.
========================================================= */
#hd-site-footer .hd-footer-layout,
.hd-site-footer .hd-footer-layout,
.site-footer .hd-footer-layout {
  width: min(100%, 1060px) !important;
  gap: clamp(16px, 2.4vw, 24px) !important;
}

#hd-site-footer .hd-footer-side-cards,
.hd-site-footer .hd-footer-side-cards,
.site-footer .hd-footer-side-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
  gap: clamp(16px, 2.4vw, 24px) !important;
}

#hd-site-footer .hd-footer-card,
.hd-site-footer .hd-footer-card,
.site-footer .hd-footer-card {
  min-height: 0 !important;
  padding: clamp(1.15rem, 2.4vw, 1.75rem) !important;
  overflow: hidden !important;
}

#hd-site-footer .hd-footer-privacy,
#hd-site-footer .hd-footer-card--large,
.hd-site-footer .hd-footer-privacy,
.hd-site-footer .hd-footer-card--large,
.site-footer .hd-footer-privacy,
.site-footer .hd-footer-card--large {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .78fr) !important;
  grid-template-areas: "title links" "text links" !important;
  gap: clamp(12px, 2vw, 18px) clamp(20px, 3vw, 34px) !important;
  align-items: start !important;
}

#hd-site-footer .footer-privacy-title,
#hd-site-footer .hd-footer-privacy h2,
.hd-site-footer .footer-privacy-title,
.hd-site-footer .hd-footer-privacy h2,
.site-footer .footer-privacy-title,
.site-footer .hd-footer-privacy h2 {
  grid-area: title !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#hd-site-footer .footer-privacy-text,
.hd-site-footer .footer-privacy-text,
.site-footer .footer-privacy-text {
  grid-area: text !important;
  width: 100% !important;
  max-width: 62ch !important;
}

#hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links,
.site-footer .footer-privacy-links {
  grid-area: links !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .8rem 1.4rem !important;
  align-self: start !important;
}

#hd-site-footer .footer-privacy-links a,
.hd-site-footer .footer-privacy-links a,
.site-footer .footer-privacy-links a,
#hd-site-footer .hd-footer-action-links a,
.hd-site-footer .hd-footer-action-links a,
.site-footer .hd-footer-action-links a {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-height: 1.25 !important;
}

@media (max-width: 760px) {
  #hd-site-footer .hd-footer-side-cards,
  .hd-site-footer .hd-footer-side-cards,
  .site-footer .hd-footer-side-cards {
    grid-template-columns: 1fr !important;
  }

  #hd-site-footer .hd-footer-privacy,
  #hd-site-footer .hd-footer-card--large,
  .hd-site-footer .hd-footer-privacy,
  .hd-site-footer .hd-footer-card--large,
  .site-footer .hd-footer-privacy,
  .site-footer .hd-footer-card--large {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }

  #hd-site-footer .footer-privacy-title,
  #hd-site-footer .footer-privacy-text,
  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-title,
  .hd-site-footer .footer-privacy-text,
  .hd-site-footer .footer-privacy-links,
  .site-footer .footer-privacy-title,
  .site-footer .footer-privacy-text,
  .site-footer .footer-privacy-links {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    grid-area: auto !important;
  }

  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-links,
  .site-footer .footer-privacy-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    margin-top: 1rem !important;
  }
}

/* =========================================================
HD RMS v1092 core polish correction: footer composition and mobile wrapping
Owner: footer_shell.
Purpose: make the footer read as one composed area, prevent privacy title/text
from collapsing vertically, and keep footer links usable on mobile.
========================================================= */
#hd-site-footer .hd-footer-layout,
.hd-site-footer .hd-footer-layout,
.site-footer .hd-footer-layout {
  width: min(100%, 1060px) !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: clamp(1.25rem, 2.4vw, 1.75rem) !important;
}

#hd-site-footer .hd-footer-side-cards,
.hd-site-footer .hd-footer-side-cards,
.site-footer .hd-footer-side-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(1.25rem, 2.2vw, 1.6rem) !important;
}

#hd-site-footer .hd-footer-card,
.hd-site-footer .hd-footer-card,
.site-footer .hd-footer-card {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: clamp(1.25rem, 2.4vw, 1.7rem) !important;
  border-radius: clamp(1.1rem, 2vw, 1.55rem) !important;
  overflow: visible !important;
}

#hd-site-footer .hd-footer-privacy,
#hd-site-footer .hd-footer-card--large,
.hd-site-footer .hd-footer-privacy,
.hd-site-footer .hd-footer-card--large,
.site-footer .hd-footer-privacy,
.site-footer .hd-footer-card--large {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(15rem, .85fr) !important;
  grid-template-areas:
  "title links"
  "text links" !important;
  gap: clamp(.85rem, 1.8vw, 1.25rem) clamp(1.4rem, 3vw, 2.4rem) !important;
  align-items: start !important;
}

#hd-site-footer .footer-privacy-title,
#hd-site-footer .hd-footer-privacy h2,
.hd-site-footer .footer-privacy-title,
.hd-site-footer .hd-footer-privacy h2,
.site-footer .footer-privacy-title,
.site-footer .hd-footer-privacy h2 {
  grid-area: title !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  text-wrap: balance !important;
}

#hd-site-footer .footer-privacy-text,
.hd-site-footer .footer-privacy-text,
.site-footer .footer-privacy-text {
  grid-area: text !important;
  max-width: 62ch !important;
  min-width: 0 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

#hd-site-footer .footer-privacy-links,
.hd-site-footer .footer-privacy-links,
.site-footer .footer-privacy-links {
  grid-area: links !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .8rem 1.3rem !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#hd-site-footer .footer-privacy-links a,
.hd-site-footer .footer-privacy-links a,
.site-footer .footer-privacy-links a,
#hd-site-footer .hd-footer-action-links a,
.hd-site-footer .hd-footer-action-links a,
.site-footer .hd-footer-action-links a {
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-decoration-thickness: .08em !important;
  text-underline-offset: .18em !important;
}

#hd-site-footer .footer-contact-btn,
.hd-site-footer .footer-contact-btn,
.site-footer .footer-contact-btn {
  align-self: center !important;
  min-width: min(14rem, 100%) !important;
}

@media (max-width: 760px) {
  #hd-site-footer .hd-footer-side-cards,
  .hd-site-footer .hd-footer-side-cards,
  .site-footer .hd-footer-side-cards,
  #hd-site-footer .hd-footer-privacy,
  #hd-site-footer .hd-footer-card--large,
  .hd-site-footer .hd-footer-privacy,
  .hd-site-footer .hd-footer-card--large,
  .site-footer .hd-footer-privacy,
  .site-footer .hd-footer-card--large {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  #hd-site-footer .footer-privacy-title,
  #hd-site-footer .footer-privacy-text,
  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-title,
  .hd-site-footer .footer-privacy-text,
  .hd-site-footer .footer-privacy-links,
  .site-footer .footer-privacy-title,
  .site-footer .footer-privacy-text,
  .site-footer .footer-privacy-links {
    grid-area: auto !important;
  }

  #hd-site-footer .footer-privacy-links,
  .hd-site-footer .footer-privacy-links,
  .site-footer .footer-privacy-links {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
  }
}

/* v1094 core polish: footer link grouping, mobile wrapping and privacy section rhythm. */
.hd-site-footer .hd-footer-grid,
.hd-footer .hd-footer-grid,
.site-footer .hd-footer-grid {
  align-items: stretch !important;
  gap: clamp(18px, 2.6vw, 30px) !important;
}

.hd-site-footer .hd-footer-card--privacy,
.hd-footer .hd-footer-card--privacy,
.site-footer .hd-footer-card--privacy,
.hd-site-footer .footer-privacy-card,
.hd-footer .footer-privacy-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .85fr) !important;
  column-gap: clamp(24px, 4vw, 56px) !important;
  row-gap: 1.1rem !important;
  align-items: start !important;
}

.hd-site-footer .hd-footer-card--privacy h2,
.hd-footer .hd-footer-card--privacy h2,
.site-footer .hd-footer-card--privacy h2 {
  grid-column: 1 / -1 !important;
}

.hd-site-footer .hd-footer-card--privacy ul,
.hd-site-footer .hd-footer-card--privacy .hd-footer-links,
.hd-footer .hd-footer-card--privacy ul,
.hd-footer .hd-footer-card--privacy .hd-footer-links,
.site-footer .hd-footer-card--privacy ul,
.site-footer .hd-footer-card--privacy .hd-footer-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(11rem, max-content)) !important;
  gap: .65rem clamp(1.4rem, 3vw, 2.5rem) !important;
  align-content: start !important;
  justify-content: start !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hd-site-footer .hd-footer-card--privacy li,
.hd-footer .hd-footer-card--privacy li,
.site-footer .hd-footer-card--privacy li {
  margin: 0 !important;
  padding: 0 !important;
}

.hd-site-footer .hd-footer-card--privacy a,
.hd-footer .hd-footer-card--privacy a,
.site-footer .hd-footer-card--privacy a {
  display: inline-block !important;
  max-width: 16rem !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1.35 !important;
}

@media (max-width: 760px) {
  .hd-site-footer .hd-footer-card--privacy,
  .hd-footer .hd-footer-card--privacy,
  .site-footer .hd-footer-card--privacy,
  .hd-site-footer .footer-privacy-card,
  .hd-footer .footer-privacy-card {
    display: block !important;
  }

  .hd-site-footer .hd-footer-card--privacy ul,
  .hd-site-footer .hd-footer-card--privacy .hd-footer-links,
  .hd-footer .hd-footer-card--privacy ul,
  .hd-footer .hd-footer-card--privacy .hd-footer-links,
  .site-footer .hd-footer-card--privacy ul,
  .site-footer .hd-footer-card--privacy .hd-footer-links {
    grid-template-columns: 1fr !important;
    gap: .65rem !important;
    margin-top: 1rem !important;
  }

  .hd-site-footer .hd-footer-card--privacy a,
  .hd-footer .hd-footer-card--privacy a,
  .site-footer .hd-footer-card--privacy a {
    max-width: 100% !important;
  }
}

/* v1095: mobile footer grouping and compact privacy/accessibility links. */
.hd-footer-privacy,
.hd-footer-privacy-card,
.hd-footer-card--privacy,
.hd-footer__privacy {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .95fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}

.hd-footer-privacy-links,
.hd-footer-links,
.hd-footer__privacy-links,
.hd-footer-card--privacy ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  justify-content: start;
  align-content: start;
  gap: 10px clamp(18px, 2.6vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-footer-privacy h2,
.hd-footer-privacy-card h2,
.hd-footer-card--privacy h2,
.hd-footer__privacy h2 {
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 720px) {
  .hd-footer-card,
  .hd-footer-contact,
  .hd-footer-updates,
  .hd-footer-privacy,
  .hd-footer-privacy-card,
  .hd-footer-card--privacy,
  .hd-footer__privacy {
    margin-block: 0 16px;
  }

  .hd-footer-privacy,
  .hd-footer-privacy-card,
  .hd-footer-card--privacy,
  .hd-footer__privacy {
    display: block;
  }

  .hd-footer-privacy-links,
  .hd-footer-links,
  .hd-footer__privacy-links,
  .hd-footer-card--privacy ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .hd-footer-privacy h2,
  .hd-footer-privacy-card h2,
  .hd-footer-card--privacy h2,
  .hd-footer__privacy h2 {
    font-size: clamp(1.25rem, 6vw, 1.6rem);
    line-height: 1.16;
  }
}

/* =========================================================
HD RMS v1096 footer_shell mobile flow consolidation
Owner: footer_shell.
Purpose: keep footer cards and privacy/cookie links grouped and readable across
real mobile browsers, not only responsive emulation.
========================================================= */
#hd-site-footer .footer-privacy-card,
#hd-site-footer .hd-footer-privacy-card,
.hd-site-footer .footer-privacy-card,
.hd-site-footer .hd-footer-privacy-card,
#hd-site-footer .footer-card--privacy,
.hd-site-footer .footer-card--privacy {
  min-width: 0 !important;
}

#hd-site-footer .footer-privacy-links,
#hd-site-footer .hd-footer-privacy-links,
.hd-site-footer .footer-privacy-links,
.hd-site-footer .hd-footer-privacy-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(11rem, 1fr)) !important;
  align-items: start !important;
  justify-content: start !important;
  gap: .55rem 1.25rem !important;
  max-width: 32rem !important;
}

#hd-site-footer .footer-privacy-links a,
#hd-site-footer .hd-footer-privacy-links a,
.hd-site-footer .footer-privacy-links a,
.hd-site-footer .hd-footer-privacy-links a {
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

@media (max-width: 760px) {
  #hd-site-footer .footer-top,
  #hd-site-footer .hd-footer-top,
  #hd-site-footer .footer-cards,
  #hd-site-footer .hd-footer-cards,
  #hd-site-footer .footer-card-grid,
  #hd-site-footer .hd-footer-card-grid,
  .hd-site-footer .footer-top,
  .hd-site-footer .hd-footer-top,
  .hd-site-footer .footer-cards,
  .hd-site-footer .hd-footer-cards,
  .hd-site-footer .footer-card-grid,
  .hd-site-footer .hd-footer-card-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #hd-site-footer .footer-card,
  #hd-site-footer .hd-footer-card,
  .hd-site-footer .footer-card,
  .hd-site-footer .hd-footer-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #hd-site-footer .footer-privacy-card,
  #hd-site-footer .hd-footer-privacy-card,
  .hd-site-footer .footer-privacy-card,
  .hd-site-footer .hd-footer-privacy-card,
  #hd-site-footer .footer-card--privacy,
  .hd-site-footer .footer-card--privacy {
    display: block !important;
  }

  #hd-site-footer .footer-privacy-card h2,
  #hd-site-footer .footer-privacy-card h3,
  #hd-site-footer .hd-footer-privacy-card h2,
  #hd-site-footer .hd-footer-privacy-card h3,
  .hd-site-footer .footer-privacy-card h2,
  .hd-site-footer .footer-privacy-card h3,
  .hd-site-footer .hd-footer-privacy-card h2,
  .hd-site-footer .hd-footer-privacy-card h3 {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }

  #hd-site-footer .footer-privacy-links,
  #hd-site-footer .hd-footer-privacy-links,
  .hd-site-footer .footer-privacy-links,
  .hd-site-footer .hd-footer-privacy-links {
    grid-template-columns: 1fr !important;
    gap: .55rem !important;
    max-width: 100% !important;
  }

  #hd-site-footer .footer-bottom,
  #hd-site-footer .hd-footer-bottom,
  .hd-site-footer .footer-bottom,
  .hd-site-footer .hd-footer-bottom {
    margin-top: 16px !important;
    padding-top: 14px !important;
  }
}

/* =========================================================
HD RMS v1097 footer composition consolidation
Owner: footer_shell.
Purpose: keep privacy/cookie/accessibility content grouped on desktop and normal
horizontal reading flow on mobile.
========================================================= */
#hd-site-footer .footer-top,
#hd-site-footer .hd-footer-top,
.hd-site-footer .footer-top,
.hd-site-footer .hd-footer-top {
  gap: clamp(18px, 2.4vw, 28px) !important;
}

#hd-site-footer .footer-privacy,
#hd-site-footer .hd-footer-privacy,
.hd-site-footer .footer-privacy,
.hd-site-footer .hd-footer-privacy {
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr) !important;
  gap: clamp(18px, 2.4vw, 30px) !important;
  align-items: start !important;
}

#hd-site-footer .footer-privacy-title,
#hd-site-footer .hd-footer-privacy .footer-privacy-title,
.hd-site-footer .footer-privacy-title {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  max-width: 100% !important;
}

#hd-site-footer .footer-privacy-links,
#hd-site-footer .hd-footer-privacy-links,
.hd-site-footer .footer-privacy-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .55rem 1.1rem !important;
  align-content: start !important;
  margin: 0 !important;
  padding: 0 !important;
}

#hd-site-footer .footer-privacy-links li,
.hd-site-footer .footer-privacy-links li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

@media (max-width: 760px) {
  #hd-site-footer,
  .hd-site-footer {
    padding-block-start: clamp(22px, 7vw, 30px) !important;
  }

  #hd-site-footer .footer-top,
  #hd-site-footer .hd-footer-top,
  .hd-site-footer .footer-top,
  .hd-site-footer .hd-footer-top {
    gap: clamp(14px, 5vw, 20px) !important;
  }

  #hd-site-footer .footer-privacy,
  #hd-site-footer .hd-footer-privacy,
  .hd-site-footer .footer-privacy,
  .hd-site-footer .hd-footer-privacy {
    display: block !important;
  }

  #hd-site-footer .footer-privacy-main,
  #hd-site-footer .hd-footer-privacy-main,
  #hd-site-footer .footer-privacy-nav,
  #hd-site-footer .hd-footer-privacy-nav {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #hd-site-footer .footer-privacy-links,
  #hd-site-footer .hd-footer-privacy-links,
  .hd-site-footer .footer-privacy-links {
    grid-template-columns: 1fr !important;
    gap: .45rem !important;
    margin-top: .9rem !important;
  }

  #hd-site-footer .hd-footer-card,
  .hd-site-footer .hd-footer-card {
    margin-block: 0 !important;
  }
}

/* =========================================================
HD RMS v1098 footer link grouping and mobile flow
Owner: footer_shell.
Purpose: keep privacy/cookie/accessibility text grouped, stop one-character wrapping
on mobile, and reduce large inconsistent gaps between footer cards.
========================================================= */
.hd-footer-card,
.footer-card,
.footer-privacy,
.hd-footer-privacy {
  min-width: 0 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.hd-footer-privacy,
.footer-privacy {
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr) !important;
  gap: clamp(18px, 3vw, 34px) !important;
  align-items: start !important;
}

.hd-footer-privacy-main,
.footer-privacy-main {
  min-width: 0 !important;
}

.hd-footer-privacy-nav,
.footer-privacy-nav {
  min-width: 0 !important;
}

.hd-footer-privacy-links,
.footer-privacy-links,
.footer-privacy-links--compact {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, max-content)) !important;
  column-gap: clamp(18px, 2.6vw, 34px) !important;
  row-gap: 10px !important;
  align-items: start !important;
  justify-content: start !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.hd-footer-privacy-links li,
.footer-privacy-links li {
  width: auto !important;
  min-width: 0 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.hd-footer-privacy-links a,
.footer-privacy-links a {
  display: inline !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

.hd-footer-card + .hd-footer-card,
.footer-card + .footer-card {
  margin-top: clamp(14px, 1.8vw, 22px) !important;
}

@media (max-width: 760px) {
  .hd-footer-privacy,
  .footer-privacy {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .footer-privacy-title,
  .hd-footer-privacy h2,
  .footer-privacy h2 {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  .hd-footer-privacy-links,
  .footer-privacy-links,
  .footer-privacy-links--compact {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hd-footer-card,
  .footer-card {
    margin-bottom: 16px !important;
  }
}

/* =========================================================
HD RMS v1099 footer link grouping and mobile wrap correction
Owner: footer_shell.
Purpose: group privacy/cookie/accessibility links and prevent the privacy card
from collapsing into one-letter lines on narrow screens.
========================================================= */
.hd-footer-privacy-card,
.hd-footer-card--privacy,
.hd-footer-privacy,
.hd-footer-compliance {
  min-width: 0 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.hd-footer-privacy-card :where(h2,h3,.hd-footer-card-title),
.hd-footer-card--privacy :where(h2,h3,.hd-footer-card-title),
.hd-footer-privacy :where(h2,h3,.hd-footer-card-title) {
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  min-width: 0 !important;
}

.hd-footer-privacy-links,
.hd-footer-compliance-links,
.hd-footer-links--privacy,
.hd-footer-card--privacy ul,
.hd-footer-privacy-card ul {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
  gap: 10px 26px !important;
  align-content: start !important;
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.hd-footer-privacy-links a,
.hd-footer-compliance-links a,
.hd-footer-links--privacy a,
.hd-footer-card--privacy a,
.hd-footer-privacy-card a {
  display: inline-block !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

@media (max-width: 760px) {
  .hd-footer-grid,
  .hd-footer-cards,
  .hd-footer-inner {
    gap: clamp(14px, 4vw, 20px) !important;
  }

  .hd-footer-privacy-card,
  .hd-footer-card--privacy,
  .hd-footer-privacy,
  .hd-footer-compliance {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hd-footer-privacy-links,
  .hd-footer-compliance-links,
  .hd-footer-links--privacy,
  .hd-footer-card--privacy ul,
  .hd-footer-privacy-card ul {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* === Mobile and responsive display [mobile_display] === */
/* HD RMS mobile_display v1103 clean owner section
Owner: responsive guardrails only.
Owns mobile-only utilities, viewport containment and header dropdown positioning.
Does not own primary navigation colours, footer layout, timeline cards, form action rows or tool-specific mobile rules.
*/
:root {
  --hd-mobile-safe-gutter: clamp(12px, 4vw, 20px);
  --hd-mobile-card-gap: clamp(14px, 4.8vw, 22px);
  --hd-mobile-section-gap: clamp(18px, 5.2vw, 28px);
  --hd-mobile-hit-target: 44px;
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #hd-site-shell,
  #hd-site-header,
  #hd-site-main,
  #hd-site-footer {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .hd-mobile-stack,
  .hd-grid--two,
  .hd-grid--three {
    grid-template-columns: 1fr !important;
  }

  .hd-main-content-wrapper,
  .hd-main-content-inner,
  .hd-public-page,
  .hd-page-content,
  .hd-admin-page {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hd-mobile-hit-target,
  .hd-touch-target {
    min-height: var(--hd-mobile-hit-target);
  }

  .hd-hide-mobile {
    display: none !important;
  }

  .hd-show-mobile {
    display: revert !important;
  }

  .hd-header-dropdown,
  .hd-header-dropdown-panel,
  .hd-search-panel,
  .hd-header-search-panel,
  .hd-accessibility-menu,
  .hd-accessibility-panel,
  .hd-a11y-panel,
  .hd-accessibility-dropdown,
  details.nav-dropdown[open] > *:not(summary) {
    width: min(94vw, 390px) !important;
    max-width: calc(100vw - 20px) !important;
    min-width: min(86vw, 320px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 761px) {
  .hd-show-mobile {
    display: none !important;
  }
}

@media print {
  .hd-no-print {
    display: none !important;
  }
}

/* === Timeline page [timeline_page] === */
/* =========================================================
HD RMS timeline_page v1055
Clean owner section.
Owns the public Timeline page only:
- public timeline cards and summary
- timeline board rows, phase bars, month/year axis and milestone dots
- phase key / phase navigation
- enlarged timeline modal / fullscreen timeline overlay
- timeline-specific responsive behaviour
Does not own:
- Admin Timeline Manager editor UI
- global buttons
- header, navigation, footer, site shell or generic mobile display
========================================================= */

/* =========================================================
Timeline tokens
========================================================= */
:root {
  --timeline-surface: var(--colour-surface, #fffdf8);
  --timeline-surface-strong: var(--colour-surface-strong, var(--colour-surface, #fffdf8));
  --colour-timeline-card-bg: var(--colour-surface-strong, var(--colour-surface, #fffdf8));
  --timeline-surface-soft: var(--colour-surface-soft, #f4f1e6);
  --timeline-text: var(--colour-text, #12212b);
  --timeline-heading: var(--colour-heading, #053b5d);
  --timeline-muted: var(--colour-muted, #526474);
  --timeline-border: var(--colour-border-soft, #d8c9a8);
  --timeline-focus: var(--colour-focus-ring, #ffd966);
  --timeline-board-bg: var(--colour-footer-bg, var(--colour-heading, #132c35));
  --timeline-board-text: var(--colour-footer-text, #ffffff);
  --timeline-board-muted: color-mix(in srgb, var(--timeline-board-text) 78%, transparent);
  --timeline-board-line: color-mix(in srgb, var(--timeline-board-text) 24%, transparent);
  --timeline-label-bg: color-mix(in srgb, var(--timeline-board-bg) 86%, var(--timeline-board-text));

  /*
  Phase colours are deliberately distinct.
  Palette/theme tools may override these semantic tokens, but should keep
  visible separation between adjacent phases.
  */
  --timeline-phase-1: var(--colour-timeline-phase-1, #AC7B2E);
  --timeline-phase-2: var(--colour-timeline-phase-2, #593B68);
  --timeline-phase-3: var(--colour-timeline-phase-3, #1F6F66);
  --timeline-phase-4: var(--colour-timeline-phase-4, #292B58);
  --timeline-phase-5: var(--colour-timeline-phase-5, #8A5A00);
  --timeline-phase-6: var(--colour-timeline-phase-6, #2E315C);
  --timeline-phase-7: var(--colour-timeline-phase-7, #534B00);
  --timeline-phase-8: var(--colour-timeline-phase-8, #4B587C);
  --timeline-phase-label-bg: var(--colour-heading, #053b5d);
  --timeline-phase-label-text: var(--colour-surface-strong, #fffdf8);
  --timeline-dot-ring: var(--colour-surface-strong, #fffdf8);
  --timeline-now-line: #f7fbff;
  --timeline-card-radius: 18px;
  --timeline-gap: clamp(16px, 2vw, 24px);
  --timeline-board-width: 1380px;
  --timeline-row-label-width: 164px;
  --timeline-row-height: 78px;
  --timeline-phase-row-height: 108px;
  --timeline-month-axis-height: 2.1rem;
  --timeline-year-axis-height: 2rem;
}

/* =========================================================
Phase ownership helpers
========================================================= */
.hd-timeline-page .hd-timeline-phase-1,
.hd-timeline-page .hd-ref__track--1,
.hd-timeline-page .hd-ref__bar--1,
.hd-timeline-page .hd-ref__row-dot--phase-1,
.hd-timeline-page .hd-tl-progress__phase--1,
.hd-timeline-page .hd-phase-section--1,
.hd-timeline-page [data-phase-index="1"],
.hd-timeline-page [data-phase="1"] {
  --phase-colour: var(--timeline-phase-1);
  --timeline-current-phase: var(--timeline-phase-1);
}

.hd-timeline-page .hd-timeline-phase-2,
.hd-timeline-page .hd-ref__track--2,
.hd-timeline-page .hd-ref__bar--2,
.hd-timeline-page .hd-ref__row-dot--phase-2,
.hd-timeline-page .hd-tl-progress__phase--2,
.hd-timeline-page .hd-phase-section--2,
.hd-timeline-page [data-phase-index="2"],
.hd-timeline-page [data-phase="2"] {
  --phase-colour: var(--timeline-phase-2);
  --timeline-current-phase: var(--timeline-phase-2);
}

.hd-timeline-page .hd-timeline-phase-3,
.hd-timeline-page .hd-ref__track--3,
.hd-timeline-page .hd-ref__bar--3,
.hd-timeline-page .hd-ref__row-dot--phase-3,
.hd-timeline-page .hd-tl-progress__phase--3,
.hd-timeline-page .hd-phase-section--3,
.hd-timeline-page [data-phase-index="3"],
.hd-timeline-page [data-phase="3"] {
  --phase-colour: var(--timeline-phase-3);
  --timeline-current-phase: var(--timeline-phase-3);
}

.hd-timeline-page .hd-timeline-phase-4,
.hd-timeline-page .hd-ref__track--4,
.hd-timeline-page .hd-ref__bar--4,
.hd-timeline-page .hd-ref__row-dot--phase-4,
.hd-timeline-page .hd-tl-progress__phase--4,
.hd-timeline-page .hd-phase-section--4,
.hd-timeline-page [data-phase-index="4"],
.hd-timeline-page [data-phase="4"] {
  --phase-colour: var(--timeline-phase-4);
  --timeline-current-phase: var(--timeline-phase-4);
}

.hd-timeline-page .hd-timeline-phase-5,
.hd-timeline-page .hd-ref__track--5,
.hd-timeline-page .hd-ref__bar--5,
.hd-timeline-page .hd-ref__row-dot--phase-5,
.hd-timeline-page .hd-tl-progress__phase--5,
.hd-timeline-page .hd-phase-section--5,
.hd-timeline-page [data-phase-index="5"],
.hd-timeline-page [data-phase="5"] {
  --phase-colour: var(--timeline-phase-5);
  --timeline-current-phase: var(--timeline-phase-5);
}

.hd-timeline-page .hd-timeline-phase-6,
.hd-timeline-page .hd-ref__track--6,
.hd-timeline-page .hd-ref__bar--6,
.hd-timeline-page .hd-ref__row-dot--phase-6,
.hd-timeline-page .hd-tl-progress__phase--6,
.hd-timeline-page .hd-phase-section--6,
.hd-timeline-page [data-phase-index="6"],
.hd-timeline-page [data-phase="6"] {
  --phase-colour: var(--timeline-phase-6);
  --timeline-current-phase: var(--timeline-phase-6);
}

.hd-timeline-page .hd-timeline-phase-7,
.hd-timeline-page .hd-ref__track--7,
.hd-timeline-page .hd-ref__bar--7,
.hd-timeline-page .hd-ref__row-dot--phase-7,
.hd-timeline-page .hd-tl-progress__phase--7,
.hd-timeline-page .hd-phase-section--7,
.hd-timeline-page [data-phase-index="7"],
.hd-timeline-page [data-phase="7"] {
  --phase-colour: var(--timeline-phase-7);
  --timeline-current-phase: var(--timeline-phase-7);
}

.hd-timeline-page .hd-timeline-phase-8,
.hd-timeline-page .hd-ref__track--8,
.hd-timeline-page .hd-ref__bar--8,
.hd-timeline-page .hd-ref__row-dot--phase-8,
.hd-timeline-page .hd-tl-progress__phase--8,
.hd-timeline-page .hd-phase-section--8,
.hd-timeline-page [data-phase-index="8"],
.hd-timeline-page [data-phase="8"] {
  --phase-colour: var(--timeline-phase-8);
  --timeline-current-phase: var(--timeline-phase-8);
}

/* =========================================================
Page and cards
========================================================= */
.hd-timeline-page,
.hd-timeline-wrap {
  display: grid;
  gap: var(--timeline-gap);
  min-width: 0;
  max-width: 100%;
  color: var(--timeline-text);
}

.hd-timeline-page {
  overflow-x: hidden;
}

.hd-timeline-page .hd-page-heading-card {
  margin-bottom: 0;
}

.hd-timeline-intro-prose,
.hd-timeline-page .hd-timeline-summary,
.hd-timeline-page .hd-timeline-current-position {
  max-width: 78ch;
  border-radius: var(--timeline-card-radius);
}

.hd-timeline-intro-prose p,
.hd-tl-intro p,
.hd-tl-overall p {
  margin: .35rem 0 0;
  max-width: 78ch;
  color: var(--timeline-text);
}

.hd-tl-card,
.hd-phase-section,
.hd-timeline-public-section {
  box-sizing: border-box;
  max-width: 100%;
}

.hd-tl-card {
  border: 1px solid var(--timeline-border);
  border-radius: var(--timeline-card-radius);
  background: var(--colour-timeline-card-bg, var(--timeline-surface-strong));
  color: var(--timeline-text);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--timeline-heading) 8%, transparent);
  overflow: hidden;
}

.hd-tl-card__body {
  padding: clamp(16px, 2.2vw, 24px);
}

.hd-tl-intro {
  display: grid;
  gap: .6rem;
  padding-bottom: clamp(12px, 2vw, 18px);
  border-bottom: 1px solid var(--timeline-border);
}

.hd-tl-overall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(12px, 2vw, 18px);
  align-items: center;
  margin-top: clamp(14px, 2vw, 20px);
}

.hd-tl-overall h2,
.hd-tl-subheading,
.hd-phase-section__title {
  color: var(--timeline-heading);
}

.hd-tl-overall__pct {
  min-width: 5.2rem;
  text-align: center;
  padding: .75rem .95rem;
  border: 1px solid var(--timeline-border);
  border-radius: 16px;
  background: var(--timeline-surface-soft);
  color: var(--timeline-heading);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 850;
}

/* =========================================================
Overall phase progress strip
========================================================= */
.hd-tl-progress {
  display: grid;
  gap: .55rem;
  margin-top: clamp(14px, 2vw, 20px);
}

.hd-tl-progress__track {
  position: relative;
  min-height: 46px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--timeline-heading) 10%, var(--timeline-surface));
  overflow: hidden;
}

.hd-tl-progress__phase {
  position: absolute;
  top: 10px;
  height: 26px;
  min-width: 22px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--phase-colour, var(--timeline-current-phase, var(--timeline-phase-1)));
}

.hd-tl-progress__phase-label {
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 8px);
  height: 1.35rem;
  margin-left: .25rem;
  padding: 0 .55rem;
  border-radius: 999px;
  background: var(--timeline-phase-label-bg);
  color: var(--timeline-phase-label-text);
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-tl-progress__elapsed {
  display: none;
}

.hd-tl-progress__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--timeline-now-line);
  box-shadow:
  0 0 0 1px color-mix(in srgb, var(--timeline-heading) 32%, transparent),
  0 0 0 5px color-mix(in srgb, var(--timeline-now-line) 55%, transparent);
  z-index: 8;
}

.hd-tl-progress__divider {
  position: absolute;
  top: 0;
  height: 8px;
  width: 1px;
  background: var(--timeline-border);
}

.hd-tl-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin-top: .35rem;
  color: var(--timeline-text);
}

.hd-tl-progress__meta span,
.hd-tl-progress__date {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: .4rem;
  align-items: baseline;
  border: 1px solid var(--timeline-border);
  border-radius: 999px;
  background: var(--timeline-surface-soft);
  color: var(--timeline-text);
  padding: .45rem .78rem;
  line-height: 1.1;
}

.hd-tl-progress__meta strong,
.hd-tl-progress__date strong {
  font-size: .78rem;
  color: var(--timeline-muted);
  text-transform: uppercase;
  letter-spacing: .035em;
}

.hd-tl-progress__meta em {
  font-style: normal;
  font-weight: 750;
  color: var(--timeline-heading);
}

.hd-tl-progress__date--start {
  justify-self: start;
  margin-right: auto;
}

.hd-tl-progress__date--end {
  justify-self: end;
  margin-left: auto;
}

/* =========================================================
Timeline board shell
========================================================= */
.hd-tl-card--board {
  position: relative;
  display: grid;
  gap: 0;
  padding: 0;
  background: var(--timeline-board-bg);
  color: var(--timeline-board-text);
  border-color: color-mix(in srgb, var(--timeline-board-text) 22%, transparent);
  overflow: hidden;
}

.hd-board-scrollnote {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1rem;
  flex-wrap: wrap;
  padding: clamp(12px, 2vw, 18px);
  border-bottom: 1px solid var(--timeline-board-line);
  background: color-mix(in srgb, var(--timeline-board-bg) 92%, var(--timeline-board-text));
  color: var(--timeline-board-text);
}

.hd-board-scrollnote > span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.hd-board-scrollnote__arrow {
  font-weight: 900;
}

.hd-timeline-expand-btn {
  margin-left: auto;
  min-width: 11rem;
  white-space: nowrap;
  box-shadow: 0 10px 26px color-mix(in srgb, #000 20%, transparent);
}

.hd-timeline-expand-btn:focus-visible,
.hd-timeline-fullscreen [data-timeline-close]:focus-visible {
  outline: 3px solid var(--timeline-focus);
  outline-offset: 3px;
}

.hd-ref-topscroll {
  height: 14px;
  margin: 10px clamp(12px, 2vw, 18px) 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  scrollbar-color: var(--timeline-board-text) color-mix(in srgb, var(--timeline-board-text) 15%, transparent);
}

.hd-ref-topscroll__inner {
  width: var(--timeline-board-width);
  height: 1px;
}

.hd-ref {
  box-sizing: border-box;
  max-width: 100%;
  max-height: min(74vh, 680px);
  margin: 0 clamp(12px, 2vw, 18px) clamp(12px, 2vw, 18px);
  overflow: auto;
  border: 1px solid var(--timeline-board-line);
  border-radius: 14px;
  background: var(--timeline-board-bg);
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-padding-inline: 24px;
}

.hd-ref__inner {
  box-sizing: border-box;
  min-width: var(--timeline-board-width);
  padding: 14px 28px 16px 18px;
}

.hd-ref__title {
  margin: 0 0 12px;
  color: var(--timeline-board-text);
  font-weight: 850;
}

.hd-ref__grid {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--timeline-row-label-width) minmax(0, 1fr);
  min-height: 0;
}

/* =========================================================
Board axis, labels and rows
========================================================= */
.hd-ref__corner,
.hd-ref__label {
  grid-column: 1;
  background: var(--timeline-label-bg);
  color: var(--timeline-board-text);
}

.hd-ref__years,
.hd-ref__months,
.hd-ref__lane {
  position: relative;
  grid-column: 2;
  color: var(--timeline-board-text);
}

.hd-ref__years {
  height: var(--timeline-year-axis-height);
  border-bottom: 1px solid var(--timeline-board-line);
  z-index: 4;
}

.hd-ref__year {
  position: absolute;
  top: 3px;
  min-width: 5.2rem;
  overflow: visible;
  white-space: nowrap;
  text-align: center;
  color: var(--timeline-board-text);
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .035em;
  z-index: 5;
}

.hd-ref__year:first-child {
  text-align: left;
  padding-left: .25rem;
}

.hd-ref__year:last-child {
  text-align: right;
  padding-right: .45rem;
}

.hd-ref__axis-label,
.hd-ref__row-label {
  display: flex;
  align-items: center;
  min-height: var(--timeline-row-height);
  padding: .8rem .85rem;
  border-bottom: 1px solid var(--timeline-board-line);
  font-weight: 800;
  line-height: 1.25;
}

.hd-ref__axis-label {
  min-height: calc(var(--timeline-year-axis-height) + var(--timeline-month-axis-height));
  font-size: .88rem;
}

.hd-ref__months {
  height: var(--timeline-month-axis-height);
  border-bottom: 1px solid var(--timeline-board-line);
}

.hd-ref__month {
  position: absolute;
  top: 5px;
  text-align: center;
  font-size: 0;
  color: transparent;
  border-left: 1px solid var(--timeline-board-line);
  background: transparent;
}

.hd-ref__month::after {
  content: "";
  display: block;
  width: 1px;
  height: .55rem;
  margin: .38rem auto 0;
  background: color-mix(in srgb, var(--timeline-board-text) 36%, transparent);
}

.hd-ref__month--boundary,
.hd-ref__month--quarter,
.hd-ref__month--endpoint {
  color: color-mix(in srgb, var(--timeline-board-text) 88%, transparent);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .035em;
}

.hd-ref__month--boundary::after,
.hd-ref__month--endpoint::after {
  width: 2px;
  height: .95rem;
  background: color-mix(in srgb, var(--timeline-board-text) 66%, transparent);
}

.hd-ref__month--quarter::after {
  height: .75rem;
  background: color-mix(in srgb, var(--timeline-board-text) 50%, transparent);
}

.hd-ref__lane {
  position: relative;
  min-height: var(--timeline-row-height);
  border-bottom: 1px solid var(--timeline-board-line);
  background-color: color-mix(in srgb, var(--timeline-board-bg) 94%, var(--timeline-surface) 6%);
  background-image: repeating-linear-gradient(
  to right,
  var(--timeline-board-line) 0,
  var(--timeline-board-line) 1px,
  transparent 1px,
  transparent 36px
  );
  overflow: visible;
  isolation: isolate;
}

.hd-ref__lane--phases {
  min-height: var(--timeline-phase-row-height);
}

.hd-ref__lane[data-timeline-row^="phase_"] {
  background-color: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 10%, var(--timeline-board-bg));
}

/* Older output from previous templates should not reserve rows on the public board. */
.hd-ref__lane[data-timeline-row="working_group"],
.hd-ref__lane[data-timeline-row="outputs"] {
  display: none;
}

.hd-ref__gridlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hd-ref__line,
.hd-ref__phase-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--timeline-board-text) 24%, transparent);
}

.hd-ref__line {
  width: 1px;
}

.hd-ref__line--major,
.hd-ref__phase-divider {
  width: 2px;
  background: color-mix(in srgb, var(--timeline-board-text) 50%, transparent);
}

.hd-ref__phase-divider {
  opacity: .78;
}

.hd-ref__phase-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-inline: 1px solid color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 34%, transparent);
  background: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 13%, transparent);
  z-index: 1;
  pointer-events: none;
}

.hd-ref__lane--phases .hd-ref__phase-zone {
  background: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 17%, transparent);
}

/* =========================================================
Phase bars and milestone dots
========================================================= */
.hd-ref__phase-track,
.hd-ref__bar {
  position: absolute;
  left: 0;
  top: 22px;
  height: 28px;
  border-radius: 999px;
  background: var(--phase-colour, var(--timeline-current-phase, var(--timeline-phase-1)));
  z-index: 5;
}

.hd-ref__phase-track {
  opacity: .72;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--timeline-board-text) 20%, transparent);
}

.hd-ref__bar {
  display: flex;
  align-items: center;
  min-width: 64px;
  padding: 0 .45rem;
  color: var(--timeline-phase-label-text);
  text-decoration: none;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--timeline-heading) 24%, transparent);
  z-index: 6;
  cursor: pointer;
}

.hd-ref__bar span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 1.35rem;
  padding: 0 .55rem;
  border-radius: 999px;
  background: var(--timeline-phase-label-bg);
  color: var(--timeline-phase-label-text);
  font-size: .75rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-ref__row-dot {
  position: absolute;
  top: 50%;
  width: 17px;
  height: 17px;
  margin-left: 0;
  border: 3px solid var(--timeline-dot-ring);
  border-radius: 999px;
  background: var(--phase-colour, var(--timeline-current-phase, var(--timeline-phase-1)));
  box-shadow:
  0 0 0 2px color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 70%, transparent),
  0 8px 18px rgba(0, 0, 0, .18);
  z-index: 9;
  text-decoration: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.hd-ref__dot-level--0,
.hd-ref__dot-level--1,
.hd-ref__dot-level--2 {
  top: 50%;
}

.hd-ref__row-dot::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
}

.hd-ref__row-dot.is-complete::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  border: 2px solid var(--timeline-phase-label-text);
  pointer-events: none;
}

.hd-ref__bar:hover,
.hd-ref__bar:focus-visible,
.hd-ref__row-dot:hover,
.hd-ref__row-dot:focus-visible {
  outline: 3px solid var(--timeline-focus);
  outline-offset: 3px;
}

/* =========================================================
Tooltips
========================================================= */
.hd-ref__tooltip {
  position: absolute;
  z-index: 2147482600;
  display: none;
  max-width: 22rem;
  min-width: 220px;
  padding: .7rem .85rem;
  border: 1px solid color-mix(in srgb, var(--timeline-board-text) 30%, transparent);
  border-radius: 12px;
  background: var(--timeline-surface);
  color: var(--timeline-text);
  box-shadow: 0 18px 34px color-mix(in srgb, var(--timeline-heading) 28%, transparent);
  line-height: 1.35;
  pointer-events: none;
}

.hd-ref__tooltip.is-visible {
  display: grid;
  gap: .25rem;
}

.hd-ref__tooltip strong,
.hd-ref__tooltip span {
  display: block;
  color: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hd-timeline-no-hover-info .hd-ref__tooltip {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hd-tl-card--board.is-expanded .hd-ref__tooltip.is-visible,
.hd-timeline-modal-open .hd-ref__tooltip.is-visible {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2147482600 !important;
}

/* =========================================================
Phase key and phase navigation
========================================================= */
.hd-ref__foot,
.hd-ref__foot--fixed {
  display: none;
}

.hd-tl-card--legend {
  background: var(--colour-timeline-card-bg, var(--timeline-surface-strong));
  color: var(--timeline-text);
}

.hd-timeline-legend-note {
  margin: .5rem 0 1rem;
  max-width: 82ch;
  color: var(--timeline-muted);
}

.hd-ref__key,
.hd-ref__key--outside,
.hd-tl-jump {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .8rem;
  align-items: center;
}

.hd-ref__key {
  padding-top: clamp(10px, 1.5vw, 14px);
}

.hd-ref__keyintro {
  flex: 1 1 100%;
  color: var(--timeline-text);
}

.hd-ref__keyitem,
.hd-tl-jump__item,
.hd-tl-jump a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--timeline-border);
  border-radius: 999px;
  padding: .48rem .8rem;
  background: var(--timeline-surface-soft);
  color: var(--timeline-text);
  text-decoration: none;
  font-weight: 750;
  line-height: 1.15;
}

.hd-ref__keyitem:hover,
.hd-ref__keyitem:focus-visible,
.hd-tl-jump__item:hover,
.hd-tl-jump__item:focus-visible,
.hd-tl-jump a:hover,
.hd-tl-jump a:focus-visible {
  outline: 3px solid var(--timeline-focus);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 16%, var(--timeline-surface));
}

.hd-ref__swatch,
.hd-timeline-phase-swatch,
.hd-tl-jump__swatch,
.hd-tl-jump a span {
  display: inline-block;
  width: .8rem;
  height: .8rem;
  flex: 0 0 .8rem;
  border-radius: 999px;
  background: var(--phase-colour, var(--timeline-current-phase, var(--timeline-phase-1)));
  box-shadow:
  inset 0 0 0 1px color-mix(in srgb, var(--timeline-heading) 18%, transparent),
  0 0 0 2px color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 18%, transparent);
}

/* =========================================================
Phase detail cards below the board
========================================================= */
.hd-phase-sections {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
}

.hd-phase-section {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  border: 1px solid color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 34%, var(--timeline-border));
  border-radius: var(--timeline-card-radius);
  background: var(--colour-timeline-card-bg, var(--timeline-surface-strong));
  color: var(--timeline-text);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--timeline-heading) 8%, transparent);
  overflow: hidden;
}

.hd-phase-section:focus {
  outline: 4px solid var(--timeline-focus);
  outline-offset: 6px;
}

.hd-phase-section__accent,
.hd-phase-section__fill {
  background: var(--phase-colour, var(--timeline-current-phase, var(--timeline-phase-1)));
}

.hd-phase-section__body {
  padding: clamp(16px, 2.2vw, 24px);
}

.hd-phase-section__head,
.hd-phase-section__meta,
.hd-phase-section__progresshead,
.hd-phase-section__actions {
  display: flex;
  gap: .8rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hd-phase-section__head {
  padding-bottom: .75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 18%, var(--timeline-border));
}

.hd-phase-section__title {
  margin: 0 0 .35rem;
}

.hd-phase-section__summary {
  margin: 0;
  max-width: 74ch;
  color: var(--timeline-text);
}

.hd-phase-pill,
.hd-phase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 32%, var(--timeline-border));
  border-radius: 999px;
  padding: .48rem .8rem;
  background: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 10%, var(--timeline-surface-soft));
  color: var(--timeline-text);
  text-decoration: none;
  line-height: 1.2;
}

.hd-phase-button:hover,
.hd-phase-button:focus-visible {
  background: var(--phase-colour, var(--timeline-phase-1));
  color: var(--timeline-phase-label-text);
  outline: 3px solid var(--timeline-focus);
  outline-offset: 2px;
}

.hd-phase-section__meta {
  justify-content: flex-start;
  margin-top: clamp(12px, 1.8vw, 18px);
}

.hd-phase-stat {
  min-width: 120px;
  padding: .65rem .75rem;
  border: 1px solid var(--timeline-border);
  border-radius: 12px;
  background: var(--timeline-surface-soft);
}

.hd-phase-stat__label,
.hd-phase-stat__value {
  display: block;
}

.hd-phase-stat__label {
  color: var(--timeline-muted);
  font-size: .78rem;
}

.hd-phase-stat__value {
  color: var(--timeline-text);
}

.hd-phase-section__track {
  height: .75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--timeline-heading) 10%, var(--timeline-surface));
  overflow: hidden;
}

.hd-phase-section__fill {
  height: 100%;
  border-radius: inherit;
}

.hd-phase-section__details {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--timeline-border);
}

.hd-phase-section.is-open .hd-phase-section__details {
  display: block;
}

.hd-phase-section__detailgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
}

.hd-phase-section__milestone-chips,
.hd-phase-milestones-list {
  display: grid;
  gap: .5rem;
}

.hd-phase-section__milestone-chip,
.hd-phase-milestones-item {
  display: grid;
  gap: .2rem;
  padding: .6rem .7rem;
  border: 1px solid var(--timeline-border);
  border-radius: 10px;
  background: var(--timeline-surface);
}

.hd-phase-section__milestone-chip span,
.hd-phase-milestones-item span {
  color: var(--timeline-muted);
  font-size: .85rem;
}

.hd-phase-section__milestone-chip--done,
.hd-phase-milestones-item--done {
  background: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 10%, var(--timeline-surface));
  border-color: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 28%, var(--timeline-border));
}

.hd-timeline-public-sections--below {
  display: grid;
  gap: 1rem;
}

.hd-timeline-public-section {
  border: 1px solid var(--timeline-border);
  border-radius: var(--timeline-card-radius);
  padding: clamp(16px, 2vw, 22px);
  background: var(--colour-timeline-card-bg, var(--timeline-surface-strong));
  color: var(--timeline-text);
}

/* Legacy compact milestone strip is not the public source of truth now. */
.hd-tl-milestone-strip {
  display: none;
}

/* =========================================================
Expanded in-page board
========================================================= */
.hd-tl-card--board.is-expanded {
  position: fixed;
  inset: clamp(10px, 2vw, 24px);
  z-index: 9999;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: auto;
  height: auto;
  max-width: none;
  border-radius: 18px;
  box-shadow: 0 26px 80px color-mix(in srgb, var(--timeline-heading) 45%, transparent);
}

.hd-tl-card--board.is-expanded::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: -1;
  background: color-mix(in srgb, var(--timeline-heading) 35%, transparent);
}

.hd-timeline-modal-open {
  overflow: hidden !important;
}

.hd-tl-card--board.is-expanded .hd-board-scrollnote {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  align-items: center;
}

.hd-tl-card--board.is-expanded .hd-ref {
  height: 100%;
  max-height: none;
  overflow: auto;
}

.hd-tl-card--board.is-expanded .hd-ref__inner {
  min-height: 100%;
}

.hd-tl-card--board.is-expanded .hd-timeline-expand-btn {
  position: relative;
  z-index: 2;
}

.hd-tl-card--board.is-expanded .hd-ref__month {
  color: color-mix(in srgb, var(--timeline-board-text) 90%, transparent);
  font-size: .72rem;
  font-weight: 800;
}

/* =========================================================
Fullscreen cloned board
========================================================= */
.hd-timeline-fullscreen[hidden] {
  display: none !important;
}

.hd-timeline-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 3000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(.75rem, 2vw, 1.5rem) !important;
  background: color-mix(in srgb, #000 58%, transparent) !important;
  backdrop-filter: blur(4px);
}

.hd-timeline-fullscreen__panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 1rem !important;
  width: min(96vw, 1480px) !important;
  height: min(92vh, 920px) !important;
  border: 1px solid color-mix(in srgb, var(--timeline-board-line) 52%, transparent) !important;
  border-radius: 22px !important;
  background: var(--timeline-board-bg) !important;
  color: var(--timeline-board-text) !important;
  box-shadow: 0 28px 80px color-mix(in srgb, #000 46%, transparent) !important;
  overflow: hidden !important;
}

.hd-timeline-fullscreen__head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.15rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--timeline-board-line) 38%, transparent) !important;
  background: color-mix(in srgb, var(--timeline-board-bg) 88%, #000) !important;
}

.hd-timeline-fullscreen__head strong,
.hd-timeline-fullscreen__head span {
  display: block !important;
  color: var(--timeline-board-text) !important;
}

.hd-timeline-fullscreen__head strong {
  font-size: 1.1rem !important;
}

.hd-timeline-fullscreen__head span {
  color: color-mix(in srgb, var(--timeline-board-text) 82%, transparent) !important;
  font-size: .95rem !important;
}

.hd-timeline-fullscreen__scroller {
  min-height: 0 !important;
  overflow: auto !important;
  padding: 1rem !important;
  background: color-mix(in srgb, var(--timeline-board-bg) 95%, #000) !important;
  scrollbar-gutter: stable both-edges !important;
}

.hd-timeline-fullscreen .hd-ref--fullscreen-clone {
  width: max-content !important;
  min-width: max(1280px, 100%) !important;
  max-height: none !important;
  overflow: visible !important;
  border-radius: 16px !important;
}

.hd-timeline-fullscreen .hd-ref__inner--fullscreen-clone {
  min-width: 1280px !important;
}

.hd-timeline-fullscreen .hd-ref__months {
  height: 1.9rem !important;
}

.hd-timeline-fullscreen .hd-ref__month {
  color: color-mix(in srgb, var(--timeline-board-text) 88%, transparent) !important;
  font-size: .72rem !important;
  letter-spacing: .045em !important;
  text-align: center !important;
  background: transparent !important;
}

.hd-timeline-fullscreen .hd-ref__month:not(.hd-ref__month--boundary):not(.hd-ref__month--quarter):not(.hd-ref__month--endpoint) {
  color: transparent !important;
  font-size: 0 !important;
}

.hd-timeline-fullscreen .hd-ref__month--endpoint {
  color: var(--timeline-board-text) !important;
  font-weight: 900 !important;
  background: color-mix(in srgb, var(--timeline-board-line) 18%, transparent) !important;
}

/* =========================================================
Responsive timeline behaviour
========================================================= */
@media (max-width: 980px) {
  .hd-timeline-page {
    --timeline-board-width: 1180px;
    --timeline-row-label-width: 132px;
    --timeline-row-height: 64px;
    --timeline-phase-row-height: 92px;
  }

  .hd-tl-overall,
  .hd-phase-section__detailgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .hd-tl-card--board.is-expanded .hd-board-scrollnote {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hd-timeline-page {
    --timeline-board-width: 1120px;
    --timeline-row-label-width: 112px;
    --timeline-row-height: 62px;
    --timeline-phase-row-height: 82px;
    width: 100%;
    overflow-x: hidden;
  }

  .hd-tl-card__body,
  .hd-phase-section__body {
    padding: 14px;
  }

  .hd-tl-overall {
    grid-template-columns: 1fr;
  }

  .hd-tl-progress__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hd-tl-progress__meta span,
  .hd-tl-progress__date {
    grid-template-columns: 1fr;
    align-items: start;
    gap: .2rem;
    border-radius: 12px;
  }

  .hd-board-scrollnote {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px;
    font-size: .94rem;
  }

  .hd-timeline-expand-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .hd-ref-topscroll {
    height: 10px;
    margin: 6px 10px;
  }

  .hd-ref {
    max-height: min(74vh, 520px);
    margin: 0 10px 12px;
    border-radius: 10px;
  }

  .hd-ref__inner {
    padding: 10px;
  }

  .hd-ref__title {
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hd-ref__year {
    min-width: 4.4rem;
    font-size: .62rem;
  }

  .hd-ref__month--boundary,
  .hd-ref__month--quarter,
  .hd-ref__month--endpoint {
    font-size: .54rem;
  }

  .hd-ref__axis-label,
  .hd-ref__row-label {
    min-height: var(--timeline-row-height);
    padding: 6px;
    font-size: .62rem;
    line-height: 1.1;
  }

  .hd-ref__lane {
    min-height: var(--timeline-row-height);
    background-image: repeating-linear-gradient(
    to right,
    var(--timeline-board-line) 0,
    var(--timeline-board-line) 1px,
    transparent 1px,
    transparent 28px
    );
  }

  .hd-ref__lane--phases {
    min-height: var(--timeline-phase-row-height);
  }

  .hd-ref__phase-track,
  .hd-ref__bar {
    top: 18px;
    height: 20px;
    min-width: 54px;
    padding: 0 .25rem;
  }

  .hd-ref__bar span {
    min-height: 1rem;
    padding: 0 .35rem;
    font-size: .58rem;
  }

  .hd-ref__row-dot {
    width: 15px;
    height: 15px;
    border-width: 2px;
  }

  .hd-tl-jump {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hd-tl-jump__item,
  .hd-tl-jump a {
    width: 100%;
    box-sizing: border-box;
  }

  .hd-phase-section__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .hd-phase-stat {
    min-width: 0;
  }

  .hd-tl-card--board.is-expanded {
    inset: 8px;
    border-radius: 14px;
  }

  .hd-tl-card--board.is-expanded .hd-board-scrollnote {
    font-size: .9rem;
    align-items: stretch;
  }

  .hd-tl-card--board.is-expanded .hd-timeline-expand-btn {
    width: 100%;
    justify-content: center;
  }

  .hd-tl-card--board.is-expanded .hd-ref__inner {
    min-width: 1040px;
  }

  .hd-timeline-fullscreen {
    padding: .45rem !important;
  }

  .hd-timeline-fullscreen__panel {
    width: 98vw !important;
    height: 94vh !important;
    border-radius: 16px !important;
  }

  .hd-timeline-fullscreen__head {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }

  .hd-timeline-fullscreen__head [data-timeline-close] {
    width: 100% !important;
  }

  .hd-timeline-fullscreen .hd-ref__inner--fullscreen-clone {
    min-width: 1120px !important;
  }
}

@media print {
  .hd-timeline-expand-btn,
  .hd-timeline-fullscreen {
    display: none !important;
  }

  .hd-ref {
    overflow: visible;
    max-height: none;
  }
}

/* =========================================================
HD RMS v1043 public Timeline larger-view and month clarity pass
Owner: timeline_page. This replaces the later accumulated timeline
repair snippets with one owner-scoped refinement block.
========================================================= */
.hd-timeline-page {
  overflow-x: visible !important;
}

.hd-timeline-page .hd-tl-card--board {
  overflow: hidden !important;
}

.hd-ref,
.hd-ref-topscroll,
.hd-timeline-fullscreen__scroller {
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-x pan-y !important;
  scrollbar-gutter: stable both-edges !important;
}

.hd-ref__inner {
  min-width: max(var(--timeline-board-width, 1380px), 124vw) !important;
}

.hd-ref__grid {
  grid-template-columns: var(--timeline-row-label-width) minmax(0, 1fr) !important;
}

.hd-ref__month {
  top: .28rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: var(--timeline-month-axis-height, 2.1rem) !important;
  padding: .18rem .22rem !important;
  color: color-mix(in srgb, var(--timeline-board-text) 88%, transparent) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  letter-spacing: .035em !important;
  text-align: center !important;
  border-left: 1px solid color-mix(in srgb, var(--timeline-board-text) 28%, transparent) !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.hd-ref__month::after {
  display: none !important;
}

.hd-ref__month-short {
  display: block !important;
  color: color-mix(in srgb, var(--timeline-board-text) 90%, transparent) !important;
  font-size: .76rem !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
}

.hd-ref__month-year {
  display: none !important;
}

.hd-ref__month--boundary,
.hd-ref__month--quarter,
.hd-ref__month--endpoint {
  color: var(--timeline-board-text) !important;
  background: color-mix(in srgb, var(--timeline-board-text) 7%, transparent) !important;
}

.hd-ref__month--boundary,
.hd-ref__month--endpoint {
  border-left-color: color-mix(in srgb, var(--timeline-board-text) 60%, transparent) !important;
}

.hd-ref__lane[data-timeline-row^="phase_"] {
  background-color: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 8%, var(--timeline-board-bg)) !important;
}

.hd-ref__phase-zone {
  border-inline: 1px solid color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 36%, transparent) !important;
  background: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1)) 10%, transparent) !important;
}

.hd-ref__bar,
.hd-ref__phase-track,
.hd-ref__row-dot,
.hd-ref__swatch,
.hd-tl-progress__phase,
.hd-phase-section__accent,
.hd-phase-section__fill {
  background: var(--phase-colour, var(--timeline-current-phase, var(--timeline-phase-1))) !important;
}

.hd-ref__bar span {
  background: color-mix(in srgb, var(--timeline-phase-label-bg, var(--colour-heading, #102630)) 88%, #000 12%) !important;
  color: var(--timeline-phase-label-text, var(--colour-surface, #fffdf8)) !important;
}

.hd-tl-card--board.is-expanded {
  position: fixed !important;
  inset: clamp(.65rem, 1.8vw, 1.25rem) !important;
  z-index: 2147482500 !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 20px !important;
  background: var(--timeline-surface-strong, #fffdf8) !important;
  box-shadow: 0 28px 90px color-mix(in srgb, #000 48%, transparent) !important;
}

.hd-tl-card--board.is-expanded::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  background: color-mix(in srgb, var(--timeline-heading, #102630) 48%, transparent) !important;
  backdrop-filter: blur(3px) !important;
}

html.hd-timeline-modal-open,
body.hd-timeline-modal-open {
  overflow: hidden !important;
}

.hd-tl-card--board.is-expanded .hd-board-scrollnote {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto !important;
  align-items: center !important;
  gap: .75rem !important;
}

.hd-tl-card--board.is-expanded .hd-ref {
  height: 100% !important;
  max-height: none !important;
  margin: 0 12px 14px !important;
}

.hd-tl-card--board.is-expanded .hd-ref__inner {
  min-width: max(1880px, calc(100vw + 520px)) !important;
  min-height: max(760px, 100%) !important;
}

.hd-tl-card--board.is-expanded .hd-ref__tooltip {
  position: absolute !important;
  z-index: 2147482600 !important;
}

.hd-tl-card--board.is-expanded .hd-ref__month-short {
  font-size: .82rem !important;
}

.hd-tl-card--board.is-expanded .hd-ref__row-label,
.hd-tl-card--board.is-expanded .hd-ref__axis-label,
.hd-tl-card--board.is-expanded .hd-ref__corner {
  position: sticky !important;
  left: 0 !important;
  z-index: 18 !important;
  box-shadow: 8px 0 18px color-mix(in srgb, #000 20%, transparent) !important;
}

.hd-tl-card--board.is-expanded .hd-ref__corner {
  z-index: 24 !important;
}

@media (max-width: 980px) {
  .hd-timeline-page {
    --timeline-board-width: 1240px !important;
    --timeline-row-label-width: 142px !important;
    --timeline-row-height: 68px !important;
    --timeline-phase-row-height: 96px !important;
  }
}

@media (max-width: 780px) {
  .hd-tl-card--board.is-expanded .hd-board-scrollnote {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }
}

@media (max-width: 760px) {
  .hd-timeline-page {
    --timeline-board-width: 1180px !important;
    --timeline-row-label-width: 142px !important;
    --timeline-row-height: 68px !important;
    --timeline-phase-row-height: 96px !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .hd-ref {
    max-height: min(72vh, 680px) !important;
    margin-inline: 0 !important;
    border-radius: 12px !important;
  }

  .hd-ref__inner {
    min-width: max(1120px, 245vw) !important;
    padding-inline: 10px 18px !important;
  }

  .hd-ref__grid {
    grid-template-columns: var(--timeline-row-label-width) minmax(980px, 1fr) !important;
  }

  .hd-ref__row-label,
  .hd-ref__axis-label,
  .hd-ref__corner {
    position: sticky !important;
    left: 0 !important;
    z-index: 18 !important;
    box-shadow: 8px 0 16px color-mix(in srgb, #000 18%, transparent) !important;
  }

  .hd-ref__corner {
    z-index: 22 !important;
  }

  .hd-ref__month-short {
    font-size: .7rem !important;
  }

  .hd-tl-card--board.is-expanded {
    inset: .45rem !important;
    border-radius: 16px !important;
  }

  .hd-tl-card--board.is-expanded .hd-ref__inner {
    min-width: max(1180px, 260vw) !important;
    min-height: max(660px, 100%) !important;
  }

  .hd-timeline-expand-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* v1076 pass8: public Timeline page site-integration polish.
Owner: timeline_page. Aligns the public timeline with standard page cards without changing timeline data logic. */
.hd-timeline-page--integrated .hd-timeline-intro-prose {
  border-left: 6px solid var(--colour-accent, #b8872f) !important;
  background: linear-gradient(135deg, var(--timeline-surface, #fffdf8), var(--timeline-surface-soft, #f4f1e6)) !important;
}

.hd-timeline-wrap--public-integrated {
  display: grid !important;
  gap: clamp(16px, 2vw, 24px) !important;
}

.hd-timeline-page--integrated .hd-tl-card {
  border-color: color-mix(in srgb, var(--timeline-border, #d8c9a8) 88%, transparent) !important;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--colour-shadow, #102630) 9%, transparent) !important;
}

.hd-timeline-page--integrated .hd-tl-card--overview .hd-tl-card__body {
  gap: clamp(14px, 2vw, 22px) !important;
}

.hd-timeline-page--integrated .hd-tl-intro {
  border-radius: 18px !important;
  padding: clamp(14px, 2vw, 20px) !important;
  background: color-mix(in srgb, var(--timeline-surface-soft, #f4f1e6) 64%, transparent) !important;
}

.hd-timeline-page--integrated .hd-timeline-legend-note {
  max-width: 72ch !important;
}

.hd-timeline-page--integrated .hd-phase-section {
  border-color: color-mix(in srgb, var(--phase-colour, var(--timeline-phase-1, #AC7B2E)) 22%, var(--timeline-border, #d8c9a8)) !important;
}

@media (max-width: 760px) {
  .hd-timeline-page--integrated .hd-timeline-intro-prose {
    border-left-width: 4px !important;
  }

  .hd-timeline-page--integrated .hd-tl-intro {
    padding: 1rem !important;
  }
}

/* end v1076 pass8 timeline public integration */

/* =========================================================
HD RMS v1103 timeline mobile integration
Owner: timeline_page.
Purpose: align timeline mobile cards with the public card system, remove the
mobile larger-view trigger, and keep phase accents integrated with card borders.
========================================================= */
.hd-timeline-page,
.hd-route-content-timeline {
  --hd-timeline-card-gap: clamp(18px, 2.4vw, 30px);
  --hd-timeline-card-pad: clamp(20px, 2.2vw, 32px);
}

.hd-timeline-page :where(.hd-card,.hd-content-card,.hd-timeline-intro,.hd-timeline-info-card,.hd-timeline-key,.hd-timeline-phase-card,.timeline-phase-card) {
  margin-block: 0 var(--hd-timeline-card-gap) !important;
  padding: var(--hd-timeline-card-pad) !important;
  background: var(--colour-surface, #fffaf1) !important;
  border: 1px solid var(--colour-border, #d6ad83) !important;
  border-left-width: 8px !important;
  border-left-color: var(--colour-accent, #a35a29) !important;
  border-radius: var(--radius-lg, 18px) !important;
  box-shadow: var(--shadow-soft, 0 16px 36px rgba(0,0,0,.06)) !important;
}

.hd-timeline-page :where(.hd-timeline-intro,.hd-timeline-info-card,.hd-timeline-key) {
  border-left-width: 1px !important;
}

.hd-timeline-page :where(.hd-timeline-phase-card,.timeline-phase-card)[data-phase="1"] {
  border-left-color: var(--timeline-phase-1-bg, var(--colour-accent, #a35a29)) !important;
}

.hd-timeline-page :where(.hd-timeline-phase-card,.timeline-phase-card)[data-phase="2"] {
  border-left-color: var(--timeline-phase-2-bg, var(--colour-accent, #a35a29)) !important;
}

.hd-timeline-page :where(.hd-timeline-phase-card,.timeline-phase-card)[data-phase="3"] {
  border-left-color: var(--timeline-phase-3-bg, var(--colour-accent, #a35a29)) !important;
}

.hd-timeline-page :where(h2,.h2,.hd-card-title) {
  margin-top: 0 !important;
  padding-bottom: .45rem !important;
  border-bottom: 1px solid var(--colour-border, #d6ad83) !important;
}

.hd-timeline-board-wrap,
.hd-timeline-scroll,
.hd-timeline-board-shell {
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

.hd-timeline-help,
.hd-timeline-scroll-help {
  background: color-mix(in srgb, var(--colour-primary, #236336) 88%, var(--colour-text, #06334a) 12%) !important;
  color: var(--colour-on-primary, #ffffff) !important;
}

@media (max-width: 760px) {
  .hd-timeline-page,
  .hd-route-content-timeline {
    --hd-timeline-card-gap: clamp(16px, 5.4vw, 24px);
    --hd-timeline-card-pad: clamp(18px, 5.2vw, 24px);
  }

  .hd-timeline-page :where(.hd-card,.hd-content-card,.hd-timeline-intro,.hd-timeline-info-card,.hd-timeline-key,.hd-timeline-phase-card,.timeline-phase-card) {
    margin-bottom: var(--hd-timeline-card-gap) !important;
    border-left-width: 6px !important;
  }

  .hd-timeline-page :where(.hd-timeline-intro,.hd-timeline-info-card,.hd-timeline-key) {
    border-left-width: 1px !important;
  }

  .hd-timeline-large-trigger,
  .hd-timeline-open-large,
  .hd-timeline-large-open,
  .hd-timeline-view-toggle,
  .hd-timeline-large-toggle,
  [data-hd-timeline-open-large],
  [data-hd-timeline-large-open],
  [data-action="open-large-timeline"],
  [aria-controls*="large-timeline"],
  [aria-controls*="timeline-large"],
  [aria-controls*="large"]:where(button,.hd-btn,.hd-button,a) {
    display: none !important;
  }

  .hd-timeline-help,
  .hd-timeline-scroll-help {
    display: block !important;
    padding: 18px !important;
    border-radius: 18px 18px 0 0 !important;
  }
}

@media (min-width: 761px) {
  .hd-timeline-large-trigger,
  .hd-timeline-open-large,
  .hd-timeline-large-open,
  .hd-timeline-view-toggle,
  .hd-timeline-large-toggle,
  [data-hd-timeline-open-large],
  [data-hd-timeline-large-open] {
    display: inline-flex;
  }
}

/* === Qualtrics embeds [qualtrics_embeds] === */
/* HD RMS qualtrics_embeds v996 clean
Owner: Qualtrics embeds.
Owns the public Quest welcome screen, Qualtrics runner, iframe sizing and mobile/tablet overlay.
The questionnaire starts from a friendly site page and the iframe loads only after the visitor chooses to begin.
Does not own generic page shells, generic cards, generic buttons, public form styling or global mobile layout.
*/
body.is-qualtrics-route :where(
#hd-main,
.hd-main-content-shell--shared,
.hd-main-content-wrapper--shared,
.hd-main-content-inner--shared
) {
  overflow: visible;
}

body.hd-quest-overlay-open {
  overflow: hidden;
}

.hd-qualtrics-embed-shell--launch {
  --hd-quest-shell-width: min(100%, var(--main-content-readable-width, 920px));
  --hd-quest-overlay-bar-bg: linear-gradient(135deg, var(--colour-primary, #173f5f), var(--colour-accent-strong, #00736f));
  --hd-quest-overlay-bar-text: var(--colour-on-primary, #fff);
  display: grid;
  gap: clamp(1rem, 2vw, 1.4rem);
  width: var(--hd-quest-shell-width);
  max-width: var(--hd-quest-shell-width);
  margin: clamp(1.25rem, 3vw, 2.25rem) auto;
}

.hd-quest-intro-card,
.hd-quest-status-card {
  display: grid;
  gap: clamp(.85rem, 1.7vw, 1.15rem);
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--colour-border-soft, var(--colour-border, #d8dee4));
  border-radius: var(--radius-card, 22px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--colour-surface, #fff) 96%, var(--colour-panel, #eef3f2) 4%), var(--colour-surface, #fff));
  box-shadow: 0 18px 42px color-mix(in srgb, var(--colour-shadow, #092033) 12%, transparent);
}

.hd-quest-intro-card__eyebrow {
  width: fit-content;
  padding: .34rem .72rem;
  border: 1px solid color-mix(in srgb, var(--colour-accent, #b88a2d) 50%, var(--colour-border, #d8dee4));
  border-radius: 999px;
  background: var(--colour-panel-tint, color-mix(in srgb, var(--colour-accent, #b88a2d) 14%, var(--colour-surface, #fff)));
  color: var(--colour-heading, #12313f);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hd-quest-intro-card .hd-page-title,
.hd-quest-status-card .hd-h2 {
  margin: 0;
  color: var(--colour-heading, #12313f);
}

.hd-quest-intro-card__lead {
  max-width: 62ch;
  margin: 0;
  color: var(--colour-text, #102a36);
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.55;
}

.hd-quest-intro-card__copy {
  max-width: 70ch;
  margin: 0;
}

.hd-quest-intro-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: .25rem;
}

.hd-quest-start,
.hd-quest-intro-card__actions .hd-btn--action {
  border-color: color-mix(in srgb, var(--colour-accent, #b88a2d) 40%, var(--colour-primary, #173f5f));
  background: linear-gradient(135deg, var(--colour-action-bg, var(--colour-primary, #173f5f)), var(--colour-accent-strong, var(--colour-primary-hover, #0d5b65)));
  color: var(--colour-action-text, var(--colour-on-primary, #fff));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--colour-shadow, #092033) 18%, transparent);
}

.hd-quest-runner {
  display: grid;
  grid-template-rows: auto minmax(680px, 1fr);
  min-height: var(--hd-qualtrics-live-height, clamp(760px, 76vh, 1040px));
  border: 1px solid var(--colour-border-soft, var(--colour-border, #d8dee4));
  border-radius: var(--radius-card, 22px);
  background: var(--colour-surface, #fff);
  box-shadow: 0 22px 54px color-mix(in srgb, var(--colour-shadow, #092033) 16%, transparent);
  overflow: hidden;
}

.hd-quest-runner[hidden],
.hd-quest-intro-card[hidden],
.hd-quest-status-card[hidden] {
  display: none;
}

.hd-quest-runner__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .78rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--colour-primary, #173f5f) 65%, transparent);
  background: var(--hd-quest-overlay-bar-bg);
  color: var(--hd-quest-overlay-bar-text);
}

.hd-quest-runner__title {
  display: grid;
  gap: .08rem;
  min-width: 0;
}

.hd-quest-runner__title strong,
.hd-quest-runner__title span {
  color: inherit;
}

.hd-quest-runner__title strong {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.15;
}

.hd-quest-runner__title span {
  opacity: .88;
  font-size: .9rem;
}

.hd-quest-close {
  appearance: none;
  min-height: 38px;
  padding: .46rem .82rem;
  border: 1px solid color-mix(in srgb, var(--hd-quest-overlay-bar-text) 65%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hd-quest-overlay-bar-text) 12%, transparent);
  color: var(--hd-quest-overlay-bar-text);
  font-weight: 800;
  cursor: pointer;
}

.hd-quest-close:hover,
.hd-quest-close:focus-visible {
  background: color-mix(in srgb, var(--hd-quest-overlay-bar-text) 22%, transparent);
  outline: 3px solid color-mix(in srgb, var(--colour-accent, #b88a2d) 42%, transparent);
  outline-offset: 2px;
}

.hd-quest-runner__frame-wrap {
  min-height: 680px;
  height: 100%;
  background: #fff;
  overflow: hidden;
}

.hd-qualtrics-frame {
  display: block;
  width: 100%;
  max-width: none;
  min-height: var(--hd-qualtrics-live-height, clamp(720px, 76vh, 980px));
  height: var(--hd-qualtrics-live-height, clamp(720px, 76vh, 980px));
  border: 0;
  background: #fff;
  transform: none;
}

@media (min-width: 1180px) {
  .hd-qualtrics-embed-shell--launch {
    --hd-quest-shell-width: min(1180px, calc(100vw - 48px));
  }

  .hd-quest-runner,
  .hd-quest-runner__frame-wrap {
    min-height: var(--hd-qualtrics-live-height, clamp(780px, 78vh, 1040px));
    height: auto;
  }

  .hd-qualtrics-frame {
    min-height: var(--hd-qualtrics-live-height, clamp(780px, 78vh, 1040px));
    height: var(--hd-qualtrics-live-height, clamp(780px, 78vh, 1040px));
  }
}

@media (max-width: 1024px) {
  .hd-quest-runner--overlay {
    position: fixed;
    inset: 0;
    z-index: 1600;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hd-quest-runner--overlay .hd-quest-runner__bar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: .68rem .82rem;
  }

  .hd-quest-runner--overlay .hd-quest-runner__title strong {
    font-size: clamp(.98rem, 3.6vw, 1.12rem);
  }

  .hd-quest-runner--overlay .hd-quest-runner__title span {
    font-size: .82rem;
  }

  .hd-quest-runner--overlay .hd-quest-close {
    min-height: 36px;
    padding: .42rem .66rem;
  }

  .hd-quest-runner--overlay .hd-quest-runner__frame-wrap,
  .hd-quest-runner--overlay .hd-qualtrics-frame {
    min-height: 0;
    height: 100%;
  }
}

@media (max-width: 760px) {
  .hd-qualtrics-embed-shell--launch {
    --hd-quest-shell-width: min(100%, calc(100vw - 28px));
    gap: 1rem;
    margin-block: 1rem;
  }

  .hd-quest-intro-card,
  .hd-quest-status-card {
    padding: clamp(1rem, 5vw, 1.35rem);
    border-radius: 20px;
  }

  .hd-quest-intro-card .hd-page-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    letter-spacing: .04em;
  }

  .hd-quest-intro-card__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hd-quest-intro-card__actions .hd-btn {
    width: 100%;
    justify-content: center;
  }
}

/* === Admin chrome, strip and dropdowns [admin_chrome] === */
/* HD RMS v1060 clean replacement: admin_chrome
Owner: admin_chrome
Purpose: stable admin strip, account menu, accessibility dropdown and access-denied/admin chrome presentation.
Replace the whole admin_chrome section with this file. Do not append. */
:root {
  --admin-strip-height:56px;
  --admin-strip-edge-gap:clamp(10px,2vw,28px);
  --admin-strip-inner-max:var(--site-shell-width,var(--site-wrapper-max,1100px));
  --admin-strip-control-height:40px;
  --admin-strip-gap:12px;
  --admin-strip-root-layer:2147483000;
  --admin-strip-menu-layer:2147483100;
  --admin-strip-reveal-layer:2147483090;
  --admin-strip-bg:var(--colour-strong-surface,var(--colour-heading,#103f3c));
  --admin-strip-fg:var(--colour-surface,#fffdf8);
  --admin-strip-border:color-mix(in srgb,var(--admin-strip-bg) 78%,#ffffff 22%);
  --admin-strip-shadow:0 16px 34px rgba(8,20,32,.28);
  --admin-strip-action-bg:color-mix(in srgb,var(--colour-primary,#0b5f8f) 78%,#000 22%);
  --admin-strip-action-fg:var(--colour-on-primary,#ffffff);
  --admin-strip-action-border:color-mix(in srgb,var(--admin-strip-action-fg) 28%,transparent);
  --admin-strip-action-hover-bg:var(--colour-primary-hover,var(--colour-primary,#084d7b));
  --admin-strip-user-bg:color-mix(in srgb,var(--colour-primary,#0b5f8f) 72%,#000 22%);
  --admin-strip-user-border:color-mix(in srgb,var(--admin-strip-action-fg) 24%,transparent);
  --admin-account-menu-width:min(248px,calc(100vw - 24px));
  --admin-account-menu-bg:var(--colour-surface,#fffdf8);
  --admin-account-menu-panel:var(--colour-surface-soft,#eef2ec);
  --admin-account-menu-fg:var(--colour-heading,#103f3c);
  --admin-account-menu-muted:var(--colour-text,#2f4854);
  --admin-account-menu-border:var(--colour-border-soft,#d8c9a8);
  --admin-account-menu-hover-bg:color-mix(in srgb,var(--colour-primary,#0b5f8f) 14%,var(--colour-surface,#fffdf8));
  --hd-header-dropdown-width:min(292px,calc(100vw - 24px));
}

html body #hd-admin-strip-top,html body #hd-admin-strip-top.hd-admin-topbar,html body #hd-admin-strip-top.hd-admin-topbar--overlay,html body .hd-admin-topbar.hd-admin-topbar--overlay {
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  bottom:auto!important;
  width:auto!important;
  max-width:none!important;
  height:var(--admin-strip-height)!important;
  min-height:var(--admin-strip-height)!important;
  margin:0!important;
  padding:0 var(--admin-strip-edge-gap)!important;
  transform:none!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  pointer-events:none!important;
  z-index:var(--admin-strip-root-layer)!important;
  isolation:isolate!important;
  contain:none!important;
  box-sizing:border-box!important
}

html body #hd-admin-strip-top[hidden],html body #hd-admin-strip-top[aria-hidden=true],html.hd-admin-strip-hidden body #hd-admin-strip-top,body.hd-admin-strip-hidden #hd-admin-strip-top {
  display:none!important
}

html body #hd-admin-strip-top .hd-admin-topbar__inner,html body .hd-admin-topbar.hd-admin-topbar--overlay .hd-admin-topbar__inner {
  box-sizing:border-box!important;
  position:relative!important;
  width:min(100%,var(--admin-strip-inner-max))!important;
  max-width:var(--admin-strip-inner-max)!important;
  height:var(--admin-strip-height)!important;
  min-height:var(--admin-strip-height)!important;
  margin:0 auto!important;
  padding:8px clamp(10px,1.6vw,18px)!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:var(--admin-strip-gap)!important;
  overflow:visible!important;
  pointer-events:auto!important;
  background:var(--admin-strip-bg)!important;
  color:var(--admin-strip-fg)!important;
  -webkit-text-fill-color:var(--admin-strip-fg)!important;
  border:1px solid var(--admin-strip-border)!important;
  border-top:0!important;
  border-radius:0 0 16px 16px!important;
  box-shadow:var(--admin-strip-shadow)!important;
  z-index:1!important
}

body:has(#hd-admin-strip-top) :is(#hd-header-panel,#hd-site-header,#hd-header-shell,#hd-site-main,#hd-main,#hd-site-footer,#hd-footer-panel,.hd-site-header-panel,.hd-main-content-shell,.hd-footer-shell) {
  position:relative!important;
  z-index:0!important
}

body:has(#hd-admin-strip-top) #hd-admin-strip-top {
  z-index:var(--admin-strip-root-layer)!important
}

body:has(#hd-admin-strip-top) {
  padding-top:var(--admin-strip-height)!important
}

html.hd-admin-strip-hidden body:has(#hd-admin-strip-top),body.hd-admin-strip-hidden:has(#hd-admin-strip-top) {
  padding-top:0!important
}

#hd-admin-strip-top summary,#hd-admin-strip-top details>summary {
  list-style:none!important;
  cursor:pointer!important
}

#hd-admin-strip-top summary::-webkit-details-marker,#hd-admin-strip-top details>summary::-webkit-details-marker {
  display:none!important
}

#hd-admin-strip-top :is(.hd-admin-quickjump-menu,.hd-admin-account-cluster,details.nav-dropdown--account) {
  position:relative!important;
  z-index:2!important;
  overflow:visible!important;
  flex:0 0 auto!important;
  min-width:0!important
}

#hd-admin-strip-top :is(.hd-admin-quickjump-trigger,.hd-admin-strip-toggle,.hd-admin-public-preview-link,.hd-admin-account-button) {
  box-sizing:border-box!important;
  min-height:var(--admin-strip-control-height)!important;
  height:var(--admin-strip-control-height)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:.45rem!important;
  margin:0!important;
  border-radius:10px!important;
  line-height:1!important;
  white-space:nowrap!important;
  border:1px solid var(--admin-strip-action-border)!important;
  background:var(--admin-strip-action-bg)!important;
  color:var(--admin-strip-action-fg)!important;
  -webkit-text-fill-color:var(--admin-strip-action-fg)!important;
  text-decoration:none!important;
  font-weight:850!important
}

#hd-admin-strip-top :is(.hd-admin-quickjump-trigger,.hd-admin-strip-toggle,.hd-admin-public-preview-link,.hd-admin-account-button):is(:hover,:focus-visible) {
  background:var(--admin-strip-action-hover-bg)!important;
  color:var(--admin-strip-action-fg)!important;
  -webkit-text-fill-color:var(--admin-strip-action-fg)!important;
  outline:2px solid color-mix(in srgb,var(--admin-strip-action-fg) 34%,transparent)!important;
  outline-offset:2px!important
}

#hd-admin-strip-top .hd-admin-strip-toggle,#hd-admin-strip-top .hd-admin-public-preview-link,#hd-admin-strip-top .hd-admin-quickjump-trigger {
  padding:0 .9rem!important
}

#hd-admin-strip-top .hd-admin-account-cluster {
  margin-left:auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  max-width:min(56vw,680px)!important;
  overflow:visible!important
}

#hd-admin-strip-top .brand-user-name {
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  min-height:36px!important;
  max-width:min(48vw,590px)!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid var(--admin-strip-user-border)!important;
  border-radius:10px!important;
  background:var(--admin-strip-user-bg)!important;
  color:var(--admin-strip-fg)!important;
  -webkit-text-fill-color:var(--admin-strip-fg)!important;
  font-size:.84rem!important;
  font-weight:800!important;
  line-height:1!important
}

#hd-admin-strip-top .brand-user-name * {
  color:inherit!important;
  -webkit-text-fill-color:inherit!important
}

#hd-admin-strip-top .hd-admin-account-button {
  width:44px!important;
  min-width:44px!important;
  padding:0!important;
  border-radius:12px!important
}

#hd-admin-strip-top .hd-admin-account-button svg,#hd-admin-strip-top .hd-menu-account-icon {
  display:block!important;
  width:22px!important;
  height:22px!important;
  color:currentColor!important;
  stroke:currentColor!important;
  fill:none!important;
  opacity:1!important
}

#hd-admin-strip-top details.nav-dropdown--account {
  position:relative!important;
  overflow:visible!important
}

#hd-admin-strip-top details.nav-dropdown--account:not([open])>:is(.dropdown-menu,#admin-account-menu) {
  display:none!important
}

#hd-admin-strip-top details.nav-dropdown--account[open]>:is(.dropdown-menu,#admin-account-menu),#hd-admin-strip-top #admin-account-menu.is-open,#hd-admin-strip-top #admin-account-menu[aria-hidden=false] {
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important
}

#hd-admin-strip-top details.nav-dropdown--account>:is(.dropdown-menu,#admin-account-menu),#hd-admin-strip-top #admin-account-menu {
  box-sizing:border-box!important;
  position:absolute!important;
  top:calc(100% + 10px)!important;
  right:0!important;
  left:auto!important;
  z-index:var(--admin-strip-menu-layer)!important;
  width:var(--admin-account-menu-width)!important;
  min-width:min(224px,calc(100vw - 24px))!important;
  max-width:var(--admin-account-menu-width)!important;
  padding:12px!important;
  border:1px solid var(--admin-account-menu-border)!important;
  border-radius:16px!important;
  background:var(--admin-account-menu-bg)!important;
  color:var(--admin-account-menu-fg)!important;
  -webkit-text-fill-color:var(--admin-account-menu-fg)!important;
  box-shadow:0 26px 58px rgba(14,28,38,.30)!important;
  overflow:visible!important;
  white-space:normal!important;
  text-align:left!important
}

#hd-admin-strip-top #admin-account-menu :is(a,button,.dropdown-item),#hd-admin-strip-top details.nav-dropdown--account .dropdown-item {
  display:block!important;
  width:100%!important;
  box-sizing:border-box!important;
  padding:10px 12px!important;
  margin:2px 0!important;
  border:0!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--admin-account-menu-fg)!important;
  -webkit-text-fill-color:var(--admin-account-menu-fg)!important;
  text-decoration:none!important;
  font-weight:760!important;
  text-align:left!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  line-height:1.35!important
}

#hd-admin-strip-top #admin-account-menu :is(a,button,.dropdown-item):is(:hover,:focus-visible),#hd-admin-strip-top details.nav-dropdown--account .dropdown-item:is(:hover,:focus-visible) {
  background:var(--admin-account-menu-hover-bg)!important;
  outline:none!important
}

#hd-admin-strip-top .dropdown-menu__heading {
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  padding:10px 12px!important;
  margin:0 0 10px!important;
  border-radius:12px!important;
  background:var(--admin-account-menu-panel)!important;
  color:var(--admin-account-menu-fg)!important;
  -webkit-text-fill-color:var(--admin-account-menu-fg)!important;
  white-space:normal!important
}

.dropdown-menu__heading strong,#hd-admin-strip-top .dropdown-menu__heading strong {
  display:block!important;
  line-height:1.15!important
}

.dropdown-menu__heading small,#hd-admin-strip-top .dropdown-menu__heading small {
  display:block!important;
  line-height:1.25!important;
  color:var(--admin-account-menu-muted)!important;
  -webkit-text-fill-color:var(--admin-account-menu-muted)!important
}

#hd-admin-strip-top .dropdown-sep {
  height:0!important;
  border:0!important;
  border-top:1px solid var(--admin-account-menu-border)!important;
  margin:10px 4px!important
}

html body .hd-admin-strip-reveal {
  position:fixed!important;
  top:max(8px,env(safe-area-inset-top))!important;
  right:var(--admin-strip-edge-gap)!important;
  z-index:var(--admin-strip-reveal-layer)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  padding:.62rem 1rem!important;
  border:1px solid var(--admin-strip-action-border)!important;
  border-radius:999px!important;
  background:var(--admin-strip-action-bg)!important;
  color:var(--admin-strip-action-fg)!important;
  -webkit-text-fill-color:var(--admin-strip-action-fg)!important;
  box-shadow:var(--admin-strip-shadow)!important;
  font:inherit!important;
  font-weight:850!important;
  cursor:pointer!important
}

html body .hd-admin-strip-reveal[hidden],html body .hd-admin-strip-reveal[aria-hidden=true] {
  display:none!important
}

/* Public header accessibility dropdown: same icon family as the header button, narrower menu, no oversized panel. */
#accessibility-icon-menu.hd-accessibility-panel,.hd-header-dropdown-panel.hd-accessibility-panel {
  box-sizing:border-box!important;
  width:min(268px,calc(100vw - 34px))!important;
  min-width:min(232px,calc(100vw - 34px))!important;
  max-width:min(268px,calc(100vw - 34px))!important;
  padding:12px!important;
  border-radius:16px!important;
  overflow:visible!important;
  white-space:normal!important
}

.hd-accessibility-panel .dropdown-menu__heading {
  grid-template-columns:34px minmax(0,1fr)!important;
  padding:10px 12px!important
}

.hd-accessibility-panel .dropdown-menu__heading-icon svg {
  width:24px!important;
  height:24px!important
}

.hd-accessibility-panel :is(a,button,.dropdown-item) {
  white-space:normal!important;
  line-height:1.35!important;
  padding:10px 12px!important
}

.hd-admin-strip:not(#hd-admin-strip-top),body.is-admin .hd-admin-strip:not(#hd-admin-strip-top) {
  position:relative!important;
  top:auto!important;
  z-index:auto!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  background:var(--admin-strip-bg)!important;
  color:var(--admin-strip-fg)!important
}

@media(max-width:900px) {
  :root {
    --admin-strip-height:54px;
    --admin-strip-control-height:38px;
    --admin-strip-gap:8px
  }

  #hd-admin-strip-top .brand-user-name {
    display:none!important
  }

  #hd-admin-strip-top .hd-admin-account-cluster {
    max-width:none!important
  }

  #hd-admin-strip-top :is(.hd-admin-strip-toggle,.hd-admin-public-preview-link,.hd-admin-quickjump-trigger) {
    padding-inline:.72rem!important;
    font-size:.84rem!important
  }
}

@media(max-width:760px) {
  :root {
    --admin-strip-edge-gap:8px
  }

  html body #hd-admin-strip-top .hd-admin-topbar__inner,html body .hd-admin-topbar.hd-admin-topbar--overlay .hd-admin-topbar__inner {
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    gap:8px!important
  }
}

@media(max-width:520px) {
  :root {
    --admin-strip-height:58px;
    --admin-strip-control-height:40px
  }

  #hd-admin-strip-top :is(.hd-admin-strip-toggle,.hd-admin-public-preview-link,.hd-admin-quickjump-trigger) {
    font-size:.8rem!important;
    padding-inline:.65rem!important
  }

  #hd-admin-strip-top .hd-admin-account-button {
    width:42px!important;
    min-width:42px!important
  }
}

/* v1062 admin strip persistence and shell-layer correction
Owner: admin_chrome
Purpose: keep the fixed admin strip above the main content and footer shells while preserving the browser-stable full-width host layout. */
:root {
  --admin-strip-root-layer: 2147483000;
  --admin-strip-menu-layer: 2147483100;
}

html body:has(#hd-admin-strip-top) #hd-site-header,
html body:has(#hd-admin-strip-top) .hd-site-header-include {
  position: relative !important;
  z-index: calc(var(--admin-strip-root-layer) - 10) !important;
  overflow: visible !important;
  isolation: auto !important;
  contain: none !important;
  transform: none !important;
}

html body #hd-admin-strip-top,
html body #hd-admin-strip-top.hd-admin-topbar,
html body #hd-admin-strip-top.hd-admin-topbar--overlay,
html body .hd-admin-topbar.hd-admin-topbar--overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
  z-index: var(--admin-strip-root-layer) !important;
  overflow: visible !important;
  pointer-events: none !important;
  isolation: isolate !important;
  contain: none !important;
}

html body #hd-admin-strip-top .hd-admin-topbar__inner,
html body .hd-admin-topbar.hd-admin-topbar--overlay .hd-admin-topbar__inner,
html body #hd-admin-strip-top details.nav-dropdown--account,
html body #hd-admin-strip-top .hd-admin-account-cluster {
  position: relative !important;
  z-index: calc(var(--admin-strip-root-layer) + 1) !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

html body #hd-admin-strip-top details.nav-dropdown--account > :is(.dropdown-menu,#admin-account-menu),
html body #hd-admin-strip-top #admin-account-menu {
  z-index: var(--admin-strip-menu-layer) !important;
  min-width: 248px !important;
  width: min(320px, calc(100vw - 28px)) !important;
  max-width: min(320px, calc(100vw - 28px)) !important;
}

body:has(#hd-admin-strip-top) :is(
#hd-site-main,
#hd-main,
#hd-site-footer,
#hd-footer-panel,
.hd-main-content-shell,
.hd-main-content-wrapper,
.hd-footer-shell,
.hd-content-panel
) {
  position: relative !important;
  z-index: 0 !important;
}

/* v1048 compact admin account dropdown
Owner: admin_chrome. Matches the account menu width to the widest practical strip button instead of an oversized panel. */
:root {
  --admin-account-menu-width:min(248px,calc(100vw - 24px));
}

#hd-admin-strip-top details.nav-dropdown--account>:is(.dropdown-menu,#admin-account-menu),
#hd-admin-strip-top #admin-account-menu {
  width:var(--admin-account-menu-width)!important;
  min-width:min(224px,calc(100vw - 24px))!important;
  max-width:var(--admin-account-menu-width)!important;
}

/* === Shared admin tool interface framework [admin_tool_interfaces] === */
/* HD RMS admin_tool_interfaces v980
Clean owner section.
Owns the shared admin/tool interface framework: admin page surfaces, tool-page shells,
admin cards/panels, tool hub card layout, support/project/system suite surfaces,
generic admin More tools menus and message-tool site-copy review surfaces.
Does not own: generic buttons, forms/fields, database-specific SQL output,
analytics charts, CSS tool internals, page-content editor internals, rich-editor content,
public page cards, header/footer/navigation, Quick Jump or timeline manager internals.
*/
:root {
  --hd-ui-page-max: 1220px;
  --hd-ui-gap-xs: .45rem;
  --hd-ui-gap-sm: .7rem;
  --hd-ui-gap: .95rem;
  --hd-ui-gap-lg: 1.25rem;
  --hd-ui-gap-xl: 1.75rem;
  --hd-ui-radius-sm: 10px;
  --hd-ui-radius: 14px;
  --hd-ui-radius-lg: 18px;
  --hd-ui-border: color-mix(in srgb, var(--colour-heading, #12364a) 16%, transparent);
  --hd-ui-border-strong: color-mix(in srgb, var(--colour-heading, #12364a) 26%, transparent);
  --hd-ui-ink: var(--colour-heading, #102a35);
  --hd-ui-muted: var(--colour-muted, #475e68);
  --hd-ui-surface: var(--colour-surface, #fffef9);
  --hd-ui-surface-soft: var(--colour-surface-soft, #f6f1e8);
  --hd-ui-action: var(--colour-primary, #244655);
  --hd-ui-action-hover: var(--colour-primary-hover, #172f3a);
  --hd-ui-shadow: 0 10px 28px rgba(16, 32, 38, .08);
  --hd-admin-card-pad: clamp(18px, 2vw, 26px);
  --hd-admin-section-gap: clamp(16px, 2vw, 24px);
  --hd-admin-hub-card-min: clamp(210px, 15vw, 260px);
}

/* Admin page frame ------------------------------------------------------- */
body.is-admin-page #hd-site-main .hd-content-panel,
body.is-admin-page #hd-site-main .hd-tool-page,
body.is-admin-page #hd-site-main .hd-admin-tool-page,
body.is-admin-page #hd-site-main .hd-standard-page-shell,
body.is-admin-page #hd-site-main .hd-page-shell--project-tool,
body.is-admin-page #hd-site-main .hd-page-shell--system-tool,
body.is-admin-page #hd-site-main .hd-page-shell--help-tool {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  gap: var(--hd-admin-section-gap) !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  color: var(--hd-ui-ink) !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.is-admin-page #hd-site-main .hd-content-panel > section:first-child,
body.is-admin-page #hd-site-main .hd-tool-page > section:first-child,
body.is-admin-page #hd-site-main .hd-admin-tool-page > section:first-child,
body.is-admin-page #hd-site-main .hd-admin-top:first-child,
body.is-admin-page #hd-site-main .hd-page-heading-card:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.is-admin-page #hd-site-main .hd-page-heading-card,
body.is-admin-page #hd-site-main .hd-tool-heading,
body.is-admin-page #hd-site-main .hd-admin-hero,
body.is-admin-page #hd-site-main .hd-tool-intro,
body.is-admin-page #hd-site-main .hd-page-intro {
  display: block !important;
  margin: 0 0 clamp(14px, 1.4vw, 20px) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.hd-eyebrow,
.hd-kicker {
  margin: 0 0 .35rem !important;
  color: color-mix(in srgb, var(--colour-heading, #12364a) 72%, var(--colour-accent, #b88a2e)) !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .085em !important;
}

/* Shared admin surfaces -------------------------------------------------- */
body.is-admin-page #hd-site-main .hd-card,
body.is-admin-page #hd-site-main .hd-panel,
body.is-admin-page #hd-site-main .hd-tool-panel,
body.is-admin-page #hd-site-main .hd-admin-section,
body.is-admin-page #hd-site-main details.hd-admin-collapsible-section,
body.is-admin-page #hd-site-main .hd-content-panel .hd-card {
  background: var(--hd-ui-surface) !important;
  border: 1px solid var(--hd-ui-border) !important;
  border-radius: var(--hd-ui-radius-lg) !important;
  box-shadow: 0 4px 18px rgba(16, 32, 38, .045) !important;
  padding: var(--hd-admin-card-pad) !important;
  color: var(--hd-ui-ink) !important;
  max-width: 100% !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.is-admin-page #hd-site-main .hd-card > :first-child,
body.is-admin-page #hd-site-main .hd-panel > :first-child,
body.is-admin-page #hd-site-main .hd-tool-panel > :first-child,
body.is-admin-page #hd-site-main .hd-admin-section > :first-child,
body.is-admin-page #hd-site-main details.hd-admin-collapsible-section > summary:first-child {
  margin-top: 0 !important;
}

body.is-admin-page #hd-site-main .hd-card > :last-child,
body.is-admin-page #hd-site-main .hd-panel > :last-child,
body.is-admin-page #hd-site-main .hd-tool-panel > :last-child,
body.is-admin-page #hd-site-main .hd-admin-section > :last-child {
  margin-bottom: 0 !important;
}

body.is-admin-page #hd-site-main .hd-grid,
body.is-admin-page #hd-site-main .hd-card-grid,
body.is-admin-page #hd-site-main .hd-tool-grid,
body.is-admin-page #hd-site-main .hd-admin-grid {
  display: grid !important;
  gap: clamp(14px, 1.8vw, 22px) !important;
  align-items: start !important;
  min-width: 0 !important;
}

/* Project, system and help tool suites ---------------------------------- */
.hd-page-shell--project-tool,
.hd-tool-page--project,
.hd-tool-page--project-tools,
.hd-page-shell--system-tool,
.hd-tool-page--system,
.hd-tool-page--system-tools,
.hd-page-shell--help-tool,
.hd-tool-page--help,
.hd-tool-page--help-support,
.hd-tool-page--help-hub,
.hd-tool-page--help-manual,
.hd-tool-page--tool-atlas {
  --hd-tool-panel-gap: clamp(14px, 1.7vw, 22px);
  --hd-tool-panel-padding: clamp(18px, 2.1vw, 28px);
}

.hd-page-shell--project-tool .hd-admin-top,
.hd-tool-page--project .hd-admin-top,
.hd-tool-page--project-tools .hd-admin-top,
.hd-page-shell--system-tool .hd-admin-top,
.hd-tool-page--system .hd-admin-top,
.hd-tool-page--system-tools .hd-admin-top,
.hd-page-shell--help-tool .hd-admin-top,
.hd-tool-page--help .hd-admin-top,
.hd-tool-page--help-support .hd-admin-top {
  display: grid !important;
  gap: clamp(10px, 1.2vw, 16px) !important;
  margin: 0 0 var(--hd-tool-panel-gap) !important;
}

.hd-project-tool-section,
.hd-system-tool-section,
.hd-help-support-section,
.hd-tool-hub-page .hd-tool-hub-section,
.hd-tool-page--system-tools .hd-tool-hub-section,
.hd-tool-page--help .hd-docs-section,
.hd-tool-page--help-support .hd-docs-section,
.hd-docs-note,
.hd-docs-topic-card,
.hd-project-tool-page-note,
.hd-system-tool-page-note {
  min-width: 0 !important;
  padding: var(--hd-tool-panel-padding) !important;
  border: 1px solid var(--hd-ui-border) !important;
  border-radius: var(--hd-ui-radius-lg) !important;
  background: var(--hd-ui-surface) !important;
  color: var(--hd-ui-ink) !important;
}

.hd-project-tool-section > h2:first-child,
.hd-system-tool-section > h2:first-child,
.hd-help-support-section > h2:first-child,
.hd-tool-hub-page .hd-tool-hub-section > h2:first-child,
.hd-tool-page--help .hd-docs-section > h2:first-child {
  margin-top: 0 !important;
}

.hd-project-tool-section__intro,
.hd-system-tool-section__intro,
.hd-tool-hub-page .hd-tool-hub-section > .hd-help,
.hd-help-support-section .hd-help {
  max-width: 78ch !important;
}

/* Rehomed hub-card layout from earlier owner cleanups -------------------- */
:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-toollist.hd-toollist--grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(16px, 1.6vw, 24px) !important;
  align-items: stretch !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool.hd-tool-card,
.hd-project-tool-card,
.hd-system-tool-card,
.hd-help-tool-card) {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link) {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: clamp(12px, 1.1vw, 18px) !important;
  height: 100% !important;
  min-height: var(--hd-admin-hub-card-min) !important;
  padding: clamp(18px, 1.8vw, 28px) !important;
  background: var(--colour-hub-card-bg, var(--colour-surface, #fffdf8)) !important;
  color: var(--colour-hub-card-text, var(--colour-text, #102630)) !important;
  -webkit-text-fill-color: var(--colour-hub-card-text, var(--colour-text, #102630)) !important;
  border: 1px solid var(--colour-hub-card-border, var(--colour-border-soft, #dfe6dc)) !important;
  border-radius: var(--radius-card, 20px) !important;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--colour-shadow, #102630) 10%, transparent) !important;
  text-decoration: none !important;
  overflow: hidden !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link):hover,
:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link):focus-visible {
  background: var(--colour-hub-card-hover-bg, var(--colour-surface-soft, #f3f1e8)) !important;
  color: var(--colour-hub-card-hover-text, var(--colour-text, #102630)) !important;
  -webkit-text-fill-color: var(--colour-hub-card-hover-text, var(--colour-text, #102630)) !important;
  border-color: color-mix(in srgb, var(--colour-hub-card-border, var(--colour-border-soft, #dfe6dc)) 70%, var(--colour-accent-strong, var(--colour-primary, #0b5f8f)) 30%) !important;
  transform: translateY(-1px) !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__top {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__icon {
  flex: 0 0 auto !important;
  inline-size: 48px !important;
  block-size: 48px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  background: var(--colour-hub-card-icon-bg, var(--colour-surface-soft, #f3f1e8)) !important;
  color: var(--colour-hub-card-icon-text, var(--colour-heading, #173642)) !important;
  -webkit-text-fill-color: var(--colour-hub-card-icon-text, var(--colour-heading, #173642)) !important;
  border: 1px solid var(--colour-hub-card-border, var(--colour-border-soft, #dfe6dc)) !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__title {
  margin: 0 !important;
  color: var(--colour-hub-card-title, var(--colour-heading, #173642)) !important;
  -webkit-text-fill-color: var(--colour-hub-card-title, var(--colour-heading, #173642)) !important;
  font-size: clamp(1.12rem, 1.15vw, 1.35rem) !important;
  line-height: 1.22 !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__desc {
  margin: 0 !important;
  color: var(--colour-hub-card-muted, var(--colour-muted, #40505a)) !important;
  -webkit-text-fill-color: var(--colour-hub-card-muted, var(--colour-muted, #40505a)) !important;
  line-height: 1.55 !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__actions {
  align-self: end !important;
  display: flex !important;
  justify-content: flex-start !important;
  margin: 0 !important;
}

/* General admin supporting components ------------------------------------ */
.hd-docs-layout,
.hd-docs-topic-grid,
.hd-help-support-card-grid,
.hd-tool-page--help .hd-toollist--grid,
.hd-docs-subgrid,
.hd-docs-glossary {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important;
  gap: clamp(12px, 1.4vw, 18px) !important;
}

.hd-docs-section-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.hd-flow-diagram {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  line-height: 1.35 !important;
}

.hd-flow-diagram span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  border: 1px solid var(--hd-ui-border) !important;
  background: var(--hd-ui-surface-soft) !important;
  font-weight: 750 !important;
}

/* Rehomed Send Updates review surface ------------------------------------ */
.hd-tool-page--message .hd-message-site-copy-card {
  border-left: 6px solid var(--colour-accent, #b58a42) !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 88%, var(--colour-surface-soft, #f3f1e8) 12%) !important;
}

.hd-tool-page--message .hd-message-site-copy-card .hd-choice {
  align-items: flex-start !important;
  gap: .8rem !important;
  padding: .9rem 1rem !important;
  border-radius: 14px !important;
  border: 1px solid var(--colour-border-soft, #dfe6dc) !important;
  background: var(--colour-surface, #fffdf8) !important;
}

.hd-tool-page--message .hd-message-site-copy-card input[type="checkbox"] {
  inline-size: 1.25rem !important;
  block-size: 1.25rem !important;
  margin-top: .15rem !important;
  accent-color: var(--colour-primary, #0b5f8f) !important;
}

.hd-tool-page--message .hd-preview-iframe {
  width: 100% !important;
  min-height: 560px !important;
  border: 1px solid var(--colour-border-soft, #dfe6dc) !important;
  border-radius: 16px !important;
  background: #fff !important;
}

/* Generic More tools / modal shell --------------------------------------- */
.hd-page-editor-more-actions,
.hd-more-tools,
.hd-admin-more-tools {
  position: relative !important;
}

.hd-page-editor-more-actions__menu,
.hd-more-tools__menu,
.hd-admin-more-tools__menu {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + .5rem) !important;
  z-index: 50 !important;
  min-width: min(280px, calc(100vw - 2rem)) !important;
  padding: .75rem !important;
  display: grid !important;
  gap: .5rem !important;
  background: var(--colour-surface, #fffdf8) !important;
  border: 1px solid var(--colour-border-soft, #d8cdb9) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 42px rgba(7, 30, 49, .18) !important;
}

.hd-page-editor-more-actions__menu .hd-btn,
.hd-more-tools__menu .hd-btn,
.hd-admin-more-tools__menu .hd-btn {
  width: 100% !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Link/card rich-editor modals moved to Admin shared rich editor component. */
@media (max-width: 1180px) {
  :where(.hd-admin-hub-page,
  .hd-tool-page--hub,
  .hd-tool-hub-page,
  .hd-tool-page--project-tools,
  .hd-tool-page--system-tools,
  .hd-help-hub-page) .hd-toollist.hd-toollist--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.is-admin-page #hd-site-main .hd-content-panel,
  body.is-admin-page #hd-site-main .hd-tool-page,
  body.is-admin-page #hd-site-main .hd-admin-tool-page,
  body.is-admin-page #hd-site-main .hd-standard-page-shell {
    gap: clamp(14px, 4vw, 18px) !important;
  }

  body.is-admin-page #hd-site-main .hd-card,
  body.is-admin-page #hd-site-main .hd-panel,
  body.is-admin-page #hd-site-main .hd-tool-panel,
  body.is-admin-page #hd-site-main .hd-admin-section,
  body.is-admin-page #hd-site-main details.hd-admin-collapsible-section {
    padding: clamp(16px, 4.5vw, 22px) !important;
  }

  .hd-page-shell--project-tool,
  .hd-tool-page--project,
  .hd-tool-page--project-tools,
  .hd-page-shell--system-tool,
  .hd-tool-page--system,
  .hd-tool-page--system-tools,
  .hd-page-shell--help-tool,
  .hd-tool-page--help,
  .hd-tool-page--help-support {
    --hd-tool-panel-gap: 12px;
    --hd-tool-panel-padding: clamp(14px, 4vw, 18px);
  }

  :where(.hd-admin-hub-page,
  .hd-tool-page--hub,
  .hd-tool-hub-page,
  .hd-tool-page--project-tools,
  .hd-tool-page--system-tools,
  .hd-help-hub-page) .hd-toollist.hd-toollist--grid {
    grid-template-columns: 1fr !important;
  }

  :where(.hd-admin-hub-page,
  .hd-tool-page--hub,
  .hd-tool-hub-page,
  .hd-tool-page--project-tools,
  .hd-tool-page--system-tools,
  .hd-help-hub-page) :is(.hd-tool__linkcard,
  .hd-tool-card__link) {
    min-height: 0 !important;
  }

  .hd-docs-section-head {
    display: grid !important;
  }

  .hd-tool-page--message .hd-preview-iframe {
    min-height: 460px !important;
  }

  .hd-page-editor-more-actions__menu,
  .hd-more-tools__menu,
  .hd-admin-more-tools__menu {
    position: fixed !important;
    left: 1rem !important;
    right: 1rem !important;
    top: auto !important;
    bottom: 1rem !important;
  }
}

/* =========================================================
HD RMS v1004 admin hub/tool card alignment and button contrast
Owner: admin_tool_interfaces
========================================================= */
.hd-admin-tool-page .hd-tool-card,
.hd-admin-tool-page .hd-tool__linkcard,
.hd-admin-tool-page .hd-hub-card,
.hd-admin-tool-page .tool-card,
.hd-tool-suite .hd-tool-card,
.hd-tool-suite .hd-tool__linkcard,
.hd-tool-hub .hd-tool-card,
.hd-tool-hub .hd-tool__linkcard,
.hd-css-section-grid .hd-tool__linkcard {
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  align-items: start !important;
  min-height: 0 !important;
}

.hd-admin-tool-page .hd-tool-card .hd-actions,
.hd-admin-tool-page .hd-tool__linkcard .hd-actions,
.hd-admin-tool-page .hd-hub-card .hd-actions,
.hd-tool-suite .hd-tool-card .hd-actions,
.hd-tool-hub .hd-tool-card .hd-actions,
.hd-tool-card .hd-actions,
.hd-hub-card .hd-actions {
  justify-content: center !important;
  align-self: end !important;
  width: 100% !important;
  margin-top: auto !important;
}

.hd-admin-tool-page .hd-tool-card .hd-btn,
.hd-admin-tool-page .hd-tool__linkcard .hd-btn,
.hd-admin-tool-page .hd-hub-card .hd-btn,
.hd-tool-suite .hd-tool-card .hd-btn,
.hd-tool-hub .hd-tool-card .hd-btn,
.hd-tool-card .hd-btn,
.hd-hub-card .hd-btn,
.hd-card .hd-btn--primary,
.hd-card .hd-btn--action {
  align-self: center !important;
  justify-self: center !important;
  text-align: center !important;
  background: var(--colour-action-bg, var(--colour-primary, #4d6533)) !important;
  color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
  -webkit-text-fill-color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
  border-color: color-mix(in srgb, var(--colour-action-bg, var(--colour-primary, #4d6533)) 72%, #000 18%) !important;
}

.hd-admin-tool-page .hd-tool-card .hd-btn:hover,
.hd-admin-tool-page .hd-tool-card .hd-btn:focus-visible,
.hd-card .hd-btn--primary:hover,
.hd-card .hd-btn--primary:focus-visible,
.hd-card .hd-btn--action:hover,
.hd-card .hd-btn--action:focus-visible {
  background: var(--colour-action-hover-bg, var(--colour-primary-hover, #3a4e27)) !important;
  color: var(--colour-action-hover-text, var(--colour-on-primary, #ffffff)) !important;
  -webkit-text-fill-color: var(--colour-action-hover-text, var(--colour-on-primary, #ffffff)) !important;
}

/* HD RMS v1005 admin tool-card rhythm.
Owner: admin_tool_interfaces. Fixes stretched/overlapping hub cards and centres card action buttons. */
.hd-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool),
.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool),
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool),
.hd-tool-hub :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  align-content: start !important;
  min-height: clamp(13rem, 18vw, 18rem) !important;
  height: auto !important;
  overflow: hidden !important;
}

.hd-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) :is(.hd-actions,.hd-card-actions,.hd-tool-card__actions),
.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) :is(.hd-actions,.hd-card-actions,.hd-tool-card__actions),
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) :is(.hd-actions,.hd-card-actions,.hd-tool-card__actions) {
  align-self: end !important;
  justify-content: center !important;
  justify-items: center !important;
  margin-top: auto !important;
  padding-top: 1rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
}

.hd-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) .hd-btn,
.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) .hd-btn,
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) .hd-btn {
  margin-inline: auto !important;
  color: var(--colour-action-text, var(--colour-on-primary, #fff)) !important;
  -webkit-text-fill-color: var(--colour-action-text, var(--colour-on-primary, #fff)) !important;
  background: var(--colour-action-bg, var(--colour-primary, #4d6533)) !important;
  border-color: color-mix(in srgb, var(--colour-action-bg, var(--colour-primary, #4d6533)) 72%, #000 28%) !important;
  text-align: center !important;
}

.hd-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool):hover .hd-btn,
.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool):hover .hd-btn,
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool):hover .hd-btn {
  color: var(--colour-action-hover-text, var(--colour-action-text, #fff)) !important;
  -webkit-text-fill-color: var(--colour-action-hover-text, var(--colour-action-text, #fff)) !important;
  background: var(--colour-action-hover-bg, var(--colour-primary-hover, #3a4e27)) !important;
}

@media (max-width: 900px) {
  .hd-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool),
  .hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool),
  .hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-admin-tool-card,.hd-card--tool) {
    min-height: 0 !important;
  }
}

/* === v1020 admin tool visual standardisation === */
.hd-admin-tool-page {
  --hd-tool-accent:var(--hd-colour-primary,#3f407f);
  --hd-tool-accent-soft:color-mix(in srgb,var(--hd-tool-accent) 12%,#fff);
  --hd-tool-card-border:color-mix(in srgb,var(--hd-tool-accent) 20%,#dcd7ea);
}

.hd-admin-tool-page .hd-page-heading-card {
  border:1px solid var(--hd-tool-card-border);
  border-left:6px solid var(--hd-tool-accent);
  box-shadow:0 20px 45px rgba(37,38,85,.08);
}

.hd-admin-tool-page .hd-card,.hd-admin-tool-page .hd-content-card {
  border-color:var(--hd-tool-card-border);
  box-shadow:0 16px 36px rgba(37,38,85,.06);
}

.hd-admin-tool-page .hd-card > h2:first-child,.hd-admin-tool-page .hd-content-card > h2:first-child,.hd-admin-tool-page .hd-h2 {
  border-bottom:1px solid #e3deee;
  padding-bottom:.55rem;
  margin-bottom:.75rem;
}

.hd-admin-tool-page .hd-stat-grid,.hd-admin-tool-page .hd-summary-grid,.hd-admin-tool-page .hd-tool-kpi-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:1rem;
  align-items:stretch;
}

.hd-admin-tool-page .hd-stat-card,.hd-admin-tool-page .hd-summary-card,.hd-admin-tool-page .hd-kpi-card {
  border:1px solid var(--hd-tool-card-border);
  border-radius:18px;
  background:linear-gradient(145deg,#fff,var(--hd-tool-accent-soft));
  padding:1rem;
  box-shadow:0 14px 28px rgba(37,38,85,.05);
}

.hd-admin-tool-page .hd-actions,.hd-admin-tool-page .hd-form-actions,.hd-admin-tool-page .hd-bottom-actions {
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  align-items:center;
  justify-content:center;
}

.hd-admin-tool-page .hd-inline-form {
  display:inline-flex;
  gap:.5rem;
  align-items:center;
  flex-wrap:wrap;
  margin:0;
}

.hd-admin-tool-page details.hd-tool-section {
  border:1px solid var(--hd-tool-card-border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 28px rgba(37,38,85,.05);
  overflow:hidden;
}

.hd-admin-tool-page details.hd-tool-section > summary {
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:1rem;
  align-items:center;
  padding:1rem 1.15rem;
  background:linear-gradient(135deg,var(--hd-tool-accent-soft),#fff);
  cursor:pointer;
  font-weight:800;
  color:var(--hd-colour-heading,#24295f);
}

.hd-admin-tool-page details.hd-tool-section > summary::-webkit-details-marker {
  display:none;
}

.hd-admin-tool-page details.hd-tool-section > summary::before {
  content:'›';
  inline-size:1.8rem;
  block-size:1.8rem;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--hd-tool-accent);
  color:#fff;
  transition:transform .18s ease;
}

.hd-admin-tool-page details.hd-tool-section[open] > summary::before {
  transform:rotate(90deg);
}

.hd-admin-tool-page .hd-input,.hd-admin-tool-page input[type=text],.hd-admin-tool-page input[type=url],.hd-admin-tool-page input[type=email],.hd-admin-tool-page input[type=number],.hd-admin-tool-page select,.hd-admin-tool-page textarea {
  min-height:44px;
  border-radius:12px;
}

.hd-admin-tool-page textarea {
  line-height:1.45;
}

.hd-tool-page--communication {
  --hd-tool-accent:#4d407f;
}

.hd-tool-page--media {
  --hd-tool-accent:#3f6861;
}

.hd-tool-page--database,.hd-tool-page--data-lifecycle {
  --hd-tool-accent:#76502f;
}

.hd-tool-page--system {
  --hd-tool-accent:#304a77;
}

.hd-tool-page--help {
  --hd-tool-accent:#5b517a;
}

.hd-tool-page--css-tools {
  --hd-tool-accent:#493e82;
}

@media (max-width:760px) {
  .hd-admin-tool-page .hd-card,.hd-admin-tool-page .hd-content-card {
    padding:1rem
  }

  .hd-admin-tool-page .hd-actions,.hd-admin-tool-page .hd-form-actions {
    justify-content:stretch
  }

  .hd-admin-tool-page .hd-btn {
    width:100%;
    justify-content:center
  }

  .hd-admin-tool-page .hd-inline-form {
    display:flex;
    width:100%
  }
}

/* === end v1020 admin tool visual standardisation === */

/* v1024 pass2: shared admin reset/restore components */
.hd-definition-list {
  display: grid;
  grid-template-columns: maxcontent 1fr;
  gap: 8px 16px;
}

.hd-definition-list dt {
  font-weight: 800;
}

.hd-definition-list dd {
  margin: 0;
}

.hd-key-value-card {
  border: 1px solid var(--hd-border, rgba(38,39,96,.18));
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.72);
}

.hd-key-value-card span {
  display: block;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .78;
  font-weight: 800;
}

.hd-key-value-card strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 6px;
}

/* end v1024 pass2 */

/* v1025-admin-tool-ui-standardisation: shared admin tool presentation layer */
.hd-admin-tool-page,
.hd-tool-page {
  --hd-tool-accent: var(--hd-colour-accent, #b8872f);
  --hd-tool-panel: rgba(255,255,255,.76);
  --hd-tool-panel-strong: rgba(255,255,255,.92);
  --hd-tool-line: rgba(31,35,77,.14);
  --hd-tool-shadow: 0 18px 48px rgba(28,29,62,.08);
}

.hd-admin-tool-page .hd-card,
.hd-tool-page .hd-card,
.hd-admin-tool-page .hd-panel,
.hd-tool-page .hd-panel {
  border-radius: 22px;
  border: 1px solid var(--hd-tool-line);
  background: var(--hd-tool-panel-strong);
  box-shadow: var(--hd-tool-shadow);
}

.hd-admin-tool-page .hd-card > h2:first-child,
.hd-tool-page .hd-card > h2:first-child,
.hd-admin-tool-page .hd-panel > h2:first-child,
.hd-tool-page .hd-panel > h2:first-child {
  display:flex;
  align-items:center;
  gap:.55rem;
  border-bottom:1px solid var(--hd-tool-line);
  padding-bottom:.55rem;
}

.hd-admin-tool-page .hd-card > h2:first-child::before,
.hd-tool-page .hd-card > h2:first-child::before {
  content:"";
  inline-size:.38rem;
  block-size:1.35rem;
  border-radius:999px;
  background: var(--hd-tool-accent);
  flex:0 0 auto;
}

.hd-admin-tool-page .hd-grid,
.hd-tool-page .hd-grid {
  gap: clamp(14px, 2vw, 22px);
}

.hd-admin-tool-page .hd-actions,
.hd-tool-page .hd-actions {
  gap:.7rem;
  align-items:center;
  flex-wrap:wrap;
}

.hd-admin-tool-page textarea.hd-input,
.hd-tool-page textarea.hd-input {
  min-height: 9rem;
  resize: vertical;
}

.hd-admin-tool-page details.hd-card > summary,
.hd-tool-page details.hd-card > summary {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) minmax(180px,.8fr);
  gap:1rem;
  align-items:center;
  cursor:pointer;
  padding:.95rem 1rem;
  border-radius:16px;
  background:rgba(50,52,112,.07);
}

.hd-admin-tool-page details.hd-card[open] > summary,
.hd-tool-page details.hd-card[open] > summary {
  background:linear-gradient(90deg, rgba(50,52,112,.12), rgba(184,135,47,.08));
}

.hd-admin-tool-page details.hd-card > summary::marker,
.hd-tool-page details.hd-card > summary::marker {
  color:var(--hd-tool-accent);
}

@media (max-width: 860px) {
  .hd-admin-tool-page details.hd-card > summary,
  .hd-tool-page details.hd-card > summary {
    grid-template-columns:auto 1fr;
  }

  .hd-admin-tool-page details.hd-card > summary > :last-child,
  .hd-tool-page details.hd-card > summary > :last-child {
    grid-column:1 / -1;
  }
}

/* HD RMS v1059 admin tool UI integration
Owner: admin_tool_interfaces
Purpose: polish hub cards, permission pages, Error Pages and Maintenance tools without taking ownership of tool-specific content. */
.hd-permission-page {
  width:min(100%,var(--site-shell-width,1180px));
  margin-inline:auto;
}

.hd-permission-card {
  padding:clamp(22px,3vw,36px)!important;
  border:1px solid var(--colour-border-soft,#d8c9a8)!important;
  border-radius:22px!important;
  background:var(--colour-surface,#fffdf8)!important;
  box-shadow:0 18px 46px color-mix(in srgb,var(--colour-shadow,#102630) 10%,transparent)!important;
}

.hd-permission-heading {
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:16px!important;
  align-items:center!important;
}

.hd-permission-icon {
  inline-size:58px;
  block-size:58px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:color-mix(in srgb,var(--colour-primary,#0b5f8f) 14%,var(--colour-surface,#fffdf8));
  font-size:1.75rem;
}

.hd-permission-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.hd-kpi__value--text {
  font-size:1rem!important;
  line-height:1.35!important;
  word-break:break-word;
}

.hd-tool-hub-page .hd-toollist--grid {
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
}

.hd-tool-hub-page .hd-tool-card {
  border:1px solid color-mix(in srgb,var(--colour-heading,#173642) 16%,var(--colour-border-soft,#d8c9a8))!important;
  background:linear-gradient(180deg,var(--colour-surface,#fffdf8),color-mix(in srgb,var(--colour-surface-soft,#f4efe3) 44%,var(--colour-surface,#fffdf8)))!important;
  border-radius:20px!important;
  box-shadow:0 16px 34px color-mix(in srgb,var(--colour-shadow,#102630) 8%,transparent)!important;
  min-height:255px!important;
}

.hd-tool-hub-page .hd-tool-card:hover,.hd-tool-hub-page .hd-tool-card:focus-within {
  border-color:color-mix(in srgb,var(--colour-primary,#0b5f8f) 42%,var(--colour-border-soft,#d8c9a8))!important;
  box-shadow:0 22px 46px color-mix(in srgb,var(--colour-shadow,#102630) 14%,transparent)!important;
  transform:translateY(-1px);
}

.hd-tool-hub-page .hd-tool-card__link,.hd-tool-hub-page .hd-tool__linkcard {
  height:100%;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  gap:16px!important;
  padding:clamp(18px,2vw,26px)!important;
  text-decoration:none!important;
}

.hd-tool-hub-page .hd-tool__top {
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
}

.hd-tool-hub-page .hd-tool__icon {
  inline-size:54px!important;
  block-size:54px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:18px!important;
  background:color-mix(in srgb,var(--colour-primary,#0b5f8f) 12%,var(--colour-surface-soft,#f4efe3))!important;
  border:1px solid color-mix(in srgb,var(--colour-primary,#0b5f8f) 20%,transparent)!important;
  font-size:1.55rem!important;
  line-height:1!important;
}

.hd-tool-hub-page .hd-tool__title {
  font-size:clamp(1.18rem,1.7vw,1.42rem)!important;
  line-height:1.12!important;
  margin:0!important;
  color:var(--colour-heading,#173642)!important;
}

.hd-tool-hub-page .hd-tool__desc {
  margin:0!important;
  max-width:34ch!important;
  line-height:1.55!important;
  color:var(--colour-text,#2f4854)!important;
}

.hd-tool-hub-page .hd-tool__actions {
  align-self:end!important;
  margin-top:auto!important;
}

.hd-tool-hub-page .hd-tool__cta {
  border-radius:13px!important;
  background:color-mix(in srgb,var(--colour-heading,#173642) 88%,var(--colour-primary,#0b5f8f))!important;
  color:var(--colour-surface,#fffdf8)!important;
  -webkit-text-fill-color:var(--colour-surface,#fffdf8)!important;
  box-shadow:0 12px 24px color-mix(in srgb,var(--colour-shadow,#102630) 14%,transparent)!important;
  padding:.68rem 1rem!important;
}

.hd-tool-page--error-pages .hd-card--page,.hd-tool-page--maintenance .hd-card--page {
  border-radius:24px!important;
  border:1px solid var(--colour-border-soft,#d8c9a8)!important;
  background:var(--colour-surface,#fffdf8)!important;
  box-shadow:0 18px 42px color-mix(in srgb,var(--colour-shadow,#102630) 8%,transparent)!important;
}

.hd-tool-page--error-pages .hd-error-editor-grid,.hd-tool-page--maintenance .hd-editor-layout {
  display:grid!important;
  grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr)!important;
  gap:18px!important;
  align-items:start!important;
}

.hd-tool-page--error-pages .hd-error-preview,.hd-tool-page--maintenance .hd-live-preview {
  border:1px dashed color-mix(in srgb,var(--colour-heading,#173642) 20%,var(--colour-border-soft,#d8c9a8))!important;
  border-radius:18px!important;
  background:color-mix(in srgb,var(--colour-surface-soft,#f4efe3) 44%,var(--colour-surface,#fffdf8))!important;
  padding:18px!important;
}

.hd-tool-page--error-pages textarea,.hd-tool-page--maintenance textarea {
  min-height:180px!important;
}

@media(max-width:900px) {
  .hd-permission-grid,.hd-tool-page--error-pages .hd-error-editor-grid,.hd-tool-page--maintenance .hd-editor-layout {
    grid-template-columns:1fr!important
  }

  .hd-tool-hub-page .hd-tool-card {
    min-height:0!important;
  }
}

/* HD RMS v1060: hub cards, permission page and standard admin actions */
.hd-toollist--grid {
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(245px,1fr))!important;
  gap:18px!important;
  align-items:stretch!important
}

.hd-tool-card,.hd-project-tool-card,.hd-admin-hub-card {
  background:linear-gradient(180deg,color-mix(in srgb,var(--colour-surface,#fffdf8) 94%,#fff 6%),color-mix(in srgb,var(--colour-surface-soft,#f4efe3) 42%,var(--colour-surface,#fffdf8) 58%))!important;
  border:1px solid color-mix(in srgb,var(--colour-border-soft,#d8c9a8) 88%,var(--colour-primary,#0b5f8f) 12%)!important;
  border-radius:20px!important;
  box-shadow:0 18px 42px rgba(20,35,50,.08)!important;
  overflow:hidden!important
}

.hd-tool-card__link,.hd-tool__linkcard {
  min-height:260px!important;
  padding:24px 26px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
  text-decoration:none!important;
  color:var(--colour-text,#243746)!important
}

.hd-tool__top {
  display:grid!important;
  grid-template-columns:56px minmax(0,1fr)!important;
  gap:16px!important;
  align-items:center!important
}

.hd-tool__icon {
  width:56px!important;
  height:56px!important;
  border-radius:16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:1.7rem!important;
  line-height:1!important;
  background:color-mix(in srgb,var(--colour-primary,#0b5f8f) 10%,var(--colour-surface,#fffdf8))!important;
  border:1px solid color-mix(in srgb,var(--colour-primary,#0b5f8f) 18%,var(--colour-border-soft,#d8c9a8))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.62)!important
}

.hd-tool__title {
  margin:0!important;
  color:var(--colour-heading,#103f3c)!important;
  line-height:1.15!important;
  font-size:clamp(1.2rem,1.6vw,1.48rem)!important
}

.hd-tool__desc {
  margin:0!important;
  color:var(--colour-text,#2f4854)!important;
  line-height:1.55!important;
  max-width:34ch!important
}

.hd-tool__actions {
  margin-top:auto!important;
  display:flex!important;
  justify-content:center!important;
  padding-top:8px!important
}

.hd-tool__cta,.hd-btn.hd-tool__cta {
  background:color-mix(in srgb,var(--colour-heading,#103f3c) 86%,var(--colour-primary,#0b5f8f) 14%)!important;
  color:var(--colour-surface,#fffdf8)!important;
  -webkit-text-fill-color:var(--colour-surface,#fffdf8)!important;
  border-color:color-mix(in srgb,var(--colour-heading,#103f3c) 82%,#000 18%)!important;
  border-radius:12px!important;
  box-shadow:0 12px 24px rgba(20,35,50,.14)!important
}

.hd-tool-card:is(:hover,:focus-within) {
  border-color:color-mix(in srgb,var(--colour-primary,#0b5f8f) 48%,var(--colour-border-soft,#d8c9a8))!important;
  box-shadow:0 22px 54px rgba(20,35,50,.13)!important;
  transform:translateY(-1px)
}

.hd-permission-page {
  max-width:var(--site-shell-width,var(--site-wrapper-max,1100px))!important;
  margin:0 auto!important;
  padding:clamp(24px,4vw,44px)!important
}

.hd-permission-card {
  border-radius:22px!important
}

.hd-permission-grid {
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
  gap:14px!important
}

@media(max-width:720px) {
  .hd-tool-card__link,.hd-tool__linkcard {
    min-height:0!important
  }

  .hd-tool__top {
    grid-template-columns:48px minmax(0,1fr)!important
  }

  .hd-tool__icon {
    width:48px!important;
    height:48px!important;
    font-size:1.42rem!important
  }
}

/* v1062 hub icon and card-action consistency
Owner: admin_tool_interfaces */
.hd-tool-page--hub .hd-tool__icon,
.hd-tool-hub-page .hd-tool__icon,
.hd-project-tool-card .hd-tool__icon {
  color: var(--colour-heading, #103f3c) !important;
  -webkit-text-fill-color: var(--colour-heading, #103f3c) !important;
}

.hd-tool-page--hub .hd-tool__icon .hd-tool-icon-svg,
.hd-tool-hub-page .hd-tool__icon .hd-tool-icon-svg,
.hd-project-tool-card .hd-tool__icon .hd-tool-icon-svg {
  display: block !important;
  width: 2.05rem !important;
  height: 2.05rem !important;
  min-width: 2.05rem !important;
  min-height: 2.05rem !important;
  color: var(--colour-heading, #103f3c) !important;
  -webkit-text-fill-color: var(--colour-heading, #103f3c) !important;
  stroke: currentColor !important;
  fill: none !important;
  opacity: 1 !important;
}

.hd-tool-page--hub .hd-tool__icon .hd-tool-icon-svg--accessibility .hd-accessibility-svg__head,
.hd-tool-hub-page .hd-tool__icon .hd-tool-icon-svg--accessibility .hd-accessibility-svg__head,
.hd-project-tool-card .hd-tool__icon .hd-tool-icon-svg--accessibility .hd-accessibility-svg__head {
  fill: currentColor !important;
  stroke: none !important;
}

.hd-tool-page--hub .hd-tool__cta,
.hd-tool-hub-page .hd-tool__cta,
.hd-project-tool-card .hd-tool__cta {
  border-radius: 12px !important;
  padding-inline: 1.05rem !important;
}

/* v1063 hub and tool icon consistency */
.hd-tool__icon,
.hd-tool-card .hd-tool__icon {
  display: inline-grid !important;
  place-items: center !important;
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  border-radius: 15px !important;
  border: 1px solid var(--colour-border-soft, #d8c9a8) !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f3efe5) 88%, var(--colour-primary, #0b5f8f) 12%) !important;
  color: var(--colour-heading, #103f3c) !important;
  -webkit-text-fill-color: var(--colour-heading, #103f3c) !important;
  font-size: 1.55rem !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

.hd-tool__icon svg,
.hd-tool-icon-svg {
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  color: var(--colour-heading, #103f3c) !important;
  stroke: currentColor !important;
  fill: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.hd-tool__icon svg [fill="currentColor"],
.hd-tool-icon-svg [fill="currentColor"] {
  fill: currentColor !important;
}

.hd-tool-card .hd-tool__top {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 1rem !important;
}

.hd-tool-card .hd-tool__title {
  margin: 0 !important;
}

/* v1064 admin tool icon and specialist tool layout consistency */
.hd-tool__icon:empty::before,
.hd-tool-card .hd-tool__icon:empty::before {
  content: "↗" !important;
  color: var(--colour-heading, #103f3c) !important;
  -webkit-text-fill-color: var(--colour-heading, #103f3c) !important;
  font-size: 1.55rem !important;
  font-weight: 850 !important;
}

.hd-tool__icon .hd-tool-icon-svg--accessibility,
.hd-tool-icon-svg--accessibility {
  width: 32px !important;
  height: 32px !important;
  display: block !important;
  color: var(--colour-heading, #103f3c) !important;
  stroke: currentColor !important;
  fill: none !important;
}

.hd-tool-page--shared-documents,
.hd-tool-page--qualtrics-links,
.hd-tool-page--page-content {
  width: min(100%, 1160px) !important;
}

/* v1078 Pass 10: admin project/system hub review presentation
Owns only shared admin hub review notes, tool-card meta pills and role/status labelling. */
.hd-admin-review-note {
  border-left: 5px solid var(--colour-accent, #b8872f) !important;
  background:
  linear-gradient(135deg,
  color-mix(in srgb, var(--colour-surface, #fffdf8) 90%, var(--colour-accent, #b8872f) 10%),
  var(--colour-surface, #fffdf8)) !important;
}

.hd-admin-review-note h2 {
  color: var(--colour-heading, #103f3c) !important;
}

.hd-tool-review-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: .75rem !important;
  margin-top: .9rem !important;
}

.hd-tool-review-grid > span {
  display: block !important;
  min-width: 0 !important;
  padding: .78rem .85rem !important;
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8c9a8) 78%, transparent) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 78%, white 22%) !important;
  color: var(--colour-text, #12212b) !important;
  line-height: 1.45 !important;
}

.hd-tool-card__meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .42rem !important;
  margin: .75rem 0 .45rem !important;
}

.hd-tool-meta-pill {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  padding: .24rem .55rem !important;
  border: 1px solid color-mix(in srgb, var(--colour-border-soft, #d8c9a8) 72%, transparent) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 86%, white 14%) !important;
  color: var(--colour-muted, #526474) !important;
  font-size: .78rem !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

.hd-tool-meta-pill--project {
  background: color-mix(in srgb, var(--colour-primary, #0b5f8f) 10%, var(--colour-surface, #fffdf8) 90%) !important;
  color: var(--colour-heading, #103f3c) !important;
}

.hd-tool-meta-pill--system {
  background: color-mix(in srgb, var(--colour-accent, #b8872f) 14%, var(--colour-surface, #fffdf8) 86%) !important;
  color: var(--colour-heading, #103f3c) !important;
}

.hd-tool-meta-pill--restricted {
  background: color-mix(in srgb, var(--colour-danger, #8c2f25) 10%, var(--colour-surface, #fffdf8) 90%) !important;
  border-color: color-mix(in srgb, var(--colour-danger, #8c2f25) 40%, var(--colour-border-soft, #d8c9a8) 60%) !important;
  color: var(--colour-danger, #8c2f25) !important;
}

.hd-tool-card.hd-tool--locked {
  opacity: .92 !important;
}

.hd-tool-card.hd-tool--locked .hd-tool__linkcard {
  cursor: not-allowed !important;
}

@media (max-width: 820px) {
  .hd-tool-review-grid {
    grid-template-columns: 1fr !important;
  }

  .hd-tool-card__meta {
    margin-top: .65rem !important;
  }
}

/* =========================================================
HD RMS v1080 pass12: hub-card description balance and finished default state.
Owner: admin_tool_interfaces.
Keeps hub/tool cards visually finished before hover, improves metadata rhythm and
prevents short descriptions from leaving cards looking sparse.
========================================================= */
:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) {
  --hd-hub-card-edge: color-mix(in srgb, var(--colour-accent, #b8872f) 76%, var(--colour-border-soft, #d8c9a8) 24%);
  --hd-hub-card-line: color-mix(in srgb, var(--colour-border-soft, #d8c9a8) 86%, var(--colour-heading, #173642) 8%);
  --hd-hub-card-surface: linear-gradient(145deg,
  color-mix(in srgb, var(--colour-surface, #fffdf8) 92%, #fff 8%),
  color-mix(in srgb, var(--colour-surface-soft, #f3f1e8) 62%, var(--colour-surface, #fffdf8) 38%));
  --hd-hub-card-shadow: 0 18px 42px color-mix(in srgb, var(--colour-shadow, #102630) 12%, transparent);
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link) {
  position: relative !important;
  grid-template-rows: auto minmax(5.5rem, 1fr) auto !important;
  min-height: clamp(15.5rem, 18vw, 19rem) !important;
  border-color: var(--hd-hub-card-line) !important;
  background: var(--hd-hub-card-surface) !important;
  box-shadow: var(--hd-hub-card-shadow) !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link)::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 6px !important;
  background: var(--hd-hub-card-edge) !important;
  border-radius: var(--radius-card, 20px) 0 0 var(--radius-card, 20px) !important;
  opacity: .92 !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link):hover,
:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool__linkcard,
.hd-tool-card__link):focus-visible {
  box-shadow: 0 22px 52px color-mix(in srgb, var(--colour-shadow, #102630) 16%, transparent) !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__desc {
  max-width: 68ch !important;
  min-height: 4.7rem !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool-meta,
.hd-tool__meta,
.hd-tool-card__meta,
.hd-tool-card__pills) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .42rem !important;
  margin-top: .55rem !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) :is(.hd-tool-pill,
.hd-tool-section-pill,
.hd-tool-type-pill,
.hd-tool-restricted-pill,
.hd-tool-card__pill) {
  min-height: 1.8rem !important;
  align-items: center !important;
  border-color: color-mix(in srgb, var(--hd-hub-card-line) 82%, var(--hd-hub-card-edge) 18%) !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 72%, var(--colour-surface-soft, #f3f1e8) 28%) !important;
}

:where(.hd-admin-hub-page,
.hd-tool-page--hub,
.hd-tool-hub-page,
.hd-tool-page--project-tools,
.hd-tool-page--system-tools,
.hd-help-hub-page) .hd-tool__actions {
  padding-top: .2rem !important;
}

@media (max-width: 900px) {
  :where(.hd-admin-hub-page,
  .hd-tool-page--hub,
  .hd-tool-hub-page,
  .hd-tool-page--project-tools,
  .hd-tool-page--system-tools,
  .hd-help-hub-page) :is(.hd-tool__linkcard,
  .hd-tool-card__link) {
    min-height: 0 !important;
  }

  :where(.hd-admin-hub-page,
  .hd-tool-page--hub,
  .hd-tool-hub-page,
  .hd-tool-page--project-tools,
  .hd-tool-page--system-tools,
  .hd-help-hub-page) .hd-tool__desc {
    min-height: 0 !important;
    display: block !important;
    overflow: visible !important;
  }
}

/* end v1080 pass12 */

/* v1081 pass13: route, slug and link audit panels */
.hd-structure-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)) !important;
}

.hd-route-audit-grid {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)) !important;
  gap: .8rem !important;
  margin: .9rem 0 !important;
}

.hd-route-audit-stat,
.hd-structure-stat {
  border-left: .28rem solid color-mix(in srgb, var(--colour-accent, #8a6f2a) 70%, var(--colour-surface, #fffdf8) 30%) !important;
}

.hd-route-audit-stat span,
.hd-structure-stat span {
  display: block !important;
  font-size: .86rem !important;
  font-weight: 700 !important;
  color: var(--colour-muted, #5b6470) !important;
}

.hd-route-audit-stat strong,
.hd-structure-stat strong {
  display: block !important;
  margin-top: .25rem !important;
}

.hd-route-review-panel h3 {
  margin-top: 1.15rem !important;
  margin-bottom: .45rem !important;
}

.hd-route-manifest-panel .hd-table-wrap,
.hd-route-review-panel .hd-table-wrap {
  max-height: 34rem !important;
  overflow: auto !important;
}

@media (max-width: 720px) {
  .hd-route-audit-grid,
  .hd-structure-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

/* end v1081 pass13 */

/* Final polish: admin tool cards should not override explicit primary/secondary button variants. */
.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary,
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary,
.hd-tool-hub :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary,
.hd-card .hd-btn--secondary,
.hd-page-editor-command-panel .hd-btn--secondary,
.hd-page-editor-more-actions > summary.hd-btn--secondary {
  background: var(--btn-secondary-bg, color-mix(in srgb, var(--colour-surface, #fffdf8) 92%, var(--colour-surface-soft, #edf2e3) 8%)) !important;
  color: var(--btn-secondary-text, var(--colour-heading, #083646)) !important;
  -webkit-text-fill-color: var(--btn-secondary-text, var(--colour-heading, #083646)) !important;
  border-color: var(--btn-secondary-border, color-mix(in srgb, var(--colour-primary, #245f3b) 28%, var(--colour-border-soft, #d8cdb9) 72%)) !important;
}

.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary:hover,
.hd-admin-tool-page :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary:focus-visible,
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary:hover,
.hd-tool-suite :is(.hd-tool-card,.hd-tool__linkcard,.hd-hub-card,.hd-admin-tool-card,.hd-card--tool) .hd-btn--secondary:focus-visible,
.hd-card .hd-btn--secondary:hover,
.hd-card .hd-btn--secondary:focus-visible,
.hd-page-editor-command-panel .hd-btn--secondary:hover,
.hd-page-editor-command-panel .hd-btn--secondary:focus-visible {
  background: var(--btn-secondary-hover-bg, color-mix(in srgb, var(--colour-surface-soft, #edf2e3) 72%, var(--colour-surface, #fffdf8) 28%)) !important;
  color: var(--btn-secondary-hover-text, var(--colour-heading, #083646)) !important;
  -webkit-text-fill-color: var(--btn-secondary-hover-text, var(--colour-heading, #083646)) !important;
}

/* === Admin CSS tools [admin_css_tools] === */
/* HD RMS v990 owner contract: admin_css_tools
Owns CSS Control Centre, CSS tools cockpit navigation, CSS runtime/integrity panels,
Accessible Colour Palette workspace and CSS-tool review/status cards.
Does not own:
- generic buttons/action rows: buttons_actions
- generic form controls/field grids: forms_fields
- generic admin cards/tool shells: admin_tool_interfaces
- CSS section code editor textarea/editor chrome: css_section_editor
- public content cards: page_content_blocks
*/
:root {
  --hd-css-tools-width: min(100%, var(--shell-max-width, 1120px));
  --hd-css-tools-gap: clamp(1rem, 2vw, 1.35rem);
  --hd-css-tools-card-pad: clamp(1rem, 2.2vw, 1.45rem);
  --hd-css-tools-radius: 18px;
  --hd-css-tools-radius-lg: 22px;
  --hd-css-tools-border: var(--colour-border-soft, #d8c9a8);
  --hd-css-tools-surface: var(--colour-surface, #fffdf8);
  --hd-css-tools-surface-soft: var(--colour-surface-soft, #f7f0df);
  --hd-css-tools-text: var(--colour-text, #102630);
  --hd-css-tools-heading: var(--colour-heading, #073b5f);
  --hd-css-tools-muted: var(--colour-muted, #526474);
  --hd-css-tools-primary: var(--colour-primary, #06456b);
  --hd-css-tools-accent: var(--colour-accent, #c48d2f);
  --hd-css-tools-success: var(--colour-success, #147d53);
  --hd-css-tools-danger: var(--colour-danger, #a52828);
  --hd-css-tools-shadow: 0 12px 28px color-mix(in srgb, var(--colour-shadow, #102630) 9%, transparent);
}

/* Shared CSS-tool page frame */
.hd-css-tool-page,
.hd-tool-page--css-tools,
.hd-tool-page--css-integrity,
.hd-tool-page--css-palette,
#css-palette-tool.hd-tool-page--css-palette,
#css-integrity.hd-css-integrity-panel {
  display: grid;
  gap: var(--hd-css-tools-gap);
  width: var(--hd-css-tools-width);
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
  color: var(--hd-css-tools-text);
}

.hd-css-tool-page *,
.hd-tool-page--css-tools *,
.hd-tool-page--css-integrity *,
.hd-tool-page--css-palette *,
#css-palette-tool *,
#css-integrity * {
  box-sizing: border-box;
  min-width: 0;
}

.hd-css-tool-page :where(h1, h2, h3),
.hd-tool-page--css-tools :where(h1, h2, h3),
.hd-tool-page--css-integrity :where(h1, h2, h3),
.hd-tool-page--css-palette :where(h1, h2, h3),
#css-palette-tool :where(h1, h2, h3) {
  margin-top: 0;
  color: var(--hd-css-tools-heading);
  line-height: 1.18;
}

.hd-css-tool-page .hd-help,
.hd-tool-page--css-tools .hd-help,
.hd-tool-page--css-integrity .hd-help,
.hd-tool-page--css-palette .hd-help,
#css-palette-tool .hd-help {
  max-width: 78ch;
  color: var(--hd-css-tools-muted);
  line-height: 1.5;
}

/* Tool cards/panels within the CSS tools only */
.hd-css-tool-page :where(.hd-card, .hd-panel, .hd-css-control-group, .hd-css-system-panel, .hd-css-control-centre__panel, .hd-css-area-editor__panel),
.hd-tool-page--css-tools :where(.hd-card, .hd-panel, .hd-css-control-group, .hd-css-system-panel),
.hd-tool-page--css-integrity :where(.hd-card, .hd-panel),
.hd-tool-page--css-palette :where(.hd-card, .hd-panel),
#css-palette-tool :where(.hd-card, .hd-panel),
#css-integrity.hd-css-integrity-panel {
  border: 1px solid var(--hd-css-tools-border);
  border-radius: var(--hd-css-tools-radius);
  background: var(--hd-css-tools-surface);
  box-shadow: var(--hd-css-tools-shadow);
}

.hd-css-tool-page :where(.hd-card, .hd-panel),
.hd-tool-page--css-tools :where(.hd-card, .hd-panel),
.hd-tool-page--css-integrity :where(.hd-card, .hd-panel),
.hd-tool-page--css-palette :where(.hd-card, .hd-panel),
#css-palette-tool :where(.hd-card, .hd-panel) {
  padding: var(--hd-css-tools-card-pad);
}

/* CSS tools cockpit navigation */
.hd-css-tool-nav,
.hd-css-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .75rem;
  align-items: stretch;
}

.hd-css-tool-nav a,
.hd-css-section-grid .hd-tool__linkcard,
.hd-css-section-link,
.hd-css-control-card,
.hd-css-tool-summary-card {
  display: grid;
  gap: .28rem;
  min-height: 0;
  padding: 1rem;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: var(--hd-css-tools-radius);
  background: linear-gradient(135deg, var(--hd-css-tools-surface), color-mix(in srgb, var(--hd-css-tools-surface-soft) 58%, var(--hd-css-tools-surface)));
  color: var(--hd-css-tools-heading);
  text-decoration: none;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.hd-css-tool-nav a {
  min-height: 4.6rem;
}

.hd-css-tool-nav a strong,
.hd-css-section-grid .hd-tool__linkcard strong,
.hd-css-control-card__label,
.hd-css-tool-summary-card strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1.18;
}

.hd-css-tool-nav a span,
.hd-css-section-grid .hd-tool__linkcard span,
.hd-css-control-card__meta,
.hd-css-control-card__note,
.hd-css-tool-summary-card span {
  color: var(--hd-css-tools-muted);
  font-size: .9rem;
  line-height: 1.35;
}

.hd-css-tool-nav a:hover,
.hd-css-tool-nav a:focus-visible,
.hd-css-section-grid .hd-tool__linkcard:hover,
.hd-css-section-grid .hd-tool__linkcard:focus-visible,
.hd-css-section-link:hover,
.hd-css-section-link:focus-visible,
.hd-css-control-card:hover,
.hd-css-control-card:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--hd-css-tools-primary) 38%, var(--hd-css-tools-border));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--colour-shadow, #102630) 11%, transparent);
  outline: 0;
}

.hd-css-tool-nav a.is-current,
.hd-css-section-link.is-current {
  border-color: color-mix(in srgb, var(--hd-css-tools-primary) 58%, var(--hd-css-tools-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-css-tools-primary) 10%, var(--hd-css-tools-surface)), var(--hd-css-tools-surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hd-css-tools-primary) 15%, transparent), 0 14px 30px color-mix(in srgb, var(--colour-shadow, #102630) 9%, transparent);
}

/* Hero/status/summary panels */
.hd-css-tool-hero,
.hd-css-tools-hero,
.hd-palette-hero,
#css-integrity.hd-css-integrity-panel {
  position: relative;
  overflow: visible;
  border-left: 7px solid var(--hd-css-tools-primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-css-tools-primary) 7%, var(--hd-css-tools-surface)), var(--hd-css-tools-surface) 62%);
}

.hd-css-tool-hero > *,
.hd-css-tools-hero > *,
.hd-palette-hero > *,
#css-integrity.hd-css-integrity-panel > * {
  position: relative;
  z-index: 1;
}

.hd-css-control-health,
.hd-css-tool-summary-grid,
.hd-css-section-review-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  align-items: stretch;
}

.hd-css-control-health .hd-badge,
.hd-css-runtime-badge,
.hd-css-runtime-health-card {
  min-height: 3.4rem;
  display: grid;
  align-content: center;
  gap: .15rem;
  padding: .75rem .9rem;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: 16px;
  background: var(--hd-css-tools-surface-soft);
}

/* Control Centre grids */
.hd-css-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: .85rem;
}

.hd-css-control-group {
  padding: clamp(.85rem, 1.7vw, 1.1rem);
  background: color-mix(in srgb, var(--hd-css-tools-surface) 88%, var(--hd-css-tools-surface-soft));
}

.hd-css-control-value,
.hd-css-area-editor__form textarea,
.hd-css-area-editor__form .hd-input {
  border-radius: 12px;
  border-color: var(--hd-css-tools-border);
}

/* Integrity/review tables */
#css-integrity .hd-table-wrap,
.hd-css-system-panel .hd-table-wrap,
.hd-tool-page--css-tools .hd-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: 16px;
  background: var(--hd-css-tools-surface);
}

.hd-css-tools-review th,
.hd-css-review-table th {
  background: var(--hd-css-tools-surface-soft);
  color: var(--hd-css-tools-heading);
}

.hd-css-contract-note,
.hd-theme-role-note {
  border: 1px solid var(--hd-css-tools-border);
  border-radius: 16px;
  padding: 14px;
  background: var(--colour-panel-tint, var(--hd-css-tools-surface-soft));
  color: var(--hd-css-tools-text);
}

/* Palette tool layout */
#css-palette-tool {
  --palette-gap: var(--hd-css-tools-gap);
  --palette-card-pad: var(--hd-css-tools-card-pad);
}

#css-palette-tool .hd-palette-hero,
#css-palette-tool .hd-css-tools-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

#css-palette-tool .hd-palette-workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: var(--hd-css-tools-radius-lg);
  background: var(--hd-css-tools-surface-soft);
  padding: var(--hd-css-tools-card-pad);
}

#css-palette-tool .hd-palette-workflow-strip article {
  border: 1px solid var(--hd-css-tools-border);
  border-radius: 16px;
  background: var(--colour-surface-strong, #fff);
  padding: 14px;
}

#css-palette-tool .hd-palette-workflow-strip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--hd-css-tools-heading);
}

#css-palette-tool .hd-palette-workflow-strip span {
  display: block;
  color: var(--hd-css-tools-muted);
}

#css-palette-tool .hd-palette-hero-check {
  justify-self: end;
  display: grid;
  gap: .25rem;
  min-width: 13rem;
  border: 1px solid color-mix(in srgb, var(--hd-css-tools-success) 42%, var(--hd-css-tools-border));
  border-radius: 18px;
  padding: 1rem;
  background: color-mix(in srgb, var(--hd-css-tools-success) 10%, var(--hd-css-tools-surface));
  color: var(--hd-css-tools-heading);
  text-align: center;
}

#css-palette-tool .hd-palette-hero-check strong {
  color: inherit;
  font-size: 1.06rem;
}

#css-palette-tool .hd-palette-hero-check span {
  color: var(--hd-css-tools-muted);
  font-weight: 750;
}

#css-palette-tool .hd-palette-support-nav {
  padding: .85rem;
  background: var(--hd-css-tools-surface-soft);
  box-shadow: none;
}

#css-palette-tool .hd-palette-support-nav[open] {
  padding: var(--palette-card-pad);
}

#css-palette-tool .hd-palette-support-nav .hd-css-tool-nav {
  margin-top: .75rem;
}

#css-palette-tool .hd-palette-section-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 1rem;
  align-items: start;
}

#css-palette-tool .hd-palette-section-pill,
#css-palette-tool .hd-palette-aa-badge,
#css-palette-tool .hd-palette-preview-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: .32rem .7rem;
  border: 1px solid var(--hd-css-tools-border);
  background: var(--hd-css-tools-surface-soft);
  color: var(--hd-css-tools-heading);
  font-weight: 850;
  font-size: .86rem;
}

#css-palette-tool .hd-palette-start-gallery {
  overflow: hidden;
}

#css-palette-tool .hd-palette-preset-grid {
  align-items: stretch;
}

#css-palette-tool .hd-palette-aa-badge {
  align-self: end;
  background: color-mix(in srgb, var(--hd-css-tools-success) 13%, var(--hd-css-tools-surface));
  border-color: color-mix(in srgb, var(--hd-css-tools-success) 44%, var(--hd-css-tools-border));
  color: var(--colour-success-text, #0b5a30);
}

#css-palette-tool .hd-palette-preset.is-aa-fail .hd-palette-aa-badge {
  background: color-mix(in srgb, var(--hd-css-tools-danger) 10%, var(--hd-css-tools-surface));
  border-color: var(--hd-css-tools-danger);
  color: var(--colour-danger-text, #7d1f1f);
}

/* Palette accordions */
#css-palette-tool .hd-palette-accordion,
#css-palette-tool .hd-palette-guidance,
#css-palette-tool .hd-palette-image-generator,
#css-palette-tool .hd-palette-source-card,
#css-palette-tool .hd-palette-preview-card,
#css-palette-tool .hd-palette-actions-card,
#css-palette-tool .hd-palette-results,
#css-palette-tool .hd-palette-save,
#css-palette-tool .hd-palette-saved,
#css-palette-tool .hd-palette-templates,
#css-palette-tool .hd-palette-restore,
#css-palette-tool .hd-palette-command-centre {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: var(--hd-css-tools-radius-lg);
  background: var(--hd-css-tools-surface);
  padding: var(--palette-card-pad);
  box-shadow: var(--hd-css-tools-shadow);
}

#css-palette-tool .hd-palette-command-centre {
  border-left: 8px solid var(--hd-css-tools-success);
}

#css-palette-tool .hd-palette-source-card:not([open]),
#css-palette-tool .hd-palette-image-generator:not([open]),
#css-palette-tool .hd-palette-accordion:not(.hd-palette-start-gallery):not([open]),
#css-palette-tool .hd-palette-templates:not([open]),
#css-palette-tool .hd-palette-guidance:not([open]) {
  background: var(--hd-css-tools-surface-soft);
  box-shadow: none;
}

#css-palette-tool .hd-palette-section-summary,
#css-palette-tool details > summary.hd-palette-section-summary,
#css-palette-tool .hd-palette-manage-details > summary,
#css-palette-tool .hd-palette-guidance summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: var(--colour-panel-tint, var(--hd-css-tools-surface-soft));
  border: 1px solid color-mix(in srgb, var(--hd-css-tools-border) 86%, transparent);
  color: var(--hd-css-tools-heading);
  text-align: left;
}

#css-palette-tool .hd-palette-section-summary::-webkit-details-marker,
#css-palette-tool .hd-palette-manage-details > summary::-webkit-details-marker,
#css-palette-tool .hd-palette-guidance summary::-webkit-details-marker {
  display: none;
}

#css-palette-tool .hd-palette-section-summary::before,
#css-palette-tool .hd-palette-manage-details > summary::before,
#css-palette-tool .hd-palette-guidance summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--hd-css-tools-primary);
  color: var(--colour-on-primary, #fff);
  font-weight: 900;
}

#css-palette-tool details[open] > .hd-palette-section-summary::before,
#css-palette-tool .hd-palette-manage-details[open] > summary::before,
#css-palette-tool .hd-palette-guidance[open] > summary::before {
  content: "−";
}

#css-palette-tool .hd-palette-section-summary span,
#css-palette-tool .hd-palette-manage-details > summary span {
  display: grid;
  gap: .22rem;
}

#css-palette-tool .hd-palette-section-summary small,
#css-palette-tool .hd-palette-guidance summary small {
  color: var(--hd-css-tools-muted);
  font-weight: 650;
}

/* Palette preset/template cards */
#css-palette-tool .hd-palette-source-swatches,
#css-palette-tool .hd-palette-preset-grid,
#css-palette-tool .hd-palette-saved-grid,
#css-palette-tool .hd-palette-template-grid,
#css-palette-tool .hd-palette-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
  align-items: stretch;
}

#css-palette-tool .hd-palette-source-swatch,
#css-palette-tool .hd-palette-preset,
#css-palette-tool .hd-palette-saved-card,
#css-palette-tool .hd-palette-template-card {
  display: grid;
  align-content: start;
  gap: .65rem;
  min-height: 12rem;
  min-width: 0;
  border: 2px solid color-mix(in srgb, var(--palette-card-border, var(--hd-css-tools-primary)) 45%, var(--hd-css-tools-border));
  border-radius: var(--hd-css-tools-radius);
  padding: 1rem;
  background: var(--palette-card-bg, var(--hd-css-tools-surface));
  color: var(--palette-card-fg, var(--hd-css-tools-heading));
  text-align: left;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--colour-shadow, #102630) 10%, transparent);
}

#css-palette-tool .hd-palette-preset,
#css-palette-tool .hd-palette-template-card {
  cursor: pointer;
}

#css-palette-tool .hd-palette-preset:hover,
#css-palette-tool .hd-palette-preset:focus-visible,
#css-palette-tool .hd-palette-template-card:hover,
#css-palette-tool .hd-palette-template-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px color-mix(in srgb, var(--colour-shadow, #102630) 18%, transparent);
  outline: 0;
}

#css-palette-tool .hd-palette-preset strong,
#css-palette-tool .hd-palette-template-card strong {
  color: inherit;
  font-size: 1.05rem;
}

#css-palette-tool .hd-palette-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  align-items: center;
}

#css-palette-tool .hd-palette-swatch-chip,
#css-palette-tool .hd-palette-source-swatch i {
  display: block;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

#css-palette-tool .hd-palette-swatch-chip {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--swatch-colour, #ccc);
}

#css-palette-tool .hd-palette-source-swatch i {
  width: 100%;
  height: 2rem;
  border-radius: 12px;
  background: var(--source-colour, #ccc);
}

/* Palette score and contrast checks */
#css-palette-tool .hd-palette-command-centre__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 300px);
  gap: 1rem;
  align-items: stretch;
}

#css-palette-tool .hd-palette-score,
#css-palette-tool .hd-palette-score-card,
#css-palette-tool [data-hd-palette-score] {
  min-height: 9rem;
  display: grid;
  place-items: center;
  gap: .35rem;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid color-mix(in srgb, var(--hd-css-tools-success) 36%, var(--hd-css-tools-border));
  border-radius: 24px;
  background: var(--hd-css-tools-surface);
  text-align: center;
}

#css-palette-tool .hd-palette-score strong {
  color: var(--hd-css-tools-heading);
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: .95;
}

#css-palette-tool .hd-palette-score span {
  color: var(--hd-css-tools-muted);
  font-weight: 800;
}

#css-palette-tool .hd-palette-score.is-fail,
#css-palette-tool .hd-palette-score-card.is-fail {
  border-color: var(--hd-css-tools-danger);
  background: color-mix(in srgb, var(--hd-css-tools-danger) 8%, var(--hd-css-tools-surface));
}

#css-palette-tool .hd-palette-combo-grid,
#css-palette-tool .hd-palette-theme-grid,
#css-palette-tool .hd-palette-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
}

#css-palette-tool .hd-palette-combo,
#css-palette-tool .hd-palette-field,
#css-palette-tool .hd-palette-theme-grid label {
  display: grid;
  align-content: start;
  gap: .42rem;
  min-height: 0;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: 16px;
  padding: 1rem;
  background: var(--palette-check-bg, var(--combo-bg, var(--hd-css-tools-surface)));
  color: var(--palette-check-fg, var(--combo-fg, var(--hd-css-tools-text)));
  -webkit-text-fill-color: currentColor;
}

#css-palette-tool .hd-palette-combo {
  min-height: 8.75rem;
  align-content: space-between;
  border-color: color-mix(in srgb, currentColor 28%, var(--hd-css-tools-border));
}

#css-palette-tool .hd-palette-combo strong,
#css-palette-tool .hd-palette-combo span,
#css-palette-tool .hd-palette-combo small,
#css-palette-tool .hd-palette-field span {
  color: inherit;
  -webkit-text-fill-color: inherit;
}

#css-palette-tool .hd-palette-combo span {
  font-weight: 800;
}

#css-palette-tool .hd-palette-combo.is-pass {
  border-color: color-mix(in srgb, var(--hd-css-tools-success) 42%, var(--hd-css-tools-border));
}

#css-palette-tool .hd-palette-combo.is-fail {
  border-color: var(--hd-css-tools-danger);
  outline: 3px solid var(--hd-css-tools-danger);
  outline-offset: 2px;
}

/* Palette preview and builder */
#css-palette-tool .hd-palette-preview-stage {
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--hd-css-tools-border);
  border-radius: var(--hd-css-tools-radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-css-tools-surface-soft) 76%, var(--hd-css-tools-surface)), var(--hd-css-tools-surface));
}

#css-palette-tool .hd-palette-preview-page {
  display: grid;
  gap: .75rem;
  max-width: 780px;
  margin-inline: auto;
  border-radius: var(--hd-css-tools-radius);
  background: var(--colour-surface, #fffdf8);
  color: var(--colour-text, #102630);
  padding: 1rem;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--colour-shadow, #102630) 13%, transparent);
}

#css-palette-tool .hd-palette-preview-header {
  display: grid;
  gap: .15rem;
  text-align: center;
  border-radius: 16px;
  padding: 1rem;
  background: var(--colour-surface-banner, #d7ddd6);
  color: var(--colour-heading, #173642);
}

#css-palette-tool .hd-palette-preview-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
}

#css-palette-tool .hd-palette-preview-nav span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  border-radius: 10px;
  background: var(--colour-primary, #2f4758);
  color: var(--colour-on-primary, #fff);
  font-weight: 900;
}

#css-palette-tool .hd-palette-preview-nav .is-active {
  background: var(--colour-strong-surface, #16382f);
}

#css-palette-tool .hd-palette-preview-card-sample {
  border: 1px solid var(--colour-border-soft, #e4e8df);
  border-radius: 16px;
  background: var(--colour-surface-strong, #fff);
  padding: 1rem;
}

#css-palette-tool .hd-palette-preview-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}

#css-palette-tool .hd-palette-preview-role {
  display: grid;
  gap: .18rem;
  min-height: 4.7rem;
  border-radius: 14px;
  padding: .75rem;
  border: 1px solid var(--colour-border-soft, #e4e8df);
  background: var(--colour-panel-tint, #f3f1e8);
  color: var(--colour-text, #102630);
}

#css-palette-tool .hd-palette-preview-role strong,
#css-palette-tool .hd-palette-preview-role small {
  color: inherit;
}

#css-palette-tool .hd-palette-preview-role--quickjump {
  background: var(--colour-quickjump-card-bg, var(--colour-panel-tint, #f3f1e8));
  color: var(--colour-quickjump-text, var(--colour-text, #102630));
}

#css-palette-tool .hd-palette-preview-role--hub {
  background: var(--colour-hub-card-bg, var(--colour-surface, #fff));
  color: var(--colour-hub-card-text, var(--colour-text, #102630));
}

#css-palette-tool .hd-palette-preview-role--timeline {
  background: var(--colour-timeline-phase-2, var(--colour-primary, #2f4758));
  color: var(--colour-timeline-phase-2-text, var(--colour-on-primary, #fff));
}

#css-palette-tool .hd-palette-preview-role--admin {
  background: var(--colour-toolbar-action-bg, var(--colour-action-bg, #2f4758));
  color: var(--colour-toolbar-action-text, var(--colour-action-text, #fff));
}

#css-palette-tool .hd-palette-theme-builder,
#css-palette-tool .hd-palette-aa-generated-group {
  display: grid;
  gap: .75rem;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: var(--hd-css-tools-radius);
  padding: 1rem;
  background: var(--hd-css-tools-surface-soft);
}

#css-palette-tool .hd-palette-theme-builder {
  border-left: 6px solid var(--hd-css-tools-accent);
}

#css-palette-tool .hd-palette-aa-generated-group {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--hd-css-tools-border) 70%, var(--hd-css-tools-primary) 30%);
}

#css-palette-tool .hd-palette-aa-generated-group .hd-palette-section-summary strong::after {
  content: "AA generated";
  display: inline-flex;
  margin-left: .5rem;
  padding: .14rem .48rem;
  border-radius: 999px;
  font-size: .72rem;
  background: color-mix(in srgb, var(--hd-css-tools-success) 14%, var(--hd-css-tools-surface));
  color: var(--colour-success-text, #0b5a30);
}

#css-palette-tool .hd-palette-input-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: .45rem;
  align-items: center;
}

#css-palette-tool input[type="color"] {
  width: 3rem;
  min-width: 3rem;
  height: 2.45rem;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--colour-border, #d8c9a8);
  background: var(--colour-surface, #fff);
}

#css-palette-tool input[type="text"],
#css-palette-tool input[type="range"],
#css-palette-tool select {
  min-width: 0;
  width: 100%;
}

#css-palette-tool .hd-palette-restore-table {
  min-width: 760px;
}

#css-palette-tool .hd-palette-flexibility-note,
#css-palette-tool .hd-theme-pairing-note,
#css-palette-tool .hd-output-coverage-note,
#css-palette-tool .hd-palette-image-seed-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed var(--hd-css-tools-border);
  background: var(--hd-css-tools-surface-soft);
}

#css-palette-tool .hd-palette-flexibility-note {
  border-left: 5px solid var(--hd-css-tools-accent);
}

#css-palette-tool .hd-theme-pairing-note {
  border-left: 5px solid var(--colour-accent-strong, #6b4700);
}

#css-palette-tool .hd-output-coverage-note {
  border-left: 5px solid var(--hd-css-tools-success);
}

/* Mobile and narrow viewport behaviour owned by this component section */
@media (max-width: 900px) {
  .hd-css-tool-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #css-palette-tool .hd-palette-command-centre__main,
  #css-palette-tool .hd-palette-hero,
  #css-palette-tool .hd-css-tools-hero,
  #css-palette-tool .hd-palette-section-head,
  #css-palette-tool .hd-palette-preview-role-grid {
    grid-template-columns: 1fr;
  }

  #css-palette-tool .hd-palette-hero-check {
    justify-self: stretch;
  }

  #css-palette-tool .hd-palette-workflow-strip {
    grid-template-columns: 1fr;
  }

  #css-palette-tool .hd-palette-preview-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hd-css-tool-page,
  .hd-tool-page--css-tools,
  .hd-tool-page--css-integrity,
  .hd-tool-page--css-palette,
  #css-palette-tool {
    width: 100%;
  }

  .hd-css-tool-nav,
  .hd-css-section-grid,
  #css-palette-tool .hd-palette-preset-grid,
  #css-palette-tool .hd-palette-template-grid,
  #css-palette-tool .hd-palette-combo-grid,
  #css-palette-tool .hd-palette-theme-grid,
  #css-palette-tool .hd-palette-fields {
    grid-template-columns: 1fr;
  }

  .hd-css-tool-nav a {
    min-height: 0;
  }

  #css-palette-tool .hd-palette-section-summary,
  #css-palette-tool details > summary.hd-palette-section-summary,
  #css-palette-tool .hd-palette-manage-details > summary,
  #css-palette-tool .hd-palette-guidance summary {
    padding: .85rem .95rem;
  }
}

/* =========================================================
HD RMS v1004 CSS tools display update
Owner: admin_css_tools
========================================================= */
.hd-tool-page--css-tools .hd-tool__linkcard,
.hd-css-tool-page .hd-tool__linkcard,
.hd-css-tool-page .hd-card,
.hd-css-tool-page .hd-panel {
  min-width: 0 !important;
}

.hd-tool-page--css-tools .hd-btn,
.hd-css-tool-page .hd-btn,
#css-palette-tool .hd-btn,
#css-integrity .hd-btn {
  background: var(--colour-action-bg, var(--colour-primary, #4d6533)) !important;
  color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
  -webkit-text-fill-color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
}

.hd-css-tool-page .hd-help,
.hd-tool-page--css-tools .hd-help,
.hd-tool-page--css-integrity .hd-help,
.hd-tool-page--css-palette .hd-help {
  max-width: 82ch !important;
}

/* HD RMS v1005 CSS tools model wording/layout support.
Owner: admin_css_tools. Supports current owner-section model including specialist Blog/Updates/Email sections. */
.hd-css-tool-page .hd-css-section-number,
.hd-tool-page--css-tools .hd-css-section-number,
#css-palette-tool .hd-css-section-number {
  display: inline-grid;
  place-items: center;
  min-width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--colour-primary, #4d6533);
  color: var(--colour-on-primary, #fff);
  font-weight: 900;
  font-size: .92rem;
}

.hd-css-tool-page :is(.hd-owner-model-note,.hd-current-css-model-note),
.hd-tool-page--css-tools :is(.hd-owner-model-note,.hd-current-css-model-note),
#css-palette-tool :is(.hd-owner-model-note,.hd-current-css-model-note) {
  border: 1px solid var(--colour-border-soft, #d8c9a8);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--colour-surface-soft, #e9eedd);
  color: var(--colour-text, #102630);
}

/* =========================================================
HD RMS v1018 CSS Integrity page readability refinement
Owner: admin_css_tools
Purpose: Improve the CSS integrity owner-map tables and remove cramped column behaviour.
========================================================= */
.hd-tool-page--css-integrity,
#css-integrity.hd-css-integrity-panel {
  max-width: min(1280px, calc(100vw - 48px));
}

.hd-css-system-panel {
  max-width: min(1280px, calc(100vw - 48px));
  margin-inline: auto;
}

.hd-css-system-panel > h2 {
  margin-bottom: .35rem;
}

.hd-css-system-panel > p {
  max-width: 90ch;
}

.hd-css-system-panel .hd-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--colour-border-soft, #d8d0e6);
  background: var(--colour-surface-strong, #fff);
  box-shadow: 0 18px 42px rgba(17, 24, 39, .06);
}

.hd-css-system-panel .hd-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.hd-css-system-panel .hd-table th,
.hd-css-system-panel .hd-table td {
  padding: 1rem 1.1rem;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.45;
}

.hd-css-system-panel .hd-table th {
  white-space: normal;
  background: color-mix(in srgb, var(--colour-surface-soft, #eee9f5) 88%, #fff 12%);
  color: var(--colour-heading, #252a55);
  font-weight: 800;
}

.hd-css-owner-slate-table th:first-child,
.hd-css-owner-slate-table td:first-child,
.hd-css-owner-summary-table th:nth-child(3),
.hd-css-owner-summary-table td:nth-child(3) {
  width: 5.5rem;
  text-align: left;
  white-space: nowrap;
}

.hd-css-owner-slate-table th:nth-child(2),
.hd-css-owner-slate-table td:nth-child(2) {
  min-width: 320px;
}

.hd-css-owner-slate-table th:nth-child(3),
.hd-css-owner-slate-table td:nth-child(3),
.hd-css-owner-slate-table th:nth-child(4),
.hd-css-owner-slate-table td:nth-child(4) {
  min-width: 160px;
}

.hd-css-owner-slate-table th:last-child,
.hd-css-owner-slate-table td:last-child {
  width: 7rem;
  text-align: right;
  white-space: nowrap;
}

.hd-css-owner-summary-table th:first-child,
.hd-css-owner-summary-table td:first-child,
.hd-css-owner-summary-table th:nth-child(2),
.hd-css-owner-summary-table td:nth-child(2) {
  min-width: 170px;
}

.hd-css-owner-summary-table td:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .94rem;
  line-height: 1.65;
}

.hd-css-owner-pill,
.hd-css-scope-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .3rem .62rem;
  border-radius: 999px;
  border: 1px solid var(--colour-border-soft, #d8d0e6);
  background: var(--colour-surface-soft, #eee9f5);
  color: var(--colour-text, #102630);
  font-weight: 700;
  line-height: 1.2;
}

.hd-css-scope-pill {
  background: color-mix(in srgb, var(--colour-accent-soft, #e8efe1) 75%, #fff 25%);
}

.hd-css-owner-slate-table code,
.hd-css-owner-summary-table code,
.hd-css-system-panel code {
  font-size: .94em;
  white-space: normal;
}

@media (max-width: 760px) {
  .hd-tool-page--css-integrity,
  #css-integrity.hd-css-integrity-panel,
  .hd-css-system-panel {
    max-width: calc(100vw - 24px);
  }

  .hd-css-system-panel .hd-table {
    min-width: 760px;
  }
}

/* v1019 CSS Integrity clarification */
.hd-css-integrity-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(43,43,92,.12);
}

/* === v1020 CSS Integrity display refinement === */
.hd-css-integrity-panel .hd-owner-slate-table,.hd-css-integrity-panel .hd-owner-summary-table {
  table-layout:auto;
}

.hd-css-integrity-panel th,.hd-css-integrity-panel td {
  word-break:normal;
  overflow-wrap:break-word;
}

.hd-css-integrity-panel th:first-child,.hd-css-integrity-panel td:first-child {
  width:5rem;
}

.hd-css-integrity-panel .hd-owner-pill {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.22rem .65rem;
  background:#edeaf6;
  color:#25265a;
  font-weight:800;
  white-space:nowrap;
}

.hd-css-integrity-panel .hd-scope-pill {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.22rem .65rem;
  background:#e7f2ef;
  color:#164d44;
  font-weight:800;
  white-space:nowrap;
}

.hd-css-integrity-panel .hd-owner-summary-table td:last-child {
  min-width:34rem;
}

@media (max-width:900px) {
  .hd-css-integrity-panel .hd-owner-summary-table td:last-child {
    min-width:0
  }

  .hd-css-integrity-panel table {
    font-size:.92rem
  }
}

/* === end v1020 CSS Integrity display refinement === */

/* v1045 palette core-strengthening: built-in confirm modal and readable preview labels. */
#css-palette-tool .hd-palette-modal[hidden] {
  display: none;
}

#css-palette-tool .hd-palette-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: color-mix(in srgb, #06141B 62%, transparent);
}

#css-palette-tool .hd-palette-modal__panel {
  width: min(34rem, 100%);
  display: grid;
  gap: .85rem;
  border-radius: 22px;
  border: 1px solid var(--colour-border-soft, #ddd5df);
  background: var(--colour-surface-strong, #ffffff);
  color: var(--colour-text, #102630);
  box-shadow: 0 24px 70px rgba(20, 16, 24, .26);
  padding: 1.25rem;
}

#css-palette-tool .hd-palette-modal__preview {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  padding: .7rem;
  border: 1px solid var(--colour-border-soft, #ddd5df);
  border-radius: 16px;
  background: var(--colour-surface-soft, #f3f1e8);
}

#css-palette-tool .hd-palette-modal__preview i {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--colour-border, #c8bdcc) 80%, #06141b 20%);
  background: var(--swatch-colour, #ddd);
}

#css-palette-tool .hd-palette-preview-role small {
  font-weight: 700;
  opacity: 1;
}

#css-palette-tool .hd-palette-preview-role--timeline small,
#css-palette-tool .hd-palette-preview-role--admin small {
  color: inherit;
}

body.hd-palette-modal-open {
  overflow: hidden;
}

/* v1048 image palette set controls
Owner: admin_css_tools. Keeps the image-library palette generator controls grouped and readable. */
.hd-palette-image-generator .hd-palette-image-form {
  display:grid;
  gap: clamp(12px, 1.8vw, 18px);
}

.hd-palette-image-generator .hd-actions--toolbar {
  flex-wrap: wrap;
  align-items:center;
}

.hd-palette-modal__panel {
  max-width:min(520px, calc(100vw - 32px));
}

.hd-palette-modal__preview i {
  display:inline-block;
  width:24px;
  height:24px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.18);
  background:var(--swatch-colour);
}

/* v1049 palette management separation and bulk actions
Owner: admin_css_tools. Keeps built-in palettes protected and separates
created templates/saved palettes so bulk deletion is intentional and clear. */
#css-palette-tool .hd-palette-templates,
#css-palette-tool .hd-palette-saved {
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
}

#css-palette-tool .hd-palette-bulk-panel {
  display: grid;
  gap: .8rem;
  padding: clamp(.9rem, 1.8vw, 1.2rem);
  border: 1px solid color-mix(in srgb, var(--hd-css-tools-primary) 22%, var(--hd-css-tools-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--hd-css-tools-primary) 5%, var(--hd-css-tools-surface));
}

#css-palette-tool .hd-palette-bulk-panel__head {
  display: grid;
  gap: .2rem;
}

#css-palette-tool .hd-palette-bulk-panel__head strong {
  color: var(--hd-css-tools-heading);
  font-size: 1.04rem;
}

#css-palette-tool .hd-palette-bulk-panel__head span {
  color: var(--hd-css-tools-muted);
  font-weight: 650;
}

#css-palette-tool .hd-palette-bulk-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .45rem .8rem;
  max-height: 18rem;
  overflow: auto;
  padding: .55rem;
  border: 1px solid var(--hd-css-tools-border);
  border-radius: 14px;
  background: var(--hd-css-tools-surface);
}

#css-palette-tool .hd-palette-bulk-list label {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  min-width: 0;
  padding: .48rem .55rem;
  border-radius: 12px;
  color: var(--hd-css-tools-text);
  font-weight: 750;
}

#css-palette-tool .hd-palette-bulk-list label:hover,
#css-palette-tool .hd-palette-bulk-list label:focus-within {
  background: var(--hd-css-tools-surface-soft);
}

#css-palette-tool .hd-palette-bulk-list input[type="checkbox"] {
  margin-top: .18rem;
  inline-size: 1rem;
  block-size: 1rem;
  accent-color: var(--hd-css-tools-primary);
}

#css-palette-tool .hd-palette-bulk-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#css-palette-tool .hd-palette-start-gallery .hd-palette-section-pill::after {
  content: " · protected";
}

#css-palette-tool .hd-palette-template-card,
#css-palette-tool .hd-palette-saved-card {
  cursor: default;
}

/* v1050 palette tool finish: clearer intro, workflow, image feedback, action hierarchy and mobile polish. */
.hd-palette-hero {
  background:linear-gradient(135deg,var(--colour-surface,#fffdf8),var(--colour-surface-soft,#f4efe4));
}

.hd-palette-workflow-strip--five {
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:.75rem;
}

.hd-palette-workflow-strip--five article {
  min-height:8.5rem;
  border-left:.32rem solid var(--colour-accent-strong,#b9852f);
}

.hd-palette-step-card {
  border-color:var(--colour-accent,#c99a47);
  box-shadow:0 18px 50px rgba(10,24,32,.10);
}

.hd-palette-image-feedback {
  display:grid;
  grid-template-columns:minmax(10rem,16rem) 1fr;
  gap:1rem;
  align-items:stretch;
  margin:.85rem 0;
  padding:1rem;
  border-radius:1rem;
  background:var(--colour-surface-soft,#f4efe4);
  border:1px solid var(--colour-border-soft,#ded6c8);
}

.hd-palette-image-feedback__preview {
  position:relative;
  min-height:9rem;
  border-radius:.9rem;
  overflow:hidden;
  background:var(--colour-field-bg,#fff);
  border:1px solid var(--colour-border,#cbbfae);
}

.hd-palette-image-feedback__preview img {
  width:100%;
  height:100%;
  min-height:9rem;
  object-fit:cover;
  display:block;
}

.hd-palette-sample-dot {
  position:absolute;
  width:1.05rem;
  height:1.05rem;
  border-radius:999px;
  background:var(--colour-focus,#f6c85f);
  border:3px solid #fff;
  box-shadow:0 0 0 2px rgba(0,0,0,.35);
}

.hd-palette-sample-dot--one {
  left:22%;
  top:28%;
}

.hd-palette-sample-dot--two {
  left:58%;
  top:42%;
}

.hd-palette-sample-dot--three {
  right:18%;
  bottom:22%;
}

.hd-palette-image-feedback__copy {
  display:grid;
  align-content:start;
  gap:.45rem;
}

.hd-palette-image-feedback__copy strong {
  color:var(--colour-heading,#173642);
  font-size:1.05rem
}

.hd-palette-image-feedback__copy span {
  color:var(--colour-muted,var(--colour-text,#173642));
}

.hd-palette-image-feedback__swatches {
  display:flex;
  gap:.35rem;
  flex-wrap:wrap
}

.hd-palette-image-feedback__swatches i {
  width:1.7rem;
  height:1.7rem;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.22);
  background:var(--swatch-colour,#ccc);
}

.hd-palette-apply-final {
  font-size:1.05rem!important;
  padding:.9rem 1.3rem!important;
  box-shadow:0 14px 34px rgba(0,0,0,.20)!important;
}

.hd-palette-modal__panel {
  max-width:min(92vw,34rem);
}

.hd-palette-modal .hd-actions {
  align-items:center;
}

.hd-palette-modal #hd-palette-confirm-apply-direct {
  box-shadow:0 14px 32px rgba(0,0,0,.18);
}

.hd-palette-presets,.hd-palette-created,.hd-palette-saved {
  scroll-margin-top:6rem;
}

.hd-palette-preset-grid,.hd-palette-saved-grid {
  gap:1rem;
}

@media(max-width:980px) {
  .hd-palette-workflow-strip--five {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .hd-palette-image-feedback {
    grid-template-columns:1fr;
  }

  .hd-palette-image-feedback__preview img {
    max-height:14rem;
  }

  .hd-palette-modal .hd-actions {
    display:grid;
    grid-template-columns:1fr;
  }

  .hd-palette-modal .hd-btn {
    width:100%;
    justify-content:center;
  }
}

@media(max-width:620px) {
  .hd-palette-workflow-strip--five {
    grid-template-columns:1fr;
  }

  .hd-palette-workflow-strip--five article {
    min-height:auto
  }

  .hd-palette-section-head {
    grid-template-columns:1fr!important
  }

  .hd-palette-theme-grid,.hd-palette-fields,.hd-palette-preset-grid,.hd-palette-saved-grid {
    grid-template-columns:1fr!important
  }

  .hd-css-tool-page .hd-actions--toolbar {
    display:grid;
    grid-template-columns:1fr
  }

  .hd-css-tool-page .hd-btn {
    width:100%;
    justify-content:center
  }

  .hd-palette-score {
    justify-self:start;
  }
}

/* v1051 palette image sampling feedback and spacing polish. */
.hd-palette-image-feedback {
  grid-template-columns:minmax(12rem,18rem) 1fr!important;
  gap:.9rem!important;
  padding:.9rem!important;
  align-items:center!important;
}

.hd-palette-image-feedback__preview {
  display:grid!important;
  place-items:center!important;
  background:var(--colour-surface,#fffdf8)!important;
}

.hd-palette-image-feedback__preview img[hidden] {
  display:none!important;
}

.hd-palette-image-feedback__copy {
  gap:.35rem!important;
}

.hd-palette-image-feedback__swatches {
  margin-top:.25rem!important;
}

.hd-palette-image-feedback__swatches i {
  width:1.9rem!important;
  height:1.9rem!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--colour-surface,#fff) 82%,transparent)!important;
}

.hd-tool-page--css-palette .hd-card {
  scroll-margin-top:5rem;
}

.hd-tool-page--css-palette .hd-palette-step-card,
.hd-tool-page--css-palette .hd-palette-presets,
.hd-tool-page--css-palette .hd-palette-score-card {
  margin-top:clamp(12px,1.6vw,18px)!important;
}

@media(max-width:760px) {
  .hd-palette-image-feedback {
    grid-template-columns:1fr!important
  }

  .hd-palette-image-feedback__preview {
    min-height:10rem!important
  }
}

/* v1058 CSS ownership cleanup: image palette feedback remains in admin_css_tools.
Quick Jump ordering rules were removed from this section because they are owned by quick_jump_menu. */
.hd-palette-image-feedback__preview {
  position:relative;
  overflow:hidden;
  min-height:210px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--colour-surface,#fffdf8)
}

.hd-palette-image-feedback__preview img {
  max-width:100%;
  max-height:260px;
  object-fit:contain;
  display:block
}

.hd-palette-sample-dot {
  position:absolute;
  width:1.12rem;
  height:1.12rem;
  border-radius:999px;
  background:var(--dot-colour,#c48d2f);
  border:3px solid #fff;
  box-shadow:0 0 0 2px rgba(15,37,49,.38),0 6px 14px rgba(0,0,0,.18);
  transform:translate(-50%,-50%);
  pointer-events:none
}

.hd-palette-image-feedback__swatches i {
  background:var(--swatch-colour,#c48d2f)
}

/* v1056 palette workflow refinement: direct image samples, final theme palette and action hierarchy */
#css-palette-tool .hd-palette-image-feedback__swatch-block {
  display: grid;
  gap: .35rem;
  margin-top: .2rem;
}

#css-palette-tool .hd-palette-image-feedback__swatch-block > span {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hd-css-tools-heading);
}

#css-palette-tool .hd-palette-image-feedback__swatches--final i {
  border-width: 2px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hd-css-tools-primary) 11%, transparent);
}

#css-palette-tool .hd-palette-image-action-panel {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.45fr);
  gap: .85rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--hd-css-tools-primary) 18%, var(--hd-css-tools-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--hd-css-tools-primary) 6%, var(--hd-css-tools-surface));
}

#css-palette-tool .hd-palette-image-action-panel > div:first-child strong {
  color: var(--hd-css-tools-heading);
  font-size: 1.05rem;
}

#css-palette-tool .hd-palette-apply-final {
  box-shadow: 0 12px 24px color-mix(in srgb, var(--hd-css-tools-primary) 18%, transparent);
}

#css-palette-tool .hd-palette-hero,
#css-palette-tool .hd-css-tool-hero,
#css-integrity.hd-css-integrity-panel {
  overflow: visible;
}

#css-palette-tool .hd-palette-score,
#css-palette-tool .hd-palette-score-card,
#css-palette-tool [data-hd-palette-score] {
  background: var(--hd-css-tools-surface);
}

@media (max-width: 820px) {
  #css-palette-tool .hd-palette-image-action-panel {
    grid-template-columns: 1fr;
  }

  #css-palette-tool .hd-palette-image-action-panel .hd-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #css-palette-tool .hd-palette-image-action-panel .hd-btn {
    width: 100%;
    justify-content: center;
  }
}

/* === CSS Section Editor [css_section_editor] === */
/* HD RMS v985 owner contract: css_section_editor
Owns CSS Control Centre, Section Editor, Integrity Checker and CSS-tool-specific panels, switchers, code fields and audit layout.
This section does not own the Accessible Colour Palette workspace, generic admin cards, generic buttons, tables, alerts or public content styling.
*/

/* --------------------------------------------------------------------------
Tokens
-------------------------------------------------------------------------- */
:root {
  --css-editor-panel-bg: var(--colour-surface, #fffdf8);
  --css-editor-panel-soft: var(--colour-surface-soft, #f7f0df);
  --css-editor-panel-border: var(--colour-border-soft, #d8c9a8);
  --css-editor-heading: var(--colour-heading, #073b5f);
  --css-editor-text: var(--colour-text, #12212b);
  --css-editor-muted: var(--colour-muted, #526474);
  --css-editor-accent: var(--colour-accent, #bf902e);
  --css-editor-focus: color-mix(in srgb, var(--css-editor-accent) 24%, transparent);
  --css-editor-on-bg: color-mix(in srgb, var(--colour-success, #147d53) 12%, var(--css-editor-panel-bg));
  --css-editor-on-text: var(--colour-success-text, #0b5a30);
  --css-editor-off-bg: color-mix(in srgb, var(--colour-warning, #9a6400) 13%, var(--css-editor-panel-bg));
  --css-editor-off-text: var(--colour-warning-text, #68410f);
  --css-editor-danger-bg: color-mix(in srgb, var(--colour-danger, #a52828) 10%, var(--css-editor-panel-bg));
  --css-editor-danger-text: var(--colour-danger-text, #8a1111);
  --css-editor-radius: 18px;
  --css-editor-radius-sm: 14px;
  --css-editor-gap: clamp(.85rem, 1.6vw, 1.25rem);
  --css-code-font-size: .88rem;
}

/* --------------------------------------------------------------------------
Tool pages and panels
-------------------------------------------------------------------------- */
.hd-css-area-editor,
.hd-css-control-centre,
.hd-css-integrity-panel,
.hd-css-system-panel,
.hd-tool-page--css-tools,
.hd-tool-page--css-integrity {
  width: 100%;
  max-width: 100%;
}

.hd-css-area-editor__panel,
.hd-css-area-editor__restore,
.hd-css-control-centre__panel,
.hd-css-control-centre__restore,
.hd-css-control-panel,
.hd-css-integrity-panel,
.hd-css-system-panel,
.hd-css-tools-review {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: var(--css-editor-radius);
  background: var(--css-editor-panel-bg);
  color: var(--css-editor-text);
  box-shadow: 0 12px 28px rgba(5, 59, 93, .06);
  overflow: visible;
}

.hd-css-area-editor__panel,
.hd-css-area-editor__restore,
.hd-css-control-centre__panel,
.hd-css-control-centre__restore,
.hd-css-integrity-panel,
.hd-css-system-panel,
.hd-css-tools-review {
  padding: clamp(1rem, 1.8vw, 1.5rem);
}

.hd-css-area-editor__panel > :first-child,
.hd-css-area-editor__restore > :first-child,
.hd-css-control-centre__panel > :first-child,
.hd-css-control-centre__restore > :first-child,
.hd-css-integrity-panel > :first-child,
.hd-css-system-panel > :first-child,
.hd-css-tools-review > :first-child {
  margin-top: 0;
}

.hd-css-area-editor__panel > :last-child,
.hd-css-area-editor__restore > :last-child,
.hd-css-control-centre__panel > :last-child,
.hd-css-control-centre__restore > :last-child,
.hd-css-integrity-panel > :last-child,
.hd-css-system-panel > :last-child,
.hd-css-tools-review > :last-child {
  margin-bottom: 0;
}

.hd-css-tool-hero {
  display: grid;
  gap: .75rem;
  border: 1px solid color-mix(in srgb, var(--css-editor-heading) 14%, transparent);
  border-left: 7px solid var(--css-editor-accent);
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--css-editor-accent) 8%, var(--css-editor-panel-bg)), var(--css-editor-panel-bg) 68%);
  box-shadow: 0 16px 36px rgba(5, 59, 93, .08);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.hd-css-tool-hero h1,
.hd-css-system-panel h2,
.hd-css-tools-review h2,
.hd-css-control-group h3 {
  margin-top: 0;
  color: var(--css-editor-heading);
}

/* --------------------------------------------------------------------------
CSS tools navigation and link cards
-------------------------------------------------------------------------- */
.hd-tool-page--css-tools .hd-css-tool-nav,
.hd-css-tool-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.hd-tool-page--css-tools .hd-css-tool-nav a,
.hd-css-tool-nav a,
.hd-css-section-grid .hd-tool__linkcard,
.hd-css-section-group-card .hd-tool__linkcard {
  display: grid;
  gap: .25rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: 16px;
  background: var(--css-editor-panel-bg);
  color: var(--css-editor-heading);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(5, 59, 93, .05);
}

.hd-tool-page--css-tools .hd-css-tool-nav a:hover,
.hd-tool-page--css-tools .hd-css-tool-nav a:focus-visible,
.hd-css-tool-nav a:hover,
.hd-css-tool-nav a:focus-visible,
.hd-css-section-grid .hd-tool__linkcard:hover,
.hd-css-section-group-card .hd-tool__linkcard:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--css-editor-accent) 38%, var(--css-editor-panel-border));
  box-shadow: 0 12px 28px rgba(5, 59, 93, .08);
}

.hd-tool-page--css-tools .hd-css-tool-nav a.is-current,
.hd-css-tool-nav a.is-current {
  border-color: var(--css-editor-accent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--css-editor-accent) 15%, transparent), 0 12px 28px rgba(5, 59, 93, .07);
}

.hd-css-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .85rem;
}

.hd-css-section-grid .hd-tool__linkcard code,
.hd-css-section-group-card .hd-tool__linkcard code {
  font-size: .82rem;
  white-space: normal;
  word-break: break-word;
}

.hd-css-registry-meta {
  display: block;
  margin-top: .25rem;
  color: var(--css-editor-muted);
  font-size: .9rem;
}

/* --------------------------------------------------------------------------
Switchers, forms and runtime controls
-------------------------------------------------------------------------- */
.hd-inline-form {
  display: inline-flex;
  margin: 0;
}

.hd-css-area-editor__switcher,
.hd-css-control-centre__switcher {
  display: grid;
  grid-template-columns: minmax(260px, 620px) auto;
  gap: 12px;
  align-items: end;
  justify-content: start;
}

.hd-css-area-editor__switcher select,
.hd-css-control-centre__switcher select {
  width: 100%;
  max-width: 620px;
}

.hd-css-area-editor__runtime-controls,
.hd-css-area-editor__section-controls,
.hd-css-tool-hero .hd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}

.hd-css-area-editor__runtime-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--css-editor-panel-border);
}

.hd-css-control-centre__form {
  display: grid;
  gap: 22px;
}

.hd-css-control-centre__linked-restore {
  padding: 16px;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: 16px;
  background: var(--css-editor-panel-soft);
}

.hd-css-control-centre__linked-restore h3 {
  margin: 0 0 8px;
  color: var(--css-editor-heading);
}

.hd-css-control-centre__linked-restore form {
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
Runtime badges, health cards and review badges
-------------------------------------------------------------------------- */
.hd-css-review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 1.8rem;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.15;
}

.hd-css-runtime-badge.is-on,
.hd-css-review-badge--ok {
  background: var(--css-editor-on-bg);
  color: var(--css-editor-on-text);
  border-color: color-mix(in srgb, var(--colour-success, #147d53) 40%, var(--css-editor-panel-border));
}

.hd-css-runtime-badge.is-off,
.hd-css-review-badge--warn {
  background: var(--css-editor-off-bg);
  color: var(--css-editor-off-text);
  border-color: color-mix(in srgb, var(--colour-warning, #9a6400) 40%, var(--css-editor-panel-border));
}

.hd-css-review-badge--bad {
  background: var(--css-editor-danger-bg);
  color: var(--css-editor-danger-text);
  border-color: color-mix(in srgb, var(--colour-danger, #a52828) 40%, var(--css-editor-panel-border));
}

.hd-css-control-health,
.hd-css-tool-summary-grid,
.hd-css-section-review-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.hd-css-control-health span,
.hd-css-tool-summary-card {
  display: grid;
  align-content: center;
  gap: .2rem;
  min-width: 0;
  min-height: 3.4rem;
  padding: .75rem .9rem;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: 16px;
  background: var(--css-editor-panel-soft);
}

.hd-css-control-health strong,
.hd-css-tool-summary-card strong {
  color: var(--css-editor-heading);
  font-size: 1.2rem;
  line-height: 1.05;
}

.hd-css-control-health span,
.hd-css-tool-summary-card span {
  color: var(--css-editor-muted);
}

.hd-css-runtime-health-card {
  margin-top: 1rem;
}

.hd-css-runtime-health-card .hd-status-pill {
  align-items: center;
}

/* --------------------------------------------------------------------------
Control Centre cards and fields
-------------------------------------------------------------------------- */
.hd-css-control-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  scroll-margin-top: 1.5rem;
  padding: 16px;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: 16px;
  background: var(--css-editor-panel-bg);
}

.hd-css-control-card.is-dirty,
.hd-css-control-card:target {
  border-color: var(--css-editor-accent);
  box-shadow: 0 0 0 4px var(--css-editor-focus), 0 14px 30px rgba(5, 59, 93, .08);
}

.hd-css-control-card__label {
  display: block;
  min-height: 1.2em;
  color: var(--css-editor-heading);
  font-weight: 850;
  line-height: 1.2;
}

.hd-css-control-card__meta {
  display: block;
  color: var(--css-editor-muted);
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: .82rem;
  line-height: 1.25;
  word-break: break-word;
}

.hd-css-control-card__note {
  grid-column: 1 / -1;
  color: var(--css-editor-muted);
  font-size: .86rem;
}

.hd-css-control-card__note:empty {
  display: none;
}

.hd-css-colour-field {
  display: grid;
  grid-template-columns: 52px minmax(116px, 160px);
  gap: 10px;
  align-items: center;
  justify-content: start;
  width: 100%;
}

.hd-css-control-card input[type="color"],
.hd-css-colour-swatch {
  width: 52px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--colour-border, #d8c9a8);
  border-radius: 10px;
  background: var(--css-editor-panel-bg);
  cursor: pointer;
}

.hd-css-colour-hex,
.hd-css-control-value {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--colour-border, #d8c9a8);
  border-radius: 10px;
  background: var(--css-editor-panel-bg);
  color: var(--css-editor-text);
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.hd-css-colour-hex {
  max-width: 10rem;
  font-size: .92rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
}

.hd-css-control-range {
  width: 100%;
  min-height: 34px;
}

.hd-css-colour-hex:focus,
.hd-css-colour-swatch:focus-visible,
.hd-css-control-value:focus {
  outline: 3px solid var(--css-editor-focus);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
Section Editor code field
-------------------------------------------------------------------------- */
.hd-code-editor {
  min-height: 580px;
  width: 100%;
  max-width: 100%;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: var(--css-code-font-size);
  line-height: 1.45;
  white-space: pre;
  overflow: auto;
  resize: vertical;
}

.hd-css-area-editor__governance .hd-css-section-review-summary {
  margin: .9rem 0 1rem;
}

.hd-css-area-editor__governance .hd-status-pill {
  margin: .15rem;
}

.hd-css-section-group-card {
  border-style: solid;
}

.hd-css-section-group-card h3 {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
Control focus / variable summary
-------------------------------------------------------------------------- */
.hd-css-control-focus,
.hd-css-editor-variable-summary {
  border: 1px solid color-mix(in srgb, var(--css-editor-accent) 34%, var(--css-editor-panel-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--css-editor-panel-soft) 62%, var(--css-editor-panel-bg) 38%);
}

.hd-css-control-focus {
  display: grid;
  gap: .85rem;
  margin: 1rem 0 1.2rem;
  padding: 1rem;
}

.hd-css-control-focus h3 {
  margin: 0;
  color: var(--css-editor-heading);
}

.hd-css-control-focus__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: .8rem;
}

.hd-css-control-focus__card {
  display: grid;
  gap: .55rem;
  padding: .9rem;
  border: 1px solid var(--css-editor-panel-border);
  border-radius: 15px;
  background: color-mix(in srgb, var(--css-editor-panel-bg) 90%, white 10%);
}

.hd-css-control-focus__card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.hd-css-control-focus__card li {
  margin: .25rem 0;
}

.hd-css-control-focus__card a {
  color: var(--css-editor-heading);
  font-weight: 800;
}

.hd-css-control-focus__card code {
  display: block;
  margin-top: .1rem;
  color: var(--css-editor-muted);
  font-size: .78rem;
  white-space: normal;
  word-break: break-word;
}

.hd-css-editor-variable-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: .95rem 1rem;
}

.hd-css-editor-variable-summary strong {
  color: var(--css-editor-heading);
}

.hd-css-editor-variable-summary span {
  color: var(--css-editor-muted);
}

.hd-css-editor-variable-summary .hd-btn {
  grid-row: 1 / span 2;
  grid-column: 2;
}

/* --------------------------------------------------------------------------
Integrity / review tables. Table base remains owned by tables_data_views.
-------------------------------------------------------------------------- */
.hd-css-review-table,
.hd-css-tools-review table {
  font-size: .94rem;
}

.hd-css-review-table th,
.hd-css-tools-review th {
  background: var(--css-editor-panel-soft);
  color: var(--css-editor-heading);
}

.hd-css-review-table td,
.hd-css-review-table th {
  vertical-align: top;
}

.hd-css-review-table code {
  white-space: normal;
  word-break: break-word;
}

.hd-css-integrity-panel .hd-actions {
  margin-top: 1rem;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
Responsive
-------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hd-tool-page--css-tools .hd-css-tool-nav,
  .hd-css-tool-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hd-css-control-health {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hd-css-area-editor__switcher,
  .hd-css-control-centre__switcher {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hd-tool-page--css-tools .hd-css-tool-nav,
  .hd-css-tool-nav,
  .hd-css-section-grid,
  .hd-css-control-grid,
  .hd-css-control-health {
    grid-template-columns: 1fr;
  }

  .hd-css-tool-hero .hd-actions,
  .hd-css-area-editor__runtime-controls,
  .hd-css-integrity-panel .hd-actions {
    display: grid;
  }

  .hd-css-integrity-panel .hd-btn,
  .hd-css-editor-variable-summary .hd-btn {
    width: 100%;
    justify-content: center;
  }

  .hd-css-editor-variable-summary {
    grid-template-columns: 1fr;
  }

  .hd-css-editor-variable-summary .hd-btn {
    grid-row: auto;
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
HD RMS v1003 CSS Section Editor display cleanup
Shows compact numeric ordering and removes historic owner-note visual noise.
-------------------------------------------------------------------------- */
.hd-css-section-number {
  display: inline-grid;
  place-items: center;
  min-width: 2.15rem;
  min-height: 2.15rem;
  margin-bottom: .35rem;
  border-radius: 999px;
  background: var(--colour-primary, #4D6533);
  color: var(--colour-on-primary, #ffffff);
  font-weight: 900;
  font-size: .9rem;
  line-height: 1;
}

.hd-css-section-title {
  display: block;
}

.hd-css-section-key {
  display: inline-block;
  margin-top: .25rem;
  color: var(--colour-muted, #596151);
  font-size: .86rem;
}

.hd-css-owner-meta,
.hd-css-area-editor__restore,
.hd-css-area-editor__governance .hd-css-owner-note,
.hd-css-area-editor__governance .hd-css-owner-target {
  display: none !important;
}

/* =========================================================
HD RMS v1004 CSS tool card/button display refinement
Owner: css_section_editor
========================================================= */
.hd-css-area-editor-page .hd-tool__linkcard,
.hd-css-area-editor-page .hd-css-section-grid .hd-tool__linkcard {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) !important;
  align-items: start !important;
  gap: .65rem .85rem !important;
}

.hd-css-area-editor-page .hd-css-section-number {
  display: inline-grid !important;
  place-items: center !important;
  min-width: 2.35rem !important;
  height: 2.35rem !important;
  border-radius: 999px !important;
  background: var(--colour-panel-tint, var(--colour-surface-soft, #e9eedd)) !important;
  color: var(--colour-heading, #2e4329) !important;
  font-weight: 900 !important;
}

.hd-css-area-editor-page .hd-css-section-key {
  grid-column: 2 !important;
  color: var(--colour-muted, #596151) !important;
}

.hd-css-area-editor-page .hd-btn,
.hd-tool-page--css-tools .hd-btn,
.hd-tool-page--css-integrity .hd-btn,
.hd-tool-page--css-palette .hd-btn {
  color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
  -webkit-text-fill-color: var(--colour-action-text, var(--colour-on-primary, #ffffff)) !important;
}

/* === Admin database and SQL tools [admin_database_tools] === */
/* HD RMS v977 owner contract: admin_database_tools
Owns Database Tools and SQL-specific admin interfaces only: DB tools pages, SQL result dashboards, SQL tables,
connection/status cards, database operation panels, snapshot/restore data-lifecycle panels and DB-specific messages.
Generic cards, buttons, tables, forms, shared alerts and non-database tool pages remain owned by their own CSS sections.
*/
:root {
  --dbtools-gap: clamp(14px, 1.8vw, 22px);
  --dbtools-card-radius: var(--radius-card, 18px);
  --dbtools-card-pad: clamp(16px, 2vw, 24px);
  --dbtools-border: var(--colour-border-soft, #d8c9a8);
  --dbtools-surface: var(--colour-surface, #fffdf8);
  --dbtools-surface-soft: var(--colour-surface-soft, #f7f0df);
  --dbtools-heading: var(--colour-heading, #053b5d);
  --dbtools-text: var(--colour-text, #12212b);
  --dbtools-muted: var(--colour-muted, #526474);
  --dbtools-success: var(--colour-success, #147d53);
  --dbtools-warning: var(--colour-warning, #9a6400);
  --dbtools-danger: var(--colour-danger, #a52828);
  --dbtools-primary: var(--colour-primary, #06456b);
  --dbtools-shadow: 0 14px 34px rgba(24, 55, 74, .075);
  --dbtools-table-min: 720px;
}

/* Page frame and intro layout */
.hd-dbtools-page,
body.is-admin-page #db-tools.hd-tool-page,
body.is-admin-page #db-tools.hd-content-panel,
.hd-tool-page--database,
.hd-page-shell--system-tool.hd-tool-page--database {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding-top: 0 !important;
  box-sizing: border-box !important;
}

body.is-admin-page .hd-content-panel.hd-dbtools-page {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.hd-dbtools-page > :first-child,
.hd-dbtools-page > .hd-page-heading-card:first-child,
.hd-dbtools-page h1:first-child,
.hd-dbtools-page .hd-page-title:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hd-dbtools-page .hd-page-intro-grid,
.hd-dbtools-page .hd-dbtools-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--dbtools-gap) !important;
  align-items: stretch !important;
}

.hd-dbtools-page .hd-admin-hero,
.hd-tool-page--data-lifecycle .hd-admin-suite-hero,
.hd-tool-page--data-lifecycle .hd-admin-hero,
.hd-tool-page--data-lifecycle .hd-snapshot-intro {
  border-left: 6px solid var(--dbtools-primary) !important;
}

.hd-dbtools-page .hd-card,
.hd-dbtools-page .hd-panel,
.hd-dbtools-page details.hd-card,
.hd-tool-page--data-lifecycle .hd-card,
.hd-tool-page--data-lifecycle .hd-storage-review-card,
.hd-tool-page--data-lifecycle .hd-snapshot-form-grid > * {
  min-width: 0 !important;
  box-sizing: border-box !important;
  border-radius: var(--dbtools-card-radius) !important;
}

/* DB connection and status cards */
.hd-db-status-card,
.hd-db-status,
.database-status-card,
[data-db-status-card] {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid color-mix(in srgb, var(--dbtools-success) 36%, var(--dbtools-border)) !important;
  border-left: 7px solid var(--dbtools-success) !important;
  border-radius: var(--dbtools-card-radius) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--dbtools-success) 10%, var(--dbtools-surface)), var(--dbtools-surface) 58%) !important;
  box-shadow: var(--dbtools-shadow) !important;
  color: var(--dbtools-text) !important;
  padding: var(--dbtools-card-pad) !important;
  overflow: hidden !important;
}

.hd-db-status,
.database-status-card,
[data-db-status-card] {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 14px 18px !important;
  align-items: start !important;
}

.hd-db-status::before,
.database-status-card::before,
[data-db-status-card]::before {
  content: "" !important;
  width: 15px !important;
  height: 15px !important;
  border-radius: 999px !important;
  margin-top: .38em !important;
  background: var(--dbtools-success) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--dbtools-success) 18%, transparent), 0 0 18px color-mix(in srgb, var(--dbtools-success) 42%, transparent) !important;
}

.hd-db-status__state,
.database-status-card .status,
[data-db-status-card] .status {
  color: color-mix(in srgb, var(--dbtools-success) 72%, #000) !important;
  font-weight: 900 !important;
}

.hd-db-status-card__header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  margin-bottom: .9rem !important;
}

.hd-db-status-card__kicker {
  margin: 0 0 .25rem !important;
  color: var(--dbtools-muted) !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.hd-db-connection-light,
.hd-db-status-confirm {
  display: inline-flex !important;
  align-items: center !important;
  gap: .62rem !important;
  border: 1px solid color-mix(in srgb, var(--dbtools-success) 42%, var(--dbtools-border)) !important;
  background: color-mix(in srgb, var(--dbtools-success) 11%, var(--dbtools-surface)) !important;
  color: var(--dbtools-heading) !important;
  font-weight: 850 !important;
}

.hd-db-connection-light {
  padding: .55rem .9rem !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 28px rgba(10, 24, 32, .09) !important;
  white-space: nowrap !important;
}

.hd-db-status-confirm {
  padding: .75rem .85rem !important;
  border-radius: 14px !important;
}

.hd-db-connection-light__dot,
.hd-db-status-confirm__pulse {
  flex: 0 0 auto !important;
  border-radius: 999px !important;
  background: var(--dbtools-success) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--dbtools-success) 15%, transparent) !important;
}

.hd-db-connection-light__dot {
  width: .92rem !important;
  height: .92rem !important;
}

.hd-db-status-confirm__pulse {
  width: .72rem !important;
  height: .72rem !important;
}

.hd-db-connection-light.is-warning {
  border-color: color-mix(in srgb, var(--dbtools-warning) 50%, var(--dbtools-border)) !important;
  background: color-mix(in srgb, var(--dbtools-warning) 12%, var(--dbtools-surface)) !important;
}

.hd-db-connection-light.is-warning .hd-db-connection-light__dot {
  background: var(--dbtools-warning) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--dbtools-warning) 18%, transparent) !important;
}

.hd-db-status-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: .75rem !important;
  margin: .9rem 0 0 !important;
}

.hd-db-status-list__item,
.hd-dbtools-page .hd-sql-metric {
  min-width: 0 !important;
  padding: .85rem .95rem !important;
  border: 1px solid var(--dbtools-border) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--dbtools-surface) 88%, var(--dbtools-surface-soft) 12%) !important;
}

.hd-db-status-list dt,
.hd-dbtools-page .hd-sql-metric span,
.hd-sql-metric span {
  display: block !important;
  margin: 0 0 .25rem !important;
  color: var(--dbtools-muted) !important;
  font-size: .76rem !important;
  font-weight: 900 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
}

.hd-db-status-list dd,
.hd-dbtools-page .hd-sql-metric strong,
.hd-sql-metric strong {
  display: block !important;
  margin: 0 !important;
  color: var(--dbtools-heading) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
}

/* Accordions and database operation panels */
.hd-dbtools-page .hd-accordions,
.hd-dbtools-page .hd-accordion-group {
  display: grid !important;
  gap: var(--dbtools-gap) !important;
  width: 100% !important;
  max-width: none !important;
}

.hd-dbtools-page .hd-accordion {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: clip !important;
}

.hd-dbtools-page .hd-accordion > summary {
  list-style: none !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: .9rem !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 12px 14px !important;
}

.hd-dbtools-page .hd-accordion > summary::-webkit-details-marker,
.hd-dbtools-page .hd-accordion > summary::marker {
  display: none !important;
  content: "" !important;
}

.hd-dbtools-page .hd-accordion > summary::before {
  content: "▸" !important;
  flex: 0 0 1.2rem !important;
  width: 1.2rem !important;
  margin-top: .18rem !important;
  color: var(--dbtools-heading) !important;
  font-size: .9rem !important;
  line-height: 1 !important;
  transition: transform .18s ease !important;
}

.hd-dbtools-page .hd-accordion[open] > summary::before {
  transform: rotate(90deg) !important;
}

.hd-dbtools-page .hd-accordion__summary {
  display: flex !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: .35rem !important;
}

.hd-dbtools-page .hd-accordion__title {
  color: var(--dbtools-heading) !important;
  font-weight: 850 !important;
}

.hd-dbtools-page .hd-accordion__desc {
  color: var(--dbtools-muted) !important;
  font-size: .95rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

.hd-dbtools-page .hd-accordion__body > .hd-card,
.hd-dbtools-page .hd-accordion__body > .hd-panel,
.hd-dbtools-page .hd-accordion__body > .hd-alert {
  max-width: none !important;
}

/* SQL result dashboards */
.hd-sql-results,
.hd-sql-results-dashboard,
.hd-sql-results-card,
.hd-dbtools-page .hd-sql-results {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  scroll-margin-top: calc(var(--anchor-offset, 80px) + 12px) !important;
}

.hd-sql-results-dashboard,
.hd-sql-results-card {
  display: block !important;
  border: 1px solid var(--dbtools-border) !important;
  border-left: 5px solid var(--colour-action-bg, var(--dbtools-primary)) !important;
  border-radius: var(--dbtools-card-radius) !important;
  background: var(--dbtools-surface) !important;
  box-shadow: var(--dbtools-shadow) !important;
  padding: var(--dbtools-card-pad) !important;
}

.hd-sql-results-heading {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-bottom: 1rem !important;
  padding-bottom: .85rem !important;
  border-bottom: 1px solid var(--dbtools-border) !important;
}

.hd-sql-results-heading > div,
.hd-sql-result-summary-main,
.hd-sql-result-summary-meta {
  min-width: 0 !important;
}

.hd-sql-results-heading-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: .55rem !important;
  flex-wrap: wrap !important;
}

.hd-sql-results [data-sql-copy-summary],
.hd-sql-results [data-sql-download-html] {
  white-space: nowrap !important;
}

.hd-sql-run-summary,
.hd-sql-statement-summary,
.hd-sql-single-row-summary,
.hd-dbtools-page .hd-sql-run-summary,
.hd-dbtools-page .hd-sql-statement-summary,
.hd-dbtools-page .hd-sql-single-row-summary {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

.hd-sql-metric {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: .85rem .95rem !important;
  border: 1px solid var(--dbtools-border) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--dbtools-surface) 86%, var(--dbtools-surface-soft) 14%) !important;
}

.hd-sql-result-set,
.hd-dbtools-page .hd-sql-result-set,
.hd-tool-page--data-lifecycle .hd-sql-result-set {
  border: 1px solid var(--dbtools-border) !important;
  border-radius: 14px !important;
  background: var(--dbtools-surface) !important;
  overflow: hidden !important;
  transition: box-shadow .16s ease, border-color .16s ease !important;
}

.hd-sql-result-set > summary,
.hd-sql-result-set summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .75rem !important;
  padding: .85rem 1rem !important;
  cursor: pointer !important;
  background: color-mix(in srgb, var(--dbtools-surface-soft) 72%, var(--dbtools-surface) 28%) !important;
  color: var(--dbtools-heading) !important;
  font-weight: 850 !important;
  list-style: none !important;
}

.hd-sql-result-set > summary::-webkit-details-marker,
.hd-sql-result-set > summary::marker {
  display: none !important;
  content: "" !important;
}

.hd-sql-result-set[open] > summary {
  border-bottom: 1px solid var(--dbtools-border) !important;
}

.hd-sql-result-set > div {
  padding: 1rem !important;
}

.hd-sql-result-set--error {
  border-color: color-mix(in srgb, var(--dbtools-danger) 46%, var(--dbtools-border)) !important;
}

.hd-sql-result-set--error > summary {
  background: color-mix(in srgb, var(--dbtools-danger) 10%, var(--dbtools-surface)) !important;
  color: color-mix(in srgb, var(--dbtools-danger) 76%, #000) !important;
}

.hd-sql-result-summary-main,
.hd-sql-result-summary-meta {
  display: inline-flex !important;
  align-items: center !important;
  gap: .55rem !important;
}

.hd-sql-result-summary-main {
  flex-wrap: wrap !important;
}

.hd-sql-result-summary-meta {
  color: var(--dbtools-muted) !important;
  font-size: .9rem !important;
  white-space: nowrap !important;
}

.hd-sql-statement-code {
  border: 1px dashed var(--dbtools-border) !important;
  border-radius: 12px !important;
  padding: .65rem .75rem !important;
  background: color-mix(in srgb, var(--dbtools-surface-soft) 72%, var(--dbtools-surface) 28%) !important;
}

.hd-sql-statement-code > summary {
  cursor: pointer !important;
  color: var(--colour-link, var(--dbtools-primary)) !important;
  font-weight: 850 !important;
}

/* Tables, logs and code blocks inside database tools */
.hd-dbtools-page .hd-tablewrap,
.hd-dbtools-page .hd-table-wrap,
.hd-dbtools-page .hd-scroll-x,
.hd-sql-tablewrap,
.hd-data-table-wrap,
.hd-tool-page--data-lifecycle .hd-tablewrap,
.hd-tool-page--data-lifecycle .hd-table-wrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border: 1px solid var(--dbtools-border) !important;
  border-radius: 14px !important;
  background: var(--dbtools-surface) !important;
}

.hd-sql-result-table,
.hd-dbtools-page .hd-table,
.hd-dbtools-page .hd-table--compact {
  min-width: min(100%, var(--dbtools-table-min)) !important;
  margin: 0 !important;
}

.hd-sql-result-table th,
.hd-sql-result-table td,
.hd-dbtools-page .hd-table th,
.hd-dbtools-page .hd-table td,
.hd-dbtools-page .hd-table--compact th,
.hd-dbtools-page .hd-table--compact td {
  vertical-align: top !important;
  padding: var(--v496-table-cell-padding-y, .65rem) var(--v496-table-cell-padding-x, .75rem) !important;
  font-size: var(--v496-table-font-size, .9rem) !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.hd-sql-result-table td {
  max-width: 34rem !important;
  white-space: normal !important;
}

.hd-dbtools-page pre,
.hd-dbtools-page code.hd-code,
.hd-dbtools-page .sql-output,
.hd-dbtools-page .log-output,
.hd-tool-page--data-lifecycle pre,
.hd-tool-page--data-lifecycle code,
.hd-tool-page--data-lifecycle .hd-codebox {
  max-width: 100% !important;
  overflow: auto !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  border: 1px solid var(--dbtools-border) !important;
  border-radius: 14px !important;
  background: #f9f6ee !important;
  color: var(--dbtools-text) !important;
  line-height: 1.55 !important;
}

.hd-dbtools-page pre,
.hd-dbtools-page .sql-output,
.hd-dbtools-page .log-output,
.hd-tool-page--data-lifecycle pre,
.hd-tool-page--data-lifecycle .hd-codebox {
  padding: 16px !important;
}

/* DB-specific messages and badges only */
.hd-sql-results .hd-alert,
.hd-sql-results [role="status"].hd-alert,
.hd-sql-results [role="alert"].hd-alert,
.hd-sql-console-message,
.hd-sql-action-message,
.hd-dbtools-page .hd-operation-result,
.hd-dbtools-page .hd-run-result,
.hd-dbtools-page .hd-empty-state {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  margin: .85rem 0 !important;
  padding: .9rem 1rem !important;
  border: 1px solid var(--dbtools-border) !important;
  border-left-width: 7px !important;
  border-radius: 16px !important;
  background: var(--dbtools-surface) !important;
  color: var(--dbtools-text) !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
  box-shadow: 0 10px 24px rgba(10, 24, 32, .07) !important;
}

.hd-sql-results .hd-alert strong:first-child,
.hd-sql-results [role="status"] > strong:first-child,
.hd-sql-results [role="alert"] > strong:first-child,
.hd-sql-console-message > strong:first-child,
.hd-sql-action-message > strong:first-child {
  display: inline-block !important;
  margin-right: .38rem !important;
  color: inherit !important;
}

.hd-sql-results .hd-alert--success,
.hd-sql-results [data-hd-toast="success"],
.hd-sql-console-message--success,
.hd-sql-action-message--success {
  border-left-color: var(--dbtools-success) !important;
  border-color: color-mix(in srgb, var(--dbtools-success) 40%, var(--dbtools-border)) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--dbtools-success) 12%, #fff), var(--dbtools-surface) 72%) !important;
  color: #103f29 !important;
}

.hd-sql-results .hd-alert--danger,
.hd-sql-results .hd-alert--error,
.hd-sql-results [data-hd-toast="danger"],
.hd-sql-results [data-hd-toast="error"],
.hd-sql-console-message--error,
.hd-sql-action-message--error {
  border-left-color: var(--dbtools-danger) !important;
  border-color: color-mix(in srgb, var(--dbtools-danger) 40%, var(--dbtools-border)) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--dbtools-danger) 10%, #fff), var(--dbtools-surface) 72%) !important;
  color: #641f1f !important;
}

.hd-sql-results .hd-alert--warning,
.hd-sql-results .hd-alert--warn,
.hd-sql-results [data-hd-toast="warning"],
.hd-sql-results [data-hd-toast="warn"] {
  border-left-color: var(--dbtools-warning) !important;
  border-color: color-mix(in srgb, var(--dbtools-warning) 42%, var(--dbtools-border)) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--dbtools-warning) 12%, #fff), var(--dbtools-surface) 72%) !important;
  color: #5f4200 !important;
}

.hd-sql-results .hd-badge,
.hd-sql-results-heading-actions .hd-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  margin: 0 .45rem 0 0 !important;
  border-radius: 999px !important;
  padding: .3rem .68rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  vertical-align: middle !important;
}

.hd-sql-results .hd-badge--success,
.hd-sql-results-heading-actions .hd-badge--success {
  background: #e8f6ee !important;
  border: 1px solid #9ed8b4 !important;
  color: #0b5a30 !important;
}

.hd-sql-results .hd-badge--danger,
.hd-sql-results .hd-badge--error {
  background: #fff0f0 !important;
  border: 1px solid #f0b2b2 !important;
  color: #741f1f !important;
}

/* Data lifecycle / restore / snapshot DB tools */
.hd-tool-suite-nav--lifecycle .hd-tool-suite-nav__links {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.hd-tool-page--data-lifecycle .hd-snapshot-toolbar,
.hd-tool-page--data-lifecycle .hd-actions,
.hd-dbtools-page .hd-actionmenu,
.hd-dbtools-page .hd-pillrow {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .65rem !important;
}

.hd-tool-page--data-lifecycle .hd-snapshot-form-grid,
.hd-tool-page--data-lifecycle .hd-restore-grid,
.hd-tool-page--data-lifecycle .hd-grid-2 {
  gap: 14px !important;
}

/* Mobile and narrow screens */
@media (max-width: 1180px) {
  .hd-tool-suite-nav--lifecycle .hd-tool-suite-nav__links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  .hd-dbtools-page .hd-page-intro-grid,
  .hd-dbtools-page .hd-dbtools-grid {
    grid-template-columns: 1fr !important;
  }

  .hd-db-status-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  :root {
    --dbtools-table-min: 620px;
  }

  .hd-db-status-card__header,
  .hd-sql-results-heading,
  .hd-sql-result-set > summary,
  .hd-sql-result-set summary {
    display: grid !important;
  }

  .hd-db-connection-light {
    width: max-content !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  .hd-sql-result-summary-meta {
    white-space: normal !important;
  }

  .hd-sql-run-summary,
  .hd-sql-statement-summary,
  .hd-sql-single-row-summary,
  .hd-dbtools-page .hd-sql-run-summary,
  .hd-dbtools-page .hd-sql-statement-summary,
  .hd-dbtools-page .hd-sql-single-row-summary {
    grid-template-columns: 1fr !important;
  }

  .hd-sql-results-heading-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
  }

  .hd-sql-results-heading-actions .hd-btn {
    flex: 1 1 11rem !important;
  }
}

@media (max-width: 640px) {
  .hd-tool-suite-nav--lifecycle .hd-tool-suite-nav__links {
    grid-template-columns: 1fr !important;
  }
}

/* v1024 pass2: Development Cleanse and Database Tools restore-unrer clarity */
.hd-tool-page--data-lifecycle .hd-admin-hero,
.hd-tool-page--database .hd-admin-hero {
  border-left: 6px solid var(--hd-colour-accent, #c0862c);
  background: linear-gradient(135deg, rgba(192,134,44,.14), rgba(255,255,255,.85) 60%);
}

.hd-tool-page--data-lifecycle .hd-key-value-card,
.hd-tool-page--database .hd-key-value-card {
  border: 1px solid var(--hd-border, rgba(38,39,96,.18));
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(247,245,252,.85);
}

.hd-tool-page--data-lifecycle .hd-definition-list {
  display: grid;
  grid-template-columns: maxcontent 1fr;
  gap: 8px 16px;
}

.hd-tool-page--data-lifecycle .hd-definition-list dt {
  font-weight: 800;
  color: var(--hd-colour-navy, #21235d);
}

.hd-tool-page--data-lifecycle .hd-definition-list dd {
  margin: 0;
  color: var(--hd-colour-text, #242444);
}

.hd-tool-page--data-lifecycle .hd-check-list {
  margin: 0;
  padding-left: 1.2rem;
}

.hd-tool-page--data-lifecycle .hd-check-list li {
  margin: .35rem 0;
}

.hd-tool-page--data-lifecycle .hd-checkrow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
}

.hd-tool-page--data-lifecycle .hd-table code {
  white-space: nowrap;
}

.hd-tool-page--database [data-dbtools-restore-confidence] {
  border-top: 4px solid var(--hd-colour-accent, #c0862c);
}

.hd-tool-page--database .hd-alert--info {
  border-left: 4px solid #6370a3;
}

.hd-tool-page--database .hd-alert--danger {
  border-left: 4px solid #b42335;
}

/* end v1024 pass2 */

/* === Quick Jump menu [quick_jump_menu] === */
/* HD RMS v1034 clean replacement: quick_jump_menu
Owner: quick_jump_menu
Replace the whole quick_jump_menu section with this file. Do not append.
Purpose: one fixed overlay contract for Quick Jump, independent of page/header stacking. */
:root {
  --quickjump-panel-top: calc(var(--admin-strip-height, 56px) + 0px);
  --quickjump-panel-edge-gap: clamp(10px, 2vw, 28px);
  --quickjump-panel-width: var(--admin-strip-inner-width, min(var(--site-shell-width, var(--site-wrapper-max, 1100px)), calc(100vw - 32px)));
  --quickjump-panel-max-height: calc(100dvh - var(--quickjump-panel-top) - 16px);
  --quickjump-panel-layer: 2147483150;
  --quickjump-panel-bg: var(--colour-surface, #fffdf8);
  --quickjump-panel-border: var(--colour-border-soft, #d8c9a8);
  --quickjump-panel-radius: 0 0 18px 18px;
  --quickjump-panel-padding: clamp(16px, 2vw, 24px);
  --quickjump-card-bg: var(--colour-surface, #fffdf8);
  --quickjump-card-text: var(--colour-text, #102630);
  --quickjump-card-hover-bg: var(--colour-primary, #0b5f8f);
  --quickjump-card-hover-text: var(--colour-on-primary, #ffffff);
  --quickjump-accent: var(--colour-primary, #0b5f8f);
  --quickjump-icon-bg: color-mix(in srgb, var(--quickjump-accent) 14%, var(--colour-surface, #fffdf8));
  --quickjump-icon-text: var(--quickjump-accent);
  --quickjump-shadow: 0 24px 58px rgba(8,20,32,.30);
}

.hd-admin-quickjump-menu,
.hd-quickjump,
.hd-quick-jump,
.quick-jump-menu,
#quick-jump-menu,
details[data-hd-quickjump] {
  position: static !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

#hd-admin-strip-top .hd-admin-quickjump-menu,
#hd-admin-strip-top details[data-hd-quickjump] {
  position: static !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
}

.hd-admin-quickjump-menu summary,
details[data-hd-quickjump] summary {
  list-style: none !important;
}

.hd-admin-quickjump-menu summary::-webkit-details-marker,
details[data-hd-quickjump] summary::-webkit-details-marker {
  display: none !important;
}

:is(.hd-admin-quickjump-trigger,.hd-qj-trigger,.hd-quickjump-trigger,.hd-quick-jump-trigger,.js-open-quickjump) {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .45rem !important;
  min-height: var(--admin-strip-control-height, 40px) !important;
  height: var(--admin-strip-control-height, 40px) !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  background: var(--admin-strip-action-bg, var(--colour-primary, #0b5f8f)) !important;
  color: var(--admin-strip-action-fg, var(--colour-on-primary, #ffffff)) !important;
  -webkit-text-fill-color: var(--admin-strip-action-fg, var(--colour-on-primary, #ffffff)) !important;
  border: 1px solid var(--admin-strip-action-border, rgba(255,255,255,.26)) !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  font-weight: 850 !important;
}

.hd-admin-quickjump-trigger__icon,
.hd-admin-quickjump-link__icon,
.hd-admin-quickjump-intent__icon {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.hd-admin-quickjump-trigger__icon {
  width: 18px !important;
  height: 18px !important;
  color: currentColor !important;
  background: transparent !important;
}

.hd-admin-quickjump-trigger__icon svg,
.hd-admin-quickjump-link__icon svg,
.hd-admin-quickjump-intent__icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

.hd-admin-quickjump-panel,
.hd-quickjump-panel,
.quickjump-panel,
#quickjump-panel,
#hd-quickjump-panel {
  box-sizing: border-box !important;
  position: fixed !important;
  top: var(--quickjump-panel-top) !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  z-index: var(--quickjump-panel-layer) !important;
  width: min(var(--quickjump-panel-width), calc(100vw - (var(--quickjump-panel-edge-gap) * 2))) !important;
  max-width: min(var(--quickjump-panel-width), calc(100vw - (var(--quickjump-panel-edge-gap) * 2))) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: var(--quickjump-panel-max-height) !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  padding: var(--quickjump-panel-padding) !important;
  border: 1px solid var(--quickjump-panel-border) !important;
  border-top: 0 !important;
  border-radius: var(--quickjump-panel-radius) !important;
  background: var(--quickjump-panel-bg) !important;
  color: var(--quickjump-card-text) !important;
  -webkit-text-fill-color: var(--quickjump-card-text) !important;
  box-shadow: var(--quickjump-shadow) !important;
  pointer-events: auto !important;
}

details:not([open]) > .hd-admin-quickjump-panel,
details[data-hd-quickjump]:not([open]) > .hd-admin-quickjump-panel {
  display: none !important;
}

details[data-hd-quickjump][open] > .hd-admin-quickjump-panel,
.hd-admin-quickjump-menu[open] > .hd-admin-quickjump-panel {
  display: block !important;
}

.hd-admin-quickjump-panel__intro {
  display: flex !important;
  justify-content: space-between !important;
  gap: 18px !important;
  align-items: baseline !important;
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid var(--quickjump-panel-border) !important;
  color: var(--colour-heading, #173642) !important;
}

.hd-admin-quickjump-panel__intro strong {
  font-size: 1.18rem !important;
}

.hd-admin-quickjump-panel__intro span {
  color: var(--colour-muted, #526474) !important;
  font-weight: 650 !important;
}

.hd-admin-quickjump-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  margin-bottom: 14px !important;
}

.hd-admin-quickjump-search,
.hd-admin-quickjump-panel input[type="search"] {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 46px !important;
  border: 2px solid var(--colour-field-border, var(--colour-border, #bfc8c1)) !important;
  border-radius: 12px !important;
  padding: 0 14px !important;
  background: var(--colour-field-bg, var(--colour-surface, #fffdf8)) !important;
  color: var(--colour-text, #102630) !important;
  -webkit-text-fill-color: var(--colour-text, #102630) !important;
  font-size: 1rem !important;
}

.hd-admin-quickjump-search:focus,
.hd-admin-quickjump-panel input[type="search"]:focus {
  border-color: var(--colour-field-focus, var(--quickjump-accent)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--colour-field-focus, var(--quickjump-accent)) 22%, transparent) !important;
  outline: none !important;
}

.hd-admin-quickjump-heading,
.hd-admin-quickjump-section-heading,
.hd-admin-quickjump-intents__heading {
  color: var(--colour-heading, #173642) !important;
}

.hd-admin-quickjump-heading,
.hd-admin-quickjump-section-heading {
  margin: 12px 0 8px !important;
  padding: 9px 12px !important;
  border: 1px solid var(--quickjump-panel-border) !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--quickjump-panel-bg) 78%, var(--colour-surface-soft, #f3f1e8) 22%) !important;
  font-weight: 900 !important;
}

.hd-admin-quickjump-section-heading {
  font-size: .82rem !important;
  text-transform: uppercase !important;
  letter-spacing: .055em !important;
}

.hd-admin-quickjump-links,
.hd-admin-quickjump-intents__list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 10px !important;
}

.hd-admin-quickjump-link,
.hd-admin-quickjump-intent,
.hd-quickjump-result,
.hd-quickjump-card,
.quickjump-result,
.quickjump-card {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0,1fr) !important;
  gap: 11px !important;
  align-items: start !important;
  min-height: 66px !important;
  padding: 12px !important;
  border: 1px solid var(--quickjump-panel-border) !important;
  border-radius: 16px !important;
  background: var(--quickjump-card-bg) !important;
  color: var(--quickjump-card-text) !important;
  -webkit-text-fill-color: var(--quickjump-card-text) !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(8,20,32,.10) !important;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease !important;
}

.hd-admin-quickjump-link:is(:hover,:focus-visible),
.hd-admin-quickjump-intent:is(:hover,:focus-visible),
.hd-quickjump-result:is(:hover,:focus-visible),
.hd-quickjump-card:is(:hover,:focus-visible),
.quickjump-result:is(:hover,:focus-visible),
.quickjump-card:is(:hover,:focus-visible),
.hd-admin-quickjump-link.is-active,
.hd-admin-quickjump-intent.is-active,
.hd-quickjump-result.is-active,
.quickjump-result.is-active {
  background: var(--quickjump-card-hover-bg) !important;
  color: var(--quickjump-card-hover-text) !important;
  -webkit-text-fill-color: var(--quickjump-card-hover-text) !important;
  border-color: color-mix(in srgb, var(--quickjump-card-hover-bg) 82%, #000 18%) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

.hd-admin-quickjump-link:is(:hover,:focus-visible) *,
.hd-admin-quickjump-intent:is(:hover,:focus-visible) *,
.hd-quickjump-result:is(:hover,:focus-visible) *,
.hd-quickjump-card:is(:hover,:focus-visible) *,
.quickjump-result:is(:hover,:focus-visible) *,
.quickjump-card:is(:hover,:focus-visible) * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.hd-admin-quickjump-link__icon,
.hd-admin-quickjump-intent__icon {
  width: 38px !important;
  height: 38px !important;
  border: 1px solid color-mix(in srgb, var(--quickjump-panel-border) 72%, var(--quickjump-accent) 28%) !important;
  border-radius: 12px !important;
  background: var(--quickjump-icon-bg) !important;
  color: var(--quickjump-icon-text) !important;
}

.hd-admin-quickjump-link__title,
.hd-admin-quickjump-intent__label {
  display: block !important;
  color: inherit !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.hd-admin-quickjump-link__meta,
.hd-admin-quickjump-intent__desc,
.hd-admin-quickjump-intent__target {
  display: block !important;
  margin-top: 3px !important;
  color: var(--colour-muted, #526474) !important;
  font-size: .86rem !important;
  line-height: 1.35 !important;
}

.hd-admin-quickjump-link:is(:hover,:focus-visible) :is(.hd-admin-quickjump-link__meta,.hd-admin-quickjump-intent__desc,.hd-admin-quickjump-intent__target),
.hd-admin-quickjump-intent:is(:hover,:focus-visible) :is(.hd-admin-quickjump-link__meta,.hd-admin-quickjump-intent__desc,.hd-admin-quickjump-intent__target) {
  color: inherit !important;
}

.hd-admin-quickjump-empty {
  padding: 12px 14px !important;
  border: 1px solid color-mix(in srgb, var(--colour-danger, #a52828) 28%, var(--quickjump-panel-border)) !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--colour-danger, #a52828) 8%, var(--colour-surface, #fffdf8)) !important;
  color: var(--colour-danger-text, #7b1e2b) !important;
  -webkit-text-fill-color: var(--colour-danger-text, #7b1e2b) !important;
  font-weight: 800 !important;
}

#quickjump-intents .hd-qj-intent-row {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  min-width: 0 !important;
}

#quickjump-intents .hd-qj-intent-row > div:first-child {
  min-width: 0 !important;
}

#quickjump-intents .hd-qj-intent-actions {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

#quickjump-intents .hd-inline-form {
  display: inline !important;
}

@media (max-width: 760px) {
  :root {
    --quickjump-panel-edge-gap: 8px;
    --quickjump-panel-top: var(--admin-strip-height, 54px);
    --quickjump-panel-width: calc(100vw - 16px);
  }

  .hd-admin-quickjump-panel,
  .hd-quickjump-panel,
  .quickjump-panel,
  #quickjump-panel,
  #hd-quickjump-panel {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - var(--quickjump-panel-top) - 10px) !important;
    padding: 14px !important;
  }

  .hd-admin-quickjump-panel__intro,
  .hd-admin-quickjump-toolbar,
  #quickjump-intents .hd-qj-intent-row {
    display: grid !important;
    gap: 12px !important;
  }

  .hd-admin-quickjump-links,
  .hd-admin-quickjump-intents__list {
    grid-template-columns: 1fr !important;
  }
}

/* v1055 retained v1054 Quick Jump ordering */
.hd-admin-quickjump-panel {
  display:flex;
  flex-direction:column
}

.hd-admin-quickjump-group {
  order:10
}

.hd-admin-quickjump-intents {
  order:20
}

.hd-admin-quickjump-empty {
  order:30
}

/* v1059 Quick Jump grouping refinement: tool destinations are listed before task suggestions. */
.hd-admin-quickjump-group + .hd-admin-quickjump-intents {
  margin-top: clamp(16px, 2vw, 24px) !important;
  padding-top: clamp(12px, 1.6vw, 18px) !important;
  border-top: 1px solid var(--quickjump-panel-border, rgba(0,0,0,.16)) !important;
}

.hd-admin-quickjump-intents__heading {
  color: var(--quickjump-card-text, currentColor) !important;
}

/* === Timeline Manager admin tool [admin_timeline_manager] === */
/* HD RMS v1055 clean owner section: admin_timeline_manager
Owns the admin Timeline Manager only. Public timeline styling remains in timeline_page.
Full replacement for the section. This keeps the compact phase-card layout from v1051,
and tightens WCAG AA colour handling so phase headings, helper text and colour chips
never inherit low-contrast button text from generic admin button rules. */
#timeline-manager,
.hd-tool-page--timeline-manager,
.hd-admin-timeline-manager,
.hd-tool-page--timeline {
  --tlm-surface: var(--colour-surface, #fffdf8);
  --tlm-surface-strong: var(--colour-surface-strong, #ffffff);
  --tlm-surface-soft: var(--colour-surface-soft, #f7f0df);
  --tlm-border: var(--colour-border-soft, #d8c9a8);
  --tlm-heading: var(--colour-heading, #073a63);
  --tlm-text: var(--colour-text, #12212b);
  --tlm-muted: var(--colour-muted, #526474);
  --tlm-phase-heading-text: var(--colour-heading, #073a63);
  --tlm-phase-body-text: var(--colour-text, #12212b);
  --tlm-phase-chip-text: var(--colour-heading, #073a63);
  --tlm-action: var(--colour-action-bg, var(--colour-primary, #0b5f8f));
  --tlm-action-text: var(--colour-action-text, var(--colour-on-primary, #ffffff));
  --tlm-shadow: 0 10px 24px color-mix(in srgb, var(--colour-shadow, #102630) 9%, transparent);
  --tlm-radius: 18px;
  --tlm-radius-sm: 12px;
  --tlm-gap: clamp(10px, 1.25vw, 16px);

  /* Palette-owned phase tokens with distinct fallbacks. */
  --hd-timeline-phase-1: var(--colour-timeline-phase-1, var(--timeline-phase-1, #0b5f8f));
  --hd-timeline-phase-2: var(--colour-timeline-phase-2, var(--timeline-phase-2, #7a5a12));
  --hd-timeline-phase-3: var(--colour-timeline-phase-3, var(--timeline-phase-3, #2f6f57));
  --hd-timeline-phase-4: var(--colour-timeline-phase-4, var(--timeline-phase-4, #6e3f70));
  --hd-timeline-phase-5: var(--colour-timeline-phase-5, var(--timeline-phase-5, #8a6400));
  --hd-timeline-phase-6: var(--colour-timeline-phase-6, var(--timeline-phase-6, #0f6b78));
  --hd-timeline-phase-7: var(--colour-timeline-phase-7, var(--timeline-phase-7, #6b4700));
  --hd-timeline-phase-8: var(--colour-timeline-phase-8, var(--timeline-phase-8, #4b587c));
  box-sizing: border-box !important;
  width: min(100%, 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  color: var(--tlm-text) !important;
}

#timeline-manager *,
.hd-tool-page--timeline-manager *,
.hd-tool-page--timeline * {
  box-sizing: border-box !important;
}

#timeline-manager :is(.hd-card, .hd-tool-card, .hd-tool-card--form, details.hd-card, .hd-admin-collapsible-section),
.hd-tool-page--timeline-manager :is(.hd-card, .hd-tool-card, .hd-tool-card--form, details.hd-card, .hd-admin-collapsible-section),
.hd-tool-page--timeline :is(.hd-card, .hd-tool-card, .hd-tool-card--form, details.hd-card, .hd-admin-collapsible-section) {
  min-height: 0 !important;
  max-width: 100% !important;
  border: 1px solid var(--tlm-border) !important;
  border-radius: var(--tlm-radius) !important;
  background: var(--tlm-surface) !important;
  box-shadow: var(--tlm-shadow) !important;
}

#timeline-manager .hd-admin-top,
.hd-tool-page--timeline-manager .hd-admin-top {
  display: grid !important;
  gap: var(--tlm-gap) !important;
}

#timeline-manager .hd-page-heading-card,
.hd-tool-page--timeline-manager .hd-page-heading-card {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#timeline-manager .hd-page-title,
.hd-tool-page--timeline-manager .hd-page-title {
  margin: 0 !important;
  color: var(--tlm-heading) !important;
}

#timeline-manager .hd-admin-hero,
#timeline-manager .hd-restore-card,
#timeline-manager .hd-tlm-structure-intro,
.hd-tool-page--timeline-manager .hd-admin-hero,
.hd-tool-page--timeline-manager .hd-restore-card,
.hd-tool-page--timeline-manager .hd-tlm-structure-intro {
  padding: clamp(14px, 2vw, 22px) !important;
}

#timeline-manager h1,
#timeline-manager h2,
#timeline-manager h3,
.hd-tool-page--timeline-manager h1,
.hd-tool-page--timeline-manager h2,
.hd-tool-page--timeline-manager h3 {
  color: var(--tlm-heading) !important;
  line-height: 1.15 !important;
}

#timeline-manager .hd-help,
.hd-tool-page--timeline-manager .hd-help {
  color: var(--tlm-muted) !important;
  line-height: 1.4 !important;
}

#timeline-manager label,
.hd-tool-page--timeline-manager label {
  color: var(--tlm-heading) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

#timeline-manager :is(input, select, textarea),
.hd-tool-page--timeline-manager :is(input, select, textarea) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#timeline-manager .hd-tlm-grid,
.hd-tool-page--timeline-manager .hd-tlm-grid {
  display: grid !important;
  gap: var(--tlm-gap) !important;
}

#timeline-manager .hd-tlm-two,
.hd-tool-page--timeline-manager .hd-tlm-two {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--tlm-gap) !important;
}

#timeline-manager .hd-tlm-three,
.hd-tool-page--timeline-manager .hd-tlm-three {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: var(--tlm-gap) !important;
}

#timeline-manager .hd-tlm-five,
.hd-tool-page--timeline-manager .hd-tlm-five {
  display: grid !important;
  grid-template-columns: minmax(70px, 90px) minmax(180px, 1fr) minmax(140px, 170px) minmax(190px, 230px) minmax(110px, 140px) !important;
  gap: 10px !important;
  align-items: end !important;
}

#timeline-manager .hd-tlm-actions,
#timeline-manager .hd-tlm-row-actions,
#timeline-manager .hd-tlm-structure-actions,
.hd-tool-page--timeline-manager .hd-tlm-actions,
.hd-tool-page--timeline-manager .hd-tlm-row-actions,
.hd-tool-page--timeline-manager .hd-tlm-structure-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: center !important;
}

#timeline-manager .hd-tlm-structure-intro,
.hd-tool-page--timeline-manager .hd-tlm-structure-intro {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 1rem !important;
}

#timeline-manager .hd-tlm-structure-actions,
.hd-tool-page--timeline-manager .hd-tlm-structure-actions {
  justify-content: flex-end !important;
}

/* Collapsible support cards: compact when closed. */
#timeline-manager details.hd-admin-collapsible-section,
.hd-tool-page--timeline-manager details.hd-admin-collapsible-section {
  overflow: clip !important;
  padding: 0 !important;
}

#timeline-manager .hd-admin-collapsible-summary,
.hd-tool-page--timeline-manager .hd-admin-collapsible-summary {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) minmax(170px, auto) !important;
  gap: .8rem !important;
  align-items: center !important;
  padding: 12px 16px !important;
  border-radius: calc(var(--tlm-radius) - 1px) !important;
  background: color-mix(in srgb, var(--tlm-surface-soft) 78%, var(--tlm-surface) 22%) !important;
  color: var(--tlm-heading) !important;
  cursor: pointer !important;
  list-style: none !important;
}

#timeline-manager .hd-admin-collapsible-summary::-webkit-details-marker,
.hd-tool-page--timeline-manager .hd-admin-collapsible-summary::-webkit-details-marker {
  display: none !important;
}

#timeline-manager .hd-admin-collapsible-summary::before,
.hd-tool-page--timeline-manager .hd-admin-collapsible-summary::before {
  content: "›" !important;
  font-weight: 900 !important;
  color: var(--tlm-action) !important;
  transition: transform .18s ease !important;
}

#timeline-manager details[open] > .hd-admin-collapsible-summary::before,
.hd-tool-page--timeline-manager details[open] > .hd-admin-collapsible-summary::before {
  transform: rotate(90deg) !important;
}

#timeline-manager details.hd-admin-collapsible-section[open] > :not(summary),
.hd-tool-page--timeline-manager details.hd-admin-collapsible-section[open] > :not(summary) {
  margin-inline: 16px !important;
}

#timeline-manager details.hd-admin-collapsible-section[open],
.hd-tool-page--timeline-manager details.hd-admin-collapsible-section[open] {
  padding-bottom: 16px !important;
}

/* Phase list: compact full-width phase cards. */
#timeline-manager .hd-tlm-phase-accordion,
.hd-tool-page--timeline-manager .hd-tlm-phase-accordion {
  display: grid !important;
  gap: 12px !important;
  margin-top: 12px !important;
}

#timeline-manager .hd-tlm-phase,
.hd-tool-page--timeline-manager .hd-tlm-phase {
  --phase-colour: var(--hd-timeline-phase-1);
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--phase-colour) 34%, var(--tlm-border)) !important;
  border-left: 7px solid var(--phase-colour) !important;
  border-radius: var(--tlm-radius) !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--phase-colour) 5%, var(--tlm-surface)) 0%, var(--tlm-surface) 36%) !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--phase-colour) 8%, transparent) !important;
}

#timeline-manager .hd-tlm-phase--1,
#timeline-manager [data-hd-tlm-phase][data-hd-phase-index="0"],
.hd-tool-page--timeline-manager .hd-tlm-phase--1,
.hd-tool-page--timeline-manager [data-hd-tlm-phase][data-hd-phase-index="0"] {
  --phase-colour: var(--hd-timeline-phase-1) !important;
}

#timeline-manager .hd-tlm-phase--2,
#timeline-manager [data-hd-tlm-phase][data-hd-phase-index="1"],
.hd-tool-page--timeline-manager .hd-tlm-phase--2,
.hd-tool-page--timeline-manager [data-hd-tlm-phase][data-hd-phase-index="1"] {
  --phase-colour: var(--hd-timeline-phase-2) !important;
}

#timeline-manager .hd-tlm-phase--3,
#timeline-manager [data-hd-tlm-phase][data-hd-phase-index="2"],
.hd-tool-page--timeline-manager .hd-tlm-phase--3,
.hd-tool-page--timeline-manager [data-hd-tlm-phase][data-hd-phase-index="2"] {
  --phase-colour: var(--hd-timeline-phase-3) !important;
}

#timeline-manager .hd-tlm-phase__accent,
.hd-tool-page--timeline-manager .hd-tlm-phase__accent {
  display: none !important;
}

/* Critical: override generic button styles that were shrinking/centring the phase header. */
#timeline-manager button.hd-tlm-phase-head,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: clamp(.55rem, 1.2vw, .9rem) !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px clamp(14px, 2vw, 20px) !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--phase-colour) 18%, var(--tlm-border)) !important;
  border-radius: 0 !important;
  background: color-mix(in srgb, var(--phase-colour) 8%, var(--tlm-surface)) !important;
  color: var(--tlm-phase-heading-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-heading-text) !important;
  text-align: left !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transform: none !important;
  white-space: normal !important;
}

#timeline-manager button.hd-tlm-phase-head:hover,
#timeline-manager button.hd-tlm-phase-head:focus-visible,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head:hover,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head:focus-visible {
  background: color-mix(in srgb, var(--phase-colour) 12%, var(--tlm-surface)) !important;
  outline: 3px solid color-mix(in srgb, var(--phase-colour) 24%, transparent) !important;
  outline-offset: -3px !important;
}

#timeline-manager .hd-tlm-phase-title,
.hd-tool-page--timeline-manager .hd-tlm-phase-title {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
  justify-items: start !important;
  text-align: left !important;
}

#timeline-manager .hd-tlm-phase-title strong,
.hd-tool-page--timeline-manager .hd-tlm-phase-title strong {
  display: block !important;
  color: var(--tlm-phase-heading-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-heading-text) !important;
  text-shadow: none !important;
  font-size: clamp(1rem, 1.3vw, 1.12rem) !important;
  line-height: 1.16 !important;
  overflow-wrap: anywhere !important;
}

#timeline-manager .hd-tlm-phase-title .hd-help,
.hd-tool-page--timeline-manager .hd-tlm-phase-title .hd-help {
  display: block !important;
  color: var(--tlm-phase-body-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-body-text) !important;
  text-shadow: none !important;
  font-size: .9rem !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
}

#timeline-manager .hd-tlm-phase-colour,
.hd-tool-page--timeline-manager .hd-tlm-phase-colour {
  display: inline-flex !important;
  align-items: center !important;
  gap: .42rem !important;
  min-height: 30px !important;
  max-width: 100% !important;
  padding: .25rem .55rem !important;
  border: 1px solid color-mix(in srgb, var(--phase-colour) 35%, var(--tlm-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--phase-colour) 7%, var(--tlm-surface)) !important;
  color: var(--tlm-phase-chip-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-chip-text) !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  font-size: .78rem !important;
  font-weight: 850 !important;
}

#timeline-manager .hd-tlm-phase-colour > span:first-child,
.hd-tool-page--timeline-manager .hd-tlm-phase-colour > span:first-child {
  inline-size: 16px !important;
  block-size: 16px !important;
  flex: 0 0 16px !important;
  border-radius: 999px !important;
  background: var(--phase-colour) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--phase-colour) 18%, transparent) !important;
}

#timeline-manager .hd-tlm-phase-toggle,
.hd-tool-page--timeline-manager .hd-tlm-phase-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  min-width: 68px !important;
  padding: 0 .7rem !important;
  border-radius: 999px !important;
  background: var(--tlm-action) !important;
  color: var(--tlm-action-text) !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#timeline-manager .hd-tlm-phase.is-open .hd-tlm-phase-toggle,
.hd-tool-page--timeline-manager .hd-tlm-phase.is-open .hd-tlm-phase-toggle {
  font-size: 0 !important;
}

#timeline-manager .hd-tlm-phase.is-open .hd-tlm-phase-toggle::after,
.hd-tool-page--timeline-manager .hd-tlm-phase.is-open .hd-tlm-phase-toggle::after {
  content: "Close" !important;
  font-size: .82rem !important;
}

/* WCAG AA colour contract for phase headers.
Generic admin button CSS can otherwise force white text onto these soft phase surfaces. */
#timeline-manager button.hd-tlm-phase-head :is(.hd-tlm-phase-title, .hd-tlm-phase-title *, .hd-help, strong, span),
.hd-tool-page--timeline-manager button.hd-tlm-phase-head :is(.hd-tlm-phase-title, .hd-tlm-phase-title *, .hd-help, strong, span) {
  color: var(--tlm-phase-heading-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-heading-text) !important;
  text-shadow: none !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-title .hd-help,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-title .hd-help {
  color: var(--tlm-phase-body-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-body-text) !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour,
#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour *,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour * {
  color: var(--tlm-phase-chip-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-chip-text) !important;
  text-shadow: none !important;
}

#timeline-manager .hd-tlm-phase-toggle,
#timeline-manager .hd-tlm-phase-toggle *,
.hd-tool-page--timeline-manager .hd-tlm-phase-toggle,
.hd-tool-page--timeline-manager .hd-tlm-phase-toggle * {
  color: var(--tlm-action-text) !important;
  -webkit-text-fill-color: var(--tlm-action-text) !important;
}

/* Compact helper strip below a closed phase. */
#timeline-manager .hd-tlm-phase-quick-actions,
.hd-tool-page--timeline-manager .hd-tlm-phase-quick-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: .65rem !important;
  min-height: 0 !important;
  padding: 8px 16px !important;
  border-top: 0 !important;
  background: color-mix(in srgb, var(--phase-colour) 3%, var(--tlm-surface)) !important;
}

#timeline-manager .hd-tlm-phase-note,
.hd-tool-page--timeline-manager .hd-tlm-phase-note {
  display: inline-flex !important;
  align-items: center !important;
  gap: .35rem !important;
  margin-left: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--tlm-muted) !important;
  font-weight: 700 !important;
  font-size: .84rem !important;
  line-height: 1.25 !important;
}

#timeline-manager .hd-tlm-phase-note::before,
.hd-tool-page--timeline-manager .hd-tlm-phase-note::before {
  display: none !important;
  content: none !important;
}

/* No remove-phase UI for the fixed three-phase structure. */
#timeline-manager .hd-tlm-remove--phase,
.hd-tool-page--timeline-manager .hd-tlm-remove--phase {
  display: none !important;
}

#timeline-manager .hd-tlm-phase__body,
.hd-tool-page--timeline-manager .hd-tlm-phase__body {
  display: block !important;
  min-width: 0 !important;
  padding: 16px !important;
  border-top: 1px solid color-mix(in srgb, var(--phase-colour) 14%, var(--tlm-border)) !important;
  background: color-mix(in srgb, var(--phase-colour) 3%, var(--tlm-surface)) !important;
}

#timeline-manager .hd-tlm-phase__body[hidden],
#timeline-manager .hd-tlm-phase:not(.is-open) .hd-tlm-phase__body,
.hd-tool-page--timeline-manager .hd-tlm-phase__body[hidden],
.hd-tool-page--timeline-manager .hd-tlm-phase:not(.is-open) .hd-tlm-phase__body {
  display: none !important;
}

#timeline-manager .hd-tlm-row-list,
#timeline-manager .hd-tlm-milestones,
.hd-tool-page--timeline-manager .hd-tlm-row-list,
.hd-tool-page--timeline-manager .hd-tlm-milestones {
  display: grid !important;
  gap: .65rem !important;
}

#timeline-manager .hd-tlm-row-editor,
#timeline-manager .hd-tlm-milestone,
.hd-tool-page--timeline-manager .hd-tlm-row-editor,
.hd-tool-page--timeline-manager .hd-tlm-milestone {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--tlm-border) !important;
  border-radius: 14px !important;
  background: var(--tlm-surface-strong) !important;
}

#timeline-manager .hd-tlm-row-editor,
.hd-tool-page--timeline-manager .hd-tlm-row-editor {
  display: grid !important;
  grid-template-columns: minmax(120px, .7fr) minmax(170px, .9fr) minmax(220px, 1.4fr) minmax(80px, .4fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
}

#timeline-manager .hd-tlm-end-date,
.hd-tool-page--timeline-manager .hd-tlm-end-date {
  display: grid !important;
  gap: 4px !important;
  min-height: 100% !important;
  padding: 12px 14px !important;
  border: 1px solid var(--tlm-border) !important;
  border-radius: 14px !important;
  background: var(--tlm-surface-soft) !important;
}

#timeline-manager .hd-tlm-end-date strong,
.hd-tool-page--timeline-manager .hd-tlm-end-date strong {
  color: var(--tlm-heading) !important;
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
}

#timeline-manager .hd-tlm-extra-phase[hidden],
#timeline-manager .hd-tlm-extra-row[hidden],
#timeline-manager .hd-tlm-extra-milestone[hidden],
.hd-tool-page--timeline-manager .hd-tlm-extra-phase[hidden],
.hd-tool-page--timeline-manager .hd-tlm-extra-row[hidden],
.hd-tool-page--timeline-manager .hd-tlm-extra-milestone[hidden] {
  display: none !important;
}

#timeline-manager [data-hd-tlm-dirty][hidden],
#timeline-manager .hd-alert[hidden],
.hd-tool-page--timeline-manager [data-hd-tlm-dirty][hidden],
.hd-tool-page--timeline-manager .hd-alert[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  #timeline-manager .hd-tlm-row-editor,
  .hd-tool-page--timeline-manager .hd-tlm-row-editor,
  #timeline-manager .hd-tlm-five,
  .hd-tool-page--timeline-manager .hd-tlm-five {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  #timeline-manager .hd-tlm-two,
  #timeline-manager .hd-tlm-three,
  #timeline-manager .hd-tlm-five,
  #timeline-manager .hd-tlm-row-editor,
  #timeline-manager .hd-tlm-structure-intro,
  .hd-tool-page--timeline-manager .hd-tlm-two,
  .hd-tool-page--timeline-manager .hd-tlm-three,
  .hd-tool-page--timeline-manager .hd-tlm-five,
  .hd-tool-page--timeline-manager .hd-tlm-row-editor,
  .hd-tool-page--timeline-manager .hd-tlm-structure-intro {
    grid-template-columns: 1fr !important;
  }

  #timeline-manager .hd-tlm-structure-actions,
  .hd-tool-page--timeline-manager .hd-tlm-structure-actions {
    justify-content: flex-start !important;
  }

  #timeline-manager button.hd-tlm-phase-head,
  .hd-tool-page--timeline-manager button.hd-tlm-phase-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #timeline-manager .hd-tlm-phase-colour,
  .hd-tool-page--timeline-manager .hd-tlm-phase-colour {
    grid-column: 1 / -1 !important;
    justify-self: start !important;
  }

  #timeline-manager .hd-tlm-phase-quick-actions,
  .hd-tool-page--timeline-manager .hd-tlm-phase-quick-actions {
    justify-content: flex-start !important;
  }

  #timeline-manager .hd-tlm-phase-note,
  .hd-tool-page--timeline-manager .hd-tlm-phase-note {
    margin-left: 0 !important;
  }
}

@media (max-width: 760px) {
  #timeline-manager,
  .hd-tool-page--timeline-manager,
  .hd-tool-page--timeline {
    width: min(100%, calc(100vw - 18px)) !important;
  }

  #timeline-manager .hd-admin-collapsible-summary,
  .hd-tool-page--timeline-manager .hd-admin-collapsible-summary {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  #timeline-manager .hd-admin-collapsible-summary .hd-help,
  .hd-tool-page--timeline-manager .hd-admin-collapsible-summary .hd-help {
    grid-column: 2 / -1 !important;
  }
}

/* --------------------------------------------------------------------------
HD RMS v1055 palette-token refinement
Purpose: make the fixed three phase cards look like timeline information cards,
not pale buttons, while preserving WCAG AA text tokens and distinct phase accents.
-------------------------------------------------------------------------- */
#timeline-manager,
.hd-tool-page--timeline-manager,
.hd-tool-page--timeline {
  --tlm-phase-title-text: var(--colour-heading, #073a63);
  --tlm-phase-meta-text: var(--colour-text, #12212b);
  --tlm-phase-helper-text: var(--colour-muted, #526474);
  --tlm-phase-chip-bg: var(--colour-surface, #fffdf8);
  --tlm-phase-chip-text: var(--colour-heading, #073a63);
}

#timeline-manager .hd-tlm-phase,
.hd-tool-page--timeline-manager .hd-tlm-phase {
  background:
  linear-gradient(90deg,
  color-mix(in srgb, var(--phase-colour) 13%, var(--tlm-surface)) 0%,
  color-mix(in srgb, var(--phase-colour) 6%, var(--tlm-surface)) 42%,
  var(--tlm-surface) 100%) !important;
  border-color: color-mix(in srgb, var(--phase-colour) 42%, var(--tlm-border)) !important;
  border-left-color: var(--phase-colour) !important;
}

#timeline-manager button.hd-tlm-phase-head,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head {
  min-height: 68px !important;
  background:
  linear-gradient(90deg,
  color-mix(in srgb, var(--phase-colour) 16%, var(--tlm-surface)) 0%,
  color-mix(in srgb, var(--phase-colour) 8%, var(--tlm-surface)) 48%,
  color-mix(in srgb, var(--tlm-surface) 96%, var(--phase-colour) 4%) 100%) !important;
  color: var(--tlm-phase-title-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-title-text) !important;
}

#timeline-manager button.hd-tlm-phase-head :is(.hd-tlm-phase-title,.hd-tlm-phase-title *,strong,span),
.hd-tool-page--timeline-manager button.hd-tlm-phase-head :is(.hd-tlm-phase-title,.hd-tlm-phase-title *,strong,span) {
  color: var(--tlm-phase-title-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-title-text) !important;
  text-shadow: none !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-title .hd-help,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-title .hd-help {
  color: var(--tlm-phase-meta-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-meta-text) !important;
  font-weight: 760 !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour {
  background: var(--tlm-phase-chip-bg) !important;
  border-color: color-mix(in srgb, var(--phase-colour) 46%, var(--tlm-border)) !important;
  color: var(--tlm-phase-chip-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-chip-text) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--phase-colour) 10%, transparent) !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour *,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour * {
  color: var(--tlm-phase-chip-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-chip-text) !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour > span:first-child,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-colour > span:first-child {
  background: var(--phase-colour) !important;
  -webkit-text-fill-color: transparent !important;
  box-shadow:
  0 0 0 3px color-mix(in srgb, var(--phase-colour) 18%, transparent),
  inset 0 0 0 1px color-mix(in srgb, #000 18%, transparent) !important;
}

#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-toggle,
#timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-toggle *,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-toggle,
.hd-tool-page--timeline-manager button.hd-tlm-phase-head .hd-tlm-phase-toggle * {
  color: var(--tlm-action-text) !important;
  -webkit-text-fill-color: var(--tlm-action-text) !important;
}

#timeline-manager .hd-tlm-phase-quick-actions,
.hd-tool-page--timeline-manager .hd-tlm-phase-quick-actions {
  background: color-mix(in srgb, var(--phase-colour) 4%, var(--tlm-surface)) !important;
  border-top: 1px solid color-mix(in srgb, var(--phase-colour) 14%, var(--tlm-border)) !important;
}

#timeline-manager .hd-tlm-phase-quick-actions :is(.hd-help,.hd-tlm-phase-note),
.hd-tool-page--timeline-manager .hd-tlm-phase-quick-actions :is(.hd-help,.hd-tlm-phase-note) {
  color: var(--tlm-phase-helper-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-helper-text) !important;
}

@media (max-width: 760px) {
  #timeline-manager button.hd-tlm-phase-head,
  .hd-tool-page--timeline-manager button.hd-tlm-phase-head {
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: .65rem !important;
  }

  #timeline-manager .hd-tlm-phase-colour,
  .hd-tool-page--timeline-manager .hd-tlm-phase-colour {
    grid-column: 1 / -1 !important;
    width: max-content !important;
  }
}

/* --------------------------------------------------------------------------
HD RMS v1056 Timeline Manager content cleanup
Removes redundant fixed-phase explanatory strips and keeps action areas compact.
This is part of the full replacement for admin_timeline_manager, not an appended runtime patch.
-------------------------------------------------------------------------- */
#timeline-manager .hd-tlm-final-actions-card,
.hd-tool-page--timeline-manager .hd-tlm-final-actions-card {
  padding: clamp(12px, 1.6vw, 18px) !important;
}

#timeline-manager .hd-tlm-actions--final,
.hd-tool-page--timeline-manager .hd-tlm-actions--final {
  justify-content: flex-start !important;
  align-items: center !important;
}

#timeline-manager .hd-tlm-phase__body > .hd-actions.hd-mb-12,
.hd-tool-page--timeline-manager .hd-tlm-phase__body > .hd-actions.hd-mb-12 {
  padding: .65rem .75rem !important;
  border: 1px solid color-mix(in srgb, var(--tlm-border) 84%, transparent) !important;
  border-radius: var(--tlm-radius-sm) !important;
  background: color-mix(in srgb, var(--tlm-surface-soft) 55%, transparent) !important;
}

#timeline-manager .hd-tlm-phase-title strong,
.hd-tool-page--timeline-manager .hd-tlm-phase-title strong {
  color: var(--tlm-phase-heading-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-heading-text) !important;
}

#timeline-manager .hd-tlm-phase-title .hd-help,
.hd-tool-page--timeline-manager .hd-tlm-phase-title .hd-help {
  color: var(--tlm-phase-body-text) !important;
  -webkit-text-fill-color: var(--tlm-phase-body-text) !important;
}

/* HD RMS v1057 Timeline Manager date/order and toolbar spacing tidy
Keep dates readable in the admin summary and give the structure actions breathing room. */
#timeline-manager .hd-tlm-structure-intro,
.hd-tool-page--timeline-manager .hd-tlm-structure-intro {
  align-items: start !important;
}

#timeline-manager .hd-tlm-structure-actions,
.hd-tool-page--timeline-manager .hd-tlm-structure-actions {
  padding-top: .65rem !important;
  align-self: start !important;
}

#timeline-manager .hd-tlm-phase-title .hd-help,
.hd-tool-page--timeline-manager .hd-tlm-phase-title .hd-help {
  font-variant-numeric: tabular-nums !important;
  letter-spacing: .005em !important;
}

#timeline-manager .hd-tlm-phase-quick-actions,
.hd-tool-page--timeline-manager .hd-tlm-phase-quick-actions {
  padding-block: .7rem !important;
}

#timeline-manager .hd-tlm-phase-colour,
.hd-tool-page--timeline-manager .hd-tlm-phase-colour {
  color: var(--tlm-heading) !important;
  -webkit-text-fill-color: var(--tlm-heading) !important;
}

@media (max-width: 900px) {
  #timeline-manager .hd-tlm-structure-intro,
  .hd-tool-page--timeline-manager .hd-tlm-structure-intro {
    grid-template-columns: 1fr !important;
  }

  #timeline-manager .hd-tlm-structure-actions,
  .hd-tool-page--timeline-manager .hd-tlm-structure-actions {
    justify-content: flex-start !important;
    padding-top: .25rem !important;
  }
}

/* HD v1058 timeline manager copy and spacing refinement */
.hd-tlm-phase-quick-actions {
  justify-content: flex-end !important;
  gap: .55rem !important;
  padding: .65rem clamp(1rem, 2vw, 1.4rem) !important;
}

.hd-tlm-phase-quick-actions .hd-help {
  margin: 0 !important;
  color: var(--colour-text, #203040) !important;
  -webkit-text-fill-color: var(--colour-text, #203040) !important;
  font-weight: 650 !important;
}

.hd-admin-collapsible-section summary.hd-admin-collapsible-summary {
  min-height: 46px !important;
}

.hd-tlm-structure-actions {
  padding-top: .45rem !important;
}

/* === Page content editor [page_content_editor] === */
/* HD RMS page_content_editor v981
Clean owner section.
Owns page/content editor layout, editor sections, inline-public preview tooling,
editor-specific controls, rich-editor modals, editor content previews and page builder UI.
Rehome notes:
- Editor preview list/table/card/link rules that had previously drifted into page_content_blocks
are kept here, scoped to editor content/preview surfaces only.
- Page-editor command panel, inline toolbar, dirty state and page-editor More actions are kept here.
- Generic buttons, form fields, media-library cards, admin hub cards, public page cards,
public content display and generic admin shell styling remain with their own owners.
*/
:root {
  --hd-pce-gap-xs: .45rem;
  --hd-pce-gap-sm: .65rem;
  --hd-pce-gap: clamp(.85rem, 1.5vw, 1.15rem);
  --hd-pce-gap-lg: clamp(1rem, 2vw, 1.45rem);
  --hd-pce-radius-sm: 10px;
  --hd-pce-radius: 14px;
  --hd-pce-radius-lg: 18px;
  --hd-pce-border: var(--colour-border-soft, #d8cdb9);
  --hd-pce-surface: var(--colour-surface, #fffdf8);
  --hd-pce-surface-soft: var(--colour-surface-soft, #f7f0df);
  --hd-pce-heading: var(--colour-heading, #073a63);
  --hd-pce-text: var(--colour-text, #12212b);
  --hd-pce-muted: var(--colour-muted, #526474);
  --hd-pce-focus: var(--colour-focus, var(--colour-accent, #0b6fb3));
  --hd-pce-warning: var(--colour-warning, #8a6400);
  --hd-pce-shadow: 0 12px 28px rgba(10,24,32,.075);
  --hd-pce-toolbar-top: calc(var(--admin-strip-height, 52px) + 10px);
}

/* Main page-content editor surfaces */
.hd-tool-page--page-content,
.hd-page-content-editor,
.hd-page-editor,
.hd-editor-shell,
.hd-editor-panel,
.hd-editor-surface,
.hd-content-editor,
.hd-inline-editor-wrap,
.hd-inline-output-shell {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-tool-page--page-content {
  display: grid !important;
  gap: var(--hd-pce-gap-lg) !important;
}

/* Inline-public preview shell */
body.hd-admin-public-inline-preview #hd-site-shell.hd-inline-public-site-shell {
  width: min(100%, var(--shell-max-width, 1180px)) !important;
  margin-inline: auto !important;
  overflow: visible !important;
  background: var(--colour-page-bg, var(--hd-pce-surface)) !important;
}

body.hd-admin-public-inline-preview .hd-inline-output-shell,
body.hd-admin-public-inline-preview .hd-inline-editor-wrap,
body.hd-admin-public-inline-preview #hd-inline-page-form {
  overflow: visible !important;
  max-height: none !important;
}

body.hd-admin-public-inline-preview .hd-inline-page-inner {
  padding-top: clamp(8px, 1vw, 14px) !important;
}

/* Editor command/header panel */
body.hd-admin-public-inline-preview .hd-page-editor-command-panel,
.hd-tool-page--page-content .hd-page-editor-command-panel {
  overflow: hidden !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius-lg) !important;
  background: var(--hd-pce-surface) !important;
  box-shadow: var(--hd-pce-shadow) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-command-panel__inner,
.hd-tool-page--page-content .hd-page-editor-command-panel__inner {
  display: grid !important;
  gap: 0 !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand,
.hd-tool-page--page-content .hd-page-editor-brand {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: clamp(10px, 1.6vw, 18px) !important;
  align-items: center !important;
  padding: clamp(14px, 2vw, 22px) !important;
  border-bottom: 1px solid var(--hd-pce-border) !important;
}

.hd-page-editor-brand__mark {
  inline-size: clamp(42px, 4.5vw, 70px) !important;
  block-size: clamp(42px, 4.5vw, 70px) !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 5px !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: 14px !important;
  background: var(--hd-pce-surface-soft) !important;
  overflow: hidden !important;
}

.hd-page-editor-brand__mark img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.hd-page-editor-brand__copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

.hd-page-editor-brand__copy h1 {
  margin: 0 !important;
  color: var(--hd-pce-heading) !important;
  font-size: clamp(1.55rem, 3vw, 2.55rem) !important;
  line-height: 1.08 !important;
  letter-spacing: .06em !important;
}

.hd-page-editor-brand__copy .hd-help,
.hd-page-editor-brand__copy .hd-inline-meta {
  max-width: 72ch !important;
  color: var(--hd-pce-muted) !important;
  line-height: 1.4 !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions,
.hd-tool-page--page-content .hd-page-editor-command-panel__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 12px clamp(14px, 2vw, 22px) !important;
  background: color-mix(in srgb, var(--hd-pce-surface) 86%, var(--hd-pce-surface-soft) 14%) !important;
}

/* Sticky inline admin bar */
.hd-inline-admin-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 12000 !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--hd-pce-border) !important;
  background: color-mix(in srgb, var(--hd-pce-surface-soft) 92%, transparent) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 10px 28px rgba(20,24,48,.10) !important;
}

.hd-inline-admin-bar__inner {
  width: min(100%, 1180px) !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: minmax(220px,.9fr) minmax(420px,1.4fr) !important;
  gap: 12px !important;
  align-items: center !important;
}

.hd-editor-command-toolbar__intro {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.hd-editor-command-toolbar__intro strong {
  color: var(--hd-pce-heading) !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
}

.hd-editor-command-toolbar__intro .hd-inline-meta {
  max-width: 58ch !important;
  color: var(--hd-pce-muted) !important;
  font-size: .9rem !important;
  line-height: 1.35 !important;
}

.hd-inline-toolbar-hidden .hd-inline-admin-bar {
  transform: translateY(calc(-100% + 8px)) !important;
  transition: transform .18s ease !important;
}

.hd-inline-toolbar-reveal {
  position: fixed !important;
  top: 12px !important;
  right: 18px !important;
  z-index: 12001 !important;
}

/* Editor toolbars */
.hd-inline-public-toolbar,
.hd-editor-toolbar,
.hd-page-content-toolbar,
.hd-editor-actions,
.hd-editor-tabs,
.hd-editor-statusbar,
.hd-page-editor-section-tools,
.hd-editor-block-tools,
.hd-advanced-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: center !important;
  min-width: 0 !important;
}

.hd-editor-toolbar,
.hd-inline-toolbar,
.hd-page-content-toolbar,
.hd-page-editor-section-tools,
.hd-editor-block-tools,
.hd-advanced-actions {
  padding: .65rem !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius) !important;
  background: color-mix(in srgb, var(--hd-pce-surface) 84%, var(--hd-pce-surface-soft) 16%) !important;
}

body.hd-admin-public-inline-preview .hd-inline-toolbar {
  position: sticky !important;
  top: var(--hd-pce-toolbar-top) !important;
  z-index: 50 !important;
  overflow-x: auto !important;
  box-shadow: 0 10px 24px rgba(5,59,93,.06) !important;
}

/* Editor sections */
.hd-inline-section-card,
.hd-page-editor-section,
.hd-page-content-advanced-section,
.hd-page-picker-card,
.hd-tool-page--page-content details.hd-card {
  display: block !important;
  visibility: visible !important;
  min-width: 0 !important;
  overflow: visible !important;
  border-radius: var(--hd-pce-radius-lg) !important;
}

.hd-inline-section-card + .hd-inline-section-card,
.hd-page-content-advanced-section + .hd-page-content-advanced-section {
  margin-top: var(--hd-pce-gap) !important;
}

.hd-inline-section-card[data-hd-new-inline-section="1"] {
  border-style: dashed !important;
}

.hd-inline-section-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 1rem !important;
  align-items: center !important;
  min-height: 0 !important;
}

.hd-inline-section-count,
.hd-inline-section-summary__actions,
.hd-inline-section-local-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: center !important;
}

.hd-inline-section-edit-panel[hidden],
.hd-admin-public-inline-preview .hd-inline-section-edit-panel[hidden],
body.hd-admin-public-inline-preview .hd-inline-section-card[hidden] {
  display: none !important;
}

.hd-inline-section-card.is-editing .hd-inline-section-edit-panel,
.hd-admin-public-inline-preview .hd-inline-section-edit-panel:not([hidden]) {
  display: block !important;
  margin-top: .9rem !important;
  padding-top: .9rem !important;
  border-top: 1px solid var(--hd-pce-border) !important;
}

.hd-admin-public-inline-preview [data-hd-open-all-sections],
.hd-admin-public-inline-preview [data-hd-close-all-sections],
.hd-admin-public-inline-preview [data-hd-page-edit-toggle],
.hd-admin-public-inline-preview .hd-inline-section-summary {
  position: relative !important;
  z-index: 4 !important;
  pointer-events: auto !important;
}

/* Editor canvas and previews */
.hd-editor-canvas,
.hd-editor-preview,
.hd-preview-frame,
.hd-wysiwyg-frame,
.hd-advanced-html-preview {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: auto !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius) !important;
  background: var(--hd-pce-surface) !important;
}

.hd-editor-canvas {
  padding: clamp(.85rem, 2vw, 1.25rem) !important;
}

.hd-advanced-html-preview {
  margin-top: .8rem !important;
  padding: 1rem !important;
  line-height: 1.6 !important;
  box-shadow: 0 8px 22px rgba(10,24,32,.05) !important;
}

.hd-advanced-html-preview:empty::before {
  content: "Rendered preview will appear here.";
  color: var(--hd-pce-muted);
}

.hd-editor-preview iframe,
.hd-preview-frame iframe,
.hd-wysiwyg-frame iframe {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
}

.hd-editor-empty,
.hd-editor-note,
.hd-editor-help {
  color: var(--hd-pce-muted) !important;
  line-height: 1.55 !important;
}

/* Dirty/unsaved state */
.hd-editor-dirty-indicator,
.hd-unsaved-indicator,
.hd-draft-indicator {
  display: inline-flex !important;
  align-items: center !important;
  gap: .5rem !important;
  padding: .45rem .72rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-warning) 42%, var(--hd-pce-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--hd-pce-warning) 10%, var(--hd-pce-surface)) !important;
  color: var(--hd-pce-heading) !important;
  font-weight: 900 !important;
  font-size: .9rem !important;
  box-shadow: 0 8px 18px rgba(10,24,32,.08) !important;
}

.hd-editor-dirty-indicator[hidden],
.hd-page-editor-dirty-pill,
.hd-page-editor-dirty-pill[hidden] {
  display: none !important;
}

.hd-editor-dirty-indicator__dot {
  inline-size: .65rem !important;
  block-size: .65rem !important;
  border-radius: 999px !important;
  background: var(--hd-pce-warning) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hd-pce-warning) 16%, transparent) !important;
}

.hd-page-content-dirty [data-save-page-content],
.hd-page-content-dirty button[type="submit"] {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hd-pce-warning) 14%, transparent), 0 8px 20px rgba(10,24,32,.10) !important;
}

/* Image selection/resize controls used by the content editor */
.hd-inline-editable .hd-content-image,
.hd-rich-editor .hd-content-image {
  cursor: pointer !important;
}

.hd-inline-editable .hd-content-image:hover,
.hd-rich-editor .hd-content-image:hover {
  outline: 3px solid color-mix(in srgb, var(--hd-pce-focus) 35%, transparent) !important;
  outline-offset: 4px !important;
}

.hd-image-resize-panel {
  position: fixed !important;
  z-index: 200000 !important;
  width: min(760px, calc(100vw - 24px)) !important;
  min-width: min(360px, calc(100vw - 24px)) !important;
  min-height: 280px !important;
  max-height: calc(100vh - 24px) !important;
  resize: both !important;
  overflow: auto !important;
  display: grid !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  padding: 14px !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius-lg) !important;
  background: var(--hd-pce-surface) !important;
  box-shadow: 0 20px 54px rgba(0,0,0,.24) !important;
}

.hd-image-resize-panel[hidden] {
  display: none !important;
}

.hd-image-resize-panel__head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid var(--hd-pce-border) !important;
  cursor: move !important;
}

.hd-image-resize-panel__row {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, .8fr) !important;
  gap: 10px !important;
  align-items: end !important;
}

.hd-image-resize-panel__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  gap: 8px !important;
}

.hd-image-resize-panel .hd-image-alt-field {
  display: grid !important;
  gap: 6px !important;
  margin: 4px 0 8px !important;
}

.hd-image-resize-panel .hd-image-alt-field .hd-input {
  width: 100% !important;
}

/* Shared rich-editor link/card modals are owned by Admin shared rich editor component. */

/* Page-editor More actions only;
generic More tools belongs to admin_tool_interfaces */
.hd-page-editor-more-actions {
  position: relative !important;
}

.hd-page-editor-more-actions[open] .hd-page-editor-more-actions__menu {
  z-index: 10020 !important;
}

.hd-page-editor-more-actions__menu {
  position: absolute !important;
  top: calc(100% + .5rem) !important;
  right: 0 !important;
  z-index: 50 !important;
  min-width: min(280px, calc(100vw - 2rem)) !important;
  display: grid !important;
  gap: .5rem !important;
  padding: .75rem !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius-lg) !important;
  background: var(--hd-pce-surface) !important;
  box-shadow: 0 18px 42px rgba(7,30,49,.18) !important;
}

.hd-page-editor-more-actions__menu .hd-btn {
  width: 100% !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Rehomed editor-content preview rules.
These are intentionally scoped to editable/preview/editor surfaces only. */
.hd-inline-editable a,
.hd-rich-editor a,
.hd-advanced-html-preview a,
.hd-content-standard a,
.hd-content-link {
  color: var(--colour-link, var(--colour-primary, #073a63)) !important;
  text-decoration: underline !important;
  text-decoration-thickness: .09em !important;
  text-underline-offset: .18em !important;
  font-weight: 700 !important;
}

.hd-inline-editable a:hover,
.hd-rich-editor a:hover,
.hd-advanced-html-preview a:hover,
.hd-content-standard a:hover {
  color: var(--colour-link-hover, var(--colour-accent, #0b6fb3)) !important;
}

.hd-rich-editor[data-rte-link-selected="1"] a:focus,
.hd-inline-editable a:focus {
  outline: 3px solid color-mix(in srgb, var(--hd-pce-focus) 45%, transparent) !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
}

.hd-inline-editable,
.hd-rich-editor,
.hd-content-standard {
  min-width: 0 !important;
  line-height: 1.62 !important;
}

.hd-inline-editable :where(ul, ol),
.hd-rich-editor :where(ul, ol),
.hd-content-standard :where(ul, ol),
.hd-content-list {
  display: block !important;
  margin: 1rem 0 1.15rem 1.45rem !important;
  padding-left: 1.1rem !important;
  list-style-position: outside !important;
  line-height: 1.62 !important;
}

.hd-inline-editable ul,
.hd-rich-editor ul,
.hd-content-standard ul,
.hd-content-list--bullets {
  list-style-type: disc !important;
}

.hd-inline-editable ol,
.hd-rich-editor ol,
.hd-content-standard ol,
.hd-content-list--numbered {
  list-style-type: decimal !important;
}

.hd-inline-editable li,
.hd-rich-editor li,
.hd-content-standard li,
.hd-content-list__item {
  display: list-item !important;
  margin: .34rem 0 !important;
  padding-left: .15rem !important;
  max-width: 72ch !important;
}

.hd-inline-editable li::marker,
.hd-rich-editor li::marker,
.hd-content-standard li::marker,
.hd-content-list__item::marker {
  font-weight: 900 !important;
  color: var(--hd-pce-heading) !important;
}

.hd-content-table-wrap,
.hd-inline-editable .hd-content-table-wrap,
.hd-rich-editor .hd-content-table-wrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  margin: 1rem 0 !important;
}

.hd-inline-editable table,
.hd-rich-editor table,
.hd-content-standard table,
.hd-content-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-heading) 18%, transparent) !important;
  border-radius: var(--hd-pce-radius) !important;
  overflow: hidden !important;
  background: var(--hd-pce-surface) !important;
}

.hd-inline-editable th,
.hd-inline-editable td,
.hd-rich-editor th,
.hd-rich-editor td,
.hd-content-standard th,
.hd-content-standard td,
.hd-content-table th,
.hd-content-table td {
  padding: .72rem .85rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--hd-pce-heading) 12%, transparent) !important;
  vertical-align: top !important;
}

.hd-inline-editable tr:last-child td,
.hd-rich-editor tr:last-child td,
.hd-content-standard tr:last-child td,
.hd-content-table tr:last-child td {
  border-bottom: 0 !important;
}

.hd-content-card {
  margin: 1.1rem 0 !important;
  padding: 1.1rem 1.2rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-heading) 16%, transparent) !important;
  border-radius: var(--hd-pce-radius-lg) !important;
  box-shadow: 0 12px 28px rgba(5,59,93,.07) !important;
}

.hd-content-card h3 {
  margin: 0 0 .45rem !important;
  color: var(--hd-pce-heading) !important;
}

.hd-content-card p:last-child {
  margin-bottom: 0 !important;
}

.hd-content-card--soft {
  background: linear-gradient(180deg, var(--hd-pce-surface), var(--hd-pce-surface-soft)) !important;
}

.hd-content-card--accent {
  border-left: 5px solid var(--hd-pce-heading) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-pce-heading) 10%, transparent), color-mix(in srgb, var(--colour-accent, #d1a13e) 14%, transparent)) !important;
}

/* Colour tools inside inline editor controls */
.hd-admin-public-inline-preview .hd-colour-tool {
  display: inline-flex !important;
  align-items: center !important;
  gap: .35rem !important;
  padding: .25rem .4rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-heading) 14%, transparent) !important;
  border-radius: 12px !important;
  background: var(--hd-pce-surface) !important;
}

.hd-admin-public-inline-preview .hd-colour-tool-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: .35rem !important;
  color: var(--hd-pce-heading) !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
}

.hd-admin-public-inline-preview .hd-colour-tool input[type="color"] {
  inline-size: 2.2rem !important;
  block-size: 1.85rem !important;
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-heading) 18%, transparent) !important;
  border-radius: 8px !important;
  background: var(--hd-pce-surface) !important;
}

/* Responsive behaviour */
@media (max-width: 980px) {
  .hd-inline-admin-bar__inner {
    grid-template-columns: 1fr !important;
  }

  .hd-inline-admin-bar .hd-actions,
  body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 760px) {
  .hd-inline-admin-bar {
    padding: 8px !important;
  }

  .hd-editor-command-toolbar__intro .hd-inline-meta {
    display: none !important;
  }

  .hd-inline-admin-bar .hd-actions,
  body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .hd-inline-admin-bar .hd-btn,
  body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions .hd-btn,
  body.hd-admin-public-inline-preview .hd-page-editor-more-actions > summary.hd-btn {
    width: 100% !important;
    white-space: normal !important;
  }

  .hd-editor-dirty-indicator {
    width: 100% !important;
    justify-content: center !important;
    margin-left: 0 !important;
    font-size: .88rem !important;
  }

  .hd-image-resize-panel__row,
  .hd-image-resize-panel__grid,
  .hd-page-editor-more-actions__menu {
    position: fixed !important;
    left: 1rem !important;
    right: 1rem !important;
    top: auto !important;
    bottom: 1rem !important;
  }

  .hd-content-standard :where(ul, ol),
  .hd-inline-editable :where(ul, ol),
  .hd-rich-editor :where(ul, ol),
  .hd-content-list {
    margin-left: 1.2rem !important;
  }
}

/* v1019 advanced page content manager presentation tidy */
.hd-tool-page--page-content {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin-inline: auto;
}

.hd-tool-page--page-content .hd-admin-top,
.hd-tool-page--page-content > section {
  width: 100%;
}

.hd-tool-page--page-content .hd-card {
  border-radius: 20px;
}

.hd-tool-page--page-content .hd-page-picker-card form,
.hd-tool-page--page-content .hd-advanced-actions,
.hd-tool-page--page-content .hd-page-editor-section-tools {
  align-items: center;
  gap: 12px;
}

.hd-tool-page--page-content .hd-page-picker-label {
  min-width: min(100%, 320px);
  flex: 1 1 320px;
}

.hd-tool-page--page-content .hd-page-picker-select {
  min-height: 44px;
}

.hd-tool-page--page-content .hd-grid-2 {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.hd-tool-page--page-content .hd-page-content-advanced-section,
.hd-tool-page--page-content .hd-advanced-editor-section {
  border: 1px solid rgba(43, 43, 92, .16);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: rgba(255,255,255,.9);
}

.hd-tool-page--page-content .hd-page-content-advanced-section summary,
.hd-tool-page--page-content .hd-advanced-editor-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.hd-tool-page--page-content .hd-page-content-advanced-section summary::-webkit-details-marker,
.hd-tool-page--page-content .hd-advanced-editor-section summary::-webkit-details-marker {
  display: none;
}

.hd-tool-page--page-content .hd-page-content-advanced-section summary::after,
.hd-tool-page--page-content .hd-advanced-editor-section summary::after {
  content: 'Open';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--hd-action-bg, #3f407e);
  color: var(--hd-action-fg, #fff);
  font-size: .88rem;
  font-weight: 700;
}

.hd-tool-page--page-content .hd-page-content-advanced-section[open] summary::after,
.hd-tool-page--page-content .hd-advanced-editor-section[open] summary::after {
  content: 'Close';
}

.hd-tool-page--page-content .hd-page-content-advanced-section summary + *,
.hd-tool-page--page-content .hd-advanced-editor-section summary + * {
  margin-top: 0 !important;
}

.hd-tool-page--page-content .hd-page-content-advanced-section[open],
.hd-tool-page--page-content .hd-advanced-editor-section[open] {
  padding-bottom: 18px;
}

.hd-tool-page--page-content .hd-page-content-advanced-section[open] > :not(summary),
.hd-tool-page--page-content .hd-advanced-editor-section[open] > :not(summary) {
  margin-inline: 20px;
}

.hd-tool-page--page-content .hd-advanced-html,
.hd-tool-page--page-content .hd-advanced-html-preview {
  min-height: 220px;
}

.hd-tool-page--page-content .hd-advanced-html-preview {
  margin-top: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(43,43,92,.24);
  background: rgba(255,255,255,.68);
}

.hd-tool-page--page-content .hd-table-wrap {
  border-radius: 18px;
  overflow: auto;
}

@media (max-width: 760px) {
  .hd-tool-page--page-content {
    width: min(100%, calc(100vw - 24px));
  }

  .hd-tool-page--page-content .hd-grid-2 {
    grid-template-columns: 1fr;
  }

  .hd-tool-page--page-content .hd-page-content-advanced-section summary,
  .hd-tool-page--page-content .hd-advanced-editor-section summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* === v1020 Advanced Page Content Manager visual standardisation === */
.hd-tool-page--page-content {
  --hd-tool-accent:#49616f;
  max-width:min(1180px,calc(100vw - 3rem));
}

.hd-main-content-advanced .hd-card {
  border-color:rgba(73,97,111,.22);
}

.hd-main-content-advanced .hd-page-title {
  font-size:clamp(2rem,4vw,3rem);
  line-height:1.05;
}

.hd-main-content-advanced .hd-card h2,.hd-main-content-advanced .hd-h2 {
  color:#20295f;
}

.hd-main-content-advanced .hd-grid,.hd-main-content-advanced .hd-form-grid {
  gap:1rem;
}

.hd-main-content-advanced .hd-field {
  display:grid;
  gap:.35rem;
}

.hd-main-content-advanced .hd-section-row,.hd-main-content-advanced .hd-page-section-row {
  border:1px solid rgba(73,97,111,.18);
  border-radius:16px;
  background:linear-gradient(135deg,#fff,#f9fbfc);
  padding:1rem;
  margin:.75rem 0;
  box-shadow:0 10px 24px rgba(37,38,85,.04);
}

.hd-main-content-advanced details {
  border:1px solid rgba(73,97,111,.18);
  border-radius:16px;
  background:#fff;
  margin:.75rem 0;
  overflow:hidden;
}

.hd-main-content-advanced details > summary {
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:1rem;
  align-items:center;
  padding:.9rem 1rem;
  background:linear-gradient(135deg,rgba(73,97,111,.10),#fff);
  font-weight:800;
  cursor:pointer;
}

.hd-main-content-advanced details > summary::-webkit-details-marker {
  display:none;
}

.hd-main-content-advanced details > summary::before {
  content:'›';
  display:grid;
  place-items:center;
  width:1.8rem;
  height:1.8rem;
  border-radius:999px;
  background:var(--hd-tool-accent);
  color:#fff;
  transition:transform .18s ease;
}

.hd-main-content-advanced details[open] > summary::before {
  transform:rotate(90deg);
}

.hd-main-content-advanced .hd-revision-table,.hd-main-content-advanced table {
  border-radius:16px;
  overflow:hidden;
}

.hd-main-content-advanced .hd-revision-table .hd-actions,.hd-main-content-advanced td .hd-actions {
  justify-content:flex-end;
}

@media (max-width:900px) {
  .hd-tool-page--page-content {
    max-width:calc(100vw - 1.25rem)
  }

  .hd-main-content-advanced .hd-btn {
    width:100%;
    justify-content:center
  }

  .hd-main-content-advanced details > summary {
    grid-template-columns:auto 1fr
  }
}

/* === end v1020 Advanced Page Content Manager visual standardisation === */

/* v1025-admin-tool-ui-standardisation: page content and easy editor review */
.hd-tool-page--page-content .hd-card,
.hd-main-content-advanced .hd-card {
  padding:clamp(18px,2.4vw,28px);
}

.hd-tool-page--page-content .hd-page-editor-section-tools {
  align-items:center;
  justify-content:space-between;
  padding:.85rem 1rem;
  border:1px solid rgba(31,35,77,.14);
  border-radius:16px;
  background:linear-gradient(90deg, rgba(50,52,112,.08), rgba(184,135,47,.06));
}

.hd-page-content-advanced-section > summary {
  min-height:3.25rem;
}

.hd-page-content-advanced-section[open] {
  outline:2px solid rgba(184,135,47,.16);
  box-shadow:0 18px 42px rgba(31,35,77,.08);
}

.hd-editor-modal-root {
  z-index:2147482400!important;
}

.hd-editor-modal__panel {
  border-radius:26px!important;
}

.hd-editor-modal__head {
  background:linear-gradient(90deg, rgba(50,52,112,.12), rgba(184,135,47,.08))!important;
}

.hd-image-resize-panel {
  resize:both!important;
  min-width:min(520px, calc(100vw - 24px))!important;
  min-height:360px!important;
  border-radius:22px!important;
  outline:1px solid rgba(50,52,112,.14)!important;
}

.hd-image-resize-panel__head {
  background:rgba(50,52,112,.07)!important;
  border-radius:14px!important;
  padding:.75rem!important;
}

.hd-image-resize-panel__grid {
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;
}

@media (max-width:760px) {
  .hd-image-resize-panel {
    inset:12px!important;
    width:auto!important;
    max-height:calc(100vh - 24px)!important;
    resize:none!important;
  }

  .hd-image-resize-panel__row {
    grid-template-columns:1fr!important;
  }
}

/* HD RMS v1040 Easy Page Content Editor core rework
Owner: page_content_editor.
The Easy Editor is an admin editing surface, not a live public-page browser.
Do not render live public navigation or clickable public links inside it. */
body.hd-admin-public-inline-preview #hd-site-header,
body.hd-admin-public-inline-preview #hd-site-footer,
body.hd-admin-public-inline-preview footer,
body.hd-admin-public-inline-preview .hd-site-header-frame,
body.hd-admin-public-inline-preview .hd-site-header-include {
  display: none !important;
}

body.hd-admin-public-inline-preview #hd-site-shell.hd-inline-public-site-shell {
  isolation: isolate !important;
  background: var(--colour-page-bg, var(--hd-pce-surface)) !important;
}

body.hd-admin-public-inline-preview .hd-main-content-shell--inline-preview,
body.hd-admin-public-inline-preview .hd-main-content-wrapper--inline-preview,
body.hd-admin-public-inline-preview .hd-inline-page-inner {
  position: relative !important;
  z-index: 1 !important;
  filter: none !important;
  opacity: 1 !important;
}

body.hd-admin-public-inline-preview .hd-inline-preview-link {
  color: var(--colour-link, var(--colour-primary, #073a63)) !important;
  text-decoration: underline !important;
  text-decoration-thickness: .09em !important;
  text-underline-offset: .18em !important;
  font-weight: 750 !important;
  cursor: text !important;
}

body.hd-admin-public-inline-preview .hd-inline-preview-link::after {
  content: ' (link)';
  font-size: .72em;
  font-weight: 650;
  opacity: .62;
}

body.hd-admin-public-inline-preview .hd-editor-modal-root:empty,
body.hd-admin-public-inline-preview #hd-editor-modal-root:empty,
body.hd-admin-public-inline-preview #hd-modal-root:empty,
body.hd-admin-public-inline-preview .hd-modal-root:empty {
  display: none !important;
}

body.hd-admin-public-inline-preview:not(.hd-editor-modal-open) .hd-editor-modal-root,
body.hd-admin-public-inline-preview:not(.hd-editor-modal-open) #hd-editor-modal-root,
body.hd-admin-public-inline-preview:not(.hd-modal-open) .hd-modal-root,
body.hd-admin-public-inline-preview:not(.hd-modal-open) #hd-modal-root,
body.hd-admin-public-inline-preview:not(.hd-editor-modal-open) .hd-editor-modal,
body.hd-admin-public-inline-preview:not(.hd-modal-open) .hd-site-modal {
  display: none !important;
  pointer-events: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

body.hd-admin-public-inline-preview .hd-inline-section-card,
body.hd-admin-public-inline-preview .hd-inline-section-summary,
body.hd-admin-public-inline-preview .hd-inline-section-edit-panel,
body.hd-admin-public-inline-preview [data-hd-page-edit-toggle],
body.hd-admin-public-inline-preview [data-hd-open-all-sections],
body.hd-admin-public-inline-preview [data-hd-close-all-sections] {
  position: relative !important;
  pointer-events: auto !important;
  filter: none !important;
}

body.hd-admin-public-inline-preview .hd-inline-section-card.is-editing {
  z-index: 5 !important;
}

body.hd-admin-public-inline-preview .hd-inline-section-edit-panel[hidden] {
  display: none !important;
}

body.hd-admin-public-inline-preview .hd-inline-section-card.is-editing > .hd-inline-section-edit-panel,
body.hd-admin-public-inline-preview .hd-inline-section-edit-panel:not([hidden]) {
  display: block !important;
  z-index: 6 !important;
}

/* HD RMS v1041 Easy Editor button insertion guard
Owner: page_content_editor.
Ensures buttons inserted through the rich editor remain inside the editable content flow. */
body.hd-admin-public-inline-preview .hd-inline-editable .hd-content-button-row,
body.hd-admin-public-inline-preview .hd-rich-editor .hd-content-button-row,
body.hd-admin-public-inline-preview .hd-content-standard .hd-content-button-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .65rem !important;
  margin: 1rem 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  clear: both !important;
}

body.hd-admin-public-inline-preview .hd-inline-editable .hd-content-button,
body.hd-admin-public-inline-preview .hd-rich-editor .hd-content-button,
body.hd-admin-public-inline-preview .hd-content-standard .hd-content-button {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  margin: .15rem 0 !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
}

/* v1063 Advanced Page Content Manager UI/UX refinement */
.hd-tool-page--page-content {
  --page-editor-card-pad: clamp(18px, 2.2vw, 28px);
  --page-editor-gap: clamp(14px, 1.8vw, 22px);
}

.hd-tool-page--page-content .hd-admin-top {
  display: grid !important;
  gap: var(--page-editor-gap) !important;
  margin-bottom: var(--page-editor-gap) !important;
}

.hd-tool-page--page-content .hd-page-heading-card,
.hd-tool-page--page-content .hd-admin-hero,
.hd-tool-page--page-content .hd-card {
  box-sizing: border-box !important;
  padding: var(--page-editor-card-pad) !important;
  border: 1px solid var(--colour-border-soft, #d8c9a8) !important;
  border-radius: 18px !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: 0 14px 34px rgba(23, 34, 44, .06) !important;
}

.hd-tool-page--page-content .hd-page-title {
  margin: 0 !important;
  max-width: 18ch !important;
}

.hd-tool-page--page-content .hd-page-picker-card form {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) repeat(4, auto) !important;
  align-items: end !important;
  gap: .85rem !important;
}

.hd-tool-page--page-content .hd-page-picker-label,
.hd-tool-page--page-content .hd-page-picker-select {
  width: 100% !important;
}

.hd-tool-page--page-content .hd-grid-2 {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
}

.hd-tool-page--page-content .hd-page-editor-section-tools {
  padding: .9rem 1rem !important;
  border: 1px solid var(--colour-border-soft, #d8c9a8) !important;
  border-radius: 14px !important;
  background: var(--colour-surface-soft, #f5f1e8) !important;
  align-items: center !important;
}

.hd-tool-page--page-content .hd-advanced-editor-section {
  padding: 0 !important;
  overflow: clip !important;
}

.hd-tool-page--page-content .hd-advanced-editor-section > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 1rem !important;
  align-items: center !important;
  padding: 1rem 1.15rem !important;
  background: var(--colour-surface-soft, #f5f1e8) !important;
  border-bottom: 1px solid var(--colour-border-soft, #d8c9a8) !important;
  cursor: pointer !important;
}

.hd-tool-page--page-content .hd-advanced-editor-section > summary strong {
  color: var(--colour-heading, #103f3c) !important;
  -webkit-text-fill-color: var(--colour-heading, #103f3c) !important;
}

.hd-tool-page--page-content .hd-advanced-editor-section > summary small {
  display: block !important;
  margin-top: .25rem !important;
  color: var(--colour-text, #253746) !important;
  -webkit-text-fill-color: var(--colour-text, #253746) !important;
  line-height: 1.45 !important;
}

.hd-tool-page--page-content .hd-advanced-editor-section[open] {
  padding-bottom: var(--page-editor-card-pad) !important;
}

.hd-tool-page--page-content .hd-advanced-editor-section[open] > :not(summary) {
  margin-left: var(--page-editor-card-pad) !important;
  margin-right: var(--page-editor-card-pad) !important;
}

.hd-tool-page--page-content .hd-advanced-html {
  min-height: 260px !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace !important;
  line-height: 1.45 !important;
}

.hd-tool-page--page-content .hd-advanced-html-preview {
  margin-top: .8rem !important;
  padding: 1rem !important;
  border: 1px dashed var(--colour-border, #d8c9a8) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 88%, var(--colour-surface-soft, #f5f1e8) 12%) !important;
  min-height: 100px !important;
}

.hd-tool-page--page-content .hd-table-wrap {
  max-width: 100% !important;
  overflow: auto !important;
  border-radius: 14px !important;
}

@media (max-width: 980px) {
  .hd-tool-page--page-content .hd-page-picker-card form,
  .hd-tool-page--page-content .hd-grid-2 {
    grid-template-columns: 1fr !important;
  }

  .hd-tool-page--page-content .hd-page-picker-card form .hd-btn {
    width: 100% !important;
  }
}

/* v1064 Advanced Page Content Manager readability and revision table polish */
.hd-tool-page--page-content {
  max-width: min(1160px, calc(100vw - 48px)) !important;
  margin-inline: auto !important;
}

.hd-tool-page--page-content .hd-page-title {
  max-width: 22ch !important;
  line-height: 1.08 !important;
}

.hd-tool-page--page-content .hd-advanced-html {
  width: 100% !important;
  min-height: 300px !important;
  max-height: 560px !important;
  overflow: auto !important;
  resize: vertical !important;
  font-size: .92rem !important;
  line-height: 1.48 !important;
  tab-size: 2 !important;
}

.hd-tool-page--page-content .hd-advanced-html-preview {
  margin-top: 1rem !important;
  padding: clamp(16px, 2vw, 24px) !important;
  border: 1px dashed var(--colour-border, #d8c9a8) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 92%, var(--colour-surface-soft, #f5f1e8) 8%) !important;
}

.hd-tool-page--page-content .hd-table-wrap,
.hd-tool-page--page-content .hd-revision-table-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
  border-radius: 14px !important;
}

.hd-tool-page--page-content table td:last-child,
.hd-tool-page--page-content table th:last-child {
  min-width: 190px !important;
}

.hd-tool-page--page-content table td:last-child .hd-btn {
  display: inline-flex !important;
  margin: .18rem .18rem .18rem 0 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.hd-tool-page--page-content .hd-page-picker-card form {
  align-items: end !important;
}

/* v1075 Easy Page Content Editor toolbar action correction */
.hd-page-editor-more-actions > summary.hd-btn,
.hd-page-editor-more-actions > summary.hd-btn--secondary {
  background: var(--colour-primary, #35516b) !important;
  color: var(--colour-on-primary, #ffffff) !important;
  -webkit-text-fill-color: var(--colour-on-primary, #ffffff) !important;
  border-color: color-mix(in srgb, var(--colour-primary, #35516b) 76%, #ffffff 24%) !important;
  box-shadow: 0 12px 26px rgba(20, 35, 50, .16) !important;
}

.hd-page-editor-more-actions > summary.hd-btn:is(:hover, :focus-visible),
.hd-page-editor-more-actions[open] > summary.hd-btn {
  background: var(--colour-primary-hover, var(--colour-primary, #2c4359)) !important;
  color: var(--colour-on-primary, #ffffff) !important;
  -webkit-text-fill-color: var(--colour-on-primary, #ffffff) !important;
}

.hd-page-editor-more-actions > summary.hd-btn::marker,
.hd-page-editor-more-actions > summary.hd-btn::-webkit-details-marker {
  display: none !important;
  content: '' !important;
}

/* v1080 Easy Page Content Manager header refinement */
body.hd-admin-public-inline-preview .hd-page-editor-command-panel {
  overflow: visible !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-command-panel__inner {
  align-items: center !important;
  gap: clamp(1.1rem, 2.2vw, 2rem) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand {
  display: grid !important;
  grid-template-columns: clamp(118px, 12vw, 158px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: clamp(1.1rem, 2.2vw, 1.8rem) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand__mark {
  width: clamp(118px, 12vw, 158px) !important;
  min-width: clamp(118px, 12vw, 158px) !important;
  min-height: clamp(92px, 9vw, 124px) !important;
  padding: clamp(.7rem, 1.4vw, 1rem) !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 20px !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand__mark img {
  width: min(100%, 132px) !important;
  height: auto !important;
  max-height: 104px !important;
  object-fit: contain !important;
}

body.hd-admin-public-inline-preview #hd-page-editor-actions-title {
  max-width: 18ch !important;
  line-height: .98 !important;
  letter-spacing: .01em !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions {
  align-items: center !important;
}

@media (max-width: 820px) {
  body.hd-admin-public-inline-preview .hd-page-editor-brand {
    grid-template-columns: 1fr !important;
  }

  body.hd-admin-public-inline-preview .hd-page-editor-brand__mark {
    width: 132px !important;
    min-width: 132px !important;
  }

  body.hd-admin-public-inline-preview #hd-page-editor-actions-title {
    max-width: none !important;
  }
}

/* v1081 Easy and Advanced Page Content Manager UI refresh
Owner: page_content_editor.
Purpose: improve the Easy editor header, action grouping and Advanced manager source-editing surfaces without changing public-page rendering. */
:root {
  --hd-pce-hero-accent: var(--colour-primary, #4d6533);
  --hd-pce-hero-accent-2: var(--colour-accent, #b8793a);
  --hd-pce-code-bg: color-mix(in srgb, var(--colour-heading, #173642) 7%, var(--colour-surface, #fffdf8) 93%);
  --hd-pce-code-ink: var(--colour-text, #102630);
  --hd-pce-code-line: color-mix(in srgb, var(--colour-heading, #173642) 18%, var(--colour-border-soft, #d8c9a8));
}

/* Easy Page Content Manager header */
body.hd-admin-public-inline-preview .hd-easy-editor-hero,
body.hd-admin-public-inline-preview .hd-page-editor-command-panel {
  overflow: hidden !important;
  border-radius: 24px !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-hero-accent) 18%, var(--hd-pce-border, #d8c9a8)) !important;
  background:
  radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--hd-pce-hero-accent-2) 16%, transparent) 0 26%, transparent 42%),
  linear-gradient(135deg, var(--hd-pce-surface, #fffdf8), color-mix(in srgb, var(--hd-pce-surface-soft, #f7f0df) 78%, var(--hd-pce-surface, #fffdf8))) !important;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--colour-shadow, #102630) 12%, transparent) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: clamp(16px, 2.6vw, 28px) !important;
  padding: clamp(18px, 2.8vw, 30px) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--hd-pce-hero-accent) 16%, var(--hd-pce-border, #d8c9a8)) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand__mark {
  inline-size: clamp(78px, 8vw, 116px) !important;
  block-size: clamp(78px, 8vw, 116px) !important;
  border-radius: 24px !important;
  padding: 10px !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 82%, #fff 18%) !important;
  box-shadow: 0 18px 34px color-mix(in srgb, var(--colour-shadow, #102630) 12%, transparent) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand__copy {
  gap: .45rem !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-brand__copy h1 {
  font-size: clamp(2rem, 4.4vw, 3.25rem) !important;
  letter-spacing: .035em !important;
}

body.hd-admin-public-inline-preview .hd-easy-editor-title-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: .85rem 1rem !important;
  align-items: start !important;
  max-width: 95ch !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-dirty-pill {
  justify-self: start !important;
  align-self: start !important;
  margin: .15rem 0 0 !important;
  padding: .48rem .78rem !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--colour-warning, #8a6400) 14%, var(--colour-surface, #fffdf8)) !important;
  color: var(--colour-heading, #173642) !important;
  -webkit-text-fill-color: var(--colour-heading, #173642) !important;
  border: 1px solid color-mix(in srgb, var(--colour-warning, #8a6400) 42%, var(--hd-pce-border, #d8c9a8)) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--colour-warning, #8a6400) 10%, transparent) !important;
}

body.hd-admin-public-inline-preview .hd-easy-editor-action-deck,
body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content)) !important;
  gap: .65rem !important;
  justify-content: start !important;
  align-items: center !important;
  padding: clamp(14px, 2vw, 20px) clamp(18px, 2.8vw, 30px) !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 80%, var(--hd-pce-hero-accent) 6%) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-more-actions__menu {
  border-radius: 18px !important;
  border-color: color-mix(in srgb, var(--hd-pce-hero-accent) 20%, var(--hd-pce-border, #d8c9a8)) !important;
}

/* Advanced manager page structure */
.hd-main-content-advanced.hd-tool-page--page-content {
  display: grid !important;
  gap: clamp(14px, 2vw, 22px) !important;
}

.hd-main-content-advanced .hd-page-heading-card,
.hd-main-content-advanced .hd-advanced-editor-hero,
.hd-main-content-advanced .hd-advanced-editor-page-picker,
.hd-main-content-advanced .hd-advanced-editor-settings-card,
.hd-main-content-advanced .hd-advanced-editor-sections-card {
  border-radius: 24px !important;
  border-color: color-mix(in srgb, var(--hd-pce-hero-accent) 16%, var(--hd-pce-border, #d8c9a8)) !important;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--colour-shadow, #102630) 8%, transparent) !important;
}

.hd-main-content-advanced .hd-page-heading-card {
  background:
  linear-gradient(135deg, color-mix(in srgb, var(--hd-pce-hero-accent) 10%, var(--colour-surface, #fffdf8)), var(--colour-surface, #fffdf8)) !important;
  padding: clamp(20px, 2.8vw, 32px) !important;
}

.hd-main-content-advanced .hd-advanced-editor-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: clamp(14px, 2vw, 24px) !important;
  align-items: center !important;
  padding: clamp(18px, 2.4vw, 26px) !important;
  background:
  radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--hd-pce-hero-accent-2) 12%, transparent), transparent 36%),
  linear-gradient(135deg, var(--colour-surface, #fffdf8), color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 82%, var(--colour-surface, #fffdf8))) !important;
}

.hd-main-content-advanced .hd-advanced-editor-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: .55rem .9rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-hero-accent) 34%, var(--hd-pce-border, #d8c9a8)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--hd-pce-hero-accent) 10%, var(--colour-surface, #fffdf8)) !important;
  color: var(--colour-heading, #173642) !important;
  font-weight: 900 !important;
}

.hd-main-content-advanced .hd-advanced-editor-page-picker form,
.hd-main-content-advanced .hd-advanced-editor-settings-card .hd-grid,
.hd-main-content-advanced .hd-advanced-editor-sections-card .hd-page-editor-section-tools {
  gap: .8rem !important;
}

.hd-main-content-advanced .hd-page-content-advanced-section,
.hd-main-content-advanced .hd-advanced-editor-section {
  border-radius: 20px !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-hero-accent) 14%, var(--hd-pce-border, #d8c9a8)) !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--colour-shadow, #102630) 6%, transparent) !important;
}

.hd-main-content-advanced .hd-page-content-advanced-section > summary,
.hd-main-content-advanced .hd-advanced-editor-section > summary {
  padding: 16px 18px !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hd-pce-hero-accent) 8%, var(--colour-surface, #fffdf8)), var(--colour-surface, #fffdf8)) !important;
}

/* Advanced HTML source editor: CSS Section Editor style */
.hd-advanced-code-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr) !important;
  gap: 1rem !important;
  align-items: start !important;
}

.hd-advanced-code-label {
  grid-column: 1 / -1 !important;
  color: var(--colour-heading, #173642) !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
}

.hd-advanced-code-frame {
  overflow: hidden !important;
  border: 1px solid var(--hd-pce-code-line) !important;
  border-radius: 18px !important;
  background: var(--hd-pce-code-bg) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 60%, transparent), 0 14px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent) !important;
}

.hd-advanced-code-frame__bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: .7rem .9rem !important;
  border-bottom: 1px solid var(--hd-pce-code-line) !important;
  background: color-mix(in srgb, var(--colour-heading, #173642) 9%, var(--colour-surface-soft, #f7f0df)) !important;
  color: var(--colour-heading, #173642) !important;
  font-size: .86rem !important;
  font-weight: 900 !important;
}

.hd-main-content-advanced textarea.hd-advanced-html,
.hd-advanced-code-frame textarea.hd-advanced-html {
  display: block !important;
  width: 100% !important;
  min-height: 360px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--colour-heading, #173642) 5%, transparent) 0 3.1rem, transparent 3.1rem) !important;
  color: var(--hd-pce-code-ink) !important;
  -webkit-text-fill-color: var(--hd-pce-code-ink) !important;
  padding: 1rem 1rem 1rem 4rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
  font-size: .94rem !important;
  line-height: 1.62 !important;
  resize: vertical !important;
  box-shadow: none !important;
  tab-size: 2 !important;
}

.hd-main-content-advanced .hd-advanced-html-preview {
  min-height: 360px !important;
  margin: 0 !important;
  padding: 1rem !important;
  border: 1px solid var(--hd-pce-code-line) !important;
  border-radius: 18px !important;
  background: var(--colour-surface, #fffdf8) !important;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent) !important;
}

.hd-main-content-advanced .hd-advanced-html-preview::before {
  display: block !important;
  margin-bottom: .7rem !important;
  color: var(--colour-muted, #526474) !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

.hd-main-content-advanced .hd-advanced-html-preview:empty::before {
  content: "Rendered preview" !important;
}

@media (max-width: 960px) {
  body.hd-admin-public-inline-preview .hd-easy-editor-title-row,
  .hd-advanced-code-workspace,
  .hd-main-content-advanced .hd-advanced-editor-hero {
    grid-template-columns: 1fr !important;
  }

  body.hd-admin-public-inline-preview .hd-page-editor-dirty-pill {
    justify-self: start !important;
  }
}

@media (max-width: 680px) {
  body.hd-admin-public-inline-preview .hd-page-editor-brand {
    grid-template-columns: 1fr !important;
    text-align: left !important;
  }

  body.hd-admin-public-inline-preview .hd-page-editor-brand__mark {
    inline-size: 82px !important;
    block-size: 82px !important;
  }

  body.hd-admin-public-inline-preview .hd-easy-editor-action-deck,
  body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions {
    grid-template-columns: 1fr !important;
  }

  .hd-main-content-advanced textarea.hd-advanced-html,
  .hd-advanced-code-frame textarea.hd-advanced-html {
    padding-left: 1rem !important;
    background: var(--colour-surface, #fffdf8) !important;
  }
}

/* v1041 controlled pass 1: core editor UI routing and unsaved-state alignment.
Owner: Page Content Editor section. Keeps Easy and Advanced editor controls in this owner section. */
.hd-advanced-editor-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(240px, auto) !important;
  gap: clamp(1rem, 2vw, 1.4rem) !important;
  align-items: start !important;
}

.hd-advanced-editor-hero__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: .55rem !important;
  padding: .75rem !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius) !important;
  background: color-mix(in srgb, var(--hd-pce-surface) 86%, var(--hd-pce-surface-soft) 14%) !important;
}

.hd-advanced-editor-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: .4rem !important;
  min-height: 2rem !important;
  padding: .32rem .62rem !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: 999px !important;
  background: var(--hd-pce-surface) !important;
  color: var(--hd-pce-heading) !important;
  font-weight: 800 !important;
  font-size: .86rem !important;
}

.hd-advanced-editor-section > summary,
.hd-tool-page--page-content details.hd-card > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: .85rem !important;
  align-items: center !important;
  cursor: pointer !important;
  list-style: none !important;
  padding: .95rem 1rem !important;
  border-radius: var(--hd-pce-radius) !important;
  background: color-mix(in srgb, var(--hd-pce-surface) 90%, var(--hd-pce-surface-soft) 10%) !important;
}

.hd-advanced-editor-section > summary::-webkit-details-marker,
.hd-tool-page--page-content details.hd-card > summary::-webkit-details-marker {
  display: none !important;
}

.hd-advanced-editor-section > summary::after,
.hd-tool-page--page-content details.hd-card > summary::after {
  content: "Open" !important;
  display: inline-flex !important;
  justify-content: center !important;
  min-width: 4.4rem !important;
  padding: .38rem .65rem !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: 999px !important;
  background: var(--hd-pce-surface) !important;
  color: var(--hd-pce-heading) !important;
  font-weight: 800 !important;
  font-size: .86rem !important;
}

.hd-advanced-editor-section[open] > summary::after,
.hd-tool-page--page-content details.hd-card[open] > summary::after {
  content: "Close" !important;
}

.hd-advanced-editor-section > summary strong {
  color: var(--hd-pce-heading) !important;
  font-size: 1rem !important;
  line-height: 1.25 !important;
}

.hd-advanced-editor-section > summary small {
  display: block !important;
  margin-top: .2rem !important;
  color: var(--hd-pce-muted) !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

.hd-advanced-editor-section[open] {
  padding: .75rem !important;
}

.hd-advanced-editor-section[open] > summary {
  margin-bottom: .85rem !important;
  border-bottom: 1px solid var(--hd-pce-border) !important;
}

.hd-advanced-code-workspace {
  display: grid !important;
  gap: .7rem !important;
}

.hd-advanced-code-frame {
  overflow: hidden !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius-lg) !important;
  background: color-mix(in srgb, var(--hd-pce-text) 4%, var(--hd-pce-surface)) !important;
  box-shadow: 0 10px 28px rgba(10,24,32,.06) !important;
}

.hd-advanced-code-frame__bar {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  gap: .55rem !important;
  padding: .58rem .75rem !important;
  border-bottom: 1px solid var(--hd-pce-border) !important;
  background: color-mix(in srgb, var(--hd-pce-surface-soft) 68%, var(--hd-pce-surface) 32%) !important;
  color: var(--hd-pce-heading) !important;
  font-weight: 800 !important;
  font-size: .86rem !important;
}

.hd-advanced-html {
  min-height: 18rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace !important;
  font-size: .94rem !important;
  line-height: 1.55 !important;
  background: var(--hd-pce-surface) !important;
  color: var(--hd-pce-text) !important;
  box-shadow: none !important;
}

.hd-inline-section-tools,
.hd-inline-section-local-actions,
.hd-editor-block-tools {
  padding: .65rem !important;
  border: 1px solid var(--hd-pce-border) !important;
  border-radius: var(--hd-pce-radius) !important;
  background: color-mix(in srgb, var(--hd-pce-surface) 88%, var(--hd-pce-surface-soft) 12%) !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-dirty-pill {
  display: inline-flex !important;
  width: fit-content !important;
  margin-top: .45rem !important;
  align-items: center !important;
  gap: .45rem !important;
  padding: .38rem .62rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-pce-warning) 42%, var(--hd-pce-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--hd-pce-warning) 10%, var(--hd-pce-surface)) !important;
  color: var(--hd-pce-heading) !important;
  font-weight: 800 !important;
  font-size: .86rem !important;
}

body.hd-admin-public-inline-preview:not(.hd-page-content-dirty) .hd-page-editor-dirty-pill {
  display: none !important;
}

@media (max-width: 760px) {
  .hd-advanced-editor-hero {
    grid-template-columns: 1fr !important;
  }

  .hd-advanced-editor-hero__actions {
    justify-content: flex-start !important;
  }

  .hd-advanced-editor-section > summary,
  .hd-tool-page--page-content details.hd-card > summary {
    grid-template-columns: 1fr !important;
  }
}

/* Final polish: Easy page content manager action row uses clear primary/secondary hierarchy and balanced spacing. */
body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions,
.hd-tool-page--page-content .hd-page-editor-command-panel__actions {
  gap: clamp(.7rem, 1.4vw, 1rem) !important;
  justify-content: center !important;
  border-radius: 16px !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions .hd-btn--primary,
.hd-tool-page--page-content .hd-page-editor-command-panel__actions .hd-btn--primary {
  min-width: 9.5rem !important;
}

body.hd-admin-public-inline-preview .hd-page-editor-command-panel__actions .hd-btn--secondary,
.hd-tool-page--page-content .hd-page-editor-command-panel__actions .hd-btn--secondary,
body.hd-admin-public-inline-preview .hd-page-editor-more-actions > summary.hd-btn--secondary {
  background: var(--btn-secondary-bg, color-mix(in srgb, var(--colour-surface, #fffdf8) 92%, var(--colour-surface-soft, #edf2e3) 8%)) !important;
  color: var(--btn-secondary-text, var(--colour-heading, #083646)) !important;
  -webkit-text-fill-color: var(--btn-secondary-text, var(--colour-heading, #083646)) !important;
  border-color: var(--btn-secondary-border, color-mix(in srgb, var(--colour-primary, #245f3b) 28%, var(--colour-border-soft, #d8cdb9) 72%)) !important;
  box-shadow: var(--btn-secondary-shadow, 0 3px 10px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent)) !important;
}

/* === Admin image/document/media library tools [admin_editor_media_library] === */
/* =========================================================
HD RMS admin_editor_media_library v975 clean
Owner: admin image library, document library, media picker,
editor media modal, preview frames, upload panels and library cards.
Ownership boundaries:
- This section owns admin media/library layouts and previews only.
- Generic buttons stay in buttons_actions.
- Generic fields stay in forms_fields.
- Generic content cards stay in page_content_blocks/admin_tool_interfaces.
- Public content image rendering stays in page_content_blocks.
========================================================= */
:root {
  --hd-media-lib-gap: clamp(14px, 1.8vw, 22px);
  --hd-media-lib-pad: clamp(16px, 2vw, 24px);
  --hd-media-lib-radius: var(--radius-card, 18px);
  --hd-media-lib-card-bg: var(--colour-surface, #fffdf8);
  --hd-media-lib-panel-bg: color-mix(in srgb, var(--colour-surface-soft, #f7f0e4) 78%, #fff 22%);
  --hd-media-lib-border: var(--colour-border-soft, #e4d7bd);
  --hd-media-lib-shadow: 0 14px 34px rgba(17, 42, 54, .07);
  --hd-media-lib-muted: var(--colour-muted, #506174);
  --hd-media-lib-preview-bg: linear-gradient(145deg, color-mix(in srgb, var(--colour-surface-soft, #f7f0e4) 90%, #fff 10%), var(--colour-surface, #fffdf8));
  --hd-media-lib-preview-min: 150px;
  --hd-media-lib-preview-max: 240px;
  --hd-media-lib-side: clamp(190px, 22vw, 300px);
  --hd-media-modal-z: 16000;
}

/* =========================================================
Editor link preview and media modal
========================================================= */
.hd-inline-editable a,
.hd-rich-editor a,
.hd-inline-editable a:hover,
.hd-rich-editor a:hover,
.hd-advanced-html-preview a:hover,
.hd-inline-editable a:focus-visible,
.hd-rich-editor a:focus-visible,
.hd-rich-editor[data-rte-link-selected="1"] a:focus,
.hd-inline-editable a:focus-visible,
.hd-editor-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--hd-media-modal-z) !important;
  display: grid !important;
  place-items: center !important;
  padding: clamp(14px, 2.5vw, 28px) !important;
  background: rgba(8, 24, 32, .52) !important;
  backdrop-filter: blur(4px) !important;
  box-sizing: border-box !important;
}

.hd-editor-modal[hidden] {
  display: none !important;
}

.hd-editor-modal__panel {
  width: min(1120px, calc(100vw - 36px)) !important;
  max-height: calc(100vh - 36px) !important;
  overflow: hidden !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: 24px !important;
  background: var(--hd-media-lib-card-bg) !important;
  box-shadow: 0 28px 74px rgba(0, 0, 0, .30) !important;
  box-sizing: border-box !important;
}

.hd-editor-modal__head,
.hd-editor-modal__actions {
  padding: 16px 22px !important;
  background: var(--hd-media-lib-panel-bg) !important;
}

.hd-editor-modal__head {
  border-bottom: 1px solid var(--hd-media-lib-border) !important;
}

.hd-editor-modal__actions {
  border-top: 1px solid var(--hd-media-lib-border) !important;
}

.hd-editor-modal__body {
  max-height: calc(100vh - 180px) !important;
  overflow: auto !important;
  padding: 20px 22px !important;
}

.hd-editor-media-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px) !important;
  gap: 20px !important;
  align-items: start !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-editor-media-main,
.hd-editor-image-options {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hd-editor-image-options {
  display: grid !important;
  gap: 12px !important;
  padding: 16px !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: 18px !important;
  background: var(--hd-media-lib-panel-bg) !important;
}

.hd-editor-upload-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 12px !important;
}

.hd-editor-upload-preview img,
.hd-media-picker-card__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* =========================================================
Media picker cards
========================================================= */
.hd-media-picker-grid,
.hd-image-picker-grid,
.hd-media-library-grid,
.hd-image-library-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
  max-height: 46vh !important;
  overflow: auto !important;
}

.hd-media-picker-card,
.hd-image-picker-card,
.hd-media-card,
.hd-image-picker-card {
  display: grid !important;
  grid-template-columns: 82px minmax(0, 1fr) !important;
  gap: 12px !important;
  min-width: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: 16px !important;
  background: var(--hd-media-lib-card-bg) !important;
  box-shadow: 0 6px 18px rgba(10, 24, 32, .06) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.hd-media-picker-card:hover,
.hd-media-picker-card:focus-visible,
.hd-image-picker-card:hover,
.hd-image-picker-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--colour-focus, #0b6fb3) 28%, transparent) !important;
  outline-offset: 2px !important;
}

.hd-media-picker-card__thumb,
.hd-image-picker-card__thumb {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 82px !important;
  height: 62px !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: 10px !important;
  background: var(--colour-surface, #fff) !important;
  overflow: hidden !important;
}

.hd-media-picker-card__meta,
.hd-image-picker-card__meta,
.hd-media-card__meta,
.hd-image-card__meta,
.hd-il-meta {
  min-width: 0 !important;
  color: var(--hd-media-lib-muted) !important;
  font-size: .92rem !important;
  overflow-wrap: anywhere !important;
}

/* =========================================================
Image resize panel
========================================================= */
.hd-image-remove-button,
.hd-image-delete-form .hd-btn,
.hd-il-delete .hd-btn {
  border-color: var(--colour-danger, #a43d3d) !important;
}

.hd-editor-shell,
.hd-editor-overlay-frame,
.hd-inline-public-site-shell {
  scroll-margin-top: 90px !important;
}

/* =========================================================
Shared image/document library shell
========================================================= */
#image-assets,
#document-library,
#image-assets.hd-image-library-admin,
.hd-image-library-admin,
#document-library.hd-content-panel {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#image-assets .hd-page-heading-card,
#document-library .hd-page-heading-card,
#image-assets > section > .hd-card,
#document-library > section > .hd-card,
#image-assets form.hd-card,
#document-library form.hd-card,
.hd-image-library-upload-card,
.hd-document-library-upload-card,
#document-library .hd-doclib-guidance-card,
#document-library .hd-doclib-upload-card,
#document-library .hd-doclib-info-card,
#document-library .hd-doclib-filter-card,
#document-library .hd-doclib-manage-card,
#document-library .hd-doclib-replace-card {
  min-width: 0 !important;
  max-width: 100% !important;
  border: 1px solid color-mix(in srgb, var(--hd-media-lib-border) 86%, transparent) !important;
  border-radius: var(--hd-media-lib-radius) !important;
  background: color-mix(in srgb, var(--hd-media-lib-card-bg) 96%, var(--colour-accent, #173949) 4%) !important;
  box-shadow: var(--hd-media-lib-shadow) !important;
  box-sizing: border-box !important;
}

#image-assets .hd-page-heading-card,
#document-library .hd-page-heading-card {
  padding: clamp(20px, 2.4vw, 30px) !important;
  margin-bottom: 18px !important;
}

#image-assets .hd-page-title,
#document-library .hd-page-title {
  margin-bottom: .45rem !important;
}

#image-assets .hd-image-upload-composer,
#document-library .hd-doclib-upload-grid,
#document-library form.hd-card.hd-form {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)) !important;
  gap: clamp(.75rem, 1.5vw, 1rem) !important;
  align-items: start !important;
  min-width: 0 !important;
  width: 100% !important;
  border-radius: var(--hd-media-lib-radius) !important;
}

#image-assets input[type="file"],
#document-library input[type="file"],
#image-assets .hd-input,
#image-assets .hd-select,
#image-assets .hd-file-input,
#document-library .hd-input,
#document-library .hd-select,
#document-library .hd-file-input,
#document-library textarea.hd-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#image-assets .hd-input,
#image-assets .hd-select,
#document-library .hd-input,
#document-library .hd-select,
#document-library textarea.hd-input {
  min-height: 42px !important;
}

#image-assets .hd-label,
#image-assets .hd-help,
#image-assets .hd-checkline,
#image-assets .hd-upload-help,
#document-library .hd-help,
#document-library .hd-doclib-meta,
#document-library .hd-checkline {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.35 !important;
}

/* =========================================================
Image library list and cards
Supports current hd-image-card and newer hd-il-card markup.
========================================================= */
#image-assets .hd-image-card-list,
#image-assets .hd-image-library-card-list,
#image-assets .hd-il-list,
.hd-image-library-admin .hd-image-card-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--hd-media-lib-gap) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 1.2rem 0 0 !important;
}

#image-assets .hd-image-card,
#image-assets .hd-image-library-asset-card,
#image-assets .hd-il-card,
.hd-image-library-admin .hd-image-card {
  display: grid !important;
  grid-template-columns: minmax(180px, var(--hd-media-lib-side)) minmax(0, 1fr) !important;
  grid-template-areas: "preview body" !important;
  gap: var(--hd-media-lib-gap) !important;
  align-items: start !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: var(--hd-media-lib-pad) !important;
  margin: 0 !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: calc(var(--hd-media-lib-radius) + 2px) !important;
  background: var(--hd-media-lib-card-bg) !important;
  box-shadow: var(--hd-media-lib-shadow) !important;
  overflow: clip !important;
  float: none !important;
  position: relative !important;
  box-sizing: border-box !important;
}

#image-assets .hd-image-card--hidden,
.hd-image-library-admin .hd-image-card--hidden {
  opacity: .76 !important;
  background: repeating-linear-gradient(135deg, var(--hd-media-lib-card-bg), var(--hd-media-lib-card-bg) 12px, var(--colour-surface-soft, #f8f0df) 12px, var(--colour-surface-soft, #f8f0df) 24px) !important;
}

#image-assets .hd-image-card__preview,
#image-assets .hd-il-preview,
.hd-image-library-admin .hd-image-card__preview {
  grid-area: preview !important;
  display: grid !important;
  gap: .85rem !important;
  align-content: start !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

#image-assets .hd-image-card__body,
#image-assets .hd-il-body,
.hd-image-library-admin .hd-image-card__body {
  grid-area: body !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

#image-assets .hd-image-card__identity,
#image-assets .hd-image-card__actions,
#image-assets .hd-il-identity,
#image-assets .hd-il-actions,
.hd-image-library-admin .hd-image-card__identity,
.hd-image-library-admin .hd-image-card__actions {
  grid-column: 1 / -1 !important;
}

#image-assets .hd-image-card__identity,
#image-assets .hd-il-identity,
.hd-image-library-admin .hd-image-card__identity {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: .75rem 1rem !important;
  padding: .8rem 1rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-media-lib-border) 76%, transparent) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .66) !important;
}

#image-assets .hd-image-card__title,
#image-assets .hd-il-title,
.hd-image-library-admin .hd-image-card__title {
  margin: 0 !important;
  min-width: 0 !important;
  font-size: clamp(1.05rem, 1vw, 1.22rem) !important;
  line-height: 1.22 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#image-assets .hd-image-card__section,
#image-assets .hd-il-section,
.hd-image-library-admin .hd-image-card__section {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: .62rem !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 1rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-media-lib-border) 76%, transparent) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0e4) 72%, #fff 28%) !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

#image-assets .hd-image-card__section h4,
#image-assets .hd-il-section h4,
.hd-image-library-admin .hd-image-card__section h4 {
  margin: 0 0 .35rem !important;
  min-width: 0 !important;
  font-size: .98rem !important;
  letter-spacing: .005em !important;
  overflow-wrap: anywhere !important;
}

#image-assets .hd-image-card__section .hd-grid,
#image-assets .hd-image-card__section .hd-grid--2,
#image-assets .hd-il-section .hd-grid,
#image-assets .hd-il-section .hd-grid--2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .75rem !important;
  width: 100% !important;
  min-width: 0 !important;
}

#image-assets .hd-image-card__actions,
#image-assets .hd-il-actions,
#image-assets .hd-actions,
.hd-image-library-admin .hd-image-card__actions,
.hd-image-library-admin .hd-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .65rem .75rem !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

#image-assets .hd-image-card__actions .hd-btn,
#image-assets .hd-il-actions .hd-btn,
#image-assets .hd-il-delete .hd-btn,
#image-assets .hd-image-library-form > .hd-actions .hd-btn,
.hd-image-library-admin .hd-image-card__actions .hd-btn,
.hd-image-library-admin .hd-image-delete-form .hd-btn,
.hd-image-library-admin .hd-actions .hd-btn {
  width: auto !important;
  max-width: 100% !important;
  min-width: max-content !important;
  white-space: normal !important;
  text-align: center !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

/* =========================================================
Preview frames and image fit controls
========================================================= */
#image-assets .hd-media-preview-frame,
#image-assets [data-hd-library-preview],
#image-assets [data-hd-upload-preview-frame],
.hd-image-library-admin .hd-media-preview-frame,
.hd-image-library-admin [data-hd-library-preview],
.hd-image-library-admin [data-hd-upload-preview-frame] {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-height: var(--hd-media-lib-preview-min) !important;
  max-height: var(--hd-media-lib-preview-max) !important;
  aspect-ratio: 4 / 3 !important;
  padding: .8rem !important;
  overflow: hidden !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: 18px !important;
  background: var(--hd-media-lib-preview-bg) !important;
  box-sizing: border-box !important;
}

#image-assets .hd-media-preview-frame img,
#image-assets img.hd-media-preview,
#image-assets .hd-media-preview,
#image-assets .hd-il-preview img,
#image-assets .hd-il-section img,
#image-assets .hd-image-library-upload-card img,
.hd-image-library-admin .hd-media-preview-frame img,
.hd-image-library-admin img.hd-media-preview,
.hd-image-library-admin .hd-media-preview {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 220px !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.hd-media-fit--cover,
#image-assets .hd-media-fit--cover {
  object-fit: cover !important;
}

.hd-media-fit--scale-down,
#image-assets .hd-media-fit--scale-down {
  object-fit: scale-down !important;
}

.hd-media-fit--fill,
#image-assets .hd-media-fit--fill {
  object-fit: fill !important;
}

.hd-media-pos--top,
#image-assets .hd-media-pos--top {
  object-position: top center !important;
}

.hd-media-pos--bottom,
#image-assets .hd-media-pos--bottom {
  object-position: bottom center !important;
}

.hd-media-pos--left,
#image-assets .hd-media-pos--left {
  object-position: left center !important;
}

.hd-media-pos--right,
#image-assets .hd-media-pos--right {
  object-position: right center !important;
}

/* =========================================================
Document library
========================================================= */
#document-library {
  --hd-doclib-gap: var(--hd-media-lib-gap);
  --hd-doclib-pad: var(--hd-media-lib-pad);
  --hd-doclib-side: minmax(240px, 340px);
}

#document-library .hd-doclib-heading-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: var(--hd-doclib-gap) !important;
  padding: clamp(22px, 2.4vw, 34px) !important;
  border-radius: 22px !important;
}

#document-library .hd-eyebrow {
  margin: 0 0 .45rem !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: color-mix(in srgb, var(--colour-primary, #173949) 78%, #fff 22%) !important;
}

#document-library .hd-doclib-stat-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(96px, 1fr)) !important;
  gap: .6rem !important;
  min-width: min(100%, 310px) !important;
}

#document-library .hd-doclib-stat-strip span {
  display: grid !important;
  gap: .15rem !important;
  padding: .75rem .85rem !important;
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f5efe4) 82%, #fff 18%) !important;
  line-height: 1.2 !important;
}

#document-library .hd-doclib-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--hd-doclib-gap) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 1rem !important;
}

#document-library .hd-doclib-card,
#document-library .hd-doclib-details {
  border: 1px solid var(--hd-media-lib-border) !important;
  border-radius: calc(var(--hd-media-lib-radius) + 2px) !important;
  background: var(--hd-media-lib-card-bg) !important;
  box-shadow: 0 14px 34px rgba(17, 42, 54, .075) !important;
  overflow: clip !important;
  box-sizing: border-box !important;
}

#document-library .hd-doclib-summary {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: .9rem !important;
  align-items: center !important;
  padding: 1rem 1.1rem !important;
  cursor: pointer !important;
}

#document-library .hd-doclib-summary:hover,
#document-library .hd-doclib-card[open] > .hd-doclib-summary {
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0e4) 72%, transparent) !important;
}

#document-library .hd-doclib-summary__main {
  display: grid !important;
  gap: .25rem !important;
  min-width: 0 !important;
}

#document-library .hd-doclib-summary__main strong {
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
}

#document-library .hd-doclib-details__body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) !important;
  gap: 1rem !important;
  min-width: 0 !important;
  padding: 0 1.1rem 1.1rem !important;
  border-top: 1px solid color-mix(in srgb, var(--hd-media-lib-border) 72%, transparent) !important;
}

#document-library .hd-doclib-main,
#document-library .hd-doclib-meta {
  min-width: 0 !important;
}

#document-library .hd-doclib-meta,
#document-library .hd-doclib-main {
  padding: 1rem !important;
  border: 1px solid color-mix(in srgb, var(--hd-media-lib-border) 78%, transparent) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #f7f0e4) 80%, #fff 20%) !important;
}

#document-library .hd-doclib-summary__toggle {
  justify-self: end !important;
}

#document-library .hd-actions,
#document-library .hd-form-actions,
#document-library .hd-doc-card__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .65rem .75rem !important;
}

/* Activity/audit panel styling moved to Admin shared task workflow components. */

/* =========================================================
Responsive behaviour
========================================================= */
@media (max-width: 1120px) {
  #image-assets .hd-image-card,
  #image-assets .hd-image-library-asset-card,
  #image-assets .hd-il-card,
  .hd-image-library-admin .hd-image-card,
  #document-library .hd-doclib-details__body {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "preview" "body" !important;
  }

  #document-library .hd-doclib-details__body {
    grid-template-areas: none !important;
  }

  #image-assets .hd-image-card__body,
  #image-assets .hd-il-body,
  .hd-image-library-admin .hd-image-card__body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #image-assets .hd-image-card__preview,
  #image-assets .hd-il-preview,
  .hd-image-library-admin .hd-image-card__preview {
    max-width: none !important;
  }
}

@media (max-width: 760px) {
  .hd-editor-modal {
    padding: 10px !important;
  }

  .hd-editor-modal__panel {
    width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    border-radius: 18px !important;
  }

  .hd-editor-modal__head,
  .hd-editor-modal__body,
  .hd-editor-modal__actions {
    padding: 14px !important;
  }

  .hd-editor-media-layout,
  #image-assets .hd-image-card__section .hd-grid,
  #image-assets .hd-image-card__section .hd-grid--2,
  #image-assets .hd-il-section .hd-grid,
  #image-assets .hd-il-section .hd-grid--2,
  #document-library .hd-doclib-heading-card,
  #document-library .hd-doclib-stat-strip,
  #document-library .hd-doclib-summary,
  #document-library .hd-doclib-details__body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #image-assets .hd-image-card__identity,
  #image-assets .hd-image-card__actions,
  #image-assets .hd-il-identity,
  #image-assets .hd-il-actions,
  #image-assets .hd-il-delete,
  #image-assets .hd-actions,
  #document-library .hd-actions,
  #document-library .hd-form-actions,
  .hd-image-library-admin .hd-image-card__identity,
  .hd-image-library-admin .hd-image-card__actions,
  .hd-image-library-admin .hd-image-delete-form,
  .hd-image-library-admin .hd-actions {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  #image-assets .hd-image-card__actions .hd-btn,
  #image-assets .hd-il-actions .hd-btn,
  #image-assets .hd-il-delete .hd-btn,
  #image-assets .hd-image-library-form > .hd-actions .hd-btn,
  #document-library .hd-actions .hd-btn,
  #document-library .hd-form-actions .hd-btn,
  .hd-image-library-admin .hd-image-card__actions .hd-btn,
  .hd-image-library-admin .hd-image-delete-form .hd-btn,
  .hd-image-library-admin .hd-actions .hd-btn {
    width: 100% !important;
    min-width: 0 !important;
  }

  #image-assets .hd-media-preview-frame,
  #image-assets [data-hd-library-preview],
  #image-assets [data-hd-upload-preview-frame],
  .hd-image-library-admin .hd-media-preview-frame {
    min-height: 130px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-image-card-list .hd-card,
  .hd-doc-card,
  #image-assets .hd-image-card,
  #document-library .hd-doclib-card {
    transition: none !important;
  }
}

/* === v1020 Media library visual standardisation === */
.hd-tool-page--image-assets,.hd-tool-page--document-library {
  --hd-tool-accent:#3f6861;
}

.hd-library-workbench .hd-card {
  border-color:rgba(63,104,97,.22);
}

.hd-library-workbench .hd-library-card,.hd-library-workbench .hd-image-card,.hd-library-workbench .hd-doc-card {
  border:1px solid rgba(63,104,97,.22);
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 32px rgba(37,38,85,.05);
  padding:1rem;
}

.hd-library-workbench .hd-image-library-card,.hd-library-workbench .hd-media-row {
  display:grid;
  grid-template-columns:minmax(220px,.9fr) minmax(0,1.7fr);
  gap:1rem;
  align-items:start;
}

.hd-library-workbench .hd-image-preview,.hd-library-workbench figure {
  border:1px solid rgba(63,104,97,.18);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(63,104,97,.10),#fff);
  padding:1rem;
  text-align:center;
}

.hd-library-workbench .hd-image-preview img,.hd-library-workbench figure img {
  max-width:100%;
  height:auto;
  border-radius:12px;
}

.hd-library-workbench .hd-card-grid,.hd-library-workbench .hd-field-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:1rem;
}

@media (max-width:850px) {
  .hd-library-workbench .hd-image-library-card,.hd-library-workbench .hd-media-row {
    grid-template-columns:1fr
  }

  .hd-library-workbench .hd-btn {
    width:100%;
    justify-content:center
  }
}

/* === end v1020 Media library visual standardisation === */

/* v1025-admin-tool-ui-standardisation: media and library card flow */
.hd-tool-page--media .hd-media-card,
.hd-tool-page--media .hd-library-card,
#image-library .hd-media-card,
#document-library .hd-library-card {
  border-radius:22px;
  border:1px solid rgba(31,35,77,.14);
  background:rgba(255,255,255,.9);
  box-shadow:0 14px 36px rgba(31,35,77,.07);
}

.hd-tool-page--media .hd-media-card__body,
.hd-tool-page--media .hd-library-card__body {
  display:grid;
  grid-template-columns:minmax(220px,.75fr) minmax(0,1fr);
  gap:1.25rem;
  align-items:start;
}

@media (max-width:860px) {
  .hd-tool-page--media .hd-media-card__body,.hd-tool-page--media .hd-library-card__body {
    grid-template-columns:1fr;
  }
}

/* === Resource and shared document admin tools [admin_resource_document_tools] === */
/* HD RMS v1056 clean replacement: admin_resource_document_tools
Owner: admin_resource_document_tools
Owns Resources Manager, shared document picker/linking UI, resource cards and Handbook Builder resource-library integration.
This section does not own generic admin cards, generic buttons, public resources-page display or the media-library image cards. */
:root {
  --resources-surface: var(--colour-surface, #fffdf8);
  --resources-surface-soft: var(--colour-surface-soft, #f7f0df);
  --resources-surface-strong: var(--colour-surface-strong, #ffffff);
  --resources-border: var(--colour-border-soft, #d8c9a8);
  --resources-heading: var(--colour-heading, #073b5f);
  --resources-text: var(--colour-text, #12212b);
  --resources-muted: var(--colour-muted, #526474);
  --resources-accent: var(--colour-primary, #06456b);
  --resources-accent-text: var(--colour-on-primary, #ffffff);
  --resources-success: var(--colour-success, #1e7e45);
  --resources-danger: var(--colour-danger, #a52828);
  --resources-radius: 20px;
  --resources-radius-sm: 14px;
  --resources-gap: clamp(12px, 1.4vw, 18px);
  --resources-shadow: 0 14px 34px color-mix(in srgb, var(--colour-shadow, #102630) 8%, transparent);
}

/* Resources Manager shell */
#resources-manager,
.hd-tool-page--resources-manager,
.hd-tool-page--handbook-builder,
#shared-documents {
  width: min(100%, 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  color: var(--resources-text) !important;
}

#resources-manager *,
.hd-tool-page--resources-manager *,
.hd-tool-page--handbook-builder *,
#shared-documents * {
  box-sizing: border-box !important;
}

#resources-manager .hd-card,
.hd-tool-page--resources-manager .hd-card,
.hd-tool-page--handbook-builder .hd-card,
#shared-documents .hd-card {
  min-width: 0 !important;
}

#resources-manager .hd-rm-heading-card {
  display: grid !important;
  gap: .45rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#resources-manager .hd-rm-dashboard {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: var(--resources-gap) !important;
  margin-top: 1rem !important;
}

#resources-manager .hd-rm-dashboard-card {
  display: grid !important;
  gap: .2rem !important;
  min-height: 92px !important;
  padding: 1rem !important;
  border: 1px solid color-mix(in srgb, var(--resources-border) 86%, transparent) !important;
  border-radius: var(--resources-radius) !important;
  background: linear-gradient(135deg, var(--resources-surface), color-mix(in srgb, var(--resources-surface-soft) 62%, var(--resources-surface))) !important;
  color: var(--resources-heading) !important;
  text-decoration: none !important;
  box-shadow: var(--resources-shadow) !important;
}

#resources-manager .hd-rm-dashboard-card strong {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem) !important;
  line-height: 1 !important;
  color: var(--resources-heading) !important;
}

#resources-manager .hd-rm-dashboard-card span {
  color: var(--resources-muted) !important;
  font-weight: 760 !important;
}

#resources-manager .hd-rm-dashboard-card:is(:hover,:focus-visible) {
  border-color: color-mix(in srgb, var(--resources-accent) 40%, var(--resources-border)) !important;
  box-shadow: 0 18px 38px color-mix(in srgb, var(--colour-shadow, #102630) 13%, transparent) !important;
  outline: none !important;
}

#resources-manager .hd-rm-panel,
.hd-tool-page--resources-manager .hd-rm-panel,
#resources-manager .hd-resource-page-intro-form,
#resources-manager .hd-resource-handbook-import,
#resources-manager form.hd-card,
.hd-tool-page--resources-manager .hd-resource-page-intro-form,
.hd-tool-page--resources-manager .hd-resource-handbook-import {
  border: 1px solid color-mix(in srgb, var(--resources-border) 86%, transparent) !important;
  border-radius: var(--resources-radius) !important;
  background: var(--resources-surface) !important;
  box-shadow: var(--resources-shadow) !important;
}

#resources-manager .hd-rm-panel__head,
#resources-manager .hd-rm-panel > summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: var(--resources-gap) !important;
  padding-bottom: .8rem !important;
  margin-bottom: .95rem !important;
  border-bottom: 1px solid color-mix(in srgb, var(--resources-border) 78%, transparent) !important;
}

#resources-manager .hd-rm-panel > summary {
  cursor: pointer !important;
  list-style: none !important;
  padding: 1rem 1.1rem !important;
  margin: 0 !important;
  align-items: center !important;
}

#resources-manager .hd-rm-panel > summary::-webkit-details-marker {
  display: none !important;
}

#resources-manager .hd-rm-panel > summary::after {
  content: "Open" !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 0 .85rem !important;
  border-radius: 999px !important;
  background: var(--resources-accent) !important;
  color: var(--resources-accent-text) !important;
  -webkit-text-fill-color: var(--resources-accent-text) !important;
  font-weight: 850 !important;
}

#resources-manager .hd-rm-panel[open] > summary::after {
  content: "Close" !important;
}

#resources-manager .hd-rm-panel > summary strong,
#resources-manager .hd-rm-panel h2 {
  margin: 0 !important;
  color: var(--resources-heading) !important;
  line-height: 1.15 !important;
}

#resources-manager .hd-rm-panel > summary small,
#resources-manager .hd-rm-panel .hd-help,
.hd-tool-page--resources-manager .hd-help {
  color: var(--resources-muted) !important;
  line-height: 1.45 !important;
}

#resources-manager .hd-rm-panel__body {
  padding: 0 1.1rem 1.1rem !important;
}

#resources-manager .hd-rm-hero {
  display: grid !important;
  gap: 1rem !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--resources-accent) 10%, var(--resources-surface)), var(--resources-surface)) !important;
}

#resources-manager .hd-rm-jump-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: .65rem !important;
}

#resources-manager .hd-rm-jump-grid a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: .55rem .7rem !important;
  border: 1px solid color-mix(in srgb, var(--resources-accent) 34%, var(--resources-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--resources-accent) 10%, var(--resources-surface)) !important;
  color: var(--resources-heading) !important;
  text-decoration: none !important;
  font-weight: 850 !important;
  text-align: center !important;
}

#resources-manager .hd-rm-form-card {
  padding: clamp(16px, 2vw, 24px) !important;
}

#resources-manager .hd-rm-form-grid,
#resources-manager .hd-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--resources-gap) !important;
  align-items: start !important;
}

#resources-manager .hd-rm-form-grid--library,
#resources-manager .hd-grid-3 {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .9fr) minmax(150px, .7fr) !important;
}

#resources-manager .hd-rm-span,
#resources-manager .hd-form-span,
.hd-tool-page--resources-manager .hd-form-span {
  grid-column: 1 / -1 !important;
}

#resources-manager label {
  display: grid !important;
  gap: .35rem !important;
  color: var(--resources-heading) !important;
  font-weight: 760 !important;
}

#resources-manager .hd-check,
#shared-documents .hd-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  gap: .45rem !important;
}

#resources-manager .hd-rm-checkbox-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: .65rem !important;
}

#resources-manager .hd-rm-checkbox-grid .hd-check,
#resources-manager .hd-resource-card__checks .hd-check {
  padding: .55rem .7rem !important;
  border: 1px solid color-mix(in srgb, var(--resources-border) 86%, transparent) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--resources-surface-soft) 65%, transparent) !important;
  color: var(--resources-heading) !important;
}

#resources-manager .hd-check--danger {
  border-color: color-mix(in srgb, var(--resources-danger) 28%, var(--resources-border)) !important;
  background: color-mix(in srgb, var(--resources-danger) 8%, var(--resources-surface)) !important;
}

#resources-manager .hd-rm-workflow-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--resources-gap) !important;
}

#resources-manager .hd-rm-count-pill {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: .3rem .75rem !important;
  border: 1px solid color-mix(in srgb, var(--resources-accent) 30%, var(--resources-border)) !important;
  border-radius: 999px !important;
  color: var(--resources-heading) !important;
  background: color-mix(in srgb, var(--resources-accent) 8%, var(--resources-surface)) !important;
  font-weight: 850 !important;
}

/* Current resource list and cards */
#resources-manager .hd-resource-current-wrap,
.hd-tool-page--resources-manager .hd-resource-current-wrap {
  display: grid !important;
  gap: var(--resources-gap) !important;
  margin-top: 12px !important;
}

#resources-manager .hd-resource-card,
.hd-tool-page--resources-manager .hd-resource-card {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) minmax(86px, 110px) !important;
  gap: var(--resources-gap) !important;
  align-items: start !important;
  min-width: 0 !important;
  padding: 14px !important;
  border: 1px solid color-mix(in srgb, var(--resources-border) 82%, transparent) !important;
  border-left: 5px solid color-mix(in srgb, var(--resources-accent) 74%, var(--resources-border)) !important;
  border-radius: var(--resources-radius) !important;
  background: color-mix(in srgb, var(--resources-surface) 94%, var(--resources-surface-soft) 6%) !important;
  box-shadow: 0 10px 26px rgba(10, 24, 32, .06) !important;
}

#resources-manager .hd-resource-card__main,
#resources-manager .hd-resource-card__meta,
#resources-manager .hd-resource-card__order,
.hd-tool-page--resources-manager .hd-resource-card__main,
.hd-tool-page--resources-manager .hd-resource-card__meta,
.hd-tool-page--resources-manager .hd-resource-card__order {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#resources-manager .hd-resource-card__checks,
.hd-tool-page--resources-manager .hd-resource-card__checks {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
  margin-bottom: 4px !important;
}

#resources-manager .hd-resource-card__file,
.hd-tool-page--resources-manager .hd-resource-card__file {
  color: var(--resources-muted) !important;
  overflow-wrap: anywhere !important;
  padding: .7rem !important;
  border-radius: var(--resources-radius-sm) !important;
  background: color-mix(in srgb, var(--resources-surface-soft) 72%, transparent) !important;
}

#resources-manager .hd-rm-sticky-actions {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 3 !important;
  margin-top: 1rem !important;
  padding: .85rem !important;
  border: 1px solid color-mix(in srgb, var(--resources-border) 82%, transparent) !important;
  border-radius: var(--resources-radius) !important;
  background: color-mix(in srgb, var(--resources-surface) 92%, transparent) !important;
  backdrop-filter: blur(8px) !important;
}

/* Shared documents picker and linking UI */
#shared-documents .hd-doc-picker,
.hd-shared-area-card .hd-doc-picker,
.hd-tool-page--resources-manager .hd-doc-picker,
.hd-tool-page--handbook-builder .hd-doc-picker,
.hd-tool-page--handbook-builder .hd-library-picker__list {
  box-sizing: border-box !important;
  display: grid !important;
  gap: 8px !important;
  max-height: 420px !important;
  overflow: auto !important;
  padding: 10px !important;
  border: 1px solid var(--resources-border) !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--resources-surface) 72%, transparent) !important;
}

#shared-documents .hd-doc-picker__row,
.hd-tool-page--resources-manager .hd-doc-picker__row,
.hd-tool-page--handbook-builder .hd-doc-picker__row {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  min-width: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid color-mix(in srgb, var(--resources-border) 74%, transparent) !important;
  border-radius: var(--resources-radius-sm) !important;
  background: color-mix(in srgb, var(--resources-surface) 92%, var(--resources-surface-soft) 8%) !important;
}

#shared-documents .hd-doc-picker__row:hover,
#shared-documents .hd-doc-picker__row:focus-within,
.hd-tool-page--resources-manager .hd-doc-picker__row:hover,
.hd-tool-page--resources-manager .hd-doc-picker__row:focus-within,
.hd-tool-page--handbook-builder .hd-doc-picker__row:hover,
.hd-tool-page--handbook-builder .hd-doc-picker__row:focus-within {
  border-color: color-mix(in srgb, var(--resources-accent) 52%, var(--resources-border) 48%) !important;
  box-shadow: 0 8px 18px rgba(12, 28, 44, .08) !important;
}

#shared-documents .hd-doc-picker__row:has(input:checked),
.hd-tool-page--resources-manager .hd-doc-picker__row:has(input:checked),
.hd-tool-page--handbook-builder .hd-doc-picker__row:has(input:checked) {
  border-color: color-mix(in srgb, var(--resources-success) 45%, var(--resources-border)) !important;
  background: color-mix(in srgb, var(--resources-success) 10%, var(--resources-surface)) !important;
}

#shared-documents .hd-linked-doc-summary,
.hd-linked-doc-summary,
.hd-tool-page--resources-manager .hd-linked-doc-summary,
.hd-tool-page--handbook-builder .hd-linked-doc-summary {
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  border: 1px solid var(--resources-border) !important;
  border-radius: var(--resources-radius-sm) !important;
  background: var(--resources-surface-soft) !important;
  color: var(--resources-text) !important;
}

#shared-documents .hd-copy-row,
.hd-copy-row,
.hd-tool-page--resources-manager .hd-copy-row,
.hd-tool-page--handbook-builder .hd-copy-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  max-width: 100% !important;
}

/* Handbook Builder resource-library integration */
.hd-tool-page--handbook-builder .hd-handbook-dashboard {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  border-radius: var(--resources-radius) !important;
}

.hd-tool-page--handbook-builder .hd-handbook-import-grid {
  border-radius: var(--resources-radius) !important;
}

/* Shared document area workflow polish */
#shared-documents .hd-shared-access-copy-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, .85fr) !important;
  gap: 12px !important;
  align-items: end !important;
}

#shared-documents .hd-generated-password-copy {
  border: 1px dashed color-mix(in srgb, var(--resources-success) 42%, var(--resources-border)) !important;
  border-radius: 16px !important;
  padding: 12px !important;
  background: color-mix(in srgb, var(--resources-success) 8%, var(--resources-surface)) !important;
}

@media (max-width: 980px) {
  #resources-manager .hd-rm-dashboard,
  #resources-manager .hd-rm-jump-grid,
  #resources-manager .hd-rm-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #resources-manager .hd-rm-workflow-grid,
  #resources-manager .hd-resource-card,
  .hd-tool-page--resources-manager .hd-resource-card,
  #shared-documents .hd-shared-access-copy-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  #resources-manager,
  .hd-tool-page--resources-manager,
  .hd-tool-page--handbook-builder,
  #shared-documents {
    width: min(100%, calc(100vw - 18px)) !important;
  }

  #resources-manager .hd-rm-dashboard,
  #resources-manager .hd-rm-jump-grid,
  #resources-manager .hd-rm-checkbox-grid,
  #resources-manager .hd-rm-form-grid,
  #resources-manager .hd-grid,
  #resources-manager .hd-rm-form-grid--library,
  #resources-manager .hd-grid-3,
  .hd-tool-page--handbook-builder .hd-handbook-dashboard,
  #shared-documents .hd-copy-row,
  .hd-copy-row {
    grid-template-columns: 1fr !important;
  }

  #resources-manager .hd-rm-panel__head,
  #resources-manager .hd-rm-panel > summary {
    display: grid !important;
  }

  #resources-manager .hd-rm-sticky-actions {
    position: static !important;
  }
}

/* HD RMS v1057 resource/document workflow clarity
These styles clarify the split between Document Library, Resources Manager,
Handbook Builder and Shared Document Areas without creating duplicate workflows. */
#resources-manager .hd-rm-role-map,
.hd-doclib-role-map,
.hd-handbook-role-map,
.hd-shared-doc-role-map,
#resources-manager .hd-rm-crosslink-card {
  border-left: 6px solid var(--resources-accent, var(--colour-primary, #0b5f8f)) !important;
  background: linear-gradient(135deg,
  color-mix(in srgb, var(--resources-surface, var(--colour-surface, #fffdf8)) 94%, var(--resources-surface-soft, var(--colour-surface-soft, #f7f0df)) 6%),
  var(--resources-surface, var(--colour-surface, #fffdf8))) !important;
}

#resources-manager .hd-rm-role-grid,
.hd-doclib-role-map .hd-actions,
.hd-handbook-role-map .hd-actions,
.hd-shared-doc-role-map .hd-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .7rem !important;
  align-items: stretch !important;
}

#resources-manager .hd-rm-role-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  margin-top: .9rem !important;
}

#resources-manager .hd-rm-role-grid > :is(a, strong) {
  display: grid !important;
  gap: .35rem !important;
  min-width: 0 !important;
  padding: .9rem 1rem !important;
  border: 1px solid var(--resources-border, var(--colour-border-soft, #d8c9a8)) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--resources-surface, var(--colour-surface, #fffdf8)) 90%, var(--resources-surface-soft, var(--colour-surface-soft, #f7f0df)) 10%) !important;
  color: var(--resources-heading, var(--colour-heading, #073a63)) !important;
  text-decoration: none !important;
}

#resources-manager .hd-rm-role-grid > :is(a, strong) span,
#resources-manager .hd-rm-role-grid > strong em {
  color: var(--resources-muted, var(--colour-muted, #526474)) !important;
  font-style: normal !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
}

#resources-manager .hd-rm-crosslink-card .hd-rm-panel__head h2 {
  margin-bottom: .25rem !important;
}

#resources-manager .hd-rm-dashboard-card[href*="handbook-builder"] {
  border-style: dashed !important;
}

#resources-manager .hd-field-help,
.hd-tool-page--handbook-builder .hd-field-help,
.hd-doclib-admin .hd-field-help,
#shared-documents .hd-field-help {
  display: block !important;
  margin-top: .35rem !important;
  color: var(--resources-muted, var(--colour-muted, #526474)) !important;
  font-size: .9rem !important;
  line-height: 1.4 !important;
}

.hd-doclib-role-map,
.hd-handbook-role-map,
.hd-shared-doc-role-map {
  padding: clamp(14px, 2vw, 22px) !important;
}

.hd-doclib-role-map h2,
.hd-handbook-role-map h2,
.hd-shared-doc-role-map h2 {
  color: var(--resources-heading, var(--colour-heading, #073a63)) !important;
}

@media (max-width: 980px) {
  #resources-manager .hd-rm-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  #resources-manager .hd-rm-role-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === Admin shared rich editor component [admin_shared_rich_editor_component] === */
/* HD RMS v1070 admin_shared_rich_editor_component clean replacement
Owner: shared admin rich editor component only.
Owns:
- Shared rich editor containers and toolbars
- Contenteditable editor surfaces
- Link/Button/Card rich-editor modals
- Rich editor content primitives: links, buttons, cards, lists and tables
Does not own:
- Page Content Manager shell/layout
- Blog Manager shell/layout
- Generic admin cards/forms/buttons outside the editor
- Public page content presentation outside admin editing surfaces
*/
:root {
  --hd-rte-gap: clamp(.65rem, 1.25vw, 1rem);
  --hd-rte-toolbar-gap: .56rem;
  --hd-rte-radius: 18px;
  --hd-rte-radius-sm: 12px;
  --hd-rte-border: var(--colour-border-soft, #d8c9a8);
  --hd-rte-border-strong: var(--colour-border, #bfcbd3);
  --hd-rte-surface: var(--colour-surface, #fffdf8);
  --hd-rte-surface-strong: var(--colour-surface-strong, #ffffff);
  --hd-rte-surface-soft: var(--colour-surface-soft, #f7f0df);
  --hd-rte-heading: var(--colour-heading, #073b5f);
  --hd-rte-text: var(--colour-text, #12212b);
  --hd-rte-muted: var(--colour-muted, #526474);
  --hd-rte-primary: var(--colour-primary, #0b5f8f);
  --hd-rte-primary-text: var(--colour-on-primary, #ffffff);
  --hd-rte-focus: var(--colour-field-focus, var(--colour-primary, #0b5f8f));
  --hd-rte-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  --hd-rte-modal-z: 2147482800;
}

/* --------------------------------------------------------------------------
Editor host and controls
-------------------------------------------------------------------------- */
[data-hd-rich-editor],
.hd-shared-rich-editor-controls,
.hd-editor-panel,
.hd-editor-preview-frame,
.hd-message-editor-panel {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

[data-hd-rich-editor] {
  display: grid;
  gap: var(--hd-rte-gap);
  width: 100%;
  position: relative;
  isolation: isolate;
}

.hd-shared-rich-editor-controls {
  display: grid;
  gap: .65rem;
  width: 100%;
  margin: 0 0 .85rem;
}

.hd-shared-rich-editor-controls__size {
  display: grid;
  gap: .3rem;
  margin: 0 0 .4rem;
}

.hd-shared-rich-editor-size {
  width: 100%;
  max-width: 100%;
}

.hd-editor-panel,
.hd-editor-preview-frame,
.hd-message-editor-panel {
  border: 1px solid var(--hd-rte-border);
  border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hd-rte-surface) 94%, #fff 6%), var(--hd-rte-surface));
  padding: clamp(14px, 1.8vw, 18px);
  box-shadow: var(--hd-rte-shadow);
  overflow: visible;
}

/* --------------------------------------------------------------------------
Toolbar
-------------------------------------------------------------------------- */
.hd-shared-rich-editor-toolbar,
.hd-inline-toolbar.hd-shared-rich-editor-toolbar,
body.is-admin .hd-shared-rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hd-rte-toolbar-gap);
  align-items: stretch;
  justify-content: flex-start;
  padding: .72rem;
  border: 1px solid color-mix(in srgb, var(--hd-rte-heading) 14%, transparent);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--hd-rte-surface), var(--hd-rte-surface-soft));
  box-shadow: 0 10px 24px rgba(5, 59, 93, .06);
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  white-space: normal;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.hd-shared-rich-editor-toolbar .hd-btn,
body.is-admin .hd-shared-rich-editor-toolbar .hd-btn {
  flex: 1 1 8.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.4rem;
  min-height: 2.5rem;
  padding: .54rem .72rem;
  border-radius: 10px;
  line-height: 1.16;
  white-space: normal;
  text-align: center;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  box-sizing: border-box;
}

.hd-shared-rich-editor-toolbar .hd-editor-icon-btn {
  flex: 0 1 5.6rem;
  min-width: 4.8rem;
  font-size: 1rem;
  font-weight: 900;
}

.hd-shared-rich-editor-toolbar .hd-editor-btn-text {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

/* --------------------------------------------------------------------------
Colour controls
-------------------------------------------------------------------------- */
.hd-shared-rich-editor-toolbar .hd-colour-tool,
.hd-shared-rich-editor-toolbar .hd-rte-toolbar-item--colour,
body.is-admin .hd-shared-rich-editor-toolbar .hd-colour-tool,
.hd-rich-colour-control,
.hd-editor-colour-control,
.hd-colour-control {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: .62rem;
  max-width: 100%;
  padding: .42rem .55rem;
  border: 1px solid color-mix(in srgb, var(--hd-rte-heading) 16%, transparent);
  border-radius: 12px;
  background: var(--hd-rte-surface-strong);
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  line-height: 1.2;
  box-sizing: border-box;
  overflow: visible;
}

.hd-shared-rich-editor-toolbar .hd-colour-tool,
.hd-shared-rich-editor-toolbar .hd-rte-toolbar-item--colour,
body.is-admin .hd-shared-rich-editor-toolbar .hd-colour-tool {
  flex: 2 1 20rem;
  min-width: 18rem;
}

.hd-shared-rich-editor-toolbar .hd-colour-tool-label,
body.is-admin .hd-shared-rich-editor-toolbar .hd-colour-tool-label,
.hd-rich-colour-control label,
.hd-editor-colour-control label,
.hd-colour-control label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--hd-rte-heading);
  font-size: .92rem;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.2;
}

.hd-shared-rich-editor-toolbar .hd-colour-tool input[type="color"],
body.is-admin .hd-shared-rich-editor-toolbar .hd-colour-tool input[type="color"] {
  flex: 0 0 2.8rem;
  width: 2.8rem;
  min-width: 2.8rem;
  height: 2.18rem;
  min-height: 2.18rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--hd-rte-heading) 24%, transparent);
  border-radius: 8px;
  background: var(--hd-rte-surface-strong);
  cursor: pointer;
}

.hd-shared-rich-editor-toolbar .hd-colour-tool .hd-btn,
.hd-shared-rich-editor-toolbar .hd-colour-tool button,
body.is-admin .hd-shared-rich-editor-toolbar .hd-colour-tool .hd-btn {
  flex: 1 1 8rem;
  width: auto;
  min-width: 7.5rem;
  min-height: 2.18rem;
  padding: .46rem .7rem;
  justify-content: center;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
Editable surfaces
-------------------------------------------------------------------------- */
.hd-rich-editor,
.hd-editor,
.hd-editor-shell,
.hd-inline-editable,
body.is-admin .hd-rich-editor,
body.is-admin .hd-inline-editable,
body.is-admin [contenteditable="true"].hd-input,
body.is-admin [contenteditable="true"].hd-editor,
body.is-admin .wysiwyg,
body.is-admin .rich-editor,
.hd-editor-preview-frame .hd-rich-editor,
.hd-editor-panel .hd-rich-editor,
.hd-inline-section-card .hd-inline-editable {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 280px;
  border: 1px solid var(--hd-rte-border-strong);
  border-radius: var(--hd-rte-radius);
  background: var(--hd-rte-surface-strong);
  color: var(--hd-rte-text);
  -webkit-text-fill-color: var(--hd-rte-text);
  padding: clamp(16px, 2vw, 22px);
  font-size: 1rem;
  line-height: 1.65;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  outline: none;
  overflow: auto;
}

.hd-rich-editor:focus,
.hd-inline-editable:focus,
body.is-admin .hd-rich-editor:focus,
body.is-admin .hd-inline-editable:focus {
  border-color: var(--hd-rte-focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hd-rte-focus) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.85);
}

.hd-rich-editor[data-rte-size="14"] {
  font-size: .95rem;
}

.hd-rich-editor[data-rte-size="16"] {
  font-size: 1rem;
}

.hd-rich-editor[data-rte-size="18"] {
  font-size: 1.13rem;
}

.hd-rich-editor[data-rte-size="20"] {
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
Rich editor modal overlay
-------------------------------------------------------------------------- */
.hd-rte-modal {
  position: fixed;
  inset: 0;
  z-index: var(--hd-rte-modal-z);
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
  background: rgba(7, 22, 35, .50);
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}

.hd-rte-modal__panel {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  border: 1px solid var(--hd-rte-border-strong);
  border-radius: 22px;
  background: var(--hd-rte-surface-strong);
  color: var(--hd-rte-text);
  box-shadow: 0 30px 86px rgba(7, 22, 35, .34), 0 0 0 1px rgba(255,255,255,.66) inset;
}

.hd-rte-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px 20px;
  border-bottom: 1px solid var(--hd-rte-border);
  background: color-mix(in srgb, var(--hd-rte-surface-soft) 72%, #ffffff 28%);
}

.hd-rte-modal__eyebrow {
  margin: 0 0 .25rem;
  color: var(--hd-rte-muted);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hd-rte-modal__head h3 {
  margin: 0;
  color: var(--hd-rte-heading);
  font-size: clamp(1.22rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.hd-rte-modal__close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hd-rte-border);
  border-radius: 999px;
  background: var(--hd-rte-surface);
  color: var(--hd-rte-heading);
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
}

.hd-rte-modal__body {
  display: grid;
  gap: .9rem;
  padding: 20px;
}

.hd-rte-modal__help {
  margin: 0;
  color: var(--hd-rte-muted);
}

.hd-rte-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.hd-rte-modal label {
  display: grid;
  gap: .35rem;
  color: var(--hd-rte-heading);
  font-weight: 850;
}

.hd-rte-modal :is(input, select, textarea, .hd-input) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color: var(--hd-rte-text);
  -webkit-text-fill-color: var(--hd-rte-text);
}

.hd-rte-modal code {
  padding: .1rem .28rem;
  border-radius: .35rem;
  background: color-mix(in srgb, var(--hd-rte-primary) 10%, var(--hd-rte-surface));
}

.hd-rte-modal__actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: .65rem;
  align-items: center;
  margin-top: .25rem;
}

html.hd-rte-modal-open,
body.hd-rte-modal-open {
  overflow: hidden;
}

/* Neutralise old link/card/button modal fragments if older markup is still present. */
.hd-rte-link-modal[hidden],
.hd-rte-button-modal[hidden],
.hd-rte-card-modal[hidden],
.hd-rte-dialog[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
Content primitives inside editor surfaces
-------------------------------------------------------------------------- */
.hd-rich-editor a.hd-content-link,
.hd-inline-editable a.hd-content-link {
  cursor: text;
  color: var(--colour-link, var(--hd-rte-primary));
  -webkit-text-fill-color: var(--colour-link, var(--hd-rte-primary));
  text-decoration: underline;
  text-underline-offset: .18em;
  font-weight: 800;
}

.hd-rich-editor a.hd-content-link::after,
.hd-inline-editable a.hd-content-link::after {
  content: none !important;
  display: none !important;
}

.hd-rich-editor .is-rte-selected,
.hd-inline-editable .is-rte-selected {
  outline: 3px solid color-mix(in srgb, var(--hd-rte-primary) 72%, #ffffff 28%);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--hd-rte-primary) 14%, transparent);
}

.hd-rich-editor .hd-content-button-row,
.hd-inline-editable .hd-content-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin: 1.2rem 0;
}

.hd-rich-editor .hd-content-button,
.hd-inline-editable .hd-content-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.65rem;
  padding: .68rem 1.12rem;
  border-radius: 12px;
  background: var(--hd-rte-primary);
  color: var(--hd-rte-primary-text) !important;
  -webkit-text-fill-color: var(--hd-rte-primary-text) !important;
  text-decoration: none !important;
  font-weight: 850;
}

.hd-rich-editor .hd-content-card,
.hd-inline-editable .hd-content-card {
  display: block;
  margin: 1.1rem 0;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--hd-rte-border);
  border-left: 6px solid var(--hd-rte-primary);
  border-radius: 18px;
  background: var(--hd-rte-surface-soft);
}

.hd-rich-editor .hd-content-card--accent,
.hd-inline-editable .hd-content-card--accent {
  background: color-mix(in srgb, var(--colour-accent, #b47a2a) 10%, var(--hd-rte-surface));
  border-left-color: var(--colour-accent, #b47a2a);
}

.hd-rich-editor .hd-content-card h3,
.hd-inline-editable .hd-content-card h3 {
  margin: 0 0 .45rem;
  color: var(--hd-rte-heading);
}

.hd-rich-editor .hd-content-card p:last-child,
.hd-inline-editable .hd-content-card p:last-child {
  margin-bottom: 0;
}

.hd-rich-editor .hd-content-list,
.hd-inline-editable .hd-content-list {
  margin: .85rem 0 .95rem 1.4rem;
}

.hd-rich-editor .hd-content-list__item,
.hd-inline-editable .hd-content-list__item {
  margin: .28rem 0;
}

.hd-rich-editor .hd-content-table,
.hd-inline-editable .hd-content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.hd-rich-editor .hd-content-table :is(th,td),
.hd-inline-editable .hd-content-table :is(th,td) {
  border: 1px solid var(--hd-rte-border);
  padding: .55rem .65rem;
}

/* --------------------------------------------------------------------------
Responsive
-------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .hd-shared-rich-editor-toolbar,
  .hd-inline-toolbar.hd-shared-rich-editor-toolbar {
    gap: .42rem;
    padding: .55rem;
  }

  .hd-shared-rich-editor-toolbar .hd-btn {
    flex: 1 1 calc(50% - .42rem);
    min-width: 0;
    padding: .48rem .55rem;
    min-height: 2.28rem;
    font-size: .92rem;
  }

  .hd-shared-rich-editor-toolbar .hd-colour-tool,
  body.is-admin .hd-shared-rich-editor-toolbar .hd-colour-tool {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    white-space: normal;
  }

  .hd-shared-rich-editor-toolbar .hd-colour-tool .hd-btn,
  .hd-shared-rich-editor-toolbar .hd-colour-tool button {
    min-width: 7rem;
    white-space: normal;
  }

  .hd-rte-modal {
    padding: 8px;
  }

  .hd-rte-modal__panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .hd-rte-modal__grid,
  .hd-rte-modal__actions {
    grid-template-columns: 1fr;
  }

  .hd-rte-modal__actions > span {
    display: none;
  }
}

/* v1071 rich editor link normalisation
Easy Page Content Editor stores editor-preview links as inert spans so public
link/navigation handlers cannot treat a newly inserted editor link as page
navigation. The page-content save pipeline restores these spans back to real
anchors before saving. */
.hd-inline-editable span.hd-inline-preview-link,
.hd-rich-editor span.hd-inline-preview-link,
[data-hd-rte-surface] span.hd-inline-preview-link {
  display: inline !important;
  position: static !important;
  color: var(--colour-link, var(--colour-primary, #073a63)) !important;
  -webkit-text-fill-color: var(--colour-link, var(--colour-primary, #073a63)) !important;
  text-decoration: underline !important;
  text-underline-offset: .18em !important;
  font-weight: 750 !important;
  cursor: text !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  z-index: auto !important;
}

.hd-inline-editable span.hd-inline-preview-link.is-rte-selected,
.hd-rich-editor span.hd-inline-preview-link.is-rte-selected,
[data-hd-rte-surface] span.hd-inline-preview-link.is-rte-selected {
  outline: 2px solid color-mix(in srgb, var(--colour-primary, #073a63) 34%, transparent) !important;
  outline-offset: 2px !important;
  border-radius: 3px !important;
}

/* === Admin shared task workflow components [admin_shared_task_workflow_components] === */
/* HD RMS v992 owner contract: admin_shared_task_workflow_components
Owner: shared admin task/workflow/activity components.
Owns shared section headings, task/workflow/review/management cards, stat cards,
shared admin modal shell, structure-health panels and admin activity panels/tables.
Does not own generic buttons, generic forms, generic tables, feedback messages,
CSS tools, rich editor controls, public content blocks or specialist tool internals.
*/

/* --------------------------------------------------------------------------
Tokens
-------------------------------------------------------------------------- */
:root {
  --hd-workflow-gap: clamp(12px, 1.6vw, 18px);
  --hd-workflow-card-pad: clamp(16px, 1.8vw, 22px);
  --hd-workflow-radius: 18px;
  --hd-workflow-radius-sm: 14px;
  --hd-workflow-border: var(--colour-border-soft, #d8c9a8);
  --hd-workflow-surface: var(--colour-surface, #fffdf8);
  --hd-workflow-surface-soft: var(--colour-surface-soft, #f7f0df);
  --hd-workflow-heading: var(--colour-heading, #073b5f);
  --hd-workflow-text: var(--colour-text, #102630);
  --hd-workflow-muted: var(--colour-muted, #526474);
  --hd-workflow-accent: var(--colour-accent, #bf902e);
  --hd-workflow-primary: var(--colour-primary, #06456b);
  --hd-workflow-shadow: 0 10px 24px rgba(10, 24, 32, .06);
}

/* --------------------------------------------------------------------------
Shared section headings
-------------------------------------------------------------------------- */
.hd-section-heading {
  display: block;
  margin: 0 0 1rem;
  min-width: 0;
}

.hd-section-heading--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hd-section-heading h2,
.hd-section-heading h3 {
  margin-top: 0;
  color: var(--hd-workflow-heading);
}

/* --------------------------------------------------------------------------
Shared workflow/task/review/management grids
-------------------------------------------------------------------------- */
.hd-task-grid,
.hd-workflow-grid,
.hd-review-grid,
.hd-management-grid,
.hd-admin-page .hd-workflow-grid,
.hd-admin-page .hd-task-grid,
.hd-admin-page .hd-review-grid,
.hd-admin-page .hd-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--hd-workflow-gap);
  margin-top: 1rem;
  align-items: stretch;
}

.hd-task-card,
.hd-workflow-card,
.hd-review-card,
.hd-management-card,
.hd-admin-page .hd-workflow-card,
.hd-admin-page .hd-task-card,
.hd-admin-page .hd-review-card,
.hd-admin-page .hd-management-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .9rem;
  min-width: 0;
  min-height: 12rem;
  padding: var(--hd-workflow-card-pad);
  border: 1px solid var(--hd-workflow-border);
  border-radius: var(--hd-workflow-radius);
  background: var(--hd-workflow-surface);
  color: var(--hd-workflow-text);
  box-shadow: var(--hd-workflow-shadow);
}

.hd-task-card h2,
.hd-task-card h3,
.hd-workflow-card h2,
.hd-workflow-card h3,
.hd-review-card h2,
.hd-review-card h3,
.hd-management-card h2,
.hd-management-card h3 {
  margin: .15rem 0 .35rem;
  color: var(--hd-workflow-heading);
  font-size: clamp(1.1rem, 1.4vw, 1.28rem);
  line-height: 1.2;
}

.hd-task-card p:not(.hd-kicker),
.hd-workflow-card p:not(.hd-kicker),
.hd-review-card p:not(.hd-kicker),
.hd-management-card p:not(.hd-kicker) {
  margin: 0;
  line-height: 1.45;
}

.hd-task-card .hd-btn,
.hd-workflow-card .hd-btn,
.hd-review-card .hd-btn,
.hd-management-card .hd-btn {
  align-self: flex-start;
  margin-top: auto;
}

.hd-task-card.is-active,
.hd-workflow-card.is-active,
.hd-review-card.is-active,
.hd-management-card.is-active {
  border-color: var(--hd-workflow-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hd-workflow-primary) 16%, transparent), var(--hd-workflow-shadow);
}

/* --------------------------------------------------------------------------
Shared stat cards
-------------------------------------------------------------------------- */
.hd-stat-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  justify-content: center;
  min-height: 6.6rem;
  min-width: 0;
}

.hd-stat-card span,
.hd-stat-card small {
  display: block;
  color: var(--hd-workflow-muted);
  line-height: 1.35;
}

.hd-stat-card span {
  font-weight: 700;
  font-size: .9rem;
}

.hd-stat-card strong {
  display: block;
  color: var(--hd-workflow-heading);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  line-height: 1.05;
}

/* --------------------------------------------------------------------------
Shared admin modal shell
-------------------------------------------------------------------------- */
.hd-modal-open {
  overflow: hidden;
}

.hd-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}

.hd-modal-root:empty {
  display: none;
}

.hd-site-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 44px);
  background: rgba(8, 20, 31, .48);
  backdrop-filter: blur(4px);
  box-sizing: border-box;
  pointer-events: auto;
}

.hd-site-modal[hidden] {
  display: none;
}

.hd-site-modal__panel {
  width: min(620px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: auto;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--hd-workflow-border);
  border-radius: 22px;
  background: var(--hd-workflow-surface);
  color: var(--hd-workflow-text);
  box-shadow: 0 28px 80px rgba(0, 21, 42, .28);
  box-sizing: border-box;
}

.hd-site-modal__head,
.hd-site-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: .75rem;
}

.hd-site-modal__title {
  margin: 0;
  color: var(--hd-workflow-heading);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.18;
}

.hd-site-modal__body {
  color: var(--hd-workflow-text);
  line-height: 1.55;
}

.hd-site-modal__body > :first-child {
  margin-top: 0;
}

.hd-site-modal__body > :last-child {
  margin-bottom: 0;
}

.hd-site-modal__actions,
.hd-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hd-site-modal__close,
.hd-modal-close {
  appearance: none;
  border: 1px solid var(--hd-workflow-border);
  border-radius: 999px;
  background: var(--hd-workflow-surface-soft);
  color: var(--hd-workflow-heading);
  min-width: 2.25rem;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hd-site-modal__close:focus-visible,
.hd-modal-close:focus-visible {
  outline: 3px solid var(--colour-focus, var(--hd-workflow-accent));
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
Structure health / site structure workflow panels
-------------------------------------------------------------------------- */
.hd-structure-health,
.hd-site-structure-manager {
  display: grid;
  gap: var(--hd-workflow-gap);
}

.hd-structure-health .hd-structure-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid color-mix(in srgb, var(--hd-workflow-primary) 14%, transparent);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--hd-workflow-surface), var(--hd-workflow-surface-soft));
  box-shadow: 0 16px 36px rgba(5, 59, 93, .08);
}

.hd-structure-health .hd-kicker {
  margin: 0 0 .25rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 800;
  color: var(--hd-workflow-muted);
}

.hd-structure-summary-grid,
.hd-structure-tool-grid,
.hd-site-structure-manager .hd-grid--two,
.hd-site-structure-manager .hd-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--hd-workflow-gap);
}

.hd-structure-stat,
.hd-structure-panel,
.hd-structure-tool-card {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--hd-workflow-primary) 12%, var(--hd-workflow-border));
  border-radius: 18px;
  background: var(--hd-workflow-surface);
}

.hd-structure-panel {
  border-radius: 20px;
  background: linear-gradient(180deg, var(--hd-workflow-surface), color-mix(in srgb, var(--hd-workflow-surface-soft) 52%, var(--hd-workflow-surface)));
}

.hd-structure-panel h2 {
  margin-top: 0;
  color: var(--hd-workflow-heading);
}

.hd-structure-stat {
  padding: 1rem;
}

.hd-structure-stat span,
.hd-structure-tool-card small,
.hd-css-system-panel .hd-tool__linkcard small {
  color: var(--hd-workflow-muted);
}

.hd-structure-stat strong {
  display: block;
  margin-top: .2rem;
  color: var(--hd-workflow-heading);
  font-size: 1.35rem;
}

.hd-site-structure-manager .hd-page-heading-card {
  margin-bottom: 1rem;
}

.hd-site-structure-manager details.hd-card > summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
  padding: .25rem .1rem;
}

.hd-site-structure-manager details.hd-card > summary strong {
  color: var(--hd-workflow-heading);
  font-size: 1.1rem;
}

.hd-site-structure-manager details.hd-card > summary .hd-help {
  margin: 0;
  max-width: 50%;
  text-align: right;
}

.hd-site-structure-manager .hd-field-full {
  grid-column: 1 / -1;
}

.hd-site-structure-manager code {
  white-space: normal;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
Activity panels
-------------------------------------------------------------------------- */
.hd-activity-page,
#activity,
#project-activity,
.hd-content-panel[id*="activity"] {
  min-width: 0;
}

.hd-activity-page .hd-card,
#activity .hd-card,
#project-activity .hd-card,
.hd-content-panel[id*="activity"] .hd-card {
  border-radius: var(--hd-workflow-radius);
}

#activity details,
#project-activity details,
.hd-content-panel[id*="activity"] details {
  margin: 10px 0;
}

#activity summary,
#project-activity summary,
.hd-content-panel[id*="activity"] summary {
  cursor: pointer;
  padding: 12px 14px;
  border: 1px solid var(--hd-workflow-border);
  border-radius: var(--hd-workflow-radius-sm);
  background: color-mix(in srgb, var(--hd-workflow-surface-soft) 85%, var(--hd-workflow-surface) 15%);
  color: var(--hd-workflow-heading);
  font-weight: 700;
}

#activity .hd-actions,
#project-activity .hd-actions,
.hd-content-panel[id*="activity"] .hd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#activity .hd-activity-tablewrap,
.hd-activity-page .hd-table-wrap,
#activity .hd-table-wrap,
#project-activity .hd-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--hd-workflow-border);
  border-radius: 16px;
  background: var(--hd-workflow-surface);
}

#activity .hd-activity-table {
  min-width: 980px;
  margin: 0;
}

#activity .hd-activity-table td,
#activity .hd-activity-table th {
  vertical-align: top;
}

#activity .hd-activity-source,
#activity .hd-activity-admin,
#activity .hd-activity-ip {
  display: inline-block;
  max-width: 18rem;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
Responsive
-------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hd-task-card,
  .hd-workflow-card,
  .hd-review-card,
  .hd-management-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .hd-section-heading--split,
  .hd-structure-health .hd-structure-hero,
  .hd-site-structure-manager details.hd-card > summary {
    display: block;
  }

  .hd-structure-health .hd-actions {
    display: grid;
    margin-top: 1rem;
  }

  .hd-site-structure-manager details.hd-card > summary .hd-help {
    max-width: none;
    margin-top: .4rem;
    text-align: left;
  }

  .hd-site-modal {
    align-items: flex-start;
    padding: clamp(14px, 4vw, 22px);
  }

  .hd-site-modal__panel {
    width: min(100%, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    padding: 18px;
    border-radius: 18px;
  }

  .hd-site-modal__actions,
  .hd-modal-actions {
    justify-content: stretch;
  }

  .hd-site-modal__actions .hd-btn,
  .hd-modal-actions .hd-btn,
  .hd-site-modal__actions button,
  .hd-modal-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* === Admin analytics dashboard [admin_analytics_dashboard] === */
/* HD RMS admin_analytics_dashboard v978b
Clean owner section.
Owns admin analytics/dashboard KPIs, charts, legends, report preview/export
surfaces and dashboard-specific report panels.
Does not own generic admin cards, tool-suite navigation, form controls,
buttons, placement tools, public page cards, global tables or the site shell.
*/
#analytics,
#analytics-reports,
.hd-report-preview {
  --analytics-card-bg: color-mix(in srgb, var(--colour-surface, #fffdf8) 94%, var(--colour-surface-soft, #eef4f3) 6%);
  --analytics-chart-bg: color-mix(in srgb, var(--colour-surface, #fffdf8) 88%, var(--colour-surface-soft, #eef4f3) 12%);
  --analytics-chart-soft: color-mix(in srgb, var(--colour-surface-soft, #eef4f3) 78%, var(--colour-surface, #fffdf8) 22%);
  --analytics-chart-line: var(--colour-link, var(--colour-action-bg, #0b5f8f));
  --analytics-chart-accent: var(--colour-accent, #b99041);
  --analytics-chart-heading: var(--colour-heading, #083646);
  --analytics-chart-muted: var(--colour-muted, #536574);
  --analytics-chart-border: color-mix(in srgb, var(--colour-border, #d8c9a8) 76%, var(--colour-heading, #083646) 6%);
  --analytics-chart-shadow: 0 12px 28px color-mix(in srgb, var(--colour-shadow, #102630) 12%, transparent);
  --analytics-gap: clamp(14px, 1.8vw, 22px);
  --analytics-card-pad: clamp(16px, 2vw, 22px);
}

/* Dashboard layout */
#analytics .hd-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: var(--analytics-gap);
  align-items: stretch;
}

#analytics .hd-analytics-kpi {
  box-sizing: border-box;
  min-width: 0;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: .5rem;
  padding: var(--analytics-card-pad);
  border-top: 4px solid color-mix(in srgb, var(--analytics-chart-line) 48%, transparent);
  border-radius: 18px;
  background: var(--analytics-card-bg);
  color: var(--colour-text, #14212a);
}

#analytics .hd-kpi__label {
  margin: 0;
  color: var(--analytics-chart-heading);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

#analytics .hd-kpi__value {
  margin: 0;
  color: var(--analytics-chart-heading);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#analytics .hd-kpi__note {
  margin: 0;
  color: var(--analytics-chart-muted);
  font-size: .92rem;
  line-height: 1.35;
}

#analytics .hd-analytics-section-intro {
  padding: var(--analytics-card-pad);
}

#analytics .hd-analytics-section-intro h2,
#analytics .hd-analytics-visual-card h3,
#analytics .hd-analytics-dimension-card__head h3 {
  margin: 0 0 .45rem;
  color: var(--analytics-chart-heading);
  line-height: 1.2;
}

#analytics .hd-analytics-section-intro p,
#analytics .hd-analytics-dimension-card__head .hd-help {
  max-width: 74ch;
}

/* Visual cards */
#analytics .hd-analytics-visual-grid,
#analytics .hd-analytics-visual-grid--mixed,
#analytics .hd-analytics-dimension-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--analytics-gap);
  align-items: stretch;
}

#analytics .hd-analytics-visual-card,
#analytics .hd-analytics-dimension-card {
  box-sizing: border-box;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  padding: var(--analytics-card-pad);
  border: 1px solid var(--analytics-chart-border);
  border-radius: 20px;
  background: var(--analytics-card-bg);
  box-shadow: var(--analytics-chart-shadow);
  overflow: hidden;
}

#analytics .hd-analytics-dimension-card__head {
  display: grid;
  gap: .25rem;
  padding: 0 0 .75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--analytics-chart-border) 70%, transparent);
}

#analytics .hd-analytics-dimension-visual {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
}

/* Charts */
#analytics .hd-analytics-chart,
#analytics-reports .hd-report-chart,
#analytics-reports .hd-report-waveform,
#analytics-reports .hd-report-bar-chart,
#analytics-reports .hd-report-pie-chart,
.hd-report-preview .hd-report-chart,
.hd-report-preview .hd-report-waveform,
.hd-report-preview .hd-report-bar-chart,
.hd-report-preview .hd-report-pie-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--analytics-chart-bg);
  border: 1px solid var(--analytics-chart-border);
  border-radius: 18px;
  overflow: hidden;
}

#analytics .hd-analytics-chart--line {
  max-height: 220px;
}

#analytics .hd-analytics-chart--bars {
  max-width: 620px;
  max-height: 300px;
  margin-inline: auto;
}

#analytics .hd-analytics-chart-grid,
#analytics-reports .chart-grid,
.hd-report-preview .chart-grid {
  stroke: color-mix(in srgb, var(--analytics-chart-border) 62%, transparent);
  stroke-width: 1;
}

#analytics .hd-analytics-chart-axis,
#analytics-reports .chart-axis,
.hd-report-preview .chart-axis {
  stroke: color-mix(in srgb, var(--analytics-chart-heading) 32%, transparent);
  stroke-width: 1.35;
}

#analytics .hd-analytics-chart-line,
#analytics-reports .chart-line,
.hd-report-preview .chart-line {
  fill: none;
  stroke: var(--analytics-chart-line);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#analytics .hd-analytics-chart-area,
#analytics-reports .chart-area,
.hd-report-preview .chart-area {
  fill: var(--analytics-chart-line);
  opacity: .16;
}

#analytics .hd-analytics-chart-dot,
#analytics-reports .chart-dot,
.hd-report-preview .chart-dot {
  fill: var(--colour-surface, #fffdf8);
  stroke: var(--analytics-chart-line);
  stroke-width: 3;
}

#analytics .hd-analytics-chart-bar,
#analytics-reports .chart-bar,
.hd-report-preview .chart-bar {
  fill: var(--analytics-chart-line);
}

#analytics .hd-analytics-chart-label,
#analytics-reports .chart-label,
#analytics-reports .chart-donut-total,
#analytics-reports .chart-donut-label,
.hd-report-preview .chart-label,
.hd-report-preview .chart-donut-total,
.hd-report-preview .chart-donut-label {
  fill: var(--analytics-chart-heading);
  font-family: var(--font-body, Lato, Arial, sans-serif);
  font-weight: 800;
}

#analytics .hd-analytics-chart-label--end,
#analytics-reports .chart-label-end,
.hd-report-preview .chart-label-end {
  text-anchor: end;
}

/* Pie charts and legends */
#analytics .hd-analytics-pie-card,
#analytics-reports .hd-report-pie-wrap,
.hd-report-preview .hd-report-pie-wrap {
  display: grid;
  grid-template-columns: minmax(210px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 26px);
  min-width: 0;
  width: 100%;
}

#analytics .hd-analytics-chart--pie {
  width: min(100%, 285px);
  max-width: 100%;
  justify-self: center;
  background: var(--colour-surface, #fffdf8);
  border-radius: 999px;
}

#analytics .hd-analytics-pie-base {
  fill: color-mix(in srgb, var(--analytics-chart-soft) 90%, #fff 10%);
}

#analytics .hd-analytics-pie-hole,
#analytics-reports .chart-donut-hole,
.hd-report-preview .chart-donut-hole {
  fill: var(--colour-surface, #fffdf8);
  stroke: color-mix(in srgb, var(--analytics-chart-border) 58%, transparent);
}

#analytics .hd-analytics-pie-total {
  fill: var(--analytics-chart-heading);
  font-size: 16px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}

#analytics .hd-analytics-chart-key,
#analytics-reports .hd-report-chart-key,
#analytics-reports .hd-report-chart-legend-wrap,
.hd-report-preview .hd-report-chart-key,
.hd-report-preview .hd-report-chart-legend-wrap {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 560px;
  justify-self: stretch;
  list-style: none;
  margin: 0;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  background: var(--colour-surface, #fffdf8);
  border: 1px solid var(--analytics-chart-border);
  border-radius: 16px;
  overflow: hidden;
}

#analytics-reports .hd-report-chart-key ul,
#analytics-reports .hd-report-chart-legend,
.hd-report-preview .hd-report-chart-key ul,
.hd-report-preview .hd-report-chart-legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

#analytics .hd-analytics-chart-key li,
#analytics-reports .hd-report-chart-key li,
#analytics-reports .hd-report-chart-legend li,
.hd-report-preview .hd-report-chart-key li,
.hd-report-preview .hd-report-chart-legend li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--analytics-chart-border) 62%, transparent);
  color: var(--colour-text, #14212a);
  line-height: 1.25;
}

#analytics .hd-analytics-chart-key li:last-child,
#analytics-reports .hd-report-chart-key li:last-child,
#analytics-reports .hd-report-chart-legend li:last-child,
.hd-report-preview .hd-report-chart-key li:last-child,
.hd-report-preview .hd-report-chart-legend li:last-child {
  border-bottom: 0;
}

#analytics .hd-analytics-chart-key span:not(.hd-analytics-key-swatch),
#analytics-reports .hd-report-chart-key span,
.hd-report-preview .hd-report-chart-key span {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

#analytics .hd-analytics-chart-key strong,
#analytics-reports .hd-report-chart-legend em,
.hd-report-preview .hd-report-chart-legend em {
  color: var(--analytics-chart-muted);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#analytics .hd-analytics-key-swatch,
#analytics-reports .chart-key,
.hd-report-preview .chart-key {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--analytics-chart-heading) 22%, transparent);
}

/* Shared chart colour classes used by dashboard and report SVGs */
#analytics .hd-slice-1,
#analytics-reports .chart-slice-0,
#analytics-reports .chart-key-0,
.hd-report-preview .chart-slice-0,
.hd-report-preview .chart-key-0 {
  fill: var(--analytics-chart-line);
  background: var(--analytics-chart-line);
}

#analytics .hd-slice-2,
#analytics-reports .chart-slice-1,
#analytics-reports .chart-key-1,
.hd-report-preview .chart-slice-1,
.hd-report-preview .chart-key-1 {
  fill: var(--analytics-chart-accent);
  background: var(--analytics-chart-accent);
}

#analytics .hd-slice-3,
#analytics-reports .chart-slice-2,
#analytics-reports .chart-key-2,
.hd-report-preview .chart-slice-2,
.hd-report-preview .chart-key-2 {
  fill: color-mix(in srgb, var(--analytics-chart-line) 62%, var(--analytics-chart-heading) 38%);
  background: color-mix(in srgb, var(--analytics-chart-line) 62%, var(--analytics-chart-heading) 38%);
}

#analytics .hd-slice-4,
#analytics-reports .chart-slice-3,
#analytics-reports .chart-key-3,
.hd-report-preview .chart-slice-3,
.hd-report-preview .chart-key-3 {
  fill: color-mix(in srgb, var(--analytics-chart-accent) 60%, var(--analytics-chart-heading) 40%);
  background: color-mix(in srgb, var(--analytics-chart-accent) 60%, var(--analytics-chart-heading) 40%);
}

#analytics .hd-slice-5,
#analytics-reports .chart-slice-4,
#analytics-reports .chart-key-4,
.hd-report-preview .chart-slice-4,
.hd-report-preview .chart-key-4 {
  fill: color-mix(in srgb, var(--analytics-chart-line) 44%, var(--analytics-chart-accent) 56%);
  background: color-mix(in srgb, var(--analytics-chart-line) 44%, var(--analytics-chart-accent) 56%);
}

#analytics .hd-slice-6,
#analytics-reports .chart-slice-5,
#analytics-reports .chart-key-5,
.hd-report-preview .chart-slice-5,
.hd-report-preview .chart-key-5 {
  fill: color-mix(in srgb, var(--analytics-chart-heading) 78%, var(--analytics-chart-line) 22%);
  background: color-mix(in srgb, var(--analytics-chart-heading) 78%, var(--analytics-chart-line) 22%);
}

#analytics .hd-slice-7,
#analytics-reports .chart-slice-6,
#analytics-reports .chart-key-6,
.hd-report-preview .chart-slice-6,
.hd-report-preview .chart-key-6 {
  fill: color-mix(in srgb, var(--analytics-chart-accent) 72%, #000 12%);
  background: color-mix(in srgb, var(--analytics-chart-accent) 72%, #000 12%);
}

#analytics .hd-slice-8,
#analytics-reports .chart-slice-7,
#analytics-reports .chart-key-7,
.hd-report-preview .chart-slice-7,
.hd-report-preview .chart-key-7 {
  fill: color-mix(in srgb, var(--analytics-chart-line) 30%, var(--analytics-chart-heading) 70%);
  background: color-mix(in srgb, var(--analytics-chart-line) 30%, var(--analytics-chart-heading) 70%);
}

/* Empty states and data status */
#analytics .hd-analytics-empty,
#analytics .hd-analytics-empty--soft {
  display: grid;
  place-items: center;
  gap: .5rem;
  min-height: 150px;
  padding: 1.25rem;
  text-align: center;
  line-height: 1.45;
  color: var(--analytics-chart-muted);
  border: 1px dashed color-mix(in srgb, var(--analytics-chart-border) 78%, transparent);
  border-radius: 16px;
  background: var(--analytics-chart-soft);
}

#analytics .hd-analytics-data-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}

/* Analytics report preview */
#analytics-reports .hd-report-preview,
#analytics-reports .hd-analytics-report-preview {
  box-sizing: border-box;
  max-width: 100%;
  overflow: visible;
  padding: clamp(18px, 2.2vw, 26px);
}

#analytics-reports .hd-report-doc,
#analytics-reports .hd-analytics-report-doc,
.hd-report-preview .hd-report-doc,
.hd-report-preview .hd-analytics-report-doc {
  box-sizing: border-box;
  width: min(100%, 920px);
  max-width: 920px;
  margin-inline: auto;
  padding: clamp(18px, 2.8vw, 28px);
  border-radius: 18px;
  background: var(--colour-surface, #fffdf8);
  color: var(--colour-text, #14212a);
}

#analytics-reports .hd-report-cover,
.hd-report-preview .hd-report-cover {
  text-align: center;
  margin-bottom: 18px;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--analytics-chart-border);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--colour-surface, #fffdf8), var(--analytics-chart-soft));
}

#analytics-reports .hd-report-logo,
.hd-report-preview .hd-report-logo {
  display: block;
  width: 110px;
  height: auto;
  margin: 0 auto 10px;
}

#analytics-reports .hd-report-cover h1,
.hd-report-preview .hd-report-cover h1 {
  margin: 0 0 .5rem;
  color: var(--analytics-chart-heading);
}

#analytics-reports .hd-report-period,
#analytics-reports .hd-report-purpose,
#analytics-reports .hd-report-section-intro,
.hd-report-preview .hd-report-period,
.hd-report-preview .hd-report-purpose,
.hd-report-preview .hd-report-section-intro {
  color: var(--analytics-chart-muted);
}

#analytics-reports .hd-report-metrics,
.hd-report-preview .hd-report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .9rem;
  align-items: stretch;
}

#analytics-reports .hd-report-metric,
.hd-report-preview .hd-report-metric {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .9rem 1rem;
  border: 1px solid var(--analytics-chart-border);
  border-radius: 16px;
  background: var(--analytics-card-bg);
  box-shadow: var(--analytics-chart-shadow);
}

#analytics-reports .hd-report-metric__label,
.hd-report-preview .hd-report-metric__label {
  margin: 0;
  color: var(--analytics-chart-muted);
  font-weight: 900;
  line-height: 1.3;
}

#analytics-reports .hd-report-metric__value,
.hd-report-preview .hd-report-metric__value {
  margin: 0;
  color: var(--analytics-chart-heading);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#analytics-reports .hd-report-visual-grid,
.hd-report-preview .hd-report-visual-grid,
#analytics-reports .hd-report-grid-2,
.hd-report-preview .hd-report-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

#analytics-reports .hd-report-visual-card,
.hd-report-preview .hd-report-visual-card {
  min-width: 0;
  padding: var(--analytics-card-pad);
  border: 1px solid var(--analytics-chart-border);
  border-radius: 18px;
  background: var(--analytics-card-bg);
  box-shadow: var(--analytics-chart-shadow);
  overflow: hidden;
}

#analytics-reports .hd-report-visual-card__header,
.hd-report-preview .hd-report-visual-card__header {
  padding-bottom: .65rem;
  margin-bottom: .75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--analytics-chart-border) 70%, transparent);
}

#analytics-reports .hd-report-visual-card__header h3,
.hd-report-preview .hd-report-visual-card__header h3 {
  margin: 0;
  color: var(--analytics-chart-heading);
}

#analytics-reports .hd-report-chart-meta,
.hd-report-preview .hd-report-chart-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .65rem;
  margin-top: .75rem;
}

#analytics-reports .hd-report-chart-meta span,
.hd-report-preview .hd-report-chart-meta span {
  padding: .5rem .75rem;
  border: 1px solid var(--analytics-chart-border);
  border-radius: 999px;
  background: var(--analytics-chart-soft);
  color: var(--analytics-chart-heading);
  font-weight: 800;
}

#analytics-reports .hd-report-tablewrap,
.hd-report-preview .hd-report-tablewrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 14px;
}

#analytics-reports .hd-report-table,
.hd-report-preview .hd-report-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--analytics-chart-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--colour-surface, #fffdf8);
}

#analytics-reports .hd-report-table th,
.hd-report-preview .hd-report-table th {
  background: var(--analytics-chart-soft);
  color: var(--analytics-chart-heading);
  font-weight: 900;
  text-align: left;
}

#analytics-reports .hd-report-table th,
#analytics-reports .hd-report-table td,
.hd-report-preview .hd-report-table th,
.hd-report-preview .hd-report-table td {
  padding: .7rem .85rem;
  overflow-wrap: anywhere;
  border-bottom: 1px solid color-mix(in srgb, var(--analytics-chart-border) 60%, transparent);
}

#analytics-reports .hd-report-table .hd-col-count,
.hd-report-preview .hd-report-table .hd-col-count,
#analytics .hd-table td:last-child,
#analytics .hd-table th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 920px) {
  #analytics .hd-analytics-pie-card,
  #analytics-reports .hd-report-pie-wrap,
  .hd-report-preview .hd-report-pie-wrap {
    grid-template-columns: 1fr;
  }

  #analytics .hd-analytics-chart-key {
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  #analytics .hd-analytics-kpis {
    grid-template-columns: 1fr;
  }

  #analytics .hd-analytics-kpi {
    min-height: 0;
  }

  #analytics-reports .hd-report-doc,
  .hd-report-preview .hd-report-doc {
    padding: 1rem;
  }
}

/* Print report output */
@media print {
  body:has(#analytics-reports) {
    background: #fff !important;
  }

  body:has(#analytics-reports) #hd-admin-strip,
  body:has(#analytics-reports) .hd-admin-strip,
  body:has(#analytics-reports) #hd-header-shell,
  body:has(#analytics-reports) #nav-container,
  body:has(#analytics-reports) .hd-admin-top,
  body:has(#analytics-reports) .hd-page-heading-card,
  body:has(#analytics-reports) .hd-admin-hero,
  body:has(#analytics-reports) .hd-tool-positioning,
  body:has(#analytics-reports) form.hd-form,
  body:has(#analytics-reports) .hd-report-preview > .hd-section-heading-row {
    display: none !important;
  }

  body:has(#analytics-reports) .hd-content-panel,
  body:has(#analytics-reports) .hd-report-preview,
  body:has(#analytics-reports) .hd-card,
  body:has(#analytics-reports) .hd-report-doc {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  #analytics-reports .hd-report-section,
  #analytics-reports .hd-report-visual-card,
  #analytics-reports .hd-report-metric,
  .hd-report-preview .hd-report-section,
  .hd-report-preview .hd-report-visual-card,
  .hd-report-preview .hd-report-metric {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  #analytics-reports .hd-report-metrics,
  .hd-report-preview .hd-report-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
}

/* HD v1058 analytics questionnaire/Qualtrics dashboard additions */
.hd-admin-analytics-page .hd-analytics-kpi--questionnaire {
  border-color: color-mix(in srgb, var(--colour-primary, #0b5f8f) 28%, var(--colour-border-soft, #d8c9a8)) !important;
}

.hd-admin-analytics-page .hd-analytics-kpi--questionnaire .hd-kpi__value {
  color: var(--colour-heading, #073a63) !important;
}

.hd-admin-analytics-page code,
.hd-tool-page--analytics-reports code {
  padding: .12rem .3rem !important;
  border: 1px solid var(--colour-border-soft, #d8c9a8) !important;
  border-radius: .35rem !important;
  background: var(--colour-surface-soft, #f3f0e5) !important;
}

/* === Admin site messages tool [admin_site_messages_tool] === */
/* HD RMS admin_site_messages_tool v984 clean + rehome
Owner: admin Site Messages/UI Messages tool only.
Owns admin Site Messages workflow, message sections, message rows/cards,
current-message preview, audience/finder rows and site-message specific controls.
Does not own email template previews, email layout, general communications suite nav,
blog/Qualtrics cards, generic alerts, badges, forms, buttons or shared admin cards. */
:root {
  --hd-site-message-gap: clamp(12px, 1.5vw, 18px);
  --hd-site-message-card-radius: 18px;
  --hd-site-message-section-pad: clamp(14px, 1.7vw, 20px);
  --hd-site-message-border: color-mix(in srgb, var(--colour-border-soft, #d8cdb9) 88%, transparent);
  --hd-site-message-surface: var(--colour-surface, #fffdf8);
  --hd-site-message-soft: color-mix(in srgb, var(--colour-surface-soft, #f7f0df) 78%, var(--colour-surface, #fffdf8) 22%);
  --hd-site-message-shadow: 0 12px 30px rgba(10, 24, 32, .07);
}

.hd-ui-messages-tool,
.hd-tool-page--ui-messages,
#ui-messages,
#site-messages {
  display: grid;
  gap: var(--hd-site-message-gap);
  min-width: 0;
}

.hd-ui-messages-tool .hd-message-workflow,
.hd-tool-page--ui-messages .hd-message-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.hd-ui-messages-tool .hd-message-workflow__step,
.hd-tool-page--ui-messages .hd-message-workflow__step {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--hd-site-message-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--colour-surface, #fffdf8) 94%, var(--colour-surface-soft, #f7f0df) 6%), var(--colour-surface, #fffdf8));
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(10, 24, 32, .055);
}

.hd-ui-messages-tool .hd-message-workflow__step strong,
.hd-tool-page--ui-messages .hd-message-workflow__step strong {
  display: block;
  color: var(--colour-heading, #073b5f);
  font-weight: 900;
  line-height: 1.22;
}

.hd-ui-messages-tool .hd-message-workflow__step span,
.hd-tool-page--ui-messages .hd-message-workflow__step span {
  display: block;
  color: var(--colour-muted, #526474);
  font-size: .95rem;
  line-height: 1.38;
}

.hd-ui-messages-tool .hd-ui-message-status-area,
.hd-tool-page--ui-messages .hd-ui-message-status-area {
  display: grid;
  gap: 10px;
}

.hd-ui-messages-tool .hd-ui-message-audience-row,
.hd-ui-messages-tool .hd-ui-message-finder-card .hd-row,
.hd-tool-page--ui-messages .hd-ui-message-audience-row,
.hd-tool-page--ui-messages .hd-ui-message-finder-card .hd-row {
  gap: 18px;
  align-items: end;
}

.hd-ui-messages-tool .hd-ui-message-section,
.hd-tool-page--ui-messages .hd-ui-message-section {
  border: 1px solid var(--hd-site-message-border);
  border-radius: var(--hd-site-message-card-radius);
  background: var(--hd-site-message-surface);
  box-shadow: var(--hd-site-message-shadow);
  overflow: hidden;
}

.hd-ui-messages-tool .hd-ui-message-section > summary,
.hd-tool-page--ui-messages .hd-ui-message-section > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px 18px;
  background: var(--hd-site-message-soft);
  border-bottom: 1px solid var(--hd-site-message-border);
  color: var(--colour-heading, #073b5f);
  font-weight: 900;
}

.hd-ui-messages-tool .hd-ui-message-section > summary::-webkit-details-marker,
.hd-tool-page--ui-messages .hd-ui-message-section > summary::-webkit-details-marker {
  display: none;
}

.hd-ui-messages-tool .hd-ui-message-section > summary::before,
.hd-tool-page--ui-messages .hd-ui-message-section > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  color: var(--colour-on-primary, #ffffff);
  background: var(--colour-primary, #06456b);
  font-weight: 900;
  line-height: 1;
}

.hd-ui-messages-tool .hd-ui-message-section[open] > summary::before,
.hd-tool-page--ui-messages .hd-ui-message-section[open] > summary::before {
  content: "−";
}

.hd-ui-messages-tool .hd-ui-message-section__body,
.hd-tool-page--ui-messages .hd-ui-message-section__body {
  display: grid;
  gap: var(--hd-site-message-gap);
  padding: var(--hd-site-message-section-pad);
}

.hd-ui-messages-tool .hd-ui-message-group,
.hd-tool-page--ui-messages .hd-ui-message-group,
.hd-ui-messages-tool .hd-ui-message-edit,
.hd-tool-page--ui-messages .hd-ui-message-edit,
.hd-ui-messages-tool .hd-ui-message-preview,
.hd-tool-page--ui-messages .hd-ui-message-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hd-ui-messages-tool .hd-ui-message-grid,
.hd-tool-page--ui-messages .hd-ui-message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.hd-ui-messages-tool .hd-ui-message-row,
.hd-tool-page--ui-messages .hd-ui-message-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--hd-site-message-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 94%, var(--colour-surface-soft, #f7f0df) 6%);
}

.hd-ui-messages-tool .hd-ui-message-row__head,
.hd-tool-page--ui-messages .hd-ui-message-row__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.hd-ui-messages-tool .hd-ui-message-row__head > *,
.hd-tool-page--ui-messages .hd-ui-message-row__head > * {
  min-width: 0;
}

.hd-ui-messages-tool .hd-ui-message-row__badges,
.hd-tool-page--ui-messages .hd-ui-message-row__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.hd-ui-messages-tool .hd-ui-message-current .hd-alert,
.hd-tool-page--ui-messages .hd-ui-message-current .hd-alert,
.hd-ui-messages-tool .hd-ui-message-preview .hd-alert,
.hd-tool-page--ui-messages .hd-ui-message-preview .hd-alert {
  margin: 0;
}

.hd-ui-messages-tool .hd-ui-message-edit textarea,
.hd-tool-page--ui-messages .hd-ui-message-edit textarea {
  min-height: 96px;
  resize: vertical;
}

.hd-ui-messages-tool .hd-ui-message-bottom-panels,
.hd-tool-page--ui-messages .hd-ui-message-bottom-panels {
  align-items: start;
  gap: 16px;
}

.hd-ui-messages-tool .hd-ui-message-bottom-panels details.hd-card,
.hd-tool-page--ui-messages .hd-ui-message-bottom-panels details.hd-card {
  margin: 0;
}

.hd-ui-messages-tool .hd-ui-message-bottom-panels summary,
.hd-ui-messages-tool .hd-ui-message-advanced summary,
.hd-tool-page--ui-messages .hd-ui-message-bottom-panels summary,
.hd-tool-page--ui-messages .hd-ui-message-advanced summary {
  cursor: pointer;
}

.hd-ui-messages-tool .hd-ui-message-save-card,
.hd-tool-page--ui-messages .hd-ui-message-save-card {
  position: sticky;
  bottom: 14px;
  z-index: 10;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 94%, transparent);
  backdrop-filter: blur(6px);
}

@media (max-width: 920px) {
  .hd-ui-messages-tool .hd-message-workflow,
  .hd-ui-messages-tool .hd-ui-message-grid,
  .hd-tool-page--ui-messages .hd-message-workflow,
  .hd-tool-page--ui-messages .hd-ui-message-grid {
    grid-template-columns: 1fr;
  }

  .hd-ui-messages-tool .hd-ui-message-save-card,
  .hd-tool-page--ui-messages .hd-ui-message-save-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .hd-ui-messages-tool .hd-ui-message-section > summary,
  .hd-tool-page--ui-messages .hd-ui-message-section > summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hd-ui-messages-tool .hd-ui-message-row__head,
  .hd-tool-page--ui-messages .hd-ui-message-row__head {
    display: grid;
  }

  .hd-ui-messages-tool .hd-ui-message-row__badges,
  .hd-tool-page--ui-messages .hd-ui-message-row__badges {
    justify-content: flex-start;
  }
}

/* === Blog and latest updates tool [blog_updates_tool] === */
/* HD RMS v1011 owner contract: blog_updates_tool
Owns the Blog / Latest Updates public presentation and the admin Blog Manager workflow.
Does not own generic public cards, shared rich-editor controls, generic buttons, forms or feedback messages.
*/
:root {
  --hd-blog-tool-gap: clamp(12px, 1.6vw, 20px);
  --hd-blog-tool-card-pad: clamp(16px, 2.2vw, 24px);
  --hd-blog-tool-radius: 18px;
  --hd-blog-tool-border: var(--colour-border-soft, #d8c9a8);
  --hd-blog-tool-bg: var(--colour-surface, #fffdf8);
  --hd-blog-tool-soft: var(--colour-surface-soft, #f3f1e8);
  --hd-blog-tool-heading: var(--colour-heading, #173642);
  --hd-blog-tool-text: var(--colour-text, #102630);
  --hd-blog-tool-muted: var(--colour-muted, #526474);
}

/* Public Blog / Latest Updates pages */
.hd-public-page--blog .hd-card-grid,
.hd-public-page--latest-updates .hd-card-grid,
.hd-public-page--updates .hd-card-grid,
.hd-blog-list,
.hd-updates-list,
.hd-latest-updates-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: var(--hd-blog-tool-gap);
  align-items: stretch;
}

.hd-public-page--blog article.hd-card,
.hd-public-page--latest-updates article.hd-card,
.hd-public-page--updates article.hd-card,
.hd-blog-card,
.hd-update-card,
.hd-latest-update-card {
  display: grid;
  align-content: start;
  gap: .75rem;
  min-width: 0;
  height: 100%;
  padding: var(--hd-blog-tool-card-pad);
  border: 1px solid var(--hd-blog-tool-border);
  border-radius: var(--hd-blog-tool-radius);
  background: var(--hd-blog-tool-bg);
  color: var(--hd-blog-tool-text);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--colour-shadow, #102630) 8%, transparent);
}

.hd-blog-card:hover,
.hd-blog-card:focus-within,
.hd-update-card:hover,
.hd-update-card:focus-within,
.hd-latest-update-card:hover,
.hd-latest-update-card:focus-within {
  border-color: color-mix(in srgb, var(--colour-primary, #4d6533) 38%, var(--hd-blog-tool-border));
  box-shadow: 0 16px 34px color-mix(in srgb, var(--colour-shadow, #102630) 12%, transparent);
}

.hd-blog-summary,
.hd-update-summary,
.hd-blog-card__summary,
.hd-update-card__summary {
  color: var(--hd-blog-tool-text);
  line-height: 1.55;
}

.hd-blog-card__meta,
.hd-update-card__meta,
.hd-latest-update-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  color: var(--hd-blog-tool-muted);
  font-size: .92rem;
}

.hd-blog-card__actions,
.hd-update-card__actions,
.hd-blog-summary .hd-actions,
.hd-update-summary .hd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  margin-top: .35rem;
}

/* Admin Blog Manager */
#admin-blog,
#blog-manager,
.hd-tool-page--blog,
.hd-tool-page--blog-manager,
.hd-blog-manager,
.hd-blog-admin {
  display: grid;
  gap: var(--hd-blog-tool-gap);
  min-width: 0;
}

#admin-blog .hd-blog-intro,
#blog-manager .hd-blog-intro,
.hd-tool-page--blog .hd-blog-intro,
.hd-blog-manager .hd-blog-intro,
.hd-blog-manager .hd-card,
.hd-blog-admin .hd-card,
.hd-blog-restore,
.hd-blog-editor-panel,
.hd-blog-post-card,
.hd-blog-saved-post,
.hd-blog-admin-card {
  min-width: 0;
  border: 1px solid var(--hd-blog-tool-border);
  border-radius: var(--hd-blog-tool-radius);
  background: var(--hd-blog-tool-bg);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
}

.hd-blog-manager details.hd-card,
.hd-tool-page--blog details.hd-card,
#admin-blog details.hd-card,
#blog-manager details.hd-card {
  overflow: hidden;
}

.hd-blog-manager details.hd-card > summary,
.hd-tool-page--blog details.hd-card > summary,
#admin-blog details.hd-card > summary,
#blog-manager details.hd-card > summary,
.hd-blog-accordion > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, .8fr);
  gap: 1rem;
  align-items: center;
  padding: clamp(14px, 1.8vw, 20px);
  color: var(--hd-blog-tool-heading);
  background: color-mix(in srgb, var(--hd-blog-tool-soft) 72%, var(--hd-blog-tool-bg) 28%);
}

.hd-blog-manager details.hd-card > summary::-webkit-details-marker,
.hd-tool-page--blog details.hd-card > summary::-webkit-details-marker,
#admin-blog details.hd-card > summary::-webkit-details-marker,
#blog-manager details.hd-card > summary::-webkit-details-marker,
.hd-blog-accordion > summary::-webkit-details-marker {
  display: none;
}

.hd-blog-manager details.hd-card > summary::before,
.hd-tool-page--blog details.hd-card > summary::before,
#admin-blog details.hd-card > summary::before,
#blog-manager details.hd-card > summary::before,
.hd-blog-accordion > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--colour-primary, #4d6533);
  color: var(--colour-on-primary, #fff);
  font-weight: 900;
}

.hd-blog-manager details.hd-card[open] > summary::before,
.hd-tool-page--blog details.hd-card[open] > summary::before,
#admin-blog details.hd-card[open] > summary::before,
#blog-manager details.hd-card[open] > summary::before,
.hd-blog-accordion[open] > summary::before {
  content: "−";
}

.hd-blog-manager details.hd-card > :not(summary),
.hd-tool-page--blog details.hd-card > :not(summary),
#admin-blog details.hd-card > :not(summary),
#blog-manager details.hd-card > :not(summary) {
  margin: 0;
  padding: var(--hd-blog-tool-card-pad);
}

.hd-blog-admin-list,
.hd-blog-saved-list,
.hd-blog-post-list {
  display: grid;
  gap: .9rem;
}

.hd-blog-post-card,
.hd-blog-saved-post,
.hd-blog-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: var(--hd-blog-tool-card-pad);
}

.hd-blog-post-card__actions,
.hd-blog-admin-card__actions,
.hd-blog-manager .hd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}

@media (max-width: 760px) {
  .hd-public-page--blog .hd-card-grid,
  .hd-public-page--latest-updates .hd-card-grid,
  .hd-public-page--updates .hd-card-grid,
  .hd-blog-list,
  .hd-updates-list,
  .hd-latest-updates-list,
  .hd-blog-post-card,
  .hd-blog-saved-post,
  .hd-blog-admin-card,
  .hd-blog-manager details.hd-card > summary,
  .hd-tool-page--blog details.hd-card > summary,
  #admin-blog details.hd-card > summary,
  #blog-manager details.hd-card > summary {
    grid-template-columns: 1fr;
  }

  .hd-blog-card__actions,
  .hd-update-card__actions,
  .hd-blog-summary .hd-actions,
  .hd-update-summary .hd-actions,
  .hd-blog-post-card__actions,
  .hd-blog-admin-card__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* === v1020 Blog Manager visual standardisation === */
.hd-tool-page--blog {
  --hd-tool-accent:#594586;
}

.hd-tool-page--blog .hd-card {
  border-color:rgba(89,69,134,.22);
}

.hd-tool-page--blog details,.hd-tool-page--blog .hd-blog-restore-panel {
  border:1px solid rgba(89,69,134,.22);
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 32px rgba(37,38,85,.05);
  overflow:hidden;
}

.hd-tool-page--blog details > summary {
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:1rem;
  align-items:center;
  padding:1rem 1.1rem;
  background:linear-gradient(135deg,rgba(89,69,134,.12),#fff);
  cursor:pointer;
  font-weight:800;
}

.hd-tool-page--blog details > summary::-webkit-details-marker {
  display:none;
}

.hd-tool-page--blog details > summary::before {
  content:'›';
  display:grid;
  place-items:center;
  width:1.8rem;
  height:1.8rem;
  border-radius:999px;
  background:var(--hd-tool-accent);
  color:#fff;
  transition:transform .18s ease;
}

.hd-tool-page--blog details[open] > summary::before {
  transform:rotate(90deg);
}

.hd-tool-page--blog .hd-blog-restore-panel {
  padding:1.1rem;
}

/* === end v1020 Blog Manager visual standardisation === */

/* v1021 Blog Manager rich editor stability */
#admin-blog .hd-editor-preview-frame {
  position:relative;
  isolation:isolate;
}

#admin-blog .hd-blog-admin-intro .hd-rich-editor,
#admin-blog .hd-blog-admin-compose .hd-rich-editor {
  min-height:170px;
}

#admin-blog .hd-blog-admin-intro a[href],
#admin-blog .hd-blog-admin-compose a[href] {
  cursor:text;
}

/* v1025-admin-tool-ui-standardisation: blog manager stable accordions and editor */
.hd-tool-page--blog details.hd-card > summary,
#blog-manager details.hd-card > summary {
  grid-template-columns:auto minmax(0,1fr) minmax(220px,.8fr);
}

.hd-tool-page--blog .hd-rich-editor-shell,
#blog-manager .hd-rich-editor-shell {
  margin-top:.75rem;
}

#blog-manager .hd-card[open],
.hd-tool-page--blog details[open] {
  box-shadow:0 18px 44px rgba(31,35,77,.08);
}

/* HD RMS v1059 Blog Manager restore visibility
Owner: blog_updates_tool */
.hd-tool-page--blog .hd-blog-restore-panel {
  border-left:6px solid color-mix(in srgb,var(--colour-primary,#0b5f8f) 72%,var(--colour-accent,#b8872f))!important;
}

.hd-tool-page--blog .hd-blog-restore-grid {
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  gap:16px;
  align-items:start;
}

.hd-tool-page--blog .hd-blog-restore-create,.hd-tool-page--blog .hd-blog-restore-list {
  background:color-mix(in srgb,var(--colour-surface-soft,#f4efe3) 35%,var(--colour-surface,#fffdf8))!important;
  border-radius:18px!important;
}

.hd-tool-page--blog .hd-blog-restore-list select {
  width:100%;
}

@media(max-width:900px) {
  .hd-tool-page--blog .hd-blog-restore-grid {
    grid-template-columns:1fr;
  }
}

/* HD RMS v1060: Blog Manager restore visibility */
.hd-blog-restore-panel {
  border-left:6px solid var(--colour-primary,#0b5f8f)!important
}

.hd-blog-restore-grid {
  display:grid!important;
  grid-template-columns:minmax(260px,.9fr) minmax(280px,1.1fr)!important;
  gap:16px!important;
  align-items:start!important
}

.hd-blog-restore-list select {
  width:100%!important
}

.hd-blog-restore-panel small.hd-block {
  display:block!important;
  overflow-wrap:anywhere!important;
  color:var(--colour-muted,var(--colour-text,#2f4854))!important
}

@media(max-width:850px) {
  .hd-blog-restore-grid {
    grid-template-columns:1fr!important
  }
}

/* v1062 Blog Manager restore-point cleanup controls
Owner: blog_updates_tool */
.hd-blog-restore-delete-all {
  border-top: 1px solid var(--colour-border-soft, #d8c9a8) !important;
  padding-top: .9rem !important;
}

.hd-blog-restore-delete-all .hd-alert {
  display: grid !important;
  gap: .35rem !important;
}

.hd-blog-restore-delete-all .hd-btn--danger {
  background: var(--colour-danger, #8f2f2f) !important;
  border-color: color-mix(in srgb, var(--colour-danger, #8f2f2f) 70%, #000 30%) !important;
  color: var(--colour-on-danger, #ffffff) !important;
  -webkit-text-fill-color: var(--colour-on-danger, #ffffff) !important;
}

/* Public Blog and Latest Updates presentation polish.
Owner: blog_updates_tool. Public update/blog cards only;
admin blog manager remains above. */
.hd-public-updates-surface .hd-blog-intro-card,
.hd-public-updates-surface .hd-latest-updates-fallback,
.hd-public-updates-surface .hd-related-resource-links {
  border-left: 6px solid var(--colour-accent, #b8872f) !important;
  background: linear-gradient(135deg, var(--hd-blog-tool-bg, #fffdf8), var(--hd-blog-tool-soft, #f3f1e8)) !important;
}

.hd-public-blog-card,
.hd-public-blog-post-card,
.hd-public-updates-surface .hd-latest-update-card {
  border: 1px solid color-mix(in srgb, var(--hd-blog-tool-border, #d8c9a8) 88%, transparent) !important;
  border-radius: var(--hd-blog-tool-radius, 18px) !important;
  background: var(--hd-blog-tool-bg, #fffdf8) !important;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--colour-shadow, #102630) 9%, transparent) !important;
}

.hd-public-blog-card .hd-blog-kicker,
.hd-public-blog-post-card .hd-blog-kicker {
  display: inline-flex !important;
  width: fit-content !important;
  margin: 0 0 .55rem !important;
  border-radius: 999px !important;
  padding: .2rem .55rem !important;
  background: color-mix(in srgb, var(--colour-primary, #06456b) 9%, var(--hd-blog-tool-bg, #fffdf8)) !important;
  color: var(--hd-blog-tool-heading, #173642) !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
}

.hd-public-blog-post-card .hd-page-heading-card {
  margin-top: .25rem !important;
  margin-bottom: 1rem !important;
}

.hd-public-blog-post-card .hd-blog-copy {
  max-width: 78ch !important;
}

.hd-public-updates-surface .hd-latest-updates-fallback {
  display: grid !important;
  gap: var(--hd-blog-tool-gap, 1rem) !important;
}

@media (max-width: 760px) {
  .hd-public-updates-surface .hd-blog-intro-card,
  .hd-public-updates-surface .hd-latest-updates-fallback,
  .hd-public-updates-surface .hd-related-resource-links {
    border-left-width: 4px !important;
  }
}

/* end v1076 pass8 public blog/latest presentation */

/* === General updates / Send Updates tool [general_updates_tool] === */
/* HD RMS v1011 owner contract: general_updates_tool
Owns the admin General Updates / Send Updates workflow only: audience, compose, preview, review and send panels.
Does not own email wrapper/template design, generic rich-editor controls, generic buttons, alerts or form fields.
*/
:root {
  --hd-updates-tool-gap: clamp(12px, 1.6vw, 20px);
  --hd-updates-tool-pad: clamp(16px, 2.2vw, 24px);
  --hd-updates-tool-radius: 18px;
  --hd-updates-tool-border: var(--colour-border-soft, #d8c9a8);
  --hd-updates-tool-bg: var(--colour-surface, #fffdf8);
  --hd-updates-tool-soft: var(--colour-surface-soft, #f3f1e8);
}

#send-updates,
#general-updates,
#messages-tool,
.hd-tool-page--send-updates,
.hd-tool-page--general-updates,
.hd-general-updates-tool,
.hd-send-updates-tool {
  display: grid;
  gap: var(--hd-updates-tool-gap);
  min-width: 0;
}

.hd-send-updates-workflow,
.hd-updates-workflow,
.hd-send-stepper,
.hd-updates-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}

.hd-send-updates-step,
.hd-updates-step,
.hd-send-stepper__step,
.hd-updates-stepper__step {
  display: grid;
  gap: .28rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--hd-updates-tool-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--hd-updates-tool-soft) 66%, var(--hd-updates-tool-bg) 34%);
}

.hd-send-updates-panel,
.hd-updates-panel,
.hd-message-compose-panel,
.hd-message-review-panel,
.hd-message-preview-panel,
.hd-message-audience-panel,
.hd-message-site-copy-card,
.hd-send-site-copy-card {
  display: grid;
  gap: var(--hd-updates-tool-gap);
  min-width: 0;
  padding: var(--hd-updates-tool-pad);
  border: 1px solid var(--hd-updates-tool-border);
  border-radius: var(--hd-updates-tool-radius);
  background: var(--hd-updates-tool-bg);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
}

.hd-message-preview-frame,
.hd-send-preview-frame,
.hd-updates-preview-frame,
.hd-preview-iframe-wrap {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hd-updates-tool-border);
  border-radius: 16px;
  background: #fff;
}

.hd-message-preview-frame iframe,
.hd-send-preview-frame iframe,
.hd-updates-preview-frame iframe,
.hd-preview-iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}

.hd-updates-recipient-grid,
.hd-message-recipient-grid,
.hd-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
}

.hd-update-audience-card,
.hd-message-audience-card,
.hd-recipient-card {
  display: grid;
  gap: .4rem;
  padding: 1rem;
  border: 1px solid var(--hd-updates-tool-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--hd-updates-tool-bg) 92%, var(--hd-updates-tool-soft) 8%);
}

.hd-send-updates-tool .hd-actions,
.hd-general-updates-tool .hd-actions,
#send-updates .hd-actions,
#general-updates .hd-actions,
#messages-tool .hd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

@media (max-width: 760px) {
  .hd-send-updates-workflow,
  .hd-updates-workflow,
  .hd-send-stepper,
  .hd-updates-stepper,
  .hd-updates-recipient-grid,
  .hd-message-recipient-grid,
  .hd-audience-grid {
    grid-template-columns: 1fr;
  }

  .hd-send-updates-tool .hd-actions,
  .hd-general-updates-tool .hd-actions,
  #send-updates .hd-actions,
  #general-updates .hd-actions,
  #messages-tool .hd-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* === Email templates and previews [email_templates_previews] === */
/* HD RMS v1011 owner contract: email_templates_previews
Owns admin Email Templates, template preview panels and email-wrapper preview presentation.
Does not own General Updates send workflow, generic forms, buttons, alerts or rich-editor controls.
*/
:root {
  --hd-email-tool-gap: clamp(12px, 1.6vw, 20px);
  --hd-email-tool-pad: clamp(16px, 2.2vw, 24px);
  --hd-email-tool-radius: 18px;
  --hd-email-tool-border: var(--colour-border-soft, #d8c9a8);
  --hd-email-tool-bg: var(--colour-surface, #fffdf8);
  --hd-email-tool-soft: var(--colour-surface-soft, #f3f1e8);
}

#email-templates,
#email-template-manager,
.hd-tool-page--email-templates,
.hd-tool-page--email-layout,
.hd-email-templates-tool,
.hd-email-template-manager {
  display: grid;
  gap: var(--hd-email-tool-gap);
  min-width: 0;
}

.hd-email-template-grid,
.hd-email-template-list,
.hd-email-template-workspace {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: var(--hd-email-tool-gap);
  align-items: start;
}

.hd-email-template-card,
.hd-email-template-panel,
.hd-email-layout-panel,
.hd-email-preview-panel,
.hd-email-wrapper-preview,
.hd-template-preview-card {
  display: grid;
  gap: var(--hd-email-tool-gap);
  min-width: 0;
  padding: var(--hd-email-tool-pad);
  border: 1px solid var(--hd-email-tool-border);
  border-radius: var(--hd-email-tool-radius);
  background: var(--hd-email-tool-bg);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
}

.hd-email-template-card.is-current,
.hd-email-template-card[aria-current="true"] {
  border-color: color-mix(in srgb, var(--colour-primary, #4d6533) 40%, var(--hd-email-tool-border));
  background: color-mix(in srgb, var(--hd-email-tool-soft) 52%, var(--hd-email-tool-bg) 48%);
}

.hd-email-preview-frame,
.hd-template-preview-frame,
.hd-email-wrapper-iframe-wrap {
  overflow: hidden;
  border: 1px solid var(--hd-email-tool-border);
  border-radius: 16px;
  background: #fff;
}

.hd-email-preview-frame iframe,
.hd-template-preview-frame iframe,
.hd-email-wrapper-iframe,
.hd-email-preview-iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  background: #fff;
}

.hd-email-subject-preview,
.hd-email-recipient-preview,
.hd-email-template-meta {
  display: grid;
  gap: .25rem;
  padding: .85rem 1rem;
  border: 1px solid var(--hd-email-tool-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--hd-email-tool-soft) 68%, var(--hd-email-tool-bg) 32%);
}

.hd-email-templates-tool .hd-actions,
.hd-email-template-manager .hd-actions,
#email-templates .hd-actions,
#email-template-manager .hd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hd-email-template-grid,
  .hd-email-template-list,
  .hd-email-template-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hd-email-templates-tool .hd-actions,
  .hd-email-template-manager .hd-actions,
  #email-templates .hd-actions,
  #email-template-manager .hd-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* v1027-email-wrapper-preview-polish
Admin email template preview styling only. Sent email wrapper layout is controlled by shared/app/lib/email-template.php and site_email_layout.email_css. */
.hd-email-templates-layout,
.hd-email-template-preview,
.hd-email-preview-frame {
  --hd-email-preview-radius: 22px;
}

.hd-email-preview-frame iframe,
.hd-editor-preview-frame iframe {
  background: var(--colour-page-bg, #eef1f4);
}

.hd-email-shell {
  box-shadow: 0 18px 42px rgba(5, 59, 93, .10);
}

.hd-email-header .hd-email-brand-wrap {
  background: var(--colour-surface, #fffdf8);
  border: 1px solid var(--colour-border-soft, #e2d6bc);
  border-radius: 18px;
}

.hd-email-title {
  letter-spacing: .015em;
}

.hd-email-subtitle {
  max-width: 42rem;
}

.hd-email-kicker {
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* v1028 email destination guard rails */
.hd-email-route-guard {
  border-left:4px solid var(--hd-accent, #b9862d);
  background:color-mix(in srgb, var(--hd-surface, #fffdf8) 92%, var(--hd-accent, #b9862d) 8%);
  box-shadow:0 12px 26px rgba(10,26,54,.06);
}

.hd-email-route-guard span {
  display:inline-block;
  margin-right:1.2rem;
}

.hd-tool-page--email-templates .hd-email-route-guard strong {
  color:var(--hd-heading, #283061);
}

.hd-tool-page--config input[readonly],
.hd-tool-page--config input[aria-readonly="true"] {
  background:color-mix(in srgb, var(--hd-surface-muted, #f4f1ea) 72%, #fff 28%);
  cursor:not-allowed;
}

/* =========================================================
HD RMS v1098 email wrapper preview sizing
Owner: email_templates_previews.
Purpose: make the wrapper/template preview large enough to inspect the real email
layout and logo without affecting sent email markup.
========================================================= */
.hd-email-preview-frame,
.hd-template-preview-frame,
.hd-email-wrapper-iframe-wrap,
.hd-email-preview-frame--large {
  width: min(100%, 980px) !important;
  min-height: 640px !important;
  resize: vertical;
  overflow: auto !important;
}

.hd-email-preview-frame iframe,
.hd-template-preview-frame iframe,
.hd-email-wrapper-iframe,
.hd-email-preview-iframe,
.hd-email-preview-frame--large iframe {
  min-height: 640px !important;
  height: min(78vh, 820px) !important;
  width: 100% !important;
}

@media (max-width: 760px) {
  .hd-email-preview-frame,
  .hd-template-preview-frame,
  .hd-email-wrapper-iframe-wrap,
  .hd-email-preview-frame--large {
    min-height: 520px !important;
  }

  .hd-email-preview-frame iframe,
  .hd-template-preview-frame iframe,
  .hd-email-wrapper-iframe,
  .hd-email-preview-iframe,
  .hd-email-preview-frame--large iframe {
    min-height: 520px !important;
  }
}

/* =========================================================
HD RMS v1099 email template preview and delivery note polish
Owner: email_templates_previews.
Purpose: make previews easier to inspect and keep delivery routing details present
without showing a large technical guard-rail banner.
========================================================= */
.hd-email-preview-frame--large,
.hd-email-preview-frame,
.hd-template-preview-frame {
  width: min(100%, 760px) !important;
  min-height: 640px !important;
  border-radius: 18px !important;
}

.hd-email-route-note {
  border: 1px solid color-mix(in srgb, var(--colour-border, #b9d2bd) 70%, transparent) !important;
  background: color-mix(in srgb, var(--colour-surface-soft, #eef6e8) 72%, var(--colour-surface, #fff) 28%) !important;
  border-radius: 16px !important;
  padding: 12px 16px !important;
}

.hd-email-route-note > summary {
  cursor: pointer !important;
  font-weight: 800 !important;
  color: var(--colour-text, #06334a) !important;
}

/* === Qualtrics links admin tool [qualtrics_links_admin_tool] === */
/* HD RMS v1011 owner contract: qualtrics_links_admin_tool
Owns the admin Qualtrics Links tool: link cards, shareable public-link controls, hit stats and link actions.
Does not own the public Quest welcome/iframe runner;
that remains qualtrics_embeds.
*/
:root {
  --hd-ql-gap: clamp(12px, 1.6vw, 20px);
  --hd-ql-pad: clamp(16px, 2.2vw, 24px);
  --hd-ql-radius: 18px;
  --hd-ql-border: var(--colour-border-soft, #d8c9a8);
  --hd-ql-bg: var(--colour-surface, #fffdf8);
  --hd-ql-soft: var(--colour-surface-soft, #f3f1e8);
}

#qualtrics-links,
#qualtrics-link-manager,
.hd-tool-page--qualtrics-links,
.hd-qualtrics-links-tool,
.hd-qualtrics-link-manager {
  display: grid;
  gap: var(--hd-ql-gap);
  min-width: 0;
}

.hd-qualtrics-link-grid,
.hd-qualtrics-link-list {
  display: grid;
  gap: var(--hd-ql-gap);
}

.hd-qualtrics-link-card,
.hd-qualtrics-card,
.hd-quest-link-card,
.hd-ql-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: var(--hd-ql-gap);
  align-items: start;
  min-width: 0;
  padding: var(--hd-ql-pad);
  border: 1px solid var(--hd-ql-border);
  border-radius: var(--hd-ql-radius);
  background: var(--hd-ql-bg);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
}

.hd-qualtrics-link-card.is-active,
.hd-qualtrics-card.is-active,
.hd-quest-link-card.is-active {
  border-color: color-mix(in srgb, var(--colour-success, #147d53) 40%, var(--hd-ql-border));
}

.hd-qualtrics-link-main,
.hd-ql-main,
.hd-quest-link-main {
  display: grid;
  gap: .55rem;
  min-width: 0;
}

.hd-qualtrics-public-link,
.hd-quest-public-link,
.hd-ql-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .65rem;
  align-items: center;
  min-width: 0;
}

.hd-qualtrics-public-link input,
.hd-quest-public-link input,
.hd-ql-copy-row input {
  min-width: 0;
  width: 100%;
}

.hd-qualtrics-stats,
.hd-ql-stats,
.hd-quest-link-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .65rem;
}

.hd-qualtrics-stat,
.hd-ql-stat,
.hd-quest-link-stat {
  display: grid;
  gap: .2rem;
  padding: .85rem;
  border: 1px solid var(--hd-ql-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--hd-ql-soft) 68%, var(--hd-ql-bg) 32%);
}

.hd-qualtrics-stat strong,
.hd-ql-stat strong,
.hd-quest-link-stat strong {
  color: var(--colour-heading, #173642);
  font-size: 1.35rem;
  line-height: 1;
}

.hd-qualtrics-link-actions,
.hd-ql-actions,
.hd-quest-link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

@media (max-width: 820px) {
  .hd-qualtrics-link-card,
  .hd-qualtrics-card,
  .hd-quest-link-card,
  .hd-ql-card,
  .hd-qualtrics-public-link,
  .hd-quest-public-link,
  .hd-ql-copy-row {
    grid-template-columns: 1fr;
  }

  .hd-qualtrics-link-actions,
  .hd-ql-actions,
  .hd-quest-link-actions {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* v1019 Qualtrics links restore panel */
.hd-tool-page--qualtrics-links .hd-ql-restore-panel {
  border-radius: 20px;
}

.hd-tool-page--qualtrics-links .hd-ql-restore-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
  align-items: end;
}

.hd-tool-page--qualtrics-links .hd-ql-restore-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.hd-tool-page--qualtrics-links .hd-ql-restore-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(43, 43, 92, .14);
}

@media (max-width: 820px) {
  .hd-tool-page--qualtrics-links .hd-ql-restore-panel__head,
  .hd-tool-page--qualtrics-links .hd-ql-restore-create,
  .hd-tool-page--qualtrics-links .hd-ql-restore-list {
    grid-template-columns: 1fr;
  }
}

/* === v1020 Qualtrics links visual standardisation === */
.hd-tool-page--qualtrics-links {
  --hd-tool-accent:#4b3f86;
}

.hd-ql-setup-stack {
  display:grid;
  gap:1rem;
}

.hd-ql-guidance-card {
  background:linear-gradient(135deg,rgba(75,63,134,.10),#fff 64%);
}

.hd-ql-guidance-list {
  columns:2;
  column-gap:2rem;
  margin-bottom:0;
}

.hd-ql-form-card {
  border-left:6px solid var(--hd-tool-accent);
}

.hd-ql-form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
  align-items:start;
}

.hd-ql-field--wide,.hd-ql-form-actions {
  grid-column:1/-1;
}

.hd-ql-card-list {
  display:grid;
  gap:.9rem;
}

.hd-ql-card {
  border:1px solid rgba(75,63,134,.22);
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 34px rgba(37,38,85,.06);
  overflow:hidden;
}

.hd-ql-card__summary {
  display:grid;
  grid-template-columns:1fr auto;
  gap:1rem;
  align-items:center;
  padding:1rem 1.15rem;
  background:linear-gradient(135deg,rgba(75,63,134,.12),#fff);
  cursor:pointer;
}

.hd-ql-card__summary::-webkit-details-marker {
  display:none;
}

.hd-ql-card__summary::before {
  content:'›';
  display:inline-grid;
  place-items:center;
  width:1.8rem;
  height:1.8rem;
  margin-right:.65rem;
  border-radius:999px;
  background:var(--hd-tool-accent);
  color:#fff;
  float:left;
  transition:transform .18s ease;
}

.hd-ql-card[open] .hd-ql-card__summary::before {
  transform:rotate(90deg);
}

.hd-ql-card__summary-main {
  display:grid;
  gap:.2rem;
}

.hd-ql-card__summary-meta {
  display:flex;
  gap:.75rem;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.hd-ql-card__body {
  padding:1rem 1.15rem 1.15rem;
  display:grid;
  gap:.8rem;
}

.hd-ql-status {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.28rem .72rem;
  font-weight:800;
  background:#ece9f4;
  color:#24295f;
}

.hd-ql-status--active {
  background:#dff3e8;
  color:#145c37;
}

.hd-ql-status--disabled {
  background:#fff1cf;
  color:#6b4a00;
}

.hd-ql-status--archived {
  background:#f4e0e0;
  color:#7a1717;
}

.hd-ql-share {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:.55rem;
  align-items:center;
}

.hd-ql-meta {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.75rem;
}

.hd-ql-meta > div {
  border:1px solid rgba(75,63,134,.18);
  border-radius:14px;
  background:#fbf9ff;
  padding:.75rem;
}

.hd-ql-actions {
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  justify-content:flex-end;
  border-top:1px solid #e7e1ef;
  padding-top:.8rem;
}

.hd-ql-url {
  overflow-wrap:anywhere;
}

@media (max-width:850px) {
  .hd-ql-guidance-list {
    columns:1
  }

  .hd-ql-form-grid,.hd-ql-share,.hd-ql-meta {
    grid-template-columns:1fr
  }

  .hd-ql-card__summary {
    grid-template-columns:1fr
  }

  .hd-ql-card__summary-meta,.hd-ql-actions {
    justify-content:flex-start
  }
}

/* === end v1020 Qualtrics links visual standardisation === */

/* v1025-admin-tool-ui-standardisation: Qualtrics Links card review */
.hd-tool-page--qualtrics-links .hd-ql-card,
#qualtrics-links .hd-ql-card {
  border-radius:22px;
  border:1px solid rgba(31,35,77,.14);
  background:rgba(255,255,255,.9);
  box-shadow:0 14px 38px rgba(31,35,77,.07);
}

.hd-tool-page--qualtrics-links details.hd-ql-card > summary,
#qualtrics-links details.hd-ql-card > summary {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:1rem;
  align-items:center;
  cursor:pointer;
  padding:1rem 1.1rem;
  background:linear-gradient(90deg, rgba(50,52,112,.08), rgba(184,135,47,.06));
  border-radius:18px;
}

.hd-tool-page--qualtrics-links .hd-ql-body,
#qualtrics-links .hd-ql-body {
  padding:1rem 1.1rem 1.15rem;
}

.hd-tool-page--qualtrics-links .hd-ql-actions,
#qualtrics-links .hd-ql-actions {
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  align-items:center;
}

/* v1064 Qualtrics Links admin layout refinement */
.hd-tool-page--qualtrics-links {
  max-width: min(1120px, calc(100vw - 48px)) !important;
  margin-inline: auto !important;
}

.hd-tool-page--qualtrics-links .hd-card,
.hd-tool-page--qualtrics-links form {
  box-sizing: border-box !important;
}

.hd-tool-page--qualtrics-links .hd-grid-2,
.hd-tool-page--qualtrics-links .hd-form-grid,
.hd-tool-page--qualtrics-links form .hd-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
  gap: 1rem !important;
}

.hd-tool-page--qualtrics-links textarea,
.hd-tool-page--qualtrics-links .hd-span-2,
.hd-tool-page--qualtrics-links .hd-field--full {
  grid-column: 1 / -1 !important;
}

.hd-tool-page--qualtrics-links .hd-qualtrics-link-card,
.hd-tool-page--qualtrics-links .hd-list-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: .75rem 1rem !important;
  align-items: center !important;
}

@media (max-width: 820px) {
  .hd-tool-page--qualtrics-links .hd-grid-2,
  .hd-tool-page--qualtrics-links .hd-form-grid,
  .hd-tool-page--qualtrics-links form .hd-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === Secure shared document areas [secure_shared_document_areas] === */
/* HD RMS v1011 owner contract: secure_shared_document_areas
Owns protected shared document areas, access-link/password copy controls and protected share cards.
Does not own the general Resources Manager, generic forms, buttons, cards or media/document library tools.
*/
:root {
  --hd-secure-doc-gap: clamp(12px, 1.6vw, 20px);
  --hd-secure-doc-pad: clamp(16px, 2.2vw, 24px);
  --hd-secure-doc-radius: 18px;
  --hd-secure-doc-border: var(--colour-border-soft, #d8c9a8);
  --hd-secure-doc-bg: var(--colour-surface, #fffdf8);
  --hd-secure-doc-soft: var(--colour-surface-soft, #f3f1e8);
}

#shared-documents,
#secure-sharing,
#protected-shared-documents,
.hd-tool-page--shared-documents,
.hd-tool-page--secure-sharing,
.hd-secure-documents-tool,
.hd-shared-documents-tool {
  display: grid;
  gap: var(--hd-secure-doc-gap);
  min-width: 0;
}

.hd-shared-area-card,
.hd-secure-share-card,
.hd-protected-share-card,
.hd-shared-document-card,
.hd-secure-doc-panel,
.hd-share-wrapper-panel {
  display: grid;
  gap: var(--hd-secure-doc-gap);
  min-width: 0;
  padding: var(--hd-secure-doc-pad);
  border: 1px solid var(--hd-secure-doc-border);
  border-radius: var(--hd-secure-doc-radius);
  background: var(--hd-secure-doc-bg);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--colour-shadow, #102630) 7%, transparent);
}

.hd-secure-share-copy-panel,
.hd-shared-doc-copy-panel,
.hd-protected-link-panel,
.hd-share-access-panel {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--hd-secure-doc-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--hd-secure-doc-soft) 70%, var(--hd-secure-doc-bg) 30%);
}

.hd-secure-share-copy-row,
.hd-shared-doc-copy-row,
.hd-protected-link-copy-row,
.hd-share-access-copy-row,
#shared-documents .hd-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .45fr) auto auto;
  gap: .65rem;
  align-items: end;
  min-width: 0;
}

.hd-secure-share-copy-row input,
.hd-shared-doc-copy-row input,
.hd-protected-link-copy-row input,
.hd-share-access-copy-row input,
#shared-documents .hd-copy-row input {
  min-width: 0;
  width: 100%;
}

.hd-share-password-field,
.hd-secure-password-field,
.hd-generated-password-field {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .02em;
}

#shared-documents .hd-doc-picker,
.hd-secure-doc-picker,
.hd-protected-doc-picker {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--hd-secure-doc-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--hd-secure-doc-bg) 92%, var(--hd-secure-doc-soft) 8%);
}

#shared-documents .hd-doc-picker__row,
.hd-secure-doc-picker__row,
.hd-protected-doc-picker__row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--hd-secure-doc-border) 76%, transparent);
  border-radius: 14px;
  background: var(--hd-secure-doc-bg);
}

#shared-documents .hd-doc-picker__row:has(input:checked),
.hd-secure-doc-picker__row:has(input:checked),
.hd-protected-doc-picker__row:has(input:checked) {
  border-color: color-mix(in srgb, var(--colour-success, #147d53) 42%, var(--hd-secure-doc-border));
  background: color-mix(in srgb, var(--colour-success, #147d53) 8%, var(--hd-secure-doc-bg));
}

.hd-linked-doc-summary,
#shared-documents .hd-linked-doc-summary {
  padding: 1rem;
  border: 1px solid var(--hd-secure-doc-border);
  border-radius: 14px;
  background: var(--hd-secure-doc-soft);
}

@media (max-width: 860px) {
  .hd-secure-share-copy-row,
  .hd-shared-doc-copy-row,
  .hd-protected-link-copy-row,
  .hd-share-access-copy-row,
  #shared-documents .hd-copy-row {
    grid-template-columns: 1fr;
  }
}

/* v1064 Shared Document Areas admin layout refinement */
.hd-tool-page--shared-documents {
  max-width: min(1140px, calc(100vw - 48px)) !important;
  margin-inline: auto !important;
}

.hd-tool-page--shared-documents .hd-card,
.hd-tool-page--shared-documents form {
  box-sizing: border-box !important;
}

.hd-tool-page--shared-documents form .hd-grid,
.hd-tool-page--shared-documents .hd-grid-2,
.hd-tool-page--shared-documents .hd-form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(250px, 1fr)) !important;
  gap: 1rem !important;
}

.hd-tool-page--shared-documents textarea,
.hd-tool-page--shared-documents .hd-span-2,
.hd-tool-page--shared-documents .hd-field--full,
.hd-tool-page--shared-documents .hd-shared-doc-tools {
  grid-column: 1 / -1 !important;
}

.hd-tool-page--shared-documents .hd-doc-picker {
  display: grid !important;
  gap: .5rem !important;
  max-height: 360px !important;
  overflow: auto !important;
  padding: .5rem !important;
  border: 1px solid var(--colour-border-soft, #e2d6bd) !important;
  border-radius: 12px !important;
  background: var(--colour-surface, #fffdf8) !important;
}

.hd-tool-page--shared-documents .hd-doc-picker__row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: .65rem !important;
  align-items: start !important;
  padding: .65rem !important;
  border: 1px solid var(--colour-border-soft, #e2d6bd) !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--colour-surface, #fffdf8) 90%, var(--colour-surface-soft, #f5f1e8) 10%) !important;
}

.hd-tool-page--shared-documents .hd-doc-picker__main {
  display: grid !important;
  gap: .16rem !important;
  min-width: 0 !important;
}

.hd-tool-page--shared-documents .hd-actions {
  flex-wrap: wrap !important;
}

@media (max-width: 820px) {
  .hd-tool-page--shared-documents form .hd-grid,
  .hd-tool-page--shared-documents .hd-grid-2,
  .hd-tool-page--shared-documents .hd-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === Handbook builder [handbook_builder] === */
/* HD RMS handbook_builder v993 clean + rehome
Owner: Handbook Builder tool and generated handbook output.
Owns Handbook Builder admin dashboard, import/library picker, section rows, builder layout, handbook document/preview and print output.
Does not own generic buttons, generic forms, generic tables, shared alerts, shared rich-editor chrome, public site shell or unrelated resource-library management. */

/* HD RMS v841 owner contract: handbook_builder
Owns Handbook Builder tool layout, handbook cards, builder rows and handbook-specific editor panels.
Keep this section as the single source of truth for its owner area. Do not place unrelated component rules here.
*/
.hd-handbook-admin .hd-handbook-dashboard {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  padding:16px;
}

.hd-handbook-admin .hd-stat-card {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  align-items:center;
  border:1px solid color-mix(in srgb,var(--colour-border,#d9d2e7) 86%,transparent);
  border-radius:18px;
  padding:16px 18px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--colour-surface,#fff) 95%,var(--colour-surface-soft,#f7f4fb)),var(--colour-surface,#fff));
  box-shadow:0 10px 28px rgba(18,26,52,.06);
}

.hd-handbook-admin .hd-stat-card strong {
  display:inline-grid;
  place-items:center;
  min-width:3.2rem;
  height:3.2rem;
  border-radius:999px;
  background:color-mix(in srgb,var(--colour-primary,#4d4fa3) 12%,var(--colour-surface,#fff));
  color:var(--colour-primary,#253d72);
  font-size:1.45rem;
  line-height:1;
  font-weight:900;
  letter-spacing:.02em;
}

.hd-handbook-admin .hd-stat-card span {
  display:block;
  color:var(--colour-text-muted,#4c5877);
  font-size:.98rem;
  line-height:1.25;
  font-weight:700;
}

.hd-handbook-import-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.hd-handbook-import summary {
  cursor:pointer;
  list-style:none;
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}

.hd-handbook-import summary::-webkit-details-marker {
  display:none;
}

.hd-handbook-import summary::before {
  content:"+";
  display:inline-grid;
  place-items:center;
  width:1.45rem;
  height:1.45rem;
  border-radius:999px;
  background:color-mix(in srgb,var(--colour-primary,#4d4fa3) 10%,var(--colour-surface,#fff));
  color:var(--colour-primary,#253d72);
  font-weight:800;
  flex:0 0 auto;
}

.hd-handbook-import[open] summary::before {
  content:"–";
}

.hd-library-picker {
  border:1px solid color-mix(in srgb,var(--colour-border,#d9d2e7) 86%,transparent);
  border-radius:18px;
  padding:14px;
  background:color-mix(in srgb,var(--colour-surface-soft,#f7f4fb) 55%,var(--colour-surface,#fff));
}

.hd-library-picker__search {
  max-width:320px;
}

.hd-library-picker__list {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:10px;
  max-height:390px;
  overflow:auto;
  padding:3px;
}

.hd-library-doc {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  border:1px solid color-mix(in srgb,var(--colour-border,#d9d2e7) 86%,transparent);
  border-radius:15px;
  background:var(--colour-surface,#fff);
  padding:12px;
  cursor:pointer;
  transition:box-shadow .15s ease,border-color .15s ease,transform .15s ease;
}

.hd-library-doc:hover,.hd-library-doc:focus-within {
  border-color:var(--colour-primary,#4d4fa3);
  box-shadow:0 8px 24px rgba(18,26,52,.08);
  transform:translateY(-1px);
}

.hd-library-doc input {
  width:1.05rem;
  height:1.05rem;
}

.hd-library-doc__main strong {
  display:block;
  color:var(--colour-heading,#142750);
  line-height:1.2;
}

.hd-library-doc__main small {
  display:block;
  margin-top:3px;
  color:var(--colour-text-muted,#4c5877);
  line-height:1.25;
}

.hd-handbook-admin-list {
  display:grid;
  gap:12px;
}

.hd-handbook-admin-section {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:12px;
  align-items:center;
  border:1px solid color-mix(in srgb,var(--colour-border,#d9d2e7) 86%,transparent);
  border-radius:16px;
  padding:13px 14px;
  background:var(--colour-surface,#fff);
}

.hd-handbook-admin-section__meta {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:flex-end;
}

.hd-handbook-filter {
  max-width:320px;
}

.hd-handbook-builder-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,340px);
  gap:16px;
  align-items:start;
}

.hd-handbook-selection-summary {
  position:sticky;
  top:1rem;
}

.hd-handbook-summary-list {
  margin:.7rem 0 0 1.2rem;
  padding:0;
  display:grid;
  gap:5px;
}

.hd-handbook-section > summary {
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.hd-handbook-section > summary input {
  width:1.1rem;
  height:1.1rem;
  vertical-align:middle;
}

.hd-handbook-source-note {
  font-size:.92rem;
  color:var(--colour-text-muted,#4c5877);
  background:color-mix(in srgb,var(--colour-surface-soft,#f7f4fb) 80%,var(--colour-surface,#fff));
  border-left:4px solid var(--colour-primary,#4d4fa3);
  padding:.55rem .75rem;
  border-radius:10px;
}

.hd-handbook-document {
  max-width:980px;
  margin-inline:auto;
  background:var(--colour-surface,#fff);
}

.hd-handbook-document__brand {
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:18px;
  align-items:center;
  border-bottom:1px solid color-mix(in srgb,var(--colour-border,#d9d2e7) 84%,transparent);
  padding-bottom:16px;
  margin-bottom:16px;
}

.hd-handbook-document__brand strong {
  display:block;
  color:var(--colour-primary,#253d72);
  font-size:1.45rem;
  line-height:1.15;
  letter-spacing:.03em;
}

.hd-handbook-document__brand span,.hd-handbook-document__brand em {
  display:block;
  margin-top:4px;
  color:var(--colour-text-muted,#4c5877);
  font-style:normal;
}

.hd-handbook-document__logo {
  max-width:105px;
  height:auto;
  display:block;
  margin:auto;
}

.hd-handbook-document__banner {
  margin:0 0 18px;
  border-radius:18px;
  overflow:hidden;
  max-height:220px;
  background:var(--colour-surface-soft,#f7f4fb);
}

.hd-handbook-document__banner img {
  width:100%;
  height:100%;
  max-height:220px;
  object-fit:cover;
  display:block;
}

.hd-handbook-print-section {
  break-inside:avoid;
  margin:18px 0 0;
  padding-top:16px;
  border-top:1px solid color-mix(in srgb,var(--colour-border,#d9d2e7) 84%,transparent);
}

.hd-handbook-print-section h2 {
  color:var(--colour-primary,#253d72);
  margin-top:0;
}

.hd-handbook-summary {
  font-weight:700;
  color:var(--colour-text-muted,#4c5877);
}

.hd-handbook-document__footer {
  display:grid;
  gap:6px;
  margin-top:24px;
  padding:16px 18px;
  border-radius:18px;
  background:var(--colour-footer-bg,#213d72);
  color:var(--colour-footer-text,#fff);
}

.hd-handbook-document__footer span {
  opacity:.9;
}

@media (max-width: 800px) {
  .hd-handbook-admin .hd-handbook-dashboard,.hd-handbook-builder-grid {
    grid-template-columns:1fr;
  }

  .hd-handbook-selection-summary {
    position:static;
  }

  .hd-handbook-admin-section {
    grid-template-columns:1fr;
  }

  .hd-handbook-document__brand {
    grid-template-columns:1fr;
    text-align:center;
  }

  .hd-handbook-document__banner {
    max-height:160px;
  }

  .hd-actions--between {
    align-items:stretch;
  }

  .hd-library-picker__search {
    max-width:none;
  }
}

@media print {
  .hd-handbook-output__actions,.hd-bottom-toolbar,.site-header,.site-footer,.hd-public-toolbar {
    display:none!important;
  }

  .hd-handbook-document {
    box-shadow:none!important;
    border:0!important;
    padding:0!important;
  }

  .hd-handbook-document__footer {
    background:#213d72!important;
    color:#fff!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  .hd-handbook-print-section {
    page-break-inside:avoid;
  }
}

.hd-handbook-workflow-hero {
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(18rem,.9fr)!important;
  gap:1rem!important;
  align-items:center!important;
}

.hd-handbook-workflow-panel > summary {
  cursor:pointer!important;
  display:flex!important;
  justify-content:space-between!important;
  gap:1rem!important;
  align-items:flex-start!important;
  list-style:none!important;
}

.hd-handbook-workflow-panel > summary::-webkit-details-marker {
  display:none!important
}

.hd-handbook-import-grid {
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(17rem,1fr))!important;
  gap:1rem!important;
}

.hd-handbook-import-panel {
  height:100%!important;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(251,246,238,.96))!important;
}

.hd-handbook-admin-list--review {
  display:grid!important;
  gap:.85rem!important;
}

.hd-handbook-admin-section {
  display:grid!important;
  grid-template-columns:minmax(0,1.25fr) minmax(18rem,1fr) auto!important;
  gap:.85rem!important;
  align-items:center!important;
}

.hd-handbook-admin-section__main {
  min-width:0!important
}

.hd-handbook-admin-section__controls {
  display:grid!important;
  grid-template-columns:minmax(5rem,.55fr) minmax(10rem,1fr) auto!important;
  gap:.65rem!important;
  align-items:end!important;
}

.hd-handbook-admin-section__meta {
  grid-column:1 / -1!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:.45rem!important;
}

.hd-handbook-visible-toggle {
  align-self:center!important;
  margin-top:1.15rem!important;
}

.hd-handbook-body-editor {
  min-height:18rem!important;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;
}

.hd-handbook-danger-zone {
  border:1px solid var(--hd-border,#d8c9a8)!important;
  border-radius:16px!important;
  padding:1rem!important;
  background:rgba(255,255,255,.72)!important;
}

.hd-handbook-action-table {
  display:grid!important;
  gap:.5rem!important;
}

.hd-handbook-action-row {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:.5rem!important;
  align-items:center!important;
  padding:.65rem!important;
  border:1px solid var(--hd-border,#d8c9a8)!important;
  border-radius:12px!important;
  background:#fff!important;
}

.hd-handbook-output-actions {
  display:flex!important;
  justify-content:space-between!important;
  gap:1rem!important;
  align-items:center!important;
}

.hd-handbook-report-fragment {
  margin-top:1rem!important;
}

.hd-handbook-report-body ul,
.hd-handbook-report-body ol {
  padding-left:1.35rem!important;
}

@media(max-width:760px) {
  .hd-handbook-workflow-hero,
  .hd-handbook-admin-section,
  .hd-handbook-admin-section__controls,
  .hd-handbook-action-row,
  .hd-handbook-output-actions {
    grid-template-columns:1fr!important;
    display:grid!important;
  }

  .hd-handbook-workflow-panel > summary {
    display:block!important;
  }
}

/* Moved from admin_tool_interfaces by v844 CSS owner reorganisation. */
.hd-handbook-document {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hd-handbook-document__brand {
  border-bottom: 1px solid rgba(4,48,78,.18);
  padding: 0 0 16px;
  margin-bottom: 18px;
}

.hd-handbook-document__brand strong {
  display: block;
  color: #053b5d;
  font-size: 1.35rem;
  letter-spacing: .02em;
}

.hd-handbook-document__brand span {
  color: #516273;
}

.hd-handbook-output .hd-handbook-print-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media print {
  .hd-handbook-output__actions {
    display: none !important;
  }

  .hd-handbook-document {
    box-shadow: none !important;
    border: 0 !important;
  }
}

/* v862 public handbook page rhythm. */
.hd-handbook-public .hd-public-suite-nav {
  margin-bottom: clamp(18px, 2.6vw, 28px) !important;
}

.hd-handbook-public .hd-card,
.hd-handbook-public .hd-handbook-card {
  overflow-wrap: anywhere !important;
}

/* v951 handbook builder and clean generated handbook output polish.
Owner: handbook_builder. Covers public handbook builder and its generated document fragment only. */
.hd-handbook-public--output .hd-report-document,
.hd-handbook-report-fragment {
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: clamp(14px, 2.4vw, 28px) !important;
  background: transparent !important;
}

.hd-handbook-public--output .hd-report-page,
.hd-handbook-report-fragment .hd-report-page {
  overflow: visible !important;
  border-radius: 20px !important;
  border: 1px solid color-mix(in srgb, var(--colour-border, #d8c9a8) 76%, var(--colour-heading, #083646) 8%) !important;
  background: var(--colour-surface, #fffdf8) !important;
}

.hd-handbook-public--output .hd-report-main,
.hd-handbook-report-fragment .hd-report-main {
  padding: clamp(18px, 3vw, 32px) !important;
}

.hd-handbook-public--output .hd-handbook-report-body,
.hd-handbook-report-fragment .hd-handbook-report-body {
  background: var(--colour-surface, #fffdf8) !important;
  border: 1px solid color-mix(in srgb, var(--colour-border, #d8c9a8) 72%, transparent) !important;
  border-radius: 16px !important;
  padding: clamp(16px, 2.2vw, 24px) !important;
  line-height: 1.58 !important;
  color: var(--colour-text, #14212a) !important;
}

.hd-handbook-public--output .hd-handbook-report-body p,
.hd-handbook-report-fragment .hd-handbook-report-body p {
  margin: 0 0 0.85rem !important;
}

.hd-handbook-public--output .hd-handbook-report-body ul,
.hd-handbook-public--output .hd-handbook-report-body ol,
.hd-handbook-report-fragment .hd-handbook-report-body ul,
.hd-handbook-report-fragment .hd-handbook-report-body ol {
  margin: 0.7rem 0 1rem 1.35rem !important;
  padding: 0 !important;
}

.hd-handbook-public--output .hd-handbook-report-body li,
.hd-handbook-report-fragment .hd-handbook-report-body li {
  margin: 0.28rem 0 !important;
}

@media print {
  .hd-handbook-public--output .no-print,
  .hd-handbook-public--output #hd-admin-strip,
  .hd-handbook-public--output .hd-admin-strip,
  .hd-handbook-public--output #hd-header-shell,
  .hd-handbook-public--output #nav-container,
  .hd-handbook-public--output .hd-page-heading-card,
  .hd-handbook-public--output .hd-admin-hero {
    display: none !important;
  }

  .hd-handbook-public--output .hd-content-panel,
  .hd-handbook-public--output .hd-report-document,
  .hd-handbook-report-fragment {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .hd-handbook-public--output .hd-report-page,
  .hd-handbook-report-fragment .hd-report-page {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .hd-handbook-public--output .hd-report-section,
  .hd-handbook-public--output .hd-handbook-report-body,
  .hd-handbook-report-fragment .hd-report-section,
  .hd-handbook-report-fragment .hd-handbook-report-body {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

/* v952 generated handbook document finish.
Owner: handbook_builder. Keeps preview and downloaded handbook outputs in a document layout instead of a site-card layout. */
.hd-handbook-public--output .hd-report-document,
.hd-handbook-report-fragment,
body.hd-generated-report .hd-report-document {
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: clamp(18px, 2.8vw, 34px) !important;
}

.hd-handbook-public--output .hd-report-page,
.hd-handbook-report-fragment .hd-report-page,
body.hd-generated-report .hd-report-page {
  border-radius: 18px !important;
  overflow: visible !important;
  background: var(--colour-surface, #fffdf8) !important;
}

.hd-handbook-report-body,
.hd-handbook-report-section {
  max-width: 78ch !important;
  margin-inline: auto !important;
}

.hd-handbook-report-body p,
.hd-handbook-report-body li,
.hd-handbook-report-section p,
.hd-handbook-report-section li {
  line-height: 1.62 !important;
}

.hd-handbook-public--output .hd-report-summary-grid,
.hd-handbook-report-fragment .hd-report-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

@media print {
  body:has(.hd-handbook-public--output) #hd-admin-strip,
  body:has(.hd-handbook-public--output) .hd-admin-strip,
  body:has(.hd-handbook-public--output) #hd-header-shell,
  body:has(.hd-handbook-public--output) #nav-container,
  body:has(.hd-handbook-public--output) .hd-handbook-output-actions,
  body:has(.hd-handbook-public--output) .hd-page-heading-card,
  body:has(.hd-handbook-public--output) .hd-admin-hero {
    display: none !important;
  }

  .hd-handbook-public--output .hd-report-document,
  .hd-handbook-report-fragment {
    max-width: none !important;
    padding: 0 !important;
  }

  .hd-handbook-public--output .hd-report-page,
  .hd-handbook-report-fragment .hd-report-page {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/* HD RMS v1005 Handbook Builder workflow polish.
Owner: handbook_builder. Improves admin builder rhythm and keeps generated handbook output stable. */
.hd-handbook-admin .hd-handbook-workflow-hero,
.hd-tool-page--handbook-builder .hd-handbook-workflow-hero {
  border: 1px solid var(--colour-border-soft, #d8c9a8);
  border-radius: 22px;
  padding: clamp(16px, 2.3vw, 26px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--colour-surface, #fffdf8) 95%, var(--colour-surface-soft, #e9eedd) 5%), var(--colour-surface, #fffdf8));
}

.hd-handbook-admin .hd-handbook-import-panel,
.hd-tool-page--handbook-builder .hd-handbook-import-panel,
.hd-handbook-admin .hd-handbook-workflow-panel,
.hd-tool-page--handbook-builder .hd-handbook-workflow-panel {
  overflow: visible !important;
}

.hd-handbook-admin .hd-handbook-admin-section,
.hd-tool-page--handbook-builder .hd-handbook-admin-section {
  align-items: start !important;
}

.hd-handbook-admin .hd-handbook-admin-section__controls,
.hd-tool-page--handbook-builder .hd-handbook-admin-section__controls {
  align-items: end !important;
}

.hd-handbook-admin .hd-handbook-action-row,
.hd-tool-page--handbook-builder .hd-handbook-action-row {
  min-width: 0 !important;
}

@media (max-width: 900px) {
  .hd-handbook-admin .hd-handbook-dashboard,
  .hd-tool-page--handbook-builder .hd-handbook-dashboard,
  .hd-handbook-admin .hd-handbook-import-grid,
  .hd-tool-page--handbook-builder .hd-handbook-import-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === v1020 Handbook Builder visual standardisation === */
.hd-tool-page--handbook-builder {
  --hd-tool-accent:#4e6370;
}

.hd-handbook-admin .hd-card {
  border-color:rgba(78,99,112,.22);
}

.hd-handbook-admin details,.hd-handbook-admin .hd-handbook-section,.hd-handbook-admin .hd-handbook-import-panel {
  border:1px solid rgba(78,99,112,.22);
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 32px rgba(37,38,85,.05);
  overflow:hidden;
}

.hd-handbook-admin details > summary {
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:1rem;
  align-items:center;
  padding:1rem 1.1rem;
  background:linear-gradient(135deg,rgba(78,99,112,.12),#fff);
  cursor:pointer;
  font-weight:800;
}

.hd-handbook-admin details > summary::-webkit-details-marker {
  display:none;
}

.hd-handbook-admin details > summary::before {
  content:'›';
  display:grid;
  place-items:center;
  width:1.8rem;
  height:1.8rem;
  border-radius:999px;
  background:var(--hd-tool-accent);
  color:#fff;
  transition:transform .18s ease;
}

.hd-handbook-admin details[open] > summary::before {
  transform:rotate(90deg);
}

.hd-handbook-admin .hd-handbook-import-grid,.hd-handbook-admin .hd-import-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1rem;
  align-items:stretch;
}

.hd-handbook-admin .hd-handbook-import-grid > *, .hd-handbook-admin .hd-import-grid > * {
  min-width:0;
}

.hd-handbook-admin .hd-field,.hd-handbook-admin label {
  min-width:0;
}

.hd-handbook-admin select,.hd-handbook-admin input,.hd-handbook-admin textarea {
  max-width:100%;
}

.hd-handbook-admin textarea {
  min-height:14rem;
}

@media (max-width:850px) {
  .hd-handbook-admin .hd-handbook-import-grid,.hd-handbook-admin .hd-import-grid {
    grid-template-columns:1fr
  }

  .hd-handbook-admin .hd-btn {
    width:100%;
    justify-content:center
  }
}

/* === end v1020 Handbook Builder visual standardisation === */

/* v1025-admin-tool-ui-standardisation: handbook builder import flow */
.hd-tool-page--handbook .hd-handbook-import-grid,
#handbook-builder .hd-handbook-import-grid,
#handbook-builder .hd-grid--three {
  display:grid;
  grid-template-columns:1fr;
  gap:clamp(16px,2vw,24px);
}

@media (min-width:1180px) {
  .hd-tool-page--handbook .hd-handbook-import-grid,
  #handbook-builder .hd-handbook-import-grid,
  #handbook-builder .hd-grid--three {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

#handbook-builder .hd-card,
.hd-tool-page--handbook .hd-card {
  min-width:0;
}

#handbook-builder select,
#handbook-builder input,
#handbook-builder textarea {
  max-width:100%;
}

#handbook-builder .hd-card .hd-actions {
  justify-content:flex-start;
}

#handbook-builder .hd-stat-grid {
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}

/* =========================================================
HD RMS v1103 handbook mobile rhythm
Owner: handbook_builder.
Purpose: mobile card spacing, readable disabled actions and consistent button flow.
========================================================= */
.hd-handbook-public,
.hd-handbook-builder,
.hd-tool-page--handbook,
.hd-tool-page--handbook-builder {
  display: grid !important;
  gap: clamp(20px, 2.6vw, 32px) !important;
}

.hd-handbook-public :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section,.hd-handbook-selection-summary),
.hd-handbook-builder :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section,.hd-handbook-selection-summary),
.hd-tool-page--handbook-builder :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section,.hd-handbook-selection-summary) {
  margin: 0 !important;
}

.hd-handbook-public :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section) + :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section),
.hd-handbook-builder :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section) + :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section) {
  margin-top: clamp(20px, 2.6vw, 32px) !important;
}

.hd-handbook-public :where(.hd-btn,.hd-button,button)[disabled],
.hd-handbook-builder :where(.hd-btn,.hd-button,button)[disabled],
.hd-handbook-public :where(.hd-btn,.hd-button,button)[aria-disabled="true"],
.hd-handbook-builder :where(.hd-btn,.hd-button,button)[aria-disabled="true"] {
  background: var(--hd-action-disabled-bg, color-mix(in srgb, var(--colour-surface-soft, #f1dfc7) 86%, var(--colour-border, #bf7847) 14%)) !important;
  color: var(--hd-action-disabled-text, var(--colour-text, #06334a)) !important;
  -webkit-text-fill-color: var(--hd-action-disabled-text, var(--colour-text, #06334a)) !important;
  border-color: var(--hd-action-disabled-border, var(--colour-border, #bf7847)) !important;
  opacity: 1 !important;
}

@media (max-width: 760px) {
  .hd-handbook-public,
  .hd-handbook-builder,
  .hd-tool-page--handbook,
  .hd-tool-page--handbook-builder {
    gap: clamp(18px, 6vw, 28px) !important;
  }

  .hd-handbook-public :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section),
  .hd-handbook-builder :where(.hd-card,.hd-handbook-card,.hd-panel,.hd-handbook-section) {
    padding: clamp(18px, 5.4vw, 24px) !important;
  }

  .hd-handbook-public :where(.hd-btn,.hd-button,button),
  .hd-handbook-builder :where(.hd-btn,.hd-button,button) {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* === Help and compatibility admin tools [admin_help_support_tools] === */
/* HD RMS v994 owner contract: help_compatibility_admin_tools
Owner: Help and compatibility admin tools.
Owns Help Manual, Help/Technical documentation pages, Tool Atlas, Tool Health,
Compatibility Lab, Journeys Pack and support/governance tool-suite presentation.
Does not own generic cards, buttons, forms, tables, admin chrome, Quick Jump,
CSS tools, database tools, analytics, public page content or global typography.
*/
:root {
  --hd-help-tools-gap: clamp(12px, 1.5vw, 18px);
  --hd-help-tools-radius: 18px;
  --hd-help-tools-border: var(--colour-border-soft, #d8c9a8);
  --hd-help-tools-surface: var(--colour-surface, #fffdf8);
  --hd-help-tools-soft: var(--colour-surface-soft, #f7f0df);
  --hd-help-tools-heading: var(--colour-heading, #053b5d);
  --hd-help-tools-muted: var(--colour-muted, #526474);
  --hd-help-tools-primary: var(--colour-primary, #06456b);
  --hd-help-tools-shadow: 0 12px 28px rgba(10, 24, 32, .07);
}

/* Help / support / governance suite navigation within this owner */
.hd-tool-suite-nav--support .hd-tool-suite-nav__links,
.hd-tool-suite-nav--governance .hd-tool-suite-nav__links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hd-help-tools-gap);
}

.hd-tool-suite-nav--support .hd-tool-suite-nav__label,
.hd-tool-suite-nav--governance .hd-tool-suite-nav__label {
  background: linear-gradient(
  135deg,
  color-mix(in srgb, var(--hd-help-tools-primary) 8%, var(--hd-help-tools-soft)),
  var(--hd-help-tools-soft)
  );
}

/* Help/system page hero accents */
.hd-tool-page--help .hd-admin-suite-hero,
.hd-tool-page--help .hd-admin-hero,
.hd-tool-page--system .hd-admin-suite-hero,
.hd-tool-page--system .hd-admin-hero {
  border-left: 7px solid color-mix(in srgb, var(--hd-help-tools-primary) 42%, var(--hd-help-tools-border));
}

/* Help, manuals, tool atlas and health documentation cards */
#help-manual .hd-card,
#compat-lab .hd-card,
.hd-help-page .hd-card,
.hd-tool-page--help .hd-card,
.hd-tool-page--help .hd-docs-section,
.hd-tool-page--help-manual .hd-card,
.hd-tool-page--help-technical .hd-card,
.hd-tool-page--tool-atlas .hd-card,
.hd-tool-page--tool-health .hd-card,
.hd-tool-page--system .hd-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--hd-help-tools-border);
  border-radius: var(--hd-help-tools-radius);
  background: var(--hd-help-tools-surface);
  box-shadow: var(--hd-help-tools-shadow);
}

.hd-help-page .hd-card,
.hd-tool-page--help .hd-card,
.hd-tool-page--help-manual .hd-card,
.hd-tool-page--help-technical .hd-card,
.hd-tool-page--tool-atlas .hd-card,
.hd-tool-page--tool-health .hd-card {
  padding: clamp(16px, 2vw, 24px);
}

.hd-help-page :is(p, li),
.hd-tool-page--help :is(p, li),
.hd-tool-page--help-manual :is(p, li),
.hd-tool-page--help-technical :is(p, li) {
  max-width: 76ch;
}

/* Help / tool-atlas grids */
.hd-tool-page--help .hd-docs-topic-grid,
.hd-tool-page--help .hd-toollist--grid,
.hd-tool-page--tool-atlas .hd-tool-atlas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hd-tool-page--help .hd-docs-topic-card,
.hd-tool-page--help .hd-tool-card,
.hd-tool-page--tool-atlas .hd-card {
  border-radius: var(--hd-help-tools-radius);
  border: 1px solid var(--hd-help-tools-border);
  background: var(--hd-help-tools-surface);
  box-shadow: var(--hd-help-tools-shadow);
}

.hd-tool-page--help .hd-docs-topic-card:hover,
.hd-tool-page--help .hd-docs-topic-card:focus-visible,
.hd-tool-page--help .hd-tool-card:hover,
.hd-tool-page--help .hd-tool-card:focus-within {
  border-color: color-mix(in srgb, var(--hd-help-tools-primary) 34%, var(--hd-help-tools-border));
  box-shadow: 0 16px 36px rgba(10, 24, 32, .10);
}

/* Help flow diagrams */
.hd-tool-page--help .hd-flow-diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hd-tool-page--help .hd-flow-diagram span {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: .52rem .74rem;
  border-radius: 999px;
  border: 1px solid var(--hd-help-tools-border);
  background: color-mix(in srgb, var(--hd-help-tools-surface) 88%, var(--hd-help-tools-soft) 12%);
  font-weight: 800;
  color: var(--hd-help-tools-heading);
}

.hd-tool-page--help .hd-flow-diagram b {
  color: var(--hd-help-tools-muted);
}

/* Compatibility and launch-support tools */
.hd-compat-lab-page .hd-card-grid,
.hd-journeys-pack-page .hd-tool-grid {
  align-items: stretch;
}

.hd-compat-lab-page .hd-card,
.hd-journeys-pack-page .hd-tool-card {
  height: 100%;
}

.hd-journeys-pack-page .hd-tool-card h3 {
  margin-top: 0;
}

.hd-journeys-pack-page .hd-tool-card ul {
  margin-bottom: 0;
}

/* System/help diagnostics that are part of this support area */
.hd-tool-page--system .hd-security-toolbar,
.hd-tool-page--system .hd-actions,
.hd-tool-page--accounts .hd-actions {
  flex-wrap: wrap;
  gap: .65rem;
}

.hd-tool-page--system .hd-admin-stat-grid,
.hd-tool-page--system .hd-grid,
.hd-tool-page--accounts .hd-grid {
  gap: 14px;
}

.hd-tool-page--system details,
.hd-tool-page--accounts .hd-card {
  border-radius: var(--hd-help-tools-radius);
}

.hd-help-page pre,
.hd-tool-page--help pre,
.hd-tool-page--help-manual pre,
.hd-tool-page--help-technical pre,
.hd-tool-page--tool-atlas pre,
.hd-tool-page--logs pre,
.hd-tool-page--system pre,
.hd-tool-page--config pre {
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Responsive behaviour owned by this section */
@media (max-width: 1100px) {
  .hd-tool-suite-nav--support .hd-tool-suite-nav__links,
  .hd-tool-suite-nav--governance .hd-tool-suite-nav__links,
  .hd-tool-page--help .hd-docs-topic-grid,
  .hd-tool-page--help .hd-toollist--grid,
  .hd-tool-page--tool-atlas .hd-tool-atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hd-tool-suite-nav--support .hd-tool-suite-nav__links,
  .hd-tool-suite-nav--governance .hd-tool-suite-nav__links,
  .hd-tool-page--help .hd-docs-topic-grid,
  .hd-tool-page--help .hd-toollist--grid,
  .hd-tool-page--tool-atlas .hd-tool-atlas-grid {
    grid-template-columns: 1fr;
  }
}

/* v1024 pass2: Help documentation refresh */
.hd-tool-page--help .hd-help-support-hero {
  border-left: 6px solid var(--hd-colour-accent, #c0862c);
}

.hd-tool-page--help .hd-help-support-section {
  background: linear-gradient(135deg, rgba(247,245,252,1), rgba(255,255,255,.94));
}

.hd-tool-page--help .hd-help-tool-card {
  border: 1px solid rgba(38,39,96,.16);
  box-shadow: 0 14px 30px rgba(38,39,96,.07);
}

.hd-tool-page--help .hd-help-tool-card:active {
  transform: translateY(1px);
}

/* end v1024 pass2 */
