/* Core block styles. Loaded twice on purpose — into the front-end chain in
   inc/enqueue-scripts.php and into the editor via add_editor_style() — so the
   two cannot drift apart. .btn is not a block; it shares the rule and matches
   nothing in the editor. */

.wp-block-button__link,
.btn {
  position: relative;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* The relative path survives in the editor: core passes this file's URI as baseURL. */
.wp-block-button__link::after,
.btn::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin-left: 14px;
  background-color: currentColor;
  width: 10px;
  height: 10px;
  mask: url(../img/arrow-down-right.svg) no-repeat center / contain;
  -webkit-mask: url(../img/arrow-down-right.svg) no-repeat center / contain;
}

/* On a dark background the primary keeps its yellow outline on hover, as the
   designer's hover sheet draws it; theme.json turns it all navy, for light ones. */
:is(.has-primary-background-color, .hero--blue, .hero--navy, .insight-featured)
  :is(.wp-block-button:not(.is-style-outline-dark, .is-style-outline-light, .is-style-white) > .wp-block-button__link, .btn:not(.btn--outline-dark)):hover {
  border-color: var(--wp--preset--color--secondary);
}

/* On the yellow heroes a yellow button would vanish: the primary is white
   there, as the FinTech mockup draws it, and turns navy on hover. */
:is(.hero--yellow, .hero--bright-yellow) .wp-block-button:not(.is-style-outline-dark, .is-style-outline-light, .is-style-white) > .wp-block-button__link {
  border-color: var(--wp--preset--color--base);
  background-color: var(--wp--preset--color--base);
  color: var(--wp--preset--color--primary);
}

:is(.hero--yellow, .hero--bright-yellow) .wp-block-button:not(.is-style-outline-dark, .is-style-outline-light, .is-style-white) > .wp-block-button__link:hover {
  border-color: var(--wp--preset--color--primary);
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

/* Phones: every button takes the full width, one per row, and narrower side
   padding keeps its label on one line. Buttons sitting in a row or stack
   Group (beside a heading, say) are sized by their content there, so their
   wrapper takes the full width too. */
@media (max-width: 599px) {
  .wp-block-button {
    flex: 1 1 100%;
  }

  .is-layout-flex:not(.is-vertical) > .wp-block-buttons {
    flex-basis: 100%;
  }

  .is-layout-flex.is-vertical > .wp-block-buttons {
    align-self: stretch;
  }

  .wp-block-button__link {
    display: block;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
  }
}

/* Narrow phones (360 and below): the longest labels ("Download Mobile
   Banking App") overflow at the normal size, so every label steps down. */
@media (max-width: 374px) {
  .wp-block-button__link {
    font-size: var(--wp--preset--font-size--x-small);
  }
}

/* The arrow is the primary's: every mockup draws the outline styles without it. */
:is(.is-style-outline-dark, .is-style-outline-light) .wp-block-button__link::after {
  content: none;
}

/* theme.json colours every heading `heading`, which would leave them navy inside
   a navy section with white text. A heading's own colour class is !important
   and still wins. */
.has-text-color :is(h1, h2, h3, h4, h5, h6) {
  color: inherit;
}

/* Lines of a heading even out instead of leaving one word on the last. */
:is(h1, h2, h3, h4, h5, h6) {
  text-wrap: balance;
}

/* Text rhythm: more room above a heading than below it, so it reads as part of
   the text it introduces. Only between siblings — a heading that opens its
   container gets no top margin. theme.json has no way to say "after". */
:is(.is-layout-flow, .is-layout-constrained) > * + h2 {
  margin-block-start: 3rem;
}

:is(.is-layout-flow, .is-layout-constrained) > * + :is(h3, h4, h5, h6) {
  margin-block-start: 2rem;
}

:is(.is-layout-flow, .is-layout-constrained) > :is(h1, h2, h3, h4, h5, h6) + * {
  margin-block-start: 0.75rem;
}

/* Document (legal text): a 1050px column against the left edge of the
   container, where the hero title starts. The layout's own contentSize with
   left justification would pin it to the page gutter instead, so the column
   is narrowed from the right. */
.is-style-document > * {
  padding-inline-end: max(0px, min(100%, var(--wp--style--global--content-size)) - 1050px);
}

/* A heading sits right on its text, and a list on the line that introduces it. */
.is-style-document > * + :is(h2, h3) {
  margin-block-start: var(--wp--style--block-gap);
}

.is-style-document > :is(h2, h3, h4, h5, h6) + *,
.is-style-document > p + ul,
.is-style-document li {
  margin-block-start: 0;
}

.is-style-document :is(ul, ol) {
  padding-inline-start: 1.75rem;
}

.is-style-document ul {
  list-style-type: disc;
}

/* Every photo in the mockups has rounded corners; Media & Text has no
   setting for it. */
.wp-block-media-text__media img,
.wp-block-media-text.is-image-fill-element .wp-block-media-text__media {
  border-radius: 24px;
}

.wp-block-media-text.is-image-fill-element .wp-block-media-text__media {
  overflow: hidden;
}

/* The text runs to the container's outer edge, as the mockups draw it —
   core pads it 8% on both sides. Stacked on a phone, it lines up with the
   photo above it. */
.wp-block-media-text > .wp-block-media-text__content {
  padding-right: 0;
}

.wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content {
  padding-right: 8%;
  padding-left: 0;
}

/* Stacked up to tablet width, where Columns stack too — core stacks only
   at 600px. !important outranks the column split, an inline style. */
@media (max-width: 781px) {
  .wp-block-media-text.is-stacked-on-mobile {
    grid-template-columns: 100% !important;
  }

  .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
    grid-column: 1;
    grid-row: 1;
  }

  .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
    grid-column: 1;
    grid-row: 2;
    padding: var(--wp--preset--spacing--70) 0 0;
  }
}

