/* ============================================================================
   GAIN PROTOCOL — PANCAKESWAP DESIGN SYSTEM (LIGHT & DARK THEME, RESPONSIVE SPA)
   ============================================================================ */

:root {
  /* Brand Palette (Emerald & Champagne Gold — USDT Yield Vault) */
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-active: #059669;
  --primary-soft: rgba(16, 185, 129, 0.14);

  --secondary: #0f766e;
  --secondary-hover: #0d9488;
  --secondary-soft: rgba(15, 118, 110, 0.12);

  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.16);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.14);
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.12);
  --warning: #f59e0b;

  /* Light Theme Surfaces (Mint-to-Ivory Day Mode) */
  --bg-page: #f7faf8;
  --bg-alt: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.93);
  --bg-hero: linear-gradient(139.73deg, #ecfdf5 0%, #fefce8 100%);
  --bg-card: #ffffff;
  --bg-card-header: linear-gradient(111.68deg, #ecfdf5 0%, #f0fdfa 100%);
  --bg-card-header-gold: linear-gradient(111.68deg, #fffbeb 0%, #fef3c7 100%);
  --bg-input: #eaf4f0;
  --bg-subtle: #eef6f3;
  --bg-pill: #eaf4f0;

  --text-main: #062e22;
  --text-sub: #4b6b60;
  --text-muted: #82a096;
  --text-on-primary: #ffffff;
  --text-on-secondary: #ffffff;

  --border-card: #dce8e2;
  --border-lip: #cfe0d8;
  --shadow-card: 0px 2px 0px 0px #cfe0d8, 0px 8px 24px rgba(6, 46, 34, 0.05);
  --shadow-input: inset 0px 2px 2px -1px rgba(6, 46, 34, 0.12);
  --shadow-btn: inset 0px -2px 0px 0px rgba(6, 46, 34, 0.32);
  --hero-wave-fill: #f7faf8;

  --font-display: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-input: 16px;
  --radius-pill: 999px;
}

[data-theme="dark"] {
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-active: #059669;
  --primary-soft: rgba(16, 185, 129, 0.18);

  --secondary: #2dd4bf;
  --secondary-hover: #5eead4;
  --secondary-soft: rgba(45, 212, 191, 0.16);

  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.18);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.16);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --warning: #fbbf24;

  --bg-page: #07110e;
  --bg-alt: #0d1c17;
  --bg-nav: rgba(19, 35, 30, 0.94);
  --bg-hero: linear-gradient(139.73deg, #0d2b22 0%, #262110 100%);
  --bg-card: #13231e;
  --bg-card-header: linear-gradient(166.77deg, #18332a 0%, #142a27 100%);
  --bg-card-header-gold: linear-gradient(166.77deg, #362c14 0%, #242919 100%);
  --bg-input: #1b312a;
  --bg-subtle: #192e27;
  --bg-pill: #1b312a;

  --text-main: #ecfdf5;
  --text-sub: #9dc0b3;
  --text-muted: #64877b;
  --text-on-primary: #ffffff;
  --text-on-secondary: #062e22;

  --border-card: #233d34;
  --border-lip: #233d34;
  --shadow-card: 0px 2px 0px 0px #233d34, 0px 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-input: inset 0px 2px 3px rgba(0, 0, 0, 0.38);
  --hero-wave-fill: #07110e;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-display);
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  max-width: 100%;
  overflow-x: clip;
}

/* Prevent CSS Grid & Flexbox track blowout on narrow viewports */
.hero-grid > *,
.earn-layout > *,
.plans-grid > *,
.steps-grid > *,
.streams-grid > *,
.security-grid > *,
.info-strip-grid > *,
.glossary-grid > *,
.harvest-grid > *,
.ref-top-grid > *,
.income-cards-3 > *,
.calc-grid > *,
.docs-layout > *,
.footer-grid > *,
.p-card,
.plan-card,
.pos-card,
.rank-card,
.kpi-card,
.well-input-row,
.well-input {
  min-width: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font-family: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* ============================================================================
   TOP NAVBAR (PANCAKESWAP 56PX STICKY BAR)
   ============================================================================ */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover .brand-icon {
  transform: rotate(-8deg) scale(1.08);
}

.brand-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-title span {
  color: var(--primary);
}

.desktop-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 60px;
  flex-shrink: 0;
}

.nav-tab {
  position: relative;
  height: 60px;
  padding: 0 11px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-tab:hover {
  color: var(--secondary);
  background: var(--bg-subtle);
}

.nav-tab.active {
  color: var(--secondary);
  font-weight: 700;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
}

.nav-badge-hot {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pool-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  color: var(--text-sub);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.pool-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: var(--bg-pill);
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.icon-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.icon-btn:active {
  transform: translateY(1px);
}

.network-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.network-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: var(--bg-pill);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: inset 0px -1px 0px rgba(14, 14, 44, 0.18);
}

.network-btn:hover {
  border-color: var(--primary);
}

.chain-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.network-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(14, 14, 44, 0.18);
  padding: 8px;
  display: none;
  z-index: 150;
}

.network-menu.open {
  display: block;
}

.network-item {
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.network-item:hover,
.network-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ============================================================================
   PANCAKESWAP TACTILE BUTTONS
   ============================================================================ */

.btn {
  border: none;
  border-radius: var(--radius-btn);
  padding: 0 20px;
  height: 46px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-btn);
  transition: background-color 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0px -1px 0px 0px rgba(14, 14, 44, 0.25);
}

.btn:disabled {
  background: var(--bg-subtle) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 0.9rem;
}

.btn-lg {
  height: 52px;
  padding: 0 26px;
  font-size: 1.06rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-soft);
}

.btn-violet {
  background: var(--secondary);
  color: var(--text-on-secondary);
}

.btn-violet:hover:not(:disabled) {
  background: var(--secondary-hover);
}

.btn-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #062e22;
}

.btn-subtle {
  background: var(--bg-pill);
  color: var(--primary);
  box-shadow: none;
}

.btn-subtle:hover:not(:disabled) {
  background: var(--primary-soft);
}

.wallet-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================================
   HERO BANNER WITH PANCAKESWAP WAVE DIVIDER
   ============================================================================ */

.hero {
  position: relative;
  background: var(--bg-hero);
  padding: 36px 20px 68px;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.55;
}

.hero-orb-1 {
  width: 180px;
  height: 180px;
  right: 8%;
  top: -30px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 70%);
}

