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

:root {
    --blue:        #3b82f6;
  --blue-dim:    rgba(59,130,246,0.12);
  --blue-glow:   rgba(59,130,246,0.25);
  --emerald:     #10b981;
  --emerald-dim: rgba(16,185,129,0.12);
  --violet:      #8b5cf6;
  --violet-dim:  rgba(139,92,246,0.12);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,0.12);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.12);

    --font:   'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:   'JetBrains Mono', 'Fira Code', monospace;

    --radius:    8px;
  --radius-lg: 12px;
}

[data-theme='dark'] {
  --bg:          #0a0a0f;
  --bg-subtle:   #0f0f1a;
  --bg-panel:    #111118;
  --bg-hover:    #161622;
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.12);
  --text-primary:   #f1f1f3;
  --text-secondary: #9898a8;
  --text-muted:     #5a5a70;
  --text-code:      #a5f3fc;
  --nav-bg:      rgba(10,10,15,0.85);
  --map-land:    rgba(255,255,255,0.06);
  --map-stroke:  rgba(255,255,255,0.10);
  --chart-grid:  rgba(255,255,255,0.04);
  --chart-mid:   rgba(255,255,255,0.08);
  --canvas-bg:   rgba(0,0,0,0.3);
}

[data-theme='light'] {
  --bg:          #f8fafc;
  --bg-subtle:   #f1f5f9;
  --bg-panel:    #ffffff;
  --bg-hover:    #f8fafc;
  --border:      rgba(0,0,0,0.08);
  --border-mid:  rgba(0,0,0,0.14);
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-code:      #0369a1;
  --nav-bg:      rgba(248,250,252,0.90);
  --map-land:    rgba(0,0,0,0.08);
  --map-stroke:  rgba(0,0,0,0.15);
  --chart-grid:  rgba(0,0,0,0.04);
  --chart-mid:   rgba(0,0,0,0.08);
  --canvas-bg:   rgba(0,0,0,0.03);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.2); border-radius: 3px; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  display: block;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 4px;
  color: var(--blue);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.4s;
}
.status-indicator.online   { background: var(--emerald); box-shadow: 0 0 6px var(--emerald); animation: pulse-green 2s infinite; }
.status-indicator.offline  { background: var(--red);    }

@keyframes pulse-green {
  0%,100% { opacity:1; } 50% { opacity:0.45; }
}

.nav-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
}

.nav-meta { font-family: var(--mono); font-size: 11px; }

.nav-toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font);
  font-weight: 500;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--blue);
  background: var(--blue-dim);
}

.nav-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  color: #ffffff !important;
  font-size: 11px;
  font-family: var(--font);
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}
.nav-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.45);
}
.nav-btn-primary:active {
  transform: translateY(0);
}

.hero {
  padding: 48px 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.07) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 28px;
  background: var(--bg-subtle);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  animation: pulse-green 1.8s infinite;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-accent {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.crypto-showcase {
  background: var(--bg-panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 800px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.crypto-showcase::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue) 30%, var(--violet) 70%, transparent);
  opacity: 0.6;
}

.crypto-showcase:hover {
  border-color: rgba(59,130,246,0.25);
}

.crypto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.crypto-label-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crypto-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--blue);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s;
}

.crypto-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Countdown timer */
.crypto-countdown {
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown-bar-bg {
  width: 80px;
  height: 3px;
  background: rgba(128,128,128,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.countdown-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  width: 100%;
  transition: width 0.1s linear;
}

.countdown-secs {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 8px;
}

/* Value display */
.crypto-value-wrapper {
  min-height: 56px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--canvas-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.crypto-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-code);
  word-break: break-all;
  letter-spacing: 0.5px;
}

@keyframes cursor-blink {
  0%,100% { opacity:1; } 50% { opacity:0; }
}

.cursor-blink {
  display: inline-block;
  color: var(--blue);
  animation: cursor-blink 0.9s infinite;
  font-weight: 300;
}

.crypto-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Entropy strength bar */
.entropy-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.ei-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ei-bar-bg {
  flex: 1;
  height: 4px;
  background: rgba(128,128,128,0.12);
  border-radius: 2px;
  overflow: hidden;
  max-width: 200px;
}

.ei-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.8s ease;
}

