/* transform-2030-focus-areas */
.transform-focus-areas {
  --page-container-width: none;
}

.transform-focus-areas .normal-content-module {
  margin-bottom: var(--sp11);
}

.transform-focus-areas .normal-content-module .body-text-field {
  font-size: var(--fs-21);
  line-height: 1.2857;
}

.focus-areas {
  --sidbar-btn-bg: var(--clr-accent-teal);
  --sidbar-btn-hvr-bg: var(--clr-blue);
  --sidbar-btn-hvr-text-clr: var(--clr-white);
  display: flex;
  align-items: flex-start;
  gap: var(--sp14_5);
}

/* Clicking .focus-areas__brand-inner scrolls back to the top of the whole
   page-level section wrapper (.transform-focus-areas - added by the page
   template around this component, not rendered by this component's own
   markup, which is why it's absent from this component's own
   .stories.html preview) - same fixed-header clearance as
   .focus-areas__group's own #anchor targets below. */
/* .transform-focus-areas {
  scroll-margin-top: calc(var(--header-height) + var(--sp10));
}

body.page-scroll-down .transform-focus-areas {
  scroll-margin-top: var(--sp10);
}
 */

/* sidebar */
.focus-areas__sidebar {
  /* The site header is fixed and hides/shows on scroll direction (body gets
     page-scroll-up/page-scroll-down, see header.js). When it's visible the
     sticky sidebar must clear it; when it's hidden there's nothing to clear. */
  position: sticky;
  top: calc(var(--top-fixed-height) + var(--sp10));
  display: flex;
  flex-direction: column;
  gap: var(--sp2);
  width: 341px;
  flex: 0 0 341px;
  transition: var(--top-transition);
}

.focus-areas__brand {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  border-radius: 0 0 var(--radius-xxs, 8px) var(--radius-xxs, 8px);
  /* clip-path: polygon(50% 0%, 100% 32%, 100% 100%, 0% 100%, 0% 32%); */
  clip-path: polygon(50% 2.5%,
      53% 3.5%,
      98% 29.5%,
      99.5% 32.5%,
      100% 36%,
      100% 100%,
      0% 100%,
      0% 36%,
      0.5% 32.5%,
      2% 29.5%,
      47% 3.5%);
}

/* Figma "transform 1" frame (node 16:2875): fixed 93.81px crest height -
   was padding/content-driven auto-height (~77px), rendering visibly
   squatter than the design. */
.focus-areas__brand-inner {
  display: flex;
  /* Figma positions the text at a fixed 47.1px offset from the crest's top
     edge, not vertically centered in the full frame (the crest's pointed
     top third has no text in it) - align-items:center previously ignored
     that, centering across the whole 94px box regardless of padding. */
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  min-height: 94px;
  padding: var(--sp10_75, 47px) var(--sp5, 15px) 0;
  background: var(--sidbar-btn-bg);
  border-radius: 0 0 var(--radius-xxs, 8px) var(--radius-xxs, 8px);
  /* clip-path: polygon(50% 0%, 100% 32%, 100% 100%, 0% 100%, 0% 32%); */
  clip-path: polygon(50% 2.5%,
      53% 3.5%,
      98% 29.5%,
      99.5% 32.5%,
      100% 36%,
      100% 100%,
      0% 100%,
      0% 36%,
      0.5% 32.5%,
      2% 29.5%,
      47% 3.5%);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.focus-areas__brand-inner:hover,
.focus-areas__brand-inner:focus-visible {
  background: var(--sidbar-btn-hvr-bg);
}

.focus-areas__brand-inner:hover .focus-areas__brand-text,
.focus-areas__brand-inner:focus-visible .focus-areas__brand-text {
  color: var(--sidbar-btn-hvr-text-clr);
}

.focus-areas__brand-text {
  font-size: var(--fs-21);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--clr-white);
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.focus-areas__nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  gap: var(--sp2);
}

