/* ==========================================================================
   layout.css — page scaffolding: container, sections, header and footer shells.

   Structure and spacing only. Anything reusable and self-contained (buttons,
   cards, badges) belongs in components.css; anything specific to one page
   belongs in pages/.
   ========================================================================== */

/* --- Container -----------------------------------------------------------
   Our own rather than Bootstrap's .container: one fluid max-width with fluid
   padding, instead of Bootstrap's five breakpoint steps, which visibly jump. */
.hs-container {
  width: 100%;
  max-width: var(--hs-container-max);
  margin-inline: auto;
  padding-inline: var(--hs-container-pad);
}

/* --- Reading measure -----------------------------------------------------
   Long-form text needs a narrower column than a landing page, but 46rem was
   tighter than these articles want: they carry wide tables and full-width
   charts, and a narrow column squeezed both. 54rem is ~78 characters at the
   body size — still inside the readable 45–85 band, with room for the figures.

   Tables and images may extend a little beyond the text column, so a 7-column
   table is legible without the prose itself becoming a wall. */
.hs-container--reading { max-width: 54rem; }

/* --- Sections ------------------------------------------------------------
   Bixoo's `.section-padding` steps — 120 / 100 / 80px at its 1200 and 992
   breakpoints — set on the tokens so every rule reading them steps together. */
.hs-section { padding-block: var(--hs-section-y); }
.hs-section--tight { padding-block: var(--hs-section-y-tight); }
@media (max-width: 1199.98px) {
  :root { --hs-section-y: 6.25rem; --hs-section-y-tight: 3.75rem; }
}
@media (max-width: 991.98px) {
  :root { --hs-section-y: 5rem; --hs-section-y-tight: 3rem; --hs-section-head-gap: 2.5rem; }
}
@media (max-width: 767.98px) {
  :root { --hs-section-head-gap: 1.875rem; }
}
.hs-section--muted { background-color: var(--hs-surface-muted); }
/* The barely-there warm neutral, for a band that should read as an invitation
   rather than as another panel — currently the newsletter. Warmth, not a tint. */
.hs-section--warm {
  background-color: var(--hs-surface-warm);
  border-block: 1px solid var(--hs-border-subtle);
}

/* Dark section. Sets the on-dark text tokens once so children need no
   per-element colour overrides. */
.hs-section--inverse {
  position: relative;
  isolation: isolate;
  background-color: var(--hs-surface-inverse);
  color: var(--hs-text-on-dark);
  overflow: hidden;
}
.hs-section--inverse h1,
.hs-section--inverse h2,
.hs-section--inverse h3 { color: var(--hs-text-on-dark-strong); }

/* --- Section header ------------------------------------------------------ */
/* Bixoo's `.section-title`: the eyebrow over a 50px weight-600 title at 124%
   leading. The eyebrow mark itself is Haresign's (components.css); its size
   follows Bixoo's sub-title, 16px. */
.hs-section-header { max-width: 45rem; margin-bottom: var(--hs-section-head-gap); }
.hs-section-header .hs-eyebrow { font-size: 1rem; margin-bottom: var(--hs-space-4); }
.hs-section-header__title {
  margin-bottom: var(--hs-space-4);
  font-size: var(--hs-heading-section);
  font-weight: var(--hs-heading-section-weight);
  line-height: var(--hs-heading-section-leading);
}
.hs-section-header__lead {
  font-size: var(--hs-text-lg);
  margin-bottom: 0;
}
.hs-section--inverse .hs-section-header__lead { color: var(--hs-text-on-dark); }

/* Bixoo's `.section-title-area`: the title on the left and one thing on the
   right — an action ("All insights") or a short lead — on a shared baseline.
   It wraps below 1200px, as Bixoo's does, with the right-hand item underneath. */
.hs-section-header--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--hs-space-4) var(--hs-space-8);
}
.hs-section-header--split .hs-section-header__title { margin-bottom: 0; }
.hs-section-header--split .hs-section-header__title + .hs-section-header__lead { margin-top: var(--hs-space-4); }
.hs-section-header__aside {
  max-width: 26rem;
  margin-bottom: 0;
  font-size: var(--hs-text-lg);
}

