.clarity-section {
  width: 100%;
  padding-inline: max(20px, calc((100vw - var(--cw-container)) / 2));
}

@supports (content-visibility: auto) {
  .clarity-section {
    contain-intrinsic-size: 1px 720px;
    padding-bottom: 60px;
  }
}

.clarity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 58px;
}

.clarity-grid article {
  --clarity-glow-x: 50%;
  --clarity-glow-y: 50%;
  --clarity-glow-opacity: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid transparent;
  border-radius: 24px;
  background-image:
    linear-gradient(145deg, rgba(18, 21, 30, 0.76), rgba(11, 13, 21, 0.84) 52%, rgba(18, 20, 29, 0.78)),
    radial-gradient(
      150px circle at var(--clarity-glow-x) var(--clarity-glow-y),
      rgba(255, 249, 210, calc(var(--clarity-glow-opacity) * 0.98)),
      rgba(127, 245, 228, calc(var(--clarity-glow-opacity) * 0.58)) 30%,
      rgba(139, 92, 246, calc(var(--clarity-glow-opacity) * 0.36)) 58%,
      transparent 74%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(127, 245, 228, 0.11) 42%, rgba(255, 255, 255, 0.045));
  background-origin: border-box;
  background-clip: padding-box, border-box, border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 24px 68px rgba(0, 0, 0, 0.34);
  color: var(--cw-text-primary);
  padding: 30px;
  text-align: left;
  backdrop-filter: blur(14px) saturate(148%);
  -webkit-backdrop-filter: blur(14px) saturate(148%);
  transition:
    background 180ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.clarity-grid article::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.clarity-grid article::before {
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 10% 85%, rgba(0, 0, 0, 0.25), transparent 20%),
    radial-gradient(circle at 92% 8%, rgba(35, 213, 186, 0.14), transparent 64%),
    linear-gradient(210deg, rgba(23, 17, 177, 0.12), transparent 38%, rgba(255, 255, 255, 0.08));
  opacity: 1;
}

.clarity-grid article:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07),
    0 28px 78px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(35, 213, 186, 0.1);
}

.clarity-grid article > * {
  position: relative;
  z-index: 1;
}

.clarity-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 20px;
  color: var(--cw-status-warning);
}

.clarity-star {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.clarity-quote {
  margin: 0;
  color: rgba(248, 250, 252, 0.88);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.64;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.26);
  word-break: keep-all;
}

.clarity-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.clarity-avatar-tooltip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 50%;
  cursor: help;
}

.clarity-avatar-tooltip::before,
.clarity-avatar-tooltip::after {
  position: absolute;
  left: 50%;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, 6px, 0);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.clarity-avatar-tooltip::before {
  bottom: calc(100% + 6px);
  width: 9px;
  height: 9px;
  content: "";
  background: rgba(6, 9, 16, 0.94);
  border: 0;
  transform: translate3d(-50%, 6px, 0) rotate(45deg);
}

.clarity-avatar-tooltip::after {
  bottom: calc(100% + 11px);
  min-width: max-content;
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(6, 9, 16, 0.94);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(35, 213, 186, 0.12);
  color: var(--cw-text-primary);
  content: attr(data-clarity-tooltip);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.clarity-avatar-tooltip:hover::before,
.clarity-avatar-tooltip:hover::after,
.clarity-avatar-tooltip:focus-visible::before,
.clarity-avatar-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.clarity-avatar-tooltip:hover::before,
.clarity-avatar-tooltip:focus-visible::before {
  transform: translate3d(-50%, 0, 0) rotate(45deg);
}

.clarity-avatar-tooltip:focus-visible {
  outline: 2px solid var(--cw-focus);
  outline-offset: 5px;
}

.clarity-avatar {
  width: 68px;
  height: 68px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 13, 0.92);
  color: var(--cw-accent-primary-soft);
  font-size: 13px;
  font-weight: 800;
}

.clarity-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.clarity-meta strong,
.clarity-meta small {
  display: block;
}

.clarity-meta strong {
  color: rgba(248, 250, 252, 0.94);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.clarity-meta small {
  margin-top: 3px;
  color: rgba(203, 213, 225, 0.66);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .clarity-grid article {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
      rgba(17, 24, 39, 0.96);
    background-clip: padding-box;
  }
}

@media (max-width: 1023px) {
  .clarity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .clarity-section {
    width: 100%;
    padding-inline: 14px;
  }

  .clarity-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 34px;
  }

  .clarity-grid article {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clarity-grid article {
    transition: none;
  }

  .clarity-grid article:hover {
    transform: none;
  }

  .clarity-avatar-tooltip::before,
  .clarity-avatar-tooltip::after {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .clarity-grid article {
    background: rgba(17, 24, 39, 0.98);
    background-clip: padding-box;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
