:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-deep: #040a09;
  --surface: rgba(13, 27, 25, 0.82);
  --surface-strong: #10201e;
  --surface-soft: rgba(184, 255, 61, 0.045);
  --line: rgba(205, 237, 225, 0.12);
  --line-strong: rgba(184, 255, 61, 0.34);
  --text: #f0f7f2;
  --muted: #8ea29b;
  --muted-strong: #b3c4be;
  --acid: #b8ff3d;
  --acid-soft: rgba(184, 255, 61, 0.14);
  --cyan: #68f5d2;
  --amber: #ffc966;
  --danger: #ff6f7d;
  --shadow: 0 24px 80px rgba(0, 34, 27, 0.34);
  --radius: 18px;
  --radius-small: 10px;
  --shell: min(1240px, calc(100vw - 40px));
  --mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 8%, rgba(62, 176, 138, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--acid);
  color: var(--bg-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.ambient,
.grid-noise {
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

.ambient {
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.12;
}

.ambient-one {
  top: 4rem;
  right: -17rem;
  background: var(--acid);
}

.ambient-two {
  top: 58rem;
  left: -20rem;
  background: var(--cyan);
}

.grid-noise {
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(182, 234, 215, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 234, 215, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(280px, 600px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 78px;
  padding: 12px max(20px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(4, 10, 9, 0.8);
  backdrop-filter: blur(22px) saturate(140%);
}

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

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(184, 255, 61, 0.12);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--acid);
  content: "";
}

.brand-mark::before {
  top: -2px;
}

.brand-mark::after {
  bottom: -2px;
}

.brand-mark span {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 7px 0 var(--acid), -7px 0 var(--acid);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.search {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 4px 5px 4px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.search:focus-within {
  border-color: var(--line-strong);
  background: rgba(184, 255, 61, 0.045);
  box-shadow: 0 0 0 4px rgba(184, 255, 61, 0.055);
}

.search-icon {
  color: var(--acid);
  font-size: 22px;
  line-height: 1;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}

.search input::placeholder {
  color: #72877f;
}

.search kbd {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.search button {
  min-width: 84px;
  min-height: 36px;
  margin-left: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--acid);
  color: #10190b;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.search button:hover {
  box-shadow: 0 8px 28px rgba(184, 255, 61, 0.24);
  transform: translateY(-1px);
}

.network-pill,
.live-chip,
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

.network-pill {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 10px;
}

.status-dot,
.live-chip i,
.footer-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 14px var(--acid);
}

.status-dot.is-degraded {
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
}

.status-dot.is-offline {
  background: var(--danger);
  box-shadow: 0 0 14px var(--danger);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: 72px;
  min-height: 620px;
  padding-block: 88px 72px;
}

.eyebrow,
.section-kicker {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

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

.eyebrow-line {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(184, 255, 61, 0.8);
}

.hero h1 {
  max-width: 760px;
  margin: 24px 0 22px;
  font-size: clamp(3.2rem, 6.5vw, 6.35rem);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.hero h1 em {
  color: var(--acid);
  font-family: Georgia, serif;
  font-weight: 400;
  text-shadow: 0 0 44px rgba(184, 255, 61, 0.16);
}

.hero-copy > p {
  max-width: 620px;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--acid);
  color: #10190b;
  box-shadow: 0 12px 40px rgba(184, 255, 61, 0.12);
}

.button-primary:hover {
  box-shadow: 0 16px 42px rgba(184, 255, 61, 0.24);
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-strong);
}

.button-ghost:hover {
  border-color: var(--line-strong);
}

.chain-orbit {
  position: relative;
  width: min(460px, 42vw);
  aspect-ratio: 1;
  justify-self: center;
}

.chain-orbit::before {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 255, 61, 0.13), transparent 66%);
  filter: blur(16px);
  content: "";
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(164, 226, 205, 0.12);
  border-radius: 50%;
}

.orbit-ring-one {
  inset: 4%;
}

.orbit-ring-two {
  inset: 18%;
  border-style: dashed;
  animation: spin 38s linear infinite;
}

.orbit-ring-three {
  inset: 34%;
  border-color: rgba(184, 255, 61, 0.26);
  box-shadow: inset 0 0 36px rgba(184, 255, 61, 0.03);
}

.orbit-core {
  position: absolute;
  inset: 38%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(7, 16, 15, 0.92);
  box-shadow: 0 0 55px rgba(184, 255, 61, 0.09);
  text-align: center;
}

.orbit-core span,
.orbit-core small,
.orbit-label span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.orbit-core strong {
  margin: 3px 0;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.25rem);
}

.orbit-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 18px var(--acid);
}

.orbit-node-one {
  top: 15%;
  left: 25%;
}

.orbit-node-two {
  right: 12%;
  bottom: 32%;
}