/* --- Site header ---------------------------------------------------------
   Dark, as haresign.net's is. The previous white bar was a fine piece of UI
   chrome and the wrong brand: it read as an app shell, and it could not sit over
   the banner photograph at all.

   Two states, one component:

     .hs-header              solid navy, sticky. Every page but the homepage.
     .hs-header--overlay     transparent, lifted out of the flow so the banner
                             runs under it. Homepage only.
     .hs-header--overlay.is-stuck   the navy ground returns once the banner has
                             scrolled past — added by site.js.

   Overlay is `fixed` rather than `sticky` because a sticky element still takes
   its height out of the flow, which would push the banner down by exactly the
   height of the bar that is meant to be floating on top of it. */
.hs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--hs-navy-deep);
  color: var(--hs-text-on-dark);
  border-bottom: 1px solid var(--hs-border-on-dark);
}
.hs-header--overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  border-bottom-color: transparent;
  transition: background-color var(--hs-transition), border-color var(--hs-transition);
}
.hs-header--overlay.is-stuck {
  background-color: rgba(11, 17, 30, 0.94);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom-color: var(--hs-border-on-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* Teal on navy (5.73:1). The default badge is deep teal on a pale teal tint,
   which on this ground is one dark colour on another. */
.hs-header .hs-badge--environment {
  background-color: rgba(15, 163, 163, 0.18);
  color: var(--hs-teal);
}

/* Sign in, in both the bar and the mobile panel. It is a <button disabled>
   while `auth` is not live, and the disabled style is written for a white
   ground — a grey border and grey ink, which on navy is one dark thing on
   another. Re-stated here rather than changed at source: the component is
   correct everywhere else. */
.hs-header .hs-btn--secondary,
.hs-header .hs-btn[disabled] {
  border-color: var(--hs-border-on-dark);
  color: var(--hs-text-on-dark-muted);
}
.hs-header .hs-btn--secondary:not([disabled]):hover {
  border-color: var(--hs-text-on-dark-strong);
  color: var(--hs-text-on-dark-strong);
}
.hs-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-5);
  min-height: var(--hs-header-height);
}
.hs-header__brand { display: flex; align-items: center; gap: var(--hs-space-3); }
/* The header is dark in both its states, so this takes the white-ink logo. The
   asset suffix names the *background* the file belongs on, not the ink:
   logo-primary-dark is the white-ink file for dark grounds. Getting these the
   wrong way round renders the logo invisible rather than broken, so check
   against the ground. */
.hs-header__logo { height: 2.625rem; width: auto; display: block; }
/* The actions keep their natural width. They used to be the part flexbox took
   space from when the row was too long, which is how a signed-in name became
   "Alexand…" and the arrow disc ran into "Get in touch". The row is now sized
   so it fits (see the header width tiers under Responsive); if it ever does
   not, the overflow is visible in qa/header_fit.py rather than hidden here. */
.hs-header__actions { display: flex; flex-shrink: 0; align-items: center; gap: var(--hs-space-3); }
.hs-header__actions-desktop { align-items: center; gap: var(--hs-space-3); }
.hs-header__actions-desktop > * { flex-shrink: 0; }
.hs-header__actions .hs-btn { white-space: nowrap; }

/* --- The account menu -----------------------------------------------------
   What the header shows instead of "Sign in" once somebody is signed in.

   Copied from haresign-billing's implementation at the same sizes and spacing,
   deliberately: a customer who signs in on Billing and then arrives here should
   find the same control in the same corner, not a second interpretation of it.
   Two tokens differ because this project names them differently — the weight is
   `extrabold` where Billing says `black`, and the hover ink is `--hs-primary`
   where Billing has `--hs-link`. Both resolve to the same rendered value.

   A <details>/<summary>, not a scripted dropdown. It opens, closes on Escape and
   is keyboard-operable with no JavaScript at all, which matters because site.js
   is progressive enhancement here and the account controls must not be the one
   thing that needs it. */
.hs-account-menu { position: relative; }

