/* The capability explorer.
 *
 * One grid holds the headings and the panes. On a wide screen the headings stack down the left and
 * every pane sits in the same area on the right, one shown at a time. Under 768 the grid collapses
 * to one column and the natural document order, heading then its own pane, is already an accordion.
 * That is why the buttons and panes are siblings rather than two separate lists: one copy of every
 * heading in the DOM, in reading order, with no duplication for a second layout.
 *
 * Every selector is prefixed cx- so nothing here can collide with the site's own classes.
 */

.cx {
  display: grid;
  gap: 0 40px;
  align-items: start;
}

.cx-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--s6, #545c6e);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line, #e8eaf0);
  padding: 17px 34px 17px 0;
  cursor: pointer;
  position: relative;
  transition: color .16s ease;
}

.cx-item:first-of-type {
  border-top: 0;
}

.cx-item:hover {
  color: var(--ink, #0b0f19);
}

.cx-item[aria-selected="true"] {
  color: var(--ink, #0b0f19);
}

.cx-item:focus-visible {
  outline: 2px solid var(--accent, #2f5fe6);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The marker for the open item. A bar on the left on desktop, a caret on the right on mobile. */
.cx-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 17px;
  bottom: 17px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent, #2f5fe6);
  opacity: 0;
  transition: opacity .16s ease;
}

.cx-item[aria-selected="true"]::before {
  opacity: 1;
}

.cx-pane {
  min-width: 0;
}

.cx-copy {
  max-width: 640px;
}

.cx-copy > :first-child {
  margin-top: 0;
}

.cx-copy p {
  font-size: 17px;
  line-height: 1.62;
  color: var(--s6, #545c6e);
  margin-top: 14px;
}

.cx-copy h2,
.cx-copy h3 {
  font-size: 27px;
  line-height: 1.12;
  color: var(--ink, #0b0f19);
}

.cx-pane .fsm {
  margin-top: 26px;
}

/* Wide: headings down the left, one pane area on the right, cross-faded. */
@media (min-width: 768px) {
  .cx {
    grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
    padding-left: 18px;
  }

  .cx-pane {
    grid-column: 2;
    grid-row: 1 / -1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .26s ease;
  }

  .cx-pane.is-on {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .cx-item {
    grid-column: 1;
  }
}

/* Narrow: one column, so the document order is already the accordion. */
@media (max-width: 767px) {
  .cx {
    grid-template-columns: 1fr;
  }

  .cx-item {
    padding: 18px 30px 18px 0;
    font-size: 18px;
    min-height: 44px;
  }

  .cx-item::before {
    display: none;
  }

  .cx-item::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -6px;
    border-right: 2px solid var(--s7, #6a7284);
    border-bottom: 2px solid var(--s7, #6a7284);
    transform: rotate(45deg);
    transition: transform .2s ease;
  }

  .cx-item[aria-selected="true"]::after {
    transform: rotate(-135deg);
    margin-top: -2px;
  }

  .cx-pane {
    display: none;
    padding: 0 0 26px;
  }

  .cx-pane.is-on {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx-pane {
    transition: none;
  }
}

/* The sections that fold into a pane were written to be centred full-width blocks. Inside the
   explorer they are a column beside a menu, so the centring is neutralised here rather than by
   editing the copy's own markup, which stays exactly as it was written. */
.cx-copy .center,
.cx-copy .dtext,
.cx-copy .demorow {
  text-align: left;
  max-width: none;
  margin: 0;
  display: block;
}

.cx-copy h2,
.cx-copy h3 {
  margin-top: 10px;
}

.cx-copy .eyebrow {
  display: block;
}

.cx-copy .dlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 600;
  color: var(--accent, #2f5fe6);
}

/* The link at the foot of a department column, which was styled by its old card wrapper. */
.cx-copy .ago {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent, #2f5fe6);
}

.cx-copy .ago::after {
  content: '\2192';
  font-weight: 700;
}

.cx-copy ul {
  margin: 0;
  padding-left: 20px;
}

.cx-copy li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--s6, #545c6e);
  margin-top: 9px;
}
