:root {
  --bg: #09090b;
  --bg-soft: #18181b;
  --bg-card: rgba(24, 24, 27, 0.75);
  --line: #27272a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --green: #39ff14;
  --green-soft: rgba(57, 255, 20, 0.12);
  --yellow: #ffb000;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 16px;
  --shadow: 0 0 0 1px rgba(57,255,20,0.04), 0 20px 40px rgba(0,0,0,0.35);
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(rgba(57,255,20,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,20,0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 50px 50px, 50px 50px, auto;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font: inherit;
}
button { cursor: pointer; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.mono, .button, .nav-link, .brand-name, .eyebrow, .meta, .stat-value, .pill, .footer-note, .field-label {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9,9,11,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(57,255,20,0.45);
  border-radius: 12px;
  background: #111114;
  padding: 8px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green);
  font-size: 1rem;
}

.brand-sub {
  color: var(--muted-2);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.mobile-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--green);
  background: var(--green-soft);
}

.nav-cta {
  margin-left: 8px;
  background: var(--green);
  color: #0c0c0f;
  font-weight: 700;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #101013;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel .nav-link {
  display: block;
  border-radius: 0;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

main { min-height: calc(100vh - 240px); }
section { padding: 72px 0; }
.page-shell { padding: 56px 0 80px; }

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(110px);
  pointer-events: none;
}

.hero::before {
  width: 280px;
  height: 280px;
  background: rgba(57,255,20,0.16);
  left: -40px;
  top: 80px;
}

.hero::after {
  width: 340px;
  height: 340px;
  background: rgba(0,245,255,0.08);
  right: -60px;
  bottom: 20px;
}

.hero-card,
.panel,
.card,
.info-box,
.cta-box,
.empty-state,
.notice,
.resource-body,
.accordion-item,
.contact-card,
.group-card,
.group-detail,
.group-summary,
.legend-box,
.meta-strip,
.inline-section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-grid,
.two-col,
.grid-3,
.grid-2,
.grid-4 {
  display: grid;
  gap: 24px;
}

.hero-grid,
.two-col { grid-template-columns: 1.2fr 0.8fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.hero-copy h1,
.page-shell h1,
.section-title,
.cta-title {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  line-height: 1.05;
  margin: 0 0 18px;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 6vw, 4.9rem);
}
.page-shell h1 { font-size: clamp(2rem, 4vw, 3rem); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(57,255,20,0.25);
  border-radius: 999px;
  background: rgba(57,255,20,0.05);
  color: var(--green);
  font-size: 0.85rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(57,255,20,0.9);
}

.accent { color: var(--green); }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }

.hero-copy p,
.body-copy,
.panel p,
.card p,
.cta-box p,
.page-intro {
  color: var(--muted);
  line-height: 1.7;
}

.button-row,
.inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(57,255,20,0.25);
  color: var(--text);
  background: #131317;
  transition: 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(57,255,20,0.5);
}

.button-primary {
  background: var(--green);
  color: #0b0b0d;
  border-color: var(--green);
  font-weight: 700;
}

.button-ghost {
  background: transparent;
  color: var(--green);
}

.card,
.panel,
.info-box,
.cta-box,
.notice,
.resource-body,
.contact-card,
.group-card,
.inline-section {
  padding: 24px;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.18);
}

.icon-box img,
.brand-mark img,
.social-icon,
.card-inline-icon,
.inline-icon {
  width: 22px;
  height: 22px;
}

.card h3,
.panel h3,
.info-box h3,
.contact-card h3,
.group-card h3,
.inline-section h3 {
  margin: 0 0 10px;
}

