/*
 * Article layout and editorial styles.
 *
 * The design reference styles everything inline — 367 style attributes, no
 * stylesheet — so this is a translation, not a copy: every value below comes
 * from that reference or from theme.json, and nothing is invented. Colours are
 * referenced through the palette so a token change reaches every block.
 */

:root {
  --sb-nav-height: 70px;
  --sb-nav-spacer: 71px;
  --sb-scroll-offset: 96px;
  --sb-content: 760px;
  --sb-sidebar: 280px;
  --sb-gap: 56px;
  --sb-shell: 1180px;
  --sb-side-padding: 28px;
  --sb-focus: rgba(56, 169, 224, 0.55);
}

/* One offset, not two: `scroll-padding-top` here and `scroll-margin-top` on the
   headings would add up, landing every anchor 192px below the header instead of
   96px. This one covers every anchor on the page, including plain hash links. */
html {
  scroll-padding-top: var(--sb-scroll-offset);
}

/* The header is fixed; this is the space the marketing pages reserve for it. */
.sb-nav-spacer {
  height: var(--sb-nav-spacer);
}

/* Keyboard focus must stay visible everywhere — WCAG 2.2 AA. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--sb-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── Shell ────────────────────────────────────────────────────────────────── */

.sb-shell {
  max-width: var(--sb-shell);
  margin-inline: auto;
  padding-inline: var(--sb-side-padding);
}

.sb-article-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--sb-content)) var(--sb-sidebar);
  gap: var(--sb-gap);
  align-items: start;
}

.sb-sidebar {
  position: sticky;
  top: var(--sb-scroll-offset);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* The sidebar holds the contents list and the share card; below this width
   there is no room for it, and the contents move into a disclosure above the
   article instead. This has to come after the rule above — same specificity,
   so source order decides. */
@media (max-width: 1000px) {
  .sb-article-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sb-sidebar {
    display: none;
  }
}

/* ── Reading progress ─────────────────────────────────────────────────────── */

.sb-progress {
  position: fixed;
  top: var(--sb-nav-height);
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}

.sb-progress__bar {
  height: 100%;
  width: 0;
  background: var(--wp--preset--gradient--reading-progress, linear-gradient(90deg, #1f95d2, #38a9e0));
  transform-origin: left center;
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */

.sb-breadcrumbs {
  padding-block: 22px;
  font-size: 14px;
  color: var(--wp--preset--color--meta);
}

/* The trail is an <ol> for assistive technology; visually it is a row, not a
   numbered list. */
.sb-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sb-breadcrumbs a {
  color: var(--wp--preset--color--secondary);
  font-weight: 600;
  text-decoration: none;
}

.sb-breadcrumbs a:hover {
  color: var(--wp--preset--color--brand);
}

.sb-breadcrumbs [aria-current='page'] {
  color: var(--wp--preset--color--meta);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.sb-hero {
  position: relative;
  border-radius: var(--wp--custom--radius--card, 20px);
  overflow: hidden;
  background: var(--wp--preset--gradient--panel-dark);
  min-height: 470px;
  display: flex;
  align-items: flex-end;
}

.sb-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim: the title sits on a photograph and has to stay legible whatever the
   photograph is. Strength is editor-controlled (--sb-overlay). */
.sb-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 20, 30, calc(var(--sb-overlay, 0.55) * 0.35)) 0%,
    rgba(11, 20, 30, var(--sb-overlay, 0.55)) 100%
  );
}

.sb-hero__inner {
  position: relative;
  padding: 48px;
  max-width: 780px;
  color: #fff;
}

.sb-hero__inner :where(h1) {
  color: #fff;
  margin: 0 0 16px;
}

.sb-hero__excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #dfe9f2;
  margin: 0 0 22px;
}

/* Only the "title over image" variant sits on a dark panel. The other two put
   the title on the page background, so the panel — and the height reserved for
   a picture — have to go, or the heading is dark text on a dark box. */
.sb-hero--above,
.sb-hero--none {
  background: none;
  min-height: 0;
  border-radius: 0;
  display: block;
}

.sb-hero--above .sb-hero__inner,
.sb-hero--none .sb-hero__inner {
  color: inherit;
  padding: 16px 0 8px;
}

.sb-hero--above .sb-eyebrow,
.sb-hero--none .sb-eyebrow {
  background: var(--wp--preset--color--tint);
  border: 1px solid var(--wp--preset--color--info-border);
  /* on the #F2F8FC tile brand-deep is 4.35:1, just under AA; brand-hover is
     5.34:1 and the same blue family. */
  color: var(--wp--preset--color--brand-hover);
  margin-bottom: 18px;
}

.sb-hero--above .sb-hero__excerpt,
.sb-hero--none .sb-hero__excerpt {
  color: var(--wp--preset--color--secondary);
}

.sb-hero--above .sb-meta,
.sb-hero--none .sb-meta {
  color: var(--wp--preset--color--meta);
}

.sb-hero--above .sb-meta__author,
.sb-hero--none .sb-meta__author {
  color: var(--wp--preset--color--ink);
}

/* In this variant the picture follows the title instead of sitting behind it. */
.sb-hero__media--above {
  position: static;
  height: auto;
  aspect-ratio: 16 / 7;
  border-radius: var(--wp--custom--radius--card, 20px);
  margin-top: 8px;
}

.sb-hero--above .sb-hero__inner :where(h1),
.sb-hero--none .sb-hero__inner :where(h1) {
  color: var(--wp--preset--color--ink);
}

@media (max-width: 700px) {
  .sb-hero {
    min-height: 360px;
  }
  .sb-hero__inner {
    padding: 26px;
  }
}

.sb-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--wp--custom--radius--pill, 24px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Scoped to the variant rather than to .sb-hero: the other two variants sit on
   the page background, and a rule keyed on .sb-hero would win by source order
   and paint the badge white on white. */
.sb-hero--over .sb-eyebrow {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff;
  margin-bottom: 20px;
}

/* ── Article meta ─────────────────────────────────────────────────────────── */

.sb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--wp--preset--color--meta);
}

