/* ==========================================================================
   Zesty case study — page-scoped styles
   ========================================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* --------------------------------------------------------------------------
   Page background
   -------------------------------------------------------------------------- */

/* Flush body + section + article — stylo.css paints all three. */
[data-theme="light"] body#case,
[data-theme="light"] body#case article,
[data-theme="light"] body#case section {
  background-color: #ffffff;
}


/* --------------------------------------------------------------------------
   Bilingual span hiding
   -------------------------------------------------------------------------- */

body.lang-en [lang="es"],
body.lang-es [lang="en"] {
  display: none;
}

body.zesty-lang-fading {
  opacity: 0;
}

body {
  transition: opacity 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
}


/* --------------------------------------------------------------------------
   Language toggle (header)
   -------------------------------------------------------------------------- */

.nav .buttons .lang-toggle {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 4px;
  border-radius: 20px;
  background: rgba(13, 10, 11, 0.05);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  gap: 2px;
  box-sizing: border-box;
}

.nav .buttons .lang-toggle a,
.nav .buttons .lang-toggle a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 36px;
  width: auto;
  height: 30px;
  padding: 0 10px;
  margin: 0;
  border: 0;
  border-radius: 15px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #0d0a0b;
  text-decoration: none;
  transform: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav .buttons .lang-toggle a:hover,
.nav .buttons .lang-toggle a:focus-visible {
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 0;
  transform: scale(1.04);
  box-shadow: none;
}

.nav .buttons .lang-toggle a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.85);
  color: #0d0a0b;
  cursor: default;
}

.nav .buttons .lang-toggle a[aria-current="page"]:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: none;
}

[data-theme="dark"] .nav .buttons .lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .nav .buttons .lang-toggle a {
  color: #0d0a0b;
  background: transparent;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

[data-theme="dark"] .nav .buttons .lang-toggle a:hover,
[data-theme="dark"] .nav .buttons .lang-toggle a:focus-visible {
  background: rgba(255, 255, 255, 0.55);
  color: #0d0a0b;
  border: 0;
  transform: none;
  box-shadow: none;
}

[data-theme="dark"] .nav .buttons .lang-toggle a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.92);
  color: #0d0a0b;
}


/* --------------------------------------------------------------------------
   Article content
   -------------------------------------------------------------------------- */

#case article {
  font-family: var(--font-display);
  /* box-sizing critical: stylo.css's `article` sets width: 100%, without border-box
     padding-inline adds to total and causes phantom horizontal scroll. */
  box-sizing: border-box;
  max-width: 80ch;
  padding-inline: 1rem;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  hyphens: auto;
  -webkit-hyphens: auto;
}

#case article p {
  text-wrap: pretty;
}

/* Unitless line-heights — calc(1ex / N) was rendering tight in Firefox. */
#case article h1,
#case article h2,
#case article h3,
#case article h4 {
  text-wrap: balance;
}
#case article h2 { line-height: 1.35; }
#case article h3 { line-height: 1.45; }
#case article h4 { line-height: 1.55; }

#case article p,
#case article li {
  line-height: 1.65;
}

#case article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
}

#case article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1.2rem;
}

#case article h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 5% 0.5rem;
}

#case article ul,
#case article ol {
  margin: 0 5% 5%;
  padding-left: 1.4rem;
}

#case article ul li,
#case article ol li {
  margin-bottom: 0.5rem;
}

/* A <p> immediately followed by a list is its intro — collapse the gap. */
#case article p:has(+ ul),
#case article p:has(+ ol) {
  margin-bottom: 0.4rem;
}

#case article .highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
  row-gap: 1.75rem;
  margin: 0 5% 2.5rem;
  align-items: start;
}

#case article .highlights > div {
  width: auto;
  min-width: 0;
}

#case article .highlights h3 {
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.4rem;
  color: var(--color-text-light, #556268);
  letter-spacing: 0;
}

#case article .highlights ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#case article .highlights ul > li {
  margin: 0 0 0.3rem;
  padding-left: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  max-width: none;
  list-style: none;
}

#case article .highlights ul > li::before {
  content: none;
}

#case article .highlights ul > li:last-child {
  margin-bottom: 0;
}

#case article .highlights h3,
#case article .highlights li {
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: normal;
  word-break: normal;
}

@media only screen and (max-width: 500px) {
  #case article .highlights {
    column-gap: 1rem;
    row-gap: 1.25rem;
  }
  #case article .highlights h3 {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
  }
  #case article .highlights ul li {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
  }
}