.focus-areas__nav-item {
  /* Figma: pill is 314.65px inside a 341.18px column - inset ~13px each
     side, unlike the full-width brand crest and Foundation tab below. */
  --nav-item-inset: 13px;
  /* Figma: fixed 92px pill height. Used as min-height (not height) so real
     content that wraps past two lines can still grow instead of clipping. */
  --nav-item-height: 92px;
  display: flex;
  align-items: center;
  width: calc(100% - (var(--nav-item-inset) * 2));
  max-width: calc(100% - (var(--nav-item-inset) * 2));
  min-height: var(--nav-item-height);
  margin: 0 auto;
  box-sizing: border-box;
  gap: var(--sp3);
  padding: var(--sp6, 16px);
  background: var(--sidbar-btn-bg);
  border-radius: var(--radius-8);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.focus-areas__nav-item:hover {
  background: var(--sidbar-btn-hvr-bg);
}

/* Default bg is --clr-blue (dark), so nav-title/range need white text to
   stay legible - hover/active's yellow bg needs them back to dark instead. */
.focus-areas__nav-item.is-active .focus-areas__nav-title,
.focus-areas__nav-item.is-active .focus-areas__nav-count {
  color: var(--clr-gray-dark);
}

/* nav-tag's own default (yellow bg/dark text) would blend into the
   nav-item's own yellow hover/active background - swap to dark bg/white
   text there so the tag still reads as a distinct pill. */
.focus-areas__nav-item:hover .focus-areas__nav-tag {
  background: var(--clr-white);
  color: var(--clr-gray-dark);
}

.focus-areas__nav-item.is-active .focus-areas__nav-tag {
  background: var(--clr-gray-dark);
  color: var(--clr-white);
}

.focus-areas__nav-tag {
  /* Figma: fixed 28px frame height. Its own "8px 14px" padding value
     doesn't actually reconcile with that (8+8+21px line-height = 37, not
     28) - a fixed-height auto-layout frame overrides padding's vertical
     effect in Figma, so height is authoritative and only the 14px
     horizontal padding actually applies. */
  height: 28px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--clr-white);
  color: var(--clr-gray-dark);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.3125;
}

.focus-areas__nav-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.focus-areas__nav-title {
  font-size: var(--fs-18, 18px);
  font-weight: var(--fw-bold);
  line-height: 1.111;
  color: var(--clr-white);
}

/* Matches the reference's own house__count - a small, secondary line under
   the nav item's name (its own 18px share the title's weight was never
   right for this; reference's own count is 12.5px, fs-13 is the closest
   existing token). */
.focus-areas__nav-count {
  font-size: var(--fs-13);
  line-height: 1.3;
  color: var(--clr-white);
  /* .focus-areas__nav-text:first-child (the tag-less "bar" item, e.g.
     Strategic Enablers) uppercases the whole block for its title - the
     count shouldn't inherit that. */
  text-transform: none;
}

.focus-areas__nav-item.is-active {
  background: var(--clr-white);
}

/* Full-bleed inset tied to position (last item), not to the no-tag
   fallback - the two happen to coincide in the current data but aren't the
   same concept. */
.focus-areas__nav-item:last-child {
  --nav-item-inset: 0px;
}

.focus-areas__nav-item:last-child .focus-areas__nav-count {
  text-align: center;
}

/* Structural instead of the old --foundation modifier class - targets ANY
   nav item that fell back to a plain title with no tag (grouping_name with
   no grouping_title, see the twig), not just one hardcoded to a "foundation"
   group key. */
.focus-areas__nav-item:not(:has(.focus-areas__nav-tag)) {
  --nav-item-height: 52px;
  justify-content: center;
  padding: var(--sp3);
  border-radius: var(--radius-8) var(--radius-8) 0 0;
}

.focus-areas__title {
  color: var(--clr-blue);
  margin: 0;
}

/* --mobile copy (see twig comment) only ever shows below 767px. */
.focus-areas__title--mobile {
  display: none;
}

/* .focus-areas__content's own gap (var(--sp11), 50px - sized for the space
   BETWEEN groups) read as too much air between the title and the first
   group below it specifically. Flexbox gap is uniform across all children,
   so pulling just this one gap in needs a negative margin on the title
   itself rather than touching the shared container gap (which must stay
   full-size between groups) - nets out to --sp6 (20px) between title and
   first group, group-to-group spacing untouched. */
.focus-areas__title--inline {
  margin-bottom: calc(var(--sp6) - var(--sp11));
}

/* content */
.focus-areas__content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp11);
}

/* Accordion chrome only exists below 767px (see --mobile.css) - above that
   the sidebar nav is how you jump between groups, so these stay hidden and
   the panel wrapper stays out of the box tree entirely (display:contents)
   so it has zero effect on this file's own flow/sticky rules below, which
   were all written assuming .focus-areas__group-heading is a direct child
   of .focus-areas__group. */
.focus-areas__group-toggle,
.focus-areas__group-next {
  display: none;
}

.focus-areas__group-panel {
  display: contents;
}

