/*
 * Blog, archives, search, 404 and legal pages.
 *
 * There is no prototype for these; they are drawn in the round-3 system
 * (docs/prototypes/redesign-3/site.css): the near-black page, surfaces one step
 * lighter than what holds them, hairlines rather than boxes, Google Sans Flex.
 *
 * Every rule is scoped to a class that only the templates in templates/{index,
 * archive,category,search,single,404,page-legal}.html and parts/blog-list.html
 * print, so this file cannot touch any other page. Selectors carry the template
 * root as well (.vc-blog …, .vc-article …): core prints its layout and element
 * rules as `:root :where(…)`, one class of specificity, and a bare single-class
 * rule would lose to them on order alone.
 *
 * Tokens only. One-off shades are color-mix()ed from a token; the two custom
 * properties defined here are component-local and live on the component.
 */

/* ---------------------------------------------------------------------------
   Shared: the column, the opener and its label
   --------------------------------------------------------------------------- */

/* The prototype's .wrap, as .vc-wrap and inner-hero use it. */
.vc-blog .vc-blog__head,
.vc-blog .vc-postlist-wrap,
.vc-system .vc-system__inner {
  width: min(var(--vc-wide), 100% - 2 * var(--vc-gutter));
  margin-inline: auto;
}

/* The prototype's .ihero: crumbs, then a very large, short title with the lede
   beside it on the title's baseline. Same padding as blocks/inner-hero. */
.vc-blog .vc-blog__head {
  margin-block: 0;
  padding-block: clamp(
      var(--vc-space-2xl),
      9vh,
      var(--vc-space-3xl) + var(--vc-space-sm)
    )
    var(--vc-space-2xl);
}

.vc-blog .vc-blog__head > *,
.vc-blog .vc-blog__title > *,
.vc-blog .vc-blog__title > .wp-block-group > * {
  margin-block: 0;
}

.vc-blog .vc-blog__head > .vc-breadcrumbs {
  margin-block-end: 1.75rem;
}

.vc-blog .vc-blog__title {
  display: grid;
  gap: var(--vc-space-md) var(--vc-space-2xl);
  align-items: end;
}

@media (min-width: 60rem) {
  .vc-blog .vc-blog__title {
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  }
}

/* Quiet, sentence case -- a label, not a tracked all-caps kicker. Matches
   inner-hero's eyebrow. Also used on the 404. */
.vc-blog .vc-blog__label,
.vc-system .vc-blog__label {
  margin: 0 0 var(--vc-space-sm);
  font-size: var(--vc-text-md);
  font-weight: var(--vc-weight-medium);
  color: var(--vc-fg-2);
}

.vc-blog .vc-blog__h1 {
  margin: 0;
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-hero);
  font-weight: var(--vc-weight-display);
  line-height: var(--vc-leading-hero);
  letter-spacing: var(--vc-tracking-hero);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* A term name or a search phrase is longer than "Blog" and nobody chose it for
   its length: one size down, so it cannot run off a phone. */
.vc-blog .vc-blog__label + .vc-blog__h1 {
  font-size: var(--vc-text-display);
  line-height: var(--vc-leading-display);
  letter-spacing: var(--vc-tracking-tighter);
}

.vc-blog--search .vc-blog__label + .vc-blog__h1 {
  font-size: var(--vc-text-title);
  line-height: var(--vc-leading-title);
  letter-spacing: var(--vc-tracking-title);
  overflow-wrap: anywhere;
}

.vc-blog .vc-blog__lede {
  max-width: 52ch;
  font-size: var(--vc-text-lg);
  line-height: var(--vc-leading-normal);
  color: var(--vc-fg-2);
  text-wrap: pretty;
}

.vc-blog .vc-blog__lede p {
  margin: 0;
}

/* ---------------------------------------------------------------------------
   The post list (parts/blog-list.html)
   ---------------------------------------------------------------------------

   One row per post on the page ground, divided by hairlines like the
   prototype's FAQ: date | title and excerpt | image. Rows rather than cards,
   because a reader scans titles down a list; the image is supporting.
   --------------------------------------------------------------------------- */

.vc-blog .vc-postlist-wrap {
  margin-block: 0;
  padding-block-end: var(--vc-section);
}

.vc-blog .vc-postlist {
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-end: 1px solid var(--vc-line);
}

.vc-blog .vc-postlist > li {
  position: relative;
  display: grid;
  /* The media column is 18.75rem (300px): the "medium" image file's width, so a
     1x screen takes that file. inc/render-filters.php writes the matching
     `sizes` -- change the two together. */
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) minmax(0, 18.75rem);
  grid-template-areas: "date text media";
  gap: var(--vc-space-xs) var(--vc-space-2xl);
  align-items: start;
  margin: 0;
  padding-block: var(--vc-space-lg);
  border-block-start: 1px solid var(--vc-line);
}

