/* ============================================
   SIBYL : Design System v2
   ============================================ */

:root {
  /* Backgrounds : navy-tinted blacks */
  --bg:            #08090a;
  --surface:       #0e1118;
  --elevated:      #131620;
  --highest:       #1a1e28;

  /* Borders */
  --border:        #1a1e28;
  --border-strong: #252a36;

  /* Text */
  --text-primary:  #c8ccd4;
  --text-secondary:#8a919c;
  --text-muted:    #555d6b;

  /* Accents */
  --accent:        #6b8ba5;
  --accent-hover:  #7d9ab2;
  --gold:          #b5a070;
  --gold-hover:    #c4af80;
  --violet:        #8878a8;

  /* Semantic */
  --positive:      #5a8a6a;
  --warning:       #b5944a;
  --negative:      #b06868;

  /* Typography */
  --font-display:  'Syne', 'Helvetica Neue', sans-serif;
  --font-mono:     'IBM Plex Mono', 'Courier New', monospace;
}

/* ============================================
   Reset
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Typography
   ============================================ */

.section-header {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header::before {
  content: '';
  width: 8px;
  height: 1px;
  background: var(--gold);
}

/* ============================================
   Layout
   ============================================ */

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* ============================================
   Scroll Reveal
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside grids when parent becomes visible */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }

/* Hero rule expands from center */
.hero-rule {
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s;
}

.hero-rule.visible {
  transform: scaleX(1);
}

