/*
 * TRUSTPROS × STORK WIRE | Visual theme v1
 *
 * This stylesheet is injected only into HTML pages served under /news
 * by netlify/edge-functions/trustpros-news-theme.js.
 * No Stork articles, metadata, images, feeds, or routes are replaced.
 *
 * Matches the palette in /assets/styles.css.
 */
:root {
  color-scheme: dark;
  --tp-news-bg: #020705;
  --tp-news-surface: #071810;
  --tp-news-surface-raised: #0a2015;
  --tp-news-line: rgba(108,255,139,.20);
  --tp-news-text: #f7fff9;
  --tp-news-muted: #a6b8aa;
  --tp-news-green: #62ff85;
  --tp-news-green-light: #b8ffc7;
  --tp-news-gold: #f4d35e;
  --bg: #020705;
  --bg2: #05110b;
  --panel: #071810;
  --panel2: #0a2015;
  --text: #f7fff9;
  --muted: #a6b8aa;
  --green: #62ff85;
  --gold: #f4d35e;
  --background: #020705;
  --foreground: #f7fff9;
  --primary: #62ff85;
  --border: rgba(108,255,139,.20);
}

html { background: var(--tp-news-bg) !important; }
body {
  color: var(--tp-news-text) !important;
  background: radial-gradient(circle at 80% 7%, rgba(57,255,102,.12), transparent 25%),
              radial-gradient(circle at 14% 58%, rgba(57,255,102,.05), transparent 28%),
              linear-gradient(180deg,#010503 0%,#031009 54%,#04130c 100%) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.65;
}
:is(main, [role="main"]) { background: transparent !important; color: var(--tp-news-text) !important; }
body :is(h1,h2,h3,h4,h5,h6) {
  color: var(--tp-news-text) !important;
  line-height: 1.2;
  letter-spacing: -.035em;
}
body :is(p,li,dd,dt,small,figcaption,time) { color: #b9cabe; }
body :is(strong,b) { color: var(--tp-news-text); }
body a { color: var(--tp-news-green) !important; text-underline-offset: 3px; }
body a:hover { color: var(--tp-news-green-light) !important; }
body :is(a,button,input,select,textarea):focus-visible {
  outline: 2px solid var(--tp-news-gold) !important;
  outline-offset: 3px;
}
body :is(header,footer) {
  background: rgba(2,7,5,.94) !important;
  color: var(--tp-news-text) !important;
  border-color: var(--tp-news-line) !important;
}
body header nav { background: transparent !important; }
body :is(header,footer,nav) a { color: #e1f0e5 !important; }
body :is(header,footer,nav) a:hover { color: var(--tp-news-green) !important; }
body :is(article,.article-card,.news-card,.story-card,.post-card,.card) {
  color: var(--tp-news-text) !important;
  border-color: var(--tp-news-line) !important;
}
body :is(.article-card,.news-card,.story-card,.post-card,.card),
body :is(main,section) > article {
  background: linear-gradient(180deg,rgba(9,28,18,.97),rgba(5,16,11,.99)) !important;
  border: 1px solid var(--tp-news-line);
  border-radius: 20px;
  box-shadow: 0 20px 54px rgba(0,0,0,.24);
}
body :is(.article-card,.news-card,.story-card,.post-card,.card) :is(h2,h3) a,
body article :is(h1,h2,h3) a { color: var(--tp-news-text) !important; }
body article :is(h1,h2,h3) a:hover { color: var(--tp-news-green) !important; }
body :is(.tag,.chip,.category,.badge,.pill) {
  background: rgba(98,255,133,.08) !important;
  border-color: rgba(98,255,133,.25) !important;
  color: var(--tp-news-green-light) !important;
}
body :is(button[type="submit"],a[role="button"],.button-primary,.btn-primary) {
  color: #031409 !important;
  background: linear-gradient(135deg,#b8ffc7,#20d85b) !important;
  border-color: transparent !important;
  border-radius: 999px;
}
body :is(blockquote,pre) {
  background: rgba(98,255,133,.055) !important;
  color: #e3f4e8 !important;
  border-color: var(--tp-news-line) !important;
  border-radius: 12px;
}
body blockquote { border-left: 3px solid var(--tp-news-gold) !important; padding: 16px 20px; }
body :is(code,kbd) { color: var(--tp-news-gold) !important; }
body :is(input,select,textarea) {
  background: #071810 !important;
  color: #f7fff9 !important;
  border: 1px solid rgba(108,255,139,.28) !important;
}
body ::placeholder { color: #92a89b !important; }
body :is(hr,table,th,td) { border-color: var(--tp-news-line) !important; }
body th { color: var(--tp-news-green-light) !important; }
body :is(img,video,iframe,svg) { max-width: 100%; }

/* Override common light-background and dark-text utility classes when Stork uses them. */
body :is([class~="bg-white"],[class~="bg-gray-50"],[class~="bg-gray-100"],
         [class~="bg-slate-50"],[class~="bg-slate-100"],[class~="bg-zinc-50"],
         [class~="bg-neutral-50"],[class~="bg-stone-50"]) {
  background-color: var(--tp-news-surface) !important;
  background-image: none !important;
}
body :is([class~="text-black"],[class~="text-gray-900"],[class~="text-gray-800"],
         [class~="text-slate-900"],[class~="text-slate-800"],
         [class~="text-zinc-900"],[class~="text-neutral-900"]) {
  color: var(--tp-news-text) !important;
}
body :is([class~="text-gray-500"],[class~="text-gray-600"],[class~="text-gray-700"],
         [class~="text-slate-500"],[class~="text-slate-600"],[class~="text-slate-700"]) {
  color: var(--tp-news-muted) !important;
}
body :is([class~="border-gray-100"],[class~="border-gray-200"],
         [class~="border-slate-100"],[class~="border-slate-200"]) {
  border-color: var(--tp-news-line) !important;
}

@media (max-width: 640px) {
  body { overflow-wrap: break-word; }
  body :is(h1,h2,h3) { letter-spacing: -.025em; }
  body :is(.article-card,.news-card,.story-card,.post-card,.card) {
    border-radius: 16px;
  }
}