/* Sidebar nav links jump to these via #anchor - without this, the fixed
   header covers the top of whatever section the browser scrolls to. */
.focus-areas__group {
  scroll-margin-top: calc(var(--header-height) + var(--sp10));
}

body.page-scroll-down .focus-areas__group {
  scroll-margin-top: var(--sp10);
}

.focus-areas__group-heading {
  display: flex;
  /* flex-wrap: wrap; */
  align-items: flex-start;
  gap: 15px;
  border-top: 1px solid var(--clr-gray-medium);
  padding-top: var(--sp5);
  padding-bottom: 5px;
  margin-bottom: var(--sp7);
}

/* The content update moved .focus-areas__group-description from a flat
   sibling of .focus-areas__group-heading (what this rule originally keyed
   off via the + combinator) to nested inside a new
   .focus-areas__group-title-wrap INSIDE the heading - the old selector
   could never match that shape and had gone dead. Matches the new
   containment relationship instead (same effect: tighter margin-bottom
   when a description is actually present under the title). */
.focus-areas__group-heading:has(.focus-areas__group-description) {
  margin-bottom: var(--sp4);
}

/* New wrapper (title + description stacked) sitting beside the fixed
   .focus-areas__group-tag badge in the flex row above - flex:1 1 auto so
   it takes the remaining row width, min-width:0 so its own long title
   text can actually wrap within that width instead of forcing the row
   wider (the classic flex-item min-content overflow gotcha). */
.focus-areas__group-title-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  gap: var(--sp3);
}

/* Part of the sticky group heading feature above (remove together): when
   the real theme's fixed header hides on scroll-down, it needs to actually
   dock at top:0 for the heading's own `body.page-scroll-down` offset (just
   above) to line up correctly - otherwise a residual header gap throws the
   heading's stuck position off by however much of the header is still
   showing. `:has(.transform-focus-areas)` scopes this to pages that render
   this component, so it can't affect the header's hide/show behavior on any
   other page. */
/* @media (min-width: 1024px) {
  body.page-scroll-down:has(.transform-focus-areas) header.navbar {
    top: 0;
  }
}
 */

.focus-areas__group-title {
  font-size: var(--fs-22);
  font-weight: var(--fw-bold);
  color: var(--clr-blue);
  line-height: 1.2;
}

.focus-areas__group-tag {
  font-size: 14px;
  background: var(--chip-bg-color);
  padding: 15px;
  color: var(--clr-white);
  flex-shrink: 0;
  border-radius: 6px;
  font-weight: var(--fw-bold);
}

.focus-areas__group-range {
  font-size: var(--fs-18);
  color: var(--clr-gray-dark);
}

/* Sub-theme groups (group.sub_themes[], e.g. "Results and learning" under
   Foundation) - nested inside their parent .focus-areas__group, so they
   share its scroll-spy range rather than getting a sidebar nav entry of
   their own. Two-line heading (parent group's own label, small/uppercase/
   neutral, then the sub-group's own title, bold/blue/larger) above its card
   grid. */
.focus-areas__sub-group-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp9);
  width: 100%;
}

.focus-areas__sub-group {
  padding: 0;
  border: none;
  /* border-radius: var(--radius-35); */
}

.cards__keythemes+.focus-areas__sub-group {
  margin-top: var(--sp10);
}

/* align-items:flex-start (not the old baseline) now that a sub-group can
   carry a real multi-word description next to its title, not just the
   now-removed .focus-areas__sub-group-parent label - baseline alignment
   only made sense for two short single-line labels side by side. */
.focus-areas__sub-group-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: var(--sp6);
}

/* New field (sub.description) - flex:1 1 auto + min-width:0 so it wraps
   within the row instead of overflowing, same reasoning as
   .focus-areas__group-title-wrap above. .focus-areas__sub-group-title's
   own flex-shrink:0 (below) is what keeps the title itself from being
   squeezed as this grows. */
.focus-areas__sub-group-description {
  flex: 1 1 auto;
  min-width: 0;
}

.focus-areas__sub-group-parent {
  width: 100%;
  font-size: 14px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: var(--clr-gray-dark);
  display: none;
}

.focus-areas__sub-group-title {
  font-size: var(--fs-21);
  font-weight: var(--fw-bold);
  color: var(--clr-blue);
  flex-shrink: 0;
}

.transform-focus-areas .page-title {
  line-height: 1.25;
  color: var(--section-title-clr, var(--clr-gray-dark));
  font-weight: var(--fw-bold);
  margin: 0;
}