/* Count-up values start invisible until animated */
.count-up {
  transition: opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal.visible,
  .reveal-stagger.visible > * {
    transform: none;
    transition: none;
  }
  .hero-rule {
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .scroll-indicator {
    animation: none !important;
  }
}

/* ============================================
   Nav
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background-color: rgba(8, 9, 10, 0.95);
  border-bottom-color: var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.nav-page-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1.5rem;
}
.nav-page-links a {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-page-links a:hover {
  color: var(--text-primary);
}
.nav-stake-link {
  color: var(--accent) !important;
  font-weight: 500;
}
.nav-stake-link:hover {
  color: var(--accent-hover) !important;
}

.x-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.x-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--text-secondary);
  transition: fill 0.2s ease;
}

.x-icon:hover svg {
  fill: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
}
.nav-links a.active {
  color: var(--accent);
}

.nav-rep-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--gold);
  background: rgba(181, 160, 112, 0.08);
  border: 1px solid rgba(181, 160, 112, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nav-rep-btn:hover:not(:disabled) {
  background: rgba(181, 160, 112, 0.15);
  border-color: rgba(181, 160, 112, 0.35);
  color: var(--gold-hover);
}
.nav-rep-btn:disabled,
.nav-rep-btn.is-done {
  opacity: 0.5;
  cursor: default;
}
.nav-rep-btn svg {
  stroke: var(--gold);
  flex-shrink: 0;
}

.nav-donate {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-donate-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-wallet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
  border-radius: 2px;
}

.nav-wallet:hover {
  border-color: var(--accent);
}

.nav-wallet code {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-secondary);
}

.nav-wallet .copy-label {
  font-size: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-wallet.copied .copy-label {
  color: var(--gold);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-hero.png') center center / cover no-repeat;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.5rem;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.hero-ping-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  background: linear-gradient(135deg, #ffffff 30%, #2ea9a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2.5rem;
  transition: opacity 0.2s ease;
}

.hero-ping-brand:hover {
  opacity: 0.8;
}

.hero-ping-sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  background: none;
  -webkit-text-fill-color: var(--text-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.hero-install {
  margin-top: 3rem;
  text-align: center;
}

.hero-install-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.4rem;
}

.hero-install-link {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-decoration: none;
}

.hero-install-sub {
  color: var(--text-muted);
  opacity: 0.7;
}

.hero-install-block {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  max-width: 90vw;
  overflow: hidden;
}

.hero-install-block code {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.hero-copy-btn {
  background: var(--elevated);
  border: none;
  border-left: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}

.hero-copy-btn:hover {
  color: var(--accent);
}

.hero-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  margin-top: 2.5rem;
}

.hero-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.hero-x svg {
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
  transition: fill 0.2s ease;
}

.hero-x:hover svg {
  fill: var(--text-primary);
}

.hero-email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.hero-email:hover {
  color: var(--text-secondary);
}

.hero-email .copy-label {
  font-size: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.hero-email:hover .copy-label {
  opacity: 1;
}

.hero-email.copied .copy-label {
  color: var(--gold);
  opacity: 1;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: pulse-down 2.5s ease-in-out infinite;
}

@keyframes pulse-down {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

/* ============================================
   Thesis
   ============================================ */

.thesis {
  text-align: center;
  padding: 7rem 0;
  border-top: 1px solid var(--border);
}

.thesis-line {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 2.4;
  color: var(--text-primary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Process
   ============================================ */

.process {
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.process::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-process.png') center center / cover no-repeat;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.process > * {
  position: relative;
  z-index: 1;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.process-item {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border);
  position: relative;
}

.process-item:last-child {
  border-right: none;
}

.process-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.process-item h3 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.process-item p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   Portfolio : The Record
   ============================================ */

.record {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.record::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-record.png') center center / cover no-repeat;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.record > * {
  position: relative;
  z-index: 1;
}

.treasury-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}

.treasury-stat {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
}

.treasury-stat:last-child {
  border-right: none;
}

.treasury-stat .label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.treasury-stat .value {
  font-size: 1.375rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 400;
}

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.holdings-table th {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-strong);
  font-weight: 400;
}

.holdings-table td {
  font-size: 0.8125rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.holdings-table td.secondary {
  color: var(--text-secondary);
}

.status-active {
  color: var(--positive);
}

.status-watching {
  color: var(--text-secondary);
}

.status-pending {
  color: var(--warning);
}

.pnl-positive {
  color: var(--positive);
}

.pnl-negative {
  color: var(--negative);
}

.record-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2.5rem;
  font-style: italic;
}

/* Watchlist */
.watchlist-section {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
}

.watchlist-section h3 {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
}

.watchlist-item {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
}

.watchlist-item .project-name {
  font-size: 0.8125rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.watchlist-item .project-score {
  font-size: 0.6875rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.watchlist-item .project-notes {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.conviction-high {
  border-left: 2px solid var(--gold);
}

.conviction-medium-high {
  border-left: 2px solid var(--accent);
}

.conviction-medium {
  border-left: 2px solid var(--text-muted);
}

/* ============================================
   For Builders
   ============================================ */

.builders {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.builders-intro {
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  max-width: 520px;
  line-height: 1.8;
}

.builders-cta-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.75rem 2rem;
  margin-top: 0.5rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border-radius: 2px;
}

.builders-cta-btn:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--bg);
}

/* Pitch page (shared criteria styles) */
.builders-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.builders-criteria {
  list-style: none;
  margin-bottom: 2.5rem;
}

.builders-criteria li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.625rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.builders-criteria li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}

/* Pitch page layout */
.pitch-page {
  padding: 8rem 0 4rem;
  min-height: calc(100vh - 80px);
}

.pitch-page-header {
  margin-bottom: 3rem;
}

.pitch-page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.pitch-page-intro {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 480px;
}

.pitch-page-form {
  max-width: 520px;
}

.pitch-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.pitch-page-criteria {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 520px;
}

/* ============================================
   Forms
   ============================================ */

.sibyl-form {
  margin-top: 1rem;
}

.sibyl-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: end;
}

.sibyl-form-row .form-field-wide {
  grid-column: 1 / -1;
}

.sibyl-form-row .form-submit {
  justify-self: start;
}

.sibyl-form-row .form-status {
  align-self: center;
}

.form-field {
  margin-bottom: 0.875rem;
}

.form-field label {
  display: block;
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-field label .optional {
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: none;
}

.form-field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.625rem 0.75rem;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-field input:focus {
  border-color: var(--gold);
}

.form-field input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-submit {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-strong);
  padding: 0.625rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  border-radius: 2px;
}

.form-submit:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.form-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-status {
  font-size: 0.6875rem;
  margin-left: 0.75rem;
  transition: opacity 0.3s ease;
}

.form-status.success {
  color: var(--gold);
}

.form-status.error {
  color: var(--negative);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}


/* Community Signal */
.signal-section {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
}

