.page-discover-site {
  background: #f4f6f9;
}

.page-discover-site .wrap {
  width: min(100% - 32px, 1366px);
  max-width: 1366px;
  margin-inline: auto;
}

.page-discover-site .site-main {
  padding: 22px 0 56px;
}

.discover-page {
  color: #111827;
}

.discover-topbar-card {
  position: sticky;
  top: 76px;
  z-index: 30;
  padding: 10px;
  margin-bottom: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.discover-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
}

.discover-tab {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f6f86;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.discover-tab svg {
  width: 17px;
  height: 17px;
}

.discover-tab.is-active {
  border-color: #bfd0ff;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
}

.discover-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.discover-main,
.discover-section {
  min-width: 0;
}

.discover-section-head {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.discover-section-head h2,
.discover-panel h2,
.discover-empty h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 950;
}

.discover-section-head span {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.discover-post-card {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #214895 58%, #16817f);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.discover-post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 18px 38px rgba(16, 24, 40, .16);
}

.discover-post-card.is-wide {
  min-height: 260px;
}

.discover-post-card.is-large {
  min-height: 430px;
}

.discover-post-card.is-text-only::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--post-bg, none) center / cover no-repeat;
  filter: blur(24px) saturate(.9) brightness(.7);
  transform: scale(1.12);
  opacity: .42;
}

.discover-post-card.is-text-only::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17,24,39,.88), rgba(37,99,235,.62));
}

.discover-post-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) brightness(.86);
}

.discover-post-card.is-locked .discover-post-media {
  filter: blur(14px) saturate(.75) brightness(.72);
  transform: scale(1.05);
}

.discover-post-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .12), rgba(15, 23, 42, .22) 34%, rgba(15, 23, 42, .74));
  z-index: 1;
}

.discover-post-open {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.discover-post-menu {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.discover-post-overlay {
  position: relative;
  z-index: 3;
  min-height: inherit;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
}

.discover-post-author-row a,
.discover-post-menu {
  pointer-events: auto;
}

.discover-post-author-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.discover-post-avatar,
.discover-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9ff;
  color: #111827;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 950;
}

.discover-post-avatar img,
.discover-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-post-author-row h3,
.discover-post-author-row p {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-post-author-row h3 {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
}

.discover-post-author-row p {
  margin-top: 3px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 850;
}

.discover-post-text {
  overflow-wrap: anywhere;
  font-size: 27px;
  line-height: 1.08;
  font-weight: 950;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .18);
}

.discover-lock-pill,
.discover-post-meta span {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  font-size: 12px;
  font-weight: 900;
}

.discover-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.discover-side-rail {
  position: sticky;
  top: 146px;
  max-height: calc(100vh - 168px);
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 16px;
}

.discover-panel,
.discover-empty {
  padding: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.discover-panel p,
.discover-empty p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.4;
  font-weight: 750;
}

.discover-empty a,
.discover-action {
  color: #111827;
  text-decoration: none;
}

.discover-empty a {
  margin-top: 14px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  font-weight: 900;
}

.discover-person-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #111827;
  text-decoration: none;
}

.discover-person-row + .discover-person-row {
  border-top: 1px solid #eef2f7;
}

.discover-person-row strong,
.discover-person-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-person-row strong {
  font-size: 14px;
  font-weight: 950;
}

.discover-person-row small {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.discover-action {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.discover-action + .discover-action {
  border-top: 1px solid #eef2f7;
}

@media (max-width: 980px) {
  .discover-layout {
    grid-template-columns: 1fr;
  }

  .discover-side-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .page-discover-site .wrap {
    width: min(100% - 20px, 1366px);
  }

  .page-discover-site .site-main {
    padding-top: 14px;
  }

  .discover-topbar-card {
    top: 64px;
    margin-bottom: 12px;
  }

  .discover-grid {
    grid-template-columns: 1fr;
  }

  .discover-post-card,
  .discover-post-card.is-wide,
  .discover-post-card.is-large {
    min-height: 360px;
  }

  .discover-post-overlay {
    padding: 18px;
  }

  .discover-post-text {
    font-size: 24px;
  }
}

.discover-search-pill {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
}

.discover-search-pill strong {
  color: #111827;
}

.discover-search-pill a {
  color: #2563eb;
  text-decoration: none;
}



/* Discover only blurs locked paid media. */
.discover-post-card:not(.is-locked)::before,
.discover-post-card:not(.is-locked)::after {
  filter: none !important;
}

.discover-post-card:not(.is-locked) .discover-post-media {
  filter: none !important;
}


.social-post-popover {
  position: absolute;
  top: 58px;
  right: 14px;
  z-index: 8;
  min-width: 150px;
  padding: 6px;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
  display: grid;
  gap: 4px;
}

.social-post-popover a,
.social-post-popover button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.social-post-popover a:hover,
.social-post-popover button:hover {
  background: #eef4ff;
}

.discover-video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #0f172a;
  overflow: hidden;
}

.discover-video-thumb .discover-post-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-video-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #111827, #334155);
}

.discover-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #0f172a;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 45px rgba(15,23,42,.28);
  z-index: 2;
}

.discover-video-play svg {
  width: 22px;
  height: 22px;
}

.discover-post-card.is-video .discover-post-open {
  pointer-events: none;
}


/* 2026 discover alignment */
.discover-search-row {
  margin-bottom: 14px;
  display: flex;
  justify-content: flex-start;
}

.discover-page .discover-section-head {
  padding: 2px 0 4px;
}

.discover-side-rail {
  top: 96px;
}

@media (max-width: 760px) {
  .discover-search-row {
    margin-bottom: 10px;
  }
}