.hero-orb-2 {
  width: 240px;
  height: 240px;
  left: -60px;
  bottom: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 70%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--secondary);
  margin-bottom: 12px;
}

.hero h1 .accent-cyan {
  color: var(--primary);
}

.hero p {
  font-size: 1.06rem;
  color: var(--text-main);
  opacity: 0.9;
  max-width: 560px;
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
}

.kpi-sub {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 2px;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.hero-wave svg {
  width: 100%;
  height: 38px;
  display: block;
}

.hero-wave path {
  fill: var(--hero-wave-fill);
}

/* ============================================================================
   CONNECTION STATUS BANNER
   ============================================================================ */

.status-strip {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 20px;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  font-size: 0.92rem;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-cyan {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-violet {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.badge-mint {
  background: var(--success-soft);
  color: var(--success);
}

.badge-gold {
  background: var(--gold-soft);
  color: #b45309;
}
[data-theme="dark"] .badge-gold {
  color: var(--gold);
}

.badge-pink {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ============================================================================
   SPA VIEWS & PANCAKESWAP CARDS
   ============================================================================ */

.main-wrap {
  max-width: 1200px;
  margin: 24px auto 48px;
  padding: 0 20px;
}

.spa-view {
  display: none;
  animation: fadeSlide 0.22s ease-out;
}

.spa-view.active {
  display: block;
}

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

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.section-head p {
  color: var(--text-sub);
  font-size: 0.96rem;
}

.pill-switch {
  display: inline-flex;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.pill-btn {
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: inset 0px -1px 0px rgba(14, 14, 44, 0.25);
}

.p-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.p-card-header {
  background: var(--bg-card-header);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.p-card-header.gold {
  background: var(--bg-card-header-gold);
}

.p-card-body {
  padding: 22px 24px;
}

/* ============================================================================
   VIEW 1: EARN / STAKE (4 SYRUP POOL CARDS + INTERACTIVE STAKE TERMINAL)
   ============================================================================ */

.earn-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: start;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.plan-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.plan-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-card);
}

.plan-card-top {
  background: var(--bg-card-header);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-card);
}

.plan-card.hot .plan-card-top {
  background: var(--bg-card-header-gold);
}

.plan-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.plan-sub {
  font-size: 0.84rem;
  color: var(--text-sub);
  font-weight: 600;
}

.plan-coin-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--secondary);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.plan-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.plan-apr-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.plan-daily-big {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--secondary);
}

.plan-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.plan-stat-row strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Stake Terminal (PancakeSwap Swap Box Feel) */
.stake-terminal {
  position: sticky;
  top: 78px;
}

.plan-quick-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.plan-q-btn {
  padding: 9px 6px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  color: var(--text-sub);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}

.plan-q-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--text-on-secondary);
}

