
:root {
  --bg: #07070b;
  --bg-soft: #0d0d14;
  --panel: rgba(12, 12, 20, 0.92);
  --panel-2: rgba(16, 16, 28, 0.88);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f7fb;
  --muted: #a6adc8;
  --muted-2: #7d84a5;
  --accent: #6a00ff;
  --accent-2: #914dff;
  --accent-3: #00d4ff;
  --glow: 0 0 0 1px rgba(145, 77, 255, 0.25), 0 12px 36px rgba(58, 16, 122, 0.26);
  --radius: 22px;
  --sidebar-w: 320px;
  /*
   * Increase the maximum width of the main content column so it makes
   * better use of wider screens (e.g. 1080p resolutions) while still
   * keeping line lengths readable. Adjust this value to tune overall
   * responsiveness. Previously 860px.
   */
  --content-w: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@keyframes sheetItemIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  background:
    radial-gradient(circle at top right, rgba(0,212,255,0.11), transparent 26%),
    radial-gradient(circle at 30% 0%, rgba(106,0,255,0.16), transparent 22%),
    linear-gradient(180deg, #07070b 0%, #090913 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(13,13,20,0.98), rgba(9,9,16,0.98)),
    radial-gradient(circle at top left, rgba(145,77,255,0.16), transparent 32%);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 30;
  overflow: auto;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(145,77,255,0.12), rgba(0,212,255,0.08));
  box-shadow: var(--glow);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-word {
  font-family: "Inter", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  color: #fff;
}

.brand-word-alt {
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}

.brand-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-logo-alt {
  font-weight: 500;
  opacity: 0.55;
  letter-spacing: 0.04em;
}

.back-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
  transition: color 150ms ease, background 150ms ease;
}

.back-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.mobile-close,
.mobile-menu {
  display: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  padding: 8px 10px;
  flex-shrink: 0;
}

.topbar-logo {
  display: none;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.topbar-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 0;
}

.topbar-logo-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: normal;
  color: #fff;
}

.search-wrap {
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 0.96rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.search-input::placeholder {
  color: var(--muted-2);
}

.search-input:focus {
  border-color: rgba(145,77,255,0.46);
  box-shadow: 0 0 0 4px rgba(145,77,255,0.13);
  background: rgba(255,255,255,0.05);
}

.nav-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 16px;
}

.nav-group-label {
  color: var(--muted);
  font-size: 0.77rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: block;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: #dde2f8;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--line);
  color: #fff;
}

.nav-item.active {
  background:
    linear-gradient(90deg, rgba(106,0,255,0.18), rgba(0,212,255,0.06)),
    rgba(255,255,255,0.03);
  border-color: rgba(145,77,255,0.36);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), var(--glow);
}

.nav-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-emoji {
  font-size: 1rem;
  line-height: 1;
}

.nav-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-item-desc {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 3px;
  line-height: 1.45;
}

.sidebar-cta-wrap {
  padding: 0 0 14px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: #6B4BFF;
  box-shadow: 0 4px 18px rgba(107, 75, 255, 0.35);
  letter-spacing: 0.01em;
  transition: opacity 150ms ease, box-shadow 150ms ease;
}

.sidebar-cta:hover {
  opacity: 0.88;
  box-shadow: 0 6px 24px rgba(107, 75, 255, 0.48);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-back-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(107, 75, 255, 0.3);
  background: rgba(107, 75, 255, 0.08);
  color: #a89dff;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.sidebar-back-main:hover {
  background: rgba(107, 75, 255, 0.18);
  border-color: rgba(107, 75, 255, 0.55);
  color: #fff;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 0 14px rgba(0,212,255,0.75);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  background: rgba(7,7,11,0.85);
}

.topbar-left h1 {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-cta {
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  background: #6B4BFF;
  color: white;
  box-shadow: 0 4px 18px rgba(107, 75, 255, 0.35);
  white-space: nowrap;
}

/*
 * The content wrapper defines the maximum width of the text column and the
 * horizontal/vertical padding around the main documentation area. Increase
 * the max-width to allow for a bit more breathing space and enlarge the
 * padding so that pages don't feel claustrophobic on larger screens.
 */
.content-wrap {
  max-width: calc(var(--content-w) + 80px);
  /* Increase horizontal and vertical padding to give the layout more breathing room */
  padding: 40px;
}

.page-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 16px;
}

