/* ============================================================
   DataLineage Doctor — Bioluminescent Abyss
   Concept: deep-ocean organisms that glow in the dark.
   Neon mint (#00ffaa) + vivid purple (#bf5af2) + hot pink (#ff2d78)
   on a near-black ocean-deep base.
   ============================================================ */

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  /* Neon palette */
  --neon-green:  #00ffaa;
  --neon-purple: #bf5af2;
  --neon-pink:   #ff2d78;
  --neon-cyan:   #00e5ff;

  /* Base canvas */
  --bg-deep:     #050a0f;

  /* Text */
  --text:        #c8f0e0;    /* mint-tinted white — NOT neutral */
  --text-muted:  #7ab0a0;    /* desaturated mint */
  --text-dim:    #3d6b5e;    /* very dim mint */

  /* Semantic (matched to palette) */
  --good:        #00ffaa;
  --warn:        #ffb800;
  --bad:         #ff2d78;
  --processing:  #bf5af2;

  /* Glass surface */
  --panel:       rgba(0, 255, 170, 0.04);
  --panel-hover: rgba(0, 255, 170, 0.08);
  --line:        rgba(0, 255, 170, 0.1);

  /* Glow shadows */
  --glow-green:  0 0 14px rgba(0, 255, 170, 0.4), 0 0 50px rgba(0, 255, 170, 0.1);
  --glow-purple: 0 0 14px rgba(191, 90, 242, 0.4), 0 0 50px rgba(191, 90, 242, 0.1);
  --glow-pink:   0 0 14px rgba(255, 45, 120, 0.45), 0 0 40px rgba(255, 45, 120, 0.1);
  --glow-panel:  0 0 0 1px rgba(0, 255, 170, 0.14),
                 0 8px 48px rgba(0, 0, 0, 0.7),
                 inset 0 1px 0 rgba(0, 255, 170, 0.06);
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  /*
    Three-stop gradient — very dark.
    Upper-left: inky navy-green tint
    Centre:     pure deep black
    Lower-right: deep purple-black
    Result: no single flat black, slight organic depth.
  */
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%,  rgba(0, 40, 28, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 70% 70% at 90% 90%,  rgba(50, 0, 80, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 50% 50%,  rgba(0, 20, 40, 0.3)  0%, transparent 80%),
    #050a0f;
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

/* Subtle scanline texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 170, 0.013) 2px,
    rgba(0, 255, 170, 0.013) 4px
  );
  pointer-events: none;
  z-index: 0;
}

main.container { position: relative; z-index: 1; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  margin: 0 0 0.5rem;
}

/* Gradient text — the signature visual */
h2 {
  background: linear-gradient(100deg, #00ffaa 0%, #00e5ff 40%, #bf5af2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h3 {
  background: linear-gradient(90deg, #00ffaa 0%, #bf5af2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h4 {
  color: var(--neon-purple);
  font-size: 0.85rem;
}

p  { margin: 0 0 0.5rem; line-height: 1.7; }
ol, ul { padding-left: 1.4rem; margin: 0.5rem 0; }
li { margin-bottom: 0.4rem; line-height: 1.65; color: var(--text); }
a  { color: var(--neon-green); }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Header ───────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 15, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 255, 170, 0.12);
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(0, 255, 170, 0.03);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo { width: 40px; height: 40px; }

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  background: linear-gradient(90deg, #00ffaa, #bf5af2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Nav ──────────────────────────────────────────────────── */
.nav { display: flex; align-items: center; gap: 1.4rem; }

.nav a,
.nav-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav a:hover,
.nav-btn:hover:not(:disabled) {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 170, 0.7);
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: inherit;
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Page header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1.25rem;
}

.page-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--neon-pink);
  /* subtle pink glow on the label */
  text-shadow: 0 0 12px rgba(255, 45, 120, 0.6);
  margin: 0 0 0.5rem;
}

/* ── Glass panel ──────────────────────────────────────────── */
.panel {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--glow-panel);
  /* Gradient border via outline trick — unique touch */
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

/* Glowing gradient border using ::before pseudo */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,255,170,0.22), rgba(191,90,242,0.15), rgba(255,45,120,0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* ── Incidents table ──────────────────────────────────────── */
.incidents-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 255, 170, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--glow-panel);
  position: relative;
  border: 1px solid rgba(0, 255, 170, 0.12);
}