/* TL;DR accordion — button + panel pair, not <details>/<summary>: UA behavior
   in some browsers killed the close transition no matter the CSS/JS. */
#case article > .zesty-tldr {
  margin: 0 5% 2rem;
  padding: 0;
  border-radius: 16px;
  background: var(--color-bg-alt, #F0F3F5);
  border: 1px solid color-mix(in oklab, var(--color-text) 10%, transparent);
  overflow: hidden;
  transition: background 200ms ease, border-color 200ms ease,
              box-shadow 200ms ease, transform 200ms ease;
}

#case article > .zesty-tldr:hover {
  border-color: color-mix(in oklab, var(--color-text) 18%, transparent);
  box-shadow: 0 4px 14px color-mix(in oklab, var(--color-text) 10%, transparent);
  transform: translateY(-1px);
}

#case article > .zesty-tldr[data-state="open"] {
  background: color-mix(in oklab, var(--color-bg-alt, #F0F3F5) 92%, var(--color-text) 3%);
  border-color: color-mix(in oklab, var(--color-text) 14%, transparent);
}

#case article > .zesty-tldr > .zesty-tldr__panel {
  display: grid;
  /* minmax(0, 0fr) — plain `0fr` grows to min-content, leaving a ghost band. */
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

#case article > .zesty-tldr[data-state="open"] > .zesty-tldr__panel {
  grid-template-rows: minmax(0, 1fr);
}

#case article > .zesty-tldr > .zesty-tldr__panel > * {
  overflow: hidden;
  /* min-width/min-height: 0 — without these, grid items' default min-content
     inflates the parent and produces horizontal scroll. */
  min-width: 0;
  min-height: 0;
  opacity: 0;
  transition: opacity 320ms ease-out;
}

#case article > .zesty-tldr[data-state="open"] > .zesty-tldr__panel > * {
  opacity: 1;
  transition: opacity 320ms ease-out 120ms;
}

.zesty-tldr__summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  user-select: none;
  width: 100%;
  /* box-sizing: border-box — width 100% + padding overflowed parent on mobile. */
  box-sizing: border-box;
  background: transparent;
  border: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.zesty-tldr__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-zesty, #9071FF);
  padding: 0.32rem 0.6rem 0.36rem;
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 1;
}

.zesty-tldr__hint {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: inherit;
  opacity: 0.6;
  flex: 1;
  line-height: 1.35;
}

.zesty-tldr__chevron {
  width: 20px;
  height: 20px;
  color: currentColor;
  opacity: 0.55;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
  flex-shrink: 0;
}

.zesty-tldr:hover .zesty-tldr__chevron { opacity: 1; }
.zesty-tldr[data-state="open"] .zesty-tldr__chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Selector scoped to #case article to beat the global `#case article ul`
   rule's margin/padding-left, which would otherwise wash out the TL;DR's
   tight padding and indent the bullets into the article's 5% gutter. */
#case article .zesty-tldr__bullets {
  margin: 0;
  padding: 0.25rem 1.4rem 1.25rem 1.1rem;
  list-style: none;
  /* box-sizing: border-box so the JS height animation collapses padding too. */
  box-sizing: border-box;
}

.zesty-tldr__bullets li {
  position: relative;
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  font-size: 0.96rem;
  line-height: 1.55;
  color: inherit;
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: break-word;
}

.zesty-tldr__bullets li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-zesty, #9071FF);
}

.zesty-tldr__bullets a {
  color: var(--color-zesty, #9071FF);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in oklab, var(--color-zesty, #9071FF) 55%, transparent);
  transition: border-color 200ms ease, border-bottom-style 200ms ease;
}

.zesty-tldr__bullets a:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--color-zesty, #9071FF);
}

@media (prefers-reduced-motion: reduce) {
  .zesty-tldr__bullets a { transition: none; }
}

.zesty-tldr__summary:focus-visible {
  outline: 2px solid var(--color-accent, #5555EE);
  outline-offset: -2px;
}

[data-theme="dark"] #case article > .zesty-tldr {
  background: color-mix(in oklab, var(--text-color) 5%, transparent);
  border-color: color-mix(in oklab, var(--text-color) 12%, transparent);
}

