/* ============================================================
   Syndication page — 3D orbit, hash stack, feed scheduler
============================================================ */

:root {
  --syn: #4F6CC9;        /* deep periwinkle for syndication */
  --syn-tint: color-mix(in srgb, #4F6CC9 14%, transparent);
}

.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-links a.active::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink);
  margin-left: 6px;
  vertical-align: middle;
}

/* shared subnav */
.subnav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 65px;
  z-index: 40;
}
.subnav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px var(--pad-x);
  overflow-x: auto;
}
.subnav-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.subnav-inner a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
  padding: 4px 0;
}
.subnav-inner a:hover { color: var(--ink); }
.subnav-inner a.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}

.kicker.syn { background: var(--syn-tint); border-color: rgba(79,108,201,0.35); color: #8FA3EA; }
.kicker .dot.syn { background: var(--syn); box-shadow: 0 0 0 3px rgba(79,108,201,0.22); }
.hero-syn .display { font-size: clamp(56px, 9vw, 116px); line-height: 0.94; }

/* ============================================================
   3D ORBIT STAGE
============================================================ */
.orbit-stage {
  position: relative;
  margin: clamp(56px, 7vw, 92px) auto 0;
  max-width: 1180px;
  height: clamp(540px, 60vw, 680px);
  background: radial-gradient(ellipse at 50% 50%, var(--bg-soft) 0%, var(--bg) 60%, var(--bg-alt) 100%);
  border-radius: 28px;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.orbit-bg { position: absolute; inset: 0; pointer-events: none; }
.orbit-grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(79,108,201,0.06), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(217,119,87,0.05), transparent 55%);
  filter: blur(0.4px);
  opacity: 0.9;
}
.orbit-grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(var(--ink-rgb),0.018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(var(--ink-rgb),0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.5;
}
.orbit-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 380px; height: 380px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(79,108,201,0.22), transparent 65%);
  filter: blur(40px);
  animation: glowPulse 5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 0.6; }
}

.orbit-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

/* ---- CORE (3D cube) ---- */
.orbit-core {
  position: relative;
  width: 130px;
  height: 130px;
  transform-style: preserve-3d;
  animation: coreSpin 16s linear infinite;
  filter: drop-shadow(0 20px 60px rgba(79,108,201,0.30));
}
@keyframes coreSpin {
  from { transform: rotateY(-22deg) rotateX(-14deg); }
  to   { transform: rotateY(338deg) rotateX(-14deg); }
}
.oc-face {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #2A2A26 0%, #1A1A17 100%);
  border: 1px solid rgba(255,255,255,0.10);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.92);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.oc-face.oc-top { transform: translateZ(65px); }