th {
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  /* Gradient text on headers */
  background: linear-gradient(90deg, #00ffaa, #bf5af2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid rgba(0, 255, 170, 0.15);
  background-color: rgba(0, 255, 170, 0.04);
}

td {
  text-align: left;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
}

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

tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

tbody tr:hover {
  background: rgba(0, 255, 170, 0.05);
  /* Left accent bar on hover — unique */
  box-shadow: inset 3px 0 0 var(--neon-green);
}

.primary-text {
  font-weight: 600;
  color: #e0f5ee;
}

.secondary-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Processing — purple glow pill */
.status-processing {
  background: rgba(191, 90, 242, 0.12);
  color: #d8aafc;
  border: 1px solid rgba(191, 90, 242, 0.4);
  box-shadow: 0 0 10px rgba(191, 90, 242, 0.25);
}

/* Complete — green glow pill */
.status-complete {
  background: rgba(0, 255, 170, 0.1);
  color: #00ffaa;
  border: 1px solid rgba(0, 255, 170, 0.35);
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.2);
}

/* Failed — pink glow pill */
.status-failed {
  background: rgba(255, 45, 120, 0.1);
  color: #ff6ea0;
  border: 1px solid rgba(255, 45, 120, 0.4);
  box-shadow: 0 0 10px rgba(255, 45, 120, 0.2);
}

.confidence-high {
  background: rgba(0, 255, 170, 0.1);
  color: #00ffaa;
  border: 1px solid rgba(0, 255, 170, 0.35);
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.2);
}

.confidence-medium {
  background: rgba(255, 184, 0, 0.1);
  color: #ffcd57;
  border: 1px solid rgba(255, 184, 0, 0.35);
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.2);
}

.confidence-low {
  background: rgba(255, 45, 120, 0.1);
  color: #ff6ea0;
  border: 1px solid rgba(255, 45, 120, 0.4);
  box-shadow: 0 0 10px rgba(255, 45, 120, 0.2);
}

/* ── Links ────────────────────────────────────────────────── */
.text-link {
  color: var(--neon-green);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: text-shadow 0.2s ease, color 0.15s ease;
}
.text-link:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--neon-green);
}

/* ── Muted / dim ──────────────────────────────────────────── */
.muted { color: var(--text-muted); font-size: 0.875rem; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 170, 0.12);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--glow-panel);
  position: relative;
}

.empty-state::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,255,170,0.22), rgba(191,90,242,0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.empty-state h3 {
  /* Override gradient-text for standalone empty state */
  -webkit-text-fill-color: #e0f5ee;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state p { color: var(--text-muted); }

/* ── Detail hero ──────────────────────────────────────────── */
.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0 1.25rem;
}

.detail-hero h2 {
  font-size: 1.45rem;
  word-break: break-all;
  margin-bottom: 0.3rem;
}

.subtext {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 0;
  letter-spacing: 0.04em;
}

.detail-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Detail grid ──────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Inline code ──────────────────────────────────────────── */
.inline-code {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.8em;
  /* Purple-tinted mono pill */
  background: rgba(191, 90, 242, 0.12);
  color: #d8aafc;
  border: 1px solid rgba(191, 90, 242, 0.28);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* ── Confidence ring ──────────────────────────────────────── */
.confidence-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid rgba(0, 255, 170, 0.15);
  display: grid;
  place-items: center;
  text-align: center;
  margin-top: 1rem;
  transition: box-shadow 0.3s ease;
}

.confidence-ring:hover {
  box-shadow: var(--glow-green);
}

.confidence-ring.confidence-high {
  border-color: var(--neon-green);
  box-shadow: 0 0 18px rgba(0, 255, 170, 0.3);
}

.confidence-ring.confidence-medium {
  border-color: var(--warn);
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.3);
}

.confidence-ring.confidence-low {
  border-color: var(--neon-pink);
  box-shadow: 0 0 18px rgba(255, 45, 120, 0.3);
}

.confidence-score {
  font-size: 1.45rem;
  font-weight: 700;
  display: block;
  background: linear-gradient(90deg, #00ffaa, #bf5af2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.confidence-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

/* ── Lineage graph ────────────────────────────────────────── */
.lineage-graph {
  position: relative;
  height: 390px;
  width: 100%;
  border-radius: 16px;
  margin-top: 0.85rem;
  /* Very dark base — essential for node/edge visibility */
  background: rgba(2, 6, 18, 0.9);
  border: 1px solid rgba(0, 255, 170, 0.18);
  box-shadow:
    inset 0 0 60px rgba(0, 255, 170, 0.03),
    0 0 0 1px rgba(0, 255, 170, 0.08);
}

/* ── Detail split ─────────────────────────────────────────── */
.detail-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.2rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 0.9rem;
  align-items: flex-start;
}

/* Pulsing neon dot — signature micro-animation */
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px rgba(0, 255, 170, 0.8);
  margin-top: 0.3rem;
  flex-shrink: 0;
  animation: pulse-glow 2.4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 255, 170, 0.7); }
  50%       { box-shadow: 0 0 18px rgba(0, 255, 170, 1), 0 0 36px rgba(0, 255, 170, 0.4); }
}

