/* Editorial / Innsikt — shared cards, archive, article typography */

.editorial-breadcrumb {
  font-size: 0.875rem;
  color: rgba(232, 236, 249, 0.72);
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
}
.editorial-breadcrumb a {
  color: rgba(245, 247, 255, 0.92);
  text-decoration: none;
}
.editorial-breadcrumb a:hover {
  text-decoration: underline;
}
.editorial-breadcrumb__sep {
  margin: 0 0.35em;
  opacity: 0.5;
}

.editorial-archive-inner,
.editorial-article-inner {
  width: 100%;
  max-width: min(1100px, 100%);
  margin-inline: auto;
  padding: clamp(72px, 10vw, 120px) clamp(20px, 4vw, 40px) clamp(80px, 12vw, 140px);
}

.editorial-archive-head h1,
.editorial-article-head h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 0.5rem;
  color: rgba(245, 247, 255, 0.98);
}

.editorial-archive-lede,
.editorial-article-dek {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  color: rgba(232, 236, 249, 0.82);
  max-width: 62ch;
  margin: 0 0 2rem;
}

/* Primestreak /innsikt archive: center title + lede (Primeportal archive stays left-aligned) */
main.editorial-archive--primestreak .editorial-archive-head {
  text-align: center;
}
main.editorial-archive--primestreak .editorial-archive-head h1 {
  text-align: center;
}
main.editorial-archive--primestreak .editorial-archive-lede {
  margin-inline: auto;
  text-align: center;
}

.editorial-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border-radius: var(--frame-radius-md, 12px);
  border: 1px solid rgba(245, 247, 255, 0.12);
  background: rgba(12, 12, 20, 0.45);
}
.editorial-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(232, 236, 249, 0.75);
}
.editorial-filters select,
.editorial-filters input[type="search"] {
  min-width: 12rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--frame-radius-sm, 8px);
  border: 1px solid rgba(245, 247, 255, 0.16);
  background: rgba(8, 8, 14, 0.85);
  color: rgba(245, 247, 255, 0.95);
}
.editorial-filters__search input {
  min-width: min(100%, 18rem);
}
.editorial-filters__submit {
  align-self: flex-end;
}

.editorial-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.editorial-archive-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

