/* Retro Portal — y2k light editorial portal */

body.theme-retro-portal {
  --rp-bg: #F4F1EA;
  --rp-paper: #FFF2CC;
  --rp-surface: #FFFFFF;
  --rp-text: #1D2430;
  --rp-muted: #5C667A;
  --rp-blue: #2E6BDE;
  --rp-orange: #FF7A00;
  --rp-pink: #D81B60;
  --rp-soft-blue: #D6E4FF;
  --rp-border: #C8D3E6;
  --rp-radius: 8px;
  --rp-gap: 0.85rem;
  --rp-pad: 0.95rem;
  background: var(--rp-bg);
  color: var(--rp-text);
  font-family: Verdana, Arial, sans-serif;
  line-height: 1.5;
}

body.theme-retro-portal h1,
body.theme-retro-portal h2,
body.theme-retro-portal h3,
body.theme-retro-portal .logo-text {
  font-family: Georgia, "Times New Roman", serif;
}

body.theme-retro-portal .site-nav a { text-transform: none; }

body.theme-retro-portal.rp-density-compact { --rp-gap: 0.58rem; --rp-pad: 0.72rem; }
body.theme-retro-portal.rp-density-balanced { --rp-gap: 0.85rem; --rp-pad: 0.95rem; }
body.theme-retro-portal.rp-density-airy { --rp-gap: 1.15rem; --rp-pad: 1.24rem; }

body.theme-retro-portal.rp-radius-0 { --rp-radius: 0px; }
body.theme-retro-portal.rp-radius-8 { --rp-radius: 8px; }
body.theme-retro-portal.rp-radius-pill { --rp-radius: 999px; }

body.theme-retro-portal .article-card,
body.theme-retro-portal .rp-rail-card,
body.theme-retro-portal .ticker-card,
body.theme-retro-portal .btn-primary,
body.theme-retro-portal .rp-btn-outline,
body.theme-retro-portal .pbn-ff-pill,
body.theme-retro-portal .pbn-ff-select,
body.theme-retro-portal .pbn-ff-textarea,
body.theme-retro-portal .rp-counters__inner,
body.theme-retro-portal .shop-product-card,
body.theme-retro-portal .shop-product-detail,
body.theme-retro-portal .sidebar-widget,
body.theme-retro-portal .poll-widget { border-radius: var(--rp-radius) !important; }

/* header */
body.theme-retro-portal .site-header.rp-masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--rp-surface);
  border-bottom: 2px solid var(--rp-blue);
  box-shadow: 0 1px 0 var(--rp-orange);
}
body.theme-retro-portal .rp-masthead__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: var(--rp-gap);
  padding: 0.45rem 0.7rem;
}
body.theme-retro-portal .site-nav.rp-masthead__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}
body.theme-retro-portal .site-nav.rp-masthead__nav a {
  color: var(--rp-text);
  border: 1px solid var(--rp-border);
  background: var(--rp-soft-blue);
  padding: 0.28rem 0.55rem;
  text-decoration: none;
  font-size: 0.88rem;
}
body.theme-retro-portal .site-nav.rp-masthead__nav a:hover {
  border-color: var(--rp-orange);
  color: var(--rp-orange);
}
body.theme-retro-portal .rp-masthead__tagline {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.24rem 0.7rem 0.38rem;
  color: var(--rp-muted);
  font-size: 0.79rem;
}

/* ticker */
body.theme-retro-portal .ticker-wrap {
  max-width: 1320px;
  margin: 0.5rem auto 0;
  border: 1px solid var(--rp-border);
  padding: 0.4rem 0.55rem;
  background: var(--rp-surface);
}
body.theme-retro-portal .rp-ticker--portal-tabs .ticker-text {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rp-border);
  background: var(--rp-soft-blue);
  color: var(--rp-text);
  padding: 0.2rem 0.5rem;
  margin: 0.12rem 0.18rem;
  text-decoration: none;
}
body.theme-retro-portal .rp-ticker--hot-modules .ticker-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rp-gap);
}
body.theme-retro-portal .rp-ticker--wire-feed {
  background: var(--rp-text);
  border-color: var(--rp-text);
}
body.theme-retro-portal .rp-ticker--wire-feed .ticker-text { color: #FFFFFF; }
@media (max-width: 900px) {
  body.theme-retro-portal .rp-ticker--hot-modules .ticker-cards-grid { grid-template-columns: 1fr; }
}

/* layout */
body.theme-retro-portal .rp-home-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--rp-pad) 0.72rem 1.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: var(--rp-pad);
}
body.theme-retro-portal .rp-home-main > * + * { margin-top: var(--rp-pad); }
body.theme-retro-portal .rp-home-rail { position: sticky; top: 74px; align-self: start; }
@media (max-width: 1050px) {
  body.theme-retro-portal .rp-home-shell { grid-template-columns: 1fr; }
  body.theme-retro-portal .rp-home-rail { position: static; }
}