.hs-account-menu__summary {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: var(--hs-space-3);
  padding: var(--hs-space-1) var(--hs-space-3) var(--hs-space-1) var(--hs-space-1);
  border: 1px solid var(--hs-border-on-dark);
  border-radius: var(--hs-radius-pill);
  color: var(--hs-text-on-dark-strong);
  cursor: pointer;
  list-style: none;
}

.hs-account-menu__summary::-webkit-details-marker { display: none; }

.hs-account-menu__summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.8;
}

.hs-account-menu[open] .hs-account-menu__summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.hs-account-menu__summary:hover { border-color: var(--hs-text-on-dark-strong); }

.hs-account-menu__avatar {
  width: 2.125rem;
  height: 2.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  /* The accent, like everything else interactive. White on aqua is 6.55:1;
     navy on aqua is 2.88:1 and could not carry the initials. */
  background-color: var(--hs-primary);
  color: var(--hs-text-on-dark-strong);
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-weight-extrabold);
  letter-spacing: 0;
}

.hs-account-menu__text {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
  line-height: 1.1;
}

.hs-account-menu__kicker {
  color: var(--hs-text-on-dark);
  font-size: 0.68rem;
  font-weight: var(--hs-weight-bold);
  text-transform: uppercase;
}

/* A given name (identity.session.short_label), which fits whole. The cap and
   the ellipsis are a last resort for one unusually long word, not the normal
   state they were when this held a full name in 10rem. */
.hs-account-menu__name {
  max-width: 7.5rem;
  overflow: hidden;
  color: var(--hs-text-on-dark-strong);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-account-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--hs-space-2));
  z-index: 120;
  min-width: 16rem;
  padding-block: var(--hs-space-2);
  border: 1px solid var(--hs-border-subtle);
  border-radius: var(--hs-radius-md);
  background-color: var(--hs-surface);
  box-shadow: var(--hs-shadow-lg);
}

/* Who is signed in, in full, at the top of the panel — the bar has room for a
   given name only. Not a link and not focusable: it is a caption. */
.hs-account-menu__who {
  display: grid;
  gap: 0.125rem;
  margin: 0 0 var(--hs-space-2);
  padding: var(--hs-space-2) var(--hs-space-4) var(--hs-space-3);
  border-bottom: 1px solid var(--hs-border-subtle);
  line-height: 1.3;
}
.hs-account-menu__who-name {
  color: var(--hs-text-strong);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-bold);
  overflow-wrap: anywhere;
}
.hs-account-menu__who-email {
  color: var(--hs-text-muted);
  font-size: var(--hs-text-xs);
  overflow-wrap: anywhere;
}

.hs-account-menu__item {
  display: block;
  width: 100%;
  padding: var(--hs-space-3) var(--hs-space-4);
  color: var(--hs-text);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-bold);
  text-align: left;
}

.hs-account-menu__item:hover {
  background-color: var(--hs-surface-muted);
  color: var(--hs-primary);
}

.hs-account-menu__button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hs-account-menu__panel .hs-header__signout {
  display: block;
  border-top: 1px solid var(--hs-border-subtle);
  margin-top: var(--hs-space-2);
  padding-top: var(--hs-space-2);
}

/* --- Primary navigation --------------------------------------------------
   Six items, a Sign in and a call to action have to share the bar with a
   220px wordmark. The gap and the type size are both a step down from the body
   scale for that reason — at 17px and a 24px gap the row measured 1136px inside
   a 1136px container, which is not a layout so much as a coincidence. It now
   collapses to the panel at 1200px rather than 992px, because between those two
   widths it fitted only by touching. */
.hs-nav__list {
  display: flex;
  align-items: center;
  gap: var(--hs-space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.hs-nav__link {
  display: inline-block;
  position: relative;
  padding-block: var(--hs-space-2);
  color: var(--hs-text-on-dark-strong);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-medium);
}
/* Bright teal, not aqua. The underline sits on navy, where #0d5bb8 is one dark
   blue on another and all but disappears; #0fa3a3 is 5.73:1 here. */
.hs-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--hs-teal);
  border-radius: 2px;
  transition: width var(--hs-transition);
}
.hs-nav__link:hover { color: var(--hs-teal); }
.hs-nav__link:hover::after,
.hs-nav__link[aria-current="page"]::after { width: 100%; }