.oc-face.oc-bot { transform: rotateY(180deg) translateZ(65px); }
.oc-face.oc-l   { transform: rotateY(-90deg) translateZ(65px); background: linear-gradient(135deg, #1A1A17 0%, #0E0E0C 100%); }
.oc-face.oc-r   { transform: rotateY( 90deg) translateZ(65px); background: linear-gradient(135deg, #1A1A17 0%, #0E0E0C 100%); }
.oc-face.oc-f   { transform: rotateX( 90deg) translateZ(65px); background: linear-gradient(135deg, #3A3A35 0%, #2A2A26 100%); }
.oc-face.oc-b   { transform: rotateX(-90deg) translateZ(65px); background: linear-gradient(135deg, #2A2A26 0%, #1A1A17 100%); }
.oc-face .oc-mark { display: grid; place-items: center; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.oc-face .oc-label { font-size: 9px; letter-spacing: 0.18em; color: rgba(255,255,255,0.5); }

/* ---- ORBIT RING with 6 channel cards ---- */
.orbit-ring {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  animation: ringSpin 28s linear infinite;
}
@keyframes ringSpin {
  from { transform: rotateX(64deg) rotateZ(0deg); }
  to   { transform: rotateX(64deg) rotateZ(360deg); }
}

.orbit-card {
  position: absolute;
  width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  transform-style: preserve-3d;
  /* counter-rotate so the cards always face the camera */
  --counter: rotateX(-64deg) rotateZ(0deg);
}
.orbit-card .oc-bar {
  position: absolute;
  left: 14px; right: 14px; bottom: 8px;
  height: 2px;
  background: rgba(var(--ink-rgb),0.08);
  border-radius: 1px;
  overflow: hidden;
}
.orbit-card .oc-bar > span {
  display: block; height: 100%;
  background: var(--syn);
}

/* Position each card around the ring and counter-rotate */
.r-shop { transform: rotateZ(0deg)   translateX(280px) var(--counter) rotateZ(0deg); }
.r-bol  { transform: rotateZ(60deg)  translateX(280px) var(--counter) rotateZ(-60deg); }
.r-amzn { transform: rotateZ(120deg) translateX(280px) var(--counter) rotateZ(-120deg); }
.r-goog { transform: rotateZ(180deg) translateX(280px) var(--counter) rotateZ(-180deg); }
.r-feed { transform: rotateZ(240deg) translateX(280px) var(--counter) rotateZ(-240deg); }
.r-b2b  { transform: rotateZ(300deg) translateX(280px) var(--counter) rotateZ(-300deg); }

.oc-chip {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.oc-chip .ch-logo { width: 28px; height: 28px; font-size: 14px; border-radius: 7px; }
.oc-meta { display: flex; flex-direction: column; line-height: 1.25; }
.oc-meta b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.015em; }
.oc-meta .muted { font-size: 11px; }

/* ---- particles drifting toward core ---- */
.orbit-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.op {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--syn);
  box-shadow: 0 0 12px var(--syn);
  opacity: 0;
}
.op.p1 { left: 14%; top: 32%; animation: drift 4.0s ease-in-out 0.1s infinite; }
.op.p2 { left: 86%; top: 28%; animation: drift 4.0s ease-in-out 0.7s infinite reverse; }
.op.p3 { left: 10%; top: 72%; animation: drift 4.0s ease-in-out 1.4s infinite; }
.op.p4 { left: 88%; top: 70%; animation: drift 4.0s ease-in-out 2.1s infinite reverse; }
.op.p5 { left: 50%; top: 12%; animation: drift 4.0s ease-in-out 2.8s infinite; }
.op.p6 { left: 50%; top: 88%; animation: drift 4.0s ease-in-out 3.4s infinite; }
@keyframes drift {
  0%   { opacity: 0; transform: scale(0.4); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(50vw / 12 * (50% - var(--left,50%))), 0) scale(0.4); }
}
/* simpler: dots travel toward middle */
.op.p1 { animation: driftIn 4s ease-in-out infinite; --tx: 220px; --ty: 80px; }
.op.p2 { animation: driftIn 4s ease-in-out 0.6s infinite; --tx: -220px; --ty: 80px; }
.op.p3 { animation: driftIn 4s ease-in-out 1.2s infinite; --tx: 220px; --ty: -80px; }
.op.p4 { animation: driftIn 4s ease-in-out 1.8s infinite; --tx: -220px; --ty: -80px; }
.op.p5 { animation: driftIn 4s ease-in-out 2.4s infinite; --tx: 0;     --ty: 180px; }
.op.p6 { animation: driftIn 4s ease-in-out 3.0s infinite; --tx: 0;     --ty: -180px; }
@keyframes driftIn {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.3); }
}

/* status caption */
.orbit-status {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.os-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ok);
  box-shadow: var(--shadow-sm);
}
.os-pill i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(29,122,58,0.18);
  animation: pulse 1.4s ease-in-out infinite;
}
.os-meta { font-size: 12.5px; color: var(--muted); }

@media (max-width: 720px) {
  .orbit-stage { height: 540px; }
  .r-shop { transform: rotateZ(0deg)   translateX(190px) var(--counter) rotateZ(0deg); }
  .r-bol  { transform: rotateZ(60deg)  translateX(190px) var(--counter) rotateZ(-60deg); }
  .r-amzn { transform: rotateZ(120deg) translateX(190px) var(--counter) rotateZ(-120deg); }
  .r-goog { transform: rotateZ(180deg) translateX(190px) var(--counter) rotateZ(-180deg); }
  .r-feed { transform: rotateZ(240deg) translateX(190px) var(--counter) rotateZ(-240deg); }
  .r-b2b  { transform: rotateZ(300deg) translateX(190px) var(--counter) rotateZ(-300deg); }
  .orbit-card { width: 170px; padding: 10px 12px; }
}

/* ============================================================
   STAT STRIP
============================================================ */
.syn-trust { padding: 50px 0 30px; }
.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 4vw, 60px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px){ .trust-stats { grid-template-columns: 1fr 1fr; gap: 30px; } }
.ts { display: flex; flex-direction: column; gap: 6px; }
.ts b {
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1;
}
.ts span { font-size: 13.5px; color: var(--muted); }

/* ============================================================
   HASH STACK (3D layered cards)
============================================================ */
.hash-stack {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 360px;
  perspective: 900px;
  transform-style: preserve-3d;
}
.hs-card {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform-style: preserve-3d;
}
.hs-c1 {
  transform: rotateY(-12deg) rotateX(2deg) translate3d(0, 0, 40px);
  z-index: 3;
}
.hs-c2 {
  transform: rotateY(-12deg) rotateX(2deg) translate3d(20px, 18px, 0);
  z-index: 2;
  opacity: 0.85;
}
.hs-c3 {
  transform: rotateY(-12deg) rotateX(2deg) translate3d(40px, 36px, -40px);
  z-index: 1;
  opacity: 0.65;
}
.hash-stack .hs-card { animation: hsFloat 6s ease-in-out infinite; }
.hash-stack .hs-c2 { animation-delay: 0.6s; }
.hash-stack .hs-c3 { animation-delay: 1.2s; }
@keyframes hsFloat {
  0%, 100% { transform: rotateY(-12deg) rotateX(2deg) translate3d(0, 0, 40px); }
  50%      { transform: rotateY(-12deg) rotateX(2deg) translate3d(0, -6px, 40px); }
}
.hash-stack .hs-c2 { animation-name: hsFloat2; }
.hash-stack .hs-c3 { animation-name: hsFloat3; }
@keyframes hsFloat2 {
  0%, 100% { transform: rotateY(-12deg) rotateX(2deg) translate3d(20px, 18px, 0); }
  50%      { transform: rotateY(-12deg) rotateX(2deg) translate3d(20px, 12px, 0); }
}
@keyframes hsFloat3 {
  0%, 100% { transform: rotateY(-12deg) rotateX(2deg) translate3d(40px, 36px, -40px); }
  50%      { transform: rotateY(-12deg) rotateX(2deg) translate3d(40px, 30px, -40px); }
}

.hs-mono {
  font-size: 10.5px !important;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.hs-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed var(--line);
}
.hs-row:last-child { border-bottom: none; }
.hs-row.dim { color: var(--muted); }
.hs-row.dim b { color: var(--ink-mid); font-weight: 500; }
.hs-row.push { background: rgba(217,119,87,0.06); margin: 0 -8px; padding: 6px 8px; border-radius: 5px; }
.hs-row b { font-weight: 500; font-family: var(--f-mono); font-size: 11.5px; }
.hs-tag {
  font-family: var(--f-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(var(--ink-rgb),0.06);
  color: var(--muted);
}
.hs-tag.eq { background: rgba(var(--ink-rgb),0.04); color: var(--muted); }
.hs-tag.push { background: var(--ai, #D97757); color: #fff; }
.hs-tag.now { background: rgba(110,210,122,0.15); color: var(--ok); }

@media (max-width: 720px){
  .hash-stack { max-width: 320px; height: 320px; margin: 0 auto; }
}

/* ============================================================
   CHANNELS GRID (re-uses ch-card pattern)
============================================================ */
.ch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ch-grid .feature {
  grid-column: span 2;
}
@media (max-width: 980px){
  .ch-grid { grid-template-columns: 1fr 1fr; }
  .ch-grid .feature { grid-column: span 2; }
}
@media (max-width: 580px){
  .ch-grid { grid-template-columns: 1fr; }
  .ch-grid .feature { grid-column: span 1; }
}

.ch-card { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 12px; }
.ch-head { display: flex; align-items: center; gap: 12px; }
.ch-head h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.018em; }
.ch-head .muted { font-size: 12.5px; }
.ml-auto { margin-left: auto; }

.ch-feats {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-mid);
}
.ch-feats li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.ch-feats li:last-child { border-bottom: none; }
.ch-desc { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.ch-link {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ch-link:hover { text-decoration: underline; }

/* ============================================================
   FEED SCHEDULER (dark, with texture)
============================================================ */
.sched-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  position: relative;
}
.sched-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 6px);
  pointer-events: none;
}
.sc-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--line-light);
  position: relative;
}
.sc-name {
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.85);
}
.sc-conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #6ED27A;
}
.sc-conn i {
  width: 7px; height: 7px;
  background: #6ED27A;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(110,210,122,0.20);
  animation: pulse 1.4s ease-in-out infinite;
}

