/* ============================================================
   Google Fonts — JetBrains Mono (headings/code) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS Custom Properties
   ============================================================ */

:root {
  --bg-deep: #0a0a0f;
  --bg-surface: #12121a;
  --bg-surface-hover: #1a1a26;
  --bg-surface-elevated: #1e1e2a;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.15);
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59, 130, 246, 0.12);
  --accent-blue-glow: rgba(59, 130, 246, 0.25);
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #55556a;
  --colour-success: #22c55e;
  --colour-warning: #f59e0b;
  --colour-error: #ef4444;
  --font-heading: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --max-width: 1400px;
}

/* ============================================================
   Base & Reset
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
}

/* Slow gradient sweep overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 50% 40% at 50% 0%,
    rgba(245, 158, 11, 0.04) 0%,
    transparent 70%
  );
  animation: gradientSweep 12s ease-in-out infinite alternate;
}

@keyframes gradientSweep {
  0% {
    background: radial-gradient(
      ellipse 50% 40% at 30% 0%,
      rgba(245, 158, 11, 0.04) 0%,
      transparent 70%
    );
  }
  100% {
    background: radial-gradient(
      ellipse 50% 40% at 70% 0%,
      rgba(59, 130, 246, 0.03) 0%,
      transparent 70%
    );
  }
}

/* ============================================================
   Particle Canvas — Background Network
   ============================================================ */

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* All content sits above the canvas */
header,
main,
footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #60a5fa;
  text-decoration: none;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Header — Hero Section
   ============================================================ */

header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 4rem 0 3rem;
  position: relative;
  background: linear-gradient(
    180deg,
    #08080d 0%,
    rgba(245, 158, 11, 0.06) 40%,
    var(--bg-deep) 100%
  );
  text-align: center;
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-amber-dim) 30%,
    var(--accent-amber-glow) 50%,
    var(--accent-amber-dim) 70%,
    transparent
  );
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--accent-amber), #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header h1::after {
  display: none;
}

.subtitle {
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 400;
}

.subtitle a {
  color: var(--accent-amber);
  font-family: var(--font-code);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  background: var(--accent-amber-dim);
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

.subtitle a:hover {
  background: var(--accent-amber-glow);
  color: var(--accent-amber);
}

/* ============================================================
   Hero CTA Buttons
   ============================================================ */

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent-amber);
  color: #0a0a0f;
  border: 1px solid var(--accent-amber);
}

.btn-primary:hover {
  background: #d97706;
  border-color: #d97706;
  color: #0a0a0f;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

/* ============================================================
   Hero Stat Pills
   ============================================================ */

.hero-stats {
  display: inline-flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2px;
  margin-bottom: 1.5rem;
}

.hero-stat {
  padding: 0.5rem 1.1rem;
  border-radius: calc(var(--radius-md) - 2px);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-code);
  font-size: 0.85rem;
}

.hero-stat:first-child {
  background: var(--accent-amber-dim);
}

.hero-stat .stat-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.hero-stat:nth-child(1) .stat-value { color: var(--accent-amber); }
.hero-stat:nth-child(2) .stat-value { color: var(--accent-blue); }
.hero-stat:nth-child(3) .stat-value { color: var(--colour-success); }

.hero-stat .stat-label {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ============================================================
   Audience Cards — Landing Page
   ============================================================ */

.audience-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 0 -2rem;
  padding: 2.5rem 2rem;
  background: linear-gradient(
    180deg,
    var(--bg-surface) 0%,
    var(--bg-surface-elevated) 100%
  );
  border-bottom: 1px solid var(--border-medium);
  border-top: 1px solid var(--border-medium);
}

.audience-card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}

.audience-card-operator {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.audience-card-agent {
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.audience-card .audience-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.audience-card-operator .audience-label { color: var(--accent-amber); }
.audience-card-agent .audience-label { color: var(--accent-blue); }

.audience-card h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.audience-intro {
  color: var(--text-secondary);
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.audience-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.audience-benefits li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
}

.audience-benefits li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.audience-card pre {
  margin: 0 0 1rem;
}

.audience-card code {
  display: block;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.5;
  font-family: var(--font-code);
  white-space: pre;
}

.audience-card-operator code { color: var(--accent-amber); }
.audience-card-agent code { color: var(--accent-blue); }

.audience-links {
  display: flex;
  gap: 0.65rem;
}

.audience-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.audience-links a:hover {
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

/* ============================================================
   Relay Status — Horizontal Bar with Pulsing Dots
   ============================================================ */

.relay-status {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.relay-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.relay-dot .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--dot-colour, #555);
  flex-shrink: 0;
  transition: background-color 0.3s;
}

/* Pulsing glow for connected relays (green dot) */
.relay-dot[style*="--dot-colour: #22c55e"] .dot {
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
  animation: relayPulseGreen 2s ease-in-out infinite;
}

/* Pulsing for connecting relays (amber dot) */
.relay-dot[style*="--dot-colour: #f59e0b"] .dot {
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  animation: relayPulseAmber 1s ease-in-out infinite;
}

@keyframes relayPulseGreen {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
  }
  50% {
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.7), 0 0 20px rgba(34, 197, 94, 0.3);
  }
}

@keyframes relayPulseAmber {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  }
  50% {
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7), 0 0 20px rgba(245, 158, 11, 0.3);
  }
}