.ei-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.crypto-timestamp {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   METRICS CARDS
   ══════════════════════════════════════════════════════════════ */
.metrics-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.metric-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}

.metric-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-1px);
}

.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.icon-blue    { background: var(--blue-dim);    color: var(--blue);    }
.icon-emerald { background: var(--emerald-dim); color: var(--emerald); }
.icon-violet  { background: var(--violet-dim);  color: var(--violet);  }
.icon-amber   { background: var(--amber-dim);   color: var(--amber);   }

.metric-body {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.metric-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.metric-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-subvalue {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   SECTION HEADERS (shared)
   ══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   NODE NETWORK SECTION
   ══════════════════════════════════════════════════════════════ */
.node-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

/* World Map */
.world-map-wrapper {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.world-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-land {
  fill: var(--map-land);
  stroke: var(--map-stroke);
  stroke-width: 0.5;
  transition: fill 0.2s;
}

/* City dot layer */
.city-dots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.city-dot-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.city-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid rgba(16,185,129,0.5);
  position: relative;
  z-index: 2;
  transition: all 0.2s;
}

.city-dot.offline {
  background: var(--red);
  border-color: rgba(239,68,68,0.5);
}

.city-dot-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--emerald);
  opacity: 0;
  animation: city-ping 2.5s ease-out infinite;
}

.city-dot.offline ~ .city-dot-ring {
  border-color: var(--red);
  animation: none;
}

@keyframes city-ping {
  0% { transform: translate(-50%,-50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%,-50%) scale(2.5); opacity: 0; }
}

.city-dot-label {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 0.3px;
  pointer-events: none;
}

/* Map Tooltip */
.map-tooltip {
  position: absolute;
  background: var(--bg-panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-width: 200px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.map-tooltip.visible { opacity: 1; }

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.tooltip-city {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.tooltip-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
}

.tooltip-status.online  { background: var(--emerald-dim); color: var(--emerald); }
.tooltip-status.offline { background: var(--red-dim);     color: var(--red); }

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  color: var(--text-secondary);
}

.tooltip-row span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-primary);
}

/* Node Status Bar */
.node-status-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 0;
}

.node-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  flex: 1;
  min-width: 120px;
}

.node-stat:first-child { padding-left: 0; }
.node-stat:last-child  { padding-right: 0; }

.node-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.node-stat-dot.online  { background: var(--emerald); box-shadow: 0 0 5px var(--emerald); }
.node-stat-dot.offline { background: var(--red); }

.node-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.node-stat-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: auto;
}

.node-stat-value.emerald { color: var(--emerald); }
.node-stat-value.red     { color: var(--red); }

.node-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* Scrolling Node Strip */
.node-strip-wrapper {
  overflow: hidden;
  position: relative;
}

.node-strip-wrapper::before,
.node-strip-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.node-strip-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.node-strip-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.node-strip {
  display: flex;
  gap: 12px;
  animation: strip-scroll 28s linear infinite;
  width: max-content;
}

@keyframes strip-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.node-strip:hover { animation-play-state: paused; }

.node-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.node-card:hover { border-color: var(--border-mid); }

.node-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node-card-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.node-card-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.node-card-status.online  { background: var(--emerald-dim); color: var(--emerald); }
.node-card-status.offline { background: var(--red-dim);     color: var(--red); }

.node-card-city {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.node-card-meta {
  display: flex;
  gap: 12px;
}

.node-card-stat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.node-card-stat strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   AUDIT SECTION
   ══════════════════════════════════════════════════════════════ */
.audit-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

.audit-card {
  display: flex;
  flex-direction: column;
}

.audit-card-full {
  grid-column: 1 / -1;
}

.audit-canvas {
  width: 100%;
  border-radius: var(--radius);
  margin-top: 8px;
}

.audit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* PractRand Big Stat */
.practrand-big-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}

