/*
 * Stable chrome and sidebar contract.
 *
 * WordPress menus/widgets may change labels, destinations and ordering. This
 * final layer keeps those editable regions inside the approved 1280px shell,
 * shared 248px rail and restrained divider-based visual language.
 */

:root {
  --wpq-shared-shell: var(--wpq-shell);
  --wpq-shared-rail: var(--wpq-rail);
  --wpq-shared-gutter: var(--wpq-space-7-5);
  --wpq-shared-rail-line: var(--wpq-color-line);
}

/* Public pages share one white reading canvas. Meaningful component surfaces
 * may still use neutral or semantic backgrounds, but routes do not own a
 * separate full-page gradient. */
body,
body .wpq-site-main {
  background-color: var(--wpq-color-surface);
  background-image: none;
}

.wpq-hub-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--wpq-space-7);
  align-items: center;
  margin-top: var(--wpq-space-8);
  padding: 26px 28px;
  border-top: 1px solid #bccbe0;
  border-bottom: 1px solid #bccbe0;
  background: #f8fbff;
}

.wpq-hub-next-step > div {
  display: grid;
  gap: 6px;
}

.wpq-hub-next-step p,
.wpq-hub-next-step h2,
.wpq-hub-next-step span {
  margin: 0;
}

.wpq-hub-next-step p {
  color: var(--wpq-color-blue-strong);
  font: 700 0.75rem/1.4 var(--wpq-font-ui);
  letter-spacing: 0.05em;
}

.wpq-hub-next-step h2 {
  color: var(--wpq-color-ink);
  font: 700 1.2rem/1.5 var(--wpq-font-ui);
}

.wpq-hub-next-step span {
  color: var(--wpq-color-copy);
  font: 500 0.9rem/1.75 var(--wpq-font-ui);
}

.wpq-hub-next-step nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}

.wpq-hub-next-step a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--wpq-color-blue);
  border-radius: 4px;
  background: var(--wpq-color-surface);
  color: var(--wpq-color-blue-strong);
  font: 700 0.84rem/1.4 var(--wpq-font-ui);
  text-decoration: none;
}

.wpq-hub-next-step a:focus-visible {
  outline: 3px solid var(--wpq-color-blue);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .wpq-hub-next-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 22px 18px;
  }

  .wpq-hub-next-step nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wpq-nav-shell,
.wpq-footer-shell,
.wpq-wrap,
.home .wpq-home-shell,
.wpq-public-hub,
.wpq-public-discovery,
.wpq-popular-shell,
.wpq-whats-new-shell,
.wpq-official-reference-v1,
.wpq-cheatsheet-v1,
.wpq-trust-v1,
.wpq-contact-v1,
.wpq-privacy-v1,
.wpq-sitemap-v1 {
  box-sizing: border-box;
  width: min(var(--wpq-shared-shell), calc(100% - 36px));
  max-width: var(--wpq-shared-shell);
  margin-inline: auto;
}

@media (min-width: 1024px) {
  :is(
      .home .wpq-home-content,
      .wpq-public-hub__layout,
      .wpq-public-discovery__layout,
      .wpq-archive-layout,
      .wpq-official-reference-v1__layout,
      .wpq-cheatsheet-v1__layout,
      .wpq-trust-v1__layout,
      .wpq-contact-v1__layout,
      .wpq-privacy-v1__layout,
      .wpq-sitemap-v1__layout,
      .wpq-content-layout,
      .wpq-popular-main,
      .wpq-whats-new-main
    ) {
    grid-template-columns: minmax(0, 1fr) var(--wpq-shared-rail);
    column-gap: var(--wpq-shared-gutter);
  }

  :is(
      .wpq-home-side,
      .wpq-public-hub__rail,
      .wpq-public-discovery__rail,
      .wpq-archive-side,
      .wpq-official-reference-v1__rail,
      .wpq-cheatsheet-v1__rail,
      .wpq-trust-v1__rail,
      .wpq-contact-v1__rail,
      .wpq-privacy-v1__rail,
      .wpq-sitemap-v1__rail,
      .wpq-side-rail,
      .wpq-popular-rail,
      .wpq-whats-new-side
    ) {
    box-sizing: border-box;
    width: var(--wpq-shared-rail);
    min-width: 0;
    max-width: var(--wpq-shared-rail);
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .wpq-public-discovery--articles .wpq-archive-side {
    margin-top: 0;
  }

  .wpq-public-discovery--articles .wpq-archive-side > * {
    width: 100%;
    max-width: 100%;
  }
}

/* One shared rail surface: sections are separated by lines, not nested cards. */
:is(
    .wpq-home-side,
    .wpq-public-hub__rail,
    .wpq-public-discovery__rail,
    .wpq-archive-side,
    .wpq-official-reference-v1__rail,
    .wpq-cheatsheet-v1__rail,
    .wpq-trust-v1__rail,
    .wpq-contact-v1__rail,
    .wpq-privacy-v1__rail,
    .wpq-sitemap-v1__rail,
    .wpq-side-rail,
    .wpq-popular-rail,
    .wpq-whats-new-side
  ) {
  align-content: start;
  gap: 0;
}

:is(
    .wpq-home-side,
    .wpq-public-hub__rail,
    .wpq-public-discovery__rail,
    .wpq-archive-side,
    .wpq-official-reference-v1__rail,
    .wpq-cheatsheet-v1__rail,
    .wpq-trust-v1__rail,
    .wpq-contact-v1__rail,
    .wpq-privacy-v1__rail,
    .wpq-sitemap-v1__rail,
    .wpq-side-rail,
    .wpq-popular-rail,
    .wpq-whats-new-side
  ) > :is(section, nav, .wpq-public-builder-cta, .wpq-sidebar-widgets) {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: var(--wpq-space-4-5) 0;
  border: 0;
  border-bottom: 1px solid var(--wpq-shared-rail-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:is(
    .wpq-home-side,
    .wpq-public-hub__rail,
    .wpq-public-discovery__rail,
    .wpq-archive-side,
    .wpq-official-reference-v1__rail,
    .wpq-cheatsheet-v1__rail,
    .wpq-trust-v1__rail,
    .wpq-contact-v1__rail,
    .wpq-privacy-v1__rail,
    .wpq-sitemap-v1__rail,
    .wpq-side-rail,
    .wpq-popular-rail,
    .wpq-whats-new-side
  ) > :first-child {
  padding-top: 0;
}

:is(
    .wpq-home-side,
    .wpq-public-hub__rail,
    .wpq-public-discovery__rail,
    .wpq-archive-side,
    .wpq-official-reference-v1__rail,
    .wpq-cheatsheet-v1__rail,
    .wpq-trust-v1__rail,
    .wpq-contact-v1__rail,
    .wpq-privacy-v1__rail,
    .wpq-sitemap-v1__rail,
    .wpq-side-rail,
    .wpq-popular-rail,
    .wpq-whats-new-side
  ) > :last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.wpq-sidebar-widgets {
  display: grid;
  gap: 0;
}

.wpq-sidebar-widget {
  min-width: 0;
  margin: 0;
  padding: var(--wpq-space-4-5) 0;
  border: 0;
  border-bottom: 1px solid var(--wpq-shared-rail-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--wpq-ink-soft);
  font-size: var(--wpq-type-body);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.wpq-sidebar-widget:first-child {
  padding-top: 0;
}

.wpq-sidebar-widget:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.wpq-sidebar-widget :is(h2, h3, .wp-block-heading),
.wpq-sidebar-widget__title {
  margin: 0 0 var(--wpq-space-3);
  color: var(--wpq-ink);
  font: var(--wpq-weight-bold) var(--wpq-type-subsection)/1.45 var(--wpq-font-ui);
  letter-spacing: var(--wpq-tracking-default);
}

.wpq-sidebar-widget :is(p, ul, ol) {
  margin-block: 0 var(--wpq-space-3);
}

.wpq-sidebar-widget :is(ul, ol) {
  padding-inline-start: 1.25rem;
}

.wpq-sidebar-widget a {
  color: var(--wpq-blue-strong);
  text-underline-offset: 0.18em;
}

.wpq-sidebar-widget :is(img, video, iframe) {
  max-width: 100%;
  height: auto;
}

/* Restored footer, recalibrated to the current compact UI type scale. */
.wpq-site-footer {
  background-color: var(--wpq-color-footer);
  background-image: none;
  font-family: var(--wpq-font-ui);
}

.wpq-footer-shell--main {
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 0.78fr)) minmax(180px, 0.9fr);
  gap: 0;
  padding-block: 34px 28px;
}

.wpq-footer-panel {
  padding-inline: 22px;
}

.wpq-footer-panel--brand {
  padding-left: 0;
}

.wpq-footer-eyebrow {
  margin-bottom: var(--wpq-space-2-5);
  font-size: var(--wpq-type-meta);
  line-height: 1.35;
  letter-spacing: var(--wpq-tracking-default);
}

.wpq-footer-title {
  margin-bottom: var(--wpq-space-2);
  font-size: var(--wpq-type-subheading);
  line-height: 1.4;
}

.wpq-footer-copy,
.wpq-footer-menu a,
.wpq-footer-meta-nav a {
  font-size: var(--wpq-type-copy);
  line-height: 1.65;
}

.wpq-footer-heading {
  margin-bottom: var(--wpq-space-2-5);
  font-size: var(--wpq-type-body);
}

.wpq-footer-menu,
.wpq-footer-meta-nav {
  gap: 7px;
}

.wpq-footer-menu a,
.wpq-footer-meta-nav a {
  min-height: 30px;
}

.wpq-footer-menu a::before {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 0 3px rgba(143, 184, 255, 0.11);
}

@media (max-width: 1023px) {
  .wpq-nav-shell,
  .wpq-footer-shell,
  .wpq-wrap,
  .home .wpq-home-shell,
  .wpq-public-hub,
  .wpq-public-discovery,
  .wpq-popular-shell,
  .wpq-whats-new-shell,
  .wpq-official-reference-v1,
  .wpq-cheatsheet-v1,
  .wpq-trust-v1,
  .wpq-contact-v1,
  .wpq-privacy-v1,
  .wpq-sitemap-v1 {
    width: min(var(--wpq-shared-shell), calc(100% - 28px));
  }

  .wpq-footer-shell--main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }

  .wpq-footer-panel {
    padding-inline: 0;
  }

  .wpq-footer-panel--brand,
  .wpq-footer-panel--meta {
    grid-column: 1 / -1;
  }

  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    border-left: 0;
    border-top: 1px solid rgba(173, 192, 216, 0.18);
  }
}