[data-theme="dark"] #case article > .zesty-tldr:hover {
  border-color: color-mix(in oklab, var(--text-color) 22%, transparent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] #case article > .zesty-tldr[data-state="open"] {
  background: color-mix(in oklab, var(--text-color) 8%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  #case article > .zesty-tldr,
  #case article > .zesty-tldr:hover,
  #case article > .zesty-tldr > .zesty-tldr__panel,
  .zesty-tldr__chevron {
    transition: none;
    transform: none;
  }
  .zesty-tldr[data-state="open"] .zesty-tldr__chevron { transform: rotate(180deg); }
}

#case article .divider {
  color: var(--color-zesty, #9071FF);
  margin: 1.25rem 0 1.75rem;
  font-size: 1.6rem;
}
[data-theme="dark"] #case article .divider {
  color: #00FFBD;
}

/* dark-mode.css adds a hero gradient on header::before; disable it here. */
#case header::before {
  content: none;
}

#case article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 8%, transparent);
}


#case article h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -2px;
  margin: 0 0 0.5rem;
}

.zesty-lead {
  position: relative;
  margin: 0 0 2rem;
  padding: 1.75rem 1.9rem 1.75rem 2.4rem;
  background: color-mix(in srgb, var(--color-zesty, #9071FF) 3%, transparent);
  border-radius: var(--border-radius, 16px);
}

.zesty-lead::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 3px;
  border-radius: 999px;
  background: var(--color-zesty, #9071FF);
}

.zesty-lead p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  opacity: 0.88;
  text-wrap: pretty;
}

/* Strong inherits line-height from <p> — Firefox uses strong's line-height
   as the strut, compressing surrounding body text otherwise. */
.zesty-lead [lang] > strong:first-of-type {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: inherit;
  letter-spacing: -0.005em;
  text-wrap: balance;
}


.zesty-tagline {
  color: var(--color-text-light, #556268);
  font-size: 0.95rem;
  margin-top: -0.3rem;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .zesty-tagline {
  color: color-mix(in srgb, var(--text-color) 70%, transparent);
}


.zesty-byline {
  text-align: left;
  color: var(--color-text-light, #556268);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

.zesty-byline--center {
  text-align: center;
  margin: 0 0 2rem;
}

[data-theme="dark"] .zesty-byline {
  color: color-mix(in srgb, var(--text-color) 65%, transparent);
}


/* --------------------------------------------------------------------------
   Callout / aside
   -------------------------------------------------------------------------- */

.zesty-callout {
  margin: 0 5% 1.5rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--border-radius, 16px);
  background: color-mix(in srgb, currentColor 5%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.zesty-callout p {
  margin: 0;
  max-width: 90ch;
}

.zesty-callout--insight,
.zesty-callout--signal,
.zesty-callout--wip {
  position: relative;
  padding-left: 2.2rem;
}

.zesty-callout--insight::before,
.zesty-callout--signal::before,
.zesty-callout--wip::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 3px;
  border-radius: 999px;
}

.zesty-callout--insight {
  background: color-mix(in srgb, var(--color-accent, #5555EE) 7%, transparent);
  border-color: color-mix(in srgb, var(--color-accent, #5555EE) 22%, transparent);
}

.zesty-callout--insight::before {
  background: var(--color-accent, #5555EE);
}

.zesty-callout--signal {
  background: color-mix(in srgb, var(--color-updated, #00C896) 8%, transparent);
  border-color: color-mix(in srgb, var(--color-updated, #00C896) 28%, transparent);
  scroll-margin-top: 1.5rem;
}

.zesty-callout--signal::before {
  background: var(--color-updated, #00C896);
}

.zesty-callout--signal strong {
  color: var(--color-updated, #00C896);
}

.zesty-callout--flow {
  text-align: center;
  background: color-mix(in srgb, var(--color-zesty, #9071FF) 8%, transparent);
  border: 1px dashed color-mix(in srgb, var(--color-zesty, #9071FF) 35%, transparent);
}

.zesty-callout--flow p {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  max-width: none;
}

.zesty-callout--wip {
  background: color-mix(in srgb, #FFB347 8%, transparent);
  border-color: color-mix(in srgb, #FFB347 30%, transparent);
}

.zesty-callout--wip::before {
  background: #FFB347;
}

.zesty-callout--finding,
.zesty-callout--icon {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding-left: 1.3rem;
}

.zesty-callout__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 0.1rem;
  color: var(--color-zesty, #9071FF);
}

.zesty-callout__icon svg {
  width: 100%;
  height: 100%;
}

.zesty-callout__icon svg [stroke] {
  stroke-width: 1.5;
}

.zesty-callout--finding p,
.zesty-callout--icon p {
  flex: 1 1 auto;
  min-width: 0;
}

[data-theme="dark"] .zesty-callout__icon {
  color: #00FFBD;
}

/* Specificity bump (article a.zesty-...) beats stylo.css's article p a:link. */
article a.zesty-link-external,
article a.zesty-link-external:link,
article a.zesty-link-external:visited {
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: border-bottom-color 0.2s ease, color 0.2s ease;
}

article a.zesty-link-external:hover,
article a.zesty-link-external:focus-visible {
  border-bottom: 2px solid currentColor;
}

.zesty-link-external svg {
  width: 0.78em;
  height: 0.78em;
  margin-left: 0.15em;
  vertical-align: 0.05em;
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.zesty-link-external:hover svg,
.zesty-link-external:focus-visible svg {
  opacity: 1;
}

[data-theme="dark"] article a.zesty-link-external,
[data-theme="dark"] article a.zesty-link-external:link,
[data-theme="dark"] article a.zesty-link-external:visited {
  color: #A689FF;
}

.zesty-check-done {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.15em;
  vertical-align: -0.15em;
  color: var(--color-updated, #00C896);
}


/* --------------------------------------------------------------------------
   Quote (Vicente Rotman blockquotes)
   -------------------------------------------------------------------------- */

.zesty-quote {
  margin: 1.5rem 8% 1.5rem;
  padding: 0.5rem 0 0.5rem 1.25rem;
  position: relative;
  font-style: italic;
}

.zesty-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 3px;
  border-radius: 999px;
  background: var(--color-zesty, #9071FF);
}

.zesty-quote p {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
}

.zesty-quote cite {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-light, #556268);
  font-style: normal;
}

[data-theme="dark"] .zesty-quote cite {
  color: color-mix(in srgb, var(--text-color) 65%, transparent);
}


/* --------------------------------------------------------------------------
   Lesson headings (What I learned)
   -------------------------------------------------------------------------- */

.zesty-lesson {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 1.1rem !important;
  margin-top: 2rem !important;
}

.zesty-lesson__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  color: var(--color-text-light, #556268);
  white-space: nowrap;
}

.zesty-lesson--insight    .zesty-lesson__tag { background: color-mix(in srgb, var(--color-accent, #5555EE) 14%, transparent); color: var(--color-accent, #5555EE); }
.zesty-lesson--highlight  .zesty-lesson__tag { background: color-mix(in srgb, #FFB347 16%, transparent); color: #B86E00; }
.zesty-lesson--conclusion .zesty-lesson__tag { background: color-mix(in srgb, var(--color-zesty, #9071FF) 16%, transparent); color: var(--color-zesty, #9071FF); }
.zesty-lesson--discovery  .zesty-lesson__tag { background: color-mix(in srgb, #00B795 14%, transparent); color: #00876B; }
.zesty-lesson--risk       .zesty-lesson__tag { background: color-mix(in srgb, #E53A2C 14%, transparent); color: #C72A1E; }

[data-theme="dark"] .zesty-lesson--highlight  .zesty-lesson__tag { color: #FFD18A; }
[data-theme="dark"] .zesty-lesson--discovery  .zesty-lesson__tag { color: #5BD8B8; }
[data-theme="dark"] .zesty-lesson--risk       .zesty-lesson__tag { color: #FF7A6E; }


/* --------------------------------------------------------------------------
   Figures, captions
   -------------------------------------------------------------------------- */

.zesty-figure {
  margin: 1.5rem 0 2rem;
  padding: 0;
}

.zesty-figure--wide {
  width: min(1100px, calc(100vw - 2rem));
  max-width: none;
  margin-left: 50%;
  margin-right: 0;
  transform: translateX(-50%);
}

.zesty-figure--wide figcaption {
  max-width: 70ch;
}

.zesty-figure picture {
  display: block;
  cursor: zoom-in;
}

.zesty-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius, 16px);
  background: color-mix(in srgb, currentColor 4%, transparent);
}

/* Caption stays in the DOM (vs display: none) so assistive tech finds it;
   lightbox.js reads it via querySelector. */
.zesty-figure figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* --------------------------------------------------------------------------
   Pending image skeleton
   -------------------------------------------------------------------------- */

/* Shimmer shows during load and stays visible if the file is missing. */
.zesty-image,
.video-frame {
  background: linear-gradient(110deg,
    color-mix(in srgb, currentColor 5%, transparent) 8%,
    color-mix(in srgb, currentColor 12%, transparent) 18%,
    color-mix(in srgb, currentColor 5%, transparent) 33%);
  background-size: 200% 100%;
  animation: zesty-shimmer 1.6s ease-in-out infinite;
}

.zesty-image.zesty-image--loaded,
.video-frame.video-frame--loaded {
  animation: none;
  background: transparent;
}

@keyframes zesty-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .zesty-image,
  .video-frame {
    animation: none;
    background: color-mix(in srgb, currentColor 8%, transparent);
  }
}


/* --------------------------------------------------------------------------
   Video frames (lazy-mounted)
   -------------------------------------------------------------------------- */

.video-frame {
  display: block;
  width: 100%;
  border-radius: var(--border-radius, 16px);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.video-frame--landscape {
  aspect-ratio: 16 / 9;
  max-height: 80vh;
}

/* --portrait is a legacy class name; exports are actually landscape (5:3). */
.video-frame--portrait {
  aspect-ratio: 5 / 3;
  max-height: 80vh;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.video-frame:not(.video-frame--loaded)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: rgba(13, 10, 11, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='white'><path d='M8 5L8 19L20 12Z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.9;
}

.video-frame[data-poster-loaded] {
  background-image: var(--poster-image);
  background-size: cover;
  background-position: center;
}


/* --------------------------------------------------------------------------
   Stepper (registration evolution)
   -------------------------------------------------------------------------- */

.zesty-stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.zesty-stepper .stepper-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  margin: 0 auto;
  border-radius: var(--border-radius, 16px);
  overflow: hidden;
}

.zesty-stepper .stepper-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  cursor: zoom-in;
  transition: opacity 220ms ease;
}

.zesty-stepper .stepper-image[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
}

.zesty-stepper .stepper-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .zesty-stepper .stepper-image {
    transition: none;
  }
}

.zesty-stepper .stepper-control {
  display: inline-flex;
  margin-top: 1.25rem;
  padding: 4px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
  border-radius: 999px;
  gap: 2px;
}

.zesty-stepper .stepper-control button {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: inherit;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.zesty-stepper .stepper-control button:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.zesty-stepper .stepper-control button[aria-selected="true"] {
  background: var(--color-zesty, #9071FF);
  color: white;
}

.zesty-stepper .stepper-control button:focus-visible {
  outline: 2px solid var(--color-zesty, #9071FF);
  outline-offset: 2px;
}


/* --------------------------------------------------------------------------
   Share buttons
   -------------------------------------------------------------------------- */

.zesty-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 3rem 0 2rem;
}

.zesty-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  background: color-mix(in srgb, currentColor 6%, transparent);
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.zesty-share__btn:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px color-mix(in srgb, currentColor 12%, transparent);
}

.zesty-share__btn:focus-visible {
  outline: 2px solid var(--color-zesty, #9071FF);
  outline-offset: 2px;
}

.zesty-share__btn svg {
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Back-to-top button
   -------------------------------------------------------------------------- */

.zesty-back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: rgba(13, 10, 11, 0.06);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  z-index: 9000;
}

.zesty-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.zesty-back-to-top:hover {
  background: rgba(13, 10, 11, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.zesty-back-to-top:focus-visible {
  outline: 2px solid var(--color-zesty, #9071FF);
  outline-offset: 2px;
}

.zesty-back-to-top svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Over media: opacify the glass — flipping the icon color failed on mockups
   that matched the flipped tone (e.g. light mockups + white icon). */
.zesty-back-to-top.is-over-media {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .zesty-back-to-top {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-color);
}

[data-theme="dark"] .zesty-back-to-top:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .zesty-back-to-top.is-over-media {
  background: rgba(13, 10, 11, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .zesty-back-to-top {
    transition: opacity 100ms linear;
    transform: none;
  }
  .zesty-back-to-top:hover {
    transform: none;
  }
}


/* --------------------------------------------------------------------------
   Reading controls (typeface + line-height)
   -------------------------------------------------------------------------- */

.zesty-reading-controls {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 9000;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.zesty-reading-controls.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.zesty-reading-toggle {
  height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(13, 10, 11, 0.06);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.zesty-reading-toggle__label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  /* Restore line-height: stylo.css's `button span { line-height: 0 }` collapses this. */
  line-height: 1;
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  overflow: hidden;
  transition: max-width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease,
    margin-left 0.5s ease;
}

.zesty-reading-toggle__label > span {
  line-height: 1;
}

.zesty-reading-controls.is-introducing .zesty-reading-toggle {
  padding: 0 16px 0 14px;
}

.zesty-reading-controls.is-introducing .zesty-reading-toggle__label {
  max-width: 280px;
  opacity: 1;
  margin-left: 0.55rem;
}

.zesty-reading-toggle:hover {
  background: rgba(13, 10, 11, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.zesty-reading-toggle:focus-visible {
  outline: 2px solid var(--color-zesty, #9071FF);
  outline-offset: 2px;
}

.zesty-reading-controls[data-state="open"] .zesty-reading-toggle {
  background: rgba(13, 10, 11, 0.12);
}

.zesty-reading-toggle.is-over-media {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .zesty-reading-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-color);
}

[data-theme="dark"] .zesty-reading-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .zesty-reading-controls[data-state="open"] .zesty-reading-toggle {
  background: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .zesty-reading-toggle.is-over-media {
  background: rgba(13, 10, 11, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}

.zesty-reading-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.6rem);
  width: min(calc(100vw - 2.5rem), 320px);
  padding: 1.05rem 1.1rem 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(13, 10, 11, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(13, 10, 11, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.97);
  transform-origin: bottom left;
  transition: opacity 200ms ease, transform 200ms ease;
  font-family: var(--font-display);
  color: var(--color-text);
}

.zesty-reading-controls[data-state="open"] .zesty-reading-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

[data-theme="dark"] .zesty-reading-panel {
  background: rgba(20, 17, 18, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.zesty-reading-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  color: var(--color-text-light, #556268);
}

[data-theme="dark"] .zesty-reading-title {
  color: color-mix(in srgb, var(--text-color) 65%, transparent);
}

.zesty-reading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.zesty-reading-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light, #556268);
}

[data-theme="dark"] .zesty-reading-label {
  color: color-mix(in srgb, var(--text-color) 55%, transparent);
}

.zesty-reading-segmented {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 10, 11, 0.05);
  border: 1px solid rgba(13, 10, 11, 0.06);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

[data-theme="dark"] .zesty-reading-segmented {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.zesty-reading-segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

[data-theme="dark"] .zesty-reading-segmented button {
  color: var(--text-color);
}

.zesty-reading-segmented button:hover {
  background: rgba(13, 10, 11, 0.06);
}

[data-theme="dark"] .zesty-reading-segmented button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.zesty-reading-segmented button[aria-pressed="true"] {
  background: var(--color-zesty, #9071FF);
  color: #ffffff;
  cursor: default;
}

[data-theme="dark"] .zesty-reading-segmented button[aria-pressed="true"] {
  background: #00FFBD;
  color: #0d0a0b;
}

.zesty-reading-segmented button svg {
  width: 14px;
  height: 14px;
  display: block;
}

.zesty-reading-reset {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-light, #556268);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.zesty-reading-reset:hover {
  background: rgba(13, 10, 11, 0.05);
  color: var(--color-text);
}

[data-theme="dark"] .zesty-reading-reset {
  color: color-mix(in srgb, var(--text-color) 65%, transparent);
}

[data-theme="dark"] .zesty-reading-reset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
}

.zesty-reading-row--outline {
  display: block;
}

.zesty-reading-row--outline .zesty-reading-label {
  display: block;
  margin-bottom: 0.5rem;
}

.zesty-outline ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.zesty-outline a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--color-text);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.zesty-outline a:hover {
  background: color-mix(in oklab, var(--color-text) 6%, transparent);
}

.zesty-outline a[aria-current="location"] {
  background: color-mix(in oklab, var(--color-accent, #5555EE) 12%, transparent);
  color: var(--color-accent, #5555EE);
  font-weight: 500;
}

[data-theme="dark"] .zesty-outline a {
  color: var(--text-color);
}

[data-theme="dark"] .zesty-outline a:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .zesty-outline a[aria-current="location"] {
  background: color-mix(in oklab, var(--color-accent, #5555EE) 22%, transparent);
  color: color-mix(in oklab, var(--color-accent, #5555EE) 70%, white);
}

@media (prefers-reduced-motion: reduce) {
  .zesty-reading-controls,
  .zesty-reading-panel,
  .zesty-reading-toggle,
  .zesty-reading-toggle__label {
    transition: opacity 100ms linear;
    transform: none;
  }
  .zesty-reading-toggle:hover {
    transform: none;
  }
  .zesty-outline a {
    transition: none;
  }
}


/* --------------------------------------------------------------------------
   Reading-pref body hooks (font + line-height swaps)
   -------------------------------------------------------------------------- */

/* #case + data-attr live on the same <body>, hence no descendant combinator. */
body#case[data-reading-font="serif"] article,
body#case[data-reading-font="serif"] article p,
body#case[data-reading-font="serif"] article li,
body#case[data-reading-font="serif"] article h1,
body#case[data-reading-font="serif"] article h2,
body#case[data-reading-font="serif"] article h3,
body#case[data-reading-font="serif"] article h4,
body#case[data-reading-font="serif"] article aside,
body#case[data-reading-font="serif"] article figcaption,
body#case[data-reading-font="serif"] article .zesty-lead,
body#case[data-reading-font="serif"] article .date {
  font-family: 'Merriweather', Georgia, ui-serif, Cambria, "Times New Roman", serif;
}

body#case[data-reading-lh="compact"] article p,
body#case[data-reading-lh="compact"] article li {
  line-height: 1.45;
}

body#case[data-reading-lh="relaxed"] article p,
body#case[data-reading-lh="relaxed"] article li {
  line-height: 1.85;
}


/* --------------------------------------------------------------------------
   Toast (copy-link feedback)
   -------------------------------------------------------------------------- */

.zesty-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: rgba(32, 47, 51, 0.95);
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 32px rgba(32, 47, 51, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}

.zesty-toast.zesty-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .zesty-toast {
  background: rgba(240, 243, 245, 0.95);
  color: #0d0a0b;
}


/* --------------------------------------------------------------------------
   Visually hidden / skip link
   -------------------------------------------------------------------------- */

.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;
}

a.visually-hidden:focus,
a.visually-hidden:focus-visible {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  margin: 0;
  clip: auto;
  background: var(--color-text, #202F33);
  color: white;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  z-index: 10000;
}


/* --------------------------------------------------------------------------
   Hero animations (H1 soft-blur-in + cascade reveal)
   -------------------------------------------------------------------------- */

/* JS adds .zesty-h1-anim after splitting the H1 into spans; --char-i staggers each char. */
#case article h1.zesty-h1-anim .word {
  display: inline-block;
  white-space: pre;
}

#case article h1.zesty-h1-anim .char {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(16px);
  animation: zesty-soft-blur-in 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--char-i, 0) * 22ms);
}

@keyframes zesty-soft-blur-in {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #case article h1.zesty-h1-anim .char {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}

/* .zesty-h1-anim-done neutralizes the animation so toggling language
   doesn't re-trigger char keyframes on the previously hidden span. */
#case article h1.zesty-h1-anim.zesty-h1-anim-done .char {
  animation: none;
  opacity: 1;
  filter: none;
  transform: none;
}

/* Cascade reveal: byline → lead → highlights fade up after the H1 starts. */
#case .zesty-byline:not(.zesty-byline--center),
#case article > .zesty-lead,
#case article > .highlights {
  opacity: 0;
  transform: translateY(8px);
  animation: zesty-fade-up 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#case .zesty-byline:not(.zesty-byline--center) { animation-delay: 600ms; }
#case article > .zesty-lead { animation-delay: 900ms; animation-duration: 600ms; }
#case article > .highlights { animation-delay: 1600ms; }

@keyframes zesty-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Lead-cover figure has its own keyframe because .zesty-figure--wide relies
   on translateX(-50%) to compensate margin-left: 50% — reusing the shared
   keyframe wipes that and shoves it off-screen. */
#case article > .zesty-figure[data-slot="21-hero-three-phones"] {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  animation: zesty-fade-up-wide 1100ms cubic-bezier(0.22, 1, 0.36, 1) 1300ms forwards;
}

@keyframes zesty-fade-up-wide {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #case .zesty-byline:not(.zesty-byline--center),
  #case article > .zesty-lead,
  #case article > .zesty-figure[data-slot="21-hero-three-phones"],
  #case article > .highlights {
    animation: none;
    opacity: 1;
    transform: translateX(-50%);
  }
  #case .zesty-byline:not(.zesty-byline--center),
  #case article > .zesty-lead,
  #case article > .highlights {
    transform: none;
  }
}


/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 720px) {
  .nav .buttons .lang-toggle a {
    padding: 0 9px;
    font-size: 0.72rem;
  }
}

/* stylo.css bumps #theme-toggle to 48px on <=600px for the home; scope a 36px
   override here so it stays proportional to the Zesty J logo. */
@media only screen and (max-width: 600px) {
  body#case .nav .buttons button#theme-toggle {
    width: 36px;
    height: 36px;
  }
  body#case .nav .buttons .lang-toggle {
    height: 36px;
    padding: 3px;
    border-radius: 18px;
  }
  body#case .nav .buttons .lang-toggle a,
  body#case .nav .buttons .lang-toggle a:visited {
    height: 28px;
    border-radius: 14px;
    min-width: 34px;
    padding: 0 9px;
  }
}

@media only screen and (max-width: 500px) {
  #case article h1 { font-size: 1.8rem; }
  #case article h2 { font-size: 1.3rem; }
  #case article h3 { font-size: 1.05rem; }
  .zesty-lead p { font-size: 0.95rem; }
  .zesty-lead [lang] > strong:first-of-type { font-size: 1.1rem; }
  .zesty-quote p { font-size: 1rem; }
}


/* --------------------------------------------------------------------------
   Claps / hearts — floating bottom-center pill
   -------------------------------------------------------------------------- */

/* Push the footer credit clear of the fixed claps pill. */
#case .support {
  padding-bottom: 5rem;
}

/* Reveal delayed on first visit until the reading-controls intro pill
   finishes its expansion; JS coordinates in initClaps. */
.zesty-claps {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 4px 14px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 10, 11, 0.06);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--color-text);
  /* appearance: none — iOS Safari paints its own gradient/border on top
     of the glass otherwise, breaking the backdrop blur. */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 240ms ease, transform 240ms ease,
    background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.zesty-claps.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.zesty-claps:hover {
  background: rgba(13, 10, 11, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.zesty-claps:focus-visible {
  outline: 2px solid var(--color-zesty, #9071FF);
  outline-offset: 2px;
}

.zesty-claps:disabled,
.zesty-claps[data-maxed="true"] {
  cursor: default;
}

/* Fade only the inner content, not the whole pill — dimming the pill drops
   backdrop-filter intensity and breaks the glass. */
.zesty-claps:disabled .zesty-claps__icon,
.zesty-claps:disabled .zesty-claps__total,
.zesty-claps:disabled .zesty-claps__cta,
.zesty-claps[data-maxed="true"] .zesty-claps__icon,
.zesty-claps[data-maxed="true"] .zesty-claps__total,
.zesty-claps[data-maxed="true"] .zesty-claps__cta {
  opacity: 0.6;
}

.zesty-claps:disabled:hover {
  background: rgba(13, 10, 11, 0.06);
  box-shadow: none;
}

.zesty-claps:disabled:hover .zesty-claps__icon,
.zesty-claps:disabled:active .zesty-claps__icon {
  transform: none;
}

[data-theme="dark"] .zesty-claps:disabled:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.zesty-claps__icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.18s ease;
}

.zesty-claps:hover .zesty-claps__icon {
  transform: scale(1.08);
}

.zesty-claps:active .zesty-claps__icon {
  transform: scale(0.92);
}

.zesty-claps__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.zesty-claps__burst {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.zesty-claps.is-bursting .zesty-claps__burst::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.55;
  animation: zesty-claps-burst 540ms ease-out forwards;
}

@keyframes zesty-claps-burst {
  0%   { opacity: 0.55; transform: scale(0.7); }
  100% { opacity: 0;    transform: scale(1.55); }
}

.zesty-claps__total,
.zesty-claps__cta {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.zesty-claps__total {
  font-feature-settings: 'tnum';
}

.zesty-claps__cta {
  opacity: 0.85;
}

[data-theme="dark"] .zesty-claps {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-color);
}

[data-theme="dark"] .zesty-claps:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.zesty-claps.is-over-media {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .zesty-claps.is-over-media {
  background: rgba(13, 10, 11, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .zesty-claps {
    transition: opacity 100ms linear;
    transform: translate(-50%, 0);
  }
  .zesty-claps__icon,
  .zesty-claps:hover .zesty-claps__icon,
  .zesty-claps:active .zesty-claps__icon {
    transition: none;
    transform: none;
  }
  .zesty-claps.is-bursting .zesty-claps__burst::before {
    display: none;
  }
}
