/* REGSCOPE — Registry Artifact Analyzer */
/* H3AD-SEC Design System v2026 */

:root {
  --bg: #080c14;
  --panel: #0d1117;
  --panel-alt: #111827;
  --surface: #18253a;
  --border: #1c2333;
  --border-dim: #121e30;
  --accent: #00d4ff;
  --primary: #00d4ff;
  --primary-dim: rgba(0,212,255,0.08);
  --primary-glow: rgba(0,212,255,0.18);
  --secondary: #58a6ff;
  --accent2: #4d94ff;
  --text: #e6edf3;
  --text-dim: #96b0cc;
  --muted: #6b7280;
  --muted-dim: #3a5470;
  --status-live: #00d4ff;
  --status-partial: #f59e0b;
  --status-soon: #2d3748;
  --nav-h: 48px;
  --mono: 'Share Tech Mono', monospace;
  --sans: 'Exo 2', sans-serif;
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-base: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary, #00d4ff);
  outline-offset: 2px;
  border-radius: 3px;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: var(--fs-base);
  line-height: 1.55;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(0,212,255,0.055) 0%, transparent 100%),
    radial-gradient(ellipse 50% 35% at 5% 100%, rgba(88,166,255,0.04) 0%, transparent 100%);
}

body.light {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-alt: #f1f5f9;
  --surface: #ccd8ec;
  --border: #e2e8f0;
  --border-dim: #c8d8ec;
  --text: #0d1117;
  --text-dim: #142540;
  --muted: #5c6b8a;
  --muted-dim: #5c7a9a;
  --accent: #0284c7;
  --primary-dim: rgba(2,132,199,0.07);
  --secondary: #0ea5e9;
  --accent2: #0ea5e9;
  --status-live: #0284c7;
  --status-partial: #d97706;
}

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center;
  padding: 0 1.25rem; height: var(--nav-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}

.nav-brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; margin-right: 1rem; }
.nav-brand img { height: 22px; }

.xv-nav-pill {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  margin-left: 10px; padding-left: 10px;
  border-left: 1px solid var(--border);
  flex-shrink: 0; white-space: nowrap;
  opacity: 1; transform: none; pointer-events: auto;
}
.xv-pill-name { font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: 4px; line-height: 1; }
.xv-pill-accent { color: var(--accent); }
.xv-pill-text { color: var(--text); }
.xv-pill-tagline { font-family: var(--sans); font-weight: 400; font-size: 8px; color: var(--muted); letter-spacing: 1.5px; }

.nav-links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; overflow: visible;
}
.nav-links a {
  font-family: var(--sans); font-weight: 500; font-size: var(--fs-xs);
  color: var(--text-dim); text-decoration: none; padding: 5px 8px;
  border-radius: 4px; border: 1px solid transparent; white-space: nowrap;
  transition: all .15s;
}
.nav-links a:hover { color: var(--accent); border-color: var(--border); background: var(--primary-dim); }
.nav-links a.nav-current { color: var(--accent); border: 1px solid var(--border); }

.nav-divider { width: 1px; height: 18px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a { white-space: nowrap; }
.nav-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 130px; padding-top: 6px; z-index: 100; }
.nav-dropdown-inner { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.nav-item:hover .nav-dropdown { display: block; }
.nav-links .nav-dropdown a {
  display: block; padding: 7px 12px;
  font-family: var(--sans); font-weight: 500; font-size: var(--fs-xs);
  color: var(--text-dim); border: none;
  border-left: 2px solid transparent; border-radius: 0; transition: .15s;
}
.nav-links .nav-dropdown a:hover, .nav-links .nav-dropdown a.nav-current {
  color: var(--accent); border-left-color: var(--accent); background: var(--primary-dim);
}

.nav-right { margin-left: auto; flex-shrink: 0; padding-left: 1rem; }

.theme-toggle { cursor: pointer; }
.toggle-track { width: 44px; height: 22px; background: var(--border); border-radius: 50px; position: relative; }
.toggle-thumb {
  width: 16px; height: 16px; background: var(--accent);
  border-radius: 50%; position: absolute; top: 3px; left: 3px;
  transition: transform .3s; box-shadow: 0 0 6px var(--accent);
}
body.light .toggle-thumb { transform: translateX(22px); }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  cursor: pointer; padding: 6px; margin-right: 8px; flex-shrink: 0;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--muted); border-radius: 2px; }

