/* Colors, type and spacing shared by every part of the article template */
:root {
  --post-text: #000;
  --post-text-muted: #757575;
  --post-border: #d9d9d9;
  --post-border-soft: #d0d5dd;
  --post-surface: #fff;
  --post-surface-soft: #f6f6f6;
  --post-dark: #333;
  --post-medium-dark: #4f4f4f;
  --post-accent: #005fb0;
  --post-accent-soft: #f5f9ff;
  --post-radius-sm: 4px;
  --post-radius-md: 8px;
  --post-radius-full: 9999px;
  --post-shadow-md: 0 2px 4px -2px rgba(0, 0, 0, .06), 0 4px 8px -2px rgba(0, 0, 0, .1);
  --post-font-serif: var(--bobs-font-serif, "Frank Ruhl Libre", Georgia, serif);
  --post-font-sans: var(--bobs-font-sans, Inter, sans-serif);
  --post-gutter: 20px;
  --post-main-width: 864px;
  --post-side-width: 384px;
  --post-column-gap: 96px;
  --post-sticky-top: 0px;
  --post-accent-ring: #e6f3ff;
  --post-overlay: rgba(0, 0, 0, .72);
  --post-block-gap: 24px;
  --post-h2-space: 56px;
  --post-h3-space: 48px;
  --post-h4-space: 32px;
  --post-tag-bg: rgba(255, 255, 255, .88);
  --post-drawer-width: 432px;
  --post-drawer-overlay: rgba(0, 0, 0, .4);
}

/* Page shell: centered 1344px content area with side gutters */
body.single-post main.post-page {
  padding-top: var(--header-height, 100px);
}

.post-page {
  background: var(--post-surface);
  color: var(--post-text);
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
}

.post-page *,
.post-page *::before,
.post-page *::after {
  box-sizing: border-box;
}

.post-page :is(h1, h2, h3, h4, h5, h6) {
  font-variation-settings: normal;
}

.post-wrap {
  width: 100%;
  max-width: calc(1344px + 2 * var(--post-gutter));
  margin: 0 auto;
  padding: 0 var(--post-gutter);
}

/* Article rows: one column on small screens, content plus right rail on desktop */
.post-body {
  margin-top: 32px;
}

.post-row {
  display: block;
}

.post-main {
  min-width: 0;
  max-width: var(--post-main-width);
  margin: 0 auto;
}

.post-side {
  min-width: 0;
}

.post-rail {
  display: none;
}

@media (min-width: 1200px) {
  :root {
    --post-gutter: 48px;
  }

  .post-body {
    margin-top: 48px;
  }

  .post-row {
    display: grid;
    grid-template-columns: minmax(0, var(--post-main-width)) var(--post-side-width);
    column-gap: clamp(32px, 6.667vw, var(--post-column-gap));
    justify-content: space-between;
  }

  .post-main {
    margin: 0;
  }

  .post-rail {
    display: block;
  }
}

/* Shared small text styles */
.post-label {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--post-text);
}

.post-meta {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
}

.post-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Below desktop the hero lines up with the centered reading column */
.post-wrap > .post-hero {
  max-width: var(--post-main-width);
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 1200px) {
  .post-wrap > .post-hero {
    max-width: none;
  }
}

/* Hero block: text, byline row and media stacked in one column */
.post-hero {
  display: block;
  padding-top: 32px;
}

/* Breadcrumbs: restyle the shared breadcrumb markup (the id selector is needed to beat the global breadcrumb rules) */
.post-hero-crumbs {
  margin: 0 0 16px;
}

.post-hero-crumbs .breadcrumbsHeader {
  padding: 0;
  text-align: left;
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: none;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs li.lastLocation {
  display: none;
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs li:not(:nth-last-child(-n + 2))::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 0 0 4px;
  background: url("../img/post/breadcrumb-chevron.svg") center / 16px 16px no-repeat;
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs a {
  color: var(--post-text-muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  border-bottom: 0;
  border-radius: 2px;
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs a:hover {
  color: var(--post-text);
}

.post-hero-crumbs #tms_breadcrumbs ul.breadcrumbs a:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

/* Headline and excerpt */
.post-hero-title {
  margin: 0;
  font-family: var(--post-font-serif);
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  letter-spacing: -.192px;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-hero-excerpt {
  margin: 24px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
  text-wrap: pretty;
}

/* Byline row: author group with the social buttons under it on small screens */
.post-hero-byline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
}

.post-hero-author-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-hero-author-group .post-hero-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--post-radius-full);
  object-fit: cover;
  background: var(--post-surface-soft);
}

.post-hero-author-text {
  min-width: 0;
}

.post-hero-names,
.post-hero-meta {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
}

.post-hero-author {
  color: var(--post-text);
}

.post-hero-meta time {
  color: inherit;
}

/* Social buttons: 40px round hit areas around 20px icons */
.post-hero-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--post-radius-full);
}

.post-hero-social-link:hover {
  background: var(--post-surface-soft);
}

.post-hero-social-link:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

.post-hero-social-link img {
  display: block;
  width: 20px;
  height: 20px;
}

/* Hero media: 4:5 crop on phones, 2:1 from tablet up */
.post-hero-media {
  position: relative;
  margin-top: 24px;
  overflow: hidden;
  border-radius: var(--post-radius-sm);
  background: var(--post-surface-soft);
  aspect-ratio: 4 / 5;
}

.post-hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.post-hero-media .post-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video player: click-to-play contract shared with cms-components.js */
.post-hero-video {
  cursor: pointer;
}

.post-hero-video .play-button-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-hero-video .cms-hero__play:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 4px;
}

.post-hero-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 2px 8px;
  border-radius: var(--post-radius-sm);
  background: var(--post-overlay);
  color: var(--post-surface);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.post-hero-video .video-embed-wrapper {
  position: absolute;
  inset: 0;
  background: var(--post-dark);
}