.prs-value {
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 700;
  color: var(--emerald);
  line-height: 1;
  letter-spacing: -2px;
}

.prs-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.prs-check { margin: 8px 0; }

.prs-throughput {
  font-size: 12px;
  color: var(--text-secondary);
}

.prs-throughput strong {
  color: var(--text-primary);
}

/* Dieharder Terminal */
.dieharder-terminal {
  background: #0a0f0a;
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  height: 200px;
  overflow: hidden;
  position: relative;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
}

[data-theme='light'] .dieharder-terminal {
  background: #f0fdf4;
  border-color: rgba(16,185,129,0.3);
}

.dt-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dt-line {
  color: #34d399;
  line-height: 1.5;
}

.dt-line.pass { color: #10b981; }
.dt-line.header { color: #6b7280; }

.dt-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #10b981;
  animation: cursor-blink 0.9s infinite;
  margin-top: 4px;
  border-radius: 1px;
}

.analytics-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.analytics-card {
  display: flex;
  flex-direction: column;
}

.analytics-chart-wrap {
  flex: 1;
  position: relative;
  min-height: 160px;
  margin-top: 8px;
}

.analytics-chart-wrap canvas {
  width: 100% !important;
  height: 160px !important;
  border-radius: var(--radius);
  background: var(--canvas-bg);
  border: 1px solid var(--border);
  display: block;
}

.analytics-counters {
  justify-content: space-between;
}

.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  text-align: center;
}

.counter-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.counter-label {
  font-size: 11px;
  color: var(--text-muted);
}

.counter-divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

.tests-section { padding: 48px 0; border-bottom: 1px solid var(--border); }

.tests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.panel-wide { grid-column: 1 / -1; }

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s;
}

.panel:hover { border-color: var(--border-mid); }

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-blue    { background: var(--blue-dim);    color: var(--blue);    border: 1px solid rgba(59,130,246,0.25); }
.badge-emerald { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.25); }
.badge-amber   { background: var(--amber-dim);   color: var(--amber);   border: 1px solid rgba(245,158,11,0.25); }
.badge-violet  { background: var(--violet-dim);  color: var(--violet);  border: 1px solid rgba(139,92,246,0.25); }

.panel-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.panel-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.3s;
}

.panel-status.pass    { color: var(--emerald); border-color: rgba(16,185,129,0.3); background: var(--emerald-dim); }
.panel-status.warn    { color: var(--amber);   border-color: rgba(245,158,11,0.3); background: var(--amber-dim); }
.panel-status.fail    { color: var(--red);     border-color: rgba(239,68,68,0.3);  background: var(--red-dim); }
.panel-status.suspicious { color: var(--amber); border-color: rgba(245,158,11,0.3); background: var(--amber-dim); }

.panel-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.panel-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ent-metrics {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ent-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.ent-row:last-child { border-bottom: none; }

.ent-name  { font-size: 13px; color: var(--text-secondary); }
.ent-ideal { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.ent-val   { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-primary); min-width: 80px; text-align: right; }

.nist-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.nist-big-stat {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nbs-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
}

.nbs-label { font-size: 11px; color: var(--text-muted); }

.estimator-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.est-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.est-row:last-child { border-bottom: none; }
.est-name  { font-size: 12px; color: var(--text-secondary); flex: 1; }
.est-val   { font-family: var(--mono); font-size: 12px; color: var(--text-primary); }
.est-pass  { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 3px; }
.est-pass.p { background: var(--emerald-dim); color: var(--emerald); }
.est-pass.f { background: var(--red-dim);     color: var(--red); }

.practrand-progress-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.prac-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.prac-label { font-size: 12px; color: var(--text-secondary); }
.prac-val   { font-family: var(--mono); font-size: 13px; color: var(--text-primary); font-weight: 500; }

.prac-bar-bg {
  height: 6px;
  background: rgba(128,128,128,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.prac-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--amber), var(--emerald));
  transition: width 0.8s ease;
}

.prac-milestones {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
}

