/* Nyakundi Report social-feed convergence.
   Direction: curated newsroom feed inspired by X/Tumblr, not public posting. */

:root {
  --nr-red: #ff0031;
  --nr-red-soft: #ffe1e5;
  --nr-cyan: #35d4ff;
  --nr-bg: #f8f7f4;
  --nr-panel: #ffffff;
  --nr-panel-2: #f1efea;
  --nr-text: #16191d;
  --nr-muted: #66707c;
  --nr-line: #ded8d0;
  --nr-shadow: 0 18px 54px rgba(18, 14, 10, .08);
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="dark"] {
  --nr-bg: #111417;
  --nr-panel: #171b20;
  --nr-panel-2: #1f242a;
  --nr-text: #eef1f4;
  --nr-muted: #a6adb8;
  --nr-line: #30363e;
  --nr-red-soft: rgba(255, 0, 49, .16);
  --nr-shadow: 0 22px 70px rgba(0, 0, 0, .38);
}

body.has-shell {
  background: var(--nr-bg) !important;
  color: var(--nr-text) !important;
  font-family: var(--font-display);
}

.topbar {
  background: color-mix(in srgb, var(--nr-panel) 92%, transparent) !important;
  border-bottom: 1px solid var(--nr-line) !important;
  backdrop-filter: blur(18px);
}

.topbar__brand-name {
  color: var(--nr-red) !important;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.topbar__brand-mark {
  background: linear-gradient(180deg, var(--nr-red), color-mix(in srgb, var(--nr-red) 20%, transparent)) !important;
}

.topbar__intel-pill {
  display: none !important;
}

.topbar__nav a,
.drawer__nav a,
.rail__item,
.rail__all,
.rail__lead {
  font-family: var(--font-display);
}

.rail {
  background: var(--nr-panel) !important;
  border-color: var(--nr-line) !important;
}

.rail__live,
.rail__item--active {
  border-color: var(--nr-red) !important;
  color: var(--nr-red) !important;
}

/* Public homepage: replace newspaper/terminal modules with social feed. */
.template-homepage .t-home {
  max-width: 100% !important;
  padding: 0 !important;
  gap: 0 !important;
}

.template-homepage .t-home > .t-lane:not(.nr-social-home),
.template-homepage .t-home > .t-front-topics,
.template-homepage .t-home > .t-foot,
.template-homepage .t-home > .t-home-cluster,
.template-homepage .t-home > .reels-strip {
  display: none !important;
}

.nr-social-home {
  width: min(100%, 1560px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 760px) 360px;
  gap: 0;
  min-height: calc(100vh - 116px);
  border-left: 1px solid var(--nr-line);
  border-right: 1px solid var(--nr-line);
}

.nr-social-rail {
  position: sticky;
  top: var(--topbar-h, 72px);
  align-self: start;
  height: calc(100vh - var(--topbar-h, 72px));
  padding: 34px 28px;
  background: color-mix(in srgb, var(--nr-panel) 60%, transparent);
}

.nr-social-rail--left {
  border-right: 1px solid var(--nr-line);
}

.nr-social-rail--right {
  border-left: 1px solid var(--nr-line);
}

.nr-social-eyebrow,
.nr-side-card__head h3 {
  margin: 0 0 18px;
  color: var(--nr-red);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nr-discover-list {
  display: grid;
  gap: 12px;
}

.nr-discover-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 3px;
  color: var(--nr-muted);
  text-decoration: none;
  font-weight: 800;
}

.nr-discover-list a.is-active,
.nr-discover-list a:hover {
  background: #000;
  color: var(--nr-red);
  box-shadow: inset 3px 0 0 var(--nr-red);
}

.nr-feed {
  min-width: 0;
  border-right: 1px solid var(--nr-line);
  background: var(--nr-bg);
}

.nr-composer-card,
.nr-post {
  border-bottom: 1px solid var(--nr-line);
  background: var(--nr-panel);
}

.nr-composer-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 26px 28px;
}

.nr-composer-card__avatar,
.nr-composer-card__avatar img,
.nr-composer-card__avatar span {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.nr-composer-card__avatar span {
  display: grid;
  place-items: center;
  background: var(--nr-red);
  color: #fff;
  font-weight: 900;
}

.nr-composer-card__prompt {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--nr-line);
  color: var(--nr-muted);
  text-decoration: none;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
}

.nr-composer-card__tools {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 10px;
}

.nr-composer-card__tools a {
  color: color-mix(in srgb, var(--nr-red) 70%, var(--nr-text));
  text-decoration: none;
}

.nr-composer-card__post {
  margin-left: auto;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--nr-red);
  color: #fff !important;
  font-weight: 900;
  text-transform: uppercase;
}

.nr-post {
  padding: 24px 28px;
}