.orbit-node-three {
  bottom: 9%;
  left: 43%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.orbit-label {
  position: absolute;
  display: flex;
  min-width: 112px;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(7, 16, 15, 0.82);
  backdrop-filter: blur(12px);
}

.orbit-label strong {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
}

.orbit-label-two strong {
  color: var(--cyan);
}

.orbit-label-one {
  top: 4%;
  right: 4%;
}

.orbit-label-two {
  bottom: 9%;
  left: 1%;
}

.stats {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 16, 15, 0.58);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card-featured {
  background: linear-gradient(145deg, rgba(184, 255, 61, 0.08), transparent 75%);
}

.stat-card-accent::after {
  position: absolute;
  right: -48px;
  bottom: -68px;
  width: 150px;
  height: 150px;
  border: 22px solid rgba(104, 245, 210, 0.04);
  border-radius: 50%;
  content: "";
}

.stat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.live-chip {
  color: var(--acid);
  font-size: 8px;
}

.live-chip i {
  width: 5px;
  height: 5px;
  animation: pulse 1.8s ease-out infinite;
}

.stat-card > strong {
  display: block;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 520;
  letter-spacing: -0.045em;
}

.stat-card > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.spark-bars {
  position: absolute;
  right: 22px;
  bottom: 20px;
  left: 22px;
  display: flex;
  height: 28px;
  align-items: end;
  gap: 4px;
  opacity: 0.55;
}

.spark-bars i {
  flex: 1;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--acid);
}

.mini-rule,
.lag-track {
  position: absolute;
  right: 24px;
  bottom: 25px;
  left: 24px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.mini-rule span,
.lag-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(104, 245, 210, 0.4);
  transition: width 600ms ease;
}

