/* ─────────────────────────────────────────────────────────────
   main.css — Netprobe  |  Jet-black on jet-black. Sharp edges.
───────────────────────────────────────────────────────────── */

@import url('./fonts.css');

:root {
  /* Jet-black scale — very tight contrast steps */
  --bg:      #0e0e0e;   /* page                     */
  --bg1:     #141414;   /* raised surface / card    */
  --bg2:     #1a1a1a;   /* inset / hover            */
  --bg3:     #222222;   /* divider / hairline fill  */

  --nav:     #080808;
  --nav-b:   #1c1c1c;
  --footer:  #060606;

  --border:  #252525;
  --border2: #303030;

  /* Text — white spectrum, high contrast */
  --ink:     #f0f0f0;
  --ink-2:   #b8b8b8;
  --ink-3:   #707070;
  --ink-4:   #404040;

  /* Accent */
  --accent:     #5a8c4e;
  --accent-hi:  #7ab86a;
  --accent-dim: rgba(90,140,78,.14);

  --ok:     #5a9e6a;
  --ok-hi:  #7fc48e;

  /* Typography — from fonts.css */
  --serif: var(--font-serif, 'Instrument Serif', Georgia, serif);
  --mono:  var(--font-mono,  'Geist Mono', monospace);
  --sans:  var(--font-sans,  'Geist', system-ui, sans-serif);

  --nav-h: 48px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink-2);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 300;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 32px;
  background: var(--nav);
  border-bottom: 1px solid var(--nav-b);
  gap: 20px;
}
.nav-brand {
  flex: 1; display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-brand-mark {
  width: 26px; height: 26px; background: #283320;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-brand-mark svg { display: block; }
.nav-brand-name {
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  color: #ececec; letter-spacing: .01em;
}
.nav-brand-tag {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); padding: 2px 6px;
  border: 1px solid var(--border); border-radius: 2px;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none;
  padding: 5px 12px; border-radius: 2px;
  transition: color .14s, background .14s;
}
.nav-link:hover { color: var(--ink); background: var(--bg2); }

/* ═══════════════════════════════════════════
   SPLIT HERO — full viewport height
═══════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100vh - var(--nav-h));
}

/* ── Left — content at bottom ── */
.hero-left {
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 0 52px 52px;
  border-right: 1px solid var(--border);
}

.hero-eyebrow {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--border2);
}

.hero-from {
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 30px);
  font-weight: 400; color: var(--ink-3); line-height: 1.3;
  margin-bottom: 2px;
}
.hero-ip {
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 400; font-style: italic;
  color: var(--ink); line-height: 1.06;
  letter-spacing: -.01em; margin-bottom: 12px;
  min-height: 1.1em;
}

/* Location line */
.hero-location {
  font-family: var(--mono); font-size: 13px; font-weight: 400;
  color: var(--ink-2); margin-bottom: 36px;
  letter-spacing: .01em; line-height: 1.5;
}
.hero-location .dim { color: var(--ink-3); }

/* ── Action cluster ── */
.hero-action-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}

/* Status pill — borderless text+dot */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .05em; color: var(--ink-3);
  /* no border, no background — pure flat */
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4); flex-shrink: 0; transition: background .3s;
}
.status-dot.ok { background: var(--ok); }

/* Refresh — icon-only, no border, no bg */
.btn-refresh {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 4px;
  color: var(--ink-4); cursor: pointer;
  border-radius: 2px;
  transition: color .14s;
  /* prevent any href from showing in status bar */
}
.btn-refresh:hover { color: var(--ink-2); }
.btn-refresh:focus { outline: none; }

/* "Run detailed tests" — full-width flat row below */
.btn-run-tests {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  transition: color .14s;
  width: 100%;
}
.btn-run-tests:hover { color: var(--accent-hi); }
.btn-run-tests svg { margin-left: auto; }

/* ── Right pane ── */
.hero-right {
  display: flex; flex-direction: column;
  background: var(--bg1); overflow: hidden;
}

