.case-preview-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px var(--side);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--ink);
  background: var(--lime);
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
}

.case-preview-nav::-webkit-scrollbar {
  display: none;
}

.case-preview-nav a {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.case-preview-nav a:hover,
.case-preview-nav a:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.case-preview-home {
  color: var(--paper);
  background: var(--ink);
}

.case-hero-v2 {
  min-height: calc(100dvh - 132px);
}

.case-hero-v2 h1 {
  max-width: 14ch;
  font-size: clamp(2.75rem, 3.45vw, 4.15rem);
  line-height: .98;
}

.case-hero-v2--long h1 {
  max-width: 19ch;
  font-size: clamp(2.45rem, 2.9vw, 3.45rem);
  line-height: 1;
}

.case-hero-v2--very-long h1 {
  max-width: 22ch;
  font-size: clamp(2.2rem, 2.45vw, 2.95rem);
  line-height: 1.03;
}

.case-hero-v2 .case-hero-copy > p:not(.kicker) {
  max-width: 52ch;
  font-size: 1.08rem;
  line-height: 1.55;
}

.case-breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.case-breadcrumbs a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent);
  text-underline-offset: 3px;
}

.case-breadcrumbs span[aria-current="page"] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-meta-strip,
.case-section,
.case-result,
.case-related-v2,
.case-cta-v2,
.approval-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-right: var(--side);
  padding-left: var(--side);
}

.case-meta-strip {
  padding-bottom: 90px;
}

.case-meta-strip dl {
  display: grid;
  grid-template-columns: 1fr 1.25fr .8fr 1.15fr;
  margin: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.case-meta-strip dl > div {
  min-width: 0;
  padding: 21px 18px 22px;
}

.case-meta-strip dl > div + div {
  border-left: 1px solid var(--ink);
}

.case-meta-strip dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.case-meta-strip dd {
  margin: 0;
  font-weight: 850;
  line-height: 1.25;
}

.case-story-v2 {
  padding-top: 92px;
  padding-bottom: 104px;
  border-top: 1px solid var(--ink);
}

.case-story-v2 h2 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 3.2vw, 3.55rem);
}

.case-story-v2 .rich-text {
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.65;
}

.case-section {
  padding-top: 94px;
  padding-bottom: 104px;
  border-top: 1px solid var(--ink);
}

.case-section > header,
.case-related-v2 > header {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-bottom: 40px;
}

.case-section > header h2,
.case-related-v2 > header h2,
.case-result h2,
.case-cta-v2 h2,
.approval-hero h1,
.approval-check h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.02;
}

.case-section > header h2,
.case-related-v2 > header h2,
.case-result h2,
.case-cta-v2 h2 {
  max-width: 15ch;
  font-size: clamp(2.45rem, 4vw, 4.6rem);
}

.case-section > header p,
.case-result p,
.case-cta-v2 p {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.62;
}

.case-table-shell {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--lime);
}

.case-table-v2 {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.case-table-v2 th {
  padding: 16px 18px;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--display);
  font-size: .72rem;
  line-height: 1.25;
}

.case-table-v2 td {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.42;
}

.case-table-v2 tr:last-child td {
  border-bottom: 0;
}

.case-table-v2 td:first-child {
  font-weight: 900;
}

.case-table-v2 td:nth-child(2) {
  width: 28%;
}

.case-table-v2 a {
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-underline-offset: 4px;
}

.case-table-v2 small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
}

.case-products-v2 {
  background: oklch(95% .015 108 / 55%);
}

.case-product-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 15px;
}

.case-product-card {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: oklch(99.7% .001 108);
  transition: transform .25s ease, box-shadow .25s ease;
}

.case-product-card--featured {
  grid-column: span 6;
}

.case-product-grid[data-count="4"] .case-product-card:not(.case-product-card--featured) {
  grid-column: span 6;
}

.case-product-card:hover,
.case-product-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 9px 9px 0 var(--cyan);
}

.case-product-card > a {
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr;
}

.case-product-media {
  position: relative;
  display: grid;
  min-height: 270px;
  margin: 0;
  overflow: hidden;
  place-items: center;
  background: oklch(98% .006 108);
}

.case-product-card--featured .case-product-media {
  min-height: 360px;
}

.case-product-media img {
  width: 100%;
  height: 270px;
  padding: 24px;
  object-fit: contain;
}

.case-product-card--featured .case-product-media img {
  height: 360px;
}

.case-product-dots {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  gap: 5px;
  justify-content: center;
}