.timeline-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #e0f5ee;
}

.timeline-meta {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}

.timeline-desc {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Blast radius ─────────────────────────────────────────── */
.blast-level {
  margin: 1rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon-pink);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(255, 45, 120, 0.5);
}

.blast-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.blast-table th {
  background-color: transparent;
  padding: 0.4rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  background: linear-gradient(90deg, #00ffaa 0%, #bf5af2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blast-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--text);
}

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

.entity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 255, 170, 0.1);
  color: var(--neon-green);
  font-size: 0.65rem;
  margin-right: 0.4rem;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(0, 255, 170, 0.25);
}

.entity-dashboard {
  background: rgba(0, 229, 255, 0.1);
  color: var(--neon-cyan);
  border-color: rgba(0, 229, 255, 0.3);
}

.entity-mlmodel {
  background: rgba(191, 90, 242, 0.12);
  color: #d8aafc;
  border-color: rgba(191, 90, 242, 0.3);
}

/* ── Error page ───────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(191, 90, 242, 0.3);
  border-top-color: #d8aafc;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

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

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-header,
  .detail-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .detail-status {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }

  tr {
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0, 255, 170, 0.12);
    border-radius: 14px;
    background: var(--panel);
    overflow: hidden;
  }

  td { border: none; border-bottom: 1px solid var(--line); }
  td:last-child { border-bottom: none; }
}

/* ============================================================
   LANDING PAGE STYLES
   All tokens inherited from :root above.
   ============================================================ */

/* ── Landing hero ─────────────────────────────────────────── */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 1.5rem 0 2.5rem;
  min-height: 70vh;
}

.landing-hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* h1 — signature gradient, larger than h2 */
.hero-headline {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0.5rem 0 0;
  background: linear-gradient(110deg, #00ffaa 0%, #00e5ff 40%, #bf5af2 80%, #ff2d78 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Subtle text glow — unique depth */
  filter: drop-shadow(0 0 24px rgba(0, 255, 170, 0.18));
}

.hero-bridge {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 48ch;
}

.hero-solution {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 48ch;
  border-left: 2px solid var(--neon-green);
  padding-left: 1rem;
  /* Faint glow on the left bar */
  box-shadow: -4px 0 16px rgba(0, 255, 170, 0.15);
}

.hero-brand-inline {
  color: var(--neon-green);
  font-weight: 700;
  -webkit-text-fill-color: var(--neon-green);
}

/* ── CTA button ───────────────────────────────────────────── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.85rem 2rem;
  background: rgba(0, 255, 170, 0.1);
  border: 1px solid rgba(0, 255, 170, 0.5);
  border-radius: 12px;
  color: var(--neon-green);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(0, 255, 170, 0.15), inset 0 1px 0 rgba(0, 255, 170, 0.1);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.15s ease, border-color 0.2s ease;
}

.cta-btn:hover {
  background: rgba(0, 255, 170, 0.18);
  border-color: rgba(0, 255, 170, 0.9);
  box-shadow: 0 0 36px rgba(0, 255, 170, 0.35), 0 0 80px rgba(0, 255, 170, 0.1), inset 0 1px 0 rgba(0, 255, 170, 0.15);
  transform: translateY(-2px);
  color: #fff;
}

.cta-btn:active { transform: translateY(0); }

.cta-arrow {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.cta-btn:hover .cta-arrow { transform: translateX(4px); }

/* ── Hero visual — decorative lineage graph ───────────────── */
.hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hg-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 1.25rem 1.5rem 2rem;
  background: rgba(0, 255, 170, 0.03);
  border: 1px solid rgba(0, 255, 170, 0.12);
  border-radius: 24px;
  box-shadow: var(--glow-panel);
  position: relative;
  width: 100%;
  max-width: 360px;
}