/* The mockups draw every line 1px; core's stylesheet gives the
   Separator a 2px top border that its theme styles fail to remove. */
.wp-block-separator {
  border-top-width: 1px;
}

/* --------- List styles: Arrows, Arrows in columns --------- */

/* A list of points, each a bold title, a line break and its text; in
   columns, the same points in a grid that reads across the rows. */
.wp-block-list:is(.is-style-arrows, .is-style-arrows-grid) {
  list-style: none;
  padding-left: 0;
}

:is(.is-style-arrows, .is-style-arrows-grid) > li {
  position: relative;
  margin-top: 0;
  padding-left: 33px;
  text-wrap: pretty;
}

.is-style-arrows > li + li {
  margin-top: var(--wp--preset--spacing--50);
}

:is(.is-style-arrows, .is-style-arrows-grid) > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 16px;
  height: 16px;
  background-color: var(--wp--preset--color--accent);
  mask: url(../img/arrow-list.svg) no-repeat center / contain;
  -webkit-mask: url(../img/arrow-list.svg) no-repeat center / contain;
}

/* In the editor the item's text sits in a .rich-text wrapper. */
:is(.is-style-arrows, .is-style-arrows-grid) > li > strong:first-child,
:is(.is-style-arrows, .is-style-arrows-grid) > li > .rich-text > strong:first-child {
  color: var(--wp--preset--color--primary);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 600;
}

/* A point that leads to a page looks like the others: the arrow already
   marks it, so no underline until the pointer is on it. */
:is(.is-style-arrows, .is-style-arrows-grid) > li > a {
  color: inherit;
  text-decoration: none;
}

:is(.is-style-arrows, .is-style-arrows-grid) > li > a:hover {
  text-decoration: underline;
}

.wp-block-list.is-style-arrows-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}

@media (min-width: 600px) {
  .wp-block-list.is-style-arrows-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .wp-block-list.is-style-arrows-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------- List style: Tiles --------- */

/* Links to other pages, each a navy tile with an arrow, two to a row. The
   whole tile is the link. */
.wp-block-list.is-style-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--wp--preset--spacing--30);
  padding-left: 0;
  list-style: none;
}

@media (max-width: 781px) {
  .wp-block-list.is-style-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
}

.is-style-tiles > li {
  margin-top: 0;
}