.signal-section h3 {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.signal-intro {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.signal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.signal-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
  border-radius: 2px;
  font-family: var(--font-mono);
}

.signal-btn:hover {
  border-color: var(--accent);
}

.signal-btn .signal-name {
  font-size: 0.75rem;
  color: var(--text-primary);
}

.signal-btn .signal-label {
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.signal-btn:hover .signal-label {
  color: var(--accent);
}

.signal-btn.signaled {
  border-color: var(--gold);
  pointer-events: none;
}

.signal-btn.signaled .signal-label {
  color: var(--gold);
}

/* Suggest */
.suggest-wrap {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-strong);
}

.suggest-wrap h4 {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-right a {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.footer-right a:hover {
  color: var(--text-primary);
}
.footer-email {
  font-size: 0.6875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.footer-email:hover {
  color: var(--text-primary);
}

/* ============================================
   Mind CTA Button
   ============================================ */

@keyframes oracle-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.55; }
}

.stake-cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: 1px solid var(--accent);
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 0 20px rgba(107,139,165,0.2);
}
.stake-cta-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 0 30px rgba(107,139,165,0.35);
  color: var(--bg);
}
.stake-cta-btn .cta-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--text-primary);
  background: var(--elevated);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.stake-cta-btn:hover .cta-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mind-cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border-radius: 2px;
  text-decoration: none;
  overflow: visible;
}

.mind-cta-btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0;
  z-index: -1;
  animation: oracle-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

.mind-cta-btn:hover {
  background: rgba(181, 160, 112, 0.12);
  border-color: var(--gold-hover);
  color: var(--gold-hover);
}

.mind-cta-btn:hover::before {
  animation-play-state: paused;
  opacity: 0.15;
}

.cta-eye {
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.cta-eye svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.mind-cta-btn:hover .cta-eye {
  transform: scale(1.15);
}

.cta-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--text-primary);
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  padding: 0.375rem 0.625rem;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.cta-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border-strong);
}

.mind-cta-btn:hover .cta-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-cta-wrap {
  margin-top: 2rem;
}