@media (max-width: 639px) {
  .wpq-footer-shell--main {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 26px var(--wpq-space-5);
  }

  .wpq-footer-panel--brand,
  .wpq-footer-panel--meta {
    grid-column: auto;
  }

  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    padding-block: var(--wpq-space-3-5);
  }

  .wpq-footer-menu,
  .wpq-footer-meta-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--wpq-space-3);
    row-gap: 3px;
  }

  .wpq-footer-menu a,
  .wpq-footer-meta-nav a {
    min-width: 0;
    font-size: var(--wpq-type-small-strong);
  }

  .wpq-footer-shell--bottom {
    gap: var(--wpq-space-2);
    padding-block: var(--wpq-space-3-5);
  }
}

/* Intermediate layout contract.
 * Keep the contextual rail while the shell can still provide at least 680px
 * to the reading column. Below 960px the rail returns to normal document flow;
 * orientation-only modules become the existing disclosure while related
 * routes and Builder remain reachable after the content. */
@media (min-width: 960px) and (max-width: 1023px) {
  body .wpq-site-main :is(
      .wpq-public-hub__layout,
      .wpq-public-discovery__layout,
      .wpq-archive-layout
    ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 220px !important;
    column-gap: var(--wpq-space-6) !important;
    align-items: start;
  }

  body .wpq-site-main :is(
      .wpq-public-hub__main,
      .wpq-public-discovery__main,
      .wpq-archive-main
    ) {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0;
  }

  body .wpq-site-main :is(
      .wpq-public-hub__rail,
      .wpq-public-discovery__rail,
      .wpq-archive-side
    ) {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 220px !important;
    max-width: 220px !important;
    margin: 0 !important;
  }

  body .wpq-site-main .wpq-popular-shell {
    grid-template-columns: minmax(0, 1fr) 220px !important;
    column-gap: var(--wpq-space-6) !important;
    align-items: start;
  }

  body .wpq-site-main .wpq-popular-shell > :is(.wpq-page-breadcrumb, .wpq-popular-hero, .wpq-popular-bottom-links) {
    grid-column: 1 / -1 !important;
  }

  body .wpq-site-main .wpq-popular-board {
    grid-column: 1 !important;
  }

  body .wpq-site-main .wpq-popular-rail {
    display: grid !important;
    grid-column: 2 !important;
    width: 220px !important;
    max-width: 220px !important;
    margin: 0 !important;
  }

  body .wpq-site-main .wpq-popular-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .wpq-site-main .wpq-popular-featured-grid > .wpq-popular-card:last-child {
    grid-column: 1 / -1 !important;
    width: calc(50% - 8px) !important;
  }
}

/* Internal category discovery is a plain text-and-icon row on desktop. The
 * small directional arrow remains available only on the mobile row where the
 * design contract permits it as a navigation aid. */
.wpq-public-discovery--articles .wpq-archive-category-route > svg:last-child {
  display: none;
}

@media (max-width: 767px) {
  .wpq-public-discovery--articles .wpq-archive-category-route > svg:last-child {
    display: block;
  }

  /* Every popular article uses one readable row on phones. Earlier selector
   * combinations let cards 2 and 3 retain full-width poster geometry while
   * later cards became tiny rows. Keep the content, make the geometry equal,
   * and reserve three lines for the description. */
  .wpq-popular-card-grid > .wpq-popular-card,
  .wpq-popular-card-grid > .wpq-popular-card:first-child,
  .wpq-popular-card-grid > .wpq-popular-card:nth-child(n + 2) {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__link,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__link,
  .wpq-popular-card-grid .wpq-popular-card:nth-child(n + 2) .wpq-popular-card__link {
    display: grid !important;
    grid-template-columns: 116px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 11px !important;
    min-height: 148px !important;
    padding: var(--wpq-space-2-5) 0 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__thumb,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__thumb,
  .wpq-popular-card-grid .wpq-popular-card:nth-child(n + 2) .wpq-popular-card__thumb {
    align-self: center !important;
    width: 116px !important;
    height: 65px !important;
    aspect-ratio: auto !important;
    border: 1px solid var(--wpq-color-line) !important;
    border-radius: 3px !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__body,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__body,
  .wpq-popular-card-grid .wpq-popular-card:nth-child(n + 2) .wpq-popular-card__body {
    align-self: stretch !important;
    display: grid !important;
    grid-template-rows: auto minmax(3.15rem, auto) auto !important;
    gap: var(--wpq-space-1) !important;
    min-width: 0;
    padding: 0 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__body h2,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__body h2 {
    min-height: 0 !important;
    margin: 0 !important;
    font-size: var(--wpq-type-copy) !important;
    line-height: 1.45 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__body p,
  .wpq-popular-card-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__body p {
    display: -webkit-box !important;
    min-height: 3.15rem !important;
    margin: 0 !important;
    overflow: hidden;
    font-size: var(--wpq-type-meta) !important;
    line-height: 1.52 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__meta {
    gap: 3px var(--wpq-space-2) !important;
    font-size: var(--wpq-type-micro-floor) !important;
    line-height: 1.4 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__eyebrow {
    display: none !important;
  }
}

@media (max-width: 767px) {
  /* Keep the restored dark footer useful on mobile without turning every
   * navigation group into a tall single-column stack. */
  .wpq-site-footer {
    margin-top: 0;
  }

  .wpq-footer-shell--main {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--wpq-space-3);
    padding-block: var(--wpq-space-4) var(--wpq-space-3-5);
  }

  .wpq-footer-panel--brand,
  .wpq-footer-panel--meta {
    grid-column: 1 / -1;
  }

  .wpq-footer-panel--brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 3px var(--wpq-space-2-5);
  }

  .wpq-footer-eyebrow,
  .wpq-footer-title {
    margin: 0;
  }

  .wpq-footer-copy {
    grid-column: 1 / -1;
  }

  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    padding-block: var(--wpq-space-2) 0;
  }

  .wpq-footer-panel--nav {
    grid-column: auto;
  }

  .wpq-footer-heading {
    margin-bottom: 5px;
    font-size: var(--wpq-type-label);
  }

  .wpq-footer-copy,
  .wpq-footer-menu a,
  .wpq-footer-meta-nav a {
    font-size: var(--wpq-type-meta);
    line-height: 1.45;
  }

  .wpq-footer-menu,
  .wpq-footer-meta-nav {
    gap: var(--wpq-space-0-5) var(--wpq-space-2);
  }

  .wpq-footer-menu a,
  .wpq-footer-meta-nav a {
    min-height: 24px;
  }

  .wpq-footer-meta-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wpq-footer-shell--bottom {
    grid-template-columns: 1fr auto;
    padding-block: 9px;
  }

  .wpq-footer-meta-copy,
  .wpq-footer-meta-note {
    font-size: var(--wpq-type-micro-floor);
  }
}

/* Root shells previously added their own large end padding on top of main's
 * desktop end padding. Keep one common outer gap; mobile retains its compact
 * route-specific end space because main has no bottom padding there. */
@media (min-width: 768px) {
  .wpq-site-main > :is(
      .wpq-public-hub,
      .wpq-public-discovery,
      .wpq-popular-shell,
      .wpq-whats-new-shell,
      .wpq-official-reference-v1,
      .wpq-cheatsheet-v1,
      .wpq-trust-v1,
      .wpq-privacy-v1,
      .wpq-sitemap-v1
    ) {
    padding-bottom: 0;
  }
}

/* Popular cards are reading choices, not thumbnail-only compact rows. Reserve
 * three lines for the description and always expose reading time and update
 * date, even before measured popularity data is available. */
.wpq-popular-featured-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  height: auto !important;
  gap: var(--wpq-space-4) !important;
  border-top: 0;
}

.wpq-popular-featured-grid > .wpq-popular-card,
.wpq-popular-featured-grid > .wpq-popular-card:first-child {
  grid-column: auto;
  grid-row: auto;
  height: auto;
  min-height: 0;
  border: 1px solid var(--wpq-color-line) !important;
  border-radius: 4px !important;
  overflow: hidden;
}

.wpq-popular-featured-grid .wpq-popular-card__link,
.wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__link,
.wpq-popular-featured-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__link {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 !important;
  min-height: 100%;
  padding: 0 !important;
}

.wpq-popular-featured-grid .wpq-popular-card__thumb,
.wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__thumb,
.wpq-popular-featured-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-bottom: 1px solid var(--wpq-color-line);
  border-radius: 0 !important;
}

.wpq-popular-featured-grid .wpq-popular-card__body,
.wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__body {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: var(--wpq-space-2);
  padding: var(--wpq-space-3-5) !important;
}

.wpq-popular-featured-grid .wpq-popular-card__body h2,
.wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__body h2 {
  min-height: 2.9em;
  margin: 0 !important;
  font-size: var(--wpq-type-subsection) !important;
  line-height: 1.45;
}

.wpq-popular-featured-grid .wpq-popular-card__body p,
.wpq-popular-featured-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__body p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 !important;
  overflow: hidden;
  color: var(--wpq-color-muted);
  font-size: var(--wpq-type-small) !important;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.wpq-popular-featured-grid .wpq-popular-card__eyebrow,
.wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__eyebrow,
.wpq-popular-featured-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__eyebrow {
  top: 10px;
  right: 10px;
  left: auto;
}

.wpq-popular-compact-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
}

.wpq-popular-compact-list > .wpq-popular-card,
.wpq-popular-compact-list > .wpq-popular-card:nth-child(n + 1) {
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0;
  height: auto !important;
}

.wpq-popular-compact-list .wpq-popular-card__link,
.wpq-popular-compact-list .wpq-popular-card:first-child .wpq-popular-card__link,
.wpq-popular-compact-list .wpq-popular-card:nth-child(n + 4) .wpq-popular-card__link {
  position: relative;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  gap: var(--wpq-space-4-5) !important;
  min-height: 148px;
  padding: var(--wpq-space-3-5) var(--wpq-space-2) !important;
}

.wpq-popular-compact-list .wpq-popular-card__thumb {
  align-self: center;
  width: 180px;
  height: auto;
  aspect-ratio: 16 / 9;
}

.wpq-popular-compact-list .wpq-popular-card__body {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: var(--wpq-space-1-5);
  min-width: 0;
}

.wpq-popular-compact-list .wpq-popular-card__body h2,
.wpq-popular-compact-list .wpq-popular-card:first-child .wpq-popular-card__body h2 {
  min-height: 2.9em;
  margin: 0 !important;
  font-size: var(--wpq-type-subsection) !important;
  line-height: 1.45;
}

.wpq-popular-compact-list .wpq-popular-card__body p {
  display: -webkit-box;
  min-height: 4.65em;
  margin: 0 !important;
  overflow: hidden;
  font-size: var(--wpq-type-small) !important;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.wpq-popular-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wpq-space-1) var(--wpq-space-3-5);
  align-items: center;
  align-self: end;
  color: var(--wpq-color-muted);
  font-size: var(--wpq-type-meta);
  font-weight: var(--wpq-weight-bold);
  line-height: 1.4;
}

