/**
 * Speech App tab navigation and content styling.
 * Active tab: 2px orange border-bottom. Inactive: clickable links, no underline.
 */

 :root {
  --gutter: 24px;
  --text-color: #1C2B34;
  --text-color-light: #6C7377;
  --text-color-blue: #2563EB;
  /* Scroll offset for anchor links and "In this article" nav */
  --speech-app-scroll-offset: 200px;
 }

 @media (min-width: 1025px) {
  :root {
    --speech-app-scroll-offset: 120px;
  }
 }


 #post .speech-app-tab-content h2, #post .speech-app-tab-content h3,
 .speech-app-section__content h2, .speech-app-section__content h3,
 .speech-app-support-article__content h2, .speech-app-support-article__content h3,
 .speech-app-overview-hero h2,
 .speech-app-support-article__title,
 .speech-app-tab-content h2 *,
 .speech-app-tab-content h3 *,
 .speech-app-tab-content h4,
 .speech-app-tab-content h4 *,
 .speech-app-section h4,
 .speech-app-section h4 *,
 h2.speech-app-support-articles__label {
  font-family: "Work Sans", sans-serif !important;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.45;
  margin-bottom: 12px;
 }

 #post .speech-app-tab-content p, .speech-app-section__content p,
 .speech-app-support-article__content p,
 #post .speech-app-tab-content ul, .speech-app-section__content ul,
 .speech-app-support-article__content ul,
 #post .speech-app-tab-content ol, .speech-app-section__content ol,
 .speech-app-support-article__content ol {
  line-height: 1.45;
  margin-top: 0.85em;
  margin-bottom: 0.85em;
  color: var(--text-color);
 }

 #post .speech-app-tab-content strong, .speech-app-section__content strong,
 .speech-app-support-article__content strong,
 #post .speech-app-tab-content b, .speech-app-section__content b,
 .speech-app-support-article__content b {
  font-weight: 600;
 }

 #post .speech-app-tab-content ul li ul,
 .speech-app-section__content ul li ul,
 .speech-app-support-article__content ul li ul,
 #post .speech-app-tab-content ol li ol,
 .speech-app-section__content ol li ol,
 .speech-app-support-article__content ol li ol {
  margin-bottom: 0;
 }

 #post .speech-app-tab-content ul, .speech-app-section__content ul,
 .speech-app-support-article__content ul,
 #post .speech-app-tab-content ol, .speech-app-section__content ol,
 .speech-app-support-article__content ol {
  padding-left: 26px;
 }

 #post .speech-app-tab-content ul,
 .speech-app-section__content ul,
 .speech-app-support-article__content ul {
  margin-top: 0;
 }

 #post .speech-app-tab-content ul li,
 .speech-app-section__content ul li,
 .speech-app-support-article__content ul li,
 #post .speech-app-tab-content ol li,
 .speech-app-section__content ol li,
 .speech-app-support-article__content ol li {
  line-height: 1.6;
 }

 @media only screen and (min-width: 769px) {
  #post .speech-app-tab-content ul li::before,
  .speech-app-support-article__content ul li::before {
    line-height: 1.8;
  }
 }

 /* Front end (#post) + block editor (no #post; canvas may use .editor-styles-wrapper) */
 #post .speech-app-section p a,
 #post .speech-app-section li a,
 #post .speech-app-support-article__content p a,
 #post .speech-app-support-article__content li a,
 .block-editor-page .speech-app-section p a,
 .block-editor-page .speech-app-section li a,
 .editor-styles-wrapper .speech-app-section p a,
 .editor-styles-wrapper .speech-app-section li a,
 .speech-app-tab-content p a,
 .speech-app-tab__sections p a,
 .speech-app-support-article__content p a,
 .speech-app-tab-content li a,
 .speech-app-tab__sections li a,
 .speech-app-support-article__content li a {
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
  color: var(--text-color-blue);
 }

 #post .speech-app-section p a:hover,
 #post .speech-app-section li a:hover,
 #post .speech-app-support-article__content p a:hover,
 #post .speech-app-support-article__content li a:hover,
 .block-editor-page .speech-app-section p a:hover,
 .block-editor-page .speech-app-section li a:hover,
 .editor-styles-wrapper .speech-app-section p a:hover,
 .editor-styles-wrapper .speech-app-section li a:hover,
 .speech-app-tab-content p a:hover,
 .speech-app-tab-content li a:hover,
 .speech-app-tab__sections p a:hover,
 .speech-app-tab__sections li a:hover,
 .speech-app-support-article__content p a:hover,
 .speech-app-support-article__content li a:hover {
  text-decoration: underline;
 }

 /**
  * “Open in new tab” (target="_blank"): same glyph as .speech-app-external-link__svg / Support Articles.
  * Skip rows / developer link that already embed .speech-app-external-link__icon (avoid duplicate in editor).
  */
 #post .speech-app-tab-content a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after,
 .speech-app-support-article__content a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after,
 #post .speech-app-overview-hero a[target="_blank"]::after,
 .block-editor-page .speech-app-tab-content a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after,
 .block-editor-page .speech-app-tab__sections a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after,
 .block-editor-page .speech-app-overview-hero a[target="_blank"]::after,
 .editor-styles-wrapper .speech-app-tab-content a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after,
 .editor-styles-wrapper .speech-app-tab__sections a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after,
 .editor-styles-wrapper .speech-app-overview-hero a[target="_blank"]::after,
 .editor-styles-wrapper .speech-app-section__content a[target="_blank"]:not(.speech-app-support-articles__row):not(.speech-app-support-articles__developer-link)::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 0.35em;
  vertical-align: -0.125em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='black' d='M11.25 12H2.25C1.8375 12 1.5 11.6625 1.5 11.25V2.25C1.5 1.8375 1.8375 1.5 2.25 1.5H6C6.4125 1.5 6.75 1.1625 6.75 0.75C6.75 0.3375 6.4125 0 6 0H1.5C0.6675 0 0 0.675 0 1.5V12C0 12.825 0.675 13.5 1.5 13.5H12C12.825 13.5 13.5 12.825 13.5 12V7.5C13.5 7.0875 13.1625 6.75 12.75 6.75C12.3375 6.75 12 7.0875 12 7.5V11.25C12 11.6625 11.6625 12 11.25 12ZM8.25 0.75C8.25 1.1625 8.5875 1.5 9 1.5H10.9425L4.095 8.3475C3.8025 8.64 3.8025 9.1125 4.095 9.405C4.3875 9.6975 4.86 9.6975 5.1525 9.405L12 2.5575V4.5C12 4.9125 12.3375 5.25 12.75 5.25C13.1625 5.25 13.5 4.9125 13.5 4.5V0.75C13.5 0.3375 13.1625 0 12.75 0H9C8.5875 0 8.25 0.3375 8.25 0.75Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='black' d='M11.25 12H2.25C1.8375 12 1.5 11.6625 1.5 11.25V2.25C1.5 1.8375 1.8375 1.5 2.25 1.5H6C6.4125 1.5 6.75 1.1625 6.75 0.75C6.75 0.3375 6.4125 0 6 0H1.5C0.6675 0 0 0.675 0 1.5V12C0 12.825 0.675 13.5 1.5 13.5H12C12.825 13.5 13.5 12.825 13.5 12V7.5C13.5 7.0875 13.1625 6.75 12.75 6.75C12.3375 6.75 12 7.0875 12 7.5V11.25C12 11.6625 11.6625 12 11.25 12ZM8.25 0.75C8.25 1.1625 8.5875 1.5 9 1.5H10.9425L4.095 8.3475C3.8025 8.64 3.8025 9.1125 4.095 9.405C4.3875 9.6975 4.86 9.6975 5.1525 9.405L12 2.5575V4.5C12 4.9125 12.3375 5.25 12.75 5.25C13.1625 5.25 13.5 4.9125 13.5 4.5V0.75C13.5 0.3375 13.1625 0 12.75 0H9C8.5875 0 8.25 0.3375 8.25 0.75Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
 }

 .speech-app-tab-content h2, .speech-app-overview-hero h2,
 .speech-app-support-article__content h2,
 .speech-app-support-article__title { font-size: 24px; }
 .speech-app-tab-content h3, .speech-app-section h3,
 .speech-app-support-article__content h3 { font-size: 20px; }
 .speech-app-tab-content h4, .speech-app-section h4,
 .speech-app-support-article__content h4 { font-size: 18px; }

 @media only screen and (min-width: 1025px) {
  .speech-app-tab-content h2, .speech-app-overview-hero h2,
  .speech-app-support-article__content h2,
  .speech-app-support-article__title { font-size: 28px; }
  .speech-app-tab-content h3, .speech-app-section h3,
  .speech-app-support-article__content h3 { font-size: 24px; }
  .speech-app-section p, .speech-app-section li,
  .speech-app-tab-content p, .speech-app-tab-content li,
  .speech-app-support-article__content p, .speech-app-support-article__content li { font-size: 16px; }
 }

 /*
  * Block embeds under Speech App only (main.speech-app-single wraps app detail + nested support articles).
  * Keeps global post.css untouched; aspect-ratio on wrapper avoids ::before padding stacking with core inline styles.
  */
 .speech-app-single #post .wp-block-embed {
  margin-top: 0.85em;
  margin-bottom: 0.85em;
  max-width: 100%;
 }

 .speech-app-single #post .wp-block-embed .wp-block-embed__wrapper {
  min-width: 0;
  line-height: 0;
 }

 .speech-app-single #post .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
 }

 .speech-app-single #post .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper::before {
  content: none;
  display: none;
  padding: 0;
 }

 .speech-app-single #post .wp-embed-aspect-21-9.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 21 / 9;
 }

 .speech-app-single #post .wp-embed-aspect-18-9.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 18 / 9;
 }

 .speech-app-single #post .wp-embed-aspect-16-9.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 16 / 9;
 }

 .speech-app-single #post .wp-embed-aspect-4-3.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 4 / 3;
 }

 .speech-app-single #post .wp-embed-aspect-1-1.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 1 / 1;
 }

 .speech-app-single #post .wp-embed-aspect-9-16.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 9 / 16;
 }

 .speech-app-single #post .wp-embed-aspect-1-2.wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 1 / 2;
 }

 .speech-app-single #post .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
 }

 /* post.css desktop #post iframe max-height conflicts with responsive embed iframes */
 @media only screen and (min-width: 1024px) {
  .speech-app-single #post .wp-block-embed .wp-block-embed__wrapper iframe {
   max-width: 100%;
   max-height: none;
  }
 }

 /* Like/dislike (Overview & Get Started) — below section blocks; see single-speech_app.php */
 .speech-app-tab-content .speech-app-like-dislike-after-tab {
  width: 100%;
  clear: both;
 }

 #post.speech_app {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  max-width: none;
  line-height: 1.45;
 }