.case-product-dots span {
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: oklch(15% .015 260 / 18%);
}

.case-product-dots span.is-active {
  background: var(--pink);
}

.case-product-copy {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 22px;
}

.case-product-copy > span {
  color: oklch(37% .22 351);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.25;
}

.case-product-copy h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.55vw, 1.55rem);
  line-height: 1.14;
}

.case-product-copy p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.48;
}

.case-product-copy strong {
  align-self: end;
  padding-top: 10px;
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-underline-offset: 4px;
}

.case-gallery-v2 {
  padding-top: 104px;
  border-top: 1px solid var(--ink);
}

.case-gallery-v2 figure:nth-child(4n + 1) {
  grid-column: span 8;
}

.case-gallery-v2 figure:nth-child(4n + 4) {
  grid-column: span 4;
}

.case-result {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(360px, 1.2fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: start;
  padding-top: 100px;
  padding-bottom: 108px;
  border-top: 1px solid var(--ink);
}

.case-result p {
  max-width: 720px;
  padding: 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--ink);
  font-weight: 750;
}

.case-related-v2 {
  padding-top: 96px;
  padding-bottom: 104px;
  border-top: 1px solid var(--ink);
}

.case-related-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 15px;
}

.case-related-card {
  grid-column: span 3;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.case-related-card--featured {
  grid-column: span 6;
}

.case-related-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}

.case-related-card--featured img {
  height: 360px;
}

.case-related-card strong {
  font-family: var(--display);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  line-height: 1.18;
}

.case-related-card:hover strong {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-underline-offset: 4px;
}

.case-cta-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  padding-top: 86px;
  padding-bottom: 94px;
  border-top: 1px solid var(--ink);
}

.case-cta-v2 > div {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.case-cta-v2 h2 {
  overflow-wrap: anywhere;
}

.case-commercial-links {
  padding: 92px var(--side);
  border-top: 1px solid var(--ink);
}

.case-commercial-links > header {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(280px, 1.2fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 38px;
}

.case-commercial-links h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.2vw, 4.8rem);
  line-height: .95;
}

.case-commercial-links p {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.case-commercial-links > div {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.case-commercial-links a {
  display: grid;
  grid-column: span 3;
  gap: 24px;
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.case-commercial-links a:first-child {
  grid-column: span 6;
  background: var(--lime);
}

.case-commercial-links span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.case-commercial-links strong {
  align-self: end;
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.08;
}

.case-cta-v2 .button {
  white-space: nowrap;
}

.approval-shell {
  padding-top: 72px;
  padding-bottom: 110px;
}

.approval-hero {
  max-width: 1000px;
  padding-bottom: 72px;
}

.approval-hero h1 {
  max-width: 14ch;
  font-size: clamp(3rem, 5vw, 6rem);
}

.approval-hero > p:not(.kicker) {
  max-width: 68ch;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.6;
}

.approval-notes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 90px;
}

.approval-notes article {
  grid-column: span 3;
  padding: 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.approval-notes article:first-child {
  grid-column: span 6;
  background: var(--lime);
}

.approval-notes strong {
  display: block;
  margin-bottom: 22px;
  font-family: var(--display);
  font-size: 1.3rem;
}

.approval-notes p {
  margin: 0;
  line-height: 1.5;
}

.approval-grid {
  display: grid;
  gap: 20px;
  padding: 88px 0;
  border-top: 1px solid var(--ink);
}

.approval-card {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr);
  gap: 42px;
  align-items: center;
}

.approval-card:nth-child(even) img {
  order: 2;
}

.approval-card img {
  width: 100%;
  height: 390px;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}

.approval-card div {
  display: grid;
  gap: 16px;
}

.approval-card span {
  color: oklch(37% .22 351);
  font-weight: 900;
}

.approval-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 4rem);
  line-height: 1;
}

.approval-card p {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.58;
}

.approval-check {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 64px;
  padding-top: 92px;
  border-top: 1px solid var(--ink);
}

.approval-check h2 {
  font-size: clamp(2.3rem, 4vw, 4.4rem);
}

.approval-check ol {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 24px;
  font-size: 1.08rem;
}