/* A platform that is not live yet: a label, not a link. Muted and without the
   hover underline, so it does not invite a click it cannot honour. Neither the
   nav nor the footer shows a badge any more (see _service_link.html) — muted
   and unlinked is the signal, and the reason is carried as visually-hidden text
   for anyone who cannot see either. */
.hs-nav__link--unavailable,
.hs-footer__link--unavailable {
  display: inline-flex;
  align-items: center;
  color: var(--hs-text-on-dark-muted);
  cursor: default;
}
.hs-footer__link--unavailable { gap: var(--hs-space-2); }
.hs-nav__link--unavailable::after { display: none; }
.hs-footer__link--unavailable { color: var(--hs-text-on-dark-muted); }

.hs-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  /* 44px — the minimum comfortable touch target. */
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 1px solid var(--hs-border-on-dark);
  border-radius: var(--hs-radius-sm);
  color: var(--hs-text-on-dark-strong);
  cursor: pointer;
}
.hs-nav__toggle-bar,
.hs-nav__toggle-bar::before,
.hs-nav__toggle-bar::after {
  display: block;
  width: 1.125rem;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--hs-transition), opacity var(--hs-duration-fast) var(--hs-ease);
}
.hs-nav__toggle-bar { position: relative; }
.hs-nav__toggle-bar::before { content: ""; position: absolute; top: -6px; }
.hs-nav__toggle-bar::after  { content: ""; position: absolute; top: 6px; }

/* Open state: the bars become a cross, so the control shows what it will do. */
.hs-nav__toggle[aria-expanded="true"] .hs-nav__toggle-bar { background-color: transparent; }
.hs-nav__toggle[aria-expanded="true"] .hs-nav__toggle-bar::before { top: 0; transform: rotate(45deg); }
.hs-nav__toggle[aria-expanded="true"] .hs-nav__toggle-bar::after  { top: 0; transform: rotate(-45deg); }

/* --- Site footer ---------------------------------------------------------
   Three tiers, after the Bixoo homepage footer: contact strip, widget row,
   bottom bar (see footer.html). Spacing is Bixoo's — 120px above the strip,
   90px between strip and columns, 120px below them, a 25px bottom bar — stepped
   at its 1200 and 992 breakpoints. Colour is Haresign's: navy-deep ground,
   on-dark text tokens, the teal » marker. */
.hs-footer {
  --hs-footer-top: 7.5rem;
  --hs-footer-mid: 5.625rem;
  --hs-footer-end: 7.5rem;
  background-color: var(--hs-navy-deep);
  color: var(--hs-text-on-dark);
}
.hs-footer a { color: var(--hs-text-on-dark); }
.hs-footer a:hover { color: var(--hs-text-on-dark-strong); }

/* WCAG 2.2 SC 2.5.8: a target is at least 24x24 CSS pixels. Footer links are
   standalone items in a list, not words inside a sentence, so the "inline"
   exception does not cover them. inline-flex plus a min-height grows the hit
   area without moving anything visually. */
.hs-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

/* 1. Contact strip — Bixoo's footer-info-top: icon beside an 18px title and
   one line, four across, with a hairline under the tier. */
.hs-footer__info { padding-top: var(--hs-footer-top); }
.hs-footer__info-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hs-space-8);
  margin: 0;
  padding: 0 0 var(--hs-space-12);
  list-style: none;
  border-bottom: 1px solid var(--hs-border-on-dark);
}
.hs-footer__info-item { display: flex; align-items: flex-start; gap: var(--hs-space-5); min-width: 0; }
.hs-footer__info-item > div { min-width: 0; }
.hs-footer__info-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(15, 163, 163, 0.45);
  border-radius: 50%;
  color: var(--hs-teal);
}
.hs-footer__info-icon .hs-icon { width: 1.25rem; height: 1.25rem; }
.hs-footer__info-title {
  margin-bottom: var(--hs-space-1);
  color: var(--hs-text-on-dark-strong);
  font-family: var(--hs-font-display);
  font-size: 1.125rem;
  font-weight: var(--hs-heading-section-weight);
  line-height: 1.4;
}
.hs-footer__info-item a { overflow-wrap: anywhere; }

