/* ════════════════════════════════════════════════
   shared.css — common styles across all pages
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=DM+Mono:wght@400;500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0c0c0e;
  --surface:  #141418;
  --surface2: #1a1a20;
  --border:   #242428;
  --accent:   #3dffc0;
  --accent2:  #ff6b6b;
  --text:     #e8e8f0;
  --muted:    #5a5a72;
  --mono:     'DM Mono', monospace;
  --sans:     'DM Sans', sans-serif;
  --display:  'Syne', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); min-height: 100vh;
  overflow-x: hidden; line-height: 1.6;
}

body::before {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: .5;
}

/* ── HEADER ───────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(12,12,14,.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 60px; gap: 1rem;
}

.logo-wrap {
  font-family: var(--display);
  font-size: 1rem; font-weight: 800;
  letter-spacing: -.02em;
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--text);
  white-space: nowrap; flex-shrink: 0;
}

.logo-icon {
  width: 26px; height: 26px;
  background: var(--accent); border-radius: 7px;
  display: grid; place-items: center; flex-shrink: 0;
}
.logo-icon svg { width: 15px; height: 15px; fill: #0c0c0e; }

/* ── HAMBURGER BUTTON (mobile only) ──────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 4px; flex-shrink: 0; z-index: 300;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .3s, opacity .3s, width .3s;
  transform-origin: center;
}
/* X state */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── NAV — desktop inline ─────────────────────────── */
.site-nav {
  display: flex; align-items: center; gap: .25rem; flex-wrap: nowrap;
}
.site-nav a {
  font-family: var(--mono); font-size: .68rem;
  color: #ffffff; text-decoration: none;
  padding: 5px 10px; border-radius: 6px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--accent); background: rgba(61,255,192,.07);
}

/* ── MOBILE NAV DROPDOWN ──────────────────────────── */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(12,12,14,.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    gap: 0; padding: .5rem 1rem .75rem;
    z-index: 199;
    /* Hidden by default */
    max-height: 0; overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1),
                padding .35s cubic-bezier(.4,0,.2,1);
    padding-top: 0; padding-bottom: 0;
  }

  .site-nav.open {
    max-height: 420px;
    padding-top: .5rem; padding-bottom: .75rem;
  }

  .site-nav a {
    padding: 10px 12px;
    font-size: .78rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    display: block;
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a:hover, .site-nav a.active {
    background: rgba(61,255,192,.07);
    color: var(--accent);
    border-radius: 8px;
  }
}

/* ── CLOCK ────────────────────────────────────────── */
.header-clock {
  font-family: var(--mono); font-size: .68rem;
  color: var(--accent);
  background: rgba(61,255,192,.07);
  border: 1px solid rgba(61,255,192,.15);
  border-radius: 6px; padding: 4px 9px;
  white-space: nowrap; flex-shrink: 0;
}

/* ── LAYOUT ───────────────────────────────────── */
.page-wrap {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

.page-wrap.wide { max-width: 900px; }

/* ── CARDS ────────────────────────────────────── */
.msg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.4rem 1.6rem;
  position: relative;
  animation: slideIn .4s cubic-bezier(.22,1,.36,1) both;
  transition: border-color .2s, transform .2s;
}
.msg-card:hover {
  border-color: rgba(61,255,192,.25);
  transform: translateY(-2px);
}
.msg-card.is-new::after {
  content: 'NEW';
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--mono); font-size: .58rem;
  letter-spacing: .1em; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px;
  padding: 2px 6px; animation: fadeOutBadge 5s forwards;
}
@keyframes fadeOutBadge { 0%,70%{opacity:1} 100%{opacity:0} }

.msg-meta {
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: .85rem; flex-wrap: wrap;
}
.channel-chip {
  font-family: var(--mono); font-size: .65rem;
  color: var(--accent);
  background: rgba(61,255,192,.08);
  border: 1px solid rgba(61,255,192,.2);
  border-radius: 6px; padding: 2px 8px;
}
.msg-time {
  font-family: var(--mono); font-size: .65rem;
  color: var(--muted); margin-left: auto;
}
.msg-text {
  font-size: .93rem; font-weight: 300;
  line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.msg-image {
  width: 100%; max-height: 360px; object-fit: cover;
  border-radius: 10px; margin-top: 1rem; display: block;
}
.video-thumb-wrap {
  position: relative; margin-top: 1rem;
  border-radius: 10px; overflow: hidden; background: #1a1a22;
}
.video-thumb-wrap img { width:100%; max-height:260px; object-fit:cover; display:block; }
.play-badge { position:absolute; inset:0; display:grid; place-items:center; }
.play-badge span {
  width:48px; height:48px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px); border-radius:50%;
  display:grid; place-items:center; font-size:1.2rem;
}
.video-label { font-family:var(--mono); font-size:.68rem; color:var(--muted); margin-top:.5rem; }