.sb-meta__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.sb-meta__author {
  font-weight: 700;
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

.sb-hero--over .sb-meta {
  color: #c9d7e3;
}

.sb-hero--over .sb-meta__author {
  color: #fff;
}

/* ── Article body ─────────────────────────────────────────────────────────── */

.sb-article {
  max-width: var(--sb-content);
}

.sb-article > * + * {
  margin-top: 22px;
}

.sb-article :where(h2) {
  margin-top: 48px;
}

.sb-article :where(h3) {
  margin-top: 34px;
}

.sb-article :where(ul, ol) {
  padding-left: 22px;
}

.sb-article :where(li) + :where(li) {
  margin-top: 8px;
}

/* Inline links carry the underline; headings and cards never do. */
.sb-article :where(p, li) a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.sb-article :where(figure) {
  margin: 34px 0;
}

.sb-article :where(figcaption) {
  margin-top: 10px;
  font-size: 14px;
  color: var(--wp--preset--color--meta);
}

/* ── Cards shared by sidebar, author box, related ─────────────────────────── */

.sb-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--border-card);
  border-radius: var(--wp--custom--radius--card, 20px);
  box-shadow: var(--wp--preset--shadow--card);
  padding: 22px;
}

/* muted #97A6B4 is 2.49:1 on white — unreadable by the standard the brief
   asks for. meta #5A6B7C is 5.48:1 and is the palette's own text colour. */
.sb-card__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--meta);
  margin: 0 0 14px;
}

/* ── Table of contents ────────────────────────────────────────────────────── */

.sb-toc {
  max-height: calc(100vh - var(--sb-scroll-offset) - 40px);
  overflow-y: auto;
}

.sb-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sb-toc a {
  display: block;
  padding: 9px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 9px 9px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--wp--preset--color--body);
  text-decoration: none;
}

.sb-toc a:hover {
  background: var(--wp--preset--color--tint);
  color: var(--wp--preset--color--brand-deep);
}

/* Scrollspy marks where the reader is, not where they clicked. */
.sb-toc a[aria-current='true'] {
  background: var(--wp--preset--color--tint);
  border-left-color: var(--wp--preset--color--brand);
  color: var(--wp--preset--color--brand-deep);
  font-weight: 700;
}