/* 2. Widget row — Bixoo's footer-widget-wrapper-1. */
.hs-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--hs-space-10);
  padding-block: var(--hs-footer-mid) var(--hs-footer-end);
}
/* Bixoo's widget-head: a 24px weight-600 heading in sentence case, 30px above
   its list — rather than the 13px tracked capitals this used to be. */
.hs-footer__heading {
  margin-bottom: var(--hs-space-7);
  color: var(--hs-text-on-dark-strong);
  font-size: 1.5rem;
  font-weight: var(--hs-heading-section-weight);
  line-height: 1.25;
}
.hs-footer__list { list-style: none; margin: 0; padding: 0; }
.hs-footer__heading + .hs-footer__list { margin-bottom: var(--hs-space-8); }
.hs-footer__list + .hs-footer__heading { margin-top: 0; }

/* Deep-navy ground, so the white-ink logo — the opposite of the header. */
.hs-footer__logo { height: 2.75rem; width: auto; margin-bottom: var(--hs-space-7); }
.hs-footer__tagline { max-width: 19rem; margin-bottom: 0; color: var(--hs-text-on-dark-strong); }

/* The » marker, which haresign.net puts against every footer link. Drawn from
   two borders on each pseudo-element rather than typed as a "»" character:
   generated *text* is exposed to assistive technology, and "right-pointing
   double angle quotation mark" before each of twenty links is not information.
   15px between items, as Bixoo's list-area; the item nudges right on hover, as
   Bixoo's does, through a transform so nothing reflows. */
