/* Self-Serve Ad Creation for Disney Advertisers (DCM) — case-specific layout (overrides / extends styles.css).
   Spacing: body.case-ad-creation defines --ad-space-* and --ad-stack (see --case-stack in styles.css). */

body.case-ad-creation {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  line-height: var(--type-body-lh);
  /* Semantic colors — alias globals (canonical tokens in styles.css :root) */
  --text: var(--ink);
  --muted: var(--ink-muted);
  --line: rgba(0, 0, 0, 0.12);
  /* Pacing: same stack as shared case pages (styles.css --case-stack), then a fixed rem scale */
  --ad-stack: var(--case-stack);
  --ad-space-2xs: 0.25rem; /* 4px — labels */
  --ad-space-xs: 0.5rem; /* 8px — tight stacks */
  --ad-space-tight: 0.625rem; /* 10px — section header gap below title row */
  --ad-space-sm: 1rem; /* 16px — standard UI gap */
  --ad-space-md: 1.5rem; /* 24px — page gutter, paragraph-scale gaps */
  --ad-space-comfort: 1.75rem; /* 28px — strips / gallery rhythm */
  --ad-space-lg: 2rem; /* 32px — multi-column grids */
  --ad-space-xl: 2.5rem; /* 40px — section joins, hero goal block */
  --ad-space-2xl: 3rem; /* 48px — section end margin, large bands */
  --ad-space-sub: 0.75rem; /* 12px — column kickers / step spacing */
  --ad-space-compact: 0.875rem; /* 14px — card grids, inline lists */
  --ad-space-lede: 1.125rem; /* 18px — title → paragraph */
  --ad-space-meta-y: var(--ad-stack); /* format-selection eyebrow → list */
  --ad-space-explore-concept-gap: calc(var(--ad-space-2xl) + var(--ad-space-md)); /* concept → Strengths: no margin-collapse */
  --ad-space-panel-y: 2.75rem; /* 44px — 2-col gallery row gap */
  --ad-band-pad: 1.25rem; /* bottom pad inside section band */
  --ad-rule-gap: 1.25rem; /* HR → content */
  --ad-section-tight: var(--ad-space-md);
  --ad-section-end: var(--ad-space-2xl);
  --ad-section-join: var(--ad-space-xl);
}

/* Space below main nav (slightly tighter than 80px for better flow).
   z-index establishes stacking above the page canvas so content isn't lost behind
   full-viewport siblings (e.g. closed lightbox layers in some WebKit builds). */
body.case-ad-creation main.ad-case {
  position: relative;
  z-index: 1;
  padding-top: 72px;
  box-sizing: border-box;
}

.case-ad-creation :where(h1, h2, h3, h4) {
  font-weight: 600;
}

/* Bare <h4> in case pages — portfolio globals skip legacy mono / uppercase on body.case-ad-creation */
body.case-ad-creation main.ad-case h4 {
  text-transform: none;
}

/* Offset for sticky header + in-page links */
.ad-case > section[id] {
  scroll-margin-top: 96px;
}

/* ── HERO ── */
.ad-hero {
  max-width: 1100px;
  margin: 0 auto 0;
  padding: 0 var(--ad-space-md);
}

.ad-eyebrow {
  font-size: var(--type-kicker);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--ad-space-sm);
}

.ad-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: var(--type-case-hero-title);
  line-height: var(--type-case-hero-lh);
  letter-spacing: var(--type-case-hero-tracking);
  text-transform: none;
  font-weight: var(--type-case-hero-weight);
  color: var(--ink);
  margin: 0 0 var(--ad-space-2xl);
}

/* DCM case page only — larger hero title (IA shares ad-creation.css but keeps global scale). */
body.case-ad-creation:not(.case-ia) .ad-title {
  font-size: clamp(2rem, 5vw, 3rem);
}

.ad-title em {
  font-style: normal;
  color: var(--ink-muted);
  font-weight: 400;
}

/* Title-only hero (IA): space to Overview lives on #overview padding. DCM + stack: gap is stack → Overview. */
body.case-ad-creation .ad-hero.ad-section:not(:has(.hero-stack)) .ad-title {
  margin-bottom: 0;
}

.ad-hero.ad-section + #overview.ad-section {
  padding-top: var(--case-title-overview-gap);
}

.ad-section-title em {
  font-style: normal;
  color: var(--ink-muted);
  font-weight: 400;
}

/* Hero stack — layered composition */
body.case-ad-creation .hero-stack {
  position: relative;
  margin: 0 calc(-1 * var(--ad-space-md)) var(--ad-space-md);
  padding: 24px 0 48px;
  width: calc(100% + 2 * var(--ad-space-md));
  max-width: none;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  min-height: min(52vh, 540px);
}

body.case-ad-creation .hero-stack-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.6s ease,
    filter 0.6s ease,
    opacity 0.6s ease,
    width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
}

body.case-ad-creation .hero-stack-frame.pos-back-left,
body.case-ad-creation .hero-stack-frame.pos-back-right,
body.case-ad-creation .hero-stack-frame.pos-back-far {
  cursor: pointer;
}

body.case-ad-creation .hero-stack-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