.sb-toc li li a {
  padding-left: 26px;
  font-size: 14px;
}

/* On narrow screens the sidebar is gone, so contents becomes a disclosure. */
.sb-toc-mobile {
  display: none;
  margin-block: 24px;
}

@media (max-width: 1000px) {
  .sb-toc-mobile {
    display: block;
  }
}

.sb-toc-mobile > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 14px 18px;
  border: 1px solid var(--wp--preset--color--border-card);
  border-radius: 14px;
  background: var(--wp--preset--color--ice);
}

.sb-toc-mobile > summary::-webkit-details-marker {
  display: none;
}

/* ── Share ────────────────────────────────────────────────────────────────── */

.sb-share {
  display: flex;
  gap: 10px;
}

.sb-share a,
.sb-share button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--wp--preset--color--border-strong);
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--secondary);
  cursor: pointer;
}

.sb-share a:hover,
.sb-share button:hover {
  background: var(--wp--preset--color--tint);
  color: var(--wp--preset--color--brand-deep);
}

.sb-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--wp--preset--color--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 80;
}

.sb-toast[data-visible='true'] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Editorial blocks ─────────────────────────────────────────────────────── */

.sb-callout {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid;
  margin: 30px 0;
}

.sb-callout__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

.sb-callout__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.sb-callout p:last-child {
  margin-bottom: 0;
}

.sb-callout--tip,
.sb-callout--example {
  background: var(--wp--preset--color--success-bg);
  border-color: var(--wp--preset--color--success-border);
}
.sb-callout--tip .sb-callout__icon,
.sb-callout--example .sb-callout__icon {
  background: var(--wp--preset--color--success);
}
.sb-callout--tip .sb-callout__label,
.sb-callout--example .sb-callout__label {
  color: var(--wp--preset--color--success-text);
}

.sb-callout--warning {
  background: var(--wp--preset--color--warning-bg);
  border-color: var(--wp--preset--color--warning-border);
}
.sb-callout--warning .sb-callout__icon {
  background: var(--wp--preset--color--warning);
}
.sb-callout--warning .sb-callout__label {
  color: var(--wp--preset--color--warning-text);
}

.sb-callout--note,
.sb-callout--important {
  background: var(--wp--preset--color--info-bg);
  border-color: var(--wp--preset--color--info-border);
}
.sb-callout--note .sb-callout__icon,
.sb-callout--important .sb-callout__icon {
  background: var(--wp--preset--color--brand);
}
.sb-callout--note .sb-callout__label,
.sb-callout--important .sb-callout__label {
  color: var(--wp--preset--color--brand-deep);
}

.sb-takeaway {
  background: var(--wp--preset--gradient--panel-dark);
  color: #fff;
  border-radius: var(--wp--custom--radius--card, 20px);
  padding: 26px 30px;
  margin: 34px 0;
}

.sb-takeaway__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--brand-light);
  margin: 0 0 10px;
}

.sb-takeaway p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

/* Steps: a numbered list with a connector line down the badges. */
.sb-steps {
  counter-reset: sb-step;
  margin: 34px 0;
}

.sb-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 26px;
}

.sb-step:last-child {
  padding-bottom: 0;
}

.sb-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 4px;
  width: 1px;
  background: var(--wp--preset--color--border-strong);
}

.sb-step:last-child::before {
  display: none;
}

.sb-step__badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wp--preset--color--tint-3);
  color: var(--wp--preset--color--brand-deep);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.sb-step__title {
  font-weight: 700;
  color: var(--wp--preset--color--ink);
  margin: 5px 0 6px;
}

/* Comparison table: never widens the page; first column stays put. */
.sb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--wp--preset--color--border-card);
  border-radius: 16px;
  margin: 32px 0;
}

.sb-table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 14px;
}

.sb-table-wrap :where(th, td) {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--wp--preset--color--divider);
}

.sb-table-wrap thead th {
  background: var(--wp--preset--color--ice);
  font-weight: 700;
  color: var(--wp--preset--color--ink);
}