.post-hero-video .video-embed-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
}

@media (max-width: 767px) {
  .post-hero-video:has(.video-embed-wrapper) {
    aspect-ratio: 16 / 9;
  }
}

/* AI summary box: pale fill, blue border and an outer soft ring */
.post-summary {
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid var(--post-accent);
  border-radius: var(--post-radius-sm);
  background: var(--post-accent-soft);
  box-shadow: 0 0 0 4px var(--post-accent-ring);
  --post-summary-lines: 5;
}

.post-summary-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.post-summary-head img {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
}

.post-summary-label {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--post-text);
}

.post-summary-text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-summary-text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--post-summary-lines);
  overflow: hidden;
}

.post-summary-toggle {
  display: block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
  text-decoration: underline;
  cursor: pointer;
}

.post-summary-toggle[hidden] {
  display: none;
}

.post-summary-toggle:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

/* Tablet: larger headline and a 2:1 media crop */
@media (min-width: 768px) {
  .post-hero-title {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -.32px;
  }

  .post-hero-media {
    aspect-ratio: 2 / 1;
  }

  .post-hero-duration {
    right: 16px;
    bottom: 16px;
  }

  .post-summary {
    --post-summary-lines: 3;
  }
}

/* Desktop: 48px headline, byline and social buttons share one row */
@media (min-width: 1200px) {
  .post-hero {
    padding-top: 48px;
  }

  .post-hero-title {
    max-width: 1116px;
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -.384px;
  }

  .post-hero-excerpt {
    max-width: 1116px;
    margin-top: 16px;
  }

  .post-hero-byline {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 48px;
  }
}

/* Table of contents card: bordered box with a grey header row and a list of jump links */
.post-toc {
  margin: 0 0 32px;
  background: var(--post-surface);
  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-sm);
  box-shadow: var(--post-shadow-md);
  overflow: hidden;
  font-family: var(--post-font-sans);
  color: var(--post-text);
}

.post-toc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 24px;
  background: var(--post-surface-soft);
  border: 0;
  border-bottom: 1px solid var(--post-border);
  border-radius: 0;
  color: var(--post-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.post-toc-head[aria-expanded="false"] {
  border-bottom-color: transparent;
}

.post-toc-head:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: -2px;
}

.post-toc-icon,
.post-toc-chevron {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.post-toc-title {
  flex: 1 1 auto;
  min-width: 0;
}

.post-toc-head[aria-expanded="true"] .post-toc-chevron-down,
.post-toc-head[aria-expanded="false"] .post-toc-chevron-up {
  display: none;
}

.post-toc-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
}

.post-toc-body[hidden] {
  display: none;
}

/* Jump links: first five shown, the rest revealed by View More */
.post-toc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-toc-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-toc:not(.is-all) .post-toc-item:nth-child(n+6) {
  display: none;
}

.post-toc-link,
.post-toc-link:hover,
.post-toc-link:focus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--post-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.post-toc-link:hover .post-toc-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-toc-link:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.post-toc-arrow {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}

.post-toc-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin: 0;
  padding: 0 24px;
  background: transparent;
  border: 1px solid var(--post-text);
  border-radius: var(--post-radius-full);
  color: var(--post-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  cursor: pointer;
}

.post-toc-more:hover {
  background: var(--post-surface-soft);
}

.post-toc-more:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

.post-toc-more[hidden] {
  display: none;
}

