﻿/* SERPIFAI Insights Flagship Editorial Upgrade V1.1.0 */

.insights-page .ri-article {
  --ri-editorial-panel: rgba(8, 24, 39, .74);
  --ri-editorial-panel-strong: rgba(9, 31, 48, .92);
  --ri-editorial-line: rgba(125, 227, 245, .2);
  --ri-editorial-line-strong: rgba(125, 227, 245, .42);
  --ri-editorial-cyan: #7de3f5;
  --ri-editorial-mint: #66e3bd;
  --ri-editorial-violet: #a78bfa;
  --ri-editorial-gold: #f3c96b;
}

.insights-page .ri-article section {
  scroll-margin-top: 7rem;
}

.insights-page .ri-article h2 {
  max-width: 30ch;
}

.insights-page .ri-article h3 {
  max-width: 40ch;
}

.ri-stage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: 0 0 2rem;
}

.ri-stage-strip span {
  display: grid;
  gap: .2rem;
  min-height: 4.35rem;
  padding: .9rem 1rem;
  border: 1px solid var(--ri-editorial-line);
  border-radius: 1rem;
  background: rgba(5, 20, 33, .58);
  color: #9fb4c1;
  font-size: .74rem;
  line-height: 1.35;
}

.ri-stage-strip span strong {
  color: #eef8fc;
  font-size: .85rem;
}

.ri-stage-strip span[aria-current="step"] {
  border-color: var(--ri-editorial-line-strong);
  background: linear-gradient(135deg, rgba(32, 102, 125, .32), rgba(42, 29, 99, .28));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.ri-executive-answer,
.ri-key-takeaway,
.ri-decision-rule,
.ri-method-note,
.ri-download-card,
.ri-author-note,
.ri-worked-example {
  margin: 1.8rem 0 2.2rem;
  border: 1px solid var(--ri-editorial-line);
  border-radius: 1.15rem;
  background: var(--ri-editorial-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.ri-executive-answer,
.ri-key-takeaway,
.ri-decision-rule,
.ri-method-note,
.ri-author-note {
  padding: 1.35rem 1.45rem;
}

.ri-executive-answer {
  border-color: var(--ri-editorial-line-strong);
  background: linear-gradient(135deg, rgba(9, 42, 59, .9), rgba(17, 25, 57, .82));
}

.ri-box-label,
.ri-framework-name,
.ri-example-label {
  display: block;
  margin-bottom: .55rem;
  color: var(--ri-editorial-cyan);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ri-executive-answer p,
.ri-key-takeaway p,
.ri-decision-rule p,
.ri-method-note p,
.ri-author-note p {
  margin: 0;
}

.ri-executive-answer p {
  color: #f2f8fb;
  font-size: 1.06rem;
  line-height: 1.7;
}

.ri-decision-rule {
  border-left: 4px solid var(--ri-editorial-cyan);
}

.ri-decision-rule strong,
.ri-key-takeaway strong {
  color: #fff;
}

.ri-framework-intro {
  display: grid;
  gap: .65rem;
  margin-bottom: 1.25rem;
}

.ri-framework-intro p {
  margin: 0;
}

.ri-decision-tree {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin: 1.7rem 0 2.2rem;
}

.ri-decision-tree .ri-tree-node {
  position: relative;
  min-height: 8.6rem;
  padding: 1.05rem;
  border: 1px solid var(--ri-editorial-line);
  border-radius: 1rem;
  background: rgba(6, 22, 36, .72);
}

.ri-decision-tree .ri-tree-node:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: -.62rem;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--ri-editorial-cyan);
  font-weight: 900;
}

.ri-decision-tree b {
  display: block;
  margin-bottom: .35rem;
  color: #fff;
}

.ri-decision-tree p {
  margin: 0;
  color: #aebfca;
  font-size: .86rem;
  line-height: 1.55;
}

.ri-worked-example {
  overflow: hidden;
}

.ri-worked-example__header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--ri-editorial-line);
  background: linear-gradient(135deg, rgba(69, 46, 145, .22), rgba(6, 34, 50, .45));
}

.ri-worked-example__header h3 {
  margin: 0;
}

.ri-worked-example__header p {
  margin: .5rem 0 0;
  color: #b8c8d1;
}

.ri-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--ri-editorial-line);
}

.ri-example-card {
  padding: 1.15rem;
  background: rgba(5, 20, 33, .94);
}

.ri-example-card h4 {
  margin: 0 0 .6rem;
  color: #fff !important;
  font-size: 1rem !important;
}

.ri-example-card p,
.ri-example-card li {
  font-size: .88rem;
  line-height: 1.55;
}

.ri-example-card ul {
  margin: .75rem 0 0;
  padding-left: 1.1rem;
}