.relay-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-code);
}

/* ============================================================
   Main Layout
   ============================================================ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

/* ============================================================
   Services Toolbar — Sticky Search + Filters + Live Status
   ============================================================ */

.services-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  margin: 0 -2rem;
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--colour-success);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
  animation: relayPulseGreen 2s ease-in-out infinite;
  flex-shrink: 0;
}

.toolbar-sep {
  width: 1px;
  height: 12px;
  background: var(--border-medium);
  flex-shrink: 0;
}

.relay-count-inline {
  color: var(--text-muted);
}

.toolbar-filters {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Full-width search bar — BIG and prominent */
#search {
  width: 100%;
  padding: 1.1rem 1.5rem;
  font-size: 1.2rem;
  font-family: var(--font-body);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  outline: none;
  color: var(--text-primary);
  background: rgba(18, 18, 26, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#search::placeholder {
  color: var(--text-muted);
}

#search:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-dim), 0 0 20px rgba(59, 130, 246, 0.08);
  background: rgba(18, 18, 26, 0.9);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Outlined filter pills — chunky, tappable */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
  line-height: 1.4;
}

.pill:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.pill:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Active pill — filled with accent */
.pill.active {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #0a0a0f;
  font-weight: 500;
}

.pill.active:hover {
  background: #d97706;
  border-color: #d97706;
}

/* ============================================================
   Services Grid
   ============================================================ */

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
}

/* ============================================================
   Service Card — Clean Single-Column Flow
   ============================================================ */

.service-card {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.25s;
  position: relative;
  /* Staggered entrance animation */
  opacity: 0;
  animation: cardEntrance 0.5s ease forwards;
}

.service-card:first-child {
  border-top: 1px solid var(--border-subtle);
}

/* Stagger card animation using nth-child */
.service-card:nth-child(1)  { animation-delay: 0.0s; }
.service-card:nth-child(2)  { animation-delay: 0.05s; }
.service-card:nth-child(3)  { animation-delay: 0.1s; }
.service-card:nth-child(4)  { animation-delay: 0.15s; }
.service-card:nth-child(5)  { animation-delay: 0.2s; }
.service-card:nth-child(6)  { animation-delay: 0.25s; }
.service-card:nth-child(7)  { animation-delay: 0.3s; }
.service-card:nth-child(8)  { animation-delay: 0.35s; }
.service-card:nth-child(9)  { animation-delay: 0.4s; }
.service-card:nth-child(10) { animation-delay: 0.45s; }
.service-card:nth-child(11) { animation-delay: 0.5s; }
.service-card:nth-child(12) { animation-delay: 0.55s; }
.service-card:nth-child(n+13) { animation-delay: 0.6s; }

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover highlight */
.service-card:hover {
  background: var(--bg-surface-hover);
}

/* --- Card Header Row: icon + name (left) … source + time (right) --- */

.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0; /* allow truncation */
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.service-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.service-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
  letter-spacing: -0.01em;
}

.service-name:hover {
  color: var(--accent-amber);
  text-decoration: none;
}

/* Service URL — small, subtle line below name */
.service-url {
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: -0.35rem;
}

.service-url:hover {
  color: var(--accent-blue);
}

/* Description — expandable */
.service-about {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.service-about.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

/* Health status dot in card header */
.health-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.3s;
}

.health-dot.health-unknown {
  background: var(--text-muted);
}

.health-dot.health-up {
  background: var(--colour-success);
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
}

.health-dot.health-down {
  background: var(--colour-error);
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.4);
}