.bottom-cta-wrap {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

/* ============================================
   Mind Page
   ============================================ */

/* Links inside mind stat values */
.mind-stat-value a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.mind-stat-value a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Linked endpoint paths */
a.mind-endpoint-path {
  display: block;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a.mind-endpoint-path:hover {
  color: var(--gold-hover);
  border-bottom-color: var(--gold);
}

/* Wallet cards and source cards as links */
a.mind-wallet-card,
a.mind-source {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

a.mind-wallet-card:hover,
a.mind-source:hover {
  border-color: var(--gold);
  color: inherit;
}

/* Inline links in descriptions */
.mind-community-desc a,
.mind-subtitle a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.mind-community-desc a:hover,
.mind-subtitle a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.mind-hero {
  padding-top: 7.5rem;
  padding-bottom: 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mind-hero::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-hero.png') center center / cover no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.mind-hero > * {
  position: relative;
  z-index: 1;
}

.mind-hero .hero-eyebrow {
  margin-bottom: 1rem;
}

.mind-hero .mind-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.mind-hero .hero-rule {
  margin-bottom: 1rem;
}

.mind-hero .mind-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Section shared: mind */
.mind-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.mind-section-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mind-section-title::before {
  content: '';
  width: 8px;
  height: 1px;
  background: var(--gold);
}

/* Intelligence Endpoints */
.mind-intel {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}

.mind-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.mind-endpoint {
  background: var(--surface);
  padding: 1.5rem;
}

.mind-endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.mind-endpoint-price {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.mind-endpoint-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.mind-endpoint-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.mind-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  background: var(--elevated);
  border: 1px solid var(--border);
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

/* On-Chain Identity */
.mind-identity {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}

.mind-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.mind-stat {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}

.mind-stat:last-child {
  border-right: none;
}

.mind-stat-label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.mind-stat-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
}

.mind-identities {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.mind-identity-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mind-exo {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.mind-exo-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem 2rem;
  max-width: 600px;
  transition: border-color 0.3s;
}

.mind-exo-card:hover {
  border-color: var(--gold);
}

.mind-exo-visual img {
  width: 160px;
  height: 160px;
  border: 1px solid var(--border);
}

.mind-exo-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.mind-exo-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.15rem 0.5rem;
  margin-top: 0.375rem;
  opacity: 0.8;
}

.mind-exo-verify {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.5rem 1.25rem;
  margin-top: 2rem;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.mind-exo-verify:hover {
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
}

.mind-wallet-arch {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-top: 1.5rem;
}

.mind-wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.mind-wallet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  min-width: 0;
  text-align: center;
}

.mind-wallet-card-label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.mind-wallet-card-type {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.mind-wallet-card-addr {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.mind-wallet-card-desc {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.mind-wallet-card--compromised {
  opacity: 0.4;
  border-style: dashed;
  cursor: default;
}

.mind-wallet-card--compromised .mind-wallet-card-type {
  text-decoration: line-through;
  color: var(--text-muted);
}

.mind-wallet-connector {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

/* Advisory Framework */
.mind-advisory {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.mind-advisory::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-process.png') center center / cover no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.mind-advisory > * {
  position: relative;
  z-index: 1;
}

.mind-advisory-sub {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  margin-top: 2rem;
}

.mind-advisory-sub:first-of-type {
  margin-top: 0;
}

.mind-criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: 2rem;
}

.mind-criteria-item {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
}

.mind-criteria-name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.mind-criteria-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.mind-session-list {
  list-style: none;
  margin-top: 1.5rem;
}

.mind-session-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.mind-session-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}

/* Deal Flow */
.mind-dealflow {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}

.mind-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.mind-pipeline-step {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem 1rem;
  text-align: center;
}

.mind-pipeline-num {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.mind-pipeline-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.mind-pipeline-arrow {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  padding: 0 0.5rem;
}

.mind-capital-rules {
  list-style: none;
}

.mind-capital-rules li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.mind-capital-rules li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}

.mind-capital-rules code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--gold);
  background: var(--elevated);
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
}

/* Infrastructure */
.mind-infra {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.mind-infra::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-record.png') center center / cover no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.mind-infra > * {
  position: relative;
  z-index: 1;
}

.mind-infra-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.mind-infra-stat {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}

.mind-infra-stat:last-child {
  border-right: none;
}

.mind-source-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.mind-source {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
}

.mind-source-name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.mind-source-desc {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Ping */
.mind-ping {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.mind-ping::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.mind-ping > * {
  position: relative;
  z-index: 1;
}

/* Community */
.mind-community {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}

.mind-community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.mind-community-item {
  background: var(--surface);
  padding: 1.5rem;
}

.mind-community-name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.mind-community-desc {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Mind Bottom CTA */
.mind-bottom-cta {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  text-align: center;
}

.mind-bottom-cta-line {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.mind-back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.mind-back-link:hover {
  color: var(--text-secondary);
}

/* ============================================
   Skill Tree (Mind v2)
   ============================================ */

.skill-tree-section {
  position: relative;
  padding: 2rem 0 4rem;
  overflow: hidden;
}

.skill-tree-section .container {
  position: relative;
}

/* SVG connection lines */
.skill-tree-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.skill-tree-lines path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.skill-tree-lines path.st-line--coming {
  stroke-dasharray: 6 4;
  animation: st-dash 12s linear infinite;
}

.skill-tree-lines path.st-line--drawn {
  opacity: 0.25;
}

/* Main grid */
.skill-tree {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 3rem 1.5rem;
  justify-items: center;
  align-items: start;
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid placement
   Row 1: Intel    | Advisory   | Deal Flow
   Row 2: Identity | CORE       | DeFi
   Row 3: Infra    | Ping       | Community
*/
.st-core-ring    { grid-column: 2; grid-row: 2; }
.st-branch--intel    { grid-column: 1; grid-row: 1; }
.st-branch--advisory { grid-column: 2; grid-row: 1; }
.st-branch--dealflow { grid-column: 3; grid-row: 1; }
.st-branch--verify   { grid-column: 1; grid-row: 2; }
.st-branch--defi     { grid-column: 3; grid-row: 2; }
.st-branch--infra    { grid-column: 1; grid-row: 3; }
.st-branch--ping     { grid-column: 2; grid-row: 3; }
.st-branch--community { grid-column: 3; grid-row: 3; }

/* Branch layout */
.st-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Leaves container */
.st-leaves {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 280px;
}

/* Hexagonal node */
.st-node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  transition: transform 0.25s ease;
  outline: none;
}

/* Outer hex (gold border) */
.st-node::before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--gold);
  transition: background 0.25s ease;
}

/* Inner hex (dark fill) */
.st-node::after {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--surface);
  transition: background 0.25s ease;
}

/* Label text sits above pseudo-elements */
.st-node-label {
  position: relative;
  z-index: 1;
  line-height: 1.3;
  padding: 0 8px;
}

/* Core node — brain shape replaces hexagon */
.st-node--core {
  width: 180px;
  height: 180px;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  align-items: center;
}

/* Remove hex pseudo-elements from core */
.st-node--core::before,
.st-node--core::after {
  display: none;
}

.st-core-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
  filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.25));
  transition: opacity 0.4s ease, filter 0.4s ease;
  pointer-events: none;
}

.st-node--core:hover .st-core-icon,
.st-node--core.st-active .st-core-icon {
  opacity: 0.9;
  filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.5));
}