/* One post has no featured image: its text takes the image's column too. */
.vc-blog .vc-postlist > li:not(:has(.vc-postlist__media)) {
  grid-template-areas: "date text text";
}

.vc-blog .vc-postlist > li > * {
  margin: 0;
}

.vc-blog .vc-postlist__date {
  grid-area: date;
  /* Sits on the title's first line rather than above its cap height. */
  padding-block-start: 0.375rem;
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-3);
}

/* A page in search results has a publish date that means nothing to a reader. */
.vc-blog .vc-postlist > li.type-page .vc-postlist__date {
  visibility: hidden;
}

.vc-blog .vc-postlist__text {
  grid-area: text;
}

.vc-blog .vc-postlist__text > * {
  margin-block: 0;
}

.vc-blog .vc-postlist__title {
  max-width: 34ch;
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-2xl);
  font-weight: var(--vc-weight-display);
  line-height: var(--vc-leading-snug);
  letter-spacing: var(--vc-tracking-tight);
  text-wrap: balance;
}

.vc-blog .vc-postlist__title a {
  color: var(--vc-fg);
  text-decoration: none;
  transition: color var(--vc-fast) var(--vc-ease);
}

/* The title's link covers the row, so the whole row is the target with a
   single tab stop. Above the image, which is positioned for its ring. */
.vc-blog .vc-postlist__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.vc-blog .vc-postlist > li:hover .vc-postlist__title a,
.vc-blog .vc-postlist__title a:hover,
.vc-blog .vc-postlist__title a:focus-visible {
  color: var(--vc-link-hover);
  text-decoration: none;
}

/* The focus ring goes round the row the link now stands for. Only where :has()
   exists -- elsewhere the link keeps its own ring, which is still visible. */
@supports selector(:has(*)) {
  .vc-blog .vc-postlist__title a:focus-visible {
    outline: none;
  }

  .vc-blog .vc-postlist > li:has(.vc-postlist__title a:focus-visible) {
    outline: 2px solid var(--vc-link);
    outline-offset: 4px;
    border-radius: var(--vc-radius-md);
  }
}

.vc-blog .vc-postlist__excerpt {
  margin-block-start: var(--vc-space-xs);
  max-width: 60ch;
  font-size: var(--vc-text-base);
  line-height: var(--vc-leading-normal);
  color: var(--vc-fg-2);
}

.vc-blog .vc-postlist__excerpt p {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.vc-blog .vc-postlist__media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  border-radius: var(--vc-radius-card);
  background: var(--vc-surface-1);
}

/* The ring sits over the photo -- an inset shadow on the figure would be
   painted underneath it. */
.vc-blog .vc-postlist__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--vc-line);
  pointer-events: none;
}

.vc-blog .vc-postlist__media img {
  display: block;
  transition: transform var(--vc-slow) var(--vc-ease);
}

.vc-blog .vc-postlist > li:hover .vc-postlist__media img {
  transform: scale(1.03);
}

.vc-blog .vc-postlist__empty {
  margin: 0;
  padding-block: var(--vc-space-xl);
  border-block-start: 1px solid var(--vc-line);
  font-size: var(--vc-text-lg);
  color: var(--vc-fg-2);
}

.vc-blog .vc-postlist__empty a {
  color: var(--vc-link);
}

.vc-blog .vc-postlist__empty a:hover {
  color: var(--vc-link-hover);
}

@media (max-width: 60rem) {
  .vc-blog .vc-postlist > li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 14rem);
    grid-template-areas:
      "date media"
      "text media";
    gap: var(--vc-space-2xs) var(--vc-space-lg);
  }

  .vc-blog .vc-postlist > li:not(:has(.vc-postlist__media)) {
    grid-template-areas:
      "date date"
      "text text";
  }

  .vc-blog .vc-postlist__date {
    padding-block-start: 0;
  }
}

@media (max-width: 35rem) {
  .vc-blog .vc-postlist > li,
  .vc-blog .vc-postlist > li:not(:has(.vc-postlist__media)) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "media"
      "date"
      "text";
    padding-block: var(--vc-space-md);
  }

  .vc-blog .vc-postlist__media {
    margin-block-end: var(--vc-space-xs);
  }

  .vc-blog .vc-postlist__title {
    font-size: var(--vc-text-xl);
  }
}

/* ---------------------------------------------------------------------------
   Pagination
   ---------------------------------------------------------------------------

   Core labels the <nav> "Pagination". Previous and next keep fixed columns, so
   the numbers stay centred on the first and last page, where one of the two
   is not rendered at all.
   --------------------------------------------------------------------------- */