.hs-footer__list li {
  position: relative;
  margin-bottom: 0.9375rem;
  padding-inline-start: var(--hs-space-5);
  transition: transform var(--hs-transition);
}
.hs-footer__list li:last-child { margin-bottom: 0; }
.hs-footer__list li:hover { transform: translateX(5px); }
.hs-footer__list li::before,
.hs-footer__list li::after {
  content: "";
  position: absolute;
  top: 0.55em;
  width: 0.3125rem;
  height: 0.3125rem;
  border: solid var(--hs-teal);
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.hs-footer__list li::before { inset-inline-start: 0; }
.hs-footer__list li::after  { inset-inline-start: 0.3125rem; }

/* Who owns a linked resource, under its link. */
.hs-footer__hint {
  display: block;
  font-size: var(--hs-text-xs);
  color: var(--hs-text-on-dark-muted);
}

.hs-footer__legal-details {
  margin-top: var(--hs-space-6);
  font-size: var(--hs-text-xs);
  color: var(--hs-text-on-dark-muted);
}
.hs-footer__legal-details p { margin-bottom: var(--hs-space-1); }

/* 3. Bottom bar — Bixoo's footer-bottom: a full-width hairline and 25px of
   padding. Copyright on the left, the legal links on the right. */
.hs-footer__bottom {
  border-top: 1px solid var(--hs-border-on-dark);
  padding-block: 1.5625rem;
  font-size: var(--hs-text-sm);
}
.hs-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-3) var(--hs-space-6);
}
.hs-footer__copyright { margin-bottom: 0; }
.hs-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-1) var(--hs-space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 1199.98px) {
  .hs-footer { --hs-footer-top: 6.25rem; --hs-footer-mid: 4.375rem; --hs-footer-end: 6.25rem; }
  .hs-footer__info-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .hs-footer { --hs-footer-top: 5rem; --hs-footer-mid: 3.125rem; --hs-footer-end: 5rem; }
}
@media (max-width: 575.98px) {
  .hs-footer__info-list { grid-template-columns: 1fr; gap: var(--hs-space-6); padding-bottom: var(--hs-space-10); }
  .hs-footer__bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* --- Responsive ---------------------------------------------------------- */

/* The brand refuses to be compressed only where there is room for that to be
   true. In the full bar it is the first thing flexbox takes width from when the
   nav is wide, and the wordmark starts squeezing into the badge; at 320px, with
   the nav gone, holding its natural 245px pushes the header 9px past the
   viewport and every page on the site scrolls sideways. */
@media (min-width: 1200px) {
  .hs-header__brand { flex-shrink: 0; }
}

@media (max-width: 1199.98px) {
  .hs-nav__toggle { display: inline-flex; }

  /* The nav becomes a stacked disclosure panel below the bar. A panel rather
     than a full-screen overlay: seven links do not need a focus trap, and a
     panel keeps the header visible so the close control never moves. */
  .hs-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* Opaque navy, not translucent: on the homepage this panel opens over a
       photograph, and a blurred ground would put the links on top of whatever
       the image happens to be doing underneath them. */
    background-color: var(--hs-navy-deep);
    border-bottom: 1px solid var(--hs-border-on-dark);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    padding-block: var(--hs-space-3) var(--hs-space-5);
  }
  .hs-nav.is-open { display: block; }
  .hs-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline: var(--hs-container-pad);
  }
  .hs-nav__list > li { border-bottom: 1px solid var(--hs-border-on-dark); }
  .hs-nav__list > li:last-child { border-bottom: 0; }
  /* Back to the body size in the panel: the reason the bar's links are small is
     that seven of them share one row, which is not true here. */
  .hs-nav__link { display: block; padding-block: var(--hs-space-4); font-size: var(--hs-text-base); }
  .hs-nav__link::after { display: none; }

  /* The header actions are hidden on small screens; the nav panel carries its
     own copies, so no action is actually lost.

     The account menu is named separately because it is a <details>, not a
     `.hs-btn` — without this line it would be the one control that survived the
     breakpoint, overlapping the menu button. */
  .hs-header__actions .hs-btn,
  .hs-header__actions .hs-account-menu { display: none; }

  /* Brand across the top, then the three link columns side by side, which
     their short labels allow down to the narrowest tablet. */
  .hs-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hs-space-8); }
  .hs-footer__brand-col { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .hs-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hs-space-8) var(--hs-space-6); }
  /* The third list would sit alone in a half-width column and wrap its
     longest item; it takes the row instead. */
  .hs-footer__grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 575.98px) {
  /* At 320px the wordmark, the environment badge and the menu button want
     246px of a 216px row, and the badge ends up underneath the button. The
     logo gives up the difference rather than the badge being dropped — "Beta"
     is the one thing on this site a visitor most needs to know. */
  .hs-header__logo { height: 2.125rem; }

  /* Two link columns even on a phone, as Bixoo's col-6 does: one column of
     three short lists was most of a screen of scrolling for twelve words. */
  .hs-footer__heading { font-size: 1.25rem; margin-bottom: var(--hs-space-5); }
  .hs-section-header--split { align-items: flex-start; }
}

/* The panel's copy of the account identity. Not a menu: the nav panel is already
   an open disclosure, and nesting a second one inside it gives a keyboard user
   two things to close before they can reach the link they wanted. */
.hs-nav__account {
  display: flex;
  align-items: center;
  gap: var(--hs-space-3);
  padding-block: var(--hs-space-4);
}

