.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 8px auto 40px;
}

.validator-page {
  display: grid;
  gap: 20px;
  padding-bottom: 36px;
}

#holders {
  scroll-margin-top: 90px;
}

#warnings {
  scroll-margin-top: 90px;
}

#holders.is-pending {
  min-height: calc(100vh - 140px);
}

.main {
  border: 1px solid var(--surface-line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.06)), var(--surface-paper);
  box-shadow: var(--surface-shadow);
  padding: 18px 20px;
}

.validator-hero > p {
  margin: 10px 0 0;
  text-transform: uppercase;
  font-size: 20px;
  text-align: center;
  max-width: 100%;
}

.validator-hero h1 {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

.validator-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.network-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.network-block {
  text-align: center;
}

.network-title {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 20px;
}

.stake-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.stake-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #00000057;
}

.stake-icon-link:hover {
  opacity: 0.85;
}

.manual-line {
  margin: 8px 0 0;
  font-size: 15px;
  text-transform: none;
}

.validator-hero .manual-line {
  margin: 10px 0 0;
  font-size: 15px;
  text-transform: none;
  text-align: center;
}

.manual-line a {
  color: #4a2d00;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

.manual-line a:hover {
  opacity: 0.8;
}

.network-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.buy-2 {
  display: inline-block;
  padding: 2px 10px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  border: 1px solid;
  border-radius: 5px;
  background: #333;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-head h2 {
  margin: 0;
  text-transform: uppercase;
}

.status-pill {
  border: 1px solid #00000028;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #ffffff3d;
}

.status-pill[data-state='error'] { border-color: #8d3a3a; }
.status-pill[data-state='ok'] { border-color: #4d7a4d; }

.stats-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.holders-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  min-height: 102px;
  border: 1px solid #00000020;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.20));
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.03);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(0, 0, 0, 0.18);
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

.stat-card[data-tone="good"]::before {
  background: linear-gradient(180deg, rgba(52,105,52,0.95), rgba(85,145,85,0.65));
}

.stat-card[data-tone="warn"]::before {
  background: linear-gradient(180deg, rgba(165,118,36,0.95), rgba(205,154,66,0.65));
}

.stat-card[data-tone="neutral"]::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.22));
}

.stat-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #000000a3;
}

.with-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hint {
  cursor: help;
  font-size: 13px;
  line-height: 1;
}

.stat-value {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.is-loading {
  color: #00000080;
}

.chart-card {
  margin-top: 12px;
  border: 1px solid #0000001f;
  border-radius: 14px;
  padding: 12px;
  background: #ffffff28;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}

.chart-head h3,
.chart-head p {
  margin: 0;
}

.chart-range {
  display: inline-flex;
  gap: 6px;
}

.chart-range-btn {
  border: 1px solid #00000028;
  border-radius: 999px;
  background: #fff8;
  color: #1c1c1c;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}

.chart-range-btn.is-active {
  background: #1f1f1f;
  color: #fff;
}

.chart-range-btn:hover {
  opacity: 0.85;
}

.chart-wrap {
  position: relative;
  margin-top: 10px;
  min-height: 280px;
}

#bondedTrendChart {
  width: 100%;
  height: 280px;
  display: block;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #00000028;
  border-radius: 10px;
  background: #fff6;
}

.sources,
.holders-note {
  margin: 12px 2px 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.meter {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: #00000017;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #64472a, #cd9b42);
}

.holders-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.holder-item {
  border: 1px solid #00000017;
  border-radius: 12px;
  background: #ffffff30;
  overflow: hidden;
}

.holder-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.holder-item-stub {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0000000a;
  color: #3337;
  font-size: 12px;
}

.holder-name {
  font-size: 11px;
  padding: 8px;
  min-height: 40px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.holders-empty {
  margin-top: 12px;
  border: 1px dashed #0000002f;
  border-radius: 12px;
  padding: 12px;
}

.holders-export-btn {
  border: 1px solid #00000030;
  border-radius: 999px;
  background: #fff8;
  padding: 4px 10px;
  font-size: 12px;
  text-transform: lowercase;
  cursor: pointer;
}

.holders-export-wrap {
  position: relative;
  display: none;
  gap: 6px;
}

.holders-export-wrap.is-visible {
  display: inline-flex;
}

.holder-item {
  position: relative;
}

.holder-count {
  position: absolute;
  right: 6px;
  bottom: 34px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #000c;
  color: #fff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.holder-name a {
  color: inherit;
  text-decoration: none;
}

.holder-meta {
  font-size: 11px;
  padding: 0 8px 8px;
  color: #333b;
}

.delegation-warning {
  margin-top: 16px;
}

.mini-muted {
  font-size: 12px;
  color: #3339;
}

@media (max-width: 960px) {
  .network-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .holders-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 24px; }
}