.hg-node {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(0, 255, 170, 0.25);
  background: rgba(6, 15, 26, 0.9);
  color: var(--text);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.hg-failed {
  border-color: rgba(255, 45, 120, 0.6);
  background: rgba(26, 4, 18, 0.9);
  color: #ff8ab3;
  box-shadow: 0 0 18px rgba(255, 45, 120, 0.25);
  animation: failed-pulse 2s ease-in-out infinite;
}

@keyframes failed-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 45, 120, 0.2); }
  50%       { box-shadow: 0 0 28px rgba(255, 45, 120, 0.5), 0 0 60px rgba(255, 45, 120, 0.15); }
}

.hg-mid {
  border-color: rgba(0, 255, 170, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 170, 0.15);
}

.hg-downstream {
  border-color: rgba(191, 90, 242, 0.5);
  background: rgba(18, 10, 30, 0.9);
  color: #d8aafc;
  box-shadow: 0 0 10px rgba(191, 90, 242, 0.2);
}

.hg-connector {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 45, 120, 0.5), rgba(0, 255, 170, 0.5));
  margin: 0 auto;
}

.hg-connector-down {
  background: linear-gradient(to bottom, rgba(255, 45, 120, 0.7), rgba(0, 255, 170, 0.4));
}

.hg-fork {
  display: flex;
  gap: 0.75rem;
  margin-top: 0;
}

.hg-fork-left,
.hg-fork-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hg-connector-fork {
  background: linear-gradient(to bottom, rgba(0, 255, 170, 0.4), rgba(191, 90, 242, 0.5));
  width: 2px;
  height: 28px;
}

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

.hg-dot-pink   { background: #ff2d78; box-shadow: 0 0 8px rgba(255, 45, 120, 0.9); }
.hg-dot-green  { background: #00ffaa; box-shadow: 0 0 8px rgba(0, 255, 170, 0.9); animation: pulse-glow 2.4s ease-in-out infinite; }
.hg-dot-purple { background: #bf5af2; box-shadow: 0 0 8px rgba(191, 90, 242, 0.9); }
.hg-dot-sm     { width: 6px; height: 6px; }

.hg-legend {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
  align-items: center;
}

.hg-legend span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── Feature cards ────────────────────────────────────────── */
.landing-features {
  padding: 2rem 0 3rem;
}

.features-eyebrow {
  text-align: center;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(0, 255, 170, 0.22),
    0 16px 56px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(0, 255, 170, 0.1);
}

.feature-icon {
  font-size: 2rem;
  line-height: 1;
}

.feature-title {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(90deg, #00ffaa 0%, #bf5af2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.feature-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* ── Landing footer ───────────────────────────────────────── */
.landing-footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  border-top: 1px solid rgba(0, 255, 170, 0.08);
  color: var(--text-dim);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.landing-footer strong {
  color: var(--text-muted);
}

.heart {
  color: #ff2d78;
  display: inline-block;
  text-shadow: 0 0 10px rgba(255, 45, 120, 0.8);
  animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.22); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  56%       { transform: scale(1); }
}

/* ── Landing responsive ───────────────────────────────────── */
@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 3rem 0 1rem;
    gap: 2rem;
  }

  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 600px) {
  .hero-headline { font-size: 1.7rem; }
  .cta-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   INFO NOTEPAD (Sticky Note Style)
   ============================================================ */
.notepad-container {
  position: relative;
}

.notepad {
  display: none;
  position: absolute;
  top: calc(100% + 1.25rem);
  right: -0.5rem;
  width: 290px;
  /* Parchment / Post-it yellow — distinct from the abyss theme but harmonious */
  background: #fffbe6;
  color: #2c3e50;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  font-family: "IBM Plex Sans", sans-serif;
  z-index: 1000;
  transform-origin: top right;
  animation: notepad-reveal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notepad-reveal {
  from { opacity: 0; transform: scale(0.9) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* The "paper" lines */
.notepad::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 23px,
    rgba(0, 0, 0, 0.04) 23px,
    rgba(0, 0, 0, 0.04) 24px
  );
  pointer-events: none;
}

/* The sticky note fold effect */
.notepad::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 20px 20px;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
}

.notepad.active {
  display: block;
}

.notepad h4 {
  color: #8b4513; /* SaddleBrown */
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(139, 69, 19, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notepad h4::before {
  content: "🗒️";
  font-size: 1rem;
}

.notepad ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notepad li {
  margin-bottom: 0.85rem;
  line-height: 1.4;
  position: relative;
}

.notepad .note-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a08060;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.notepad a {
  color: #1565c0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease;
  word-break: break-all;
}

.notepad a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.nav-btn-info {
  cursor: pointer;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-btn-info:hover .info-icon {
  transform: scale(1.1) rotate(5deg);
}

.info-icon {
  transition: transform 0.2s ease;
}