body.theme-retro-portal .rp-rail-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  padding: var(--rp-pad);
  margin-bottom: var(--rp-gap);
}
body.theme-retro-portal .rp-rail-card h3 {
  margin: 0 0 0.48rem;
  color: var(--rp-pink);
  font-size: 1rem;
}

body.theme-retro-portal .rp-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rp-gap);
}
@media (max-width: 980px) {
  body.theme-retro-portal .rp-articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body.theme-retro-portal .rp-articles-grid { grid-template-columns: 1fr; }
}

body.theme-retro-portal .article-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  overflow: hidden;
}
body.theme-retro-portal .article-card-body { padding: var(--rp-pad); }
body.theme-retro-portal .article-card-img { width: 100%; height: 188px; object-fit: cover; border-bottom: 1px solid var(--rp-border); }
body.theme-retro-portal .article-card-category { color: var(--rp-orange); font-weight: 700; }
body.theme-retro-portal .article-card h3 a { color: var(--rp-text); text-decoration: none; }
body.theme-retro-portal .article-card h3 a:hover { color: var(--rp-blue); }

/* hero */
body.theme-retro-portal .rp-hero--portal-front,
body.theme-retro-portal .rp-hero--feature-carousel-rail,
body.theme-retro-portal .rp-hero--mosaic-portal {
  border: 1px solid var(--rp-border);
  background: var(--rp-surface);
}

body.theme-retro-portal .rp-hero__bw-layout {
  display: grid;
  grid-template-columns: 10px 1fr;
}
body.theme-retro-portal .rp-hero__bw-rail {
  background: linear-gradient(var(--rp-blue), var(--rp-pink));
}
body.theme-retro-portal .rp-hero__bw-main { padding: var(--rp-pad); }
body.theme-retro-portal .rp-hero__bw-live { background: var(--rp-orange); color: #FFFFFF; padding: 0.18rem 0.52rem; }
body.theme-retro-portal .rp-hero__bw-photo { height: 220px; border-top: 1px solid var(--rp-border); background-size: cover; background-position: center; }

body.theme-retro-portal .rp-hero__sb-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
}
body.theme-retro-portal .rp-hero__sb-stack {
  padding: var(--rp-pad);
  border-right: 1px solid var(--rp-border);
  background: var(--rp-soft-blue);
}
body.theme-retro-portal .rp-hero__sb-card {
  min-height: 292px;
  display: flex;
  align-items: end;
  background-image: linear-gradient(#5C667A, #1D2430), var(--hero-bg, #D6E4FF);
  background-size: cover;
  background-position: center;
}
body.theme-retro-portal .rp-hero__sb-cap { width: 100%; padding: var(--rp-pad); color: #FFFFFF; }

body.theme-retro-portal .rp-hero__cc-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: var(--rp-gap);
  padding: var(--rp-pad);
}
body.theme-retro-portal .rp-hero__cc-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--rp-gap);
}
body.theme-retro-portal .rp-hero__cc-tile {
  min-height: 132px;
  display: flex;
  align-items: end;
  text-decoration: none;
  border: 1px solid var(--rp-border);
  background-image: linear-gradient(var(--rp-paper), var(--rp-soft-blue));
  background-size: cover;
  background-position: center;
}
body.theme-retro-portal .rp-hero__cc-tile--lead { min-height: 212px; grid-column: span 2; }
body.theme-retro-portal .rp-hero__cc-tile-cap {
  width: 100%;
  padding: 0.55rem;
  background: linear-gradient(var(--rp-muted), var(--rp-text));
  color: #FFFFFF;
}
body.theme-retro-portal .rp-hero__cc-copy {
  border: 1px solid var(--rp-border);
  background: var(--rp-paper);
  padding: var(--rp-pad);
}
@media (max-width: 920px) {
  body.theme-retro-portal .rp-hero__sb-grid,
  body.theme-retro-portal .rp-hero__cc-grid,
  body.theme-retro-portal .rp-hero__cc-tiles { grid-template-columns: 1fr; }
  body.theme-retro-portal .rp-hero__cc-tile--lead { grid-column: span 1; }
}