/* —— Editorial cards (shared: home, Primeportal, archives, related) —— */
.editorial-card {
  position: relative;
  border-radius: var(--frame-radius-md, 14px);
  border: 1px solid rgba(245, 247, 255, 0.11);
  background: linear-gradient(165deg, rgba(18, 18, 32, 0.72) 0%, rgba(10, 10, 18, 0.88) 100%);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.editorial-card:hover {
  border-color: rgba(255, 45, 143, 0.38);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 45, 143, 0.18),
    0 0 48px rgba(255, 45, 143, 0.1);
  transform: translateY(-3px);
}
.editorial-card__link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
  min-height: 0;
}
.editorial-card__media {
  position: relative;
  aspect-ratio: 2.35 / 1;
  overflow: hidden;
  background: #05050a;
  isolation: isolate;
}
.editorial-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.editorial-card:hover .editorial-card__media img {
  transform: scale(1.06);
}
.editorial-card__media--fallback {
  background:
    radial-gradient(ellipse 120% 80% at 78% 12%, hsla(var(--editorial-fb-hue, 300deg), 42%, 22%, 0.35), transparent 52%),
    linear-gradient(
      148deg,
      hsl(var(--editorial-fb-hue, 300deg) 32% 11%) 0%,
      #05050d 42%,
      hsl(calc(var(--editorial-fb-hue, 300deg) + 22deg) 28% 9%) 100%
    );
}
.editorial-card__fallback {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.editorial-card__fallback-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(245, 247, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 247, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.editorial-card__fallback-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 70%, rgba(255, 45, 143, 0.22), transparent 55%);
  opacity: 0.85;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.editorial-card:hover .editorial-card__fallback-glow {
  opacity: 1;
}
.editorial-card__fallback-mark {
  position: absolute;
  right: 14%;
  bottom: 18%;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(245, 247, 255, 0.14);
  background: linear-gradient(135deg, rgba(255, 45, 143, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: rotate(-8deg);
}
.editorial-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem 1.35rem;
}
.editorial-card__kicker {
  margin: 0 0 0.6rem;
  font-size: 0.6875rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 186, 224, 0.88);
}
.editorial-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: rgba(232, 236, 249, 0.58);
}
.editorial-card__cat {
  text-transform: uppercase;
  font-weight: 650;
  color: rgba(232, 236, 249, 0.78);
}
.editorial-card__type {
  text-transform: lowercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 247, 255, 0.14);
  color: rgba(236, 238, 246, 0.82);
  background: rgba(0, 0, 0, 0.2);
}
.editorial-card__badge {
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.editorial-card__badge--ever {
  border-color: rgba(138, 180, 255, 0.35);
  background: rgba(106, 158, 252, 0.08);
  color: rgba(196, 214, 255, 0.95);
}
.editorial-card__badge--now {
  border-color: rgba(255, 45, 143, 0.38);
  background: rgba(255, 45, 143, 0.07);
  color: rgba(255, 206, 232, 0.96);
}
.editorial-card__date--inline {
  margin-left: auto;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(232, 236, 249, 0.72);
}
.editorial-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: rgba(245, 247, 255, 0.98);
}
.editorial-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.48;
  color: rgba(232, 236, 249, 0.7);
  flex: 1;
}
/* Featured (main story) */
.editorial-card--featured {
  border-radius: var(--frame-radius-lg, 18px);
  border-color: rgba(245, 247, 255, 0.14);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.38);
}
.editorial-card--featured .editorial-card__link {
  min-height: clamp(260px, 42vw, 360px);
}
@media (min-width: 880px) {
  .editorial-card--featured .editorial-card__link {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: stretch;
  }
  .editorial-card--featured .editorial-card__media {
    aspect-ratio: auto;
    min-height: 100%;
    height: 100%;
  }
  .editorial-card--featured .editorial-card__body {
    padding: clamp(1.35rem, 3.2vw, 2.25rem);
    justify-content: center;
  }
}
.editorial-card--featured .editorial-card__title {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.editorial-card--featured .editorial-card__excerpt {
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  line-height: 1.52;
  color: rgba(232, 236, 249, 0.76);
}
@media (max-width: 879px) {
  .editorial-card--featured .editorial-card__media {
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .editorial-card,
  .editorial-card__media img,
  .editorial-card__fallback-glow {
    transition: none !important;
  }
  .editorial-card:hover {
    transform: none;
  }
  .editorial-card:hover .editorial-card__media img {
    transform: none;
  }
}

/* Home #innsikt: center header block like #apps (narrow column + margin auto in grid section) */
#innsikt.home-editorial {
  display: grid;
  justify-items: center;
}

#innsikt.home-editorial .home-editorial-featured,
#innsikt.home-editorial .home-editorial-list,
#innsikt.home-editorial .home-editorial-cta {
  justify-self: stretch;
  width: 100%;
}

#innsikt.home-editorial .section-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

#innsikt.home-editorial .section-head h2 {
  text-align: center;
}

#innsikt.home-editorial .section-head .section-sub {
  margin-inline: auto;
  text-align: center;
  max-width: 42ch;
}

/* Primestreak home #innsikt — same rhythm as Primeportal .pp-editorial feed */
#innsikt.home-editorial .home-editorial-featured {
  margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
}
#innsikt.home-editorial .home-editorial-featured .editorial-card--featured {
  max-width: 100%;
  margin-inline: 0;
}
#innsikt.home-editorial .home-editorial-list {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}
#innsikt.home-editorial .home-editorial-cta {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  text-align: center;
}

/* Asymmetric row (7+5 / ~58–42) — mirrors .pp-editorial .pp-editorial-grid */
@media (min-width: 900px) {
  #innsikt.home-editorial .home-editorial-list.editorial-archive-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.2rem, 2.2vw, 1.75rem);
  }
  #innsikt.home-editorial .home-editorial-list .editorial-card:nth-child(odd) {
    grid-column: span 7;
  }
  #innsikt.home-editorial .home-editorial-list .editorial-card:nth-child(even) {
    grid-column: span 5;
  }
}
@media (max-width: 899px) {
  #innsikt.home-editorial .home-editorial-list.editorial-archive-grid {
    grid-template-columns: 1fr;
  }
  #innsikt.home-editorial .home-editorial-list .editorial-card {
    grid-column: 1 / -1;
  }
}

.editorial-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  justify-content: center;
}
.editorial-pagination__status {
  font-size: 0.9rem;
  color: rgba(232, 236, 249, 0.65);
}
.editorial-empty {
  color: rgba(232, 236, 249, 0.7);
}