.practrand-tests {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.prac-test-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prac-test-name { font-size: 12px; color: var(--text-secondary); }
.prac-test-val  { font-family: var(--mono); font-size: 12px; color: var(--text-primary); }
.prac-test-result { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 3px; align-self: flex-start; }
.prac-test-result.pass { background: var(--emerald-dim); color: var(--emerald); }
.prac-test-result.fail { background: var(--red-dim);     color: var(--red); }
.prac-test-result.warn { background: var(--amber-dim);   color: var(--amber); }

.progress-note {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.chart-section { padding: 48px 0; border-bottom: 1px solid var(--border); }

.chart-container {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: stretch;
}

#dist-canvas {
  flex: 1;
  height: 200px;
  border-radius: var(--radius);
  background: var(--canvas-bg);
  border: 1px solid var(--border);
  display: block;
}

.chart-y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 0;
}

.chart-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.ledger-section { padding: 48px 0; border-bottom: 1px solid var(--border); }

.table-wrapper {
  overflow-x: auto;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background 0.15s;
}
.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.empty-row {
  text-align: center;
  color: var(--text-muted) !important;
  font-family: var(--font) !important;
  font-style: italic;
  padding: 32px !important;
}

.chip {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  letter-spacing: 0.3px;
}
.chip-pass    { background: var(--emerald-dim); color: var(--emerald); }
.chip-warn    { background: var(--amber-dim);   color: var(--amber); }
.chip-fail    { background: var(--red-dim);     color: var(--red); }
.chip-pending { background: rgba(128,128,128,0.1); color: var(--text-muted); }
.chip-healthy { background: var(--emerald-dim); color: var(--emerald); }

.site-footer {
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--blue); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .modal-box { transform: scale(1); }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-intro {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.modal-intro code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-code);
  background: rgba(165,243,252,0.08);
  padding: 1px 5px;
  border-radius: 3px;
}

.code-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block-header {
  background: var(--bg-subtle);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}

.code-block pre {
  padding: 16px 14px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-code);
  line-height: 1.7;
  display: block;
  white-space: pre;
}

.modal-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }


.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 7px;
  transition: all 0.15s;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-hamburger:hover { border-color: var(--blue); background: var(--blue-dim); }
.nav-hamburger:hover span { background: var(--blue); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .analytics-counters { grid-column: 1 / -1; flex-direction: row; }
  .counter-item { flex: 1; }
  .counter-divider { width: 1px; height: auto; align-self: stretch; }
}

