/* ===========================================
   EViL Industries / MeshCore shared skin
   - Variables & base from EvilHouse
   - Visual chrome from MeshCore Map v2
   =========================================== */

/* --- Theme variables --- */
:root {
  --eh-bg: #050711;
  --eh-bg-alt: #0b0f1e;
  --eh-accent: #ff3277;
  --eh-accent-soft: rgba(255, 50, 119, 0.3);
  --eh-accent-2: #3cf2ff;
  --eh-text: #f4f4ff;
  --eh-muted: #8a8ea3;
  --eh-border-soft: rgba(255,255,255,0.08);
  --eh-radius-lg: 20px;
  --eh-radius-md: 14px;
  --eh-radius-sm: 8px;
  --eh-shadow-soft: 0 0 40px rgba(0, 0, 0, 0.7);
  --eh-shadow-glow: 0 0 40px rgba(255, 50, 119, 0.3);
  --eh-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --eh-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* --- Resets --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* --- Body for EViL/EvilHouse pages --- */
body.eh-body {
  margin: 0;
  font-family: var(--eh-font-sans);
  background: radial-gradient(circle at top left, #141a33 0, #050711 40%, #000 100%);
  color: var(--eh-text);
  position: relative;
  overflow-x: hidden;
}

/* Noise overlay (if used in header/footer) */
.eh-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.1;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1600 900' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ==============================
   NAVBAR / FOOTER (from EvilHouse)
   ============================== */

.eh-navbar {
  background: rgba(3, 6, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--eh-border-soft);
  z-index: 10;
}

.eh-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.eh-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--eh-accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.2), transparent);
  box-shadow: 0 0 15px rgba(255, 50, 119, 0.4);
}

.eh-brand-text {
  font-size: 0.9rem;
  color: var(--eh-muted);
}

.nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--eh-accent), var(--eh-accent-2));
  transition: width 0.2s ease-out;
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
  width: 100%;
}

/* Footer */
.eh-footer {
  border-top: 1px solid var(--eh-border-soft);
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

.eh-footer-note {
  color: var(--eh-muted);
}

/* ==============================
   SECTIONS / TYPOGRAPHY
   ============================== */

.eh-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.eh-section-accent {
  background:
    radial-gradient(circle at top right, rgba(255, 50, 119, 0.12), transparent 55%),
    radial-gradient(circle at bottom left, rgba(60, 242, 255, 0.12), transparent 55%),
    #050711;
}

.eh-section-last {
  padding-bottom: 100px;
}

/* Global section title now uses MeshCore gradient */
.eh-section-title {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(120deg, #f5f5f5, var(--eh-accent-2), var(--eh-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Body / lead text */
.eh-section-lead {
  color: var(--eh-muted);
  font-size: 0.95rem;
  max-width: 32rem;
  opacity: 0.8;
}

/* Tagline – uses MeshCore neon variant */
.eh-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  text-align: right;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.8),
    0 0 16px rgba(0, 255, 255, 0.35);
}

/* Small pills / labels */
.eh-pill {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--eh-border-soft);
  color: var(--eh-muted);
}

/* Project / status text */
.eh-project-status {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eh-project-status.eh-online {
  color: #19ff93;
}

.eh-project-status.eh-wip {
  color: #ffdd57;
}

.eh-project-status.eh-idle {
  color: var(--eh-muted);
}

.eh-project-status.eh-shelved {
  color: var(--eh-accent);
  opacity: 0.9;
}

/* Generic metadata list */
.eh-metadata {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--eh-muted);
}

.eh-metadata li::before {
  content: "• ";
  color: var(--eh-accent-2);
}

/* ==============================
   EVIL INDUSTRIES LOGO / CARDS
   ============================== */

.eh-logo-card {
  border-radius: var(--eh-radius-lg);
  border: 1px solid var(--eh-border-soft);
  padding: 1.7rem 1.6rem;
  background:
    radial-gradient(circle at 20% 0, rgba(60, 242, 255, 0.16), transparent 60%),
    linear-gradient(145deg, #050814, #050711);
  box-shadow: var(--eh-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eh-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--eh-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.1), transparent 60%);
  box-shadow: 0 0 25px rgba(255, 50, 119, 0.35);
}

/* Stylised E (three tines) */
.eh-logo-e {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eh-logo-e span {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--eh-accent), var(--eh-accent-2));
}

.eh-logo-e .e-top { top: 6px; }
.eh-logo-e .e-mid { top: 14px; width: 70%; }
.eh-logo-e .e-bot { top: 22px; width: 45%; }