.nr-post--live {
  background: linear-gradient(90deg, color-mix(in srgb, var(--nr-red) 12%, var(--nr-panel)), var(--nr-panel));
  border-left: 5px solid var(--nr-red);
}

.nr-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  color: color-mix(in srgb, var(--nr-muted) 86%, var(--nr-red));
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nr-live-pill,
.nr-post__type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nr-red);
}

.nr-post__title {
  margin: 0;
  color: var(--nr-text);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -.04em;
}

.nr-post__title a,
.nr-radar-lead,
.nr-pulse-item {
  color: inherit;
  text-decoration: none;
}

.nr-post__text {
  margin: 14px 0 0;
  color: color-mix(in srgb, var(--nr-text) 78%, var(--nr-muted));
  font-size: 18px;
  line-height: 1.55;
}

.nr-post__media {
  position: relative;
  display: block;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--nr-line);
  border-radius: 4px;
  background: var(--nr-panel-2);
}

.nr-post__media img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.nr-post__media--video img {
  aspect-ratio: 16 / 9;
}

.nr-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.nr-play span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 17, 20, .64);
  color: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .22);
}

.nr-read-full {
  display: block;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid color-mix(in srgb, var(--nr-red) 46%, var(--nr-line));
  color: var(--nr-text);
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nr-post__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: start;
}

.nr-post__thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.25 / 1;
  border-radius: 4px;
  border: 1px solid var(--nr-line);
  background: var(--nr-panel-2);
}

.nr-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nr-post__thumb--fallback {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--nr-text);
  text-decoration: none;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--nr-red) 16%, transparent), transparent 44%),
    linear-gradient(180deg, var(--nr-panel), var(--nr-panel-2));
}

.nr-post__thumb--fallback::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  bottom: 14px;
  width: 10px;
  background: linear-gradient(180deg, var(--nr-red), transparent);
}

.nr-post__thumb--fallback strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(28px, 5vw, 44px);
  font-style: italic;
  letter-spacing: -.05em;
}

.nr-post__thumb-kicker {
  position: absolute;
  left: 32px;
  bottom: 14px;
  right: 14px;
  overflow: hidden;
  color: var(--nr-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.nr-post__actions {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  margin-top: 18px;
}

.nr-post__actions a,
.nr-post__actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--nr-muted) 78%, var(--nr-red));
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.nr-post__actions .material-symbols-outlined {
  font-size: 20px;
}

.nr-live-strip {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.nr-live-strip a {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--nr-red) 22%, var(--nr-line));
  background: color-mix(in srgb, var(--nr-panel) 84%, var(--nr-red-soft));
  color: inherit;
  text-decoration: none;
}

.nr-live-strip time {
  color: var(--nr-red);
  font-weight: 900;
}

.nr-side-card {
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--nr-line) 76%, var(--nr-red));
  background: var(--nr-panel);
  box-shadow: var(--nr-shadow);
}

.nr-side-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--nr-line);
}

.nr-side-card__head h3 {
  margin: 0;
}

.nr-side-card__head a {
  color: var(--nr-red);
  font-weight: 900;
  text-decoration: none;
}

.nr-radar-lead,
.nr-pulse-item {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-bottom: 1px solid var(--nr-line);
}

.nr-radar-lead span,
.nr-pulse-item span {
  color: var(--nr-red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nr-radar-lead strong,
.nr-pulse-item strong {
  line-height: 1.25;
}

/* Live page and individual node: strong social-thread rhythm. */
.template-live .canvas.live-shell {
  width: min(100%, 1240px);
  background: transparent !important;
}

.template-live .live-feed {
  max-width: 760px !important;
  margin: 0 auto !important;
}

.template-live .live-feed__header {
  border: 1px solid var(--nr-line) !important;
  border-radius: 0 !important;
  background: var(--nr-panel) !important;
  box-shadow: var(--nr-shadow);
}

.template-live .live-feed__title,
.template-live .live-update__title,
.template-article .article-header h1 {
  font-family: var(--font-display) !important;
  letter-spacing: -.045em;
}

.template-live .live-update__content {
  background: var(--nr-panel) !important;
  border: 1px solid var(--nr-line) !important;
  border-radius: 5px !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .04);
}

.template-live .live-update {
  background: transparent !important;
}

.template-live .live-update + .live-update {
  margin-top: 26px !important;
  padding-top: 0 !important;
}

.template-live .live-update::after {
  display: none !important;
}

.template-live .live-update__body,
.template-live .live-update__body p {
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px;
  line-height: 1.68;
}

.template-live .live-update__media,
.template-live .live-update__image,
.template-live .live-update__video {
  max-width: 100%;
  border-radius: 5px;
}

/* Article page: premium light-mode foundation from the mocks. */
.template-article .canvas {
  max-width: 1180px;
}

.template-article .article {
  gap: 42px;
}

.template-article .article__main {
  max-width: 760px;
}

.template-article .article-header h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: .98;
}

