/* uig.me/detections. Terminal theme shared by uig.me, lab, honeypot and detections: keep the tokens and the
   "shared chrome" block identical across the four sites. */


:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #16201f;
  --muted: #3d4a48;
  --dim: #55625f;
  --border: #c5d2d0;
  --border-strong: #8a9a97;
  --accent: #0b5d56;
  --accent-2: #0b5f8a;
  --warn: #985600;
  --danger: #b42318;
  --ok: #157a3d;
  --chip: #f2f6f5;
  --code-bg: #f2f6f5;
  --shadow: 0 6px 18px rgba(31, 35, 40, 0.08);
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --prose: var(--font);
  /* code, commands, numbers and data stay monospace */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

/* ---------------------------------------------------------------- shared chrome */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
}

::selection { background: #cbe8e3; color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* the sticky header must not cover in-page anchor targets */
[id] { scroll-margin-top: 72px; }

.site-header {
  border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.94);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { font-weight: 700; color: var(--text); white-space: nowrap; }
.crumb { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.section { color: var(--muted); font-weight: 600; }
.section::before { content: "/ "; content: "/ " / ""; color: var(--dim); font-weight: 400; }
.section:hover { color: var(--accent); text-decoration: none; }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-header nav a { color: var(--text); font-size: 15px; font-weight: 500; }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 24px 0; color: var(--dim); font-size: 14px; }
.site-footer .credit { margin: 8px 0 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

h1 { font-size: 1.85rem; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 1.2rem; line-height: 1.35; margin: 40px 0 12px; font-weight: 650; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --shadow: none; }
  body { background: #fff; }
  .site-header { position: static; background: #fff; backdrop-filter: none; }
}

/* site tokens */
:root { --high: #b42318; --medium: #985600; --low: #0b5f8a; }


/* ---------------------------------------------------------------- uig.me/detections */

.wrap { max-width: 960px; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--code-bg); color: var(--accent-2); padding: 1px 5px; border-radius: var(--radius); }

main.wrap { padding-top: 32px; }
.lead { color: var(--muted); max-width: 700px; margin: 0; }
.subnav { margin: 0 0 16px; font-size: 14px; }
.meta { color: var(--dim); font-size: 13px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
p.meta { display: block; margin-top: 8px; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius);
  padding: 12px 18px; min-width: 150px; flex: 1 1 150px; display: flex; flex-direction: column; }
.stat .num { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

.pipeline { padding-left: 0; max-width: 760px; list-style: none; counter-reset: step; }
.pipeline li { margin: 6px 0; padding-left: 2em; position: relative; counter-increment: step; }
.pipeline li::before { content: counter(step) "."; position: absolute; left: 0; color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; }
.table-wrap { overflow-x: auto; }
table.coverage { width: 100%; border-collapse: collapse; font-size: 14px; }
.coverage th, .coverage td { text-align: left; padding: 8px 12px 8px 0; border-top: 1px solid var(--border); vertical-align: top; }
.coverage thead th { border-top: 0; color: var(--accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.coverage tbody th { font-weight: 600; white-space: nowrap; }
.coverage td.tech a { font-size: 13px; white-space: nowrap; }
.coverage .tech-name { display: block; color: var(--muted); font-size: 12px; }

.rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rule { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.rule:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.rule-head a { color: var(--text); }
.rule:hover .rule-head a { color: var(--accent); }
.rule-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-weight: 600; }
.rule p { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }

.chip { font-family: var(--mono); font-size: 12.5px; background: var(--chip); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 6px; color: var(--accent-2); }
.kind { font-size: 12.5px; color: var(--muted); }
.seen { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.seen.none { font-weight: 400; color: var(--muted); text-shadow: none; }
.level { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.level.high, .level.critical { color: var(--high); }
.level.medium { color: var(--medium); }
.level.low { color: var(--low); }

.prose { max-width: 760px; }
/* long-form prose */
.prose p, .prose li { font-family: var(--prose); font-size: 16px; line-height: 1.7; }
.prose h2 { font-size: 1rem; margin: 24px 0 6px; }
pre.code { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); position: relative;
  padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 0; }
pre.code code { background: none; padding: 0; font-size: inherit; color: var(--text); }

@media (max-width: 720px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .site-header { position: static; }
  .site-header nav { gap: 4px 14px; }
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 2px; }
  h1 { font-size: 1.6rem; }
}

main.wrap.notfound { padding-top: 64px; }