.stat-signal {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.stat-signal i {
  flex: 1;
  height: 2px;
  background: var(--line);
}

.stat-signal i:first-of-type,
.stat-signal i:nth-of-type(2) {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(184, 255, 61, 0.3);
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 68px;
  border-bottom: 1px solid var(--line);
}

.view-tab {
  position: relative;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-tab::after {
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 2px;
  background: transparent;
  content: "";
}

.view-tab:hover,
.view-tab.is-active {
  color: var(--text);
}

.view-tab.is-active::after {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(184, 255, 61, 0.7);
}

.view-updated {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.65fr);
  gap: 18px;
  padding-block: 28px 96px;
}

.data-panel,
.search-results {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 70px rgba(0, 20, 17, 0.2);
  overflow: hidden;
}

.data-panel-full {
  grid-column: 1 / -1;
}

.hub-grid {
  display: grid;
  gap: 18px;
  padding-bottom: 96px;
}

.hub-panel {
  scroll-margin-top: 96px;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 18px;
  padding-bottom: 96px;
}

.directory-panel,
.governance-panel {
  min-width: 0;
  scroll-margin-top: 96px;
}

.directory-toolbar {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.directory-filter,
.software-action {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-strong);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.directory-filter.is-active,
.software-action.is-primary {
  border-color: var(--line-strong);
  background: var(--acid-soft);
  color: var(--acid);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 720px;
  overflow-y: auto;
}

.software-card {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.software-card:nth-child(2n) {
  border-right: 0;
}

.software-card.is-app {
  background: linear-gradient(145deg, rgba(184, 255, 61, 0.055), transparent 70%);
}

.software-card-top,
.proposal-head,
.proposal-footer,
.vote-meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.software-kind,
.proposal-id {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.software-kind.is-realm {
  color: var(--acid);
}

.software-kind.is-package {
  color: var(--cyan);
}

.software-card h3,
.proposal-card h3 {
  margin: 16px 0 7px;
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.software-path,
.proposal-author {
  display: block;
  overflow: hidden;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 9px;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.software-card p,
.proposal-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.software-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.software-action {
  flex: 1;
  border-radius: 8px;
}

.software-action:hover,
.directory-filter:hover {
  border-color: var(--line-strong);
  color: var(--acid);
}

.governance-rule {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(104, 245, 210, 0.025);
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 9px;
}

.proposal-list {
  display: grid;
  max-height: 720px;
  overflow-y: auto;
}

.proposal-card {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.proposal-card:last-child {
  border-bottom: 0;
}

.proposal-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

.vote-meters {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.vote-meter-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.vote-meter-label strong {
  color: var(--muted-strong);
  font-weight: 600;
}

.vote-track {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.vote-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--muted);
}

.vote-track.is-yes b {
  background: var(--cyan);
}

.vote-track.is-no b {
  background: var(--danger);
}

.vote-track.is-abstain b {
  background: var(--amber);
}

.proposal-footer {
  align-items: flex-start;
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.panel-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
}

.hub-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.hub-summary > div {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(184, 255, 61, 0.035), transparent 72%);
}

.hub-summary > div:last-child {
  border-right: 0;
}

.hub-summary span,
.hub-summary strong {
  display: block;
}

.hub-summary span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.hub-summary strong {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 540;
}

.validator-table,
.network-table {
  min-width: 920px;
}

.validator-identity,
.source-identity,
.health-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.validator-identity code {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 10px;
}

.validator-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(184, 255, 61, 0.2);
  border-radius: 8px;
  background: var(--acid-soft);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
}

.power-share {
  display: grid;
  grid-template-columns: 42px 76px;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 9px;
}

.power-share i {
  display: block;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.power-share b {
  display: block;
  height: 100%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(184, 255, 61, 0.36);
}

.source-identity {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.source-identity strong {
  font-size: 11px;
  font-weight: 560;
}

.source-identity small,
.health-cell small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.health-cell {
  min-width: 220px;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.health-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.health-badge::before {
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.health-badge.is-signing,
.health-badge.is-healthy,
.health-badge.is-verified,
.health-badge.is-accepted {
  border-color: rgba(104, 245, 210, 0.22);
  color: var(--cyan);
}

.health-badge.is-signing::before,
.health-badge.is-healthy::before,
.health-badge.is-verified::before,
.health-badge.is-accepted::before {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.health-badge.is-degraded,
.health-badge.is-active,
.health-badge.is-unverified,
.health-badge.is-unavailable,
.health-badge.is-not-checked,
.health-badge.is-unknown {
  color: var(--amber);
}

.health-badge.is-degraded::before,
.health-badge.is-active::before,
.health-badge.is-unverified::before,
.health-badge.is-unavailable::before,
.health-badge.is-not-checked::before,
.health-badge.is-unknown::before {
  background: var(--amber);
}

.health-badge.is-missing,
.health-badge.is-rejected,
.health-badge.is-stale,
.health-badge.is-quarantined,
.health-badge.is-disagreement {
  border-color: rgba(255, 111, 125, 0.24);
  color: var(--danger);
}

.health-badge.is-missing::before,
.health-badge.is-rejected::before,
.health-badge.is-stale::before,
.health-badge.is-quarantined::before,
.health-badge.is-disagreement::before {
  background: var(--danger);
}

tr.is-quarantined {
  background: rgba(255, 111, 125, 0.025);
}

.provenance-strip {
  min-height: 46px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(104, 245, 210, 0.02);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.panel-header {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 540;
  letter-spacing: -0.025em;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 20px;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--acid);
  transform: rotate(4deg);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(205, 237, 225, 0.075);
  text-align: left;
  white-space: nowrap;
}

th {
  height: 42px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr[data-detail]:hover {
  background: rgba(184, 255, 61, 0.035);
  cursor: pointer;
}

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

.mono,
.hash,
.height-link {
  font-family: var(--mono);
}

.height-link {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.height-link::before {
  margin-right: 7px;
  color: var(--acid);
  content: "#";
}

.hash {
  color: var(--muted-strong);
  font-size: 10px;
}

.age {
  color: var(--muted);
}

.tx-badge,
.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
}

.tx-badge.has-transactions {
  border-color: rgba(184, 255, 61, 0.22);
  background: var(--acid-soft);
  color: var(--acid);
}

.status-badge::before {
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  content: "";
}

.status-badge.success {
  color: var(--cyan);
}

.status-badge.success::before {
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.status-badge.failed {
  color: var(--danger);
}

.status-badge.failed::before {
  background: var(--danger);
}

.action-cell strong,
.target-cell strong {
  display: block;
  max-width: 250px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 550;
  text-overflow: ellipsis;
}

.action-cell small,
.target-cell small {
  display: block;
  max-width: 250px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
}

.load-more {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted-strong);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.load-more:hover {
  background: var(--acid-soft);
  color: var(--acid);
}

.load-more:disabled {
  cursor: wait;
  opacity: 0.5;
}

.realm-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.realm-list {
  flex: 1;
  padding: 10px 16px;
}

.realm-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid rgba(205, 237, 225, 0.07);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.realm-item:last-child {
  border-bottom: 0;
}

.realm-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(184, 255, 61, 0.18);
  border-radius: 8px;
  background: var(--acid-soft);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
}

.realm-item strong,
.realm-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realm-item strong {
  font-size: 11px;
  font-weight: 560;
}

.realm-item small {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.realm-item > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.realm-callout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 16px 16px;
  padding: 17px;
  border: 1px solid rgba(184, 255, 61, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(184, 255, 61, 0.08), rgba(104, 245, 210, 0.025));
}

.realm-callout > span {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.realm-callout strong {
  font-size: 13px;
  font-weight: 520;
}

.realm-callout button {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.legend-success {
  background: var(--cyan);
}

.legend-failed {
  background: var(--danger);
}

.table-message td,
.empty-state {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.table-message.is-warning td {
  color: var(--amber);
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 32px;
}

.empty-state.compact {
  min-height: 120px;
}

.search-results {
  margin-bottom: 96px;
}

.search-results[hidden] {
  display: none;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 10px;
}

.result-summary code {
  max-width: 100%;
  overflow: hidden;
  color: var(--acid);
  text-overflow: ellipsis;
}

.result-provenance {
  margin-left: auto;
  color: var(--muted);
}

.quarantine-notice {
  padding: 13px 24px;
  border-bottom: 1px solid rgba(255, 201, 102, 0.18);
  background: rgba(255, 201, 102, 0.055);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
}

.result-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.result-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 14px 24px;
  border: 0;
  background: var(--surface-strong);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease;
}

.result-card:hover {
  background: #142823;
}

.public-goods {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
  padding-block: 96px 120px;
  border-top: 1px solid var(--line);
}

.public-goods-intro h2 {
  margin: 14px 0 20px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 1;
}

.public-goods-intro p {
  max-width: 520px;
  margin: 0;
  color: var(--muted-strong);
}

.public-links {
  display: flex;
  flex-direction: column;
}

.public-links a {
  display: grid;
  grid-template-columns: 42px 1fr 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  transition: color 180ms ease, padding 180ms ease;
}

.public-links a:first-child {
  border-top: 1px solid var(--line);
}

.public-links a:hover {
  padding-inline: 10px;
  color: var(--acid);
}

.public-links span,
.public-links small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.public-links strong {
  font-size: 14px;
  font-weight: 540;
}

.public-links i {
  font-style: normal;
}

.detail-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0a1513;
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.detail-dialog::backdrop {
  background: rgba(1, 7, 6, 0.78);
  backdrop-filter: blur(10px);
}

.dialog-shell > header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 21, 19, 0.95);
}

.dialog-shell h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

#detail-content {
  max-height: calc(100vh - 150px);
  padding: 24px;
  overflow-y: auto;
}

.package-provenance {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.source-files {
  display: grid;
  gap: 16px;
}

.source-file {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.source-file h3 {
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}

.source-code,
.render-preview {
  margin: 0;
  padding: 16px;
  overflow: auto;
  background: #06100e;
  color: #cae1d8;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.detail-field {
  min-width: 0;
  padding: 16px;
  background: var(--surface-strong);
}

.detail-field.is-wide {
  grid-column: 1 / -1;
}

.detail-field span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-field strong,
.detail-field code {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.detail-messages {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-message {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.detail-message strong {
  display: block;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
}

.detail-message p {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #10201e;
  box-shadow: var(--shadow);
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 8, 7, 0.6);
}

.footer-inner {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p,
.footer-status {
  color: var(--muted);
  font-size: 10px;
}

.footer-status i {
  width: 5px;
  height: 5px;
}

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 255, 61, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(184, 255, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 255, 61, 0); }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: auto minmax(260px, 1fr);
  }

  .network-pill {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr minmax(300px, 0.7fr);
    gap: 28px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card:nth-child(2) {
    border-right: 0;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .public-goods {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --shell: min(100% - 28px, 1240px);
  }

  .topbar {
    position: relative;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .topbar .brand {
    justify-self: start;
  }

  .search-top {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-block: 72px 52px;
  }

  .chain-orbit {
    width: min(520px, 90vw);
    margin-top: 20px;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .data-panel-full {
    grid-column: 1;
  }

  .hub-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-summary > div:nth-child(2) {
    border-right: 0;
  }

  .hub-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .software-card,
  .software-card:nth-child(2n) {
    border-right: 0;
  }

  .realm-panel {
    min-height: 460px;
  }

  .result-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .result-card > span:last-child {
    display: none;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 30px;
  }
}

@media (max-width: 560px) {
  .search kbd {
    display: none;
  }

  .search button {
    min-width: 72px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .chain-orbit {
    width: 92vw;
    transform: scale(0.9);
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 170px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-card:last-child {
    border-bottom: 0;
  }

  .view-tabs {
    overflow-x: auto;
  }

  .view-updated {
    display: none;
  }

  .panel-header {
    min-height: 80px;
    padding: 16px;
  }

  .panel-meta {
    max-width: 130px;
  }

  .result-provenance {
    width: 100%;
    margin-left: 0;
  }

  .legend {
    display: none;
  }

  th,
  td {
    padding-inline: 14px;
  }

  .public-links a {
    grid-template-columns: 30px 1fr auto;
  }

  .public-links small {
    display: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-field.is-wide {
    grid-column: 1;
  }

  .proposal-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
