/* ==========================================================================
   Tronify.rent Threat Intelligence Report — shared site design system
   ========================================================================== */

:root {
  --navy-950: #0a0f1e;
  --navy-900: #0f1729;
  --navy-800: #16213a;
  --navy-700: #1e2d4d;
  --navy-100: #2a3550;
  --ink: #e8ecf5;
  --ink-soft: #a9b5cc;
  --muted: #7a8398;
  --border: #2a3550;
  --surface: #1a2240;
  --page-bg: #0f1728;

  --red-700: #ff6b6b;
  --red-600: #ff5252;
  --red-50: #1f0a0a;

  --amber-600: #ffa500;
  --amber-50: #1a1500;

  --green-700: #51cf66;
  --green-50: #0a1a0a;

  --blue-700: #4fa3f5;
  --blue-50: #0a1428;

  --purple-700: #9775fa;
  --purple-50: #1a0f33;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", "Courier New", monospace;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; width: 100%; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}
img, svg { max-width: 100%; }
::selection { background: var(--blue-50); color: var(--blue-700); }
:focus-visible { outline: 2px solid var(--blue-700); outline-offset: 2px; }

.site-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  min-height: 64px;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--red-600), #7f1d1d);
  font-size: 15px;
  flex-shrink: 0;
}
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: 0.2px; }
.brand-text span { display: block; font-size: 10px; color: #93a1c2; font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0px;
  flex-wrap: nowrap;
  margin-left: auto;
}
.site-nav a {
  color: #c4cde3;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.site-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a.nav-evidence {
  background: var(--red-600);
  color: #fff;
  margin-left: 6px;
}
.site-nav a.nav-evidence:hover { background: #ef2f2f; }

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 7px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 880px) {
  .site-header-inner { justify-content: flex-start; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    order: -1;
    margin-left: 0;
  }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-md);
    margin-left: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .site-nav a.nav-evidence { margin-left: 0; text-align: center; }
}

/* ---------- Verification / status strip ---------- */
.status-strip {
  background: var(--navy-800);
  color: #b9c3de;
  font-size: 12.5px;
  text-align: center;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.status-strip strong { color: #fff; }
.status-strip .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--blue-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Pager (prev/next between reports) ---------- */
.site-pager {
  max-width: 1180px;
  margin: 32px auto 0;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.site-pager a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.site-pager a:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.site-pager .pager-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.site-pager .pager-title { font-size: 15px; font-weight: 700; }
.site-pager .pager-next { text-align: right; }
.site-pager .pager-spacer { visibility: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: #8d97b3;
  margin-top: 0;
}
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  line-height: 1.7;
}
.site-footer h4 { color: #fff; font-size: 13px; margin-bottom: 10px; letter-spacing: 0.3px; }
.site-footer a { color: #b9c3de; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer-col { min-width: 200px; }
.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 16px 24px;
  font-size: 12px;
  color: #6b7593;
}
.site-footer-bottom strong { color: #98a3c2; }

/* ---------- Reusable badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.2px; }
.badge-critical { background: var(--red-50); color: var(--red-700); }
.badge-warning { background: var(--amber-50); color: var(--amber-600); }
.badge-ok { background: var(--green-50); color: var(--green-700); }
.badge-info { background: var(--blue-50); color: var(--blue-700); }
.badge-verified { background: var(--green-50); color: var(--green-700); }
.badge-live { background: var(--red-50); color: var(--red-700); }

/* ---------- Copy-to-clipboard buttons for IoC/code blocks ---------- */
.copyable { position: relative; overflow-wrap: break-word; word-break: break-all; }
.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.12);
  color: #cbd3e8;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.copy-btn.copied { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* ---------- Evidence browser (evidence/index.html) ---------- */
.ev-section {
  background: #252d3f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 28px;
  margin-bottom: 22px;
}
.ev-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 6px;
}
.ev-section > p.ev-desc { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }
.ev-files { display: grid; gap: 12px; }
.ev-file {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,2fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #232d40;
}
.ev-file-name { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink); word-break: break-all; }
.ev-file-meta { font-size: 12.5px; color: var(--muted); }
.ev-file-meta code { font-size: 11px; background: #2a3550; padding: 1px 5px; border-radius: 4px; }
.ev-file-actions { display: flex; gap: 8px; white-space: nowrap; }
.ev-btn {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--ink);
  background: #2a3550;
}
.ev-btn:hover { background: #3a4560; }
.ev-btn.primary { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.ev-btn.primary:hover { background: var(--navy-800); }

@media (max-width: 720px) {
  .ev-file { grid-template-columns: 1fr; }
  .ev-file-actions { flex-wrap: wrap; }
}

.hash-line {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--navy-950);
  color: #9ae6a8;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.hash-line::-webkit-scrollbar { height: 8px; }
.hash-line::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }

/* ==========================================================================
   Report content system — shared by 01–06 (each page keeps only the
   handful of classes that are genuinely unique to it)
   ========================================================================== */

.container {
  max-width: 1180px;
  margin: 28px auto 40px;
  padding: 40px 48px 48px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 15.5px;
  line-height: 1.7;
}

.container h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 4px 0 14px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--red-600);
  color: var(--red-700);
}
.container h1 + h2 { margin-top: 0; }
.container h2 {
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 32px 0 12px;
  color: var(--blue-700);
}
.container h3 { font-size: 16px; font-weight: 700; margin: 20px 0 10px; color: var(--ink); }
.container h4 { font-size: 14.5px; font-weight: 700; margin: 14px 0 8px; color: var(--ink); }
.container p { margin: 10px 0; color: var(--ink-soft); overflow-wrap: break-word; }
.container ul, .container ol { margin: 8px 0 8px 22px; }
.container li { margin: 7px 0; color: var(--ink-soft); overflow-wrap: break-word; }
.container td { overflow-wrap: break-word; }
.container li strong, .container p strong, .container td strong { color: var(--ink); }
.container code { background: var(--navy-100); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; color: var(--ink); }

/* Tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(15,23,41,0.15); border-radius: 4px; }
.container table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-scroll table { margin: 0; }
.container th, .container td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.container th {
  background: var(--page-bg);
  font-weight: 700;
  color: var(--ink);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.container tr:last-child td { border-bottom: none; }
.container tbody tr:hover td { background: #252d3f; }

/* Code / diagram / evidence blocks */
.code-block, .evidence, .ioc {
  background: var(--navy-950);
  color: #d4dced;
  padding: 16px 18px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  border-left: 3px solid var(--blue-700);
}
.code-block::-webkit-scrollbar, .evidence::-webkit-scrollbar, .ioc::-webkit-scrollbar, .diagram::-webkit-scrollbar { height: 8px; }
.code-block::-webkit-scrollbar-thumb, .evidence::-webkit-scrollbar-thumb, .ioc::-webkit-scrollbar-thumb, .diagram::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 4px; }
.evidence { border-left-color: var(--purple-700); }
.ioc { border-left-color: var(--amber-600); word-break: break-all; }

/* Diagrams (ASCII architecture art) — kept unwrapped so box-drawing stays aligned */
.diagram {
  background: var(--navy-950);
  color: #c9d6f0;
  padding: 18px 20px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-left: 3px solid var(--navy-700);
}

/* Callout boxes — grouped by semantic color, reused across pages under
   whichever class name that page already uses for it */
.alert, .alert-box, .danger,
.flow, .step, .step-box,
.evidence, .component, .system-action, .detection-query,
.function, .success,
.warning, .user-action, .ioc {
  padding: 16px 18px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  overflow-wrap: break-word;
}
.alert, .alert-box, .danger { border-color: var(--red-600); background: var(--red-50); color: #ff8080; }
.alert strong, .alert-box strong, .danger strong { color: var(--red-700); }
.alert a, .alert-box a, .danger a { color: #ff9999; text-decoration: underline; }
.flow, .step, .step-box { border-color: var(--blue-700); background: var(--blue-50); color: #7ab8ff; }
.flow a, .step a, .step-box a { color: #9eceff; text-decoration: underline; }
.evidence, .component, .system-action, .detection-query { border-color: var(--purple-700); background: var(--purple-50); color: #b8a8ff; }
.evidence a, .component a, .system-action a, .detection-query a { color: #d4c4ff; text-decoration: underline; }
.function, .success { border-color: var(--green-700); background: var(--green-50); color: #7cff80; }
.function a, .success a { color: #9eff9a; text-decoration: underline; }
.warning, .user-action, .ioc { border-color: var(--amber-600); background: var(--amber-50); color: #ffb84d; }
.warning a, .user-action a, .ioc a { color: #ffd099; text-decoration: underline; }
.user-action { font-weight: 700; }

.file-link { color: var(--blue-700); text-decoration: none; font-weight: 700; }
.file-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .container { margin: 0; padding: 28px 20px 36px; border-radius: 0; box-shadow: none; }
}
@media (max-width: 480px) {
  .container { padding: 22px 16px 32px; font-size: 15px; }
  .container th, .container td { padding: 9px 11px; font-size: 12.5px; }
  .table-scroll table { min-width: 540px; }
  .code-block, .evidence, .ioc, .diagram { font-size: 11.5px; padding: 13px 14px; }
}

/* ---------- Homepage hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 15% -10%, #24345c 0%, transparent 60%), linear-gradient(180deg, var(--navy-950), var(--navy-900) 70%);
  color: #fff;
  padding: 56px 0 60px;
}
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #ff8080;
  background: rgba(220,38,38,0.15);
  border: 1px solid rgba(220,38,38,0.35);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.5px; }
.hero p.lede { font-size: 16.5px; color: #b9c3de; max-width: 680px; line-height: 1.65; margin-bottom: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 8px; }
.hero-stat .num { font-size: 24px; font-weight: 800; color: #fff; }
.hero-stat .lbl { font-size: 12.5px; color: #93a1c2; margin-top: 2px; max-width: 160px; }

.home-section { max-width: 1180px; margin: 0 auto; padding: 48px 24px; }
.home-section h2 { font-size: 22px; margin-bottom: 6px; }
.home-section > p.section-lede { color: var(--muted); margin-bottom: 24px; font-size: 14.5px; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.report-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #4fa3f5; }
.report-card .rc-num { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.4px; }
.report-card h3 { font-size: 16.5px; margin: 0; color: var(--ink); }
.report-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.report-card .rc-meta { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; gap: 12px; }

.report-card.evidence-card {
  border-color: #4a2a2a;
  background: linear-gradient(180deg, #2a1818, #1a1010);
}

/* ---------- Cross-page mobile refinements ---------- */
@media (max-width: 600px) {
  .site-pager { grid-template-columns: 1fr; gap: 10px; }
  .site-pager .pager-next { text-align: left; }
  .site-pager .pager-spacer { display: none; }
  .hero { padding: 40px 0 36px; }
  .hero-stats { gap: 18px 24px; }
  .hero-stat .num { font-size: 20px; }
  .home-section { padding: 36px 20px; }
  .home-section h2 { font-size: 19px; }
  .ev-section { padding: 20px 18px; }
}
@media (max-width: 480px) {
  .site-header-inner, .site-shell, .breadcrumb, .site-pager, .site-footer-inner, .hero-inner, .home-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand-text span { display: none; }
  .status-strip { font-size: 11px; padding: 6px 12px; }
  .status-strip br { display: none; }
}