/* Map — top 58% */
.hero-map {
  flex: 0 0 58%; position: relative;
  border-bottom: 1px solid var(--border);
}
#map { position: absolute; inset: 0; }

/* Leaflet flat overrides */
.leaflet-control-zoom {
  border: 1px solid var(--border) !important; box-shadow: none !important;
  border-radius: 0 !important;
}
.leaflet-control-zoom a {
  background: var(--bg1) !important; color: var(--ink-2) !important;
  border-color: var(--border) !important; box-shadow: none !important;
  border-radius: 0 !important; line-height: 24px !important;
}
.leaflet-control-zoom a:hover { background: var(--bg2) !important; }
.leaflet-bar { border-radius: 0 !important; }

/* Overlay — bottom-left, no border-radius */
.map-overlay {
  position: absolute; bottom: 12px; left: 12px; top: auto;
  z-index: 500;
  background: rgba(8,8,8,.90);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 12px;
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  line-height: 1.85; pointer-events: none;
}
.map-overlay strong {
  font-size: 11px; font-weight: 600;
  color: var(--ink); display: block; margin-bottom: 2px;
}

/* Detail table — bottom 42% */
.hero-detail {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
}
.hd-head {
  padding: 9px 20px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4); background: var(--bg2); flex-shrink: 0;
}
.hd-rows { flex: 1; display: flex; flex-direction: column; }
.hd-row {
  flex: 1; display: flex;
  justify-content: space-between; align-items: center;
  padding: 0 20px; border-bottom: 1px solid var(--border); min-height: 0;
}
.hd-row:last-child { border-bottom: none; }
.hd-key {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
}
.hd-val {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--ink); text-align: right;
}
.hd-val.ok     { color: var(--ok); }
.hd-val.accent { color: var(--accent); }
.hd-val.dim    { color: var(--ink-3); font-weight: 400; }

/* ═══════════════════════════════════════════
   FULL REPORT — 3 sections
═══════════════════════════════════════════ */
.report {
  max-width: 1100px; margin: 0 auto;
  padding: 52px 32px 72px;
}
.report-title {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.report-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.report-groups {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: 0; overflow: hidden;
}

.rg-section { background: var(--bg1); display: flex; flex-direction: column; }

.rg-section-head {
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4); background: var(--bg2); flex-shrink: 0;
}

.rg-row {
  display: flex; flex-direction: column;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.rg-row:last-child { border-bottom: none; }
.rg-row:hover { background: var(--bg2); }

.rg-label {
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 5px;
}
.rg-val {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--ink); word-break: break-all; line-height: 1.3;
}
.rg-val.ok     { color: var(--ok); }
.rg-val.accent { color: var(--accent); }
.rg-val.dim    { color: var(--ink-3); font-weight: 400; font-size: 11px; }

/* ── Skeleton ── */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 0; color: transparent !important;
  min-width: 70px; height: .9em; vertical-align: middle;
}
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Refresh spin ── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spinning { animation: spin .7s linear infinite; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--nav-b);
  padding: 16px 32px;
  background: var(--footer);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 9.5px;
  color: var(--ink-4); letter-spacing: .04em;
}
.footer a { color: var(--ink-4); text-decoration: none; transition: color .14s; }
.footer a:hover { color: var(--ink-2); }
.footer-links { display: flex; gap: 16px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp .3s ease both; }
.fade-up-1 { animation: fadeUp .3s .06s ease both; }
.fade-up-2 { animation: fadeUp .3s .12s ease both; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; height: auto; }
  .hero-left {
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 40px 24px; justify-content: flex-start;
  }
  .hero-right { min-height: 70vh; }
  .report { padding: 36px 20px 56px; }
  .report-groups { grid-template-columns: 1fr; }
  .nav { padding: 0 20px; }
  .footer { padding: 14px 20px; flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 520px) {
  .nav-brand-tag { display: none; }
}