.wp-block-list.is-style-tiles > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--40);
  box-sizing: border-box;
  height: 100%;
  padding: var(--wp--preset--spacing--60);
  border-radius: 24px;
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.3;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.is-style-tiles > li > a::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background-color: var(--wp--preset--color--secondary);
  mask: url(../img/arrow-list.svg) no-repeat center / contain;
  -webkit-mask: url(../img/arrow-list.svg) no-repeat center / contain;
  transition: background-color 0.2s ease;
}

.wp-block-list.is-style-tiles > li > a:hover {
  background-color: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--primary);
}

.is-style-tiles > li > a:hover::after {
  background-color: var(--wp--preset--color--primary);
}

/* On a yellow section a yellow hover would make the tile vanish: it turns
   white there (UAE). */
.has-secondary-background-color .wp-block-list.is-style-tiles > li > a:hover {
  background-color: var(--wp--preset--color--base);
}

.is-style-tiles > li > a:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 2px;
}

/* --------- List style: Rows --------- */

/* Links to documents or pages, each an outlined row with an arrow, one under
   another. The whole row is the link. */
.wp-block-list.is-style-rows {
  display: grid;
  gap: var(--wp--preset--spacing--30);
  padding-left: 0;
  list-style: none;
}

.is-style-rows > li {
  margin-top: 0;
}

.wp-block-list.is-style-rows > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--40);
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
  border: 1px solid var(--wp--preset--color--outline);
  border-radius: 24px;
  color: inherit;
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.has-primary-background-color .wp-block-list.is-style-rows > li > a {
  border-color: var(--wp--preset--color--secondary);
}

.is-style-rows > li > a::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background-color: var(--wp--preset--color--secondary);
  mask: url(../img/arrow-list.svg) no-repeat center / contain;
  -webkit-mask: url(../img/arrow-list.svg) no-repeat center / contain;
  transition: background-color 0.2s ease;
}

.wp-block-list.is-style-rows > li > a:hover {
  border-color: var(--wp--preset--color--secondary);
  background-color: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--primary);
}

.is-style-rows > li > a:hover::after {
  background-color: var(--wp--preset--color--primary);
}

.is-style-rows > li > a:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary);
  outline-offset: 2px;
}

/* --------- Paragraph styles: Shield, Phone --------- */

/* An icon before the first line, in the text's own colour; a second line
   starts under the text, not under the icon. */
p:is(.is-style-shield, .is-style-phone) {
  position: relative;
  padding-left: calc(var(--para-icon) + 0.75em);
}

p:is(.is-style-shield, .is-style-phone)::before {
  content: "";
  position: absolute;
  top: calc(0.5lh - var(--para-icon) / 2);
  left: 0;
  width: var(--para-icon);
  height: var(--para-icon);
  background-color: currentColor;
  mask: var(--para-mask) no-repeat center / contain;
  -webkit-mask: var(--para-mask) no-repeat center / contain;
}

p.is-style-shield {
  --para-icon: 1.6em;
  --para-mask: url(../img/icons/shield.svg);
}

p.is-style-phone {
  --para-icon: 1.2em;
  --para-mask: url(../img/icons/phone.svg);
}

/* The number reads as text, not as a link; a linked one never breaks at its
   hyphens. */
p.is-style-phone a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

p.is-style-phone a:hover {
  text-decoration: underline;
}

/* --------- Table style: Lines --------- */

/* A comparison: rows divided by a line, no grid. The head row and the first
   column are the labels, picked out in colour — accent on a light
   background, yellow on navy. The caption is the footnote under it. */
.wp-block-table.is-style-lines table {
  border-collapse: collapse;
}

.wp-block-table.is-style-lines :is(th, td) {
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40) var(--wp--preset--spacing--30) 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--outline) 60%, transparent);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 300;
  text-align: left;
  vertical-align: top;
}

.wp-block-table.is-style-lines :is(th, td):last-child {
  padding-right: 0;
}

.wp-block-table.is-style-lines thead {
  border-bottom: 0;
}

.wp-block-table.is-style-lines thead :is(th, td) {
  border-bottom-color: var(--wp--preset--color--outline);
}

.wp-block-table.is-style-lines tbody tr:last-child td {
  border-bottom: 0;
}

