/* transform-2030-focus-areas — mobile/tablet (max-width: 991px) */
/* Below this width the sidebar is replaced entirely by a true accordion,
   ported from the gff-focus-area-cards.html reference's phone-only
   house->accordion behavior (own palette/BEM names, not the reference's
   literal navy/yellow + `goal__*` classes): .focus-areas__nav hides, the
   brand crest above it stands in for the reference's static
   "TRANSFORM 2030" roof banner (it's already always-visible there, nothing
   new needed), and each .focus-areas__group gets its own toggle button +
   collapsible panel, wired up in transform-2030-focus-areas.js. Only one
   group open at a time. The reference's extra floating "pinned roof"
   breadcrumb (a second fixed bar that appears once the open goal's sticky
   header reaches the top, purely a re-orientation aid) was deliberately
   left out - the open toggle itself already goes sticky (below) and keeps
   showing the group's tag+name while its cards scroll past, which covers
   the same "where am I" need without a second moving part.

   Originally gated at max-767px, with a separate --tablet.css keeping the
   sidebar+content side-by-side (just narrower) from 768-991px. Per
   explicit request, the accordion now takes over that whole range instead
   - --tablet.css is no longer loaded (see gff.libraries.yml), left on disk
   unused rather than deleted. Two-column layout needs to collapse the same
   way at this wider range too: full-width stack, brand crest on top (acting
   as the reference's static "TRANSFORM 2030" roof banner) then the
   accordion content below. */
.focus-areas {
  flex-direction: column;
  gap: 0;
}

.focus-areas__sidebar {
  position: static;
  width: 100%;
  flex: none;
}

.focus-areas__brand {
  margin-bottom: var(--sp2);
}

.focus-areas__title--inline {
  display: none;
}

.focus-areas__title--mobile {
  display: block;
  margin-bottom: var(--sp7);
}

.focus-areas__nav {
  display: none;
}

/* Base css sets gap: var(--sp11) (50px) between .focus-areas__content's
   children - right for tall desktop/tablet group sections, way too much
   once a closed group is just a 72px toggle bar. Reference's own phone tier
   shrinks this exact gap to 8px (.focus__content{gap:8px}); the group's own
   margin-bottom (removed below) would have doubled up with this flex gap. */
.focus-areas__content {
  width: 100%;
  gap: var(--sp2);
}

.focus-areas__sub-group {
  margin-top: 0;
  padding: 15px 0 0 0;
  border: none;
  border-radius: 0;
}

@media (max-width: 767px) {
  .focus-areas__sub-group {
    padding-top: 8px;
  }
}

/* Title-beside-description (base css) gets tight fast at this width -
   stack them instead, title on its own line above the description. */
.focus-areas__sub-group-heading {
  flex-direction: column;
  gap: var(--sp1);
}

.focus-areas__sub-group-title {
  font-size: 18px;
}

@media (max-width: 767px) {
  .focus-areas__sub-group-title {
    font-size: 16px;
  }
}

.focus-areas__sub-group-description {
  font-size: var(--fs-13);
}

.focus-areas__group-heading {
  border-top: 0;
  padding-top: 0;
}

/* The toggle already names the group (tag + title) - showing the heading's
   own tag again right underneath would just repeat it. */
.focus-areas__group-heading .focus-areas__group-tag {
  display: none;
}

.focus-areas__group-title {
  font-size: 20px;
}

/* This file is already gated at <=991px (gff.libraries.yml) - nested
   further here for the <=767px-only reduction. */
@media (max-width: 767px) {
  .focus-areas__group-title {
    font-size: 18px;
  }
}

.focus-areas__group-description {
  font-size: var(--fs-13);
}

.focus-areas__group-toggle {
  display: flex;
  align-items: center;
  width: calc(100% - 12px);
  min-height: 72px;
  margin: 0 6px;
  box-sizing: border-box;
  gap: var(--sp3);
  padding: var(--sp4) var(--sp5);
  background: var(--clr-accent-teal);
  color: var(--clr-white);
  border: 0;
  border-radius: var(--radius-8);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.focus-areas__group-toggle:focus-visible {
  outline: 3px solid var(--clr-blue);
  outline-offset: 3px;
}

/* Sticky while its own panel is open, same header-clearance offsets as the
   desktop sidebar/group-heading further up this component - keeps the
   group's tag+name visible as a re-orientation cue while its cards scroll
   past underneath. Rounded top corners only, so it reads as the lid of the
   tinted "drawer" the open panel becomes below. */
.focus-areas__group.is-open .focus-areas__group-toggle {
  position: sticky;
  top: var(--header-height);
  z-index: 3;
  background: var(--clr-yellow-orange);
  color: var(--clr-gray-dark);
  border-radius: var(--radius-8) var(--radius-8) 0 0;
}

.focus-areas__group-toggle-tag {
  flex: 0 0 auto;
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--clr-white);
  color: var(--clr-gray-dark);
  font-size: var(--fs-13);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  white-space: nowrap;
}

.focus-areas__group.is-open .focus-areas__group-toggle-tag {
  background: var(--clr-gray-dark);
  color: var(--clr-white);
}

.focus-areas__group-toggle-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.focus-areas__group-toggle-name {
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.focus-areas__group-toggle-count {
  font-size: var(--fs-12);
}

.focus-areas__group-chevron {
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.focus-areas__group.is-open .focus-areas__group-chevron {
  transform: rotate(180deg);
}

/* Base css sets .focus-areas__group-panel{display:contents} (no box of its
   own, so it can't be hidden) - a real box is needed here so JS can show
   just the open group's panel and hide the rest. Non-animated show/hide on
   purpose: a transition-based open/close here would reintroduce the same
   transitionend race already fixed once in this project's KPI accordion
   (a stale callback from an interrupted transition firing after a newer
   state change). */
.focus-areas__group-panel {
  display: none;
}

/* Open panel reads as one tinted "drawer" with the toggle above it -
   color-mix keeps the tint derived from an existing token rather than a
   one-off hardcoded hex. */
.focus-areas__group.is-open .focus-areas__group-panel {
  display: block;
  margin: 0 6px;
  padding: var(--sp5) var(--sp3);
  background: color-mix(in srgb, var(--clr-yellow-orange) 12%, var(--clr-white));
  border: 2px solid var(--clr-yellow-orange);
  border-top: 0;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
}

.focus-areas__group-next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp2);
  width: 100%;
  min-height: 48px;
  margin-top: var(--sp7);
  padding: var(--sp3) var(--sp5);
  box-sizing: border-box;
  border: 2px solid var(--clr-blue);
  border-radius: var(--radius-8);
  background: var(--clr-white);
  color: var(--clr-blue);
  font: inherit;
  font-size: 13px;
  line-height: 1.3 !important;
  font-weight: var(--fw-bold);
  cursor: pointer;
}

.focus-areas__group-next:focus-visible {
  outline: 3px solid var(--clr-blue);
  outline-offset: 3px;
}

.focus-areas__group-next--up svg {
  transform: rotate(180deg);
}