body.case-ad-creation .hero-stack-tag {
  position: absolute;
  right: 14px;
  top: 12px;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(15, 15, 15, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 5px;
  transition: opacity 0.4s ease;
}

body.case-ad-creation .hero-stack-frame.pos-back-left .hero-stack-tag {
  right: auto;
  left: 14px;
  top: 12px;
}

body.case-ad-creation .hero-stack-frame.pos-back-left {
  width: 56%;
  aspect-ratio: 16 / 10;
  transform: translate(-82%, -52%) rotate(-5deg);
  z-index: 1;
  filter: brightness(0.62) saturate(0.7);
  opacity: 0.75;
}

body.case-ad-creation .hero-stack-frame.pos-back-left:hover {
  transform: translate(-82%, -54%) rotate(-5deg);
  filter: brightness(0.78) saturate(0.85);
  opacity: 0.92;
}

body.case-ad-creation .hero-stack-frame.pos-back-right {
  width: 50%;
  aspect-ratio: 16 / 10;
  transform: translate(-18%, -50%) rotate(3deg);
  z-index: 1;
  filter: brightness(0.62) saturate(0.7);
  opacity: 0.7;
}

body.case-ad-creation .hero-stack-frame.pos-back-right:hover {
  transform: translate(-18%, -52%) rotate(3deg);
  filter: brightness(0.78) saturate(0.85);
  opacity: 0.9;
}

body.case-ad-creation .hero-stack-frame.pos-back-far {
  width: 46%;
  aspect-ratio: 16 / 10;
  transform: translate(-50%, -34%) scale(0.9);
  z-index: 0;
  filter: brightness(0.58) saturate(0.68);
  opacity: 0.58;
}

body.case-ad-creation .hero-stack-frame.pos-back-far:hover {
  transform: translate(-50%, -36%) scale(0.92);
  filter: brightness(0.75) saturate(0.82);
  opacity: 0.82;
}

body.case-ad-creation .hero-stack-frame.pos-front {
  width: 72%;
  aspect-ratio: 16 / 9.4;
  transform: translate(-50%, -50%);
  z-index: 2;
  filter: none;
  opacity: 1;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28), 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.case-ad-creation .hero-stack-frame .hero-stack-cap {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

body.case-ad-creation .hero-stack-frame.pos-front .hero-stack-cap {
  opacity: 1;
}

body.case-ad-creation .hero-stack-frame.pos-front .hero-stack-tag {
  opacity: 0;
}

body.case-ad-creation .hero-stack-cap {
  position: absolute;
  left: 16px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(15, 15, 15, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  margin: 0;
  max-width: min(90%, 18rem);
}

body.case-ad-creation .hero-stack-cap-label {
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

body.case-ad-creation .hero-stack-cap-text {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 900px) {
  body.case-ad-creation .hero-stack {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0;
    gap: 12px;
    /* Same idea as homepage tiles: use the full hero rail (bleed past .ad-hero horizontal padding). */
    width: calc(100% + 2 * var(--ad-space-md));
    max-width: none;
    margin-top: var(--ad-space-md);
    margin-bottom: var(--ad-space-md);
    margin-left: calc(-1 * var(--ad-space-md));
    margin-right: calc(-1 * var(--ad-space-md));
    box-sizing: border-box;
  }

  body.case-ad-creation .hero-stack-frame {
    position: relative;
    top: auto;
    left: auto;
    transform: none !important;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    filter: none !important;
    opacity: 1 !important;
    align-self: stretch;
  }

  /* Let SVG / screenshots use full frame width without 16:10 cover crop on narrow viewports. */
  body.case-ad-creation .hero-stack-frame img {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: center top;
    background: var(--bg);
  }

  body.case-ad-creation .hero-stack-frame .hero-stack-cap {
    opacity: 1;
  }

  body.case-ad-creation .hero-stack-frame .hero-stack-tag {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.case-ad-creation .hero-stack-frame {
    transition: none;
  }
}

.ad-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start; /* don’t stretch short columns when another meta line wraps */
  gap: var(--ad-space-xl);
  padding: var(--ad-space-sm) 0 calc(var(--ad-space-sm) - 2px);
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  border-bottom: none; /* single line under title; no rule above preview strip */
}

.ad-meta-item {
  min-width: 0;
}

.ad-hm-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: calc(var(--ad-space-2xs) / 2);
}

/* Match overview Context / Problem / Opportunity body (`.intro-columns p` via styles.css) */
.ad-hm-value {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.7;
}

.ad-hm-value--lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  line-height: 1.7;
}

/* ── SECTION SYSTEM ── */
.ad-section {
  max-width: 1100px;
  margin: 0 auto var(--ad-section-end);
  padding: 0 var(--ad-space-md) var(--ad-band-pad);
}

/* Section joins: padding only — no pale rule above numbered headers (each uses .ad-section-rule below its title). */
body.case-ad-creation main.ad-case > .ad-section + .ad-section {
  border-top: none;
  padding-top: var(--ad-section-join);
  margin-top: 0;
}

/* No rule between inline evolution (06) and format selection (07) — closer transition off closing paragraph */
#inline-evolution.ad-section {
  padding-bottom: calc(var(--ad-band-pad) * 0.4);
  margin-bottom: calc(var(--ad-section-end) * 0.4);
}

#inline-evolution + #format-selection {
  border-top: none;
  padding-top: calc(var(--ad-section-join) * 0.4);
}

#vision + #explorations {
  border-top: none;
}

#explorations + #inline-evolution {
  border-top: none;
}

#overview + #process {
  border-top: none;
  padding-top: calc(var(--ad-space-sm) / 2);
}

/* Overview ends with meta row — full section end margin feels excessive before Process */
#overview.ad-section {
  margin-bottom: calc(var(--ad-space-lg) / 2);
  padding-bottom: var(--ad-space-xs);
}

/* Overview: no horizontal rules between title → goal → context row → meta */
body.case-ad-creation #overview > .ad-section-rule {
  border: none;
  height: 0;
  margin: 0 0 var(--ad-rule-gap);
  overflow: hidden;
}

body.case-ad-creation #overview .intro-columns {
  border-top: none;
  padding-top: 0;
}

body.case-ad-creation #overview > .ad-meta-line {
  border-top: none;
  /* Match `.intro-columns`: same gutters so Context/Problem/Opportunity line up with Role/Duration/Early signals */
  column-gap: 2rem;
}

body.case-ad-creation #overview > .ad-meta-line > div {
  padding-right: 0.5rem;
}

.ad-section-header {
  display: flex;
  align-items: baseline;
  gap: var(--ad-space-sm);
  margin-bottom: var(--ad-space-tight);
}

.ad-section-num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: var(--type-section-num);
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
}

.ad-section-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: var(--type-section-title);
  line-height: var(--type-section-title-lh);
  letter-spacing: -0.03em;
  text-transform: none;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.ad-section-rule {
  border: none;
  border-top: 1.5px solid var(--ink);
  margin: 0 0 var(--ad-rule-gap);
  width: 100%;
}

/* ── PROSE + CARDS (shared) ── */
.ad-prose p,
p.ad-prose {
  font-size: var(--type-body-size);
  color: var(--ink-soft);
  line-height: var(--type-body-lh);
  max-width: 900px;
  margin: 0 0 1em;
}

#format-selection .ad-fs-feedback.ad-prose {
  max-width: 900px;
}

#inline-evolution h3.ad-iv-sub + p.ad-prose {
  margin-top: 0;
}

/* Tighten margin only when the prose block is the last thing in the section */
.ad-section > .ad-prose:last-child p:last-child {
  margin-bottom: 0;
}

/* When copy is followed by another block (e.g. explorations), keep space before the next block.
   (Plain p:last-child { margin: 0 } was collapsing the gap between intro and first .ad-explore.) */
.ad-section > .ad-prose:not(:last-child) p:last-child {
  margin-bottom: var(--ad-stack);
}

/* Same spacing when the intro is a single p.ad-prose (not a .ad-prose wrapper div) */
.ad-section > p.ad-prose:not(:last-child) {
  margin-bottom: var(--ad-stack);
}

/* Goal statement */
.ad-goal {
  display: flex;
  align-items: center;
  gap: var(--ad-space-lg);
  margin: 0 0 var(--ad-space-xl);
}

.ad-goal-bar {
  width: 3px;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--accent);
}

.ad-goal-kicker {
  font-size: var(--type-kicker);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--ad-space-sm);
}

.ad-goal-text {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: var(--type-goal-text);
  line-height: var(--type-goal-text-lh);
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 900px;
  margin: 0;
}

/* Overview Context / Problem / Opportunity — same markup + tokens as Personalized Offers (`.intro-columns` in styles.css) */

.ad-meta-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: calc(var(--ad-space-xl) / 2);
  row-gap: calc(var(--ad-space-md) / 2);
  padding: var(--ad-space-md) 0;
  margin-top: var(--case-meta-gap, calc(var(--ad-space-comfort) * 1.1));
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  align-items: start;
}

.ad-meta-line > div {
  min-width: 0;
}

/* Process */
.ad-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ad-step {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px 26px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.07);
}

.ad-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--numeral-ink);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
}