.vc-blog .vc-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--vc-space-sm);
  margin-block: var(--vc-space-xl) 0;
}

.vc-blog .vc-pagination > * {
  margin: 0;
}

.vc-blog .vc-pagination .wp-block-query-pagination-previous {
  grid-column: 1;
  justify-self: start;
}

.vc-blog .vc-pagination .wp-block-query-pagination-numbers {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--vc-space-3xs);
}

.vc-blog .vc-pagination .wp-block-query-pagination-next {
  grid-column: 3;
  justify-self: end;
}

/* Previous / next: the ghost button. */
.vc-blog
  .vc-pagination
  :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
  display: inline-flex;
  align-items: center;
  gap: var(--vc-space-2xs);
  min-block-size: 2.75rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--vc-radius-full);
  box-shadow: inset 0 0 0 1px var(--vc-edge);
  color: var(--vc-fg);
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-semibold);
  text-decoration: none;
  transition: box-shadow var(--vc-fast) var(--vc-ease);
}

.vc-blog
  .vc-pagination
  :is(
    .wp-block-query-pagination-previous,
    .wp-block-query-pagination-next
  ):hover {
  box-shadow: inset 0 0 0 1px var(--vc-edge-hover);
  color: var(--vc-fg);
  text-decoration: none;
}

.vc-blog .vc-pagination .is-arrow-arrow {
  margin: 0;
  color: var(--vc-fg-2);
}

.vc-blog .vc-pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  padding-inline: var(--vc-space-2xs);
  border-radius: var(--vc-radius-full);
  color: var(--vc-fg-2);
  font-size: var(--vc-text-sm);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition:
    background-color var(--vc-fast) var(--vc-ease),
    color var(--vc-fast) var(--vc-ease);
}

.vc-blog .vc-pagination a.page-numbers:hover {
  background: var(--vc-surface-1);
  color: var(--vc-fg);
  text-decoration: none;
}

.vc-blog .vc-pagination .page-numbers.current {
  background: var(--vc-surface-2);
  box-shadow: inset 0 0 0 1px var(--vc-line-2);
  color: var(--vc-fg);
  font-weight: var(--vc-weight-semibold);
}

.vc-blog .vc-pagination .page-numbers.dots {
  min-inline-size: auto;
}

/* On a phone the numbers get their own row; previous and next sit under it. */
@media (max-width: 35rem) {
  .vc-blog .vc-pagination {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: var(--vc-space-sm);
  }

  .vc-blog .vc-pagination .wp-block-query-pagination-numbers {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .vc-blog .vc-pagination .wp-block-query-pagination-previous {
    grid-column: 1;
    grid-row: 2;
  }

  .vc-blog .vc-pagination .wp-block-query-pagination-next {
    grid-column: 2;
    grid-row: 2;
  }
}

/* ---------------------------------------------------------------------------
   Search field (search and 404)
   --------------------------------------------------------------------------- */

:is(.vc-blog, .vc-system) .vc-searchform {
  max-width: 36rem;
  margin: 0;
}

:is(.vc-blog, .vc-system) .vc-searchform .wp-block-search__inside-wrapper {
  padding: 0.3125rem;
  border: 1px solid var(--vc-control);
  border-radius: var(--vc-radius-full);
  background: var(--vc-surface-1);
  transition: border-color var(--vc-fast) var(--vc-ease);
}

:is(.vc-blog, .vc-system)
  .vc-searchform
  .wp-block-search__inside-wrapper:focus-within {
  border-color: var(--vc-link);
  outline: 2px solid var(--vc-link);
  outline-offset: 2px;
}

:is(.vc-blog, .vc-system) .vc-searchform .wp-block-search__input {
  min-inline-size: 0;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  border: 0;
  background: transparent;
  color: var(--vc-fg);
  font-size: var(--vc-text-base);
}

/* The wrapper carries the ring; one inside the pill would be drawn twice. */
:is(.vc-blog, .vc-system) .vc-searchform .wp-block-search__input:focus-visible {
  outline: none;
}

:is(.vc-blog, .vc-system) .vc-searchform .wp-block-search__input::placeholder {
  color: var(--vc-fg-3);
  opacity: 1;
}

:is(.vc-blog, .vc-system) .vc-searchform .wp-block-search__button {
  margin: 0;
  padding: 0.625rem 1.125rem;
  border: 0;
  border-radius: var(--vc-radius-full);
  background: var(--vc-gradient-brand);
  box-shadow: var(--vc-shadow-brand);
  color: var(--vc-primary-fg);
  font-family: var(--vc-font-body);
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-semibold);
  line-height: 1.2;
  cursor: pointer;
}

