/* Testnet explorer — extends hashmonkeys.cloud main theme */

.tn-hero-stats {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.tn-hero-stats .stat-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-card__hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.hero-stats .stat-card strong {
  display: block;
  line-height: 1.2;
  word-break: break-word;
}

.hero-stats .stat-card strong.stat-card__value--long {
  font-family: var(--font-sans);
  font-size: clamp(0.82rem, 2.4vw, 1.05rem);
  font-weight: 600;
  line-height: 1.28;
  color: var(--text);
}

.hero-stats .stat-card strong.stat-card__value--num {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--mint);
}

.tn-tabs {
  margin: 1rem 0 1.15rem;
}

.tn-tabs a {
  text-decoration: none;
}

.tn-visual-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tn-card {
  padding: 1.15rem 1.25rem;
  border-radius: calc(var(--r) + 2px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border);
  margin-bottom: 0.85rem;
}

.tn-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.tn-card__lead {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tn-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.tn-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.tn-row:last-child {
  border-bottom: none;
}

.tn-ring-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tn-ring {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}

.tn-ring__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.tn-ring__fill {
  fill: none;
  stroke: url(#tnRingGrad);
  stroke-width: 8;
  stroke-linecap: round;
}

.tn-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 0.65rem;
}

.tn-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--mint));
}

.tn-err {
  color: var(--rose, #fb7185);
  padding: 1rem;
}

.tn-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
}

.tn-blocks-head {
  display: grid;
  grid-template-columns: 4.5rem 1fr 6.5rem 5.5rem;
  gap: 0.75rem 1rem;
  padding: 0.45rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.tn-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tn-block-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 6.5rem 5.5rem;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(18, 14, 32, 0.72);
  border-left: 4px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tn-block-row:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.35);
}

.tn-block-row.learn-up {
  border-left-color: var(--mint);
  background: rgba(62, 255, 208, 0.06);
}

.tn-block-row.learn-flat {
  border-left-color: rgba(255, 255, 255, 0.25);
}

.tn-block-row.learn-down {
  border-left-color: var(--coral, #ff6b4a);
  background: rgba(255, 107, 74, 0.06);
}

.tn-block-row.learn-baseline {
  border-left-color: var(--violet);
}

.tn-block-row.learn-none {
  border-left-color: rgba(255, 255, 255, 0.12);
  opacity: 0.94;
}

.tn-block-row__index {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--mint);
}

.tn-block-row__index small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.tn-block-row__main {
  min-width: 0;
}