.sc-row {
  display: grid;
  grid-template-columns: 110px 1.4fr 1.4fr auto;
  gap: 14px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.sc-row:last-child { border-bottom: none; }
.sc-row.warn { background: rgba(180,122,18,0.06); }
.sc-row.dim { color: rgba(255,255,255,0.45); border-style: dashed; }
.sc-time { color: rgba(255,255,255,0.65); }
.sc-feed { display: inline-flex; align-items: center; gap: 8px; }
.sc-tgt { color: rgba(255,255,255,0.55); }

@media (max-width: 720px){
  .sc-row { grid-template-columns: 1fr auto; gap: 6px; padding: 10px 14px; }
  .sc-row .sc-tgt { display: none; }
}

/* ============================================================
   REAL-TIME WS STREAM
============================================================ */
.ws-card { padding: 0; overflow: hidden; }
.ws-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.ws-name { font-size: 12.5px; color: var(--ink); }
.ws-conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ok);
}
.ws-conn i {
  width: 7px; height: 7px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(29,122,58,0.18);
  animation: pulse 1.4s ease-in-out infinite;
}
.ws-rows {
  max-height: 280px;
  overflow-y: auto;
}
.ws-row {
  display: grid;
  grid-template-columns: 80px 130px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--line);
}
.ws-row:last-child { border-bottom: none; }
.ws-t { color: var(--muted); font-size: 11px; }
.ws-typ {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(var(--ink-rgb),0.06);
  color: var(--ink-mid);
  text-align: center;
}
.ws-typ.ok { background: rgba(29,122,58,0.10); color: var(--ok); }
.ws-row .cd { display: inline-block; vertical-align: middle; margin-right: 8px; }
.ws-foot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.ws-foot > div { display: flex; flex-direction: column; gap: 2px; }
.ws-foot b {
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.022em;
  line-height: 1;
}
.ws-foot span span { font-size: 11.5px; color: var(--muted); }

@media (max-width: 720px){
  .ws-row { grid-template-columns: auto 1fr; }
  .ws-row .ws-t { display: none; }
}

/* light tick variant */
.tick.light li { color: rgba(255,255,255,0.78); }
.tick.light li::before { background: var(--bg-card); }
.tick.light li::after { border-color: var(--ink); }

.foot-cols a.on { color: #fff; }

/* ── White mode (html[data-theme="light"]) overrides ── */
html[data-theme="light"] {
  --syn-tint: #E9EDF8;
}
html[data-theme="light"] .kicker.syn {
  border-color: rgba(79,108,201,0.18);
  color: #20307A;
}
html[data-theme="light"] .orbit-card { box-shadow: 0 10px 30px -10px rgba(var(--ink-rgb),0.25); }