.sb-table-wrap :where(th:first-child, td:first-child) {
  position: sticky;
  left: 0;
  background: var(--wp--preset--color--white);
  font-weight: 600;
}

.sb-table-wrap thead th:first-child {
  background: var(--wp--preset--color--ice);
}

/* Code: dark surface, copy button, horizontal scroll, never auto-run. */
.sb-code {
  position: relative;
  border-radius: var(--wp--custom--radius--code, 16px);
  overflow: hidden;
  margin: 30px 0;
  background: var(--wp--preset--color--ink);
}

.sb-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--wp--preset--color--hairline-on-dark);
}

.sb-code__copy {
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  color: #dce7f1;
  padding: 6px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.sb-code pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 14px;
  line-height: 1.6;
  color: #e6eef6;
}

/* Video façade: a poster and a play button. The player is only injected on
   click, so an embedded video never costs the page its LCP. */
.sb-video {
  position: relative;
  border-radius: var(--wp--custom--radius--card, 20px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--wp--preset--color--ink);
  margin: 32px 0;
}

.sb-video img,
.sb-video iframe,
.sb-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.sb-video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 20, 30, 0.35);
  border: 0;
  cursor: pointer;
}

.sb-video__play span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  place-items: center;
  color: var(--wp--preset--color--ink);
}

/* FAQ: <details> so it works with no JS and is keyboard-operable for free. */
.sb-faq {
  border: 1px solid var(--wp--preset--color--border-card);
  border-radius: 16px;
  overflow: hidden;
  margin: 30px 0;
}

.sb-faq__item + .sb-faq__item {
  border-top: 1px solid var(--wp--preset--color--divider);
}

.sb-faq__item > summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 700;
  color: var(--wp--preset--color--ink);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  align-items: center;
}

.sb-faq__item > summary::-webkit-details-marker {
  display: none;
}

.sb-faq__item > summary::after {
  content: '+';
  font-weight: 700;
  color: var(--wp--preset--color--brand);
}

.sb-faq__item[open] > summary::after {
  content: '−';
}

.sb-faq__answer {
  padding: 0 20px 20px;
}

/* In-article CTA — a panel, deliberately not an ad banner. */
.sb-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: var(--wp--preset--gradient--panel-dark);
  color: #fff;
  border-radius: var(--wp--custom--radius--card, 20px);
  padding: 30px 34px;
  margin: 40px 0;
}

.sb-cta__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--brand-light);
}

.sb-cta h3 {
  color: #fff;
  margin: 8px 0 10px;
}

.sb-cta p {
  color: #c9d7e3;
  margin: 0 0 18px;
}

.sb-cta__mascot {
  width: 150px;
  height: auto;
}

@media (max-width: 700px) {
  .sb-cta {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px;
  }
  .sb-cta__mascot {
    display: none;
  }
}

.sb-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--wp--preset--color--cta);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--wp--preset--shadow--cta);
}

.sb-button:hover {
  background: var(--wp--preset--color--cta-hover);
  color: #fff;
}

.sb-button--ghost {
  background: transparent;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.sb-button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Author, prev/next, related, subscribe ────────────────────────────────── */

.sb-author {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  margin: 44px 0;
}

.sb-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.sb-adjacent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 40px 0;
}

@media (max-width: 700px) {
  .sb-adjacent {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sb-adjacent a {
  text-decoration: none;
  color: inherit;
}

.sb-adjacent__dir {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--meta);
}

.sb-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 1000px) {
  .sb-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sb-related {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Whole card is the link target, not just the title. */
.sb-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, transform 0.18s;
  padding: 0;
}

.sb-post-card:hover {
  box-shadow: var(--wp--preset--shadow--card-hover);
  transform: translateY(-2px);
}

.sb-post-card__media {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.sb-post-card__body {
  padding: 18px 20px 22px;
}

.sb-post-card__cat {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--brand-hover);
}

.sb-post-card h3 {
  margin: 8px 0 10px;
  font-size: 18px;
  line-height: 1.4;
}

.sb-subscribe {
  background: var(--wp--preset--color--ice);
  border: 1px solid var(--wp--preset--color--border-card);
  border-radius: var(--wp--custom--radius--card, 20px);
  padding: 34px;
  margin: 48px 0;
}

.sb-subscribe__form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.sb-subscribe input[type='email'] {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--wp--preset--color--border-strong);
  border-radius: var(--wp--custom--radius--input, 13px);
  font: inherit;
}