.ad-step h3 {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.ad-step p {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}

/* Research diagram block */
.ad-canvas {
  min-width: 0;
  background: #e0ddd9;
  border-radius: 14px;
  padding: var(--ad-space-comfort) var(--ad-space-lg) var(--ad-space-lg);
  margin: 0 0 var(--ad-space-md);
}

.ad-canvas h3 {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  margin: 0 0 var(--ad-space-md);
}

.ad-zoom {
  border-radius: 10px;
  margin: 0 auto;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  cursor: zoom-in;
}

.ad-zoom:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

/* Match exploration pattern: file aspect ratio, scale to canvas width (original used ~90% centered) */
body.case-ad-creation .ad-zoom img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  box-shadow: none;
  border-radius: 0;
  margin: 0 auto;
  vertical-align: bottom;
}

/* Very tall flow diagrams: cap on-page height; lightbox still opens full resolution */
body.case-ad-creation .ad-zoom--diagram-tall img {
  max-height: min(58vh, 640px);
}

/* Research workflow: smaller on-page than full canvas width */
body.case-ad-creation .ad-zoom--diagram-research img {
  max-width: min(100%, 720px);
  width: auto;
}

/* Vision §04 — ARCHITECTURE DIAGRAM */
body.case-ad-creation .ad-canvas--arch {
  background: transparent;
  padding: clamp(0.75rem, 2vw, 1rem) 0;
}

body.case-ad-creation .arch-frame {
  background: #e8e5e0;
  border-radius: 14px;
  padding: 40px 44px 36px;
  max-width: 100%;
}

body.case-ad-creation .arch-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body.case-ad-creation .arch-eyebrow {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

body.case-ad-creation .arch-sub {
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.55);
}

body.case-ad-creation .arch-canvas {
  display: grid;
  grid-template-columns: 1fr 72px 1.4fr 72px 1fr;
  align-items: center;
  gap: 0;
  margin-bottom: 36px;
  position: relative;
}

body.case-ad-creation .arch-gap {
  align-self: stretch;
}

body.case-ad-creation .arch-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

body.case-ad-creation .arch-spacer {
  height: 50px;
  flex-shrink: 0;
}

body.case-ad-creation .arch-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

body.case-ad-creation .arch-col-label {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

body.case-ad-creation .arch-col-right .arch-col-label {
  text-align: right;
}

body.case-ad-creation .arch-entry,
body.case-ad-creation .arch-format {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.case-ad-creation .arch-entry-future,
body.case-ad-creation .arch-format-future {
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.3);
  color: rgba(0, 0, 0, 0.55);
  font-style: normal;
}

body.case-ad-creation .arch-format-premium {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body.case-ad-creation .arch-core {
  background: var(--numeral-ink);
  color: #fff;
  border-radius: 14px;
  padding: 24px 26px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 1;
  align-self: center;
  width: 100%;
  min-width: 0;
}

body.case-ad-creation .arch-core-eyebrow {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

body.case-ad-creation .arch-core-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

body.case-ad-creation .arch-core-row {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

body.case-ad-creation .arch-core-foot {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.case-ad-creation .arch-anchors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

body.case-ad-creation .arch-anchor {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

body.case-ad-creation .arch-anchor-num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1.4;
}

@media (max-width: 900px) {
  body.case-ad-creation .arch-canvas {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.case-ad-creation .arch-gap {
    display: none;
  }

  body.case-ad-creation .arch-lines {
    display: none;
  }

  body.case-ad-creation .arch-anchors {
    grid-template-columns: 1fr 1fr;
  }

  body.case-ad-creation .arch-spacer {
    display: none;
  }

  body.case-ad-creation .arch-frame {
    padding: 28px 22px 26px;
  }
}

@media (max-width: 560px) {
  body.case-ad-creation .arch-anchors {
    grid-template-columns: 1fr;
  }

  body.case-ad-creation .arch-frame {
    padding: 24px 18px 22px;
  }
}

/* Limitation callout */
.ad-limits {
  background: color-mix(in srgb, var(--accent) 9%, #ffffff);
  border-radius: 12px;
  padding: var(--ad-space-md) calc(var(--ad-space-md) + var(--ad-space-xs));
  display: flex;
  flex-direction: column;
  gap: var(--ad-space-sub);
  margin: 0 0 0;
}

.ad-limits h3 {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--ad-space-2xs);
}

.ad-limit-row {
  display: flex;
  gap: var(--ad-space-compact);
  align-items: flex-start;
}

.ad-dot {
  width: 3px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 5px;
  height: 14px;
}

.ad-limits p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
}

/* Vision §04 — principles (vp-*) */
body.case-ad-creation .vp-list {
  display: flex;
  flex-direction: column;
  margin: 0 0 36px 0;
}

body.case-ad-creation .vp-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 36px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  align-items: start;
}

body.case-ad-creation .vp-row:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body.case-ad-creation .vp-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

body.case-ad-creation .vp-num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 56px;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
}

body.case-ad-creation .vp-tag {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

body.case-ad-creation .vp-content {
  max-width: 640px;
}

body.case-ad-creation .vp-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 500;
  font-style: normal;
  text-transform: none;
  margin: 0 0 14px 0;
}

body.case-ad-creation .vp-desc {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 900px) {
  body.case-ad-creation .vp-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 0;
  }

  body.case-ad-creation .vp-meta {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
  }

  body.case-ad-creation .vp-num {
    font-size: 40px;
  }

  body.case-ad-creation .vp-title {
    font-size: 22px;
    line-height: 1.2;
    text-transform: none;
  }
}

/* Explorations (match original: natural screenshot aspect, no grid stretch) */
.ad-explore {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--ad-space-xl);
  align-items: start;
  padding: var(--ad-space-2xl) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

/* Top padding: first row still uses less top padding so the section doesn’t feel double-spaced
   now that .ad-prose has a real bottom margin again. */
.ad-explore:first-of-type {
  padding-top: var(--ad-space-md);
}

.ad-explore:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: var(--ad-space-md);
}

.ad-bignum {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 48px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--numeral-ink);
  font-weight: 500;
}

.ad-exp-img {
  min-width: 0;
  align-self: start;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  cursor: zoom-in;
}

.ad-exp-img:hover {
  transform: scale(1.015);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

/* Same behavior as the original: scale down to column width, keep native aspect ratio (no squish) */
body.case-ad-creation .ad-exp-img img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top left;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  vertical-align: bottom;
}

.ad-exp-copy {
  padding-top: 4px;
  display: flow-root; /* contain margins so concept → Strengths gap doesn’t collapse with the explore grid */
}

.ad-exp-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--ad-space-tight);
}

.ad-exp-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 var(--ad-space-lede);
}

.ad-exp-concept {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 0;
  padding-bottom: var(--ad-space-explore-concept-gap);
}

.ad-exp-bt {
  display: flex;
  flex-direction: column;
  gap: var(--ad-band-pad);
}

.ad-list-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--ad-space-xs);
}

.ad-list-label.benefits {
  color: var(--accent);
}

.ad-list-label.tradeoffs {
  color: var(--ink-muted);
}

.ad-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}

/* Override global styles.css li { margin-bottom: 0.8rem } — it was stacking with .ad-list gap */
body.case-ad-creation .ad-list li {
  margin-bottom: 0;
}