.page-content {
  max-width: var(--content-w);
}

.page-content h1,
.page-content h2,
.page-content h3 {
  font-family: "Inter", sans-serif;
  margin: 0;
}

.page-content h1 {
  font-size: clamp(2rem, 3vw, 3.35rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 38px;
  margin-bottom: 14px;
}

.page-content h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-top: 26px;
  margin-bottom: 10px;
}

.page-content p,
.page-content li {
  color: #d8e0f5;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  margin-bottom: 1em;
}

.page-content p.lead {
  font-size: 1.1rem;
  font-weight: 400;
  color: #e8eeff;
  line-height: 1.7;
}

.page-content ul,
.page-content ol {
  margin: 20px 0 28px 0;
  padding-left: 22px;
}

.page-content li + li {
  margin-top: 8px;
}

.page-content strong {
  color: white;
}

.page-content code.inline-code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 8px;
  font-size: 0.9em;
}

.hero-card,
.callout,
.info-grid .info-card,
.step-grid .step-card,
.metric-card,
.table-wrap,
.note-card,
.link-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02)),
    rgba(12,12,20,0.72);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

.hero-card {
  position: relative;
  padding: 30px;
  overflow: hidden;
  margin-bottom: 22px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% 45%;
  height: 90%;
  background:
    linear-gradient(90deg, transparent, rgba(0,212,255,0.12), transparent),
    linear-gradient(180deg, transparent, rgba(145,77,255,0.12), transparent);
  filter: blur(8px);
  pointer-events: none;
}

.hero-card .hero-kicker {
  color: #bf9fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.hero-card p {
  max-width: 700px;
}

.hero-card--with-logo {
  padding-right: 260px;
  min-height: 280px;
}

.hero-logo-figure {
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 220px;
  margin: 0;
  pointer-events: none;
  opacity: 0.98;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.34));
}

.hero-logo-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
}

.button {
  background: #6B4BFF;
  color: white;
  box-shadow: 0 4px 18px rgba(107, 75, 255, 0.35);
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

/*
 * Grids are used to layout informational, step-by-step and metric cards.
 * Widen the gap between items and expand the surrounding margin so that
 * content blocks have more separation, reducing the crowded feel.
 */
.info-grid,
.step-grid,
.metric-grid {
  display: grid;
  /* Increase the gap between cards to reduce the claustrophobic feel */
  gap: 20px;
  margin: 24px 0 32px;
}

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

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

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

/*
 * Add more internal padding to cards for better readability. This applies
 * consistently across informational, step and metric cards.
 */
.info-card,
.step-card,
.metric-card {
  padding: 22px;
}

.info-card h3,
.step-card h3,
.metric-card h3 {
  margin-top: 0;
}

.step-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(106,0,255,0.25), rgba(0,212,255,0.16));
  border: 1px solid rgba(145,77,255,0.24);
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.metric-card .metric {
  font-family: "Inter", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
}

/*
 * Increase padding and margin around callouts and notes to improve spacing
 * and separation from surrounding content.
 */
.callout,
.note-card {
  padding: 24px 26px;
  margin: 24px 0 28px;
}

/* Flow chart styling for PancakeSwap pages */
.flow-chart {
  display: grid;
  /* Use a smaller min-width so all five steps fit comfortably on wider screens. The columns will wrap automatically on narrow screens. */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin: 24px 0 32px;
}

.flow-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.flow-step-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.flow-step-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.flow-step-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.callout strong,
.note-card strong {
  display: block;
  margin-bottom: 8px;
}

.note-card.warning {
  border-color: rgba(255, 160, 92, 0.22);
  background: linear-gradient(180deg, rgba(255,160,92,0.08), rgba(255,255,255,0.02));
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 22px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(107,75,255,0.45) transparent;
}
.table-wrap::-webkit-scrollbar {
  height: 5px;
}
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(107,75,255,0.45);
  border-radius: 99px;
}

.page-content table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.page-content th,
.page-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.page-content th {
  color: rgba(255,255,255,0.55);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-content td {
  color: #dce3fb;
  font-size: 0.97rem;
  font-weight: 400;
  line-height: 1.6;
}

/*
 * Ensure images within the documentation scale down on smaller viewports and
 * have breathing room. This avoids diagrams and schematics overflowing the
 * column width and makes sure they are centered with consistent spacing.
 */
.page-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 12px;
}

