/* OSS Radar — Agency OS Edition */

:root {
  --bg: #0a0e14;
  --panel: #121821;
  --panel-2: #182030;
  --border: #232c3b;
  --text: #e8eef7;
  --muted: #8a95a5;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, .12);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, .13);
  --amber: #fbbf24;
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, .13);
  --code-bg: #070b11;
  --radius: 12px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fc;
    --panel: #ffffff;
    --panel-2: #eef2f8;
    --border: #dde3ec;
    --text: #131820;
    --muted: #5c6878;
    --accent: #0b62d6;
    --accent-soft: rgba(11, 98, 214, .09);
    --green: #12823f;
    --green-soft: rgba(18, 130, 63, .1);
    --amber: #a16207;
    --red: #c4304b;
    --red-soft: rgba(196, 48, 75, .09);
    --code-bg: #f1f4f9;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.15rem 5rem; }

/* ---------- header ---------- */
header.site {
  padding: 2.6rem 0 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 58%);
}

header.site .mark {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
  padding: .22rem .5rem; margin-bottom: .9rem;
  border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent-soft);
}

header.site h1 {
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  margin: 0 0 .5rem;
  letter-spacing: -.025em; line-height: 1.15;
}

header.site .sub { color: var(--muted); font-size: .88rem; }
header.site .sub .dot { opacity: .4; margin: 0 .45rem; }

/* ---------- article ---------- */
article h1 { display: none; }          /* date lives in the header instead */
article h2 {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 2.8rem 0 .9rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
article h3 { font-size: .98rem; margin: 1.7rem 0 .6rem; }
article p { margin: 0 0 1rem; }
article ul, article ol { margin: 0 0 1.1rem; padding-left: 1.35rem; }
article li { margin-bottom: .45rem; }
article strong { font-weight: 650; }
article hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(88,166,255,.28); }
article a:hover { border-bottom-color: var(--accent); }

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em; background: var(--code-bg); color: var(--amber);
  padding: .12em .4em; border-radius: 5px; border: 1px solid var(--border);
}
article pre {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  overflow-x: auto; margin: 0 0 1.3rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
article pre code {
  background: none; border: none; padding: 0; font-size: .84rem; color: var(--text); line-height: 1.6;
}
article pre code .kw, article pre code .fu { color: var(--accent); }
article pre code .st { color: var(--green); }
article pre code .cm { color: var(--muted); }

article table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.4rem;
  font-size: .86rem; display: block; overflow-x: auto;
}
article th, article td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: left; vertical-align: top; }
article th { background: var(--panel-2); font-weight: 600; }
article tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }

/* ---------- headlines ---------- */
ul.headlines { list-style: none; padding: 0; margin: 0 0 .5rem; }
ul.headlines li {
  position: relative; padding: .85rem 1rem .85rem 1.1rem; margin-bottom: .6rem;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .95rem; line-height: 1.55;
}
ul.headlines li::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 3px; background: var(--accent);
}
ul.headlines li:nth-child(2)::before { background: var(--green); }
ul.headlines li:nth-child(3)::before { background: var(--amber); }

/* ---------- discoveries ---------- */
ol.discoveries { list-style: none; counter-reset: d; padding: 0; margin: 0; }
ol.discoveries > li {
  counter-increment: d; position: relative;
  padding: 1rem 1.05rem 1rem 3.1rem; margin-bottom: .7rem;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s ease, transform .15s ease;
}
ol.discoveries > li:hover { border-color: var(--accent); transform: translateX(2px); }
ol.discoveries > li::before {
  content: counter(d);
  position: absolute; left: 1.05rem; top: 1.05rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .74rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent);
}

/* ---------- callout (Test today) ---------- */
.callout {
  position: relative; margin: .4rem 0 1.8rem; padding: 1.1rem 1.2rem 1.2rem;
  background: linear-gradient(180deg, var(--green-soft) 0%, transparent 70%), var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.callout h2 { margin: 0 0 .5rem; border: none; color: var(--green); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- badges ---------- */
.badge {
  display: inline-block; font-size: .66rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
  padding: .18rem .5rem; border-radius: 999px; border: 1px solid;
  vertical-align: .08em;
}
.badge.test-now   { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.badge.investigate{ color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.badge.skip       { color: var(--red); border-color: var(--red); background: var(--red-soft); }

/* ---------- sources ---------- */
ol.sources { list-style: none; counter-reset: s; padding: 0; font-size: .86rem; }
ol.sources > li {
  counter-increment: s; position: relative; padding-left: 1.7rem; margin-bottom: .5rem;
  color: var(--muted);
}
ol.sources > li::before {
  content: counter(s); position: absolute; left: 0; top: .05rem;
  font-size: .7rem; color: var(--muted); font-weight: 700;
}

/* ---------- archive ---------- */
nav.archive { margin-top: 3.2rem; border-top: 1px solid var(--border); padding-top: 1.6rem; }
nav.archive h2 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin: 0 0 .9rem; padding: 0; border: none;
}
nav.archive ul { list-style: none; padding: 0; margin: 0; }
nav.archive a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem .85rem; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: .45rem;
  transition: border-color .15s ease, background .15s ease;
}
nav.archive a:hover { border-color: var(--accent); background: var(--panel-2); text-decoration: none; }
nav.archive a.current { border-color: var(--accent); background: var(--accent-soft); }
nav.archive .date { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; }
nav.archive .verdict { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
nav.archive a.current .verdict { color: var(--accent); }

/* ---------- footer ---------- */
footer.site {
  margin-top: 3.2rem; padding-top: 1.3rem; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .78rem;
}
footer.site p { margin: 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 .95rem 4rem; }
  header.site { padding: 2rem 0 1.2rem; margin-bottom: 1.5rem; }
  ol.discoveries > li { padding: .9rem .9rem .9rem 2.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ol.discoveries > li, nav.archive a { transition: none; }
}