.hs-nav__account-name {
  min-width: 0;
  overflow: hidden;
  color: var(--hs-text-on-dark-strong);
  font-weight: var(--hs-weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Tools mega menu (header.html, catalogue/partials/_mega_menu.html, site.js).

   Desktop only. Below 1200px the bar is the panel and Tools is an ordinary link
   in it, so the disclosure button and the menu are not shown at all. The button
   is `hidden` until site.js runs, so without JavaScript Tools is a plain link.
   ========================================================================== */

/* An eighth item in the bar, with its menu button. It used to fit only by
   tightening the gaps between 1200 and 1319px; the tiers below replace that rule
   and also budget for the signed-in account chip, which it did not. */
/* Header width tiers, measured by qa/header_fit.py with a signed-in name:

     >= 1400px   the full bar — 1296px of content holds brand, eight items,
                 the account chip with a given name, and Get in touch.
     1200-1399   tighter gaps and a smaller wordmark (about 60px back).
     1200-1279   additionally, the account chip is the avatar alone; the name
                 stays in the accessibility tree and heads the menu panel.

   Below 1200px the bar is the hamburger panel and none of this applies. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .hs-header__inner { gap: var(--hs-space-4); }
  .hs-nav__list { gap: var(--hs-space-3); }
  .hs-header__logo { height: 2.25rem; }
}
@media (min-width: 1200px) and (max-width: 1279.98px) {
  .hs-header__actions .hs-account-menu__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .hs-header__actions .hs-account-menu__summary { gap: var(--hs-space-2); padding-inline-end: var(--hs-space-3); }
}

.hs-nav__item--mega { display: flex; align-items: center; gap: 0.125rem; }

.hs-nav__mega-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--hs-radius-sm);
  background: transparent;
  color: var(--hs-text-on-dark-strong);
  cursor: pointer;
}
.hs-nav__mega-toggle[hidden] { display: none; }
.hs-nav__mega-toggle .hs-icon {
  width: 0.875rem;
  height: 0.875rem;
  transform: rotate(90deg);   /* the set's chevron points right; down reads as "opens below" */
  transition: transform var(--hs-duration-fast) var(--hs-ease);
}
.hs-nav__mega-toggle[aria-expanded="true"] .hs-icon { transform: rotate(-90deg); }
.hs-nav__mega-toggle:hover { color: var(--hs-teal); }

.hs-mega {
  position: absolute;
  top: calc(100% - var(--hs-space-2));
  left: var(--hs-container-pad);
  right: var(--hs-container-pad);
  z-index: 60;
  padding: var(--hs-space-8);
  border-top: 4px solid var(--hs-aqua);
  border-radius: var(--hs-radius-md);
  background-color: var(--hs-surface);
  color: var(--hs-text);
  box-shadow: var(--hs-shadow-float);
}
.hs-mega[hidden] { display: none; }

.hs-mega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--hs-space-8) var(--hs-space-10);
}
.hs-mega__heading {
  margin: 0;
  padding-top: var(--hs-space-3);
  border-top: 3px solid var(--hs-accent);
  font-family: var(--hs-font-display);
  font-size: var(--hs-text-base);
  font-weight: var(--hs-weight-bold);
  color: var(--hs-text-strong);
}
.hs-mega__tagline {
  margin: var(--hs-space-1) 0 var(--hs-space-3);
  font-size: var(--hs-text-xs);
  color: var(--hs-text-muted);
}
.hs-mega__list { margin: 0; padding: 0; list-style: none; }
.hs-mega__list li { margin: 0; }
.hs-mega__link,
.hs-mega__more {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: var(--hs-text-sm);
  text-decoration: none;
}
.hs-mega__link { color: var(--hs-text-strong); }
.hs-mega__link:hover,
.hs-mega__link:focus-visible { color: var(--hs-primary); text-decoration: underline; }
.hs-mega__more {
  margin-top: var(--hs-space-1);
  font-weight: var(--hs-weight-semibold);
  color: var(--hs-accent-ink);
}
.hs-mega__more:hover,
.hs-mega__more:focus-visible { text-decoration: underline; }

.hs-mega__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-4);
  margin-top: var(--hs-space-8);
  padding-top: var(--hs-space-6);
  border-top: 1px solid var(--hs-border-subtle);
}
.hs-mega__featured {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--hs-text-strong);
}
.hs-mega__featured-label {
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-weight-bold);
  letter-spacing: var(--hs-tracking-wide);
  text-transform: uppercase;
  color: var(--hs-coral-ink);
}
.hs-mega__featured-name { font-weight: var(--hs-weight-semibold); }
.hs-mega__featured:hover .hs-mega__featured-name,
.hs-mega__featured:focus-visible .hs-mega__featured-name { color: var(--hs-primary); text-decoration: underline; }

@media (max-width: 1199.98px) {
  .hs-nav__mega-toggle,
  .hs-mega { display: none !important; }
}
