.section.case-contact {
  padding-right: 8px;
  padding-left: 8px;
}

.section.case-related {
  padding-right: 0;
  padding-left: 0;
}

.case-bottom-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-latin, var(--font));
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.case-related > .case-bottom-label {
  display: flex;
  width: fit-content;
  height: 50px;
  align-items: center;
  padding: 8px;
}

.related-project-list {
  display: grid;
  gap: 10px;
}

.related-project-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 86px;
  align-items: center;
  gap: 15px;
  padding: 8px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms ease;
}

.related-project-link:hover,
.related-project-link:focus-visible {
  background: var(--surface);
}

.related-project-cover {
  display: block;
  flex: 0 0 100px;
  width: 100px;
  height: 70px;
  background: var(--surface);
  object-fit: cover;
}

.related-project-footer {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  height: 50px;
  align-items: center;
  justify-content: space-between;
}

.related-project-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.related-project-copy strong,
.related-project-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-project-copy strong {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.related-project-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.related-project-chevron-wrap {
  display: flex;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: flex-end;
}

.related-project-chevron {
  width: 15px;
  height: 15px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
  transition: color 180ms ease;
}

.related-project-link:hover .related-project-chevron,
.related-project-link:focus-visible .related-project-chevron {
  color: var(--ink);
}

.related-project-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ink) 24%, transparent);
  outline-offset: 4px;
}

.case-contact {
  position: relative;
  z-index: 2;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 28px;
}

.contact-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

a.contact-link {
  text-decoration: none;
  transition: color 220ms ease;
}

a.contact-link > span:first-child {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 220ms ease;
}

a.contact-link:hover,
a.contact-link:focus-visible {
  color: var(--ink);
}

a.contact-link:hover > span:first-child,
a.contact-link:focus-visible > span:first-child {
  text-decoration-color: currentColor;
}

.contact-link .contact-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.social-preview {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 10px);
  left: 0;
  display: flex;
  visibility: hidden;
  width: 270px;
  flex-direction: column;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-raised, var(--background));
  box-shadow: 0 16px 40px rgba(21, 23, 22, 0.14), 0 3px 8px rgba(21, 23, 22, 0.08);
  color: var(--ink);
  font-family: var(--font-latin, var(--font));
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transform-origin: bottom left;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0, 0, 1), visibility 160ms;
}

:root[data-theme="dark"] .social-preview {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 3px 10px rgba(0, 0, 0, 0.28);
}

.social-preview::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 20px;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-raised, var(--background));
  transform: translateY(-5px) rotate(45deg);
}

.contact-link:hover .social-preview,
.contact-link:focus-visible .social-preview {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.social-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.social-preview-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-transform: uppercase;
}

.social-preview-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.social-preview-meta {
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

.social-preview-divider {
  height: 1px;
  margin-bottom: 12px;
  background: var(--line);
}

.social-preview-body {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.social-preview-label {
  display: block;
  margin-bottom: 3px;
  color: var(--quiet);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.social-preview strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.social-preview-handle {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

.social-preview-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.social-preview-action {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dotted var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.social-preview--email .social-preview-body {
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}

.social-preview-recipient,
.social-preview-message,
.social-preview-profile,
.social-preview-post {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.social-preview-stamp {
  display: flex;
  width: 52px;
  height: 58px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.social-preview-stamp-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.social-preview--email .social-preview-note {
  margin-top: -6px;
  margin-bottom: 2px;
}

.social-preview--x .social-preview-body {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

.social-preview-thread {
  width: 2px;
  height: 100%;
  min-height: 44px;
  border-radius: 1px;
  background: var(--line-strong);
}

.social-preview-post {
  gap: 5px;
}

.social-preview-post .social-preview-handle,
.social-preview-post .social-preview-note {
  font-size: 12px;
}

.social-preview-post .social-preview-note {
  line-height: 1.55;
}

.social-preview--telegram .social-preview-body {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.social-preview-bubble {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.social-preview-bubble-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.social-preview--instagram .social-preview-body {
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
}

.social-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: 72px;
  height: 72px;
}

.social-preview-grid-cell {
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface);
}

.social-preview-grid-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: none) and (pointer: coarse) {
  .social-preview {
    display: none;
  }
}

@media (max-width: 760px) {
  .related-project-list {
    gap: 10px;
  }

  .contact-links {
    align-items: center;
    flex-flow: row wrap;
    gap: 28px;
    margin-top: 24px;
  }

  .contact-link {
    flex: 0 0 auto;
  }

  .social-preview {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .related-project-link,
  .social-preview {
    transition-duration: 0.01ms;
  }
}
