/* Exact local case/collection preview. Native typography, containers and forms
   remain shared; no legacy page receives a new layout. */
.stoma-case-page { color: #16162b; }
.stoma-case-hero .co-hero__wrapper {
  min-height: 0;
  padding: 68px 72px 56px;
  background: linear-gradient(180deg, #e2f1ff 0%, #e8e3fa 100%);
}
.stoma-case-hero .breadcrumbs { margin-bottom: 40px; }
.stoma-case-hero .co-hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}
.stoma-case-hero .co-hero__left {
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0;
  gap: 28px;
}
.stoma-case-hero .hero-case__title { flex-grow: 0; margin: 0; order: 0; }
.stoma-case-lead { font-size: 18px; line-height: 1.5; margin: 0; }
.stoma-case-start { align-self: flex-start; max-width: 100%; text-align: center; }
.stoma-case-art.co-hero__right { display: block; min-width: 0; padding: 0; }
.stoma-case-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  object-position: center;
  /* Optical size follows the painted PNG, not its transparent outer canvas. */
  transform: scale(1.25);
  transform-origin: center;
}
.stoma-case-metrics.co-hero-detail { max-width: none; padding: 0; margin-top: 40px; }
.stoma-case-metrics .co-hero-detail__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.stoma-case-metrics .co-hero-detail__item { min-width: 0; padding: 28px; gap: 14px; }
.stoma-case-metrics .co-hero-detail__count { margin: 0; order: -1; font-size: 42px; line-height: 1.1; white-space: nowrap; }
.stoma-case-metrics .co-hero-detail__text { font-size: 16px; line-height: 1.4; letter-spacing: 0; }
.stoma-case-snapshot { font-size: 13px; line-height: 1.6; max-width: 1100px; margin: 22px 0 0; }
.stoma-case-section .co-problem__wrapper { gap: 56px; }
.stoma-case-section .co-problem__title {
  position: static;
  flex: 0 1 31%;
  max-width: none;
  min-width: 0;
  margin: 0;
}
.stoma-case-section .co-problem__content { flex: 1 1 0; width: auto; min-width: 0; max-width: 100%; }
.stoma-case-section--wide .co-problem__wrapper { display: block; }
.stoma-case-section--wide .co-problem__title { max-width: 1000px; margin-bottom: 32px; }
.stoma-case-copy { font-size: 18px; line-height: 1.65; }
.stoma-case-copy > :first-child { margin-top: 0; }
.stoma-case-copy > :last-child { margin-bottom: 0; }
.stoma-case-copy p { margin: 0 0 22px; font-size: inherit; line-height: inherit; }
.stoma-case-copy h3 { margin: 32px 0 16px; font-size: 24px; line-height: 1.3; font-weight: 600; }
.stoma-case-copy :is(ul, ol) { margin: 24px 0; padding-left: 1.5em; }
.stoma-case-copy li { margin: 0 0 14px; padding-left: 5px; }
.stoma-case-copy li::before { display: none; content: none; }
.stoma-case-copy ul { list-style: disc; }
.stoma-case-copy ol { list-style: decimal; }
.stoma-case-copy li::marker { color: #ec1557; font-weight: 600; }
.stoma-case-copy a:not([data-fancybox]) { color: #ec1557; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.stoma-case-copy a:focus-visible, .stoma-case-start:focus-visible { outline: 3px solid #ec1557; outline-offset: 5px; }
.stoma-case-copy .stoma-case-provider {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px; margin: 0 0 28px; padding: 24px; border: 1px solid #e5e1ec;
  border-radius: 20px; background: linear-gradient(120deg, #f1faf7, #f5f2fc);
  color: #16162b; text-decoration: none;
}
.stoma-case-provider img { display: block; width: 188px; height: 74px; object-fit: contain; }
.stoma-case-provider span { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.5; }
.stoma-case-provider svg { flex: 0 0 20px; }
.stoma-case-provider:hover span { color: #ec1557; }
.stoma-case-proof { margin: 36px 0; min-width: 0; }
.stoma-case-proof > a { display: block; width: 100%; border-radius: 12px; overflow: hidden; background: #f6f4fa; }
.stoma-case-proof img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; }
.stoma-case-proof figcaption { margin-top: 14px; color: #555366; font-size: 14px; line-height: 1.6; }
.stoma-case-table { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 28px 0; border: 1px solid #e5e1ec; border-radius: 12px; }
.stoma-case-table:focus-visible { outline: 3px solid #ec1557; outline-offset: 3px; }
.stoma-case-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; line-height: 1.55; }
.stoma-case-table caption { padding: 20px; text-align: left; font-weight: 600; color: #16162b; }
.stoma-case-table :is(th, td) { padding: 18px 20px; text-align: left; vertical-align: top; border-top: 1px solid #e5e1ec; }
.stoma-case-table th { background: #f3effa; font-weight: 600; }
.stoma-case-table :is(th, td) + :is(th, td) { border-left: 1px solid #e5e1ec; }
.stoma-case-page [data-stoma-consultation] { scroll-margin-top: 110px; }
.stoma-case-commentaries .co-problem__wrapper { display: block; }
.stoma-case-commentaries .co-problem__title { position: static; max-width: none; margin: 0 0 32px; }
.stoma-case-commentaries__grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 28px; }
.stoma-case-commentary { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 36px; row-gap: 24px; align-items: start; min-width: 0; padding: 32px; border: 1px solid #e5e1ec; border-radius: 24px; background: linear-gradient(145deg, #f2f6fc, #f4effa); }
.stoma-case-commentary[data-stoma-commentary="agency"] { background: linear-gradient(145deg, #fff3ed, #fbf1f5); }
.stoma-case-commentary__photo { display: block; grid-column: 1; grid-row: 1 / 3; width: 232px; height: 290px; border: 1px solid #e5e1ec; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #e8e3f2, #f9f6f3); }
.stoma-case-commentary__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.stoma-case-commentary__photo--agency { padding: 14px 14px 0; }
.stoma-case-commentary__photo--agency img { object-fit: contain; object-position: center bottom; }
.stoma-case-commentary__identity { grid-column: 2; grid-row: 1; min-width: 0; }
.stoma-case-commentary__side { margin: 0 0 8px; color: #555366; font-size: 12px; line-height: 1.5; font-weight: 500; }
.stoma-case-commentary h3 { margin: 0 0 10px; font-size: 24px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.stoma-case-commentary__role { margin: 0; color: #555366; font-size: 15px; line-height: 1.5; }
.stoma-case-commentary__quote { display: block; position: static; grid-column: 2; grid-row: 2; width: auto; max-width: 82ch; margin: 0; padding: 24px 0 0; border: 0; border-top: 1px solid #ded8e9; background: none; color: inherit; font: inherit; font-size: 16px; line-height: 1.7; }
.stoma-case-commentary__quote::before, .stoma-case-commentary__quote::after { content: none; }
.stoma-case-commentary__quote p { margin: 0 0 18px; padding: 0; font: inherit; }
.stoma-case-commentary__quote p:last-child { margin-bottom: 0; }
.stoma-case-category .top__wrapper { min-width: 0; }
.stoma-case-category .cases-sections__item:focus-visible { outline: 3px solid #ec1557; outline-offset: -3px; }

/* Same native card families in the catalogue and shared carousels. Copy/art
   occupy separate cells; the complete transparent silhouette stays contained. */
[data-stoma-case-card].stoma-case-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 24px;
  height: 550px;
  min-height: 550px;
}
[data-stoma-case-card] :is(.nm-cases-elem__top, .m-cases-elem__info) { grid-column: 1; grid-row: 1; max-width: none; min-width: 0; flex-grow: 0; }
[data-stoma-case-card] :is(.nm-cases-elem__description, .m-cases-elem__text) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
[data-stoma-case-card] :is(.nm-cases-elem-mark, .m-cases-elem-tags) { grid-column: 1; grid-row: 2; min-width: 0; }
[data-stoma-case-card] :is(.nm-cases-elem__img, .m-cases-elem__img) {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-self: stretch;
  justify-self: center;
  position: relative;
  inset: auto;
  z-index: auto;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  /* Keep the native slot; optical scale is applied to its transparent PNG. */
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transform: none;
}
[data-stoma-case-card].stoma-case-card:hover :is(.nm-cases-elem__img, .m-cases-elem__img) { transform: none; }
[data-stoma-case-card] :is(.nm-cases-elem__img, .m-cases-elem__img) img {
  display: block;
  width: 100%;
  height: auto;
  align-self: center;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  transform: scale(1.5);
  transform-origin: center;
  transition: transform 0.3s ease;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  [data-stoma-case-card]:is(:hover, :focus-visible) :is(.nm-cases-elem__img, .m-cases-elem__img) img {
    transform: translateY(-6px) scale(1.54) rotate(-3deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-stoma-case-card] :is(.nm-cases-elem__img, .m-cases-elem__img) img,
  [data-stoma-case-card]:is(:hover, :focus-visible) :is(.nm-cases-elem__img, .m-cases-elem__img) img {
    transform: scale(1.5);
    transition: none;
  }
}
[data-stoma-case-card]:focus-visible { outline: 3px solid #ec1557; outline-offset: -4px; }
[data-stoma-case-card] > .stoma-case-card__accessible-name[hidden] { display: none !important; }

/* The one-card AI selection shares the natural native All-panel height.
   Only shared nm carousels with this draft participate; catalogue flow and
   the m-family's existing responsive heights stay untouched. Inactive panels
   keep sizing the same grid row without painting, receiving input or focus. */
.nm-cases-elem:has([data-stoma-case-card]) { display: grid; grid-template-columns: minmax(0, 1fr); }
.nm-cases-elem:has([data-stoma-case-card]) > .nm-cases-elem__slider { grid-area: 1 / 1; min-width: 0; align-self: stretch; }
.nm-cases-elem:has([data-stoma-case-card]) > .nm-cases-elem__slider:not(._is-selected) { display: block; visibility: hidden; pointer-events: none; }
.nm-cases-elem:has([data-stoma-case-card]) > .nm-cases-elem__slider._is-selected { visibility: visible; }
/* A one-card filter locks both arrows. Keep their native boxes: otherwise the
   empty nav shrinks the mobile heading row by 3px and moves the whole section. */
.nm-cases:has([data-stoma-case-card]) .nm-cases-nav .swiper-button-lock { display: block; visibility: hidden; pointer-events: none; }
/* TabSliderSystem destroys an inactive Swiper without clearing its old inline
   widths. Size hidden measuring slides using that native controller's exact
   one/two-column contract so resizing the AI selection does not measure stale
   widths. The active Swiper remains the only owner of its interactive slides. */
.nm-cases-elem:has([data-stoma-case-card]) > .nm-cases-elem__slider:not(._is-selected) .nm-cases-elem__item { width: 100% !important; }
@media (min-width: 768px) {
  .nm-cases-elem:has([data-stoma-case-card]) > .nm-cases-elem__slider:not(._is-selected) .nm-cases-elem__item { width: calc(50% - 12px) !important; }
}

@media (max-width: 1439.98px) {
  [data-stoma-case-card].stoma-case-card--m { height: 450px; min-height: 450px; }
  .stoma-case-hero .co-hero__wrapper { padding: 60px; }
  .stoma-case-hero .co-hero__content { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; }
  .stoma-case-hero .co-hero__left { gap: 24px; }
  .stoma-case-metrics .co-hero-detail__item { padding: 24px; }
  .stoma-case-metrics .co-hero-detail__count { font-size: 36px; }
  .stoma-case-section .co-problem__wrapper { gap: 40px; }
}
@media (max-width: 1023.98px) {
  [data-stoma-case-card].stoma-case-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; }
  [data-stoma-case-card].stoma-case-card--nm { height: auto; min-height: 0; grid-template-rows: auto 232px auto; }
  [data-stoma-case-card].stoma-case-card--m { height: 400px; min-height: 400px; }
  [data-stoma-case-card] :is(.nm-cases-elem__img, .m-cases-elem__img) { grid-column: 1; grid-row: 2; max-width: 232px; }
  [data-stoma-case-card] :is(.nm-cases-elem-mark, .m-cases-elem-tags) { grid-row: 3; }
  .stoma-case-hero .co-hero__wrapper { padding: 40px; }
  .stoma-case-hero .breadcrumbs { margin-bottom: 28px; }
  .stoma-case-hero .co-hero__content { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
  .stoma-case-hero .co-hero__left { gap: 20px; }
  .stoma-case-art img { max-height: 300px; }
  .stoma-case-metrics .co-hero-detail__list { gap: 12px; }
  .stoma-case-metrics .co-hero-detail__item { padding: 18px; border-radius: 16px; }
  .stoma-case-metrics .co-hero-detail__count { font-size: 27px; letter-spacing: -0.5px; }
  .stoma-case-metrics .co-hero-detail__text { font-size: 14px; }
  .stoma-case-section .co-problem__wrapper { display: block; }
  .stoma-case-section .co-problem__title { margin-bottom: 26px; }
  .stoma-case-copy { font-size: 16px; }
  .stoma-case-commentaries__grid { grid-template-columns: minmax(0, 1fr); }
  .stoma-case-commentary { grid-template-columns: 200px minmax(0, 1fr); column-gap: 28px; }
  .stoma-case-commentary__photo { width: 200px; height: 250px; }
}
@media (max-width: 767.98px) {
  [data-stoma-case-card].stoma-case-card--nm { grid-template-rows: auto 190px auto; }
  [data-stoma-case-card] :is(.nm-cases-elem__img, .m-cases-elem__img) { max-width: 190px; }
  .stoma-case-hero .co-hero__wrapper { padding: 24px 16px; border-radius: 12px; }
  .stoma-case-hero .breadcrumbs { margin-bottom: 24px; }
  .stoma-case-hero .co-hero__content { display: flex; flex-direction: column; padding: 0; gap: 24px; background: transparent; border-radius: 0; }
  .stoma-case-hero .co-hero__left { display: flex; width: 100%; order: 0; }
  .stoma-case-hero .hero-case__title { order: 0; }
  .stoma-case-lead { font-size: 16px; line-height: 1.55; }
  .stoma-case-hero .co-hero-info__list { gap: 10px; }
  .stoma-case-hero .co-hero-info__item { font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
  .stoma-case-start { font-size: 15px; line-height: 1.4; padding: 18px 52px 18px 24px; }
  .stoma-case-art.co-hero__right { display: block; width: 100%; max-width: 300px; order: 1; }
  .stoma-case-art img { max-height: 280px; }
  .stoma-case-metrics.co-hero-detail { margin-top: 24px; }
  .stoma-case-metrics .co-hero-detail__list { grid-template-columns: minmax(0, 1fr); }
  .stoma-case-metrics .co-hero-detail__item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px; }
  .stoma-case-metrics .co-hero-detail__count { font-size: 36px; }
  .stoma-case-metrics .co-hero-detail__text { font-size: 15px; }
  .stoma-case-snapshot { font-size: 12px; }
  .stoma-case-section .co-problem__wrapper { padding: 24px 16px; border-radius: 12px; }
  .stoma-case-section .co-problem__title { margin-bottom: 20px; }
  .stoma-case-copy h3 { font-size: 20px; }
  .stoma-case-copy p { margin-bottom: 18px; }
  .stoma-case-proof { margin: 26px 0; }
  .stoma-case-proof figcaption { font-size: 12px; }
  .stoma-case-table table { font-size: 14px; }
  .stoma-case-table :is(th, td) { padding: 14px 16px; }
  .stoma-case-page [data-stoma-consultation] { scroll-margin-top: 90px; }
  .stoma-case-commentaries .co-problem__wrapper { padding: 24px 16px; border-radius: 12px; }
  .stoma-case-commentaries .co-problem__title { margin-bottom: 24px; }
  .stoma-case-commentaries__grid { gap: 20px; }
  .stoma-case-commentary { display: block; padding: 20px; border-radius: 16px; }
  .stoma-case-commentary__photo { width: 160px; height: 200px; margin-bottom: 24px; border-radius: 16px; }
  .stoma-case-commentary h3 { font-size: 20px; }
  .stoma-case-commentary__side { font-size: 12px; }
  .stoma-case-commentary__role { font-size: 14px; }
  .stoma-case-commentary__quote { margin-top: 24px; padding-top: 20px; font-size: 16px; line-height: 1.65; }
}