.swap-well {
  background: var(--bg-input);
  border-radius: var(--radius-input);
  padding: 14px 16px;
  box-shadow: var(--shadow-input);
  margin-bottom: 14px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.swap-well:focus-within {
  border-color: var(--secondary);
}

.well-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-sub);
  font-weight: 600;
  margin-bottom: 8px;
}

.well-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.well-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.45rem;
  font-weight: 700;
  outline: none;
}

.well-input.sm {
  font-size: 0.92rem;
  font-family: var(--font-mono);
}

.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-main);
  flex-shrink: 0;
}

.pct-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pct-chip {
  flex: 1;
  min-width: 52px;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--bg-card);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.pct-chip:hover,
.pct-chip.active {
  background: var(--primary);
  color: #fff;
}

.receipt-box {
  background: var(--bg-subtle);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-sub);
}

.receipt-line strong {
  color: var(--text-main);
}

.receipt-line.highlight strong {
  color: var(--success);
  font-size: 1rem;
}

/* ============================================================================
   ONBOARDING STEPS, 5 YIELD STREAMS, SECURITY CARDS & INTERACTIVE FAQ
   ============================================================================ */

.content-section {
  margin-top: 44px;
}

#faq-section {
  scroll-margin-top: 80px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step-card {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.step-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.stream-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.stream-card:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
}

.stream-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.stream-rate {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.stream-card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.stream-card p {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
}

.security-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.security-item h4 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.security-item p {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.info-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.glossary-item {
  background: var(--bg-subtle);
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.glossary-item strong {
  color: var(--secondary);
  font-size: 0.94rem;
}

.glossary-item span {
  color: var(--text-sub);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Interactive FAQ Toolbar & Accordion */
.faq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.faq-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  height: 42px;
  min-width: 280px;
  flex: 1;
  max-width: 390px;
  box-shadow: var(--shadow-input);
  transition: border-color 0.15s ease;
}

.faq-search-box:focus-within {
  border-color: var(--primary);
}

.faq-search-box input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 20px;
  transition: border-color 0.16s ease;
}

.faq-item[open] {
  border-color: var(--primary);
}

.faq-question {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  user-select: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}

.faq-chevron {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-pill);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  background: var(--primary);
  color: #ffffff;
}

.faq-answer {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border-card);
  color: var(--text-sub);
  font-size: 0.94rem;
  line-height: 1.6;
}

.faq-answer p {
  margin-bottom: 8px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  padding-left: 20px;
  margin: 6px 0;
}

.faq-answer li {
  margin-bottom: 6px;
}

/* ============================================================================
   VIEW 2: POSITIONS & HARVEST DASHBOARD
   ============================================================================ */

.harvest-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  margin-bottom: 26px;
}

.reward-breakdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0 18px;
}

.mini-stat {
  background: var(--bg-subtle);
  border-radius: 16px;
  padding: 12px 14px;
}

.mini-stat span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-sub);
  font-weight: 600;
}

.mini-stat strong {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
}

.positions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 18px;
}

.pos-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.empty-state {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-sub);
}

.feed-list {
  max-height: 290px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-subtle);
  font-size: 0.86rem;
}

/* ============================================================================
   VIEW 3: 20-LEVEL REFERRALS & GROWTH BOOSTER MATRIX
   ============================================================================ */

.ref-top-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.ref-link-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--bg-input);
  border-radius: 16px;
  padding: 10px 14px;
  margin: 12px 0;
}