/* Fixed bar: pinned under the site header once the inline card scrolls away */
.post-toc-fixed {
  position: fixed;
  top: var(--header-height, 100px);
  left: 0;
  right: 0;
  z-index: 900;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

.post-toc-fixed[hidden] {
  display: none;
}

.post-toc-fixed.is-visible {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.post-toc-bar {
  margin: 0;
  pointer-events: auto;
  border-width: 1px 0;
  border-radius: 0 0 var(--post-radius-sm) var(--post-radius-sm);
}

.post-toc-bar .post-toc-head {
  font-weight: 700;
}

.post-toc-bar .post-toc-body {
  max-height: calc(100vh - var(--header-height, 100px) - 58px);
  max-height: calc(100dvh - var(--header-height, 100px) - 58px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  .post-toc-fixed {
    transition: none;
  }
}

/* Headings land below the site header and the collapsed fixed bar */
.post-content h2[id] {
  scroll-margin-top: calc(var(--header-height, 100px) + 74px);
}

/* Desktop: card spacing and the fixed bar lined up with the article column */
@media (min-width: 1200px) {
  .post-toc-inline {
    margin-bottom: 40px;
  }

  .post-toc-fixed-inner {
    width: 100%;
    max-width: calc(1344px + 2 * var(--post-gutter));
    margin: 0 auto;
    padding: 0 var(--post-gutter);
  }

  .post-toc-bar {
    width: min(var(--post-main-width), calc(100% - var(--post-side-width) - clamp(32px, 6.667vw, var(--post-column-gap))));
    border-width: 1px;
  }
}

/* Spacing tokens for article body blocks and the room headings take above themselves */

@media (min-width: 1200px) {
  :root {
    --post-h2-space: 72px;
    --post-h3-space: 56px;
  }
}

/* Body column base: Inter 16/24, long words wrap, floats are contained */
.post-content {
  display: flow-root;
  min-width: 0;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
  overflow-wrap: break-word;
}

/* Vertical rhythm: blocks sit 24px apart, bottom margins are cleared, stray markup is hidden */
.post-content :is(p, ul, ol, figure, blockquote, table, pre, hr, h2, h3, h4, h5, h6) {
  margin-bottom: 0;
}

.post-content :where(p, ul, ol, figure, blockquote, div, table, pre, hr, iframe, h2, h3, h4, h5, h6) ~ :where(p, ul, ol, figure, blockquote, div, table, pre, hr, iframe, h2, h3, h4, h5, h6) {
  margin-top: var(--post-block-gap);
}

.post-content > br,
.post-content p:empty {
  display: none;
}

/* Paragraphs and inline text */
.post-content p {
  font-size: 16px;
  line-height: 24px;
  text-wrap: pretty;
}

.post-content :is(strong, b) {
  font-weight: 600;
}

.post-content em,
.post-content i {
  font-style: italic;
}

.post-content :is(sub, sup) {
  line-height: 0;
}

/* Headings: serif display sizes carry their own space above, h4 to h6 step down in sans */
.post-content h2,
.post-content h3:not(.accordion-header):not([class^="post-"]) {
  font-family: var(--post-font-serif);
  font-weight: 400;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-content h2 {
  margin-top: var(--post-h2-space);
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -.6px;
}

.post-content h3:not(.accordion-header):not([class^="post-"]) {
  margin-top: var(--post-h3-space);
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -.4px;
}

.post-content :is(h2, h3:not(.accordion-header):not([class^="post-"])) :is(strong, b, span, em, i, a) {
  font-weight: inherit;
  font-variation-settings: inherit;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  letter-spacing: inherit;
}

.post-content :is(h4, h5, h6):not([class^="post-"]) {
  margin-top: var(--post-h4-space);
  font-family: var(--post-font-sans);
  font-weight: 600;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-content h4:not([class^="post-"]) {
  font-size: 20px;
  line-height: 28px;
}

.post-content h5:not([class^="post-"]) {
  font-size: 18px;
  line-height: 28px;
}

.post-content h6:not([class^="post-"]) {
  font-size: 16px;
  line-height: 24px;
}

@media (min-width: 1200px) {
  .post-content h2 {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -.8px;
  }

  .post-content h3:not(.accordion-header):not([class^="post-"]) {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -.6px;
  }
}

/* Links: black and underlined with a visible keyboard ring */
.post-content a:not([class^="post-"]) {
  color: var(--post-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:not([class^="post-"]):hover {
  text-decoration: underline;
}

.post-content a:not([class^="post-"]):focus-visible {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
  border-radius: 2px;
}

.post-content a:has(> img):not([class^="post-"]) {
  text-decoration: none;
}

/* Lists: restore discs and decimals with a 24px indent, nested lists step down */
.post-content :is(ul, ol):not([class^="post-"]) {
  padding-left: 24px;
  list-style-position: outside;
}

.post-content ul:not([class^="post-"]) {
  list-style-type: disc;
}

.post-content ol:not([class^="post-"]) {
  list-style-type: decimal;
}

.post-content li:not([class^="post-"]) {
  margin: 0;
  padding: 0;
  list-style: inherit;
  text-wrap: pretty;
}

.post-content li > :is(ul, ol) {
  margin-top: 0;
}

.post-content li > p {
  margin: 0;
}

.post-content ul ul:not([class^="post-"]) {
  list-style-type: circle;
}

.post-content ul ul ul:not([class^="post-"]) {
  list-style-type: square;
}

.post-content ol ol:not([class^="post-"]) {
  list-style-type: lower-alpha;
}

/* Quotes: soft panel with a dark left rule, byline in muted small type, social embeds left alone */
.post-content blockquote:not(.instagram-media):not(.twitter-tweet):not([class^="post-"]),
.post-content .wp-block-pullquote {
  padding: 24px;
  border: 0;
  border-left: 3px solid var(--post-dark);
  border-radius: 0;
  background: var(--post-surface-soft);
  font-size: 16px;
  line-height: 24px;
  font-style: normal;
  color: var(--post-text);
}

.post-content .wp-block-pullquote blockquote:not(.instagram-media):not(.twitter-tweet) {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.post-content blockquote:not(.instagram-media):not(.twitter-tweet) p {
  font-size: 16px;
  line-height: 24px;
}

.post-content blockquote:not(.instagram-media):not(.twitter-tweet) p ~ p {
  margin-top: 8px;
}

.post-content blockquote:not(.instagram-media):not(.twitter-tweet) :is(cite, footer, p:last-child:not(:first-child)) {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
  font-style: normal;
  color: var(--post-text-muted);
}

/* Images and figures: full-width media with 4px corners and a muted 14/20 caption */
.post-content img {
  height: auto;
  border-radius: var(--post-radius-sm);
}

.post-content .wp-block-image img:not([hspace]):not([vspace]) {
  margin: 0 !important;
}

.post-content figure:not([class^="post-"]) {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
  padding: 16px 0;
}

.post-content figure:not([class^="post-"]) img {
  display: block;
  width: 100%;
}

.post-content figure:not([class^="post-"]) > a {
  display: block;
}

.post-content figure.wp-caption,
.post-content figure.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.post-content :is(figcaption, .wp-caption-text, .wp-element-caption) {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  color: var(--post-text-muted);
  text-wrap: pretty;
}

.post-content :is(figcaption, .wp-caption-text, .wp-element-caption) a:not([class^="post-"]) {
  color: inherit;
}

.post-content img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Alignment classes: stacked on phones, floated beside the text from 768px */
.post-content :is(.alignleft, .alignright) {
  float: none;
  margin: 0;
}

.post-content :is(.alignleft, .alignright):not(:first-child) {
  margin-top: var(--post-block-gap);
}

@media (min-width: 768px) {
  .post-content .alignleft {
    float: left;
    max-width: 50%;
    margin: 0 24px 16px 0;
  }

  .post-content .alignright {
    float: right;
    max-width: 50%;
    margin: 0 0 16px 24px;
  }

  .post-content :is(.alignleft, .alignright):not(:first-child) {
    margin-top: 0;
  }
}

/* Galleries and columns: one column on phones, side by side from 768px */
.post-content .wp-block-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.post-content .wp-block-gallery > *,
.post-content .wp-block-columns > * {
  margin-top: 0;
}

.post-content .wp-block-gallery figure:not([class^="post-"]) {
  flex: 1 1 100%;
  padding: 0;
}

.post-content .wp-block-columns {
  display: flex;
  flex-direction: column;
  gap: var(--post-block-gap);
}

.post-content .wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}

@media (min-width: 768px) {
  .post-content .wp-block-gallery figure:not([class^="post-"]) {
    flex-basis: calc(50% - 8px);
  }

  .post-content .wp-block-columns {
    flex-direction: row;
  }
}

/* Embeds: 16:9 video frames, Instagram frames take the height Instagram gives them */
.post-content iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--post-radius-sm);
}

.post-content iframe.instagram-media {
  aspect-ratio: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0;
}

.post-content blockquote.instagram-media {
  max-width: 100%;
}

.post-content figure.wp-block-embed {
  display: block;
  padding: 0;
}

.post-content .wp-block-embed__wrapper {
  position: relative;
}

/* Tables: 1px bordered, grey semibold header row, 14/20 cells, scrolls sideways on phones */
.post-content table {
  display: block;
  max-width: 100%;
  margin-top: 0;
  overflow-x: auto;
  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-sm);
  border-collapse: separate;
  border-spacing: 0;
  background: var(--post-surface);
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text);
}

.post-content table td,
.post-content table th {
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--post-border);
  border-bottom: 1px solid var(--post-border);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
  color: var(--post-text);
}

.post-content table tr > :last-child {
  border-right: 0;
}

.post-content table > :last-child > tr:last-child > * {
  border-bottom: 0;
}

.post-content table > :first-child > tr:first-child > * {
  background: var(--post-surface-soft);
  font-weight: 600;
}

.post-content table > :first-child > tr:first-child > :first-child {
  border-top-left-radius: 3px;
}

.post-content table > :first-child > tr:first-child > :last-child {
  border-top-right-radius: 3px;
}

.post-content figure.wp-block-table {
  display: block;
  padding: 0;
}

.post-content .wp-block-table :is(.container-xl, .container-fluid) {
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.post-content .wp-block-table .row {
  --bs-gutter-x: 0;
  display: block;
  margin: 0;
}

.post-content .table-responsive {
  overflow-x: auto;
  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-sm);
}

.post-content .table-responsive table {
  display: table;
  width: 100%;
  min-width: 560px;
  border: 0;
  border-radius: 0;
}

@media (min-width: 768px) {
  .post-content table {
    display: table;
    width: 100%;
  }
}

/* Buttons in content: black pills with white text */
.post-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.post-content a.wp-block-button__link,
.post-content .bw-btn-container a.bw-custom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border: 0;
  border-radius: var(--post-radius-full);
  background: var(--post-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--post-surface);
  cursor: pointer;
}

.post-content a.wp-block-button__link:hover,
.post-content .bw-btn-container a.bw-custom-button:hover {
  background: var(--post-dark);
  color: var(--post-surface);
  text-decoration: none;
}

.post-content a.wp-block-button__link:focus-visible,
.post-content .bw-btn-container a.bw-custom-button:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
  border-radius: var(--post-radius-full);
}