.sb-subscribe input[aria-invalid='true'] {
  border-color: var(--wp--preset--color--danger);
}

.sb-subscribe__privacy {
  margin-top: 12px;
  font-size: 12px;
  color: var(--wp--preset--color--meta);
}

/* The honeypot must be reachable by nobody and invisible to everyone. */
.sb-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Tag chips ────────────────────────────────────────────────────────────── */

.sb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.sb-tags a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--wp--custom--radius--pill, 24px);
  background: var(--wp--preset--color--tint);
  color: var(--wp--preset--color--brand-deep);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.sb-tags a:hover {
  background: var(--wp--preset--color--tint-3);
}

/* ── Pull quote ───────────────────────────────────────────────────────────── */

.sb-pullquote {
  margin: 34px 0;
  padding: 26px 30px;
  background: var(--wp--preset--color--ice);
  border-left: 4px solid var(--wp--preset--color--brand);
  border-radius: 0 18px 18px 0;
  position: relative;
}

/* The quote glyph is decoration, so it must not reach the accessibility tree. */
.sb-pullquote::before {
  content: '\201C';
  position: absolute;
  top: 6px;
  right: 22px;
  font-size: 56px;
  /* Decorative quote glyph, absolutely positioned and kept out of the a11y
     tree. line-height: 1 holds its box tight for placement; the standard's
     three line heights govern running text, which this glyph is not. */
  line-height: 1;
  color: var(--wp--preset--color--tint-3);
  pointer-events: none;
}

.sb-pullquote blockquote {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--wp--preset--color--ink);
}

.sb-pullquote__by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--wp--preset--color--meta);
}

.sb-pullquote__by img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.sb-pullquote__name {
  font-weight: 700;
  color: var(--wp--preset--color--ink);
}

.sb-takeaway--mascot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.sb-takeaway__mascot {
  width: 110px;
  height: auto;
}

@media (max-width: 700px) {
  .sb-takeaway--mascot {
    grid-template-columns: minmax(0, 1fr);
  }
  .sb-takeaway__mascot {
    display: none;
  }
}

.sb-step__image {
  margin-top: 12px;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

/* ── Figure and zoom ──────────────────────────────────────────────────────── */

/* The floor for any media inside an article, whatever markup it arrived in.
 * The figure block below styles our own; imported content is not ours: the
 * engine publishes <figure class="wp-block-image"><img width="1536"> and a
 * phone viewport is 390px, so without this the whole page scrolls sideways. */
.sb-article img,
.sb-article iframe,
.sb-article video {
  max-width: 100%;
  height: auto;
}

.sb-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.sb-figure--wide {
  /* Wide and full reach past the 760px measure without overflowing the shell. */
  width: min(1180px, calc(100vw - 2 * var(--sb-side-padding)));
  margin-inline: calc(50% - min(590px, (100vw - 2 * var(--sb-side-padding)) / 2));
}

.sb-figure--full {
  width: calc(100vw - 2 * var(--sb-side-padding));
  margin-inline: calc(50% - (100vw - 2 * var(--sb-side-padding)) / 2);
}

.sb-figure__source {
  color: var(--wp--preset--color--meta);
}

.sb-zoom {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  width: 100%;
}

.sb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 20, 30, 0.9);
  display: grid;
  place-items: center;
  padding: 5vmin;
}

.sb-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
}

.sb-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ── Related section, empty states, utilities ─────────────────────────────── */

.sb-related-section {
  margin: 52px 0;
}

.sb-related-section > h2 {
  margin-bottom: 22px;
}

.sb-empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--wp--preset--color--meta);
}

.sb-archive-head {
  padding-block: 34px 26px;
}

.sb-archive-head h1 {
  margin: 0 0 10px;
}

.sb-search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-block: 18px 8px;
}