:is(.vc-blog, .vc-system) .vc-searchform .wp-block-search__button:hover {
  filter: brightness(1.08) saturate(1.04);
}

/* ---------------------------------------------------------------------------
   A post (templates/single.html)
   ---------------------------------------------------------------------------

   One centred reading column. 38rem at the 18px body size measures 75
   characters a line in Google Sans Flex (40rem was 79 -- too close to the 80
   ceiling); the featured image and wide blocks go out to 60rem. The column
   width is also post-content's contentSize in templates/single.html -- change
   both together.
   --------------------------------------------------------------------------- */

.vc-article {
  --vc-article-measure: 38rem;
  --vc-article-wide: 60rem;
  /* Body copy one step down from --vc-fg: full white on near-black glares
     across a long read. 11.8:1 on the page. */
  --vc-article-text: color-mix(in srgb, var(--vc-fg) 82%, var(--vc-page));
}

.vc-article .vc-article__main > *,
.vc-article .vc-article__head > * {
  margin-block: 0;
}

.vc-article .vc-article__head {
  width: min(var(--vc-article-measure), 100% - 2 * var(--vc-gutter));
  margin-inline: auto;
  padding-block: clamp(var(--vc-space-xl), 8vh, var(--vc-space-3xl))
    var(--vc-space-xl);
}

.vc-article .vc-article__head > .vc-breadcrumbs {
  margin-block-end: 1.75rem;
}

.vc-article .vc-article__title {
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-4xl);
  font-weight: var(--vc-weight-display);
  line-height: var(--vc-leading-title);
  letter-spacing: var(--vc-tracking-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}

.vc-article .vc-article__head .vc-article__date {
  margin-block-start: var(--vc-space-md);
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-3);
}

.vc-article .vc-article__media {
  position: relative;
  width: min(var(--vc-article-wide), 100% - 2 * var(--vc-gutter));
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--vc-radius-lg);
  background: var(--vc-surface-1);
}

.vc-article .vc-article__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--vc-line);
  pointer-events: none;
}

.vc-article .vc-article__media img {
  display: block;
}

/* --- The body -------------------------------------------------------------- */

.vc-article .vc-article__body {
  margin-block: var(--vc-space-xl) 0;
  padding-block-end: var(--vc-space-2xl);
  color: var(--vc-article-text);
  font-size: var(--vc-text-lg);
  line-height: var(--vc-leading-relaxed);
}

/* No featured image: the header's own bottom padding is the whole gap. */
.vc-article .vc-article__head + .vc-article__body {
  margin-block-start: 0;
}

.vc-article .vc-article__body > * {
  margin-block: 0;
}

.vc-article .vc-article__body > * + * {
  margin-block-start: 1.25em;
}

.vc-article .vc-article__body :is(h2, h3, h4, h5, h6) {
  color: var(--vc-fg);
  font-family: var(--vc-font-display);
  text-wrap: balance;
}

.vc-article .vc-article__body > :is(h2, h3, h4, h5, h6) {
  margin-block-start: 2.25em;
}

.vc-article .vc-article__body > :is(h2, h3, h4, h5, h6) + * {
  margin-block-start: 0.75em;
}

.vc-article .vc-article__body h2 {
  font-size: var(--vc-text-2xl);
  font-weight: var(--vc-weight-display);
  line-height: var(--vc-leading-snug);
  letter-spacing: var(--vc-tracking-tight);
}

.vc-article .vc-article__body h3 {
  font-size: var(--vc-text-xl);
  font-weight: var(--vc-weight-semibold);
  line-height: var(--vc-leading-card);
  letter-spacing: var(--vc-tracking-snug);
}

.vc-article .vc-article__body :is(h4, h5, h6) {
  font-size: var(--vc-text-md);
  font-weight: var(--vc-weight-semibold);
  line-height: var(--vc-leading-card);
  letter-spacing: 0;
}

.vc-article .vc-article__body :is(strong, b) {
  color: var(--vc-fg);
  font-weight: var(--vc-weight-semibold);
}

.vc-article .vc-article__body a:not(.wp-element-button) {
  color: var(--vc-link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--vc-link) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition:
    color var(--vc-fast) var(--vc-ease),
    text-decoration-color var(--vc-fast) var(--vc-ease);
}

