/* Responsive fixes for the original Studio layout; desktop design stays intact. */
html { scroll-padding-top: 136px; }
.sd { transition-property: color, background-color, border-color, box-shadow, opacity; }
.sd.case-breadcrumb { min-width: 0; }
.sd.case-breadcrumb > :last-child { display: block; flex: 1 1 0%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.sd.case-company-url { flex-wrap: wrap; min-width: 0; gap: 6px; }
.sd.case-company-url > :last-child { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; line-height: 1.6; }
.richText img { height: auto; max-width: 100%; }
.richText { overflow-wrap: break-word; }
.case-menu-toggle:focus-visible, .case-nav a:focus-visible, .case-floating-button:focus-visible { outline: 3px solid #0048ea; outline-offset: 4px; }
.sd.case-floating.is-form-visible { visibility: hidden; pointer-events: none; }
.sd.case-submenu.is-open { display: flex; height: auto; opacity: 1; visibility: visible; }

@media (max-width: 1279px) {
  html { scroll-padding-top: 96px; scroll-padding-bottom: 100px; }
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .sd.case-layout { flex-direction: column; }
  .sd.case-article-column { width: 100%; min-width: 0; }
  .sd.case-sidebar { display: none; }
  .sd.case-mobile-company { display: flex; }
  .sd.case-mobile-company > .sd:not(:first-child) { display: grid; grid-template-columns: minmax(76px, .8fr) minmax(0, 1.6fr); gap: 12px; width: 100%; max-width: 100%; height: auto; min-height: 60px; padding: 16px 0; align-items: center; }
  .case-mobile-company h2.sd { font-size: 14px; line-height: 1.6; height: auto; min-width: 0; max-width: 100%; text-align: left; justify-content: flex-start; }
  .sd.case-mobile-company > .sd > :last-child { width: 100%; max-width: 100%; min-width: 0; margin: 0; }
  .case-mobile-company ul.sd { display: flex; flex-wrap: wrap; gap: 8px; height: auto; padding: 0; }
  .case-mobile-company li.sd { width: auto; max-width: 100%; height: auto; margin: 0; }
  .case-mobile-company > .sd:last-child h2.sd { font-size: 12px; }
  .sd.case-header { top: 0; padding-inline: 24px; }
  .sd.case-topbar, .sd.case-header-actions { display: none; }
  .sd.case-header-menu { width: auto; max-width: none; flex: 1 1 0%; min-width: 0; }
  .sd.case-menu-toggle { display: flex; width: 44px; height: 44px; margin: 0; max-width: none; }
  .sd.case-menu-toggle::before { background-size: 24px 24px; background-repeat: no-repeat; }
  .sd.case-nav { display: none; }
  .sd.case-nav.is-open { display: flex; position: fixed; top: 80px; left: 0; right: 0; width: 100%; max-width: 100%; height: auto; max-height: calc(100dvh - 90px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px; background: #fff; box-shadow: 0 12px 24px #0017471a; }
  .sd.case-nav.is-open > .sd { width: 100%; max-width: 100%; height: auto; min-height: 48px; margin: 0; flex: none; justify-content: flex-start; border-bottom: 1px solid #eef1f6; }
  .sd.case-nav.is-open a { min-height: 48px; padding-block: 12px; text-align: left; justify-content: flex-start; }
  .sd.case-nav.is-open .case-dropdown { flex-direction: column; align-items: stretch; }
  .sd.case-nav.is-open .case-dropdown > button { width: 100%; min-height: 48px; justify-content: flex-start; }
  .sd.case-nav.is-open .case-submenu { position: static; width: 100%; max-width: 100%; padding: 0 0 0 16px; margin: 0; box-shadow: none; }
  .sd.case-nav.is-open .case-submenu > a { width: 100%; }
  .sd.case-summary { flex-direction: column; width: 100%; max-width: 100%; gap: 20px; }
  .sd.case-summary > .sd { flex: none; max-width: calc(100% - 48px); width: calc(100% - 48px); margin: 0; }
  .sd.case-summary > .sd > .text { min-width: 0; width: 100%; max-width: 100%; font-size: 15px; line-height: 1.8; }
  .case-summary > .sd > .sd > .text.sd { font-size: 14px; line-height: 1.5; height: auto; }
  .case-summary > .sd:first-child > .text.sd { font-size: 16px; }
  .sd.case-author-desktop { justify-content: space-between; gap: 20px; flex-wrap: wrap; }
  .sd.case-floating { display: flex; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); height: auto; width: auto; }
  .sd.case-floating-inner { width: 100%; max-width: 440px; }
  .sd.case-floating-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: 100%; height: auto; }
  .sd.case-floating-button { width: 100%; max-width: 100%; min-width: 0; min-height: 56px; height: auto; padding: 9px 6px; }
  .sd.case-floating-button > .text { width: 100%; max-width: 100%; min-width: 0; height: auto; white-space: normal; line-height: 1.3; overflow-wrap: anywhere; }
  .sd.case-floating-button > .text:last-child { font-size: clamp(11px, 3.1vw, 14px); }
  .sd.case-floating-button > .text:not(:last-child) { font-size: clamp(8px, 2.3vw, 10px); }
  .sd.case-floating-button:first-child { background: #0048ea; box-shadow: 3px 3px 15px 1px #0048ea; }
  .sd.case-footer-promos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
  .sd.case-footer-promo { width: 100%; max-width: 100%; min-width: 0; }
  .case-footer-promo .sd { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .case-footer-promo .text { flex-shrink: 1; }
  .sd.case-profile > .sd, .sd.case-company > .sd { min-width: 0; max-width: 100%; }
}

@media (min-width: 541px) and (max-width: 1279px) {
  .sd.case-layout { margin: 104px 24px 0; }
  .sd.case-article-column { margin-top: 0; }
}

@media (max-width: 840px) {
  .sd.case-author-desktop { display: none; }
  .sd.case-author-mobile { display: flex; width: 100%; max-width: 100%; }
  .sd.case-shares-mobile { display: flex; width: calc(100% - 48px); max-width: calc(100% - 48px); margin: 20px 24px 36px; gap: 12px; justify-content: flex-start; }
  .sd.case-shares-mobile { padding: 0; }
  .sd.case-shares-mobile > .sd { flex: 1 1 0%; min-width: 0; max-width: 160px; height: 44px; margin: 0; }
  .sd.case-footer-promos { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 540px) {
  .sd.case-header { padding-inline: 20px; }
  .sd.case-breadcrumb { width: calc(100% - 32px); max-width: calc(100% - 32px); margin-inline: 16px; gap: 8px; }
  .sd.case-breadcrumb > :not(:last-child) { flex-shrink: 0; }
  .sd.case-summary { padding: 12px; gap: 12px; }
  .sd.case-summary > .sd { width: 100%; max-width: 100%; padding: 18px 16px; }
  .sd.case-summary > .sd:first-child { padding: 4px 0; }
  .sd.case-profile { padding: 20px 16px; }
  .sd.case-profile .case-profile-text { flex: 1 1 0%; min-width: 0; max-width: 100%; }
  .sd.case-profile .case-profile-text .text { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .sd.case-company-info { flex-direction: column; align-items: flex-start; width: 100%; max-width: 100%; gap: 16px; }
  .sd.case-company-info > .sd { width: 100%; max-width: 100%; min-width: 0; }
  .sd.case-company-url { width: 100%; max-width: 100%; flex-direction: column; align-items: flex-start; gap: 6px; }
  .sd.case-company-url > :last-child { flex: none; width: 100%; max-width: 100%; }
  .sd.case-footer-promo { min-width: 0; }
  .sd.case-footer-promo > .sd { max-width: 100%; min-width: 0; }
}

@media (max-width: 360px) {
  .sd.case-shares-mobile { width: calc(100% - 32px); max-width: calc(100% - 32px); margin-inline: 16px; gap: 8px; }
  .sd.case-shares-mobile > .sd { padding-inline: 6px; gap: 4px; }
  .sd.case-shares-mobile .text { font-size: 12px; }
}

@media (max-width: 1279px) and (max-height: 500px) {
  .sd.case-header { height: 64px; }
  .sd.case-nav.is-open { top: 64px; max-height: calc(100dvh - 72px); }
  html { scroll-padding-top: 80px; }
  .sd.case-floating { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .sd.case-floating-button { min-height: 44px; padding-block: 5px; }
}
/* Yellow emphasis follows every wrapped line. */
.sd.richText .case-highlight {
  display: inline;
  font-weight: 700;
  background: linear-gradient(transparent 68%, #ffeb3b 68%, #ffeb3b 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0;
  margin: 0;
}