.ad-list li {
  font-size: 12.5px;
  line-height: 1.55;
  padding-left: var(--ad-space-sm);
  position: relative;
}

.ad-list.benefits li {
  color: var(--ink-soft);
}

.ad-list.benefits li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.ad-list.tradeoffs li {
  color: var(--ink-muted);
}

.ad-list.tradeoffs li::before {
  content: "−";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 14px;
}

.ad-closer {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 800px;
  margin: 0 0 0;
}

/* Inline evolution */
.ad-iv-sub {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: none;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 var(--ad-space-xs);
}

#inline-evolution p.ad-prose + .ad-iv-sub {
  margin-top: calc(var(--ad-space-xl) - var(--ad-space-2xs)); /* lead → next subsection */
}

.ad-iv-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ad-space-panel-y) var(--ad-space-comfort);
  margin: 0 0 var(--ad-space-2xl);
  /* Same register as `.ewf-frame` — warm mat so UI shots read as one editorial plate, not floating on white */
  background: var(--bg-warm, #fafaf7);
  border-radius: 14px;
  padding: clamp(24px, 3.5vw, 36px) clamp(20px, 3vw, 32px);
  box-sizing: border-box;
}

.ad-iv-card {
  min-width: 0;
  position: relative;
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
  gap: var(--ad-space-comfort);
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.ad-iv-card:hover {
  transform: none !important;
  box-shadow: none !important;
}

.ad-iv-card .ad-iv-wrap {
  min-width: 0;
  border-radius: 8px;
  overflow: visible;
  border: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ad-iv-card:hover .ad-iv-wrap {
  box-shadow: none;
}

body.case-ad-creation .ad-iv-wrap img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top left;
  border-radius: 8px;
  margin: 0;
  vertical-align: bottom;
  /* Restrained lift — lighter than global `img` chrome so the grid matches the workflow diagram tone */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 10px 28px rgba(16, 14, 11, 0.09);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.case-ad-creation .ad-iv-card:hover .ad-iv-wrap img {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 16px 38px rgba(16, 14, 11, 0.12);
  transform: translateY(-2px);
}

.ad-iv-cap {
  border-top: 1px solid var(--accent);
  padding: var(--ad-space-sub) 0 0;
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.5;
  max-width: 80%;
}

.ad-breaks {
  display: flex;
  flex-direction: column;
  gap: var(--ad-space-xs);
  max-width: 820px;
  margin: 0 0 var(--ad-space-comfort);
}

.ad-break {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.ad-break:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.ad-break-num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  color: var(--accent);
  padding-top: 1px;
  font-weight: 500;
}

.ad-break h4 {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

.ad-break p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* ── Existing workflow diagram (§03 research) — author styles ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.case-ad-creation .ewf-frame {
  --ewf-accent: var(--accent);
  --ewf-text: var(--ink);
  /* Portfolio-adjacent canvas — warm off-white, not a separate “viz” panel */
  --ewf-bg: var(--bg-warm, #fafaf7);
  --ewf-muted: var(--ink-muted);
  --ewf-border: rgba(0, 0, 0, 0.12);
  --ewf-arrow: rgba(0, 0, 0, 0.12);
  --ewf-arrow-head: rgba(0, 0, 0, 0.2);
  --ewf-in-fill: #ebe9e4;
  --ewf-in-border: rgba(0, 0, 0, 0.1);
  --ewf-out-fill: color-mix(in srgb, var(--ewf-accent) 7%, #ffffff);
  --ewf-step-radius: 8px;
  background: var(--ewf-bg);
  border-radius: 14px;
  padding: 36px 40px 40px;
  position: relative;
  max-width: min(100%, 1100px);
  margin: 0 auto var(--ad-space-md);
}

body.case-ad-creation .ewf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

body.case-ad-creation .ewf-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ewf-muted);
}

body.case-ad-creation .ewf-legend {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

body.case-ad-creation .ewf-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ewf-text);
}

body.case-ad-creation .ewf-swatch {
  width: 12px;
  height: 12px;
  border-radius: var(--ewf-step-radius);
}

body.case-ad-creation .ewf-swatch-in {
  background: var(--ewf-in-fill);
  border: 1px solid var(--ewf-in-border);
}

body.case-ad-creation .ewf-swatch-out {
  background: var(--ewf-out-fill);
  border: 1.5px dashed var(--ewf-accent);
}

/* Lane labels above flow */
body.case-ad-creation .ewf-lanes {
  display: grid;
  grid-template-columns: 2fr 2.4fr 2fr;
  gap: 0 24px;
  margin-bottom: 14px;
}

body.case-ad-creation .ewf-lane-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ewf-border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

body.case-ad-creation .ewf-lane-in {
  color: var(--ewf-muted);
}

body.case-ad-creation .ewf-lane-out {
  color: var(--ewf-accent);
  border-bottom-color: var(--ewf-accent);
}

body.case-ad-creation .ewf-lane-meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--ewf-accent);
  font-style: normal;
}

/* Flow row */
body.case-ad-creation .ewf-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 28px 0 8px;
}

body.case-ad-creation .ewf-step {
  flex: 1;
  min-width: 0;
  border-radius: var(--ewf-step-radius);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  box-sizing: border-box;
  min-height: 86px;
}

body.case-ad-creation .ewf-in {
  background: var(--ewf-in-fill);
  border: 1px solid var(--ewf-in-border);
  color: var(--ewf-text);
}

body.case-ad-creation .ewf-in .ewf-step-num {
  color: var(--ewf-muted);
  font-weight: 500;
}

body.case-ad-creation .ewf-out {
  background: var(--ewf-out-fill);
  border: 1.5px dashed var(--ewf-accent);
  color: var(--ewf-text);
}

body.case-ad-creation .ewf-out .ewf-step-num {
  color: color-mix(in srgb, var(--ewf-accent) 72%, var(--ewf-muted));
  font-weight: 500;
}

body.case-ad-creation .ewf-step-num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

body.case-ad-creation .ewf-step-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

body.case-ad-creation .ewf-in .ewf-step-label {
  color: var(--ewf-text);
}

body.case-ad-creation .ewf-out .ewf-step-label {
  color: color-mix(in srgb, var(--ewf-accent) 78%, var(--ewf-text));
}

body.case-ad-creation .ewf-step-sub {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  color: color-mix(in srgb, var(--ewf-accent) 45%, var(--ewf-muted));
  font-style: normal;
  margin-top: 2px;
}

body.case-ad-creation .ewf-in .ewf-step-sub {
  color: var(--ewf-muted);
}

/* Connectors — quiet so boxes (especially the breakdown) carry the story */
body.case-ad-creation .ewf-arrow {
  flex: 0 0 16px;
  align-self: center;
  height: 1px;
  background: var(--ewf-arrow);
  position: relative;
}

body.case-ad-creation .ewf-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 3px solid var(--ewf-arrow-head);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

body.case-ad-creation .ewf-arrow-divert,
body.case-ad-creation .ewf-arrow-rejoin,
body.case-ad-creation .ewf-arrow-out {
  background: var(--ewf-arrow);
  opacity: 1;
}