.template-article .lede {
  color: color-mix(in srgb, var(--nr-text) 68%, var(--nr-muted));
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.35;
}

.template-article .article-figure {
  border: 1px solid var(--nr-line);
  background: var(--nr-panel);
}

.template-article .article-body {
  font-family: "Newsreader", Georgia, serif;
}

/* Search: pre-query is Discover, query state is Search Results. */
.template-searchresults .canvas {
  max-width: 1120px;
}

.template-searchresults .radar-head,
.template-searchresults .ranked-list__item,
.template-searchresults .vector-box {
  background: var(--nr-panel) !important;
  border-color: var(--nr-line) !important;
}

.template-searchresults .radar-head__eyebrow {
  color: var(--nr-red) !important;
  font-family: var(--font-display);
}

/* Newsroom OS: social publishing inbox instead of database table vibes. */
.ops-body {
  font-family: var(--font-display, "Space Grotesk", "Inter", ui-sans-serif) !important;
}

.ops-panel,
.ops-classic-card {
  border-radius: 6px !important;
}

.ops-table tr {
  min-height: 72px;
}

.ops-table td a {
  font-weight: 800;
}

@media (max-width: 1180px) {
  .nr-social-home {
    grid-template-columns: minmax(0, 1fr);
    border: 0;
  }

  .nr-social-rail {
    display: none;
  }

  .nr-feed {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .template-homepage .ticker {
    display: none !important;
  }

  .nr-post,
  .nr-composer-card {
    padding: 20px 16px;
  }

  .nr-post__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .nr-post__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .nr-post__title {
    font-size: clamp(22px, 7vw, 32px);
  }

  .nr-post__text {
    font-size: 17px;
  }

  .nr-composer-card {
    display: none;
  }

  .nr-post__actions {
    justify-content: space-between;
  }

  .template-homepage .nr-social-home,
  .template-live .canvas.live-shell,
  .template-searchresults .canvas {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  .template-live .live-update__content {
    border-radius: 16px !important;
  }
}

/* Reels should behave like an immersive video surface, not a normal article page. */
.template-reels .site-footer,
.template-reels .briefs,
.template-reels .live-rail,
.template-reels .rail--global {
  display: none !important;
}

.template-reels .site-main {
  padding: 0 !important;
}

.template-reels .topbar {
  background: #08080a !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.template-reels .topbar__brand,
.template-reels .topbar__nav-link,
.template-reels .topbar__search-trigger,
.template-reels .theme-toggle {
  color: #fff !important;
}

.template-reels .reels-header {
  top: 0 !important;
  color: #fff !important;
  background: #08080a !important;
}

.template-reels .reels-header__title,
.template-reels .reels-header__back {
  color: #fff !important;
}

.template-reels .reels-feed,
.template-reels .reels-feed__item {
  height: calc(100dvh - var(--topbar-h, 64px) - 56px) !important;
}

.template-reels .reels-feed__play svg {
  width: 48px !important;
  height: 48px !important;
  color: rgba(255, 255, 255, 0.72) !important;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45)) !important;
}

.template-reels .reels-feed__embed {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background: #111;
}

.template-reels .reels-feed__embed .story-card {
  width: 100%;
  height: 100%;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: grid;
  place-items: center;
}

.template-reels .reels-feed__embed .story-card__head,
.template-reels .reels-feed__embed .story-card__provider,
.template-reels .reels-feed__embed .story-card__body {
  display: none !important;
}

.template-reels .reels-feed__embed .story-card__embed,
.template-reels .reels-feed__embed .video-embed {
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
}

.template-reels .reels-feed__embed iframe,
.template-reels .reels-feed__embed video {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  object-fit: cover !important;
  background: #000 !important;
}

.template-reels .reels-feed__embed blockquote {
  max-width: min(92%, 430px) !important;
  margin: 0 auto !important;
}

.template-reels .reels-feed__play--subtle {
  opacity: .2 !important;
}

.template-reels .reels-feed__item:hover .reels-feed__play--subtle,
.template-reels .reels-feed__item:focus-within .reels-feed__play--subtle {
  opacity: .72 !important;
}

.template-videodetail .video-watch-shell {
  margin: 26px 0;
  border: 1px solid var(--nr-line);
  background: #08080a;
}

.template-videodetail .video-watch-shell > .story-card {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.template-videodetail .video-watch-shell .story-card__embed,
.template-videodetail .video-watch-shell .video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.template-videodetail .video-watch-shell iframe,
.template-videodetail .video-watch-shell video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 720px) {
  .template-reels .reels-feed,
  .template-reels .reels-feed__item {
    height: calc(100dvh - var(--topbar-h, 56px) - 56px - 64px - env(safe-area-inset-bottom)) !important;
  }

  .template-reels .reels-feed__rail {
    bottom: 112px !important;
  }
}