.eh-logo-text {
  display: flex;
  flex-direction: column;
}

.eh-logo-main {
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.eh-logo-sub {
  font-size: 0.8rem;
  color: var(--eh-muted);
}

/* Feature cards on EViL index */
.eh-feature-card {
  border-radius: var(--eh-radius-md);
  border: 1px solid var(--eh-border-soft);
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0.5));
  font-size: 0.85rem;
}

.eh-feature-card h5 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Staff / residents */
.eh-staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.eh-staff-card,
.eh-resident-card {
  border-radius: var(--eh-radius-md);
  border: 1px solid var(--eh-border-soft);
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0.6));
  font-size: 0.85rem;
}

.eh-staff-name,
.eh-resident-name {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.eh-staff-role,
.eh-resident-role {
  font-size: 0.8rem;
  color: var(--eh-muted);
  margin: 0;
}

.eh-residents-grid {
  display: grid;
  gap: 0.9rem;
}

@media (max-width: 767.98px) {
  .eh-staff-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   LAB “HARDWARE BAY” CARDS (MeshCore chrome)
   Used for map cards + can be reused elsewhere
   ============================== */

.eh-project-card {
  background:
    radial-gradient(circle at top left, rgba(0, 255, 255, 0.10), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255, 0, 136, 0.12), transparent 60%),
    linear-gradient(145deg, #050609, #020307);
  border-radius: var(--eh-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 18px 45px rgba(0, 0, 0, 1),
    0 0 28px rgba(0, 255, 255, 0.12);
  padding: 1.3rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    border-color 0.12s ease-out;
}

.eh-project-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 50, 119, 0.12), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(60, 242, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.15s ease-out;
  pointer-events: none;
}

.eh-project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--eh-shadow-glow);
  border-color: rgba(255, 50, 119, 0.55);
}

.eh-project-card:hover::before {
  opacity: 1;
}

.eh-project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.eh-project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.eh-project-card p {
  font-size: 0.85rem;
  color: var(--eh-muted);
  margin-bottom: 0.7rem;
}

.eh-project-card-ghost {
  border-style: dashed;
  opacity: 0.85;
}

/* ==============================
   MESHCORE MAP — LAB CONSOLE V2
   ============================== */

/* Section backdrop: dark lab bay + faint grid + scanlines */
#meshcore-map {
  position: relative;
  overflow: hidden;
}

#meshcore-map::before {
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  opacity: 0.25;
  mix-blend-mode: soft-light;
}

#meshcore-map::after {
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.5) 0px,
    rgba(0,0,0,0.5) 1px,
    rgba(0,0,0,0) 3px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* Map shell: framed HUD with label + height layout */
#meshcore-map-shell {
  position: relative;
  height: 60vh;
  min-height: 480px;
  background:
    radial-gradient(circle at 10% 0, rgba(0, 255, 255, 0.10), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(255, 0, 136, 0.14), transparent 65%),
    #020305;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 1),
    0 0 50px rgba(0, 0, 0, 1),
    0 0 32px rgba(0, 255, 255, 0.25);
  border-radius: 1.5rem;
  overflow: hidden;
}

#meshcore-map-shell::before {
  content: "EViL / MeshCore NSW — LIVE TELEMETRY";
  position: absolute;
  right: 1.1rem;
  top: 0.7rem;
  font-family: var(--eh-font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  opacity: 0.75;
  color: rgba(191, 255, 255, 0.85);
  pointer-events: none;
}

/* Leaflet canvas inside shell */
#meshcore-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* On very small screens, don't let map eat everything */
@media (max-width: 575.98px) {
  #meshcore-map-shell {
    height: 50vh;
    min-height: 320px;
  }
}

/* Live pill: status LED + label */
#meshcore-live-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.9rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at 0 0, rgba(0, 255, 255, 0.22), transparent 55%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.9);
}

#meshcore-live-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #555;
  box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
}

#meshcore-live-pill.eh-online {
  color: #00f5ff;
  border-color: rgba(0, 255, 255, 0.7);
  box-shadow:
    0 0 18px rgba(0, 255, 255, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.9);
}

#meshcore-live-pill.eh-online::before {
  background: #00f5ff;
  box-shadow: 0 0 13px rgba(0, 255, 255, 1);
  animation: mc-pulse 1.4s ease-in-out infinite alternate;
}

#meshcore-live-pill.eh-offline {
  color: #f66;
  border-color: rgba(255, 80, 80, 0.6);
}