.post-content .bw-btn-container a.bw-custom-button span {
  color: inherit;
}

/* Rules and code */
.post-content hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--post-border);
  opacity: 1;
}

.post-content pre {
  padding: 16px;
  overflow-x: auto;
  border-radius: var(--post-radius-sm);
  background: var(--post-surface-soft);
  font-size: 14px;
  line-height: 20px;
}

.post-content :is(code, pre) {
  font-family: var(--bobs-font-mono, ui-monospace, Menlo, Consolas, monospace);
}

/* FAQ accordion: grey 48px question rows, bold 16/24 text, 24px chevron, white answers */
.post-content .cms_Faq {
  margin-top: 0;
}

.post-content .cms_Faq .cms_Faq_title {
  margin-bottom: 0;
}

.post-content .cms_Faq_accordion {
  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-sm);
  background: var(--post-surface);
}

.post-content .cms_Faq .accordion-item {
  border: 0;
  background: transparent;
}

.post-content .cms_Faq .accordion-item > * {
  margin-top: 0;
}

.post-content .cms_Faq .accordion-header {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--post-text);
}

.post-content .cms_Faq_accordion .accordion-button {
  min-height: 48px;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--post-border);
  border-radius: 0;
  background: var(--post-surface-soft);
  box-shadow: none;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  text-align: left;
  text-transform: none;
  color: var(--post-text);
}

.post-content .cms_Faq_accordion .accordion-button:hover,
.post-content .cms_Faq_accordion .accordion-button:focus,
.post-content .cms_Faq_accordion .accordion-button:not(.collapsed) {
  background: var(--post-surface-soft);
  box-shadow: none;
  color: var(--post-text);
}

.post-content .cms_Faq_accordion .accordion-button:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: -2px;
}

.post-content .cms_Faq_accordion .accordion-item:last-child .accordion-button.collapsed {
  border-bottom: 0;
}

.post-content .cms_Faq_accordion .accordion-button::after {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 11.697L8.56569 15.1314L7.43432 14L12 9.4343L16.5657 14L15.4343 15.1314L12 11.697Z' fill='black'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  transform: rotate(180deg);
}

.post-content .cms_Faq_accordion .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 11.697L8.56569 15.1314L7.43432 14L12 9.4343L16.5657 14L15.4343 15.1314L12 11.697Z' fill='black'/%3E%3C/svg%3E");
  transform: none;
}

.post-content .cms_Faq_accordion .accordion-body {
  padding: 16px;
  background: var(--post-surface);
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
}

.post-content .cms_Faq_accordion .accordion-body p ~ p {
  margin-top: 16px;
}

/* Author block: hairline rules above and below, 40px avatar beside name, three-line bio and a Read More toggle */
.post-author-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: var(--post-block-gap, 24px);
  padding: 24px 0;
  border-top: 1px solid var(--post-border);
  border-bottom: 1px solid var(--post-border);
}