/* Pricing row — collapsible when many */
.pricing-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pricing-overflow {
  font-size: 0.78rem;
  font-family: var(--font-code);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.pricing-overflow:hover {
  color: var(--accent-amber);
  border-color: var(--accent-amber-dim);
}

/* ============================================================
   Pricing Chips — Horizontal Inline List
   ============================================================ */

.pricing-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--accent-amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.12);
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.pricing-chip .cap-name {
  color: var(--text-primary);
  font-weight: 500;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-chip .cap-sep {
  color: var(--text-muted);
  font-weight: 300;
}

.pricing-chip .cap-price {
  color: var(--accent-amber);
  font-weight: 600;
}

/* ============================================================
   Badges — Glass-morphism Style
   ============================================================ */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.4;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Payment method badges — blue tint glass */
.badge.payment {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Source badge — sits in card-header-right */
.badge.source {
  font-size: 0.68rem;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Self-announced: green tint */
.badge.source-nostr {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.15);
}

/* Indexed: amber tint */
.badge.source-indexed {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

/* Topic badges — subtle glass */
.badge.topic {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ============================================================
   Card Meta Row — Payment + Topics + Pubkey in one line
   ============================================================ */

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.card-meta .badges {
  display: contents; /* flatten badges into the meta flow */
}

/* Separator dot between badge groups */
.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   Card Footer — Pubkey + Timestamp
   ============================================================ */

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pubkey {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pubkey code {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.copy-pubkey {
  background: none;
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-code);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.copy-pubkey:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue-dim);
  background: var(--accent-blue-dim);
}

.copy-pubkey:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.timestamp {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-code);
}

/* ============================================================
   Card Action Buttons
   ============================================================ */

.card-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
}

.btn-action:hover {
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  text-decoration: none;
}

.btn-action:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ============================================================
   Loading & Empty States — Skeleton Pulse
   ============================================================ */

.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 5rem 1rem;
  font-size: 1rem;
  font-family: var(--font-code);
  animation: skeletonPulse 2s ease-in-out infinite;
}

.loading.error {
  animation: none;
  color: var(--colour-error);
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 5rem 1rem;
  font-size: 1rem;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================================================
   Announce CTA Section — Gradient Background
   ============================================================ */

.announce-cta {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.1) 0%,
    var(--bg-surface-elevated) 40%,
    rgba(59, 130, 246, 0.06) 100%
  );
  border-top: 1px solid var(--border-medium);
  border-bottom: 1px solid var(--border-medium);
  padding: 3.5rem 2.5rem;
  text-align: center;
  margin: 3.5rem -2rem 0;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

/* Subtle top highlight */
.announce-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-amber-dim) 50%,
    transparent
  );
}

.announce-cta h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.announce-cta > p {
  color: var(--text-secondary);
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.announce-cta pre {
  margin: 0 auto 2rem;
  max-width: 680px;
  text-align: left;
}

.announce-cta code {
  display: block;
  background: #0d0d14;
  color: #c4c4d0;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
  font-family: var(--font-code);
  white-space: pre;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.cta-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.cta-links a:hover {
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  text-decoration: none;
}

.cta-links a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2rem;
}

footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent-amber);
}

/* ============================================================
   Live Counter Bounce
   ============================================================ */

.count-updated {
  display: inline-block;
  animation: countBounce 0.3s ease-out;
  color: var(--accent-amber);
}

@keyframes countBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ============================================================
   New Service Flash
   ============================================================ */

.service-new {
  animation: serviceFlash 3s ease-out forwards, cardEntrance 0.5s ease forwards;
  border-left: 3px solid var(--accent-amber);
}

@keyframes serviceFlash {
  0% {
    background: rgba(245, 158, 11, 0.12);
    border-left-color: var(--accent-amber);
    box-shadow: inset 4px 0 12px rgba(245, 158, 11, 0.15);
  }
  100% {
    background: var(--bg-surface);
    border-left-color: transparent;
    box-shadow: inset 4px 0 12px rgba(245, 158, 11, 0);
  }
}

/* ============================================================
   Responsive — Tablet (≤ 1024px)
   ============================================================ */

@media (max-width: 1024px) {
  header h1 {
    font-size: 2.2rem;
  }

  .audience-section {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Responsive — Mobile (≤ 640px)
   ============================================================ */

@media (max-width: 640px) {
  header {
    padding: 2rem 0 1.75rem;
  }

  .header-content {
    padding: 0 1.25rem;
  }

  header h1 {
    font-size: 1.75rem;
  }

  main {
    padding: 1.25rem;
  }

  .service-card {
    padding: 1rem 1.25rem;
  }

  .services-toolbar {
    margin: 0 -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .relay-status {
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
  }

  .announce-cta {
    padding: 2.5rem 1.25rem;
    margin: 2.5rem -1.25rem 0;
  }

  .audience-section {
    margin: 0 -1.25rem;
    padding: 2rem 1.25rem;
  }

  .announce-cta code {
    font-size: 0.75rem;
    padding: 1.25rem;
  }

  .cta-links {
    flex-direction: column;
    align-items: center;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .card-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .card-meta {
    gap: 0.35rem;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pricing-chip {
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
  }

  .pricing-chip .cap-name {
    max-width: 18ch;
  }

  .card-actions {
    flex-direction: column;
  }

  .btn-action {
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-stat {
    justify-content: center;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn {
    justify-content: center;
  }

  .audience-card {
    padding: 1.5rem 1.25rem;
  }

  .audience-card code {
    font-size: 0.72rem;
    padding: 1rem;
  }
}

/* ============================================================
   Reduced Motion — Respect user preference
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  body::after {
    animation: none;
  }

  .service-card {
    animation: none;
    opacity: 1;
  }

  .relay-dot .dot {
    animation: none;
  }

  .loading {
    animation: none;
  }

  #particle-canvas {
    display: none;
  }

  .count-updated {
    animation: none;
  }

  .service-new {
    animation: none;
    opacity: 1;
    border-left: 3px solid var(--accent-amber);
  }
}