/* ── SKELETON ─────────────────────────────────── */
.skeleton-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:1.4rem 1.6rem; }
.sk { background:var(--border); border-radius:6px; animation:shimmer 1.4s infinite; }
.sk-chip { width:100px; height:16px; margin-bottom:1rem; }
.sk-line { height:13px; margin-bottom:.55rem; }
.sk-line.w80 { width:80%; } .sk-line.w60 { width:60%; }
@keyframes shimmer { 0%{opacity:.5} 50%{opacity:1} 100%{opacity:.5} }

/* ── STATUS ───────────────────────────────────── */
.dot { width:7px; height:7px; border-radius:50%; background:var(--muted); transition:background .3s; display:inline-block; }
.dot.live  { background:var(--accent);  box-shadow:0 0 8px var(--accent);  animation:pulse 2s infinite; }
.dot.error { background:var(--accent2); box-shadow:0 0 8px var(--accent2); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.state-box { text-align:center; padding:4rem 1rem; color:var(--muted); font-family:var(--mono); font-size:.82rem; }
.state-box .icon { font-size:2.5rem; margin-bottom:1rem; }

.warning-bar {
  background:rgba(255,107,107,.08); border:1px solid rgba(255,107,107,.2);
  border-radius:10px; padding:.7rem 1rem;
  font-family:var(--mono); font-size:.7rem; color:var(--accent2);
  margin-bottom:1rem; display:none;
}

/* ── STATS ROW ────────────────────────────────── */
.stats-row { display:flex; gap:.75rem; margin-bottom:1.75rem; flex-wrap:wrap; }
.stat-chip {
  font-family:var(--mono); font-size:.68rem; color:var(--muted);
  background:var(--surface); border:1px solid var(--border);
  border-radius:8px; padding:5px 11px;
  display:flex; align-items:center; gap:.4rem;
}
.stat-chip strong { color:var(--text); }

/* ── SUBSCRIBE LINK ───────────────────────────────────── */
.card-subscribe {
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 10; /* ensure links are above any card overlays on desktop */
}
.card-subscribe a {
  color: var(--accent);
  text-decoration: none;
  letter-spacing: .02em;
  transition: opacity .2s;
  cursor: pointer;
  position: relative;
  z-index: 10;
}
.card-subscribe a:hover { opacity: .7; text-decoration: underline; }
.card-sub-sep { color: var(--border); }
.card-disclosure-link { color: var(--muted) !important; font-size: .65rem; }

/* Warning bar — hidden via CSS as hard backstop (JS also hides it) */
.warning-bar { display: none !important; }

/* ── PROSE (policy pages) ─────────────────────── */
.prose h1 {
  font-family:var(--display); font-size:clamp(1.8rem,4vw,2.6rem);
  font-weight:800; letter-spacing:-.04em; line-height:1.1;
  margin-bottom:.75rem;
}
.prose h1 span { color:var(--accent); }
.prose h2 {
  font-family:var(--display); font-size:1.15rem; font-weight:700;
  margin: 2rem 0 .6rem; color:var(--text);
}
.prose p { font-size:.92rem; font-weight:300; color:#b0b0c0; margin-bottom:1rem; line-height:1.75; }
.prose ul { margin: .5rem 0 1rem 1.4rem; }
.prose ul li { font-size:.92rem; font-weight:300; color:#b0b0c0; margin-bottom:.4rem; line-height:1.65; }
.prose a { color:var(--accent); text-decoration:none; }
.prose a:hover { text-decoration:underline; }
.prose .updated {
  font-family:var(--mono); font-size:.68rem; color:var(--muted);
  margin-bottom:2rem; display:block;
}
.prose .policy-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; padding:1.4rem 1.6rem; margin-bottom:1.5rem;
}

/* ── FOOTER ───────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}
.site-footer p {
  font-family: var(--mono); font-size: .68rem;
  color: var(--muted); line-height: 1.8;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links {
  display: flex; justify-content: center;
  flex-wrap: wrap; gap: .5rem 1.2rem;
  margin-bottom: .75rem;
}

/* ── ANIMATIONS ───────────────────────────────── */
@keyframes slideIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }

::-webkit-scrollbar { width:4px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:4px; }