.vc-article .vc-article__body a:not(.wp-element-button):hover {
  color: var(--vc-link-hover);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

/* <a><strong>…</strong></a>: the bold rule above would paint the link text
   white and leave only its underline blue. */
.vc-article .vc-article__body a :is(strong, b, em, i) {
  color: inherit;
}

/* Lists */

.vc-article .vc-article__body :is(ul, ol) {
  padding-inline-start: 1.375em;
}

.vc-article .vc-article__body li + li,
.vc-article .vc-article__body li > :is(ul, ol) {
  margin-block-start: 0.5em;
}

.vc-article .vc-article__body ul > li::marker {
  color: var(--vc-fg-3);
}

.vc-article .vc-article__body ol > li::marker {
  color: var(--vc-fg-2);
  font-variant-numeric: tabular-nums;
}

/* Images and captions */

.vc-article
  .vc-article__body
  > :is(.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-video) {
  margin-block: 2em;
}

.vc-article .vc-article__body .wp-block-image img {
  height: auto;
  border-radius: var(--vc-radius-card);
}

.vc-article .vc-article__body :is(figcaption, .wp-element-caption) {
  margin-block: var(--vc-space-xs) 0;
  font-size: var(--vc-text-sm);
  line-height: var(--vc-leading-normal);
  color: var(--vc-fg-3);
}

/* Tables: a surface one step up from the page, scrolling inside itself when it
   is wider than the column rather than pushing the page sideways.

   Core's fixed layout gave every column an equal share, and break-word then
   split a word that did not fit ("performanc / e" at 390). Auto layout sizes
   each column to at least its longest word, so a table too wide for a phone
   scrolls inside the figure instead. inc/render-filters.php makes the figure
   focusable and names it, so the keyboard can scroll it too. */

.vc-article .vc-article__body .wp-block-table {
  margin-block: 2em;
  overflow-x: auto;
  border: 1px solid var(--vc-line);
  border-radius: var(--vc-radius-card);
  background: var(--vc-surface-1);
}

.vc-article .vc-article__body .wp-block-table table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: var(--vc-text-sm);
  line-height: var(--vc-leading-normal);
}

.vc-article .vc-article__body .wp-block-table :is(thead, tfoot) {
  border: 0;
}

.vc-article .vc-article__body .wp-block-table :is(th, td) {
  padding: 0.75rem 1rem;
  border: 0;
  border-block-end: 1px solid var(--vc-line);
  text-align: start;
  vertical-align: top;
  /* Core gives fixed-layout cells `word-break: break-word`, which splits a
     word just as overflow-wrap did; both go back to normal. */
  overflow-wrap: normal;
  word-break: normal;
}

/* The focus ring sits inside the rounded scroll box rather than outside it. */
.vc-article .vc-article__body .wp-block-table:focus-visible {
  outline-offset: 2px;
}

.vc-article .vc-article__body .wp-block-table th {
  background: var(--vc-surface-2);
  color: var(--vc-fg);
  font-weight: var(--vc-weight-semibold);
}

.vc-article .vc-article__body .wp-block-table tbody tr:last-child > * {
  border-block-end: 0;
}

/* The first cell of a row names it. */
.vc-article .vc-article__body .wp-block-table tbody td:first-child {
  color: var(--vc-fg);
}

.vc-article .vc-article__body .wp-block-table figcaption {
  margin: 0;
  padding: 0.75rem 1rem;
  border-block-start: 1px solid var(--vc-line);
}

/* Quotes: no italic -- Google Sans Flex has no italic, and a synthesised one
   is a slanted roman. The rule in the brand gradient carries it instead. */

.vc-article .vc-article__body .wp-block-quote {
  margin-block: 2em;
  margin-inline: 0;
  padding: 0.125em 0 0.125em 1.5rem;
  border: 0;
  border-inline-start: 2px solid var(--vc-link);
  border-image: var(--vc-gradient-brand-vertical) 1;
  color: var(--vc-fg);
  font-size: var(--vc-text-xl);
  font-style: normal;
  line-height: var(--vc-leading-normal);
}

.vc-article .vc-article__body .wp-block-quote > * {
  margin-block: 0;
}

.vc-article .vc-article__body .wp-block-quote > * + * {
  margin-block-start: 0.75em;
}

.vc-article .vc-article__body .wp-block-quote cite {
  display: block;
  margin-block-start: var(--vc-space-xs);
  color: var(--vc-fg-3);
  font-size: var(--vc-text-sm);
  font-style: normal;
}

.vc-article .vc-article__body .wp-block-pullquote {
  margin-block: 2.5em;
  padding: var(--vc-space-lg) 0;
  border-block: 1px solid var(--vc-line-2);
  color: var(--vc-fg);
  font-size: var(--vc-text-2xl);
  line-height: var(--vc-leading-snug);
}

.vc-article .vc-article__body .wp-block-pullquote blockquote {
  margin: 0;
}

/* Separators */

.vc-article .vc-article__body > .wp-block-separator {
  margin-block: 3em;
}

.vc-article .vc-article__body .wp-block-separator:not(.is-style-dots) {
  width: 100%;
  border: 0;
  border-block-start: 1px solid var(--vc-line-2);
  opacity: 1;
}

