/* ==========================================================================
   layout.css — page scaffolding: container, header, main, footer.

   Two shapes, deliberately.

   The *forms* are single-column and narrow — sign-in, registration, reset,
   verification. Every one is easier to read at 30rem than stretched across a
   desktop, and none of them has a second thing to put beside the first.

   The *content* pages are not forms and stopped fitting that shape some time
   ago: a profile with memberships and outstanding requests, a directory of
   7,509 organisations, an access-request console. Rendering those as one narrow
   column of stacked cards made every block look equally important and the page
   read as a list of panels rather than as a page. They use the section rhythm
   below — full-bleed bands on alternating grounds, each opening with a section
   header, content in a grid — which is the vocabulary haresign.net uses and
   haresign-web adopted at 67e9929.
   ========================================================================== */

.hs-body {
  /* The footer sits at the bottom of a short page rather than half way up it,
     without position: fixed and the overlap that always follows. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--hs-surface-muted);
}

/* No padding of its own: a full-bleed band has to reach the edges, and a main
   element with vertical padding puts a white gutter above and below every one.
   The rhythm belongs to .hs-section and .hs-auth instead, which is why both
   carry it. */
.hs-main { flex: 1 0 auto; }

.hs-container {
  width: 100%;
  max-width: var(--hs-container-max);
  margin-inline: auto;
  padding-inline: var(--hs-container-pad);
}

/* --- Header --------------------------------------------------------------- */

/* The estate header, as haresign-web renders it. Same ground, same 4.875rem
   bar, same 2.625rem wordmark, same container edges, same teal underline on the
   nav — so Billing, Identity and the marketing site read as one product rather
   than three that happen to share a palette.

   What is *not* copied from haresign-web is its markup's dependency on
   Bootstrap utilities (`d-xl-none`, `position-relative`) and the destinations
   themselves. Neither service ships a vendor stylesheet, and a test in each
   repository fails if one arrives; the responsive behaviour those utilities
   bought is written out below as ordinary media queries instead.

   Sticky, as haresign-web's is. There is no `--overlay` variant here: that one
   exists to sit over the homepage banner photograph, and neither of these
   services has a banner to sit over. */
.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);
}

/* `position: sticky` already makes this the containing block for the nav panel
   below, which is why the panel needs no `position: relative` wrapper — and why
   haresign-web's `position-relative` utility has no equivalent here. Below the
   collapse breakpoint the container is full-bleed anyway, so the panel spans
   exactly the width it does on haresign-web. */
.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: inline-flex;
  align-items: center;
  gap: var(--hs-space-3);
}

/* The asset suffix names the *background* the file belongs on, not its ink:
   logo-primary-dark is the white-ink file, which is what a navy bar wants.
   Reversed, the logo goes invisible rather than obviously broken, so check it
   against the ground rather than against the filename. */
.hs-header__logo {
  height: 2.25rem;
  width: auto;
  display: block;
}

.hs-header__actions {
  display: flex;
  align-items: center;
  gap: var(--hs-space-3);
}

/* The actions that belong to the bar rather than to the panel. Below the
   breakpoint these are hidden and the panel carries its own copies, so no
   account control is ever unreachable — which matters more here than it does on
   the marketing site, because the control in question is Sign out. */
.hs-header__actions-desktop {
  display: flex;
  align-items: center;
  gap: var(--hs-space-3);
}

.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 (D10). White on aqua is
     6.55:1; navy on aqua would be 2.88:1 and cannot carry text. */
  background-color: var(--hs-primary);
  color: var(--hs-text-on-dark-strong);
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-weight-black);
  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;
}

.hs-account-menu__name {
  max-width: 10rem;
  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);
}

.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-link);
}

.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 ---------------------------------------------------
   haresign-web's `.hs-nav` component, at the same size, weight and spacing.
   Medium rather than semibold, and the small step of the type scale, because
   that is what the bar uses on the site these services sit beside. */