.post-author-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-content {
  flex: 1 1 0;
  min-width: 0;
}

.post-author-name {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--post-text);
}

.post-author-bio {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
  text-wrap: pretty;
}

.post-author-bio.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.post-author-toggle {
  display: block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
  color: var(--post-text);
  cursor: pointer;
}

.post-author-toggle[hidden] {
  display: none;
}

.post-author-toggle:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

/* Card shell: the title link is stretched over the whole card */
.post-card {
  position: relative;
  display: flex;
  min-width: 0;
  gap: 16px;
}

.post-card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--post-radius-sm);
  background: var(--post-surface-soft);
}

.post-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-info {
  min-width: 0;
  overflow-wrap: break-word;
}

.post-card-title {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-card-link,
.post-card-link:hover,
.post-card-link:focus {
  color: inherit;
  text-decoration: none;
}

.post-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card-link:focus-visible {
  outline: 0;
}

.post-card-link:focus-visible::after {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
  border-radius: var(--post-radius-sm);
}

.post-card:hover .post-card-title {
  text-decoration: underline;
}

/* Row card: small thumbnail left, text right */
.post-card-row .post-card-media {
  flex: 0 0 108px;
  width: 108px;
  height: 72px;
}

.post-card-row .post-card-info {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-card-row .post-card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Stack card: 3:2 image on top, then title, excerpt and meta */
.post-card-stack {
  flex-direction: column;
}

.post-card-stack .post-card-media {
  width: 100%;
  aspect-ratio: 3 / 2;
}

.post-card-stack .post-card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-card-stack .post-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-card-stack .post-card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Tag pill laid over the top-left of the stack image */
.post-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 1px 8px;
  border-radius: var(--post-radius-sm);
  background: var(--post-tag-bg);
  box-shadow: var(--post-shadow-md);
  backdrop-filter: blur(2px);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: var(--post-text);
  white-space: nowrap;
  pointer-events: none;
}

/* Sell My Watch banner: grey panel, stacked on mobile and two columns from tablet up */
.post-sell {
  padding: 8px 0;
}

.post-sell-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px 24px;
  border-radius: var(--post-radius-sm);
  background: var(--post-surface-soft);
}

.post-sell-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.post-sell-title,
.post-subscribe-title,
.post-featured-title {
  margin: 0;
  font-family: var(--post-font-serif);
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  letter-spacing: -.006em;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-sell-text,
.post-subscribe-text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text-muted);
}

.post-sell-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.post-sell-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 12px;
  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-sm);
  background: var(--post-surface);
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 28px;
  color: var(--post-text);
  appearance: none;
  -webkit-appearance: none;
}

.post-sell-input::placeholder {
  color: var(--post-text-muted);
  opacity: 1;
}

.post-sell-input:focus-visible {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
}

.post-sell-select {
  position: relative;
}

select.post-sell-input {
  padding-right: 44px;
  cursor: pointer;
}

select.post-sell-input:invalid {
  color: var(--post-text-muted);
}

.post-sell-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--post-text-muted);
  pointer-events: none;
}

.post-sell-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 32px;
  border: 0;
  border-radius: var(--post-radius-full);
  background: var(--post-text);
  font-family: var(--post-font-sans);
  font-size: 18px;
  line-height: 28px;
  color: var(--post-surface);
  white-space: nowrap;
  cursor: pointer;
}

.post-sell-button:hover {
  background: var(--post-dark);
}

.post-sell-button:focus-visible {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .post-sell {
    padding: 16px 0;
  }

  .post-sell-panel {
    flex-direction: row;
    align-items: center;
    gap: 64px;
    padding: 48px;
  }

  .post-sell-intro,
  .post-sell-form {
    flex: 1 1 0;
  }

  .post-sell-title,
  .post-subscribe-title,
  .post-featured-title {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -.008em;
  }
}

/* Subscribe banner: full-width grey band, copy on the left and form on the right */
.post-subscribe {
  background: var(--post-surface-soft);
}

.post-subscribe-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px 0;
}

.post-subscribe-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.post-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.post-subscribe-form .klaviyo-form-XzKYmT {
  min-height: 56px;
}

.post-subscribe-legal {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--post-text-muted);
}

@media (min-width: 1200px) {
  .post-subscribe-inner {
    flex-direction: row;
    align-items: center;
    gap: 64px;
    padding: 64px 0;
  }

  .post-subscribe-intro {
    flex: 1 1 0;
  }

  .post-subscribe-form {
    flex: 0 0 546px;
    width: 546px;
  }
}

/* Klaviyo form overrides: restyle the injected email field and button to match the design */
.post-subscribe .klaviyo-form-XzKYmT form {
  max-width: none !important;
  margin: 0 !important;
}

.post-subscribe .klaviyo-form-XzKYmT form > div {
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.post-subscribe .klaviyo-form-XzKYmT [data-testid="form-row"] {
  gap: 12px;
}

.post-subscribe .klaviyo-form-XzKYmT input[type="email"] {
  width: 100% !important;
  min-height: 56px !important;
  padding: 14px 12px !important;
  border: 1px solid var(--post-border) !important;
  border-radius: var(--post-radius-sm) !important;
  background: var(--post-surface) !important;
  font-family: var(--post-font-sans) !important;
  font-size: 16px !important;
  line-height: 28px !important;
  color: var(--post-text) !important;
}

.post-subscribe .klaviyo-form-XzKYmT button {
  min-height: 56px !important;
  padding: 0 32px !important;
  border: 0 !important;
  border-radius: var(--post-radius-full) !important;
  background: var(--post-text) !important;
  font-family: var(--post-font-sans) !important;
  font-size: 18px !important;
  line-height: 28px !important;
  color: var(--post-surface) !important;
}

/* Previous and next article block: two halves split by a divider, stacked on mobile */
.post-prevnext {
  padding-top: 48px;
}

.post-prevnext-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-prevnext-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding-top: 8px;
}