/* Code */

.vc-article .vc-article__body :not(pre) > code {
  padding: 0.125em 0.375em;
  border-radius: var(--vc-radius-sm);
  background: var(--vc-surface-2);
  color: var(--vc-fg);
  font-size: 0.875em;
}

.vc-article .vc-article__body pre {
  overflow-x: auto;
  padding: var(--vc-space-sm) var(--vc-space-md);
  font-size: var(--vc-text-sm);
  line-height: var(--vc-leading-normal);
}

/* The file block -- a download card: icon, file name, button. One post is
   nothing but this (the A2P market report). */

.vc-article .vc-article__body .wp-block-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vc-space-xs) var(--vc-space-sm);
  margin-block: 2em;
  padding: var(--vc-space-sm) var(--vc-space-sm) var(--vc-space-sm) 1.25rem;
  border-radius: var(--vc-radius-lg);
  background: var(--vc-surface-1);
  box-shadow:
    inset 0 0 0 1px var(--vc-line),
    var(--vc-shadow-lg);
  font-size: var(--vc-text-base);
  line-height: var(--vc-leading-snug);
}

/* A document glyph, drawn by mask so it takes a token colour. */
.vc-article .vc-article__body .wp-block-file::before {
  content: "";
  flex: none;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  background: var(--vc-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.vc-article .vc-article__body .wp-block-file > a:not(.wp-block-file__button) {
  flex: 1 1 12rem;
  color: var(--vc-fg);
  font-weight: var(--vc-weight-semibold);
  text-decoration: none;
}

.vc-article
  .vc-article__body
  .wp-block-file
  > a:not(.wp-block-file__button):hover {
  color: var(--vc-link-hover);
  text-decoration: none;
}

.vc-article .vc-article__body .wp-block-file .wp-block-file__button {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.625rem 1.125rem;
  border: 0;
  border-radius: var(--vc-radius-full);
  background: var(--vc-gradient-brand);
  box-shadow: var(--vc-shadow-brand);
  color: var(--vc-primary-fg);
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-semibold);
  line-height: 1.2;
  text-decoration: none;
}

.vc-article .vc-article__body .wp-block-file .wp-block-file__button:hover {
  filter: brightness(1.08) saturate(1.04);
  color: var(--vc-primary-fg);
  text-decoration: none;
}

/* Last in the body section on purpose: the component rules above set their
   own vertical margins at the same specificity, and a post that opens or ends
   on one of them (the A2P report is a lone file block) must not carry it. */
.vc-article .vc-article__body > :first-child {
  margin-block-start: 0;
}

.vc-article .vc-article__body > :last-child {
  margin-block-end: 0;
}

/* --- Previous / next ------------------------------------------------------- */

.vc-article .vc-article__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--vc-space-sm);
  width: min(var(--vc-article-wide), 100% - 2 * var(--vc-gutter));
  margin: 0 auto;
  padding-block-end: var(--vc-space-2xl);
}

.vc-article .vc-article__nav > * {
  margin: 0;
}

.vc-article .vc-article__prev {
  grid-column: 1;
}

.vc-article .vc-article__next {
  grid-column: 2;
  text-align: end;
}

.vc-article .vc-article__nav a {
  display: flex;
  flex-direction: column;
  gap: var(--vc-space-2xs);
  block-size: 100%;
  padding: 1.25rem var(--vc-space-md);
  border-radius: var(--vc-radius-lg);
  background: var(--vc-surface-1);
  box-shadow: inset 0 0 0 1px var(--vc-line);
  color: var(--vc-fg);
  text-decoration: none;
  transition:
    background-color var(--vc-fast) var(--vc-ease),
    box-shadow var(--vc-fast) var(--vc-ease);
}

.vc-article .vc-article__nav a:hover {
  background: var(--vc-surface-2);
  box-shadow: inset 0 0 0 1px var(--vc-line-2);
  color: var(--vc-fg);
  text-decoration: none;
}

.vc-article .vc-article__nav .post-navigation-link__label {
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-3);
}

.vc-article .vc-article__nav .post-navigation-link__title {
  font-size: var(--vc-text-md);
  font-weight: var(--vc-weight-emphasis);
  line-height: var(--vc-leading-snug);
  text-wrap: balance;
}

@media (max-width: 35rem) {
  .vc-article .vc-article__nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .vc-article .vc-article__prev,
  .vc-article .vc-article__next {
    grid-column: 1;
    text-align: start;
  }
}

/* --- Closing call to action ------------------------------------------------ */

/* The prototype's .closer, smaller: a hairline, centred type, and the soft
   glow rising from below. */