.wp-block-table.is-style-lines :is(thead :is(th, td), tbody td:first-child) {
  color: var(--wp--preset--color--accent);
}

.has-primary-background-color .wp-block-table.is-style-lines :is(thead :is(th, td), tbody td:first-child) {
  color: var(--wp--preset--color--secondary);
}

.has-primary-background-color .wp-block-table.is-style-lines :is(th, td) {
  border-bottom-color: color-mix(in srgb, var(--wp--preset--color--secondary) 45%, transparent);
}

.has-primary-background-color .wp-block-table.is-style-lines thead :is(th, td) {
  border-bottom-color: var(--wp--preset--color--secondary);
}

.wp-block-table.is-style-lines .wp-element-caption {
  margin: var(--wp--preset--spacing--40) 0 0;
  font-size: var(--wp--preset--font-size--x-small);
  font-style: italic;
  line-height: 1.4;
  text-align: left;
}

/* Three columns have to fit a phone: smaller type, tighter cells. */
@media (max-width: 599px) {
  .wp-block-table.is-style-lines :is(th, td) {
    padding-right: var(--wp--preset--spacing--20);
    font-size: var(--wp--preset--font-size--x-small);
    hyphens: auto;
  }
}

/* --------- Paragraph style: Footnote --------- */

/* Lighter than the text around it, on any background, and still 4.5:1 on
   white. */
p.is-style-footnote {
  color: color-mix(in srgb, currentColor 75%, transparent);
  font-size: var(--wp--preset--font-size--x-small);
  font-style: italic;
  line-height: 1.4;
}

/* --------- Table style: Figures --------- */

/* Key figures: a large value, right-aligned so the values line up, and a
   short label beside it. No lines; sized to its content. */
.wp-block-table.is-style-figures table {
  width: auto;
  border-collapse: collapse;
}

.wp-block-table.is-style-figures td {
  padding: var(--wp--preset--spacing--30) 0;
  border: 0;
  vertical-align: middle;
}

/* A Column breaks words anywhere (core's word-break on .wp-block-column),
   which lets the table squeeze a label down to a few letters a line. */
.wp-block-table.is-style-figures td + td {
  word-break: normal;
  overflow-wrap: normal;
}

.wp-block-table.is-style-figures td:first-child {
  padding-right: var(--wp--preset--spacing--50);
  text-align: right;
  white-space: nowrap;
}

.wp-block-table:is(.is-style-figures, .is-style-figures-stacked) td:first-child {
  color: var(--wp--preset--color--primary);
  font-size: var(--wp--preset--font-size--huge);
  font-weight: 300;
  line-height: 1.25;
}

.wp-block-table:is(.is-style-figures, .is-style-figures-stacked) td + td {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.4;
}

/* On a phone the longest value would leave its label a word per line. */
@media (max-width: 599px) {
  .wp-block-table:is(.is-style-figures, .is-style-figures-stacked) td:first-child {
    font-size: var(--wp--preset--font-size--xl);
  }
}

/* --------- Table style: Figures stacked --------- */

/* The same key figures, each label under its value (Savings). */
.wp-block-table.is-style-figures-stacked :is(table, tbody, tr, td) {
  display: block;
}

.wp-block-table.is-style-figures-stacked td {
  padding: 0;
  border: 0;
}

.wp-block-table.is-style-figures-stacked tr + tr {
  margin-top: var(--wp--preset--spacing--50);
}

.wp-block-table.is-style-figures-stacked td + td {
  margin-top: var(--wp--preset--spacing--20);
}

@media (min-width: 600px) {
  .wp-block-table.is-style-figures-stacked td:first-child {
    font-size: var(--wp--preset--font-size--xxl);
  }
}

/* --------- Table style: Figure boxes --------- */

/* The same key figures, each row an outlined box. The row draws the box,
   not its two cells: cell borders meeting in the middle leave a seam at
   some widths. Subgrid keeps the labels lined up past the widest value
   (About Us). */
.wp-block-table.is-style-figure-boxes table {
  display: block;
  width: 100%;
  border-collapse: separate;
}

.wp-block-table.is-style-figure-boxes tbody {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 0;
}