@media (max-width: 1100px) {
  .case-hero-v2 {
    min-height: auto;
  }

  .case-meta-strip dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-meta-strip dl > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .case-meta-strip dl > div:nth-child(4) {
    border-top: 1px solid var(--ink);
  }

  .case-product-card,
  .case-product-card--featured,
  .case-product-grid[data-count="4"] .case-product-card:not(.case-product-card--featured) {
    grid-column: span 6;
  }

  .case-related-card,
  .case-related-card--featured {
    grid-column: span 4;
  }

  .case-related-card img,
  .case-related-card--featured img {
    height: 300px;
  }
}

@media (max-width: 860px) {
  .case-hero-v2 h1 {
    max-width: 15ch;
    font-size: clamp(2.6rem, 9vw, 4rem);
  }

  .case-hero-v2--long h1,
  .case-hero-v2--very-long h1 {
    max-width: 20ch;
    font-size: clamp(2.25rem, 7.8vw, 3.2rem);
  }

  .case-story-v2,
  .case-result,
  .case-cta-v2,
  .case-commercial-links > header,
  .approval-card,
  .approval-check {
    grid-template-columns: 1fr;
  }

  .case-result {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-result > * {
    min-width: 0;
    max-width: 100%;
  }

  .case-table-shell {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .case-table-v2,
  .case-table-v2 tbody,
  .case-table-v2 tr,
  .case-table-v2 td {
    display: block;
    width: 100%;
  }

  .case-table-v2 thead {
    display: none;
  }

  .case-table-v2 tbody {
    display: grid;
    gap: 12px;
  }

  .case-table-v2 tr {
    padding: 10px 16px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
  }

  .case-table-v2 td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border: 0;
  }

  .case-table-v2 td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .case-product-card,
  .case-product-card--featured,
  .case-product-grid[data-count="4"] .case-product-card:not(.case-product-card--featured),
  .case-related-card,
  .case-related-card--featured {
    grid-column: span 12;
  }

  .case-commercial-links a,
  .case-commercial-links a:first-child {
    grid-column: span 6;
  }

  .case-product-media,
  .case-product-card--featured .case-product-media {
    min-height: 300px;
  }

  .case-product-media img,
  .case-product-card--featured .case-product-media img {
    height: 300px;
  }

  .case-gallery-v2 figure,
  .case-gallery-v2 figure:nth-child(4n + 1),
  .case-gallery-v2 figure:nth-child(4n + 4) {
    grid-column: span 12;
  }

  .case-result p {
    padding: 24px;
  }

  .case-cta-v2 {
    align-items: start;
  }

  .case-cta-v2 .button {
    justify-self: start;
  }

  .approval-notes article,
  .approval-notes article:first-child {
    grid-column: span 12;
  }

  .approval-card:nth-child(even) img {
    order: initial;
  }

  .approval-card img {
    height: 320px;
  }
}

@media (max-width: 560px) {
  .case-preview-nav {
    padding-right: 16px;
    padding-left: 16px;
  }

  .case-hero-v2--long h1,
  .case-hero-v2--very-long h1 {
    max-width: 18ch;
    font-size: 2.25rem;
  }

  .case-meta-strip {
    padding-bottom: 64px;
  }

  .case-meta-strip dl {
    grid-template-columns: 1fr;
  }

  .case-meta-strip dl > div + div,
  .case-meta-strip dl > div:nth-child(3),
  .case-meta-strip dl > div:nth-child(4) {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .case-story-v2,
  .case-section,
  .case-gallery-v2,
  .case-result,
  .case-related-v2,
  .case-commercial-links,
  .case-cta-v2 {
    padding-top: 70px;
    padding-bottom: 74px;
  }

  .case-section > header h2,
  .case-related-v2 > header h2,
  .case-cta-v2 h2 {
    font-size: 2.35rem;
  }

  .case-result h2 {
    font-size: 2.1rem;
    hyphens: auto;
    overflow-wrap: break-word;
  }

  .case-table-v2 td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .case-related-card img,
  .case-related-card--featured img {
    height: 250px;
  }

  .case-commercial-links a,
  .case-commercial-links a:first-child {
    grid-column: span 12;
  }

  .approval-shell {
    padding-top: 54px;
    padding-bottom: 76px;
  }

  .approval-hero h1 {
    font-size: 2.85rem;
  }
}

/* Unified publication package: real CRM form replaces the legacy demo brief. */
.case-crm-form {
  position: relative;
  min-height: 335px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  background: oklch(98% 0.006 108 / 82%);
  box-shadow: 10px 10px 0 var(--lime);
}

.case-crm-form .b24-form-wrapper {
  width: 100%;
  max-width: none;
}

.case-crm-form .bitrix-form-fallback {
  min-height: 295px;
}