.vc-article .vc-article__cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0;
  padding: clamp(var(--vc-space-2xl), 9vw, var(--vc-space-4xl)) var(--vc-gutter);
  border-block-start: 1px solid var(--vc-line);
  text-align: center;
}

.vc-article .vc-article__cta::before {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 100%;
  z-index: -1;
  inline-size: min(68.75rem, 120%);
  block-size: 35rem;
  transform: translate(-50%, -48%);
  background: var(--vc-gradient-glow-soft);
  filter: blur(36px);
  pointer-events: none;
}

.vc-article .vc-article__cta > * {
  margin-block: 0;
}

.vc-article .vc-article__cta .vc-article__cta-title {
  max-width: 18ch;
  margin-inline: auto;
  font-size: var(--vc-text-title);
  line-height: var(--vc-leading-title);
  letter-spacing: var(--vc-tracking-title);
}

.vc-article .vc-article__cta .vc-cta-row {
  justify-content: center;
  margin-block-start: var(--vc-space-lg);
}

/* ---------------------------------------------------------------------------
   404 (templates/404.html)
   --------------------------------------------------------------------------- */

.vc-system {
  position: relative;
  overflow: clip;
  isolation: isolate;
}

.vc-system::before {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  inset-block-end: 0;
  z-index: -1;
  inline-size: min(68.75rem, 120%);
  block-size: 35rem;
  transform: translate(-50%, 55%);
  background: var(--vc-gradient-glow-soft);
  filter: blur(36px);
  pointer-events: none;
}

.vc-system .vc-system__inner {
  margin-block: 0;
  padding-block: clamp(var(--vc-space-2xl), 14vh, var(--vc-space-4xl))
    var(--vc-section);
}

.vc-system .vc-system__inner > * {
  margin-block: 0;
}

.vc-system .vc-system__title {
  max-width: 14ch;
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-hero);
  font-weight: var(--vc-weight-display);
  line-height: var(--vc-leading-hero);
  letter-spacing: var(--vc-tracking-hero);
  text-wrap: balance;
}

.vc-system .vc-system__lede {
  max-width: 52ch;
  margin-block: var(--vc-space-lg) var(--vc-space-xl);
  font-size: var(--vc-text-lg);
  line-height: var(--vc-leading-normal);
  color: var(--vc-fg-2);
}

.vc-system .vc-cta-row {
  margin-block-start: var(--vc-space-lg);
}

/* ---------------------------------------------------------------------------
   Legal documents (templates/page-legal.html)
   ---------------------------------------------------------------------------

   The body is the page's prose block, which owns its column; this narrows the
   measure, quietens the headings to a document's scale and owns the vertical
   spacing (the prose block's own section padding is zeroed here, so the page
   does not depend on what that block chooses). The title drops from the hero
   size to the display size: a policy is something to read, not a headline.
   --------------------------------------------------------------------------- */

.vc-legal .vc-inner-hero__heading {
  font-size: var(--vc-text-display);
  line-height: var(--vc-leading-display);
  letter-spacing: var(--vc-tracking-tighter);
}

.vc-legal .vc-legal__body {
  margin-block: 0;
  padding-block: var(--vc-space-2xl) var(--vc-section);
  border-block-start: 1px solid var(--vc-line);
}

.vc-legal .vc-legal__body .vc-prose {
  margin-block: 0;
  padding-block: 0;
  font-size: var(--vc-text-md);
  line-height: var(--vc-leading-relaxed);
}

/* 36rem at 17px measures 75 characters a line (40rem was 83). */
.vc-legal .vc-legal__body .vc-prose--content .vc-prose__inner > * {
  max-width: 36rem;
}

.vc-legal .vc-legal__body .vc-prose :is(h2, h3, h4) {
  margin-block: 2.5em 0.625em;
  font-weight: var(--vc-weight-semibold);
  line-height: var(--vc-leading-card);
  letter-spacing: var(--vc-tracking-snug);
}

.vc-legal .vc-legal__body .vc-prose h2 {
  font-size: var(--vc-text-xl);
}

.vc-legal .vc-legal__body .vc-prose h3 {
  font-size: var(--vc-text-lg);
}

.vc-legal .vc-legal__body .vc-prose h4 {
  font-size: var(--vc-text-md);
}

/* "Last updated", the first line of every document: a quiet meta pill. */
.vc-legal .vc-legal__body .vc-legal__updated {
  display: inline-block;
  margin-block-end: var(--vc-space-lg);
  padding: 0.25rem 0.75rem;
  border-radius: var(--vc-radius-full);
  box-shadow: inset 0 0 0 1px var(--vc-line-2);
  font-size: var(--vc-text-sm);
  color: var(--vc-fg-2);
}

.vc-legal .vc-legal__body .vc-legal__updated strong {
  font-weight: var(--vc-weight-medium);
  color: var(--vc-fg-2);
}