.wp-block-table.is-style-figure-boxes tr {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  border: 1px solid var(--wp--preset--color--outline);
  border-radius: 40px;
}

.wp-block-table.is-style-figure-boxes td {
  padding: var(--wp--preset--spacing--50) 0;
  border: 0;
}

.wp-block-table.is-style-figure-boxes td:first-child {
  padding-left: var(--wp--preset--spacing--60);
  padding-right: var(--wp--preset--spacing--50);
  color: var(--wp--preset--color--primary);
  font-size: var(--wp--preset--font-size--huge);
  font-weight: 200;
  line-height: 1;
  white-space: nowrap;
}

.wp-block-table.is-style-figure-boxes td:last-child {
  padding-right: var(--wp--preset--spacing--60);
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: normal;
}

/* --------- Table style: Rates --------- */

/* A rates table (Our Rates): a line under the head row only. The first
   column takes the room left over, so the figures sit to the right at their
   own width. Cells never wrap: once the type has come down to 16px, a
   table too wide for its box scrolls inside it (core sets the overflow on
   the figure) rather than squeezing further. A shadow at an edge says there
   is more to scroll to: the white covers travel with the table and hide the
   shadow whenever its edge is in view. */
.wp-block-table.is-style-rates {
  background:
    linear-gradient(to right, var(--wp--preset--color--base) 40%, transparent) left / 32px 100% no-repeat local,
    linear-gradient(to left, var(--wp--preset--color--base) 40%, transparent) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(11 19 81 / 0.18), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(11 19 81 / 0.18), transparent) right / 12px 100% no-repeat scroll;
}

.wp-block-table.is-style-rates table {
  border-collapse: collapse;
}

.wp-block-table.is-style-rates :is(th, td) {
  padding: 14px 0 14px var(--wp--preset--spacing--70);
  border: 0;
  color: var(--wp--preset--color--primary);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  vertical-align: top;
}

/* !important: in the editor every cell is rich text, which writes
   white-space: pre-wrap into its style attribute. */
.wp-block-table.is-style-rates :is(th, td) {
  white-space: nowrap !important;
}

.wp-block-table.is-style-rates :is(th, td):first-child {
  width: 100%;
  padding-left: 0;
}

.wp-block-table.is-style-rates thead {
  border-bottom: 0;
}

.wp-block-table.is-style-rates th {
  padding-top: 0;
  padding-bottom: var(--wp--preset--spacing--50);
  border-bottom: 1px solid var(--wp--preset--color--secondary);
  font-weight: 500;
}

.wp-block-table.is-style-rates tbody tr:first-child td {
  padding-top: var(--wp--preset--spacing--50);
}

@media (max-width: 1023px) {
  .wp-block-table.is-style-rates :is(th, td) {
    padding-left: var(--wp--preset--spacing--50);
    font-size: var(--wp--preset--font-size--normal);
  }
}

/* On a phone the head may wrap, so a long label ("Annual Variable Interest
   Rate") does not alone push a two-column table into scrolling. */
@media (max-width: 599px) {
  .wp-block-table.is-style-rates :is(th, td) {
    padding-left: var(--wp--preset--spacing--40);
    font-size: var(--wp--preset--font-size--small);
  }

  .wp-block-table.is-style-rates :is(th, td):first-child {
    width: auto;
  }

  .wp-block-table.is-style-rates th {
    white-space: normal !important;
  }
}

/* --------- Accordion style: Stacked --------- */

/* Items tuck under the one above: each overlaps the previous one's rounded
   bottom, so items stay see-through or they would hide that curve. The
   background goes on the whole accordion instead, so a ribbon behind it
   never shows through the text. */
.wp-block-accordion.is-style-stacked {
  border-radius: 24px;
  background-color: var(--wp--preset--color--primary);
}