/* mobile drawer */
.nav-drawer {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--panel); border-bottom: 1px solid var(--border);
  z-index: 49; padding: .75rem 1.25rem 1rem;
  flex-direction: column; gap: 2px;
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  font-family: var(--sans); font-weight: 500; font-size: var(--fs-sm);
  color: var(--text-dim); text-decoration: none;
  padding: 8px 10px; border-radius: 4px;
  border-left: 2px solid transparent; transition: .15s;
}
.nav-drawer a:hover { color: var(--accent); border-left-color: var(--accent); background: var(--primary-dim); }
.nav-drawer a.nav-current { color: var(--accent); }
.nav-drawer a.drawer-sub { padding-left: 1.8rem !important; font-size: var(--fs-xs) !important; opacity: .8; }

/* ---- HERO ---- */
.rs-hero {
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--border);
  padding: 28px 32px 24px;
  margin-top: var(--nav-h);
}
.hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.hero-left { display: flex; flex-direction: column; gap: 2px; }
.hero-breadcrumb {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: var(--fs-xs);
  color: var(--muted); letter-spacing: 1px; margin-bottom: 6px;
}
.hero-breadcrumb a { color: var(--muted); text-decoration: none; }
.hero-breadcrumb a:hover { color: var(--accent); }
.hero-breadcrumb .hero-current { color: var(--accent); }
.hero-title-row { display: flex; align-items: baseline; gap: 0; line-height: 1; }
.hero-accent { font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: 5px; color: var(--accent); }
.hero-name   { font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: 5px; color: var(--text); }
.hero-tagline { font-family: var(--sans); font-weight: 300; font-size: var(--fs-xs); color: var(--muted); letter-spacing: 2px; margin-top: 4px; }

@keyframes fadeIn { from { opacity:0; transform:translateY(4px) } to { opacity:1; transform:none } }

.hero-stats {
  display: flex; gap: 1px; background: var(--border);
  border: 1px solid var(--border); overflow: hidden;
  flex-shrink: 0;
}
.stat-item {
  background: var(--panel); padding: 12px 20px;
  display: flex; flex-direction: column; gap: 3px; align-items: center;
}
.stat-num { font-family: var(--mono); font-size: 1.2rem; color: var(--accent); }
.stat-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.15em; color: var(--muted); text-transform: uppercase; }

/* ---- MAIN LAYOUT ---- */
.rs-main { position: relative; z-index: 1; padding: 24px 32px 48px; }
.rs-layout {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 340px 1fr; gap: 20px;
  align-items: start;
}

/* ---- INPUT PANEL ---- */
.input-panel {
  background: var(--panel); border: 1px solid var(--border);
  position: relative; overflow: hidden;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
  animation: fadeIn .25s ease;
}
.input-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, transparent);
}
.panel-label {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 2.5px; color: var(--accent); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.input-wrap { position: relative; }
.reg-input {
  width: 100%; padding: 10px 36px 10px 14px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono); font-size: var(--fs-sm);
  outline: none; transition: border-color .15s;
  border-radius: 4px;
}
.reg-input:focus { border-color: var(--accent); }
.reg-input::placeholder { color: var(--muted); }
.clear-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: var(--fs-xs); padding: 4px; transition: color .15s;
}
.clear-btn:hover { color: var(--text); }

.analyze-btn {
  width: 100%; padding: 11px;
  background: var(--accent); color: var(--bg);
  border: 1px solid var(--accent); cursor: pointer;
  font-family: var(--mono); font-size: var(--fs-sm);
  letter-spacing: 1.5px; font-weight: 600;
  transition: opacity .15s, transform .15s;
  border-radius: 4px;
  box-shadow: 0 0 18px rgba(0,212,255,.2);
}
.analyze-btn:hover { opacity: .88; transform: scale(1.01); }
body.light .analyze-btn { color: #fff; }

.tips-block, .hive-ref { display: flex; flex-direction: column; gap: 6px; }
.tips-label {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 2px; color: var(--muted); text-transform: uppercase;
  margin-bottom: 2px;
}
.tip-row { display: flex; align-items: center; }
.tip-mono {
  font-family: var(--mono); font-size: var(--fs-xs);
  color: var(--secondary); background: rgba(88,166,255,0.07);
  padding: 3px 9px; border-radius: 3px; display: inline-block;
  border: 1px solid rgba(88,166,255,0.15);
}
.tips-note { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }

.hive-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.hive-abbr { font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent); }
.hive-full  { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }

/* ---- RESULT PANEL ---- */
.result-panel { min-height: 300px; }