.speech-app-tabs-nav {
  border-bottom: 1px solid #e0e0e0;
}

.speech-app-tabs-nav__list {
  display: flex;
  gap: 10px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  list-style: none;
  max-width: 1250px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.speech-app-tabs-nav__item {
  margin: 0;
  padding: 0;
}

.speech-app-tabs-nav__link {
  display: block;
  padding: 0;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.speech-app-tabs-nav__label {
  display: inline-block;
  padding: 18px 8px;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.speech-app-tabs-nav__link--active {
  border-bottom-color: var(--orange, #F04E23);
  color: #333;
}

.speech-app-tabs-nav__link--active:hover {
  color: #333;
}

/* Keyboard focus — tab nav & in-page nav */
.speech-app-tabs-nav__link:focus-visible {
  outline: 2px solid var(--text-color-blue, #2563eb);
  outline-offset: 3px;
  border-radius: 4px;
}

.speech-app-tabs-nav__link--active:focus-visible {
  outline: 2px solid var(--orange, #f04e23);
  outline-offset: 3px;
}

#speech-app-tabs-nav:focus-visible {
  outline: 2px solid var(--text-color-blue, #2563eb);
  outline-offset: 4px;
}

.speech-app-in-this-article__toggle:focus-visible {
  outline: 2px solid var(--text-color-blue, #2563eb);
  outline-offset: 2px;
}

.speech-app-in-this-article__link:focus-visible {
  outline: 2px solid var(--text-color-blue, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

.speech-app-section[id]:focus-visible,
.speech-app-overview-hero[id]:focus-visible {
  outline: 2px solid var(--text-color-blue, #2563eb);
  outline-offset: 4px;
}

.speech-app-tab-content {
  margin-top: 0;
}

/* Support Articles and FAQ: no side nav, center content max 800px */
.speech-app-tab-body:not(.speech-app-tab-body--with-side-nav) .speech-app-tab-content {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.speech-app-tab-content p:first-child,
.speech-app-support-article__content p:first-child {
  margin-top: 0;
}

/* Overview hero - app icon, title, developer info */
.speech-app-overview-hero__icon {
  margin-bottom: 12px;
}

.speech-app-overview-hero__img {
  display: block;
  width: 64px;
  height: 64px;
}

.speech-app-overview-hero__text {
  flex: 1;
  min-width: 0;
}

.speech-app-overview-hero__developer {
  margin: 0 !important;
  font-size: 14px;
}

.speech-app-tab-body {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  min-height: 600px;
}

/* In this article side nav - mobile first, flexbox */
.speech-app-tab-body--with-side-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.speech-app-tab-content {
  min-width: 0;
}

/* Mobile: select-like toggle */
.speech-app-in-this-article {
  order: -1;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.speech-app-in-this-article__heading {
  display: none;
}

.speech-app-in-this-article__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: #fff;
  border: none;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1.2%;
  color: var(--text-color-light);
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.speech-app-in-this-article__toggle:hover {
  border-color: #ccc;
}

.speech-app-in-this-article__chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.speech-app-in-this-article__chevron svg {
  display: block;
}

.speech-app-in-this-article--open .speech-app-in-this-article__chevron {
  transform: rotate(-180deg);
}

.speech-app-in-this-article__inner {
  display: none;
  margin-top: 0;
  padding: 0 20px 4px;
}

.speech-app-in-this-article--open .speech-app-in-this-article__inner {
  display: block;
}

.speech-app-in-this-article__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.speech-app-in-this-article__list li {
  margin: 4px 0;
}

.speech-app-in-this-article__link {
  display: block;
  padding: 4px 0;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  color: var(--text-color-blue);
  font-weight: 400;
  position: relative;
  transition: color 0.28s ease;
}

.speech-app-in-this-article__back-to-top {
  display: none;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: none;
  cursor: pointer;
  appearance: none;
}

.speech-app-support-article__sidebar-heading {
  display: block;
  margin: 0 0 10px 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color-light);
}

@media (min-width: 1025px) {
  .speech-app-support-article__sidebar-heading {
    margin-top:12px;
  }
}

/* Desktop: flexbox, main 800px + sidebar 424px + gap = 1256px */
@media (min-width: 1025px) {
  .speech-app-tabs-nav__list {
    gap: 8px;
  }
  .speech-app-tabs-nav__link {
    font-size: 18px;
    /* vertical only: 10px + label 12px top + 12px bottom + 10px = prior 22px + 22px */
    padding: 10px 0;
  }
  .speech-app-tabs-nav__label {
    padding: 12px;
  }
  .speech-app-tabs-nav__link:not(.speech-app-tabs-nav__link--active):hover .speech-app-tabs-nav__label {
    background: rgba(0, 0, 0, 0.06);
  }
  .speech-app-tab-body--with-side-nav {
    flex-direction: row-reverse;
    gap: 70px;
    align-items: flex-start;
    max-width: 1224px;
    margin-left: auto;
    margin-right: auto;
  }

  .speech-app-tab-content {
    flex: 1;
    max-width: 800px;
    min-width: 0;
  }

  .speech-app-in-this-article {
    flex-shrink: 0;
    width: 362px;
    order: 0;
    position: sticky;
    top: 140px;
    border: none;
    overflow: visible;
    margin-top: 70px;
  }

  .speech-app-in-this-article__heading {
    display: block;
    margin: 0 0 10px 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color-light);
  }

  .speech-app-in-this-article__toggle {
    display: none;
  }

  .speech-app-in-this-article__inner {
    display: block;
    margin-top: 0;
    padding: 0;
    border: none;
  }

  .speech-app-in-this-article--open .speech-app-in-this-article__inner {
    display: block;
  }

  .speech-app-in-this-article__link {
    font-size: 14px;
    color: var(--text-color);
  }

  .speech-app-in-this-article__link::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='6' viewBox='0 0 4 6' fill='none'%3E%3Cpath d='M1.425%205.73298L3.58333%203.57464C3.90833%203.24964%203.90833%202.72464%203.58333%202.39964L1.425%200.241309C0.9%20-0.275358%200%200.0913091%200%200.832976V5.14131C0%205.89131%200.9%206.25798%201.425%205.73298Z' fill='%23F04E23'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    opacity: 0;
    transition: opacity 0.28s ease;
  }
  
  .speech-app-in-this-article__link:not(.speech-app-in-this-article__link--active):hover {
    color: var(--text-color-blue);
  }
  
  .speech-app-in-this-article__link--active {
    font-weight: 600;
    cursor: default;
  }
  
  .speech-app-in-this-article__link--active::before {
    opacity: 1;
  }
  
  .speech-app-in-this-article__back-to-top {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    color: #6c7377;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease, color 0.28s ease;
  }

  .speech-app-in-this-article__back-to-top-icon {
    flex-shrink: 0;
  }

  .speech-app-in-this-article__back-to-top:hover {
    color: var(--text-color-blue);
  }
  
  .speech-app-in-this-article__back-to-top--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .speech-app-in-this-article__back-to-top:focus-visible {
    outline: 2px solid var(--text-color-blue, #2563eb);
    outline-offset: 2px;
  }
}

/* Section blocks and hero - scroll-margin for anchor links */
.speech-app-section[id],
.speech-app-overview-hero[id] {
  scroll-margin-top: var(--speech-app-scroll-offset);
}

/* Carousel - Swiper */
.speech-app-section--carousel {
  margin: 22px 0;
}

/* Related resources (Overview / Get Started global + per-app lists) */
.speech-app-section--related-resources {
  margin: 22px 0;
}

/* Empty-state / editor placeholders (related resources, outline callouts, developer link). */
.speech-app-related-resources__placeholder {
  margin: 0;
  font-size: 14px;
  color: var(--text-color-light, #6c7377);
  font-style: italic;
}

/* Single slide: light frame at all breakpoints (matches former desktop-only look). */
.speech-app-carousel {
  position: relative;
  background: transparent;
  border: 1px solid #E7E7E7;
  border-radius: 10px;
  padding: 8px;
  overflow: hidden;
}

/* Multiple slides: former mobile look at all breakpoints + dot nav (see JS + PHP class). */
.speech-app-carousel--has-multiple {
  background: #F7F7F7;
  border: none;
  padding-bottom: 26px;
}

/* Multiple slides, no figcaptions: extra space for dot nav (class from carousel block PHP). */
.speech-app-carousel--has-multiple.speech-app-carousel--no-captions {
  padding-bottom: 36px;
}

.speech-app-carousel__swiper {
  overflow: hidden;
}

.speech-app-carousel__item {
  margin: 0;
}

/* Image stage: aspect ratio from first slide (JS --speech-app-carousel-aspect); letterbox with object-fit. */
.speech-app-carousel__media {
  width: 100%;
  aspect-ratio: var(--speech-app-carousel-aspect, 16 / 9);
  position: relative;
  overflow: hidden;
  background: rgba(28, 43, 52, 0.04);
}

.speech-app-carousel__img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.speech-app-carousel__caption {
  margin: 12px 0 4px 0;
  font-size: 14px;
  color: var(--text-color-light);
  text-align: center;
}

/* Swiper default ::after chevrons replaced by background SVG on desktop (see below). */
.speech-app-carousel .swiper-button-prev::after,
.speech-app-carousel .swiper-button-next::after {
  content: none !important;
  display: none !important;
}

/* Arrows: desktop only (hidden below 1025px) */
.speech-app-carousel__prev,
.speech-app-carousel__next {
  display: none !important;
}

/* Dots: below caption when multiple slides (all breakpoints; Swiper hides for single) */
.speech-app-carousel__pagination {
  margin-top: 0.5rem;
  position: relative;
}

.speech-app-carousel .swiper-pagination-bullet {
  background: #fff;
  border: 1px solid #6C7377;
  opacity: 1;
}

.speech-app-carousel .swiper-pagination-bullet-active {
  background: #6C7377;
  border-color: #6C7377;
}


@media (min-width: 1025px) {
  /* Arrows only when Swiper has multiple slides (see speech-app-carousel--has-multiple in JS) */
  .speech-app-carousel--has-multiple .swiper-button-prev.speech-app-carousel__prev,
  .speech-app-carousel--has-multiple .swiper-button-next.speech-app-carousel__next {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    color: transparent;
    border: none;
    cursor: pointer;
    background: transparent center / 27px 27px no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27' height='27' viewBox='0 0 27 27' fill='none'%3E%3Cpath fill='%231C2B34' d='M26.6667 13.3333C26.6667 5.97333 20.6933 0 13.3333 0C5.97333 0 0 5.97333 0 13.3333C0 20.6933 5.97333 26.6667 13.3333 26.6667C20.6933 26.6667 26.6667 20.6933 26.6667 13.3333ZM13.3333 17.0533V14.6667H9.33333C8.6 14.6667 8 14.0667 8 13.3333C8 12.6 8.6 12 9.33333 12H13.3333V9.61333C13.3333 9.01333 14.0533 8.72 14.4667 9.14667L18.1867 12.8667C18.4533 13.1333 18.4533 13.5467 18.1867 13.8133L14.4667 17.5333C14.0533 17.9467 13.3333 17.6533 13.3333 17.0533Z'/%3E%3C/svg%3E");
    opacity: 0.7;
    transition: opacity 0.2s ease;
  }

  .speech-app-carousel--has-multiple .swiper-button-prev.speech-app-carousel__prev:not(.swiper-button-disabled):hover,
  .speech-app-carousel--has-multiple .swiper-button-next.speech-app-carousel__next:not(.swiper-button-disabled):hover,
  .speech-app-carousel--has-multiple .swiper-button-prev.speech-app-carousel__prev:not(.swiper-button-disabled):focus-visible,
  .speech-app-carousel--has-multiple .swiper-button-next.speech-app-carousel__next:not(.swiper-button-disabled):focus-visible {
    opacity: 1;
  }

  .speech-app-carousel--has-multiple .swiper-button-prev.speech-app-carousel__prev.swiper-button-disabled,
  .speech-app-carousel--has-multiple .swiper-button-next.speech-app-carousel__next.swiper-button-disabled {
    opacity: 0.2;
    cursor: not-allowed;
  }

  .speech-app-carousel--has-multiple {
    padding-left: 48px;
    padding-right: 48px;
  }

  .speech-app-carousel--has-multiple .swiper-button-next.speech-app-carousel__next {
    margin-right: 6px;
  }

  .speech-app-carousel--has-multiple .swiper-button-prev.speech-app-carousel__prev {
    transform: translateY(-50%) scaleX(-1);
    margin-left: 6px;
  }
}

/* One slide: hide dot nav */
.speech-app-carousel:not(.speech-app-carousel--has-multiple) .speech-app-carousel__pagination {
  display: none !important;
}

/* Callout — info strip (icon + rich text) */
.speech-app-section--callout {
  margin: 22px 0;
}

.speech-app-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #e1f9f8;
  border-radius: 10px;
  border: none;
}

.speech-app-callout__icon {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 2px;
  line-height: 0;
  color: #04cac5;
}

.speech-app-callout__icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.speech-app-callout__content {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--text-color, #1c2b34);
}

.speech-app-callout__content p:first-child {
  margin-top: 0 !important;
}

.speech-app-callout__content p:last-child {
  margin-bottom: 0 !important;
}

/* Outline callouts — Need Help & Benefit Check (shared `.outline-callout`) */
.speech-app-section.outline-callout {
  margin: 22px 0;
}

.outline-callout__inner {
  margin: 0;
  padding: 24px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.outline-callout__title {
  margin-top: 0;
  margin-bottom: 8px !important;
  text-align: center;
}

.outline-callout__text {
  margin-top: 0;
  text-align: center;
}

.outline-callout__text > p:first-child {
  margin-top: 0 !important;
}

.outline-callout__text > p:last-child {
  margin-bottom: 0 !important;
}

.outline-callout__link-wrap {
  margin-top: 24px !important;
  margin-bottom: 0 !important;
  text-align: center;
}

.outline-callout__link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 6px 24px;
  height: 42px;
  border: 1px solid var(--orange, #f04e23);
  border-radius: 25px;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: var(--orange, #f04e23) !important;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.outline-callout__link:hover {
  color: var(--orange, #f04e23);
  border-color: var(--orange, #f04e23);
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none !important;
}

.outline-callout__link:focus {
  outline: none;
}

.outline-callout__link:focus-visible {
  outline: 2px solid var(--orange, #f04e23);
  outline-offset: 3px;
}

.outline-callout--empty .outline-callout__inner {
  border: 1px solid #e7e7e7;
}

.custom-like-dislike-container {
  margin-top: 22px !important;
}

/* Accordion section (Overview / Get Started / FAQ) */
.speech-app-section--accordion {
  margin: 22px 0;
}

.speech-app-accordion {
  border-top: 1px solid #e7e7e7;
}

.speech-app-accordion__item {
  border-bottom: 1px solid #e7e7e7;
}

.speech-app-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  padding: 0.7rem 8px;
  margin: 0;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: var(--text-color-blue, #2563eb);
  appearance: none;
}

.speech-app-accordion__trigger:hover {
  color: var(--text-color-blue, #2563eb);
}

.speech-app-accordion__trigger:focus-visible {
  outline: 2px solid var(--text-color-blue, #2563eb);
  outline-offset: 2px;
}

.speech-app-accordion__title {
  flex: 1;
  min-width: 0;
}

.speech-app-accordion__chevron {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-color-blue, #2563eb);
  transition: transform 0.2s ease;
}

.speech-app-accordion__chevron svg {
  display: block;
}

.speech-app-accordion__item.open .speech-app-accordion__chevron {
  transform: rotate(-180deg);
}

.speech-app-section--accordion .accordion-item .content {
  transition: opacity 0.15s ease, visibility 0.15s ease, max-height 0.15s ease, margin-top 0.15s ease;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  padding: 0 8px;
}

.speech-app-section--accordion .accordion-item.open .content {
  opacity: 1;
  visibility: visible;
  max-height: 1000px;
}

/* Support Articles tab — row list, external icons, developer link block */
.speech-app-support-articles {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1025px) {
  .speech-app-accordion__trigger {
    padding: 0.7rem 16px;
    transition: background-color 0.15s ease;
  }

  .speech-app-accordion__trigger:hover {
    background-color: #ecf5fe;
    color: var(--text-color-blue, #2563eb);
  }

  .speech-app-section--accordion .accordion-item .content {
    padding: 0 16px;
  }
}

/* FAQ tab: section title above block content (matches Support Articles label style) */
.speech-app-faq-heading {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.speech-app-faq-heading .speech-app-support-articles__label {
  margin-top: 0;
}

/*
 * FAQ tab editor hint — markup only exists in $is_preview (not saved). No .block-editor-page
 * prefix so rules apply inside the editor canvas iframe.
 */
.speech-app-tab-faq-editor-hint .speech-app-tab__editor-placeholder {
  margin: 0 0 12px 0;
  padding: 10px 12px;
  color: #757575;
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  border: 1px dashed #c3c4c7;
  border-radius: 2px;
  background: #f6f7f7;
}

/*
 * Hide placeholder when any inner block exists. Gutenberg DOM varies; direct-child rules on
 * .block-editor-block-list__layout often fail with ACF / nested inner blocks.
 */
.speech-app-tab-faq-editor-hint:has([data-block]) .speech-app-tab__editor-placeholder,
.speech-app-tab-faq-editor-hint:has(.speech-app-tab__sections .wp-block) .speech-app-tab__editor-placeholder,
.speech-app-tab-faq-editor-hint:has(.speech-app-tab__sections .block-editor-block-list__block) .speech-app-tab__editor-placeholder {
  display: none !important;
}

.speech-app-support-articles__list {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Undo tab-content ul/li rules (custom ::before bullets, padding) for this list only */
#post .speech-app-tab-content .speech-app-support-articles__list,
.speech-app-tab-content .speech-app-support-articles__list {
  padding-left: 0;
  list-style: none;
}

#post .speech-app-tab-content .speech-app-support-articles__list li,
.speech-app-tab-content .speech-app-support-articles__list li {
  padding-left: 0;
}

#post .speech-app-tab-content .speech-app-support-articles__list li::before,
.speech-app-tab-content .speech-app-support-articles__list li::before {
  content: none;
  display: none;
}

.speech-app-support-articles__item {
  list-style: none;
  border-bottom: 1px solid #e7e7e7;
}

.speech-app-support-articles__list {
  margin-top: 16px !important;
}

.speech-app-support-articles__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 8px;
  margin: 0;
  font-size: 16px;
  color: var(--text-color-blue, #2563eb);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.speech-app-support-articles__row:hover {
  background-color: #ecf5fe;
  text-decoration: none !important;
  color: var(--text-color-blue, #2563eb);
}

.speech-app-support-articles__title {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.speech-app-external-link__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.speech-app-external-link__svg {
  display: block;
}

.speech-app-support-articles__item--empty {
  border-bottom: none;
}

.speech-app-support-articles__empty {
  display: block;
  padding: 1rem 0.25rem;
  color: var(--text-color-light);
  font-style: italic;
}

.speech-app-support-articles__developer {
  margin: 22px 0;
  padding-left: 1rem;
  border-left: 2px solid #e7e7e7;
}

.speech-app-support-articles__developer-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 14px;
  color: var(--text-color-light, #6c7377);
  letter-spacing: 0.02em;
}

.speech-app-support-articles__developer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-color-blue, #2563eb);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}

.speech-app-support-articles__developer-link:hover {
  text-decoration: underline;
  color: var(--text-color-blue, #2563eb);
}

.speech-app-support-articles__developer-text {
  flex: 0 1 auto;
}

@media (min-width: 1025px) {
  .speech-app-support-articles__row {
    padding: 0.7rem 16px;
  }
}

/* Editor styles - tab labels mimic frontend nav */
.wp-block-post-content .speech-app-tabs {
  max-width: 800px;
}

.wp-block-post-content .speech-app-tab__label {
  display: block;
  padding: 18px 8px;
  margin: 0 0 -1px 0;
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.45;
  margin-top: 48px;
  margin-bottom: 24px;
  font-size: 18px;
  border-top: 2px solid #F04E23;
  border-bottom: 2px solid #F04E23;
}

/* -------------------------------------------------------------------------
   Legacy support article — /speech-app/{app}/support-articles/{post-slug}/
   ------------------------------------------------------------------------- */

.speech-app-support-article {
  --speech-app-support-article-max: 1224px;
}

.speech-app-support-article__layout {
  max-width: var(--speech-app-support-article-max);
  margin: 0 auto;
  padding: 2rem var(--gutter, 24px) 3rem;
  display: grid;
  grid-template-columns: 1fr;
  /* Match .speech-app-tab-body--with-side-nav column gap */
  gap: 24px;
}

.speech-app-support-article__main {
  min-width: 0;
}

#post.speech-app-support-article__main {
  padding: 0;
}

.speech-app-support-article__content {
  color: var(--text-color, #1c2b34);
  line-height: 1.45;
}

.speech-app-support-article__sidebar {
  position: relative;
}

.speech-app-support-article__sidebar-list {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 0;
}

.speech-app-support-article__sidebar-item {
  margin: 0;
  padding: 0;
}

.speech-app-support-article__sidebar-link {
  display: flex;
  gap: 0.65rem;
  font-size: 14px;
  line-height: 28px;
  font-weight: 400;
  color: var(--text-color);
  text-decoration: none;
  margin: 4px 0;
}

li:not(.speech-app-support-article__sidebar-item--current) .speech-app-support-article__sidebar-link:hover {
  color: var(--text-color-blue, #2563eb);
  text-decoration: none;
}

.speech-app-support-article__sidebar-item--current .speech-app-support-article__sidebar-link {
  font-weight: 600;
  cursor: default;
  background: transparent;
}

.speech-app-support-article__sidebar-doc {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--text-color-blue, #2563eb);
  margin-top: 7px;
}

.speech-app-support-article__sidebar-item--current .speech-app-support-article__sidebar-doc {
  color: var(--text-color-blue, #2563eb);
}

.speech-app-support-article__sidebar-doc .speech-app-external-link__svg {
  display: block;
  width: 15px;
  height: 15px;
}

.speech-app-support-article__sidebar-label {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1024px) {
  .speech-app-support-article__sidebar {
    border-top: 1px solid #e7e7e7;
    padding-top: 24px;
  }
}

@media (min-width: 1025px) {
  .speech-app-support-article__layout {
    /* Match app detail: main max 800px + gap 70px + sidebar 362px within max-width 1224 */
    grid-template-columns: minmax(0, 1fr) 362px;
    gap: 70px;
    align-items: flex-start;
  }

  .speech-app-support-article__main {
    max-width: 800px;
  }

  /* Sticky sidebar (same stack offset as .speech-app-in-this-article; no back-to-top) */
  .speech-app-support-article__sidebar {
    position: sticky;
    top: 140px;
    align-self: start;
    overflow: visible;
  }
}