/* Whitepaper Layout */

.whitepaper-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}

/* -- Sidebar -- */
.wp-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 0 32px 20px;
  border-right: 1px solid oklch(25% 0.01 250);
  scrollbar-width: thin;
  scrollbar-color: oklch(30% 0.01 250) transparent;
}

.wp-sidebar-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: oklch(55% 0.01 250);
  padding: 0 16px 12px;
  margin: 0;
}

.wp-nav-section {
  margin-bottom: 8px;
}

.wp-nav-section-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: oklch(75% 0.02 250);
  padding: 8px 16px;
  margin: 0;
  cursor: default;
}

.wp-nav-link {
  display: block;
  font-size: 0.8125rem;
  color: oklch(60% 0.01 250);
  padding: 6px 16px 6px 28px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.wp-nav-link:hover {
  color: oklch(80% 0.02 250);
}

.wp-nav-link.active {
  color: oklch(85% 0.08 55);
  border-left-color: oklch(70% 0.15 55);
  font-weight: 600;
}

/* Top-level nav links (no section parent) */
.wp-nav-link.top-level {
  padding-left: 16px;
  font-weight: 500;
}

/* -- Mobile nav toggle -- */
.wp-mobile-toggle {
  display: none;
  width: 100%;
  padding: 14px 20px;
  background: oklch(15% 0.01 250);
  border: none;
  border-bottom: 1px solid oklch(25% 0.01 250);
  color: oklch(80% 0.02 250);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.wp-mobile-toggle::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 8px;
  vertical-align: 1px;
  transition: transform 0.2s;
}

.wp-mobile-toggle.open::after {
  transform: rotate(-135deg);
  vertical-align: -2px;
}

/* -- Content area -- */
.wp-content {
  padding: 32px 40px 64px;
  max-width: 760px;
  color: oklch(82% 0.01 250);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.wp-content h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: oklch(95% 0.01 250);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.wp-content .wp-subtitle {
  font-size: 1.0625rem;
  color: oklch(60% 0.01 250);
  margin: 0 0 32px;
  line-height: 1.5;
}

.wp-content h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  color: oklch(92% 0.01 250);
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid oklch(22% 0.01 250);
}

.wp-content h2:first-of-type {
  margin-top: 0;
}

.wp-content h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: oklch(88% 0.02 250);
  margin: 28px 0 10px;
}

.wp-content p {
  margin: 0 0 16px;
  color: oklch(78% 0.01 250);
}

.wp-content p:last-child {
  margin-bottom: 0;
}

.wp-content a {
  color: oklch(75% 0.12 55);
  text-decoration: none;
  border-bottom: 1px solid oklch(75% 0.06 55);
}

.wp-content a:hover {
  color: oklch(82% 0.14 55);
  border-bottom-color: oklch(82% 0.10 55);
}

.wp-content ul,
.wp-content ol {
  padding-left: 20px;
  margin: 0 0 16px;
  color: oklch(78% 0.01 250);
}

.wp-content li {
  margin-bottom: 6px;
}

.wp-content strong {
  color: oklch(90% 0.01 250);
  font-weight: 650;
}

/* -- Data tables -- */
.wp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.875rem;
}

.wp-content th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: oklch(55% 0.01 250);
  padding: 10px 14px;
  border-bottom: 1px solid oklch(25% 0.01 250);
}

.wp-content td {
  padding: 10px 14px;
  color: oklch(78% 0.01 250);
  border-bottom: 1px solid oklch(18% 0.01 250);
}

.wp-content tr:last-child td {
  border-bottom: none;
}

/* -- Callout boxes -- */
.wp-callout {
  background: oklch(14% 0.015 55 / 0.5);
  border-left: 3px solid oklch(65% 0.14 55);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

.wp-callout p {
  color: oklch(82% 0.02 55);
  margin: 0;
}

.wp-callout strong {
  color: oklch(88% 0.06 55);
}

/* -- Stat highlights (for tokenomics, key numbers) -- */
.wp-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.wp-stat {
  background: oklch(13% 0.01 250);
  border: 1px solid oklch(22% 0.01 250);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.wp-stat-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  color: oklch(92% 0.01 250);
  margin-bottom: 4px;
}

.wp-stat-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: oklch(50% 0.01 250);
}

/* -- Token address -- */
.wp-contract {
  font-family: 'Courier New', monospace;
  font-size: 0.8125rem;
  color: oklch(65% 0.01 250);
  background: oklch(12% 0.01 250);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid oklch(22% 0.01 250);
  word-break: break-all;
  margin: 12px 0;
}

/* -- Tier table styling -- */
.wp-content .tier-table th:first-child,
.wp-content .tier-table td:first-child {
  font-weight: 700;
  color: oklch(85% 0.08 55);
}

/* -- Page nav (prev/next) -- */
.wp-page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid oklch(22% 0.01 250);
  gap: 16px;
}

.wp-page-nav a {
  display: block;
  font-size: 0.8125rem;
  color: oklch(65% 0.01 250);
  text-decoration: none;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  background: oklch(14% 0.01 250);
  border: 1px solid oklch(22% 0.01 250);
  transition: border-color 0.15s, color 0.15s;
  max-width: 48%;
}

.wp-page-nav a:hover {
  border-color: oklch(35% 0.01 250);
  color: oklch(80% 0.02 250);
}

.wp-page-nav .wp-nav-label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: oklch(45% 0.01 250);
  margin-bottom: 4px;
}

.wp-page-nav .wp-nav-title {
  font-weight: 600;
  color: inherit;
}

.wp-page-nav .next {
  text-align: right;
  margin-left: auto;
}

/* -- Freshness -- */
.wp-updated {
  text-align: right;
  font-size: 0.75rem;
  color: oklch(45% 0.01 250);
  margin-bottom: 24px;
}

/* -- Responsive -- */
@media (max-width: 1023px) {
  .whitepaper-wrap {
    grid-template-columns: 220px 1fr;
  }

  .wp-content {
    padding: 24px 28px 48px;
  }
}

@media (max-width: 767px) {
  .whitepaper-wrap {
    grid-template-columns: 1fr;
  }

  .wp-mobile-toggle {
    display: block;
  }

  .wp-sidebar {
    position: static;
    height: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    border-right: none;
    border-bottom: 1px solid oklch(25% 0.01 250);
    transition: max-height 0.3s, padding 0.3s;
  }

  .wp-sidebar.open {
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px 20px;
  }

  .wp-content {
    padding: 20px 16px 40px;
  }

  .wp-content h1 {
    font-size: 1.5rem;
  }

  .wp-content h2 {
    font-size: 1.125rem;
  }

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

  .wp-page-nav {
    flex-direction: column;
  }

  .wp-page-nav a {
    max-width: 100%;
  }
}