.st-node--core .st-node-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(201, 168, 76, 0.3);
}

/* Branch icon (e.g. Ping logo inside hex) */
.st-branch-icon {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(201, 168, 76, 0.2));
  margin-bottom: 2px;
}

/* Branch node */
.st-node--branch {
  width: 110px;
  height: 110px;
}

.st-node--branch .st-node-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Leaf node */
.st-node--leaf {
  width: 80px;
  height: 80px;
}

.st-node--leaf .st-node-label {
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--text-secondary);
}

/* --- Node states --- */

.st-unlocked {
  filter: drop-shadow(0 0 6px rgba(181, 160, 112, 0.2));
}

.st-unlocked:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 14px rgba(181, 160, 112, 0.4));
}

.st-unlocked:focus-visible {
  filter: drop-shadow(0 0 14px rgba(181, 160, 112, 0.5));
}

.st-active::before {
  background: var(--gold-hover);
}

.st-active::after {
  background: var(--elevated);
}

.st-active {
  filter: drop-shadow(0 0 18px rgba(181, 160, 112, 0.5));
  transform: scale(1.05);
}

.st-locked {
  opacity: 0.3;
  cursor: default;
  filter: none;
}

.st-locked::before {
  background: var(--border-strong);
}

.st-locked:hover {
  transform: none;
}

.st-coming {
  opacity: 0.55;
  animation: st-pulse 3s ease-in-out infinite;
}

.st-coming::before {
  background: var(--border-strong);
}

.st-coming-label {
  display: block;
  font-size: 0.45rem;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

/* --- Detail panel --- */

.st-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 10, 0.7);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

.st-overlay.st-open {
  opacity: 1;
  visibility: visible;
}

.st-detail {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 910;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.st-detail.st-open {
  transform: translateX(0);
}

.st-detail-close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  margin: 1rem;
  border-radius: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.st-detail-close:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.st-detail-header {
  padding: 2rem 2rem 1rem;
  clear: both;
}

.st-detail-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.st-detail-status.st-status--coming {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.st-detail-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin: 0;
}

.st-detail-body {
  padding: 0 2rem 2rem;
}

/* Force single-column inside detail panel */
.st-detail-body .mind-endpoint-grid,
.st-detail-body .mind-criteria-grid,
.st-detail-body .mind-stats-grid,
.st-detail-body .mind-source-grid,
.st-detail-body .mind-community-grid,
.st-detail-body .mind-infra-stats {
  grid-template-columns: 1fr;
}

.st-detail-body .mind-pipeline {
  grid-template-columns: 1fr;
  gap: 0;
}

.st-detail-body .mind-pipeline-arrow {
  padding: 0.5rem 0;
  transform: rotate(90deg);
}

.st-detail-body .mind-wallet-arch {
  flex-direction: column;
  align-items: stretch;
}

.st-detail-body .mind-wallet-grid {
  grid-template-columns: 1fr;
}

.st-detail-body .mind-wallet-connector {
  padding: 0.5rem 0;
  transform: rotate(90deg);
  text-align: center;
}

.st-detail-body .mind-identities {
  flex-direction: column;
  gap: 1.5rem;
}

.st-detail-body .mind-exo-card {
  flex-direction: column;
  text-align: center;
  gap: 1rem;
  padding: 1.25rem;
}

.st-detail-body .mind-stat,
.st-detail-body .mind-infra-stat {
  border-right: none;
  border-bottom: 1px solid var(--border);
}

.st-detail-body .mind-stat:last-child,
.st-detail-body .mind-infra-stat:last-child {
  border-bottom: none;
}

.st-detail-body .mind-advisory-sub {
  margin-top: 1.5rem;
}

.st-detail-body .mind-advisory-sub:first-child {
  margin-top: 0;
}

/* --- Hidden content store --- */
.st-content-store {
  display: none !important;
}

/* --- Animations --- */

@keyframes st-dash {
  to { stroke-dashoffset: -100; }
}

@keyframes st-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.35; }
}

