:root {
  --bg: #090b14;
  --bg-soft: #111522;
  --bg-card: rgba(20, 25, 40, 0.82);
  --bg-card-strong: rgba(18, 23, 36, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --border-blue: rgba(109, 125, 255, 0.26);
  --text: #f5f7fb;
  --muted: #a7aec2;
  --blue: #6d7dff;
  --blue-strong: #4d63ff;
  --green: #19c37d;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #090b14;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 8% 10%, rgba(109, 125, 255, 0.18), transparent 24%),
    radial-gradient(circle at 92% 18%, rgba(123, 60, 255, 0.18), transparent 26%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.5;
  pointer-events: none;
  transform: translateZ(0);
}

.bg-orb {
  display: none;
}

.container {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 72px;
  contain: layout style;
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 400px);
  align-items: center;
  gap: 42px;
  margin-bottom: 34px;
}

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

.brand-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin-top: 14px;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--muted);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(109, 125, 255, 0.12);
  color: #d7ddff;
  border: 1px solid rgba(109, 125, 255, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

/* TOP CARDS */

.epoch-card,
.stake-card,
.delegate-card {
  background: linear-gradient(180deg, rgba(109, 125, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-blue);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.epoch-card {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
}

.epoch-label,
.stake-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

/* epoch body: arc + info side by side */
.epoch-body {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* SVG arc */
.epoch-arc-wrap {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  position: relative;
}

.epoch-arc-svg {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 0 10px rgba(109, 125, 255, 0.35));
}

.epoch-arc-fill {
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.epoch-arc-pct-text {
  fill: var(--text);
  font-size: 18px;
  font-weight: 800;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.04em;
}

.epoch-arc-sub-text {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 600;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* info column */
.epoch-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.epoch-value {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.epoch-subvalue {
  color: #d7ddff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.epoch-eta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.epoch-slot-detail {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: 0.02em;
}

.epoch-progress {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.epoch-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6d7dff 0%, #7b3cff 55%, #a855f7 100%);
  box-shadow: 0 0 10px rgba(109, 125, 255, 0.5);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* HERO STATS */

.hero-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 420px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 34px;
}

/* STAKE CARD */

.stake-card {
  padding: 22px 26px;
  width: 100%;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.stake-inline {
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) repeat(3, max-content);
  align-items: center;
  column-gap: 42px;
  row-gap: 18px;
  width: 100%;
}

.stake-main {
  min-width: 0;
}

.stake-value {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stake-subvalue {
  margin-top: 8px;
  color: #d7ddff;
  font-size: 15px;
  line-height: 1.45;
}

.stake-metrics {
  display: contents;
}

.stake-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.stake-stat-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.stake-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.stake-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #19c37d;
  box-shadow: 0 0 8px rgba(25, 195, 125, 0.6);
  animation: pulseGreen 1.4s infinite ease-in-out;
  will-change: transform, opacity;
}

.status-dot.down {
  background: #ff5d5d;
  box-shadow: 0 0 8px rgba(255, 93, 93, 0.6);
  animation: pulseRed 1.4s infinite ease-in-out;
  will-change: transform, opacity;
}

@keyframes pulseGreen {
  0% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.45; transform: scale(0.9); }
}

@keyframes pulseRed {
  0% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.45; transform: scale(0.9); }
}

/* DELEGATE CARD */

.delegate-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.delegate-card-header {
  margin-bottom: 16px;
}

.delegate-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.delegate-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.delegate-connect-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.delegate-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.connected-wallet-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.connected-wallet-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.connected-wallet-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.wallet-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wallet-balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.wallet-balance-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  text-align: right;
}

.stake-btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: #161616;
  background: linear-gradient(180deg, #ffd85a 0%, #f5b700 100%);
  box-shadow: 0 4px 14px rgba(245, 183, 0, 0.28);
  transition: transform 0.15s ease, opacity 0.15s ease;
  will-change: transform;
}

.stake-btn:hover {
  transform: translateY(-1px);
}

.stake-btn:active {
  transform: translateY(0);
}

/* delegate input/button row */

.delegate-controls .delegate-action {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 18px;
  align-items: center;
  width: 100%;
}

.delegate-controls .stake-input-wrap {
  position: relative;
  width: 100%;
}

.delegate-controls .stake-input {
  width: 100%;
  height: 52px;
  padding: 0 86px 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.9);
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.delegate-controls .stake-input:focus {
  border-color: rgba(109, 125, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(109, 125, 255, 0.08);
}

.delegate-controls .stake-input::placeholder {
  color: #8e96ad;
  opacity: 1;
}

.delegate-controls .max-stake-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.delegate-controls .max-stake-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.delegate-controls #stakeBtn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
  background: linear-gradient(180deg, #ffd85a 0%, #f5b700 100%);
  color: #161616;
}

/* SECTION */

.section {
  margin-top: 12px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: -2px 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* MODE CARDS */

.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 10px;
  margin-bottom: 34px;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
  will-change: transform;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 125, 255, 0.38);
}

.mode-card.active {
  border-color: rgba(109, 125, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(109, 125, 255, 0.24), var(--shadow);
}

.mode-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.mode-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(109, 125, 255, 0.15);
  color: #eef2ff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.mode-tag {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.mode-tag.recommended {
  color: #dff9ed;
  border-color: rgba(25, 195, 125, 0.28);
  background: rgba(25, 195, 125, 0.12);
}

.mode-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.mode-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.mode-card ul {
  margin: 0;
  padding-left: 18px;
  color: #edf1ff;
}

.mode-card li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.mode-card li:last-child {
  margin-bottom: 0;
}

/* OPTIONAL PANELS / COMMANDS */

.command-panel,
.output-panel,
.code-card {
  background: rgba(10, 14, 24, 0.92);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.command-panel,
.output-panel {
  padding: 24px;
  margin-top: 24px;
}

.panel-title {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.panel-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.code-card {
  position: relative;
  padding: 18px 20px;
  overflow-x: auto;
}

.code-card pre,
.code-card code,
.command-output,
#commandOutput {
  margin: 0;
  color: #eef2ff;
  font-size: 14px;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.copy-btn,
.primary-btn,
button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--blue), var(--blue-strong));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(77, 99, 255, 0.2);
  transition: transform 0.15s ease, opacity 0.15s ease;
  will-change: transform;
}

.copy-btn:hover,
.primary-btn:hover,
button:hover {
  transform: translateY(-1px);
}

.copy-btn:active,
.primary-btn:active,
button:active {
  transform: translateY(0);
}

/* FORM */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 26px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 700;
  color: #e8edff;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 15px;
  outline: none;
  min-height: 58px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(109, 125, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(109, 125, 255, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: #7f889f;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.helper-text,
.form-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* GENERATOR */

.generator-shell {
  background: rgba(12, 16, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-top: 18px;
}

.generator-header {
  margin-bottom: 24px;
}

.generator-eyebrow {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.generator-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.generator-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 760px;
}

.generator-form-card {
  background: rgba(18, 23, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-top: 22px;
}

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.generator-actions button,
.generator-actions .copy-btn,
.generator-actions .primary-btn {
  min-width: 210px;
}

.generator-output-card {
  background: rgba(18, 23, 36, 0.9);
  border: 1px solid rgba(109, 125, 255, 0.18);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.generator-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.generator-output-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.generator-output-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.command-output-wrap {
  background: rgba(8, 12, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 18px 20px;
  overflow-x: auto;
}

.generator-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.generator-mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
}

.generator-mini-card-title {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.generator-mini-card-value {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

/* FOOTER */

.footer {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* HELPERS */

.hidden {
  display: none !important;
}

.center {
  text-align: center;
}

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

.success {
  color: var(--green);
}

/* RESPONSIVE */

@media (max-width: 1180px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }

  .mode-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .generator-mini-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .generator-shell,
  .generator-form-card,
  .generator-output-card {
    padding: 20px;
  }
}

@media (max-width: 820px) {
  .container {
    padding: 36px 18px 56px;
  }

  .brand-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .brand-logo {
    width: 84px;
    height: 84px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .epoch-value {
    font-size: 42px;
  }

  .stake-value {
    font-size: 28px;
  }

  .stake-inline {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .stake-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
  }
}

@media (max-width: 700px) {
  .delegate-controls .delegate-action {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .delegate-controls #stakeBtn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 28px 14px 44px;
  }

  .hero {
    gap: 22px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-badges {
    gap: 8px;
  }

  .badge {
    font-size: 12px;
    padding: 8px 12px;
  }

  .epoch-card,
  .stake-card,
  .delegate-card,
  .mode-card,
  .command-panel,
  .output-panel,
  .code-card,
  .generator-shell,
  .generator-form-card,
  .generator-output-card {
    border-radius: 18px;
    padding: 18px;
  }

  .epoch-value {
    font-size: 35px;
  }

  .epoch-subvalue,
  .stake-subvalue {
    font-size: 14px;
  }

  .mode-card h3 {
    font-size: 24px;
  }

  .copy-btn,
  .primary-btn,
  button,
  .generator-actions button,
  .generator-actions .copy-btn,
  .generator-actions .primary-btn {
    width: 100%;
    min-width: 0;
  }

  .copy-row {
    justify-content: stretch;
  }

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

  .generator-title {
    font-size: 24px;
  }
}

/* ─── RAKURAI VALIDATORS SECTION ─── */

.validators-section {
  margin-bottom: 34px;
}

/* TOGGLE BUTTON (header row) */
.validators-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(109,125,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid var(--border-blue);
  border-radius: 20px;
  padding: 20px 24px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-shadow: var(--shadow);
}

.validators-toggle:hover {
  border-color: rgba(109,125,255,0.45);
  background: linear-gradient(180deg, rgba(109,125,255,0.16), rgba(255,255,255,0.03));
}

.validators-toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.validators-toggle-left {
  min-width: 0;
}

.validators-toggle-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.eyebrow-inline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(109,125,255,0.12);
  border: 1px solid rgba(109,125,255,0.24);
  border-radius: 999px;
  padding: 3px 9px;
}

.validators-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.validators-toggle-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.validators-count-badge {
  background: rgba(109, 125, 255, 0.14);
  border: 1px solid rgba(109, 125, 255, 0.32);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #d7ddff;
  white-space: nowrap;
}

.validators-chevron {
  width: 22px;
  height: 22px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.validators-toggle[aria-expanded="true"] .validators-chevron {
  transform: rotate(180deg);
}

/* COLLAPSIBLE BODY */
.validators-body {
  display: none;
  border: 1px solid var(--border-blue);
  border-top: none;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
}

.validators-body.open {
  display: block;
}

.validators-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
}

.validators-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.validators-table thead tr {
  border-bottom: 1px solid var(--border);
}

.validators-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  user-select: none;
}

.validators-table th.sortable {
  cursor: pointer;
  transition: color 0.12s ease;
}

.validators-table th.sortable:hover {
  color: var(--text);
}

.validators-table th.active-sort {
  color: #d7ddff;
}

.sort-icon {
  opacity: 0.5;
  font-size: 10px;
  margin-left: 3px;
}

.validators-table th.active-sort .sort-icon {
  opacity: 1;
  color: var(--blue);
}

/* FEATURED ROW (LFV) */
.val-row-featured {
  background: linear-gradient(90deg, rgba(109,125,255,0.08), rgba(109,125,255,0.02)) !important;
  border-left: 3px solid var(--blue);
}

.val-row-featured:hover {
  background: linear-gradient(90deg, rgba(109,125,255,0.14), rgba(109,125,255,0.04)) !important;
}

.val-featured-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(109,125,255,0.14);
  border: 1px solid rgba(109,125,255,0.28);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
}

.validators-table td {
  padding: 13px 18px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.validators-table tbody tr:last-child td {
  border-bottom: none;
}

.validators-table tbody tr {
  transition: background 0.12s ease;
}

.validators-table tbody tr:hover {
  background: rgba(109, 125, 255, 0.05);
}

/* validator name cell */
.val-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.val-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(109, 125, 255, 0.18);
  border: 1px solid rgba(109, 125, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #d7ddff;
  flex-shrink: 0;
  overflow: hidden;
}

.val-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.val-name {
  font-weight: 700;
  color: var(--text);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.val-vote {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  margin-top: 2px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* APY cell */
.val-apy {
  font-size: 16px;
  font-weight: 800;
  color: #19c37d;
  white-space: nowrap;
}

.val-apy-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* commission */
.val-commission {
  font-weight: 700;
  white-space: nowrap;
}

.val-commission.zero {
  color: #19c37d;
}

/* stake */
.val-stake {
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
}

/* uptime */
.val-uptime {
  font-weight: 700;
  white-space: nowrap;
}
.val-uptime.high { color: #19c37d; }
.val-uptime.mid  { color: #ffd85a; }
.val-uptime.low  { color: #ff5d5d; }

/* wiz score */
.val-score {
  font-weight: 700;
  white-space: nowrap;
}
.val-score.high { color: #19c37d; }
.val-score.mid  { color: #ffd85a; }
.val-score.low  { color: #ff5d5d; }

/* status */
.val-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.val-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.val-dot.active {
  background: #19c37d;
  box-shadow: 0 0 6px rgba(25,195,125,0.55);
  animation: pulseGreen 1.6s infinite ease-in-out;
}

.val-dot.delinquent {
  background: #ff5d5d;
  box-shadow: 0 0 6px rgba(255,93,93,0.55);
}

/* DoubleZero */
.val-dz-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.val-dz-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.7);
  flex-shrink: 0;
}

.val-dz-none {
  color: var(--muted);
  font-size: 13px;
}

/* loading */
.validators-loading-row td {
  text-align: center;
  padding: 36px;
  color: var(--muted);
}

.validators-loading {
  display: inline-block;
  opacity: 0.7;
  font-size: 14px;
}

/* ─── APY COMPARISON SECTION ─── */

.apy-section {
  margin-bottom: 34px;
}

.apy-section-header {
  margin-bottom: 28px;
}

.apy-section-title {
  margin: 6px 0 8px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.apy-section-subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* APY CARDS */

.apy-cards {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.apy-card {
  flex: 1;
  background: linear-gradient(180deg, rgba(109, 125, 255, 0.10), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-blue);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.apy-card--jito {
  background: linear-gradient(180deg, rgba(255, 160, 80, 0.08), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 160, 80, 0.22);
}

.apy-card-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}

.apy-card-value {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}

.apy-card--rakurai .apy-card-value {
  color: #19c37d;
}

.apy-card--jito .apy-card-value {
  color: #ff9c3a;
}

.apy-card-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.apy-card-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apy-badge--green {
  background: rgba(25, 195, 125, 0.14);
  color: #19c37d;
  border: 1px solid rgba(25, 195, 125, 0.28);
}

.apy-badge--muted {
  background: rgba(255, 156, 58, 0.12);
  color: #ff9c3a;
  border: 1px solid rgba(255, 156, 58, 0.26);
}

.apy-vs {
  font-size: 20px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* APY BAR CHART */

.apy-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 26px;
  margin-bottom: 22px;
}

.apy-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  align-items: center;
  gap: 14px;
}

.apy-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.apy-bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.apy-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.apy-bar--rakurai {
  background: linear-gradient(90deg, #19c37d, #0fa865);
  box-shadow: 0 0 10px rgba(25, 195, 125, 0.3);
}

.apy-bar--jito {
  background: linear-gradient(90deg, #ff9c3a, #e07018);
  box-shadow: 0 0 10px rgba(255, 156, 58, 0.25);
}

.apy-bar-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* CALCULATOR */

.calc-card {
  background: linear-gradient(180deg, rgba(109, 125, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-blue);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.calc-header {
  margin-bottom: 24px;
}

.calc-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.calc-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.calc-controls {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.calc-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.calc-input {
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.9);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  width: 200px;
}

.calc-input:focus {
  border-color: rgba(109, 125, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(109, 125, 255, 0.08);
}

.calc-period-tabs {
  display: flex;
  gap: 6px;
}

.calc-tab {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-tab:hover {
  border-color: rgba(109, 125, 255, 0.4);
  color: var(--text);
}

.calc-tab.active {
  background: rgba(109, 125, 255, 0.16);
  border-color: rgba(109, 125, 255, 0.5);
  color: #d7ddff;
}

.calc-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.calc-result {
  border-radius: 18px;
  padding: 20px 22px;
}

.calc-result--rakurai {
  background: rgba(25, 195, 125, 0.08);
  border: 1px solid rgba(25, 195, 125, 0.22);
}

.calc-result--jito {
  background: rgba(255, 156, 58, 0.07);
  border: 1px solid rgba(255, 156, 58, 0.20);
}

.calc-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.calc-result-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.calc-result--rakurai .calc-result-value {
  color: #19c37d;
}

.calc-result--jito .calc-result-value {
  color: #ff9c3a;
}

.calc-result-usd {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.calc-diff {
  text-align: center;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(25, 195, 125, 0.10);
  border: 1px solid rgba(25, 195, 125, 0.24);
  font-size: 15px;
  font-weight: 700;
  color: #19c37d;
}

.calc-diff.hidden {
  display: none;
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .apy-cards {
    flex-direction: column;
  }

  .apy-vs {
    transform: rotate(90deg);
  }

  .apy-bar-row {
    grid-template-columns: 90px 1fr 50px;
  }

  .calc-results {
    grid-template-columns: 1fr;
  }

  .calc-card-value {
    font-size: 38px;
  }
}