/*
 * Placeholder notice style for missing information. Rendered in red with
 * strong emphasis to catch the reader's attention. Use this class on
 * elements that represent incomplete project details, such as missing
 * contract addresses, reward mechanics or fee structures.
 */
/* Use !important on color to ensure the red placeholder styling isn't overridden by
   other color rules in the callout or note components. */
.todo-placeholder {
  color: #ff5c5c !important;
  font-size: 1rem;
  font-weight: 700;
}

.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin: 16px 0;
}

.link-card small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.arrow {
  color: #caaeff;
  font-size: 1.4rem;
}

.page-footer {
  max-width: var(--content-w);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
  padding-bottom: 22px;
}

.page-nav-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-nav-card:not(.disabled):hover {
  border-color: rgba(145,77,255,0.32);
  box-shadow: var(--glow);
}

.page-nav-card.disabled {
  opacity: 0.44;
  pointer-events: none;
}

.small-label {
  color: var(--muted);
  font-size: 0.77rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-title {
  font-weight: 700;
  font-size: 1.02rem;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.06);
  font-size: 0.88rem;
  line-height: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
  z-index: 25;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .info-grid,
  .step-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  /* ── Bottom sheet sidebar ── */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    max-height: 88vh;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 400ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow:
      0 -24px 80px rgba(0, 0, 0, 0.6),
      0 -1px 0 rgba(255,255,255,0.07),
      inset 0 1px 0 rgba(255,255,255,0.05);
    background:
      radial-gradient(ellipse at 50% 0%, rgba(106,0,255,0.14), transparent 60%),
      linear-gradient(180deg, rgba(14,14,24,0.98), rgba(9,9,16,0.99));
    backdrop-filter: blur(24px);
    z-index: 30;
    padding-top: 0;
    overflow-y: auto;
  }

  /* Drag handle */
  .sidebar::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,0.16);
    border-radius: 999px;
    margin: 14px auto 6px;
    flex-shrink: 0;
  }

  .sidebar.open {
    transform: translateY(0);
  }

  .sidebar.open .sidebar-cta-wrap {
    display: flex;
  }

  /* Nav items stagger in when sidebar opens */
  .sidebar.open .sidebar-top,
  .sidebar.open .search-wrap,
  .sidebar.open .sidebar-cta-wrap,
  .sidebar.open .nav-group,
  .sidebar.open .sidebar-footer {
    animation: sheetItemIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .sidebar.open .sidebar-top       { animation-delay: 60ms; }
  .sidebar.open .search-wrap       { animation-delay: 100ms; }
  .sidebar.open .sidebar-cta-wrap  { animation-delay: 130ms; }
  .sidebar.open .nav-group:nth-child(1) { animation-delay: 160ms; }
  .sidebar.open .nav-group:nth-child(2) { animation-delay: 195ms; }
  .sidebar.open .nav-group:nth-child(3) { animation-delay: 230ms; }
  .sidebar.open .nav-group:nth-child(4) { animation-delay: 260ms; }
  .sidebar.open .sidebar-footer     { animation-delay: 290ms; }

  /* ── Mobile menu / close buttons ── */
  .mobile-close,
  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-close {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
  }

  .mobile-menu {
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
  }

  .mobile-menu span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: white;
  }

  /* ── Overlay ── */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 10, 0.72);
    backdrop-filter: blur(6px);
    z-index: 25;
  }

  .topbar {
    min-height: 68px;
    padding: 0 16px;
  }

  .topbar-logo {
    display: flex;
  }

  .topbar-left {
    display: none;
  }

  .content-wrap {
    /* Match the increased padding from the desktop layout but still respect smaller screens */
    padding: 24px 20px 32px;
  }

  .page-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-footer {
    grid-template-columns: 1fr;
  }

  /* Hide or reposition the hero logo figure on small screens to avoid overflow */
  .hero-card--with-logo {
    padding-right: 20px;
    min-height: auto;
  }
  .hero-card--with-logo .hero-logo-figure {
    display: none;
  }
}