.post-prevnext-divider {
  display: none;
}

.post-prevnext-rule {
  height: 1px;
  margin-top: 48px;
  background: var(--post-border);
}

@media (min-width: 768px) {
  .post-prevnext-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    column-gap: 64px;
  }

  .post-prevnext-prev {
    grid-column: 1;
  }

  .post-prevnext-next {
    grid-column: 3;
  }

  .post-prevnext-item {
    gap: 24px;
    padding-top: 0;
  }

  .post-prevnext-divider {
    display: block;
    grid-column: 2;
    grid-row: 1;
    background: var(--post-border);
  }
}

@media (min-width: 1200px) {
  .post-prevnext {
    padding-top: 64px;
  }

  .post-prevnext-rule {
    margin-top: 64px;
  }
}

/* Featured articles grid: heading above one column of stack cards, three columns from tablet up */
.post-featured {
  padding: 48px 0;
}

.post-featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .post-featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .post-featured {
    padding: 64px 0;
  }
}

/* Shop This Article block: label, then one row per watch */
.post-shop {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.post-shop .post-shop-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
}

.post-shop .post-shop-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  border-radius: var(--post-radius-sm);
  cursor: pointer;
}

/* Square product tile with the watch image inset 12px */
.post-shop .post-shop-thumb {
  display: flex;
  flex: 0 0 108px;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--post-radius-sm);
  background: var(--post-surface-soft);
}

.post-shop .post-shop-image {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  mix-blend-mode: darken;
}

/* Name in semibold with the price under it */
.post-shop .post-shop-info {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
}

.post-shop .post-shop-name,
.post-shop .post-shop-price {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.post-shop .post-shop-name {
  font-weight: 600;
}

.post-shop .post-shop-price {
  font-weight: 400;
}

/* Quick Look control: icon only on phones, outlined pill with label from 1200px */
.post-shop .post-shop-quick,
.post-shop .post-shop-quick:hover,
.post-shop .post-shop-quick:focus {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: var(--post-radius-full);
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  text-decoration: none;
  color: var(--post-text);
}

.post-shop .post-shop-quick:focus-visible {
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

.post-shop .post-shop-quick-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.post-shop .post-shop-quick-icon {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 0;
}

@media (min-width: 1200px) {
  .post-shop {
    padding: 16px 0;
  }

  .post-shop .post-shop-quick,
  .post-shop .post-shop-quick:hover,
  .post-shop .post-shop-quick:focus {
    height: 36px;
    min-height: 36px;
    padding: 0 24px;
    border: 1px solid var(--post-text);
  }

  .post-shop .post-shop-quick:hover {
    background: var(--post-surface-soft);
  }

  .post-shop .post-shop-quick-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }
}

/* Live stock state: sold pieces lose their price and buy button */
[data-product][data-purchasable="0"] [data-product-buy] {
  display: none;
}

[data-product][data-purchasable="0"] [data-product-price] {
  display: none;
}

[data-product][data-purchasable="1"] [data-product-unavailable] {
  display: none;
}

/* Related Article block: label above the card, compact horizontal card on phones */
.post-related {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 0;
  padding: 8px 0;
}

.post-related .post-label {
  margin: 0;
}

.post-related .post-card-stack {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.post-related .post-card-stack .post-card-media {
  width: 108px;
  height: 72px;
  aspect-ratio: auto;
}

.post-related .post-card-stack .post-card-tag,
.post-related .post-card-stack .post-card-excerpt {
  display: none;
}

.post-related .post-card-stack .post-card-info,
.post-related .post-card-stack .post-card-text {
  gap: 4px;
}

.post-related .post-card-stack .post-card-title {
  -webkit-line-clamp: 3;
}

/* From 1200px the card sits in the right column and stays in view while its section scrolls */
@media (min-width: 1200px) {
  .post-side {
    align-self: stretch;
  }

  .post-related {
    position: sticky;
    top: calc(var(--header-height, 100px) + 58px + 24px);
    margin: 0;
    padding: 0;
  }

  .post-related .post-card-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .post-related .post-card-stack .post-card-media {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .post-related .post-card-stack .post-card-tag {
    display: block;
  }

  .post-related .post-card-stack .post-card-excerpt {
    display: -webkit-box;
  }

  .post-related .post-card-stack .post-card-info {
    gap: 8px;
  }

  .post-related .post-card-stack .post-card-text {
    gap: 4px;
  }

  .post-related .post-card-stack .post-card-title {
    -webkit-line-clamp: 2;
  }
}

/* Right rail: Popular and Featured stacks, 24px between stacks and cards, 16px under each label */
.post-rail {
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1200px) {
  .post-rail {
    display: flex;
  }
}

.post-rail-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.post-rail .post-rail-label {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: .05em;
}

.post-rail-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Shop This Article section: 48px above and below on mobile, 72px on desktop */
.post-shop-row {
  padding: 48px 0;
}

.post-shop-row-title {
  margin: 0 0 24px;
  font-family: var(--post-font-serif);
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  letter-spacing: -.006em;
  color: var(--post-text);
  text-wrap: pretty;
}

@media (min-width: 768px) {
  .post-shop-row-title {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -.008em;
  }
}

@media (min-width: 1200px) {
  .post-shop-row {
    padding: 72px 0;
  }
}

/* Product grid: two columns on mobile, three on tablet, five on desktop */
.post-shop-row-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 16px;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .post-shop-row-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
  }
}

@media (min-width: 1200px) {
  .post-shop-row-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Product card: equal-height column with the action block pinned to the bottom */
.post-product {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.post-product-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 318 / 398;
  background: var(--post-surface-soft);
}

@media (min-width: 768px) {
  .post-product-media {
    border-radius: var(--post-radius-sm);
  }
}

.post-product-media:focus-visible,
.post-product-link:focus-visible {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
}

.post-product-image {
  position: absolute;
  top: 10%;
  left: 12.8%;
  display: block;
  width: 74.4%;
  height: 80%;
  object-fit: contain;
  mix-blend-mode: darken;
}

.post-product-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
}

.post-product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Product text: small uppercase brand, semibold name, muted one-line description, semibold price */
.post-product-brand {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--post-text);
}