#meshcore-live-pill.eh-offline::before {
  background: #f33;
  box-shadow: 0 0 8px rgba(255, 80, 80, 0.8);
}

@keyframes mc-pulse {
  from { transform: scale(0.9); opacity: 0.7; }
  to   { transform: scale(1.35); opacity: 1; }
}

/* MQTT endpoint chip */
#meshcore-map code.eh-code {
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  background: rgba(0, 0, 0, 0.86);
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.25);
  font-size: 0.75rem;
}

/* Debug strip: fake console bar */
#meshcore-debug {
  font: 12px/1.3 var(--eh-font-mono);
  background: #030405;
  border: 1px solid #202427;
  box-shadow: inset 0 0 0 1px #000;
  position: relative;
  padding-top: 1.3rem;
  max-height: 160px;
  border-radius: 0.5rem;
  overflow: auto;
}

#meshcore-debug::before {
  content: "EViL::meshcore-console";
  position: absolute;
  left: 0.6rem;
  top: 0.25rem;
  font-family: var(--eh-font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(160, 240, 255, 0.75);
}

#meshcore-debug b {
  color: #8fd;
}

#meshcore-debug .muted {
  color: #888;
}

/* Map node icons — emoji layout + glow */
.mc-node-icon {
  background: transparent;
  border: none;
}

.mc-node-icon span {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 8px rgba(0, 255, 255, 0.55));
}

/* Table chrome */
#meshcore-map table.table-dark {
  background: radial-gradient(circle at top, rgba(0, 255, 255, 0.05), transparent 55%);
}

#meshcore-map thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

#meshcore-map tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

#meshcore-map tbody tr:hover {
  background-color: rgba(0, 255, 255, 0.08);
}

/* Sorting affordance (overrides EvilHouse basic arrows) */
th[data-sort] {
  cursor: pointer;
  position: relative;
  user-select: none;
}

th[data-sort].mc-sort-asc::after,
th[data-sort].mc-sort-desc::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
}

th[data-sort].mc-sort-asc::after {
  border-bottom-color: #00ffff;
  margin-top: -3px;
}

th[data-sort].mc-sort-desc::after {
  border-top-color: #00ffff;
  margin-top: 3px;
}

/* Live stats — instrument panel */
#meshcore-stats li {
  font-size: 0.8rem;
}

#meshcore-stats span.float-end {
  font-family: var(--eh-font-mono);
}

#meshcore-stats li[data-chat-volume="1"] {
  cursor: pointer;
  transition:
    color 0.15s ease,
    text-shadow 0.15s ease,
    transform 0.12s ease;
}

#meshcore-stats li[data-chat-volume="1"]:hover {
  color: #00f5ff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.9);
  transform: translateX(2px);
}

/* Top repeater owners list */
#meshcore-owner-toplist li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.12rem 0;
}

#meshcore-owner-toplist li::before {
  content: "●";
  font-size: 0.5rem;
  color: rgba(0, 255, 255, 0.8);
}

#meshcore-owner-toplist li span.mc-owner-emoji {
  font-size: 1rem;
  margin-right: 0.2rem;
}

/* Chat modal graph — MeshCore neon bars */
.mc-chat-months-row {
  display: flex;
  gap: 0.25rem;
  align-items: flex-end;
  margin-top: 0.75rem;
}

.mc-chat-month {
  flex: 1;
  position: relative;
}

.mc-chat-month-bar {
  width: 100%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(
    to top,
    rgba(0, 255, 255, 0.18),
    rgba(0, 255, 255, 0.95)
  );
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}

.mc-chat-month-label {
  display: block;
  text-align: center;
  margin-top: 0.2rem;
  font-size: 0.6rem;
  opacity: 0.75;
}

.mc-chat-month-count {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -0.3rem);
  font-size: 0.6rem;
  opacity: 0.9;
}

/* Chat modal chrome */
#meshcoreChatModal .modal-content.bg-dark {
  border: 1px solid rgba(0, 255, 255, 0.35);
  box-shadow:
    0 0 45px rgba(0, 0, 0, 1),
    0 0 32px rgba(0, 255, 255, 0.4);
}

/* ==============================
   Misc EvilHouse extras (kept for future pages)
   ============================== */

/* Hero / buttons / timeline / coffee / etc are left intact
   in case your header/other pages use them. If you want them
   trimmed later, we can purge safely. */
.eh-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--eh-muted);
  font-size: 0.75rem;
}

