body.maya-body {
  background: radial-gradient(circle at top, #16281f 0, #0e1b14 55%, #050a07 100%);
  color: var(--fg);
  font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  direction: rtl;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header */
.maya-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(6, 12, 9, 0.97), rgba(6, 12, 9, 0.9));
  border-bottom: 1px solid rgba(38, 66, 51, 0.9);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #ffffff22, #2e7d6a 35%, #16281f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #f7f7f5;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.nav-links a:hover {
  color: var(--fg);
  background: rgba(46, 125, 106, 0.12);
  transform: translateY(-1px);
}

.nav-links .nav-active {
  color: var(--fg);
  background: rgba(46, 125, 106, 0.2);
}

.nav-btn {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.nav-login {
  border-color: rgba(46, 125, 106, 0.6);
  color: var(--brand-light);
  background: transparent;
}

.nav-login:hover {
  background: rgba(46, 125, 106, 0.12);
}

.nav-cta {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #050a07;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.nav-cta:hover {
  filter: brightness(1.05);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 999px;
}

/* Hero */
.aff-hero {
  padding-block: 3.5rem 2.5rem;
  background: radial-gradient(circle at top, #1a2f24 0, #050b08 85%);
  border-bottom: 1px solid rgba(38, 66, 51, 0.9);
}

.aff-hero-inner {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.aff-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(212, 175, 55, 0.6);
  background: rgba(6, 95, 70, 0.18);
  color: var(--accent-gold);
  font-size: 0.8rem;
  margin-bottom: 0.9rem;
}

.aff-hero-inner h1 {
  margin: 0 0 0.7rem;
  font-size: 1.9rem;
}

.aff-hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.aff-hero-badges {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.aff-hero-badges span {
  font-size: 0.85rem;
  color: var(--brand-light);
  background: rgba(6, 95, 70, 0.18);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(46, 125, 106, 0.6);
}

/* Layout */
.aff-section {
  padding-block: 3rem 4rem;
}

.aff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: flex-start;
}

.aff-main,
.aff-side {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.aff-card {
  background: rgba(9, 15, 11, 0.98);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem 1.5rem;
  border: 1px solid rgba(75, 85, 99, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.aff-side-card {
  border-color: rgba(38, 66, 51, 0.9);
}

/* Text */
.aff-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}

.aff-text {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Stats */
.aff-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 0.4rem 0.8rem;
}

.aff-stat {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.aff-stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.aff-stat-value {
  font-size: 1.05rem;
}

/* Referral box */
.aff-ref-box {
  margin-top: 0.4rem;
}

.aff-ref-label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.aff-ref-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.aff-ref-input {
  flex: 1;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: var(--fg);
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.aff-ref-input::selection {
  background: rgba(34, 197, 94, 0.25);
}

.aff-copy-btn {
  flex-shrink: 0;
}

.aff-ref-hint {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 14px 35px rgba(236, 72, 153, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-secondary {
  border-color: rgba(148, 163, 184, 0.85);
  color: var(--fg);
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Commission table */
.aff-comm-table-wrapper {
  margin-top: 0.5rem;
  overflow-x: auto;
}

.aff-comm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.aff-comm-table th,
.aff-comm-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8);
}

.aff-comm-table th {
  text-align: right;
  background: rgba(15, 23, 42, 0.95);
  font-weight: 600;
}

.aff-comm-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.5);
}

/* NEW: percent pill */
.aff-comm-pct{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(46, 125, 106, 0.6);
  background: rgba(6, 95, 70, 0.16);
  color: var(--brand-light);
  font-weight: 700;
  font-size: 0.82rem;
}

.aff-note {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* FAQ */
.aff-faq details {
  border-radius: var(--radius);
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 0.55rem 0.8rem;
  background: rgba(15, 23, 42, 0.95);
}

.aff-faq details + details {
  margin-top: 0.5rem;
}

.aff-faq summary {
  cursor: pointer;
  font-size: 0.9rem;
  list-style: none;
}

.aff-faq summary::-webkit-details-marker {
  display: none;
}

.aff-faq summary::before {
  content: "›";
  display: inline-block;
  transform: rotate(180deg);
  margin-inline-start: 0.2rem;
  margin-inline-end: 0.4rem;
  font-size: 0.8rem;
}

.aff-faq details[open] summary::before {
  transform: rotate(90deg);
}

.aff-faq p {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Side content */
.aff-steps {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.aff-steps li {
  margin-bottom: 0.3rem;
}

.aff-tips {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.aff-tips li {
  position: relative;
  padding-inline-start: 0.9rem;
  margin-bottom: 0.3rem;
}

.aff-tips li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 0;
  color: var(--brand-light);
}

.aff-side-text {
  margin: 0.3rem 0 0.3rem;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Footer */
.maya-footer {
  border-top: 1px solid rgba(38, 66, 51, 0.9);
  padding-block: 1.8rem;
  background: #050a07;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.9rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-title {
  margin: 0 0 0.15rem;
  font-weight: 600;
}

.footer-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--fg);
}

.footer-copy {
  width: 100%;
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Links */
a {
  color: var(--brand-light);
}

/* Responsive */
@media (max-width: 960px) {
  .aff-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .aff-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset-inline: 0;
    inset-block-start: 64px;
    background: rgba(5, 10, 7, 0.98);
    border-top: 1px solid rgba(38, 66, 51, 0.9);
    flex-direction: column;
    padding: 0.75rem 1.25rem 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .aff-hero {
    padding-block: 3rem 2.2rem;
  }
}