@keyframes st-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.st-node {
  opacity: 0;
}

.st-tree-visible .st-node {
  animation: st-fade-in 0.5s ease forwards;
}

.st-tree-visible .st-node.st-coming {
  animation: st-fade-in 0.5s ease forwards, st-pulse 3s 0.6s ease-in-out infinite;
}

.st-tree-visible .st-core-ring .st-node {
  animation-delay: 0s;
}

.st-tree-visible .st-branch:nth-child(2) .st-node--branch { animation-delay: 0.1s; }
.st-tree-visible .st-branch:nth-child(3) .st-node--branch { animation-delay: 0.15s; }
.st-tree-visible .st-branch:nth-child(4) .st-node--branch { animation-delay: 0.2s; }
.st-tree-visible .st-branch:nth-child(5) .st-node--branch { animation-delay: 0.25s; }
.st-tree-visible .st-branch:nth-child(6) .st-node--branch { animation-delay: 0.3s; }
.st-tree-visible .st-branch:nth-child(7) .st-node--branch { animation-delay: 0.35s; }

.st-tree-visible .st-node--leaf { animation-delay: 0.5s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .st-node {
    opacity: 1;
    animation: none !important;
  }
  .st-coming {
    animation: none;
    opacity: 0.55;
  }
  .skill-tree-lines path {
    opacity: 0.25;
  }
  .st-detail,
  .st-overlay {
    transition: none;
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: 4rem 0;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .hero-title {
    font-size: 3.5rem;
    letter-spacing: 0.2em;
  }

  .hero-eyebrow {
    font-size: 0.5625rem;
  }

  .thesis {
    padding: 5rem 0;
  }

  .thesis-line {
    font-size: 0.8125rem;
    line-height: 2.2;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
  }

  .process-item::before {
    left: 0;
  }

  .process-item:last-child {
    border-bottom: none;
  }

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

  .treasury-stat:nth-child(2) {
    border-right: none;
  }

  .treasury-stat:nth-child(1),
  .treasury-stat:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .holdings-table {
    font-size: 0.75rem;
  }

  .holdings-table th,
  .holdings-table td {
    padding: 0.625rem 0.5rem 0.625rem 0;
  }

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

  .nav-inner {
    padding: 0 1.5rem;
  }

  .nav-donate-label {
    display: none;
  }

  .nav-page-links {
    display: none;
  }

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

  .signal-grid {
    gap: 0.375rem;
  }

  .signal-btn {
    padding: 0.375rem 0.625rem;
  }

  /* Mind page responsive */
  .mind-hero {
    padding-top: 6rem;
  }

  .mind-hero .mind-title {
    font-size: 2rem;
    letter-spacing: 0.15em;
  }

  .mind-endpoint-grid {
    grid-template-columns: 1fr;
  }

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

  .mind-stat:nth-child(2) {
    border-right: none;
  }

  .mind-stat:nth-child(1),
  .mind-stat:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .mind-identities {
    flex-direction: column;
    gap: 1.5rem;
  }

  .mind-identity-card {
    align-items: center;
  }

  .mind-exo-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .mind-exo-visual img {
    width: 140px;
    height: 140px;
  }

  .mind-exo-meta {
    align-items: center;
  }

  .mind-wallet-arch {
    flex-direction: column;
    align-items: center;
  }

  .mind-wallet-grid {
    grid-template-columns: 1fr;
  }

  .mind-wallet-connector {
    padding: 0.5rem 0;
    transform: rotate(90deg);
  }

  .mind-wallet-card {
    min-width: 0;
    width: 100%;
    max-width: 300px;
  }

  .mind-criteria-grid {
    grid-template-columns: 1fr;
  }

  .mind-pipeline {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mind-pipeline-arrow {
    padding: 0.5rem 0;
    transform: rotate(90deg);
  }

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

  .mind-infra-stat:nth-child(2) {
    border-right: none;
  }

  .mind-infra-stat:nth-child(1),
  .mind-infra-stat:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .mind-source-grid {
    grid-template-columns: 1fr;
  }

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

  /* Skill tree mobile */
  .skill-tree {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0;
    max-width: 100%;
  }

  .st-core-ring,
  .st-branch--intel,
  .st-branch--advisory,
  .st-branch--dealflow,
  .st-branch--verify,
  .st-branch--infra,
  .st-branch--defi,
  .st-branch--ping,
  .st-branch--community {
    grid-column: 1;
    grid-row: auto;
  }

  .skill-tree-lines {
    display: none;
  }

  .st-branch {
    width: 100%;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    gap: 0;
  }

  .st-branch:last-child {
    border-bottom: none;
  }

  /* Mobile: nodes become rectangular cards */
  .st-node--core,
  .st-node--branch,
  .st-node--leaf {
    width: 100%;
    height: auto;
    padding: 0.875rem 1rem;
  }

  .st-node::before,
  .st-node::after {
    clip-path: none;
    border-radius: 2px;
  }

  .st-node::before {
    inset: 0;
  }

  .st-node::after {
    inset: 1px;
  }

  .st-node--core {
    margin-bottom: 1.5rem;
    height: auto;
    padding: 1.25rem 1rem;
  }

  .st-node--core::before,
  .st-node--core::after {
    display: block;
    clip-path: none;
    border-radius: 2px;
  }

  .st-node--core::before { inset: 0; background: var(--gold); }
  .st-node--core::after { inset: 1px; background: var(--surface); }

  .st-core-icon {
    position: relative;
    width: 40px;
    height: 40px;
    inset: unset;
    margin-bottom: 4px;
  }

  .st-node--branch {
    justify-content: flex-start;
  }

  .st-node--branch .st-node-label {
    font-size: 0.7rem;
  }

  .st-node--branch .st-branch-toggle {
    position: relative;
    z-index: 1;
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
  }

  .st-branch.st-expanded .st-branch-toggle {
    transform: rotate(180deg);
  }

  /* Leaves hidden by default on mobile, shown when expanded */
  .st-leaves {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-width: 100%;
  }

  .st-branch.st-expanded .st-leaves {
    max-height: 500px;
    padding-top: 0.5rem;
  }

  .st-node--leaf {
    justify-content: flex-start;
    padding-left: 2rem;
  }

  .st-node--leaf .st-node-label {
    font-size: 0.6rem;
  }

  /* Detail panel becomes bottom sheet on mobile */
  .st-detail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 70vh;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
  }

  .st-detail.st-open {
    transform: translateY(0);
  }

  .st-detail-header {
    padding: 1.5rem 1.5rem 0.75rem;
  }

  .st-detail-body {
    padding: 0 1.5rem 2rem;
  }

  /* Tooltip below button on mobile */
  .cta-tooltip {
    bottom: auto;
    top: calc(100% + 10px);
  }

  .cta-tooltip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--border-strong);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
    letter-spacing: 0.15em;
  }

  .nav-logo {
    font-size: 0.875rem;
  }

  .nav-links a {
    font-size: 0.625rem;
  }
  .nav-links {
    gap: 0.75rem;
  }

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

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* ============================================
   x402 Intelligence Page
   ============================================ */