.code-block {
  background: #0f0f12;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}

.code-block p {
  margin: 8px 0;
  color: var(--muted);
}

.footer {
  background: #111114;
  border-top: 1px solid var(--line);
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 54px 0;
}

.footer h4 {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.footer li + li { margin-top: 10px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--green); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 36px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-note { color: var(--muted-2); font-size: 0.78rem; }

.section-heading {
  margin-bottom: 28px;
}

.section-heading p,
.page-intro {
  max-width: 760px;
}

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

.list-clean li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  margin-top: 10px;
}

.list-clean li:first-child { margin-top: 0; }

.list-marker {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.badge.active { background: rgba(57,255,20,0.14); color: var(--green); }
.badge.inactive { background: rgba(113,113,122,0.16); color: #c4c4cc; }
.badge.unknown { background: rgba(255,176,0,0.16); color: var(--yellow); }
.badge.warning { background: rgba(255,176,0,0.12); color: var(--yellow); }
.badge.red { background: rgba(239,68,68,0.14); color: #fca5a5; }
.badge.blue { background: rgba(59,130,246,0.16); color: #93c5fd; }

.inline-meta,
.group-meta,
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #121216;
  color: var(--muted);
  font-size: 0.82rem;
}

.notice.red {
  border-color: rgba(239,68,68,0.3);
  background: rgba(127,29,29,0.18);
}
.notice.yellow {
  border-color: rgba(255,176,0,0.22);
  background: rgba(133,77,14,0.1);
}
.notice.green {
  border-color: rgba(57,255,20,0.22);
  background: rgba(57,255,20,0.06);
}
.notice.blue {
  border-color: rgba(59,130,246,0.22);
  background: rgba(30,64,175,0.12);
}

.step-list {
  display: grid;
  gap: 18px;
}

.step-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 18px;
  align-items: flex-start;
}

.step-number {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.22);
  color: var(--green);
  font-weight: 700;
}

.table-like {
  display: grid;
  gap: 14px;
}

.table-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  background: rgba(0,0,0,0.12);
}

.table-row strong { color: var(--text); }
.table-row span { color: var(--muted); }

.accordion-item + .accordion-item { margin-top: 14px; }
.accordion-button {
  width: 100%;
  padding: 22px 24px;
  border: 0;
  color: var(--text);
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}
.accordion-button:hover { color: var(--green); }
.accordion-panel {
  padding: 0 24px 24px;
  color: var(--muted);
  display: none;
}
.accordion-item.open .accordion-panel { display: block; }
.accordion-chevron { transition: transform 0.18s ease; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

.filter-shell,
.meta-strip {
  padding: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 180px auto;
  gap: 14px;
  align-items: center;
}

.field,
.select,
.search-field {
  width: 100%;
  min-height: 48px;
  background: #0d0d10;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
}

.field::placeholder { color: var(--muted-2); }
.search-wrap { position: relative; }
.search-wrap .inline-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}
.search-wrap .field { padding-left: 44px; }

.toggle-group {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.toggle-button {
  min-height: 48px;
  min-width: 52px;
  border: 0;
  background: #121216;
  color: var(--muted);
}

.toggle-button.active {
  background: var(--green);
  color: #0d0d10;
  font-weight: 700;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 18px 0 22px;
}

.result-count { color: var(--muted); }
.result-count strong { color: var(--green); }
.link-button {
  border: 0;
  background: transparent;
  color: var(--muted);
}
.link-button:hover { color: var(--green); }

.map-shell {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

#group-map {
  width: 100%;
  height: 520px;
  background: #101014;
  border-radius: var(--radius);
}

.leaflet-container {
  background: #101014;
  color: #111;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #1b1b20;
  color: var(--text);
}
.leaflet-popup-content { margin: 16px; min-width: 210px; }
.leaflet-control-zoom a {
  background: #16161b !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}

.group-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #121216;
  border: 2px solid rgba(57,255,20,0.85);
  overflow: hidden;
  box-shadow: 0 0 18px rgba(57,255,20,0.35);
}
.group-map-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.group-map-marker.inactive {
  border-color: #6b7280;
  box-shadow: none;
}
.group-map-marker.unknown {
  border-color: var(--yellow);
  box-shadow: 0 0 16px rgba(255,176,0,0.18);
}
.group-map-marker.selected {
  transform: scale(1.08);
}

.map-overlay {
  position: absolute;
  z-index: 500;
  background: rgba(17,17,20,0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.map-overlay.top-left { top: 16px; left: 16px; }
.map-overlay.bottom-right { right: 16px; bottom: 16px; }

.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.group-card {
  cursor: pointer;
  transition: 0.18s ease;
}
.group-card:hover,
.group-card.selected {
  border-color: rgba(57,255,20,0.45);
}

.group-head {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 16px;
  align-items: start;
}

.group-logo {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f0f12;
  border: 1px solid var(--line);
}
.group-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.group-card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.group-card .about {
  margin: 16px 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.group-detail {
  margin-top: 16px;
  display: none;
}
.group-card.selected .group-detail { display: block; }

.link-pills,
.social-links,
.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-list .pill,
.link-pills .pill,
.social-links a,
.inline-tag {
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 50px 24px;
}

.resource-item + .resource-item,
.contact-card + .contact-card { margin-top: 16px; }
.resource-content {
  display: none;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 16px;
}
.resource-item.open .resource-content { display: block; }
.template-box {
  padding: 16px;
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-x: auto;
}

.copy-row {
  margin-top: 14px;
}

.kicker {
  color: var(--green);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-card .icon-box { margin-bottom: 0; flex: 0 0 auto; }

.meta-strip {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.status-inline { display: inline-flex; align-items: center; gap: 8px; }
.legend-list { display: grid; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.84rem; }
.legend-dot {
  width: 12px; height: 12px; border-radius: 999px;
}
.legend-dot.active { background: var(--green); }
.legend-dot.inactive { background: #71717a; }
.legend-dot.unknown { background: var(--yellow); }

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 1040px) {
  .hero-grid,
  .two-col,
  .footer-grid,
  .grid-4,
  .grid-3,
  .groups-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .site-nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .hero-grid,
  .two-col,
  .grid-3,
  .grid-2,
  .grid-4,
  .footer-grid,
  .groups-grid,
  .filter-row,
  .group-head,
  .step-item {
    grid-template-columns: 1fr;
  }

  .group-head {
    gap: 12px;
  }

  .footer-bottom,
  .meta-strip,
  .results-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .button-row,
  .inline-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .button { width: 100%; }
}


.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.hero-stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(24,24,27,0.62);
}
.hero-stat strong {
  display: block;
  color: var(--green);
  font-size: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hero-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}
.hero-side-panel { align-self: start; }
.compact-meta { margin-top: 18px; }
.profile-action-row { margin-top: 16px; }
.button-small { padding: 10px 14px; font-size: 0.92rem; }
.group-profile-page { padding-top: 56px; padding-bottom: 48px; }
.breadcrumbs {
  display: flex;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.breadcrumbs a:hover { color: var(--green); }
.group-profile-header {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
}
.profile-logo-wrap {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(9,9,11,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.profile-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.profile-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.profile-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3rem);
}
.profile-links { margin-top: 18px; }
.group-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.wide-panel { grid-column: 1 / -1; }
.profile-meta-list {
  display: grid;
  gap: 14px;
}
.profile-meta-list div {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.profile-meta-list div:first-child {
  border-top: 0;
  padding-top: 0;
}
.profile-meta-list strong {
  color: var(--text);
  font-size: 0.95rem;
}
.profile-meta-list span,
.contact-list { color: var(--muted); }
.contact-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}
.help-grid article p { margin-bottom: 0; }

@media (max-width: 900px) {
  .hero-stats,
  .group-profile-grid { grid-template-columns: 1fr; }
  .group-profile-header { grid-template-columns: 1fr; }
  .profile-logo-wrap { width: 120px; height: 120px; }
}
