/* ==========================================================================
   Sigma Watch — cyberpunk design system
   Fonts: Chakra Petch (display) / Rajdhani (UI) / JetBrains Mono (data).
   Loaded in base.html. If the font request fails, the fallback stacks below
   keep the layout intact — condensed sans for UI, monospace for all IDs.
   ========================================================================== */

:root {
  /* --- surfaces --- */
  --bg: #05060d;
  --bg-deep: #03040a;
  --panel: rgba(13, 17, 32, 0.82);
  --panel-solid: #0d1120;
  --panel-raised: rgba(20, 26, 46, 0.9);
  --grid-line: rgba(0, 240, 255, 0.045);

  /* --- borders --- */
  --edge: rgba(0, 240, 255, 0.16);
  --edge-strong: rgba(0, 240, 255, 0.4);
  --edge-muted: rgba(120, 140, 190, 0.14);

  /* --- text --- */
  --text: #d9e6f5;
  --text-dim: #8fa3c4;
  --text-faint: #5d6e91;

  /* --- neon accents --- */
  --cyan: #00f0ff;
  --magenta: #ff2d9b;
  --violet: #a45cff;
  --lime: #6bff8f;
  --amber: #ffb340;
  --red: #ff3b5c;

  /* --- per-source identity --- */
  --sigma: #00f0ff;
  --elastic: #ffb340;
  --splunk: #6bff8f;
  --yara: #ff2fd0;
  --sentinel: #3fa9ff;
  --snort: #ff6a3d;
  --suricata: #b26bff;

  /* --- per-malware-type identity --- */
  --rat: #ff9d3d;
  --ransomware: #ff3b5c;
  --infostealer: #c96bff;

  /* --- severity --- */
  --crit: #ff2d5f;
  --high: #ff7a3d;
  --med: #ffd23d;
  --low: #4db8ff;
  --none: #6c7ba0;

  --display: "Chakra Petch", "Segoe UI Semibold", "Arial Narrow", sans-serif;
  --sans: "Rajdhani", "Segoe UI", "Roboto Condensed", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Radial gradient wash + faint grid, fixed behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 240, 255, 0.13), transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(255, 45, 155, 0.08), transparent 65%),
    radial-gradient(ellipse 70% 60% at 10% 80%, rgba(164, 92, 255, 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

/* Scanline overlay. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(0, 240, 255, 0.025) 0px,
    rgba(0, 240, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
}

a { color: var(--cyan); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #7ff7ff; text-decoration: none; }

code, .mono, .cve-id, .technique-id { font-family: var(--mono); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ==========================================================================
   Donation bar — plain link, no third-party widget script.
   ========================================================================== */

.support-bar {
  background: linear-gradient(90deg, rgba(255, 45, 155, 0.16), rgba(164, 92, 255, 0.14), rgba(0, 240, 255, 0.12));
  border-bottom: 1px solid rgba(255, 45, 155, 0.35);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.support-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 22px;
  flex-wrap: wrap;
  text-align: center;
}

.support-bar strong { color: #fff; font-family: var(--display); }
.support-bar span { color: var(--text-dim); }

.support-bar a.coffee {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffd9ec;
  border: 1px solid var(--magenta);
  border-radius: 3px;
  padding: 4px 13px;
  background: rgba(255, 45, 155, 0.16);
  box-shadow: 0 0 14px rgba(255, 45, 155, 0.28);
  white-space: nowrap;
}

.support-bar a.coffee:hover {
  background: var(--magenta);
  color: #14020c;
  box-shadow: 0 0 22px rgba(255, 45, 155, 0.55);
}

/* Bigger in-page support block (bottom of landing page). */
.support-block {
  position: relative;
  border: 1px solid rgba(255, 45, 155, 0.3);
  background: linear-gradient(135deg, rgba(255, 45, 155, 0.09), rgba(13, 17, 32, 0.9));
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.support-block h2 { margin: 0 0 6px; font-size: 20px; color: #fff; }
.support-block h2::before { display: none; }

.support-block .btn-secondary {
  border-color: var(--magenta);
  color: #ffb8dc;
  background: rgba(255, 45, 155, 0.12);
  padding: 13px 22px;
  font-size: 13px;
}

.support-block .btn-secondary:hover {
  background: rgba(255, 45, 155, 0.24);
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 45, 155, 0.4);
}
.support-block p { margin: 0; color: var(--text-dim); max-width: 620px; font-size: 15px; }

/* ==========================================================================
   Header / nav
   ========================================================================== */

header.site {
  border-bottom: 1px solid var(--edge);
  background: rgba(5, 6, 13, 0.85);
  backdrop-filter: blur(9px);
  position: sticky;
  top: 0;
  z-index: 40;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.brand:hover { color: #fff; }

.brand .glyph {
  width: 13px;
  height: 13px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan), inset 0 0 6px rgba(0, 240, 255, 0.5);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--cyan), inset 0 0 6px rgba(0, 240, 255, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 3px var(--cyan), inset 0 0 2px rgba(0, 240, 255, 0.3); }
}

.brand .watch { color: var(--cyan); text-shadow: 0 0 16px rgba(0, 240, 255, 0.6); }

nav.main { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

nav.main a {
  font-family: var(--display);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
}

nav.main a:hover { color: var(--cyan); border-color: var(--edge); background: rgba(0, 240, 255, 0.06); }

nav.main a.active {
  color: var(--cyan);
  border-color: var(--edge-strong);
  background: rgba(0, 240, 255, 0.09);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.15) inset;
}

nav.main a.nav-coffee { color: var(--magenta); }
nav.main a.nav-coffee:hover { color: #ff7ec0; border-color: rgba(255, 45, 155, 0.5); background: rgba(255, 45, 155, 0.1); }

/* ==========================================================================
   Layout / typography
   ========================================================================== */

main { padding: 52px 0 70px; min-height: 60vh; }

h1 {
  font-size: 34px;
  margin: 0 0 10px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h1 .hl { color: var(--cyan); text-shadow: 0 0 22px rgba(0, 240, 255, 0.45); }

h2 {
  font-size: 19px;
  margin: 0 0 16px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 11px;
}

h2::before {
  content: "";
  width: 3px;
  height: 17px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

h3 { font-size: 16px; margin: 0 0 8px; color: #fff; letter-spacing: 0.04em; }

p.lede { color: var(--text-dim); margin: 0 0 30px; max-width: 730px; font-size: 17px; }

section { margin-bottom: 46px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
  display: block;
  opacity: 0.85;
}

/* ==========================================================================
   Corner-bracket panel — the core card component
   ========================================================================== */

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  padding: 20px 22px;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--cyan);
  border-style: solid;
  pointer-events: none;
}

.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.panel.magenta::before, .panel.magenta::after { border-color: var(--magenta); }

/* ==========================================================================
   Search
   ========================================================================== */

.hero {
  position: relative;
  border: 1px solid var(--edge);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(13, 17, 32, 0.85) 45%, rgba(164, 92, 255, 0.07));
  padding: 38px 34px 32px;
  margin-bottom: 40px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--cyan);
  border-style: solid;
}

.hero::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hero::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

form.search-box { display: flex; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; }

form.search-box input[type="text"] {
  flex: 1;
  min-width: 260px;
  background: rgba(3, 4, 10, 0.9);
  border: 1px solid var(--edge-strong);
  color: var(--text);
  border-radius: 2px;
  padding: 15px 17px;
  font-size: 15px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

form.search-box input[type="text"]::placeholder { color: var(--text-faint); }

form.search-box input[type="text"]:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 24px rgba(0, 240, 255, 0.28);
}

button, input[type="submit"] {
  font-family: var(--display);
  background: var(--cyan);
  color: #04121a;
  border: none;
  border-radius: 2px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  transition: box-shadow 0.15s ease, transform 0.05s ease;
}

button:hover { box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }
button:active { transform: translateY(1px); }

.btn-secondary {
  display: inline-block;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid var(--edge-strong);
  color: var(--cyan);
  border-radius: 2px;
  padding: 10px 17px;
}

.btn-secondary:hover { background: rgba(0, 240, 255, 0.16); color: #9ffaff; }

.hint { color: var(--text-faint); font-size: 14px; margin-top: 10px; font-family: var(--mono); }
.hint a { color: var(--cyan); }

/* ==========================================================================
   Stat cards
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge-muted);
  border-left: 2px solid var(--cyan);
  padding: 18px 20px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.stat-card:hover { border-color: var(--edge-strong); border-left-color: var(--cyan); background: var(--panel-raised); }

.stat-card .n {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  font-family: var(--mono);
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
}

.stat-card .label {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--display);
  font-weight: 600;
}

.stat-card.warn { border-left-color: var(--red); }
.stat-card.warn .n { color: #ff6f88; text-shadow: 0 0 18px rgba(255, 59, 92, 0.45); }
.stat-card.warn:hover { border-color: rgba(255, 59, 92, 0.4); }

.stat-card.src-sigma { border-left-color: var(--sigma); }
.stat-card.src-elastic { border-left-color: var(--elastic); }
.stat-card.src-elastic .n { text-shadow: 0 0 18px rgba(255, 179, 64, 0.3); }
.stat-card.src-splunk { border-left-color: var(--splunk); }
.stat-card.src-splunk .n { text-shadow: 0 0 18px rgba(107, 255, 143, 0.3); }
.stat-card.src-yara { border-left-color: var(--yara); }
.stat-card.src-yara .n { text-shadow: 0 0 18px rgba(255, 47, 208, 0.3); }
.stat-card.src-sentinel { border-left-color: var(--sentinel); }
.stat-card.src-sentinel .n { text-shadow: 0 0 18px rgba(63, 169, 255, 0.3); }
.stat-card.src-snort { border-left-color: var(--snort); }
.stat-card.src-snort .n { text-shadow: 0 0 18px rgba(255, 106, 61, 0.3); }
.stat-card.src-suricata { border-left-color: var(--suricata); }
.stat-card.src-suricata .n { text-shadow: 0 0 18px rgba(178, 107, 255, 0.3); }

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-sigma { background: rgba(0, 240, 255, 0.12); color: var(--sigma); border-color: rgba(0, 240, 255, 0.4); }
.badge-elastic { background: rgba(255, 179, 64, 0.12); color: var(--elastic); border-color: rgba(255, 179, 64, 0.4); }
.badge-splunk { background: rgba(107, 255, 143, 0.12); color: var(--splunk); border-color: rgba(107, 255, 143, 0.4); }
.badge-yara { background: rgba(255, 47, 208, 0.12); color: var(--yara); border-color: rgba(255, 47, 208, 0.4); }
.badge-sentinel { background: rgba(63, 169, 255, 0.12); color: var(--sentinel); border-color: rgba(63, 169, 255, 0.4); }
.badge-snort { background: rgba(255, 106, 61, 0.12); color: var(--snort); border-color: rgba(255, 106, 61, 0.4); }
.badge-suricata { background: rgba(178, 107, 255, 0.12); color: var(--suricata); border-color: rgba(178, 107, 255, 0.4); }

.badge-rat { background: rgba(255, 157, 61, 0.12); color: var(--rat); border-color: rgba(255, 157, 61, 0.4); }
.badge-ransomware { background: rgba(255, 59, 92, 0.14); color: var(--ransomware); border-color: rgba(255, 59, 92, 0.45); }
.badge-infostealer { background: rgba(201, 107, 255, 0.12); color: var(--infostealer); border-color: rgba(201, 107, 255, 0.4); }

/* NVD reports severity as CRITICAL/HIGH/MEDIUM/LOW; the badge macro lowercases
   it into the class name, so `badge-critical` is the one that actually gets
   emitted. `badge-crit` is kept as an alias for any hand-written usage. */
.badge-critical,
.badge-crit { background: rgba(255, 45, 95, 0.14); color: var(--crit); border-color: rgba(255, 45, 95, 0.45); }
.badge-high { background: rgba(255, 122, 61, 0.14); color: var(--high); border-color: rgba(255, 122, 61, 0.45); }
.badge-medium { background: rgba(255, 210, 61, 0.13); color: var(--med); border-color: rgba(255, 210, 61, 0.4); }
.badge-low { background: rgba(77, 184, 255, 0.13); color: var(--low); border-color: rgba(77, 184, 255, 0.4); }
.badge-none { background: rgba(108, 123, 160, 0.14); color: var(--text-dim); border-color: rgba(108, 123, 160, 0.3); }

.badge-kev {
  background: rgba(255, 45, 95, 0.16);
  color: #ff6f88;
  border-color: var(--crit);
  box-shadow: 0 0 12px rgba(255, 45, 95, 0.3);
}

.badge-ok { background: rgba(107, 255, 143, 0.12); color: var(--lime); border-color: rgba(107, 255, 143, 0.45); }

.badge-review {
  background: rgba(255, 179, 64, 0.14);
  color: var(--amber);
  border-color: rgba(255, 179, 64, 0.45);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge-muted);
  overflow-x: auto;
}

.table-card::before,
.table-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--edge-strong);
  border-style: solid;
  pointer-events: none;
  z-index: 1;
}

.table-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.table-card::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

table { width: 100%; border-collapse: collapse; }

th, td { text-align: left; padding: 13px 17px; border-bottom: 1px solid var(--edge-muted); font-size: 14.5px; }

th {
  color: var(--cyan);
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: rgba(0, 240, 255, 0.04);
  border-bottom: 1px solid var(--edge);
}

tbody tr { transition: background 0.12s ease; }
tbody tr:hover td { background: rgba(0, 240, 255, 0.05); }
tbody tr:last-child td { border-bottom: none; }

td.num, th.num { text-align: right; }

.cve-id, .technique-id { font-weight: 600; letter-spacing: 0.02em; }

.empty-state {
  text-align: center;
  padding: 54px 24px;
  color: var(--text-dim);
  border: 1px dashed var(--edge);
  background: rgba(13, 17, 32, 0.5);
}

.empty-state .big {
  font-family: var(--display);
  font-size: 22px;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-state.hit .big { color: var(--lime); text-shadow: 0 0 20px rgba(107, 255, 143, 0.4); }
.empty-state.miss { border-color: rgba(255, 59, 92, 0.35); }
.empty-state.miss .big { color: #ff6f88; text-shadow: 0 0 20px rgba(255, 59, 92, 0.4); }

/* ==========================================================================
   Rule detail page (/rules/<source>/<source_rule_id>)
   ========================================================================== */

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px 28px;
  background: var(--panel);
  border: 1px solid var(--edge-muted);
  padding: 22px 24px;
  margin-bottom: 28px;
}

.meta-grid dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.meta-grid dd { margin: 0; color: var(--text); font-size: 15px; }

.code-block {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--edge-muted);
  border-left: 2px solid var(--cyan);
  padding: 18px 24px 22px;
  margin-bottom: 28px;
  /* Wrapping (below) is the primary defense against overflow - this is
     just a safety net for a token so long even `overflow-wrap: anywhere`
     can't help (e.g. one absurd unbroken run of characters), so the box
     scrolls in place instead of stretching the whole page sideways. */
  max-width: 100%;
  overflow-x: auto;
}

.code-block-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-block-label::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.code-block pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  /* The actual fix: wrap at whitespace like normal text, and only break
     mid-token (a long hex string, an unbroken URL, etc.) when a single
     token genuinely doesn't fit - not the old word-break: break-word,
     which browsers apply inconsistently and which still let some rules
     force a wide horizontal scroll instead of wrapping. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  background: none;
  padding: 0;
}

/* ==========================================================================
   Filter bar
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--edge-muted);
  border-left: 2px solid var(--cyan);
  padding: 15px 20px;
  margin-bottom: 22px;
  font-size: 14px;
}

.filter-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-bar select,
.filter-bar input[type="number"] {
  background: rgba(3, 4, 10, 0.9);
  border: 1px solid var(--edge);
  color: var(--text);
  border-radius: 2px;
  padding: 7px 11px;
  font-size: 14px;
  font-family: var(--mono);
}

.filter-bar select:focus,
.filter-bar input[type="number"]:focus { outline: none; border-color: var(--cyan); }

.filter-bar input[type="checkbox"] { accent-color: var(--magenta); width: 15px; height: 15px; }

.filter-bar button { padding: 9px 18px; font-size: 12px; }

/* ==========================================================================
   Detail pages
   ========================================================================== */

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.detail-header h1 { font-family: var(--mono); font-size: 30px; letter-spacing: 0; }

.badge-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin: 12px 0 24px; }

.description-box {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge-muted);
  border-left: 2px solid var(--violet);
  padding: 20px 24px;
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 15px;
}