.ri-status {
  display: inline-flex;
  align-items: center;
  margin-top: .7rem;
  padding: .42rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.ri-status--include,
.ri-status--fund {
  color: #062217;
  background: var(--ri-editorial-mint);
}

.ri-status--context,
.ri-status--prepare {
  color: #061827;
  background: var(--ri-editorial-cyan);
}

.ri-status--exclude,
.ri-status--defer {
  color: #241600;
  background: var(--ri-editorial-gold);
}

.ri-status--ignore {
  color: #e4e8ef;
  background: #455166;
}

.ri-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.6rem 0 2rem;
}

.ri-summary-grid > div {
  padding: 1rem;
  border: 1px solid var(--ri-editorial-line);
  border-radius: 1rem;
  background: rgba(6, 22, 36, .66);
}

.ri-summary-grid b {
  display: block;
  margin-bottom: .35rem;
  color: #fff;
}

.ri-summary-grid p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.55;
}

.ri-download-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  border-color: var(--ri-editorial-line-strong);
}

.ri-download-card h3 {
  margin: 0 0 .35rem;
}

.ri-download-card p {
  margin: 0;
}

.ri-download-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .75rem 1rem;
  border-radius: .8rem;
  color: #04121c;
  background: linear-gradient(110deg, var(--ri-editorial-cyan), var(--ri-editorial-mint));
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.ri-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 1.4rem 0 2rem;
}

.ri-check-grid div {
  position: relative;
  padding: 1rem 1rem 1rem 2.75rem;
  border: 1px solid var(--ri-editorial-line);
  border-radius: .95rem;
  background: rgba(6, 22, 36, .62);
  color: #bdcbd4;
  line-height: 1.55;
}

.ri-check-grid div::before {
  content: "\2713";
  position: absolute;
  top: .95rem;
  left: 1rem;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #062217;
  background: var(--ri-editorial-mint);
  font-size: .72rem;
  font-weight: 900;
}

.ri-faq {
  display: grid;
  gap: .65rem;
  margin: 1.4rem 0 2rem;
}

.ri-faq details {
  border: 1px solid var(--ri-editorial-line);
  border-radius: .95rem;
  background: rgba(6, 22, 36, .62);
}

.ri-faq summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  color: #fff;
  font-weight: 800;
}

.ri-faq details p {
  margin: 0;
  padding: 0 1.1rem 1.1rem;
}

.ri-author-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.ri-author-note__mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ri-editorial-line-strong);
  border-radius: 50%;
  color: var(--ri-editorial-cyan);
  font-weight: 900;
  background: rgba(9, 41, 59, .7);
}

.ri-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .85rem;
}

.ri-inline-links a {
  display: inline-flex;
  padding: .48rem .7rem;
  border: 1px solid var(--ri-editorial-line);
  border-radius: 999px;
  text-decoration: none;
  font-size: .78rem;
}

.ri-mini-note {
  color: #8fa7b6;
  font-size: .82rem;
  line-height: 1.55;
}

.ri-article-showcase {
  margin-top: 1.7rem;
  margin-bottom: 2.1rem;
}

@media (max-width: 900px) {
  .ri-stage-strip,
  .ri-decision-tree,
  .ri-example-grid,
  .ri-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ri-decision-tree .ri-tree-node::after {
    display: none;
  }
}

@media (max-width: 680px) {
  .ri-stage-strip,
  .ri-decision-tree,
  .ri-example-grid,
  .ri-summary-grid,
  .ri-check-grid,
  .ri-download-card,
  .ri-author-note {
    grid-template-columns: 1fr;
  }

  .ri-download-card a {
    width: 100%;
  }
}

@media print {
  .site-header,
  .ri-footer,
  .ri-toc,
  .ri-side-note,
  .ri-article-hero__background,
  .ri-button,
  .ri-download-card a {
    display: none !important;
  }

  .insights-page,
  .insights-page .ri-article,
  .ri-executive-answer,
  .ri-key-takeaway,
  .ri-decision-rule,
  .ri-method-note,
  .ri-download-card,
  .ri-author-note,
  .ri-worked-example {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
}

/* SERPIFAI INSIGHTS HERO VISIBILITY BOOST V1.5.1 */
.insight-article-hero::before,
.insights-article-hero::before,
.article-hero::before,
.article-hero__overlay,
.insight-hero::before,
.insight-hero__overlay {
    opacity: 0.42 !important;
    background: linear-gradient(135deg, rgba(6, 14, 32, 0.38) 0%, rgba(6, 14, 32, 0.44) 42%, rgba(6, 14, 32, 0.52) 100%) !important;
}

.insight-article-hero .featured-image,
.insights-article-hero .featured-image,
.article-hero .featured-image,
.article-hero__media,
.article-hero__image,
.insight-hero .featured-image,
.insight-hero__media,
.insight-hero__image {
    opacity: 0.72 !important;
    filter: saturate(1.02) contrast(1.02) brightness(0.88) !important;
}

.insight-article-hero .hero-content,
.insights-article-hero .hero-content,
.article-hero .hero-content,
.article-hero__content,
.insight-hero .hero-content,
.insight-hero__content {
    position: relative !important;
    z-index: 3 !important;
}