.post-product-name {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--post-text);
}

.post-product-link,
.post-product-link:hover,
.post-product-link:focus {
  color: inherit;
  text-decoration: none;
}

.post-product-link:hover {
  text-decoration: underline;
}

.post-product-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.post-product-price {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--post-text);
}

/* Action block: price above a full-width pill button, pushed to the bottom of the card */
.post-product-action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.post-product-buy {
  margin: 0;
}

.post-product-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid var(--post-text);
  border-radius: var(--post-radius-full);
  background: transparent;
  font-family: var(--post-font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text);
  white-space: nowrap;
  cursor: pointer;
}

.post-product-button:hover,
.post-product-button:focus {
  background: var(--post-text);
  color: var(--post-surface);
  text-decoration: none;
}

.post-product-button:focus-visible {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
}

/* Page scroll lock while the drawer is open, keeping the scrollbar gutter so nothing shifts */
html.post-drawer-lock {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* Shell: overlay and panel both start below the fixed site header */
.post-drawer-root {
  display: contents;
}

.post-drawer-root[hidden] {
  display: none;
}

.post-drawer-root,
.post-drawer-root *,
.post-drawer-root *::before,
.post-drawer-root *::after {
  box-sizing: border-box;
}

.post-drawer-root :focus-visible {
  outline: 2px solid var(--post-text);
  outline-offset: 2px;
}

.post-drawer-overlay {
  position: fixed;
  top: var(--header-height, 100px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 950;
  background: var(--post-drawer-overlay);
  opacity: 0;
  transition: opacity .25s ease;
}

.post-drawer-panel {
  position: fixed;
  top: var(--header-height, 100px);
  right: 0;
  bottom: 0;
  z-index: 951;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--post-border);
  border-radius: var(--post-radius-md) var(--post-radius-md) 0 0;
  background: var(--post-surface);
  box-shadow: var(--post-shadow-md);
  color: var(--post-text);
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  transform: translateY(100%);
  transition: transform .25s ease;
}

.post-drawer-panel:focus {
  outline: 0;
}

.post-drawer-root.is-open .post-drawer-overlay {
  opacity: 1;
}

.post-drawer-root.is-open .post-drawer-panel {
  transform: none;
}

@media (min-width: 768px) {
  .post-drawer-panel {
    width: var(--post-drawer-width);
    border-left: 1px solid var(--post-border);
    border-radius: 0;
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-drawer-overlay,
  .post-drawer-panel {
    transition: none;
  }
}

/* Sticky header row with the Quick Look label and close button */
.post-drawer-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 12px 20px;
  background: var(--post-surface);
  box-shadow: var(--post-shadow-md);
}

@media (min-width: 768px) {
  .post-drawer-top {
    padding: 12px 24px;
  }
}

.post-drawer-root .post-drawer-heading {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  font-variation-settings: normal;
  letter-spacing: 0;
  color: var(--post-text);
}

.post-drawer-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--post-radius-full);
  background: transparent;
  cursor: pointer;
}

.post-drawer-close:hover {
  background: var(--post-surface-soft);
}

/* Loading indicator shown while the product fragment is fetched */
.post-drawer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 20px;
  color: var(--post-text-muted);
  font-size: 14px;
  line-height: 20px;
}

.post-drawer-loading[hidden] {
  display: none;
}

.post-drawer-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--post-border);
  border-top-color: var(--post-text);
  border-radius: var(--post-radius-full);
  animation: post-drawer-spin .8s linear infinite;
}

@keyframes post-drawer-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-drawer-spinner {
    animation: none;
  }
}

.post-drawer-message {
  margin: 0;
  padding: 48px 20px;
  text-align: center;
  color: var(--post-text-muted);
}

.post-drawer-message-text {
  margin: 0 0 16px;
}

/* Image carousel: square soft tile with a swipeable track */
.post-drawer {
  display: block;
  color: var(--post-text);
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
}

.post-drawer-carousel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-drawer-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--post-surface-soft);
}

.post-drawer-track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.post-drawer-track::-webkit-scrollbar {
  display: none;
}

.post-drawer-track:focus-visible {
  outline-offset: -4px;
}

.post-drawer-slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  padding: 6%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.post-drawer-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: darken;
}

/* Previous and next buttons sit on the tile edges */
.post-drawer-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--post-radius-full);
  background: var(--post-surface);
  box-shadow: var(--post-shadow-md);
  cursor: pointer;
  transform: translateY(-50%);
}

.post-drawer-arrow:disabled {
  opacity: .4;
  cursor: default;
}

.post-drawer-arrow-prev {
  left: 20px;
}

.post-drawer-arrow-next {
  right: 20px;
}

@media (min-width: 768px) {
  .post-drawer-arrow-prev {
    left: 24px;
  }

  .post-drawer-arrow-next {
    right: 24px;
  }
}

/* Dot indicators bottom left, Actual Photos caption bottom right */
.post-drawer-carousel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 24px;
}

.post-drawer-dots {
  display: flex;
  margin-left: -6px;
}

.post-drawer-dot {
  position: relative;
  width: 20px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.post-drawer-dot::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--post-border);
}

.post-drawer-dot.is-current::before {
  background: var(--post-text);
}

.post-drawer-caption {
  margin: 0 0 0 auto;
  font-size: 12px;
  line-height: 18px;
  color: var(--post-text-muted);
  white-space: nowrap;
}

/* Details column under the carousel */
.post-drawer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px 20px 48px;
}