.pagination { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }

/* ==========================================================================
   Author / contact card
   ========================================================================== */

.author-card {
  position: relative;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(164, 92, 255, 0.1), rgba(13, 17, 32, 0.9) 55%);
  border: 1px solid rgba(164, 92, 255, 0.28);
  padding: 26px 30px;
}

.author-card::before,
.author-card::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border-color: var(--violet);
  border-style: solid;
}

.author-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.author-card::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.author-card .who { flex: 1; min-width: 260px; }
.author-card .name { font-family: var(--display); font-size: 22px; color: #fff; letter-spacing: 0.04em; margin-bottom: 3px; }
.author-card .role { color: var(--text-dim); font-size: 15px; }

.author-links { display: flex; gap: 10px; flex-wrap: wrap; }

.author-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--edge);
  background: rgba(3, 4, 10, 0.55);
  color: var(--text);
  padding: 10px 15px;
  border-radius: 2px;
}

.author-links a:hover { border-color: var(--violet); color: #d9bfff; background: rgba(164, 92, 255, 0.12); box-shadow: 0 0 16px rgba(164, 92, 255, 0.22); }
.author-links a .tag { color: var(--text-faint); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; }

/* ==========================================================================
   SEO / prose blocks
   ========================================================================== */

.prose { max-width: 820px; }
/* Tables embedded in a prose flow track the prose measure, so an inline
   reference table doesn't blow out to full width mid-argument. */
.table-card.in-prose { max-width: 820px; }
.prose p { color: var(--text-dim); margin: 0 0 16px; font-size: 15.5px; }
.prose p strong, .prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text-faint); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}