.is-style-stacked > .wp-block-accordion-item {
  position: relative;
  margin: 0;
  padding: 0 40px;
  border: 1px solid var(--wp--preset--color--heading);
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.is-style-stacked > .wp-block-accordion-item:first-child {
  border-top: 1px solid var(--wp--preset--color--heading);
  border-radius: 24px;
}

/* On a navy section the navy accordion has no edge of its own: yellow lines
   draw it. On any other ground the panel shows, and the lines stay quiet. */
.has-primary-background-color .is-style-stacked > .wp-block-accordion-item {
  border-color: var(--wp--preset--color--secondary);
}

.is-style-stacked > .wp-block-accordion-item + .wp-block-accordion-item {
  margin-top: -24px;
  padding-top: 24px;
}

.is-style-stacked .wp-block-accordion-heading {
  margin: 0;
  color: inherit;
  font-size: var(--wp--preset--font-size--large);
  font-weight: 400;
}

.is-style-stacked .wp-block-accordion-heading__toggle {
  gap: 24px;
  padding: 24px 0;
  transition: color 0.2s ease;
}

.is-style-stacked .wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
  text-decoration: none;
}

.is-style-stacked .wp-block-accordion-heading__toggle:hover,
.is-style-stacked .is-open .wp-block-accordion-heading__toggle {
  color: var(--wp--preset--color--secondary);
}

/* The arrow replaces core's "+": pointing right while closed, up and under
   the text while open. */
.is-style-stacked .wp-block-accordion-heading__toggle-icon {
  width: 16px;
  height: 16px;
  font-size: 0;
  background-color: var(--wp--preset--color--secondary);
  mask: url(../img/arrow-list.svg) no-repeat center / contain;
  -webkit-mask: url(../img/arrow-list.svg) no-repeat center / contain;
}

/* As specific as core's rule that turns its "+" by 45deg. */
.is-style-stacked > .wp-block-accordion-item.is-open > .wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
  transform: rotate(-90deg);
}

/* Not in the editor: there every block's wrapper is positioned, so the arrow
   would land on the title. */
.is-style-stacked > .wp-block-accordion-item.is-open > .wp-block-accordion-heading:not(.block-editor-block-list__block) .wp-block-accordion-heading__toggle-icon {
  position: absolute;
  bottom: 32px;
  left: 40px;
}

.is-style-stacked .wp-block-accordion-panel {
  margin: 0;
  padding-bottom: 72px;
  font-size: var(--wp--preset--font-size--small);
}

.is-style-stacked .wp-block-accordion-panel > * {
  margin: 0;
}

.is-style-stacked .wp-block-accordion-panel > * + * {
  margin-top: 0.75rem;
}

@media (max-width: 599px) {
  .is-style-stacked > .wp-block-accordion-item {
    padding-left: 24px;
    padding-right: 24px;
  }

  .is-style-stacked > .wp-block-accordion-item.is-open > .wp-block-accordion-heading:not(.block-editor-block-list__block) .wp-block-accordion-heading__toggle-icon {
    left: 24px;
  }
}

/* --------- Filter pills --------- */

/* The Insights archive's category links, the FAQ block's topic buttons and
   the buttons of core Tabs (Our Rates). Here rather than in components.css
   because the FAQ block and Tabs draw them in the editor too, and this is
   the one file the editor loads. */
.filter-pill,
.wp-block-tab-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 140px;
  min-height: 56px;
  margin: 0;
  padding: 8px 32px;
  border: 1px solid var(--wp--preset--color--outline);
  border-radius: 999px;
  background-color: transparent;
  font-family: inherit;
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 500;
  line-height: 1.2;
  color: var(--wp--preset--color--primary);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.filter-pill:hover,