/* counters */
body.theme-retro-portal .rp-counters__inner {
  border: 1px solid var(--rp-border);
  background: var(--rp-surface);
  padding: var(--rp-pad);
}
body.theme-retro-portal .rp-counters--portal-inline .rp-counters__si-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rp-gap);
}
body.theme-retro-portal .rp-counters__si-unit {
  border: 1px solid var(--rp-border);
  background: var(--rp-soft-blue);
  padding: 0.52rem;
}
body.theme-retro-portal .rp-counters__si-score { display: block; font-size: 1.55rem; font-weight: 800; color: var(--rp-blue); }

body.theme-retro-portal .rp-counters--retro-panels .rp-counters__dp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rp-gap);
}
body.theme-retro-portal .rp-counters__dp-cell {
  border: 1px solid var(--rp-border);
  background: var(--rp-paper);
  padding: 0.62rem;
}
body.theme-retro-portal .rp-counters__dp-value { display: block; font-size: 1.46rem; font-weight: 800; color: var(--rp-pink); }

body.theme-retro-portal .rp-counters--digest-row .rp-counters__nr-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rp-gap);
}
body.theme-retro-portal .rp-counters__nr-seg {
  border-bottom: 2px solid var(--rp-border);
  padding-bottom: 0.4rem;
}
body.theme-retro-portal .rp-counters__nr-num { display: block; font-size: 1.35rem; font-weight: 800; color: var(--rp-orange); }
body.theme-retro-portal .rp-counters__nr-div { display: none; }
@media (max-width: 860px) {
  body.theme-retro-portal .rp-counters--portal-inline .rp-counters__si-row,
  body.theme-retro-portal .rp-counters--retro-panels .rp-counters__dp-grid,
  body.theme-retro-portal .rp-counters--digest-row .rp-counters__nr-bar { grid-template-columns: 1fr; }
}

/* archive strip */
body.theme-retro-portal .rp-archive-rail {
  border: 1px solid var(--rp-border);
  background: var(--rp-surface);
  padding: var(--rp-pad);
}
body.theme-retro-portal .rp-archive-rail__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--rp-gap);
}
body.theme-retro-portal .rp-archive-rail__link {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--rp-text);
  border-top: 1px solid var(--rp-border);
  padding: 0.48rem 0;
}

/* footer */
body.theme-retro-portal .site-footer.rp-footer {
  margin-top: 1.9rem;
  border-top: 2px solid var(--rp-blue);
  background: var(--rp-surface);
}
body.theme-retro-portal .rp-footer__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: var(--rp-pad);
  padding: var(--rp-pad) 0.72rem;
}
body.theme-retro-portal .rp-footer__col a {
  display: inline-block;
  color: var(--rp-text);
  text-decoration: none;
  margin: 0.1rem 0;
}
body.theme-retro-portal .rp-footer__col a:hover { color: var(--rp-blue); }
body.theme-retro-portal .rp-footer__bottom {
  border-top: 1px solid var(--rp-border);
  text-align: center;
  padding: 0.74rem;
  color: var(--rp-muted);
}
@media (max-width: 980px) {
  body.theme-retro-portal .rp-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body.theme-retro-portal .rp-footer__grid { grid-template-columns: 1fr; }
}

/* calmer article reading */
body.theme-retro-portal .rp-article-main .article-layout { max-width: 1140px; margin: 0 auto; }
body.theme-retro-portal .rp-article-main article .article-content,
body.theme-retro-portal .rp-article-main article .article-content--html {
  max-width: 760px;
  line-height: 1.72;
}

/* comment form layout rule */
body.theme-retro-portal .comment-fake-form .pbn-fake-form__comment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--rp-gap);
}
body.theme-retro-portal .comment-fake-form .pbn-ff-inline--grow { grid-column: 1 / -1; }
@media (max-width: 760px) {
  body.theme-retro-portal .comment-fake-form .pbn-fake-form__comment-row { grid-template-columns: 1fr; }
}

/* Counter contrast guard */
body.theme-retro-portal .rp-counters__dp-title,
body.theme-retro-portal .rp-counters__si-eyebrow,
body.theme-retro-portal .rp-counters__dp-label,
body.theme-retro-portal .rp-counters__si-meta,
body.theme-retro-portal .rp-counters__nr-lbl { color: var(--rp-text); }
body.theme-retro-portal .rp-counters__dp-label,
body.theme-retro-portal .rp-counters__si-meta,
body.theme-retro-portal .rp-counters__nr-lbl { opacity: 0.92; }