/* TGWYD — custom layer on top of Tailwind CDN */

* { -webkit-font-smoothing: antialiased; }

/* Selection */
::selection { background: #5FAA00; color: #000; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #5FAA00; border: 2px solid #0A0A0A; }
::-webkit-scrollbar-thumb:hover { background: #E60000; }

/* Halftone newspaper texture overlay */
.halftone {
  background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.03) 1px, transparent 1.5px);
  background-size: 4px 4px;
}

/* CRT scanlines */
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.3) 3px, rgba(0,0,0,0.3) 4px);
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Glitch effect */
.glitch {
  position: relative;
  text-shadow: 0 0 0 transparent;
}
.glitch:hover {
  animation: glitch-anim 0.4s infinite;
}
@keyframes glitch-anim {
  0%   { text-shadow: 2px 0 #E60000, -2px 0 #5FAA00; transform: translate(0); }
  20%  { text-shadow: -2px 0 #E60000, 2px 0 #5FAA00; transform: translate(-1px, 1px); }
  40%  { text-shadow: 2px 0 #5FAA00, -2px 0 #E60000; transform: translate(1px, -1px); }
  60%  { text-shadow: 0 2px #E60000, 0 -2px #5FAA00; transform: translate(0); }
  100% { text-shadow: 2px 0 #E60000, -2px 0 #5FAA00; transform: translate(0); }
}

/* Redacted bar */
.redacted {
  background: #000;
  color: transparent;
  padding: 0 0.4em;
  user-select: none;
  transition: all .25s;
  cursor: help;
}
.redacted:hover { color: #F5F5F5; background: rgba(0,0,0,0.4); user-select: auto; }

/* Classified stamp */
.stamp {
  display: inline-block;
  padding: 4px 14px;
  border: 3px double #E60000;
  color: #E60000;
  font-family: 'Special Elite', monospace;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transform: rotate(-4deg);
  font-weight: 700;
}

/* Tabloid hero headlines */
.tabloid-h1 {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* Topic filter chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #5FAA00;
  background: transparent;
  color: #5FAA00;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all .15s;
  border-radius: 0;
}
.chip:hover { background: #5FAA00; color: #000; }
.chip.active { background: #5FAA00; color: #000; }
.chip[data-cat="False Flags"] { border-color: #E60000; color: #E60000; }
.chip[data-cat="False Flags"].active,
.chip[data-cat="False Flags"]:hover { background: #E60000; color: #fff; }

/* Card lift */
.story-card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.story-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #5FAA00; border-color: #5FAA00 !important; }

/* Backtop visibility */
#backTop.visible { display: flex !important; }

/* Prose tweaks for post body */
.prose-tgwyd { color: #E5E5E5; line-height: 1.8; font-size: 1.05rem; }
.prose-tgwyd p { margin: 1.2em 0; }
.prose-tgwyd h2, .prose-tgwyd h3 { font-family: 'Anton', sans-serif; text-transform: uppercase; color: #F5F5F5; margin: 1.5em 0 0.5em; letter-spacing: -0.01em; }
.prose-tgwyd h2 { font-size: 2rem; border-bottom: 2px solid #5FAA00; padding-bottom: .3em; }
.prose-tgwyd h3 { font-size: 1.4rem; color: #5FAA00; }
.prose-tgwyd a { color: #5FAA00; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose-tgwyd a:hover { color: #E60000; }
.prose-tgwyd strong { color: #fff; background: linear-gradient(180deg, transparent 65%, rgba(95,170,0,0.3) 65%); }
.prose-tgwyd em { color: #D4C4A8; }
.prose-tgwyd blockquote { border-left: 4px solid #E60000; padding: 1em 1.5em; background: rgba(230,0,0,0.06); margin: 2em 0; font-family: 'Special Elite', monospace; }
.prose-tgwyd ul { padding-left: 1.5em; list-style: none; }
.prose-tgwyd ul li { position: relative; margin: 0.6em 0; padding-left: 1.5em; }
.prose-tgwyd ul li::before { content: '▸'; position: absolute; left: 0; color: #5FAA00; }
.prose-tgwyd code { background: #111; color: #5FAA00; padding: 2px 6px; font-family: 'Space Mono', monospace; font-size: 0.9em; border: 1px solid #2A2A2A; }

/* Marquee for breaking */
.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-block;
  animation: marquee 60s linear infinite;
  padding-left: 100%;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* TinyMCE dark for admin */
.tox.tox-tinymce { border-color: #2A2A2A !important; }

/* No isotope flash */
.grid-isotope > * { opacity: 0; }
.grid-isotope.is-ready > * { opacity: 1; transition: opacity .3s; }

/* Utility */
.sharp { border-radius: 0 !important; }