.filter-pill[aria-current="page"],
.filter-pill[aria-pressed="true"],
.wp-block-tab-list button:hover,
.wp-block-tab-list button[aria-selected="true"] {
  border-color: var(--wp--preset--color--primary);
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

/* Tab labels are longer than the FAQ topics: the buttons wrap onto a new
   row, a label never onto a second line. Core marks the selected tab with
   a line under it; the fill does that here. */
.wp-block-tab-list button {
  white-space: nowrap;
}

.wp-block-tab-list button::before {
  display: none;
}

@media (max-width: 767px) {
  .filter-pill,
  .wp-block-tab-list button {
    min-width: 0;
    min-height: 44px;
    padding: 6px 20px;
    font-size: var(--wp--preset--font-size--small);
  }
}

/* Small enough for two tabs to a row down to 360. */
@media (max-width: 479px) {
  .wp-block-tab-list button {
    padding-inline: 10px;
    font-size: 13px;
  }
}

/* --------- Section with a ribbon (patterns/accordion-ribbon.php) --------- */

/* The ribbon is an Image block the section's classes place, as in the hero:
   anchored to a corner of the section (its own rule says which), sized to
   the viewport, drifting after the pointer (blocks/hero/view.js). */
.has-ribbon {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.wp-block-image.section-ribbon {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  max-width: none;
  margin: 0;
  pointer-events: none;
  user-select: none;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section-ribbon img {
  display: block;
  width: 100%;
  height: auto;
}

.has-ribbon > .section-ribbon + * {
  margin-block-start: 0;
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-image.section-ribbon {
    transition: none;
  }
}

/* Per ribbon: its width, and how far past the corner it hangs — the
   source's straight edge has to stay outside as the ribbon drifts. */
.wp-block-image.section-ribbon--business {
  width: 45.9vw;
  right: -2.5vw;
  bottom: -2.5vw;
}

.wp-block-image.section-ribbon--governance {
  width: 30.97vw;
  right: -2.78vw;
  bottom: -2.78vw;
}

.wp-block-image.section-ribbon--careers {
  width: 46.26vw;
  right: -2.5vw;
  bottom: -2.5vw;
}

@media (max-width: 599px) {
  .wp-block-image.section-ribbon--careers {
    width: 90vw;
    right: -16px;
    bottom: -16px;
  }
}

/* Hung from the top, so its folds keep their place beside the heading
   whatever the section's height. */
.wp-block-image.section-ribbon--about {
  width: 121.25vw;
  top: -9.8vw;
  right: -32.08vw;
  bottom: auto;
}

@media (max-width: 781px) {
  .wp-block-image.section-ribbon--about {
    width: 200vw;
    top: auto;
    right: -95vw;
    bottom: -27vw;
  }
}

.wp-block-image.section-ribbon--credentials {
  width: 128.53vw;
  right: -100.23vw;
  bottom: -61.34vw;
}

/* Cut along its bottom, so it stays in the bottom corner: on a phone the
   section is tall and a ribbon placed higher shows the cut. */
@media (max-width: 781px) {
  .wp-block-image.section-ribbon--credentials {
    width: 257.06vw;
    right: -200.46vw;
    bottom: -122.68vw;
  }
}

.wp-block-image.section-ribbon--corporate {
  top: -2.5vw;
  right: -2.5vw;
  bottom: auto;
  width: 28.37vw;
}

.wp-block-image.section-ribbon--custody {
  top: -2.475vw;
  right: -2.474vw;
  bottom: auto;
  width: 58.23vw;
}

.wp-block-image.section-ribbon--deposits-rates {
  top: 1.6vw;
  right: -2.5vw;
  bottom: auto;
  width: 26.98vw;
}

.wp-block-image.section-ribbon--deposits-table {
  top: 5.97vw;
  right: -2.5vw;
  bottom: auto;
  width: 21.98vw;
}

.wp-block-image.section-ribbon--fintech {
  right: -2.5vw;
  bottom: -2.5vw;
  width: 35.21vw;
}

/* The FinTech hero's ribbon, cut along its top, right and bottom. Below 1280
   the section stops shrinking with the screen: a fixed size keeps the image
   taller than it, its folds in the right part. */
.wp-block-image.section-ribbon--vas {
  top: -43.89vw;
  right: -51.46vw;
  bottom: auto;
  width: 105.9vw;
}

@media (max-width: 1279px) {
  .wp-block-image.section-ribbon--vas {
    top: -50px;
    right: calc(35vw - 700px);
    width: 700px;
  }
}

/* The cards stack: the section is twice as tall. */
@media (max-width: 781px) {
  .wp-block-image.section-ribbon--vas {
    top: -40px;
    right: calc(75vw - 1150px);
    width: 1150px;
  }
}

.wp-block-image.section-ribbon--international {
  top: -2.5vw;
  right: -2.5vw;
  bottom: auto;
  width: 63.65vw;
}

.wp-block-image.section-ribbon--payments {
  top: -2.5vw;
  right: -2.5vw;
  bottom: auto;
  width: 48.75vw;
}

/* On a phone only a piece shows, in the top-right corner. Flipped upside
   down, so the edges the image was cut along face up and right, out of the
   section. */
@media (max-width: 767px) {
  .wp-block-image.section-ribbon--business {
    top: 0;
    bottom: auto;
    width: 110vw;
    scale: 1 -1;
    translate: 45% -62%;
  }
}

/* Below 1024 the heading runs into them: pushed further up and right, the
   way their cut edges already face, only a tip shows beside the title. */
@media (max-width: 1023px) {
  .wp-block-image.section-ribbon--payments {
    width: 60vw;
    translate: 40% -50%;
  }

  .wp-block-image.section-ribbon--custody {
    width: 60vw;
    translate: 20% -30%;
  }
}

/* Below 1200 the section outgrows the image, and its cut bottom edge would
   show: drawn larger, it reaches past the bottom again. */
@media (max-width: 1199px) {
  .wp-block-image.section-ribbon--custody {
    width: 62vw;
  }
}

/* Once the cards stack, the corner is the section's only free space: the
   ribbon grows into it, still cut past both edges. */
@media (max-width: 781px) {
  .wp-block-image.section-ribbon--fintech {
    right: -16px;
    bottom: -16px;
    width: 55vw;
  }
}

@media (max-width: 599px) {
  .wp-block-image.section-ribbon--fintech {
    width: 80vw;
  }
}

/* Beside the comparison table the ribbon runs down into the table's right
   column; narrower, the columns take that room, so the ribbon moves up into
   the corner beside the heading. */
@media (max-width: 1199px) {
  .wp-block-image.section-ribbon--deposits-table {
    top: 0;
    width: 18vw;
    translate: 30% -35%;
  }
}

@media (max-width: 599px) {
  .wp-block-image.section-ribbon--deposits-table {
    width: 30vw;
    translate: 45% -60%;
  }
}

/* The source's cut lower edge runs across the bottom right of this one. As
   the section grows taller for its width it comes into view: a little larger
   first, then, once the columns stack, flipped upside down so the edge faces
   up and out, in the corner beside the heading. */
@media (max-width: 899px) {
  .wp-block-image.section-ribbon--deposits-rates {
    width: 31vw;
  }
}

@media (max-width: 781px) {
  .wp-block-image.section-ribbon--deposits-rates {
    top: 0;
    width: 35vw;
    scale: 1 -1;
    translate: 20% -35%;
  }
}

@media (max-width: 599px) {
  .wp-block-image.section-ribbon--deposits-rates {
    width: 50vw;
    translate: 25% -40%;
  }
}

/* The source was cut along its lower side, and that edge runs diagonally
   across the image. Below 1440 the section is taller for its width: the
   ribbon stops shrinking first, and from 1280 it is flipped upside down, so
   the edge faces up, out past the top. */
@media (max-width: 1439px) {
  .wp-block-image.section-ribbon--international {
    width: 916px;
  }
}

@media (max-width: 1279px) {
  .wp-block-image.section-ribbon--international {
    width: 70vw;
    scale: 1 -1;
    translate: 20% -25%;
  }
}

@media (max-width: 1023px) {
  .wp-block-image.section-ribbon--international {
    translate: 25% -25%;
  }
}

@media (max-width: 767px) {
  .wp-block-image.section-ribbon--international {
    width: 75vw;
    translate: 45% -50%;
  }
}

@media (max-width: 599px) {
  .wp-block-image.section-ribbon--international {
    width: 90vw;
    translate: 40% -50%;
  }
}

@media (max-width: 767px) {
  .wp-block-image.section-ribbon--payments {
    width: 80vw;
  }

  .wp-block-image.section-ribbon--custody {
    width: 80vw;
    translate: 30% -40%;
  }
}

/* Text links are primary (theme.json); on a primary background they would
   vanish, so there they take the brand yellow. */
.has-primary-background-color a:where(:not(.wp-element-button)) {
  color: var(--wp--preset--color--secondary);
}