body.case-ad-creation .ewf-arrow-divert::after,
body.case-ad-creation .ewf-arrow-rejoin::after,
body.case-ad-creation .ewf-arrow-out::after {
  border-left-color: var(--ewf-arrow-head);
}

/* Outside-DCM cluster — coral is the focal read */
body.case-ad-creation .ewf-out-cluster {
  flex: 2.4;
  position: relative;
  border: 2px solid var(--ewf-accent);
  border-radius: var(--ewf-step-radius);
  padding: 20px 12px 14px;
  background: color-mix(in srgb, var(--ewf-accent) 9%, var(--ewf-bg));
}

body.case-ad-creation .ewf-out-tag {
  position: absolute;
  top: -11px;
  left: 14px;
  background: color-mix(in srgb, var(--ewf-accent) 16%, var(--ewf-bg));
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ewf-accent);
}

body.case-ad-creation .ewf-out-inner {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

/* Bracket pointing from cluster down to limitations */
body.case-ad-creation .ewf-bracket-wrap {
  margin: 0 auto;
  width: 42%;
  position: relative;
  padding-top: 14px;
}

body.case-ad-creation .ewf-bracket {
  position: relative;
  height: 18px;
  border-left: 2px solid var(--ewf-accent);
  border-right: 2px solid var(--ewf-accent);
  border-bottom: 2px solid var(--ewf-accent);
  border-radius: 0 0 var(--ewf-step-radius) var(--ewf-step-radius);
}

body.case-ad-creation .ewf-bracket::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ewf-accent);
  border-bottom: 2px solid var(--ewf-accent);
  background: var(--ewf-bg);
}

body.case-ad-creation .ewf-bracket-label {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ewf-bg);
  padding: 0 12px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ewf-accent);
  white-space: nowrap;
}

/* Limitations row */
body.case-ad-creation .ewf-limits {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--ewf-border);
}

body.case-ad-creation .ewf-limits-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ewf-muted);
  margin-bottom: 18px;
}

body.case-ad-creation .ewf-limits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

body.case-ad-creation .ewf-limit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

body.case-ad-creation .ewf-limit-num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 22px;
  line-height: 0.9;
  color: var(--ewf-text);
  flex-shrink: 0;
  padding-top: 2px;
}

body.case-ad-creation .ewf-limit-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ewf-text);
}

@media (max-width: 900px) {
  body.case-ad-creation .ewf-flow {
    flex-direction: column;
  }

  body.case-ad-creation .ewf-arrow {
    width: 1.5px;
    height: 18px;
    flex-basis: 18px;
    align-self: center;
  }

  body.case-ad-creation .ewf-arrow::after {
    right: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(50%);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid var(--ewf-arrow-head);
    border-bottom: none;
  }

  body.case-ad-creation .ewf-arrow-divert::after,
  body.case-ad-creation .ewf-arrow-rejoin::after,
  body.case-ad-creation .ewf-arrow-out::after {
    border-top-color: var(--ewf-arrow-head);
    border-left-color: transparent;
  }

  body.case-ad-creation .ewf-out-cluster {
    width: 100%;
  }

  body.case-ad-creation .ewf-out-inner {
    flex-direction: column;
  }

  body.case-ad-creation .ewf-lanes {
    display: none;
  }

  body.case-ad-creation .ewf-bracket-wrap {
    display: none;
  }

  body.case-ad-creation .ewf-limits-grid {
    grid-template-columns: 1fr;
  }
}

/* Format selection */
.ad-fs-obj-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: var(--ad-space-compact);
  border-bottom: 1px solid var(--accent);
  margin: 0 0 var(--ad-space-meta-y);
}

.ad-fs-obj-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--ad-space-2xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: calc(var(--ad-space-xl) + var(--ad-space-sm)); /* 56px */
  max-width: 1000px;
}

.ad-fs-obj-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--ad-space-compact);
  align-items: baseline;
  padding: var(--ad-space-compact) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.ad-fs-obj-list li:last-child {
  border-bottom: none;
}

.ad-fs-obj-num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 1px;
  font-family: "DM Mono", "Courier New", monospace;
}

.ad-fs-sub {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 var(--ad-space-sm);
}

/* Format selection: extra space between sub-sections (padding avoids margin collapse) */
#format-selection .ad-fs-reflect + .ad-fs-sub--after-reflect {
  padding-top: var(--ad-space-sub);
  margin-top: 0;
}

#format-selection .ad-fs-feedback + .ad-fs-sub--after-feedback {
  margin-top: 0;
  padding-top: var(--ad-space-xl);
}

.ad-fs-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 920px;
  margin: 0 0 var(--ad-space-lg);
}

.ad-fs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ad-space-md);
  margin-bottom: var(--ad-space-2xl);
  align-items: start; /* copy blocks can differ in height; image cells stay uniform via .ad-fs-img */
}

.ad-fs-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  cursor: zoom-in;
}

/* Exploration directions: identical frame size per card; screenshot centered, aspect preserved (object-fit) */
.ad-fs-card .ad-fs-img {
  width: 100%;
  min-width: 0;
  margin: 0 0 var(--ad-space-sm);
  border-radius: 4px;
  overflow: hidden;
  border: 0;
  background: #1a1a1a;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ad-space-xs);
  box-sizing: border-box;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ad-fs-card:hover .ad-fs-img {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

body.case-ad-creation .ad-fs-card .ad-fs-img img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  vertical-align: bottom;
}

.ad-fs-cap {
  margin: 0 0 var(--ad-space-tight);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.ad-fs-cap .num {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--accent);
  margin-right: 6px;
  font-weight: 400;
}

.ad-fs-cap .sep {
  color: var(--ink-muted);
  font-weight: 400;
  margin-right: 6px;
}

.ad-fs-body {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.ad-fs-reflect {
  border-left: 2px solid var(--accent);
  padding: var(--ad-space-2xs) 0 var(--ad-space-2xs) var(--ad-space-comfort);
  margin: 0 0 var(--ad-space-2xl);
  max-width: 820px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 400;
}

/* Final direction */
.ad-fs-final {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--ad-space-panel-y);
  align-items: start;
  margin: 0 0 0;
}

.ad-fs-final-copy {
  position: sticky;
  top: 96px;
  align-self: start;
}

.ad-fs-final-copy p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 var(--ad-space-sm);
  max-width: 480px;
}

.ad-final-stage {
  position: relative;
}

.ad-final-base {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 0;
  background: #1a1a1a;
  transition: filter 0.3s ease;
}

/* Full-bleed width, native height (preserves file aspect; hotspot % stays aligned) */
body.case-ad-creation .ad-final-base img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top left;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  vertical-align: bottom;
}

.ad-final-stage.is-open .ad-final-base {
  filter: blur(2px) saturate(0.85);
}