/* Push the nav — and the actions after it — to the right of the bar. On
   haresign-web this changes nothing: seven items already consume the space
   `space-between` distributes. Here there are one or two, and without it a lone
   "Sign in" floats at about 60% of the width with the empty actions slot
   holding the rest. An account control belongs against the right edge. */
.hs-nav { margin-inline-start: auto; }

.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 the deep interactive teal: on navy that one is a dark colour
   on another dark colour. 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 count riding on a nav item — Identity's pending access requests. Baseline
   alignment rather than the block's default, so the underline still runs under
   the whole item and the pill does not push the row taller than the others. */
.hs-nav__link .hs-badge {
  margin-inline-start: var(--hs-space-2);
  vertical-align: baseline;
}

/* The panel's copy of an action that the bar also carries. Hidden while the bar
   shows its own, so the control appears exactly once at every width. */
.hs-nav__action { display: none; }

.hs-nav__drawer-head,
.hs-nav__drawer-intro,
.hs-nav__drawer-contact {
  display: none;
}

.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); }

/* The default secondary button is a grey border and grey ink for a white
   ground, which on navy is one dark thing on another. Restated for this bar
   only; the component is correct everywhere else. */
.hs-header .hs-btn--secondary {
  border-color: var(--hs-border-on-dark);
  color: var(--hs-text-on-dark);
  background-color: transparent;
}
.hs-header .hs-btn--secondary:hover {
  border-color: var(--hs-text-on-dark-strong);
  color: var(--hs-text-on-dark-strong);
  background-color: transparent;
}

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

.hs-header__signout { display: inline-flex; }

/* --- Header, collapsed ----------------------------------------------------
   haresign-web collapses at 1200px because seven items, a Sign in and a call to
   action share its bar with a 220px wordmark. These services have two to four
   account controls, so the same breakpoint would hide a two-item nav behind a
   menu button on a laptop. The treatment is haresign-web's; the width at which
   it starts is this application's, which is the distinction the brief draws
   between a shared design and a shared navigation.

   64rem is where Identity's richer signed-in row — the wordmark, account links,
   platform admin and account pill — stops having room to sit cleanly. */
/* Below 1024px: the drawer (UX3.1, owner decision). Written as the exact
   complement of `min-width: 64rem`, so no fractional width falls between them. */
