/* =============================================================================
   /content — "The Portal" (design_handoff_content_portal 3a). ESPN-style
   three-column portal: mixed explorer feed center, formed panels either side.
   ORIGINAL ink pill is reserved for published original articles. LIGHT-first
   spec via --cp-* tokens over a dark base.
   ============================================================================= */

/* Full-bleed like /explore: neutralize the Pico container cap. */
.page-content main.container { max-width: 100%; width: 100%; padding-left: 0; padding-right: 0; }

.cp {
  --cp-ink: #fff;
  --cp-t8: rgba(255, 255, 255, 0.82);
  --cp-t2: rgba(255, 255, 255, 0.72);
  --cp-t6: rgba(255, 255, 255, 0.6);
  --cp-quiet: rgba(255, 255, 255, 0.5);
  --cp-ghost: rgba(255, 255, 255, 0.4);
  --cp-panel-line: rgba(255, 255, 255, 0.25);   /* 0.38 light */
  --cp-hair: rgba(255, 255, 255, 0.1);          /* 0.14 light */
  --cp-subrule: rgba(255, 255, 255, 0.18);      /* 0.25 light */
  --cp-chip-line: rgba(255, 255, 255, 0.3);
  --cp-fill: rgba(255, 255, 255, 0.06);
  --cp-solid: #e9edf2;
  --cp-solid-text: #0b0d10;
  --cp-up: #47c47d;
  --cp-down: #e5595b;
  color: var(--cp-ink);
}
.cp .si-shead { margin-bottom: 18px; }
.cp-count {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--cp-t6); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cp-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.cp-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cp-main { min-width: 0; }
@media (max-width: 1280px) { .cp-grid { grid-template-columns: 270px minmax(0, 1fr); } .cp-col:last-child { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } .cp-col:last-child .cp-panel { flex: 1 1 300px; } }
@media (max-width: 860px) { .cp-grid { grid-template-columns: 1fr; } .cp-col { flex-direction: column; } }

/* ---- panels ---- */
.cp-panel { border: 1px solid var(--cp-panel-line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.cp-panel-head {
  display: flex; align-items: center; gap: 12px; margin: 0 0 6px;
}
.cp-panel-head > span:first-child {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--cp-t8); white-space: nowrap;
}
.cp-panel-head i { flex: 1 1 auto; height: 1px; background: var(--cp-subrule); }
.cp-panel-head a { font-size: 12px; font-weight: 600; color: var(--cp-ink); text-decoration: none; white-space: nowrap; }
.cp-panel-head a:hover { text-decoration: underline; text-underline-offset: 2px; }
.cp-panel-foot { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--cp-t6); }
.cp-panel-empty { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--cp-t2); }