/* Hotspot */
.ad-hotspot {
  position: absolute;
  left: 50.7%;
  top: 88.4%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 26px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.ad-hot-pulse {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: rgba(244, 67, 30, 0.12);
  border: 1px solid rgba(244, 67, 30, 0.55);
  animation: adHotPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

.ad-hotspot:hover .ad-hot-pulse {
  background: rgba(244, 67, 30, 0.22);
  animation: none;
}

.ad-hot-label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.ad-hot-label::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.ad-hotspot:hover .ad-hot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

@keyframes adHotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(244, 67, 30, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(244, 67, 30, 0);
  }
}

/* Modal */
.ad-modal-layer {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 3;
}

.ad-final-stage.is-open .ad-modal-layer {
  display: block;
}

.ad-modal-back {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.45);
  backdrop-filter: blur(2px);
  border-radius: 6px;
  animation: adModalFade 0.22s ease;
}

.ad-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-height: 88%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08);
  background: #fff;
  animation: adModalIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Full-bleed in the dialog; no forced aspect/crop (old cover + 16/11 was distorting) */
body.case-ad-creation .ad-modal-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  vertical-align: bottom;
}

.ad-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.ad-modal-close:hover {
  background: #fff;
}

.ad-fs-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--ad-space-xs);
}

/* Case sections are always visible (no JS gate). Scroll-reveal was removed so GitLab Pages / CSP
   and partial JS failures cannot leave the main column at opacity: 0. */
.fade-in {
  opacity: 1;
  transform: none;
}

/* Lightbox — reuse classes from site but neutral overlay */
#adLightbox,
#adLightbox * {
  box-sizing: border-box;
}

/* [hidden] uses the UA display:none !important; keeps the fixed layer out of
   the compositor even if an older cached stylesheet omits the rules below. */
#adLightbox[hidden] {
  display: none !important;
}

/* Closed: display:none removes the node from layout/paint (not just opacity:0). Some WebKit
   / GPU paths on static hosts still treat a full-viewport position:fixed layer as occluding
   the main column when it is only “invisibly” closed. */
#adLightbox {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15, 15, 15, 0.92);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: zoom-out;
  padding: var(--ad-space-xl);
}

#adLightbox.open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#adLightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#adLightbox.open img {
  transform: scale(1);
}

#adLightbox .ad-lb-x {
  position: fixed;
  top: var(--ad-space-md);
  right: var(--ad-space-comfort);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  line-height: 1;
}
#adLightbox .ad-lb-x:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes adModalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes adModalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .ad-fs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ad-fs-obj-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .ad-meta-line {
    grid-template-columns: 1fr 1fr;
  }
  .ad-process {
    grid-template-columns: 1fr 1fr;
  }
  .ad-explore {
    grid-template-columns: 1fr;
    gap: var(--ad-space-md);
  }
  .ad-bignum {
    font-size: 44px;
  }
  .ad-exp-bt {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .ad-iv-gallery {
    grid-template-columns: 1fr;
  }
  .ad-fs-grid {
    grid-template-columns: 1fr;
  }
  .ad-fs-final {
    grid-template-columns: 1fr;
  }
  .ad-fs-final-copy {
    position: static;
  }
}

@media (max-width: 600px) {
  .ad-meta-line {
    grid-template-columns: 1fr;
  }
  .ad-process {
    grid-template-columns: 1fr;
  }
  .ad-exp-bt {
    grid-template-columns: 1fr;
  }
}

/* ═══ 08 — Final designs (end-to-end flow) ═══ */
.ad-section--ffd {
  /* Accent: badges, pins, and numerals */
  --ad-terracotta: var(--accent);
  --ad-terracotta-deep: color-mix(in srgb, var(--accent) 80%, #000000);
  --ffd-pin: var(--ad-terracotta);
  --ffd-pin-2: var(--accent-2);
  scroll-margin-top: 0.5rem;
}

.ad-ffd-lead {
  /* Match flow video / strip reading width so intro doesn’t wrap much narrower than media below */
  max-width: min(100%, 52rem);
  margin: 0 0 var(--ad-space-2xl);
  font-size: 15.5px;
  line-height: 1.75;
}

.ad-ffd-lead.ad-prose > p {
  font-size: 15.5px;
  line-height: 1.75;
  max-width: none;
}

.ad-ffd-lead.ad-prose > p:last-child {
  margin-bottom: 0;
}

#final-designs .ad-ffd-flowvideo {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  /* Breathing room before the first final-screen row (strip) */
  margin: 0 0 calc(var(--ad-space-2xl) + var(--ad-space-2xs));
  padding: 0;
  max-width: min(100%, 52rem);
}

#final-designs .ad-ffd-flowvideo-caption {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

#final-designs .ad-ffd-flowvideo__el {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #141414;
  box-shadow:
    0 28px 56px rgba(15, 15, 15, 0.14),
    0 10px 22px rgba(15, 15, 15, 0.1),
    0 2px 6px rgba(15, 15, 15, 0.06);
}

/* YouTube only (no separate reference still) */
.ad-ff-video-line {
  margin: 0 0 0.9rem 0;
  max-width: 60ch;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.ad-ff-video-line .ad-ff-video-meta {
  display: inline;
  margin-left: 0.35em;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.ad-ff-video-label {
  display: inline-block;
  margin-right: 0.35em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ad-ff-video-link {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.ad-ff-video-link:hover,
.ad-ff-video-link:focus-visible {
  color: color-mix(in srgb, var(--accent-2) 88%, #000000);
  outline: none;
}

.ad-ff-video-link:focus-visible {
  border-radius: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}

.ad-ff-video-meta {
  display: inline-block;
  margin-left: 0.35em;
  font-size: 12.5px;
  color: var(--ink-muted);
}

#final-designs .ad-ff-strip-outer {
  overflow: visible;
  width: 100%;
  max-width: 100%;
  position: relative;
  left: auto;
  transform: none;
  margin: 0 0 0.4rem 0;
  /* Match case-study page bg so nothing “shows through” as a second layer */
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  cursor: default;
  box-sizing: border-box;
}

#final-designs .ad-ff-strip-outer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Editorial flow: caption + hairline, accent connectors between steps */
#final-designs .ad-ff-flow-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.9rem;
  row-gap: 0.4rem;
  margin: 0.35rem 0 1.35rem 0.1rem;
  max-width: 40rem;
}

#final-designs .ad-ff-flow-eyebrow__kicker {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

#final-designs .ad-ff-flow-eyebrow__track {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 3.5rem;
  max-width: 10.5rem;
  gap: 0.2rem;
}

#final-designs .ad-ff-flow-eyebrow__line {
  flex: 1 1 1rem;
  min-width: 0.5rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ad-terracotta) 50%, transparent) 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

#final-designs .ad-ff-flow-eyebrow__arrow {
  flex-shrink: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 300;
  line-height: 1;
  color: var(--ad-terracotta);
  transform: translateY(0.05em);
}

#final-designs .ad-ff-flow-eyebrow__steps {
  font-family: "DM Mono", "DM Sans", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

#final-designs .ad-ff-strip--flow {
  gap: 2.15rem;
}

#final-designs .ad-ff-strip-item:not(:last-child)::after {
  content: "";
  display: block;
  width: 1px;
  min-height: 1.35rem;
  margin: 0.2rem auto 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--ad-terracotta) 0.4) 0%,
    color-mix(in srgb, var(--ad-terracotta) 0.12) 60%,
    color-mix(in srgb, var(--ad-terracotta) 0.04) 100%
  );
  border-radius: 1px;
  opacity: 0.9;
  pointer-events: none;
}