@media not all and (min-width: 64rem) {
  .hs-nav__toggle { display: inline-flex; }

  /* A right-hand drawer, matching the monolith's mobile/utility menu shape. */
  .hs-nav {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    width: min(30rem, calc(100vw - 2rem));
    margin-inline-start: 0;
    overflow-y: auto;
    background-color: var(--hs-navy-deep);
    border-left: 1px solid var(--hs-border-on-dark);
    box-shadow: none;
    padding: var(--hs-space-7);
    /* Closed, the drawer is clipped away where it stands rather than pushed past the right edge: a
       translated fixed box still widens the page, which let a narrow screen scroll sideways onto it. */
    clip-path: inset(0 0 0 100%);
    visibility: hidden;
    transition: clip-path var(--hs-transition), visibility 0s linear var(--hs-duration-fast);
  }
  .hs-nav.is-open {
    box-shadow: -100vw 0 0 rgba(5, 10, 20, 0.68), -24px 0 60px rgba(0, 0, 0, 0.42);
    clip-path: inset(0 0 0 -100vw);
    visibility: visible;
    transition: clip-path var(--hs-transition), visibility 0s;
  }

  .hs-nav__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hs-space-4);
    margin-bottom: var(--hs-space-5);
  }

  .hs-nav__drawer-logo {
    height: 2.625rem;
    width: auto;
  }

  .hs-nav__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    background: transparent;
    color: var(--hs-text-on-dark-strong);
    cursor: pointer;
    font-size: 2.5rem;
    line-height: 1;
  }

  .hs-nav__drawer-intro {
    display: block;
    margin: 0 0 var(--hs-space-6);
    padding-bottom: var(--hs-space-5);
    border-bottom: 1px solid var(--hs-border-on-dark);
    color: var(--hs-text-on-dark);
    font-size: var(--hs-text-base);
  }

  /* Without JavaScript the toggle cannot open anything, so a hidden panel would
     take Sign out off the page entirely. `hs-js` is set on <html> by site.js
     before the body paints; in its absence the nav stays in the flow as a second
     row of the header and the menu button — which would do nothing — is not
     drawn. haresign-web hides its panel unconditionally; on a service where the
     hidden control is the one that ends a session, that trade is the wrong way
     round. */
  html:not(.hs-js) .hs-header__inner { flex-wrap: wrap; }
  html:not(.hs-js) .hs-nav {
    display: block;
    position: static;
    transform: none;
    clip-path: none;
    visibility: visible;
    width: 100%;
    padding: var(--hs-space-3) 0;
    border-left: 0;
    border-bottom: 0;
    box-shadow: none;
  }
  html:not(.hs-js) .hs-nav__toggle { display: none; }
  html:not(.hs-js) .hs-nav__drawer-head,
  html:not(.hs-js) .hs-nav__drawer-intro,
  html:not(.hs-js) .hs-nav__drawer-contact { display: none; }

  .hs-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline: 0;
  }
  .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 several 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 bar's own actions go; the panel carries its copies. */
  .hs-header__actions-desktop { display: none; }
  .hs-nav__action { display: block; }

  /* A control in the panel is a full-width row, not a pill floating in one. */
  .hs-nav__list .hs-btn,
  .hs-nav__list .hs-header__signout { display: flex; width: 100%; }
  .hs-nav__list .hs-header__signout { padding-block: var(--hs-space-3); }

  .hs-nav__drawer-contact {
    display: grid;
    gap: var(--hs-space-3);
    margin-top: var(--hs-space-7);
    padding-top: var(--hs-space-6);
    border-top: 1px solid var(--hs-border-on-dark);
  }

  .hs-nav__drawer-contact h2 {
    margin: 0;
    color: var(--hs-text-on-dark-strong);
    font-size: var(--hs-heading-card);
  }

  .hs-nav__drawer-contact p {
    display: grid;
    gap: var(--hs-space-1);
    margin: 0;
    color: var(--hs-text-on-dark);
  }

  .hs-nav__drawer-contact span {
    font-size: var(--hs-text-sm);
  }

  .hs-nav__drawer-contact a {
    color: var(--hs-text-on-dark-strong);
    font-weight: var(--hs-weight-bold);
  }
}

/* At 320px the wordmark, the environment badge and the menu button want more
   than the row has, and the badge ends up underneath the button. The logo gives
   up the difference rather than the badge being dropped — the environment is
   the one thing somebody about to type a password most needs to know. */
@media (max-width: 36rem) {
  .hs-header__logo { height: 2.125rem; }
  .hs-header__service { font-size: var(--hs-text-base); }
}

/* --- Footer --------------------------------------------------------------- */


/* --- Centred single-column page ------------------------------------------
   The shape every authentication page takes. Narrow on purpose: a sign-in form
   stretched across a desktop viewport is harder to use, not more generous. */

.hs-auth {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  padding-inline: var(--hs-container-pad);
  padding-block: var(--hs-space-10) var(--hs-space-16);
}

/* Retained for the two-column form pages that are still forms. The wide content
   pages no longer use it: they use .hs-section and .hs-container. */
.hs-auth--wide { max-width: 44rem; }

.hs-auth--utility .hs-card {
  text-align: left;
}

.hs-auth--utility .hs-card__title {
  margin-bottom: var(--hs-space-3);
}

.hs-auth--password {
  max-width: 32rem;
}

.hs-auth--password .hs-card {
  padding: var(--hs-space-6);
}

.hs-auth--password .hs-field__help {
  padding: var(--hs-space-3);
  border: 1px solid var(--hs-border-subtle);
  border-radius: var(--hs-radius-sm);
  background-color: var(--hs-surface-muted);
  font-size: var(--hs-text-sm);
  line-height: var(--hs-leading-normal);
}

.hs-auth--password .hs-field__help ul {
  margin: 0;
  padding-left: var(--hs-space-5);
}