/* trending */
.cp-trow {
  display: flex; align-items: center; gap: 9px; padding: 9px 0;
  border-bottom: 1px solid var(--cp-hair); text-decoration: none; color: inherit;
}
.cp-trow:last-child { border-bottom: none; padding-bottom: 2px; }
.cp-tlogo,
.cp img.cp-tlogo { width: 18px; height: 18px; flex: none; object-fit: contain; background: transparent !important; border-radius: 0 !important; }
.cp-tname { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--cp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-trow:hover .cp-tname { text-decoration: underline; text-underline-offset: 2px; }
.cp-tmove { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-tmove.is-up { color: var(--cp-up); }
.cp-tmove.is-down { color: var(--cp-down); }
.cp-tmove.is-flat { color: var(--cp-ghost); }

/* bylines */
.cp-brow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--cp-hair); }
.cp-brow:last-of-type { border-bottom: none; }
.cp-bav,
.cp img.cp-bav { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--cp-fill); }
.cp-bav.is-blank { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: var(--cp-t8); }
.cp-bmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cp-bname { font-size: 13px; font-weight: 800; color: var(--cp-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-bname:hover { text-decoration: underline; text-underline-offset: 2px; }
.cp-bmeta { font-size: 10.5px; color: var(--cp-t6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-follow {
  display: inline-flex !important; align-items: center; height: 26px; width: auto !important;
  margin: 0 !important; padding: 0 12px !important;
  border: 1px solid var(--cp-chip-line) !important; border-radius: 999px !important;
  background: transparent !important; color: var(--cp-ink) !important;
  font-size: 11px !important; font-weight: 700; font-family: inherit;
  line-height: 1 !important; white-space: nowrap; cursor: pointer; box-shadow: none !important;
}
.cp-follow.is-on { background: var(--cp-solid) !important; border-color: var(--cp-solid) !important; color: var(--cp-solid-text) !important; }

/* publish CTA */
.cp-cta-title { margin: 4px 0 0; font-size: 14.5px; font-weight: 800; color: var(--cp-ink); }
.cp-cta-body { margin: 6px 0 12px; font-size: 12px; line-height: 1.5; color: var(--cp-t2); }
.cp-cta-btn {
  display: inline-flex; align-items: center; height: 30px; padding: 0 16px;
  border-radius: 999px; background: var(--cp-solid); color: var(--cp-solid-text);
  font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.cp-cta-btn:hover { opacity: 0.92; }

/* headlines */
.cp-hrow {
  display: block; padding: 9px 0; border-bottom: 1px solid var(--cp-hair);
  font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--cp-ink);
  text-decoration: none;
}
.cp-hrow:last-child { border-bottom: none; padding-bottom: 2px; }
.cp-hrow:hover { text-decoration: underline; text-underline-offset: 2px; }

/* originals */
.cp-orow { display: flex; flex-direction: column; gap: 5px; padding: 10px 0; border-bottom: 1px solid var(--cp-hair); text-decoration: none; color: inherit; }
.cp-orow:last-child { border-bottom: none; padding-bottom: 2px; }
.cp-otitle { font-size: 13px; font-weight: 800; line-height: 1.3; color: var(--cp-ink); }
.cp-orow:hover .cp-otitle { text-decoration: underline; text-underline-offset: 2px; }
.cp-ometa { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--cp-t6); }
.cp-og-pill {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  background: var(--cp-solid); color: var(--cp-solid-text);
  font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
}

/* ---- center: toolbar ---- */
.cp-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.cp-seg { display: inline-flex; align-items: center; padding: 2px; border: 1px solid var(--cp-chip-line); border-radius: 999px; }
.cp-seg-btn {
  margin: 0 !important; border: 0 !important; width: auto !important;
  padding: 4px 13px !important; border-radius: 999px !important;
  background: transparent !important; color: var(--cp-t2) !important;
  font-size: 11.5px !important; font-weight: 700; font-family: inherit;
  line-height: 1.3 !important; white-space: nowrap; cursor: pointer; box-shadow: none !important;
}
.cp-seg-btn.is-on { background: var(--cp-solid) !important; color: var(--cp-solid-text) !important; }
.cp-sort {
  margin-left: auto; display: inline-flex; align-items: center;
  padding: 6px 13px; border: 1px solid var(--cp-chip-line); border-radius: 9px;
  font-size: 12px; font-weight: 600; color: var(--cp-t6); white-space: nowrap;
}

/* ---- center: feed ---- */
.cp-feed { display: flex; flex-direction: column; gap: 12px; transition: opacity 0.18s ease; }
.cp-feed.is-loading { opacity: 0.45; pointer-events: none; }
.cp-empty { margin: 24px 0; font-size: 12.5px; color: var(--cp-t2); }

.cp-lead { display: flex; flex-direction: column; border: 1px solid var(--cp-panel-line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; }
.cp-lead-hero { display: block; height: 280px; background: var(--cp-fill); position: relative; }
.cp-lead-hero img,
.cp .cp-lead-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.cp-lead-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px 20px; }
.cp-lead-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; color: var(--cp-ink); }
.cp-lead:hover .cp-lead-title { text-decoration: underline; text-underline-offset: 2px; }
.cp-lead-dek { font-size: 13.5px; line-height: 1.5; color: var(--cp-t2); }

.cp-card {
  display: flex; flex-direction: column; gap: 7px; padding: 16px 18px;
  border: 1px solid var(--cp-panel-line); border-radius: 14px;
  text-decoration: none; color: inherit; min-width: 0;
}
.cp-card-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cp-pill {
  display: inline-block; flex: none; padding: 2px 8px;
  border: 1px solid var(--cp-chip-line); border-radius: 999px;
  font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--cp-t2); white-space: nowrap;
}
.cp-pill.is-original { border-color: var(--cp-solid); background: var(--cp-solid); color: var(--cp-solid-text); }
.cp-card-src { font-size: 11px; color: var(--cp-t6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-card-title { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.3; color: var(--cp-ink); }
.cp-card-title.is-social { font-weight: 600; }
.cp-card:hover .cp-card-title { text-decoration: underline; text-underline-offset: 2px; }

/* video embed card + social embeds */
.cp-vidcard { display: flex; flex-direction: column; gap: 9px; padding: 16px 18px; border: 1px solid var(--cp-panel-line); border-radius: 14px; min-width: 0; }
.cp-vid { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--cp-fill); }
.cp-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cp-vidcard .cp-card-title { text-decoration: none; }
.cp-vidcard .cp-card-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.cp-embed { min-width: 0; }
.cp-embed .twitter-tweet, .cp-embed .twitter-tweet-rendered { margin: 0 !important; }
.cp-embed-ig .instagram-media { margin: 0 !important; min-width: 0 !important; max-width: 540px !important; border-radius: 14px !important; }
.cp-embed-tt .tiktok-embed { margin: 0; max-width: 605px; }
/* pre-hydration blockquote text (before the platform script swaps it) */
.cp-embed blockquote { padding: 14px 16px; border: 1px solid var(--cp-hair); border-radius: 14px; font-size: 13px; color: var(--cp-t2); }
.cp-embed blockquote a { color: var(--cp-ink); text-decoration: none; }

/* clips module */
.cp-clips { padding-bottom: 14px; }
.cp-clip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.cp-clip { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; min-width: 0; }
.cp-clip-thumb { position: relative; display: flex; height: 104px; border-radius: 10px; overflow: hidden; background: var(--cp-fill); align-items: center; justify-content: center; }
.cp-clip-thumb img,
.cp .cp-clip-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.cp-clip-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cp-clip-title { text-decoration: none; color: var(--cp-ink); }
.cp-clip-play {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(16, 20, 24, 0.85);
}
.cp-clip-title { font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--cp-ink); }
.cp-clip:hover .cp-clip-title { text-decoration: underline; text-underline-offset: 2px; }
.cp-clip-src { font-size: 10.5px; color: var(--cp-t6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* load more */
.cp-more-wrap { display: flex; justify-content: center; margin-top: 16px; }
.cp-more {
  display: inline-flex !important; align-items: center; height: 34px; width: auto !important;
  margin: 0 !important; padding: 0 18px !important;
  border: 1px solid var(--cp-chip-line) !important; border-radius: 999px !important;
  background: transparent !important; color: var(--cp-ink) !important;
  font-size: 12px !important; font-weight: 700; font-family: inherit;
  cursor: pointer; box-shadow: none !important;
}
.cp-more:hover { border-color: var(--cp-t6) !important; }

/* skeletons */
@keyframes cpPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.cp-sk-lead, .cp-sk-card {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--cp-hair); border-radius: 14px; padding: 16px 18px;
}
.cp-sk-hero { height: 240px; border-radius: 10px; background: var(--cp-fill); animation: cpPulse 1.4s ease-in-out infinite; }
.cp-sk-bar { display: block; height: 11px; border-radius: 5px; background: var(--cp-fill); animation: cpPulse 1.4s ease-in-out infinite; }

/* =============================================================================
   LIGHT MODE — the spec values.
   ============================================================================= */
html.si-light body.si-themed .cp {
  --cp-ink: #101418;
  --cp-t8: rgba(16, 20, 24, 0.8);
  --cp-t2: rgba(16, 20, 24, 0.72);
  --cp-t6: rgba(16, 20, 24, 0.6);
  --cp-quiet: rgba(16, 20, 24, 0.55);
  --cp-ghost: rgba(16, 20, 24, 0.45);
  --cp-panel-line: rgba(16, 20, 24, 0.38);
  --cp-hair: rgba(16, 20, 24, 0.14);
  --cp-subrule: rgba(16, 20, 24, 0.25);
  --cp-chip-line: rgba(16, 20, 24, 0.3);
  --cp-fill: rgba(16, 20, 24, 0.06);
  --cp-solid: #101418;
  --cp-solid-text: #fff;
  --cp-up: #16a34a;
  --cp-down: #dc2626;
}
html.si-light body.si-themed .cp-cta-btn:hover { background: #000; opacity: 1; }