@media (max-width: 520px) {
  #final-designs .ad-ff-flow-eyebrow__track {
    max-width: 100%;
    order: 3;
    width: 100%;
    max-width: 10rem;
  }
}

#final-designs .ad-ff-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: center;
  gap: 2.5rem;
  overflow: visible;
  padding: 1.75rem 1.25rem 2rem;
  transition: padding 0.4s ease;
  background: #ffffff;
}

#final-designs .ad-ff-strip-item {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 0 0.1rem;
  scroll-margin-top: 1.25rem;
}

/* Kicker row 1 col 1; image + rail share row 2 so callouts align with screenshot top */
#final-designs .ad-ff-strip-row {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  grid-template-rows: auto minmax(0, auto);
  column-gap: 2.25rem;
  row-gap: 0.75rem;
  align-items: start;
  width: 100%;
}

#final-designs .ad-ff-strip-row > .ad-ff-annot--strip,
#final-designs .ad-ff-strip-row > .ad-ff-annot {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  min-width: 0;
}

#final-designs .ad-ff-strip-row > .ad-ff-rail {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

/* Screen 4: rail + callout stack in one grid cell so gap isn’t image-height */
#final-designs #ad-final-4 .ad-ff-strip-row > .ad-ff-strip-rail-stack {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}

#final-designs #ad-final-4 .ad-ff-strip-rail-stack .ad-ff-rail {
  position: sticky;
  top: 5.25rem;
}

#final-designs .ad-ff-strip-kicker {
  grid-column: 1;
  grid-row: 1;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.3;
  padding: 0 0 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
}

/* Screen 4: contextual callout below rail list (same column via .ad-ff-strip-rail-stack) */
#final-designs #ad-final-4 .ad-ff-strip-callout {
  margin: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 1rem 1.15rem 1.05rem 1.25rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--ad-terracotta) 22%, transparent);
  border-left: 4px solid var(--ad-terracotta);
  box-shadow: 0 2px 10px rgba(15, 15, 15, 0.05);
  max-width: 100%;
  min-width: 0;
}

#final-designs .ad-ff-step-n {
  display: inline-block;
  min-width: 0.6em;
  color: var(--ad-terracotta);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  font-family: "DM Mono", "DM Sans", monospace;
}

#final-designs .ad-ff-rail {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  padding: 0.25rem 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}

/* Optional: in-rail step title; final-designs now uses .ad-ff-strip-kicker above the art. */
#final-designs .ad-ff-rail-t {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
  line-height: 1.3;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#final-designs .ad-ff-rail .ad-ff-rail-item:not(.is-active) {
  display: none;
}

#final-designs .ad-ff-rail .ad-ff-rail-item.is-active {
  display: flex;
}

#final-designs .ad-ff-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#final-designs .ad-ff-rail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem 0.75rem;
  margin: 0;
  padding: 0.35rem 0.15rem 0.5rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#final-designs .ad-ff-rail-item:hover,
#final-designs .ad-ff-rail-item:focus-visible {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

#final-designs .ad-ff-rail-item.is-active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

#final-designs .ad-ff-rail-n {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--numeral-ink);
  border-radius: 50%;
  line-height: 1;
  margin-top: 0.1rem;
  box-shadow: none;
}

#final-designs .ad-ff-rail-txt {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

#final-designs .ad-ff-rail-txt :is(strong) {
  font-weight: 600;
  color: var(--ad-terracotta);
}

#final-designs .ad-ff-pop {
  display: none;
}

@media (max-width: 800px) {
  #final-designs .ad-ff-strip-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 0.75rem;
  }

  #final-designs .ad-ff-strip-kicker {
    grid-column: 1;
    grid-row: 1;
  }

  #final-designs .ad-ff-strip-row > .ad-ff-annot--strip,
  #final-designs .ad-ff-strip-row > .ad-ff-annot {
    grid-column: 1;
    grid-row: 2;
  }

  #final-designs .ad-ff-strip-row > .ad-ff-rail {
    grid-column: 1;
    grid-row: 3;
  }

  #final-designs #ad-final-4 .ad-ff-strip-row > .ad-ff-strip-rail-stack {
    grid-column: 1;
    grid-row: 3;
  }

  #final-designs .ad-ff-rail {
    position: static;
  }
}

#final-designs .ad-ff-annot--strip {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: visible;
}

.ad-ff-visual--strip {
  position: relative;
  max-width: none;
  width: auto;
  margin: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  overflow: visible;
  flex-shrink: 0;
  transition: box-shadow 0.4s ease;
  border: 0;
}

.ad-ff-crop--strip {
  position: relative;
  box-sizing: border-box;
  /* Equal square: small until strip is hovered / focus-within */
  width: var(--ff-tile, 118px);
  height: var(--ff-tile, 118px);
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  border-radius: 4px;
  overflow: hidden;
  background: #e8e8e8;
  border: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease, aspect-ratio 0.45s ease;
}

/* One clear frame: art sits in .ad-ff-visual; .ad-ff-crop is layout-only (no “box in a box”) */
#final-designs .ad-ff-crop--strip {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: auto;
  background: #ffffff;
  border: 0;
  outline: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  border-width: 0;
  border-style: none;
}

/* Hotspot layer is sized to the image box (was on .ad-ff-visual when art was letterboxed in a square) */
#final-designs .ad-ff-crop--strip .ad-ff-annot-layer {
  z-index: 2;
}

#final-designs .ad-ff-visual--strip {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: none;
  padding: 0;
  background: #ffffff;
  border: none;
  outline: none;
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.1),
    0 24px 48px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

body.case-ad-creation .ad-ff-crop--strip img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  margin: 0;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  background-color: #e8e8e8;
  vertical-align: bottom;
  cursor: zoom-in;
  transition: filter 0.3s ease;
}

/* Natural aspect in one outer frame (no separate inner “cell”) */
#final-designs .ad-ff-crop--strip img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: top center;
  vertical-align: bottom;
  border: 0;
  outline: none;
  background-color: #ffffff;
  display: block;
  box-shadow: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#final-designs .ad-ff-annot:has(.ad-ff-pin.is-open) .ad-ff-crop--strip img {
  /* Rail carries copy; no dim that reads like a clear overlay on the art */
  filter: none;
}

.ad-ff-annot:has(.ad-ff-pin.is-open) .ad-ff-crop--strip img {
  filter: brightness(0.88) saturate(0.98);
}

.ad-ff-strip-cap {
  font-family: "DM Sans", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(200, 215, 255, 0.5);
  margin: 0.4rem 0.15rem 0.15rem;
  line-height: 1.2;
  max-width: calc(var(--ff-tile, 118px) + 0.5rem);
  word-break: break-word;
  transition: max-width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .ad-ff-crop--strip,
  .ad-ff-visual--strip,
  #final-designs .ad-ff-strip,
  .ad-ff-strip-cap,
  #final-designs .ad-ff-strip-outer,
  #final-designs .ad-ff-rail-item {
    transition: none !important;
  }
}

.ad-ff-figure {
  margin: 0.85rem 0.65rem 1.1rem;
  position: relative;
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  width: 100%;
}