@media (min-width: 768px) {
  .post-drawer-content {
    padding: 16px 24px 48px;
  }
}

.post-drawer-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-drawer-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-wrap: pretty;
}

/* Name, subtitle and price lines */
.post-drawer-root .post-drawer-name {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  font-variation-settings: normal;
  letter-spacing: 0;
  color: var(--post-text);
}

.post-drawer-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
}

.post-drawer-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.post-drawer-price-amount {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  color: var(--post-text);
}

.post-drawer-price-label {
  font-size: 12px;
  line-height: 18px;
  color: var(--post-text-muted);
}

/* Pill buttons: black Buy Now and outlined links or buttons */
.post-drawer-buy-form {
  margin: 0;
}

.post-drawer-buy,
.post-drawer-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 32px;
  border: 1px solid var(--post-text);
  border-radius: var(--post-radius-full);
  font-family: var(--post-font-sans);
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}

.post-drawer-buy {
  background: var(--post-text);
  color: var(--post-surface);
}

.post-drawer-buy:hover,
.post-drawer-buy:focus {
  border-color: var(--post-dark);
  background: var(--post-dark);
}

.post-drawer-pill,
.post-drawer-pill:hover,
.post-drawer-pill:focus {
  background: transparent;
  color: var(--post-text);
  text-decoration: none;
}

.post-drawer-pill:hover,
.post-drawer-pill:focus {
  background: var(--post-text);
  color: var(--post-surface);
}

.post-drawer-pill:hover .post-drawer-pill-icon,
.post-drawer-pill:focus .post-drawer-pill-icon {
  filter: invert(1);
}

.post-drawer-pill-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

/* Join Waitlist: the pill reveals an email field and submit button */
.post-drawer-waitlist-panel {
  margin: 0;
}

.post-drawer-waitlist-panel[hidden] {
  display: none;
}

.post-drawer-waitlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.post-drawer-waitlist-label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.post-drawer-waitlist-email {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-md);
  background: var(--post-surface);
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--post-text);
}

.post-drawer-waitlist-submit {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid var(--post-text);
  border-radius: var(--post-radius-full);
  background: var(--post-text);
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--post-surface);
  cursor: pointer;
}

.post-drawer-waitlist-submit:disabled {
  opacity: .5;
  cursor: default;
}

.post-drawer-waitlist-result {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text);
}

.post-drawer-waitlist-result:empty {
  display: none;
}

/* Sell link with an underlined action */
.post-drawer-sell {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.post-drawer-sell-link,
.post-drawer-sell-link:hover,
.post-drawer-sell-link:focus {
  color: var(--post-text);
  text-decoration: underline;
}

/* Watch CSA certification row */
.post-drawer-csa {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-drawer-csa-logo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.post-drawer-csa-text {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--post-text);
}

.post-drawer-csa-line {
  display: block;
  opacity: .8;
}

/* Spec accordions: details and summary with a rotating chevron */
.post-drawer-specs {
  border-top: 1px solid var(--post-border);
}

.post-drawer-spec + .post-drawer-spec {
  border-top: 1px solid var(--post-border);
}

.post-drawer-spec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.post-drawer-spec-title::-webkit-details-marker {
  display: none;
}

.post-drawer-spec-chevron {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  transition: transform .2s ease;
}

.post-drawer-spec[open] .post-drawer-spec-chevron {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .post-drawer-spec-chevron {
    transition: none;
  }
}

.post-drawer-spec-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0 0 16px;
}

.post-drawer-spec-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
}

.post-drawer-spec-label {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 400;
  color: var(--post-text-muted);
}

.post-drawer-spec-value {
  min-width: 0;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  color: var(--post-text);
}

.post-drawer-spec-link,
.post-drawer-spec-link:hover,
.post-drawer-spec-link:focus {
  color: var(--post-text);
  text-decoration: underline;
}

/* Stacked call-to-action buttons */
.post-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Related products: serif heading and two-column card grid */
.post-drawer-related {
  padding: 24px 0;
}

.post-drawer-root .post-drawer-related-title {
  margin: 0 0 24px;
  font-family: var(--post-font-serif);
  font-size: 32px;
  line-height: 40px;
  font-weight: 400;
  font-variation-settings: normal;
  letter-spacing: -.006em;
  color: var(--post-text);
  text-wrap: pretty;
}

.post-drawer-related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 16px;
  margin: 0;
  padding: 0;
}

.post-drawer-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.post-drawer-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 318 / 398;
  background: var(--post-surface-soft);
}

.post-drawer-card-image {
  position: absolute;
  top: 10%;
  left: 12.8%;
  display: block;
  width: 74.4%;
  height: 80%;
  object-fit: contain;
  mix-blend-mode: darken;
}

.post-drawer-card-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
}

.post-drawer-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.post-drawer-card-brand {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.post-drawer-root .post-drawer-card-name {
  margin: 0;
  font-family: var(--post-font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  font-variation-settings: normal;
  letter-spacing: 0;
  color: var(--post-text);
}

.post-drawer-card-link,
.post-drawer-card-link:focus {
  color: inherit;
  text-decoration: none;
}

.post-drawer-card-link:hover {
  color: inherit;
  text-decoration: underline;
}

.post-drawer-card-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.post-drawer-card-action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.post-drawer-card-price {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.post-drawer-card-buy {
  margin: 0;
}

.post-drawer-card-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid var(--post-text);
  border-radius: var(--post-radius-full);
  background: transparent;
  font-family: var(--post-font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--post-text);
  white-space: nowrap;
  cursor: pointer;
}

.post-drawer-card-button:hover,
.post-drawer-card-button:focus {
  background: var(--post-text);
  color: var(--post-surface);
}

/* The chat launcher would cover the drawer buttons, so it steps aside while the drawer is open */
.post-drawer-lock .intercom-button {
  visibility: hidden;
}