.sb-search-form input[type='search'] {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--wp--preset--color--border-strong);
  border-radius: var(--wp--custom--radius--input, 13px);
  font: inherit;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sb-post-card__meta {
  margin: 0;
  font-size: 14px;
  color: var(--wp--preset--color--meta);
}

.sb-adjacent .sb-card h3 {
  margin: 6px 0 0;
  font-size: 16px;
}

.sb-author h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

/* Editor-only: the repeater rows in the block sidebar. */
.sb-repeater__row {
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.sb-repeater__tools {
  display: flex;
  gap: 4px;
}

/* ── Blog index ───────────────────────────────────────────────────────────── */

.sb-eyebrow--page {
  background: var(--wp--preset--color--tint);
  border: 1px solid var(--wp--preset--color--info-border);
  color: var(--wp--preset--color--brand-hover);
  margin-bottom: 16px;
}

.sb-archive-head {
  max-width: 720px;
}

.sb-search-clear {
  align-self: center;
  font-size: 14px;
  color: var(--wp--preset--color--secondary);
}

/* Category chips scroll sideways rather than wrapping into three rows. */
.sb-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 6px 18px;
  scrollbar-width: none;
}

.sb-chips::-webkit-scrollbar {
  display: none;
}

.sb-chip {
  flex-shrink: 0;
  padding: 8px 15px;
  border-radius: var(--wp--custom--radius--pill, 24px);
  border: 1px solid var(--wp--preset--color--border-card);
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--secondary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.sb-chip:hover {
  background: var(--wp--preset--color--tint);
  color: var(--wp--preset--color--brand-deep);
}

.sb-chip--on {
  background: var(--wp--preset--color--ink);
  border-color: var(--wp--preset--color--ink);
  color: #fff;
}

.sb-featured {
  margin-block: 26px 34px;
}

.sb-featured__card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, transform 0.18s;
}

.sb-featured__card:hover {
  box-shadow: var(--wp--preset--shadow--card-hover);
  transform: translateY(-2px);
}

.sb-featured__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.sb-featured__body {
  padding: 30px 34px;
  align-self: center;
}

.sb-featured__body h2 {
  margin: 10px 0 12px;
}

.sb-featured__more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--wp--preset--color--brand-deep);
}

@media (max-width: 860px) {
  .sb-featured__card {
    grid-template-columns: minmax(0, 1fr);
  }
  .sb-featured__body {
    padding: 24px;
  }
}

.sb-grid-heading {
  margin-bottom: 6px;
}

.sb-grid-sub {
  margin-top: 0;
  color: var(--wp--preset--color--meta);
  margin-bottom: 24px;
}

/* WordPress's own pagination markup, dressed to match the cards. */
.wp-block-query-pagination,
.navigation.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block: 34px;
}

.navigation.pagination .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.navigation.pagination .page-numbers {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--wp--preset--color--border-card);
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--secondary);
  text-decoration: none;
  font-weight: 600;
}

.navigation.pagination .page-numbers:hover {
  background: var(--wp--preset--color--tint);
  color: var(--wp--preset--color--brand-deep);
}

.navigation.pagination .page-numbers.current {
  background: var(--wp--preset--color--ink);
  border-color: var(--wp--preset--color--ink);
  color: #fff;
}

/* ── Contrast on tinted surfaces ──────────────────────────────────────────── */

/*
 * brand-deep #087BB5 is 4.66:1 on white and passes, but only 4.34:1 on the
 * #F2F8FC tile and 4.42:1 on #F5FAFD — just under the 4.5:1 the brief asks for.
 * On those surfaces the palette's brand-hover #1F6C9A gives 5.34:1 and reads as
 * the same blue.
 *
 * The one failure that cannot be fixed from this palette is white on the CTA
 * orange (2.59:1, against a 4.5:1 requirement — and 3:1 even for large text).
 * The only combination that passes is ink on orange, 6.03:1, which changes the
 * look of the primary button across the whole site. That is a brand decision,
 * so the button is left exactly as the marketing pages have it.
 */
.sb-tags a,
.sb-subscribe a,
.sb-toc a:hover,
.sb-toc a[aria-current='true'],
.sb-card a:not(.sb-button):not(.sb-post-card) {
  color: var(--wp--preset--color--brand-hover);
}