.result-empty {
  border: 1px dashed var(--border);
  padding: 52px 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-icon { font-size: 1.8rem; color: var(--border); }
.empty-text { font-size: var(--fs-sm); color: var(--muted); }
.empty-sub { font-size: var(--fs-xs); color: var(--muted); opacity: 0.7; max-width: 360px; line-height: 1.6; }

.hidden { display: none !important; }

.result-card {
  background: var(--panel); border: 1px solid var(--border);
  position: relative; overflow: hidden;
  animation: fadeIn .25s ease;
}
.result-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--secondary) 80%, transparent);
}

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.card-key-path {
  font-family: var(--mono); font-size: var(--fs-xs);
  color: var(--accent); word-break: break-all; line-height: 1.6;
}
.card-key-name { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: 5px; }
.card-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.badge {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 1px; padding: 3px 9px; border-radius: 3px;
  text-transform: uppercase;
}
.badge-flag       { background: rgba(0,212,255,0.10); color: var(--accent);         border: 1px solid rgba(0,212,255,0.3); }
.badge-investigate{ background: rgba(245,158,11,0.10); color: var(--status-partial); border: 1px solid rgba(245,158,11,0.3); }
.badge-monitor    { background: rgba(88,166,255,0.10); color: var(--secondary);      border: 1px solid rgba(88,166,255,0.3); }
.badge-benign     { background: rgba(107,114,128,0.10); color: var(--muted);         border: 1px solid rgba(107,114,128,0.3); }
.badge-technique  {
  background: rgba(88,166,255,0.08); color: var(--secondary);
  border: 1px solid rgba(88,166,255,0.2);
  text-decoration: none; cursor: pointer; transition: background .15s;
}
.badge-technique:hover { background: rgba(88,166,255,0.15); }
.badge-category { background: var(--panel-alt); color: var(--muted); border: 1px solid var(--border); }

.card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }

.card-row { display: flex; flex-direction: column; gap: 4px; }
.card-row-label {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 2px; color: var(--muted); text-transform: uppercase;
}
.card-row-value { font-size: var(--fs-sm); color: var(--text); line-height: 1.55; }

.technique-block { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.technique-name { font-size: var(--fs-sm); color: var(--text); }
.tactic-text { font-size: var(--fs-xs); color: var(--muted); font-style: italic; }

.malware-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.malware-pill {
  font-family: var(--mono); font-size: var(--fs-xs);
  background: rgba(245,158,11,0.08); color: var(--status-partial);
  border: 1px solid rgba(245,158,11,0.2); border-radius: 3px; padding: 2px 8px;
}

.notes-text {
  font-size: var(--fs-xs); color: var(--muted); line-height: 1.65;
  background: var(--bg); border-left: 2px solid var(--accent);
  padding: 10px 14px;
}

.not-found-card {
  background: var(--panel); border: 1px solid var(--border);
  padding: 32px 20px;
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeIn .25s ease;
}
.not-found-title { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); letter-spacing: 2px; }
.not-found-key   { font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent); word-break: break-all; }
.not-found-note  { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }
.not-found-steps { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.not-found-step  {
  font-size: var(--fs-xs); color: var(--muted);
  padding-left: 12px; border-left: 2px solid var(--border); line-height: 1.55;
}

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--border-dim); margin-top: 32px; padding: 18px 28px;
  text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--muted-dim); line-height: 1.8;
}
.footer-inner { display: block; }
.footer-brand { color: var(--text-dim); text-decoration: none; }
.footer-project { color: var(--text-dim); }
.footer-sep { color: var(--muted-dim); }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- RESPONSIVE ---- */
body.nav-compact .nav-links { display: none; }
body.nav-compact .hamburger { display: flex; }

@media (max-width: 1000px) {
  .xv-nav-pill { opacity: 1; transform: none; pointer-events: auto; transition: none; }
}

@media (max-width: 800px) {
  .rs-layout { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-stats { width: 100%; }
  .rs-hero { padding: 22px 18px; }
  .rs-main { padding: 18px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* 480px — phone */
@media (max-width: 480px) {
  .rs-hero { padding: 16px 14px; }
  .rs-main { padding: 12px 14px 40px; }
  .hero-accent, .hero-name { font-size: 18px; letter-spacing: 3px; }
  .hero-stats { flex-wrap: wrap; }
  .stat-item { flex: 1 1 calc(50% - 1px); padding: 10px 12px; }
  .input-panel { padding: 14px; gap: 12px; }
  .card-header { padding: 14px 14px 12px; }
  .card-body { padding: 14px; gap: 12px; }
  .card-badges { gap: 5px; }
  .not-found-card { padding: 22px 14px; }
  .result-empty { padding: 32px 14px; }
}

/* 375px — small phone */
@media (max-width: 375px) {
  .rs-hero { padding: 12px 10px; }
  .rs-main { padding: 10px 10px 32px; }
  .hero-accent, .hero-name { font-size: 16px; letter-spacing: 2px; }
  .reg-input { font-size: var(--fs-xs); padding: 9px 32px 9px 10px; }
  .analyze-btn { font-size: var(--fs-xs); padding: 10px; }
  .input-panel { padding: 10px; }
  .card-header { padding: 10px 10px 8px; }
  .card-body { padding: 10px; }
  .stat-item { padding: 8px 10px; }
}

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