.wpq-popular-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--wpq-space-1);
  white-space: nowrap;
}

.wpq-popular-card__meta i,
.wpq-popular-card__meta svg {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.wpq-popular-board__footer {
  display: flex;
  justify-content: center;
  margin-top: var(--wpq-space-5);
}

.wpq-popular-board__footer .wpq-button--secondary {
  min-width: 160px;
  min-height: 44px;
  border: 1px solid #c9d8ed;
  border-radius: 4px;
  background: var(--wpq-color-surface);
  color: var(--wpq-color-blue);
  font-size: var(--wpq-type-copy);
  font-weight: var(--wpq-weight-bold);
  box-shadow: none;
}

.wpq-popular-board__footer .wpq-button--secondary svg {
  width: 16px;
  height: 16px;
}

@media (min-width: 600px) and (max-width: 899px) {
  .wpq-popular-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .wpq-popular-featured-grid > .wpq-popular-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
  }
}

@media (max-width: 599px) {
  .wpq-popular-featured-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .wpq-popular-featured-grid > .wpq-popular-card,
  .wpq-popular-featured-grid > .wpq-popular-card:first-child {
    border-inline: 0 !important;
    border-top: 0 !important;
    border-radius: 0 !important;
  }

  .wpq-popular-featured-grid .wpq-popular-card__link,
  .wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__link,
  .wpq-popular-compact-list .wpq-popular-card__link,
  .wpq-popular-compact-list .wpq-popular-card:first-child .wpq-popular-card__link,
  .wpq-popular-compact-list .wpq-popular-card:nth-child(n + 4) .wpq-popular-card__link {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    grid-template-rows: auto;
    gap: var(--wpq-space-2-5) !important;
    min-height: 132px;
    padding: var(--wpq-space-2-5) 0 !important;
  }

  .wpq-popular-featured-grid .wpq-popular-card__thumb,
  .wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__thumb,
  .wpq-popular-compact-list .wpq-popular-card__thumb {
    align-self: center;
    width: 112px;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--wpq-color-line);
    border-radius: 3px !important;
  }

  .wpq-popular-featured-grid .wpq-popular-card__body,
  .wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__body,
  .wpq-popular-compact-list .wpq-popular-card__body {
    grid-template-rows: auto auto auto;
    gap: var(--wpq-space-1);
    padding: 0 !important;
  }

  .wpq-popular-featured-grid .wpq-popular-card__body h2,
  .wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__body h2,
  .wpq-popular-compact-list .wpq-popular-card__body h2,
  .wpq-popular-compact-list .wpq-popular-card:first-child .wpq-popular-card__body h2 {
    min-height: 2.8em;
    font-size: var(--wpq-type-small) !important;
    line-height: 1.4;
  }

  .wpq-popular-featured-grid .wpq-popular-card__body p,
  .wpq-popular-featured-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__body p,
  .wpq-popular-compact-list .wpq-popular-card__body p {
    display: -webkit-box;
    min-height: 4.5em;
    font-size: var(--wpq-type-micro-floor) !important;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }

  .wpq-popular-card__meta {
    gap: var(--wpq-space-0-5) var(--wpq-space-2);
    font-size: var(--wpq-type-micro-floor);
  }

  .wpq-popular-card__meta i,
  .wpq-popular-card__meta svg {
    width: 11px;
    height: 11px;
    flex-basis: 11px;
  }

  .wpq-popular-featured-grid .wpq-popular-card__eyebrow {
    display: none;
  }

  .wpq-popular-board__footer {
    margin-top: var(--wpq-space-4);
  }
}

/* Task D footer composition.
 * Keep every current link and information block, but prevent legacy tablet
 * rules from turning the shared footer into five long full-width rows. */
@media (min-width: 1024px) {
  .wpq-footer-shell--main {
    grid-template-columns: minmax(210px, 1.2fr) repeat(3, minmax(145px, 0.78fr)) minmax(180px, 0.9fr) !important;
  }

  .wpq-footer-panel--brand,
  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    grid-column: auto !important;
    border-top: 0 !important;
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  .wpq-footer-shell--main {
    grid-template-columns: minmax(180px, 1.08fr) repeat(3, minmax(130px, 0.78fr)) minmax(160px, 0.9fr) !important;
    column-gap: 0 !important;
    padding-block: 28px var(--wpq-space-6) !important;
  }

  .wpq-footer-panel--brand,
  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    grid-column: auto !important;
    padding: 0 15px !important;
    border-top: 0 !important;
    border-left: 1px solid rgba(173, 192, 216, 0.18) !important;
  }

  .wpq-footer-panel--brand {
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  .wpq-footer-copy,
  .wpq-footer-menu a,
  .wpq-footer-meta-nav a {
    font-size: var(--wpq-type-small) !important;
    line-height: 1.55 !important;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .wpq-footer-shell--main {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 28px !important;
    row-gap: 0 !important;
    padding-block: var(--wpq-space-6) var(--wpq-space-5) !important;
  }

  .wpq-footer-panel--brand {
    grid-column: 1 / -1 !important;
    padding: 0 0 var(--wpq-space-4) !important;
    border-top: 0 !important;
  }

  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    grid-column: auto !important;
    padding: var(--wpq-space-4) 0 !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(173, 192, 216, 0.18) !important;
  }

  .wpq-footer-menu,
  .wpq-footer-meta-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: var(--wpq-space-3-5) !important;
  }
}

@media (max-width: 639px) {
  .wpq-footer-shell--main {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: var(--wpq-space-4-5) !important;
    row-gap: 0 !important;
    padding-block: 22px var(--wpq-space-4-5) !important;
  }

  .wpq-footer-panel--brand {
    grid-column: 1 / -1 !important;
    padding: 0 0 var(--wpq-space-3-5) !important;
    border-top: 0 !important;
  }

  .wpq-footer-panel--nav,
  .wpq-footer-panel--meta {
    grid-column: auto !important;
    min-width: 0;
    padding: 13px 0 !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(173, 192, 216, 0.18) !important;
  }

  .wpq-footer-menu,
  .wpq-footer-meta-nav {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 3px !important;
  }

  .wpq-footer-copy,
  .wpq-footer-menu a,
  .wpq-footer-meta-nav a {
    font-size: var(--wpq-type-small) !important;
    line-height: 1.5 !important;
  }

  .wpq-footer-menu a,
  .wpq-footer-meta-nav a {
    min-height: 30px !important;
  }

  .wpq-footer-shell--bottom {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--wpq-space-1) !important;
  }
}

/* Home has no active global-navigation destination of its own. Do not let an
 * old route prototype paint the first menu item green. */
.home .wpq-nav-menu--desktop .wpq-nav-menu__item:first-child > a:not([aria-current="page"]),
.home .wpq-nav-menu--desktop .wpq-nav-menu__item:first-child > a:not([aria-current="page"]) .wpq-nav-menu__icon {
  color: var(--wpq-ui-ink);
}

.home .wpq-nav-menu--desktop .wpq-nav-menu__item:first-child > a:not([aria-current="page"])::after {
  transform: scaleX(0);
}

/*
 * Terminal conflict resolution.
 *
 * Task A/B/C contain route-specific desktop widths and a few !important
 * prototypes. Keep their content styling, but make the editor-controlled shell
 * and rail dimensions deterministic across every public family.
 */
.wpq-site-main > :is(
    .wpq-wrap,
    .wpq-home-shell,
    .wpq-public-hub,
    .wpq-public-discovery,
    .wpq-popular-shell,
    .wpq-whats-new-shell,
    .wpq-official-reference-v1,
    .wpq-cheatsheet-v1,
    .wpq-trust-v1,
    .wpq-contact-v1,
    .wpq-privacy-v1,
    .wpq-sitemap-v1,
    .wpq-404-shell
  ),
body.wpq-reference-v3 .wpq-site-main > .wrap {
  box-sizing: border-box;
  width: min(var(--wpq-shared-shell), calc(100% - 36px)) !important;
  max-width: var(--wpq-shared-shell) !important;
  margin-inline: auto !important;
}