/* ---------------------------------------------------------------------------
   Legal: the text and its "On this page" list
   ---------------------------------------------------------------------------

   inc/render-filters.php wraps a legal document's prose in .vc-legal__layout
   with a .vc-toc in front of it. Wide: the text keeps its 36rem measure on the
   page's left edge and the list sits in the right-hand column, its left edge on
   the hero lede's (both 30rem from the right), sticky under the header. Narrow
   (the hero's own breakpoint): one column, and the list is a closed disclosure
   above the text. A page whose prose is not wrapped -- the index, which has no
   sections -- is untouched.
   --------------------------------------------------------------------------- */

.vc-legal .vc-legal__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--vc-space-lg);
  width: min(var(--vc-wide), 100% - 2 * var(--vc-gutter));
  margin-inline: auto;
}

/* The layout is the spine now; the prose column inside it is not centred again. */
.vc-legal .vc-legal__layout .vc-prose__inner {
  width: auto;
  margin-inline: 0;
}

/* Narrow: no wider than the text it sits above. */
.vc-legal .vc-toc {
  max-inline-size: 36rem;
  font-size: var(--vc-text-sm);
  line-height: var(--vc-leading-normal);
}

/* Shown only where the list is laid open (wide screens, below). */
.vc-legal .vc-toc__title {
  display: none;
  margin: 0 0 var(--vc-space-xs);
  font-size: var(--vc-text-sm);
  font-weight: var(--vc-weight-semibold);
  color: var(--vc-fg);
}

.vc-legal .vc-toc__details {
  border-radius: var(--vc-radius-card);
  background: var(--vc-surface-1);
  box-shadow: inset 0 0 0 1px var(--vc-line);
}

.vc-legal .vc-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vc-space-xs);
  padding: 0.75rem 1rem;
  border-radius: inherit;
  font-weight: var(--vc-weight-semibold);
  color: var(--vc-fg);
  cursor: pointer;
  list-style: none;
}

.vc-legal .vc-toc__summary::-webkit-details-marker {
  display: none;
}

/* A drawn chevron, turned when open. */
.vc-legal .vc-toc__summary::after {
  content: "";
  flex: none;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  color: var(--vc-fg-2);
  transform: translateY(-25%) rotate(45deg);
}

.vc-legal .vc-toc__details[open] .vc-toc__summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.vc-legal .vc-toc__list {
  margin: 0;
  padding: 0 1rem 0.75rem;
  list-style: none;
}

.vc-legal .vc-toc__list li {
  margin: 0;
}

.vc-legal .vc-toc__list a {
  display: block;
  padding-block: 0.375rem;
  color: var(--vc-fg-2);
  text-decoration: none;
}

.vc-legal .vc-toc__list a:hover {
  color: var(--vc-fg);
}

/* Inside the sticky list's own scroll box an outer ring would be clipped. */
.vc-legal .vc-toc__list a:focus-visible {
  outline-offset: -2px;
}

@media (prefers-reduced-motion: no-preference) {
  .vc-legal .vc-toc__list a {
    transition: color var(--vc-base) var(--vc-ease);
  }
}

@media (min-width: 60.0625rem) {
  .vc-legal .vc-legal__layout {
    grid-template-columns: minmax(0, 36rem) minmax(14rem, 1fr);
    column-gap: var(--vc-space-2xl);
    align-items: start;
  }

  .vc-legal .vc-legal__layout > .vc-prose {
    grid-column: 1;
    grid-row: 1;
  }

  .vc-legal .vc-toc {
    position: sticky;
    inset-block-start: calc(var(--vc-header) + var(--vc-space-lg));
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    inline-size: min(100%, 30rem);
    max-block-size: calc(100vh - var(--vc-header) - 2 * var(--vc-space-lg));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* Laid open: the summary gives way to the title, the list to a ruled column. */
  @supports selector(::details-content) {
    .vc-legal .vc-toc__title {
      display: block;
    }

    .vc-legal .vc-toc__summary {
      display: none;
    }

    .vc-legal .vc-toc__details::details-content {
      content-visibility: visible;
    }

    .vc-legal .vc-toc__details {
      border-radius: 0;
      background: none;
      box-shadow: none;
    }

    .vc-legal .vc-toc__list {
      padding: 0;
      border-inline-start: 1px solid var(--vc-line);
    }

    .vc-legal .vc-toc__list a {
      margin-inline-start: -1px;
      padding-inline-start: var(--vc-space-sm);
      border-inline-start: 1px solid transparent;
    }

    .vc-legal .vc-toc__list a:hover {
      border-inline-start-color: var(--vc-fg-2);
    }
  }
}