.editorial-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(232, 236, 249, 0.62);
}
.editorial-article-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
.editorial-article-badge--ever {
  background: rgba(106, 158, 252, 0.18);
  color: rgba(186, 210, 255, 0.95);
}
.editorial-article-badge--now {
  background: rgba(255, 45, 143, 0.16);
  color: rgba(255, 198, 230, 0.95);
}
.editorial-article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  color: rgba(232, 236, 249, 0.68);
  margin-top: 1rem;
}
.editorial-article-cover {
  margin: 2rem 0;
  border-radius: var(--frame-radius-lg, 16px);
  overflow: hidden;
  border: 1px solid rgba(245, 247, 255, 0.1);
}
.editorial-article-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.editorial-article-body.prose {
  font-size: clamp(1.02rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: rgba(236, 238, 246, 0.9);
  max-width: 65ch;
}
.editorial-article-body.prose h2,
.editorial-article-body.prose h3,
.editorial-article-body.prose h4 {
  margin: 1.75rem 0 0.75rem;
  line-height: 1.25;
  color: rgba(245, 247, 255, 0.98);
}
.editorial-article-body.prose p {
  margin: 0 0 1rem;
}
.editorial-article-body.prose ul,
.editorial-article-body.prose ol {
  margin: 0 0 1rem 1.25rem;
}
.editorial-article-body.prose a {
  color: rgba(186, 210, 255, 0.95);
}
.editorial-article-body.prose blockquote {
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 3px solid rgba(255, 45, 143, 0.45);
  color: rgba(232, 236, 249, 0.78);
}

.editorial-article-footer {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.editorial-related {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(245, 247, 255, 0.1);
}
.editorial-related h2 {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
}

.editorial-not-found {
  text-align: center;
}
.editorial-not-found h1 {
  margin-bottom: 0.5rem;
}

/* Primeportal marketing shell */
.pp-mkt .pp-editorial {
  margin: var(--section-stack, clamp(104px, 12vw, 176px)) auto;
  padding-inline: clamp(20px, 4vw, 40px);
}
.pp-editorial-inner {
  max-width: min(1100px, 100%);
  margin-inline: auto;
}
.pp-editorial-head {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.pp-editorial-head h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  margin: 0 0 clamp(0.65rem, 1.5vw, 1rem);
  color: rgba(245, 247, 255, 0.98);
  letter-spacing: -0.02em;
}
.pp-editorial-sub {
  margin: 0;
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  line-height: 1.5;
  color: rgba(232, 236, 249, 0.8);
  max-width: min(56ch, 100%);
  margin-inline: auto;
  text-wrap: pretty;
}
.pp-editorial-featured {
  margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
}
.pp-editorial-featured .editorial-card--featured {
  max-width: 100%;
  margin-inline: 0;
}
.pp-editorial-grid {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}
/* Asymmetric editorial rhythm (Primeportal marketing feed only) */
@media (min-width: 900px) {
  .pp-editorial .pp-editorial-grid.editorial-archive-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.2rem, 2.2vw, 1.75rem);
  }
  .pp-editorial .pp-editorial-grid .editorial-card:nth-child(odd) {
    grid-column: span 7;
  }
  .pp-editorial .pp-editorial-grid .editorial-card:nth-child(even) {
    grid-column: span 5;
  }
}
@media (max-width: 899px) {
  .pp-editorial .pp-editorial-grid.editorial-archive-grid {
    grid-template-columns: 1fr;
  }
  .pp-editorial .pp-editorial-grid .editorial-card {
    grid-column: 1 / -1;
  }
}
.pp-editorial-cta {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  text-align: center;
}
.pp-editorial-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: clamp(0.94rem, 1.15vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(245, 247, 255, 0.94);
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: var(--frame-radius-sm, 8px);
  border: 1px solid rgba(245, 247, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.pp-editorial-cta-link:hover {
  border-color: rgba(255, 45, 143, 0.42);
  background: rgba(255, 45, 143, 0.07);
  box-shadow: 0 0 36px rgba(255, 45, 143, 0.14);
}
.pp-editorial-cta-link__arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pp-editorial-cta-link:hover .pp-editorial-cta-link__arrow {
  transform: translateX(5px);
}
@media (prefers-reduced-motion: reduce) {
  .pp-editorial-cta-link__arrow,
  .pp-editorial-cta-link:hover .pp-editorial-cta-link__arrow {
    transition: none;
    transform: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