.hs-auth--password .hs-field__help li + li {
  margin-top: var(--hs-space-1);
}

.hs-auth--login,
.hs-auth--register {
  max-width: var(--hs-container-max);
  display: grid;
  grid-template-columns: minmax(24rem, 36rem) minmax(24rem, 30rem);
  align-items: start;
  gap: var(--hs-space-20);
  padding-block: var(--hs-space-12) var(--hs-space-16);
}

.hs-auth--register {
  grid-template-columns: minmax(22rem, 34rem) minmax(26rem, 34rem);
  align-items: center;
}

.hs-auth__intro {
  max-width: 36rem;
  padding-top: var(--hs-space-5);
}

.hs-auth__header {
  text-align: center;
  margin-bottom: var(--hs-space-6);
}

.hs-auth--login .hs-auth__header,
.hs-auth--register .hs-auth__header {
  margin-bottom: var(--hs-space-5);
}

.hs-auth__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: var(--hs-space-3);
}

.hs-auth__intro .hs-auth__title {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 2.875rem);
  line-height: 1.16;
}

.hs-auth__lead {
  color: var(--hs-text-muted);
  font-size: var(--hs-text-base);
  margin-inline: auto;
  max-width: 34ch;
}

.hs-auth__copy {
  max-width: 35rem;
  color: var(--hs-text);
  font-size: var(--hs-text-base);
  line-height: var(--hs-leading-normal);
}

.hs-auth__footer {
  margin-top: var(--hs-space-6);
  text-align: center;
  font-size: var(--hs-text-sm);
  color: var(--hs-text-muted);
}

@media (max-width: 54rem) {
  .hs-auth--login,
  .hs-auth--register {
    grid-template-columns: 1fr;
    gap: var(--hs-space-8);
    max-width: 34rem;
    padding-block: var(--hs-space-10) var(--hs-space-16);
  }

  .hs-auth__intro,
  .hs-auth__intro .hs-auth__title,
  .hs-auth__copy {
    max-width: none;
  }

  .hs-auth__intro { padding-top: 0; }
}

.hs-stack { display: grid; gap: var(--hs-space-6); }
.hs-stack--tight { gap: var(--hs-space-4); }

/* --- Inverse band --------------------------------------------------------
   haresign.net's aqua/navy band, for the one statement a page most wants read.
   Here that is the dual-running notice: the fact that an account on this
   service is not yet an account on today's Haresign tools is the single thing a
   visitor most needs to leave with, and a grey panel had been saying it
   apologetically. */
.hs-section--inverse {
  position: relative;
  isolation: isolate;
  background-color: var(--hs-surface-inverse);
  color: var(--hs-text-on-dark);
  overflow: hidden;
  padding-block: var(--hs-section-y-tight);
}

.hs-section--inverse h1,
.hs-section--inverse h2,
.hs-section--inverse h3 { color: var(--hs-text-on-dark-strong); }

.hs-section--inverse strong { color: var(--hs-text-on-dark-strong); }
.hs-section--inverse .hs-section__hint { color: var(--hs-text-on-dark-muted); }

/* The teal wash that keeps the band from reading as a flat navy rectangle. One
   field, not haresign-web's two: this band is a quarter of the height of the
   homepage one it borrows from, and the second field had nowhere to fall. */
.hs-section--inverse::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -14rem;
  left: -8rem;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  background-color: rgba(15, 163, 163, 0.22);
  filter: blur(80px);
}


/* --- Section rhythm ------------------------------------------------------
   The unit a content page is built from. Full-bleed, so the ground reaches the
   viewport edge; the container inside it holds the measure. Alternating grounds
   are what give a page structure without drawing a box around every block —
   which is what a stack of cards does, and why it reads as a list of panels.

   The grounds, in the order they are worth reaching for:

     (default)          white. The page's own content.
     .hs-section--muted the pale neutral. A supporting band between two white
                        ones, or a listing that should sit back from its header.
     .hs-section--warm  the barely-there warm neutral. An invitation rather than
                        another panel.
     .hs-section--inverse navy. One per page at most: it is for the single
                        sentence the page most wants read. */