.feature-grid .panel h3 { color: var(--cyan); font-family: var(--display); letter-spacing: 0.05em; text-transform: uppercase; font-size: 14px; }
.feature-grid .panel p { color: var(--text-dim); margin: 0; font-size: 14.5px; }

/* ==========================================================================
   Malware tracker (RATs / ransomware / infostealers)
   ========================================================================== */

.malware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.malware-card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-left: 2px solid var(--ransomware);
  padding: 20px 22px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.malware-card:hover {
  border-color: var(--edge-strong);
  background: var(--panel-raised);
  transform: translateY(-2px);
}

.malware-card h3 { color: #fff; font-family: var(--display); font-size: 24px; letter-spacing: 0.02em; margin: 4px 0 8px; }
.malware-card .hint { margin: 0 0 8px; }
.malware-card p { color: var(--text-dim); margin: 0; font-size: 14px; line-height: 1.5; }

.reference-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reference-list li {
  background: var(--panel);
  border: 1px solid var(--edge-muted);
  border-left: 2px solid var(--cyan);
  padding: 12px 16px;
  font-size: 14.5px;
}

.reference-list a { color: var(--cyan); font-weight: 600; }
.reference-list .hint { display: inline; margin: 0 0 0 6px; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site {
  border-top: 1px solid var(--edge);
  color: var(--text-faint);
  font-size: 13.5px;
  padding: 30px 0 46px;
  background: rgba(3, 4, 10, 0.6);
}

footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
footer.site a { color: var(--text-dim); }
footer.site a:hover { color: var(--cyan); }
footer.site .sig { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px) {
  h1 { font-size: 26px; }
  .hero { padding: 26px 20px; }
  .detail-header h1 { font-size: 22px; word-break: break-word; }
  header.site .wrap { padding: 12px 16px; }
  nav.main { gap: 2px; }
  nav.main a { padding: 5px 8px; font-size: 12px; }
  th, td { padding: 11px 12px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand .glyph { animation: none; }
  * { transition: none !important; }
}