.ref-link-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
}

.income-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.p-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.p-table th {
  text-align: left;
  padding: 13px 16px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  border-bottom: 1px solid var(--border-card);
}

.p-table td {
  padding: 13px 16px;
  font-size: 0.93rem;
  border-bottom: 1px solid var(--border-card);
  color: var(--text-main);
}

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

.p-table tr.unlocked-row {
  background: rgba(16, 185, 129, 0.06);
}

/* ============================================================================
   VIEW 4: 5 LEADERSHIP RANKS
   ============================================================================ */

.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin-top: 22px;
}

.rank-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.rank-card.achieved {
  border-color: var(--gold);
  background: var(--bg-card-header-gold);
}

.rank-trophy {
  font-size: 2rem;
}

/* ============================================================================
   VIEW 5: CALCULATOR & VIEW 6: DOCS
   ============================================================================ */

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.calc-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 700;
  margin-bottom: 4px;
}

.calc-num-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 4px 10px;
  color: var(--primary);
  font-weight: 800;
}

.calc-num-wrap:focus-within {
  border-color: var(--primary);
}

.calc-num-input {
  width: 96px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  outline: none;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
  margin-top: 4px;
  touch-action: pan-y;
}

.range-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(14, 14, 44, 0.28);
  margin-top: -7px;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  background: var(--primary-hover);
}

.range-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(14, 14, 44, 0.28);
  cursor: pointer;
}

.docs-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-toc a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.docs-toc a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.docs-article {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.docs-section h3 {
  font-size: 1.35rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

.docs-section p,
.docs-section li {
  color: var(--text-main);
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.docs-section ul {
  padding-left: 20px;
}

.code-block {
  background: var(--bg-input);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  overflow-x: auto;
  color: var(--text-main);
}

/* ============================================================================
   MODALS (PANCAKESWAP TWO-PANE WALLET CONNECT MODAL & SETTINGS MODAL)
   ============================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 28, 21, 0.65);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.wallet-modal {
  width: 100%;
  max-width: 740px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
}

.wallet-modal-left {
  padding: 26px;
}

.wallet-modal-right {
  background: var(--bg-card-header);
  padding: 28px 24px;
  border-left: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.wallet-option {
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.wallet-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.wallet-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.settings-modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  overflow: hidden;
}

/* ============================================================================
   TOAST NOTIFICATIONS & MOBILE BOTTOM NAV
   ============================================================================ */

.toast-stack {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 5px solid var(--primary);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  animation: fadeSlide 0.2s ease-out;
}

.toast.success {
  border-left-color: var(--success);
}
.toast.error {
  border-left-color: var(--danger);
}

.toast-title {
  font-weight: 800;
  font-size: 0.94rem;
  margin-bottom: 2px;
}

.toast-msg {
  font-size: 0.84rem;
  color: var(--text-sub);
  word-break: break-word;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-card);
  z-index: 120;
  justify-content: space-around;
  align-items: center;
  padding: 0 6px;
}

.mob-tab {
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 12px;
}

.mob-tab.active {
  color: var(--primary);
}

.nav-tab,
.mob-tab,
.btn {
  text-decoration: none !important;
}

.docs-section {
  scroll-margin-top: 84px;
}

#stakeTerminalCard {
  scroll-margin-top: 76px;
}

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-card);
  padding: 36px 20px 44px;
  margin-top: 48px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-col h4 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS (LAPTOP -> TABLET -> MOBILE -> COMPACT SE)
   ============================================================================ */

/* 1. Standard Laptops (<= 1440px) */
@media (max-width: 1440px) {
  .pool-pill {
    display: none;
  }

  .nav-left {
    gap: 10px;
  }

  .nav-tab {
    padding: 0 8px;
    font-size: 0.9rem;
  }
}

/* 1b. Compact Laptops / iPad Landscape (<= 1220px) */
@media (max-width: 1220px) {
  .top-nav {
    padding: 0 12px;
    gap: 6px;
  }

  .nav-badge-hot {
    display: none;
  }

  .nav-tab {
    padding: 0 7px;
    font-size: 0.85rem;
  }
}