@media (max-width: 640px) {
  /* ── Base font scale for mobile ── */
  html {
    font-size: 15px;
  }

  .topbar-cta {
    display: none;
  }

  /* ── Headings: lighter weight, tighter sizes ── */
  .page-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 12px;
  }

  .page-content h2 {
    font-size: 1.08rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
  }

  .page-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 6px;
  }

  /* ── Body text: smaller, tighter ── */
  .page-content p,
  .page-content li {
    font-size: 0.93rem;
    line-height: 1.65;
    margin-bottom: 0.85em;
  }

  .page-content p.lead {
    font-size: 0.96rem;
    line-height: 1.6;
  }

  /* ── Hero card ── */
  .hero-card,
  .callout,
  .note-card,
  .link-card,
  .page-nav-card {
    border-radius: 16px;
  }

  .hero-card {
    padding: 18px 16px;
    margin-bottom: 14px;
  }

  .hero-card .hero-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
  }

  .hero-actions {
    margin-top: 14px;
    gap: 8px;
  }

  /* ── Buttons: slimmer ── */
  .button,
  .button-secondary {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
    border-radius: 11px;
  }

  /* ── Metric cards ── */
  .metric-card .metric {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .info-card,
  .step-card,
  .metric-card {
    padding: 14px;
  }

  .info-grid,
  .step-grid,
  .metric-grid {
    gap: 10px;
    margin: 14px 0 18px;
  }

  /* ── Rate tier cards ── */
  .rate-tier-card {
    padding: 14px;
  }

  .rate-tier-card strong {
    font-size: 1.3rem;
    font-weight: 700;
  }

  /* ── Callout/note cards ── */
  .callout,
  .note-card {
    padding: 14px 16px;
  }

  /* ── Tables ── */
  .page-content th {
    font-size: 0.68rem;
  }

  .page-content td {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  /* ── Page meta ── */
  .page-meta {
    font-size: 0.78rem;
  }

  /* ── Topbar ── */
  .topbar-left h1 {
    font-size: 0.92rem;
  }

  .eyebrow {
    font-size: 0.62rem;
  }

  /* ── Back button ── */
  .back-btn {
    display: flex;
  }

  /* ── Move page-meta below content ── */
  .content-wrap {
    display: flex;
    flex-direction: column;
  }

  .page-meta {
    order: 10;
    margin-top: 24px;
    margin-bottom: 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .page-content {
    order: 1;
  }

  .page-footer {
    order: 5;
  }

  /* ── Sidebar navigation ── */
  .nav-item {
    padding: 8px 10px;
    border-radius: 11px;
  }

  .nav-item-title {
    font-size: 0.82rem;
    font-weight: 600;
  }

  .nav-item-desc {
    font-size: 0.74rem;
    margin-top: 2px;
    line-height: 1.4;
  }

  .nav-emoji {
    font-size: 0.88rem;
  }

  .nav-title-row {
    gap: 8px;
  }

  .nav-group-label {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
  }

  .nav-groups {
    gap: 14px;
  }

  .nav-list {
    gap: 2px;
  }
}

/* Added styling for diagram images used in the PancakeSwap pages */
.diagram-img {
  width: 100%;
  height: auto;
  display: block;
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Earning-rate blocks */
.earning-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0 30px;
  padding: 22px 24px;
  border: 1px solid rgba(145, 77, 255, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(0,212,255,0.12), transparent 32%),
    linear-gradient(180deg, rgba(145,77,255,0.11), rgba(255,255,255,0.025));
}

.earning-banner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.earning-banner-label {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent-3);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

.rate-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 30px;
}

.rate-tier-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02)),
    rgba(12,12,20,0.72);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.rate-tier-card strong {
  display: block;
  margin: 9px 0 8px;
  font-family: "Inter", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
}

