/* Key takeaway + FAQ blocks added to Thought Pieces articles.
   Built from the Uppercase theme's own fonts and variables, so the blocks
   match its typography and follow the light/dark scheme toggle. */

/* Key takeaway: a solid panel in the Thought Pieces brand navy (#010145: the
   favicon, buttons, headings and category labels) with white text. In the site's
   dark mode it keeps the same navy, with a faint outline against the dark page. */
.entry-content > .cxo-aeo-summary {
  --tp-takeaway-bg: #010145;
  margin: 0 0 2.25rem;
  padding: 1.75rem 2rem;
  background: var(--tp-takeaway-bg);
  /* fixed: the theme sets its radius variable to 0 on article pages */
  border-radius: 15px;
}
[site-data-scheme="dark"] .entry-content > .cxo-aeo-summary,
[data-scheme="dark"] .entry-content > .cxo-aeo-summary { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.cxo-aeo-summary .cxo-aeo-label {
  margin: 0 0 .7rem;
  font-family: var(--cs-font-section-headings-family), sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #fff;
  opacity: .7;
}
.entry-content > .cxo-aeo-summary .cxo-aeo-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #fff;
}
@media (max-width: 599px) {
  .entry-content > .cxo-aeo-summary { padding: 1.4rem 1.35rem; }
}

.entry-content > .cxo-aeo-faq {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cs-color-contrast-300, #dee2e6);
}
/* the title keeps the theme's own article h2 style; only spacing is set */
.entry-content > .cxo-aeo-faq .cxo-aeo-faq-title { margin: 0 0 1.25rem; }
.cxo-aeo-faq .cxo-aeo-item {
  margin: 0;
  border-bottom: 1px solid var(--cs-color-contrast-200, #e9ecef);
}
.cxo-aeo-faq .cxo-aeo-item:first-of-type {
  border-top: 1px solid var(--cs-color-contrast-200, #e9ecef);
}
.cxo-aeo-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
}
.cxo-aeo-faq summary::-webkit-details-marker { display: none; }
.cxo-aeo-faq summary:focus-visible {
  outline: 2px solid var(--tp-brand);
  outline-offset: 4px;
  border-radius: 2px;
}
.entry-content > .cxo-aeo-faq .cxo-aeo-q {
  margin: 0;
  font-family: var(--cs-font-headings-family), sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}
.cxo-aeo-faq .cxo-aeo-icon {
  position: relative;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--cs-color-contrast-300, #dee2e6);
  transition: background-color .2s, border-color .2s;
}
.cxo-aeo-faq .cxo-aeo-icon::before,
.cxo-aeo-faq .cxo-aeo-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .75rem;
  height: 1.5px;
  background: var(--tp-brand);
  transform: translate(-50%, -50%);
  transition: transform .2s, background-color .2s;
}
.cxo-aeo-faq .cxo-aeo-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.cxo-aeo-faq details[open] .cxo-aeo-icon {
  background: var(--tp-brand);
  border-color: var(--tp-brand);
}
.cxo-aeo-faq details[open] .cxo-aeo-icon::before,
.cxo-aeo-faq details[open] .cxo-aeo-icon::after { background: var(--tp-brand-contrast); }
.cxo-aeo-faq details[open] .cxo-aeo-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.cxo-aeo-faq summary:hover .cxo-aeo-icon { border-color: var(--tp-brand); }
.entry-content > .cxo-aeo-faq .cxo-aeo-a p {
  margin: 0 0 1.25rem;
  padding-right: 3rem;
  line-height: 1.65;
  color: var(--cs-color-excerpt, #717275);
}

@media (max-width: 599px) {
  .entry-content > .cxo-aeo-faq .cxo-aeo-a p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cxo-aeo-faq .cxo-aeo-icon,
  .cxo-aeo-faq .cxo-aeo-icon::before,
  .cxo-aeo-faq .cxo-aeo-icon::after { transition: none; }
}

/* links to a section (#heading) land below the sticky menu bar */
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 100px; }

/* the theme's muted background clips fade out while they jump back to their start (theme scripts.js) */
.cs-video-wrapper iframe { transition: opacity .25s; }
.cs-video-wrapper.cxo-hold iframe { opacity: 0; }

/* The theme's background clips (article hero, home page and archive cards) play muted on a loop, so
   their sound and pause buttons are hidden; the "Watch" icon stays and opens the video popup. */
.cs-video-controls .cs-player-volume,
.cs-video-controls .cs-player-state { display: none !important; }

/* FAQ accents (+/− buttons, focus ring) in the brand navy; white on the dark scheme */
.cxo-aeo-faq { --tp-brand: #010145; --tp-brand-contrast: #fff; }
[site-data-scheme="dark"] .cxo-aeo-faq, [data-scheme="dark"] .cxo-aeo-faq { --tp-brand: #fff; --tp-brand-contrast: #010145; }