.ad-ff-figure > figcaption {
  align-self: stretch;
  width: 100%;
  margin: 0.7rem 0.55rem 0.25rem;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  font-style: normal;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.65rem;
  cursor: default;
  text-align: left;
}

/* Image + pin box: .ad-ff-visual sets max width; pins share the same box as the bitmap */
.ad-ff-annot {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.ad-ff-visual {
  position: relative;
  max-width: min(520px, 100%);
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(12, 10, 8, 0.12);
}

.ad-ff-crop {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #e8e8e8;
  border: 0;
  box-shadow: none;
}

body.case-ad-creation .ad-ff-crop:not(.ad-ff-crop--strip) img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  vertical-align: bottom;
  cursor: zoom-in;
  transition: filter 0.3s ease;
}

.ad-ff-annot:has(.ad-ff-pin.is-open) .ad-ff-crop:not(.ad-ff-crop--strip) img {
  filter: brightness(0.92);
}

.ad-ff-annot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Pins */
.ad-ff-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 1;
  outline: none;
}

.ad-ff-pin.is-open {
  z-index: 4;
}

.ad-ff-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ffd-pin) 22%, transparent);
  border: 2px solid color-mix(in srgb, var(--ffd-pin) 80%, #fff 20%);
  animation: adFfPulse 2.4s ease-in-out infinite;
  pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ffd-pin) 35%, transparent);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.ad-ff-pin--accent {
  --ffd-pin: var(--accent-2);
}

#final-designs .ad-ff-pin--accent {
  /* Match rail / jump: rust accent, not product blue */
  --ffd-pin: var(--ad-terracotta);
}

/* On-image pins: previous pulsing / glass treatment (rail badges stay flat above) */
#final-designs .ad-ff-pin--accent .ad-ff-pulse {
  background: color-mix(in srgb, var(--ffd-pin) 22%, transparent);
  border-color: color-mix(in srgb, var(--ffd-pin) 80%, #fff 20%);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ffd-pin) 35%, transparent);
  animation: adFfPulse 2.4s ease-in-out infinite;
}

#final-designs .ad-ff-lbl {
  color: #fffcf7;
  text-shadow: 0 1px 2px color-mix(in srgb, var(--ad-terracotta-deep) 55%, transparent);
  transition: transform 0.18s ease, color 0.18s ease;
}

.ad-ff-pin--accent .ad-ff-pulse {
  background: color-mix(in srgb, var(--ffd-pin) 18%, transparent);
  border-color: color-mix(in srgb, var(--ffd-pin) 75%, #fff 25%);
  animation: adFfPulseBlue 2.4s ease-in-out infinite;
}

.ad-ff-pin:hover .ad-ff-pulse,
.ad-ff-pin:focus-visible .ad-ff-pulse,
.ad-ff-pin.is-open .ad-ff-pulse {
  animation: none;
  filter: none;
  transform: scale(1.1);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--ffd-pin) 32%, transparent),
    0 3px 10px color-mix(in srgb, var(--ffd-pin) 25%, transparent);
  background: color-mix(in srgb, var(--ffd-pin) 38%, transparent);
  border-color: color-mix(in srgb, var(--ffd-pin) 92%, #fff 8%);
}

/* Match higher specificity than .ad-ff-pin--accent .ad-ff-pulse so hover stops animation on map pins */
#final-designs .ad-ff-pin:hover .ad-ff-pulse,
#final-designs .ad-ff-pin:focus-visible .ad-ff-pulse,
#final-designs .ad-ff-pin.is-open .ad-ff-pulse {
  animation: none;
  transform: scale(1.14);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--ffd-pin) 26%, transparent),
    0 4px 14px color-mix(in srgb, var(--ffd-pin) 32%, transparent);
  background: color-mix(in srgb, var(--ffd-pin) 48%, transparent);
  border-color: color-mix(in srgb, var(--ffd-pin) 95%, #fff 5%);
}

#final-designs .ad-ff-pin:hover .ad-ff-lbl,
#final-designs .ad-ff-pin:focus-visible .ad-ff-lbl,
#final-designs .ad-ff-pin.is-open .ad-ff-lbl {
  transform: scale(1.1);
  color: #fff;
}

#final-designs .ad-ff-pin:active .ad-ff-pulse {
  transform: scale(1.06);
}

.ad-ff-lbl {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
}

.ad-ff-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: min(16.5rem, calc(100vw - 3rem));
  max-width: none;
  margin: 0;
  padding: 0.65rem 0.8rem 0.7rem;
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  font-style: normal;
  font-weight: 500;
  text-align: left;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  transform: translateX(-50%) translateY(4px) scale(0.97);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.ad-ff-pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.ad-ff-pin.is-open .ad-ff-pop,
.ad-ff-pin:hover .ad-ff-pop,
.ad-ff-pin:focus-visible .ad-ff-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* Prefer click/toggle on touch: hover not reliable */
@media (hover: none) {
  .ad-ff-pin:hover .ad-ff-pop {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px) scale(0.97);
    pointer-events: none;
  }
  .ad-ff-pin.is-open .ad-ff-pop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes adFfPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ffd-pin) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 10px transparent;
  }
}

@keyframes adFfPulseBlue {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ffd-pin) 40%, transparent);
  }
  50% {
    box-shadow: 0 0 0 10px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ad-ff-pulse {
    animation: none !important;
  }
  .ad-ff-pulse,
  #final-designs .ad-ff-lbl {
    transition: none;
  }
  .ad-ff-pop {
    transition: none;
  }
  #final-designs .ad-ff-pin:hover .ad-ff-pulse,
  #final-designs .ad-ff-pin:focus-visible .ad-ff-pulse,
  #final-designs .ad-ff-pin.is-open .ad-ff-pulse,
  .ad-ff-pin:hover .ad-ff-pulse,
  .ad-ff-pin:focus-visible .ad-ff-pulse,
  .ad-ff-pin.is-open .ad-ff-pulse {
    transform: none;
  }
  #final-designs .ad-ff-pin:hover .ad-ff-lbl,
  #final-designs .ad-ff-pin:focus-visible .ad-ff-lbl,
  #final-designs .ad-ff-pin.is-open .ad-ff-lbl {
    transform: none;
  }
}

/* ═══ 09 — Impact: KERV metrics (flat on page bg; accent numerals) ═══ */
#impact .ad-impact-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
  margin: var(--ad-stack) 0 var(--ad-stack);
  padding: 0;
  max-width: 52rem;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 560px) {
  #impact .ad-impact-metrics {
    grid-template-columns: 1fr;
    gap: 1.5rem 0;
    padding: 0;
  }

  #impact .ad-impact-metrics__col:first-child {
    padding-right: 0;
    padding-bottom: 1.35rem;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}

@media (min-width: 561px) {
  #impact .ad-impact-metrics__col:first-child {
    padding-right: 2rem;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }
}

#impact .ad-impact-metrics__kicker {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(44, 44, 44, 0.18);
}

#impact .ad-impact-metrics__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

#impact .ad-impact-metrics__stats li {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

#impact .ad-impact-metrics__value {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(2.5rem, 6.5vw, 3.65rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--numeral-ink);
}

#impact .ad-impact-metrics__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