@media (min-width: 1024px) {
  body .wpq-site-main :is(
      .wpq-home-content,
      .wpq-public-hub__layout,
      .wpq-public-discovery__layout,
      .wpq-archive-layout,
      .wpq-official-reference-v1__layout,
      .wpq-cheatsheet-v1__layout,
      .wpq-trust-v1__layout,
      .wpq-contact-v1__layout,
      .wpq-privacy-v1__layout,
      .wpq-sitemap-v1__layout,
      .wpq-content-layout,
      .content-layout,
      .wpq-whats-new-main
    ) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) var(--wpq-shared-rail) !important;
    column-gap: var(--wpq-shared-gutter) !important;
  }

  body .wpq-site-main .wpq-popular-shell {
    grid-template-columns: minmax(0, 1fr) var(--wpq-shared-rail) !important;
    column-gap: var(--wpq-shared-gutter) !important;
  }

  body .wpq-site-main :is(
      .wpq-home-side,
      .wpq-public-hub__rail,
      .wpq-public-discovery__rail,
      .wpq-archive-side,
      .wpq-official-reference-v1__rail,
      .wpq-cheatsheet-v1__rail,
      .wpq-trust-v1__rail,
      .wpq-contact-v1__rail,
      .wpq-privacy-v1__rail,
      .wpq-sitemap-v1__rail,
      .wpq-side-rail,
      .side-rail,
      .wpq-popular-rail,
      .wpq-whats-new-side
    ) {
    box-sizing: border-box;
    width: var(--wpq-shared-rail) !important;
    min-width: 0 !important;
    max-width: var(--wpq-shared-rail) !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .wpq-site-main .wpq-public-discovery--articles .wpq-archive-side {
    margin-top: 0 !important;
  }

  body .wpq-site-main .wpq-public-discovery--articles .wpq-archive-side > * {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
  }
}

/* Header search is a compact utility control, not a second primary CTA. */
@media (min-width: 1024px) {
  .wpq-nav-shell--top > .wpq-nav-search-link {
    display: inline-flex;
    box-sizing: border-box;
    width: 76px !important;
    min-width: 76px !important;
    height: 44px !important;
    min-height: 44px !important;
    justify-content: center !important;
    gap: var(--wpq-space-1-5) !important;
    padding: 0 var(--wpq-space-2-5) !important;
    border: 1px solid var(--wpq-color-line);
    border-radius: 4px;
    background: var(--wpq-color-surface);
    box-shadow: none;
    color: var(--wpq-color-ink);
    font: var(--wpq-weight-bold) var(--wpq-type-small)/1 var(--wpq-font-ui);
  }

  .wpq-nav-shell--top > .wpq-nav-search-link:hover,
  .wpq-nav-shell--top > .wpq-nav-search-link:focus-visible,
  .wpq-nav-shell--top > .wpq-nav-search-link[aria-expanded="true"] {
    border-color: var(--wpq-color-line);
    background: var(--wpq-color-surface);
    color: var(--wpq-color-blue);
  }

  .wpq-nav-shell--top > .wpq-nav-search-link .wpq-nav-menu__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    overflow: visible;
    color: currentColor;
  }

  .wpq-nav-shell--top > .wpq-nav-search-link .wpq-nav-menu__icon svg {
    width: 16px;
    height: 16px;
    transform: none;
  }
}