.tn-block-row__learn {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.tn-block-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tn-block-row__time {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}

.tn-block-row__hash {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
}

.tn-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.tn-pill--cpu {
  background: rgba(62, 255, 208, 0.12);
  color: var(--mint);
}

.tn-pill--gpu {
  background: rgba(167, 139, 250, 0.15);
  color: var(--violet);
}

.tn-pill--asic {
  background: rgba(255, 107, 74, 0.12);
  color: var(--coral, #ff6b4a);
}

.tn-pill--shares {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.tn-learn-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-top: 0.25rem;
}

.tn-learn-tag.learn-up {
  background: rgba(62, 255, 208, 0.15);
  color: var(--mint);
}

.tn-learn-tag.learn-flat {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.tn-learn-tag.learn-down {
  background: rgba(255, 107, 74, 0.15);
  color: var(--coral, #ff6b4a);
}

.tn-learn-tag.learn-baseline {
  background: rgba(167, 139, 250, 0.15);
  color: var(--violet);
}

.tn-learn-tag.learn-none {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.tn-tx-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(18, 14, 32, 0.72);
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.45rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tn-tx-row:hover {
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-1px);
}

.tn-tx-row__amount {
  font-weight: 700;
  color: var(--mint);
}

.tn-tx-row__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.tn-back a {
  color: var(--mint);
  text-decoration: none;
}

.tn-back a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .tn-blocks-head {
    display: none;
  }

  .tn-block-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .tn-block-row__hash {
    text-align: left;
  }

  .tn-block-row__time {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Network globe — HOOSATWORLD-inspired layout */
.tn-world {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tn-world__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.tn-world__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tn-world__sub {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 42rem;
}

.tn-world__brand {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(62, 255, 208, 0.65);
}

.tn-world__stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.tn-world-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.85rem 0.5rem;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid rgba(62, 255, 208, 0.12);
  background: linear-gradient(180deg, rgba(62, 255, 208, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
  text-align: center;
}

.tn-world-stat__val {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--text);
}

.tn-world-stat__lbl {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tn-world__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(340px, 44vw, 500px);
  border-radius: calc(var(--r) + 4px);
  border: 1px solid rgba(62, 255, 208, 0.15);
  background: radial-gradient(ellipse 80% 70% at 50% 45%, #0a1424 0%, #020408 72%);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 24px 48px rgba(0, 0, 0, 0.45);
}

.tn-world__canvas {
  display: block;
  width: 100%;
  height: clamp(340px, 44vw, 500px);
  min-height: 340px;
  max-height: 520px;
  cursor: grab;
  touch-action: none;
}

.tn-world__canvas:active {
  cursor: grabbing;
}

.tn-world-hint {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.85);
  background: rgba(2, 4, 8, 0.65);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.tn-world-popup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: min(280px, calc(100% - 2rem));
  padding: 0.85rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(62, 255, 208, 0.25);
  background: rgba(6, 12, 22, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.tn-world-popup__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
}

.tn-world-popup__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.tn-world-popup__label {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tn-world-popup__host {
  margin: 0 0 0.65rem;
  padding-right: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
}

.tn-world-popup__meta {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.tn-world-popup__meta div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.tn-world-popup__meta dt {
  margin: 0;
  color: var(--muted);
}

.tn-world-popup__meta dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}

.tn-world-table-wrap {
  overflow: auto;
  border-radius: calc(var(--r) + 2px);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.tn-world-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.tn-world-table th,
.tn-world-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tn-world-table th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.tn-world-table th:hover {
  color: var(--text);
}

.tn-world-table th.sorted {
  color: var(--mint);
}

.tn-world-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.tn-world-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tn-world-table tbody tr.active {
  background: rgba(62, 255, 208, 0.08);
}

.tn-world-table tbody tr.offline {
  opacity: 0.55;
}

.tn-world-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.tn-world-badge--on {
  background: rgba(62, 255, 208, 0.15);
  color: var(--mint);
}

@media (max-width: 960px) {
  .tn-world__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .tn-world__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tn-world-popup {
    top: auto;
    bottom: 2.5rem;
    right: 0.65rem;
    left: 0.65rem;
    width: auto;
  }
}

/* Governed evolution fork history */
.tn-fork-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tn-fork {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.tn-fork--forked {
  border-color: rgba(62, 255, 208, 0.35);
  background: rgba(62, 255, 208, 0.06);
}

.tn-fork--scheduled {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
}

.tn-fork--no-fork {
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.06);
}

.tn-fork--vetoed {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.tn-fork__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.tn-fork-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.tn-fork--forked .tn-fork-badge {
  color: var(--mint);
  background: rgba(62, 255, 208, 0.15);
}

.tn-fork--scheduled .tn-fork-badge {
  color: var(--violet);
}

.tn-fork--no-fork .tn-fork-badge {
  color: var(--rose, #fb7185);
}

.tn-fork__summary {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.tn-fork-gates {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tn-fork-gate {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tn-fork-gate--ok .tn-fork-gate__mark {
  color: var(--mint);
}

.tn-fork-gate--fail .tn-fork-gate__mark {
  color: var(--rose, #fb7185);
}

.tn-fork-gate__mark {
  font-weight: 700;
  width: 1rem;
  flex-shrink: 0;
}

.tn-fork-intro {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.tn-fork-tech {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
}

.tn-fork-tech summary {
  cursor: pointer;
  color: var(--muted);
}

/* ML specialist grid */
.tn-ml-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tn-ml-intro {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.tn-ml-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tn-ml-meta__chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tn-ml-meta__chip--focus {
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--violet);
}

.tn-ml-active {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(62, 255, 208, 0.06);
  border: 1px solid rgba(62, 255, 208, 0.2);
}

.tn-ml-active p {
  margin: 0.35rem 0 0;
}

.tn-ml-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .tn-ml-grid {
    grid-template-columns: 1fr;
  }
}

.tn-ml-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.18);
}

.tn-ml-card--strong {
  border-color: rgba(62, 255, 208, 0.35);
}

.tn-ml-card--ok {
  border-color: rgba(255, 255, 255, 0.12);
}

.tn-ml-card--watch {
  border-color: rgba(251, 191, 36, 0.35);
}

.tn-ml-card--weak {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.05);
}

.tn-ml-card__top {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.tn-ml-card__icon {
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.9;
}

.tn-ml-card__role {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.tn-ml-card__score {
  margin-left: auto;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mint);
  line-height: 1;
}

.tn-ml-card__score small {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
}

.tn-ml-card__bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.tn-ml-card__plain {
  margin: 0.55rem 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.tn-ml-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tn-ml-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.tn-ml-chip--focus {
  background: rgba(167, 139, 250, 0.18);
  color: var(--violet);
}

.tn-ml-chip--weak {
  background: rgba(251, 113, 133, 0.15);
  color: var(--rose, #fb7185);
}

.tn-ml-reason {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.tn-subhead {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tn-surv-components,
.tn-surv-legs {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tn-surv-comp,
.tn-surv-leg {
  display: grid;
  grid-template-columns: 7rem 1fr 3rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.82rem;
}

.tn-surv-comp__val,
.tn-surv-leg__val {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tn-evo-checks {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tn-evo-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tn-evo-check--ok .tn-fork-gate__mark {
  color: var(--mint);
}

.tn-fork-changes {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tn-block-row__miner {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}
