/* ============================================================
   Edge-link convention — bold + brand α
   ============================================================ */
.entry__content a.edge-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.entry__content a.edge-link:hover {
  color: var(--color-blue);
}

.edge-link::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.4em;
  vertical-align: 0.4em;
  background-color: var(--color-blue);
  -webkit-mask: url('/wp-content/themes/impactalpha/assets/images/ia-alpha.svg') center / contain no-repeat;
  mask:         url('/wp-content/themes/impactalpha/assets/images/ia-alpha.svg') center / contain no-repeat;
}

/* ============================================================
   Popover container — JS positions; CSS handles visibility
   ============================================================ */
.edge-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}

.edge-popover.edge-popover--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .edge-popover {
    transition: none;
    transform: none;
  }
}

/* ============================================================
   Card chrome (440px desktop popover)
   ============================================================ */
.edge-card {
  width: 440px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--color-line-soft);
  border-radius: 8px;
  padding: 18px 20px;
  font-family: 'Noto Sans', Inter, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-black);
  box-shadow:
    0 8px 24px rgba(15, 20, 25, 0.14),
    0 2px 6px rgba(15, 20, 25, 0.06);
}

@media (min-width: 1200px) {
  .edge-card {
    width: 520px;
  }
}

@media (min-width: 1600px) {
  .edge-card {
    width: 580px;
  }
}

.edge-card--loading {
  min-height: 80px;
}

.edge-card__head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.edge-card__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--color-line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-grey);
}

.edge-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edge-card__logo i {
  font-size: 22px;
}

.edge-card__id {
  flex: 1;
  min-width: 0;
}

.edge-card__name {
  font-family: 'Lora', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0;
  line-height: 1.2;
}

/* Logo + name are click targets that lead to the full Edge profile */
.edge-card__logo-link {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}

.edge-card__logo-link:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.edge-card__name-link {
  color: inherit;
  text-decoration: none;
}

.edge-card__name-link:hover .edge-card__name,
.edge-card__name-link:focus-visible .edge-card__name {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.edge-card__eyebrow {
  font-size: 12px;
  color: var(--color-grey);
  margin: 3px 0 0;
  line-height: 1.3;
}

/* ============================================================
   Description (3-line clamp)
   ============================================================ */
.edge-card__desc {
  font-size: 14px;
  color: var(--color-black);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Footer — count (optional) + CTA, CTA always right-aligned
   ============================================================ */
.edge-card__footer {
  display: flex;
  align-items: center;
}

.edge-card__footer > .edge-card__cta {
  margin-left: auto;
}

.edge-card__footer-text {
  font-size: 14px;
  color: var(--color-grey);
}

.edge-card__footer-text b {
  font-weight: 700;
  color: var(--color-black);
}

.edge-card__cta {
  font-size: 12px;
  color: var(--color-blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.edge-card__cta:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.edge-card__error {
  font-size: 12px;
  color: var(--color-grey);
  margin: 0;
}

/* ============================================================
   Mobile overrides — popover replaced by direct navigation.
   No hover affordance, so underline the trigger so it reads
   as a link.
   ============================================================ */
@media (max-width: 767px) {
  .edge-popover {
    display: none;
  }

  .entry__content a.edge-link {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
  }
}

/* ============================================================
   "In this article" sidebar widget — mini org cards
   ============================================================ */

.article-sidebar-widget + .article-sidebar-widget {
  margin-top: 120px;
}

.article-sidebar-widget__head-count {
  float: right;
  font-size: 14px;
  font-weight: 700;
  color: #5a6472;
  letter-spacing: 0;
  text-transform: none;
}

.article-sidebar-orgs__item {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line-soft);
}
.article-sidebar-orgs__item:last-of-type { border-bottom: 0; }

.article-sidebar-orgs__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.article-sidebar-orgs__logo {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 4px;
  background: #fff; border: 1px solid var(--color-line-soft);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-grey);
}
.article-sidebar-orgs__logo img {
  width: 100%; height: 100%; object-fit: cover;
}
.article-sidebar-orgs__logo i { font-size: 18px; }

.article-sidebar-orgs__id {
  flex: 1;
  min-width: 0;
}
.article-sidebar-orgs__name {
  font-family: Lora, Georgia, 'Times New Roman', Times, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-black);
  text-decoration: none;
  line-height: 1.2;
  display: block;
}
.article-sidebar-orgs__name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-sidebar-orgs__eyebrow {
  font-size: 11px;
  color: var(--color-grey);
  margin: 3px 0 0;
  line-height: 1.3;
}

/* Plain-text CTA at the bottom — deep-links to ?slugs=… filtered Edge view */
.article-sidebar-orgs__cta {
  display: inline-block;
  padding-top: 14px;
  border-top: 1px solid var(--color-line-soft);
  width: 100%;
  font-family: 'Noto Sans', Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-blue);
  text-decoration: none;
}
.article-sidebar-orgs__cta:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-sidebar-orgs__item--skeleton {
  min-height: 60px;
}

@keyframes ia-edge-shimmer {
  100% { transform: translateX(100%); }
}

.article-sidebar-orgs__bone {
  position: relative;
  overflow: hidden;
  background: #f3f5f7;
  border-radius: 4px;
}

.article-sidebar-orgs__bone::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  will-change: transform;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ia-edge-shimmer 1.25s linear infinite;
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .article-sidebar-orgs__bone::before {
    animation: none;
  }
}

.article-sidebar-orgs__logo.article-sidebar-orgs__bone {
  border: 0;
}

.article-sidebar-orgs__bone--name {
  display: block;
  width: 70%;
  height: 14px;
  margin-top: 2px;
}

.article-sidebar-orgs__bone--eyebrow {
  display: block;
  width: 45%;
  height: 10px;
  margin-top: 8px;
}