.rate-tier-card small {
  display: block;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

.rate-tier-min {
  color: var(--accent-3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Clean minimal flowcharts for PancakeSwap / Spectr process pages */
.minimal-flow {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(150px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 24px 0 28px;
}

.flow-node {
  min-height: 168px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018)),
    rgba(12, 12, 20, 0.62);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.flow-index {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(145,77,255,0.32);
  color: #d8c8ff;
  background: rgba(145,77,255,0.12);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.flow-node strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.25;
}

.flow-node small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.flow-arrow {
  align-self: center;
  color: var(--accent-3);
  font-size: 1.4rem;
  opacity: 0.8;
}

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

.flow-branch-card > div {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.025);
}

.flow-branch-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.source-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 14px 0 22px;
  padding: 12px 14px;
  border-left: 3px solid rgba(145, 77, 255, 0.55);
  background: rgba(255,255,255,0.025);
  border-radius: 0 12px 12px 0;
}

@media (max-width: 1180px) {
  .minimal-flow,
  .rate-tier-grid {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .earning-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .flow-branch-card {
    grid-template-columns: 1fr;
  }

  .flow-node {
    min-height: auto;
  }
}

/* ─── Desktop scale ─────────────────────────────────────────── */
@media (min-width: 921px) {
  :root {
    --sidebar-w: 264px;
  }

  /* ── Sidebar CTA ── */
  .sidebar-cta-wrap {
    display: flex;
  }

  /* Root font-size drives all rem-based values */
  html {
    font-size: 14px;
  }

  /* ── Headings: fix clamp() using vw (not affected by font-size) ── */
  .page-content h1 {
    font-size: 1.85rem;   /* 25.9px — readable doc heading */
    letter-spacing: -0.025em;
    margin-bottom: 14px;
  }

  .page-content h2 {
    font-size: 1.18rem;   /* 16.5px */
    margin-top: 30px;
    margin-bottom: 10px;
  }

  .page-content h3 {
    font-size: 0.97rem;   /* 13.6px — same weight as body, just bold */
    margin-top: 20px;
    margin-bottom: 8px;
  }

  .page-content p.lead {
    font-size: 1rem;      /* same as body — no visual jump on desktop */
  }

  /* ── Metric & rate cards ── */
  .metric-card .metric {
    font-size: 1.4rem;    /* 19.6px */
    margin-bottom: 6px;
  }

  .rate-tier-card strong {
    font-size: 1.4rem;
    margin: 6px 0;
  }

  /* ── Hero card ── */
  .hero-card {
    padding: 24px 28px;
    margin-bottom: 18px;
  }

  .hero-card--with-logo {
    padding-right: 220px;
    min-height: 240px;
  }

  .hero-logo-figure {
    width: 185px;
  }

  .hero-card .hero-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
  }

  .hero-actions {
    margin-top: 16px;
    gap: 10px;
  }

  .button,
  .button-secondary {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.92rem;
    border-radius: 12px;
  }

  /* ── Layout spacing ── */
  .topbar {
    min-height: 68px;
    padding: 0 16px;
  }

  .content-wrap {
    padding: 28px 36px;
  }

  .page-content th,
  .page-content td {
    padding: 10px 13px;
  }

  .info-grid,
  .step-grid,
  .metric-grid {
    gap: 14px;
    margin: 18px 0 24px;
  }

  .info-card,
  .step-card,
  .metric-card {
    padding: 18px;
  }

  .rate-tier-grid {
    gap: 12px;
    margin: 18px 0 24px;
  }

  .rate-tier-card {
    padding: 16px;
  }

  .nav-item {
    padding: 9px 10px;
  }

  .page-footer {
    margin-top: 24px;
  }
}

/* ─── Docs Footer ───────────────────────────────────────────── */
.docs-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9,9,16,0.0), rgba(7,7,11,0.98));
  margin-top: 32px;
}

.docs-footer-inner {
  max-width: calc(var(--content-w) + 80px);
  margin: 0 auto;
  padding: 48px 40px 32px;
}

.docs-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.docs-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.docs-footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(145,77,255,0.12), rgba(0,212,255,0.08));
  border: 1px solid rgba(255,255,255,0.08);
  padding: 3px;
}

.docs-footer-logo-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.docs-footer-logo-alt {
  font-weight: 500;
  opacity: 0.5;
}

.docs-footer-desc {
  color: var(--muted-2);
  font-size: 0.84rem;
  line-height: 1.6;
  max-width: 280px;
  margin: 0;
}

.docs-footer-heading {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  margin: 0 0 14px;
}

.docs-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.docs-footer-list a {
  font-size: 0.84rem;
  color: var(--muted);
  transition: color 150ms ease;
}

.docs-footer-list a:hover {
  color: var(--text);
}

.docs-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
}