/* 2. Tablets & Below (<= 1024px) */
@media (max-width: 1024px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .desktop-tabs {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 0 4px env(safe-area-inset-bottom, 0px);
  }

  .mob-tab {
    flex: 1;
    min-width: 0;
    padding: 5px 2px;
  }

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

  .info-strip-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .earn-layout,
  .harvest-grid,
  .ref-top-grid,
  .calc-grid,
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stake-terminal {
    position: static;
  }

  /* Horizontal pill TOC on tablet & mobile so docs content appears immediately */
  .docs-toc {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 10px !important;
  }

  .docs-toc::-webkit-scrollbar {
    display: none;
  }

  .docs-toc a {
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--bg-subtle);
    padding: 8px 13px;
    font-size: 0.85rem;
  }

  .wallet-modal {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .wallet-modal-right {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* 3. Smartphones (<= 680px) */
@media (max-width: 680px) {
  .top-nav {
    height: 56px;
    padding: 0 10px;
    gap: 6px;
  }

  .brand-logo {
    gap: 7px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .nav-right {
    gap: 6px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .network-btn {
    height: 34px;
    padding: 0 9px;
    gap: 5px;
    font-size: 0.82rem;
  }

  .network-name-label {
    display: none;
  }

  .network-menu {
    right: -40px;
    width: 208px;
  }

  .wallet-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .hero {
    padding: 22px 14px 48px;
  }

  .hero-eyebrow {
    font-size: 0.76rem;
    padding: 4px 11px;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 6.8vw, 2.25rem);
    line-height: 1.14;
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn-lg {
    flex: 1 1 calc(50% - 6px);
    min-width: 145px;
    height: 46px;
    padding: 0 14px;
    font-size: 0.93rem;
  }

  .hero-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .kpi-card {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .kpi-label {
    font-size: 0.72rem;
  }

  .kpi-value {
    font-size: 1.2rem;
  }

  .kpi-sub {
    font-size: 0.73rem;
  }

  .status-strip {
    margin-top: 12px;
    padding: 0 12px;
  }

  .status-banner {
    padding: 10px 13px;
    gap: 8px;
    font-size: 0.84rem;
  }

  .main-wrap {
    margin: 18px auto 32px;
    padding: 0 12px;
  }

  .section-head {
    gap: 10px;
    margin-bottom: 16px;
  }

  .section-head h2 {
    font-size: 1.4rem;
  }

  .section-head p {
    font-size: 0.88rem;
  }

  .pill-switch {
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pill-switch::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    flex: 1 0 auto;
    padding: 7px 11px;
    font-size: 0.8rem;
    white-space: nowrap;
    text-align: center;
  }

  .plans-grid,
  .steps-grid,
  .security-grid,
  .glossary-grid,
  .income-cards-3,
  .reward-breakdown,
  .wallet-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .content-section {
    margin-top: 32px;
  }

  .faq-search-box {
    max-width: 100%;
    min-width: 100%;
  }

  .faq-question {
    padding: 15px 16px;
    font-size: 0.94rem;
  }

  .faq-answer {
    padding: 12px 16px 16px;
    font-size: 0.88rem;
  }

  .p-card {
    border-radius: 20px;
  }

  .p-card-header {
    padding: 15px 16px;
    flex-wrap: wrap;
  }

  .p-card-body {
    padding: 16px;
  }

  .plan-card {
    border-radius: 20px;
  }

  .plan-card-top,
  .plan-card-body {
    padding: 15px 16px;
  }

  .plan-daily-big {
    font-size: 1.5rem;
  }

  .swap-well {
    padding: 12px 13px;
  }

  .well-top {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.78rem;
  }

  .well-input {
    font-size: 1.25rem;
  }

  .pct-chip {
    min-width: calc(33.33% - 6px);
    padding: 7px 6px;
    font-size: 0.78rem;
  }

  .receipt-box {
    padding: 12px 13px;
    font-size: 0.84rem;
  }

  .receipt-line,
  .plan-stat-row {
    gap: 8px;
    flex-wrap: wrap;
  }

  .ref-link-box {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }

  .ref-link-box input {
    width: 100%;
    font-size: 0.82rem;
    padding: 4px 0;
  }

  .ref-link-box .btn {
    width: 100%;
  }

  .p-table {
    min-width: 560px;
  }

  .p-table th,
  .p-table td {
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  /* Bottom-sheet modals on mobile */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .wallet-modal,
  .settings-modal {
    max-width: 100%;
    max-height: 88dvh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
  }

  .wallet-modal-left {
    padding: 20px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .toast-stack {
    top: 64px;
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .site-footer {
    padding: 28px 14px 32px;
    margin-top: 32px;
  }

  .mob-tab {
    font-size: 0.64rem;
    gap: 2px;
    padding: 5px 1px;
  }
}

/* 4. Extra-Compact Phones (iPhone SE / <= 380px) */
@media (max-width: 380px) {
  .brand-title {
    font-size: 0.9rem;
  }

  .wallet-btn {
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .hero-actions .btn-lg {
    flex: 1 1 100%;
  }

  .hero-kpi-grid {
    grid-template-columns: 1fr;
  }

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

/* ============================================================================
   STYLED GOOGLE TRANSLATE WIDGET (PANCAKESWAP EMERALD THEME, NO TOP BANNER)
   ============================================================================ */

body {
  top: 0px !important;
  position: static !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

.goog-text-highlight {
  background: transparent !important;
  box-shadow: none !important;
}

#google_translate_element {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: -1;
}

.media-preview-thumb {
  width: 100%;
  height: 96px;
  border-radius: 14px;
  background: #07110e;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}

.media-preview-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lang-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  height: 38px;
  padding: 0 11px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: var(--bg-pill);
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0px -1px 0px rgba(6, 46, 34, 0.14);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 215px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  padding: 8px;
  z-index: 260;
  display: none;
}

.lang-menu.open {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lang-item {
  width: 100%;
  padding: 8px 11px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.lang-item:hover {
  background: var(--bg-subtle);
}

.lang-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

/* ============================================================================
   TELEGRAM COMMUNITY PILLS & PWA INSTALL CHIP
   ============================================================================ */

.tg-community-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 2px 0 var(--border-lip);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.tg-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  text-decoration: none;
}

.tg-chip.bot {
  background: var(--gold-soft);
  border-color: rgba(245, 158, 11, 0.42);
  color: #b45309;
}

[data-theme="dark"] .tg-chip.bot {
  color: var(--gold);
}

/* ============================================================================
   1-CLICK HARVEST & RE-STAKE + PAGINATED BATCH WITHDRAWALS
   ============================================================================ */

.restake-bar {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--bg-subtle);
  border: 1px dashed var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.restake-select {
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

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

.batch-inputs-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-num-input {
  width: 82px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
  padding: 0 8px;
}

/* ============================================================================
   VIRAL SHARE KIT, QR CODE, CANVAS RANK STUDIO, PROMO SCRIPTS & NETWORK GUIDE
   ============================================================================ */

.share-studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  margin-top: 22px;
}

.qr-showcase {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.qr-canvas-wrap {
  background: #ffffff;
  padding: 10px;
  border-radius: 16px;
  border: 2px solid var(--primary);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-share-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.btn-tg {
  background: #229ed9;
  color: #ffffff;
}
.btn-tg:hover:not(:disabled) {
  background: #35b0eb;
}

.btn-wa {
  background: #25d366;
  color: #062e22;
}
.btn-wa:hover:not(:disabled) {
  background: #3be279;
}

.btn-x {
  background: #14171a;
  color: #ffffff;
}
[data-theme="dark"] .btn-x {
  background: #2c343c;
}
.btn-x:hover:not(:disabled) {
  opacity: 0.9;
}

.share-card-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 2px solid var(--border-card);
  box-shadow: var(--shadow-card);
  background: #07110e;
}

.promo-scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 16px;
  margin-top: 16px;
}

.promo-script-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-script-text {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.84rem;
  line-height: 1.45;
  padding: 10px 12px;
}

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  margin-top: 16px;
}

.playbook-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  margin-top: 16px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.swatch-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

@media (max-width: 960px) {
  .share-studio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lang-btn span.lang-code-label {
    display: none;
  }
  .lang-btn {
    padding: 0 9px;
  }
  .qr-showcase {
    justify-content: center;
    text-align: center;
  }
}