/* Rail sections share dividers; the reusable Builder CTA remains one banner. */
:is(
    .wpq-home-side,
    .wpq-public-hub__rail,
    .wpq-public-discovery__rail,
    .wpq-archive-side,
    .wpq-official-reference-v1__rail,
    .wpq-cheatsheet-v1__rail,
    .wpq-trust-v1__rail,
    .wpq-contact-v1__rail,
    .wpq-privacy-v1__rail,
    .wpq-sitemap-v1__rail,
    .wpq-side-rail,
    .side-rail,
    .wpq-popular-rail,
    .wpq-whats-new-side
  ) > .wpq-public-builder-cta.wpq-public-builder-cta--side {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  margin: var(--wpq-space-4-5) 0 0 !important;
  padding: 0 !important;
  border: 1px solid var(--wpq-color-line-strong) !important;
  border-radius: 6px !important;
  background: var(--wpq-color-surface) !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* The shared 248px WordPress rail also owns one desktop CTA composition.
 * Reset the former 354px article-only calibration so its copy never clips and
 * all route side banners keep the same large official mark and button rhythm. */
@media (min-width: 1024px) {
  .wpq-site-main .wpq-public-builder-cta.wpq-public-builder-cta--side {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 120px auto auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    gap: 0 !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    place-self: stretch !important;
    box-sizing: border-box !important;
    width: auto !important;
    height: auto !important;
    justify-content: center !important;
    padding: var(--wpq-space-4-5) var(--wpq-space-4) var(--wpq-space-1-5) !important;
  }

  .wpq-site-main .wpq-public-builder-cta.wpq-public-builder-cta--side .wpq-public-builder-cta__brand img {
    width: 96px !important;
    height: 96px !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__copy {
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-content: center !important;
    justify-items: center !important;
    gap: var(--wpq-space-1-5) !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 var(--wpq-space-4) var(--wpq-space-3) !important;
    text-align: center !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side :is(
      .wpq-public-builder-cta__eyebrow,
      .wpq-public-builder-cta__title,
      .wpq-public-builder-cta__body
    ) {
    position: static !important;
    inset: auto !important;
    justify-self: stretch !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__eyebrow {
    display: block !important;
    font-size: var(--wpq-type-meta) !important;
    line-height: 16px !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__title {
    font-size: var(--wpq-type-control) !important;
    line-height: 22px !important;
    letter-spacing: var(--wpq-tracking-default) !important;
    text-wrap: balance;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__title > span {
    display: block !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__body {
    display: block !important;
    grid-column: auto !important;
    font-size: var(--wpq-type-small) !important;
    line-height: 18px !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side :is(
      .wpq-public-builder-cta__title-lead,
      .wpq-public-builder-cta__title-tail,
      .wpq-public-builder-cta__body-lead,
      .wpq-public-builder-cta__body-tail
    ) {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    letter-spacing: var(--wpq-tracking-default) !important;
    transform: none !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__body > span {
    display: inline !important;
  }

  .wpq-site-main .wpq-public-builder-cta--side .wpq-public-builder-cta__action {
    position: static !important;
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: stretch !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: auto !important;
    margin: 0 var(--wpq-space-4) var(--wpq-space-4-5) !important;
    padding: var(--wpq-space-2-5) var(--wpq-space-3) !important;
    place-items: center !important;
    border-radius: 4px !important;
    background: var(--wpq-color-blue) !important;
    color: var(--wpq-color-surface) !important;
    font-size: var(--wpq-type-copy) !important;
    line-height: 20px !important;
    transform: none !important;
  }
}

/* Glossary intentionally has no divider between its usage and related blocks. */
.wpq-public-hub--glossary .wpq-public-hub__rail > .wpq-hub-rail-panel {
  border-bottom: 0 !important;
}

.wpq-public-hub--glossary .wpq-public-hub__rail > .wpq-glossary-related {
  padding-bottom: 0;
}

.wpq-public-hub--glossary .wpq-glossary-related + .wpq-public-builder-cta {
  margin-top: var(--wpq-space-4-5) !important;
}

/* Update-log timeline owns the full main column; its footer centers to that. */
.wpq-whats-new-primary {
  display: grid;
  min-width: 0;
  gap: var(--wpq-space-3);
}

.wpq-whats-new-timeline-panel__footer {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: center;
}

.wpq-whats-new-entry__badge {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

/* Keep the page-added semantic blue while meeting normal-text contrast at the
 * approved compact badge sizes. The older var(--wpq-color-blue) token is only 3.63:1 on
 * var(--wpq-color-blue-subtle) and is therefore not valid for either the 8px mobile or 11.5px
 * desktop label. */
.wpq-whats-new-entry__badge--sky {
  color: #2563c7 !important;
}

.wpq-whats-new-entry--sky .wpq-whats-new-entry__icon {
  color: #2563c7 !important;
}

.wpq-whats-new-entry__meta h2 {
  flex: 1 1 auto;
}

/* The approved update log is an almost-white paper surface. Its timeline is a
 * quiet var(--wpq-color-line) connector with the dot ring cut from that same paper, not the
 * darker gray site gradient that older route styles exposed. */
body:has(.wpq-whats-new-shell),
body:has(.wpq-whats-new-shell) .wpq-site-main {
  background: var(--wpq-paper) !important;
}

.wpq-whats-new-entry__dot::before {
  background: var(--wpq-color-line) !important;
}

.wpq-whats-new-entry__dot::after {
  border-color: #fdfdfd !important;
}

.wpq-whats-new-entry__card {
  border: 0 !important;
  border-bottom: 1px solid var(--wpq-color-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.wpq-whats-new-entry:last-child .wpq-whats-new-entry__card {
  border-bottom: 0 !important;
}

.wpq-whats-new-entry__row-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.wpq-whats-new-entry__row-link:is(:hover, :focus-visible) .wpq-whats-new-entry__card {
  background: var(--wpq-color-surface-subtle) !important;
  color: inherit;
  text-decoration: none;
}

.wpq-whats-new-entry__row-link:focus-visible {
  outline: 0;
}

.wpq-whats-new-entry__content,
.wpq-whats-new-entry__meta,
.wpq-whats-new-entry__meta h2 {
  min-width: 0;
}

.wpq-whats-new-entry__badge {
  flex: 0 0 auto;
}

.wpq-whats-new-entry__action {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  justify-self: end;
  gap: var(--wpq-space-1);
  min-height: 32px;
  color: var(--wpq-color-blue);
  font-size: var(--wpq-type-micro-floor);
  font-weight: var(--wpq-weight-bold);
  line-height: 12px;
  white-space: nowrap;
}

.wpq-whats-new-entry__action svg {
  width: 12px;
  height: 12px;
}

/* Keep the real update date aligned at the end of each compact Home row. */
@media (min-width: 1024px) {
  .home .wpq-home-news-item__meta {
    display: inline-flex;
    width: auto;
    justify-content: end;
    justify-self: end;
    font-variant-numeric: tabular-nums;
  }
}

/* At the intermediate desktop shell the complete sentence does not fit on a
 * single line. Break only between the two authored lines, never inside the
 * blue accent phrase. */
@media (min-width: 1024px) and (max-width: 1315px) {
  .home .wpq-home-hero__line {
    display: block !important;
    white-space: nowrap !important;
  }
}

/* Roadmap connectors are intentional in the approved part: horizontal on
 * desktop and vertical on narrow screens. Match the approved quiet line while
 * removing only the obsolete white halo around each opaque step circle. */
.wpq-roadmap__list::before,
.wpq-roadmap__item::before {
  background: var(--wpq-color-line) !important;
}

.wpq-roadmap__index {
  box-shadow: none !important;
}

.wpq-roadmap__item--done .wpq-roadmap__index {
  border-color: var(--wpq-color-green-text) !important;
  background: var(--wpq-color-green-text) !important;
}

@media (max-width: 767px) {
  .wpq-reference-hub .wpq-page-breadcrumb {
    font-size: var(--wpq-type-small);
    line-height: 20px;
  }

  :is(
      .wpq-home-side,
      .wpq-public-hub__rail,
      .wpq-public-discovery__rail,
      .wpq-archive-side,
      .wpq-official-reference-v1__rail,
      .wpq-cheatsheet-v1__rail,
      .wpq-trust-v1__rail,
      .wpq-contact-v1__rail,
      .wpq-privacy-v1__rail,
      .wpq-sitemap-v1__rail,
      .wpq-side-rail,
      .side-rail,
      .wpq-popular-rail,
      .wpq-whats-new-side
    ) > .wpq-public-builder-cta.wpq-public-builder-cta--side {
    border-color: #8bb4f9 !important;
    background: var(--wpq-color-surface-subtle) !important;
  }

  /* This authored tail fits at 390px but not at 375px once the approved page
   * gutters are included. Allow the natural wrap at the narrower endpoint. */
  @media (max-width: 379px) {
    .wpq-public-hub--map .wpq-map-lead-tail {
      white-space: normal;
    }
  }

  .wpq-whats-new-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .wpq-whats-new-entry {
    grid-template-columns: 8px minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    column-gap: var(--wpq-space-1-5) !important;
    row-gap: var(--wpq-space-0-5) !important;
    min-height: 0;
  }

  .wpq-whats-new-entry__date {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: flex-start;
    gap: 3px;
    padding-top: 0 !important;
    font-size: var(--wpq-type-micro-floor);
    line-height: 12px;
  }

  .wpq-whats-new-entry__date span {
    padding-top: 0;
    font-size: var(--wpq-type-micro-floor);
    line-height: 12px;
  }

  .wpq-whats-new-entry__dot {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .wpq-whats-new-entry__dot::before,
  .wpq-whats-new-entry__dot::after {
    left: 3px;
  }

  .wpq-whats-new-entry__dot::after {
    top: 16px;
    width: 8px;
    height: 8px;
    margin-left: -3px;
    border-width: 2px;
  }

  .wpq-whats-new-entry__card {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 5px 7px !important;
    min-width: 0;
    min-height: 64px !important;
    padding: 7px var(--wpq-space-2) !important;
  }

  .wpq-whats-new-entry__icon {
    grid-column: 1;
    grid-row: 1;
  }

  .wpq-whats-new-entry__content {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .wpq-whats-new-entry__meta {
    display: grid !important;
    justify-items: start;
    gap: var(--wpq-space-0-5) !important;
    min-width: 0;
  }

  .wpq-whats-new-entry__meta h2 {
    width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .wpq-whats-new-entry__badge {
    min-height: 16px;
    padding-inline: 5px;
    font-size: var(--wpq-type-micro-floor);
    line-height: 10px;
    white-space: nowrap;
  }

  .wpq-whats-new-entry__link {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    min-height: 26px;
  }
}

/* Update summary: approved flat section boundaries, with centered groups and
 * internal dividers only. Older route bundles reintroduced outer side borders
 * with !important declarations, so this final shared layer owns all four sides. */
.wpq-whats-new-summary {
  border-top: 1px solid #d2dce9 !important;
  border-right: 0 !important;
  border-bottom: 1px solid #d2dce9 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.wpq-whats-new-summary-card,
.wpq-whats-new-summary-card:last-child {
  grid-template-columns: 34px max-content !important;
  align-content: center;
  justify-content: center;
  border: 0 !important;
  border-right: 1px solid #d2dce9 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.wpq-whats-new-summary-card:last-child {
  border-right: 0 !important;
}

.wpq-whats-new-summary-card__label,
.wpq-whats-new-summary-card__count {
  justify-self: start;
}

/* The RSS trigger keeps the approved rail row geometry. Its panel appears only
 * after activation and gives a complete hand-off to a reader or copy fallback. */
.wpq-rss-subscribe-trigger {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

@media (max-width: 767px) {
  .wpq-whats-new-side .wpq-rss-subscribe-trigger {
    grid-template-columns: 20px minmax(0, 1fr);
    grid-template-rows: minmax(40px, auto);
    min-height: 40px;
    align-items: center;
    gap: var(--wpq-space-1-5);
  }

  .wpq-whats-new-side .wpq-rss-subscribe-trigger::before {
    position: absolute;
    inset: 50% 0 auto;
    width: 100%;
    height: 44px;
    content: "";
    transform: translateY(-50%);
  }

  .wpq-whats-new-side .wpq-rss-subscribe-trigger > svg {
    width: 17px;
    height: 17px;
  }

  .wpq-whats-new-side .wpq-rss-subscribe-trigger > span {
    gap: 0;
  }

  .wpq-whats-new-side .wpq-rss-subscribe-trigger strong {
    font-size: var(--wpq-type-micro-floor);
    line-height: 12px;
  }

  .wpq-whats-new-side .wpq-rss-subscribe-trigger small {
    font-size: var(--wpq-type-micro-floor);
    line-height: 10px;
  }
}

.wpq-rss-subscribe-trigger > svg {
  color: var(--wpq-color-blue);
}

.wpq-rss-subscribe-panel[hidden] {
  display: none !important;
}

.wpq-rss-subscribe-panel {
  display: grid;
  gap: var(--wpq-space-2);
  margin: -4px 0 var(--wpq-space-2-5) var(--wpq-space-7);
  padding: var(--wpq-space-2-5) 0 0;
  border-top: 1px solid var(--wpq-color-line);
}

.wpq-rss-subscribe-panel > p {
  margin: 0;
  color: var(--wpq-color-copy);
  font-size: var(--wpq-type-meta);
  line-height: 1.55;
}

.wpq-rss-subscribe-panel__actions {
  display: grid;
  gap: var(--wpq-space-1-5);
}

.wpq-rss-subscribe-panel__actions > :is(a, button) {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: var(--wpq-space-2);
  margin: 0;
  padding: var(--wpq-space-1-5) var(--wpq-space-2);
  border: 1px solid var(--wpq-color-line);
  border-radius: 4px;
  appearance: none;
  background: var(--wpq-color-surface);
  color: var(--wpq-color-blue);
  font: var(--wpq-weight-bold) var(--wpq-type-meta)/1.4 var(--wpq-font-ui);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.wpq-rss-subscribe-panel__actions > :is(a, button):is(:hover, :focus-visible) {
  border-color: var(--wpq-color-blue);
  background: var(--wpq-color-surface-subtle);
  text-decoration: none;
}

.wpq-rss-subscribe-panel__actions svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.wpq-rss-subscribe-panel__status {
  margin: 0 !important;
  color: #0f8060 !important;
  font-size: var(--wpq-type-micro-floor) !important;
  line-height: 1.4 !important;
}

.wpq-rss-subscribe-panel__status:empty {
  display: none;
}

/* Five update counters fill every row: 3 + 2 on the wide approved layout,
 * 2 + 2 + 1 on intermediate widths, then one column on phones. */
@media (min-width: 900px) {
  .wpq-whats-new-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child {
    grid-column: span 2;
    border: 0 !important;
  }

  .wpq-whats-new-summary-card:nth-child(4),
  .wpq-whats-new-summary-card:nth-child(5) {
    grid-column: span 3;
  }

  .wpq-whats-new-summary-card:nth-child(1),
  .wpq-whats-new-summary-card:nth-child(2),
  .wpq-whats-new-summary-card:nth-child(4) {
    border-right: 1px solid #d2dce9 !important;
  }

  .wpq-whats-new-summary-card:nth-child(-n + 3) {
    border-bottom: 1px solid #d2dce9 !important;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .wpq-whats-new-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child {
    grid-column: auto !important;
    border: 0 !important;
  }

  .wpq-whats-new-summary-card:nth-child(4) {
    grid-column: auto !important;
  }

  .wpq-whats-new-summary-card:nth-child(5) {
    grid-column: 1 / -1 !important;
  }

  .wpq-whats-new-summary-card:nth-child(odd):not(:last-child) {
    border-right: 1px solid #d2dce9 !important;
  }

  .wpq-whats-new-summary-card:nth-child(-n + 4) {
    border-bottom: 1px solid #d2dce9 !important;
  }
}

@media (max-width: 599px) {
  .wpq-whats-new-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child {
    grid-column: 1 / -1;
    border: 0 !important;
  }

  .wpq-whats-new-summary-card:not(:last-child) {
    border-bottom: 1px solid #d2dce9 !important;
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  body .wpq-site-main .wpq-whats-new-main {
    grid-template-columns: minmax(0, 1fr) 220px !important;
    column-gap: var(--wpq-space-6) !important;
  }

  body .wpq-site-main .wpq-whats-new-side {
    display: grid !important;
    width: 220px !important;
    max-width: 220px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-top: 0 !important;
  }

  body .wpq-site-main .wpq-whats-new-primary {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
}

@media (max-width: 899px) {
  .wpq-whats-new-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .wpq-whats-new-main > .wpq-whats-new-side {
    display: none !important;
  }

  .wpq-whats-new-follow-slot:empty {
    display: none;
  }

  .wpq-whats-new-follow-slot > .wpq-whats-new-follow {
    display: grid !important;
    gap: var(--wpq-space-2) !important;
    margin: 0 !important;
    padding: var(--wpq-space-2) 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--wpq-color-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .wpq-whats-new-follow-slot .wpq-hub-rail-link:not(.wpq-rss-subscribe-trigger) {
    display: none !important;
  }

  .wpq-whats-new-follow-slot .wpq-rss-subscribe-panel {
    margin-left: var(--wpq-space-7);
  }
}

@media (max-width: 767px) {
  .wpq-whats-new-entry__action {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    min-height: 26px;
    font-size: var(--wpq-type-micro-floor);
  }

  /* Public mobile pages use the available viewport instead of inheriting the
   * desktop shell's 18px outer gutter plus a second 12-14px inner gutter.
   * This keeps the 390px main column at 362px (over the 340px contract) and
   * lets longer Japanese labels reflow naturally. Header/footer retain their
   * own chrome measurements. */
  :is(
      .wpq-wrap,
      .home .wpq-home-shell,
      .wpq-public-hub,
      .wpq-public-discovery,
      .wpq-popular-shell,
      .wpq-whats-new-shell,
      .wpq-official-reference-v1,
      .wpq-cheatsheet-v1,
      .wpq-trust-v1,
      .wpq-contact-v1,
      .wpq-privacy-v1,
      .wpq-sitemap-v1
    ) {
    width: calc(100% - 28px) !important;
    margin-inline: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  /* The approved glossary rail has no divider and only the normal heading
   * rhythm between the usage steps and related entrances. The shared 18px
   * section padding otherwise compounds into a visible 30px gap. */
  .wpq-public-hub--glossary .wpq-public-hub__rail > .wpq-hub-rail-panel:first-child {
    padding-bottom: 0 !important;
  }

  .wpq-public-hub--glossary .wpq-public-hub__rail > .wpq-glossary-related {
    margin-top: var(--wpq-space-2) !important;
    padding-top: 0 !important;
  }

  .wpq-public-hub--glossary .wpq-glossary-related + .wpq-public-builder-cta {
    margin-top: var(--wpq-space-2) !important;
  }

  /* Mobile rails are a continuation of the main flow. Keep only the explicit
   * per-route rhythm; do not reapply the desktop section padding at every
   * boundary. */
  :is(
      .wpq-home-side,
      .wpq-public-hub__rail,
      .wpq-public-discovery__rail,
      .wpq-archive-side,
      .wpq-official-reference-v1__rail,
      .wpq-cheatsheet-v1__rail,
      .wpq-trust-v1__rail,
      .wpq-contact-v1__rail,
      .wpq-privacy-v1__rail,
      .wpq-sitemap-v1__rail,
      .wpq-side-rail,
      .wpq-popular-rail,
      .wpq-whats-new-side
    ) > :is(section, nav, .wpq-sidebar-widgets) {
    padding-top: 0;
    padding-bottom: 0;
  }

  .wpq-public-discovery--search .wpq-public-discovery__rail > .wpq-hub-rail-panel:first-child,
  .wpq-contact-v1__rail > .wpq-contact-v1__rail-section:first-child {
    padding-bottom: 0;
  }

  .wpq-public-discovery--search .wpq-public-discovery__rail > .wpq-hub-rail-panel + .wpq-hub-rail-panel,
  .wpq-cheatsheet-v1__rail > section + section {
    padding-top: var(--wpq-space-2);
  }

  .wpq-contact-v1__rail > .wpq-contact-v1__rail-section + .wpq-contact-v1__rail-section {
    margin-top: var(--wpq-space-2);
    padding-top: 0;
  }

  .wpq-privacy-v1__related-rail,
  .wpq-privacy-v1__notice-rail {
    padding-block: 0;
  }

  .wpq-privacy-v1__related-rail {
    border-bottom: 0 !important;
  }

  .wpq-privacy-v1__notice-rail {
    margin-top: var(--wpq-space-0-5) !important;
  }

  /* Route shells own their terminal breathing room. Contact and Cheatsheet
   * already end with an approved inset control; the remaining short-gap routes
   * need 30px before the shared 8px footer margin. */
  .wpq-cheatsheet-v1,
  .wpq-contact-v1 {
    padding-bottom: 0 !important;
  }

  .home .wpq-site-main {
    padding-bottom: var(--wpq-space-5) !important;
  }

  :is(.wpq-operator-v1, .wpq-editorial-v1, .wpq-privacy-v1) {
    padding-bottom: 30px !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child {
    grid-template-columns: 14px max-content !important;
    justify-content: center;
  }

  .wpq-rss-subscribe-panel {
    margin-left: 25px;
  }
}

/* Direct mobile-source refinements. These selectors sit at the cascade
 * terminus because the older route sheets contain several late, overlapping
 * endpoint calibrations. Keep each correction component-scoped. */
@media (max-width: 767px) {
  /* Home: all four route entrances share one row contract. The previous two
   * taller rows plus a duplicated grid margin created 42px of cumulative
   * drift before the first article section. */
  .home .wpq-home-primary {
    gap: 0;
  }

  .home .wpq-home-feature-grid {
    margin-bottom: 0;
  }

  .home .wpq-home-feature-card {
    box-sizing: border-box;
    height: 53px;
    min-height: 53px;
    padding: 7px var(--wpq-space-0-5);
  }

  .home .wpq-home-panel--featured {
    margin-top: -18px;
  }

  .home .wpq-home-panel__head,
  .home .wpq-home-panel__head .wpq-section-heading {
    height: 21px;
    min-height: 21px;
  }

  .home .wpq-home-panel__head .wpq-section-heading__icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .home .wpq-home-panel__head .wpq-section-heading__icon svg {
    width: 18px;
    height: 18px;
  }

  /* WP_Query map: route rows 3 and 4 inherited generic 62px padding while
   * the approved route component uses one 55px row. Preserve its intentional
   * inter-row offsets, then return the first section heading to 21px. */
  .wpq-public-hub--map .wpq-hub-route {
    box-sizing: border-box;
    height: 55px;
    min-height: 55px;
    padding: var(--wpq-space-0-5) var(--wpq-space-5) var(--wpq-space-0-5) var(--wpq-space-1);
  }

  .wpq-public-hub--map .wpq-hub-section > .wpq-section-heading {
    height: 21px;
    min-height: 21px;
    padding-bottom: 0;
  }

  .wpq-public-hub--map .wpq-hub-section > .wpq-section-heading .wpq-section-heading__icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .wpq-public-hub--map .wpq-hub-section > .wpq-section-heading .wpq-section-heading__icon svg {
    width: 18px;
    height: 18px;
  }

  /* Troubleshooting: the old absolute-positioned 44px hit-area calibration
   * moved the visible submit button over the search icon. The visible control
   * is a compact right-button grid; its pseudo hit area remains 44px. */
  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-search,
      .wpq-trouble-classifications,
      .wpq-trouble-recommended,
      .wpq-trouble-results
    ) {
    gap: 0;
  }

  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-search,
      .wpq-trouble-classifications
    ) > .wpq-section-heading {
    height: 15px;
    min-height: 15px;
  }

  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-search,
      .wpq-trouble-classifications
    ) > .wpq-section-heading .wpq-section-heading__icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-search,
      .wpq-trouble-classifications
    ) > .wpq-section-heading .wpq-section-heading__icon svg {
    width: 15px;
    height: 15px;
  }

  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-recommended,
      .wpq-trouble-results
    ) .wpq-section-heading,
  .wpq-public-hub--troubleshooting .wpq-trouble-results__head {
    height: 19px;
    min-height: 19px;
  }

  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-recommended,
      .wpq-trouble-results
    ) .wpq-section-heading__icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .wpq-public-hub--troubleshooting :is(
      .wpq-trouble-recommended,
      .wpq-trouble-results
    ) .wpq-section-heading__icon svg {
    width: 17px;
    height: 17px;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 60px;
    width: 100%;
    height: 30px;
    min-height: 30px;
    align-items: center;
    margin-top: 3px;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form > span {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 32px;
    height: 30px;
    top: auto;
    transform: none;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form > input[type="search"] {
    position: static;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 30px;
    min-height: 30px;
    padding: 0 var(--wpq-space-2) 0 var(--wpq-space-1);
    transform: none;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form > button {
    position: static;
    grid-column: 3;
    grid-row: 1;
    width: 60px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    background: var(--wpq-hub-blue);
    top: auto;
    transform: none;
  }

  /* Contact keeps the sitewide readable H1, but removes duplicated intro
   * spacing. Compact heading icons restore the approved form-row and rail
   * anchors without shrinking form labels or controls. */
  .wpq-contact-v1__intro {
    margin-bottom: 0;
  }

  .wpq-contact-v1__section-head .wpq-section-heading {
    height: 14px;
    min-height: 14px;
  }

  .wpq-contact-v1__section-head .wpq-section-heading__icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  .wpq-contact-v1__section-head .wpq-section-heading__icon svg {
    width: 14px;
    height: 14px;
  }
}
/* Interactive filters rely on the native hidden state. Keep it stronger than
 * legacy layout declarations such as `display: grid` on result rows. */
[hidden] {
  display: none !important;
}

/* Final conflict resolutions. These are shared component contracts whose
 * earlier declarations lose to more specific legacy selectors. Keep them
 * together so DevTools exposes one deliberate winning rule per component. */
.wpq-pagination .page-numbers:is(.prev, .next) {
  box-sizing: border-box;
  width: 56px;
  min-width: 56px;
  padding: 0;
}

@media (min-width: 1024px) {
  /* The frequent-reference list is one full-width matrix, not two cards.
   * A two-column outer grid combined with the old fixed five-column article
   * template produced more than 500px of horizontal overflow. */
  .wpq-official-reference-frequent > div {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  .wpq-official-reference-frequent article {
    width: 100%;
    grid-template-columns: 30px minmax(130px, 0.7fr) minmax(0, 1.45fr) max-content max-content;
    gap: var(--wpq-space-3);
  }

  .wpq-official-reference-frequent article > span:first-child {
    grid-row: auto;
  }

  .wpq-official-reference-frequent article:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--wpq-ui-line-soft);
  }

  .wpq-official-reference-frequent article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 767px) {
  .wpq-pagination .page-numbers:is(.prev, .next) {
    width: 44px;
    min-width: 44px;
  }

  .wpq-public-hub--map .wpq-map-lead-tail {
    white-space: normal;
  }

  /* The approved 390px map lead is three lines. Its authored second sentence
   * fits as one line at 375px once the optical type size is corrected; narrower
   * widths still wrap naturally without horizontal overflow. */
  .wpq-public-hub--map .wpq-public-hub__intro > p:last-child {
    font-size: var(--wpq-type-micro-floor);
    line-height: 15.5px;
  }

  .wpq-site-main .wpq-cheatsheet-v1 .wpq-cheatsheet-v1__intro h1 {
    font-size: var(--wpq-type-heading);
    line-height: 19.7px;
  }

  .wpq-site-main .wpq-sitemap-v1 .wpq-sitemap-v1__intro h1 {
    font-size: var(--wpq-type-heading);
    line-height: 22.2px;
  }

  /* 19px heading + two 27px rows = the approved 73px index block. */
  .wpq-public-hub--glossary .wpq-glossary-index > .wpq-section-heading {
    height: 19px;
    min-height: 19px;
  }

  .wpq-public-hub--glossary .wpq-glossary-index {
    border-bottom: 0;
  }

  .wpq-public-hub--glossary .wpq-glossary-index > .wpq-section-heading .wpq-section-heading__icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .wpq-public-hub--glossary .wpq-glossary-index > .wpq-section-heading .wpq-section-heading__icon svg {
    width: 17px;
    height: 17px;
  }
}

/* Header width budget. Keep utility actions available while the 600px+
 * two-row header still has room; below that point the same actions remain in
 * the labelled menu panel. The brand anchor never expands into unused cells. */
@media (min-width: 640px) and (max-width: 1023px) {
  .wpq-nav-shell--top {
    display: grid !important;
    grid-template-columns: clamp(160px, 22vw, 220px) minmax(190px, 1fr) 140px 68px !important;
    gap: var(--wpq-space-1) !important;
    min-height: 58px !important;
  }

  .wpq-nav-shell--top > .wpq-brand {
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    gap: var(--wpq-space-2);
    overflow: visible;
  }

  .wpq-brand__logo--icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .wpq-brand__name {
    font-size: clamp(0.875rem, 1.7vw, 1.05rem);
  }

  .wpq-brand__tagline {
    display: none;
  }

  .wpq-header-utility {
    display: flex !important;
    justify-content: flex-end;
    gap: var(--wpq-space-1);
    margin: 0;
    min-width: 0;
  }

  .wpq-header-utility a {
    gap: 3px;
    min-height: 44px;
    padding-inline: var(--wpq-space-0-5);
    font-size: var(--wpq-type-micro-floor);
    line-height: 1.2;
  }

  .wpq-header-utility svg {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }

  .wpq-builder-cta:not(.wpq-builder-cta--panel) {
    display: grid !important;
    box-sizing: border-box;
    width: 140px !important;
    min-width: 140px !important;
    min-height: 44px !important;
    grid-template-columns: 14px minmax(0, 1fr) !important;
    gap: var(--wpq-space-1-5) !important;
    padding: var(--wpq-space-2) var(--wpq-space-2-5) !important;
  }

  .wpq-builder-cta:not(.wpq-builder-cta--panel) .wpq-builder-cta__icon,
  .wpq-builder-cta:not(.wpq-builder-cta--panel) .wpq-builder-cta__icon svg {
    width: 14px;
    height: 14px;
  }

  .wpq-builder-cta:not(.wpq-builder-cta--panel) .wpq-builder-cta__label {
    font-size: var(--wpq-type-meta);
    line-height: 1.2;
    white-space: nowrap;
  }

  .wpq-builder-cta:not(.wpq-builder-cta--panel) .wpq-builder-cta__arrow {
    display: none;
  }

  .wpq-nav-shell--top > .wpq-nav-search-link {
    display: inline-flex !important;
    box-sizing: border-box;
    width: 68px !important;
    min-width: 68px !important;
    height: 44px !important;
    min-height: 44px !important;
    justify-content: center !important;
    gap: var(--wpq-space-1) !important;
    padding: 0 var(--wpq-space-1-5) !important;
    font-size: var(--wpq-type-micro-floor);
  }

  .wpq-mobile-search-link,
  .wpq-nav-toggle {
    display: none !important;
  }
}

@media (max-width: 639px) {
  .wpq-nav-shell--top > .wpq-brand {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
  }

  .wpq-nav-toggle {
    display: grid !important;
  }

  .wpq-nav-shell--bottom {
    display: none !important;
  }
}

/* Troubleshooting search uses the same three-column control contract as the
 * approved Glossary search. Earlier source layers reset its input/button to
 * columns 1/2, leaving the rightmost track empty. */
.wpq-public-hub--troubleshooting .wpq-trouble-search form {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 104px;
  width: 100%;
  height: 58px;
  min-height: 58px;
  align-items: stretch;
  margin-top: 0;
}

.wpq-public-hub--troubleshooting .wpq-trouble-search form > span {
  position: static;
  grid-column: 1;
  grid-row: 1;
  width: auto;
  height: 56px;
  top: auto;
  transform: none;
}

.wpq-public-hub--troubleshooting .wpq-trouble-search form > input[type="search"] {
  position: static;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 var(--wpq-space-3) 0 0;
  transform: none;
}

.wpq-public-hub--troubleshooting .wpq-trouble-search form > button {
  position: static;
  grid-column: 3;
  grid-row: 1;
  width: auto;
  min-width: 104px;
  height: auto;
  min-height: 56px;
  padding-inline: 15px;
  top: auto;
  transform: none;
}

.wpq-public-hub--troubleshooting .wpq-trouble-recommended__lead {
  max-width: 760px;
  margin: 7px 0 var(--wpq-space-1);
  color: var(--wpq-color-muted);
  font-size: var(--wpq-type-small-strong);
  line-height: 1.7;
}

.wpq-public-hub--troubleshooting .wpq-trouble-symptom-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}

.wpq-public-hub--troubleshooting .wpq-trouble-symptom-list > a,
.wpq-public-hub--troubleshooting .wpq-trouble-symptom-list > a > span:last-child {
  min-width: 0;
}

.wpq-public-hub--troubleshooting .wpq-trouble-symptom-list__icon {
  align-self: stretch;
  display: grid;
  height: auto;
  place-items: center;
}

.wpq-public-hub--troubleshooting .wpq-trouble-symptom-list__icon > svg {
  display: block;
}

.wpq-public-hub--troubleshooting .wpq-trouble-results > .wpq-trouble-classifications {
  margin-top: var(--wpq-space-3);
}

@media (max-width: 767px) {
  .wpq-public-hub--troubleshooting .wpq-trouble-search form {
    grid-template-columns: 28px minmax(0, 1fr) 52px;
    height: 32px;
    min-height: 32px;
    margin-top: 3px;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form > span,
  .wpq-public-hub--troubleshooting .wpq-trouble-search form > input[type="search"],
  .wpq-public-hub--troubleshooting .wpq-trouble-search form > button {
    height: 32px;
    min-height: 32px;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form > input[type="search"] {
    padding: 0 var(--wpq-space-1);
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-search form > button {
    width: auto;
    min-width: 52px;
    padding: 0 var(--wpq-space-1);
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-recommended__lead {
    margin-top: 5px;
    font-size: var(--wpq-type-meta);
    line-height: 1.55;
  }

  .wpq-public-hub--troubleshooting .wpq-trouble-symptom-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Articles has three adjacent listing boundaries in older layers. The result
 * toolbar, list wrapper and first card must start as one continuous region. */
.wpq-public-discovery--articles .wpq-archive-result-toolbar {
  border-bottom: 0;
}

.wpq-public-discovery--articles .wpq-archive-card-list,
.wpq-public-discovery--articles .wpq-archive-card-list > .wpq-archive-card:first-child {
  border-top: 0;
}

/* Keep the compact update search inside its declared grid track. A shared
 * button min-width was 10px wider than the 58px track and leaked to the right. */
.wpq-whats-new-search > button {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  padding-inline: 0;
}

.wpq-public-discovery--articles .wpq-archive-journeys__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wpq-space-3);
}

.wpq-public-discovery--articles .wpq-archive-journeys__reset {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: var(--wpq-color-blue);
  font-size: var(--wpq-type-small);
  font-weight: var(--wpq-weight-bold);
  line-height: 1.4;
  text-decoration: none;
}

.wpq-public-discovery--articles .wpq-archive-journeys__reset[aria-current="page"] {
  color: #5a6b82;
  pointer-events: none;
}

.wpq-public-discovery--articles .wpq-archive-sort__trigger {
  position: relative;
  z-index: 1;
  min-height: 24px;
}

.wpq-public-discovery--articles .wpq-archive-journeys__links > a:first-child {
  border-left: 0 !important;
}

.wpq-public-discovery--articles .wpq-archive-journeys__links > a:last-child {
  border-right: 0 !important;
}

.wpq-public-discovery--articles .wpq-archive-category-route {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: var(--wpq-space-2-5);
  align-items: center;
  min-height: 54px;
  padding: var(--wpq-space-2) var(--wpq-space-3);
  border-block: 1px solid #d8e3f1;
  color: var(--wpq-color-ink);
  text-decoration: none;
}

.wpq-public-discovery--articles .wpq-archive-category-route > svg:first-child {
  width: 22px;
  height: 22px;
  color: var(--wpq-color-blue);
}

.wpq-public-discovery--articles .wpq-archive-category-route > svg:last-child {
  width: 16px;
  height: 16px;
  color: var(--wpq-color-blue);
}

.wpq-public-discovery--articles .wpq-archive-category-route > span {
  display: grid;
  gap: var(--wpq-space-0-5);
  min-width: 0;
}

.wpq-public-discovery--articles .wpq-archive-category-route strong {
  font-size: var(--wpq-type-copy);
  line-height: 1.35;
}

.wpq-public-discovery--articles .wpq-archive-category-route small {
  color: #5a6b82;
  font-size: var(--wpq-type-meta);
  line-height: 1.45;
}

@media (max-width: 767px) {
  .wpq-public-discovery--articles .wpq-archive-journeys__reset {
    font-size: var(--wpq-type-meta);
  }

  .wpq-public-discovery--articles .wpq-archive-category-route {
    grid-template-columns: 20px minmax(0, 1fr) 14px;
    min-height: 44px;
    gap: 7px;
    padding: 5px var(--wpq-space-1);
  }

  .wpq-public-discovery--articles .wpq-archive-category-route > svg:first-child {
    width: 18px;
    height: 18px;
  }

  .wpq-public-discovery--articles .wpq-archive-category-route strong {
    font-size: var(--wpq-type-label);
  }

  .wpq-public-discovery--articles .wpq-archive-category-route small {
    font-size: var(--wpq-type-micro-floor);
  }
}

/* The shared footer is the same component on every public route. Keep its
 * navigation as a true single column on phone widths; an earlier two-column
 * optimization overrode the design-system contract because this file loads
 * later in the cascade. */
@media (max-width: 639px) {
  .wpq-footer-menu,
  .wpq-footer-meta-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .wpq-footer-meta-note {
    text-align: left;
  }
}

/* Semantic accents stay recognizable while small text remains WCAG AA on the
 * shared white canvas. The brighter approved hues remain available for icons
 * and rules, where text contrast does not apply. */
.wpq-hub-section--green .wpq-hub-section__head h2,
.wpq-glossary-group--basic > strong {
  color: var(--wpq-color-green-text);
}

.wpq-hub-section--orange .wpq-hub-section__head h2,
.wpq-glossary-group--troubleshooting > strong {
  color: var(--wpq-color-orange);
}

.wpq-side-meta dt,
.sidebar-meta-list span {
  color: var(--wpq-color-muted);
}

.popular-date {
  color: var(--wpq-color-muted);
}

/* Task D update-history contract.
 * Five counters stay on one row when the main column can hold them, then use
 * intentional 3+2 and 2+2+1 compositions. This replaces the earlier
 * "900px and up is always 3+2" rule that produced the supplied wide-screen
 * breakage. The timeline anchor owns the complete row hit area, including the
 * date and marker as one semantic link, without nested links. */
.wpq-whats-new-entry {
  position: relative;
}

.wpq-whats-new-entry:has(.wpq-whats-new-entry__row-link:focus-visible) {
  outline: 3px solid rgba(7, 91, 242, 0.34);
  outline-offset: 3px;
}

@media (min-width: 1200px) {
  .wpq-whats-new-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child,
  .wpq-whats-new-summary-card:nth-child(4),
  .wpq-whats-new-summary-card:nth-child(5) {
    grid-column: auto !important;
    border: 0 !important;
    border-right: 1px solid #d2dce9 !important;
    border-bottom: 0 !important;
  }

  .wpq-whats-new-summary-card:last-child {
    border-right: 0 !important;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .wpq-whats-new-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child {
    grid-column: span 2 !important;
    border: 0 !important;
  }

  .wpq-whats-new-summary-card:nth-child(4),
  .wpq-whats-new-summary-card:nth-child(5) {
    grid-column: span 3 !important;
  }

  .wpq-whats-new-summary-card:nth-child(1),
  .wpq-whats-new-summary-card:nth-child(2),
  .wpq-whats-new-summary-card:nth-child(4) {
    border-right: 1px solid #d2dce9 !important;
  }

  .wpq-whats-new-summary-card:nth-child(-n + 3) {
    border-bottom: 1px solid #d2dce9 !important;
  }
}

@media (max-width: 899px) {
  .wpq-whats-new-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child,
  .wpq-whats-new-summary-card:nth-child(4) {
    grid-column: auto !important;
    border: 0 !important;
  }

  .wpq-whats-new-summary-card:nth-child(5) {
    grid-column: 1 / -1 !important;
  }

  .wpq-whats-new-summary-card:nth-child(odd):not(:last-child) {
    border-right: 1px solid #d2dce9 !important;
  }

  .wpq-whats-new-summary-card:nth-child(-n + 4) {
    border-bottom: 1px solid #d2dce9 !important;
  }
}

@media (max-width: 599px) {
  .wpq-whats-new-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .wpq-whats-new-summary-card,
  .wpq-whats-new-summary-card:last-child {
    grid-column: auto !important;
    min-height: 58px !important;
    padding: 7px var(--wpq-space-2) !important;
  }

  .wpq-whats-new-summary-card:nth-child(5) {
    grid-column: 1 / -1 !important;
  }

  .wpq-whats-new-summary-card:nth-child(odd):not(:last-child) {
    border-right: 1px solid #d2dce9 !important;
  }

  .wpq-whats-new-summary-card:nth-child(-n + 4) {
    border-bottom: 1px solid #d2dce9 !important;
  }

  .wpq-whats-new-summary-card__icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .wpq-whats-new-summary-card__label {
    font-size: var(--wpq-type-meta) !important;
    line-height: 1.35 !important;
  }

  .wpq-whats-new-summary-card__count,
  .wpq-whats-new-summary-card__count strong {
    line-height: 1.2 !important;
  }

  .wpq-whats-new-summary-card__count {
    font-size: var(--wpq-type-micro-floor) !important;
  }

  .wpq-whats-new-summary-card__count strong {
    font-size: var(--wpq-type-subheading) !important;
  }

  .wpq-whats-new-summary-meta,
  .wpq-whats-new-summary__footnote {
    font-size: var(--wpq-type-meta) !important;
    line-height: 1.5 !important;
  }

  .wpq-whats-new-entry__date,
  .wpq-whats-new-entry__date span {
    font-size: var(--wpq-type-meta) !important;
    line-height: 1.4 !important;
  }

  .wpq-whats-new-entry__badge {
    min-height: 20px !important;
    padding-inline: 7px !important;
    font-size: var(--wpq-type-micro-floor) !important;
    line-height: 1.25 !important;
  }

  .wpq-whats-new-entry__meta h2 {
    font-size: var(--wpq-type-copy) !important;
    line-height: 1.5 !important;
  }

  .wpq-whats-new-entry__content p,
  .wpq-whats-new-entry__link,
  .wpq-whats-new-entry__action {
    font-size: var(--wpq-type-meta) !important;
    line-height: 1.5 !important;
  }

  .wpq-whats-new-entry__content p {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

/* Final Task D mobile popular placement. Several historic route selectors set
 * explicit grid areas after the component contract; declare the physical
 * columns here so every card keeps the same thumbnail/body geometry. */
@media (max-width: 767px) {
  .wpq-popular-card-grid .wpq-popular-card__link,
  .wpq-popular-featured-grid .wpq-popular-card:first-child .wpq-popular-card__link,
  .wpq-popular-featured-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__link,
  .wpq-popular-compact-list .wpq-popular-card:nth-child(n + 1) .wpq-popular-card__link {
    grid-template-columns: 116px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 11px !important;
    box-sizing: border-box;
    min-height: 148px !important;
    padding: var(--wpq-space-2-5) 0 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__thumb,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__thumb,
  .wpq-popular-card-grid .wpq-popular-card:nth-child(n + 2) .wpq-popular-card__thumb {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__body,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__body,
  .wpq-popular-card-grid .wpq-popular-card:nth-child(n + 2) .wpq-popular-card__body {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    box-sizing: border-box;
    height: auto !important;
    padding: 0 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__body h2,
  .wpq-popular-card-grid .wpq-popular-card:first-child .wpq-popular-card__body h2 {
    font-size: var(--wpq-type-copy) !important;
    line-height: 1.45 !important;
  }

  .wpq-popular-card-grid .wpq-popular-card__body p,
  .wpq-popular-card-grid .wpq-popular-card:not(:first-child) .wpq-popular-card__body p {
    font-size: var(--wpq-type-meta) !important;
    line-height: 1.52 !important;
  }
}

/* Task D public-page title contract. Route calibration files previously left
 * phone titles anywhere between 15.5px and 23px, including line boxes shorter
 * than their glyphs. Public page heroes now share one scale and weight; the
 * home editorial hero and singular article titles remain distinct roles. */
body .wpq-site-main :is(
    .wpq-public-hub__intro,
    .wpq-public-discovery__intro,
    .wpq-archive-intro,
    .wpq-public-compact-intro,
    .wpq-trust-v1__intro,
    .wpq-contact-v1__intro,
    .wpq-whats-new-hero__copy,
    .wpq-popular-hero__copy,
    .wpq-sitemap-v1__intro,
    .wpq-category-archive-intro__copy
  ) h1,
body .wpq-site-main .wpq-popular-title-row h1,
body .wpq-site-main .wpq-whats-new-hero h1 {
  color: var(--wpq-ink) !important;
  font-family: var(--wpq-font-ui) !important;
  font-size: var(--wpq-ui-h1) !important;
  font-weight: var(--wpq-weight-bold) !important;
  line-height: 1.25 !important;
  letter-spacing: var(--wpq-tracking-default) !important;
}

/* Home uses a larger editorial title size, but it still belongs to the same
 * brand ink contract as every public page heading. */
body .wpq-site-main .wpq-home-hero h1 {
  color: var(--wpq-ink) !important;
}

@media (max-width: 767px) {
  body .wpq-site-main :is(
      .wpq-public-hub__intro,
      .wpq-public-discovery__intro,
      .wpq-archive-intro,
      .wpq-public-compact-intro,
      .wpq-trust-v1__intro,
      .wpq-contact-v1__intro,
      .wpq-whats-new-hero__copy,
      .wpq-popular-hero__copy,
      .wpq-sitemap-v1__intro,
      .wpq-category-archive-intro__copy
    ) h1,
  body .wpq-site-main .wpq-popular-title-row h1,
  body .wpq-site-main .wpq-whats-new-hero h1 {
    line-height: 1.3 !important;
    letter-spacing: var(--wpq-tracking-default) !important;
  }
}