.eh-hero {
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

.eh-hero-title {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 1;
}

.eh-hero-sub {
  color: var(--eh-muted);
  max-width: 32rem;
  font-size: 0.95rem;
}

.eh-btn-primary {
  background: linear-gradient(135deg, var(--eh-accent), var(--eh-accent-2));
  border: none;
  border-radius: 999px;
  padding-inline: 1.6rem;
  box-shadow: var(--eh-shadow-glow);
}

.eh-btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 0 30px rgba(60, 242, 255, 0.35);
}

.eh-btn-ghost {
  border-radius: 999px;
  border-color: var(--eh-border-soft);
  color: var(--eh-muted);
}

.eh-btn-ghost:hover {
  border-color: var(--eh-accent-soft);
  color: var(--eh-text);
}

/* Scrollbar (desktop only) */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #02030a;
  }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--eh-accent), var(--eh-accent-2));
    border-radius: 999px;
  }
}

/* === EViL Systems console panels (from EvilHouse) === */

.eh-status-panel {
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    background: linear-gradient(145deg, #050814, #050711);
    padding: 1.5rem 1.6rem;
    font-size: 0.85rem;
    box-shadow: var(--eh-shadow-soft);
}

.eh-status-row {
    display: grid;
    grid-template-columns: 1.1fr 2fr auto;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.eh-status-bar {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--eh-border-soft);
    height: 10px;
    position: relative;
}

.eh-status-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eh-accent), var(--eh-accent-2));
    box-shadow: 0 0 12px rgba(60, 242, 255, 0.5);
}

.eh-lvl-1 { width: 18%; }
.eh-lvl-2 { width: 40%; }
.eh-lvl-3 { width: 63%; }
.eh-lvl-4 { width: 88%; }

.eh-status-val {
    color: var(--eh-muted);
    font-size: 0.75rem;
}

.eh-status-footer {
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--eh-muted);
    font-size: 0.8rem;
}

/* Code block console (from EvilHouse) */
.eh-code-block {
    background: #05040a;
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    padding: 1.2rem 1.3rem;
    font-family: var(--eh-font-mono);
    font-size: 0.8rem;
    color: #f1f1ff;
    position: relative;
    box-shadow: var(--eh-shadow-soft);
}

.eh-code-block::before {
    content: "evil://industries/access-policy.conf";
    position: absolute;
    left: 1.3rem;
    top: 0.7rem;
    font-size: 0.7rem;
    color: var(--eh-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eh-code-block pre {
    margin: 1.3rem 0 0;
}

/* Small-screen tweak for status grid */
@media (max-width: 575.98px) {
    .eh-status-row {
        grid-template-columns: 0.9fr 1.8fr auto;
    }
}

/* === Evil Industries section: grid + scanlines like MeshCore === */

#evil-industries {
  position: relative;
  overflow: hidden;
}

#evil-industries::before {
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  z-index: 0;
}

#evil-industries::after {
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.5) 0px,
    rgba(0,0,0,0.5) 1px,
    rgba(0,0,0,0) 3px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
  z-index: 0;
}

/* Ensure content sits above the overlays */
#evil-industries > .container {
  position: relative;
  z-index: 1;
}

/* Glitch text for title / label */

.eh-glitch {
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eh-glitch::before,
.eh-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 50% 0);
  opacity: 0.8;
  mix-blend-mode: screen;
}

.eh-glitch::before {
  transform: translate3d(-2px, -1px, 0);
  text-shadow: -2px 0 var(--eh-accent);
}

.eh-glitch::after {
  transform: translate3d(2px, 1px, 0);
  text-shadow: 2px 0 var(--eh-accent-2);
}

.eh-glitch {
  animation: eh-glitch 2.2s infinite;
}

@keyframes eh-glitch {
  0%, 10%, 100% { transform: none; }
  2% { transform: translate3d(2px, 0, 0); }
  3% { transform: translate3d(-1px, 0, 0); }
  5% { transform: translate3d(3px, 0, 0); }
  6% { transform: translate3d(-1px, 0, 0); }
}

/* Telemetry strip under hero */

.eh-telemetry-strip {
  margin-top: 1.75rem;
  font-family: var(--eh-font-mono);
  font-size: 0.78rem;
  background: rgba(3, 6, 20, 0.95);
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.25);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 0 22px rgba(0, 255, 255, 0.25);
  padding: 0.45rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  align-items: center;
}

.eh-telemetry-strip span {
  white-space: nowrap;
}

.eh-telemetry-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(191, 255, 255, 0.85);
}

.eh-telemetry-kv {
  color: var(--eh-muted);
}

.eh-telemetry-kv b {
  color: var(--eh-text);
}