@media (max-width: 900px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .tests-grid   { grid-template-columns: 1fr; }
  .panel-wide   { grid-column: auto; }
  .nist-summary { grid-template-columns: 1fr; }
  .audit-grid   { grid-template-columns: 1fr; }
  .audit-card-full { grid-column: auto; }
  .analytics-grid  { grid-template-columns: 1fr; }
  .analytics-counters { flex-direction: column; }
  .counter-divider { width: 100%; height: 1px; }
  .node-stat { padding: 8px 16px; }
  .hero { padding: 60px 0 40px; }
  .crypto-showcase { max-width: 100%; }
  .crypto-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nist-details { grid-template-columns: repeat(2, 1fr); }
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }
}

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

    .nav-status {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-mid);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    gap: 10px;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-status.mobile-open {
    display: flex;
  }
  .nav-inner { position: relative; }
  .nav-divider { display: none; }
  .nav-meta {
    font-size: 12px;
    padding: 4px 0;
    color: var(--text-secondary);
  }
  .status-label { font-size: 12px; }
  .nav-toggle-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    font-size: 12px;
  }
  .nav-toggle-btn span { display: inline; }
  .nav-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 8px;
    margin-top: 4px;
  }
  .nav-status .status-indicator {
    display: none;
  }

    .hero { padding: 40px 0 32px; }
  .hero-title { font-size: clamp(24px, 6vw, 36px); letter-spacing: -0.8px; }
  .hero-sub { font-size: 14px; margin-bottom: 32px; }
  .hero-badge { font-size: 11px; padding: 4px 12px; }

    .crypto-showcase { padding: 18px 16px; max-width: 100%; }
  .crypto-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .crypto-value { font-size: 12px; word-break: break-all; }
  .crypto-footer { flex-direction: column; gap: 10px; }
  .entropy-indicator { width: 100%; }
  .ei-bar-bg { max-width: 100%; flex: 1; }

    .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .metrics-section { padding: 28px 0; }
  .metric-card { padding: 16px; }
  .metric-val { font-size: 22px; }

    .node-network-section { padding: 28px 0; }
  .node-status-bar { flex-wrap: wrap; gap: 8px; }
  .node-stat { padding: 8px 14px; min-width: calc(50% - 4px); }
  .world-map-wrapper { min-height: 220px; }

    .tests-section { padding: 28px 0; }
  .tests-grid { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 20px; }
  .panel-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .nist-summary { grid-template-columns: 1fr 1fr; }
  .nist-details { grid-template-columns: 1fr; }
  .estimator-row { flex-wrap: wrap; gap: 4px; }

    .audit-section { padding: 28px 0; }
  .audit-grid { grid-template-columns: 1fr; gap: 16px; }
  .audit-card { padding: 20px; }
  .table-wrapper { -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 560px; }

    .cert-section { padding: 28px 0; }

    .analytics-section { padding: 28px 0; }
  .analytics-grid { grid-template-columns: 1fr; gap: 16px; }
  .analytics-counters { flex-direction: column; }
  .counter-item { padding: 20px; }
  .counter-value { font-size: 24px; }
  .counter-divider { display: none; }
  .analytics-card { padding: 20px; }
  .analytics-chart-wrap { min-height: 140px; }
  .analytics-chart-wrap canvas { height: 140px !important; }

    .modal-box {
    margin: 12px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
  .modal-body { padding: 16px 20px; }

    .footer-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 12px; }

    .container { padding: 0 16px; }

    .section-title { font-size: 18px; }
  .section-sub { font-size: 13px; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-label { font-size: 10px; }
  .metric-val { font-size: 20px; }
  .metric-sub { font-size: 10px; }

  .hero-title { font-size: 22px; letter-spacing: -0.5px; }
  .hero-sub { font-size: 13px; }
  .brand-name { font-size: 13px; }
  .brand-tag { display: none; }

  .node-stat { min-width: 100%; }
  .nist-summary { grid-template-columns: 1fr; }
  .prac-test-list { padding: 12px; }

  .panel { padding: 16px; }
  .audit-card { padding: 16px; }
  .analytics-card { padding: 16px; }

  .world-map-wrapper { min-height: 180px; }

    .crypto-value { font-size: 11px; letter-spacing: 0; }
  .crypto-showcase { padding: 14px 12px; }
}


[data-maintenance="true"] body > *:not(#maintenance-overlay) {
  display: none !important;
}
[data-maintenance="true"] #maintenance-overlay {
  opacity: 1 !important;
  pointer-events: auto !important;
  display: flex !important;
}

.maintenance-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #06060a;
  background-image:
    radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  padding: 24px;
  text-align: center;
}

.maintenance-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.vortex-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 40px;
}

@media (max-width: 480px) {
  .vortex-container { width: 120px; height: 120px; margin-bottom: 28px; }
  .maintenance-title { font-size: 22px; }
  .maintenance-subtitle { font-size: 13px; }
  .maintenance-text { font-size: 13px; }
}

.vortex-svg {
  width: 100%;
  height: 100%;
  animation: spin 30s linear infinite;
}

.vortex-ring-1 {
  animation: spinCounter 15s linear infinite;
  transform-origin: 50px 50px;
}
.vortex-ring-2 {
  animation: spin 8s linear infinite;
  transform-origin: 50px 50px;
}
.vortex-ring-3 {
  animation: spinCounter 5s linear infinite;
  transform-origin: 50px 50px;
}