/* The rhythm here is deliberately tighter than haresign-web's. Those values are
   for a marketing page where a band is a scroll stop and the air is the point;
   these pages are dense — a member list, a filter bar, a table — and at 96px top
   and bottom a filter and its own results ended up 192px apart, with the results
   below the fold on a laptop. */
.hs-section { padding-block: var(--hs-space-10); }
.hs-section--tight { padding-block: var(--hs-space-8); }
.hs-section--muted { background-color: var(--hs-surface-muted); }

/* Sections that continue the one above rather than starting a new idea — a
   filter bar under its page header, results under their filter. Halves the
   doubled gap where two bands meet without giving every section the same
   cramped spacing. */
.hs-section--joined { padding-top: 0; }
.hs-section--flush { padding-bottom: 0; }

.hs-section--warm {
  background-color: var(--hs-surface-warm);
  border-block: 1px solid var(--hs-border-subtle);
}

/* The body ground is the muted neutral, so a muted band against it is invisible
   at the page's top and bottom edges. A white first section is what gives the
   page a top. */
.hs-section--first { background-color: var(--hs-surface); }

/* --- Section header ------------------------------------------------------ */
.hs-section-header { max-width: 45rem; margin-bottom: var(--hs-space-10); }
.hs-section-header__title { margin-bottom: var(--hs-space-3); }
.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); }

/* Header with an action on the right — "Find an organisation", a filter reset,
   a pending count. */
.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);
}

/* --- Page header ---------------------------------------------------------
   The first band on a content page: who or what this page is about, and the one
   or two things you can do from it. */
.hs-page-header__title { margin-bottom: var(--hs-space-3); }

.hs-page-header__lead {
  font-size: var(--hs-text-lg);
  max-width: 45rem;
  margin-bottom: 0;
}

.hs-page-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hs-space-3);
  margin-top: var(--hs-space-5);
}

.hs-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-3);
  margin-top: var(--hs-space-6);
}

/* --- Grid ----------------------------------------------------------------
   auto-fit rather than a fixed column count, so a section with two memberships
   and a section with nine both look deliberate without either being told how
   many it has. */
.hs-grid {
  display: grid;
  gap: var(--hs-space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.hs-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr)); }
.hs-grid--tight { gap: var(--hs-space-4); }

/* Two columns that stay two columns until they genuinely cannot — for a pair of
   panels that belong side by side, like details and sign-in details. */
.hs-grid--pair { grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); }

/* --- Footer --------------------------------------------------------------
   Dark, like the header, so the page is bracketed by the brand rather than
   fading out into the body ground. */
.hs-footer {
  flex-shrink: 0;
  background-color: var(--hs-navy-deep);
  color: var(--hs-text-on-dark);
  padding-block: var(--hs-space-12) var(--hs-space-8);
}

.hs-footer__grid {
  display: grid;
  gap: var(--hs-space-10);
  grid-template-columns: 1.6fr repeat(2, 1fr);
}

@media (max-width: 62rem) {
  .hs-footer__grid { grid-template-columns: repeat(2, 1fr); gap: var(--hs-space-8); }
  .hs-footer__brand-col { grid-column: 1 / -1; }
}

@media (max-width: 36rem) {
  .hs-footer__grid { grid-template-columns: 1fr; }
}

.hs-footer__logo { height: 2rem; width: auto; display: block; margin-bottom: var(--hs-space-4); }

.hs-footer__tagline {
  max-width: 34ch;
  margin: 0 0 var(--hs-space-4);
  font-size: var(--hs-text-sm);
}

.hs-footer__legal-details {
  margin-top: var(--hs-space-4);
  font-size: var(--hs-text-sm);
  color: var(--hs-text-on-dark-muted);
}

.hs-footer__legal-details p { margin: 0 0 var(--hs-space-1); }

.hs-footer__heading {
  margin: 0 0 var(--hs-space-4);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-semibold);
  color: var(--hs-text-on-dark-strong);
}