.x4-hero {
  padding-top: 7.5rem;
  padding-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.x4-hero::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: url('/images/bg-hero.png') center center / cover no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.x4-hero > * {
  position: relative;
  z-index: 1;
}

.x4-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.x4-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.x4-catalog {
  padding: 0 0 6rem;
}

/* Service card grid */
.x4-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.x4-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: none;
  padding: 1.5rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-mono);
  color: var(--text-primary);
  transition: background 0.2s ease;
  outline: none;
}

.x4-card:hover {
  background: var(--elevated);
}

.x4-card.active {
  background: var(--elevated);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.x4-card-name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.x4-card-price {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.x4-card-desc {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  flex: 1;
}

.x4-card-path {
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Modal backdrop */
.x4-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.x4-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal container */
.x4-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: calc(100% - 3rem);
  max-width: 640px;
  max-height: calc(100vh - 4rem);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  z-index: 901;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.x4-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal header */
.x4-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.x4-modal-title-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.x4-modal-title-row h3 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.x4-panel-price {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.x4-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  margin: -0.25rem -0.25rem 0 0.5rem;
  transition: color 0.15s;
  flex-shrink: 0;
}

.x4-modal-close:hover {
  color: var(--text-primary);
}

/* Modal body (scrollable) */
.x4-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.x4-modal-body .sibyl-form {
  max-width: 100%;
}

.x4-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.x4-run.x4-loading {
  position: relative;
  color: transparent;
}

.x4-run.x4-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: x4-spin 0.6s linear infinite;
}

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

/* Curl command block */
.x4-curl-wrap {
  margin-top: 1rem;
}

.x4-curl-label {
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.x4-curl {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  max-width: 600px;
}

.x4-curl code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x4-curl-copy {
  background: var(--surface);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.x4-curl-copy:hover {
  color: var(--accent);
}

/* Output area (inside modal) */
.x4-output {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.x4-output.visible {
  display: block;
}

/* Metric cards */
.x4-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--border);
  margin-bottom: 1.5rem;
}

.x4-metric {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  min-width: 140px;
  flex: 1;
}

.x4-metric-label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.x4-metric-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
}

.x4-c-positive { color: var(--positive); }
.x4-c-negative { color: var(--negative); }
.x4-c-warning  { color: var(--warning); }
.x4-c-gold     { color: var(--gold); }
.x4-c-accent   { color: var(--accent); }

/* Report SVG preview */
.x4-report-preview {
  margin-bottom: 1.5rem;
}

.x4-report-preview:empty {
  display: none;
}

.x4-report-preview svg {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* JSON output */
.x4-json {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-height: 500px;
  overflow-y: auto;
}

/* JSON syntax colors */
.x4-jv-key    { color: var(--accent); }
.x4-jv-string { color: var(--gold); }
.x4-jv-number { color: var(--violet); }
.x4-jv-bool   { color: var(--positive); }
.x4-jv-null   { color: var(--text-muted); }

/* Payment button group */
.x4-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.x4-btn-usdc {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.625rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 2px;
}

.x4-btn-usdc:hover {
  background: var(--gold);
  color: var(--bg);
}

.x4-btn-usdc:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.x4-btn-card {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 0.625rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 2px;
}

.x4-btn-card:hover {
  background: var(--accent);
  color: var(--bg);
}

.x4-btn-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.x4-btn-usdc.x4-loading,
.x4-btn-card.x4-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.x4-btn-usdc.x4-loading::after,
.x4-btn-card.x4-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: x4-spin 0.6s linear infinite;
}

.x4-wallet-status {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 0.375rem;
}

.x4-wallet-status.connected {
  color: var(--positive);
}

/* ============================================
   x402 Page : Responsive
   ============================================ */

@media (max-width: 768px) {
  .x4-title {
    font-size: 1.75rem;
    letter-spacing: 0.15em;
  }

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

  .x4-modal {
    width: calc(100% - 1.5rem);
    max-height: calc(100vh - 2rem);
  }

  .x4-modal-header {
    padding: 1.25rem 1.25rem 0.75rem;
  }

  .x4-modal-body {
    padding: 1.25rem;
  }

  .x4-modal-title-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .x4-curl {
    max-width: 100%;
  }

  .x4-metric {
    min-width: 100px;
  }

  .x4-btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .x4-btn-group .form-submit,
  .x4-btn-group .x4-btn-usdc,
  .x4-btn-group .x4-btn-card {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .x4-title {
    font-size: 1.375rem;
  }

  .x4-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: translateY(100%);
    transition: opacity 0.25s ease, transform 0.3s ease;
  }

  .x4-modal.open {
    transform: translateY(0);
  }

  .x4-metrics {
    flex-direction: column;
  }
}