.vortex-arc-1 {
  animation: pulseGlow 3s ease-in-out infinite alternate;
}
.vortex-arc-2 {
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

.vortex-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #3b82f6;
  box-shadow:
    0 0 15px #3b82f6,
    0 0 30px #8b5cf6,
    0 0 45px #10b981;
  animation: corePulse 2s ease-in-out infinite alternate;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulseGlow {
  0% { stroke-width: 1; filter: drop-shadow(0 0 2px rgba(59,130,246,0.5)); }
  100% { stroke-width: 2.5; filter: drop-shadow(0 0 8px rgba(59,130,246,0.9)); }
}

@keyframes corePulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.maintenance-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #f1f1f5 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.maintenance-subtitle {
  font-size: 16px;
  color: var(--blue);
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.maintenance-text {
  max-width: 500px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.node-fips-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 992px) {
  .node-fips-grid {
    grid-template-columns: 1fr;
  }
}

.node-list-panel {
  display: flex;
  flex-direction: column;
}

.fips-health-panel {
  display: flex;
  flex-direction: column;
}

.fips-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.fips-stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.fips-stat-box:hover {
  border-color: var(--border-mid);
}

.fips-stat-val {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.fips-stat-val.emerald {
  color: var(--emerald);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.fips-stat-val.red {
  color: var(--red);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.fips-stat-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
}

.status-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.online {
  background: var(--emerald-dim);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-badge.online::before {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  animation: pulse-green 2s infinite;
}

.status-badge.offline {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}
.status-badge.offline::before {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

.status-badge.fault {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
  animation: heartbeat 1.5s infinite;
}
.status-badge.fault::before {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: heartbeat-dot 1.5s infinite;
}

.fips-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
}

.fips-badge.passed {
  background: var(--emerald-dim);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.fips-badge.failed {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
  animation: heartbeat 1.5s infinite alternate;
}

.fips-badge.pending {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.03); }
  28% { transform: scale(1); }
  42% { transform: scale(1.03); }
  70% { transform: scale(1); }
}

@keyframes heartbeat-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.audit-minimalist-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.audit-minimalist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.audit-min-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.audit-min-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background 0.3s ease;
}

.audit-min-card.card-nist::before {
  background: linear-gradient(90deg, var(--blue), transparent);
}
.audit-min-card.card-practrand::before {
  background: linear-gradient(90deg, var(--amber), transparent);
}
.audit-min-card.card-dieharder::before {
  background: linear-gradient(90deg, var(--violet), transparent);
}

.audit-min-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.audit-min-card.card-nist:hover {
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}
.audit-min-card.card-practrand:hover {
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.15);
}
.audit-min-card.card-dieharder:hover {
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.audit-min-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.audit-min-suite-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audit-min-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}

.badge-nist {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-practrand {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-dieharder {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.audit-min-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

.audit-min-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-pass {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}
.status-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-fail {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.audit-min-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
  font-family: var(--font-mono);
}

.audit-min-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.audit-min-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.audit-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.audit-download-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.card-practrand .audit-download-btn {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.card-practrand .audit-download-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.card-dieharder .audit-download-btn {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
}

.card-dieharder .audit-download-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.audit-download-btn.hidden {
  display: none !important;
}

.modal-container {
  background: var(--bg-panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.15);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}
.modal-status-indicator.online {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-green 2s infinite;
}
.modal-status-indicator.offline {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}
.modal-status-indicator.fault {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: heartbeat-dot 1.5s infinite;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}
.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

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

@media (max-width: 680px) {
  .modal-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.modal-metric-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  transition: border-color 0.2s;
}
.modal-metric-card:hover {
  border-color: var(--border-mid);
}

.modal-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.modal-metric-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--mono);
}

.modal-metric-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.modal-charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .modal-charts-container {
    grid-template-columns: 1fr;
  }
}

.modal-chart-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-chart-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
}

.modal-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.modal-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#nodes-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s;
}

#nodes-table tbody tr:hover {
  background-color: var(--bg-hover) !important;
}

.node-details-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  transition: all 0.2s ease;
  font-family: inherit;
}

.node-details-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.6);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}