@media (max-width: 920px) {
  .docs-footer-inner {
    padding: 36px 24px 24px;
  }

  .docs-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .docs-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .docs-footer-inner {
    padding: 28px 16px 20px;
  }

  .docs-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .docs-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ── Affiliate Program page ── */
.affiliate-hero-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 30px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(107, 75, 255, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 18%, rgba(107,75,255,0.18), transparent 28%),
    radial-gradient(circle at 0% 0%, rgba(107,75,255,0.28), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
    rgba(10,10,18,0.88);
  box-shadow: 0 0 0 1px rgba(107,75,255,0.12), 0 24px 54px rgba(0,0,0,0.32);
}
.affiliate-hero-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: 28px;
  width: 300px;
  height: 120px;
  background: linear-gradient(100deg, transparent, rgba(107,75,255,0.22), rgba(160,130,255,0.18), transparent);
  filter: blur(18px);
  transform: rotate(-22deg);
  pointer-events: none;
}
.affiliate-hero-copy { position: relative; z-index: 1; max-width: 760px; }
.affiliate-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid rgba(107,75,255,0.32);
  background: rgba(107,75,255,0.12);
  color: #c0aaff;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}
.affiliate-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #9b7fff, #6b4bff);
  box-shadow: 0 0 14px rgba(107,75,255,0.8);
}
.affiliate-hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.affiliate-hero-metrics div,
.affiliate-flow-step,
.affiliate-feature-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}
.affiliate-hero-metrics div { padding: 18px; }
.affiliate-hero-metrics strong {
  display: block;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums lining-nums;
}
.affiliate-hero-metrics span { color: var(--muted); font-size: .88rem; }

.affiliate-flow {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  gap: 14px;
  align-items: stretch;
  margin: 24px 0 34px;
}
.affiliate-flow-step { padding: 20px; min-width: 0; }
.affiliate-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #c0aaff;
  font-weight: 800;
  font-size: .82rem;
  background: rgba(107,75,255,0.12);
  border: 1px solid rgba(107,75,255,0.26);
}
.affiliate-flow-step strong { display: block; font-size: 1.02rem; margin-bottom: 8px; color: #fff; }
.affiliate-flow-step p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.affiliate-flow-arrow {
  display: flex;
  align-items: center;
  color: #9b7fff;
  font-size: 1.7rem;
  opacity: .8;
}

.affiliate-table-wrap {
  margin: 22px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(8,8,15,0.58);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(107,75,255,0.45) transparent;
}
.affiliate-table-wrap::-webkit-scrollbar {
  height: 5px;
}
.affiliate-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.affiliate-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(107,75,255,0.45);
  border-radius: 99px;
}
.affiliate-table-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(120px,.9fr) minmax(220px,1.5fr) 130px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.affiliate-table-row:last-child { border-bottom: 0; }
.affiliate-table-row:nth-child(odd):not(.affiliate-table-head) { background: rgba(255,255,255,0.018); }
.affiliate-table-head {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.035);
}
.affiliate-table-row span:nth-child(1) {
  color: #c0aaff;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
}
.affiliate-table-row span:nth-child(2) { color: #fff; font-weight: 700; }
.affiliate-table-row span:nth-child(3) { color: var(--muted); }
.affiliate-table-row strong {
  justify-self: end;
  color: #c0aaff;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums lining-nums;
}
.affiliate-table-row.is-primary strong { color: #6b4bff; filter: brightness(1.8); }
.affiliate-table-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--w);
  max-width: 100%;
  background: linear-gradient(90deg, #6b4bff, #a87fff);
  opacity: .55;
}

.affiliate-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin: 20px 0 30px;
}
.affiliate-feature-card { padding: 20px; }
.affiliate-feature-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(107,75,255,0.12);
  border: 1px solid rgba(107,75,255,0.26);
  font-size: 1.1rem;
}
.affiliate-feature-card h3 { margin: 0 0 8px; font-size: 1rem; color: #fff; }
.affiliate-feature-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.62; }

@media (max-width: 1080px) {
  .affiliate-feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .affiliate-flow { grid-template-columns: 1fr; }
  .affiliate-flow-arrow { display: none; }
}
@media (max-width: 760px) {
  .affiliate-hero-metrics { grid-template-columns: 1fr; }
  .affiliate-feature-grid { grid-template-columns: 1fr; }
  .affiliate-table-row {
    grid-template-columns: 48px minmax(0,1fr) 76px;
    gap: 10px;
    padding: 14px 16px;
  }
  .affiliate-table-row span:nth-child(3) { display: none; }
  .affiliate-table-head span:nth-child(3) { display: none; }
  .affiliate-table-row strong { font-size: 1rem; }
}