.hs-footer__link { color: var(--hs-text-on-dark); }
.hs-footer__link:hover { color: var(--hs-teal); }

.hs-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-2) var(--hs-space-6);
  align-items: baseline;
  margin-top: var(--hs-space-10);
  padding-top: var(--hs-space-6);
  border-top: 1px solid var(--hs-border-on-dark);
  font-size: var(--hs-text-sm);
}

.hs-footer__bottom p { margin: 0; }
.hs-footer__line--muted { color: var(--hs-text-on-dark-muted); }

/* The two-diamond mark, as the section eyebrow uses, standing in for a bullet. */
.hs-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--hs-space-2);
  font-size: var(--hs-text-sm);
}

.hs-footer__list li { position: relative; padding-inline-start: var(--hs-space-4); }

.hs-footer__list li::before,
.hs-footer__list li::after {
  content: "";
  position: absolute;
  top: 0.55em;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 1px;
  transform: rotate(45deg);
}

.hs-footer__list li::before { inset-inline-start: 0; background-color: var(--hs-teal); }
.hs-footer__list li::after { inset-inline-start: 0.25rem; background-color: var(--hs-aqua); }

/* A management page is a stack of short sections over tables, and the section
   heading scale — up to 44px — shouts a one-word label over a list of one. */
.hs-section-header--compact { margin-bottom: var(--hs-space-5); }
.hs-section-header--compact .hs-section-header__title { font-size: var(--hs-heading-card); }
.hs-section-header--compact .hs-section-header__lead { font-size: var(--hs-text-base); }

/* --- Working column and reference rail -----------------------------------
   What somebody came to *do* takes the width; what they came to *check* sits
   beside it. Collapsing to one column below 64rem puts the work first, which is
   the right order on a phone. */
.hs-split {
  display: grid;
  gap: var(--hs-space-6);
  grid-template-columns: minmax(0, 1fr) 22rem;
  align-items: start;
}

.hs-split__main,
.hs-split__rail {
  display: grid;
  gap: var(--hs-space-6);
  min-width: 0;
}

@media (max-width: 64rem) {
  .hs-split { grid-template-columns: minmax(0, 1fr); }
}

/* --- Breadcrumb ----------------------------------------------------------- */
.hs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hs-space-2);
  margin-bottom: var(--hs-space-4);
  font-size: var(--hs-text-sm);
  color: var(--hs-text-muted);
}

.hs-breadcrumb span[aria-hidden] { color: var(--hs-border-strong); }

/* --- Organisation head ----------------------------------------------------
   The ODS code as a tile rather than a line of text: it is the thing somebody
   checks they are on the right page by, and it reads faster as a mark. */
.hs-org-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hs-space-4);
}

.hs-org-head__code {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  padding: var(--hs-space-3);
  border-radius: var(--hs-radius-md);
  background-color: var(--hs-aqua);
  color: var(--hs-text-on-dark-strong);
  font-family: var(--hs-font-mono);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-bold);
}

.hs-org-head__text { flex: 1 1 18rem; min-width: 0; }
.hs-org-head__title { margin: 0 0 var(--hs-space-1); font-size: var(--hs-heading-card); }
.hs-org-head__sub { margin: 0; font-size: var(--hs-text-sm); color: var(--hs-text-muted); }

.hs-org-head__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-2);
}

.hs-work-hero .hs-org-head__code {
  background-color: var(--hs-surface);
  color: var(--hs-aqua);
  box-shadow: var(--hs-shadow-md);
}

.hs-work-hero .hs-org-head__actions .hs-btn--primary {
  background-color: var(--hs-surface);
  border-color: var(--hs-surface);
  color: var(--hs-aqua);
}

.hs-work-hero .hs-org-head__actions .hs-btn--primary:hover {
  background-color: var(--hs-surface);
  border-color: var(--hs-surface);
  color: var(--hs-aqua-deep);
}

@media (max-width: 42rem) {
  .hs-work-hero .hs-org-head {
    align-items: flex-start;
  }

  .hs-work-hero .hs-org-head__actions {
    width: 100%;
  }
}
